diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ea2f0bdce39548a1bf198aa209117f0d771e7198..dcea2bcc5a63cdcb11618bae89e239ad8e66e0f0 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<manifest android:hardwareAccelerated="true" android:versionCode="106000" android:versionName="1.6.0" package="fr.duniter.cesium" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
+<manifest android:hardwareAccelerated="true" android:versionCode="106011" android:versionName="1.6.1" package="fr.duniter.cesium" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
     <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
     <uses-permission android:name="android.permission.INTERNET" />
     <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
@@ -22,5 +22,5 @@
     <uses-feature android:name="android.hardware.camera" android:required="true" />
     
     
-    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" tools:overrideLibrary="org.kaliumjni.lib" />
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" tools:overrideLibrary="org.kaliumjni.lib" />
 </manifest>
diff --git a/assets/www/config.js b/assets/www/config.js
index 2c1f3b9078dd83249448c1eebc6dc1aa9b292f44..8ead36af5d4cca8e2b34b20c6318bc05df9374f0 100644
--- a/assets/www/config.js
+++ b/assets/www/config.js
@@ -95,8 +95,8 @@ angular.module("cesium.config", [])
 			"defaultCountry": "France"
 		}
 	},
-	"version": "1.6.0",
-	"build": "2020-03-17T16:04:23.943Z",
+	"version": "1.6.1",
+	"build": "2020-03-17T16:53:24.807Z",
 	"newIssueUrl": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new"
 })
 
diff --git a/assets/www/dist_js/cesium.js b/assets/www/dist_js/cesium.js
index 9ad6b9019b78202b20bc1d9d03b2fea2156d1b42..cf7ee427bdd92d1f370d5d764a2eb725bad5b775 100644
--- a/assets/www/dist_js/cesium.js
+++ b/assets/www/dist_js/cesium.js
@@ -1,15 +1,55309 @@
-/* minified */
-function e(e){var t=this;Object.keys(e).forEach((function(n){t[n]=e[n]})),t.endpoints=t.endpoints||[]}function t(e,t){"use strict";var n=this;t&&t.length?_.forEach(t,(function(t){n[t]=e[t]})):["currency","issuer","medianTime","number","version","powMin","dividend","membersCount","hash","identities","joiners","actives","leavers","revoked","excluded","certifications","transactions","unitbase"].forEach((function(t){n[t]=e[t]})),n.identitiesCount=n.identities?n.identities.length:0,n.joinersCount=n.joiners?n.joiners.length:0,n.activesCount=n.actives?n.actives.length:0,n.leaversCount=n.leavers?n.leavers.length:0,n.revokedCount=n.revoked?n.revoked.length:0,n.excludedCount=n.excluded?n.excluded.length:0,n.certificationsCount=n.certifications?n.certifications.length:0,n.transactionsCount=n.transactions?n.transactions.length:0,n.empty=n.isEmpty(),n.id=[n.number,n.hash].join("-")}function n(e){var t=e.split(":");if(t.length<3||!t[0].startsWith("WS2P"))throw Error("Invalid format: "+e);if("HEAD"==t[1]){if(t.length<4)throw Error("Invalid format: "+e);if(4==t.length)this.pubkey=t[2],this.buid=t[3];else if(t[2]>=1){var n=t[0];if(n.length>4){var i=this.regexp.WS2P_PREFIX.exec(n);if(!i)throw Error("Invalid format: "+e);var a=i[1];if(a){this.private={useTor:a.startsWith("T")};var o=a.substring(1);"A"==o?this.private.mode="all":"M"==o?this.private.mode="mixed":"S"==o&&(this.private.mode="strict")}var r=i[2];r&&(this.public={useTor:r.startsWith("T"),mode:"all"})}this.pubkey=t[3],this.buid=t[4],this.ws2pid=t[5],this.software=t[6],this.version=t[7],this.powPrefix=t[8]}}}function a(e,t){e.extensionPoint=t.extensions.points.current.get()}function o(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b,g,f,_,T){e.walletData=b.data,e.search={},e.login=b.isLogin(),e.auth=b.isAuth(),e.motion=m.motion.default,e.fullscreen=m.screen.fullscreen.isEnabled(),e.showHome=function(){return r.nextViewOptions({historyRoot:!0}),n.go("app.home").then(m.loading.hide)},e.scanQrCodeAndGo=function(){if(g.barcode.enable)return g.barcode.scan().then((function(e){if(e)return E.uri.parse(e).then((function(e){if(!e||!e.pubkey)throw{message:"ERROR.SCAN_UNKNOWN_FORMAT"};return n.go("app.wot_identity",{pubkey:e.pubkey,node:e.host?e.host:null})})).catch((function(t){return console.debug("[app] Scan data is not an URI (get error: "+(t&&t.message||t)+"). Trying to decode as a WIF or EWIF format..."),p.keyfile.parseData(e).then((function(e){if(!e||!e.signPk||!e.signSk)throw t;var i=d.base58.encode(e.signPk);console.debug("[app] Detected WIF/EWIF format. Will login to wallet {"+i.substring(0,8)+"}");var a=b.isLogin()?b.children.create({store:!1}):b;return a.login({silent:!0,forceAuth:!0,minData:!1,authData:{pubkey:i,keypair:e}}).then((function(){return r.nextViewOptions({historyRoot:!0}),n.go("app.new_transfer",{all:!0,wallet:a.isDefault()?void 0:a.id})}))})).catch(m.onError("ERROR.SCAN_UNKNOWN_FORMAT"))}))})).catch(m.onError("ERROR.SCAN_FAILED"))},e.createHelptipScope=function(n){if(n||!t.tour&&t.settings.helptip.enable&&!m.screen.isSmall()){var i=e.$new();return s("HelpTipCtrl",{$scope:i}),i}},e.startHelpTour=function(n,i){if(n&&n.defaultPrevented)return!1;if(t.tour=!0,!i)return r.clearHistory(),r.clearCache().then((function(){e.startHelpTour(null,!0)}));var a=e.createHelptipScope(!0);return a.startHelpTour().then((function(){a.$destroy(),delete t.tour})).catch((function(e){delete t.tour}))},e.disableHelpTour=function(e){e&&(e.preventDefault(),e.stopPropagation()),u.data.helptip&&u.data.helptip.enable&&(t.settings.helptip.enable=!1,u.store())},e.isLogin=function(){return e.login},e.loadWalletData=function(e){return console.warn("[app-controller] DEPRECATED  - Please use csWallet.load() instead of $scope.loadWalletData()",new Error),((e=e||{}).wallet||b).loadData(e).then((function(e){if(!e)throw"CANCELLED";return e}))},e.loadWallet=function(t){if(console.warn("[app-controller] DEPRECATED  - Please use csWallet.loginOrLoad() instead of $scope.loadWallet()",new Error),!c.isStarted())return c.ready().then((function(){return e.loadWallet(t)}));var n=(t=t||{}).wallet||b;return t.auth&&!n.isAuth()?n.auth(t).then((function(e){if(e)return e;throw"CANCELLED"})):n.isLogin()?n.isDataLoaded(t)?a.when(n.data):e.loadWalletData(t):n.login(t).then((function(e){if(e)return e;throw"CANCELLED"}))},e.loginAndGo=function(t,i){e.closeProfilePopover();var a=(i=i||{}).wallet||b;if(delete i.wallet,t=t||"app.view_wallet",a.isLogin())return n.go(t,i);if(_.httpsMode&&l.location&&"https:"!==l.location.protocol){var o=l.location.href,r=o.indexOf("#"),s=-1!=r?o.substr(0,r):o;if(o=(s="https"+s.substr(4))+n.href(t),!_.httpsModeDebug)return void(l.location.href=o);console.debug("[httpsMode] --- Should redirect to: "+o)}return a.login(i).then((function(){return n.go(t,i)})).then(m.loading.hide)},e.logout=function(t){var n=(t=t||{}).wallet||b;return!t.force&&e.profilePopover?e.profilePopover.hide().then((function(){return t.force=!0,e.logout(t)})):t.askConfirm?m.alert.confirm("CONFIRM.LOGOUT").then((function(n){if(n)return t.askConfirm=!1,e.logout(t)})):(m.loading.show(),n.logout().then((function(){if(i.isOpenLeft()&&i.toggleLeft(),n.isDefault())return r.clearHistory(),r.clearCache().then((function(){return e.showHome()}));m.loading.hide(10)})).catch(m.onError("ERROR.LOGOUT")))},e.doAuth=function(e){return(e&&e.wallet||b).auth().then(m.loading.hide)},e.isUserPubkey=function(e){return b.isUserPubkey(e)},b.api.data.on.login(e,(function(t,n){return e.login=!0,n?n.resolve():a.when()})),b.api.data.on.logout(e,(function(){e.login=!1})),b.api.data.on.auth(e,(function(t,n){return e.auth=!0,n?n.resolve():a.when()})),b.api.data.on.unauth(e,(function(){e.auth=!1})),e.showTransferModal=function(e){return f.showTransfer(e)},e.showAboutModal=function(){return f.showAbout()},e.showJoinModal=function(){return e.closeProfilePopover(),f.showJoin()},e.showSettings=function(){return e.closeProfilePopover(),n.go("app.settings")},e.showHelpModal=function(e){return f.showHelp(e)},e.showProfilePopover=function(t){return m.popover.show(t,{templateUrl:"templates/common/popover_profile.html",scope:e,autoremove:!0,afterShow:function(t){e.profilePopover=t,o((function(){m.ink({selector:"#profile-popover .ink, #profile-popover .ink-dark"})}),100)}})},e.closeProfilePopover=function(){e.profilePopover&&e.profilePopover.isShown()&&o((function(){e.profilePopover.hide()}))},e.showPeerInfoPopover=function(t){return m.popover.show(t,{templateUrl:"templates/network/popover_peer_info.html",autoremove:!0,scope:e.$new(!0)})},e.openLink=function(e,t,i){if(e.stopPropagation(),e.preventDefault(),t&&t.startsWith("@")){var a=t.substr(1);if(E.regexp.USER_ID.test(a))return n.go("app.wot_identity_uid",{uid:a}),!1}return(i=i||{}).onError=function(){return m.popover.copy(e,t)},T.uri.open(t,i),!1},e.showFab=function(e,t){m.motion.toggleOn({selector:"#"+e+".button-fab"},t)},e.hideFab=function(e,t){m.motion.toggleOff({selector:"#"+e+".button-fab"},t)},e.doMotion=function(t){return e.motion.show(t)},e.askFullscreen=function(){if(!e.fullscreen&&m.screen.isSmall()&&g.isWeb())return m.alert.confirm("CONFIRM.FULLSCREEN",null,{cancelText:"COMMON.BTN_NO",okText:"COMMON.BTN_YES"}).then((function(t){t&&e.toggleFullscreen()}))},e.toggleFullscreen=function(){e.fullscreen=!m.screen.fullscreen.isEnabled(),m.screen.fullscreen.toggleAll()}}function r(e,t,n,i,a,o,r,s,l,c,u,d){e.loading=!0,e.locales=angular.copy(d.locales),e.smallscreen=r.screen.isSmall(),e.enter=function(n,a){ionic.Platform.isIOS()&&window.StatusBar&&(StatusBar.overlaysWebView(!1),StatusBar.overlaysWebView(!0)),a&&a.stateParams&&a.stateParams.error?(e.error=a.stateParams.error,e.node=u.data.node,e.loading=!1,i.nextViewOptions({disableAnimate:!0,disableBack:!0,historyRoot:!0}),t.go("app.home",{error:void 0},{reload:!1,inherit:!0,notify:!1})):c.ready().then((function(){e.loading=!1,e.loadFeeds()})).catch((function(t){e.node=u.data.node,e.loading=!1,e.error=t}))},e.$on("$ionicView.enter",e.enter),e.reload=function(){e.loading=!0,delete e.error,n(e.enter,200)},e.loadFeeds=function(){var t=d.getFeedUrl();if(t&&"string"==typeof t){var n=s.feed&&s.feed.maxContentLength||650,i=Date.now();console.debug("[home] Loading feeds from {0}...".format(t)),o.get(t,{responseType:"json",cache:l.get(null,l.constants.LONG)}).success((function(t){console.debug("[home] Feeds loaded in {0}ms".format(Date.now()-i)),t&&t.items&&t.items.length&&(t.items=t.items.reduce((function(e,i){if(!i||!i.title&&!i.content_text&&!i.content_html)return e;if(i.date_published&&(i.time=moment.utc(i.date_published).unix()),i.content_html?i.content=i.content_html:i.content=(i.content_text||"").replace(/\n/g,"<br/>"),-1!==n&&i.content&&i.content.length>n){var a=Math.max(i.content.lastIndexOf(" ",n),i.content.lastIndexOf("<",n));i.content=i.content.substr(0,a)+" (...)",i.truncated=!0}return i.author=i.author||t.author,e.concat(i)}),[]),e.feed=t)})).error((function(t,n){console.error("[home] Failed to load feeds."),e.feed=null}))}},e.doQuickFix=function(e){"settings"===e&&(i.nextViewOptions({historyRoot:!0}),t.go("app.settings"))},e.changeLanguage=function(t){a.use(t),e.hideLocalesPopover(),d.data.locale=_.findWhere(e.locales,{id:t}),d.store(),e.loadFeeds()},e.showLocalesPopover=function(t){r.popover.show(t,{templateUrl:"templates/common/popover_locales.html",scope:e,autoremove:!0,afterShow:function(t){e.localesPopover=t}})},e.hideLocalesPopover=function(){e.localesPopover&&(e.localesPopover.hide(),e.localesPopover=null)}}function s(e,t,n,i,a){angular.extend(this,n("HomeCtrl",{$scope:e})),e.showJoinModal=function(){return e.loading?t(e.showJoinModal,500):a.isLogin()||e.error?void 0:t(i.showJoin,300)},e.$on("$ionicView.enter",e.showJoinModal)}function l(e,t,n,i,a){e.formData={},e.slides={slider:null,options:{loop:!1,effect:"slide",speed:500}},e.loading=!0,e.load=function(){if(e.loading)return a.get().then((function(t){t&&(e.currency=t,e.formData.currency=t.name,e.loading=!1)})).catch(i.onError("ERROR.GET_CURRENCY_FAILED"))},e.$on("modal.shown",e.load),e.$on("$ionicSlides.sliderInitialized",(function(e,t){t.slider.lockSwipes()})),e.slidePrev=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slidePrev(),e.slides.slider.lockSwipes()},e.slideNext=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slideNext(),e.slides.slider.lockSwipes()},e.selectAccountTypeAndClose=function(t){e.formData.accountType=t,e.closeModal(e.formData)},e.doQuickFix=function(n){"settings"==n&&(e.closeModal(),t.go("app.settings"))},e.showHelpModal=function(e){n.showHelp({anchor:e})}}function c(e,t,n,i,a,o,r,s,l,c,u,d,p){var m;e.formData={pseudo:p.uid||"",pubkey:p.pubkey||void 0},e.slides={slider:null,options:{loop:!1,effect:"slide",speed:500,pager:!1,showPager:!1}},e.slideBehavior={},e.loading=!0,e.isLicenseRead=o.isIOS(),e.showUsername=!1,e.showPassword=!1,e.formData.computing=!1,e.smallscreen=r.screen.isSmall(),e.userIdPattern=d.constants.regexp.USER_ID,e.accountAvailable=!!p.pubkey,e.currency=p.currency,e.accountType=p.accountType||"member",e.load=function(){if(e.loading){if(!(m=p.walletId&&u.children.get(p.walletId)||p.pubkey&&u.children.getByPubkey(p.pubkey)||(!p.pubkey||u.isUserPubkey(p.pubkey))&&u))throw new Error("Cannot found the corresponding wallet, from parameters.pubkey or parameters.walletId");console.debug("[join] Starting join modal on wallet {0}".format(m.id)),"member"===e.accountType&&(e.licenseFileUrl=l.getLicenseUrl(),e.licenseFileUrl&&(".txt"!=e.licenseFileUrl.substring(e.licenseFileUrl.length-3)&&(e.licenseFileUrl=e.licenseFileUrl+".html"),e.isLicenseRead||a((function(){e.isLicenseRead||(e.isLicenseRead=!0)}),5e3))),e.slideBehavior=e.computeSlideBehavior(),e.loading=!1}},e.$on("modal.shown",e.load),e.$on("$ionicSlides.sliderInitialized",(function(e,t){t.slider.lockSwipes()})),e.slidePrev=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slidePrev(),e.slides.slider.lockSwipes()},e.slideNext=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slideNext(),e.slides.slider.lockSwipes()},e.showAccountPubkey=function(){if(p.pubkey&&p.pseudo===e.formData.pseudo)return e.formData.pubkey=p.pubkey,void(e.formData.computing=!1);e.formData.computing=!0,s.scryptKeypair(e.formData.username,e.formData.password).then((function(t){return e.formData.pubkey=s.util.encode_base58(t.signPk),e.checkAccountAvailable()})).then((function(){return a((function(){e.formData.computing=!1}),400)})).catch((function(t){e.formData.pubkey=void 0,e.formData.computing=!1,r.onError("ERROR.CRYPTO_UNKNOWN_ERROR")(t)}))},e.formDataChanged=function(){e.formData.computing=!1,e.formData.pubkey=null},e.getCurrentFormName=function(){var t=e.slides.slider.activeIndex;if("member"===e.accountType){if(t+=e.licenseFileUrl?0:1,0===(t+=p.pubkey&&t>=2?2:0))return"licenseForm";if(1===t)return"pseudoForm";if(2===t)return"saltForm";if(3===t)return"passwordForm";if(4===t)return"confirmForm"}else{if(0===t)return"saltForm";if(1===t)return"passwordForm";if(2===t)return"confirmForm"}},e.computeSlideBehavior=function(){var t=e.getCurrentFormName();return"licenseForm"===t?{hasPreviousButton:!1,hasNextButton:!1,hasAcceptButton:!0}:"pseudoForm"===t?{helpAnchor:"join-pseudo",hasPreviousButton:e.licenseFileUrl&&!0,hasNextButton:!0,focus:"pseudo"}:"saltForm"===t?{helpAnchor:"join-salt",hasPreviousButton:"member"===e.accountType,hasNextButton:!0,focus:"salt"}:"passwordForm"===t?{helpAnchor:"join-password",hasPreviousButton:!0,hasNextButton:!0,focus:"password"}:"confirmForm"===t?{hasPreviousButton:!0,hasNextButton:!1,hasSendButton:!0,helpAnchor:"join-pubkey"}:{hasPreviousButton:!1,hasNextButton:!0}},e.doNext=function(){var t=e.getCurrentFormName();if(t&&e[t]){if(e[t].$submitted=!0,!e[t].$valid)return;if("pseudoForm"===t&&e.uiAlreadyUsed)return;"passwordForm"===t&&e.showAccountPubkey()}e.slideNext(),e.slideBehavior=e.computeSlideBehavior()},e.doPrev=function(){e.slidePrev(),e.slideBehavior=e.computeSlideBehavior()},e.doNewAccount=function(n){if(!n){var o="member"===e.accountType?"ACCOUNT.NEW.CONFIRMATION_MEMBER_ACCOUNT":"ACCOUNT.NEW.CONFIRMATION_WALLET_ACCOUNT";return r.alert.confirm(o,void 0,{cssClass:"warning",okText:"member"==e.accountType?"COMMON.BTN_SEND":"COMMON.BTN_CONTINUE",okType:"button-assertive"}).then((function(t){t&&e.doNewAccount(!0)}))}var s=function(e){return function(t){throw parameter.uid?m.unauth().then((function(){r.onError(e)(t)})):m.logout().then((function(){r.onError(e)(t)})),new Error("CANCELLED")}};return r.loading.show(),m.login({auth:!0,isNew:!0,method:"SCRYPT_DEFAULT",expectedPubkey:e.formData.pubkey,showMethods:!1}).then((function(){if("member"===e.accountType){e.closeModal(),l.data.wallet=l.data.wallet||{},l.data.wallet.alertIfUnusedWallet=!1;var n=angular.isUndefined(p.uid)||angular.isUndefined(p.blockUid)||p.uid.toUpperCase()!==e.formData.pseudo.toUpperCase();return n||m.setSelf(p.uid,p.blockUid),(n?m.self(e.formData.pseudo,!1).catch(s("ERROR.SEND_IDENTITY_FAILED")):i.when()).then((function(){return m.membership.inside().catch((function(e){e&&e.ucode!=d.errorCodes.MEMBERSHIP_ALREADY_SEND||s("ERROR.SEND_MEMBERSHIP_IN_FAILED")(e)}))})).then((function(){return e.closeModal(),m.isDefault()?t.go("app.view_wallet"):t.go("app.view_wallet_by_id",{id:m.id})})).then((function(){return a((function(){return m.isDataLoaded({requirements:!0})&&r.loading.hide(),e.downloadRevocationRegistration()}),2e3)}))}e.closeModal(),m.isDefault()?t.go("app.view_wallet"):t.go("app.view_wallet_by_id",{id:m.id})})).catch((function(e){r.loading.hide(),"CANCELLED"!==e&&(e&&e.ucode!=d.errorCodes.MEMBERSHIP_ALREADY_SEND?console.error("[wallet] Node: already membership",e):r.alert.error("ERROR.UNKNOWN_ERROR"))}))},e.downloadRevocationRegistration=function(){return r.alert.confirm("DOWNLOAD.POPUP_REVOKE_MESSAGE","DOWNLOAD.POPUP_TITLE",{cssClass:"warning",okText:"COMMON.BTN_DOWNLOAD",okType:"button-assertive",cancelText:"COMMON.BTN_LATER"}).then((function(e){if(e)return m.downloadRevocation()}))},e.showHelpModal=function(e){c.showHelp({anchor:e})},e.startListenLicenseBottom=function(){var t=angular.element(document.querySelector(".modal #iframe-license"));if(!(t=t&&t.length?t[0]:void 0)||!t.contentWindow)return console.debug("[join] Waiting license frame to be load..."),a(e.startListenLicenseBottom,1e3);e.licenseBottomInterval=n((function(){var n=t.contentWindow.document.body.scrollTop;t.contentWindow.document.body.scrollHeight-t.contentWindow.document.body.clientHeight===n&&(e.isLicenseRead=!0,e.stopListenLicenseBottom())}),1e3)},e.stopListenLicenseBottom=function(){e.licenseBottomInterval&&(n.cancel(e.licenseBottomInterval),delete e.licenseBottomInterval)},e.$on("modal.hidden",e.stopListenLicenseBottom),e.checkUid=function(){if(!e.formData.pseudo||e.formData.pseudo.length<3)return e.formData.computing=!1,void delete e.uiAlreadyUsed;var t=e.formData.pseudo.toUpperCase();if(e.formData.computing=!0,p.uid&&t===p.uid.toUpperCase())return e.formData.computing=!1,void(e.uiAlreadyUsed=!1);d.wot.lookup({search:t}).then((function(n){e.uiAlreadyUsed=(n.results||[]).some((function(e){return(e.uids||[]).some((function(e){return e.uid.toUpperCase()===t}))})),e.formData.computing=!1})).catch((function(t){console.error(t),e.formData.computing=!1,e.uiAlreadyUsed=!1}))},e.$watch("formData.pseudo",e.checkUid,!0),e.checkAccountAvailable=function(){if(!p.pubkey)return delete e.accountAvailable,d.tx.sources({pubkey:e.formData.pubkey}).then((function(t){e.accountAvailable=!t||!t.sources.length})).catch((function(t){console.error(t),e.accountAvailable=!1}));e.accountAvailable=!0},e.identifierRecovery=function(){e.slides.slider.unlockSwipes();for(var t=0;t<2;t++)e.slides.slider.slidePrev();e.slides.slider.lockSwipes(),e.slideBehavior=e.computeSlideBehavior()}}function u(e,t,n,i){angular.extend(this,n("HomeCtrl",{$scope:e})),e.showLoginModal=function(){return e.loading?t(e.showLoginModal,500):i.isLogin()||e.error?void 0:t(i.login,300)},e.$on("$ionicView.enter",e.showLoginModal)}function d(e,t,n,i,a,o,r,s,l,c,u,d,p,m){m=m||{},e.computing=!1,e.pubkey=null,e.formData={},e.showPubkey=!1,e.showComputePubkeyButton=!1,e.autoComputePubkey=!1,e.pubkeyPattern="^(:?{0}|{1})$".format(c.constants.regexp.PUBKEY,c.constants.regexp.PUBKEY_WITH_CHECKSUM),e.isAuth=m.auth,e.okText=m.okText,e.title=m.title||(e.isAuth?"AUTH.TITLE":"LOGIN.TITLE"),e.showMethods=!angular.isDefined(m.showMethods)||m.showMethods,e.showNewAccountLink=!angular.isDefined(m.showNewAccountLink)||m.showNewAccountLink,e.expectedPubkey=m.expectedPubkey,e.expectedUid=m.uid,e.scryptParamsValues=_.keys(o.constants.SCRYPT_PARAMS).reduce((function(e,t){return e.concat({id:t,label:"LOGIN.SCRYPT."+t,params:o.constants.SCRYPT_PARAMS[t]})}),[{id:"USER",label:"LOGIN.SCRYPT.USER",params:{}}]),e.init=function(){s().then((function(){e.autoComputePubkey="a"===ionic.Platform.grade.toLowerCase()&&!l.screen.isSmall()})),e.formData.rememberMe=d.data.rememberMe,e.formData.keepAuthIdle=d.data.keepAuthIdle,e.formData.keepAuth=e.formData.keepAuthIdle==d.constants.KEEP_AUTH_IDLE_SESSION;var t=m.method||d.data.login&&d.data.login.method||"SCRYPT_DEFAULT",n=d.data.login&&d.data.login.params;(e.isAuth&&"PUBKEY"===t||"SCAN"===t||"default"===t)&&(t="SCRYPT_DEFAULT"),e.changeMethod(t,n)},e.enter=function(){l.loading.hide(),l.ink({selector:".modal-login .ink"})},e.$on("modal.shown",e.enter),e.leave=function(){e.formData={},e.computing=!1,e.pubkey=null,e.methods=[]},e.$on("modal.hide",e.leave),e.doLogin=function(n){var i=e.formData.method;if(e.form.$valid||"SCAN"===i){p.keyboard.close();var a,s=e.formData.keepAuthIdle;if("SCRYPT_DEFAULT"===i||"SCRYPT_ADVANCED"===i){if(!e.formData.username||!e.formData.password)return;var u=e.formData.scrypt&&e.formData.scrypt.params;l.loading.show(),a=o.scryptKeypair(e.formData.username,e.formData.password,u).then((function(t){if(!t)return l.loading.hide(10);var n=o.util.encode_base58(t.signPk);return m.expectedPubkey&&m.expectedPubkey!=n?(e.pubkey=n,e.showPubkey=!0,e.pubkeyError=!0,l.loading.hide(10)):(e.pubkeyError=!1,{pubkey:n,keypair:t,params:e.formData.scrypt&&"SCRYPT_DEFAULT"!=e.formData.scrypt.id?u:void 0})})).catch(l.onError("ERROR.CRYPTO_UNKNOWN_ERROR"))}else if("FILE"===i){if(!e.formData.file||!e.formData.file.valid||!e.formData.file.pubkey)return;s=e.formData.keepAuth&&d.constants.KEEP_AUTH_IDLE_SESSION||s,a=l.loading.show().then((function(){return e.readKeyFile(e.formData.file,{withSecret:e.isAuth||e.formData.keepAuth})})).then((function(t){if(!t)return l.loading.hide(10);var n=o.util.encode_base58(t.signPk);return m.expectedPubkey&&m.expectedPubkey!=n?(e.formData.file.valid=!1,l.loading.hide(10)):(e.pubkeyError=!1,{pubkey:n,keypair:t})})).catch(l.onError("ERROR.AUTH_FILE_ERROR"))}else if("PUBKEY"===i){var E=e.formData.pubkey&&e.formData.pubkey.trim(),b=e.formData.uid&&e.formData.uid.trim()||void 0;if(!E)return;var g=c.regexp.PUBKEY.exec(E);if(g)a=l.loading.show().then((function(){return{pubkey:E,uid:b}}));else{if(!(g=c.regexp.PUBKEY_WITH_CHECKSUM.exec(E)))return e.showWotLookupModal(E);E=g[1],g[2]!=r.util.pkChecksum(E)?e.form.pubkey.$error={checksum:!0}:a=l.loading.show().then((function(){return{pubkey:E,uid:b}}))}}else if("SCAN"===i){if(!e.formData.pubkey||e.isAuth&&!e.formData.keypair)return;a=l.loading.show().then((function(){return{pubkey:e.formData.pubkey,keypair:e.formData.keypair}}))}if(a)return a.then((function(n){if(n){var a=!angular.equals(d.data.rememberMe,e.formData.rememberMe),o=!angular.equals(d.data.keepAuthIdle,s),r=!angular.equals(d.data.login&&d.data.login.method,i),c=!angular.equals(d.data.login&&d.data.login.params,n.params);return(a||o||r||c)&&(d.data.rememberMe=e.formData.rememberMe,d.data.keepAuthIdle=s,d.data.useLocalStorage=!!d.data.rememberMe||d.data.useLocalStorage,d.data.login=d.data.login||{},d.data.login.method=i,d.data.login.params=n.params,t(d.store,500)),m.success&&m.success(e.formData),m.silent&&l.loading.hide(),e.closeModal(n)}}));console.warn("[login] unknown method: ",i)}},e.onScryptFormChanged=function(){e.computing||(e.pubkey=null,e.pubkeyError=!1,e.showPubkey=!!e.formData.username&&!!e.formData.password,e.autoComputePubkey&&e.showPubkey?(e.computePubkey(),e.showComputePubkeyButton=!1):e.showComputePubkeyButton=!e.autoComputePubkey&&e.showPubkey)},e.$watch("formData.username + formData.password",e.onScryptFormChanged,!0),e.computePubkey=function(){return e.showComputePubkeyButton=!1,e.computing=!0,e.pubkey=null,t((function(){var t=e.formData.username,n=e.formData.password,i=e.formData.scrypt&&e.formData.scrypt.params;return o.scryptSignPk(t,n,i).then((function(i){if(t!==e.formData.username||n!==e.formData.password)return e.computePubkey();e.pubkey=o.util.encode_base58(i),e.expectedPubkey&&e.expectedPubkey!=e.pubkey&&(e.pubkeyError=!0),e.computing=!1})).catch((function(t){l.onError("ERROR.CRYPTO_UNKNOWN_ERROR")(t),e.computing=!1,e.autoComputePubkey=!1,e.onScryptFormChanged()}))}),100)},e.showJoinModal=function(){e.closeModal(),t((function(){u.showJoin()}),300)},e.showAccountSecurityModal=function(){e.closeModal(),t((function(){u.showAccountSecurity()}),300)},e.showHelpModal=function(e){return u.showHelp(e)},e.doScan=function(){if(!e.computing)return e.computing=!0,e.formData.pubkey=null,e.formData.keypair=null,p.barcode.scan().then((function(t){if(t)return e.isAuth?n.when(t):c.uri.parse(t).then((function(e){if(!e||!e.pubkey)throw{message:"ERROR.SCAN_UNKNOWN_FORMAT"};return e})).catch((function(e){return console.debug("[login] Error while parsing as URI: "+(e&&e.message||e)),t}))})).then((function(e){if(e)return e&&e.pubkey?e:r.keyfile.parseData(e,{silent:!0}).then((function(e){if(!e||!e.signPk||!e.signSk)throw{message:"ERROR.SCAN_UNKNOWN_FORMAT"};return{pubkey:o.base58.encode(e.signPk),keypair:e}})).catch(l.onError("ERROR.SCAN_UNKNOWN_FORMAT"))})).then((function(t){t&&t.pubkey&&(e.pubkeyError=e.expectedPubkey&&e.expectedPubkey!=t.pubkey,e.formData.pubkey=t.pubkey,e.formData.keypair=t.keypair)})).then((function(){e.computing=!1,l.loading.hide(10)})).catch((function(t){e.computing=!1,l.onError("ERROR.SCAN_FAILED")(t)}))},e.changeMethod=function(t,n){if(e.hideMethodsPopover(),t&&t!=e.formData.method)if(console.debug("[login] method is: "+t),e.formData.method=t,e.formData.uid=null,e.form&&delete e.form.$submitted,"SCRYPT_DEFAULT"==t||"SCRYPT_ADVANCED"==t){var i;e.pubkey=null,n?(i=_.find(e.scryptParamsValues,(function(e){return e.params&&angular.equals(e.params,n)})))||((i=_.findWhere(e.scryptParamsValues,{id:"USER"})||{}).params=n):i=_.findWhere(e.scryptParamsValues,{id:"DEFAULT"}),e.changeScrypt(i),e.autoComputePubkey=e.autoComputePubkey&&"SCRYPT_DEFAULT"==t}else{if("SCAN"==t)return e.doScan();e.formData.username=null,e.formData.password=null,e.formData.pubkey=null,e.pubkey=null,e.computing=!1}},e.changeScrypt=function(t){e.formData.scrypt=angular.copy(t||{}),e.onScryptFormChanged()},e.readKeyFile=function(n,i){return(i=i||{}).password=i.password||e.formData.file.password||function(){return e.formData.file.password=void 0,u.showPassword({title:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE",subTitle:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP",error:i.error,scope:e}).then((function(n){return e.formData.file.password=n,t((function(){return n}),150)}))},r.keyfile.read(e.formData.file,i).catch((function(t){if(e.formData.file.password=void 0,"CANCELLED"===t&&l.loading.hide(10),t&&t.ucode==r.errorCodes.BAD_PASSWORD)return e.readKeyFile(e.formData.file,{withSecret:i.withSecret,error:"ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD"});throw t}))},e.onFileChanged=function(n){n&&n.fileData?(e.formData.file={name:n.fileData.name,size:n.fileData.size,content:n.fileContent},e.validatingFile=!0,t((function(){return console.debug("[login] key file changed: ",e.formData.file),e.validatingFile=!0,e.readKeyFile(e.formData.file,{withSecret:!1,password:e.formData.file.password}).then((function(t){t&&t.signPk?(e.formData.file.pubkey=o.util.encode_base58(t.signPk),e.formData.file.valid=!e.expectedPubkey||e.expectedPubkey==e.formData.file.pubkey,e.validatingFile=!1):(e.formData.file.valid=!1,e.formData.file.pubkey=void 0)})).catch((function(t){t&&"CANCELLED"===t?e.removeKeyFile():(e.validatingFile=!1,e.formData.file.valid=!1,e.formData.file.pubkey=void 0,l.onError("ERROR.AUTH_FILE_ERROR")(t))}))}))):e.validatingFile=!1},e.removeKeyFile=function(){e.formData.file=void 0},e.showWotLookupModal=function(n){return u.showWotLookup({q:n}).then((function(n){if(n&&n.pubkey)return e.formData.pubkey=n.pubkey,e.formData.uid=n.uid||void 0,t(e.doLogin,300)}))},e.showMethodsPopover=function(t){t.defaultPrevented||l.popover.show(t,{templateUrl:"templates/login/popover_methods.html",scope:e,autoremove:!0,afterShow:function(t){e.methodsPopover=t,l.ink({selector:".popover-login-methods .item"})}})},e.hideMethodsPopover=function(){e.methodsPopover&&(e.methodsPopover.hide(),e.methodsPopover=null)},e.init()}function p(e,t){angular.extend(this,t("LoginModalCtrl",{$scope:e,parameters:{auth:!0}})),e.setForm=function(t){e.form=t}}function m(e,t,n,i,a){e.$on("$ionicView.enter",(function(o){e.locale=a.data.locale.id,t.stateParams&&t.stateParams.anchor&&(e.anchor=t.stateParams.anchor,n((function(){i(t.stateParams.anchor)}),100))}))}function E(e,t,n,i,a){e.itemsClass={},e.locale=i.data.locale.id,(a=a||{})&&"string"==typeof a&&(a={anchor:a}),a.anchor&&(t((function(){n(a.anchor)}),100),e.itemsClass={},e.itemsClass[a.anchor]="selected",e.listClass="selection")}function b(e,t,n,i,a,o,r,s,l,c,u,d,p,m){e.tour=!1,e.continue=!0,e.executeStep=function(t,n,i){if((i=angular.isDefined(i)?i:0)>=n.length)return o.when(!0);var a=n[i];if("function"!=typeof a)throw new Error("[helptip] Invalid step at index {0} of '{1}' tour: step must be a function".format(i,t));var r=a();return"boolean"==typeof r&&(r=o.when(r)),r.then((function(a){return angular.isUndefined(a)?(e.continue=!1,i):a&&i!==n.length-1?e.executeStep(t,n,i+1):a?-1:i+1})).catch((function(n){return n&&"transition prevented"===n.message?console.error("ERROR: in help tour [{0}], in step [{1}] -> use large if exists, to prevent [transition prevented] error".format(t,i)):console.error("ERROR: in help tour  [{0}], in step [{1}] : {2}".format(t,i,n)),e.continue=!1,i}))},e.showHelpTip=function(t,n){return(n=n||{}).bindings=n.bindings||{},n.bindings.value=n.bindings.value||"",n.bindings.hasNext=!angular.isDefined(n.bindings.hasNext)||n.bindings.hasNext,n.timeout=n.timeout||(p.enable?900:500),n.autoremove=!0,n.bindings.tour=e.tour,n.backdropClickToClose=!e.tour,s.popover.helptip(t,n)},e.showHelpModal=function(e){Modals.showHelp({anchor:e})},e.startHelpTour=function(){return e.tour=!0,e.continue=!0,e.startWalletNoLoginTour(0,!0).then((function(t){return!!t&&(!m.isLogin()||e.startWalletTour(0,!0).then((function(t){return!!t&&(c.data.helptip.wallet=t,c.store(),e.continue)})))})).then((function(t){return!!t&&(!m.isLogin()||e.startWalletCertTour(0,!0).then((function(t){return!!t&&(c.data.helptip.walletCerts=t,c.store(),e.continue)})))})).then((function(t){return!!t&&(!m.isLogin()||e.startTxTour(0,!0).then((function(t){return!!t&&(c.data.helptip.tx=t,c.store(),e.continue)})))})).then((function(t){return!!t&&(!m.isLogin()||e.startWalletsTour(0,!0).then((function(t){return!!t&&(c.data.helptip.wallets=t,c.store(),e.continue)})))})).then((function(t){return!!t&&e.startHeaderTour(0,!0)})).then((function(t){return!!t&&e.startSettingsTour(0,!0)})).then((function(t){return!!t&&e.startWotLookupTour(0,!0).then((function(t){return!(!t||e.cancelled)&&(c.data.helptip.wotLookup=t,c.store(),e.continue)}))})).then((function(t){return!!t&&e.startWotTour(0,!0).then((function(t){return!(!t||e.cancelled)&&(c.data.helptip.wot=t,c.store(),e.continue)}))})).then((function(t){return!!t&&e.startWotCertTour(0,!0).then((function(t){return!!t&&(c.data.helptip.wotCerts=t,c.store(),e.continue)}))})).then((function(t){return!!t&&e.startCurrencyTour(0,!0).then((function(t){return!(!t||e.cancelled)&&(c.data.helptip.currency=t,c.store(),e.continue)}))})).then((function(t){return!!t&&e.startNetworkTour(0,!0).then((function(t){return!(!t||e.cancelled)&&(c.data.helptip.network=t,c.store(),e.continue)}))})).then((function(t){return!!t&&e.finishTour()}))},e.startCurrencyTour=function(n,a){var o,l=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-currency",{bindings:{content:"HELP.TIP.MENU_BTN_CURRENCY",icon:{position:s.screen.isSmall()?"left":"bottom-left"}}})},function(){return i.isOpen()&&i.toggleLeft(!1),t.go(s.screen.isSmall()?"app.currency":"app.currency_lg").then((function(){return e.showHelpTip("helptip-currency-mass-member",{bindings:{content:"HELP.TIP.CURRENCY_MASS",icon:{position:"center"}}})}))},function(){return!c.data.useRelative||e.showHelpTip("helptip-currency-mass-member-unit",{bindings:{content:"HELP.TIP.CURRENCY_UNIT_RELATIVE",contentParams:o,icon:{position:s.screen.isSmall()?"right":"center"}}})},function(){return r("helptip-currency-rules-anchor"),e.showHelpTip("helptip-currency-rules",{bindings:{content:"HELP.TIP.CURRENCY_RULES",icon:{position:"center",glyph:"ion-information-circled"}}})},function(){return t.is("app.currency.tab_parameters")&&t.go("app.currency.tab_wot"),r("helptip-currency-newcomers-anchor"),e.showHelpTip("helptip-currency-newcomers",{bindings:{content:"HELP.TIP.CURRENCY_WOT",icon:{position:"center"},hasNext:a},timeout:1200,retry:2})}];return u.get().then((function(t){return o=t.parameters,e.executeStep("currency",l,n)}))},e.startNetworkTour=function(o,r){var d=function(){t.is("app.currency")&&a((function(){var e=n.document.querySelectorAll("ion-tabs .tabs a");e&&3==e.length&&angular.element(e[2]).triggerHandler("click")}),100)},p=[function(){return!!s.screen.isSmall()||(i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-network",{bindings:{content:"HELP.TIP.MENU_BTN_NETWORK",icon:{position:s.screen.isSmall()?"left":"bottom-left"}}}))},function(){return i.isOpen()&&i.toggleLeft(!1),t.go(s.screen.isSmall()?"app.currency.tab_network":"app.network").then((function(){return d(),e.showHelpTip("helptip-network-peers",{bindings:{content:"HELP.TIP.NETWORK_BLOCKCHAIN",icon:{position:"center",glyph:"ion-information-circled"}},timeout:1200})}))},function(){return d(),e.showHelpTip("helptip-network-peer-0",{bindings:{content:"HELP.TIP.NETWORK_PEERS",icon:{position:s.screen.isSmall()?void 0:"center"}},timeout:1e3,retry:20})},function(){return d(),e.showHelpTip("helptip-network-peer-0-block",{bindings:{content:"HELP.TIP.NETWORK_PEERS_BLOCK_NUMBER",icon:{position:s.screen.isSmall()?void 0:"center"}}})},function(){d();var t=c.data.locale.id;return e.showHelpTip("helptip-network-peers",{bindings:{content:"HELP.TIP.NETWORK_PEERS_PARTICIPATE",contentParams:{installDocUrl:l.helptip&&l.helptip.installDocUrl?l.helptip.installDocUrl[t]?l.helptip.installDocUrl[t]:l.helptip.installDocUrl:"http://duniter.org"},icon:{position:"center",glyph:"ion-information-circled"},hasNext:r}})}];return u.parameters().then((function(t){return e.executeStep("network",p,o)}))},e.startWotLookupTour=function(o,r){var l=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-wot",{bindings:{content:"HELP.TIP.MENU_BTN_WOT",icon:{position:s.screen.isSmall()?"left":"bottom-left"}},onError:"continue"})},function(){return i.isOpen()&&i.toggleLeft(!1),t.go(s.screen.isSmall()?"app.wot_lookup.tab_search":"app.wot_lookup_lg").then((function(){return e.showHelpTip("helptip-wot-search-text",{bindings:{content:s.screen.isSmall()?"HELP.TIP.WOT_SEARCH_TEXT_XS":"HELP.TIP.WOT_SEARCH_TEXT",icon:{position:"center"}}})}))},function(){return e.showHelpTip("helptip-wot-search-result-0",{bindings:{content:"HELP.TIP.WOT_SEARCH_RESULT",icon:{position:"center"}},timeout:700,retry:15})},function(){var t=n.document.getElementById("helptip-wot-search-result-0");return!t||(a((function(){angular.element(t).triggerHandler("click")})),e.showHelpTip("helptip-wot-view-certifications",{bindings:{content:"HELP.TIP.WOT_VIEW_CERTIFICATIONS",hasNext:r},timeout:2500}))}];return e.executeStep("wotLookup",l,o)},e.startWotTour=function(t,n){var i,a=[function(){return e.showHelpTip("helptip-wot-view-certifications",{bindings:{content:"HELP.TIP.WOT_VIEW_CERTIFICATIONS_COUNT",contentParams:i,icon:{position:"center",glyph:"ion-information-circled"}}})},function(){return e.showHelpTip("helptip-wot-view-certifications-count",{bindings:{content:"HELP.TIP.WOT_VIEW_CERTIFICATIONS_CLICK",icon:{position:"center"},hasNext:n}})}];return u.get().then((function(n){return(i=n.parameters).currentUD=n.currentUD,e.executeStep("wot",a,t)}))},e.startWotCertTour=function(i,o){var r=[function(){if(t.is("app.wot_identity")){var i=n.document.getElementById("helptip-wot-view-certifications");if(!i)return!0;a((function(){angular.element(i).triggerHandler("click")}))}return e.showHelpTip(s.screen.isSmall()?"fab-certify":"helptip-certs-certify",{bindings:{content:"HELP.TIP.WOT_VIEW_CERTIFY",icon:{position:s.screen.isSmall()?"bottom-right":"center"}},timeout:s.screen.isSmall()?2e3:1e3,retry:10})},function(){return e.showHelpTip(s.screen.isSmall()?"fab-certify":"helptip-certs-certify",{bindings:{content:"HELP.TIP.CERTIFY_RULES",icon:{position:"center",glyph:"ion-alert-circled"},hasNext:o}})}];return e.executeStep("certs",r,i)},e.startWalletNoLoginTour=function(t,n){if(m.isLogin())return o.when(!0);var a=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-account",{bindings:{content:"HELP.TIP.MENU_BTN_ACCOUNT",icon:{position:"left"},hasNext:n}})},function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-tx",{bindings:{content:"HELP.TIP.MENU_BTN_TX",icon:{position:"left"},hasNext:n}})},function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-wallets",{bindings:{content:"HELP.TIP.MENU_BTN_WALLETS",icon:{position:"left"},hasNext:n}})}];return e.executeStep("wallet-no-login",a,t)},e.startWalletTour=function(n,a){if(!m.isLogin())return o.when(!0);var l=m.data.isMember||m.data.requirements&&m.data.requirements.pendingMembership,c=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-account",{bindings:{content:m.data.isMember?"HELP.TIP.MENU_BTN_ACCOUNT_MEMBER":"HELP.TIP.MENU_BTN_ACCOUNT",icon:{position:"left"}}})},function(){return i.isOpen()&&i.toggleLeft(!1),t.go("app.view_wallet").then((function(){return e.showHelpTip(s.screen.isSmall()?"helptip-wallet-options-xs":"helptip-wallet-options",{bindings:{content:"HELP.TIP.WALLET_OPTIONS",icon:{position:s.screen.isSmall()?"right":"center"}},timeout:s.screen.isSmall()?2e3:1e3,retry:10})}))},function(){return r("helptip-wallet-pubkey"),e.showHelpTip("helptip-wallet-pubkey",{bindings:{content:"HELP.TIP.WALLET_PUBKEY",icon:{position:"center"},hasNext:!l&&a},timeout:s.screen.isSmall()?2e3:500,retry:10})},function(){return l?(r("helptip-wallet-certifications"),e.showHelpTip("helptip-wallet-certifications",{bindings:{content:s.screen.isSmall()?"HELP.TIP.WALLET_RECEIVED_CERTIFICATIONS":"HELP.TIP.WALLET_CERTIFICATIONS",icon:{position:"center"},hasNext:a},timeout:500,onError:"continue"})):a}];return c.length!=d.wallet.stepCount&&console.error("[help] Invalid value of 'csHelpConstants.wallet.stepCount'. Please update to {0}".format(c.length)),u.get().then((function(t){return t.parameters.currentUD=t.currentUD,e.executeStep("wallet",c,n)}))},e.startWalletCertTour=function(i,r){if(!m.isLogin())return o.when(!0);var l=!1,c=[function(){if(t.is("app.view_wallet")){var i=n.document.getElementById("helptip-wallet-certifications");if(!i)return l=!0,!0;a((function(){angular.element(i).triggerHandler("click")}))}return!s.screen.isSmall()||e.showHelpTip("helptip-received-certs",{bindings:{content:"HELP.TIP.WALLET_RECEIVED_CERTS"}})},function(){return!(!l&&s.screen.isSmall())||t.go("app.view_wallet").then((function(){return e.showHelpTip("helptip-wallet-given-certifications",{bindings:{content:"HELP.TIP.WALLET_GIVEN_CERTIFICATIONS",icon:{position:"center"}},timeout:500})}))},function(){if(l)return!0;if(t.is("app.view_wallet")){var i=n.document.getElementById("helptip-wallet-given-certifications");if(!i)return l=!0,!0;a((function(){angular.element(i).triggerHandler("click")}),500)}return e.showHelpTip(s.screen.isSmall()?"fab-select-certify":"helptip-certs-select-certify",{bindings:{content:"HELP.TIP.WALLET_CERTIFY",icon:{position:s.screen.isSmall()?"bottom-right":"center"}},timeout:s.screen.isSmall()?2e3:500,retry:10})},function(){return e.tour||l?r:e.showHelpTip("helptip-certs-stock",{bindings:{content:"HELP.TIP.CERTIFY_RULES",icon:{position:"center",glyph:"ion-alert-circled"},hasNext:r}})}];return u.parameters().then((function(t){return e.executeStep("certs",c,i)}))},e.startTxTour=function(n,a){if(!m.isLogin())return o.when(!0);var r,s=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-tx",{bindings:{content:"HELP.TIP.MENU_BTN_TX",icon:{position:"left"}}})},function(){return i.isOpen()&&i.toggleLeft(!1),t.go("app.view_wallet_tx").then((function(){return e.showHelpTip("helptip-wallet-balance",{bindings:{content:c.data.useRelative?"HELP.TIP.WALLET_BALANCE_RELATIVE":"HELP.TIP.WALLET_BALANCE",contentParams:r,icon:{position:"center"}},retry:20})}))},function(){return e.showHelpTip("helptip-wallet-balance",{bindings:{content:"HELP.TIP.WALLET_BALANCE_CHANGE_UNIT",contentParams:r,icon:{position:"center",glyph:"ion-information-circled"}}})}];return u.get().then((function(t){return(r=t.parameters).currentUD=t.currentUD,e.executeStep("tx",s,n)}))},e.startWalletsTour=function(t,n){var a=[function(){return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-wallets",{bindings:{content:"HELP.TIP.MENU_BTN_WALLETS",icon:{position:"left"},hasNext:n}})}];return e.executeStep("my-wallets",a,t)},e.startHeaderTour=function(r,l){if(s.screen.isSmall())return o.when(!0);function c(){var e=n.document.querySelectorAll("#helptip-header-bar-btn-profile");return e&&e.length?_.find(e,(function(e){return e.offsetWidth>0})):null}var u=[function(){if(s.screen.isSmall())return!0;var n=c();if(!n)return!0;var i=t.is("app.home")?"margin-right: 60px":void 0;return e.showHelpTip(n,{bindings:{content:"HELP.TIP.HEADER_BAR_BTN_PROFILE",icon:{position:"right",style:i}}})},function(){if(s.screen.isSmall())return i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-settings",{bindings:{content:"HELP.TIP.MENU_BTN_SETTINGS",icon:{position:"left"},hasNext:l},timeout:1e3});var t=c();return!t||(a((function(){angular.element(t).triggerHandler("click")})),e.showHelpTip("helptip-popover-profile-btn-settings",{bindings:{content:"HELP.TIP.MENU_BTN_SETTINGS",icon:{position:"center"},hasNext:l},timeout:1e3}).then((function(t){return e.closeProfilePopover(),t})))}];return e.executeStep("header",u,r)},e.startSettingsTour=function(n,a){var o,r=[function(){return!s.screen.isSmall()||(i.toggleLeft(!0),e.showHelpTip("helptip-menu-btn-settings",{bindings:{content:"HELP.TIP.MENU_BTN_SETTINGS",icon:{position:"left"}},timeout:1e3}))},function(){return i.isOpen()&&i.toggleLeft(!1),t.go("app.settings").then((function(){return e.showHelpTip("helptip-settings-btn-unit-relative",{bindings:{content:"HELP.TIP.SETTINGS_CHANGE_UNIT",contentParams:o,icon:s.screen.isSmall()?{position:"right",style:"margin-right: 60px"}:{position:"center"},hasNext:a},timeout:1e3})}))}];return u.parameters().then((function(t){return o=t,e.executeStep("settings",r,n)}))},e.finishTour=function(){return i.isOpen()&&i.toggleLeft(!1),m.isLogin()?t.go("app.view_wallet").then((function(){return e.showHelpTip("helptip-wallet-pubkey",{bindings:{content:"HELP.TIP.END_LOGIN",hasNext:!1},timeout:1200})})):o.all([e.showHome(),u.parameters().then((function(e){n=e}))]).then((function(){return e.showHelpTip("helptip-home-logo",{bindings:{content:"HELP.TIP.END_NOT_LOGIN",contentParams:n,hasNext:!1}})}));var n}}function g(e){e.$on("$ionicView.enter",(function(t,n){e.startHelpTour()}))}function f(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b,g,f){var T;e.loading=!0,e.settings=b.data,e.qrcodeId="qrcode-wallet-"+e.$id,e.toggleQRCode=!1,e.likeData={likes:{},abuses:{}},e.enter=function(t,n){if(e.loading=e.loading||n.stateParams&&n.stateParams.refresh,e.enableSelectWallet=g.children.count()>0,e.loading)return(T=n.stateParams&&n.stateParams.id?g.children.get(n.stateParams.id):g)?(e.isDefaultWallet=T.isDefault(),e.walletId=T.id,e.cleanLocationHref(n),e.load()):(c.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome());c.loading.hide(10),a(e.updateView,300)},e.$on("$ionicView.enter",e.enter),e.load=function(){if(T)return T.login().then((function(t){e.formData=t,e.loading=!1,e.updateView(),e.addListeners(),e.showQRCode(),T.isDefault()&&e.showHelpTip(),c.loading.hide(10)})).catch((function(t){"CANCELLED"!==t?c.onError("ERROR.LOAD_WALLET_DATA_ERROR")(t):e.showHome()}))},e.updateView=function(){e.motion.show({selector:"#wallet .item"}),e.$broadcast("$$rebind::rebind")},e.setRegisterForm=function(t){e.registerForm=t},e.onWalletLogout=function(){e.hideQRCode(),e.removeListeners(),delete e.formData,T=null,e.loading=!0},e.addListeners=function(){e.listeners=[T.api.data.on.logout(e,e.onWalletLogout),e.$watchCollection("formData.events",(function(t,n){!n||e.loading||angular.equals(t,n)||e.updateView()}))]},e.removeListeners=function(){_.forEach(e.listeners,(function(e){e()})),e.listeners=[]},e.showUidPopup=function(){return n((function(t,n){r(["ACCOUNT.NEW.TITLE","ACCOUNT.POPUP_REGISTER.TITLE","ACCOUNT.POPUP_REGISTER.HELP","COMMON.BTN_OK","COMMON.BTN_CANCEL"]).then((function(a){e.formData.newUid=e.formData.uid?""+e.formData.uid:"",i.show({templateUrl:"templates/wallet/popup_register.html",title:a["ACCOUNT.POPUP_REGISTER.TITLE"],subTitle:a["ACCOUNT.POPUP_REGISTER.HELP"],scope:e,buttons:[{text:a["COMMON.BTN_CANCEL"]},{text:a["COMMON.BTN_OK"],type:"button-positive",onTap:function(t){if(e.registerForm.$submitted=!0,e.registerForm.$valid&&e.formData.newUid)return e.formData.newUid;t.preventDefault()}}]}).then((function(i){if(!i)return delete e.formData.uid,c.loading.hide(),void n("CANCELLED");t(i)}))}))}))},e.self=function(){return e.hideActionsPopover(),e.showUidPopup().then((function(t){if(t)return c.loading.show(),T.self(t).then((function(){e.updateView(),c.loading.hide()})).catch((function(t){c.onError("ERROR.SEND_IDENTITY_FAILED")(t).then((function(){e.self()}))}))}))},e.doMembershipIn=function(t){return T.membership.inside().then((function(){e.updateView(),c.loading.hide()})).catch((function(n){if("CANCELLED"===n)throw n;if(n&&n.ucode!=m.errorCodes.MEMBERSHIP_ALREADY_SEND)return console.error("[wallet] Node: already membership",n),void c.loading.hide();if(!t||t<=2)return a((function(){return e.doMembershipIn((t||0)+1)}),1e3);throw n}))},e.membershipIn=function(t){if(e.hideActionsPopover(),T.isMember())return c.alert.info("INFO.NOT_NEED_MEMBERSHIP");var n=angular.isDefined(e.formData.blockUid)&&e.formData.uid||void 0;return d.showJoinMember({uid:n,blockUid:n&&e.formData.blockUid,pubkey:e.formData.pubkey}).catch((function(e){"CANCELLED"!==e&&(T.data.uid?c.onError("ERROR.SEND_MEMBERSHIP_IN_FAILED")(e):c.onError("ERROR.SEND_IDENTITY_FAILED")(e))}))},e.membershipOut=function(t,n){return e.hideActionsPopover(),t?n?(c.loading.show(),T.membership.out().then((function(){c.loading.hide(),c.toast.show("INFO.MEMBERSHIP_OUT_SENT")})).catch(c.onError("ERROR.SEND_MEMBERSHIP_OUT_FAILED"))):c.alert.confirm("CONFIRM.MEMBERSHIP_OUT_2","CONFIRM.POPUP_TITLE",{cssClass:"warning",okText:"COMMON.BTN_YES",okType:"button-assertive"}).then((function(t){t&&e.membershipOut(!0,!0)})):c.alert.confirm("CONFIRM.MEMBERSHIP_OUT","CONFIRM.POPUP_WARNING_TITLE",{cssClass:"warning",okText:"COMMON.BTN_YES",okType:"button-assertive"}).then((function(t){t&&e.membershipOut(!0)}))},e.doUpdate=function(t){return console.debug("[wallet] Refreshing data..."),(t?T.refreshData():c.loading.show().then(T.refreshData).then(c.loading.hide)).then(e.updateView).catch(c.onError("ERROR.REFRESH_WALLET_DATA"))},e.renewMembership=function(t){return T.isMember()||e.formData.requirements.wasMember?t||e.formData.requirements.needRenew?T.auth({minData:!0}).then((function(){return c.loading.hide(),c.alert.confirm("CONFIRM.RENEW_MEMBERSHIP")})).then((function(t){if(t)return c.loading.show(),e.doMembershipIn()})).catch((function(e){"CANCELLED"!==e&&(c.loading.hide(),c.alert.error(e))})):r("CONFIRM.NOT_NEED_RENEW_MEMBERSHIP",{membershipExpiresIn:e.formData.requirements.membershipExpiresIn}).then((function(e){return c.alert.confirm(e)})).then((function(t){if(t)return e.renewMembership(!0)})):c.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")},e.fixIdentity=function(){if(e.formData.uid)return n.all([T.auth(),r("CONFIRM.FIX_IDENTITY",{uid:e.formData.uid})]).then((function(e){return c.alert.confirm(e[1])})).then((function(t){if(t)return c.loading.show(),e.formData.blockUid=null,e.formData.sigDate=null,T.self(e.formData.uid)})).then(e.doMembershipIn).catch((function(e){"CANCELLED"!==e&&(c.loading.hide(),c.alert.error(e))}))},e.fixMembership=function(){if(e.formData.uid)return T.isMember()?c.alert.info("INFO.NOT_NEED_MEMBERSHIP"):(e.hideActionsPopover(),T.auth({silent:!0}).then((function(){c.alert.confirm("CONFIRM.FIX_MEMBERSHIP")})).then((function(t){if(t)return c.loading.show(),e.formData.blockUid=null,e.formData.sigDate=null,T.self(e.formData.uid,!1)})).then(e.doMembershipIn).catch((function(e){"CANCELLED"!==e&&(c.loading.hide(),c.alert.error(e))})))},e.doQuickFix=function(t){"renew"===t?e.renewMembership():"membership"===t?e.membershipIn(!0):"fixMembership"===t?e.fixMembership(!1):"fixIdentity"===t&&e.fixIdentity()};var h=e.logout;e.logout=function(t){if(e.isDefaultWallet)return h(t)},e.startWalletTour=function(){return e.hideActionsPopover(),f.wallet.tour()},e.showHelpTip=function(){return f.wallet.helptip()},e.showQRCode=function(t){if(T&&e.qrcodeId){var n=angular.element(document.querySelector("#"+e.qrcodeId+" .content"));n?T.loadQrCode().then((function(i){n.html(i),c.motion.toggleOn({selector:"#"+e.qrcodeId},t||1100)})):console.error("[wallet-controller] Cannot found div #{0} for the QRCode. Skipping.".format(e.qrcodeId))}},e.hideQRCode=function(){e.qrcodeId&&angular.element(document.querySelector("#"+e.qrcodeId))&&c.motion.toggleOff({selector:"#"+e.qrcodeId})},e.showCertifications=function(){e.isDefaultWallet?o.go(c.screen.isSmall()?"app.wallet_cert":"app.wallet_cert_lg",{type:"received"}):o.go(c.screen.isSmall()?"app.wallet_cert_by_id":"app.wallet_cert_lg_by_id",{id:e.walletId,type:"received"})},e.showGivenCertifications=function(){e.isDefaultWallet?o.go(c.screen.isSmall()?"app.wallet_cert":"app.wallet_cert_lg",{type:"given"}):o.go(c.screen.isSmall()?"app.wallet_cert_by_id":"app.wallet_cert_lg_by_id",{id:e.walletId,type:"given"})},e.showTxHistory=function(){o.go(e.isDefaultWallet?"app.view_wallet_tx":"app.view_wallet_tx_by_id",{id:e.walletId})},e.showLicenseModal=function(){return u.show("templates/currency/modal_license.html","CurrencyLicenseModalCtrl")},e.showTransferModal=function(){if(e.formData.balance&&e.formData.balance>0||g.children.count())return d.showTransfer({wallet:T.id}).then((function(t){t&&(c.toast.show("INFO.TRANSFER_SENT"),e.$broadcast("$$rebind::balance"),e.motion.show({selector:".item-pending"}))}));c.alert.info("INFO.NOT_ENOUGH_CREDIT")},e.showSecurityModal=function(){return e.hideActionsPopover(),d.showAccountSecurity({wallet:T}).then((function(t){if(t)return"self"===t?e.self():"membershipIn"===t?e.membershipIn():void 0}))},e.showSelectIdentitiesModal=function(){return e.hideActionsPopover(),d.showSelectPubkeyIdentity({identities:[e.formData.requirements].concat(e.formData.requirements.alternatives)}).then((function(t){if(t&&t.uid)return e.loading=!0,T.setSelf(t.uid,t.blockUid).then((function(){e.loading=!1,e.updateView(),c.loading.hide()}))}))},e.showSelectWalletModal=function(){if(g.children.count())return d.showSelectWallet({parameters:{showDefault:!0,showBalance:!1,excludedWalletId:e.walletId}}).then((function(t){if(t&&(!T||t.id!==T.id))return e.removeListeners(),e.loading=!0,T=t,console.debug("[transfer] Using wallet {"+T.id+"}"),e.formData={},e.load()}))},e.showActionsPopover=function(t){c.popover.show(t,{templateUrl:"templates/wallet/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.showSharePopover=function(n){e.hideActionsPopover();var i=e.formData.name||e.formData.uid||e.formData.pubkey,a=(E.shareBaseUrl||t.rootPath)+o.href("app.wot_identity",{pubkey:e.formData.pubkey,uid:e.formData.uid});c.screen.isSmall()&&(n=angular.element(document.querySelector("#wallet-share-anchor"))||n),c.popover.share(n,{bindings:{url:a,titleKey:"WOT.VIEW.POPOVER_SHARE_TITLE",titleValues:{title:i},postMessage:i}})},e.showSelectWalletPopover=function(t){return p.showSelectWallet(t,{parameters:{excludedWalletId:e.walletId}}).then((function(t){if(t&&t.id!==e.walletId)return t.isDefault()?o.go("app.view_wallet"):o.go("app.view_wallet_by_id",{id:t.id})}))},e.cleanLocationHref=function(e){e&&e.stateParams&&e.stateParams.refresh&&a((function(){var t=angular.copy(e.stateParams);delete t.refresh,delete t.id,l.search(t).replace()}),300)}}function T(e,t,n,i,a,o,r,s,l,c,u,d,p,m){var E;e.loading=!0,e.settings=u.data,e.listeners=[],e.qrcodeId="qrcode-wallet-tx-"+e.$id,e.enter=function(t,n){if(e.loading=e.loading||n.stateParams&&n.stateParams.refresh,e.enableSelectWallet=p.children.count()>0,e.loading)return(E=n.stateParams&&n.stateParams.id?p.children.get(n.stateParams.id):p)?(e.walletId=E.id,e.cleanLocationHref(n),e.load()):(o.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome());e.addListeners(),i(e.updateView,300)},e.$on("$ionicView.enter",e.enter),e.leave=function(){e.removeListeners()},e.$on("$ionicView.leave",e.leave),e.load=function(){if(!E)return $q.reject("Missing wallet");var t=E.isDataLoaded({minData:!0}),n={requirements:!t,minData:!t,sources:!0,tx:{enable:!0}};return E.login(n).then((function(t){return e.formData=t,e.loading=!1,e.updateView(),e.addListeners(),e.showFab("fab-transfer"),e.showQRCode(),E.isDefault()&&e.showHelpTip(),o.loading.hide(10)})).catch((function(t){"CANCELLED"!==t?(console.error(t),o.onError("ERROR.LOAD_WALLET_DATA_ERROR")(t)):e.showHome()}))},e.cleanLocationHref=function(e){e&&e.stateParams&&e.stateParams.refresh&&i((function(){var t=angular.copy(e.stateParams);delete t.refresh,delete t.id,a.search(t).replace()}),300)},e.updateView=function(){e.formData&&!e.loading&&(e.$broadcast("$$rebind::balance"),e.$broadcast("$$rebind::rebind"),e.motion.show({selector:".view-wallet-tx .item",ink:!1}))},e.downloadHistoryFile=function(t){(t=t||{}).fromTime=t.fromTime||-1;var n=e.formData.pubkey;m.downloadHistoryFile(n,t)},e.doUpdate=function(t){console.debug("[wallet] TX history reloading...");var n={sources:!0,tx:{enable:!0,fromTime:e.formData&&e.formData.tx&&e.formData.tx.fromTime||void 0},api:!1};return(t?E.refreshData(n):o.loading.show().then((function(){return E.refreshData(n)})).then(o.loading.hide)).then(e.updateView).catch(o.onError("ERROR.REFRESH_WALLET_DATA"))},e.showQRCode=function(t){if(E&&e.qrcodeId){var n=angular.element(document.querySelector("#"+e.qrcodeId+" .content"));n?E.loadQrCode().then((function(i){n.html(i),o.motion.toggleOn({selector:"#"+e.qrcodeId},t||1100)})):console.error("[wallet-controller] Cannot found div #{0} for the QRCode. Skipping.".format(e.qrcodeId))}},e.hideQRCode=function(){e.qrcodeId&&angular.element(document.querySelector("#"+e.qrcodeId))&&o.motion.toggleOff({selector:"#"+e.qrcodeId})},e.addListeners=function(){e.listeners=[E.api.data.on.balanceChanged(e,e.updateView),e.$watch("settings.useRelative",e.updateView,!0),e.$watch("settings.showUDHistory",(function(t,n){e.formData&&!e.loading&&t!==n&&e.doUpdate()}),!0)],e.settings.walletHistoryAutoRefresh&&e.listeners.push(d.api.data.on.newBlock(e,(function(t){e.loading||(console.debug("[wallet] Received new block. Will reload history."),i((function(){e.doUpdate(!0)}),500))})))},e.removeListeners=function(){_.forEach(e.listeners,(function(e){e()})),e.listeners=[]},e.showTransferModal=function(){if(e.formData.balance&&e.formData.balance>0||p.children.count())return r.showTransfer({wallet:E.id}).then((function(t){t&&(o.toast.show("INFO.TRANSFER_SENT"),e.$broadcast("$$rebind::balance"),e.motion.show({selector:".item-pending"}))}));o.alert.info("INFO.NOT_ENOUGH_CREDIT")},e.showHelpTip=function(e,t){},e.showTxErrors=function(t){return E.isDefault()?e.goState("app.view_wallet_tx_errors"):e.goState("app.view_wallet_tx_errors_by_id",{id:E.id})},e.showMoreTx=function(t){return t=t||e.formData.tx.fromTime-u.data.walletHistoryTimeSecond||c.date.now()-2*u.data.walletHistoryTimeSecond,o.loading.show(),E.refreshData({tx:{enable:!0,fromTime:t}}).then((function(){e.updateView(),o.loading.hide()})).catch((function(n){n.ucode==l.errorCodes.HTTP_LIMITATION?i((function(){return e.showMoreTx(t)}),2e3):o.onError("ERROR.REFRESH_WALLET_DATA")(n)}))},e.showSelectWalletModal=function(){if(p.children.count())return r.showSelectWallet({parameters:{showDefault:!0,showBalance:!1,excludedWalletId:e.walletId}}).then((function(t){if(t&&(!E||t.id!==E.id))return e.removeListeners(),e.loading=!0,E=t,console.debug("[transfer] Using wallet {"+E.id+"}"),e.formData={},e.load()}))},e.toUnlockUIArray=function(t,n,i){return n=n||0,!t.children||"AND"!=t.type&&"OR"!=t.type?{style:{"padding-left":n+"px"},operator:i,type:t.type,value:t.value}:t.children.reduce((function(i,a,o){return a.children&&o>0?(i=i.concat({style:{"padding-left":n+"px","padding-top":"10px","padding-bottom":"10px"},operator:t.type})).concat(e.toUnlockUIArray(a,n+10)):i.concat(e.toUnlockUIArray(a,n+10,o&&t.type))}),[])},e.showLockedOutputsPopover=function(t,n){t.lockedOutputs&&(e.popoverData=e.popoverData||{},e.popoverData.lockedOuputs=t.lockedOutputs.reduce((function(t,n){return t.concat({amount:n.amount,unlockFunctions:n.unlockFunctions,unlockConditions:e.toUnlockUIArray(n.unlockTree)})}),[]),o.popover.show(n,{templateUrl:"templates/wallet/tx_locked_outputs_popover.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}}))},e.hideLockedOutputsPopover=function(){e.lockedOutputsPopover&&(e.lockedOutputsPopover.hide(),e.popoverData&&delete e.popoverData.unlockConditions,e.lockedOutputsPopover=null)},e.showSelectWalletPopover=function(t){return s.showSelectWallet(t,{scope:e}).then((function(t){if(t&&t.id!==E.id)return t.isDefault()?e.goState("app.view_wallet_tx"):e.goState("app.view_wallet_tx_by_id",{id:t.id})}))},e.goState=function(t,i){return e.hideLockedOutputsPopover(),n.go(t,i)}}function h(e,t,n,i){var a;e.settings=n.data,e.loading=!0,e.formData={},e.$on("$ionicView.enter",(function(n,o){return(a=o.stateParams&&o.stateParams.id?i.children.get(o.stateParams.id):i)?e.load():(t.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome())})),e.load=function(){if(a)return a.login().then((function(n){e.formData=n,e.loading=!1,e.doMotion(),t.loading.hide()}))},e.doUpdate=function(n){return e.loading=!0,(n?a.refreshData():t.loading.show().then(i.refreshData).then(t.loading.hide)).then((function(){e.doMotion(),e.loading=!1})).catch((function(n){t.onError("ERROR.REFRESH_WALLET_DATA")(n),e.loading=!1}))},e.filterReceivedTx=function(e){return e.amount&&e.amount>0},e.filterSentTx=function(e){return e.amount&&e.amount<0},e.hasReceivedTx=function(){return e.formData.tx&&_(e.formData.tx.errors||[]).find(e.filterReceivedTx)&&!0},e.hasSentTx=function(){return e.formData.tx&&_(e.formData.tx.errors||[]).find(e.filterSentTx)&&!0}}function v(e,t,n,i,a){var o=a&&a.wallet||n;e.slides={slider:null,options:{loop:!1,effect:"slide",speed:500}},e.isLastSlide=!1,e.smallscreen=t.screen.isSmall(),e.recover={},e.isValidFile=!1,e.login=o.isLogin(),e.hasSelf=o.hasSelf(),e.needSelf=e.login&&o.data.requirements.needSelf,e.canRevoke=e.login&&e.hasSelf&&!o.data.requirements.revoked,e.needMembership=e.login&&o.data.requirements.needMembership,e.option=e.login?"saveID":"recoverID",e.formData={addQuestion:"",level:"4",questions:[]};for(var r=[],s=1;s<20;s++)r.push("ACCOUNT.SECURITY.QUESTION_"+s.toString());i(r).then((function(t){_.each(t,(function(t){e.formData.questions.push({value:t,checked:!1})}))})),e.slidePrev=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slidePrev(),e.slides.slider.lockSwipes(),e.isLastSlide=!1},e.slideNext=function(){e.slides.slider.unlockSwipes(),e.slides.slider.slideNext(),e.slides.slider.lockSwipes(),e.isLastSlide=3===e.slides.slider.activeIndex&&("saveID"==e.option||"recoverID"==e.option)||2===e.slides.slider.activeIndex&&"revocation"==e.option},e.doNext=function(n){if(!n)switch(e.slides.slider.activeIndex){case 1:switch(e.option){case"saveID":n="questionsForm";break;case"recoverID":e.isValidFile?(e.slideNext(),e.hasContent=!1,e.fileData=""):t.alert.error("ERROR.NOT_VALID_SAVE_ID_FILE","ERROR.LOAD_FILE_FAILED")}break;case 2:switch(e.option){case"recoverID":n="recoverForm";break;case"saveID":n="answersForm"}}if(n){if(e[n].$submitted=!0,!e[n].$valid)return;switch(n){case"recoverForm":e.recoverId();break;case"answersForm":e.downloadSaveIDFile();break;default:e.slideNext()}}},e.selectOption=function(t){e.option=t,e.slideNext()},e.restore=function(){1===e.slides.slider.activeIndex&&"saveID"===e.option?(e.formData={addQuestion:"",level:"4",questions:[]},i(r).then((function(t){_.each(t,(function(t){e.formData.questions.push({value:t,checked:!1})}))}))):2===e.slides.slider.activeIndex&&"saveID"===e.option?_.each(e.formData.questions,(function(e){e.answer=void 0})):1===e.slides.slider.activeIndex&&"recoverID"===e.option?(e.hasContent=!1,e.recover={},e.fileData="",e.isValidFile=!1):2===e.slides.slider.activeIndex&&"recoverID"===e.option?_.each(e.recover.questions,(function(e){e.answer=void 0})):2===e.slides.slider.activeIndex&&"revocation"===e.option&&(e.isValidFile=!1,e.hasContent=!1,e.revocation=void 0)},e.onFileChanged=function(t){if(e.hasContent=angular.isDefined(t)&&""!==t,e.fileData=t.fileData?t.fileData:"",e.isValidFile=""!==e.fileData&&"text/plain"===e.fileData.type,e.isValidFile&&"recoverID"===e.option){e.content=t.fileContent.split("\n");var n=_.indexOf(e.content,"Questions: "),i=-1;_.each(e.content,(function(t,n){/^Issuer:/.test(t)?i=n:/^Crypted-Nonce:/.test(t)?e.recover.cypherNonce=t.split(" ")[1]:/^Crypted-Pubkey:/.test(t)?e.recover.cypherPubkey=t.split(" ")[1]:/^Crypted-Salt:/.test(t)?e.recover.cypherSalt=t.split(" ")[1]:/^Crypted-Pwd:/.test(t)&&(e.recover.cypherPwd=t.split(" ")[1])})),e.recover.questions=[];for(var a=n+1;a<i;a++)e.recover.questions.push({value:e.content[a]})}else e.isValidFile&&"revocation"===e.option&&(e.revocation=t.fileContent)},e.recoverId=function(){if(e.recoverForm.$valid)return e.recover.answer="",_.each(e.recover.questions,(function(t){e.recover.answer+=t.answer})),o.recoverId(e.recover).then((function(n){angular.isDefined(n)?(e.recover=n,e.slideNext()):t.alert.error("ERROR.RECOVER_ID_FAILED")})).catch(t.onError("ERROR.RECOVER_ID_FAILED"))},e.addQuestion=function(){""!==e.formData.addQuestion&&(e.formData.questions.push({value:e.formData.addQuestion,checked:!0}),e.formData.addQuestion="")},e.downloadSaveIDFile=function(){var n;return o.auth({forceAuth:!0,expectedPubkey:e.pubkey,silent:!0,success:function(e){n=e}}).catch((function(e){e&&"CANCELLED"===e||t.alert.error("ERROR.SALT_OR_PASSWORD_NOT_CONFIRMED","ERROR.LOGIN_FAILED")})).then((function(t){if(t){var i={file:_.filter(e.formData.questions,(function(e){return e.checked}))},a={salt:n.username,pwd:n.password,questions:"",answer:""};return _.each(i.file,(function(e){a.questions+=e.value+"\n",a.answer+=e.answer})),o.getCryptedId(a).then((function(t){o.downloadSaveId(t),e.closeModal()}))}}))},e.isRequired=function(){return _.filter(e.formData.questions,(function(e){return e.checked})).length<e.formData.level},e.revokeWithFile=function(){e.isValidFile?e.revokeIdentity():t.alert.error("ERROR.NOT_VALID_REVOCATION_FILE","ERROR.LOAD_FILE_FAILED")},e.downloadRevokeFile=function(){return o.auth({forceAuth:!0}).then((function(){return o.downloadRevocation()})).then((function(){t.loading.hide()})).catch((function(e){e&&"CANCELLED"===e||t.onError("ERROR.DOWNLOAD_REVOCATION_FAILED")(e)}))},e.revokeWalletIdentity=function(){return e.hasSelf?o.auth({forceAuth:!0}).then((function(n){if(t.loading.hide(),n)return e.revokeIdentity()})).catch((function(e){"CANCELLED"!==e&&t.onError("ERROR.REVOCATION_FAILED")(e)})):t.alert.error("ERROR.ONLY_SELF_CAN_EXECUTE_THIS_ACTION")},e.revokeIdentity=function(n){return n?t.loading.show().then((function(){return e.revocation?o.revokeWithFile(e.revocation):o.revoke()})).then((function(){return t.toast.show("INFO.REVOCATION_SENT"),e.closeModal(),t.loading.hide()})).catch((function(n){e.revocation?(e.isValidFile=!1,e.revocationError=n&&n.message||n||"ERROR.REVOCATION_FAILED",t.loading.hide(10)):t.onError("ERROR.REVOCATION_FAILED")(n)})):t.alert.confirm("CONFIRM.REVOKE_IDENTITY","CONFIRM.POPUP_WARNING_TITLE",{cssClass:"warning",okText:"COMMON.BTN_YES",okType:"button-assertive"}).then((function(e){if(e)return t.alert.confirm("CONFIRM.REVOKE_IDENTITY_2","CONFIRM.POPUP_TITLE",{cssClass:"warning",okText:"COMMON.BTN_YES",okType:"button-assertive"})})).then((function(t){t&&e.revokeIdentity(!0,!0)}))},e.self=function(){return e.closeModal("self")},e.membershipIn=function(){return e.closeModal("membershipIn")},e.downloadKeyFile=function(n){return o.auth({forceAuth:!0}).then((function(){return o.downloadKeyFile(n)})).then((function(){return t.loading.hide(),e.closeModal()})).catch((function(e){e&&"CANCELLED"===e?t.loading.hide():t.onError("ERROR.DOWNLOAD_KEYFILE_FAILED")(e)}))}}function I(e,t,n,i,a,o,r,s){e.loading=!0,e.wallets=null,e.formData={useRelative:o.data.useRelative,showDefault:!0,showBalance:!1,balance:void 0,updatingWalletId:void 0,stopped:!1,minData:!0},e.motion=null,e.setParameters=function(t){t=t||{},e.formData.useRelative=angular.isDefined(t.useRelative)?t.useRelative:e.formData.useRelative,e.formData.showBalance=angular.isDefined(t.showBalance)?t.showBalance:e.formData.showBalance,e.formData.minData=angular.isDefined(t.minData)?t.minData:e.formData.minData,e.formData.excludedWalletId=t.excludedWalletId,e.formData.showDefault=(angular.isDefined(t.showDefault)?t.showDefault:e.formData.showDefault)&&"default"!==e.formData.excludedWalletId},e.load=function(n){n=n||{},e.loading=!1!==n.silent,e.formData.balance=void 0,e.formData.updatingWalletId=void 0,e.formData.stopped=!1;var o=[];o.push(r.name().then((function(t){return e.currency=t,a.ready()}))),e.defaultWallet=e.formData.showDefault?s:void 0,e.wallets||o.push(s.children.all().then((function(t){e.wallets=t,i.loading.hide()})));var l={silent:!0,minData:e.formData.minData,sources:e.formData.showBalance,tx:{enable:!1},api:!0},c=!1,u=0,d=Date.now(),p=0;return(o.length?t.all(o):t.when()).then((function(){var i=e.formData.showDefault?[s].concat(e.wallets):e.wallets;if(i.length)return console.debug("[wallets] Loading {0} wallets...".format(i.length)),i.reduce((function(t,i){return!n.refresh&&i.isDataLoaded(l)?(console.debug("[wallets] Wallet #{0} already loaded. Skipping".format(i.id)),t.then((function(){p+=i.data.balance,e.updateWalletView(i.id)}))):(u++,t.then((function(){if(!e.formData.stopped){var t;if(e.formData.updatingWalletId=i.id,n.refresh&&i.data.loaded){var a=angular.merge({requirements:!i.data.requirements.loaded||i.data.requirements.isMember||i.data.requirements.wasMember||i.data.requirements.pendingMembership},l);t=i.refreshData(a)}else t=i.loadData(l);return t.then((function(t){p+=t.balance,e.updateWalletView(i.id)})).catch((function(e){console.error("[wallets] Error while loading data of wallet #{0}".format(i.id),e),c=!0})),t}})))}),t.when())})).then((function(){if(c)return i.alert.error("ERROR.LOAD_WALLET_LIST_FAILED").then((function(){e.resetData(),e.cancel()}));e.formData.stopped||(u&&console.debug("[wallets] Loaded data of {0} wallet(s) in {1}ms".format(u,Date.now()-d)),e.formData.balance=p,e.formData.updatingWalletId=void 0,e.loading=!1,i.loading.hide(),e.updateView())})).catch((function(t){if(e.resetData(),t&&"CANCELLED"===t)throw e.cancel(),t;return i.onError("ERROR.LOAD_WALLET_LIST_FAILED")(t)}))},e.filterFn=function(e){return function(t){return!e||t.id!==e.excludedWalletId}},e.resetData=function(){console.debug("[wallets] Cleaning wallet list"),e.wallets=null,e.loading=!0,e.entered=!1,e.formData.balance=void 0,e.formData.updatingWalletId=void 0},e.updateView=function(t){if(e.wallets&&e.wallets.length){var n=t&&" #wallet-"+t||"";e.motion?e.motion.show({selector:".list .item.item-wallet"+n,ink:!0}):i.ink({selector:".list .item.item-wallet"+n})}},e.updateWalletView=function(t){e.motion?e.motion.show({selector:".list #wallet-"+t,ink:!0}):i.ink({selector:".list #wallet-"+t})},e.doUpdate=function(i){return e.loading||!e.wallets||!e.wallets.length||e.formData.updatingWalletId?t.when():(e.selectPrevented=!0,n((function(){e.selectPrevented=!1}),1e3),e.load({silent:i,refresh:!0}).then((function(){e.loading=!1,e.selectPrevented=!1,i&&e.$broadcast("$$rebind::rebind"),e.updateView()})))},e.addNewWallet=function(n){return n?o.data.useLocalStorageEncryption&&!s.isAuth()?s.auth({minData:!0}).then((function(){return e.addNewWallet(n)})).catch((function(e){if("CANCELLED"===e)return i.loading.hide();i.onError("ERROR.ADD_SECONDARY_WALLET_FAILED")(e)})):s.api.data.raisePromise.load(n.data).catch(console.error).then((function(){e.addListenersOnWallet(n),s.children.add(n)})):t.reject("Missing 'wallet' argument")},e.showNewWalletModal=function(){var t=s.children.instance();return t.login({showNewAccountLink:!1,title:"ACCOUNT.WALLET_LIST.BTN_NEW",okText:"COMMON.BTN_ADD",minData:!0,sources:!0,api:!1,success:i.loading.show,method:"PUBKEY"}).then((function(n){if(n&&n.pubkey)return s.isUserPubkey(n.pubkey)?(i.loading.hide(),void i.alert.error("ERROR.COULD_NOT_ADD_MAIN_WALLET")):s.children.hasPubkey(n.pubkey)?(i.loading.hide(),void i.alert.error("ERROR.COULD_NOT_ADD_EXISTING_WALLET")):(console.debug("[wallet] Adding secondary wallet {{0}}".format(n.pubkey.substring(0,8))),e.addNewWallet(t).then((function(){i.loading.hide(),e.updateView()})));i.loading.hide(100)})).catch((function(e){"CANCELLED"===e&&i.loading.hide()}))},e.addListenersOnWallet=function(e){},e.cancel=function(){console.warn("cancel() must be implement by subclass")},e.select=function(e,t){console.warn("select() must be implement by subclass")}}function O(e,t,n){angular.extend(this,t("WalletListAbstractCtrl",{$scope:e})),e.$on("modal.shown",(function(){e.setParameters(n),e.load()})),e.cancel=function(){e.closeModal()},e.select=function(t,n){t.isDefaultPrevented()||!n||e.selectPrevented||e.closeModal(n)},n&&e.setParameters(n)}function N(e,t,n,i,a,o,r,s,l,c,u,d,p,m){e.settings=p.data,e.listeners=[],angular.extend(this,t("WalletListAbstractCtrl",{$scope:e,parameters:{}})),e.formData.name=void 0,e.motion=c.motion.default,e.entered=!1,e.enter=function(t,n){if(!e.entered)return e.entered=!0,e.setParameters({showDefault:!0,showBalance:!0,minData:!1}),e.load().then((function(){c.loading.hide(),e.wallets&&(e.addListeners(),e.showFab("fab-add-wallet"))}));e.addListeners(),e.formData.stopped&&(e.loading=!1,e.formData.stopped=!1,e.formData.updatingWalletId=void 0,e.updateView())},e.$on("$ionicView.enter",e.enter),e.leave=function(){e.formData.stopped=!0,e.formData.updatingWalletId=void 0,e.loading=!1,e.removeListeners()},e.$on("$ionicView.leave",e.leave),e.cancel=function(){e.showHome()},e.select=function(t,i){t.isDefaultPrevented()||!i||e.selectPrevented||(i.isDefault()?n.go("app.view_wallet"):n.go("app.view_wallet_by_id",{id:i.id}),t.preventDefault())},e.editWallet=function(t,n){return t.preventDefault(),e.showEditPopup(n).then((function(t){if(t)return(p.data.useLocalStorageEncryption?m.auth({minData:!0}):a.when()).then((function(){n.data.localName=t,m.storeData(),c.loading.hide(),e.updateView()})).catch((function(e){if("CANCELLED"===e)return c.loading.hide();c.onError("ERROR.SAVE_WALLET_LIST_FAILED")(e)}))}))},e.downloadAsFile=function(){if(e.wallets)return m.children.downloadFile()},e.selectAndRemoveWallet=function(){return e.hideActionsPopover(),u.showSelectWallet({wallets:e.wallets,showDefault:!1}).then((function(t){if(t&&t.id)return(p.data.useLocalStorageEncryption?m.auth({minData:!0}):a.when()).then((function(){m.children.remove(t.id),c.loading.hide(),e.updateView()})).catch((function(e){if("CANCELLED"===e)return c.loading.hide();c.onError("ERROR.ADD_SECONDARY_WALLET_FAILED")(e)}))}))},e.showImportFileModal=function(){return e.hideActionsPopover(),l.show("templates/wallet/list/modal_import_file.html","WalletListImportModalCtrl").then((function(t){if(t&&t.length)return c.loading.show(),(p.data.useLocalStorageEncryption?m.auth({minData:!0}):a.when()).then((function(){return t.reduce((function(t,n){return t.then((function(){return function(t){if(!t||!t.pubkey)return a.reject("Invalid authentication data");console.debug("[wallet] Adding secondary wallet {"+t.pubkey.substring(0,8)+"}");var n=m.children.instance();return n.login({authData:t,minData:!0,sources:!0,api:!1,success:c.loading.show}).then((function(i){return i.localName=t.localName,e.addNewWallet(n)}))}(n)}))}),a.when())})).then((function(){c.loading.hide(),e.updateView()})).catch((function(e){if("CANCELLED"===e)return c.loading.hide();c.onError("ERROR.ADD_SECONDARY_WALLET_FAILED")(e)}))}))},e.setEditForm=function(t){e.editForm=t},e.showEditPopup=function(t){return a((function(n,i){o(["ACCOUNT.WALLET_LIST.EDIT_POPOVER.TITLE","ACCOUNT.WALLET_LIST.EDIT_POPOVER.HELP","COMMON.BTN_OK","COMMON.BTN_CANCEL"]).then((function(i){e.formData.name=t.data.localName||t.data.name||t.data.uid||t.data.pubkey&&t.data.pubkey.substring(0,8)||"",s.show({templateUrl:"templates/wallet/list/popup_edit_name.html",title:i["ACCOUNT.WALLET_LIST.EDIT_POPOVER.TITLE"],subTitle:i["ACCOUNT.WALLET_LIST.EDIT_POPOVER.HELP"],scope:e,buttons:[{text:i["COMMON.BTN_CANCEL"]},{text:i["COMMON.BTN_OK"],type:"button-positive",onTap:function(t){if(e.editForm.$submitted=!0,e.editForm.$valid&&e.formData.name)return e.formData.name;t.preventDefault()}}]}).then((function(t){if(!t)return delete e.formData.name,void c.loading.hide();n(t)}))}))}))},e.showActionsPopover=function(t){c.popover.show(t,{templateUrl:"templates/wallet/list/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.onWalletLogout=function(){e.resetData(),e.removeListeners()},e.addListeners=function(){e.removeListeners(),e.listeners=[m.api.data.on.logout(e,e.onWalletLogout)],p.data.walletHistoryAutoRefresh&&e.listeners.push(d.api.data.on.newBlock(e,(function(t){e.loading||(console.debug("[wallet-list] Received new block. Will reload list."),i((function(){e.doUpdate(!0)}),300))}))),_.forEach(e.wallets||[],e.addListenersOnWallet)},e.addListenersOnWallet=function(t){t&&(e.listeners.push(t.api.data.on.unauth(e,e.updateView)),e.listeners.push(t.api.data.on.auth(e,(function(t,n){return i(e.updateView),n?n.resolve():a.when()}))))},e.removeListeners=function(){_.forEach(e.listeners,(function(e){e()})),e.listeners=[]};var E=e.updateView;e.updateView=function(){E(),e.$broadcast("$$rebind::rebind")};var b=e.updateWalletView;e.updateWalletView=function(t){b(t),e.$broadcast("$$rebind::rebind")},e.$watch("settings.useRelative",(function(t,n){e.formData&&!e.loading&&t!==n&&(e.formData.useRelative=p.data.useRelative,e.updateView())}),!0)}function R(e,t,n,i){angular.extend(this,t("WalletListAbstractCtrl",{$scope:e})),e.motion=null,e.$on("popover.shown",(function(){e.loading&&(e.setParameters(i),e.load())})),e.updateView=function(){e.wallets&&e.wallets.length&&(n.ink({selector:".popover-wallets .list .item"}),e.$broadcast("$$rebind::rebind"))},e.select=function(t,n){t.isDefaultPrevented()||!n||e.selectPrevented||e.closePopover(n)}}function A(e,t,n,i){e.hasContent=!1,e.content=null,e.fileData="",e.isValidFile=!1,e.validatingFile=!1,e.onFileChanged=function(a){alert(a),e.validatingFile=!0,e.hasContent=angular.isDefined(a)&&""!==a,e.fileData=a.fileData?a.fileData:"";var o=""!==e.fileData&&("text/csv"==e.fileData.type||"text/plain"==e.fileData.type||"application/vnd.ms-excel");if(!o)return console.error("[wallet] Import failed. Invalid file type: "+e.fileData.type),e.isValidFile=!1,void(e.validatingFile=!1);console.debug("[wallet] Parsing file to import...");var r=a.fileContent.split("\n");e.content=r.reduce((function(e,t){if(!t||!t.trim().length)return e;var a=t.split("\t",3)||void 0;if(a&&3!=a.length)return console.debug("[wallet] Import: skip invalid row: "+t),o=!1,e;var r={pubkey:a[0],uid:a[1],localName:a[2]};return n.regexp.PUBKEY.test(r.pubkey)?i.isUserPubkey(r.pubkey)?(console.debug("[wallet] Pubkey equals to main wallet. Skip this row: ",t),e):i.children.hasPubkey(r.pubkey)?(console.debug("[wallet] Pubkey already in wallet list. Skip this row",t),e):e.concat(r):(console.debug("[wallet] Invalid pubkey, found in this row: ",t),o=!1,e)}),[]),e.isValidFile=o,t((function(){e.validatingFile=!1}),250)},e.removeFile=function(){e.hasContent=!1,e.content=null,e.fileData="",e.isValidFile=!1,e.validatingFile=!1}}function S(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b){e.search={text:"",loading:!0,type:null,results:[]},e.entered=!1,e.wotSearchTextId="wotSearchText",e.enableFilter=!0,e.enableWallets=!1,e.allowMultiple=!1,e.selection=[],e.showResultLabel=!0,e.parameters={},e.enter=function(t,n){if(e.entered)e.updateLocationHref(),e.search.results&&e.search.results.length&&e.motion.show({selector:".lookupForm .list .item",ink:!0});else{var a=angular.merge({},e.parameters,n&&n.stateParams);a&&a.q?(e.search.text=a.q,i((function(){e.doSearch()}),100)):a&&a.hash?(e.search.text="#"+a.hash,i((function(){e.doSearch()}),100)):i((function(){u.data.initPhase&&!a.type?e.doGetPending(0,void 0,!0):"newcomers"==a.type||!c.initPhase&&!a.type?e.doGetNewcomers(0,void 0,!0):"pending"==a.type?e.doGetPending(0,void 0,!0):"wallets"==a.type&&e.doGetWallets(0,void 0,!0)}),100),e.entered=!0,i(l.ink,100),e.showHelpTip()}},e.$on("$ionicView.enter",e.enter),e.resetWotSearch=function(){e.search={text:null,loading:!1,type:"newcomers",results:[]}},e.updateLocationHref=function(){},e.doSearchText=function(){e.doSearch(),e.updateLocationHref(),p.keyboard.close()},e.doSearch=function(){var t=e.search.text.trim();return l.screen.isSmall()&&t.length<3||!t.length?(e.search.results=void 0,e.search.type="none",e.search.total=void 0,n.when()):(e.search.loading=!0,e.search.type="text",b.search(t).then((function(n){if("text"==e.search.type&&e.search.text.trim()===t){if(!(n&&n.length||!m.regexp.PUBKEY.test(t)&&!m.regexp.PUBKEY_WITH_CHECKSUM.test(t)))return m.uri.parse(t).then((function(t){e.doDisplayResult([t])}));e.doDisplayResult(n);var i=_.countBy(n,(function(e){return e.divider?"divider":"results"}));e.search.total=i&&i.results||0}})).catch(l.onError("ERROR.WOT_LOOKUP_FAILED")))},e.doGetNewcomers=function(t,n,i){return t=t||0,(n=n||10)<10&&(n=10),e.hideActionsPopover(),e.search.loading=0===t,e.search.type="newcomers",t||i||e.updateLocationHref(),b.newcomers(t,n).then((function(i){return"newcomers"===e.search.type&&(e.doDisplayResult(i&&i.hits,t,n,i&&i.total),!0)})).catch((function(n){e.search.loading=!1,e.search.results=t>0?e.search.results:[],e.search.hasMore=!1,e.search.total=void 0,l.onError("ERROR.LOAD_NEWCOMERS_FAILED")(n)}))},e.doGetPending=function(t,n,i){t=t||0,(n=n||10)<10&&(n=10),e.hideActionsPopover(),e.search.loading=0===t,e.search.type="pending";var a=u.data.initPhase?b.all:b.pending;return t||i||e.updateLocationHref(),a(t,n).then((function(i){return"pending"==e.search.type&&(e.doDisplayResult(i&&i.hits,t,n,i&&i.total),e.search.hasMore=!u.data.initPhase&&e.search.hasMore,!0)})).catch((function(n){e.search.loading=!1,e.search.results=t>0?e.search.results:[],e.search.total=void 0,e.search.hasMore=!1,l.onError("ERROR.LOAD_PENDING_FAILED")(n)}))},e.doGetWallets=function(t,n,i){return t=t||0,(n=n||10)<10&&(n=10),e.hideActionsPopover(),e.search.loading=0===t,e.search.type="wallets",t||i||e.updateLocationHref(),E.children.all().then((function(i){if(!i||"wallets"!=e.search.type)return!1;var a=[E].concat(i).reduce((function(e,t,n){var i={id:n,pubkey:t.data.pubkey,uid:t.data.uid,name:t.data.localName||t.data.name,avatar:t.data.avatar};return e.concat(i)}),[]);return e.doDisplayResult(a,t,n,a.length),e.search.hasMore=!1,!0}))},e.showMore=function(){var t=e.search.results?e.search.results.length:0;return e.search.loadingMore=!0,("newcomers"==e.search.type?e.doGetNewcomers:e.doGetPending)(t).then((function(t){t&&(e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete"))})).catch((function(t){console.error(t),e.search.loadingMore=!1,e.search.hasMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.select=function(e){var n=e.state;!n&&e.pubkey&&(n=E.isUserPubkey(e.pubkey)?"app.view_wallet":"app.wot_identity"),n&&(s.nextViewOptions({historyRoot:!1,disableAnimate:!1,expire:300}),t.go(n,e.stateParams||e))},e.next=function(){console.warn("Selected identities (should be override):",e.selection)},e.toggleCheck=function(t,n){var i=e.search.results[t];i.checked?e.addToSelection(i):e.removeSelection(i,n)},e.toggleSelect=function(e){e.selected=!e.selected},e.addToSelection=function(t){var n=angular.copy(t);n.name&&(n.name=n.name.replace("<em>","").replace("</em>","")),e.selection.push(n)},e.removeSelection=function(t,n){var i=_.findWhere(e.selection,{id:t.id});if(i&&e.selection.splice(e.selection.indexOf(i),1),!e.search.loading){var a=_.findWhere(e.search.results,{id:t.id});a&&a.checked&&(a.checked=!1)}},e.scanQrCode=function(){p.barcode.enable&&p.barcode.scan().then((function(t){t&&m.uri.parse(t).then((function(n){n.pubkey?e.search.text=n.pubkey:t.uid?e.search.text=n.uid:e.search.text=t,e.doSearch()}))})).catch(l.onError("ERROR.SCAN_FAILED"))},e.showHelpTip=function(t){if(e.isLogin()&&!((t=angular.isDefined(t)?t:d.data.helptip.wotLookup)<0)){0===t&&(t=1);var n=e.createHelptipScope();if(n)return n.startWotLookupTour(t,!1).then((function(e){n.$destroy(),d.data.helptip.wotLookup=e,d.store()}))}},e.doDisplayResult=function(t,n,i,a){t=t||[],e.allowMultiple&&t.length&&e.selection.length&&_.forEach(e.selection,(function(e){var n=_.findWhere(t,{id:e.id});n&&(n.checked=!0)})),e.search.results=n?e.search.results.concat(t):t||[],e.search.total=angular.isDefined(a)?a:void 0,e.search.loading=!1,e.search.hasMore=e.search.results.length>=n+i,e.smallscreen=l.screen.isSmall(),e.search.results.length&&t.length>0&&e.motion&&e.motion.show({selector:".lookupForm .list .item",ink:!0})},e.showActionsPopover=function(t){l.popover.show(t,{templateUrl:"templates/wot/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function C(e,t,n,i,a){angular.extend(this,t("WotLookupCtrl",{$scope:e})),a=a||{},e.search.loading=!1,e.enableFilter=!!angular.isDefined(a.enableFilter)&&a.enableFilter,e.enableWallets=!!angular.isDefined(a.enableWallets)&&i.isLogin()&&i.children.count()&&a.enableWallets,e.allowMultiple=!!angular.isDefined(a.allowMultiple)&&a.allowMultiple,e.parameters=a,e.showResultLabel=!1,e.wotSearchTextId="wotSearchTextModal",e.allowMultiple&&a.selection&&(e.selection=a.selection);var o=e.enter;e.enter=function(t){e.parameters&&e.parameters.q&&(e.search.text=e.parameters.q,e.parameters.q.trim().length>2&&o(t))},e.$on("modal.shown",e.enter),e.cancel=function(){e.closeModal()},e.select=function(t){e.closeModal({pubkey:t.pubkey,uid:t.uid,name:t.name&&t.name.replace(/<\/?em>/gi,"")})},e.next=function(){e.closeModal(e.selection)},e.updateLocationHref=function(){},e.showHelpTip=function(){}}function D(e,t,n,i,a,o,r,s,l,c,u,d,p){e.formData={hasSelf:!0},e.disableCertifyButton=!0,e.loading=!0,e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!r.screen.isSmall()||t.enableBack})),e.load=function(t,n,i){return d.load(t,n,i).then((function(n){if(!n)return r.onError("ERROR.IDENTITY_NOT_FOUND")().then(e.showHome);e.formData=n;var i=p.isLogin();e.revoked=n.requirements&&(n.requirements.revoked||n.requirements.pendingRevocation),e.canCertify=n.hasSelf&&!e.revoked&&(!i||!p.isUserPubkey(t)||p.children.count()>0),e.canSelectAndCertify=n.hasSelf&&(p.isUserPubkey(t)||p.children.hasPubkey(t));var a=i&&_.find((n.received_cert||[]).concat(n.received_cert_pending||[]),(function(e){return e.pubkey===p.data.pubkey&&e.valid&&e.expiresIn>c.data.timeWarningExpire}));e.alreadyCertified=!(!e.canCertify||!i||p.children.count()>0||!a),e.disableCertifyButton=e.alreadyCertified||e.revoked,e.loading=!1})).catch((function(t){e.loading=!1,r.onError("ERROR.LOAD_IDENTITY_FAILED")(t)}))},e.doUpdate=function(t){t||(e.loading=!0,r.loading.show());var n={cache:!1,blockUid:e.formData.blockUid||void 0};return e.load(e.formData.pubkey,e.formData.uid,n).then(r.loading.hide)},e.certify=function(){return(p.children.count()?s.showSelectWallet({displayBalance:!1}):o.when(p)).then((function(t){if(t)return t.auth({minData:!0}).then((function(n){if(r.loading.hide(),u.data.initPhase||n.isMember)if(u.data.initPhase||e.formData.hasSelf)if(e.formData.requirements.expired)r.alert.error("ERROR.IDENTITY_EXPIRED");else{var a=_.find(e.formData.received_cert,(function(e){return e.pubkey===t.data.pubkey&&e.valid&&e.expiresIn>c.data.timeWarningExpire}));a?i("ERROR.IDENTITY_ALREADY_CERTIFY",a).then((function(e){r.alert.error(e,"ERROR.UNABLE_TO_CERTIFY_TITLE")})):(a=_.findWhere(e.formData.received_cert_pending,{pubkey:t.data.pubkey,valid:!0}))?i("ERROR.IDENTITY_ALREADY_CERTIFY_PENDING",a).then((function(e){r.alert.error(e,"ERROR.UNABLE_TO_CERTIFY_TITLE")})):r.alert.confirm("CONFIRM.CERTIFY_RULES","CONFIRM.POPUP_SECURITY_WARNING_TITLE",{cssClass:"warning",okText:"WOT.BTN_YES_CERTIFY",okType:"button-assertive"}).then((function(n){n&&(r.loading.show(),t.certify(e.formData.uid,e.formData.pubkey,e.formData.blockUid||e.formData.requirements&&e.formData.requirements.meta&&e.formData.requirements.meta.timestamp,e.formData.requirements&&e.formData.requirements.meta&&e.formData.requirements.meta.sig,e.formData.isMember,e.formData.wasMember).then((function(n){r.loading.hide(),n&&(e.prepareNewCert(t,n),e.alreadyCertified=!0,r.toast.show("INFO.CERTIFICATION_DONE"),e.formData.received_cert_pending.unshift(n),e.formData.requirements.pendingCertificationCount++,e.doMotion())})).catch(r.onError("ERROR.SEND_CERTIFICATION_FAILED")))}))}else r.alert.error("ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF");else r.alert.error(n.requirements.needSelf?"ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY":"ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF")})).catch((function(e){"CANCELLED"!==e&&r.onError("ERROR.LOGIN_FAILED")(e)}))}))},e.selectAndCertify=function(){return(p.children.count()?s.showSelectWallet({displayBalance:!1}):o.when(p)).then((function(t){return t.auth({minData:!0}).then((function(e){if(u.data.initPhase||e.isMember)return r.loading.hide(),s.showWotLookup();r.alert.error(e.requirements.needSelf||e.requirements.needMembership?"ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY":"ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF")})).then((function(e){if(e&&e.pubkey){if(e.uid){r.loading.show();var t={cache:!1,blockUid:e.blockUid};return d.load(e.pubkey,e.uid,t)}r.alert.error("ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF")}})).then((function(n){if(n)if(r.loading.hide(),n&&n.hasSelf)if(n.requirements.expired)r.alert.error("ERROR.IDENTITY_EXPIRED");else{var a=_.findWhere(n.received_cert,{pubkey:t.data.pubkey,valid:!0});a?i("ERROR.IDENTITY_ALREADY_CERTIFY",a).then((function(e){r.alert.error(e,"ERROR.UNABLE_TO_CERTIFY_TITLE")})):(a=_.findWhere(n.received_cert_pending,{pubkey:t.data.pubkey,valid:!0}))?i("ERROR.IDENTITY_ALREADY_CERTIFY_PENDING",a).then((function(e){r.alert.error(e,"ERROR.UNABLE_TO_CERTIFY_TITLE")})):i("CONFIRM.CERTIFY_RULES_TITLE_UID",{uid:n.uid}).then((function(e){return r.alert.confirm("CONFIRM.CERTIFY_RULES",e)})).then((function(i){i&&(r.loading.show(),t.certify(n.uid,n.pubkey,n.blockUid||n.requirements&&n.requirements.meta&&n.requirements.meta.timestamp,n.requirements&&n.requirements.meta&&n.requirements.meta.sig,n.isMember,n.wasMember).then((function(t){if(r.loading.hide(),t)return d.extendAll([t],"pubkey").then((function(){r.toast.show("INFO.CERTIFICATION_DONE"),e.formData.given_cert_pending.unshift(t),e.doMotion()}))})).catch(r.onError("ERROR.SEND_CERTIFICATION_FAILED")))}))}else r.alert.error("ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF")})).catch((function(e){"CANCELLED"!==e&&r.onError("ERROR.LOAD_IDENTITY_FAILED")(e)}))}))},e.prepareNewCert=function(e,t){t.uid=e.data.uid,t.pubkey=e.data.pubkey,t.isMember=e.data.isMember,t.avatar=e.data.avatar,t.name=e.data.name},e.removeActionParamInLocationHref=function(e){if(e&&e.stateParams&&e.stateParams.action){var t=angular.copy(e.stateParams);t.action=null,a.nextViewOptions({disableAnimate:!0,disableBack:!1,historyRoot:!1}),n.go(e.stateName,t,{reload:!1,inherit:!0,notify:!1})}},e.doAction=function(t,n){if("certify"==t)return e.certify();"transfer"==t&&e.showTransferModal(n)},e.showCertifications=function(){var t=e.formData.requirements&&e.formData.requirements.alternatives&&e.formData.blockUid||void 0;r.screen.isSmall()?n.go("app.wot_cert",{pubkey:e.formData.pubkey,uid:e.formData.uid,type:"received",block:t}):n.go("app.wot_cert_lg",{pubkey:e.formData.pubkey,uid:e.formData.uid,block:t})},e.showGivenCertifications=function(){var t=e.formData.requirements&&e.formData.requirements.alternatives&&e.formData.blockUid||void 0;r.screen.isSmall()?n.go("app.wot_cert",{pubkey:e.formData.pubkey,uid:e.formData.uid,type:"given",block:t}):n.go("app.wot_cert_lg",{pubkey:e.formData.pubkey,uid:e.formData.uid,block:t})},e.showSharePopover=function(i){var a=e.formData.name||e.formData.uid||e.formData.pubkey,o=(l.shareBaseUrl||t.rootPath)+n.href("app.wot_identity",{pubkey:e.formData.pubkey,uid:e.formData.uid});r.screen.isSmall()&&(i=angular.element(document.querySelector("#wot-share-anchor-"+e.formData.pubkey))||i),r.popover.share(i,{bindings:{url:o,titleKey:"WOT.VIEW.POPOVER_SHARE_TITLE",titleValues:{title:a},postMessage:a}})}}function y(e,t,n,i,a,o,r,s){angular.extend(this,n("WotIdentityAbstractCtrl",{$scope:e})),e.motion=o.motion.fadeSlideInRight,e.qrcodeId="qrcode-wot-"+e.$id,e.options=e.options||{},e.options.like={kinds:["LIKE","ABUSE"],index:"user",type:"profile"},e.likeData={likes:{},abuses:{}},e.$on("$ionicView.enter",(function(t,n){var a=function(){e.doMotion(),n.stateParams&&n.stateParams.action&&(i((function(){e.doAction(n.stateParams.action.trim())}),100),e.removeActionParamInLocationHref(n),e.likeData.id=e.formData.pubkey),e.showQRCode()},r={cache:!0,blockUid:n.stateParams&&n.stateParams.block||void 0};if(n.stateParams&&n.stateParams.pubkey&&n.stateParams.pubkey.trim().length>0){if(e.loading)return e.load(n.stateParams.pubkey.trim(),n.stateParams.uid,r).then(a).catch(o.onError("ERROR.LOAD_IDENTITY_FAILED"))}else if(n.stateParams&&n.stateParams.uid&&n.stateParams.uid.trim().length>0){if(e.loading)return e.load(null,n.stateParams.uid,r).then(a)}else e.showHome()})),e.doMotion=function(){e.motion.show({selector:".view-identity .list .item"}),e.showFab("fab-transfer"),(e.canCertify&&!e.alreadyCertified||t.tour)&&e.showFab("fab-certify-"+e.formData.uid),e.$broadcast("$csExtension.motion")},e.doQuickFix=function(t){if("showSelectIdentities"===t)return e.showSelectIdentities()},e.showSelectIdentities=function(){if(e.formData.requirements&&e.formData.requirements.alternatives)return r.showSelectPubkeyIdentity({identities:[e.formData.requirements].concat(e.formData.requirements.alternatives)}).then((function(e){if(e&&e.pubkey)return a.go("app.wot_identity",{pubkey:e.pubkey,uid:e.uid,block:e.meta&&e.meta.timestamp||e.blockUid})}))},e.showQRCode=function(t){if(e.qrcodeId&&e.formData.pubkey){var n=angular.element(document.querySelector("#"+e.qrcodeId+" .content"));n?(console.debug("[wot-controller] Generating QR code for identity..."),i((function(){var i=o.qrcode.svg(e.formData.pubkey);n.html(i),o.motion.toggleOn({selector:"#"+e.qrcodeId},t||1100)}))):console.error("[wot-controller] Cannot found div #{0} for the QRCode. Skipping.".format(e.qrcodeId))}},e.hideQRCode=function(){e.qrcodeId&&angular.element(document.querySelector("#"+e.qrcodeId))&&o.motion.toggleOff({selector:"#"+e.qrcodeId})}}function P(e,t,n,i,a,o,r,s){e.formData={},e.loading=!0,e.motion=s.motion.fadeSlideInRight,e.$on("$ionicView.enter",(function(t,n){e.loading?(e.pubkey=n.stateParams.pubkey,e.uid=n.stateParams.uid,e.load()):e.updateView()})),e.load=function(t){return n.all([o.extend({pubkey:e.pubkey}),r.load(e.pubkey,t)]).then((function(t){e.formData=angular.merge(t[0],t[1]),e.loading=!1,e.updateView()}))},e.doUpdate=function(t){return console.debug("[wot] TX history reloading..."),e.formData={},(t?e.load():s.loading.show().then(e.load).then(s.loading.hide)).then(e.updateView).catch(s.onError("ERROR.IDENTITY_TX_FAILED"))},e.updateView=function(){e.$broadcast("$$rebind::balance"),e.$broadcast("$$rebind::rebind"),e.motion.show()},e.downloadHistoryFile=function(t){(t=t||{}).fromTime=t.fromTime||-1,r.downloadHistoryFile(e.pubkey,t)},e.showMoreTx=function(n){return n=n||e.formData.tx.fromTime-a.data.walletHistoryTimeSecond||moment().utc().unix()-2*a.data.walletHistoryTimeSecond,s.loading.show(),r.load(e.pubkey,n).then((function(t){angular.merge(e.formData,t),e.updateView(),s.loading.hide()})).catch((function(a){a.ucode==i.errorCodes.HTTP_LIMITATION?t((function(){return e.showMoreTx(n)}),2e3):s.onError("ERROR.IDENTITY_TX_FAILED")(a)}))}}function k(e,t,n,i,a,o){var r;angular.extend(this,n("WotIdentityAbstractCtrl",{$scope:e})),e.motions={receivedCertifications:angular.copy(o.motion.fadeSlideIn),givenCertifications:angular.copy(o.motion.fadeSlideInRight),avatar:angular.copy(o.motion.fadeIn)},e.motions.receivedCertifications.enable=!0,e.motions.givenCertifications.enable=!0,e.motions.avatar.enable=!0,e.$on("$ionicView.enter",(function(t,n){if(n.stateParams&&n.stateParams.type&&(e.motions.receivedCertifications.enable="given"!=n.stateParams.type,e.motions.givenCertifications.enable="given"==n.stateParams.type,e.motions.avatar.enable=!1),e.loading){var i={cache:!0,blockUid:n.stateParams&&n.stateParams.block||void 0};return n.stateParams&&n.stateParams.pubkey&&n.stateParams.pubkey.trim().length>0?e.load(n.stateParams.pubkey.trim(),n.stateParams.uid,i).then((function(){e.doMotion(),e.showHelpTip()})):(r=n.stateParams&&n.stateParams.id?a.children.get(n.stateParams.id):a)?r.isLogin()?e.load(r.data.pubkey,r.data.uid,i).then((function(){e.doMotion(),e.showHelpTip()})):e.showHome():(o.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome())}e.doMotion()})),e.$on("$ionicView.leave",(function(){e.loading=!0})),e.doUpdate=function(){var t={cache:!1,blockUid:e.formData.blockUid||void 0};return e.load(e.formData.pubkey,e.formData.uid,t).then((function(){e.doMotion(),e.showHelpTip()}))},e.doMotion=function(t){e.doMotionReceivedCertifications(0,t),e.motions.avatar.enable&&e.motions.avatar.show({selector:".col-avatar ."+e.motions.avatar.ionListClass}),e.doMotionGivenCertifications(e.motions.receivedCertifications.enable?100:10,t)},e.doMotionReceivedCertifications=function(n,i){e.motions.receivedCertifications.enable?(i||e.motions.receivedCertifications.show({selector:".list.certifications .item",timeout:n}),(e.canCertify&&!e.alreadyCertified||t.tour)&&e.showFab("fab-certify",n)):(e.canCertify||t.tour)&&e.hideFab("fab-certify",0)},e.doMotionGivenCertifications=function(n,i){e.motions.givenCertifications.enable?(i||e.motions.givenCertifications.show({selector:".list.given-certifications .item",timeout:n}),(e.canSelectAndCertify||t.tour)&&e.showFab("fab-select-certify")):(e.canSelectAndCertify||t.tour)&&e.hideFab("fab-select-certify",0)},e.showHelpTip=function(){if(e.isLogin()&&i.data.helptip.enable){var t=e.createHelptipScope();if(t){var n=a.isUserPubkey(e.formData.pubkey),o=n?i.data.helptip.walletCerts:i.data.helptip.wotCerts;if(!(o<0))return(n?t.startWalletCertTour(o,!1):t.startWotCertTour(o,!1)).then((function(e){t.$destroy(),n?i.data.helptip.walletCerts=e:i.data.helptip.wotCerts=e,i.store()}))}}}}function M(e,t,n,i){e.loading=!0,e.load=function(){return i&&i.identities?(e.identities=i.identities,e.pubkey=e.identities[0].pubkey,e.loading=!1,t.when()):(e.pubkey=i&&i.pubkey,pubkey?n.loadRequirements({pubkey:pubkey,uid:uid}).then((function(t){t&&t.requirements&&(e.identities=t.requirements,t.requirements.alternatives?e.identities=[t.requirements].concat(t.requirements.alternatives):e.identities=[t.requirements]),e.loading=!1})):t.reject("Missing parameters: [pubkey] or [identities]"))},e.$on("modal.shown",e.load)}function w(e,t,n,i,a,o,r,s,l,c,u,d,p){e.networkStarted=!1,e.ionItemClass="",e.expertMode=c.data.expertMode&&!s.screen.isSmall(),e.isHttps="https:"===a.location.protocol,e.search={text:"",loading:!0,type:void 0,results:[],endpoint:null,bma:void 0,ssl:void 0,ws2p:void 0,sort:void 0,asc:!0},e.compactMode=!0,e.listeners=[],e.helptipPrefix="helptip-network",e.enableLocationHref=!0,e.removeListeners=function(){e.listeners.length&&(console.debug("[network] Closing listeners"),_.forEach(e.listeners,(function(e){e()})),e.listeners=[])},e.enter=function(t,n){e.networkStarted||(e.networkStarted=!0,e.search.loading=!0,u.get().then((function(t){if(t){var i=r.node.same(t.node);e.node=i?r:r.instance(t.node.host,t.node.port),n&&n.stateParams&&(n.stateParams.type&&-1!=["mirror","member","offline"].indexOf(n.stateParams.type)&&(e.search.type=n.stateParams.type),n.stateParams.expert&&(e.expertMode="true"==n.stateParams.expert)),e.load()}})).catch((function(t){s.onError("ERROR.GET_CURRENCY_FAILED")(t),e.networkStarted=!1})))},e.$on("$ionicParentView.enter",e.enter),e.leave=function(){e.node!==r&&e.node.close(),e.networkStarted&&(e.removeListeners(),d.close(),e.networkStarted=!1,e.search.loading=!0)},e.$on("$ionicView.beforeLeave",e.leave),e.$on("$ionicParentView.beforeLeave",e.leave),e.$on("$destroy",e.leave),e.computeOptions=function(){return{filter:{member:!e.search.type||"member"===e.search.type,mirror:!e.search.type||"mirror"===e.search.type,endpoint:angular.isDefined(e.search.endpoint)?e.search.endpoint:null,bma:e.search.bma,ssl:e.search.ssl,ws2p:e.search.ws2p,online:!(e.search.type&&"offline"===e.search.type)},sort:{type:e.search.sort,asc:e.search.asc},expertMode:e.expertMode,timeout:l.timeout&&(e.expertMode?l.timeout/10:l.timeout/100)}},e.load=function(){e.search.loading&&(d.start(e.node,e.computeOptions()),e.refreshing=!1,e.listeners.push(d.api.data.on.changed(e,(function(t){e.refreshing||(e.refreshing=!0,p.extendAll(t.peers).then((function(){e.networkStarted&&e.updateView(t),e.refreshing=!1})))})))),e.showHelpTip()},e.updateView=function(t){console.debug("[peers] Updating UI"),e.$broadcast("$$rebind::rebind"),e.search.results=t.peers,e.search.memberPeersCount=t.memberPeersCount,e.search.loading=!e.networkStarted||d.isBusy(),e.loading||e.$broadcast("$$rebind::rebind"),e.motion&&e.search.results&&e.search.results.length>0&&e.motion.show({selector:".item-peer"})},e.refresh=function(){e.search.loading=!0,d.loadPeers()},e.sort=function(){e.search.loading=!0,e.refreshing=!0,d.sort(e.computeOptions()),e.updateView(d.data)},e.toggleSearchType=function(t){e.hideActionsPopover(),e.search.type===t||"none"===t?e.search.type=void 0:e.search.type=t,d.close(),e.search.loading=!0,e.load(),e.enableLocationHref&&n.search({type:e.search.type}).replace()},e.toggleSearchEndpoint=function(t){e.hideActionsPopover(),e.search.endpoint===t||null===t?e.search.endpoint=null:e.search.endpoint=t,e.sort()},e.toggleSort=function(t){e.search.sort!==t||e.search.asc?(e.search.asc=e.search.sort!==t||!e.search.asc,e.search.sort=t):(e.search.asc=void 0,e.search.sort=void 0),e.sort()},e.toggleCompactMode=function(){e.compactMode=!e.compactMode,e.$broadcast("$$rebind::rebind")},e.selectPeer=function(n){if(n.compacted&&e.compactMode)e.toggleCompactMode();else if(n.online&&n.hasBma()){var i={server:n.getServer()};n.isSsl()&&(i.ssl=!0),n.isTor()&&(i.tor=!0),t.go("app.view_peer",i)}},e.$on("csView.action.refresh",(function(t,n){"peers"===n&&e.refresh()})),e.$on("csView.action.showActionsPopover",(function(t,n){e.showActionsPopover(n)})),e.showActionsPopover=function(t){s.popover.show(t,{templateUrl:"templates/network/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.showEndpointsPopover=function(e,t,n){e.preventDefault(),e.stopPropagation();var i=t.getEndpoints(n);(i=(i||[]).reduce((function(e,i){var a=r.node.parseEndPoint(i)||r.node.parseEndPoint(i,n);return e.concat({label:"NETWORK.VIEW.NODE_ADDRESS",value:t.getServer(a)+(a&&a.path||"")})}),[])).length&&s.popover.show(e,{templateUrl:"templates/network/popover_endpoints.html",bindings:{titleKey:"NETWORK.VIEW.ENDPOINTS."+n,items:i}})},e.showWs2pPopover=function(e,t){return e.stopPropagation(),o("NETWORK.VIEW.PRIVATE_ACCESS").then((function(n){s.popover.show(e,{templateUrl:"templates/network/popover_endpoints.html",bindings:{titleKey:"NETWORK.VIEW.ENDPOINTS.WS2P",valueKey:"NETWORK.VIEW.NODE_ADDRESS",items:[{label:"NETWORK.VIEW.NODE_ADDRESS",value:t.bma.private?n:t.getServer()+(t.bma.path||"")},{label:"NETWORK.VIEW.WS2PID",value:t.bma.ws2pid},{label:"NETWORK.VIEW.POW_PREFIX",value:t.powPrefix}]}})}))},e.showHelpTip=function(t,n){if(t=angular.isDefined(t)?t:c.data.helptip.network,n=!!angular.isDefined(n)&&n,!(t<0)){var i=e.createHelptipScope();if(i)return i.tour=n,i.startNetworkTour(t,!1).then((function(e){i.$destroy(),n||(c.data.helptip.network=e,c.store())}))}}}function U(e,t,n){angular.extend(this,t("NetworkLookupCtrl",{$scope:e})),n=n||{},e.enableFilter=!angular.isDefined(n.enableFilter)||n.enableFilter,e.search.type=angular.isDefined(n.type)?n.type:e.search.type,e.search.endpoint=angular.isDefined(n.endpoint)?n.endpoint:e.search.endpoint,e.search.bma=angular.isDefined(n.bma)?n.bma:e.search.bma,e.search.ssl=angular.isDefined(n.ssl)?n.ssl:e.search.ssl,e.search.ws2p=angular.isDefined(n.ws2p)?n.ws2p:e.search.ws2p,e.expertMode=angular.isDefined(n.expertMode)?n.expertMode:e.expertMode,e.ionItemClass=n.ionItemClass||"item-border-large",e.enableLocationHref=!1,e.helptipPrefix="",e.selectPeer=function(t){e.closeModal(t)},e.$on("modal.hidden",(function(){e.leave()})),e.showHelpTip=function(){},e.enter()}function B(e,t){angular.extend(this,t("NetworkLookupCtrl",{$scope:e}));var n=n||{};e.enableFilter=!angular.isDefined(n.enableFilter)||n.enableFilter,e.search.type=angular.isDefined(n.type)?n.type:e.search.type,e.search.endpoint=angular.isDefined(n.endpoint)?n.endpoint:e.search.endpoint,e.expertMode=angular.isDefined(n.expertMode)?n.expertMode:e.expertMode,e.ionItemClass=n.ionItemClass||"item-border-large",e.helptipPrefix="",e.selectPeer=function(t){e.closePopover(t)},e.$on("popover.hidden",(function(){e.leave()})),e.showHelpTip=function(){},e.enter()}function x(e,t,n,i,a,o){e.loading=!0,e.formData={},e.load=function(){return console.debug("[peer-popover] Loading peer info..."),e.loading=!0,e.formData={},t.all([i.blockchain.current().then((function(t){e.formData.number=t.number,e.formData.medianTime=t.medianTime,e.formData.powMin=t.powMin,e.formData.useSsl=o.useSsl})).catch((function(){delete e.formData.number,delete e.formData.medianTime,delete e.formData.powMin,delete e.formData.useSsl})),o.node.summary().then((function(t){e.formData.version=t&&t.duniter&&t.duniter.version,e.formData.software=t&&t.duniter&&t.duniter.software})).catch((function(){delete e.formData.version,delete e.formData.software})),o.version.latest().then((function(t){e.formData.latestRelease=t})).catch((function(){delete e.formData.latestRelease}))]).then((function(){if(e.formData.latestRelease&&"duniter"==e.formData.software){var t=a.version.compare(e.formData.version,e.formData.latestRelease.version);e.formData.isPreRelease=t>0,e.formData.hasNewRelease=t<0}else e.formData.isPreRelease=!1,e.formData.hasNewRelease=!1;e.loading=!1,e.$broadcast("$$rebind::rebind")}))},i.api.data.on.newBlock(e,(function(t){e.loading||(console.debug("[peer info] Received new block. Reload content"),e.load())})),n.api.data.on.changed(e,(function(t){e.loading||(console.debug("[peer info] Peer settings changed. Reload content"),e.load())})),e.load()}function F(t,n,i,a,o,r,s){t.node={},t.loading=!0,t.isHttps="https:"===i.location.protocol,t.isReachable=!0,t.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!o.screen.isSmall()||t.enableBack})),t.$on("$ionicView.enter",(function(e,n){var i=!n.stateParams||!n.stateParams.server,a=n.stateParams&&n.stateParams.server||s.server,o=n.stateParams&&"true"==n.stateParams.ssl||!!i&&s.useSsl,r="true"==n.stateParams.tor||!!i&&s.useTor;return t.load(a,o,r).then((function(){return t.$broadcast("$csExtension.enter",e,n)})).then((function(){t.loading=!1})).catch((function(){t.loading=!1}))})),t.load=function(i,a,l){var c={server:i,host:i,useSsl:a,useTor:l},u=i.split(":");return 2===u.length&&(c.host=u[0],c.port=u[1]),angular.merge(t.node,l?s.lightInstance(c.host+".to",443,!0,6e4):s.lightInstance(c.host,c.port,c.useSsl),c),t.isReachable=!t.isHttps||a,t.isReachable?n.all([t.node.network.peering.self().then((function(e){t.node.pubkey=e.pubkey,t.node.currency=e.currency})).catch((function(e){console.error(e&&e.message||e)})),t.node.network.peers().then((function(n){var i=(n&&n.peers||[]).map((function(t){var n=new e(t);return n.online="UP"===t.status,n.buid=n.block,n.blockNumber=n.buid&&n.buid.split("-")[0],n.dns=n.getDns(),n.id=n.keyID(),n.server=n.getServer(),n}));return r.extendAll([t.node].concat(i)).then((function(){t.peers=_.sortBy(i,(function(e){var t=1;return t+=1e4*(e.online?1:0),t+=1e3*(e.hasMainConsensusBlock?1:0),-(t+=100*(e.uid?1:0))})),t.motion.show({selector:".item-peer"})}))})),t.node.blockchain.current().then((function(e){t.current=e}))]).catch((function(e){throw console.error(e&&e.message||e),o.onError(l?"PEER.VIEW.ERROR.LOADING_TOR_NODE_ERROR":"PEER.VIEW.ERROR.LOADING_NODE_ERROR")(e),e})):s.network.peers().then((function(n){var i=(n&&n.peers||[]).reduce((function(t,n){var i=new e(n);return(i.getEndpoints("BASIC_MERKLED_API")||[]).reduce((function(e,t){var n=s.node.parseEndPoint(t);return n.dns!==c.host&&n.ipv4!==c.host&&n.ipv6!==c.host||n.port!=c.port?e:(i.bma=n,e.concat(i))}),t)}),[]),a=i.length&&i[0];if(a)return t.node.pubkey=a.pubkey,t.node.currency=a.currency,r.extend(t.node);console.warn("Could not get peer from /network/peers")}))},t.selectPeer=function(e){if(e.online&&!e.isWs2p()){var t={server:e.getServer()};e.isSsl()&&(t.ssl=!0),e.isTor()&&(t.tor=!0),a.go("app.view_peer",t)}},t.openRawPeering=function(e){return t.openLink(e,t.node.url+"/network/peering")},t.openRawCurrentBlock=function(e){return t.openLink(e,t.node.url+"/blockchain/current")}}function H(e,t,n,i,a,o,r,s,l,c,u){e.formData={useRelative:!1,currency:"",M:0,MoverN:0,UD:0,cactual:0,c:0,dt:0,sigQty:0,sigStock:0,msWindow:0,msValidity:0,sigWindow:0,sigValidity:0,sigPeriod:0,medianTime:0,difficulty:0,Nprev:0,stepMax:0,sentries:0,xpercent:0,durationFromLastUD:0,blockUid:null,dtReeval:0,udReevalTime0:0,allRules:angular.isDefined(s.data.currency&&s.data.currency.allRules)?s.data.currency.allRules:s.data.expertMode,allWotRules:angular.isDefined(s.data.currency&&s.data.currency.allWotRules)?s.data.currency.allWotRules:s.data.expertMode,licenseUrl:s.getLicenseUrl()},e.loading=!0,e.screen=r.screen,e.enter=function(t,i){e.loading&&(e.formData.useRelative=s.data.useRelative,l.get().then(e.load).then((function(){e.isLogin()&&e.showHelpTip()})).catch(r.onError("ERROR.GET_CURRENCY_FAILED")),c.api.data.on.mainBlockChanged(e,(function(t){e.loading||e.formData.blockUid!==t.buid&&(console.debug("[currency] Updating parameters UI (new main block detected)"),n(e.load,1e3))}))),e.$broadcast("$csExtension.enter",i)},e.$on("$ionicView.enter",e.enter),e.load=function(){var n,i,a={},s=Date.now();return t.all([o.blockchain.parameters().then((function(e){a.currency=e.currency,a.c=e.c,a.dt=e.dt,a.sigQty=e.sigQty,a.sigStock=e.sigStock,a.msWindow=e.msWindow,a.msValidity=e.msValidity,a.sigWindow=e.sigWindow,a.sigValidity=e.sigValidity,a.sigPeriod=e.sigPeriod,a.stepMax=e.stepMax,a.xpercent=e.xpercent,a.avgGenTime=e.avgGenTime,a.dtReeval=e.dtReeval,a.udTime0=e.udTime0,a.udReevalTime0=e.udReevalTime0,a.dtReeval||(a.dtReeval=a.dt)})),l.blockchain.current().then((function(e){n=e.monetaryMass,a.N=e.membersCount,a.medianTime=e.medianTime,a.difficulty=e.powMin,a.blockUid=[e.number,e.hash].join("-")})).catch((function(e){if(e&&e.ucode==o.errorCodes.NO_CURRENT_BLOCK)return n=0,a.N=0,a.medianTime=moment().utc().unix(),a.difficulty=0,void(a.blockUid=null);throw e})),o.blockchain.stats.ud().then((function(e){if(e.result.blocks.length){var t=e.result.blocks[e.result.blocks.length-1];return o.blockchain.block({block:t}).then((function(e){a.currentUD=e.unitbase>0?e.dividend*Math.pow(10,e.unitbase):e.dividend,i=e.medianTime,a.Nprev=e.membersCount}))}return i=0,a.Nprev=0,o.blockchain.parameters().then((function(e){a.currentUD=e.ud0}))}))]).then((function(){var t=n-a.currentUD*a.Nprev,o=a.Nprev?t/a.Nprev:0;return a.cactual=o?100*a.currentUD/o:0,a.M=n,a.MoverN=a.Nprev?(t||n)/a.Nprev:0,a.UD=a.currentUD,a.durationFromLastUD=i?a.medianTime-i:0,a.sentries=Math.ceil(Math.pow(a.N,1/a.stepMax)),angular.extend(e.formData,a),console.debug("[currency] Parameters loaded in "+(Date.now()-s)+"ms"),e.loading=!1,e.$broadcast("$$rebind::rebind"),r.ink(),r.loading.hide()})).catch((function(t){e.loading=!1,r.onError("ERROR.LOAD_PEER_DATA_FAILED")(t)}))},e.refresh=function(){if(!e.loading)return e.loading=!0,r.loading.show(),e.load().then((function(){e.$broadcast("csView.action.refresh","currency")}))},e.refreshPeers=function(){return e.$broadcast("csView.action.refresh","peers"),t.when()},e.showExtendActionsPopover=function(t){e.$broadcast("csView.action.showActionsPopover",t)},e.onAllRulesChange=function(){s.data.currency=s.data.currency||{},s.data.currency.allRules!==e.formData.allRules&&(s.data.currency.allRules=e.formData.allRules,s.store())},e.$watch("formData.allRules",e.onAllRulesChange),e.onAllWotRulesChange=function(){s.data.currency=s.data.currency||{},s.data.currency.allWotRules!==e.formData.allWotRules&&(s.data.currency.allWotRules=e.formData.allWotRules,s.store())},e.$watch("formData.allWotRules",e.onAllWotRulesChange),e.startCurrencyTour=function(){return e.hideActionsPopover(),e.showHelpTip(0,!0)},e.showHelpTip=function(t,n){if(t=angular.isDefined(t)?t:s.data.helptip.currency,n=!!angular.isDefined(n)&&n,!(t<0)){var i=e.createHelptipScope(n);if(i)return i.tour=n,i.startCurrencyTour(t,!1).then((function(e){i.$destroy(),s.data.helptip.currency=e,s.store()}))}},e.showLicenseModal=function(){return u.show("templates/currency/modal_license.html","CurrencyLicenseModalCtrl")},e.showHelpModal=function(e){a.showHelp({anchor:e})},e.showActionsPopover=function(t){r.popover.show(t,{templateUrl:"templates/currency/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function W(e,t,n,i,a){e.loading=!0,e.load=function(){e.loading&&(e.licenseUrl=i.getLicenseUrl(),e.licenseUrl&&".txt"!=e.licenseUrl.substring(e.licenseUrl.length-3)&&(e.licenseUrlHtml=e.licenseUrl+".html",e.licenseUrl=e.licenseUrl+".txt"),e.loading=!1)},e.$on("modal.shown",e.load),e.downloadFile=function(){if(e.licenseUrl)return t.get(e.licenseUrl).success((function(e){var t=new Blob([e],{type:"text/plain; charset=utf-8"});a.saveAs(t,"license.txt")})).error((function(){n.onError("ERROR.GET_LICENSE_FILE_FAILED")()}))}}function V(e,t,n){angular.extend(this,t("TransferModalCtrl",{$scope:e,parameters:{}})),e.enter=function(t,i){return i&&i.stateParams&&e.setParameters(i.stateParams),e.load().then(n.loading.hide)},e.$on("$ionicView.enter",e.enter),e.setForm=function(t){e.form=t},e.closeModal=function(){return e.showHome()}}function G(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){var b;e.convertedBalance=0,e.formData={destPub:null,amount:null,comment:null,useRelative:m.data.useRelative,useComment:!1,all:!1,restPub:null,restAmount:null,walletId:null},e.udAmount=null,e.minAmount=.01,e.commentPattern=s.regexp.COMMENT,e.currency=p.data.name,e.loading=!0,e.commentInputId="transferComment-"+e.$id,e.enableSelectWallet=!0,e.smallscreen=angular.isDefined(e.smallscreen)?e.smallscreen:l.screen.isSmall(),(e.smallscreen||r.enable)&&(e.digitKeyboardSettings=e.digitKeyboardSettings||r.keyboard.digit.settings.bindModel(e,"formData.amount",{decimal:!0,decimalSeparator:".",resizeContent:!1}),e.digitKeyboardVisible=!1),e.setParameters=function(t){t&&(t.pubkey&&(e.formData.destPub=t.pubkey),t.uid?(e.destUid=t.uid,e.destPub=""):(e.destUid="",e.destPub=t.pubkey),t.amount?(e.formData.amount=t.amount,e.formData.useRelative=!1):t.udAmount&&(e.formData.amount=t.udAmount,e.formData.useRelative=!0),t.comment&&(e.formData.useComment=!0,e.formData.comment=t.comment),t.restPub||t.all?(e.restUid="",e.restPub=t.restPub,e.formData.restPub=t.restPub,e.formData.all=!0):e.formData.all=!1,t.wallet&&"default"!==t.wallet?e.formData.walletId=t.wallet:e.formData.walletId=u.id)},e.setParameters(E),e.load=function(){return e.enableSelectWallet=u.children.count()>0,(b=e.enableSelectWallet&&(e.formData.walletId?u.children.get(e.formData.walletId):u)||u).isDefault()||console.debug("[transfer] Using wallet {"+b.id+"}"),b.login({sources:!0,silent:!0}).then((function(t){if(b&&!e.$$destroyed){if(e.walletData=t,e.formData.walletId=b.id,e.onUseRelativeChanged(),e.onAmountChanged(),e.$watch("walletData.balance",e.onAmountChanged,!0),e.$watch("formData.amount",e.onAmountChanged,!0),e.$watch("formData.useRelative",e.onUseRelativeChanged,!0),e.$watch("walletData.balance",e.onUseRelativeChanged,!0),l.ink({selector:".modal-transfer .ink"}),e.destPub&&!e.destUid)return d.extend({pubkey:e.destPub}).then((function(t){e.destUid=t&&(t.name||t.uid),e.destUid&&(e.destPub=""),e.loading=!1}));e.loading=!1}})).catch((function(t){if("CANCELLED"===t)return e.cancel();l.onError("ERROR.LOGIN_FAILED")(t)}))},e.$on("modal.shown",e.load),e.cancel=function(){e.closeModal(),b=null},e.onUseRelativeChanged=function(){e.currency=p.data.name,e.formData.useRelative?(e.convertedBalance=e.walletData.balance/p.data.currentUD,e.minAmount=.01/(p.data.currentUD/100)):(e.convertedBalance=e.walletData.balance/100,e.minAmount=.01),e.form&&!e.loading&&e.form.$setPristine(!0)},e.onAmountChanged=function(){if(!e.sending){var t=e.formData.amount;t&&"string"==typeof t&&(t=parseFloat(t.replace(new RegExp("[.,]"),".")));var n=!0;t&&t<e.minAmount?(n=!1,e.form.amount.$error=e.form.amount.$error||{},e.form.amount.$error.min=!0):e.form.amount&&e.form.amount.$error&&e.form.amount.$error.min&&delete e.form.amount.$error.min,t&&t>e.convertedBalance?(e.form.$valid=!1,e.form.amount.$invalid=!0,e.form.amount.$error=e.form.amount.$error||{},e.form.amount.$error={max:!0}):e.form.amount&&e.form.amount.$error&&e.form.amount.$error.max&&delete e.form.amount.$error.max,e.form.$valid=n,e.form.amount&&(e.form.amount.$invalid=!n),n&&e.formData.all&&t?e.formData.useRelative?(e.formData.restAmount=e.walletData.balance-t*p.data.currentUD,e.formData.restAmount<.01&&(e.formData.restAmount=0)):e.formData.restAmount=e.walletData.balance-100*t:e.formData.restAmount=void 0}},e.doTransfer=function(){if(e.form.$submitted=!0,e.form.$valid&&e.formData.destPub&&e.formData.amount){var n,a=e.formData.amount;if("string"==typeof a&&(a=parseFloat(a.replace(new RegExp("[.,]"),"."))),!e.sending)return e.sending=!0,t.all([b.auth({silent:!0}),p.currentUD().then((function(e){n=e})),e.hideDigitKeyboard(300)]).then(e.askTransferConfirm).then((function(t){if(t)return l.loading.show().then((function(){e.formData.useRelative?a*=n:a=100*a.toFixed(2);var t=e.formData.comment&&e.formData.comment.trim();return t&&!t.length&&(t=null),e.formData.all&&e.formData.restAmount>0?b.transferAll(e.formData.destPub,a,t,e.formData.useRelative,e.formData.restPub):b.transfer(e.formData.destPub,a,t,e.formData.useRelative)})).then((function(){return l.loading.hide(),e.closeModal(!0)})).then((function(t){return i((function(){e.sending=!1,l.toast.show("INFO.TRANSFER_SENT")}),500),t}));e.sending=!1})).catch((function(t){e.sending=!1,"CANCELLED"!==t&&l.onError("ERROR.SEND_TX_FAILED")(t)}))}},e.askTransferConfirm=function(){return n(["COMMON.UD","COMMON.EMPTY_PARENTHESIS"]).then((function(t){var i=e.formData.all&&e.formData.restAmount>0;return n(i?"CONFIRM.TRANSFER_ALL":"CONFIRM.TRANSFER",{from:e.walletData.isMember?e.walletData.uid:a("formatPubkey")(e.walletData.pubkey),to:e.destUid||e.destPub,amount:e.formData.amount,unit:e.formData.useRelative?t["COMMON.UD"]:a("abbreviate")(e.currency),comment:e.formData.comment&&0!==e.formData.comment.trim().length?e.formData.comment:t["COMMON.EMPTY_PARENTHESIS"],restAmount:i&&a("formatAmount")(e.formData.restAmount,{useRelative:e.formData.useRelative}),restTo:i&&(e.restUid||e.restPub)})})).then(l.alert.confirm)},e.addComment=function(){e.formData.useComment=!0},e.showWotLookupModal=function(t){return t=t||"destPub",e.hideDigitKeyboard(0),c.showWotLookup({enableWallets:!0}).then((function(n){n&&("destPub"===t?(e.destUid=n.uid,e.destPub=n.uid?"":n.pubkey,e.formData.destPub=n.pubkey):"restPub"===t&&(e.restUid=n.uid,e.restPub=n.uid?"":n.pubkey,e.formData.restPub=n.pubkey))}))},e.showSelectWalletModal=function(){if(e.enableSelectWallet)return c.showSelectWallet({useRelative:e.formData.useRelative,showDefault:!0,showBalance:!0}).then((function(t){!t||b&&b.id===t.id||(b=t,e.walletData=b.data,console.debug("[transfer] Using wallet {"+b.id+"}"),e.onAmountChanged())}))},e.showUnitPopover=function(t){l.popover.show(t,{templateUrl:"templates/wallet/popover_unit.html",scope:e}).then((function(t){e.formData.useRelative=t}))},e.showDigitKeyboard=function(){if(e.digitKeyboardSettings&&!e.digitKeyboardVisible)return r.enable?(r.keyboard.close(),i((function(){e.digitKeyboardVisible=!0}),200)):(e.digitKeyboardVisible=!0,t.when())},e.hideDigitKeyboard=function(n){return e.digitKeyboardVisible?(e.digitKeyboardVisible=!1,i((function(){}),n||200)):t.when()}}function Y(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b){e.formData=angular.copy(E.data),e.popupData={},e.loading=!0,e.nodePopup={},e.bma=u,e.keepAuthIdleLabels={10:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.SECONDS",labelParams:{value:10}},30:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.SECONDS",labelParams:{value:30}},60:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.MINUTE",labelParams:{value:1}},600:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.MINUTES",labelParams:{value:10}},3600:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.HOUR",labelParams:{value:1}},9999:{labelKey:"SETTINGS.KEEP_AUTH_OPTION.ALWAYS"}},e.keepAuthIdles=_.keys(e.keepAuthIdleLabels),e.blockValidityWindowLabels={0:{labelKey:"SETTINGS.BLOCK_VALIDITY_OPTION.NONE"},6:{labelKey:"SETTINGS.BLOCK_VALIDITY_OPTION.N",labelParams:{count:6,time:void 0}},12:{labelKey:"SETTINGS.BLOCK_VALIDITY_OPTION.N",labelParams:{count:12,time:void 0}},24:{labelKey:"SETTINGS.BLOCK_VALIDITY_OPTION.N",labelParams:{count:24,time:void 0}}},e.blockValidityWindows=_.keys(e.blockValidityWindowLabels),e.$on("$ionicView.enter",(function(){t.all([E.ready(),m.parameters().catch((function(e){})).then((function(t){var n=t&&t.avgGenTime;(!n||n<0)&&(console.warn("[settings] Could not not currency parameters. Using default G1 'avgGenTime' (300s)"),n=300),_.each(e.blockValidityWindows,(function(t){t>0&&(e.blockValidityWindowLabels[t].labelParams.time=n*t)}))}))]).then(e.load)})),e.setPopupForm=function(t){e.popupForm=t},e.load=function(){return e.loading=!0,e.locales=angular.copy(E.locales),angular.merge(e.formData,E.data),e.formData.locale=E.data.locale&&E.data.locale.id&&_.findWhere(e.locales,{id:E.data.locale.id})||_.findWhere(e.locales,{id:E.defaultSettings.locale.id}),o((function(){e.loading=!1,l.ink({selector:".item"}),e.showHelpTip()}),100)},e.reset=function(){e.actionsPopover&&e.actionsPopover.hide(),e.pendingSaving=!0,E.reset().then(b.restart).then((function(){e.load(),e.pendingSaving=!1}))},e.changeLanguage=function(e){r.use(e)},e.changeNode=function(t){var n=e.formData.node.port&&80!=e.formData.node.port&&443!=e.formData.node.port?e.formData.node.port:void 0;t=t||{host:e.formData.node.host,port:n,useSsl:angular.isDefined(e.formData.node.useSsl)?e.formData.node.useSsl:443==e.formData.node.port},e.showNodePopup(t).then((function(t){(t.host!==e.formData.node.host||t.port!==e.formData.node.port||t.useSsl!==e.formData.node.useSsl||e.formData.node.temporary)&&(l.loading.show(),u.isAlive(t).then((function(n){return n?(l.loading.hide(),angular.merge(e.formData.node,t),delete e.formData.node.temporary,u.stop(),u.copy(t),e.bma=u,b.restart(),i.clearCache()):(l.loading.hide(),l.alert.error("ERROR.INVALID_NODE_SUMMARY").then((function(){e.changeNode(t)})))})))}))},e.showNodeList=function(){var t=!!("true"===p.httpsMode||!0===p.httpsMode||"force"===p.httpsMode||n.location&&"https:"===n.location.protocol);return a._popupStack[0].responseDeferred.promise.close(),c.showNetworkLookup({enableFilter:!0,bma:!0,ssl:!!t||void 0}).then((function(e){if(e){var t=e.getBMA();return{host:t.dns?t.dns:e.hasValid4(t)?t.ipv4:t.ipv6,port:t.port||80,useSsl:t.useSsl||443==t.port}}})).then((function(t){e.changeNode(t)}))},e.showNodePopup=function(n){return t((function(t,i){e.popupData.newNode=n.port?[n.host,n.port].join(":"):n.host,e.popupData.useSsl=n.useSsl,e.popupForm&&e.popupForm.$setPristine(),r(["SETTINGS.POPUP_PEER.TITLE","COMMON.BTN_OK","COMMON.BTN_CANCEL"]).then((function(n){a.show({templateUrl:"templates/settings/popup_node.html",title:n["SETTINGS.POPUP_PEER.TITLE"],scope:e,buttons:[{text:n["COMMON.BTN_CANCEL"]},{text:n["COMMON.BTN_OK"],type:"button-positive",onTap:function(t){if(e.popupForm.$submitted=!0,e.popupForm.$valid&&e.popupForm.newNode)return{server:e.popupData.newNode,useSsl:e.popupData.useSsl};t.preventDefault()}}]}).then((function(e){if(e){var n=e.server.split(":");n[1]=n[1]?n[1]:80,t({host:n[0],port:n[1],useSsl:e.useSsl})}else l.loading.hide()}))}))}))},e.save=function(){return e.loading||e.pendingSaving?t.when():e.saving?(e.pendingSaving=!0,o((function(){return e.pendingSaving=!1,e.save()}),500)):(e.saving=!0,o((function(){return e.cleanupHelpTip(),E.apply(e.formData),E.store()
-}),100).then((function(){e.saving=!1})))},e.onDataChanged=function(n,i,a){return e.loading||e.pendingSaving?t.when():e.saving?(e.pendingSaving=!0,o((function(){return e.pendingSaving=!1,e.onDataChanged(n,i,a)}),500)):void(a!==e||angular.equals(n,i)||e.save())},e.$watch("formData",e.onDataChanged,!0),E.api.data.on.changed(e,(function(t){e.loading||e.saving||e.pendingSaving||!angular.equals(t.useLocalStorageEncryption,e.formData.useLocalStorageEncryption)&&(console.debug("[settings] Settings changed (outside the settings page). Reloading..."),e.load())})),e.getServer=function(){return e.formData.node&&e.formData.node.host?d.getServer(e.formData.node.host,e.formData.node.port):""},e.cleanupHelpTip=function(){if(e.formData.helptip.enable!==E.data.helptip.enable){var t=e.formData.helptip.enable;e.formData.helptip=angular.merge({},E.defaultSettings.helptip),e.formData.helptip.enable=t}},e.showActionsPopover=function(t){l.popover.show(t,{templateUrl:"templates/settings/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.startSettingsTour=function(){return e.hideActionsPopover(),e.showHelpTip(0,!0)},e.showHelpTip=function(t,n){if((e.isLogin()||n)&&!((t=angular.isDefined(t)?t:E.data.helptip.settings)<0)){0===t&&(t=1);var i=e.createHelptipScope(n);if(i)return i.startSettingsTour(t,!1).then((function(e){i.$destroy(),E.data.helptip.settings=e,E.store()}))}}}function j(e,n,i,a,o,r,s,l,c,u,d){e.search={result:[],total:0,loading:!0,loadingMore:!1,hasMore:!1,type:"last"},e.node={},e.currency=!1,e.entered=!1,e.searchTextId=null,e.ionItemClass="item-border-large",e.defaultSizeLimit=s.screen.isSmall()?50:100,e.helptipPrefix="helptip-network",e.listeners=[],e.enter=function(t,n){if(e.entered)e.addListeners();else{if(n&&n.stateParams&&n.stateParams.q&&(e.search.text=n.stateParams.q,e.search.text&&e.search.text.trim().length&&(e.search.type="text")),n&&n.stateParams&&n.stateParams.server){var i="true"==n.stateParams.ssl,a="true"==n.stateParams.tor,o={server:n.stateParams.server,host:n.stateParams.server,useSsl:i,useTor:a},r=n.stateParams.server.split(":");if(2===r.length&&(o.host=r[0],o.port=r[1]),!l.node.same(o))return e.node=a?l.instance(o.host+".to",443,!0,6e5):l.instance(o.host,o.port,o.useSsl),e.node.blockchain.parameters().then((function(t){e.currency=t.currency,e.enter()}));e.node=l}if(!e.currency)return c.get().then((function(t){e.currency=t?t.name:null,e.node=t.node?t.node:l,e.currency?e.enter():s.alert.error("ERROR.GET_CURRENCY_FAILED")})).catch(s.onError("ERROR.GET_CURRENCY_FAILED"));e.compactMode=!angular.isDefined(e.compactMode)||e.compactMode,e.expertMode=angular.isDefined(e.expertMode)?e.expertMode:!s.screen.isSmall()&&d.data.expertMode,e.doSearch(),e.addListeners(),e.entered=!0,e.showHelpTip()}},e.$on("$ionicParentView.enter",e.enter),e.leave=function(){e.removeListeners()},e.$on("$ionicParentView.leave",e.leave),e.$on("$destroy",e.leave),e.doSearchLast=function(){return e.search.type="last",e.doSearch()},e.doSearch=function(n){var i;if(n=angular.isDefined(n)?n:0,e.search.loading=0===n,e.search.hasMore=!1,0===n)i=e.node.blockchain.current(!1).then((function(t){var n=t.number<e.defaultSizeLimit?t.number:e.defaultSizeLimit;return e.node.blockchain.blocksSlice({count:n,from:t.number-n}).then((function(e){return e&&e.splice(0,0,t),e}))})).catch((function(e){if(e&&e.ucode==l.errorCodes.NO_CURRENT_BLOCK)return[];throw e}));else{var a=e.search.results[e.search.results.length-1].number,o=a<e.defaultSizeLimit?a:e.defaultSizeLimit;i=e.node.blockchain.blocksSlice({count:o,from:a-o})}return i.then((function(i){if(!i||!i.length)return e.doDisplayResult([],n,0),void(e.search.loading=!1);i=i.reduce((function(e,n){var i=new t(n);return i.cleanData(),e.concat(i)}),[]),i=_.sortBy(i,(function(e){return-1*e.number}));var a=(0===n?i[0].number:e.search.results[0].number)+1;return e.doPrepareResult(i,n).then((function(){e.doDisplayResult(i,n,a),e.search.loading=!1}))})).catch((function(t){s.onError("BLOCKCHAIN.ERROR.SEARCH_BLOCKS_FAILED")(t),e.search.loading=!1}))};var p=a("formatDateShort");e.doPrepareResult=function(t,n){if(n=angular.isDefined(n)?n:0,"last"==e.search.type){var i;if(n>0&&e.search.results.length){var a=e.search.results[e.search.results.length-1];i=a.empty?a.day:void 0}_.forEach(t,(function(e,t){if(e.empty){var a=p(e.medianTime),o=0!==t||0!==n,r=!i||i==a;e.compacted=o&&r,i=a}else i=void 0}))}return u.extendAll(t,"issuer")},e.doDisplayResult=function(t,n,i){e.search.results=n?e.search.results.concat(t):t||[],e.search.hasMore=i&&e.search.results.length<i,e.search.total=i||e.search.total,e.smallscreen=s.screen.isSmall(),e.$broadcast("$$rebind::rebind"),t&&t.length&&e.motion.show({selector:".list-blocks .item-block"})},e.showMore=function(){var t=e.search.results?e.search.results.length:0;return e.search.loadingMore=!0,e.doSearch(t).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")})).catch((function(t){console.error(t),e.search.loadingMore=!1,e.search.hasMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.removeListeners=function(){e.listeners.length&&(console.debug("[block] Closing listeners"),_.forEach(e.listeners,(function(e){e()})),e.listeners=[])},e.addListeners=function(){e.listeners.length||(console.debug("[block] Starting listeners"),e.node===l?e.listeners=[c.api.data.on.newBlock(e,e.onBlock)]:e.listeners=[e.node.websocket.block().onListener((function(n){if(n){var i=new t(n);i.cleanData(),e.onBlock(i)}}))])},e.onBlock=function(t){if(!(e.search.loading||"last"!==e.search.type||e.search.sort&&"desc"!==e.search.sort))if(e.search.results=e.search.results||[],e.search.results.length){var n=_.findWhere(e.search.results,{number:t.number});n?n.hash!==t.hash&&(console.debug("[blockchain] block #{0} updated (by websocket)".format(t.number)),angular.copy(t,n),e.doPrepareResult([t,e.search.results[1]]).then((function(){return e.showBlock(n)}))):(console.debug("[blockchain] new block #{0} received (by websocket)".format(t.number)),e.search.total++,e.search.results.splice(0,0,t),e.doPrepareResult([t,e.search.results[1]]).then((function(){return e.showBlock(t)})))}else console.debug("[blockchain] new block #{0} received (by websocket)".format(t.number)),e.search.total++,e.search.results.push(t),e.doPrepareResult([t]).then((function(){return e.showBlock(t)}))},e.showBlock=function(t){e.$broadcast("$$rebind::rebind"),e.motion.show({selector:"#block-"+t.number})},e.selectBlock=function(t){t.compacted&&e.compactMode?(e.toggleCompactMode(),n((function(){r("block-"+t.number)}),900)):l.node.same(e.node)?o.go("app.view_block_hash",{number:t.number,hash:t.hash}):o.go("app.view_server_block_hash",{server:e.node.server,ssl:e.node.useSsl,number:t.number,hash:t.hash})},e.toggleCompactMode=function(){if(e.compactMode=!e.compactMode,e.doDisplayResult(e.search.results,0,e.search.total),!e.search.hasMore&&e.search.results.length&&"last"==e.search.type){var t=e.search.results[e.search.results.length-1];t&&t.number>0&&n((function(){e.search.hasMore=!0}),500)}},e.toggleSort=function(t){e.search.sort!==t||e.search.asc?(e.search.asc=e.search.sort!==t||!e.search.asc,e.search.sort=t):(e.search.asc=void 0,e.search.sort=void 0),e.doSearch()},e.showHelpTip=function(){}}function K(e,n,i,a,o,r,s){e.loading=!0,e.formData={},e.compactMode=!0,e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!a.screen.isSmall()||t.enableBack})),e.enter=function(t,n){if(e.loading){if(n&&(e.number=n.stateParams&&angular.isDefined(n.stateParams.number)?n.stateParams.number:"current",e.hash=n.stateParams&&n.stateParams.hash?n.stateParams.hash:void 0,n.stateParams&&n.stateParams.server)){var i="true"==n.stateParams.ssl,s="true"==n.stateParams.tor,l={server:n.stateParams.server,host:n.stateParams.server,useSsl:i,useTor:s},c=n.stateParams.server.split(":");if(2==c.length&&(l.host=c[0],l.port=c[1]),!o.node.same(l))return e.node=s?o.instance(l.host+".to",443,!0,6e5):o.instance(l.host,l.port,l.useSsl),e.node.blockchain.parameters().then((function(t){e.currency=t.currency,e.enter()}));e.node=o}e.currency&&e.node?e.load():r.get().then((function(t){t&&(e.currency=t.name,e.node=t.node,e.load())})).catch(a.onError("ERROR.GET_CURRENCY_FAILED"))}},e.$on("$ionicView.enter",e.enter),e.leave=function(){},e.$on("$ionicParentView.beforeLeave",e.leave),e.load=function(){if(e.number)return("current"==e.number?e.node.blockchain.current():e.node.blockchain.block({block:e.number})).then((function(n){var i=new t(n);if(i.parseData(),!i||!angular.isDefined(i.number)||!i.hash)return e.loading=!1,void a.alert.error("ERROR.GET_BLOCK_FAILED");if(e.hash&&i.hash!=e.hash)return e.loading=!1,void a.alert.error("ERROR.INVALID_BLOCK_HASH");var r=[];i.joiners.length&&(r=r.concat(i.joiners)),i.certifications.length&&(r=i.certifications.reduce((function(e,t){return t.to={pubkey:t.to},t.from={pubkey:t.from},e.concat(t.to,t.from)}),r),i.certifications=_.groupBy(i.certifications,(function(e){return e.to.pubkey}))),i.transactions.length&&(r=i.transactions.reduce((function(e,t){return t.issuers=t.issuers.reduce((function(e,t){return e.concat({pubkey:t})}),[]),_.forEach(t.outputs||[],(function(e){e.unlockCondition&&angular.merge(e,o.tx.parseUnlockCondition(e.unlockCondition))})),e.concat(t.issuers.concat(t.outputs||[]))}),r));var l={pubkey:i.issuer};return r.push(l),s.extendAll(r).then((function(){e.updateView({block:i,issuer:l})}))})).catch((function(t){e.loading=!1,a.onError("ERROR.GET_BLOCK_FAILED")(t)}))},e.updateView=function(t){e.formData=t.block,e.issuer=t.issuer,e.loading=!1},e.toggleCompactMode=function(){e.compactMode=!e.compactMode},e.toUnlockUIArray=function(t,n,i){return n=n||10,!t.children||"AND"!=t.type&&"OR"!=t.type?{style:{"padding-left":n+"px"},operator:i,type:t.type,value:t.value}:t.children.reduce((function(i,a,o){return a.children&&o>0?(i=i.concat({style:{"padding-left":n+"px","padding-top":"10px","padding-bottom":"10px"},operator:t.type})).concat(e.toUnlockUIArray(a,n+10)):i.concat(e.toUnlockUIArray(a,n+10,o&&t.type))}),[])},e.showUnlockConditionPopover=function(t,n){t.unlockTree&&(e.popoverData=e.popoverData||{},e.popoverData.unlockConditions=e.toUnlockUIArray(t.unlockTree),a.popover.show(n,{templateUrl:"templates/blockchain/unlock_condition_popover.html",scope:e,autoremove:!0,afterShow:function(t){e.unlockConditionPopover=t}}))},e.hideUnlockConditionsPopover=function(){e.unlockConditionPopover&&(e.unlockConditionPopover.hide(),e.unlockConditionPopover=null)},e.goState=function(t,n){e.hideUnlockConditionsPopover(),i.go(t,n)},e.openRawBlock=function(t){return e.openLink(t,e.node.url+"/blockchain/block/"+e.formData.number)},e.showHelpTip=function(e){}}function $(e,t){var n,i,a={user:"EVENT.USER.",page:"EVENT.PAGE."},o=this;if(e=e||{},o.id=e.id||""+Date.now(),o.type=e.type&&e.type.toLowerCase(),o.time=e.time,o.hash=e.hash,o.read=!!e.read_signature,o.message=e.code&&(e.reference&&a[e.reference.index]?a[e.reference.index]+e.code:"EVENT."+e.code)||e.message,o.params=e.params,t&&"function"==typeof t&&(o.markAsReadCallback=t),o.markAsRead=function(){o.markAsReadCallback&&o.markAsReadCallback(o)},e.code=e.code||"",e.code.startsWith("MEMBER_"))o.avatarIcon="ion-person",o.icon="ion-information-circled positive",o.state="app.view_wallet",o.medianTime=o.time;else if(e.code.startsWith("TX_"))o.avatarIcon="ion-card",o.icon="TX_SENT"===e.code?"ion-paper-airplane dark":"ion-archive balanced",o.medianTime=o.time,(n=e.params.length>0?e.params[0]:null)&&-1==n.indexOf(",")&&(o.pubkey=n),o.state="app.view_wallet_tx",o.stateParams={refresh:!0};else if(e.code.startsWith("CERT_"))o.avatarIcon="CERT_RECEIVED"===e.code?"ion-ribbon-b":"ion-ribbon-a",o.icon="CERT_RECEIVED"===e.code?"ion-ribbon-b balanced":"ion-ribbon-a gray",o.pubkey=e.params.length>0?e.params[0]:null,o.medianTime=o.time,o.state="app.wallet_cert",o.stateParams={type:"CERT_RECEIVED"===e.code?"received":"given"};else if(e.code.startsWith("MESSAGE_"))o.avatarIcon="ion-email",o.icon="ion-email dark",(n=e.params.length>0?e.params[0]:null)&&-1===n.indexOf(",")&&(o.pubkey=n),o.id=e.reference.id;else if(e.reference&&"user"===e.reference.index&&"profile"===e.reference.type)if(o.pubkey=e.params.length>0?e.params[0]:null,o.state="app.wot_identity",o.stateParams={pubkey:o.pubkey,uid:e.params&&e.params[3]},e.code.startsWith("LIKE_"))o.avatarIcon="ion-person",o.icon="ion-ios-heart positive";else if(e.code.startsWith("STAR_"))o.avatarIcon="ion-person",o.icon="ion-star gray";else if(e.code.startsWith("FOLLOW_"))o.avatarIcon="ion-person",o.icon="ion-ios-people gray";else if(e.code.startsWith("ABUSE_"))o.avatarIcon="ion-person",o.icon="ion-android-warning assertive";else if(e.code.startsWith("MODERATION_")){o.state="app.wot_identity",o.stateParams={pubkey:e.reference.id,uid:e.params&&e.params[3]},o.avatarIcon="ion-alert-circled",o.icon="ion-alert-circled energized";var r=e.params&&e.params[4]||0;"MODERATION_RECEIVED"===e.code&&5==r&&(o.message="EVENT.USER.DELETION_RECEIVED",o.icon="ion-trash-a assertive")}else o.icon="ion-person dark";else e.reference&&"page"===e.reference.index?(o.pubkey=e.params.length>0?e.params[0]:null,o.avatarIcon="ion-social-buffer",e.reference.anchor?(o.icon="ion-ios-chatbubble-outline dark",o.state="app.view_page_anchor",o.stateParams={id:e.reference.id,title:e.params[1],anchor:(i=e.reference.anchor,i?i.substr(0,4)+i.substr(i.length-4):"")}):(o.icon="ion-social-buffer dark",o.state="app.view_page",o.stateParams={id:e.reference.id,title:e.params[1]}),e.code.startsWith("LIKE_")?o.icon="ion-ios-heart positive":e.code.startsWith("FOLLOW_")?o.avatarIcon="ion-person":e.code.startsWith("ABUSE_")?o.icon="ion-alert-circled energized":e.code.startsWith("MODERATION_")&&(o.avatarIcon="ion-alert-circled",o.icon="ion-alert-circled energized","MODERATION_RECEIVED"===e.code&&5==r&&(o.message="EVENT.PAGE.DELETION_RECEIVED",o.icon="ion-trash-a assertive"))):"INFO"===e.type?(o.avatarIcon="ion-information",o.icon="ion-information-circled positive"):"WARN"===e.type?(o.avatarIcon="ion-alert-circled",o.icon="ion-alert-circled energized"):"ERROR"===e.type&&(o.avatarIcon="ion-close",o.icon="ion-close-circled assertive");return o}function z(e,t){var n=this;n.id=e,n.message=null,n.html=null,n.issuer=null,n.time=null,n.creationTime=null,n.reply_to=null,n.replyCount=0,n.parent=null,n.replies=[],n.onRemoveListeners=[],n.copy=function(e){n.message=e.message,n.html=e.html,n.issuer=e.issuer,n.time=e.time,n.creationTime=e.creationTime||n.time,n.id=e.id||n.id,n.reply_to=e.reply_to||n.reply_to,n.uid=e.uid||n.uid,n.name=e.name||n.name,n.avatarStyle=e.avatarStyle||n.avatarStyle,e.parent&&(n.parent=e.parent),e.replies&&n.setReplies(e.replies)},n.copyFromJson=function(e){n.message=e.message,n.issuer=e.issuer,n.time=e.time,n.creationTime=e.creationTime||n.time,n.reply_to=e.reply_to},n.addOnRemoveListener=function(e){e&&"function"==typeof e&&n.onRemoveListeners.push(e)},n.cleanAllListeners=function(){n.onRemoveListeners=[]},n.setReplies=function(e){n.removeAllReplies(),n.addReplies(e)},n.addReplies=function(e){e&&e.length&&(e=e.sort((function(e,t){return e.time-t.time})),_.forEach(e,(function(e){e.parent=n,n.replies.push(e)})),n.replyCount+=e.length)},n.containsReply=function(e){return-1!=n.replies.indexOf(e)},n.addReply=function(e){n.replyCount+=1,n.replies.push(e),n.replies=n.replies.sort((function(e,t){return e.time-t.time})),e.parent=n},n.removeAllReplies=function(){if(n.replyCount){var e=n.replies.splice(0,n.replies.length);n.replyCount=0,_.forEach(e,(function(e){e.remove()}))}},n.removeReply=function(e){var t=_.findIndex(n.replies,{id:e});-1!=t&&(n.replyCount--,delete n.replies.splice(t,1)[0].parent)},n.remove=function(){n.parent&&(n.parent.removeReply(n.id),delete n.parent),n.onRemoveListeners.length&&(_.forEach(n.onRemoveListeners,(function(e){e(n)})),n.issuer=null,n.message=null,n.cleanAllListeners())},t&&"object"==typeof t&&n.copyFromJson(t)}function q(e){if(e=e||{},this.type=e.type&&e.type.toLowerCase(),this.time=e.time,this.id=e.id,"certification"==this.type){if(this.comment=e.comment,this.icon="ion-ribbon-a",this.okText="WOT.BTN_CERTIFY",!e.content||-1==e.content.indexOf("-"))return console.error("[invitation] Empty content for invitation [{0}]".format(this.id)),this.message="INVITATION.ERROR.BAD_INVITATION_FORMAT",void(this.pubkey=e.issuer);var t=e.content.lastIndexOf("-");if(-1==t)return console.error("[invitation] Bad content format for invitation [{0}]: {1}".format(this.id,e.content)),this.message="INVITATION.ERROR.BAD_INVITATION_FORMAT",void(this.pubkey=e.issuer);var n={uid:e.content.substr(0,t),pubkey:e.content.substr(t+1)};this.state="app.wot_identity",this.stateParams={pubkey:n.pubkey,uid:n.uid,action:"certify"},n.pubkey==e.issuer?(this.pubkey=e.issuer,this.uid=n.uid,this.message="INVITATION.ASK_CERTIFICATION"):(this.issuer={pubkey:e.issuer},this.message="INVITATION.SUGGESTION_CERTIFICATION",this.pubkey=n.pubkey,this.uid=n.uid)}}function X(e){var t=this;Object.keys(e).forEach((function(n){t[n]=e[n]})),t.endpoints=t.endpoints||[]}function Q(e,t,n,i){e.selectNewPicture=function(t){if(i.enable)e.openPicturePopup();else{var n=angular.element(document.querySelector(t||"#pictureFile"));n&&n.length>0&&n[0].click()}},e.openPicturePopup=function(){i.camera.getPicture().then((function(t){e.pictures.push({src:"data:image/png;base64,"+t,isnew:!0})})).catch(t.onError("ERROR.TAKE_PICTURE_FAILED"))},e.fileChanged=function(n){if(n.target.files&&n.target.files.length){t.loading.show();var i=n.target.files[0];return t.image.resizeFile(i).then((function(i){e.pictures.push({src:i,isnew:!0}),n.target.value="",t.loading.hide(100)})).catch((function(e){console.error(e),n.target.value="",t.loading.hide()}))}},e.removePicture=function(t){e.pictures.splice(t,1)},e.favoritePicture=function(t){if(t>0){var n=e.pictures[t];e.pictures.splice(t,1),e.pictures.splice(0,0,n)}},e.rotatePicture=function(n){var i=e.pictures[n];t.image.rotateSrc(i.src).then((function(e){i.src=e}))}}function J(e,t,n,i){e.loading=!0,e.allCategories=[],e.categories=[],this.searchText="",this.title=i&&i.title,e.afterLoad=function(i){e.categories=i,e.allCategories=i,e.loading=!1,n((function(){t.ink()}),10)},this.doSearch=function(){var t=this.searchText.toLowerCase().trim();t.length>1?(e.loading=!0,e.categories=e.allCategories.reduce((function(e,n){return n.parent&&-1!=n.name.toLowerCase().search(t)?e.concat(n):e}),[]),e.loading=!1):e.categories=e.allCategories},i&&i.categories?e.afterLoad(i.categories):i&&i.load&&i.load().then((function(t){e.afterLoad(t)}))}function Z(e,t,n,i,a,o,r){e.loading=!0,e.defaultCommentSize=5,e.formData={},e.comments={},e.$on("$recordView.enter",(function(t,n){e.loading?e.anchor=n&&n.stateParams.anchor:!e.loading&&e.id&&e.load(e.id,{animate:!1})})),e.$on("$recordView.load",(function(t,n,i){e.id=n||e.id,e.service=i||e.service,console.debug("[ES] [comment] Will use {"+i.index+"} service"),e.id&&e.load(e.id).then((function(){e.scrollToAnchor()}))})),e.load=function(t,n){return(n=n||{}).from=n.from||0,n.size=n.size||e.anchor&&-1,n.size=n.size||e.defaultCommentSize,n.animate=!angular.isDefined(n.animate)||n.animate,n.loadAvatarAllParent=!angular.isDefined(n.loadAvatarAllParent)||n.loadAvatarAllParent,e.loading=!0,e.service.load(t,n).then((function(i){!n.animate&&i.result.length&&_.forEach(i.result,(function(e){e.isnew=!0})),e.comments=i,e.comments.hasMore=i.total>i.result.length,e.loading=!1,e.service.changes.start(t,i,e),e.motion.show({selector:".comments .item",ink:!1})}))},e.$on("$recordView.beforeLeave",(function(){if(e.comments){if(!e.service)return void console.error("[comment] Comment controller has no service ! Unable to listen changes...");e.service.changes.stop(e.comments)}})),e.scrollToAnchor=function(){if(e.anchor){var t=document.getElementsByName(e.anchor);if(!t||!t.length)return a(e.scrollToAnchor,500);for(var n=0;n<t.length-1;n++)angular.element(t[n]).remove();o(e.anchor),a((function(){e.anchor=null}),1500)}},e.showMore=function(){e.load(e.id,{from:0,size:-1,loadAvatarAllParent:!1}).then((function(){e.motion.show({selector:".card-avatar"})}))},e.onKeypress=function(t){t&&10==t.charCode&&t.ctrlKey&&(e.save(),t.preventDefault())},e.save=function(){e.formData.message&&e.formData.message.length&&e.loadWallet({minData:!0,auth:!0}).then((function(){r.loading.hide();var t=e.formData;return e.formData={},e.focusNewComment(),e.service.save(e.id,e.comments,t)})).then((function(){e.comments.total++})).catch(r.onError("COMMENTS.ERROR.FAILED_SAVE_COMMENT"))},e.share=function(i,a){var o,s=angular.copy(n.params);s.anchor?(s.anchor=t("formatHash")(a.id),o=n.href(n.current.name,s,{absolute:!0})):o=n.href(n.current.name,s,{absolute:!0})+"/"+t("formatHash")(a.id);var l=_.findIndex(e.comments.result,{id:a.id}),c=o+"?u="+(a.uid||t("formatPubkey")(a.issuer));r.popover.show(i,{templateUrl:"templates/common/popover_share.html",scope:e,bindings:{titleKey:"COMMENTS.POPOVER_SHARE_TITLE",titleValues:{number:l?l+1:1},date:a.creationTime,value:c,postUrl:o,postMessage:a.message},autoselect:".popover-share input"})},e.edit=function(t){var n=new z;n.copy(t),e.formData=n},e.remove=function(t){t&&(t.remove(),e.comments.total--)},e.reply=function(t){t&&t.id&&(e.formData={parent:t},e.focusNewComment(!0))},e.cancel=function(){e.formData={},e.focusNewComment()},e.focusNewComment=function(e){r.screen.isSmall()?e&&i("comment-form-input"):i("comment-form-textarea")},e.removeParentLink=function(){delete e.formData.parent,delete e.formData.reply_to,e.focusNewComment()},e.toggleExpandedReplies=function(e,t){e.expandedReplies=e.expandedReplies||{},e.expandedReplies[t]=!e.expandedReplies[t]},e.toggleExpandedParent=function(e,t){e.expandedParent=e.expandedParent||{},e.expandedParent[t]=!e.expandedParent[t]}}function ee(e,t,n,i,a){e.socialData={url:null,reorder:!1},e.addSocialNetwork=function(){if(e.socialData.url&&0!==e.socialData.url.trim().length){e.formData.socials=e.formData.socials||[];var o=e.socialData.url.trim();if(_.findWhere(e.formData.socials,{url:o}))e.socialData.url="";else{var r=a.get(o);if(!r)return i.alert.error("PROFILE.ERROR.INVALID_SOCIAL_NETWORK_FORMAT"),void t("socialUrl");e.formData.socials.push(r),e.socialData.url="",e.motion.show({selector:"#social-"+n("formatSlug")(r.url),startVelocity:1e4})}}},e.editSocialNetwork=function(n){var i=e.formData.socials[n];e.formData.socials.splice(n,1),e.socialData.url=i.url,t("socialUrl")},e.reorderSocialNetwork=function(t,n,i){t&&n!=i&&(e.formData.socials.splice(n,1),e.formData.socials.splice(i,0,t))},e.filterFn=function(e){return!e.recipient||e.valid}}function te(e){e.openSocial=function(t,n){return e.openLink(t,n.url,{type:n.type})},e.filterFn=function(e){return!e.recipient||e.valid}}function ne(e){e.formData={initCrop:!1,imageCropStep:0,imgSrc:void 0,result:void 0,resultBlob:void 0},e.openFileSelector=function(){var e=angular.element(document.querySelector(".modal-avatar #fileInput"));e&&e.length>0&&e[0].click()},e.fileChanged=function(t){var n=t.target.files,i=new FileReader;i.readAsDataURL(n[0]),i.onload=function(t){var n=this.result;e.$applyAsync((function(){e.formData.imgSrc=n}))}},e.doNext=function(){2==e.formData.imageCropStep?e.doCrop():3==e.formData.imageCropStep&&e.closeModal(e.formData.result)},e.doCrop=function(){e.formData.initCrop=!0},e.clear=function(){e.formData={initCrop:!1,imageCropStep:1,imgSrc:void 0,result:void 0,resultBlob:void 0}}}function ie(e,t,n,i){var a=t.plugins&&t.plugins.es&&t.plugins.es.defaultCountry,o=!1;e.formPosition={loading:!1,enable:void 0},e.searchModalOpened=!1,e.tryToLocalize=function(){if(!e.formPosition.loading&&!o){var t=e.getAddressToSearch();return t?(e.formPosition.loading=!0,n.point.searchByAddress(t).then((function(n){return n&&1==n.length?e.updateGeoPoint(n[0]):e.openSearchLocationModal({text:t,results:n||[],forceFallback:!n||!n.length})})).then((function(){e.formPosition.loading=!1})).catch((function(t){console.error(t),e.formPosition.loading=!1}))):(o=!0,n.point.current().then(e.updateGeoPoint).then((function(){o=!1})).catch((function(e){console.error(e),o=!1})))}},e.onCityChanged=function(){if(!e.loading)return e.formPosition.enable?(e.formData.geoPoint&&(e.formData.geoPoint.lat=void 0,e.formData.geoPoint.lon=void 0),e.tryToLocalize()):void 0},e.onUseGeopointChanged=function(){e.loading||(e.formPosition.enable?e.tryToLocalize():e.formData.geoPoint&&(e.formData.geoPoint.lat=void 0,e.formData.geoPoint.lon=void 0,e.dirty=!0))},e.onGeopointChanged=function(){e.loading&&(e.formPosition.enable=e.formData.geoPoint&&!!e.formData.geoPoint.lat&&!!e.formData.geoPoint.lon)},e.$watch("formData.geoPoint",e.onGeopointChanged),e.getAddressToSearch=function(){return e.formData.address&&e.formData.city?[e.formData.address.trim(),e.formData.city.trim()].join(", "):e.formData.city||e.formData.address||e.formData.location},e.updateGeoPoint=function(t){if(t&&t.lat&&t.lon&&(e.dirty=!0,e.formData.geoPoint=e.formData.geoPoint||{},e.formData.geoPoint.lat=parseFloat(t.lat),e.formData.geoPoint.lon=parseFloat(t.lon),t.address&&t.address.city)){var n=[t.address.city];t.address.postcode&&n.push(t.address.postcode),t.address.country!=a&&n.push(t.address.country),e.formData.city=n.join(", ")}},e.openSearchLocationModal=function(t){if(!e.searchModalOpened){e.searchModalOpened=!0;var n={text:(t=t||{}).text||e.getAddressToSearch(),results:t.results,fallbackText:t.fallbackText||e.formData.city,forceFallback:angular.isDefined(t.forceFallback)?t.forceFallback:void 0};return i.show("plugins/es/templates/common/modal_location.html","ESSearchPositionModalCtrl",n,{focusFirstInput:!0}).then((function(t){e.searchModalOpened=!1,e.updateGeoPoint(t)})).catch((function(){console.error(err),e.searchModalOpened=!1}))}}}function ae(e,t,n,i,a){var o=n.plugins&&n.plugins.es&&n.plugins.es.defaultCountry,r=!1;e.geoDistanceLabels=[5,10,20,50,100,250,500].reduce((function(e,t){return e[t]={labelKey:"LOCATION.DISTANCE_OPTION",labelParams:{value:t}},e}),{}),e.geoDistances=_.keys(e.geoDistanceLabels),e.searchPosition=function(n){if(r)return t.when();r=!0;var a=n?i.point.searchByAddress(n).then((function(t){return t&&1==t.length?(t[0].exact=!0,t[0]):e.openSearchLocationModal({text:n,results:t||[],forceFallback:!t||!t.length}).then((function(e){if(e&&e.address&&e.address.city){var t=[e.address.city];e.address.postcode&&t.push(e.address.postcode),e.address.country!=o&&t.push(e.address.country),e.shortName=t.join(", ")}return e}))})):i.point.current();return a.then((function(e){if(r=!1,e&&e.lat&&e.lon)return{lat:parseFloat(e.lat),lon:parseFloat(e.lon),name:e.shortName,exact:e.exact}})).catch((function(e){console.error(e),r=!1})),a},e.openSearchLocationModal=function(t){var n={text:(t=t||{}).text||e.getAddressToSearch(),results:t.results,fallbackText:t.fallbackText||e.search.location,forceFallback:angular.isDefined(t.forceFallback)?t.forceFallback:void 0};return a.show("plugins/es/templates/common/modal_location.html","ESSearchPositionModalCtrl",n,{focusFirstInput:!0})}}function oe(e,t,n,i,a){var o=i.plugins&&i.plugins.es&&i.plugins.es.defaultCountry,r=!1;e.locations=void 0,e.selectLocationIndex=-1,e.onKeydown=function(t){switch(t.keyCode){case 27:e.hideDropdown();break;case 13:e.locations&&e.locations.length&&e.onEnter();break;case 38:e.onArrowUpOrDown(-1),t.preventDefault();break;case 40:e.onArrowUpOrDown(1),t.preventDefault();break;case 8:case 45:case 46:break;case 37:case 39:case 16:case 17:case 35:case 36:break;default:e.showDropdown()}},e.onEnter=function(){e.selectLocationIndex>-1?e.selectLocation(e.locations[e.selectLocationIndex]):e.selectLocation(e.locations[0])},e.onArrowUpOrDown=function(t){e.locations&&(e.selectLocationIndex+=t,e.selectLocationIndex>=e.locations.length&&(e.selectLocationIndex=0),e.selectLocationIndex<0&&(e.selectLocationIndex=e.locations.length-1),_.forEach(e.locations||[],(function(t,n){t.selected=n==e.selectLocationIndex})))},e.onLocationChanged=function(){r||e.search.loading||(e.search.geoPoint=void 0,e.showDropdown())},e.showDropdown=function(){var t=e.search.location&&e.search.location.trim();if(!t||t.length<3)return e.hideDropdown(!0);var n=e.requestId&&e.requestId+1||1;return e.requestId=n,r=!0,a.point.searchByAddress(t).then((function(t){e.requestId==n&&(r=!1,e.locations=t||[],e.license=t&&t.length&&t[0].license)})).catch((function(t){throw e.hideDropdown(),t}))},e.hideDropdown=function(n){return n?(e.locations=void 0,e.selectLocationIndex=-1,e.license=void 0,void(r=!1)):t((function(){r||(e.locations=void 0,e.license=void 0,r=!1)}),500)},e.selectLocation=function(t,n){if(r=!0,t)if(e.search.geoPoint=e.search.geoPoint||{},e.search.geoPoint.lat=parseFloat(t.lat),e.search.geoPoint.lon=parseFloat(t.lon),n)e.search.geoPoint.exact=!0;else if(t&&t.address&&t.address.city){var i=[t.address.city];t.address.postcode&&i.push(t.address.postcode),t.address.country!=o&&i.push(t.address.country),e.search.location=i.join(", ")}e.hideDropdown(!0)},e.openSearchLocationModal=function(t){var i={text:(t=t||{text:e.search.location}).text||e.search.location};return n.show("plugins/es/templates/common/modal_location.html","ESSearchPositionModalCtrl",i,{focusFirstInput:!0}).then(e.selectLocation)}}function re(e,t,n,i,a){e.search={text:a.text||"",fallbackText:a.fallbackText||void 0,forceFallback:!!angular.isDefined(a.forceFallback)&&a.forceFallback,loading:!1,results:a.results||void 0},e.$on("modal.shown",(function(){e.doSearch(!0)})),e.doSearch=function(a){var o=e.search.text&&e.search.text.trim();if(!o)return t.when();e.search.loading=!0;var r=a&&e.search.fallbackText&&e.search.fallbackText.trim();return r=r&&r!=o?r:void 0,(a&&e.search.forceFallback&&e.search.results?t.when(e.search.results):i.point.searchByAddress(o)).then((function(e){return e&&e.length||!r?e:t.all([n("LOCATION.MODAL.ALTERNATIVE_RESULT_DIVIDER",{address:r}),i.point.searchByAddress(r)]).then((function(e){var t=e[0];return(e=e[1])&&e.length?[{name:t}].concat(e):e}))})).then((function(t){e.search.loading=!1,e.search.results=t||[],e.license=t&&t.length&&t[0].license})).catch((function(t){throw e.search.loading=!1,e.search.results=[],e.license=void 0,t}))}}function se(e,t,n){e.extensionPoint=n.extensions.points.current.get(),e.enable=t.isEnable(),t.api.state.on.changed(e,(function(t){e.enable=t,e.$broadcast("$$rebind::state")}))}function le(e,t,n,i,a){angular.extend(this,n("ESExtensionCtrl",{$scope:e})),e.showRegistryLookupView=function(){t.go(i.screen.isSmall()?"app.wot_lookup.tab_registry":"app.registry_lookup_lg")},e.showNotificationsPopover=function(t){return i.popover.show(t,{templateUrl:"plugins/es/templates/notification/popover_notification.html",scope:e,autoremove:!1,afterShow:function(e){var t=a.api.data.on.unauth(e.scope,(function(){e.scope.closePopover(),t()}))}})},e.showMessagesPopover=function(t){return a.isAuth()?i.popover.show(t,{templateUrl:"plugins/es/templates/message/popover_message.html",scope:e,autoremove:!1,afterShow:function(e){var t=a.api.data.on.unauth(e.scope,(function(){e.scope.closePopover(),t()}))}}):a.auth({minData:!0}).then((function(){return i.loading.hide(),e.showMessagesPopover(t)}))},e.showInvitationsPopover=function(t){return a.isAuth()?i.popover.show(t,{templateUrl:"plugins/es/templates/invitation/popover_invitation.html",scope:e,autoremove:!1,afterShow:function(e){var t=a.api.data.on.unauth(e.scope,(function(){e.scope.closePopover(),t()}))}}):a.auth().then((function(){return i.loading.hide(),e.showInvitationsPopover(t)}))}}function ce(e,t,n,i,a){e.updateView=function(){e.enable=a.isLogin()&&i.isEnable()},e.showEditUserProfile=function(){e.closeProfilePopover(),n.go("app.edit_profile")},i.api.state.on.changed(e,e.updateView),a.api.data.on.login(e,(function(n,a){return e.enable=i.isEnable(),a&&a.resolve()||t.when()})),a.api.data.on.logout(e,(function(){e.enable=!1})),e.updateView()}function ue(e,t,n,i,a,o,r,s,l,c,u,d,p){e.hasWindowNotification=!!("Notification"in window),e.formData={},e.popupData={},e.loading=!0,e.enter=function(t,n){e.load()},e.$on("$ionicView.enter",e.enter),e.load=function(t){e.loading=!0;var n=e.formData.enable;e.formData=c.data.plugins&&c.data.plugins.es?angular.copy(c.data.plugins.es):{enable:!1,host:void 0,port:void 0},t&&n&&(e.formData.enable=n),e.isFallbackNode=e.formData.enable&&u.node.isFallback(),e.server=e.getServer(u),e.loading=!1},d.api.state.on.changed(e,(function(t){e.load(!0)})),e.setPopupForm=function(t){e.popupForm=t},e.changeEsNode=function(t){t=t||{host:e.formData.host,port:e.formData.port&&80!=e.formData.port&&443!=e.formData.port?e.formData.port:void 0,useSsl:angular.isDefined(e.formData.useSsl)?e.formData.useSsl:443==e.formData.port},e.showNodePopup(t).then((function(t){if(t.host!==e.formData.host||t.port!=e.formData.port||t.useSsl!=e.formData.useSsl){o.loading.show();var n=u.instance(t.host,t.port,t.useSsl);return n.isAlive().then((function(i){return i?(e.formData.host=n.host,e.formData.port=n.port,e.formData.useSsl=n.useSsl,u.copy(n)):(o.loading.hide(),o.alert.error("ERROR.INVALID_NODE_SUMMARY").then((function(){e.changeEsNode(t)})))})).then((function(){e.server=e.getServer(u),e.isFallbackNode=!1,o.loading.hide()}))}o.loading.hide()}))},e.showNodePopup=function(t){return n((function(n,r){var s=[t.host];t.port&&80!=t.port&&s.push(t.port),e.popupData.newNode=s.join(":"),e.popupData.useSsl=angular.isDefined(t.useSsl)?t.useSsl:443==t.port,e.popupForm&&e.popupForm.$setPristine(),i(["ES_SETTINGS.POPUP_PEER.TITLE","ES_SETTINGS.POPUP_PEER.HELP","COMMON.BTN_OK","COMMON.BTN_CANCEL"]).then((function(t){a.show({templateUrl:"templates/settings/popup_node.html",title:t["ES_SETTINGS.POPUP_PEER.TITLE"],subTitle:t["ES_SETTINGS.POPUP_PEER.HELP"],scope:e,buttons:[{text:t["COMMON.BTN_CANCEL"]},{text:t["COMMON.BTN_OK"],type:"button-positive",onTap:function(t){if(e.popupForm.$submitted=!0,e.popupForm.$valid&&e.popupForm.newNode)return{server:e.popupData.newNode,useSsl:e.popupData.useSsl};t.preventDefault()}}]}).then((function(e){if(e){var t=e.server.split(":");t[1]=t[1]?t[1]:e.useSsl?443:80,n({host:t[0],port:t[1],useSsl:e.useSsl})}else o.loading.hide()}))}))}))},e.showNodeList=function(){var n=!!("true"===l.httpsMode||!0===l.httpsMode||"force"===l.httpsMode||t.location&&"https:"===t.location.protocol);return a._popupStack[0].responseDeferred.promise.close(),p.showNetworkLookup({enableFilter:!0,endpoint:u.constants.ES_USER_API_ENDPOINT,ssl:!!n||void 0}).then((function(e){if(e){var t=(e.getEsEndpoints()||[]).reduce((function(e,t){var n=u.node.parseEndPoint(t);return n?e.concat(n):e}),[]);if(t.length){var n=t[0];return{host:n.dns?n.dns:e.hasValid4(n)?n.ipv4:n.ipv6,port:n.port||80,useSsl:n.useSsl||443==n.port}}}})).then((function(t){e.changeEsNode(t)}))},e.onFormChanged=function(){e.loading||(e.hasWindowNotification&&e.formData.notifications.emitHtml5!==("granted"===window.Notification.permission)?window.Notification.requestPermission((function(t){e.formData.notifications.emitHtml5="granted"===t,e.onFormChanged()})):(e.loading=!0,c.data.plugins=c.data.plugins||{},c.data.plugins.es=c.data.plugins.es?angular.merge(c.data.plugins.es,e.formData):e.formData,delete c.data.plugins.es.newNode,c.store().then((function(){e.loading=!1}))))},e.$watch("formData",e.onFormChanged,!0),e.getServer=function(t){if((t=t||e.formData).host)return s.getServer(t.host,t.port)}}function de(e,t,n,i,a){angular.extend(this,t("ESExtensionCtrl",{$scope:e})),e.showProfileHelp=!1,e.showNewPageModal=function(e){var t=n.params&&n.params.id?i.children.get(n.params.id):i;if(t)return a.showNewPage({wallet:t});UIUtils.alert.error("ERROR.UNKNOWN_WALLET_ID")}}function pe(e,t,n,i,a){e.options=e.options||{},e.options.like=e.options.like||{index:"user",type:"profile",service:a.like},e.canEdit=!0,angular.extend(this,t("ESLikesCtrl",{$scope:e})),angular.extend(this,t("ESExtensionCtrl",{$scope:e})),e.$watch("formData.pubkey",(function(t){t&&e.loadLikes(t)}))}function me(e,t,n){angular.extend(this,t("ESExtensionCtrl",{$scope:e})),e.openRegistryLookup=function(){var t=e.search.text&&e.search.text.trim()||"",i=e.search.location&&e.search.location.trim()||"",a={q:t.length?t:void 0,location:i.length?i:void 0};n.go("app.wot_lookup.tab_registry",a)}}function Ee(e,t,n,i,a,o,r,s,l,c,u,d,p,m){e.options=e.options||{},e.options.like=e.options.like||{kinds:c.constants.KINDS,index:"user",type:"profile",service:p.like},e.smallscreen=angular.isDefined(e.smallscreen)?e.smallscreen:o.screen.isSmall(),angular.extend(this,i("ESLikesCtrl",{$scope:e})),angular.extend(this,i("ESExtensionCtrl",{$scope:e})),e.canCertify=!1,e.showNewMessageModal=function(t){return s.login({minData:!0,method:"default"}).then((function(){return o.loading.hide(),!(!t&&!e.formData.profile)||o.alert.confirm("MESSAGE.CONFIRM.USER_HAS_NO_PROFILE").then((function(e){if(e)return!0}))})).then((function(t){return!!t&&u.showMessageCompose({destPub:e.formData.pubkey,destUid:e.formData.name||e.formData.uid}).then((function(e){e&&o.toast.show("MESSAGE.INFO.MESSAGE_SENT")}))}))},e.showSuggestCertificationModal=function(){var t;return e.hideCertificationActionsPopover(),s.auth({minData:!0}).then((function(i){if(o.loading.hide(),i)return i.isMember?r.showWotLookup({allowMultiple:!0,enableFilter:!0,title:"WOT.SUGGEST_CERTIFICATIONS_MODAL.TITLE",help:"WOT.SUGGEST_CERTIFICATIONS_MODAL.HELP",okText:"COMMON.BTN_NEXT",okType:"button-positive"}).then((function(a){if(a&&a.length)return t=a,n.all([d.box.getKeypair(i.keypair),o.alert.confirm("WOT.CONFIRM.SUGGEST_CERTIFICATIONS",void 0,{okText:"COMMON.BTN_SEND"})]).then((function(a){if(a){var o=a[0];if(a[1]){var r=moment().utc().unix();return n.all(t.reduce((function(t,n){return t.concat(m.send({issuer:i.pubkey,recipient:e.formData.pubkey,time:r,content:[n.uid,n.pubkey].join("-")},o,"certification"))}),[]))}}})).then((function(){o.toast.show("INVITATION.INFO.INVITATION_SENT")})).catch(o.onError("INVITATION.ERROR.SEND_INVITATION_FAILED"))})):o.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")}))},e.showAskCertificationModal=function(){var t;return e.hideCertificationActionsPopover(),(s.children.count()?r.showSelectWallet({displayBalance:!1}):n.when(s)).then((function(e){if(!e)throw"CANCELLED";return e.auth({minData:!0})})).then((function(e){if(o.loading.hide(),e)return e.isMember?r.showWotLookup({allowMultiple:!0,enableFilter:!1,title:"WOT.ASK_CERTIFICATIONS_MODAL.TITLE",help:"WOT.ASK_CERTIFICATIONS_MODAL.HELP",okText:"COMMON.BTN_NEXT",okType:"button-positive"}).then((function(i){if(i&&i.length)return t=i,n.all([d.box.getKeypair(e.keypair),o.alert.confirm("WOT.CONFIRM.ASK_CERTIFICATIONS",void 0,{okText:"COMMON.BTN_SEND"})]).then((function(i){var a=i&&i[0],r=i&&i[1];if(a&&r){var s=moment().utc().unix();return n.all(t.reduce((function(t,n){return t.concat(m.send({issuer:e.pubkey,recipient:n.pubkey,time:s,content:[e.uid,e.pubkey].join("-")},a,"certification"))}),[])).then((function(){o.toast.show("INVITATION.INFO.INVITATION_SENT")})).catch(o.onError("INVITATION.ERROR.SEND_INVITATION_FAILED"))}}))})):o.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")}))},e.askCertification=function(){return e.hideCertificationActionsPopover(),(s.children.count()?r.showSelectWallet({displayBalance:!1}):n.when(s)).then((function(e){return e.auth({minData:!0})})).then((function(t){if(o.loading.hide(),t)return t.isMember?o.alert.confirm("WOT.CONFIRM.ASK_CERTIFICATION",void 0,{okText:"COMMON.BTN_SEND"}).then((function(n){if(n)return m.send({issuer:t.pubkey,recipient:e.formData.pubkey,content:[t.uid,t.pubkey].join("-")},{type:"certification",keypair:t.keypair}).then((function(){o.toast.show("INVITATION.INFO.INVITATION_SENT")})).catch(o.onError("INVITATION.ERROR.SEND_INVITATION_FAILED"))})):o.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")}))},e.delete=function(t){if(!t){if(e.hideActionsPopover(),!e.formData.pubkey)return;return o.alert.confirm("PROFILE.CONFIRM.DELETE_BY_MODERATOR").then((function(t){if(t)return e.delete(t)}))}return o.loading.show().then((function(){return p.remove(e.formData.pubkey)})).then((function(){return e.doUpdate()})).then((function(){return a((function(){o.toast.show("DOCUMENT.INFO.REMOVED")}),800)})).catch(o.onError("PROFILE.ERROR.DELETE_PROFILE_FAILED"))},e.$watch("formData.pubkey",(function(t){t&&(e.loadLikes(t),e.canDelete=e.formData.profile&&s.isLogin()&&!0===s.data.moderator)})),e.showCertificationActionsPopover=function(t){o.popover.show(t,{templateUrl:"plugins/es/templates/wot/popover_certification_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.certificationActionsPopover=t}})},e.hideCertificationActionsPopover=function(){return e.certificationActionsPopover&&(e.certificationActionsPopover.hide(),e.certificationActionsPopover=null),!0},e.showActionsPopover=function(t){o.popover.show(t,{templateUrl:"plugins/es/templates/wot/view_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){return e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null),!0},"buttons-top-fab"===e.extensionPoint&&e.$on("$csExtension.motion",(function(t){e.formData.profile&&e.showFab("fab-compose-"+e.formData.pubkey)}))}function be(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b,g){angular.extend(this,a("ESLookupPositionCtrl",{$scope:e})),e.search={text:"",results:[],loading:!0,lastRecords:!0,type:null,category:null,location:null,advanced:null,issuer:null,geoDistance:isNaN(p.data.plugins.es.geoDistance)?20:p.data.plugins.es.geoDistance},e.searchTextId="registrySearchText",e.enableFilter=!0,e.smallscreen=angular.isDefined(e.smallscreen)?e.smallscreen:c.screen.isSmall(),e.options=angular.merge(e.options||{},{location:{show:!0,help:"REGISTRY.SEARCH.LOCATION_HELP"}}),e.enter=function(n,i){if(!e.entered||!e.search.results||0===e.search.results.length){if(!e.geoUnit)return r("LOCATION.DISTANCE_UNIT").then((function(t){return e.geoUnit=t,e.enter(n,i)}));var a=function(){e.searchTextId&&t(e.searchTextId),e.entered=!0,e.doSearch()};if(i.stateParams&&i.stateParams.q&&"string"==typeof i.stateParams.q&&(e.search.text=i.stateParams.q),i.stateParams&&i.stateParams.hash&&(e.search.text="#"+i.stateParams.hash),i.stateParams&&i.stateParams.location)e.search.location=i.stateParams.location,i.stateParams.lat&&i.stateParams.lon&&(e.search.geoPoint={lat:parseFloat(i.stateParams.lat),lon:parseFloat(i.stateParams.lon)}),i.stateParams.d&&(e.search.geoDistance=i.stateParams.d);else{var o=p.data.plugins.es.registry&&p.data.plugins.es.registry.defaultSearch;if(o&&(o.location?angular.merge(e.search,p.data.plugins.es.registry.defaultSearch):o=void 0),!o&&m.isLogin()&&m.data.profile){if(!m.isDataLoaded())return c.loading.show(),m.loadData().then((function(){return c.loading.hide(),e.enter(n,i)}));e.search.geoPoint=m.data.profile.geoPoint,e.search.location=m.data.profile.city||(m.data.profile.geoPoint?r.instant("LOCATION.PROFILE_POSITION"):void 0)}}i.stateParams&&(i.stateParams.type||i.stateParams.last)?i.stateParams.last||"last"==i.stateParams.type?(e.search.lastRecords=!0,e.search.type=void 0):e.search.type=i.stateParams.type:e.search.lastRecords=!1,i.stateParams&&i.stateParams.issuer&&(e.search.issuer=i.stateParams.issuer),i.stateParams&&i.stateParams.category?b.category.get({id:i.stateParams.category}).then((function(t){e.search.category=t,a()})).catch(c.onError("REGISTRY.ERROR.LOAD_CATEGORY_FAILED")):a()}e.showFab("fab-add-registry-record")},e.$on("$ionicView.enter",(function(t,n){return e.enter(t,n)})),e.leave=function(){var t=!1;p.data.plugins.es.registry=p.data.plugins.es.registry||{},p.data.plugins.es.registry.defaultSearch=p.data.plugins.es.registry.defaultSearch||{};var i=e.search.location&&e.search.location.trim(),a=p.data.plugins.es.registry.defaultSearch.location;a&&a===i||(p.data.plugins.es.registry.defaultSearch={location:i,geoPoint:i&&e.search.geoPoint?angular.copy(e.search.geoPoint):void 0},t=!0);var o=p.data.plugins.es.geoDistance;o&&o===e.search.geoDistance||(p.data.plugins.es.geoDistance=e.search.geoDistance,t=!0),t&&n((function(){p.store()}))},e.$on("$ionicView.leave",(function(){return e.leave()})),e.onGeoPointChanged=function(){e.search.loading||e.search.geoPoint&&e.search.geoPoint.lat&&e.search.geoPoint.lon&&!e.search.geoPoint.exact&&(e.doSearch(),e.updateLocationHref())},e.$watch("search.geoPoint",e.onGeoPointChanged,!0),e.resolveLocationPosition=function(){if(!e.search.loadingPosition)return e.search.loadingPosition=!0,e.searchPosition(e.search.location).then((function(t){if(!t)throw e.search.loading=!1,e.search.results=void 0,e.search.total=0,e.search.loadingPosition=!1,e.search.geoPoint=void 0,"CANCELLED";e.search.geoPoint=t,t.shortName&&!t.exact&&(e.search.location=t.shortName),e.search.loadingPosition=!1}))},e.doGetLastRecords=function(t){return e.hidePopovers(),e.search.text=void 0,e.doSearch(t)},e.doSearchText=function(){e.doSearch(),l.keyboard.close()},e.doSearch=function(t){if(e.search.loading=!t,e.search.location&&e.search.location.length>=3&&!e.search.geoPoint)return e.resolveLocationPosition().then((function(){return e.doSearch(t)}));var n=e.search.text&&e.search.text.trim()||"";e.search.lastRecords=!n||!n.length;var i=[],a=[];if(n&&n.length)if(d.regexp.PUBKEY.test(n))a.push({term:{pubkey:n}});else{var o=(n=n.toLowerCase())?g.util.parseTags(n):void 0;i.push({multi_match:{query:n,fields:["title","description","city","address"],type:"phrase_prefix"}}),i.push({match:{title:{query:n,boost:2}}}),i.push({prefix:{title:n}}),i.push({match:{description:n}}),i.push({nested:{path:"category",query:{bool:{filter:{match:{"category.name":n}}}}}}),o&&o.length&&a.push({terms:{tags:o}})}else e.search.issuer&&a.push({term:{issuer:e.search.issuer}});e.search.type&&a.push({term:{type:e.search.type}}),e.search.category&&a.push({nested:{path:"category",query:{bool:{filter:{term:{"category.id":e.search.category.id}}}}}});var r=e.search.location&&e.search.location.trim().toLowerCase();if(e.search.geoPoint&&e.search.geoPoint.lat&&e.search.geoPoint.lon)if(r&&r.length){var s=r.split(",")[0];a.push({or:[{and:[{not:{exists:{field:"geoPoint"}}},{match_phrase:{city:s}}]},{geo_distance:{distance:e.search.geoDistance+e.geoUnit,geoPoint:{lat:e.search.geoPoint.lat,lon:e.search.geoPoint.lon}}}]})}else a.push({geo_distance:{distance:e.search.geoDistance+e.geoUnit,geoPoint:{lat:e.search.geoPoint.lat,lon:e.search.geoPoint.lon}}});var l={highlight:{fields:{title:{},description:{},tags:{}}},from:t};return i.length>0&&(l.query=l.query||{bool:{}},l.query.bool.should=i,l.query.bool.minimum_should_match=1),a.length>0&&(l.query=l.query||{bool:{}},l.query.bool.filter=a),e.search.lastRecords&&(l.sort={creationTime:"desc"}),e.updateLocationHref(),e.doRequest(l)},e.doRequest=function(t){(t=t||{}).from=t.from||0,t.size=t.size||10,t.size<10&&(t.size=10),e.search.loading=0===t.from;var n=e.requestId&&e.requestId+1||1;return e.requestId=n,b.record.search(t).then((function(a){if(e.requestId==n){if(!a||!a.hits||!a.hits.length)return e.search.results=t.from>0?e.search.results:[],e.search.total=t.from>0?e.search.total:0,e.search.loading=!1,void(e.search.hasMore=!1);var o=i("formatSlug");_.forEach(a.hits,(function(e){e.urlTitle=o(e.title)})),t.from?e.search.results=e.search.results.concat(a.hits):(e.search.results=a.hits,e.search.total=a.total),e.search.hasMore=e.search.results.length<a.total,e.search.loading=!1,e.motion.show({selector:".list .item",ink:!0})}})).catch((function(n){e.search.loading=!1,e.search.results=t.from>0?e.search.results:[],e.search.total=t.from>0?e.search.total:0,e.search.hasMore=!1,c.onError("REGISTRY.ERROR.LOOKUP_RECORDS_FAILED")(n)}))},e.showMore=function(){var t=e.search.results?e.search.results.length:0;return e.search.loadingMore=!0,(e.search.lastRecords?e.doGetLastRecords:e.doSearch)(t).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")})).catch((function(t){console.error(t),e.search.loadingMore=!1,e.search.hasMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.removeType=function(){e.search.type=null,e.doSearch(),e.updateLocationHref()},e.removeCategory=function(){e.search.category=null,e.category=null,e.doSearch(),e.updateLocationHref()},e.removeLocation=function(){e.search.location=null,e.search.geoPoint=null,e.doSearch(),e.updateLocationHref()},e.updateLocationHref=function(t){t||n((function(){var t=e.search.text&&e.search.text.trim(),n=e.search.location&&e.search.location.trim(),i={location:n&&n.length?n:void 0,category:e.search.category?e.search.category.id:void 0,last:!!e.search.lastRecords||void 0,type:e.search.type?e.search.type:void 0,lat:e.search.geoPoint&&e.search.geoPoint.lat||void 0,lon:e.search.geoPoint&&e.search.geoPoint.lon||void 0,d:e.search.geoPoint&&e.search.geoDistance||void 0};t&&t.match(/^#\w+$/)?i.hash=t.substr(1):t&&t.length&&(i.q=t),o.search(i).replace()}))},e.onToggleAdvanced=function(){e.search.entered&&!e.search.lastRecords&&(e.doSearch(),e.updateLocationHref())},e.$watch("search.advanced",e.onToggleAdvanced,!0),e.toggleAdvanced=function(){e.search.advanced=!e.search.advanced,n(e.hidePopovers,200)},e.showRecordTypeModal=function(t){e.hidePopovers(),n((function(){t.isDefaultPrevented()||u.show("plugins/es/templates/registry/modal_record_type.html").then((function(t){t&&(e.search.type=t,e.doSearch(),e.updateLocationHref())}))}),350)},e.showCategoryModal=function(t){n((function(){t.isDefaultPrevented()||b.category.all().then((function(e){return u.show("plugins/es/templates/common/modal_category.html","ESCategoryModalCtrl as ctrl",{categories:e},{focusFirstInput:!0})})).then((function(t){t&&t.parent&&(e.search.category=t,e.doSearch(),e.updateLocationHref())}))}),350)},e.showNewPageModal=function(){return e.hidePopovers(),E.showNewPage()},e.showActionsPopover=function(t){c.popover.show(t,{templateUrl:"plugins/es/templates/registry/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.filtersPopover=null)},e.showFiltersPopover=function(t){c.popover.show(t,{templateUrl:"plugins/es/templates/registry/lookup_popover_filters.html",scope:e,autoremove:!0,afterShow:function(t){e.filtersPopover=t}})},e.hideFiltersPopover=function(){e.filtersPopover&&(e.filtersPopover.hide(),e.filtersPopover=null)},e.hidePopovers=function(){e.hideActionsPopover(),e.hideFiltersPopover()}}function ge(e,t,n,i,a,o){var r;angular.extend(this,t("ESRegistryLookupCtrl",{$scope:e})),e.searchTextId=void 0,e.enter=function(t,a){return e.entered?a.stateParams&&a.stateParams.refresh?n(e.doSearch,2e3):void 0:(r=a.stateParams&&a.stateParams.id?o.children.get(a.stateParams.id):o)?r.login({minData:!0}).then((function(t){i.loading.hide(),e.search.issuer=t.pubkey,e.search.advanced=!0,n(e.doSearch,100),e.showFab("fab-wallet-add-registry-record")})):(i.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome())},e.doUpdate=function(){if(r&&r.isLogin())return e.search.issuer=o.data.pubkey,e.search.advanced=!0,e.doSearch()},e.showNewPageModal=function(){return e.hidePopovers(),a.showNewPage({wallet:r})}}function fe(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){e.formData={},e.id=null,e.category={},e.pictures=[],e.canEdit=!1,e.showTransfer=!1,e.loading=!0,e.motion=m.motion.fadeSlideIn,e.options=e.options||{},e.options.like={kinds:["LIKE","ABUSE"],index:"page",type:"record"},e.likeData={likes:{},abuses:{}},angular.extend(this,l("ESLikesCtrl",{$scope:e})),e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!m.screen.isSmall()||t.enableBack})),e.$on("$ionicView.enter",(function(t,i){i.stateParams&&i.stateParams.id?((e.loading||i.stateParams.refresh)&&e.load(i.stateParams.id,i.stateParams.anchor),e.$broadcast("$recordView.enter",i)):n.go("app.wot_lookup.tab_registry")})),e.$on("$ionicView.beforeLeave",(function(t,n){e.$broadcast("$recordView.beforeLeave",n)})),e.load=function(t,o){return t=t||e.id,e.loading=!0,i.all([p.record.load(t).then((function(t){e.id=t.id,e.formData=t.record,e.canEdit=d.isUserPubkey(e.formData.issuer)||d.children.hasPubkey(e.formData.issuer),e.showTransfer=!e.canEdit&&e.formData.pubkey,e.issuer=t.issuer,e.avatar=e.formData.avatar,e.avatarStyle=e.formData.avatar&&{"background-image":'url("'+e.avatar.src+'")'},m.loading.hide(),e.loading=!1,e.motion.show({selector:".list > .item, .list > ng-if > .item"})})).catch((function(a){e.secondTry?(e.loading=!1,a&&404===a.ucode?(m.toast.show("REGISTRY.ERROR.RECORD_NOT_EXISTS"),n.go("app.wot_lookup.tab_registry")):m.onError("REGISTRY.ERROR.LOAD_RECORD_FAILED")(a)):(e.secondTry=!0,i((function(){e.load(t)}),100))})),p.record.picture.all({id:t}).then((function(t){e.pictures=t._source.pictures&&t._source.pictures.reduce((function(e,t){return e.concat(E.image.fromAttachment(t.file))}),[]),e.pictures.length>0&&e.motion.show({selector:".lazy-load .item.card-gallery",startVelocity:3e3})})).catch((function(){e.pictures=[]})),a((function(){return e.$broadcast("$recordView.load",t,p.record.comment)}))]).then((function(){e.motion.show({selector:".lazy-load .item",startVelocity:3e3}),o&&a((function(){c(o)}),1e3)}))},e.edit=function(){var t=d.isUserPubkey(e.formData.issuer)?d:d.children.getByPubkey(e.formData.issuer);if(t)return m.loading.show(),n.go("app.registry_edit_record",{id:e.id,wallet:t.id})},e.delete=function(){e.hideActionsPopover();var t,i=d.isUserPubkey(e.formData.issuer)?d:d.children.getByPubkey(e.formData.issuer);i&&s(["REGISTRY.VIEW.REMOVE_CONFIRMATION","REGISTRY.INFO.RECORD_REMOVED"]).then((function(e){return t=e,m.alert.confirm(e["REGISTRY.VIEW.REMOVE_CONFIRMATION"])})).then((function(a){a&&p.record.remove(e.id,{wallet:i}).then((function(){i.data.pages&&i.data.pages.count&&i.data.pages.count--,r.nextViewOptions({historyRoot:!0}),i.isDefault()?n.go("app.wallet_pages",{refresh:!0}):n.go("app.wallet_pages_by_id",{refresh:!0,id:i.id}),m.toast.show(t["REGISTRY.INFO.RECORD_REMOVED"])})).catch(m.onError("REGISTRY.ERROR.REMOVE_RECORD_FAILED"))}))},e.showActionsPopover=function(t){m.popover.show(t,{templateUrl:"plugins/es/templates/registry/view_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){return e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null),!0},e.showSharePopover=function(i){e.hideActionsPopover();var a=e.formData.title,o=(u.shareBaseUrl||t.rootPath)+n.href("app.view_page",{title:a,id:e.id});m.screen.isSmall()&&(i=angular.element(document.querySelector("#registry-share-anchor-"+e.id))||i),m.popover.share(i,{bindings:{url:o,titleKey:"REGISTRY.VIEW.POPOVER_SHARE_TITLE",titleValues:{title:a},time:e.formData.time,postMessage:a}})}}function _e(e,t,n,i,a,o,r,s,l,c,u,d,p,m){var E;angular.extend(this,s("ESPositionEditCtrl",{$scope:e})),e.formData={title:null,description:null,socials:[],geoPoint:null},e.loading=!0,e.dirty=!1,e.walletData=null,e.id=null,e.avatar=null,e.pictures=[],e.setForm=function(t){e.form=t},e.$on("$ionicView.enter",(function(t,n){if(e.loading)return(E=n.stateParams&&n.stateParams.wallet&&"default"!=n.stateParams.wallet?d.children.get(n.stateParams.wallet):d)?E.login({minData:!0}).then((function(t){e.walletData=t,n.stateParams&&n.stateParams.id?e.load(n.stateParams.id):n.stateParams&&n.stateParams.type&&e.updateView({record:{type:n.stateParams.type}}),o("registry-record-title")})):(c.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome())})),e.$on("$stateChangeStart",(function(t,i,o,r){if(e.dirty&&!e.saving&&(t.preventDefault(),!e.loading))return e.loading=!0,c.alert.confirm("CONFIRM.SAVE_BEFORE_LEAVE","CONFIRM.SAVE_BEFORE_LEAVE_TITLE",{cancelText:"COMMON.BTN_NO",okText:"COMMON.BTN_YES_SAVE"}).then((function(t){return e.loading=!1,t?(e.form.$submitted=!0,e.save(!1,!0).then((function(t){return t&&(e.dirty=!1),t}))):(e.dirty=!1,!0)})).then((function(e){e&&(a.nextViewOptions({historyRoot:!0}),n.go(i.name,o))})).catch((function(e){}))})),e.load=function(t){e.loading=!0,m.record.load(t,{raw:!0}).then((function(t){t&&t.record?e.updateView(t):e.updateView({record:{}})})).catch((function(t){c.loading.hide(10),e.loading=!1,c.onError("REGISTRY.ERROR.LOAD_RECORD_FAILED")(t)}))},e.updateView=function(n){e.formData=n.record||{},e.id=n.id,e.avatar=e.formData.avatar,e.avatar?(e.avatarStyle=e.avatar&&{"background-image":'url("'+e.avatar.src+'")'},e.avatarClass={}):(e.avatarStyle=void 0,e.avatarClass={},e.avatarClass["cion-page-"+e.formData.type]=!e.avatar),e.pictures=n.record&&n.record.pictures||[],delete n.record.pictures,e.motion.show({selector:".animate-ripple .item, .card-gallery",startVelocity:3e3}),c.loading.hide(),t((function(){e.loading=!1}),1e3)},e.onFormDataChanged=function(){e.loading||(e.dirty=!0)},e.$watch("formData",e.onFormDataChanged,!0),e.needCategory=function(){return e.formData.type&&("company"==e.formData.type||"shop"==e.formData.type)},e.save=function(o,s){if(e.form.$submitted=!0,e.saving||!e.form.$valid||("shop"===e.formData.type||"company"===e.formData.type)&&(!e.formData.category||!e.formData.category.id))return i.reject();if(!s)return console.debug("[ES] [page] Waiting debounce end, before saving..."),t((function(){return e.save(o,!0)}),650);e.saving=!0,console.debug("[ES] [page] Saving record...");var l=i.when();return o||(l=c.loading.show()),l.then((function(){var t=e.formData;return e.needCategory()||delete t.category,t.time=moment().utc().unix(),t.geoPoint&&t.geoPoint.lat&&t.geoPoint.lon?(t.geoPoint.lat=parseFloat(t.geoPoint.lat),t.geoPoint.lon=parseFloat(t.geoPoint.lon)):t.geoPoint=null,t.socials&&t.socials.length&&(t.socials=_.uniq(t.socials,!1,(function(e){return e.url}))),t.picturesCount=e.pictures.length,t.picturesCount>0?t.pictures=e.pictures.reduce((function(e,t){return e.concat({file:p.image.toAttachment(t)})}),[]):t.pictures=[],e.avatar&&e.avatar.src?c.image.resizeSrc(e.avatar.src,!0).then((function(e){return t.avatar=p.image.toAttachment({src:e}),t})):(t.avatar={_content:"",_content_type:""},t)})).then((function(t){return e.id?m.record.update(t,{id:e.id,wallet:E}):m.record.add(t,{wallet:E})})).then((function(t){return console.info("[ES] [page] Record successfully saved."),!e.id&&E.data.pages&&E.data.pages.count&&d.data.pages.count++,e.id=e.id||t,e.saving=!1,e.dirty=!1,o||(c.loading.hide(),r("REGISTRY.INFO.RECORD_SAVED").then((function(e){c.toast.show(e)}))),a.clearCache(a.currentView().stateId),a.nextViewOptions({historyRoot:!0}),n.go("app.view_page",{id:e.id,refresh:!0})})).catch((function(t){e.saving=!1,c.onError("REGISTRY.ERROR.SAVE_RECORD_FAILED")(t)}))},e.openPicturePopup=function(){l.camera.getPicture().then((function(t){t&&e.pictures.push({src:"data:image/png;base64,"+t})})).catch(c.onError("ERROR.TAKE_PICTURE_FAILED"))},e.rotateAvatar=function(){if(e.avatar&&e.avatar.src&&!e.rotating)return e.rotating=!0,c.image.rotateSrc(e.avatar.src).then((function(t){e.avatar.src=t,e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0,e.rotating=!1})).catch((function(t){console.error(t),e.rotating=!1}))},e.fileChanged=function(t){return c.loading.show(),i((function(n,i){var a=t.target.files[0];c.image.resizeFile(a).then((function(t){e.pictures.push({src:t}),c.loading.hide(),n()}))}))},e.removePicture=function(t){e.pictures.splice(t,1)},e.favoritePicture=function(t){if(t>0){var n=e.pictures[t];e.pictures.splice(t,1),e.pictures.splice(0,0,n)}},e.cancel=function(){a.goBack()},e.showAvatarModal=function(){return l.camera.enable?l.camera.getPicture().then((function(t){t&&(e.avatar={src:"data:image/png;base64,"+t},e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0,e.avatarClass={})})).catch(c.onError("ERROR.TAKE_PICTURE_FAILED")):u.show("plugins/es/templates/common/modal_edit_avatar.html","ESAvatarModalCtrl",{}).then((function(t){t&&(e.avatar={src:t},e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0,e.avatarClass={})}))},e.showRecordTypeModal=function(){u.show("plugins/es/templates/registry/modal_record_type.html").then((function(t){t&&(e.formData.type=t,e.avatar||(e.avatarClass["cion-page-"+t]=!0))}))},e.showCategoryModal=function(t){m.category.all().then((function(e){return u.show("plugins/es/templates/common/modal_category.html","ESCategoryModalCtrl as ctrl",{categories:e},{focusFirstInput:!0})})).then((function(t){t&&t.parent&&(e.formData.category=t)}))}}function Te(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){var b;angular.extend(this,r("ESPositionEditCtrl",{$scope:e})),e.formData={title:null,description:null,socials:[],geoPoint:null},e.loading=!0,e.dirty=!1,e.walletData=null,e.avatar=null,e.existing=!1,e.socialData={url:null},e.socialReorder=!0,e.enter=function(t,n){return(b=n.stateParams&&n.stateParams.id?u.children.get(n.stateParams.id):u)?(e.walletId=b.id,b.auth({minData:!0}).then(e.load).catch((function(t){if("CANCELLED"==t)return c.loading.hide(10),void e.cancel();c.onError("PROFILE.ERROR.LOAD_PROFILE_FAILED")(t)}))):(c.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome())},e.$on("$ionicView.enter",e.enter),e.$on("$stateChangeStart",(function(t,n,a,o){if(e.dirty&&!e.saving&&(t.preventDefault(),!e.loading))return e.loading=!0,c.alert.confirm("CONFIRM.SAVE_BEFORE_LEAVE","CONFIRM.SAVE_BEFORE_LEAVE_TITLE",{cancelText:"COMMON.BTN_NO",okText:"COMMON.BTN_YES_SAVE"}).then((function(t){return e.loading=!1,t?(e.form.$submitted=!0,e.save(!1,!0).then((function(t){return t&&(e.dirty=!1),t}))):(e.dirty=!1,!0)})).then((function(e){e&&(s.nextViewOptions({historyRoot:!0}),i.go(n.name,a))})).catch((function(e){}))})),e.load=function(t){return e.loading=!0,p.get(t.pubkey,{raw:!0}).then((function(i){return i?(e.avatar=d.image.fromAttachment(i.source.avatar),e.existing=!0,e.updateView(t,i.source)):(e.avatar=void 0,e.existing=!1,e.updateView(t,{})),c.loading.hide(),n((function(){e.loading=!1}),1e3)})).then((function(){a("profile-name")})).catch(c.onError("PROFILE.ERROR.LOAD_PROFILE_FAILED"))},e.setForm=function(t){e.form=t},e.updateView=function(t,n){e.walletData=t,e.formData=n,n.avatar&&(e.avatarStyle={"background-image":'url("'+e.avatar.src+'")'}),e.motion.show()},e.onFormDataChanged=function(){e.loading||(e.dirty=!0)},e.$watch("formData",e.onFormDataChanged,!0),e.save=function(i,a){if(e.form.$invalid||!e.walletData||e.saving&&!a)return t.reject();if(!a)return e.saving=!0,n((function(){return e.save(i,!0)}),650);console.debug("[ES] [profile] Saving user profile..."),i||c.loading.show();var r=function(t){return function(n){e.saving=!1,c.onError(t)(n)}},s=function(t){t&&(e.walletData.name=t.title,e.avatar?e.walletData.avatar=e.avatar:delete e.walletData.avatar,e.walletData.profile=angular.copy(t),e.walletData.profile.descriptionHtml=d.util.parseAsHtml(t.description))},l=function(){if(!i)return c.loading.hide(),o("PROFILE.INFO.PROFILE_SAVED").then((function(e){c.toast.show(e)}))},u=function(t){return t.socials&&t.socials.length&&(t.socials=_.uniq(t.socials,!1,(function(e){return e.url}))),t.position&&(t.position=null),t.geoPoint&&t.geoPoint.lat&&t.geoPoint.lon?(t.geoPoint.lat=parseFloat(t.geoPoint.lat),t.geoPoint.lon=parseFloat(t.geoPoint.lon)):t.geoPoint=null,e.existing?p.update(t,{id:e.walletData.pubkey,wallet:b}).then((function(){return console.info("[ES] Profile successfully updated."),e.saving=!1,e.dirty=!1,s(t),l(),!0})).catch(r("PROFILE.ERROR.SAVE_PROFILE_FAILED")):p.add(t,{wallet:b}).then((function(){return console.info("[ES] [profile] Successfully created."),e.existing=!0,e.saving=!1,e.dirty=!1,s(t),l(),!0})).catch(r("PROFILE.ERROR.SAVE_PROFILE_FAILED"))};return e.avatar&&e.avatar.src?c.image.resizeSrc(e.avatar.src,!0).then((function(t){return e.formData.avatar=d.image.toAttachment({src:t}),u(e.formData)})):(delete e.formData.avatar,u(e.formData))},e.saveAndClose=function(){return e.save().then((function(t){t&&e.close()}))},e.submitAndSaveAndClose=function(){e.form.$submitted=!0,e.saveAndClose()},e.cancel=function(){return e.dirty=!1,b.isDefault()?(s.nextViewOptions({historyRoot:!0}),i.go("app.view_wallet")):i.go("app.view_wallet_by_id",{id:b.id})},e.close=function(){return b.isDefault()?(s.nextViewOptions({historyRoot:!0}),i.go("app.view_wallet",{refresh:!0})):i.go("app.view_wallet_by_id",{refresh:!0,id:b.id})},e.showAvatarModal=function(){return E.camera.enable?E.camera.getPicture().then((function(t){t&&(e.avatar={src:"data:image/png;base64,"+t},e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0)})).catch(c.onError("ERROR.TAKE_PICTURE_FAILED")):m.show("plugins/es/templates/common/modal_edit_avatar.html","ESAvatarModalCtrl",{}).then((function(t){t&&(e.avatar={src:t},e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0)}))},e.rotateAvatar=function(){if(e.avatar&&e.avatar.src&&!e.rotating)return e.rotating=!0,c.image.rotateSrc(e.avatar.src).then((function(t){e.avatar.src=t,e.avatarStyle={"background-image":'url("'+t+'")'},e.dirty=!0,e.rotating=!1})).catch((function(t){console.error(t),e.rotating=!1}))},e.removeProfile=function(){return e.hideActionsPopover(),e.existing&&b.auth({minData:!0}).then((function(t){c.loading.hide(),c.alert.confirm("PROFILE.CONFIRM.DELETE",void 0,{okText:"COMMON.BTN_DELETE"}).then((function(i){if(i)return console.debug("[ES] [profile] Deleting user profile..."),c.loading.show(),p.remove(t.pubkey,{wallet:b}).then((function(){return b.isDefault()&&(t.name=null),t.profile=null,t.avatar=null,console.debug("[ES] [profile] Successfully deleted"),e.dirty=!1,e.close()})).then((function(){return n((function(){c.toast.show("PROFILE.INFO.PROFILE_REMOVED")}),750)})).catch(c.onError("PROFILE.ERROR.REMOVE_PROFILE_FAILED"))}))}))},e.showActionsPopover=function(t){c.popover.show(t,{templateUrl:"plugins/es/templates/user/edit_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function he(e,t,n,i,a,o,r,s,l,c){var u,d=!1;e.search={loading:!0,results:[],hasMore:!1,loadingMore:!1,limit:40,type:"last",text:null,options:{}},e.fabButtonNewMessageId=void 0,e.enter=function(t,n){if(e.search.loading){if(!(u=n.stateParams&&n.stateParams.id?r.children.get(n.stateParams.id):r))return l.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome();e.isDefaultWallet=u.isDefault(),e.walletId=u.id,u.auth({minData:!0}).then((function(){e.entered||(e.entered=!0,e.type=e.type||n.stateParams&&n.stateParams.type||"inbox",e.load()),e.fabButtonNewMessageId&&e.showFab(e.fabButtonNewMessageId)})).catch((function(t){"CANCELLED"===t&&(i.nextViewOptions({historyRoot:!0}),e.showHome())}))}else e.updateView()},e.$on("$ionicView.enter",e.enter),e.load=function(t,n,i){var a=angular.copy(e.search.options);return a.from=a.from||t||0,a.size=a.size||n||40,a.type=e.type,a.summary=!1,a.filter="text"==e.search.type&&e.search.text&&e.search.text.trim().length>0?e.search.text:void 0,a.wallet=u,e.search.loading=!i,c.load(a).then((function(t){a.from?t&&(e.search.results=e.search.results.concat(t)):e.search.results=t||[],l.loading.hide(),e.search.loading=!1,e.search.hasMore=e.search.results&&e.search.results.length>=e.search.limit,e.updateView()})).catch((function(t){e.search.loading=!1,a.from||(e.search.results=[]),e.search.hasMore=!1,l.onError("MESSAGE.ERROR.LOAD_MESSAGES_FAILED")(t)}))},e.updateView=function(){e.motion&&e.motion.ionListClass&&e.search.results.length&&e.motion.show({selector:".view-messages .list .item"}),e.$broadcast("$$rebind::rebind")},e.showMore=function(){e.search.limit=e.search.limit||40,e.search.limit+=40,e.search.limit<40&&(e.search.limit=40),e.search.loadingMore=!0,e.load(e.search.results.length,e.search.limit,!0).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.markAllAsRead=function(){e.hideActionsPopover(),e.search.results&&e.search.results.length&&l.alert.confirm("MESSAGE.CONFIRM.MARK_ALL_AS_READ").then((function(t){t&&c.markAllAsRead().then((function(){_.forEach(e.search.results,(function(e){e.read=!0}))})).catch(l.onError("MESSAGE.ERROR.MARK_ALL_AS_READ_FAILED"))}))},e.delete=function(t){var n=e.search.results[t];n&&l.alert.confirm("MESSAGE.CONFIRM.REMOVE").then((function(i){i&&c.remove(n.id,e.type,{walletId:e.walletId}).then((function(){e.search.results.splice(t,1),e.updateView(),l.toast.show("MESSAGE.INFO.MESSAGE_REMOVED")})).catch(l.onError("MESSAGE.ERROR.REMOVE_MESSAGE_FAILED"))}))},e.deleteAll=function(){e.hideActionsPopover(),e.search.results&&e.search.results.length&&l.alert.confirm("MESSAGE.CONFIRM.REMOVE_ALL").then((function(t){t&&c.removeAll(e.type,{walletId:e.walletId}).then((function(){e.search.results.splice(0,e.search.results.length),e.updateView(),l.toast.show("MESSAGE.INFO.All_MESSAGE_REMOVED")})).catch(l.onError("MESSAGE.ERROR.REMOVE_All_MESSAGES_FAILED"))}))},e.doSearchLast=function(){return e.search.type="last",e.search.loadingMore=!1,e.search.limit=40,e.load()},e.doSearch=function(){if(e.search.text&&!(e.search.text.length<3))return e.search.type="text",e.search.loadingMore=!1,e.search.results=[],e.search.limit=40,console.debug("[message] [{0}] Searching for: {1}".format(e.type,e.search.text)),e.load()},e.refresh=function(t){return d=!0,e.load(void 0,void 0,t).then((function(){d=!1})).catch((function(){d=!1}))},e.select=function(n,i){if(!(i.isDefaultPrevented()||e.search.loading||d))return o((function(){if(!d&&!i.isDefaultPrevented())return i.preventDefault(),"default"===e.walletId?t.go("app.user_view_message",{type:e.type,messageId:n.id}):t.go("app.user_view_message_by_id",{type:e.type,messageId:n.id,id:e.walletId})}),200)},e.showNewMessageModal=function(t){return u.login({minData:!0}).then((function(){return l.loading.hide(),(t=t||{}).wallet=e.walletId,s.showMessageCompose(t).then((function(e){e&&l.toast.show("MESSAGE.INFO.MESSAGE_SENT")}))}))},e.showReplyModal=function(t){var i=e.search.results[t];i&&n("MESSAGE.REPLY_TITLE_PREFIX").then((function(t){var n=i.content?i.content.replace(/^/g," > "):null;return n=(n=n?n.replace(/\n/g,"\n > "):null)?n+"\n":null,s.showMessageCompose({destPub:i.issuer,destUid:i.name||i.uid,title:t+i.title,content:n,isReply:!0,wallet:e.walletId})})).then((function(e){e&&l.toast.show("MESSAGE.INFO.MESSAGE_SENT")}))},e.showActionsPopover=function(t){l.popover.show(t,{templateUrl:"plugins/es/templates/message/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.onMessageDelete=function(t){var n=_.findIndex(e.search.results,(function(e){return e.id==t}));n&&e.search.results.splice(n,1),e.updateView()},c.api.data.on.delete(e,e.onMessageDelete),e.onNewOutboxMessage=function(t){if("outbox"===e.type)return e.search.loading=!0,o((function(){return c.get(t,e.type,{summary:!0,wallet:u})}),500).then((function(t){e.search.results.splice(0,0,t),e.search.loading=!1,e.updateView()})).catch((function(){e.loading=!1}))},c.api.data.on.sent(e,e.onNewOutboxMessage),e.onNewInboxMessage=function(t){if("inbox"===e.type&&e.entered&&u.isUserPubkey(t.issuer))return e.search.loading=!0,c.get(t.id,e.type,{summary:!0,wallet:u}).then((function(t){e.search.results.splice(0,0,t),e.search.loading=!1,e.updateView()})).catch((function(){e.search.loading=!1}))},c.api.data.on.new(e,e.onNewInboxMessage),e.onUnauth=function(){e.search.results=void 0,e.search.loading=!1,e.entered=!1},r.api.data.on.unauth(e,e.onUnauth)}function ve(e,t){angular.extend(this,t("ESMessageAbstractListCtrl",{$scope:e})),e.type="inbox",e.fabButtonNewMessageId="fab-add-message-record-inbox"}function Ie(e,t){angular.extend(this,t("ESMessageAbstractListCtrl",{$scope:e})),e.type="outbox",e.fabButtonNewMessageId="fab-add-message-record-outbox"}function Oe(e,t){angular.extend(this,t("ESMessageComposeModalCtrl",{$scope:e,parameters:{}})),e.enter=function(t,n){return n&&n.stateParams&&e.setParameters(n.stateParams),e.load().then(UIUtils.loading.hide)},e.$on("$ionicView.enter",e.enter),e.cancel=function(){e.sending=!1,e.showHome()},e.setForm=function(t){e.form=t},e.closeModal=function(){e.sending=!1,e.showHome()}}function Ne(e,t,n,i,a,o,r){var s;e.formData={title:null,content:null,destPub:null,walletId:null},e.destUid=null,e.destPub=null,e.isReply=!1,e.enableSelectWallet=!0,e.sending=!1,e.setParameters=function(t){t&&((t.pubkey||t.destPub)&&(e.formData.destPub=t.pubkey||t.destPub,t.uid||t.destUid?(e.destUid=t.uid||t.destUid,e.destPub=""):(e.destUid="",e.destPub=e.formData.destPub)),t.title&&(e.formData.title=t.title),t.content&&(e.formData.content=t.content),e.isReply=t.isReply||!1,t.wallet&&(e.formData.walletId=t.wallet))},e.setParameters(r),e.load=function(){return e.enableSelectWallet=i.children.count()>0,(s=e.enableSelectWallet&&(e.formData.walletId?i.children.get(e.formData.walletId):i)||i).isDefault()?console.debug("[message] Using default wallet"):console.debug("[message] Using {"+s.id+"} wallet"),s.login({minData:!0,silent:!0}).then((function(t){e.walletData=t})).catch((function(t){"CANCELLED"===t&&e.cancel()}))},e.$on("modal.shown",e.load),e.doSend=function(t){if(e.form.$submitted=!0,e.form.$valid){if(!(t||e.formData.content&&e.formData.content.trim().length))return n.alert.confirm("MESSAGE.COMPOSE.CONTENT_CONFIRMATION").then((function(t){t&&e.doSend(!0)}));e.sending=!0,n.loading.show();var i={issuer:s.data.pubkey,recipient:e.formData.destPub,title:e.formData.title,content:e.formData.content,time:moment().utc().unix()};o.send(i,{wallet:s}).then((function(t){e.id=t,n.loading.hide(),e.closeModal(t)})).catch((function(t){e.sending=!1,"CANCELLED"!==t?n.onError("MESSAGE.ERROR.SEND_MSG_FAILED")(t):n.loading.hide()}))}},e.cancel=function(){e.closeModal()},e.showWotLookupModal=function(){t.showWotLookup().then((function(t){t&&(t.uid?(e.destUid=t.uid,e.destPub=""):(e.destUid="",e.destPub=t.pubkey),e.destName=t.name||t.uid,e.formData.destPub=t.pubkey)}))},e.showSelectWalletModal=function(){if(e.enableSelectWallet)return t.showSelectWallet({showDefault:!0,showBalance:!1}).then((function(t){!t||s&&s.id===t.id||(s=t,e.walletData=s.data,console.debug("[message] Using {"+s.id+"} wallet"))}))}}function Re(e,t,n,i,a,o,r,s,l,c){var u;e.formData={},e.id=null,e.loading=!0,e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!r.screen.isSmall()||t.enableBack})),e.enter=function(t,i){if(e.loading){if(!(u=i.stateParams&&i.stateParams.id?c.children.get(i.stateParams.id):c))return r.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome();e.isDefaultWallet=u.isDefault(),e.walletId=u.id;var a=i.stateParams&&i.stateParams.messageId;if(e.type=i.stateParams.type||"inbox",angular.isUndefined(a))return void e.goBack();u.auth({minData:!0}).then((function(){return e.load(a,e.type)})).then((function(t){r.loading.hide(),t&&(e.updateView(t),e.showFab("fab-view-message-reply"),t.read||n((function(){e.id===t.id&&l.markAsRead(t,{type:e.type,wallet:u}).then((function(){console.debug("[message] marked as read")})).catch(r.onError("MESSAGE.ERROR.MARK_AS_READ_FAILED"))}),2e3))}))}},e.$on("$ionicView.enter",e.enter),e.load=function(t,n){return n=n||"inbox",l.get(t,n,{wallet:u}).catch(r.onError("MESSAGE.ERROR.LOAD_MESSAGE_FAILED")).then((function(t){return t.valid?t:r.alert.error(e.isUserPubkey(t.recipient)?"MESSAGE.ERROR.NOT_AUTHENTICATED_MESSAGE":"MESSAGE.ERROR.USER_NOT_RECIPIENT","MESSAGE.ERROR.MESSAGE_NOT_READABLE").then((function(){e.goBack(!0)}))}))},e.updateView=function(t){e.loading=!1,e.id=t.id,e.formData=t,e.canDelete=!0,e.motion.show({selector:".view-message .list .item"})},e.delete=function(){e.actionsPopover&&e.actionsPopover.hide(),r.alert.confirm("MESSAGE.CONFIRM.REMOVE").then((function(t){if(t)return l.remove(e.id,e.type,{wallet:u}).then((function(){e.goBack(!0),r.toast.show("MESSAGE.INFO.MESSAGE_REMOVED")})).catch(r.onError("MESSAGE.ERROR.REMOVE_MESSAGE_FAILED"))}))},e.goBack=function(n){n&&a.clearCache(a.currentView().stateId),a.nextViewOptions({historyRoot:!0}),e.isDefaultWallet?e.type&&t.go("app.user_message.tab_"+e.type,{type:e.type}):e.type&&t.go("app.user_messages_by_id.tab_"+e.type,{type:e.type,id:e.walletId})},e.showActionsPopover=function(t){r.popover.show(t,{templateUrl:"plugins/es/templates/message/view_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.showReplyModal=function(){var t="inbox"===e.type?"issuer":"recipient";i("MESSAGE.REPLY_TITLE_PREFIX").then((function(n){var i=e.formData.content?e.formData.content.replace(/^/g," > "):null;return i=(i=i?i.replace(/\n/g,"\n > "):null)?i+"\n":null,s.showMessageCompose({destPub:e.formData[t],destUid:e.formData.name||e.formData.uid,title:n+e.formData.title,content:i,isReply:!0,walletId:u.id})})).then((function(e){e&&r.toast.show("MESSAGE.INFO.MESSAGE_SENT").then((function(){a.goBack()}))}))}}function Ae(e,t,n,i,a,o,r,s){var l;e.search={loading:!0,results:null,hasMore:!1,loadingMore:!1,limit:40},e.$on("popover.shown",(function(){e.search.loading&&((l=e.walletId&&i.children.get(e.walletId)||i).isDefault()&&(l.api.data.on.logout(e,e.resetData),o.api.data.on.new(e,e.onNewMessageNotification)),e.load())})),e.load=function(n,i){var a={};return a.from=n||0,a.size=i||40,o.notifications.load(a).then((function(t){e.search.results=n?e.search.results.concat(t):t,e.search.loading=!1,e.search.hasMore=e.search.results&&e.search.results.length>=e.search.limit,e.updateView()})).catch((function(i){e.search.loading=!1,n||(e.search.results=[]),e.search.hasMore=!1,t.onError("MESSAGE.ERROR.LOAD_NOTIFICATIONS_FAILED")(i)}))},e.updateView=function(){e.motion&&e.search.results&&e.search.results.length&&e.motion.show({selector:".popover-notification .item"})},e.showMore=function(){e.search.limit=e.search.limit||40,e.search.limit=2*e.search.limit,e.search.limit<40&&(e.search.limit=40),e.search.loadingMore=!0,e.load(e.search.results.length,e.search.limit).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.onNewMessageNotification=function(t){e.search.loading||e.search.loadingMore||l.isUserPubkey(t.issuer)&&(e.search.results.splice(0,0,t),e.updateView())},e.select=function(t){t.read||(t.read=!0),"default"===e.walletId?n.go("app.user_view_message",{messageId:t.id}):n.go("app.user_view_message_by_id",{messageId:t.id,id:e.walletId}),e.closePopover(t)},e.resetData=function(){e.search.loading||(console.debug("[ES] [messages] Resetting data (settings or account may have changed)"),e.search.hasMore=!1,e.search.results=[],e.search.loading=!0,delete e.search.limit)},e.showNewMessageModal=function(n){e.closePopover(),s((function(){(n=n||{}).walletId=l.id,r.showMessageCompose(n).then((function(e){e&&t.toast.show("MESSAGE.INFO.MESSAGE_SENT")}))}),500)},a.api.node.on.stop(e,e.resetData),a.api.node.on.start(e,e.load)}function Se(e,t,n,i,a,o,r,s){var l;e.preventSelect=!1,e.search={loading:!0,results:null,hasMore:!1,loadingMore:!1,limit:40,options:{codes:{excludes:s.constants.EXCLUDED_CODES}}},e.listeners=[],e.setWallet=function(e){l=e},e.$on("$ionicView.enter",(function(t,n){if(e.search.loading){if(!(l=n.stateParams&&n.stateParams.id?r.children.get(n.stateParams.id):r))return a.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome();l.login({minData:!0}).then((function(){return e.load(),a.loading.hide(),e.addListeners(),i((function(){e.resetUnreadCount()}),1e3)}))}})),e.refresh=function(t){return e.load(void 0,void 0,t)},e.load=function(t,n,i){if((l=l||r).data.pubkey){e.search.preventSelect=!0;var o=angular.copy(e.search.options);return o.from=o.from||t||0,o.size=o.size||n||40,o.pubkey=l.data.pubkey,e.search.loading=!i,s.load(o).then((function(t){o.from?t&&(e.search.results=e.search.results.concat(t)):e.search.results=t||[],e.search.loading=!1,e.search.preventSelect=!1,e.search.hasMore=e.search.results.length>=e.search.limit,e.updateView()})).catch((function(t){e.search.loading=!1,o.from||(e.search.results=[]),e.search.preventSelect=!1,e.search.hasMore=!1,a.onError("COMMON.NOTIFICATIONS.LOAD_NOTIFICATIONS_FAILED")(t)}))}e.search.loading=!0},e.updateView=function(){e.motion&&e.motion.ionListClass&&e.search.results.length&&e.motion.show({selector:".view-notification .item"})},e.markAllAsRead=function(){if(e.hideActionsPopover(),!l.isAuth())return l.auth().then((function(){return a.loading.hide(),e.markAllAsRead()}));e.search.results.length&&a.loading.show().then((function(){l.data.notifications.unreadCount=0;var t=e.search.results[0];return l.data.notifications.time=t?t.time:0,_.forEach(e.search.results,(function(e){e.markAsRead&&"function"==typeof e.markAsRead&&e.markAsRead()})),a.loading.hide()}))},e.resetUnreadCount=function(){if(e.search.loading||!l.data.notifications)return i(e.resetUnreadCount,2e3);if(l.data.notifications.unreadCount&&e.search.results&&e.search.results.length){l.data.notifications.unreadCount=0;var t=e.search.results[0],n=t.time?t.time:0;!n||l.data.notifications.time&&l.data.notifications.time==n||(l.data.notifications.time=n,l.storeData())}},e.select=function(t,a){e.search.loading||t.preventDefault()||e.search.preventSelect||(a.markAsRead&&"function"==typeof a.markAsRead&&i(a.markAsRead),a.state&&n.go(a.state,a.stateParams))},e.showMore=function(){e.search.limit=e.search.limit||40,e.search.limit+=40,e.search.limit<40&&(e.search.limit=40),e.search.loadingMore=!0,e.load(e.search.results.length,e.search.limit).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.onNewNotification=function(t){if(!e.search.loading&&!e.search.loadingMore){var n=_.findIndex(e.search.results,(function(e){return t.time>e.time}));n<0&&(n=0),e.search.results.splice(n,0,t),e.updateView()}},e.resetData=function(){e.search.loading||(console.debug("[ES] [notifications] Resetting data (settings or account may have changed)"),e.search.hasMore=!1,e.search.results=[],e.search.loading=!0,delete e.search.limit)},e.showActionsPopover=function(t){a.popover.show(t,{templateUrl:"plugins/es/templates/notification/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.addListeners=function(){if(!l)throw"Controller wallet not set !";e.listeners=[o.api.node.on.stop(e,e.resetData),o.api.node.on.start(e,e.load),l.api.data.on.logout(e,e.resetData)],l.isDefault()&&e.listeners.push(s.api.data.on.new(e,e.onNewNotification))},e.removeListeners=function(){_.forEach(e.listeners,(function(e){e()})),e.listeners=[]}}function Ce(e,t,n,i,a,o){angular.extend(this,n("NotificationsCtrl",{$scope:e})),e.motion=null,e.setWallet(o),e.$on("popover.shown",(function(){e.search.loading&&(e.addListeners(),e.load())})),e.updateView=function(){e.search.results.length&&t((function(){a.ink({selector:".popover-notification .item.ink"})}),100)},e.$on("popover.hidden",e.resetUnreadCount),e.select=function(t,n){!t.preventDefault()&&n&&(n.markAsRead&&"function"==typeof n.markAsRead&&n.markAsRead(),n.state&&i.go(n.state,n.stateParams),e.closePopover(n))}}function Le(e,t,n,i,a,o){angular.extend(this,t("BlockLookupCtrl",{$scope:e})),e.search.text=null,e.search.type="last",e.search.sort=void 0,e.search.asc=!0,e.searchTextId="blockchainSearchText",e.compactMode=!0,e.enableFilter=!0,e.doSearchText=function(){if(!(e.search.text&&e.search.text.trim().length||e.search.filters&&e.search.filters.length))return e.doSearchLast();e.search.type="text",e.doSearch(),i.search({q:e.search.query}).replace()},e.doSearchLast=function(){e.hideActionsPopover(),e.search.type="last",e.search.sort=void 0,e.doSearch(),i.search({q:void 0}).replace()},e.doSearch=function(t){if(!e.search.error){var n;t=angular.isDefined(t)?t:0;var i={};if(e.search.loading=0===t,i.size=e.defaultSizeLimit,"last"==e.search.type)i.from=0===t?0:t+1,e.search.sort?(i.sort={},i.sort[e.search.sort]=e.search.asc?"asc":"desc"):i.sort={number:"desc"},i.excludeCurrent=0===t,n=o.block.search(e.currency,i);else if("text"==e.search.type){var r=o.block.parseSearchText(e.search.text,e.search.filters);e.search.filters=r.filters;var s=e.search.filters.reduce((function(e,t){return e+" AND "+t.text}),"");r.text.length&&(s+=" AND "+r.text),e.search.query=s.substr(5),e.search.text=r.text,i.from=t,e.search.sort?i.sort=e.search.sort+":"+(e.search.asc?"asc":"desc"):i.sort="number:desc",i.excludeCurrent=!0,n=o.block.searchText(e.currency,e.search.query,i)}var l=Date.now();return n.then((function(t){return e.doPrepareResult(t.hits).then((function(){return t}))})).then((function(n){e.showPubkey="issuer"==e.search.sort,e.search.took=0===t?Date.now()-l:e.search.took;var i=0===t?n.total:e.search.total;e.doDisplayResult(n.hits,t,i),e.search.loading=!1})).catch((function(t){e.search.error=!0,e.search.loading=!1,a.onError("BLOCKCHAIN.ERROR.SEARCH_BLOCKS_FAILED")(t).then((function(){e.search.error=!1}))}))}},e.toggleSort=function(t){e.search.sort!==t||e.search.asc?(e.search.asc=e.search.sort!==t||!e.search.asc,e.search.sort=t):(e.search.asc=void 0,e.search.sort=void 0),e.doSearch()},e.showHelpTip=function(){},e.showActionsPopover=function(t){a.popover.show(t,{templateUrl:"plugins/es/templates/blockchain/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.itemRemove=function(t){e.search.filters.splice(t,1),e.doSearchText()},e.toggleShowQuery=function(){e.showQuery=!e.showQuery}}function De(e,t,n,i,a,o,r,s,l,c,u,d,p){e.networkStarted=!1,e.ionItemClass="",e.expertMode=c.data.expertMode&&!s.screen.isSmall(),e.isHttps="https:"===a.location.protocol,e.search={text:"",loading:!0,online:!0,results:[],endpointFilter:r.constants.ES_USER_API,sort:void 0,asc:!0},e.compactMode=!0,e.listeners=[],e.helptipPrefix="helptip-network",e.enableLocationHref=!0,e.removeListeners=function(){e.listeners.length&&(console.debug("[ES] [network] Closing listeners"),_.forEach(e.listeners,(function(e){e()})),e.listeners=[])},e.enter=function(t,n){e.networkStarted||(e.networkStarted=!0,e.search.loading=!0,u.get().then((function(t){t&&(e.node=r.node.same(t.node.host,t.node.port)?r:r.instance(t.node.host,t.node.port),n&&n.stateParams&&("true"===n.stateParams.online&&(e.search.online=!0),n.stateParams.expert&&(e.expertMode="true"==n.stateParams.expert)),e.load())})).catch((function(t){s.onError("ERROR.GET_CURRENCY_FAILED")(t),e.networkStarted=!1})))},e.$on("$ionicParentView.enter",e.enter),e.leave=function(){e.networkStarted&&(e.removeListeners(),d.close(),e.networkStarted=!1,e.search.loading=!0)},e.$on("$ionicView.beforeLeave",e.leave),e.$on("$ionicParentView.beforeLeave",e.leave),e.$on("$destroy",e.leave),e.computeOptions=function(){return{filter:{member:!e.search.type||"member"===e.search.type,mirror:!e.search.type||"mirror"===e.search.type,endpointFilter:angular.isDefined(e.search.endpointFilter)?e.search.endpointFilter:null,online:e.search.online&&!0},sort:{type:e.search.sort,asc:e.search.asc},expertMode:e.expertMode,timeout:l.timeout&&(e.expertMode?l.timeout/10:l.timeout/100)}},e.load=function(){e.search.loading&&(d.start(e.node,e.computeOptions()),e.refreshing=!1,e.listeners.push(d.api.data.on.changed(e,(function(t){e.refreshing||(e.refreshing=!0,p.extendAll(t.peers).then((function(){e.networkStarted&&e.updateView(t),e.refreshing=!1})))}))))},e.updateView=function(t){console.debug("[peers] Updating UI"),e.$broadcast("$$rebind::rebind"),e.search.results=t.peers,e.search.memberPeersCount=t.memberPeersCount,e.search.loading=!e.networkStarted||d.isBusy(),e.loading||e.$broadcast("$$rebind::rebind"),e.motion&&e.search.results&&e.search.results.length>0&&e.motion.show({selector:".item-peer"})},e.refresh=function(){e.search.loading=!0,d.loadPeers()},e.sort=function(){e.search.loading=!0,e.refreshing=!0,d.sort(e.computeOptions()),e.updateView(d.data)},e.toggleOnline=function(t){e.hideActionsPopover(),e.search.online=!1!==t,d.close(),e.search.loading=!0,e.load(),e.enableLocationHref&&n.search(e.search.online?{}:{online:!1}).replace()},e.toggleSearchEndpoint=function(t){e.hideActionsPopover(),e.search.endpointFilter===t||null===t?e.search.endpointFilter=null:e.search.endpointFilter=t,e.sort()},e.toggleSort=function(t){e.search.sort!==t||e.search.asc?(e.search.asc=e.search.sort!==t||!e.search.asc,e.search.sort=t):(e.search.asc=void 0,e.search.sort=void 0),e.sort()},e.selectPeer=function(n){if(n.compacted&&e.compactMode)e.toggleCompactMode();else if(n.online){var i={server:n.getServer()};n.isSsl()&&(i.ssl=!0),n.isTor()&&(i.tor=!0),t.go("app.view_es_peer",i)}},e.$on("csView.action.refresh",(function(t,n){"peers"===n&&e.refresh()})),e.$on("csView.action.showActionsPopover",(function(t,n){e.showActionsPopover(n)})),e.showActionsPopover=function(t){s.popover.show(t,{templateUrl:"plugins/es/templates/network/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.showEndpointsPopover=function(e,t,n){e.preventDefault(),e.stopPropagation();var i=t.getEndpoints(n);(i=(i||[]).reduce((function(e,n){var i=r.node.parseEndPoint(n);return e.concat({label:"NETWORK.VIEW.NODE_ADDRESS",value:t.getServer()+(i.path||"")})}),[])).length&&s.popover.show(e,{templateUrl:"templates/network/popover_endpoints.html",bindings:{titleKey:"NETWORK.VIEW.ENDPOINTS."+n,items:i}})},e.showWs2pPopover=function(e,t){return e.stopPropagation(),o("NETWORK.VIEW.PRIVATE_ACCESS").then((function(n){s.popover.show(e,{templateUrl:"templates/network/popover_endpoints.html",bindings:{titleKey:"NETWORK.VIEW.ENDPOINTS.WS2P",valueKey:"NETWORK.VIEW.NODE_ADDRESS",items:[{label:"NETWORK.VIEW.NODE_ADDRESS",value:t.bma.private?n:t.getServer()+(t.bma.path||"")},{label:"NETWORK.VIEW.WS2PID",value:t.bma.ws2pid},{label:"NETWORK.VIEW.POW_PREFIX",value:t.powPrefix}]}})}))}}function ye(e,t,n){angular.extend(this,t("ESNetworkLookupCtrl",{$scope:e})),n=n||{},e.enableFilter=!angular.isDefined(n.enableFilter)||n.enableFilter,e.search.type=angular.isDefined(n.type)?n.type:e.search.type,e.search.endpointFilter=angular.isDefined(n.endpointFilter)?n.endpointFilter:e.search.endpointFilter,e.expertMode=angular.isDefined(n.expertMode)?n.expertMode:e.expertMode,e.ionItemClass=n.ionItemClass||"item-border-large",e.enableLocationHref=!1,e.helptipPrefix="",e.selectPeer=function(t){e.closeModal(t)},e.$on("modal.hidden",(function(){e.leave()})),e.showHelpTip=function(){},e.enter()}function Pe(e,t){angular.extend(this,t("NetworkLookupCtrl",{$scope:e}));var n=n||{};e.enableFilter=!angular.isDefined(n.enableFilter)||n.enableFilter,e.search.type=angular.isDefined(n.type)?n.type:e.search.type,e.search.endpointFilter=angular.isDefined(n.endpointFilter)?n.endpointFilter:e.search.endpointFilter,e.expertMode=angular.isDefined(n.expertMode)?n.expertMode:e.expertMode,e.ionItemClass=n.ionItemClass||"item-border-large",e.helptipPrefix="",e.selectPeer=function(t){e.closePopover(t)},e.$on("popover.hidden",(function(){e.leave()})),e.showHelpTip=function(){},e.enter()}function ke(e,t,n,i,a,o){e.loading=!0,e.formData={},e.load=function(){return e.loading=!0,e.formData={},t.all([o.blockchain.current().then((function(t){e.formData.number=t.number,e.formData.medianTime=t.medianTime,e.formData.powMin=t.powMin,e.formData.useSsl=o.useSsl})).catch((function(){delete e.formData.number,delete e.formData.medianTime,delete e.formData.powMin,delete e.formData.useSsl})),o.node.summary().then((function(t){e.formData.version=t&&t.duniter&&t.duniter.version,e.formData.software=t&&t.duniter&&t.duniter.software})).catch((function(){delete e.formData.version,delete e.formData.software})),o.version.latest().then((function(t){e.formData.latestRelease=t})).catch((function(){delete e.formData.latestRelease}))]).then((function(){if(e.formData.latestRelease&&"cesium-plus-pod"===e.formData.software){var t=a.version.compare(e.formData.version,e.formData.latestRelease.version);e.formData.isPreRelease=t>0,e.formData.hasNewRelease=t<0}else e.formData.isPreRelease=!1,e.formData.hasNewRelease=!1;e.loading=!1,e.$broadcast("$$rebind::rebind")}))},i.api.data.on.newBlock(e,(function(t){e.loading||(console.debug("[peer info] Received new block. Reload content"),e.load())})),n.api.data.on.changed(e,(function(t){e.loading||(console.debug("[peer info] Peer settings changed. Reload content"),e.load())})),e.load()}function Me(e,t,n,i,a,o,r,s,l){e.node={},e.loading=!0,e.isHttps="https:"===n.location.protocol,e.isReachable=!0,e.options={document:{index:l.data.plugins.es&&l.data.plugins.es.document&&l.data.plugins.es.document.index||"user",type:l.data.plugins.es&&l.data.plugins.es.document&&l.data.plugins.es.document.type||"profile"}},e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!a.screen.isSmall()||t.enableBack})),e.$on("$ionicView.enter",(function(t,n){var i=!n.stateParams||!n.stateParams.server,a=n.stateParams&&n.stateParams.server||r.server,o=n.stateParams&&"true"==n.stateParams.ssl||!!i&&r.useSsl,s="true"==n.stateParams.tor||!!i&&r.useTor;return e.load(a,o,s).then((function(){return e.$broadcast("$csExtension.enter",t,n)})).then((function(){e.loading=!1})).catch((function(){e.loading=!1}))})),e.load=function(n,i,l){var c={server:n,host:n,useSsl:i,useTor:l},u=n.split(":");return 2===u.length&&(c.host=u[0],c.port=u[1]),c.url=s.getUrl(c.host,c.port,void 0,c.useSsl),angular.merge(e.node,l?r.lightInstance(c.host+".to",443,443,!0,6e4):r.lightInstance(c.host,c.port,c.useSsl),c),e.isReachable=!e.isHttps||i,e.isReachable?t.all([e.node.network.peering.self().then((function(t){e.node.pubkey=t.pubkey,e.node.currency=t.currency})),e.node.record.count(e.options.document.index,e.options.document.type).then((function(t){e.node.docCount=t})),e.node.network.peers().then((function(t){var n=t.peers.reduce((function(e,t){var n=new X(t);return n.hasEsEndpoint()?(n.online="UP"===t.status,n.blockNumber=n.block.replace(/-.+$/,""),n.ep=r.node.parseEndPoint(n.getEsEndpoints()[0]),n.dns=n.getDns(),n.id=n.keyID(),n.server=n.getServer(),e.concat(n)):e}),[]);return o.extendAll([e.node].concat(n)).then((function(){e.peers=_.sortBy(n,(function(e){var t=1;return t+=1e4*(e.online?1:0),t+=1e3*(e.hasMainConsensusBlock?1:0),-(t+=100*(e.name?1:0))})),e.motion.show({selector:".item-peer"})}))})),e.node.blockchain.current().then((function(t){e.current=t}))]).catch(a.onError(l?"PEER.VIEW.ERROR.LOADING_TOR_NODE_ERROR":"PEER.VIEW.ERROR.LOADING_NODE_ERROR")):r.network.peers().then((function(t){var n=(t&&t.peers||[]).reduce((function(e,t){var n=new X(t);if(!n.hasEsEndpoint())return e;var i=r.node.parseEndPoint(n.getEsEndpoints()[0]);return i.dns!=c.host&&i.ipv4!=c.host&&i.ipv6!=c.host||i.port!=c.port?e:(n.ep=i,e.concat(n))}),[]),i=n.length&&n[0];if(i)return e.node.pubkey=i.pubkey,e.node.currency=i.currency,o.extend(e.node);console.warn("Could not get peer from /network/peers")}))},e.selectPeer=function(e){if(e.online){var t={server:e.getServer()};e.isSsl()&&(t.ssl=!0),e.isTor()&&(t.tor=!0),i.go("app.view_es_peer",t)}},e.openRawPeering=function(t){return e.openLink(t,e.node.url+"/network/peering?pretty")},e.openRawCurrentBlock=function(t){return e.openLink(t,e.node.url+"/network/peering?pretty")}}function we(e,t,n,i,a,o){e.search={loading:!0,results:null,type:"last",hasMore:!1,loadingMore:!1,limit:40},e.enableFilter=!t.screen.isSmall(),e.ionItemClass="item-border-large",e.$on("$ionicView.enter",(function(){e.search.loading&&e.doSearch()})),e.doSearchText=function(){var t=e.search.text&&e.search.text.trim();return t&&t.length?(e.search.type="text",e.doSearch()):e.doSearchLast()},e.doSearchLast=function(){return e.search.type="last",e.doSearch()},e.doSearch=function(n,i){var o={};return o.from=n||0,o.size=i||40,o.text="text"==e.search.type&&e.search.text&&e.search.text.trim(),e.search.loading=!0,a.record.search(o).then((function(t){n?t&&(e.search.results=e.search.results.concat(t)):e.search.results=t||[],e.search.loading=!1,e.search.hasMore=e.search.results.length>=e.search.limit,e.updateView()})).catch((function(i){e.search.loading=!1,n||(e.search.results=[]),e.search.hasMore=!1,t.onError("GROUP.ERROR.SEARCH_GROUPS_FAILED")(i)}))},e.updateView=function(){e.$broadcast("$$rebind::rebind"),e.motion.show({selector:".list.{0} .item".format(e.motion.ionListClass)})},e.select=function(e){e&&e.id&&n.go("app.view_group",{id:e.id})},e.showMore=function(){e.search.limit=e.search.limit||40,e.search.limit+=40,e.search.limit<40&&(e.search.limit=40),e.search.loadingMore=!0,e.load(e.search.results.length,e.search.limit).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.resetData=function(){e.search.loading||(console.debug("[ES] [group] Resetting data (settings or account may have changed)"),e.search.hasMore=!1,e.search.results=[],e.search.loading=!0,delete e.search.limit)},i.api.data.on.logout(e,e.resetData),e.showNewRecordModal=function(){e.loadWallet({minData:!0}).then((function(i){t.loading.hide(),e.walletData=i,o.show("plugins/es/templates/group/modal_record_type.html").then((function(e){e&&n.go("app.add_group",{type:e})}))}))}}function Ue(e,t,n,i,a,o,r,s,l){e.formData={},e.id=null,e.pictures=[],e.canEdit=!1,e.loading=!0,e.motion=o.motion.fadeSlideIn,e.$on("$ionicView.enter",(function(n,i){i.stateParams&&i.stateParams.id?((e.loading||i.stateParams.refresh)&&e.load(i.stateParams.id,i.stateParams.anchor),o.loading.hide(),e.$broadcast("$recordView.enter",i)):t.go("app.groups")})),e.load=function(t){s.record.load(t,{fetchPictures:!0}).then((function(n){e.id=n.id,e.formData=n.record,e.issuer=n.issuer,e.canEdit=l.isUserPubkey(e.formData.issuer)||l.children.hasPubkey(e.formData.issuer),e.pictures=n.record.pictures||[],delete n.record.pictures,e.$broadcast("$recordView.load",t,s.record.comment),e.loading=!1,o.loading.hide(),e.updateView()})).catch(o.onError("GROUP.ERROR.LOAD_RECORD_FAILED"))},e.updateView=function(){e.motion.show()},e.edit=function(){o.loading.show(),t.go("app.edit_group",{id:e.id})},e.delete=function(){var n;e.hideActionsPopover(),a(["GROUP.VIEW.REMOVE_CONFIRMATION","GROUP.INFO.RECORD_REMOVED"]).then((function(e){return n=e,o.alert.confirm(e["GROUP.VIEW.REMOVE_CONFIRMATION"])})).then((function(a){a&&s.record.remove(e.id).then((function(){i.nextViewOptions({historyRoot:!0}),t.go("app.groups"),o.toast.show(n["GROUP.INFO.RECORD_REMOVED"])})).catch(o.onError("GROUP.ERROR.REMOVE_RECORD_FAILED"))}))},e.showActionsPopover=function(t){o.popover.show(t,{templateUrl:"plugins/es/templates/group/view_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.showSharePopover=function(n){e.hideActionsPopover();var i=e.formData.title,a=(r.shareBaseUrl||$rootScope.rootPath)+t.href("app.view_group",{id:e.id});o.screen.isSmall()&&(n=angular.element(document.querySelector("#group-share-anchor-"+e.id))||n),o.popover.share(n,{bindings:{url:a,titleKey:"GROUP.VIEW.POPOVER_SHARE_TITLE",titleValues:{title:i},time:e.formData.time,postMessage:i}})}}function Be(e,t,n,i,a,o,r,s,l,c){e.walletData={},e.formData={},e.id=null,e.pictures=[],e.loading=!0,e.setForm=function(t){e.form=t},e.$on("$ionicView.enter",(function(t,i){e.loadWallet({minData:!0}).then((function(t){e.walletData=t,i.stateParams&&i.stateParams.id?e.load(i.stateParams.id):(i.stateParams&&i.stateParams.type&&(e.formData.type=i.stateParams.type),e.loading=!1,n.loading.hide(),e.updateView()),l("group-record-title")}))})),e.load=function(i){t.record.load(i,{fetchPictures:!0,html:!1}).then((function(t){e.formData=t.record,e.issuer=t.issuer,e.id=t.id,e.pictures=t.record.pictures||[],delete t.record.pictures,e.loading=!1,n.loading.hide(),e.updateView()})).catch(n.onError("GROUP.ERROR.LOAD_RECORD_FAILED"))},e.updateView=function(){e.motion.show({selector:".list.{0} .item, .card-gallery".format(e.motion.ionListClass)})},e.save=function(){if(e.form.$submitted=!0,!e.saving&&e.form.$valid&&("managed"===e.formData.type||"open"===e.formData.type))return e.saving=!0,n.loading.show().then((function(){var t=e.formData;return t.time=moment().utc().unix(),t.picturesCount=e.pictures.length,t.picturesCount>0?(t.pictures=e.pictures.reduce((function(e,t){return e.concat({file:c.image.toAttachment(t)})}),[]),n.image.resizeSrc(e.pictures[0].src,!0).then((function(e){return t.avatar=c.image.toAttachment({src:e}),t}))):(t.avatar&&(t.avatar={_content:"",_content_type:""}),t.pictures=[],t)})).then((function(n){return e.id?t.record.update(n,{id:e.id}):(n.creationTime=moment().utc().unix(),t.record.add(n))})).then((function(t){return e.id=e.id||t,e.saving=!1,r.clearCache(r.currentView().stateId),r.nextViewOptions({historyRoot:!0}),i.go("app.view_group",{id:e.id,refresh:!0})})).catch((function(t){e.saving=!1,n.onError("GROUP.ERROR.SAVE_RECORD_FAILED")(t)}))},e.openPicturePopup=function(){o.camera.getPicture().then((function(t){e.pictures.push({src:"data:image/png;base64,"+t})})).catch(n.onError("ERROR.TAKE_PICTURE_FAILED"))},e.fileChanged=function(t){return n.loading.show(),a((function(i,a){var o=t.target.files[0];n.image.resizeFile(o).then((function(t){e.pictures.push({src:t}),n.loading.hide(),i()}))}))},e.removePicture=function(t){e.pictures.splice(t,1)},e.favoritePicture=function(t){if(t>0){var n=e.pictures[t];e.pictures.splice(t,1),e.pictures.splice(0,0,n)}},e.cancel=function(){r.goBack()},e.showRecordTypeModal=function(){s.show("plugins/es/templates/group/modal_record_type.html").then((function(t){t&&(e.formData.type=t)}))}}function xe(e,t,n,i,a,o,r,s,l,c,u){var d,p=u.constants.DEFAULT_LOAD_SIZE;e.search={loading:!0,results:null,hasMore:!1,loadingMore:!1,limit:p,options:{codes:{includes:c.constants.INVITATION_CODES}}},e.setWallet=function(e){d=e},e.$on("$ionicView.enter",(function(t,n){if(e.search.loading){if(!(d=n.stateParams&&n.stateParams.id?r.children.get(n.stateParams.id):r))return o.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome();e.loadWallet({wallet:d,minData:!0}).then((function(){e.addListeners(),s.isAlive()&&(e.load(),e.resetUnreadCount(),e.showFab("fab-new-invitation"))}))}})),e.load=function(t,n){var i=angular.copy(e.search.options);return i.from=i.from||t||0,i.size=i.size||n||p,d=d||r,u.load(i,d.data.keypair).then((function(t){e.search.results=t,e.search.loading=!1,e.search.hasMore=e.search.results&&e.search.results.length>=e.search.limit,e.updateView(),o.loading.hide()})).catch((function(n){if("CANCELLED"===n)return e.cancel();e.search.loading=!1,t||(e.search.results=[]),e.search.hasMore=!1,o.onError("INVITATION.ERROR.LOAD_INVITATIONS_FAILED")(n)}))},e.cancel=function(){},e.updateView=function(){e.motion&&e.search.results&&e.search.results.length&&e.motion.show({selector:".view-invitation .item"})},e.$watchCollection("search.results",e.updateView),e.showMore=function(){e.search.limit=e.search.limit||p,e.search.limit=2*e.search.limit,e.search.limit<p&&(e.search.limit=p),e.search.loadingMore=!0,e.load(e.search.results.length,e.search.limit).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")}))},e.onNewInvitation=function(t){e.search.loading||e.search.loadingMore||e.search.results[0]&&e.search.results[0]===t||e.search.results.splice(0,0,t)},e.resetData=function(){e.search.loading||(console.debug("[ES] [invitation] Resetting data (settings or account may have changed)"),e.search.hasMore=!1,e.search.results=[],e.search.loading=!0,delete e.search.limit)},e.resetUnreadCount=function(){if(e.search.loading||!d.data.invitations)return a(e.resetUnreadCount,2e3);if(d.data.invitations.unreadCount&&(console.debug("[ES] [invitation] Resetting unread count"),d.data.invitations.unreadCount=0,e.search.results&&e.search.results.length)){var t=e.search.results[0],n=t.time?t.time:0;!n||d.data.invitations.readTime&&d.data.invitations.readTime==n||(d.data.invitations.readTime=n,d.storeData())}},e.deleteAll=function(n){if(e.hideActionsPopover(),e.search.results.length)return n?t.all([o.loading.show(),u.deleteAll(d.data.pubkey)]).then((function(){return e.search.results.splice(0,e.search.results.length),o.loading.hide()})).catch(o.onError("INVITATION.ERROR.REMOVE_ALL_INVITATIONS_FAILED")):o.alert.confirm("INVITATION.CONFIRM.DELETE_ALL_CONFIRMATION").then((function(t){if(t)return e.deleteAll(t)}))},e.delete=function(t){var n=e.search.results[t];if(n)return u.delete(n).then((function(){e.search.results[t]&&e.search.results[t]===n&&e.search.results.splice(t,1)})).catch(o.onError("INVITATION.ERROR.REMOVE_INVITATION_FAILED"))},e.accept=function(t){e.hideActionsPopover(),t.state&&i.go(t.state,t.stateParams||{})},e.showNewInvitationModal=function(){return e.hideActionsPopover(),a((function(){return l.showNewInvitation({})}),500)},e.showActionsPopover=function(t){o.popover.show(t,{templateUrl:"plugins/es/templates/invitation/popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.addListeners=function(){if(!d)throw"Controller wallet not set !";e.listeners=[s.api.node.on.stop(e,e.resetData),s.api.node.on.start(e,e.load),d.api.data.on.logout(e,e.resetData)],d.isDefault()&&e.listeners.push(u.api.data.on.new(e,e.onNewInvitation))}}function Fe(e,t,n){angular.extend(this,t("InvitationsCtrl",{$scope:e})),e.motion=null,e.setWallet(n),e.$on("popover.shown",(function(){e.search.loading&&(e.addListeners(),e.load())})),e.updateView=function(){},e.$on("popover.hidden",e.resetUnreadCount),e.hideActionsPopover=function(){e.closePopover()},e.cancel=function(){e.closePopover()}}function He(e,t,n,i,a,o,r,s,l){var c;e.recipients=[],e.suggestions=[],e.formData={useComment:!1,walletId:null},e.enableSelectWallet=!0,e.setParameters=function(t){t&&(t.wallet&&"default"!==t.wallet?e.formData.walletId=t.wallet:e.formData.walletId=a.id)},e.setParameters(l),e.load=function(){return e.enableSelectWallet=a.children.count()>0,c=e.enableSelectWallet&&(e.formData.walletId?a.children.get(e.formData.walletId):a)||a,e.formData.walletId=c.id,c.isDefault()||console.debug("[transfer] Using {"+c.id+"} wallet"),c.login({sources:!0,silent:!0}).then((function(t){if(e.walletData=t,i.ink({selector:".modal-invitation .ink"}),e.destPub&&!e.destUid)return csWot.extend({pubkey:e.destPub}).then((function(t){e.destUid=t&&(t.name||t.uid),e.destUid&&(e.destPub=""),e.loading=!1}));e.loading=!1})).catch((function(t){if("CANCELLED"===t)return e.cancel();i.onError("ERROR.LOGIN_FAILED")(t)}))},e.$on("modal.shown",e.load),e.onUseCommentChanged=function(){e.formData.useComment||(e.formData.comment=null)},e.$watch("formData.useComment",e.onUseCommentChanged,!0),e.removeRecipient=function(t,n){e.recipients.splice(t,1),n.preventDefault()},e.removeSuggestion=function(t,n){e.suggestions.splice(t,1),n.preventDefault()},e.cancel=function(){e.closeModal()},e.doSend=function(){if(e.form.$submitted=!0,e.form.$valid&&e.recipients.length&&e.suggestions.length)return c.isLogin()?c.auth({silent:!0}).then((function(){return t.all([r.box.getKeypair(c.data.keypair),i.alert.confirm("INVITATION.CONFIRM.SEND_INVITATIONS_TO_CERTIFY",void 0,{okText:"COMMON.BTN_SEND"})])})).then((function(n){var a=n&&n[0],o=n&&n[1];if(a&&o){i.loading.show();var r=moment().utc().unix(),l=e.formData.useComment&&e.formData.comment&&e.formData.comment.trim();return t.all(e.recipients.reduce((function(t,n){return t.concat(e.suggestions.reduce((function(e,t){if(!t.uid||!t.pubkey)return console.error("Unable to send suggestion for this identity (no uid or pubkey)",t),e;var i={issuer:c.data.pubkey,recipient:n.pubkey,time:r,content:[t.uid,t.pubkey].join("-"),comment:l};return e.concat(s.send(i,{wallet:c,type:"certification"}))}),[]))}),[])).then((function(){return e.closeModal(),i.loading.hide()})).then((function(){i.toast.show("INVITATION.INFO.INVITATION_SENT")})).catch(i.onError("INVITATION.ERROR.SUGGEST_CERTIFICATIONS_FAILED"))}})):e.closeModal()},e.showSelectRecipientModal=function(t){if(!t.isDefaultPrevented())return n.showWotLookup({allowMultiple:!0,enableFilter:!0,title:"INVITATION.NEW.RECIPIENTS_MODAL_TITLE",help:"INVITATION.NEW.RECIPIENTS_MODAL_HELP",okText:"COMMON.BTN_OK",okType:"button-positive",selection:angular.copy(e.recipients)}).then((function(t){t&&(e.recipients=t)}))},e.showSelectSuggestionModal=function(t){if(!t.isDefaultPrevented())return n.showWotLookup({allowMultiple:!0,enableFilter:!0,title:"INVITATION.NEW.SUGGESTION_IDENTITIES_MODAL_TITLE",help:"INVITATION.NEW.SUGGESTION_IDENTITIES_MODAL_HELP",okText:"COMMON.BTN_OK",okType:"button-positive",selection:angular.copy(e.suggestions)}).then((function(t){t&&(e.suggestions=t)}))},e.showSelectWalletModal=function(){if(e.enableSelectWallet)return n.showSelectWallet().then((function(t){t&&e.formData.walletId!==t.id&&(console.debug("[transfer] Using {"+t.id+"} wallet"),e.wallet=t,e.walletData=t.data,e.formData.walletId=t.id,e.onAmountChanged())}))}}function We(e,t,n,i,a,o,r,s){var l;e.loading=!0,e.popupData={},e.search={results:[],loading:!0},e.emailFrequencies=[{id:"daily",label:"daily"},{id:"weekly",label:"weekly"}],e.enter=function(t,i){if(e.loading){if(!(l=i.stateParams&&i.stateParams.id?a.children.get(i.stateParams.id):a))return o.alert.error("ERROR.UNKNOWN_WALLET_ID"),e.showHome();l.auth({minData:!0}).then((function(){return o.loading.hide(),e.load()})).then((function(){e.showFab("fab-add-subscription-record")})).catch((function(t){if("CANCELLED"===t)return o.loading.hide(10),e.loading=!0,void n.goBack();o.onError("SUBSCRIPTION.ERROR.LOAD_SUBSCRIPTIONS_FAILED")(t)}))}},e.$on("$ionicView.enter",e.enter),e.load=function(){return e.loading=!0,s.record.load(l.data.pubkey,l.data.keypair).then((function(e){var t=_.groupBy(e||[],(function(e){return[e.type,e.recipient].join("|")}));return _.keys(t).reduce((function(e,n){var i=n.split("|");return e.concat({type:i[0],recipient:i[1],items:t[n]})}),[])})).then((function(e){return i.extendAll(e,"recipient")})).then(e.updateView).catch((function(t){o.loading.hide(10),t&&404==t.ucode?(e.updateView([]),e.existing=!1):o.onError("PROFILE.ERROR.LOAD_PROFILE_FAILED")(t)}))},e.updateView=function(t){t&&(e.search.results=t),e.search.results&&e.search.results.length&&e.motion.show(),e.search.loading=!1},e.addSubscription=function(){e.showCategoryModal().then((function(t){if(t){if("email"===t.id)return e.showEmailModal();o.alert.notImplemented()}})).then((function(t){t&&(o.loading.show(),s.record.add(t,{wallet:l}).then(e.addToUI).then((function(){l.data.subscriptions=l.data.subscriptions||{count:0},l.data.subscriptions.count++,o.loading.hide(),e.updateView()})).catch(o.onError("SUBSCRIPTION.ERROR.ADD_SUBSCRIPTION_FAILED")))}))},e.editSubscription=function(t){var n,i=angular.copy(t);if("email"===t.type&&(n=e.showEmailModal(t)),n)return n.then((function(n){if(n)return o.loading.show(),t.id=i.id,s.record.update(t,l).then((function(){if(i.type!==t.type||i.recipient!==t.recipient)return e.removeFromUI(i),e.addToUI(t)})).then((function(){o.loading.hide(),e.updateView()})).catch(o.onError("SUBSCRIPTION.ERROR.UPDATE_SUBSCRIPTION_FAILED"))}))},e.deleteSubscription=function(t,n){if(t&&t.id){if(!n)return o.alert.confirm("SUBSCRIPTION.CONFIRM.DELETE_SUBSCRIPTION").then((function(n){if(n)return e.deleteSubscription(t,n)}));o.loading.show(),s.record.remove(t.id,{wallet:l}).then((function(){l.data.subscriptions=l.data.subscriptions||{count:1},l.data.subscriptions.count--,e.removeFromUI(t),o.loading.hide()})).catch(o.onError("SUBSCRIPTION.ERROR.DELETE_SUBSCRIPTION_FAILED"))}},e.removeFromUI=function(t){var n=_.findWhere(e.search.results,{type:t.type,recipient:t.recipient}),i=_.findIndex(n.items,t);i>=0&&n.items.splice(i,1),n.items.length||(i=_.findIndex(e.search.results,n),e.search.results.splice(i,1))},e.addToUI=function(n){e.search.results=e.search.results||[];var a=_.findWhere(e.search.results,{type:n.type,recipient:n.recipient});return a?(a.items.push(n),t.when(n)):(a={type:n.type,recipient:n.recipient,items:[]},i.extendAll([a],"recipient").then((function(){return a.items.push(n),e.search.results.push(a),n})))},e.showCategoryModal=function(){return s.category.all().then((function(e){return r.show("plugins/es/templates/common/modal_category.html","ESCategoryModalCtrl as ctrl",{categories:e},{focusFirstInput:!0})})).then((function(e){if(e&&e.parent)return e}))},e.showEmailModal=function(e){return r.show("plugins/es/templates/subscription/modal_email.html","ModalEmailSubscriptionsCtrl",e,{focusFirstInput:!0})}}function Ve(e,t,n,i,a,o,r){e.frequencies=[{id:"daily",label:"daily"},{id:"weekly",label:"weekly"}],e.formData=r||{},e.formData.content=e.formData.content||{},e.formData.content.frequency=e.formData.content.frequency||e.frequencies[0].id,e.recipient={},e.$on("modal.shown",(function(){return e.formData.recipient?(e.recipient={pubkey:e.formData.recipient},a.extendAll([e.recipient])):i.network.peering.self().then((function(t){if(t)return e.formData.recipient=t.pubkey,e.recipient={pubkey:e.formData.recipient},a.extendAll([e.recipient])}))})),e.doSubmit=function(){if(e.form.$submitted=!0,e.form.$valid&&e.formData.content.email&&e.formData.content.frequency){var t={type:"email",recipient:e.formData.recipient,content:{email:e.formData.content.email,locale:n.data.locale.id,frequency:e.formData.content.frequency}};e.closeModal(t)}},e.cancel=function(){e.closeModal()},e.subscriptionForm&&e.subscriptionForm.$setPristine(),e.showNetworkLookup=function(){return o.showNetworkLookup({enableFilter:!0,endpointFilter:i.constants.ES_SUBSCRIPTION_API}).then((function(t){t&&(e.recipient=t,e.formData.recipient=t.pubkey)}))}}function Ge(e,t,n,i,a,o,r,s,l){e.search=e.search||{loading:!0,hasMore:!1,text:void 0,index:"invitation",type:"certification",results:[],sort:"time",asc:!1,loadingMore:!1},e.entered=!1,e.searchTextId="documentSearchText",e.ionItemClass="item-border-large",e.defaultSizeLimit=e.defaultSizeLimit||(r.screen.isSmall()?50:100),e.helptipPrefix="helptip-document",e.compactMode=!angular.isDefined(e.compactMode)||e.compactMode,e._source=e._source||["issuer","hash","time","creationTime","title","message"],e.showHeaders=!angular.isDefined(e.showHeaders)||e.showHeaders,e.enter=function(t,n){e.entered||(e.entered=!0,e.search.index=n.stateParams&&n.stateParams.index||e.search.index,e.search.type=n.stateParams&&n.stateParams.type||e.search.type,e.search.text=n.stateParams&&n.stateParams.q||e.search.text,e.search.last=!e.search.text,e.load()),e.expertMode=angular.isDefined(e.expertMode)?e.expertMode:!r.screen.isSmall()&&a.data.expertMode},e.$on("$ionicView.enter",e.enter),e.computeOptions=function(t,n){var i={index:e.search.index,type:e.search.type,from:t||0,size:n||e.defaultSizeLimit};return e.search.sort?(i.sort={},i.sort[e.search.sort]=e.search.asc?"asc":"desc"):i.sort={time:"desc"},i._source=i._source||e._source,i},e.load=function(t,n,i){if(!e.search.error){var a=e.computeOptions(t,n);return e.search.loading=!i,(e.search.last?l.search(a):l.searchText(e.search.text||"",a)).then((function(n){t?e.search.results=e.search.results.concat(n.hits):(e.search.results=n.hits,e.search.took=n.took),e.search.total=n.total,r.loading.hide(),e.search.loading=!1,e.search.hasMore=n.hits&&n.hits.length>0&&n.total>e.search.results.length,e.updateView()})).catch((function(t){e.search.results=[],e.search.loading=!1,e.search.error=!0,e.search.hasMore=!1,r.onError("DOCUMENT.ERROR.LOAD_DOCUMENTS_FAILED")(t).then((function(){e.search.error=!1}))}))}},e.updateView=function(){e.motion&&e.search.results&&e.search.results.length&&e.motion.show({selector:".list .item.item-document"}),e.$broadcast("$$rebind::rebind")},e.doSearchText=function(){return e.search.last=!e.search.text,e.load().then((function(){n.search({q:e.search.text}).replace()}))},e.doSearchLast=function(){return e.search.last=!0,e.search.text=void 0,e.load()},e.removeAll=function(){if(e.hideActionsPopover(),e.search.results&&e.search.results.length)return r.alert.confirm("DOCUMENT.CONFIRM.REMOVE_ALL").then((function(t){if(t)return r.loading.show(),l.removeAll(e.search.results).then((function(){return e.search.loading=!1,i((function(){return r.toast.show("DOCUMENT.INFO.REMOVED"),e.load()}),1e3)})).catch(r.onError("DOCUMENT.ERROR.REMOVE_ALL_FAILED"))}))},e.remove=function(t,n){var i=e.search.results[n];i&&!t.defaultPrevented&&(t.stopPropagation(),r.alert.confirm("DOCUMENT.CONFIRM.REMOVE").then((function(t){if(t)return l.remove(i).then((function(){e.search.results.splice(n,1),e.$broadcast("$$rebind::rebind"),r.toast.show("DOCUMENT.INFO.REMOVED")})).catch(r.onError("MESSAGE.ERROR.REMOVE_FAILED"))})))},e.selectDocument=function(t,n){console.debug("Selected document: ",n,s);var i=s.getUrl("/{0}/{1}/_search?pretty&q=_id:{2}".format(n.index,n.type,n.id));return e.openLink(t,i)},e.toggleCompactMode=function(){e.compactMode=!e.compactMode,e.updateView(),!e.search.hasMore&&e.search.results.length&&"last"==e.search.type&&i((function(){e.search.hasMore=!0}),500)},e.toggleSort=function(t){e.search.sort!==t||e.search.asc?(e.search.asc=e.search.sort!==t||!e.search.asc,e.search.sort=t):(e.search.asc=void 0,e.search.sort=void 0),e.load()},e.showMore=function(){e.search.loading||(e.search.loadingMore=!0,e.load(e.search.results.length,e.defaultSizeLimit,!0).then((function(){e.search.loadingMore=!1,e.$broadcast("scroll.infiniteScrollComplete")})))},e.startListenChanges=function(){var t=Date.now(),n=e.search.index+"/"+e.search.type,i=s.websocket.changes(n);return i.open().then((function(){console.debug("[ES] [document] Websocket opened in {0} ms".format(Date.now()-t)),i.on((function(t){e.search.last&&t&&l.fromHit(t).then((function(n){"DELETE"===t._operation?e.onDeleteDocument(n):e.onNewDocument(n)}))}))}))},e.onNewDocument=function(t){if(e.search.last&&!e.search.loading){console.debug("[ES] [document] Detected new document: ",t);var n=_.findIndex(e.search.results,{id:t.id,index:t.index,type:t.type});n<0?(e.search.total++,e.search.results.splice(0,0,t)):(t.updated=!0,i((function(){t.updated=!1}),2e3),e.search.results.splice(n,1,t)),e.updateView()}},e.onDeleteDocument=function(t){e.search.last&&!e.search.loading&&i((function(){var n=_.findIndex(e.search.results,{id:t.id,index:t.index,type:t.type});n<0||(console.debug("[ES] [document] Detected document deletion: ",t),e.search.results.splice(n,1),e.search.total--,e.updateView())}),750)},e.showActionsPopover=function(t){r.popover.show(t,{templateUrl:"plugins/es/templates/document/lookup_popover_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)},e.resetData=function(){e.search.loading||(console.debug("[ES] [document] Resetting data (settings or account may have changed)"),e.search.results=[],e.search.loading=!1,e.search.total=void 0,e.search.loadingMore=!1,e.entered=!1,delete e.search.limit)},o.api.data.on.unauth(e,e.resetData)}function Ye(e,t,n,i,a){angular.extend(this,t("ESDocumentLookupCtrl",{$scope:e})),e.search={loading:!0,hasMore:!0,text:void 0,index:"user,page,group",type:"profile,record,comment",results:void 0,sort:"time",asc:!1},e.expertMode=!1,e.defaultSizeLimit=20,e._source=["issuer","hash","time","creationTime","title","avatar._content_type","city","message","record","type"],e.showHeaders=!1,e.$on("$ionicParentView.enter",e.enter),e.selectDocument=function(e,t){if(t&&e&&!e.defaultPrevented)if(e.stopPropagation(),"user"===t.index&&"profile"===t.type)i.go("app.wot_identity",{pubkey:t.pubkey,uid:t.name});else if("page"===t.index&&"record"===t.type)i.go("app.view_page",{title:t.title,id:t.id});else if("page"===t.index&&"comment"===t.type){var n=a("formatHash")(t.id);i.go("app.view_page_anchor",{title:t.title,id:t.record,anchor:n})}else"group"===t.index&&"record"===t.type?i.go("app.view_group",{title:t.title,id:t.id}):"group"===t.index&&"comment"===t.type?(n=a("formatHash")(t.id),i.go("app.view_group_anchor",{title:t.title,id:t.record,anchor:n})):console.warn("Click on this kind of document not implement yet!",t)};var o=e.computeOptions;e.computeOptions=function(t,n){var i=o(t,n);if(!i.sort||i.sort.time){var a=i.sort&&i.sort.time||a;i.sort=[{time:a}]}return i._source=i._source||e._source,i.getTimeFunction=function(e){return e.time=e.creationTime||e.time,e.time},i},n((function(){e.startListenChanges()}),1e3)}function je(e,t,n,i,a,o,r,s,l,c){e.entered=!1,e.abuseData={},e.abuseLevels=[{value:1,label:"LOW"},{
-value:2,label:"LOW"}],e.staring=!1,e.options=e.options||{},e.options.like=e.options.like||{kinds:c.constants.KINDS,index:void 0,type:void 0,id:void 0},e.$on("$recordView.enter",(function(t,n){e.entered?e.id&&e.loadLikes(e.id):e.entered=!1})),e.$on("$recordView.load",(function(t,n){e.id=n||e.id,e.id&&e.loadLikes(e.id)})),e.initLikes=function(){if(!e.likeData)throw new Error("Missing 'likeData' in scope. Cannot load likes counter");if(!e.options.like.service){if(!e.options.like.index||!e.options.like.type)throw new Error("Missing 'options.like.index' or 'options.like.type' in scope. Cannot load likes counter");e.options.like.service=c.instance(e.options.like.index,e.options.like.type)}e.options.like.kinds||(e.options.like.kinds=_.filter(c.constants.KINDS,(function(t){var n=t.toLowerCase()+"s";return angular.isDefined(e.likeData[n])})))},e.loadLikes=function(n){if(e.likeData&&!e.likeData.loading){n=n||e.likeData.id,e.initLikes();var i=e.options.like.kinds||[];if(i.length){e.likeData.loading=!0;var a=Date.now();console.debug("[ES] Loading counter of {0}... ({1})".format(n.substring(0,8),i));var o=s.isLogin()?s.pubkeys():void 0;return t.all(_.map(i,(function(t){var i=t.toLowerCase()+"s";return e.options.like.service.count(n,{issuers:o,kind:t}).then((function(t){e.likeData[i]&&angular.merge(e.likeData[i],t)}))}))).then((function(){e.likeData.id=n,console.debug("[ES] Loading counter of {0} [OK] in {1}ms".format(n.substring(0,8),Date.now()-a)),_.contains(i,"VIEW")&&!e.canEdit&&e.markAsView(),e.$parent&&(console.debug("[ES] [likes] Adding data and functions to parent scope"),e.$parent.toggleLike=e.toggleLike,e.$parent.reportAbuse=e.reportAbuse),e.likeData.loading=!1})).catch((function(t){console.error(t&&t.message||t),e.likeData.loading=!1}))}}},e.toggleLike=function(i,a){if(e.initLikes(),!e.likeData.id)throw new Error("Missing 'likeData.id' in scope. Cannot apply toggle");(a=a||{}).kind=a.kind&&a.kind.toUpperCase()||"LIKE";var l=a.kind.toLowerCase()+"s";if(e.likeData[l]=e.likeData[l]||{},!0===e.likeData[l].loading||e.likeData.loading)return i.preventDefault(),t.reject();if(!a.pubkey)return(s.children.count()?r.showSelectWallet({displayBalance:!1}):t.when(s)).then((function(t){if(!t)throw"CANCELLED";return a.pubkey=t.data.pubkey,e.toggleLike(i,a)}));var c=s.getByPubkey(a.pubkey);return c?(e.likeData[l].loading=!0,c.auth({minData:!0}).then((function(t){if(t)return t.isMember,a.id=e.likeData.id,e.options.like.service.toggle(e.likeData.id,a);o.loading.hide()})).then((function(t){o.loading.hide(),0!==t&&(e.likeData[l].total=(e.likeData[l].total||0)+t,e.likeData[l].wasHitByPubkey=e.likeData[l].wasHitByPubkey||{},e.likeData[l].wasHitByPubkey[a.pubkey]=t>0,e.likeData[l].wasHitCount+=t),n((function(){e.likeData[l].loading=!1,e.$broadcast("$$rebind::like")}),1e3)})).catch((function(t){e.likeData[l].loading=!1,"CANCELLED"!==t&&(console.error(t),o.onError("LIKE.ERROR.FAILED_TOGGLE_LIKE")(t),i.preventDefault())}))):void 0},e.setAbuseForm=function(t){e.abuseForm=t},e.showAbuseCommentPopover=function(t){return i(["COMMON.REPORT_ABUSE.TITLE","COMMON.REPORT_ABUSE.SUB_TITLE","COMMON.BTN_SEND","COMMON.BTN_CANCEL"]).then((function(t){return o.loading.hide(),a.show({templateUrl:"plugins/es/templates/common/popup_report_abuse.html",title:t["COMMON.REPORT_ABUSE.TITLE"],subTitle:t["COMMON.REPORT_ABUSE.SUB_TITLE"],cssClass:"popup-report-abuse",scope:e,buttons:[{text:t["COMMON.BTN_CANCEL"],type:"button-stable button-clear gray"},{text:t["COMMON.BTN_SEND"],type:"button button-positive  ink",onTap:function(t){if(e.abuseForm.$submitted=!0,e.abuseForm.$valid&&e.abuseData.comment)return e.abuseData;t.preventDefault()}}]})})).then((function(t){if(e.abuseData={},t&&t.comment)return t;o.loading.hide()}))},e.reportAbuse=function(n,i){if(e.likeData&&e.likeData.abuses&&!e.likeData.abuses.wasHitCount&&!e.likeData.abuses.wasHitCount){if(!(i=i||{}).pubkey)return(s.children.count()?r.showSelectWallet({displayBalance:!1}):t.when(s)).then((function(t){if(!t)throw"CANCELLED";return i.pubkey=t.data.pubkey,e.reportAbuse(n,i)}));var a=s.getByPubkey(i.pubkey);if(a&&a.isMember())return i.comment?(i.kind="ABUSE",e.toggleLike(n,i).then((function(){o.toast.show("COMMON.REPORT_ABUSE.CONFIRM.SENT")}))):e.showAbuseCommentPopover(n).then((function(t){if(t&&t.comment)return i.comment=t.comment,i.level=t.level||t.delete&&5||void 0,e.reportAbuse(n,i)}));o.alert.info("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")}},s.api.data.on.reset(e,(function(){_.forEach(e.options.like.kinds||[],(function(t){var n=t.toLowerCase()+"s";e.likeData[n]&&(e.likeData[n].wasHitByPubkey={},e.likeData[n].wasHitCount=0)})),e.$broadcast("$$rebind::like")}),this)}function Ke(e,t,n,i,a,o,r,s,l){function c(t){return moment.unix(t).utc().startOf(e.formData.rangeDuration).unix()}e.loading=!0,e.formData=e.formData||{useRelative:o.data.useRelative,timePct:100,rangeDuration:"day",firstBlockTime:0,scale:"linear",hide:[],beginAtZero:!0},e.formData.useRelative=!1,e.scale="linear",e.height=void 0,e.width=void 0,e.maintainAspectRatio=!0,e.times=[],e.enter=function(t,n){if(e.loading){if(n&&n.stateParams&&(e.stateName=n&&n.stateName,e.stateParams=angular.copy(n&&n.stateParams||{}),!e.formData.currency&&n&&n.stateParams&&n.stateParams.currency&&(e.formData.currency=n.stateParams.currency),n.stateParams.t?e.formData.timePct=n.stateParams.t:n.stateParams.timePct&&(e.formData.timePct=n.stateParams.timePct),n.stateParams.stepUnit&&(e.formData.rangeDuration=n.stateParams.stepUnit),n.stateParams.scale&&(e.formData.scale=n.stateParams.scale),n.stateParams.hide&&(e.formData.hide=n.stateParams.hide.split(",").reduce((function(e,t){return e.concat(parseInt(t))}),[]))),e.init(t,n),!e.formData.currency)return r.get().then((function(i){return e.formData.currency=i?i.name:null,e.formData.firstBlockTime=i?c(i.firstBlockTime):0,e.formData.firstBlockTime||console.warn("[graph] currency.firstBlockTime not loaded ! Should have been loaded by currrency service!"),e.formData.currencyAge=c(moment().utc().unix())-e.formData.firstBlockTime,e.enter(t,n)}));e.load().then((function(){e.setScale(e.formData.scale),e.updateHiddenDataset(),e.loading=!1}))}},e.$on("$csExtension.enter",e.enter),e.$on("$ionicParentView.enter",e.enter),e.updateLocation=function(){e.stateName&&(i.nextViewOptions({disableAnimate:!0,disableBack:!0,historyRoot:!0}),e.stateParams=e.stateParams||{},e.stateParams.t=e.formData.timePct>=0&&e.formData.timePct<100?e.formData.timePct:void 0,e.stateParams.stepUnit="day"!=e.formData.rangeDuration?e.formData.rangeDuration:void 0,e.stateParams.hide=e.formData.hide&&e.formData.hide.length?e.formData.hide.join(","):void 0,e.stateParams.scale="linear"!=e.formData.scale?e.formData.scale:void 0,a.go(e.stateName,e.stateParams,{reload:!1,inherit:!0,notify:!1}))},e.setSize=function(t,n,i){e.height=t,e.width=n,e.maintainAspectRatio=angular.isDefined(i)?i:e.maintainAspectRatio},e.$on("csView.action.refresh",(function(t,n){if(!n||"currency"==n)return e.load()})),e.init=function(e,t){},e.load=function(){},e.toggleScale=function(){e.setScale("linear"===e.formData.scale?"logarithmic":"linear"),e.updateLocation()},e.setScale=function(n){if(e.hideActionsPopover(),e.formData.scale=n,e.options&&e.options.scales&&e.options.scales.yAxes){var i=t("formatInteger");_.forEach(e.options.scales.yAxes,(function(t,a){t.type=n,t.ticks=t.ticks||{},"linear"==n?(t.ticks.beginAtZero=!angular.isDefined(e.formData.beginAtZero)||e.formData.beginAtZero,delete t.ticks.min,t.ticks.callback=function(e){return i(e)}):(delete t.ticks.beginAtZero,delete t.ticks.callback,t.ticks.callback=function(e,t){if(e)return Math.log10(e)%1==0||Math.log10(e/3)%1==0?i(e):""})}))}},e.setRangeDuration=function(t){e.hideActionsPopover(),e.formData&&t==e.formData.rangeDuration||(e.formData.rangeDuration=t,delete e.formData.startTime,delete e.formData.endTime,delete e.formData.rangeDurationSec,e.load(),e.updateLocation())},e.updateHiddenDataset=function(t){t=t||e.datasetOverride||{},_.forEach(e.formData.hide||[],(function(n){if(t[n]){t[n].hidden=!0;var i=t[n].yAxisID,a=i&&e.options&&e.options.scales&&_.findWhere(e.options.scales.yAxes||[],{id:i});i&&a&&1==_.filter(t,(function(e){return e.yAxisID===i})).length&&(a.display=!1)}}))},e.onLegendClick=function(t,n){var i=n.datasetIndex,a=this.chart,o=a.getDatasetMeta(i);o.hidden=null===o.hidden?!a.data.datasets[i].hidden:null,a.config&&a.config.data&&a.config.data.datasets&&1===_.filter(a.config.data.datasets,(function(e){return e.yAxisID&&e.yAxisID===o.yAxisID})).length&&(a.scales[o.yAxisID].options.display=!(!0===o.hidden)),a.update(),e.formData.hide=e.formData.hide||[],e.formData.hide=o.hidden?_.union(e.formData.hide,[i]):_.difference(e.formData.hide,[i]),e.updateLocation()},e.goPreviousRange=function(){e.loadingRange||(e.loadingRange=!0,e.formData.startTime-=e.times.length*e.formData.rangeDurationSec,e.formData.startTime<e.formData.firstBlockTime&&(e.formData.startTime=e.formData.firstBlockTime),e.formData.endTime=e.formData.startTime+e.times.length*e.formData.rangeDurationSec,e.load().then((function(){e.updateLocation(),e.loadingRange=!1})))},e.goNextRange=function(){e.loadingRange||(e.loadingRange=!0,e.formData.startTime+=e.times.length*e.formData.rangeDurationSec,e.formData.startTime>e.formData.firstBlockTime+e.formData.currencyAge-e.formData.timeWindow&&(e.formData.startTime=e.formData.firstBlockTime+e.formData.currencyAge-e.formData.timeWindow),e.formData.endTime=e.formData.startTime+e.times.length*e.formData.rangeDurationSec,e.load().then((function(){e.updateLocation(),e.loadingRange=!1})))},e.onRangeChanged=function(){e.loadingRange||(e.loadingRange=!0,e.formData.startTime=e.formData.firstBlockTime+parseFloat(e.formData.timePct)/100*(e.formData.currencyAge-e.formData.timeWindow),e.formData.endTime=e.formData.startTime+e.times.length*e.formData.rangeDurationSec,e.load().then((function(){e.updateLocation(),e.loadingRange=!1})))},e.updateRange=function(t,n,i){i=!angular.isDefined(i)||i,e.formData.startTime=t,e.formData.endTime=n,e.formData.timeWindow=e.formData.timeWindow||e.formData.endTime-e.formData.startTime,e.formData.rangeDurationSec=e.formData.rangeDurationSec||e.formData.timeWindow/(e.times.length-1),i&&(e.formData.timePct=Math.ceil(100*(e.formData.startTime-e.formData.firstBlockTime)/(e.formData.currencyAge-e.formData.timeWindow)))},e.showActionsPopover=function(t){l.popover.show(t,{templateUrl:"plugins/graph/templates/common/popover_range_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function $e(e,t,n,i,a,o,r,s){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.displayRightAxis=!0,e.init=function(t,n){n&&n.stateParams&&!e.formData.issuer&&n&&n.stateParams&&n.stateParams.pubkey&&(e.formData.issuer=n.stateParams.pubkey)},e.load=function(t){var i=e.formData;return n.all([o(e.formData.issuer?"GRAPH.BLOCKCHAIN.TX_AMOUNT_PUBKEY_TITLE":"GRAPH.BLOCKCHAIN.TX_AMOUNT_TITLE",i),o(["GRAPH.BLOCKCHAIN.TX_AMOUNT_LABEL","GRAPH.BLOCKCHAIN.TX_COUNT_LABEL","GRAPH.BLOCKCHAIN.TX_AVG_BY_BLOCK","COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.DATE_MONTH_YEAR_PATTERN"]),r.blockchain.txCount(e.formData.currency,i)]).then((function(n){var i=n[0],o=n[1],r={hour:o["COMMON.DATE_PATTERN"],day:o["COMMON.DATE_SHORT_PATTERN"],month:o["COMMON.DATE_MONTH_YEAR_PATTERN"]};if((n=n[2])&&n.times){e.times=n.times,a("formatInteger");var l=a("formatDecimal");e.currencySymbol=a("currencySymbolNoHtml")(e.formData.currency,e.formData.useRelative),e.formData.rangeDuration,e.data=[n.amount,n.count];var c=r[e.formData.rangeDuration];e.labels=n.times.reduce((function(e,t){return e.concat(moment.unix(t).local().format(c))}),[]),e.colors=s.scale.fix(n.times.length),e.updateRange(n.times[0],n.times[n.times.length-1],t),e.options={responsive:!0,maintainAspectRatio:!0,title:{display:!0,text:i},scales:{yAxes:[{id:"y-axis-amount",position:"left"},{id:"y-axis-count",display:e.displayRightAxis,position:"right",gridLines:{drawOnChartArea:!1}}]},legend:{display:e.displayRightAxis,onClick:e.onLegendClick},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(t,n){return 0===t.datasetIndex?n.datasets[t.datasetIndex].label+": "+l(t.yLabel)+" "+e.currencySymbol:n.datasets[t.datasetIndex].label+": "+t.yLabel}}}},e.datasetOverride=[{yAxisID:"y-axis-amount",type:"bar",label:o["GRAPH.BLOCKCHAIN.TX_AMOUNT_LABEL"],hoverBackgroundColor:s.rgba.calm(.6)},{yAxisID:"y-axis-count",type:"line",label:o["GRAPH.BLOCKCHAIN.TX_COUNT_LABEL"],fill:!1,borderColor:s.rgba.gray(.5),borderWidth:2,backgroundColor:s.rgba.gray(.5),pointBackgroundColor:s.rgba.gray(.5),pointBorderColor:s.rgba.white(),pointHoverBackgroundColor:s.rgba.gray(1),pointHoverBorderColor:s.rgba.translucent(),pointRadius:3}]}}))},e.onChartClick=function(t,n,a){if(a){var o=e.times[a._index],r=moment.unix(o).utc().add(1,e.formData.rangeDuration).unix(),s="_exists_:transactions AND medianTime:>={0} AND medianTime:<{1}".format(o,r);e.formData.issuer&&(s+=" AND issuer:"+e.formData.issuer),i.go("app.blockchain_search",{q:s})}}}function ze(e,t,n,i,a,o,r){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.load=function(){return n.all([a(["GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_TITLE","GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_LABEL"]),r.blockchain.countByIssuer(e.formData.currency)]).then((function(t){var n=t[0];(t=t[1])&&t.data&&(e.data=t.data,e.labels=t.labels,e.blockCount=t.blockCount,e.issuers=t.issuers,e.barOptions={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0,text:n["GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_TITLE"]},scales:{yAxes:[{type:"linear",ticks:{beginAtZero:!0}}]}},e.colors=o.scale.custom(t.data.length))}))},e.onChartClick=function(t,n,a){if(a){var o=e.issuers[a._index];i.go("app.wot_identity",o)}}}function qe(e,t,n,i,a,o){e.extensionPoint=n.extensions.points.current.get(),e.enable=i.isEnable(),e.loading=!0,e.node=e.node||{},i.api.state.on.changed(e,(function(t){e.enable=t})),e.enter=function(n,i){return!e.node.currency&&i&&i.stateParams&&i.stateParams.currency&&(e.node.currency=i.stateParams.currency),e.node.currency?e.node.pubkey?e.load():t((function(){return e.enter(n,i)}),500):a.get().then((function(t){return e.node.currency=t?t.name:null,e.enter(n,i)}))},e.$on("$csExtension.enter",e.enter),e.load=function(){if(e.node.currency||e.node.pubkey)return console.info("[Graph] [peer] Loading blocks count for [{0}]".format(e.node.pubkey.substr(0,8))),o.node.blockCount(e.node.currency,e.node.pubkey).then((function(t){e.blockCount=t,e.loading=!1}))}}function Xe(e,t,n,i){e.extensionPoint=t.extensions.points.current.get(),e.enable=i.isEnable(),e.smallscreen=n.screen.isSmall(),i.api.state.on.changed(e,(function(t){e.enable=t}))}function Qe(e,t,n,i,a,o,r,s,l,c){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.formData.useRelative=angular.isDefined(e.formData.useRelative)?e.formData.useRelative:c.data.useRelative,e.displayShareAxis=!0,e.hiddenDatasets=[],e.init=function(e,t){},e.onUseRelativeChanged=function(){e.loading||e.load()},e.$watch("formData.useRelative",e.onUseRelativeChanged);var u=function(e){return Math.trunc(100*e)/100};e.load=function(t,i){return t=t||0,i=i||1e4,n.all([a(["GRAPH.CURRENCY.MONETARY_MASS_TITLE","GRAPH.CURRENCY.MONETARY_MASS_LABEL","GRAPH.CURRENCY.MONETARY_MASS_SHARE_LABEL"]),s.blockchain.withDividend(e.formData.currency,{from:t,size:i})]).then((function(t){var n=t[0];if((t=t[1])&&t.times){e.times=t.times;var i,a=t.times[t.times.length-1]-t.times[0];i=l(a<31557600?"medianDateShort":"formatDateMonth");var o=l("formatDecimal");e.currencySymbol=l("currencySymbolNoHtml")(e.formData.currency,e.formData.useRelative);var s=[];e.formData.useRelative?(s.push(t.blocks.reduce((function(e,t){return e.concat(u(t.monetaryMass/t.dividend/t.membersCount))}),[])),s.push(t.blocks.reduce((function(e,t){return e.concat(u(t.monetaryMass/t.dividend))}),[]))):(s.push(t.blocks.reduce((function(e,t){return e.concat(u(t.monetaryMass/t.membersCount/100))}),[])),s.push(t.blocks.reduce((function(e,t){return e.concat(t.monetaryMass/100)}),[]))),e.data=s,e.labels=t.times.reduce((function(e,t){return e.concat(i(t))}),[]),e.colors=r.scale.fix(t.times.length),e.options={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0,text:n["GRAPH.CURRENCY.MONETARY_MASS_TITLE"]},legend:{display:e.displayShareAxis,onClick:e.onLegendClick},scales:{yAxes:[{id:"y-axis-mn"},{id:"y-axis-mass",display:e.displayShareAxis,position:"right",gridLines:{drawOnChartArea:!1}}]},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(t,n){return n.datasets[t.datasetIndex].label+": "+o(t.yLabel)+" "+e.currencySymbol}}}},e.datasetOverride=[{yAxisID:"y-axis-mn",type:"line",label:n["GRAPH.CURRENCY.MONETARY_MASS_SHARE_LABEL"],borderWidth:2,pointRadius:0,pointHitRadius:4,pointHoverRadius:3},{yAxisID:"y-axis-mass",type:"line",label:n["GRAPH.CURRENCY.MONETARY_MASS_LABEL"],fill:!1,showLine:!0,borderColor:r.rgba.energized(),borderWidth:1,backgroundColor:r.rgba.energized(),pointBackgroundColor:r.rgba.energized(),pointBorderColor:r.rgba.energized(),pointHoverBackgroundColor:r.rgba.energized(),pointHoverBorderColor:r.rgba.energized(),pointRadius:0,pointHitRadius:4,pointHoverRadius:3}],e.setScale(e.scale),e.blocks=t.blocks.reduce((function(e,t){return e.concat(t.number)}),[])}}))},e.onChartClick=function(t,n,a){if(a){var o=e.blocks[a._index];i.go("app.view_block",{number:o})}},e.showActionsPopover=function(t){o.popover.show(t,{templateUrl:"plugins/graph/templates/currency/popover_monetary_mass_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function Je(e,t,n,i,a,o,r,s){e.formData={scale:"linear",beginAtZero:!1},angular.extend(this,n("GpCurrencyMonetaryMassCtrl",{$scope:e})),e.load=function(n,s){return n=n||0,s=s||1e4,t.all([i(["GRAPH.CURRENCY.UD_TITLE","COMMON.UNIVERSAL_DIVIDEND"]),o.blockchain.withDividend(e.formData.currency,{from:n,size:s})]).then((function(t){var n=t[0];if((t=t[1])&&t.times){e.times=t.times;var i,o=t.times[t.times.length-1]-t.times[0];i=r(o<31557600?"medianDateShort":"formatDateMonth");var s=r("formatDecimal");e.currencySymbol=r("currencySymbolNoHtml")(e.formData.currency,!1),e.data=[t.blocks.reduce((function(e,t){return e.concat(t.dividend/100)}),[])],e.labels=t.times.reduce((function(e,t){return e.concat(i(t))}),[]),e.colors=t.blocks.reduce((function(e){return e.concat(a.rgba.calm(.5))}),[]),e.options={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0,text:n["GRAPH.CURRENCY.UD_TITLE"]},scales:{yAxes:[{id:"y-axis-ud",ticks:{beginAtZero:e.formData.beginAtZero}}]},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(t,n){return n.datasets[t.datasetIndex].label+": "+s(t.yLabel)+" "+e.currencySymbol}}}},e.setScale(e.scale),e.datasetOverride=[{yAxisID:"y-axis-ud",type:"line",label:n["COMMON.UNIVERSAL_DIVIDEND"],borderWidth:2,pointRadius:0,pointHitRadius:4,pointHoverRadius:3}],e.blocks=t.blocks.reduce((function(e,t){return e.concat(t.number)}),[])}}))},e.showActionsPopover=function(t){s.popover.show(t,{templateUrl:"plugins/graph/templates/currency/popover_monetary_mass_actions.html",scope:e,autoremove:!0,afterShow:function(t){e.actionsPopover=t}})},e.hideActionsPopover=function(){e.actionsPopover&&(e.actionsPopover.hide(),e.actionsPopover=null)}}function Ze(e,t,n,i,a,o,r,s){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.load=function(t,i){return t=t||0,i=i||1e4,n.all([a(["GRAPH.CURRENCY.MEMBERS_COUNT_TITLE","GRAPH.CURRENCY.MEMBERS_COUNT_LABEL"]),r.blockchain.withDividend(e.formData.currency,{from:t,size:i,withCurrent:!0})]).then((function(t){var n=t[0];if((t=t[1])&&t.times){e.times=t.times;var i,a=t.times[t.blocks.length-1]-t.times[0];i=s(a<31557600?"medianDateShort":"formatDateMonth"),e.labels=t.times.reduce((function(e,t){return e.concat(i(t))}),[]),e.options={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0,text:n["GRAPH.CURRENCY.MEMBERS_COUNT_TITLE"]},scales:{xAxes:[{position:"bottom"}],yAxes:[{id:"y-axis-1",ticks:{beginAtZero:!1}}]}},e.datasetOverride=[{yAxisID:"y-axis-1",type:"line",label:n["GRAPH.CURRENCY.MEMBERS_COUNT_LABEL"],borderWidth:2,pointRadius:0,pointHitRadius:4,pointHoverRadius:3}],e.data=[t.blocks.reduce((function(e,t){return e.concat(t.membersCount)}),[])],e.colors=o.scale.fix(t.blocks.length)}}))},e.onChartClick=function(t,n,a){if(a)if(a._index){var o=e.times[a._index-1],r=moment.unix(o).utc().add(1,"day").unix();i.go("app.blockchain_search",{q:"(_exists_:joiners OR _exists_:leavers OR _exists_:revoked OR _exists_:excluded) AND medianTime:>{0} AND medianTime:<={1}".format(o,r)})}else i.go("app.view_block",{number:0})}}function et(e,t,n,i,a,o,r,s,l,c){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.init=function(t,n){n&&n.stateParams&&n.stateParams.pubkey?e.formData.pubkey=n.stateParams.pubkey:c.isLogin()&&(e.formData.pubkey=c.data.pubkey)};var u=e.setScale;e.setScale=function(t){e.data[e.data.length-2]="linear"===t?_.map(e.data[e.data.length-2],(function(e){return-1*Math.abs(e)})):_.map(e.data[e.data.length-2],(function(e){return Math.abs(e)})),u(t)},e.load=function(t){t=!angular.isDefined(t)||t;var i=!0;return r.load(e.formData.pubkey,null,{cache:!0}).then((function(t){return e.identity=t,i=e.identity.isMember||e.identity.wasMember,n.all([o("GRAPH.ACCOUNT.BALANCE_TITLE",e.formData),o(["GRAPH.ACCOUNT.UD_LABEL","GRAPH.ACCOUNT.TX_RECEIVED_LABEL","GRAPH.ACCOUNT.TX_SENT_LABEL","GRAPH.ACCOUNT.UD_ACCUMULATION_LABEL","GRAPH.ACCOUNT.TX_ACCUMULATION_LABEL","GRAPH.ACCOUNT.BALANCE_LABEL","COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.DATE_MONTH_YEAR_PATTERN"]),s.blockchain.movement(e.formData.currency,angular.copy(e.formData,{withUD:i}))])})).then((function(n){var o=n[0],r=n[1];if((n=n[2])&&n.times){e.times=n.times;var s=a("formatDecimal");e.currencySymbol=a("currencySymbolNoHtml")(e.formData.currency,e.formData.useRelative),e.data=[n.ud,n.received,n.sent,n.balance];var c={hour:r["COMMON.DATE_PATTERN"],day:r["COMMON.DATE_SHORT_PATTERN"],month:r["COMMON.DATE_MONTH_YEAR_PATTERN"]}[e.formData.rangeDuration];e.labels=n.times.reduce((function(e,t){return e.concat(moment.unix(t).local().format(c))}),[]),e.colors=l.scale.fix(n.times.length),e.updateRange(n.times[0],n.times[n.times.length-1],t),e.options={responsive:!0,maintainAspectRatio:!0,title:{display:!0,text:o},scales:{xAxes:[{stacked:!0}],yAxes:[{id:"y-axis-left",type:"linear",position:"left",stacked:!0}]},legend:{display:!0,onClick:e.onLegendClick},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(t,n){return n.datasets[t.datasetIndex].label+": "+(t.yLabel?s(t.yLabel)+" "+e.currencySymbol:"0")}}}},e.datasetOverride=[{yAxisID:"y-axis-left",type:"bar",label:r["GRAPH.ACCOUNT.UD_LABEL"],backgroundColor:l.rgba.energized(.3),hoverBackgroundColor:l.rgba.energized(.5),borderWidth:1},{yAxisID:"y-axis-left",type:"bar",label:r["GRAPH.ACCOUNT.TX_RECEIVED_LABEL"],backgroundColor:l.rgba.positive(.4),hoverBackgroundColor:l.rgba.positive(.6),borderWidth:1},{yAxisID:"y-axis-left",type:"bar",label:r["GRAPH.ACCOUNT.TX_SENT_LABEL"],backgroundColor:l.rgba.assertive(.4),hoverBackgroundColor:l.rgba.assertive(.6),borderWidth:1},{yAxisID:"y-axis-left",type:"line",label:r["GRAPH.ACCOUNT.BALANCE_LABEL"],fill:"origin",borderColor:l.rgba.calm(.5),borderWidth:2,pointBackgroundColor:l.rgba.calm(.5),pointBorderColor:l.rgba.white(),pointHoverBackgroundColor:l.rgba.calm(1),pointHoverBorderColor:"rgba(0,0,0,0)",pointRadius:3,lineTension:.1}],i||(e.data.splice(0,1),e.datasetOverride.splice(0,1))}}))},e.onChartClick=function(t,n,a){if(a){var o=e.times[a._index],r=moment.unix(o).utc().add(1,e.formData.rangeDuration).unix(),s="medianTime:>={0} AND medianTime:<{1}".format(o,r);e.formData.pubkey&&(s+=" AND (transactions.issuers:"+e.formData.pubkey+" OR transactions.outputs:*"+e.formData.pubkey+")"),i.go("app.blockchain_search",{q:s})}}}function tt(e,t,n,i,a,o){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.init=function(t,n){e.pubkey=n&&n.stateParams&&n.stateParams.pubkey},e.load=function(t,n){if(e.pubkey)return a.load(e.pubkey,-1).then((function(t){t&&t.tx&&t.tx.history&&(e.inputChart=e.computeChartData(_.filter(t.tx.history,(function(e){return e.amount>0}))),e.outputChart=e.computeChartData(_.filter(t.tx.history,(function(e){return e.amount<0}))))}))},e.computeChartData=function(e){var t=n("formatPubkey"),i={};_.forEach(e,(function(e){i[e.pubkey]=i[e.pubkey]||{label:e.name||e.uid||t(e.pubkey),pubkey:e.pubkey,sum:0},i[e.pubkey].sum+=Math.abs(e.amount)}));var a=_.sortBy(_.values(i),"sum").reverse();return _.each(a,(function(e){e.sum=e.sum/100})),{data:_.pluck(a,"sum"),labels:_.pluck(a,"label"),pubkeys:_.pluck(a,"pubkey"),colors:o.scale.custom(Math.max(10,a.length))}},e.onInputChartClick=function(t,n,a){if(a){var o=e.inputChart.pubkeys[a._index];i.go("app.wot_identity",{pubkey:o})}},e.onOutputChartClick=function(t,n,a){if(a){var o=e.outputChart.pubkeys[a._index];i.go("app.wot_identity",{pubkey:o})}}}function nt(e,t,n,i,a,o,r,s,l){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.init=function(t,n){n&&n.stateParams&&n.stateParams.pubkey?e.formData.pubkey=n.stateParams.pubkey:l.isLogin()&&(e.formData.pubkey=l.data.pubkey)},e.load=function(t){var i=e.formData;return n.all([o("GRAPH.ACCOUNT.CERTIFICATION_TITLE",i),o(["GRAPH.ACCOUNT.GIVEN_CERT_LABEL","GRAPH.ACCOUNT.RECEIVED_CERT_LABEL","GRAPH.ACCOUNT.GIVEN_CERT_DELTA_LABEL","GRAPH.ACCOUNT.RECEIVED_CERT_DELTA_LABEL","COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.DATE_MONTH_YEAR_PATTERN"]),r.wot.certifications(i)]).then((function(n){var i=n[0],o=n[1];if((n=n[2])&&n.times){e.times=n.times;var r=a("formatInteger");e.data=[n.deltaReceived,n.received,n.deltaGiven,n.given],e.labels=n.labels;var l={hour:o["COMMON.DATE_PATTERN"],day:o["COMMON.DATE_SHORT_PATTERN"],month:o["COMMON.DATE_MONTH_YEAR_PATTERN"]}[e.formData.rangeDuration];e.labels=n.times.reduce((function(e,t){return e.concat(moment.unix(t).local().format(l))}),[]),e.colors=s.scale.fix(n.times.length),e.updateRange(n.times[0],n.times[n.times.length-1],t),e.options={responsive:!0,maintainAspectRatio:!0,title:{display:!0,text:i},scales:{yAxes:[{id:"y-axis-left",type:"linear",position:"left"},{id:"y-axis-hide",type:"linear",display:!1,position:"right"}]},legend:{display:!0},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var n=(0===e.datasetIndex||2===e.datasetIndex)&&e.yLabel>0;return t.datasets[e.datasetIndex].label+": "+(n?"+":"")+!e.yLabel?"0":r(e.yLabel)}}}},e.datasetOverride=[{yAxisID:"y-axis-left",type:"bar",label:o["GRAPH.ACCOUNT.RECEIVED_CERT_DELTA_LABEL"],borderColor:s.rgba.positive(.6),borderWidth:1,backgroundColor:s.rgba.positive(.4),hoverBackgroundColor:s.rgba.positive(.6)},{yAxisID:"y-axis-left",type:"line",label:o["GRAPH.ACCOUNT.RECEIVED_CERT_LABEL"],fill:!1,borderColor:s.rgba.positive(.5),borderWidth:2,backgroundColor:s.rgba.positive(1),pointBackgroundColor:s.rgba.positive(.5),pointBorderColor:s.rgba.white(),pointHoverBackgroundColor:s.rgba.positive(1),pointHoverBorderColor:"rgba(0,0,0,0)",pointRadius:3},{yAxisID:"y-axis-left",type:"bar",label:o["GRAPH.ACCOUNT.GIVEN_CERT_DELTA_LABEL"],borderColor:s.rgba.assertive(.6),borderWidth:1,backgroundColor:s.rgba.assertive(.4),hoverBackgroundColor:s.rgba.assertive(.6)},{yAxisID:"y-axis-left",type:"line",label:o["GRAPH.ACCOUNT.GIVEN_CERT_LABEL"],fill:!1,borderColor:s.rgba.assertive(.4),borderWidth:2,backgroundColor:s.rgba.assertive(1),pointBackgroundColor:s.rgba.assertive(.4),pointBorderColor:s.rgba.white(),pointHoverBackgroundColor:s.rgba.assertive(1),pointHoverBorderColor:"rgba(0,0,0,0)",pointRadius:3,lineTension:.1}]}}))},e.onChartClick=function(t,n,a){if(a){var o=e.times[a._index],r=moment.unix(o).utc().add(1,e.formData.rangeDuration).unix(),s="_exists_:transactions AND medianTime:>={0} AND medianTime:<{1}".format(o,r);e.formData.pubkey&&(s+=" AND (transactions.issuers:"+e.formData.pubkey+" OR transactions.outputs:*"+e.formData.pubkey+")"),i.go("app.blockchain_search",{q:s})}}}function it(e,t,n,i,a,o,r,s){angular.extend(this,n("GpCurrencyAbstractCtrl",{$scope:e})),e.formData.rangeDuration="month",e.displayRightAxis=!0,e.hiddenDatasets=[],e.chartIdPrefix="docstats-chart-",e.charts=[{id:"user",title:"GRAPH.DOC_STATS.USER.TITLE",series:[{key:"user_profile",label:"GRAPH.DOC_STATS.USER.USER_PROFILE",color:o.rgba.royal(.7),pointHoverBackgroundColor:o.rgba.royal(),clickState:{name:"app.document_search",params:{index:"user",type:"profile"}}},{key:"user_settings",label:"GRAPH.DOC_STATS.USER.USER_SETTINGS",color:o.rgba.gray(.5),pointHoverBackgroundColor:o.rgba.gray(),clickState:{name:"app.document_search",params:{index:"user",type:"settings"}}}]},{id:"user_delta",title:"GRAPH.DOC_STATS.USER_DELTA.TITLE",series:[{key:"user_profile_delta",label:"GRAPH.DOC_STATS.USER_DELTA.USER_PROFILE",type:"line",yAxisID:"y-axis-delta",color:o.rgba.royal(),pointHoverBackgroundColor:o.rgba.royal()},{key:"user_settings_delta",label:"GRAPH.DOC_STATS.USER_DELTA.USER_SETTINGS",type:"line",yAxisID:"y-axis-delta",color:o.rgba.gray(.5),pointHoverBackgroundColor:o.rgba.gray()}]},{id:"message",title:"GRAPH.DOC_STATS.MESSAGE.TITLE",series:[{key:"message_inbox",label:"GRAPH.DOC_STATS.MESSAGE.MESSAGE_INBOX",color:o.rgba.royal(),pointHoverBackgroundColor:o.rgba.royal(),clickState:{name:"app.document_search",params:{index:"message",type:"inbox"}}},{key:"message_outbox",label:"GRAPH.DOC_STATS.MESSAGE.MESSAGE_OUTBOX",color:o.rgba.calm(),pointHoverBackgroundColor:o.rgba.calm(),clickState:{name:"app.document_search",params:{index:"message",type:"outbox"}}},{key:"invitation_certification",label:"GRAPH.DOC_STATS.MESSAGE.INVITATION_CERTIFICATION",color:o.rgba.gray(.5),pointHoverBackgroundColor:o.rgba.gray(),clickState:{name:"app.document_search",params:{index:"invitation",type:"certification"}}}]},{id:"social",title:"GRAPH.DOC_STATS.SOCIAL.TITLE",series:[{key:"page_record",label:"GRAPH.DOC_STATS.SOCIAL.PAGE_RECORD",color:o.rgba.royal(),pointHoverBackgroundColor:o.rgba.royal(),clickState:{name:"app.document_search",params:{index:"page",type:"record"}}},{key:"group_record",label:"GRAPH.DOC_STATS.SOCIAL.GROUP_RECORD",color:o.rgba.calm(),pointHoverBackgroundColor:o.rgba.calm(),clickState:{name:"app.document_search",params:{index:"group",type:"record"}}},{key:"page_comment",label:"GRAPH.DOC_STATS.SOCIAL.PAGE_COMMENT",color:o.rgba.gray(.5),pointHoverBackgroundColor:o.rgba.gray(),clickState:{name:"app.document_search",params:{index:"page",type:"comment"}}}]},{id:"other",title:"GRAPH.DOC_STATS.OTHER.TITLE",series:[{key:"history_delete",label:"GRAPH.DOC_STATS.OTHER.HISTORY_DELETE",color:o.rgba.gray(.5),pointHoverBackgroundColor:o.rgba.gray(),clickState:{name:"app.document_search",params:{index:"history",type:"delete"}}}]}];var l=s("formatInteger");e.defaultChartOptions={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0},legend:{display:!0,onClick:e.onLegendClick},scales:{xAxes:[{stacked:!0}],yAxes:[{id:"y-axis",stacked:!0},{id:"y-axis-delta",stacked:!1},{id:"y-axis-delta-right",stacked:!1,display:e.displayRightAxis,position:"right",gridLines:{drawOnChartArea:!1}}]},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(e,t){return t.datasets[e.datasetIndex].label+": "+l(e.yLabel)}}}},e.init=function(t,n){if(n&&n.stateParams){var i=n.stateParams&&n.stateParams.server||void 0;i&&(console.debug("[docstats] Will use server: "+i),angular.merge(e.formData,{server:n.stateParams.server,useSsl:n.stateParams.useSsl,useTor:n.stateParams.useTor}))}},e.load=function(t){return i.all([a(e.charts.reduce((function(e,t){return e.concat(t.series.reduce((function(e,t){return e.concat(t.label)}),[t.title]))}),["COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.DATE_MONTH_YEAR_PATTERN"])),r.docstat.get(e.formData)]).then((function(n){var i=n[0],a={hour:i["COMMON.DATE_PATTERN"],day:i["COMMON.DATE_SHORT_PATTERN"],month:i["COMMON.DATE_MONTH_YEAR_PATTERN"]};if((n=n[1])&&n.times){e.times=n.times;var r=a[e.formData.rangeDuration];e.labels=_.map(n.times,(function(e){return moment.unix(e).local().format(r)})),e.updateRange(n.times[0],n.times[n.times.length-1],t),e.setScale(e.scale),_.forEach(e.charts,(function(t){var a={};t.data=_.map(t.series,(function(e){if(a[e.yAxisID||"y-axis"]=!0,e.key.endsWith("_delta")){var t=e.key.substring(0,e.key.length-"_delta".length);return((i=n[t])?_.map(i,(function(e){var t=void 0!==e&&void 0!==o?e-(o||e):void 0;return o=e,t})):void 0)||[]}var i,o;return n[e.key]||[]})),t.options=angular.copy(e.defaultChartOptions),t.options.title.text=i[t.title],t.options.scales.yAxes=t.options.scales.yAxes.reduce((function(e,t){return a[t.id]?e.concat(t):e}),[]),t.datasetOverride=_.map(t.series,(function(e){return{yAxisID:e.yAxisID||"y-axis",type:e.type||"line",label:i[e.label],fill:"line"!==e.type,borderWidth:2,pointRadius:"line"!==e.type?0:2,pointHitRadius:4,pointHoverRadius:3,borderColor:e.color,backgroundColor:e.color,pointBackgroundColor:e.color,pointBorderColor:e.color,pointHoverBackgroundColor:e.pointHoverBackgroundColor||e.color,pointHoverBorderColor:e.pointHoverBorderColor||o.rgba.white()}}))}))}}))},e.onChartClick=function(n,i,a){if(a){var o=_.find(e.charts,(function(t){return e.chartIdPrefix+t.id==a._chart.canvas.id})).series[a._datasetIndex];if(o&&o.clickState&&o.clickState.name){var r=o.clickState.params?angular.copy(o.clickState.params):{},s=e.times[a._index],l=moment.unix(s).utc().add(1,e.formData.rangeDuration).unix();return r.q="time:>={0} AND time:<{1}".format(s,l),t.go(o.clickState.name,r)}console.debug("Click on item index={0} on range [{1},{2}]".format(a._index,s,l))}}}function at(e,t,n,i,a,o,r){angular.extend(this,t("GpCurrencyAbstractCtrl",{$scope:e})),e.formData.rangeDuration="month",e.hiddenDatasets=[],e.charts=[{id:"count",title:"GRAPH.SYNCHRO.COUNT.TITLE",series:[{key:"inserts",type:"bar",label:"GRAPH.SYNCHRO.COUNT.INSERTS",color:a.rgba.royal(),pointHoverBackgroundColor:a.rgba.royal()},{key:"updates",type:"bar",label:"GRAPH.SYNCHRO.COUNT.UPDATES",color:a.rgba.calm(),pointHoverBackgroundColor:a.rgba.calm()},{key:"deletes",type:"bar",label:"GRAPH.SYNCHRO.COUNT.DELETES",color:a.rgba.assertive(.5),pointHoverBackgroundColor:a.rgba.assertive()}]},{id:"peer",title:"GRAPH.SYNCHRO.PEER.TITLE",series:[{key:"ES_USER_API",label:"GRAPH.SYNCHRO.PEER.ES_USER_API",color:a.rgba.royal(),pointHoverBackgroundColor:a.rgba.royal()},{key:"ES_SUBSCRIPTION_API",label:"GRAPH.SYNCHRO.PEER.ES_SUBSCRIPTION_API",color:a.rgba.gray(.5),pointHoverBackgroundColor:a.rgba.gray()}]},{id:"performance",title:"GRAPH.SYNCHRO.PERFORMANCE.TITLE",series:[{key:"duration",type:"bar",label:"GRAPH.SYNCHRO.PERFORMANCE.DURATION",color:a.rgba.gray(.5),pointHoverBackgroundColor:a.rgba.gray()}]}];var s=r("formatInteger");e.defaultChartOptions={responsive:!0,maintainAspectRatio:e.maintainAspectRatio,title:{display:!0},legend:{display:!0,onClick:e.onLegendClick},scales:{xAxes:[{stacked:!0}],yAxes:[{stacked:!0,id:"y-axis"}]},tooltips:{enabled:!0,mode:"index",callbacks:{label:function(e,t){return t.datasets[e.datasetIndex].label+": "+s(e.yLabel)}}}},e.init=function(t,n){if(n&&n.stateParams){var i=n.stateParams&&n.stateParams.server||void 0;i&&(console.debug("[synchro] Will use server: "+i),angular.merge(e.formData,n.stateParams))}},e.load=function(t){return n.all([i(e.charts.reduce((function(e,t){return e.concat(t.series.reduce((function(e,t){return e.concat(t.label)}),[t.title]))}),["COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.DATE_MONTH_YEAR_PATTERN"])),o.synchro.execution.get(e.formData)]).then((function(n){var i=n[0],o={hour:i["COMMON.DATE_PATTERN"],day:i["COMMON.DATE_SHORT_PATTERN"],month:i["COMMON.DATE_MONTH_YEAR_PATTERN"]};if((n=n[1])&&n.times){e.times=n.times;var r=o[e.formData.rangeDuration];e.labels=n.times.reduce((function(e,t){return e.concat(moment.unix(t).local().format(r))}),[]),e.updateRange(n.times[0],n.times[n.times.length-1],t),e.setScale(e.scale),_.forEach(e.charts,(function(t){t.data=[],_.forEach(t.series,(function(e){t.data.push(n[e.key]||[])})),t.options=angular.copy(e.defaultChartOptions),t.options.title.text=i[t.title],t.datasetOverride=t.series.reduce((function(e,t){return e.concat({yAxisID:"y-axis",type:t.type||"line",label:i[t.label],fill:!0,borderWidth:2,pointRadius:0,pointHitRadius:4,pointHoverRadius:3,borderColor:t.color,backgroundColor:t.color,pointBackgroundColor:t.color,pointBorderColor:t.color,pointHoverBackgroundColor:t.pointHoverBackgroundColor||t.color,pointHoverBorderColor:t.pointHoverBorderColor||a.rgba.white()})}),[])}))}}))}}function ot(e,t,n,i,a){var o=[];e.mapId="map-user-profile-"+e.$id,e.map=i.map({markers:{},center:{zoom:13}}),e.loading=!0,e.mapId=e.mapId||"map-abstract-"+e.$id,e.enter=function(n,i){return e.formData&&(e.formData.title||e.formData.geoPoint)?(e.loading=!0,e.load()):t(e.enter,500)},e.$on("$csExtension.enter",e.enter),e.$on("$ionicParentView.enter",e.enter),e.load=function(){return e.formData.geoPoint&&e.formData.geoPoint.lat&&e.formData.geoPoint.lon?e.map.markers.geoPoint?(e.map.markers.geoPoint.lat=e.formData.geoPoint.lat,void(e.map.markers.geoPoint.lng=e.formData.geoPoint.lon)):a("MAP.PROFILE.MARKER_HELP").then((function(t){e.map.markers.geoPoint={message:t,lat:parseFloat(e.formData.geoPoint.lat),lng:parseFloat(e.formData.geoPoint.lon),draggable:!0,focus:!0},angular.extend(e.map.center,{lat:e.map.markers.geoPoint.lat,lng:e.map.markers.geoPoint.lng});var n=e.$watch("map.markers.geoPoint",(function(){e.loading||e.map.markers.geoPoint&&e.map.markers.geoPoint.lat&&e.map.markers.geoPoint.lng&&(e.formData.geoPoint=e.formData.geoPoint||{},e.formData.geoPoint.lat=e.map.markers.geoPoint.lat,e.formData.geoPoint.lon=e.map.markers.geoPoint.lng)}),!0);o.push(n),e.ionItemClass||(e.ionItemClass="done in"),e.loading=!1})):(_.forEach(o,(function(e){e()})),o=[],delete e.map.markers.geoPoint,e.loading=!1,n.when())},e.$watch("formData.geoPoint",(function(){e.loading||e.load()}),!0)}function rt(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b){angular.extend(this,l("WotIdentityAbstractCtrl",{$scope:e})),angular.extend(this,l("ESWotIdentityViewCtrl",{$scope:e}));var g,f={member:{type:"awesomeMarker",icon:"person",markerColor:"blue"},pending:{type:"awesomeMarker",icon:"clock",markerColor:"lightgreen",iconColor:"gray"},wallet:{type:"awesomeMarker",icon:"key",markerColor:"lightgray"}};e.loading=!0,e.loadingMarker=!0,e.mapId="map-wot-"+e.$id,e.map=E.map({cache:"map-wot",layers:{overlays:{member:{type:"featureGroup",name:"MAP.WOT.VIEW.LAYER.MEMBER",visible:!0},pending:{type:"featureGroup",name:"MAP.WOT.VIEW.LAYER.PENDING",visible:!0},wallet:{type:"featureGroup",name:"MAP.WOT.VIEW.LAYER.WALLET",visible:!0}}},bounds:{},markers:{},loading:!0},e.mapId),e.showDescription=!1,c().then((function(){e.enableDescription=!d.screen.isSmall()&&"a"===ionic.Platform.grade.toLowerCase(),e.enableDescription||console.debug("[map] [wot] Disable profile description.",ionic.Platform.grade)})),e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!d.screen.isSmall()||t.enableBack})),e.enter=function(t,n){if(e.loading){if(d.loading.show({noBackdrop:!0}),n.stateParams&&n.stateParams.c){var i=n.stateParams.c.split(":");e.map.center.lat=parseFloat(i[0]),e.map.center.lng=parseFloat(i[1]),e.map.center.zoom=parseInt(i[2])}e.$watch("map.center",(function(){if(!e.loading)return a((function(){e.updateLocationHref()}),300)}),!0);var o=Date.now();e.loadMap().then(e.load).then((function(){console.debug("[map] [wot] Loaded in "+(Date.now()-o)+"ms"),e.showHelpTip()}))}else e.updateLocationHref(),e.showHelpTip()},e.$on("$ionicView.enter",e.enter),e.loadMap=function(){return s.all([r(["COMMON.BTN_HELP_TOUR_SCREEN","COMMON.BTN_REFRESH","MAP.COMMON.BTN_LOCALIZE_ME"]),u.getMap(e.mapId)]).then((function(t){var o=t[0],r=t[1];if(!e.map.loading)return r;d.screen.isSmall()||(L.easyButton({position:"topright",type:"replace",leafletClasses:!0,states:[{stateName:"show-help-tour",onClick:e.startHelpTour,title:o["COMMON.BTN_HELP_TOUR_SCREEN"],icon:"icon ion-easel"}]}).addTo(r),L.easyButton({position:"topright",type:"replace",leafletClasses:!0,states:[{stateName:"refresh",onClick:function(t,n){return e.load(n)},title:o["COMMON.BTN_REFRESH"],icon:"icon ion-refresh"}]}).addTo(r)),L.Control.loading({position:"topright",separate:!0}).addTo(r),E.control.localizeMe({title:o["MAP.COMMON.BTN_LOCALIZE_ME"]}).addTo(r),g=L.layerGroup({visible:!1});var s=i(n.get("plugins/map/templates/wot/item_search_tooltip.html"));E.control.search({layer:g,propertyName:"title",buildTip:function(e,t){return s(t.layer.options)},moveToLocation:function(e,t,n){this.options.zoom?this._map.setView(e,this.options.zoom):this._map.panTo(e);var i=e.layer&&e.layer.options&&e.layer.options.popupMarkerId;a((function(){var e=i&&_.find(n._layers,(function(e){return e.options&&e.options.id===i}));e&&e.openPopup()}),400)},firstTipSubmit:!0,tooltipLimit:50}).addTo(r);var l=function(e){return e.options&&e.options.layer},c=L.markerClusterGroup({disableClusteringAtZoom:E.constants.LOCALIZE_ZOOM,maxClusterRadius:65,showCoverageOnHover:!1,iconCreateFunction:function(e){var t=_.countBy(e.getAllChildMarkers(),l),n=t.member?"blue":t.pending?"lightgreen":"lightgray",i=e.getChildCount(),a="marker-cluster "+n+" marker-cluster-";return a+=i<10?"small":i<100?"medium":"large",L.divIcon({html:"<div><span>"+i+"</span></div>",className:a,iconSize:new L.Point(40,40)})}});return r.eachLayer((function(e){e.addLayer&&angular.extend(e,L.featureGroup.subGroup(c))})),c.addTo(r),e.map.loading=!1,r}))},e.load=function(i){if(!i)return u.getMap(e.mapId).then(e.load);e.loading=!0,i.fire("dataloading");var o={fields:{description:e.enableDescription}};return e.map.bounds,b.load(o).then((function(o){var r={};if(g.clearLayers(),o&&o.length){var s=t("formatPubkey"),l=n.get("plugins/map/templates/wot/popup_marker.html");_.forEach(o,(function(t){var n=t.pending?"pending":t.uid?"member":"wallet",i=s(t.pubkey),a=t.index+"_"+(t.id||(t.uid?t.uid+":"+t.pubkey:t.pubkey)).replace(/-/g,"_"),o={layer:n,icon:f[n],opacity:t.uid?1:.7,title:t.name+" | "+i,lat:t.geoPoint.lat,lng:t.geoPoint.lon,getMessageScope:function(){var n=e.$new();return n.loadingMarker=!0,n.formData={},n.$applyAsync((function(){n.formData={pubkey:t.pubkey,uid:t.uid,name:t.name,profile:t},n.loadingMarker=!1})),n},focus:!1,message:l,id:a};r[a]=o;var c=t.name+(t.uid&&t.uid!=t.name?" | "+t.uid:"")+" | "+i,u=angular.merge({type:n,opacity:0,icon:L.divIcon({className:n+" ng-hide",iconSize:L.point(0,0)})},{title:c,pubkey:t.pubkey,uid:t.uid,name:t.name,pending:t.pending,popupMarkerId:a});g.addLayer(new L.Marker({lat:t.geoPoint.lat,lng:t.geoPoint.lon},u))}))}return e.map.markers=r,a((function(){e.loading=!1,i.fire("dataload"),d.loading.hide()}))})).catch((function(t){e.map.markers={},e.loading=!1,d.onError("MAP.WOT.ERROR.LOAD_POSITION_FAILED")(t)}))},e.updateLocationHref=function(t){(o.search()||{}).c&&E.center.isDefault(e.map.center)||(t=t||"{0}:{1}:{2}".format(e.map.center.lat.toFixed(4),e.map.center.lng.toFixed(4),e.map.center.zoom),o.search({c:t}).replace())},e.startHelpTour=function(){return e.showHelpTip(0,!0)},e.showHelpTip=function(t,n){if((n||m.isLogin())&&(t=angular.isDefined(t)?t:angular.isNumber(p.data.helptip.mapwot)?p.data.helptip.mapwot:0,n=!!angular.isDefined(n)&&n,!(t<0||t>2))){var i=e.createHelptipScope(n,"MapHelpTipCtrl");if(i)return i.tour=n,i.mapId=e.mapId,i.startMapWotTour(t,!1).then((function(e){i.$destroy(),p.data.helptip.mapwot=angular.isNumber(p.data.helptip.mapwot)?Math.max(e,p.data.helptip.mapwot):e,p.store()}))}}}function st(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){var b,g={shop:{type:"awesomeMarker",icon:"page-shop",markerColor:"blue"},company:{type:"awesomeMarker",icon:"page-company",markerColor:"blue"},association:{type:"awesomeMarker",icon:"page-association",markerColor:"lightgreen",iconColor:"gray"},institution:{type:"awesomeMarker",icon:"page-institution",markerColor:"lightgray"}};e.loading=!0,e.loadingMarker=!0,e.mapId="map-registry-"+e.$id,e.map=m.map({cache:"map-registry",layers:{overlays:{shop:{type:"featureGroup",name:"MAP.REGISTRY.VIEW.LAYER.SHOP",visible:!0},company:{type:"featureGroup",name:"MAP.REGISTRY.VIEW.LAYER.COMPANY",visible:!0},association:{type:"featureGroup",name:"MAP.REGISTRY.VIEW.LAYER.ASSOCIATION",visible:!0},institution:{type:"featureGroup",name:"MAP.REGISTRY.VIEW.LAYER.INSTITUTION",visible:!0}}},bounds:{},markers:{},loading:!0},e.mapId),e.formData={},e.showDescription=!1,l().then((function(){e.enableDescription=!u.screen.isSmall()&&"a"===ionic.Platform.grade.toLowerCase(),e.enableDescription||console.debug("[map] [wot] Disable profile description.",ionic.Platform.grade)})),e.$on("$ionicView.beforeEnter",(function(e,t){t.enableBack=!!u.screen.isSmall()||t.enableBack})),e.enter=function(t,n){if(e.loading){if(n.stateParams&&n.stateParams.c){var i=n.stateParams.c.split(":");e.map.center.lat=parseFloat(i[0]),e.map.center.lng=parseFloat(i[1]),e.map.center.zoom=parseInt(i[2])}e.$watch("map.center",(function(){if(!e.loading)return a((function(){e.updateLocationHref()}),300)}),!0),e.loadMap().then((function(){return p.isLogin()&&e.showHelpTip(),e.load()}))}else e.updateLocationHref(),p.isLogin()&&e.showHelpTip()},e.$on("$ionicView.enter",e.enter),e.loadMap=function(){return s.all([r(["COMMON.BTN_HELP_TOUR_SCREEN","COMMON.BTN_REFRESH","MAP.COMMON.BTN_LOCALIZE_ME"]),c.getMap(e.mapId)]).then((function(t){var o=t[0],r=t[1];if(!e.map.loading)return r;u.screen.isSmall()||L.easyButton({position:"topright",type:"replace",leafletClasses:!0,states:[{stateName:"refresh",onClick:function(t,n){return e.load(n)},title:o["COMMON.BTN_REFRESH"],icon:"icon ion-refresh"}]}).addTo(r),L.Control.loading({position:"topright",separate:!0}).addTo(r),m.control.localizeMe({title:o["MAP.COMMON.BTN_LOCALIZE_ME"]}).addTo(r),b=L.layerGroup({visible:!1});var s=i(n.get("plugins/map/templates/registry/item_search_tooltip.html"));m.control.search({layer:b,propertyName:"title",buildTip:function(e,t){return s(t.layer.options)},moveToLocation:function(e,t,n){this.options.zoom?this._map.setView(e,this.options.zoom):this._map.panTo(e);var i=e.layer&&e.layer.options&&e.layer.options.popupMarkerId;a((function(){var e=i&&_.find(n._layers,(function(e){return e.options&&e.options.id===i}));e&&e.openPopup()}),400)},firstTipSubmit:!0,tooltipLimit:50}).addTo(r);var l=function(e){return e.options&&e.options.layer},c=L.markerClusterGroup({disableClusteringAtZoom:m.constants.LOCALIZE_ZOOM,maxClusterRadius:65,showCoverageOnHover:!1,iconCreateFunction:function(e){var t=_.countBy(e.getAllChildMarkers(),l),n=t.shop||t.company?"blue":t.association?"lightgreen":"lightgray",i=e.getChildCount(),a="marker-cluster "+n+" marker-cluster-";return a+=i<10?"small":i<100?"medium":"large",L.divIcon({html:"<div><span>"+i+"</span></div>",className:a,iconSize:new L.Point(40,40)})}});return r.eachLayer((function(e){e.addLayer&&angular.extend(e,L.featureGroup.subGroup(c))})),c.addTo(r),e.map.loading=!1,r}))},e.load=function(i){if(!i)return c.getMap(e.mapId).then(e.load);e.loading=!0,i.fire("dataloading");var a={fields:{description:e.enableDescription}};return E.load(a).then((function(a){var o={};if(b.clearLayers(),a&&a.length){var r=t("formatPubkey"),s=n.get("plugins/map/templates/registry/popup_marker.html");_.forEach(a,(function(t){var n=r(t.pubkey),i=t.index+"_"+t.id.replace(/-/g,"_"),a={layer:t.type,icon:g[t.type],opacity:1,title:t.name+" | "+n,lat:t.geoPoint.lat,lng:t.geoPoint.lon,getMessageScope:function(){var n=e.$new();return n.loadingMarker=!0,n.formData={},n.$applyAsync((function(){angular.extend(n.formData,t),n.loadingMarker=!1})),n},focus:!1,message:s,id:i};o[i]=a;var l=t.name+" | "+n,c=angular.merge({type:t.type,opacity:0,icon:L.divIcon({className:t.type+" ng-hide",iconSize:L.point(0,0)})},{title:l,pubkey:t.pubkey,name:t.name,popupMarkerId:i});b.addLayer(new L.Marker({lat:t.geoPoint.lat,lng:t.geoPoint.lon},c))}))}e.map.markers=o,e.loading=!1,i.fire("dataload")})).catch((function(t){e.map.markers={},e.loading=!1,u.onError("MAP.WOT.ERROR.LOAD_POSITION_FAILED")(t)}))},e.updateLocationHref=function(t){(o.search()||{}).c&&m.center.isDefault(e.map.center)||(t=t||"{0}:{1}:{2}".format(e.map.center.lat.toFixed(4),e.map.center.lng.toFixed(4),e.map.center.zoom),o.search({c:t}).replace())},e.$on("centerUrlHash",(function(t,n){if(!e.loading)return a((function(){e.updateLocationHref(n)}),300)})),e.startHelpTour=function(){return e.showHelpTip(0,!0)},e.showHelpTip=function(t,n){if(t=angular.isDefined(t)?t:angular.isNumber(d.data.helptip.mapwot)?d.data.helptip.mapwot:0,n=!!angular.isDefined(n)&&n,!(t<0||t>2)){var i=e.createHelptipScope(n,"MapHelpTipCtrl");if(i)return i.tour=n,i.mapId=e.mapId,i.startMapWotTour(t,!1).then((function(e){i.$destroy(),d.data.helptip.mapwot=angular.isNumber(d.data.helptip.mapwot)?Math.max(e,d.data.helptip.mapwot):e,d.store()}))}}}function lt(e,t){e.mapId="map-page-"+e.$id,angular.extend(this,t("MapEditPositionAbstractCtrl",{$scope:e}))}function ct(e,t){e.mapId="map-profile-"+e.$id,angular.extend(this,t("MapEditPositionAbstractCtrl",{$scope:e}))}function ut(e,t){angular.extend(this,t("HelpTipCtrl",{$scope:e})),e.mapId=void 0,e.startMapWotTour=function(t,n){var i=[function(){return e.showHelpTip("helptip-map-wot",{bindings:{content:"MAP.HELP.TIP.WOT",icon:{position:"center",glyph:"ion-information-circled"}}})},function(){return e.showHelpTip(null,{selector:"#{0} .leaflet-control-search".format(e.mapId),bindings:{content:"MAP.HELP.TIP.WOT_BTN_SEARCH",icon:{position:"center"}}})},function(){return e.showHelpTip(null,{selector:"#{0} .leaflet-control-layers".format(e.mapId),bindings:{content:"MAP.HELP.TIP.WOT_BTN_LAYERS",icon:{position:"right"},hasNext:n}})}];return e.executeStep("mapwot",i,t)}}if(angular.module("cesium.settings.services",["ngApi","cesium.config"]).factory("csSettings",["$rootScope","$q","$window","Api","localStorage","$translate","csConfig",function(e,t,n,i,a,o,r){var s=[{id:"en",label:"English",flag:"us"},{id:"en-GB",label:"English (UK)",flag:"gb"},{id:"eo-EO",label:"Esperanto",flag:"eo"},{id:"fr-FR",label:"Français",flag:"fr"},{id:"nl-NL",label:"Nederlands",flag:"nl"},{id:"es-ES",label:"Spanish",flag:"es"},{id:"it-IT",label:"Italiano",flag:"it"}],l=r.fallbackLanguage?c(r.fallbackLanguage):"en";function c(e){if(!e)return l;if(_.findWhere(s,{id:e}))return e;var t=e.split("-");if(t.length>1)return c(t[0]);var n=_.find(s,(function(t){return String.prototype.startsWith.call(t.id,e)}));return n?n.id:l}var u,d,p,m,E={STORAGE_KEY:"settings",KEEP_AUTH_IDLE_SESSION:9999},b={timeout:4e3,cacheTimeMs:6e4,timeWarningExpireMembership:5184e3,timeWarningExpire:7776e3,minVersion:"1.1.0",newIssueUrl:"https://git.duniter.org/clients/cesium-grp/cesium/issues/new",userForumUrl:"https://forum.monnaie-libre.fr",latestReleaseUrl:"https://api.github.com/repos/duniter/cesium/releases/latest",duniterLatestReleaseUrl:"https://api.github.com/repos/duniter/duniter/releases/latest",httpsMode:!1},g=angular.merge({useRelative:!1,useLocalStorage:!!n.localStorage,useLocalStorageEncryption:!1,persistCache:!1,walletHistoryTimeSecond:2592e3,walletHistorySliceSecond:432e3,walletHistoryAutoRefresh:!0,rememberMe:!0,keepAuthIdle:600,showUDHistory:!0,expertMode:!1,decimalCount:4,uiEffects:!0,blockValidityWindow:6,helptip:{enable:!0,installDocUrl:"https://duniter.org/en/wiki/duniter/install/",currency:0,network:0,wotLookup:0,wot:0,wotCerts:0,wallet:0,walletCerts:0,wallets:0,header:0,settings:0},currency:{allRules:!1,allWotRules:!1},wallet:{showPubkey:!0,alertIfUnusedWallet:!0},locale:{id:(p=r.defaultLanguage||o.use(),m=c(p),p!==m&&console.debug("[settings] Fix locale [{0}] -> [{1}]".format(p,m)),m)},license:{en:"license/license_g1-en","fr-FR":"license/license_g1-fr-FR","es-ES":"license/license_g1-es-ES"}},b,r),f={},T=!1,h=new i(this,"csSettings");g.walletHistoryAutoRefresh=!1;var v=function(){if(angular.isUndefined(u)||!angular.equals(u,f))return u=angular.copy(f),h.data.raise.changed(f)},I=function(){return T?(f.useLocalStorage?!0===f.node.temporary?a.getObject(E.STORAGE_KEY).then((function(e){var t=angular.copy(f);return t.node=e&&e.node||{},delete t.temporary,a.setObject(E.STORAGE_KEY,t)})):a.setObject(E.STORAGE_KEY,f):a.setObject(E.STORAGE_KEY,null)).then((function(){return f.useLocalStorage&&console.debug("[setting] Saved locally"),h.data.raisePromise.store(f)})).then(v):(console.debug("[setting] Waiting start finished..."),(d||R()).then(I))},O=function(e){if(e){var t=!1;if(e.locale&&e.locale.id){var n=c(e.locale.id);e.locale=_.findWhere(s,{id:n}),t=!f.locale||e.locale.id!==f.locale.id||e.locale.id!==o.use()}_.keys(b).forEach((function(t){e[t]=g[t]})),angular.merge(f,e),(e&&e.node&&!e.node.temporary||!f.node.temporary)&&delete f.node.temporary,t&&o.use(f.locale.id)}},N=function(){var e=Date.now();return a.getObject(E.STORAGE_KEY).then((function(t){if(!t)return console.debug("[settings] No settings in local storage. Using defaults."),O(g),void v();O(t),console.debug("[settings] Loaded from local storage in "+(Date.now()-e)+"ms"),v()}))},R=function(){return console.debug("[settings] Starting..."),d=a.ready().then(N).then((function(){console.debug("[settings] Started"),T=!0,d=null,h.data.raise.ready(f)}))};return e.$on("$translateChangeSuccess",(function(){var e=o.use();console.debug("[settings] Locale ["+e+"]");try{moment.locale(e.toLowerCase())}catch(t){try{moment.locale(e.substr(0,2))}catch(e){moment.locale("en-gb"),console.warn("[settings] Unknown local for moment lib. Using default [en]")}}try{numeral.language(e.toLowerCase())}catch(t){try{numeral.language(e.substring(0,2))}catch(e){numeral.language("en-gb"),console.warn("[settings] Unknown local for numeral lib. Using default [en]")}}h.locale.raise.changed(e)})),h.registerEvent("data","reset"),h.registerEvent("data","changed"),h.registerEvent("data","store"),h.registerEvent("data","ready"),h.registerEvent("locale","changed"),O(g),{isStarted:function(){return T},ready:function(){return T?t.when():d||R()},start:R,data:f,apply:O,getByPath:function(e,t){var n=f;return _.each(e.split("."),(function(e){n=n[e],angular.isUndefined(n)&&(n=t)})),n},reset:function(){return _.keys(f).forEach((function(e){delete f[e]})),O(g),h.data.raisePromise.reset(f).then(I)},store:I,restore:N,getLicenseUrl:function(){var e=f.locale&&f.locale.id||r.defaultLanguage||"en";return r.license?r.license[e]?r.license[e]:g.license[r.defaultLanguage||"en"]||r.license:void 0},getFeedUrl:function(){var e=f.locale&&f.locale.id||r.defaultLanguage||"en";return r.feed&&r.feed.jsonFeed?r.feed.jsonFeed[e]?r.feed.jsonFeed[e]:g.feed.jsonFeed[r.defaultLanguage||"en"]||r.feed:void 0},defaultSettings:g,api:h,locales:s,constants:E}}]),angular.module("cesium.network.services",["ngApi","cesium.currency.services","cesium.http.services"]).factory("csNetwork",["$rootScope","$q","$interval","$timeout","$window","csConfig","BMA","csHttp","csCurrency","Api",function(t,i,a,o,r,s,l,c,u,d){var p,m="https:"===r.location.protocol,E=new d(this,"csNetwork"),b={bma:null,listeners:[],loading:!0,peers:[],filter:{member:!0,mirror:!0,endpoint:null,online:!1,bma:!1,ssl:void 0,tor:void 0},sort:{type:null,asc:!0,compact:!0},groupBy:"pubkey",expertMode:!1,knownBlocks:[],mainBlock:null,minOnlineBlockNumber:0,uidsByPubkeys:null,searchingPeersOnNetwork:!1,difficulties:null,ws2pHeads:null,timeout:s.timeout},g=function(e){return e&&[e.number,e.hash].join("-")},f=function(){return b.bma.network.ws2p.heads().then((function(e){b.ws2pHeads=e.heads?e.heads.reduce((function(e,t){if(t.message&&t.sig)try{var i=new n(t.message);e[[i.pubkey,i.ws2pid].join("-")]=i}catch(e){console.error("[network] Ignoring WS2P head.",e&&e.message||e)}return e}),{}):{}})).catch((function(e){if(e&&e.ucode==l.errorCodes.HTTP_LIMITATION)return o((function(){return f()}),3e3);console.error(e),b.ws2pHeads={}}))},T=function(){return b.bma.blockchain.stats.difficulties().then((function(e){b.difficulties=e.levels?e.levels.reduce((function(e,t){return t.uid&&t.level&&(e[t.uid]=t.level),e}),{}):{}})).catch((function(e){if(e&&e.ucode==l.errorCodes.HTTP_LIMITATION)return o((function(){return T()}),3e3);console.error(e),b.difficulties={}}))},h=function(){b.peers=[],b.searchingPeersOnNetwork=!0,b.loading=!0,b.bma=b.bma||l;var t=[];p&&a.cancel(p),p=a((function(){t.length?R(t):b.loading&&!b.searchingPeersOnNetwork&&(b.loading=!1,a.cancel(p),S(!0),console.debug("[network] Finish: {0} peers found.".format(b.peers.length)))}),1e3);var n=[b.bma.wot.member.uids().then((function(e){b.uidsByPubkeys=e})).catch((function(e){console.error(e),b.uidsByPubkeys={}})),f()];return b.expertMode&&n.push(T()),i.all(n).then((function(){return b.bma&&b.bma.network.peers()})).then((function(n){if(n&&n.peers&&n.peers.length){if(!b.filter.online)return i.all(_(n&&n.peers||[]).reduce((function(e,n){return e.concat(I(n,t))}),[]));var a=[];_.forEach(n.peers,(function(e){"UP"===e.status&&(e.blockNumber=e.block&&parseInt(e.block.split("-")[0]),e.blockNumber&&e.blockNumber<b.minOnlineBlockNumber?console.debug("[network] Exclude a too old peer document, on pubkey {0}".format(e.pubkey.substring(0,6))):(a.push(I(e,t)),_.forEach(e.endpoints||[],(function(t){if(t.startsWith("WS2P")){var n=e.pubkey+"-"+t.split(" ")[1];b.ws2pHeads[n]&&(b.ws2pHeads[n].hasEndpoint=!0)}}))))}));var o=_.values(b.ws2pHeads);if(o&&o.length){var r=0;_.forEach(o,(function(n){if(!n.hasEndPoint){var i=n.buid&&parseInt(n.buid.split("-")[0]);if(i&&i<b.minOnlineBlockNumber)return void console.debug("[network] Exclude a too old WS2P message, on pubkey {0}".format(n.pubkey.substring(0,6)));var a=new e({buid:n.buid,currentNumber:i,pubkey:n.pubkey,version:n.version,powPrefix:n.powPrefix,online:!0,uid:b.uidsByPubkeys[n.pubkey],bma:{useWs2p:!0,private:!0,ws2pid:n.ws2pid},endpoints:["WS2P "+n.ws2pid]});a.id=a.keyID(),a.uid&&b.expertMode&&b.difficulties&&(a.difficulty=b.difficulties[a.uid]),v(a)&&(t.push(a),r++)}})),r&&console.debug("[http] Found {0} WS2P endpoints without endpoint (private ?)".format(r))}return a.length?i.all(a):void 0}})).then((function(){b.searchingPeersOnNetwork=!1})).catch((function(e){console.error(e),b.searchingPeersOnNetwork=!1}))},v=function(e){return!(b.filter&&(b.filter.member&&!b.filter.mirror&&!e.uid||b.filter.mirror&&!b.filter.member&&e.uid||b.filter.endpoint&&!e.hasEndpoint(b.filter.endpoint)||b.filter.online&&"UP"!==e.status&&e.oldBlock||!b.filter.online&&"UP"===e.status&&!e.oldBlock||angular.isDefined(b.filter.bma)&&e.isBma()!=b.filter.bma||angular.isDefined(b.filter.ws2p)&&e.isWs2p()!=b.filter.ws2p||angular.isDefined(b.filter.ssl)&&e.isSsl()!=b.filter.ssl||angular.isDefined(b.filter.tor)&&e.isTor()!=b.filter.tor))},I=function(e,t){t=t||b.newPeers,e.blockNumber=e.block&&parseInt(e.block.split("-")[0]),e.oldBlock="UP"===e.status&&e.blockNumber&&e.blockNumber<b.minOnlineBlockNumber;var n=O(e),a=!1,o=n.reduce((function(e,n){var i=_.findWhere(b.peers,{id:n.id}),o=i?i.buid:null,r=!!i&&i.online;return e.concat(N(n).then((function(e){if(i)if(!e||e.online!==b.filter.online&&"all"!==b.filter.online){var s=b.peers.indexOf(i);-1!==s&&(console.debug("[network] Peer [{0}] removed (cause: {1})".format(n.server,e?e.online?"UP":"DOWN":"filtered")),b.peers.splice(s,1),a=!0)}else e.buid!==o?(console.debug("[network] {0} endpoint [{1}] new current block".format(e.bma&&(e.bma.useBma?"BMA":"WS2P")||"null",e.server)),a=!0):r!==e.online?(console.debug("[network] {0} endpoint [{1}] is now {2}".format(e.bma&&(e.bma.useBma?"BMA":"WS2P")||"null",e.server,e.online?"UP":"DOWN")),a=!0):console.debug("[network] {0} endpoint [{1}] unchanged".format(e.bma&&(e.bma.useBma?"BMA":"WS2P")||"null",e.server));else!e||e.online!==b.filter.online&&"all"!==b.filter.online||(console.debug("[network] {0} endpoint [{1}] is {2}".format(e.bma&&(e.bma.useBma?"BMA":"WS2P")||"null",e.server,e.online?"UP":"DOWN")),t.push(e),a=!0)})))}),[]);return(1===o.length?o[0]:i.all(o)).then((function(){return a}))},O=function(t,n){if(!t)return[];var i=new e(t);if(!n){var a=i.getEndpoints();if(!a)return[];var o=a.reduce((function(e,t){var n=l.node.parseEndPoint(t);return n?e.concat(n):e}),[]);if(o.length>1)return o.reduce((function(e,n){return e.concat(O(t,n))}),[]);n=o[0]}return i.bma=n,i.server=i.getServer(),i.dns=i.getDns(),i.buid=i.buid||i.block,i.blockNumber=i.buid&&parseInt(i.buid.split("-")[0]),i.uid=i.pubkey&&b.uidsByPubkeys[i.pubkey],i.id=i.keyID(),[i]},N=function(e){if(!v(e))return i.when();if(!b.filter.online||!b.filter.online&&"DOWN"===e.status||!e.getHost())return e.online=!1,i.when(e);if(e.bma.useWs2p&&b.ws2pHeads){var t=[e.pubkey,e.bma.ws2pid].join("-"),n=b.ws2pHeads[t];return delete b.ws2pHeads[t],n&&(e.buid=n.buid,e.currentNumber=n.buid&&parseInt(n.buid.split("-")[0]),e.version=n.version,e.powPrefix=n.powPrefix),e.online=!!e.buid,e.uid&&b.expertMode&&b.difficulties&&(e.difficulty=b.difficulties[e.uid]),i.when(e)}return e.bma.useWs2p||!m||e.bma.useSsl?e.bma.useTor||e.bma.useWs2p?(e.online="UP"===e.status,e.buid=-1,delete e.version,e.uid&&b.expertMode&&b.difficulties&&(e.difficulty=b.difficulties[e.uid]),i.when(e)):(e.api=e.api||l.lightInstance(e.getHost(),e.getPort(),e.isSsl(),b.timeout),e.api.blockchain.current(!1).then((function(t){return e.currentNumber=t.number,e.online=!0,e.buid=g(t),e.medianTime=t.medianTime,-1===b.knownBlocks.indexOf(e.buid)&&b.knownBlocks.push(e.buid),e})).catch((function(t){if(t&&t.ucode==l.errorCodes.NO_CURRENT_BLOCK)return e.online=!0,e.buid=g({number:0,hash:l.constants.ROOT_BLOCK_HASH}),e.difficulty=0,e;if(!e.secondTry){var n=e.bma||e.getBMA();if(n.dns&&-1===e.server.indexOf(n.dns))return e.secondTry=!0,e.api=l.lightInstance(n.dns,n.port,n.useSsl),N(e)}return e.buid=null,e.blockNumber=null,e.currentNumber=null,e.online=!1,e.uid=b.uidsByPubkeys[e.pubkey],e})).then((function(e){if(!(b.filter.online&&e&&e.online&&b.expertMode))return e;var t=[];return e.uid&&t.push(e.api.blockchain.stats.hardship({pubkey:e.pubkey}).then((function(t){e.difficulty=t?t.level:null})).catch((function(){e.difficulty=null}))),t.push(e.api.node.summary().then((function(t){e.software=t&&t.duniter&&t.duniter.software||void 0,e.version=t&&t.duniter&&t.duniter.version||"?"})).catch((function(){e.software=void 0,e.version="?"}))),i.all(t).then((function(){return e}))}))):(e.online="UP"===e.status,e.buid=-1,delete e.version,e.uid&&b.expertMode&&b.difficulties&&(e.difficulty=b.difficulties[e.uid]),i.when(e))},R=function(e,t){if((e=e||b.newPeers).length){var n=_.map(b.peers,(function(e){return e.id})),i=!1,a=0;_.forEach(e.splice(0),(function(e){n[e.id]||(b.peers.push(e),n[e.id]=e,i=!0,a++)})),i&&(console.debug("[network] Flushing {0} new peers...".format(a)),S(t))}},A=function(e,t,n){if(!e)return 0;var i=0;t>(e=e.toLowerCase()).length&&(t=e.length),i+=e.charCodeAt(0);for(var a=1;a<t;a++)i+=Math.pow(.001,a)*e.charCodeAt(a);return n?1e3-i:i},S=function(e){var t={};b.memberPeersCount=0,_.forEach(b.peers,(function(e){if(e.buid){var n=t[e.buid];n&&n.medianTime?!n.medianTime&&e.medianTime&&(n.medianTime=e.medianTime):(n={buid:e.buid,medianTime:e.medianTime,count:0},t[e.buid]=n),-1!==n.buid&&n.count++}b.memberPeersCount+=e.uid?1:0}));var n,i=b.mainBlock;b.filter.online&&(_.forEach(_.values(t),(function(e){e.pct=100*e.count/b.peers.length})),i=_.max(t,(function(e){return e.count})),_.forEach(b.peers,(function(e){e.hasMainConsensusBlock=e.buid===i.buid,e.hasConsensusBlock=e.buid&&!e.hasMainConsensusBlock&&t[e.buid].count>1,e.hasConsensusBlock&&(e.consensusBlockDelta=t[e.buid].medianTime-i.medianTime)}))),b.peers=_.uniq(b.peers,!1,(function(e){return e.id})),b.peers=_.sortBy(b.peers,(function(e){var n=0;return b.sort.type&&(n+="uid"===b.sort.type?A(e.uid||e.pubkey,3,b.sort.asc):0,n+="api"===b.sort.type&&(e.isWs2p()&&(b.sort.asc?1:-1)||0)+(e.hasEndpoint("ES_USER_API")&&(b.sort.asc?.01:-.01)||0)+(e.isSsl()&&(b.sort.asc?.75:-.75)||0)||0,n+="difficulty"===b.sort.type&&e.difficulty?b.sort.asc?1e4-e.difficulty:e.difficulty:0,n+="current_block"===b.sort.type&&e.currentNumber?b.sort.asc?1e9-e.currentNumber:e.currentNumber:0),n*=1e10,n+=1e9*(e.online?1:0),n+=1e8*(e.hasMainConsensusBlock?1:0),n+=1e6*(e.hasConsensusBlock?t[e.buid].pct:0),b.expertMode?(n+=100*(e.difficulty?1e4-e.difficulty:0),n+=1*(e.uid?A(e.uid,2,!0):0)):(n+=100*(e.uid?A(e.uid,2,!0):0),n+=1*(e.uid?0:A(e.pubkey,2,!0))),-(n+=e.isBma()?e.isSsl()?.01:.001:0)})),b.groupBy&&b.peers.forEach((function(e){e.compacted=n&&e[b.groupBy]&&e[b.groupBy]===n[b.groupBy],n=e})),e&&i&&i.buid&&(!b.mainBlock||b.mainBlock.buid!==i.buid)&&(b.mainBlock=i,E.data.raise.mainBlockChanged(i)),E.data.raise.changed(b)},C=function(e,t){return t=t||{},l.ready().then((function(){if(L(),b.bma=e||l,b.filter=t.filter?angular.merge(b.filter,t.filter):b.filter,b.sort=t.sort?angular.merge(b.sort,t.sort):b.sort,b.expertMode=angular.isDefined(t.expertMode)?t.expertMode:b.expertMode,b.timeout=angular.isDefined(t.timeout)?t.timeout:s.timeout,b.minOnlineBlockNumber=b.mainBlock&&b.mainBlock.buid&&parseInt(b.mainBlock.buid.split("-")[0])-1e3||void 0,void 0===b.minOnlineBlockNumber)return u.blockchain.current(!0).then((function(e){b.minOnlineBlockNumber=e.number-1e3}))})).then((function(){console.info("[network] Starting network from [{0}]".format(e.server));var t=Date.now();return b.listeners=[b.bma.websocket.block().onListener((function(e){if(e&&!b.loading){var t=[e.number,e.hash].join("-");-1===b.knownBlocks.indexOf(t)&&(console.debug("[network] Receiving block: "+t.substring(0,20)),b.knownBlocks.push(t),1===b.knownBlocks.length||(b.loading=!0,o((function(){console.debug("[network] new block received by WS: will refresh peers"),h()}),2e3,!1)))}})),b.bma.websocket.peer().onListener((function(e){if(e&&!b.loading){var t=[];I(e,t).then((function(e){e&&(t.length>0?R(t,!0):(console.debug("[network] [ws] Peers updated received"),S(!0)))}))}}))],h().then((function(e){return console.debug("[network] Started in "+(Date.now()-t)+"ms"),e}))}))},L=function(){b.bma&&(console.info("[network-service] Stopping..."),_.forEach(b.listeners,(function(e){e()})),b.listeners=[],b.bma=null,b.listeners=[],b.peers.splice(0),b.filter={member:!0,mirror:!0,endpoint:null,online:!0,bma:!1,ssl:void 0,tor:void 0},b.sort={type:null,asc:!0},b.groupBy="pubkey",b.expertMode=!1,b.memberPeersCount=0,b.knownBlocks=[],b.mainBlock=null,b.minOnlineBlockNumber=0,b.uidsByPubkeys={},b.loading=!0,b.searchingPeersOnNetwork=!1,b.difficulties=null,b.ws2pHeads=null,b.timeout=s.timeout)},D=function(e){return b.bma?C().then((function(){return i(e)})):i(e)};return E.registerEvent("data","changed"),E.registerEvent("data","mainBlockChanged"),E.registerEvent("data","rollback"),{data:b,start:C,close:L,hasPeers:function(){return b.peers&&b.peers.length>0},getPeers:function(){return b.peers},sort:function(e){e=e||{},b.filter=e.filter?angular.merge(b.filter,e.filter):b.filter,b.sort=e.sort?angular.merge(b.sort,e.sort):b.sort,S(!1)},getTrustedPeers:function(){return D((function(e,t){e(b.peers.reduce((function(e,t){return t.hasMainConsensusBlock&&t.uid?e.concat(t):e}),[]))}))},getKnownBlocks:function(){return b.knownBlocks},getMainBlockUid:function(){return D((function(e,t){e(b.mainBuid)}))},loadPeers:h,isBusy:function(){return b.loading},api:E}}]),angular.module("cesium.crypto.services",["cesium.utils.services"]).factory("CryptoUtils",["$q","$timeout","ionicReady",function(e,t,n){function i(){this.loaded=!1;var e=this;this.copy=function(t){_.forEach(_.keys(t),(function(n){e[n]=t[n]}))},this.isLoaded=function(){return this.loaded},this.util=this.util||{},this.util.array_to_string=function(e,t){var n=new Blob([new Uint8Array(e)]),i=new FileReader;i.onload=function(e){t(e.target.result)},i.readAsText(n)}}i.prototype.constants={crypto_sign_BYTES:64,crypto_secretbox_NONCEBYTES:24,crypto_box_MACBYTES:16,SEED_LENGTH:32,SCRYPT_PARAMS:{SIMPLE:{N:2048,r:8,p:1,memory:-1},DEFAULT:{N:4096,r:16,p:1,memory:-1},SECURE:{N:16384,r:32,p:2,memory:33554432},HARDEST:{N:65536,r:32,p:4,memory:134217728},EXTREME:{N:262144,r:64,p:8,memory:536870912}}},i.prototype.async_load_base58=function(e){var n=this;if(null!==Base58)return e(Base58);t((function(){n.async_load_base58(e)}),100)},i.prototype.async_load_scrypt=function(e,n){var i=this;null!==scrypt_module_factory?scrypt_module_factory(e,n):t((function(){i.async_load_scrypt(e,n)}),100)},i.prototype.async_load_nacl_js=function(e,n){var i=this;null!==nacl_factory?nacl_factory.instantiate(e,n):t((function(){i.async_load_nacl_js(e,n)}),100)},i.prototype.async_load_base64=function(e){var n=this;null!==Base64?e(Base64):t((function(){n.async_load_base64(e)}),100)},i.prototype.async_load_sha256=function(e){var n=this;if(null!==sha256)return e(sha256);t((function(){n.async_load_sha256(e)}),100)},i.prototype.seed_from_signSk=function(e){for(var t=new Uint8Array(this.constants.SEED_LENGTH),n=0;n<t.length;n++)t[n]=e[n];return t};var a=window.crypto||window.msCrypto||window.Crypto;function o(){this.id="FullJS",this.scrypt=null,this.nacl=null,this.base58=null,this.base64=null;var t=this;function n(e,t){if(0!==t)throw{message:"nacl_raw."+e+" signalled an error"}}function i(e,n,i,o,r){return function(e,t,n,i){if(n.length!==i)throw{message:"nacl."+e+" expected "+i+"-byte "+t+" but got length "+n.length}}(e,n,i,o),function(e,n){var i=n||0,o=a(e.length+i);t.nacl.nacl_raw.HEAPU8.set(e,o+i);for(var r=o;r<o+i;r++)t.nacl.nacl_raw.HEAPU8[r]=0;return o}(i,r)}function a(e){var n=t.nacl.nacl_raw._malloc(e);if(0===n)throw{message:"malloc() failed",nbytes:e};return n}function o(e){t.nacl.nacl_raw._free(e)}function r(e){this.length=e,this.address=a(e)}this.util=this.util||{},this.util.decode_utf8=function(e){var t,n=unescape(encodeURIComponent(e)),i=new Uint8Array(n.length);for(t=0;t<n.length;t++)i[t]=n.charCodeAt(t);return i},this.util.encode_utf8=function(e){return t.nacl.encode_utf8(e)},this.util.encode_base58=function(e){return t.base58.encode(e)},this.util.decode_base58=function(e){var n,i=t.base58.decode(e),a=new Uint8Array(i.length);for(n=0;n<i.length;n++)a[n]=i[n];return a},this.util.decode_base64=function(e){return t.base64.decode(e)},this.util.encode_base64=function(e){return t.base64.encode(e)},this.util.hash_sha256=function(n){return e((function(e){var i=t.util.decode_utf8(n);e(t.nacl.to_hex(t.nacl.crypto_hash_sha256(i)).toUpperCase())}))},this.util.random_nonce=function(){if(t.crypto&&t.crypto.getRandomValues){var n=new Uint8Array(t.constants.crypto_secretbox_NONCEBYTES);return t.crypto.getRandomValues(n),e.when(n)}return e.when(t.nacl.crypto_box_random_nonce())},this.util.crypto_hash_sha256=function(e){return t.nacl.crypto_hash_sha256(e)},this.util.crypto_scrypt=function(n,i,a,o,r,s){return e((function(e,l){try{e(t.scrypt.crypto_scrypt(n,i,a,o,r,s))}catch(e){l(e)}}))},this.box_keypair_from_sign=function(a){return a.boxSk&&a.boxPk?e.when(a):e((function(e,s){try{e((l=i("crypto_box_keypair_from_sign_sk","sk",a.signSk,t.nacl.nacl_raw._crypto_sign_secretkeybytes()),c=new r(t.nacl.nacl_raw._crypto_box_secretkeybytes()),n("_crypto_sign_ed25519_sk_to_curve25519",t.nacl.nacl_raw._crypto_sign_ed25519_sk_to_curve25519(c.address,l)),o(l),t.nacl.crypto_box_keypair_from_raw_sk(c.extractBytes())))}catch(e){s(e)}var l,c}))},this.box_pk_from_sign=function(a){return e((function(e,s){try{e((l=i("crypto_box_pk_from_sign_pk","pk",a,t.nacl.nacl_raw._crypto_sign_publickeybytes()),c=new r(t.nacl.nacl_raw._crypto_box_publickeybytes()),n("_crypto_sign_ed25519_pk_to_curve25519",t.nacl.nacl_raw._crypto_sign_ed25519_pk_to_curve25519(c.address,l)),o(l),c.extractBytes()))}catch(e){s(e)}var l,c}))},this.box_sk_from_sign=function(a){return e((function(e,s){try{e((l=i("crypto_box_sk_from_sign_sk","sk",a,t.nacl.nacl_raw._crypto_sign_secretkeybytes()),c=new r(t.nacl.nacl_raw._crypto_box_secretkeybytes()),n("_crypto_sign_ed25519_sk_to_curve25519",t.nacl.nacl_raw._crypto_sign_ed25519_sk_to_curve25519(c.address,l)),o(l),c.extractBytes()))}catch(e){s(e)}var l,c}))},this.box=function(n,i,a,o){return e((function(e,r){if(n){var s=t.nacl.encode_utf8(n);"string"==typeof a&&(a=t.util.decode_base58(a));try{var l=t.nacl.crypto_box(s,i,a,o);e(t.util.encode_base64(l))}catch(e){r(e)}}else e(n)}))},this.box_open=function(n,i,a,o){return e((function(e,r){if(n){var s=t.util.decode_base64(n);"string"==typeof a&&(a=t.util.decode_base58(a));try{var l=t.nacl.crypto_box_open(s,i,a,o);e(t.nacl.decode_utf8(l))}catch(e){r(e)}}else e(n)}))},this.scryptKeypair=function(e,n,i){return t.util.crypto_scrypt(t.util.encode_utf8(n),t.util.encode_utf8(e),i&&i.N||t.constants.SCRYPT_PARAMS.DEFAULT.N,i&&i.r||t.constants.SCRYPT_PARAMS.DEFAULT.r,i&&i.p||t.constants.SCRYPT_PARAMS.DEFAULT.p,t.constants.SEED_LENGTH).then((function(e){var n=t.nacl.crypto_sign_seed_keypair(e),i=t.nacl.crypto_box_seed_keypair(e);return{signPk:n.signPk,signSk:n.signSk,boxPk:i.boxPk,boxSk:i.boxSk}}))},this.seedKeypair=function(n){return e((function(e,i){var a=t.nacl.crypto_sign_seed_keypair(n),o=t.nacl.crypto_box_seed_keypair(n);e({signPk:a.signPk,signSk:a.signSk,boxPk:o.boxPk,boxSk:o.boxSk})}))},this.scryptSignPk=function(n,i,a){return e((function(e,o){try{var r=t.scrypt.crypto_scrypt(t.util.encode_utf8(i),t.util.encode_utf8(n),a&&a.N||t.constants.SCRYPT_PARAMS.DEFAULT.N,a&&a.r||t.constants.SCRYPT_PARAMS.DEFAULT.r,a&&a.p||t.constants.SCRYPT_PARAMS.DEFAULT.p,t.constants.SEED_LENGTH);e(t.nacl.crypto_sign_seed_keypair(r).signPk)}catch(e){o(e)}}))},this.verify=function(n,i,a){return e((function(e,o){var r,s=t.util.decode_utf8(n),l=t.util.decode_base64(i),c=t.util.decode_base58(a),u=new Uint8Array(t.constants.crypto_sign_BYTES+s.length);for(r=0;r<t.constants.crypto_sign_BYTES;r++)u[r]=l[r];for(r=0;r<s.length;r++)u[r+t.constants.crypto_sign_BYTES]=s[r];e(null!==t.nacl.crypto_sign_open(u,c))}))},this.sign=function(n,i){return e((function(e,a){for(var o=t.util.decode_utf8(n),r=i.signSk,s=t.nacl.crypto_sign(o,r),l=new Uint8Array(t.constants.crypto_sign_BYTES),c=0;c<l.length;c++)l[c]=s[c];e(t.base64.encode(l))}))},this.load=function(){var n=e.defer(),i={},a={};"a"!=ionic.Platform.grade.toLowerCase()&&(console.info("Reduce NaCl memory to 16mb,  because plateform grade is not [a] but [{0}]".format(ionic.Platform.grade)),i.requested_total_memory=16777216);var o=0,r=function(){4==++o&&(t.loaded=!0,n.resolve())};return this.async_load_nacl_js((function(e){t.nacl=e,r()}),i),this.async_load_scrypt((function(e){t.scrypt=e,t.scrypt.requested_total_memory=a.requested_total_memory,r()}),a),this.async_load_base58((function(e){t.base58=e,r()})),t.async_load_base64((function(e){t.base64=e,r()})),n.promise},this.util.hash=t.util.hash_sha256,this.box={keypair:{fromSignKeypair:t.box_keypair_from_sign,skFromSignSk:t.box_sk_from_sign,pkFromSignPk:t.box_pk_from_sign},pack:t.box,open:t.box_open},r.prototype.extractBytes=function(e){var n=function(e,n){var i=new Uint8Array(n);return i.set(t.nacl.nacl_raw.HEAPU8.subarray(e,e+n)),i}(this.address+(e||0),this.length-(e||0));return o(this.address),this.address=null,n}}function r(){this.id="MiniSodium",this.nacl=null,this.base58=null,this.sha256=null;var t=this;this.util=this.util||{},this.util.decode_utf8=function(e){return t.nacl.to_string(e)},this.util.encode_utf8=function(e){return t.nacl.from_string(e)},this.util.encode_base58=function(e){return t.base58.encode(e)},this.util.decode_base58=function(e){var n,i=t.base58.decode(e),a=new Uint8Array(i.length);for(n=0;n<i.length;n++)a[n]=i[n];return a},this.util.decode_base64=function(e){return t.nacl.from_base64(e)},this.util.encode_base64=function(e){return t.nacl.to_base64(e)},this.util.hash_sha256=function(n){return e.when(t.sha256(n).toUpperCase())},this.util.random_nonce=function(){var n=new Uint8Array(t.constants.crypto_secretbox_NONCEBYTES);return t.crypto.getRandomValues(n),e.when(n)},this.util.crypto_hash_sha256=function(e){return t.nacl.from_hex(t.sha256(e))},this.util.crypto_scrypt=function(n,i,a,o,r,s){var l=e.defer();return t.nacl.crypto_pwhash_scryptsalsa208sha256_ll(n,i,a,o,r,s,(function(e,t){e?l.reject(e):l.resolve(t)})),l.promise},this.scryptKeypair=function(n,i,a){var o=e.defer();return t.nacl.crypto_pwhash_scryptsalsa208sha256_ll(t.nacl.from_string(i),t.nacl.from_string(n),a&&a.N||t.constants.SCRYPT_PARAMS.DEFAULT.N,a&&a.r||t.constants.SCRYPT_PARAMS.DEFAULT.r,a&&a.p||t.constants.SCRYPT_PARAMS.DEFAULT.p,t.constants.SEED_LENGTH,(function(e,n){e?o.reject(e):t.nacl.crypto_sign_seed_keypair(n,(function(e,n){if(e)o.reject(e);else{var i={signPk:n.pk,signSk:n.sk};t.box_keypair_from_sign(i).then((function(e){i.boxPk=e.pk,i.boxSk=e.sk,o.resolve(i)})).catch((function(e){o.reject(e)}))}}))})),o.promise},this.seedKeypair=function(n){var i=e.defer();return t.nacl.crypto_sign_seed_keypair(n,(function(e,t){e?i.reject(e):i.resolve({signPk:t.pk,signSk:t.sk})})),i.promise},this.scryptSignPk=function(n,i,a){var o=e.defer();return t.nacl.crypto_pwhash_scryptsalsa208sha256_ll(t.nacl.from_string(i),t.nacl.from_string(n),a&&a.N||t.constants.SCRYPT_PARAMS.DEFAULT.N,a&&a.r||t.constants.SCRYPT_PARAMS.DEFAULT.r,a&&a.p||t.constants.SCRYPT_PARAMS.DEFAULT.p,t.constants.SEED_LENGTH,(function(e,n){e?o.reject(e):t.nacl.crypto_sign_seed_keypair(n,(function(e,t){e?o.reject(e):o.resolve(t.pk)}))})),o.promise},this.verify=function(n,i,a){var o=e.defer();return t.nacl.crypto_sign_verify_detached(t.nacl.from_base64(i),t.nacl.from_string(n),t.nacl.from_base64(a),(function(e,t){e?o.reject(e):o.resolve(t)})),o.promise},this.sign=function(n,i){var a=e.defer();return t.nacl.crypto_sign(t.nacl.from_string(n),i.signSk,(function(e,n){if(e)a.reject(e);else{var i;if(n.length>t.constants.crypto_sign_BYTES){i=new Uint8Array(t.constants.crypto_sign_BYTES);for(var o=0;o<i.length;o++)i[o]=n[o]}else i=n;var r=t.nacl.to_base64(i);a.resolve(r)}})),a.promise},this.box_keypair_from_sign=function(n){if(n.boxSk&&n.boxPk)return e.when(n);var i=e.defer(),a={};return t.nacl.crypto_sign_ed25519_pk_to_curve25519(n.signPk,(function(e,t){e?i.reject(e):(a.boxPk=t,a.boxSk&&i.resolve(a))})),t.nacl.crypto_sign_ed25519_sk_to_curve25519(n.signSk,(function(e,t){e?i.reject(e):(a.boxSk=t,a.boxPk&&i.resolve(a))})),i.promise},this.box_pk_from_sign=function(n){var i=e.defer();return t.nacl.crypto_sign_ed25519_pk_to_curve25519(n,(function(e,t){e?i.reject(e):i.resolve(t)})),i.promise},this.box_sk_from_sign=function(n){var i=e.defer();return t.nacl.crypto_sign_ed25519_sk_to_curve25519(n,(function(e,t){e?i.reject(e):i.resolve(t)})),i.promise},this.box=function(n,i,a,o){if(!n)return e.reject("No message");var r=e.defer(),s=t.nacl.from_string(n);return"string"==typeof a&&(a=t.util.decode_base58(a)),t.nacl.crypto_box_easy(s,i,a,o,(function(e,n){if(e)r.reject(e);else{var i=t.util.encode_base64(n);r.resolve(i)}})),r.promise},this.box_open=function(n,i,a,o){if(!n)return e.reject("No cypherText");var r=e.defer(),s=t.nacl.from_base64(n);if("string"==typeof a&&(a=t.util.decode_base58(a)),!(s.length<t.constants.crypto_box_MACBYTES))return t.nacl.crypto_box_open_easy(s,i,a,o,(function(e,n){e?r.reject(e):t.util.array_to_string(n,(function(e){r.resolve(e)}))})),r.promise;r.reject("Invalid cypher content length")},this.load=function(){var n=e.defer();if(window.plugins&&window.plugins.MiniSodium){t.nacl=window.plugins.MiniSodium;var i=0,a=function(){2==++i&&(t.loaded=!0,n.resolve())};t.async_load_base58((function(e){t.base58=e,a()})),t.async_load_sha256((function(e){t.sha256=e,a()}))}else n.reject("Cordova plugin 'MiniSodium' not found. Please load Full JS implementation instead.");return n.promise},this.util.hash=t.util.hash_sha256,this.box={keypair:{fromSignKeypair:t.box_keypair_from_sign,skFromSignSk:t.box_sk_from_sign,pkFromSignPk:t.box_pk_from_sign},pack:t.box,open:t.box_open}}a&&a.getRandomValues&&(i.prototype.crypto=a,i.prototype.util={},i.prototype.util.random_nonce=function(){var t=new Uint8Array(crypto_secretbox_NONCEBYTES);return this.crypto.getRandomValues(t),e.when(t)}),o.prototype=new i,r.prototype=new i;var s=new i;return n().then((function(){console.debug("[crypto] Starting...");var e,t=Date.now();window.plugins&&window.plugins.MiniSodium&&a&&a.getRandomValues?(console.debug("[crypto] Loading 'MiniSodium' implementation..."),e=new r):(console.debug("[crypto] Loading 'FullJS' implementation..."),e=new o),e.load().catch((function(e){throw console.error(e),e})).then((function(){s.copy(e),console.debug("[crypto] Loaded '{0}' implementation in {1}ms".format(s.id,Date.now()-t))}))})),s}]).factory("csCrypto",["$q","$rootScope","$timeout","CryptoUtils","UIUtils","Modals",function(e,t,n,i,a,o){function r(e){return new RegExp(e)}function s(e,t){for(var n=Math.max(e.length,t.length),i=new Uint8Array(n),a=0;a<n;++a)i[a]=e[a]^t[a];return i}function l(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n}var c={WIF:{DATA_LENGTH:35},EWIF:{SALT_LENGTH:4,DERIVED_HALF_LENGTH:16,DATA_LENGTH:39,SCRYPT_PARAMS:{N:16384,r:8,p:8}},REGEXP:{PUBKEY:"[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}",SECKEY:"[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{86,88}",FILE:{TYPE_LINE:"^Type: ([a-zA-Z0-9]+)\n",VERSION:"Version: ([0-9]+)\n",PUB:"[Pp]ub: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})\n",SEC:"[Ss]ec: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{86,88})(\n|$)",DATA:"[Dd]ata: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)(\n|$)"}}},u={FILE:{TYPE_LINE:r(c.REGEXP.FILE.TYPE_LINE),VERSION:r(c.REGEXP.FILE.VERSION),PUB:r(c.REGEXP.FILE.PUB),SEC:r(c.REGEXP.FILE.SEC),DATA:r(c.REGEXP.FILE.DATA)}},d={BAD_PASSWORD:3001,BAD_CHECKSUM:3002};function p(t,n){if(!t)return e.reject("Argument [content] is missing");var a;(n=n||{}).withSecret=!!angular.isDefined(n.withSecret)&&n.withSecret,n.defaultType=n.defaultType||"PubSec";var o=u.FILE.TYPE_LINE.exec(t),r=o&&o[1];if(!r&&n.defaultType)return p("Type: {0}\n{1}".format(n.defaultType,t),n);if("PubSec"==r){if(!(a=u.FILE.PUB.exec(t)))return e.reject("Missing [pub] field in file, or invalid public key value");var s={signPk:i.base58.decode(a[1])};return n.withSecret?(a=u.FILE.SEC.exec(t))?(s.signSk=i.base58.decode(a[1]),e.resolve(s)):e.reject("Missing [sec] field in file, or invalid secret key value"):e.resolve(s)}return"WIF"==r||"EWIF"==r?(a=u.FILE.DATA.exec(t))?m(a[1],{type:r,password:n.password}).then((function(e){return e&&!n.withSecret?{signPk:e.signPk}:e})):e.reject("Missing [Data] field in file. This is required for WIF or EWIF format"):n.defaultType?e.reject("Bad file format: missing Type field"):e.reject("Bad file format, unknown type ["+r+"]")}function m(t,n){n=n||{};var a=t&&i.base58.decode(t);return!a||a.length!=c.EWIF.DATA_LENGTH&&a.length!=c.WIF.DATA_LENGTH?e.reject("Invalid WIF or EWIF format (invalid bytes count)."):(n.type=n.type||1==a[0]&&"WIF"||2==a[0]&&"EWIF","WIF"==n.type?function(t){var n=i.util.decode_base58(t);if(1!=n[0])return e.reject({message:"Invalid WIF v1 format: expected [0x01] as first byte"});if(n.length!=c.WIF.DATA_LENGTH)return e.reject({message:"Invalid WIF v1 format: Data must be a "+c.WIF.DATA_LENGTH+" bytes array, encoded in base 58."});var a=n.slice(0,-2),o=n.slice(1,-2),r=n.slice(-2),s=i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(a)).slice(0,2);return i.util.encode_base58(r)!=i.util.encode_base58(s)&&e.reject({message:"Invalid WIF format: bad checksum"}),i.seedKeypair(o)}(t):"EWIF"==n.type?"function"!=typeof n.password||(n.password=n.password(),n.password)?"object"==typeof n.password&&n.password.then?n.password.then((function(e){if(!e)throw"CANCELLED";return E(t,e)})):"string"==typeof n.password?E(t,n.password):e.reject({message:"Invalid EWIF options.password. Waiting a callback function, a promise or a string."}):e.reject({message:"Invalid callback result for 'options.password()': must return a promise or a string."}):e.reject({message:"Invalid WIF or EWIF format: unknown first byte identifier."}))}function E(t,n){var a=i.util.decode_base58(t);if(2!=a[0])return e.reject({message:"Invalid EWIF v1 format: Expected [0x02] as first byte"});if(a.length!=c.EWIF.DATA_LENGTH)return e.reject({message:"Invalid EWIF v1 format: Expected {0} bytes, encoded in base 58.".format(c.EWIF.DATA_LENGTH)});var o=a.slice(0,-2),r=a.slice(-2),u=a.slice(1,5),p=a.slice(5,21),m=a.slice(21,37);return i.util.crypto_scrypt(i.util.encode_utf8(n),u,c.EWIF.SCRYPT_PARAMS.N,c.EWIF.SCRYPT_PARAMS.r,c.EWIF.SCRYPT_PARAMS.p,64).then((function(e){var t=e.slice(0,32),n=e.slice(32,64),i=new aesjs.ModeOfOperation.ecb(n),a=i.decrypt(p),o=i.decrypt(m);return a=new Uint8Array(a),o=new Uint8Array(o),l(s(a,t.slice(0,16)),s(o,t.slice(16,32)))})).then(i.seedKeypair).then((function(e){var t=i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(e.signPk)).slice(0,4);if(i.util.encode_base58(u)!==i.util.encode_base58(t))throw{ucode:d.BAD_PASSWORD,message:"ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD"};var n=i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(o)).slice(0,2);if(i.util.encode_base58(r)!=i.util.encode_base58(n))throw{ucode:d.BAD_CHECKSUM,message:"ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_CHECKSUM"};return e}))}function b(t){if(!t)throw new Error("Missing keypair");return t.boxPk&&t.boxSk?e.when(t):e.all([i.box.keypair.skFromSignSk(t.signSk),i.box.keypair.pkFromSignPk(t.signPk)]).then((function(e){return{boxSk:e[0],boxPk:e[1]}}))}return{errorCodes:d,constants:c,util:angular.extend({pkChecksum:function(e){var t=i.util.decode_base58(e);return i.util.encode_base58(i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(t))).substring(0,3)}},i.util),keyfile:{read:function(t,n){return t&&t.content?p(t.content,n):e((function(e,i){if(!t)return i("Argument [file] is missing");var a=new FileReader;a.onload=function(t){p(t.target.result,n).then(e).catch(i)},a.readAsText(t,"utf8")}))},parseData:function e(t,i){return(i=i||{}).withSecret=!angular.isDefined(i.withSecret)||i.withSecret,i.silent=!!angular.isDefined(i.withSecret)&&i.silent,i.password=function(){return a.loading.hide(100).then((function(){return o.showPassword({title:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE",subTitle:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP",error:i.error,scope:i.scope})})).then((function(e){return n((function(){return e&&a.loading.show(),e}),150)}))},i.silent||a.loading.show(),m(t,i).then((function(e){return e})).catch((function(n){if(!n||"CANCELLED"!==n){if(n&&n.ucode==d.BAD_PASSWORD)return e(t,{withSecret:i.withSecret,error:"ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD"});throw console.error("[crypto] Unable to parse as WIF or EWIF format: "+(n&&n.message||n)),n}}))},generateContent:function t(n,a){switch((a=a||{}).type=a.type||"PubSec",a.type){case"PubSec":return e.resolve("Type: PubSec\nVersion: 1\npub: "+i.base58.encode(n.signPk)+"\nsec: "+i.base58.encode(n.signSk)+"\n");case"WIF":return function(t){var n=i.seed_from_signSk(t.signSk);if(!n||n.byteLength!==i.constants.SEED_LENGTH)throw"Bad see format. Expected {0} bytes".format(i.constants.SEED_LENGTH);var a=new Uint8Array(1);a[0]=1;var o=l(a,n),r=l(o,i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(o)).slice(0,2));return e.when(i.util.encode_base58(r))}(n).then((function(e){return"Type: WIF\nVersion: 1\nData: "+e+"\n"}));case"EWIF":return a.password?a.password&&"function"==typeof a.password&&(console.debug("[crypto] [EWIF] Executing 'options.password()' to resolve the password..."),a.password=a.password(),!a.password)?e.reject({message:"Invalid callback result for 'options.password()': must return a promise or a string."}):a.password&&"object"==typeof a.password&&a.password.then?a.password.then((function(e){if(!e)throw"CANCELLED";return t(n,angular.merge({},a,{password:e}))})):a.password&&"string"==typeof a.password?function(t,n){var a=i.seed_from_signSk(t.signSk);if(!a||a.byteLength!==i.constants.SEED_LENGTH)return e.reject({message:"Bad see format. Expected {0} bytes".format(i.constants.SEED_LENGTH)});var o=i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(t.signPk)).slice(0,4);return i.util.crypto_scrypt(i.util.encode_utf8(n),o,c.EWIF.SCRYPT_PARAMS.N,c.EWIF.SCRYPT_PARAMS.r,c.EWIF.SCRYPT_PARAMS.p,64).then((function(e){var t=e.slice(0,32),n=e.slice(32,64),r=s(a.slice(0,16),t.slice(0,16)),c=s(a.slice(16,32),t.slice(16,32)),u=new aesjs.ModeOfOperation.ecb(n),d=u.encrypt(r),p=u.encrypt(c);d=new Uint8Array(d),p=new Uint8Array(p);var m=new Uint8Array(1);return m[0]=2,m=l(m,o),m=l(m,d),m=l(m,p),m=l(m,i.util.crypto_hash_sha256(i.util.crypto_hash_sha256(m)).slice(0,2)),i.util.encode_base58(m)}))}(n,a.password).then((function(e){return"Type: EWIF\nVersion: 1\nData: "+e+"\n"})):e.reject({message:"Invalid EWIF options.password. Waiting a callback function, a promise or a string."}):e.reject({message:"Missing EWIF options.password."});default:return e.reject({message:"Unknown keyfile format: "+a.type})}}},box:{getKeypair:b,pack:function(t,n,a,o,r){if(!t[a=a||"recipient"])return e.reject({message:"ES_WALLET.ERROR.RECIPIENT_IS_MANDATORY"});"string"==typeof(o=o||"content")&&(o=[o]),t=angular.copy(t);var s=i.util.decode_base58(t[a]);return e.all([b(n),i.box.keypair.pkFromSignPk(s),r?e.when(r):i.util.random_nonce()]).then((function(n){var a=n[0].boxSk,r=n[1],s=n[2];return e.all(o.reduce((function(e,n){return t[n]?e.concat(i.box.pack(t[n],s,r,a)):e}),[])).then((function(e){var n=0;return _.forEach(o,(function(i){t[i]?t[i]=e[n++]:t[i]=null})),t.nonce=i.util.encode_base58(s),t}))}))},open:function(t,n,a,o){a=a||"issuer","string"==typeof(o=o||"content")&&(o=[o]);var r=Date.now(),s={},l=[b(n)];return e.all(t.reduce((function(e,t){var n=t[a];if(!n)throw"Record has no "+a;return s[n]?res:e.concat(i.box.keypair.pkFromSignPk(i.util.decode_base58(n)).then((function(e){s[n]=e})))}),l)).then((function(n){var r=n[0];return e.all(t.reduce((function(e,t){var n=s[t[a]],l=i.util.decode_base58(t.nonce);return t.valid=!0,e.concat(o.reduce((function(e,a){return t[a]?e.concat(i.box.open(t[a],l,n,r.boxSk).then((function(e){t[a]=e})).catch((function(e){console.error(e),console.warn("[ES] [crypto] a record may have invalid cypher "+a),t.valid=!1}))):e}),[]))}),[]))})).then((function(){return console.debug("[ES] [crypto] All record decrypted in "+(Date.now()-r)+"ms"),t}))}}}}]),angular.module("cesium.utils.services",[]).factory("ionicReady",["$ionicPlatform",function(e){var t;return function(){return t||(t=e.ready()),t}}]).factory("UIUtils",["$ionicLoading","$ionicPopup","$ionicConfig","$ionicHistory","$translate","$q","ionicMaterialInk","ionicMaterialMotion","$window","$timeout","Fullscreen","$cordovaToast","$ionicPopover","$state","$rootScope","screenmatch",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b){var g,f=null,T={MAX_HEIGHT:480,MAX_WIDTH:640,THUMB_MAX_HEIGHT:200,THUMB_MAX_WIDTH:200},h={smallscreen:b.bind("xs, sm",E)},v={};function I(e,n){return e?o((function(i){a([e,n,"ERROR.POPUP_TITLE","ERROR.UNKNOWN_ERROR","COMMON.BTN_OK"]).then((function(a){var o=e.message||a[e];return t.show({template:"<p>"+(o||a["ERROR.UNKNOWN_ERROR"])+"</p>",title:a["ERROR.POPUP_TITLE"],subTitle:a[n],buttons:[{text:"<b>"+a["COMMON.BTN_OK"]+"</b>",type:"button-assertive",onTap:function(e){i(e)}}]})}))})):o.when()}function O(e,n){return o((function(i){a([e,n,"INFO.POPUP_TITLE","COMMON.BTN_OK"]).then((function(a){t.show({template:"<p>"+a[e]+"</p>",title:a["INFO.POPUP_TITLE"],subTitle:a[n],buttons:[{text:a["COMMON.BTN_OK"],type:"button-positive",onTap:function(e){i(e)}}]})}))}))}function N(t){return t?c((function(){return e.hide()}),t):e.hide()}function R(t){return f?((t=t||{}).template=t.template||f,e.show(t)):a("COMMON.LOADING").then((function(e){return f=e,R(t)}))}function A(){return h.smallscreen.active}function S(e,t,n){return function(t){var i,a=t.target.width,o=t.target.height,r=n?T.THUMB_MAX_WIDTH:T.MAX_WIDTH,s=n?T.THUMB_MAX_HEIGHT:T.MAX_HEIGHT,l=document.createElement("canvas");if(n){a>o?(a*=s/o,o=s):(o*=r/a,a=r),l.width=r,l.height=s,i=l.getContext("2d");var c=Math.trunc((r-a)/2+.5),u=Math.trunc((s-o)/2+.5);i.drawImage(t.target,c,u,r+-2*c,s+-2*u)}else a>o?a>r&&(o*=r/a,a=r):o>s&&(a*=s/o,o=s),l.width=a,l.height=o,(i=l.getContext("2d")).drawImage(t.target,0,0,l.width,l.height);var d=l.toDataURL();l.remove(),e(d)}}function C(e,t){var n=o.defer();(t=t||{}).templateUrl=t.templateUrl?t.templateUrl:"templates/common/popover_copy.html",t.scope=t.scope||E,t.scope.popovers=t.scope.popovers||{},t.autoselect=t.autoselect||!1,t.autoremove=!angular.isDefined(t.autoremove)||t.autoremove,t.backdropClickToClose=!angular.isDefined(t.backdropClickToClose)||t.backdropClickToClose,t.focusFirstInput=!!angular.isDefined(t.focusFirstInput)&&t.focusFirstInput;var i=function(i){(i=i||t.scope.popovers[t.templateUrl]).isResolved=!1,i.deferred=n,i.options=t,t.bindings&&angular.merge(i.scope,t.bindings),c((function(){i.show(e).then((function(){var e;t.autoselect?(e=document.querySelectorAll(t.autoselect)[0])&&(l.getSelection&&!l.getSelection().toString()?(e.setSelectionRange(0,e.value.length),e.focus()):e.focus()):t.autofocus&&(e=document.querySelectorAll(t.autofocus)[0])&&e.focus(),i.scope.$parent.$emit("popover.shown"),t.afterShow&&t.afterShow(i)}))}))},a=function(e){(e=e||t.scope.popovers[t.templateUrl])&&(delete t.scope.popovers[t.templateUrl],e.remove().then((function(){angular.element(l.document.querySelectorAll("body")[0]).removeClass("popover-open")})))},r=t.scope.popovers[t.templateUrl];return r?i(r):p.fromTemplateUrl(t.templateUrl,{scope:t.scope,backdropClickToClose:t.backdropClickToClose}).then((function(e){e.isResolved=!1,e.scope.closePopover=function(t){var n=e.options&&e.options.autoremove;e.options&&delete e.options.autoremove,e.hide().then((function(){if(n)return a(e)})).then((function(){e.deferred&&e.deferred.resolve(t),delete e.deferred,delete e.options}))},e.scope.$on("popover.hidden",(function(){e.options&&e.options.afterHidden&&e.options.afterHidden(),e.options&&e.options.autoremove&&a(e)})),t.scope.$on("$remove",(function(){e.deferred&&e.deferred.resolve(),a()})),t.scope.popovers[t.templateUrl]=e,i(e)})),n.promise}function L(e,t){var n=A()?100:10,i=".list.{0} .item, .list .{0} .item".format(t,t);return{ionListClass:t,show:function(t){return(t=t||{}).selector=t.selector||i,t.ink=!angular.isDefined(t.ink)||t.ink,t.startVelocity=t.startVelocity||(A()?1100:3e3),c((function(){t.ink&&g.ink(),e(t)}),t.timeout||n)}}}function D(e,t,n,i,a){a=a||"default",qrcode.stringToBytes=qrcode.stringToBytesFuncs[a];var o=qrcode(t||4,n||"M");return o.addData(e,i),o.make(),o}function y(e,t){if("string"==typeof e&&(e={selector:e}),void 0===e.selector||""===e.selector)return console.error("invalid toggleOn selector"),!1;c((function(){var t=document.querySelectorAll(e.selector);t&&_.forEach(t,(function(e){e.classList.toggle("on",!0)}))}),t||100)}function P(e,t){if("string"==typeof e&&(e={selector:e}),void 0===e.selector||""===e.selector)return console.error("invalid toggleOff selector"),!1;c((function(){var t=document.querySelectorAll(e.selector);t&&_.forEach(t,(function(e){e.classList.toggle("on",!1)}))}),t||900)}return v.motion={enable:!0,default:L(s.ripple,"animate-ripple"),blinds:L(s.blinds,"animate-blinds"),fadeSlideIn:L(s.fadeSlideIn,"animate-fade-slide-in"),fadeSlideInRight:L(s.fadeSlideInRight,"animate-fade-slide-in-right"),panInLeft:L(s.panInLeft,"animate-pan-in-left"),pushDown:L(s.pushDown,"push-down"),ripple:L(s.ripple,"animate-ripple"),slideUp:L(s.slideUp,"slide-up"),fadeIn:L((function(e){y(e)}),"fade-in"),toggleOn:y,toggleOff:P},g={alert:{error:I,info:O,confirm:function(e,n,i){return n=n||"CONFIRM.POPUP_TITLE",(i=i||{}).cssClass=i.cssClass||"confirm",i.okText=i.okText||"COMMON.BTN_OK",i.cancelText=i.cancelText||"COMMON.BTN_CANCEL",a([e,n,i.cancelText,i.okText]).then((function(a){return t.confirm({template:a[e],cssClass:i.cssClass,title:a[n],cancelText:a[i.cancelText],cancelType:i.cancelType,okText:a[i.okText],okType:i.okType})}))},notImplemented:function(){return O("INFO.FEATURES_NOT_IMPLEMENTED")}},loading:{show:R,hide:N,update:function(t){return e._getLoader().then((function(e){if(e&&e.isShown)return t&&t.template?a(t&&t.template).then((function(n){return t.template=n,e})):void 0})).then((function(e){if(e&&e.isShown)return R(t)}))}},toast:{show:function(e,t,n){return t=t||"short",n=n||"bottom",a([e]).then((function(i){window.cordova&&d.show(i[e],t,n)}))}},onError:function(e,t){return function(n){var i,a=e;if(n&&n.message?(a=n.message,i=e):e||(a=n),!t)return"CANCELLED"==a?N(10):(N(10),I(a,i));t(a)}},screen:{isSmall:A,fullscreen:u},ink:r.displayEffect,motion:v.motion,setEffects:function(e){if(g.motion.enable!==e){if(console.debug("[UI] [effects] "+(e?"Enable":"Disable")),g.motion.enable=e,e)n.views.transition("platform"),angular.merge(g.motion,v.motion);else{n.views.transition("none");var t={class:void 0,show:function(){}};angular.merge(g.motion,{enable:!1,default:t,fadeSlideIn:t,fadeSlideInRight:t,panInLeft:t,pushDown:t,ripple:t,slideUp:t,fadeIn:t,toggleOn:y,toggleOff:P}),E.motion=t}i.clearCache()}},qrcode:{svg:function(e,t,n,i,a){return D(e,t,n,i,a).createSvgTag()},img:function(e,t,n,i,a){return D(e,t,n,i,a).createImgTag()}},fab:{show:function(e,t){t||(t=900),c((function(){var t=document.getElementsByClassName("button-fab");_.forEach(t,(function(t){t.id==e&&t.classList.toggle("on",!0)}))}),t)},hide:function(e,t){t||(t=10),c((function(){var t=document.getElementsByClassName("button-fab");_.forEach(t,(function(t){t.id==e&&t.classList.toggle("on",!1)}))}),t)}},popover:{show:C,copy:function(e,t){var n=t&&t.indexOf("\n")>=0?t.split("\n").length:1;return C(e,{templateUrl:"templates/common/popover_copy.html",bindings:{value:t,rows:n},autoselect:".popover-copy "+(n<=1?"input":"textarea")})},share:function(e,t){return(t=t||{}).templateUrl=t.templateUrl?t.templateUrl:"templates/common/popover_share.html",t.autoselect=t.autoselect||".popover-share input",t.bindings=t.bindings||{},t.bindings.value=t.bindings.value||t.bindings.url||m.href(m.current,m.params,{absolute:!0}),t.bindings.postUrl=t.bindings.postUrl||t.bindings.value,t.bindings.postMessage=t.bindings.postMessage||"",t.bindings.titleKey=t.bindings.titleKey||"COMMON.POPOVER_SHARE.TITLE",C(e,t)},helptip:function e(t,n){var i="string"==typeof t&&t?l.document.getElementById(t):t;t||i||!n.selector||(i=l.document.querySelector(n.selector));var a=(n=n||{}).deferred||o.defer();if(i&&!n.timeout)n.preAction&&i[n.preAction](),n.templateUrl=n.templateUrl?n.templateUrl:"templates/common/popover_helptip.html",n.autofocus=n.autofocus||"#helptip-btn-ok",n.bindings=n.bindings||{},n.bindings.icon=n.bindings.icon||{},n.bindings.icon.position=n.bindings.icon.position||!1,n.bindings.icon.glyph=n.bindings.icon.glyph||(n.bindings.icon.position&&n.bindings.icon.position.startsWith("bottom-")?"ion-arrow-down-c":"ion-arrow-up-c"),n.bindings.icon.class=n.bindings.icon.class||"calm icon "+n.bindings.icon.glyph,n.bindings.tour=!!angular.isDefined(n.bindings.tour)&&n.bindings.tour,C(i,n).then((function(e){n.postAction&&i[n.postAction](),a.resolve(e)})).catch((function(e){n.postAction&&i[n.postAction](),a.reject(e)}));else if(n.timeout){var r=n.timeout;n.retryTimeout=n.retryTimeout||r,delete n.timeout,n.deferred=a,c((function(){e(t,n)}),r)}else angular.isDefined(n.retry)&&!n.retry?"continue"===n.onError?c((function(){a.resolve(!0)})):c((function(){a.reject("[helptip] element now found: "+t)})):(n.retry=angular.isUndefined(n.retry)?2:n.retry-1,n.deferred=a,c((function(){e(t,n)}),n.timeout||n.retryTimeout||100));return a.promise}},selection:{select:function e(t){if(t.value||"text"==t.type||"textarea"==t.type)l.getSelection&&!l.getSelection().toString()&&t.setSelectionRange(0,t.value.length);else if(t.childNodes&&t.childNodes.length>0)e(t.childNodes[0]);else{var n=l.document.createRange();n.selectNodeContents(t);var i=l.getSelection();i.removeAllRanges(),i.addRange(n)}},get:function(){var e="";return window.getSelection&&(e=l.getSelection().toString()),e}},image:{resizeFile:function(e,t){var n=document.createElement("img");return o((function(i,a){if(e){var o=new FileReader;o.onload=function(e){n.onload=S(i,0,t),n.src=e.target.result},o.readAsDataURL(e)}else a("no file to resize")})).then((function(e){return n.remove(),e}))},resizeSrc:function(e,t){var n=document.createElement("img");return o((function(i,a){n.onload=S(i,0,t),n.src=e})).then((function(e){return n.remove(),e}))},rotateSrc:function(e,t){var n=document.createElement("img");return o((function(t,i){n.onload=function(e,t){var n=Math.PI/180*90;return function(t){var i=t.target.width,a=t.target.height,o=T.MAX_WIDTH,r=T.MAX_HEIGHT;i>a?i>o&&(a*=o/i,i=o):a>r&&(i*=r/a,a=r);var s=document.createElement("canvas");s.width=a,s.height=i;var l=s.getContext("2d");l.rotate(n),l.drawImage(t.target,0,-1*s.width);var c=s.toDataURL();s.remove(),e(c)}}(t),n.src=e})).then((function(e){return n.remove(),e}))}},raw:v}}]).factory("$focus",["$timeout","$window",function(e,t){return function(n){e((function(){var e=t.document.getElementById(n);e&&e.focus()}))}}]),angular.module("cesium.cache.services",["angular-cache"]).factory("csCache",["$rootScope","$http","$window","csSettings","CacheFactory",function(e,t,n,i,a){var o={VERY_LONG:54e6,LONG:36e5,MEDIUM:3e5,SHORT:i.defaultSettings.cacheTimeMs},r=l(),s=[];function l(e){return(e=e||i.data)&&e.useLocalStorage&&e.persistCache&&n.localStorage?"localStorage":"memory"}function c(e){return(e=e||{}).storageMode=l(),e.deleteOnExpire="localStorage"===e.storageMode||e.onExpire?"aggressive":"passive",e.cacheFlushInterval="passive"===e.deleteOnExpire?36e5:null,e}function u(e){var t=l(e);t!==r&&(r=t,console.debug("[cache] Updating caches with {storageMode: {0}}".format(r)),_.forEach(_.keys(s),(function(e){var t=a.get(e);t&&t.setOptions(c(),!0)})))}return function(){listeners=[i.api.data.on.changed(e,u,this)]}(),{get:function(e,t,n){var i,r=(e=e||"")+((t=t||o.SHORT)/1e3+"s");if(n&&"function"==typeof n){for(var l=1;a.get(r+l);)l++;r+=l}else i=a.get(r);if(s[r]||(s[r]=!0),i)return i;var u=c({maxAge:t,onExpire:n||null});return console.debug("[cache] Creating cache {{0}} with {storageMode: {1}}...".format(r,u.storageMode)),a.createCache(r,u)},clear:function(e){_.forEach(_.keys(s),(function(t){if(t.startsWith(e)){var n=a.get(t);n&&n.removeAll()}}))},clearAll:function(){console.debug("[cache] Cleaning all caches..."),_.forEach(_.keys(s),(function(e){var t=a.get(e);t&&t.removeAll()}))},constants:o}}]),angular.module("cesium.modal.services",["cesium.utils.services"]).controller("EmptyModalCtrl",(function(){})).controller("AboutModalCtrl",["$scope","UIUtils","csHttp",function(e,t,n){e.openLink=function(e,i,a){return(a=a||{}).onError=function(){return t.popover.copy(e,i)},n.uri.open(i,a)}}]).factory("ModalUtils",["$ionicModal","$rootScope","$q","$injector","$controller","$timeout","Device",function(e,t,n,i,a,o,r){function s(e,t,i){e.deferred=t||n.defer(),e.resolved=!1,e.openModal=function(){return e.modal.show()},e.hideModal=function(){return e.modal.hide()},e.closeModal=function(t){return e.resolved=!0,r.enable&&r.keyboard.close(),e.modal.remove().then((function(){return document.body.classList.remove("modal-open"),e.deferred.resolve(t),t}))},e.setForm=function(t,n){n?e[n]=t:e.form=t},e.getParameters=function(){return i},e.$on("modal.hidden",(function(){e.resolved||(e.resolved=!0,o((function(){return e.deferred.resolve(),e.modal.remove().then((function(){document.body.classList.remove("modal-open")}))}),(e.modal.hideDelay||320)+20))}))}return{show:function(i,o,r,l){var c,u,d,p=n.defer();if((l=l||{}).animation=l.animation||"slide-in-up",l.focusFirstInput=!1,o){l.scope=l.scope?l.scope.$new():t.$new(),s.call({},l.scope,p,r);var m={$scope:l.scope,parameters:r},E=(u={isControllerAs:!1,controllerName:"",propName:""},d=((c=o)||"").trim().split(/\s+/),u.isControllerAs=3===d.length&&"as"===(d[1]||"").toLowerCase(),u.isControllerAs?(u.controllerName=d[0],u.propName=d[2]):u.controllerName=c,u),b=a(o,m);E.isControllerAs&&(b.openModal=l.scope.openModal,b.closeModal=l.scope.closeModal)}return e.fromTemplateUrl(i,l).then((function(e){if(o)e.scope.$parent.modal=e;else{var t=e.scope;s.call({},t,p,r),t.modal=e}return e.show()}),(function(e){p.reject(e)})),p.promise}}}]).factory("Modals",["$rootScope","$translate","$ionicPopup","$timeout","ModalUtils","UIUtils",function(e,t,n,i,a,o){function r(e){return a.show("templates/join/modal_join_member.html","JoinModalCtrl",e)}function s(e){return a.show("templates/join/modal_join_wallet.html","JoinModalCtrl",e)}return{showTransfer:function(e){var t=o.screen.isSmall();return a.show("templates/wallet/modal_transfer.html","TransferModalCtrl",e,{focusFirstInput:!t})},showLogin:function(e){return a.show("templates/login/modal_login.html","LoginModalCtrl",e,{focusFirstInput:!0,backdropClickToClose:!1})},showWotLookup:function(e){return a.show("templates/wot/modal_lookup.html","WotLookupModalCtrl",e||{},{focusFirstInput:!0})},showNetworkLookup:function(e){return a.show("templates/network/modal_network.html","NetworkLookupModalCtrl",e,{focusFirstInput:!0})},showAbout:function(e){return a.show("templates/modal_about.html","AboutModalCtrl",e)},showJoin:function(e){return a.show("templates/join/modal_choose_account_type.html","JoinChooseAccountTypeModalCtrl",e).then((function(e){if(e)return"member"==e.accountType?r(e):s(e)}))},showJoinMember:r,showJoinWallet:s,showHelp:function(e){return a.show("templates/help/modal_help.html","HelpModalCtrl",e)},showAccountSecurity:function(e){return a.show("templates/wallet/modal_security.html","WalletSecurityModalCtrl",e)},showLicense:function(e){return a.show("templates/currency/modal_license.html","CurrencyLicenseModalCtrl",e)},showSelectPubkeyIdentity:function(e){return a.show("templates/wot/modal_select_pubkey_identity.html","WotSelectPubkeyIdentityModalCtrl",e)},showSelectWallet:function(e){return a.show("templates/wallet/list/modal_wallets.html","WalletSelectModalCtrl",e)},showPassword:function(i){(i=i||{}).title=i.title||"COMMON.SET_PASSWORD_TITLE",i.subTitle=i.subTitle||"COMMON.SET_PASSWORD_SUBTITLE";var a=i.scope?i.scope.$new():e.$new();return a.formData={password:void 0},a.setForm=function(e){a.form=e},a.submit=function(e){a.form.$submitted=!0,e&&e.preventDefault&&e.preventDefault(),a.form.$valid&&a.formData.password&&i.popup.close(a.formData.password)},a.error=i.error||void 0,t([i.title,i.subTitle,"COMMON.BTN_OK","COMMON.BTN_CANCEL"]).then((function(e){return i.popup=n.show({templateUrl:"templates/common/popup_password.html",title:e[i.title],subTitle:e[i.subTitle],scope:a,buttons:[{text:e["COMMON.BTN_CANCEL"]},{text:e["COMMON.BTN_OK"],type:"button-positive",onTap:a.submit}]}),i.popup}))}}}]).factory("csPopovers",["$rootScope","$translate","$ionicPopup","$timeout","UIUtils","$controller",function(e,t,n,i,a,o){return{showSelectWallet:function(t,n){var i=(n=n||{}).parameters||{};delete n.parameters;var r=n.scope&&n.scope.$new()||e.$new(!0);n.scope=r,n.templateUrl="templates/wallet/list/popover_wallets.html",n.autoremove=!0,angular.extend(this,o("WalletSelectPopoverCtrl",{$scope:n.scope,parameters:i}));var s=n.afterShow;return n.afterShow=function(e){r.closePopover=function(t){e.scope.closePopover(t)},s&&s(e)},a.popover.show(t,n).then((function(e){return r.$destroy(),e}))}}}]),angular.module("cesium.http.services",["cesium.cache.services"]).factory("csHttp",["$http","$q","$timeout","$window","csSettings","csCache","Device",function(e,t,n,i,a,o,r){var s=a.data.timeout,l=[],c={};function u(e,t){return e?e+(t&&80!=t&&443!=t?":"+t:""):null}function d(e,t,n,i){return(443==t||i?"https":"http")+"://"+u(e,t)+(n||"")}function p(e,t,n,i){t&&t.message?e(t):403==i?e({ucode:403,message:"Resource is forbidden"+(n?" ("+n+")":"")}):404==i?e({ucode:404,message:"Resource not found"+(n?" ("+n+")":"")}):n?(console.error("[http] Get HTTP error {status: "+i+"} on ["+n+"]"),e("Error while requesting ["+n+"]")):e("Unknown error from node")}function m(e,t,n,i){var a=[],o={},r=e;return"object"==typeof t&&(a=_.keys(t)),_.forEach(a,(function(e){r===(r=r.replace(":"+e,t[e]))&&(o[e]=t[e])})),n.params=o,i(r,n)}function E(e){var t;e.startsWith("duniter://")&&(t="duniter",e=e.replace("duniter://","http://"));var n=document.createElement("a");n.href=e;var i=n.pathname;i&&i.startsWith("/")&&(i=i.substring(1));var a={protocol:t||n.protocol,hostname:n.hostname,host:n.host,port:n.port,username:n.username,password:n.password,pathname:i,search:n.search,hash:n.hash};return n.remove(),a}function b(e,t){var n=e.split("."),i=t.split(".");function a(e){for(var t=0;t<e.length;++t){if(n=e[t],!/^\d+$/.test(n))return!1;e[t]=parseInt(e[t])}var n;return!0}if(!a(n)||!a(i))return NaN;for(var o=0;o<n.length;++o){if(i.length===o)return 1;if(n[o]!==i[o])return n[o]>i[o]?1:-1}return n.length!=i.length?-1:0}return s||(s=4e3),{get:function(n,i,a,o,r){if(!n)return t.reject("[http] invalid URL from host: "+n);var l=d(n,i,a,o);return function(n){return t((function(t,i){m(l,n,{timeout:r||s,responseType:"json"},(function(n,a){e.get(n,a).success((function(e,n,i,a){t(e)})).error((function(e,t,a,o){p(i,e,n,t)}))}))}))}},getWithCache:function(n,i,a,r,l,u,E,b){var g=d(n,i,a,r);return b=b||"csHttp-",l=l||o.constants.LONG,c[b]=!0,function(n){return t((function(t,i){var a={timeout:E||s,responseType:"json"};a.cache=u?o.get(b,l,(function(t,n,i){console.debug("[http] Refreshing cache for {{0}} ".format(t)),e.get(t,a).success((function(e){a.cache.put(t,e),i&&i(t,e)}))})):o.get(b,l),m(g,n,a,(function(n,a){e.get(n,a).success((function(e){t(e)})).error((function(e,t){p(i,e,n,t)}))}))}))}},post:function(n,i,a,o,r){var l=d(n,i,a,o);return function(n,i){return t((function(t,a){m(l,i,{timeout:r||s,headers:{"Content-Type":"application/json;charset=UTF-8"}},(function(i,o){e.post(i,n,o).success((function(e){t(e)})).error((function(e,t){p(a,e,i,t)}))}))}))}},ws:function(e,i,o,r,s){if(!o)throw console.error("calling csHttp.ws without path argument"),"calling csHttp.ws without path argument";var c=function(e,t,n,i){return(443==t||i?"wss":"ws")+"://"+u(e,t)+(n||"")}(e,i,o,r);function d(e){if(!e.delegate)throw new Error("Websocket {0} was closed!".format(c));return 1==e.delegate.readyState?t.when(e.delegate):3==e.delegate.readyState?t.reject("Unable to connect to websocket ["+e.delegate.url+"]"):(e.waitDuration>=s?(e.waitRetryDelay=e.waitRetryDelay&&Math.min(e.waitRetryDelay+2e3,3e4)||2e3,console.debug("[http] Will retry websocket [{0}] in {1}s...".format(e.path,Math.round(e.waitRetryDelay/1e3)))):Math.round(e.waitDuration/1e3)%10==0&&console.debug("[http] Waiting websocket ["+e.path+"]..."),n((function(){return e.waitDuration+=e.waitRetryDelay,d(e)}),e.waitRetryDelay))}function p(e,t,n){return e.delegate||(e.path=o,e.callbacks=[],e.waitDuration=0,e.waitRetryDelay=200,m(c,n,{},(function(t){e.delegate=new WebSocket(t),e.delegate.onerror=function(t){e.delegate.readyState=3},e.delegate.onmessage=function(t){var n=JSON.parse(t.data);_.forEach(e.callbacks,(function(e){e(n)}))},e.delegate.onopen=function(t){console.debug("[http] Listening on websocket ["+e.path+"]..."),l.push(e),e.delegate.openTime=Date.now()},e.delegate.onclose=function(t){var i=_.findIndex(l,(function(t){return t.path===e.path}));i>=0&&l.splice(i,1),e.delegate.closing?e.delegate=null:e.delegate.openTime?(console.debug("[http] Unexpected close of websocket [{0}] (open {1} ms ago): re-opening...",o,Date.now()-e.delegate.openTime),e.delegate=null,p(e,null,n)):t&&(console.debug("[http] Unexpected close of websocket [{0}]: error code: ".format(o),t&&t.code||t),e.delegate=null,p(e,null,n))}}))),t&&e.callbacks.push(t),d(e)}function E(e){e.delegate&&(e.delegate.closing=!0,console.debug("[http] Closing websocket ["+e.path+"]..."),e.delegate.close(),e.callbacks=[],e.onclose&&e.onclose())}return s=s||a.data.timeout,{open:function(e){return p(this,null,e)},on:function(e,t){return p(this,e,t)},onListener:function(e,t){var n=this;return p(n,e,t),function(){!function(e,t){e.callbacks=_.reject(e.callbacks,(function(e){return e===t})),e.callbacks.length||E(e)}(n,e)}},send:function(e){var t=this;return d(t).then((function(){t.delegate&&t.delegate.send(e)}))},close:function(){E(this)},isClosed:function(){return!this.delegate||this.delegate.closing}}},closeAllWs:function(){l.length>0&&(console.debug("[http] Closing all websocket..."),_.forEach(l,(function(e){e.close()})),l=[])},getUrl:d,getServer:u,uri:{parse:E,open:function(e,t){if(t=t||{},!e.startsWith("http://")&&!e.startsWith("https://")){var n=E(e);if(!n.protocol&&t.type&&(n.protocol="email"==t.type?"mailto:":"phone"==t.type?"tel:":"",e=n.protocol+e),"mailto:"==n.protocol&&r.isDesktop())try{return void nw.Shell.openExternal(e)}catch(e){console.error("[http] Failed not open 'mailto:' URI into external tool.")}if("mailto:"!=n.protocol&&"tel:"!=n.protocol||!r.enable)return void(t.onError&&"function"==typeof t.onError&&t.onError(e))}var a,o=t.target||(r.enable?"_system":"_blank");if("_blank"===o||"_system"===o&&r.isDesktop())try{return void nw.Shell.openExternal(e)}catch(e){console.error("[http] Failed not open URI into external browser.")}if("_blank"===o&&r.isDesktop()){if(nw&&nw.Shell)return nw.Shell.openExternal(e),!1;a="location=1,titlebar=1,status=1,menubar=1,toolbar=1,resizable=1,scrollbars=1",i.screen&&i.screen.width&&i.screen.height&&(a+=",width={0},height={1}".format(Math.trunc(i.screen.width/2),Math.trunc(i.screen.height/2)))}var s=i.open(e,o,a);a&&i.screen&&i.screen.width&&i.screen.height&&(s.moveTo(i.screen.width/2/2,i.screen.height/2/2),s.focus())}},date:{now:function(){return moment().utc().unix()}},version:{compare:b,isCompatible:function(e,t){return console.debug("[http] Checking actual version [{0}] is compatible with min expected version [{1}]".format(t,e)),b(e,t)<=0}},cache:angular.merge({clear:function(e){e=e||"csHttp-",console.debug("[http] Cleaning cache {prefix: '{0}'}...".format(e)),o.clear(e)},clearAll:function(){console.debug("[http] Cleaning all caches..."),_.keys(c).forEach((function(e){o.clear(e)}))}},o.constants)}}]),angular.module("cesium.storage.services",["cesium.config"]).factory("sessionStorage",["$window","$q",function(e,t){var n={storage:e.sessionStorage||{},put:function(e,i){return n.storage[e]=i,t.when()},get:function(e,i){return t.when(n.storage[e]||i)},setObject:function(e,i){return n.storage[e]=JSON.stringify(i),t.when()},getObject:function(e){return t.when(JSON.parse(n.storage[e]||"null"))}};return n}]).factory("localStorage",["$window","$q","$log","sessionStorage",function(e,t,n,i){var a,o="Cesium",r=!1,s=!0,l={standard:{storage:null},secure:{storage:null}};function c(){return e.localStorage?(console.debug("[storage] Starting {local} storage..."),l.standard.storage=e.localStorage,_.forEach(_.keys(l.standard),(function(e){l[e]=l.standard[e]}))):(console.debug("[storage] Starting {session} storage..."),_.forEach(_.keys(i),(function(e){l[e]=i[e]}))),t.when()}function u(){if(a)return a;var e=Date.now();return(a=s?function(){console.debug("[storage] Starting {secure} storage..."),_.forEach(_.keys(l.secure),(function(e){l[e]=l.secure[e]}));var e=t.defer();return cordova.plugins&&cordova.plugins.SecureStorage?l.secure.storage=new cordova.plugins.SecureStorage((function(){e.resolve()}),(function(t){console.error("[storage] Could not use secure storage. Will use standard.",t),c(),e.resolve()}),o):(c(),e.resolve()),e.promise}():c()).then((function(){console.debug("[storage] Started in "+(Date.now()-e)+"ms"),r=!0,a=null}))}return l.standard.put=function(e,n){return angular.isDefined(n)&&null!=n?l.standard.storage[e]=n:l.standard.storage.removeItem(e),t.when()},l.standard.remove=function(e,n){return l.standard.storage.removeItem(e),t.when()},l.standard.get=function(e,n){return t.when(l.standard.storage[e]||n)},l.standard.setObject=function(e,n){return l.standard.storage[e]=JSON.stringify(n),t.when()},l.standard.getObject=function(e){return t.when(JSON.parse(l.standard.storage[e]||"null"))},l.secure.put=function(e,i){return t((function(t,a){null!=i?l.secure.storage.set((function(e){t()}),(function(e){n.error(e),a(e)}),e,i):l.secure.storage.remove((function(){t()}),(function(e){n.error(e),t()}),e)}))},l.secure.get=function(e,i){return t((function(t,a){l.secure.storage.get((function(e){t(!e&&i?i:e)}),(function(e){n.error(e),t()}),e)}))},l.secure.setObject=function(e,i){return n.debug("[storage] Setting object into secure storage, using key="+e),t((function(t,n){l.secure.storage.set(t,n,e,i?JSON.stringify(i):void 0)}))},l.secure.getObject=function(e){return n.debug("[storage] Getting object from secure storage, using key="+e),t((function(t,i){l.secure.storage.get((function(e){t(JSON.parse(e||"null"))}),(function(e){n.error(e),t()}),e)}))},l.isStarted=function(){return r},l.ready=function(){return r?t.when():a||u()},u(),l}]),angular.module("cesium.device.services",["cesium.utils.services","cesium.settings.services"]).factory("Device",["$rootScope","$translate","$ionicPopup","$q","$cordovaClipboard","$cordovaBarcodeScanner","$cordovaCamera","ionicReady",function(e,t,n,i,a,o,r,s){var l,c=400,u=400,d={enable:!0},p={},m=!1;function E(e){if(!d.enable)return i.reject("Barcode scanner not enable. Please call 'ionicReady()' once before use (e.g in app.js).");var t=i.defer();return cordova.plugins.barcodeScanner.scan((function(e){e.cancelled?(console.debug("[device] barcode scanner scan: CANCELLED"),t.resolve()):(console.debug("[device] barcode scanner scan: "+e.text),t.resolve(e.text))}),(function(e){console.error("[device] Error while using barcode scanner: "+e),t.reject(e)}),e),t.promise}return d.clipboard={copy:function(e,t){if(!d.enable)return i.reject("Device disabled");var n=i.defer();return a.copy(e).then((function(){t&&t(),n.resolve()}),(function(){n.reject({message:"ERROR.COPY_CLIPBOARD"})})),n.promise}},d.camera={getPicture:function(e){return d.camera.enable?(e&&"string"==typeof e&&(e={sourceType:e}),e=e||{},angular.isUndefined(e.sourceType)?t(["SYSTEM.PICTURE_CHOOSE_TYPE","SYSTEM.BTN_PICTURE_GALLERY","SYSTEM.BTN_PICTURE_CAMERA"]).then((function(t){return n.show({title:t["SYSTEM.PICTURE_CHOOSE_TYPE"],buttons:[{text:t["SYSTEM.BTN_PICTURE_GALLERY"],type:"button",onTap:function(e){return navigator.camera.PictureSourceType.PHOTOLIBRARY}},{text:t["SYSTEM.BTN_PICTURE_CAMERA"],type:"button button-positive",onTap:function(e){return navigator.camera.PictureSourceType.CAMERA}}]}).then((function(t){return console.info("[camera] User select sourceType:"+t),e.sourceType=t,d.camera.getPicture(e)}))})):(e.quality=e.quality||50,e.destinationType=e.destinationType||navigator.camera.DestinationType.DATA_URL,e.encodingType=e.encodingType||navigator.camera.EncodingType.PNG,e.targetWidth=e.targetWidth||u,e.targetHeight=e.targetHeight||c,r.getPicture(e))):i.reject("Camera not enable. Please call 'ionicReady()' once before use (e.g in app.js).")},scan:function(e){return console.warn("Deprecated use of Device.camera.scan(). Use Device.barcode.scan() instead"),E(e)}},d.barcode={enable:!1,scan:E},d.keyboard={enable:!1,close:function(){d.keyboard.enable&&cordova.plugins.Keyboard.close()}},d.keyboard.digit={settings:{bindModel:function(t,n,i){t=t||e;var a=function(){return(n||"").split(".").reduce((function(e,t){return e?e[t]:void 0}),t)},o=function(e){var i=(n||"").split("."),a=i.length&&i[i.length-1];i.reduce((function(t,n){if(n!=a)return t[n];t[a]=e}),t)};return(i=i||{}).animation=i.animation||"pop",i.action=i.action||function(e){o((a()||"")+e)},i.decimal&&(i.decimalSeparator=i.decimalSeparator||".",i.leftButton={html:"<span>.</span>",action:function(){var e=a()||"";e.indexOf(i.decimalSeparator)>=0||(e.trim().length||(e="0"),o(e+i.decimalSeparator))}}),i.rightButton=i.rightButton||{html:'<i class="icon ion-backspace-outline"></i>',action:function(){var e=a();e&&e.length&&(e=e.slice(0,-1),o(e))}},i}}},d.isIOS=function(){return!!navigator.userAgent.match(/iPhone | iPad | iPod/i)||ionic.Platform.isIOS()},d.isOSX=function(){return!!navigator.userAgent.match(/Macintosh/i)||ionic.Platform.is("osx")},d.isDesktop=function(){if(!angular.isDefined(p.isDesktop))try{p.isDesktop=!(d.enable||!process||!nw||!nw.App)}catch(e){p.isDesktop=!1}return p.isDesktop},d.isWeb=function(){return!d.enable&&!d.isDesktop()},d.ready=function(){return m?i.when():l||d.start()},d.start=function(){return l=s().then((function(){d.enable=window.cordova&&cordova&&cordova.plugins,d.enable?(d.camera.enable=!!navigator.camera,d.keyboard.enable=cordova&&cordova.plugins&&!!cordova.plugins.Keyboard,
-d.barcode.enable=cordova&&cordova.plugins&&!!cordova.plugins.barcodeScanner&&!d.isOSX(),d.clipboard.enable=cordova&&cordova.plugins&&!!cordova.plugins.clipboard,d.keyboard.enable&&angular.extend(d.keyboard,cordova.plugins.Keyboard),console.debug("[device] Ionic platform ready, with [camera: {0}] [barcode scanner: {1}] [keyboard: {2}] [clipboard: {3}]".format(d.camera.enable,d.barcode.enable,d.keyboard.enable,d.clipboard.enable)),cordova.InAppBrowser&&console.debug("[device] Enabling InAppBrowser")):console.debug("[device] Ionic platform ready - no device detected."),m=!0,l=null}))},d}]),angular.module("cesium.currency.services",["ngApi","cesium.bma.services"]).factory("csCurrency",["$rootScope","$q","$timeout","BMA","Api","csSettings",function(e,n,i,a,o,r){var s,l,c={WELL_KNOWN_CURRENCIES:{g1:{firstBlockTime:1488987127,medianTimeOffset:3600}}},u={},d=!1,p=new o(this,"csCurrency");function m(){u.name=null,u.parameters=null,u.firstBlockTime=null,u.membersCount=null,u.cache={},u.node=a,u.currentUD=null,u.medianTimeOffset=0,d=!1,s=void 0,p.data.raise.reset(u)}function E(){return n.all([a.blockchain.parameters().then((function(e){return u.name=e.currency,u.parameters=e,u.medianTimeOffset=e.avgGenTime*e.medianTimeBlocks/2,e})).then((function(e){return t=e.currency,c.WELL_KNOWN_CURRENCIES[t]?(angular.merge(u,c.WELL_KNOWN_CURRENCIES[t]),n.when()):a.blockchain.block({block:0}).then((function(e){u.firstBlockTime=e.medianTime})).catch((function(e){if(e&&e.ucode===a.errorCodes.BLOCK_NOT_FOUND)return u.firstBlockTime=0,u.initPhase=!0,void console.warn("[currency] Blockchain not launched: Enable init phase mode");throw e}));var t})),a.blockchain.stats.ud().then((function(e){return e.result.blocks.length?function e(t,n){if(!t.result.blocks.length||n<0)return u.currentUD=u.parameters?u.parameters.ud0:-1,u.currentUD;var i=t.result.blocks[n];return a.blockchain.block({block:i}).then((function(e){var t,n;return u.currentUD=(t=e.dividend,(n=e.unitbase)<=0?t:t*Math.pow(10,n)),u.currentUD})).catch((function(a){if(console.error("[currency] Unable to load last block with UD, with number {0}".format(i)),n>0)return console.error("[currency] Retrying to load UD from a previous block..."),e(t,n-1);throw u.currentUD=null,a}))}(e,e.result.blocks.length-1):(u.currentUD=u.parameters?u.parameters.ud0:-1,u.currentUD)})).catch((function(e){throw u.currentUD=null,e})),p.data.raisePromise.load(u)]).catch((function(e){throw m(),e}))}function b(){return d?n.when(u):s||v()}function g(e){return function(){return d?n.when(u[e]):s||v().then((function(){return u[e]}))}}function f(e){var n=new t(e);n.cleanData(),console.debug("[currency] Received new block {"+n.number+"-"+n.hash+"}"),u.currentBlock=n,u.currentBlock.receivedAt=moment().utc().unix(),u.medianTime=n.medianTime,u.membersCount=n.membersCount,n.dividend&&(u.currentUD=n.dividend),p.data.raise.newBlock(n)}function T(){console.debug("[currency] Stopping..."),_.forEach(l,(function(e){e()})),l=[],m()}function h(){return T(),i(v,200)}function v(){console.debug("[currency] Starting...");var t=Date.now();return s=a.ready().then(E).then((function(){!function(){l=[a.api.node.on.restart(e,h,this),a.websocket.block().onListener(f)]}(),console.debug("[currency] Started in "+(Date.now()-t)+"ms"),d=!0,s=null,p.data.raise.ready(u)})).then((function(){return u}))}var I=g("currentBlock");function O(e){return I().then((function(t){var n=moment().utc().unix();if(e){if(t&&t.receivedAt&&n-t.receivedAt<60)return t;t||console.warn("[currency] No current block in cache: get it from network. Websocket [/ws/block] may not be started ?")}return a.blockchain.current(!1).catch((function(e){if(e&&e.ucode==a.errorCodes.NO_CURRENT_BLOCK)return{number:0,hash:a.constants.ROOT_BLOCK_HASH,medianTime:n};throw e})).then((function(e){return u.currentBlock=e,u.currentBlock.receivedAt=n,e}))}))}return p.registerEvent("data","ready"),p.registerEvent("data","load"),p.registerEvent("data","reset"),p.registerEvent("data","newBlock"),m(),{ready:function(){return d?n.when(u):s||v()},start:v,stop:T,data:u,get:b,name:g("name"),parameters:g("parameters"),currentUD:g("currentUD"),medianTimeOffset:g("medianTimeOffset"),blockchain:{current:O,lastValid:function(){return r.data.blockValidityWindow<=0?O(!0):O(!0).then((function(e){var t=e.number-r.data.blockValidityWindow;return t>0?a.blockchain.block({block:t}):e}))}},date:{now:function(){return moment().utc().unix()-(u.medianTimeOffset||c.WELL_KNOWN_CURRENCIES.g1.medianTimeOffset)}},api:p,default:function(){return console.warn("[currency] 'csCurrency.default()' has been DEPRECATED - Please use 'csCurrency.get()' instead."),b()}}}]),angular.module("cesium.bma.services",["ngApi","cesium.http.services","cesium.settings.services"]).factory("BMA",["$q","$window","$rootScope","$timeout","csCrypto","Api","Device","UIUtils","csConfig","csSettings","csCache","csHttp",function(e,t,n,i,a,o,r,s,l,c,u,d){function p(r,p,m,E){var b,g=r?"{0}:{1}".format(r,p||(m?"443":"80")):"default",f="BMA-",T="[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}",h="SIG\\(("+T+")\\)",v="OBJ\\(([0-9]+)\\)",I="( ([a-z_][a-z0-9-_.ÄŸÄž]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))( (.+))?",O={BMA:"BASIC_MERKLED_API",BMAS:"BMAS",WS2P:"WS2P",BMATOR:"BMATOR",WS2PTOR:"WS2PTOR"},N={USER_ID:"[0-9a-zA-Z-_]+",CURRENCY:"[0-9a-zA-Z-_]+",PUBKEY:T,PUBKEY_WITH_CHECKSUM:"("+T+"):([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{3})",COMMENT:"[ a-zA-Z0-9-_:/;*\\[\\]()?!^\\+=@&~#{}|\\\\<>%.]*",INVALID_COMMENT_CHARS:"[^ a-zA-Z0-9-_:/;*\\[\\]()?!^\\+=@&~#{}|\\\\<>%.]*",URI_WITH_AT:"duniter://(?:([A-Za-z0-9_-]+):)?("+T+"@([a-zA-Z0-9-.]+.[ a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+)",URI_WITH_PATH:"duniter://([a-zA-Z0-9-.]+.[a-zA-Z0-9-_:.]+)/("+T+")(?:/([A-Za-z0-9_-]+))?",BMA_ENDPOINT:O.BMA+I,BMAS_ENDPOINT:O.BMAS+I,WS2P_ENDPOINT:O.WS2P+" ([a-f0-9]{8})"+I,BMATOR_ENDPOINT:O.BMATOR+" ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?",WS2PTOR_ENDPOINT:O.WS2PTOR+" ([a-f0-9]{8}) ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?(?: (.+))?"},R={PROTOCOL_VERSION:10,ROOT_BLOCK_HASH:"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",LIMIT_REQUEST_COUNT:5,LIMIT_REQUEST_DELAY:1e3,regexp:N,api:O},A=this;function S(e,t,n){A.started&&A.stop(),A.alive=!1,c.data&&c.data.node&&(e=e||c.data.node.host,t=t||c.data.node.port,n=angular.isDefined(n)?n:443==t||c.data.node.useSsl||A.forceUseSsl),e&&(A.host=e,A.port=t||80,A.useSsl=angular.isDefined(n)?n:443==A.port||A.forceUseSsl,A.server=d.getServer(e,t),A.url=d.getUrl(e,t,"",n))}function C(e){return new RegExp("^"+e+"$")}function L(e){return new RegExp(e)}function D(){A.raw&&(console.warn("[BMA] Closing all websockets..."),_.keys(A.raw.wsByPath||{}).forEach((function(e){A.raw.wsByPath[e].close()})),A.raw.wsByPath={})}function y(e,t){t=A.useCache&&t||0;var n=e+(t?"#"+t:""),a=function(o){if(!A.started)return A._startPromise||console.warn("[BMA] Trying to get [{0}] before start(). Waiting...".format(e)),A.ready().then((function(){return a(o)}));var r=A.raw.getByPath[n];r||(r=t?d.getWithCache(A.host,A.port,e,A.useSsl,t,null,null,f):d.get(A.host,A.port,e,A.useSsl),A.raw.getByPath[n]=r);var l=1;return r(o).catch((function(e){if(e&&e.ucode===w.errorCodes.HTTP_LIMITATION&&l<=w.constants.LIMIT_REQUEST_COUNT)return 1===l&&(console.warn("[BMA] Too many HTTP requests: Will wait then retry..."),s.loading.update({template:"COMMON.LOADING_WAIT"})),i((function(){return l++,r(o)}),w.constants.LIMIT_REQUEST_DELAY);throw e}))};return a}function P(e){var t=function(n,i){if(!A.started)return A._startPromise||console.error("[BMA] Trying to post [{0}] before start()...".format(e)),A.ready().then((function(){return t(n,i)}));var a=A.raw.postByPath[e];return a||(a=d.post(A.host,A.port,e,A.useSsl),A.raw.postByPath[e]=a),a(n,i)};return t}function k(e){return function(){var t=A.raw.wsByPath[e];return t&&!t.isClosed()||((t=d.ws(A.host,A.port,e,A.useSsl)).onclose=function(){delete A.raw.wsByPath[e]},A.raw.wsByPath[e]=t),t}}function M(e){i((function(){w.copy(e.node)}),1e3)}A.raw={getByPath:{},postByPath:{},wsByPath:{}},A.api=new o(this,"BMA-"+g),A.started=!1,A.init=S,A.forceUseSsl=!!("true"===l.httpsMode||!0===l.httpsMode||"force"===l.httpsMode||t.location&&"https:"===t.location.protocol),A.forceUseSsl&&console.debug("[BMA] Enable SSL (forced by config or detected in URL)"),r&&S(r,p,m),A.useCache=!angular.isDefined(E)||E,A.isAlive=function(e){return e=e||A,d.get(e.host,e.port,"/node/summary",e.useSsl)().then((function(e){var t=e&&e.duniter&&e.duniter.software,n=!0;return"duniter"===t&&e.duniter.version?n=d.version.isCompatible(c.data.minVersion,e.duniter.version):console.debug("[BMA] Unknown node software [{0} v{1}]: could not check compatibility.".format(t||"?",e.duniter.version||"?")),n||console.error("[BMA] Incompatible node [{0} v{1}]: expected at least v{2}".format(t,e.duniter.version,c.data.minVersion)),n})).catch((function(){return!1}))},A.isStarted=function(){return A.started},A.ready=function(){return A.started?e.when(!0):A._startPromise||A.start()},A.start=function(){if(A._startPromise)return A._startPromise;if(A.started)return e.when(A.alive);if(!A.host)return c.ready().then((function(){return A.init(),A.useCache=!0,A.start()}));console.debug("[BMA] Starting {0} {ssl: {1})...".format(A.server,A.useSsl));var t=Date.now();return A._startPromise=e.all([c.ready,A.isAlive()]).then((function(e){return A.alive=e[1],A.alive?(b&&b.length||function(){b=[c.api.data.on.changed(n,M,this)]}(),console.debug("[BMA] Started in "+(Date.now()-t)+"ms"),A.api.node.raise.start(),A.started=!0,delete A._startPromise,!0):(console.error("[BMA] Could not start {0} : unreachable".format(A.server)),A.started=!0,delete A._startPromise,!1)})),A._startPromise},A.stop=function(){return A.started||A._startPromise?(console.debug("[BMA] Stopping..."),_.forEach(b,(function(e){e()})),b=[],delete A._startPromise,A.alive?(D(),console.debug("[BMA] Cleaning cache {prefix: '{0}'}...".format(f)),u.clear(f),A.raw.getByPath={},A.raw.postByPath={},A.raw.wsByPath={},A.alive=!1,A.started=!1,A.api.node.raise.stop()):A.started=!1,e.when()):e.when()},A.restart=function(){return A.stop(),i(A.start,200).then((function(e){return e&&A.api.node.raise.restart(),e}))},A.api.registerEvent("node","start"),A.api.registerEvent("node","stop"),A.api.registerEvent("node","restart");var w={errorCodes:{REVOCATION_ALREADY_REGISTERED:1002,HTTP_LIMITATION:1006,IDENTITY_SANDBOX_FULL:1007,NO_MATCHING_IDENTITY:2001,UID_ALREADY_USED:2003,NO_MATCHING_MEMBER:2004,NO_IDTY_MATCHING_PUB_OR_UID:2021,WRONG_SIGNATURE_MEMBERSHIP:2006,MEMBERSHIP_ALREADY_SEND:2007,NO_CURRENT_BLOCK:2010,BLOCK_NOT_FOUND:2011,SOURCE_ALREADY_CONSUMED:2015,TX_INPUTS_OUTPUTS_NOT_EQUAL:2024,TX_OUTPUT_SUM_NOT_EQUALS_PREV_DELTAS:2025,TX_ALREADY_PROCESSED:2030},constants:R,regexp:{USER_ID:C(N.USER_ID),COMMENT:C(N.COMMENT),PUBKEY:C(N.PUBKEY),PUBKEY_WITH_CHECKSUM:C(N.PUBKEY_WITH_CHECKSUM),CURRENCY:C(N.CURRENCY),URI:C(N.URI),BMA_ENDPOINT:C(N.BMA_ENDPOINT),BMAS_ENDPOINT:C(N.BMAS_ENDPOINT),WS2P_ENDPOINT:C(N.WS2P_ENDPOINT),BMATOR_ENDPOINT:C(N.BMATOR_ENDPOINT),WS2PTOR_ENDPOINT:C(N.WS2PTOR_ENDPOINT),TX_OUTPUT_SIG:C(h),TX_OUTPUT_FUNCTION:L("SIG\\(([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})\\)|XHX\\(([A-F0-9]{1,64})\\)|CSV\\(([0-9]{1,8})\\)|CLTV\\(([0-9]{1,10})\\)"),TX_OUTPUT_OBJ_OPERATOR_AND:L(v+"([ ]*&&[ ]*("+v+"))+"),TX_OUTPUT_OBJ_OPERATOR_OR:L(v+"([ ]*\\|\\|[ ]*("+v+"))+"),TX_OUTPUT_OBJ:L(v),TX_OUTPUT_OBJ_OPERATOR:L("OBJ\\(([0-9]+)\\)[ ]*(&&)|(\\|\\|)[ ]*OBJ\\(([0-9]+)\\)"),TX_OUTPUT_OBJ_PARENTHESIS:L("\\(("+v+")\\)"),TX_OUTPUT_FUNCTIONS:L("SIG\\(([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})\\)|XHX\\(([A-F0-9]{1,64})\\)|CSV\\(([0-9]{1,8})\\)|CLTV\\(([0-9]{1,10})\\)([ ]*(&&)|(\\|\\|)[ ]*SIG\\(([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})\\)|XHX\\(([A-F0-9]{1,64})\\)|CSV\\(([0-9]{1,8})\\)|CLTV\\(([0-9]{1,10})\\))*")},node:{summary:y("/node/summary",u.constants.LONG),same:function(e){return(e=e||{}).useSsl=angular.isDefined(e.useSsl)?e.useSsl:e.port&&443==e.port,A.host===e.host&&(!A.port&&!e.port2||A.port==e.port2||80)&&A.useSsl===e.useSsl},forceUseSsl:A.forceUseSsl},network:{peering:{self:y("/network/peering"),peers:y("/network/peering/peers")},peers:y("/network/peers"),ws2p:{info:y("/network/ws2p/info"),heads:y("/network/ws2p/heads")}},wot:{lookup:y("/wot/lookup/:search"),certifiedBy:y("/wot/certified-by/:pubkey",u.constants.SHORT),certifiersOf:y("/wot/certifiers-of/:pubkey",u.constants.SHORT),member:{all:y("/wot/members",u.constants.LONG),pending:y("/wot/pending",u.constants.SHORT)},requirements:function(e,t){return!0!==t?w.raw.wot.requirements(e):w.raw.wot.requirementsWithCache(e)},add:P("/wot/add"),certify:P("/wot/certify"),revoke:P("/wot/revoke")},blockchain:{parameters:y("/blockchain/parameters",u.constants.VERY_LONG),block:y("/blockchain/block/:block",u.constants.SHORT),blocksSlice:y("/blockchain/blocks/:count/:from"),current:function(e){return!0!==e?w.raw.blockchain.current():w.raw.blockchain.currentWithCache()},membership:P("/blockchain/membership"),stats:{ud:y("/blockchain/with/ud",u.constants.MEDIUM),tx:y("/blockchain/with/tx"),newcomers:y("/blockchain/with/newcomers",u.constants.MEDIUM),hardship:y("/blockchain/hardship/:pubkey"),difficulties:y("/blockchain/difficulties")}},tx:{sources:y("/tx/sources/:pubkey",u.constants.SHORT),process:P("/tx/process"),history:{all:function(e){return w.raw.tx.history.all(e).then((function(e){return e.history=e.history||{},e.history.sending=[],e.history.pendings=[],e}))},times:function(e,t){return(!0!==t?w.raw.tx.history.times(e):w.raw.tx.history.timesWithCache(e)).then((function(e){return e.history=e.history||{},e.history.sending=[],e.history.pendings=[],e}))},blocks:y("/tx/history/:pubkey/blocks/:from/:to",u.constants.LONG),pending:y("/tx/history/:pubkey/pending")}},ud:{history:y("/ud/history/:pubkey")},uri:{},version:{},raw:{blockchain:{currentWithCache:y("/blockchain/current",u.constants.SHORT),current:y("/blockchain/current")},wot:{requirementsWithCache:y("/wot/requirements/:pubkey",u.constants.LONG),requirements:y("/wot/requirements/:pubkey")},tx:{history:{timesWithCache:y("/tx/history/:pubkey/times/:from/:to",u.constants.LONG),times:y("/tx/history/:pubkey/times/:from/:to"),all:y("/tx/history/:pubkey")}}}};w.tx.parseUnlockCondition=function(e){for(var t,n,i,a,o=e,r=[],s={},l=w.regexp.TX_OUTPUT_FUNCTION.exec(o);l;)t={},n="OBJ("+r.length+")",t.type=o.substr(l.index,l[0].indexOf("(")),t.value=l[1]||l[2]||l[3]||l[4],r.push(t),s[t.type]=s[t.type]++||1,o=o.replace(l[0],n),l=w.regexp.TX_OUTPUT_FUNCTION.exec(o);for(var c=!0;c;){for(c=!!(l=w.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(o));l;){for(t={},n="OBJ("+r.length+")",t.type="AND",t.children=[],r.push(t),i=l[0],a=w.regexp.TX_OUTPUT_OBJ.exec(i);a;)t.children.push(r[a[1]]),i=i.replace(a[0],""),a=w.regexp.TX_OUTPUT_OBJ.exec(i);o=o.replace(l[0],n),l=w.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(i)}for(l=w.regexp.TX_OUTPUT_OBJ_OPERATOR_OR.exec(o),c=c||!!l;l;){for(t={},n="OBJ("+r.length+")",t.type="OR",t.children=[],r.push(t),i=l[0],a=w.regexp.TX_OUTPUT_OBJ.exec(i);a;)t.children.push(r[a[1]]),i=i.replace(a[0],""),a=w.regexp.TX_OUTPUT_OBJ.exec(i);o=o.replace(l[0],n),l=w.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(o)}for(l=w.regexp.TX_OUTPUT_OBJ_PARENTHESIS.exec(o),c=c||!!l;l;)o=o.replace(l[0],l[1]),l=w.regexp.TX_OUTPUT_OBJ_PARENTHESIS.exec(o)}if(0!==(s=_.keys(s)).length)return console.debug("[BMA] Unlock conditions successfully parsed:",t),{unlockFunctions:s,unlockTree:t};console.error("[BMA] Unparseable unlock condition: ",output)},w.node.parseEndPoint=function(e,t){var n=w.regexp.BMA_ENDPOINT.exec(e);return n?{dns:n[2]||"",ipv4:n[4]||"",ipv6:n[6]||"",port:n[8]||80,useSsl:n[8]&&443==n[8],path:n[10],useBma:!0}:(n=w.regexp.BMAS_ENDPOINT.exec(e))?{dns:n[2]||"",ipv4:n[4]||"",ipv6:n[6]||"",port:n[8]||80,useSsl:!0,path:n[10],useBma:!0}:(n=w.regexp.BMATOR_ENDPOINT.exec(e))?{dns:n[1]||"",port:n[2]||80,useSsl:!1,useTor:!0,useBma:!0}:(n=w.regexp.WS2P_ENDPOINT.exec(e))?{ws2pid:n[1]||"",dns:n[3]||"",ipv4:n[5]||"",ipv6:n[7]||"",port:n[9]||80,useSsl:n[9]&&443==n[9],path:n[11]||"",useWs2p:!0}:(n=w.regexp.WS2PTOR_ENDPOINT.exec(e))?{ws2pid:n[1]||"",dns:n[2]||"",port:n[3]||80,path:n[4]||"",useSsl:!1,useTor:!0,useWs2p:!0}:t&&(n=C(t+I).exec(e))?{dns:n[2]||"",ipv4:n[4]||"",ipv6:n[6]||"",port:n[8]||80,useSsl:n[8]&&443==n[8],path:n[10],useBma:!1}:void 0},w.copy=function(e){if(d.getUrl(e.host,e.port,"",e.useSsl)!==A.url){var t=A.started;if(t&&A.stop(),A.init(e.host,e.port,e.useSsl,A.useCache),t)return i((function(){return A.start().then((function(e){return e&&A.api.node.raise.restart(),e}))}),200)}},w.wot.member.uids=function(){return w.wot.member.all().then((function(e){return e.results.reduce((function(e,t){return e[t.pubkey]=t.uid,e}),{})}))},w.wot.member.get=function(e){return w.wot.member.uids().then((function(t){var n=t[e];return{pubkey:e,uid:n||null}}))},w.wot.member.getByUid=function(e){return w.wot.member.all().then((function(t){return _.findWhere(t.results,{uid:e})}))},w.blockchain.blocks=function(e){return w.raw.getHttpRecursive(w.blockchain.block,"block",e)},w.network.peering.peersByLeaves=function(e){return w.raw.getHttpRecursive(w.network.peering.peers,"leaf",e,0,10)},w.raw.getHttpRecursive=function(t,n,a,o,r){return o=angular.isDefined(o)?o:0,r=r||w.constants.LIMIT_REQUEST_COUNT,e((function(s,l){var c=[],u=[];_.each(a.slice(o,o+r),(function(e){var i={};i[n]=e,u.push(t(i).then((function(e){e&&c.push(e)})))})),e.all(u).then((function(){o<a.length-1?i((function(){w.raw.getHttpRecursive(t,n,a,o+r,r).then((function(e){e&&e.length?s(c.concat(e)):s(c)})).catch((function(e){l(e)}))}),w.constants.LIMIT_REQUEST_DELAY):s(c)})).catch((function(e){e&&e.ucode===w.errorCodes.HTTP_LIMITATION?s(c):l(e)}))}))},w.raw.getHttpWithRetryIfLimitation=function(e){return e().catch((function(t){if(t&&t.ucode==w.errorCodes.HTTP_LIMITATION)return i((function(){return w.raw.getHttpWithRetryIfLimitation(e)}),w.constants.LIMIT_REQUEST_DELAY)}))},w.blockchain.lastUd=function(){return w.blockchain.stats.ud().then((function(e){if(!e.result.blocks||!e.result.blocks.length)return null;var t=e.result.blocks[e.result.blocks.length-1];return w.blockchain.block({block:t}).then((function(e){return e.unitbase>0?e.dividend*Math.pow(10,e.unitbase):e.dividend}))}))},w.uri.parse=function(t){return e((function(e,n){var i;if(C(N.PUBKEY).test(t))e({pubkey:t});else if(C(N.PUBKEY_WITH_CHECKSUM).test(t)){console.debug("[BMA.parse] Detecting a pubkey with checksum: "+t);var o=w.regexp.PUBKEY_WITH_CHECKSUM.exec(t);i=o[1];var r=o[2];console.debug("[BMA.parse] Detecting a pubkey {"+i+"} with checksum {"+r+"}");var s=a.util.pkChecksum(i);console.debug("[BMA.parse] Expecting checksum for pubkey is {"+s+"}"),r!=s?n({message:"ERROR.PUBKEY_INVALID_CHECKSUM"}):e({pubkey:i})}else if(t.startsWith("duniter://")){var l,c=d.uri.parse(t),u=-1===c.host.indexOf(".")?c.host:null,p=-1!==c.host.indexOf(".")?c.host:null;if(c.username&&(c.password?(l=c.username,i=c.password):i=c.username),c.pathname){var m=c.pathname.split("/"),E=m?m.length:0,b=0;if(!u&&E>b&&(u=m[b++]),!i&&E>b&&(i=m[b++]),!l&&E>b&&(l=m[b++]),E>b)return void n({message:"Bad Duniter URI format. Invalid path (incomplete or redundant): "+c.pathname})}if(u)return p||e({uid:l,pubkey:i,currency:u}),d.get(p+"/blockchain/parameters")().then((function(t){t.currency===u?e({uid:l,pubkey:i,host:p,currency:u}):n({message:"Node's currency ["+t.currency+"] does not matched URI's currency ["+u+"]."})})).catch((function(e){console.error(e),n({message:"Could not get node parameter. Currency could not be retrieve"})}));if(!p)return void n({message:"Bad Duniter URI format. Missing currency name (or node address)."});d.get(p+"/blockchain/parameters")().then((function(t){e({uid:l,pubkey:i,host:p,currency:t.currency})})).catch((function(e){console.error(e),n({message:"Could not get node parameter. Currency could not be retrieve"})}))}else console.debug("[BMA.parse] Could not parse URI: "+t),n({message:"ERROR.UNKNOWN_URI_FORMAT"})})).then((function(e){if(e){if(e.pubkey&&!C(N.PUBKEY).test(e.pubkey))throw{message:"Invalid pubkey format ["+e.pubkey+"]"};if(e.uid&&!C(N.USER_ID).test(e.uid))throw{message:"Invalid uid format ["+e.uid+"]"};if(e.currency&&!C(N.CURRENCY).test(e.currency))throw{message:"Invalid currency format ["+e.currency+"]"};return e}}))};var U=c.data.duniterLatestReleaseUrl&&d.uri.parse(c.data.duniterLatestReleaseUrl);w.raw.getLatestRelease=U?d.getWithCache(U.host,U.port,"/"+U.pathname,443==+U.port||"https:"===U.protocol||A.forceUseSsl,u.constants.LONG):function(){return e.when()},w.version.latest=function(){return w.raw.getLatestRelease().then((function(e){if(e)return e.name&&e.html_url?{version:e.name,url:e.html_url}:e.tag_name&&e.html_url?{version:e.tag_name.substring(1),url:e.html_url}:void 0})).catch((function(e){console.error("[BMA] Failed to get Duniter latest version",e)}))},w.websocket={block:k("/ws/block"),peer:k("/ws/peer"),close:D},angular.merge(A,w)}var m=new p;return m.instance=function(e,t,n,i){return new p(e,t,n,i=!!angular.isDefined(i)&&i)},m.lightInstance=function(e,t,n,i){return{host:e,port:t=t||80,useSsl:n=angular.isDefined(n)?n:443==t,url:d.getUrl(e,t,"",n),node:{summary:d.getWithCache(e,t,"/node/summary",n,u.constants.MEDIUM,!1,i)},network:{peering:{self:d.get(e,t,"/network/peering",n,i)},peers:d.get(e,t,"/network/peers",n,i)},blockchain:{current:d.get(e,t,"/blockchain/current",n,i),stats:{hardship:d.get(e,t,"/blockchain/hardship/:pubkey",n,i)}}}},m}]),angular.module("cesium.wot.services",["ngApi","cesium.bma.services","cesium.crypto.services","cesium.utils.services","cesium.settings.services"]).factory("csWot",["$rootScope","$q","$timeout","BMA","Api","CacheFactory","UIUtils","csConfig","csCurrency","csSettings","csCache",function(e,t,n,i,a,o,r,s,l,c,u){var d=new a(this,"csWot"),p=u.get("csWot-idty-",u.constants.MEDIUM),m=u.get("csWot-requirements-",u.constants.MEDIUM),E=function(e){var t={};return e.reduce((function(e,n){return n.id=n.id||n.uid+"-"+n.pubkey,t[n.id]?e:(t[n.id]=!0,e.concat(n))}),[])},b=function(e,t,n){return t=t||0,e=E(e),e=_.sortBy(e,(function(e){var t=1;return t+=1e6*e.block,-(t+=10*(900-e.uid.toLowerCase().charCodeAt(0)))})),angular.isDefined(n)&&e.length>n&&(e=e.slice(t,t+n)),e},g=function(e){e.requirements={loaded:!1,meta:{},hasSelf:!1,needSelf:!0,needMembership:!0,canMembershipOut:!1,needRenew:!1,pendingMembership:!1,isMember:!1,wasMember:!1,certificationCount:0,needCertifications:!1,needCertificationCount:0,willNeedCertificationCount:0,alternatives:void 0},e.blockUid=null,e.isMember=!1,e.sigDate=null,e.hasSelf=!1},f=function(e,t){if(e.hasSelf=!!e.meta.timestamp,e.needSelf=!e.hasSelf||e.meta.invalid,e.wasMember=!!angular.isDefined(e.wasMember)&&e.wasMember,e.needMembership=!e.revoked&&e.membershipExpiresIn<=0&&e.membershipPendingExpiresIn<=0&&!e.wasMember,e.needRenew=!e.needMembership&&!e.revoked&&e.membershipExpiresIn<=c.data.timeWarningExpireMembership&&e.membershipPendingExpiresIn<=0||e.wasMember&&!e.revoked&&0===e.membershipExpiresIn&&0===e.membershipPendingExpiresIn,e.canMembershipOut=!e.revoked&&e.membershipExpiresIn>0,e.pendingMembership=!e.revoked&&e.membershipExpiresIn<=0&&e.membershipPendingExpiresIn>0,e.isMember=!e.revoked&&e.membershipExpiresIn>0,e.blockUid=e.meta.timestamp,e.certificationCount=(e.isMember||e.wasMember&&!e.expired)&&e.certifications?e.certifications.length:0,e.willExpireCertificationCount=e.certifications?e.certifications.reduce((function(e,t){return e+(t.expiresIn<=c.data.timeWarningExpire?1:0)}),0):0,e.willExpire=e.willExpireCertificationCount>0,e.pendingRevocation=!e.revoked&&!!e.revocation_sig,e.isMember||e.wasMember)e.pendingCertificationCount=angular.isDefined(e.pendingCerts)?e.pendingCerts.length:0;else{var n=_.union(_.pluck(e.pendingCerts||[],"from"),_.pluck(e.certifications||[],"from"));e.pendingCertificationCount=_.size(n)}return e.needCertificationCount=!e.needSelf&&e.certificationCount<t.sigQty?t.sigQty-e.certificationCount:0,e.willNeedCertificationCount=!e.needMembership&&!e.needCertificationCount&&e.certificationCount-e.willExpireCertificationCount<t.sigQty?t.sigQty-e.certificationCount+e.willExpireCertificationCount:0,e.loaded=!0,e},T=function(e){if(!e)return t.when(e);var n=[];return _.forEach(e,(function(e){var t=e.meta.timestamp.split("-",2);e.meta.number=parseInt(t[0]),e.meta.hash=t[1],e.meta.sig=e.meta.sig||e.sig,delete e.sig,n.push(e.meta.number)})),i.blockchain.blocks(_.uniq(n)).then((function(t){return _.forEach(e,(function(e){var n=_.findWhere(t,{number:e.meta.number});e.meta.time=n&&n.medianTime,n&&0!==e.meta.number&&e.meta.hash!==n.hash&&(e.meta.invalid=!0)})),e})).catch((function(t){if(t&&t.ucode==i.errorCodes.BLOCK_NOT_FOUND)return _.forEach(e,(function(e){0===e.number&&(e.meta.time=moment().utc().unix())})),e;throw t}))},h=function(e,a){if(!e||!e.pubkey&&!e.uid)return t.when(e);var o=e.pubkey||e.uid,s=!1!==a?m.get(o):null;if(s)return console.debug("[wot] Requirements "+o+" found in cache"),angular.merge(e,s),t.when(s);s={pubkey:e.pubkey,uid:e.uid},n((function(){s.requirements&&s.requirements.loaded||r.loading.update({template:"COMMON.LOADING_WAIT"})}),2e3);var c=Date.now();return t.all([l.get(),i.wot.requirements({pubkey:s.pubkey||s.uid},!1).then((function(e){return T(e&&e.identities)}))]).then((function(t){var n=t[0],i=t[1];if(i&&i.length)return i.length>1&&(i=_.sortBy(i,(function(e){var t=0;t+=1e12*(s.uid&&e.uid===s.uid?1:0),t+=1e11*(e.meta.invalid?0:1),t+=1e10*(s.blockUid&&e.meta.timestamp&&e.meta.timestamp===s.blockUid?1:0),t+=1e9*(e.membershipExpiresIn>0?1:0),t+=1e8*(e.membershipPendingExpiresIn>0?1:0),t+=1e7*(e.expired?0:1),t+=1e6*(e.outdistanced?0:1),t+=1e5*(e.wasMember?1:0);var n=!e.expired&&e.certifications?e.certifications.length:0;return t+=1*(n||0),-(t+=1*(!n&&e.membershipPendingExpiresIn>0?e.membershipPendingExpiresIn/1e3:0))})),console.debug("[wot] Found {0} identities (in requirements). Will selected the best one".format(i.length))),s.requirements=f(i[0],n.parameters),s.pubkey=s.requirements.pubkey,s.uid=s.requirements.uid,s.isMember=s.requirements.isMember,s.blockUid=s.requirements.meta&&s.requirements.meta.timestamp,s.hasSelf=s.requirements.hasSelf,s.sigDate=s.requirements.meta&&s.requirements.meta.time,!s.requirements.isMember&&!s.requirements.wasMember&&i.length>1&&(s.requirements.alternatives=i.splice(1),_.forEach(s.requirements.alternatives,(function(e){f(e,n.parameters)}))),m.put(o,s),angular.merge(e,s),console.debug("[wot] Requirements for '{0}' loaded in {1}ms".format(s.pubkey&&s.pubkey.substring(0,8)||s.uid,Date.now()-c)),e})).catch((function(t){if(s.requirements={loaded:!0},g(e),t&&(t.ucode==i.errorCodes.NO_MATCHING_MEMBER||t.ucode==i.errorCodes.NO_IDTY_MATCHING_PUB_OR_UID))return e.requirements.loaded=!0,e;throw t}))},v=function(e,t){var n={pubkey:e,uid:t,hasSelf:!1};return i.wot.lookup({search:e||t}).then((function(e){var t=e.results.reduce((function(e,t){return e.concat(t.uids.reduce((function(e,n){var i=n.meta.timestamp.split("-",2),a=parseInt(i[0]);return e.concat({uid:n.uid,pubkey:t.pubkey,meta:{timestamp:n.meta.timestamp,number:a,hash:i[1],sig:n.self},revoked:n.revoked,revoked_on:n.revoked_on})}),[]))}),[]);return T(t).then((function(t){return{identities:t,results:e.results}}))})).then((function(e){var t=e.identities;t.length>1&&(e.identities=_.sortBy(t,(function(e){var t=0;return t+=1e11*(n.uid&&e.uid===n.uid?1:0),t+=1e10*(e.meta.invalid?0:1),t+=1e9*(n.blockUid&&e.meta.timestamp&&e.meta.timestamp===n.blockUid?1:0),t+=1e8*(e.revoked?0:1),-(t+=1*(e.meta.number?e.meta.number:0)/1e3)})),console.debug("[wot] Found {0} identities (in lookup). Will selected the best one".format(t.length))),_.forEach(t,(function(e){e.hasSelf=!!(e.uid&&e.meta.timestamp&&e.meta.sig)})),n.requirements=t[0],n.pubkey=n.requirements.pubkey,n.uid=n.requirements.uid,n.blockUid=n.requirements.meta&&n.requirements.meta.timestamp,n.hasSelf=n.requirements.hasSelf,n.sigDate=n.requirements.meta&&n.requirements.meta.time,t.length>1&&(n.requirements.alternatives=t.splice(1)),n.lookup={};var i={};return n.lookup.certifications=(e.results||[]).reduce((function(e,t){return t.uids.reduce((function(e,t){var n=t.uid+"-"+(t.meta?t.meta.timestamp:"");return e[n]=(t.others||[]).reduce((function(e,t){var a=n+"-"+t.pubkey,o={pubkey:t.pubkey,uid:t.uids[0],cert_time:{block:t.meta&&t.meta.block_number?t.meta.block_number:0,block_hash:t.meta&&t.meta.block_hash?t.meta.block_hash:null},isMember:t.isMember,wasMember:t.wasMember};return i[a]?o.cert_time.block>i[a].cert_time.block?(i[a]=o,e.splice(_.findIndex(e,{pubkey:t.pubkey}),1,o),e):e:(i[a]=o,e.concat(o))}),[]),e}),e)}),{}),i={},n.lookup.givenCertifications=(e.results||[]).reduce((function(e,t){return(t.signed||[]).reduce((function(e,t){var n={pubkey:t.pubkey,uid:t.uid,cert_time:{block:t.cert_time&&t.cert_time.block?t.cert_time.block:0,block_hash:t.cert_time&&t.cert_time.block_hash?t.cert_time.block_hash:null},sigDate:t.meta?t.meta.timestamp:null,isMember:t.isMember,wasMember:t.wasMember};if(i[t.pubkey]){if(!(n.block>i[t.pubkey].block))return e;i[t.pubkey]=n}else i[t.pubkey]=n;return e.concat(n)}),e)}),[]),n})).catch((function(e){if(e&&e.ucode==i.errorCodes.NO_MATCHING_IDENTITY)return g(n),n;throw e}))},I=function(e,t,n,a,o,r){function s(e,t){return e+"-"+t}var u=!0,d=n?n.reduce((function(e,t){var n=s(t.pubkey,t.cert_time?t.cert_time.block:t.sigDate);return t.cert_time||(u=!1),e[n]=t,e}),{}):{};return e({pubkey:t}).then((function(e){return(e&&e.certifications||[]).reduce((function(e,t){var n=!t.written,i=t.cert_time?t.cert_time.medianTime:null,r=i?n?i+a.sigWindow-o:i+a.sigValidity-o:0;r=r<0?0:r;var l=s(t.pubkey,u&&t.cert_time?t.cert_time.block:t.sigDate);return delete d[l],e.concat({pubkey:t.pubkey,uid:t.uid,time:i,isMember:t.isMember,wasMember:t.wasMember,expiresIn:r,willExpire:r&&r<=c.data.timeWarningExpire,pending:n,block:null!==t.written?t.written.number:t.cert_time?t.cert_time.block:null,valid:r>0})}),[])})).catch((function(e){if(e&&e.ucode==i.errorCodes.NO_MATCHING_MEMBER)return[];if(e&&1002==e.ucode)return console.warn("[wallet-service] Detecting Duniter issue #1309 ! Applying workaround... "),[];throw e})).then((function(e){var t=_.values(d);if(!t.length)return e;if(l.data.initPhase)return t.reduce((function(e,t){return e.concat({pubkey:t.pubkey,uid:t.uid,isMember:t.isMember,wasMember:t.wasMember,time:null,expiresIn:a.sigWindow,willExpire:!1,pending:!0,block:0,valid:!0})}),e);var n=t.reduce((function(e,t){var n=u&&t.cert_time?t.cert_time.block:t.sigDate?t.sigDate.split("-")[0]:null;return angular.isDefined(n)&&(e[n]?e[n].push(t):e[n]=[t]),e}),{});return i.blockchain.blocks(_.keys(n)).then((function(t){return e=t.reduce((function(e,t){return e.concat(n[t.number].reduce((function(e,n){var i=t.medianTime,s=Math.max(0,i+a.sigWindow-o),l=!n.cert_time||!n.cert_time.block_hash||n.cert_time.block_hash==t.hash;l||console.debug("[wot] Invalid cert {0}: block hash changed".format(n.pubkey.substring(0,8)));var d=s>0&&(!r||n.isMember)&&l;return e.concat({pubkey:n.pubkey,uid:n.uid,isMember:n.isMember,wasMember:n.wasMember,time:i,expiresIn:s,willExpire:s&&s<=c.data.timeWarningExpire,pending:!0,block:u&&n.cert_time?n.cert_time.block:n.sigDate?n.sigDate.split("-")[0]:null,valid:d})}),[]))}),e)}))})).then((function(e){var t=e.reduce((function(e,t){return!t.pending&&t.valid&&t.expiresIn>=a.sigWindow&&(e[t.pubkey]=!0),e}),{});e=function(e){return _.sortBy(e,(function(e){var t=1;return t+=1e12*(e.expiresIn?e.expiresIn:0),t+=1e7*(e.isMember?1:0),-(t+=10*(e.block?e.block:0))}))}(e);var n=[],i=[];return{valid:e.reduce((function(e,a){return a.pending?(a.valid&&!t[a.pubkey]?n.push(a):a.valid||t[a.pubkey]||i.push(a),e):e.concat(a)}),[]),pending:n,error:i}}))},O=function(e,n,a){var o;if(a=a||{},!e&&n&&!a.force)return i.wot.member.getByUid(n).then((function(t){if(t)return O(t.pubkey,t.uid,i);var i=angular.copy(i||{});return i.force=!0,O(e,n,i)}));if(e){if((o=!1!==a.cache?p.get(e):null)&&(!n||o.uid===n)&&(!a.blockUid||o.blockUid===a.blockUid))return console.debug("[wot] Identity {{0}} found in cache".format(e.substring(0,8))),t.when(o);console.debug("[wot] Loading identity {{0}}...".format(e.substring(0,8))),o={pubkey:e,uid:n}}else console.debug("[wot] Loading identity from uid {{0}}...".format(n)),o={uid:n};a.blockUid&&(o.blockUid=a.blockUid);var r,s,c=Date.now();return t.all([l.parameters().then((function(e){r=e})),l.blockchain.current(!0).then((function(e){s=e.medianTime})).catch((function(e){if(!e||e.ucode!=i.errorCodes.NO_CURRENT_BLOCK)throw e;s=moment.utc().unix()})),h(o,!1!==a.cache),v(e,n)]).then((function(e){var n=e[3];if(!o.requirements.uid)return console.debug("[wot] No requirements found: using data from lookup"),angular.merge(o,n),void delete o.lookup;var a=o.requirements.uid+"-"+o.requirements.meta.timestamp;return t.all([I(i.wot.certifiersOf,o.pubkey,n.lookup?n.lookup.certifications[a]:null,r,s,!0).then((function(e){o.received_cert=e.valid,o.received_cert_pending=e.pending,o.received_cert_error=e.error})),I(i.wot.certifiedBy,o.pubkey,n.lookup?n.lookup.givenCertifications:null,r,s,!1).then((function(e){o.given_cert=e.valid,o.given_cert_pending=e.pending,o.given_cert_error=e.error}))])})).then((function(){return o.requirements.pendingCertificationCount=o.received_cert_pending?o.received_cert_pending.length:o.requirements.pendingCertificationCount,o.requirements.revoked=angular.isDefined(o.requirements.revoked)?o.requirements.revoked:o.revoked,function(e){e.requirements.revoked?(delete e.requirements.meta.invalid,e.requirements.revoked_on?(C(e,{type:"error",message:"ERROR.IDENTITY_REVOKED_WITH_TIME",messageParams:{revocationTime:e.requirements.revoked_on}}),console.debug("[wot] Identity [{0}] has been revoked on {1}".format(e.uid,e.requirements.revoked_on))):(C(e,{type:"error",message:"ERROR.IDENTITY_REVOKED"}),console.debug("[wot] Identity [{0}] has been revoked".format(e.uid)))):e.requirements.pendingRevocation?(delete e.requirements.meta.invalid,C(e,{type:"error",message:"ERROR.IDENTITY_PENDING_REVOCATION"}),console.debug("[wot] Identity [{0}] has pending revocation".format(e.uid))):e.requirements.meta&&e.requirements.meta.invalid?e.isMember||(C(e,{type:"error",message:"ERROR.IDENTITY_INVALID_BLOCK_HASH"}),console.debug("[wot] Invalid membership for uid {0}: block hash changed".format(e.uid))):e.requirements.expired?(C(e,{type:"error",message:"ERROR.IDENTITY_EXPIRED"}),console.debug("[wot] Identity {0} expired (in sandbox)".format(e.uid))):e.requirements.willNeedCertificationCount>0?(C(e,{type:"error",message:"INFO.IDENTITY_WILL_MISSING_CERTIFICATIONS",messageParams:e.requirements}),console.debug("[wot] Identity {0} will need {1} certification(s)".format(e.uid,e.requirements.willNeedCertificationCount))):!e.requirements.needSelf&&e.requirements.needMembership&&(C(e,{type:"error",message:"INFO.IDENTITY_NEED_MEMBERSHIP"}),console.debug("[wot] Identity {0} has a self but no membership".format(e.uid))),!e.isMember&&e.requirements.alternatives&&C(e,{type:"info",message:"INFO.HAS_ALTERNATIVE_IDENTITIES"})}(o),d.data.raisePromise.load(o).catch((function(e){console.debug("Error while loading identity data, on extension point."),console.error(e)}))})).then((function(){if(o.pubkey)return p.put(o.pubkey,o),console.debug("[wot] Identity "+o.pubkey.substring(0,8)+" loaded in "+(Date.now()-c)+"ms"),o}))},N=function(e,n){if(!e||e.trim()!==e)return t.when(void 0);var a=e.replace(/(^|\s)#\w+/g,"");return a=(a=a.replace(/[^a-zA-Z0-9_-\s]+/g,"")).replace(/\s+/g," ").trim(),(n=n||{}).addUniqueId=!angular.isDefined(n.addUniqueId)||n.addUniqueId,n.allowExtension=!angular.isDefined(n.allowExtension)||n.allowExtension,n.excludeRevoked=!!angular.isDefined(n.excludeRevoked)&&n.excludeRevoked,(a?t.all(a.split(" ").reduce((function(e,t){return console.debug("[wot] Will search on: '"+t+"'"),e.concat(i.wot.lookup({search:t}))}),[])).then((function(e){return e.reduce((function(e,t){return e.concat(t.results.reduce((function(e,t){return e.concat(t.uids.reduce((function(e,i){var a=i.meta.timestamp.split("-",2),o=!i.revoked&&i.revocation_sig;return n.excludeRevoked&&o?e:e.concat({uid:i.uid,pubkey:t.pubkey,number:a[0],hash:a[1],revoked:o})}),[]))}),[]))}),[])})).catch((function(e){if(e&&e.ucode==i.errorCodes.NO_MATCHING_IDENTITY)return[];throw e})):t.when([])).then((function(t){if(!n.allowExtension)return n.addUniqueId?E(t):t;var a=t.length;return d.data.raisePromise.search(e,t,"pubkey").then((function(){if(t.length>a&&_.filter(t,(function(e){return!e.uid&&e.pubkey})).length)return i.wot.member.uids().then((function(e){_.forEach(t,(function(t){!t.uid&&t.pubkey&&(t.uid=e[t.pubkey])}))}))})).then((function(){return n.addUniqueId?E(t):t}))}))},R=function(e,a,o,r){return t((function(s,l){var c=[],u=[];_.each(e.slice(a,a+o),(function(e){u.push(i.blockchain.block({block:e}).then((function(e){e&&e.joiners&&_.each(e.joiners,(function(t){var n=t.split(":"),i=n[n.length-1]+"-"+n[0];c.push({id:i,uid:n[n.length-1],pubkey:n[0],memberDate:e.medianTime,block:e.number})}))})))})),t.all(u).then((function(){c.length<r&&a<e.length-1?n((function(){R(e,a+o,o,r-c.length).then((function(e){s(c.concat(e))})).catch((function(e){l(e)}))}),1e3):s(c)})).catch((function(e){e&&e.ucode===i.errorCodes.HTTP_LIMITATION?s(c):l(e)}))}))},A=function(e,a,o){return t((function(r,s){var l=[],c={},u=[];_.each(e.slice(a,a+o),(function(e){u.push(N(e,{addUniqueId:!1,allowExtension:!1}).then((function(e){e&&e.length&&(l=e.reduce((function(e,t){return c[t.pubkey]?e:(c[t.pubkey]=!0,e.concat(t))}),l))})))})),t.all(u).then((function(){a<e.length-1?n((function(){A(e,a+o,o).then((function(e){e&&e.length?r(e.reduce((function(e,t){return c[t.pubkey]?e:(c[t.pubkey]=!0,e.concat(t))}),l)):r(l)})).catch((function(e){s(e)}))}),i.constants.LIMIT_REQUEST_DELAY):r(l)})).catch((function(e){e&&e.ucode===i.errorCodes.HTTP_LIMITATION?r(l):s(e)}))}))},S=function(e,n,a){n=n||"pubkey";var o=[];return a||o.push(i.wot.member.uids()),o.push(d.data.raisePromise.search(null,e,n).catch((function(e){console.debug("Error while search identities, on extension point."),console.error(e)}))),t.all(o).then((function(t){if(!a){var i=t[0];_.forEach(e,(function(e){!e.uid&&e[n]&&(e.uid=i[e[n]],e.uid&&e.uid==e.name&&delete e.name)}))}return e}))},C=function(e,t){(t=t||{}).type=t.type||"info",t.message=t.message||"",t.messageParams=t.messageParams||{},e.events=e.events||[],e.events.push(t)};return d.registerEvent("data","load"),d.registerEvent("data","search"),i.api.node.on.stop(e,(function(){console.debug("[wot] Cleaning cache..."),u.clear("csWot-")}),this),{load:O,loadRequirements:h,search:N,newcomers:function(e,n){var a;return e=e||0,n=n||20,t.all([l.blockchain.current(!0).then((function(e){a=e.membersCount||0})),i.blockchain.stats.newcomers()]).then((function(t){if(!((t=t[1])&&t.result&&t.result.blocks&&t.result.blocks.length))return null;var i=_.sortBy(t.result.blocks,(function(e){return-e}));return R(i,0,5,e+n)})).then((function(t){return t&&t.length?(t=b(t,e,n),S(t,"pubkey",!0)):null})).then((function(e){return{hits:e,total:a}}))},pending:function(e,n){e=e||0,n=n||20;var a=Date.now();return t.all([i.wot.member.uids(),i.wot.member.pending().then((function(e){return e.memberships&&e.memberships.length?e.memberships:void 0}))]).then((function(o){var r=o[0],s=o[1];if(s){var l={},c={};_.forEach(s,(function(e){if("IN"==e.membership&&!r[e.pubkey]){var t={uid:e.uid,pubkey:e.pubkey,block:e.blockNumber,blockHash:e.blockHash},n=c[e.pubkey];if(n&&t.block>n.block)return;c[t.pubkey]=t,l[t.block]?l[t.block].push(t):l[t.block]=[t],n&&(l[n.block]=l[n.block].reduce((function(e,t){return t.pubkey==n.pubkey?e:(e||[]).concat(t)}),null),null===l[n.block]&&delete l[n.block])}}));var u=_.values(c),d=u.length,p=(u=b(u,e,n)).reduce((function(e,t){return e.concat(t.block)}),[]);return t.all([i.blockchain.blocks(_.uniq(p)).then((function(e){_.forEach(e,(function(e){_.forEach(l[e.number],(function(t){t.sigDate=e.medianTime,0!==e.number&&t.blockHash!==e.hash&&(C(t,{type:"error",message:"ERROR.WOT_PENDING_INVALID_BLOCK_HASH"}),console.debug("Invalid membership for uid={0}: block hash changed".format(t.uid)))}))}))})),S(u,"pubkey",!0)]).then((function(){return console.debug("[ES] [wot] Loaded {0}/{1} pending identities in {2} ms".format(u&&u.length||0,d,Date.now()-a)),{hits:u,total:d}}))}}))},all:function(){return A(["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","u","v","w","x","y","z"],0,i.constants.LIMIT_REQUEST_COUNT).then((function(e){return S(e,"pubkey",!0)})).then(E).then((function(){return{hits:idties,total:idties.length}}))},extend:function(e,t,n){return S([e],t,n).then((function(e){return e[0]}))},extendAll:S,api:d}}]),angular.module("cesium.tx.services",["ngApi","cesium.bma.services","cesium.settings.services","cesium.wot.services"]).factory("csTx",["$q","$timeout","$filter","$translate","FileSaver","UIUtils","BMA","Api","csConfig","csSettings","csWot","csCurrency",function(e,t,n,i,a,o,r,s,l,c,u,d){var p=new s(this,"csTx");function m(e,t,n,i,a){t&&t.length&&_.forEach(t,(function(t){if(null!==t.block_number||a){var o,s,l=!1,c=t.issuers.reduce((function(t,n){return l=l||n===e,n!==e?t.concat(n):t}),[]),u=[],d=[],p=t.outputs.reduce((function(n,i,a){var p="string"==typeof i?i.split(":",3):[i.amount,i.base,i.conditions];o=parseInt(p[1]);var m=b(parseInt(p[0]),o),E=p[2],g=r.regexp.TX_OUTPUT_SIG.exec(E);if(g){var f=g[1];if(f===e){if(!l)return n+m;null===t.block_number&&d.push({amount:parseInt(p[0]),base:o,type:"T",identifier:t.hash,noffset:a,consumed:!1,conditions:E})}else if(""===f||_.contains(c,f)||u.push(f),l)return n-m}else if(-1!==E.indexOf("SIG("+e+")")){var T=r.tx.parseUnlockCondition(E);if(T)return d.push(angular.merge({amount:parseInt(p[0]),base:o,type:"T",identifier:t.hash,noffset:a,conditions:E,consumed:!1},T)),T.amount=m,(s=s||[]).push(T),console.debug("[tx] has locked output:",T),n+m}return n}),0),m=p>0?c:u,E=t.time||t.blockstampTime,g=0!==p&&p+":"+t.hash+":"+E;if(g&&!i[g]){i[g]=!0;var f={time:E,amount:p,pubkey:1===m.length?m[0]:void 0,pubkeys:m.length>1?m:void 0,comment:t.comment,isUD:!1,hash:t.hash,locktime:t.locktime,block_number:t.block_number};l&&null===t.block_number&&(f.inputs=t.inputs,f.sources=d),s&&(f.lockedOutputs=s),n.push(f)}}}))}function E(t,n){return e((function(i,a){var o=moment().utc().unix();n=n||o-c.data.walletHistoryTimeSecond;var s={pendings:[],validating:[],history:[],errors:[]},l={},u=[d.blockchain.current(!0),r.tx.history.pending({pubkey:t}).then((function(e){m(t,e.history.sending,s.pendings,l,!0),m(t,e.history.pending,s.pendings,l,!0)}))];if("pending"!==n){var E=function(e){m(t,e.history.sent,s.history,l,!1),m(t,e.history.received,s.history,l,!1)};if(n>0){for(var b=c.data.walletHistorySliceSecond,g=n-=n%b;g-b<o;g+=b)u.push(r.tx.history.times({pubkey:t,from:g,to:g+b-1},!0).then(E));u.push(r.tx.history.times({pubkey:t,from:o-o%b,to:o+999999999},!1).then(E))}else u.push(r.tx.history.all({pubkey:t}).then(E));c.data.showUDHistory&&n>0&&u.push(p.data.raisePromise.loadUDs({pubkey:t,fromTime:n}).then((function(e){e&&e.length&&_.forEach(e,(function(e){s.history.push(e)}))})).catch((function(e){console.debug("Error while loading UDs history, on extension point."),console.error(e)})))}e.all(u).then((function(e){var t=e[0];s.history.sort((function(e,t){return t.time-e.time}));var a=s.history.findIndex((function(e){return e.block_number<=t.number-c.data.blockValidityWindow}));s.validating=a>0?s.history.splice(0,a):[],s.fromTime="pending"!==n&&n||void 0,s.toTime=s.history.length?s.history[0].time:s.fromTime,i(s)})).catch(a)}))}function b(e,t){return t<=0?e:e*Math.pow(10,t)}function g(e,t){_(t).forEach((function(t){!function(e,t,n){var i=e.type+":"+e.identifier+":"+e.noffset;angular.isUndefined(n[i])&&(t.push(e),n[i]=t.length-1)}(t,e.sources,e.sourcesIndexByKey)}))}function f(e){return r.tx.sources({pubkey:e}).then((function(e){var t={sources:[],sourcesIndexByKey:[],balance:0};return e.sources&&e.sources.length&&(_.forEach(e.sources,(function(e){e.consumed=!1,t.balance+=b(e.amount,e.base)})),g(t,e.sources)),t})).catch((function(e){throw console.warn("[tx] Error while getting sources...",e),e}))}function T(n,i){var a,r=Date.now();return t((function(){a||o.loading.update({template:"COMMON.LOADING_WAIT"})}),2e3),e.all([f(n),E(n,i)]).then((function(e){(a=e[0]).tx=e[1];var t=[],n=[],i=a.balance,o=a.balance;function s(e){var i=[],r=!0;e.amount>0?r=!1:(_.find(e.inputs,(function(e){var t=e.split(":").slice(2).join(":"),n=a.sourcesIndexByKey[t];if(!angular.isDefined(n))return r=!1,!0;i.push(a.sources[n])})),e.sources&&g(a,e.sources),delete e.sources,delete e.inputs),r?(o+=e.amount,t.push(e),_.forEach(i,(function(e){e.consumed=!0}))):n.push(e)}for(var l=a.tx.pendings,c=!0;l&&l.length;)_.forEach(l,s),n.length>0&&t.length>0&&c?(l=n,n=[],c=!1):l=null;a.tx=a.tx||{},a.tx.pendings=t.sort((function(e,t){return t.time-e.time})),a.tx.errors=n.sort((function(e,t){return t.time-e.time})),a.balance=o<0?i:o;var d=(a.tx.history||[]).concat(a.tx.validating||[],a.tx.pendings||[],a.tx.errors||[]);return u.extendAll(d,"pubkey").then((function(){return console.debug("[tx] TX and sources loaded in "+(Date.now()-r)+"ms"),a}))})).catch((function(e){throw console.warn("[tx] Error while getting sources and tx...",e),e}))}return p.registerEvent("data","loadUDs"),{load:T,loadSources:function(e){return console.debug("[tx] Loading sources for "+e.substring(0,8)),T(e,"pending")},downloadHistoryFile:function(t,r){return(r=r||{}).fromTime=r.fromTime||-1,console.debug("[tx] Exporting TX history for pubkey [{0}]".format(t.substr(0,8))),e.all([i(["ACCOUNT.HEADERS.TIME","COMMON.UID","COMMON.PUBKEY","COMMON.UNIVERSAL_DIVIDEND","ACCOUNT.HEADERS.AMOUNT","ACCOUNT.HEADERS.COMMENT"]),d.blockchain.current(!0),T(t,r.fromTime)]).then((function(e){var r=e[0],s=e[1],l=s&&s.medianTime||moment().utc().unix(),c=s&&s.currency,u=e[2];return u&&u.tx&&u.tx.history?i("ACCOUNT.FILE_NAME",{currency:c,pubkey:t,currentTime:l}).then((function(e){var t=n("formatDecimal"),i=n("medianDate"),o=n("currencySymbolNoHtml"),s=[r["ACCOUNT.HEADERS.TIME"],r["COMMON.UID"],r["COMMON.PUBKEY"],r["ACCOUNT.HEADERS.AMOUNT"]+" ("+o(c)+")",r["ACCOUNT.HEADERS.COMMENT"]],l=u.tx.history.concat(u.tx.validating).reduce((function(e,n){return e.concat([i(n.time),n.uid,n.pubkey,t(n.amount/100),'"'+(n.isUD?r["COMMON.UNIVERSAL_DIVIDEND"]:n.comment)+'"'].join(";")+"\n")}),[s.join(";")+"\n"]),d=new Blob(l,{type:"text/plain; charset=utf-8"});a.saveAs(d,e)})):o.toast.show("INFO.EMPTY_TX_HISTORY")}))},api:p}}]),angular.module("cesium.wallet.services",["ngApi","ngFileSaver","cesium.bma.services","cesium.crypto.services","cesium.utils.services","cesium.settings.services"]).factory("csWallet",["$q","$rootScope","$timeout","$translate","$filter","$ionicHistory","UIUtils","Api","Idle","localStorage","sessionStorage","Modals","CryptoUtils","csCrypto","BMA","csConfig","csSettings","FileSaver","Blob","csWot","csTx","csCurrency",function(e,t,n,a,o,r,s,l,c,u,d,p,m,E,b,g,f,T,h,v,I,O){var N,R=b;function A(b,A){var S,C,L,D,y,P,k=(A=A||R).constants.PROTOCOL_VERSION,M=A.constants.PROTOCOL_VERSION,w=A.constants.PROTOCOL_VERSION,U=A.constants.PROTOCOL_VERSION,B=A.constants.PROTOCOL_VERSION,x={},F=!1,H=new l(this,"csWallet-"+b),W=function(e){x.loaded=!1,x.pubkey=null,x.qrcode=null,x.uid=null,x.localName=null,x.isNew=null,x.sourcesIndexByKey=null,x.medianTime=null,x.requirements={},x.blockUid=null,x.sigDate=null,x.sigStock=null,x.isMember=!1,x.events=[],x.children=[],x.encryptedData=null,V(),G(),D=!1,y=void 0,e?H.data.raise.init(x):(Y()&&C&&!C.useLocalStorage&&f.reset(),H.data.raise.reset(x))},V=function(){x.keypair={signSk:null,signPk:null}},G=function(){x.sources=void 0,x.sourcesIndexByKey=void 0,x.balance=0,x.tx=x.tx||{},x.tx.history=[],x.tx.pendings=[],x.tx.validating=[],x.tx.errors=[],delete x.tx.fromTime,delete x.tx.toTime},Y=function(){return"default"===b},j=function(){return x.encryptedData&&x.encryptedData.nonce&&x.encryptedData.content},K=function(e){x.sources=x.sources||[],x.sourcesIndexByKey=x.sourcesIndexByKey||{},_(e).forEach((function(e){!function(e,t,n){var i=e.type+":"+e.identifier+":"+e.noffset;angular.isUndefined(n[i])&&(e.conditions||console.warn("Trying to add a source without output condition !",e),t.push(e),n[i]=t.length-1)}(e,x.sources,x.sourcesIndexByKey)}))},$=function(t){if(!D)return(y||He()).then((function(){return $(t)}));var i=!q(),a=t&&(t.auth&&!J()||t.forceAuth);if(!i&&!a)return ee(t)?e.when(x):Ee(t);var o,r=f.data.keepAuthIdle>0;return(t&&t.authData?e.when(t.authData):p.showLogin(t)).then((function(e){if(!e||!e.pubkey||!i&&e.pubkey!==x.pubkey||a&&(!e.keypair||!e.keypair.signPk||!e.keypair.signSk))throw"CANCELLED";if(o=e,x.pubkey=o.pubkey,x.uid=o.uid||x.uid,x.isNew=t&&angular.isDefined(t.isNew)?t.isNew:x.isNew,r&&(x.keypair=o.keypair||{signSk:null,signPk:null}),i)return H.data.raisePromise.loginCheck(x).catch((function(e){throw W(),e})).then((function(){if(i)return H.data.raisePromise.login(x).catch((function(e){console.warn("Error during extension call [wallet.api.data.on.login]",e)}))}))})).then((function(){return i?se():a?openEncryptedData():void 0})).then((function(){if(i&&ie(),a||J())return checkAuthIdle(!0),H.data.raisePromise.auth(r?x:o)})).then((function(){var e=!i&&t&&t.minData?{minData:!0}:void 0;if(!ee(e))return Ee(e)})).then((function(){return t&&t.silent?s.loading.hide(10):s.loading.hide(1e3),r?x:angular.merge({},x,o)})).catch((function(e){if(!("RETRY"!==e||t&&t.authData))return n((function(){return $(t)}),300);throw e}))},z=function(){var t=J();return e((function(e,n){var i=x.pubkey;W(),ae(i),H.data.raise.logout(),t&&H.data.raise.unauth(),checkAuthIdle(!1),r.clearCache(),e()}))},q=function(){return!!x.pubkey},X=function(t){return D?!J()||t&&t.forceAuth?((t=t||{}).expectedPubkey=q()&&x.pubkey,t.auth=!0,$(t)):e.when(x):(y||He()).then((function(){return X(t)}))},Q=function(){return e((function(e,t){V(),ie(),H.data.raise.unauth(),checkAuthIdle(!1),r.clearCache(),e()}))},J=function(){return x.pubkey&&x.keypair&&x.keypair.signSk&&!0},Z=function(t){return D?J()?e.when(x.keypair):((t=t||{}).silent=!angular.isDefined(t.silent)||t.silent,X(t).then((function(){return x.keypair}))):(y||He()).then((function(){return Z(t)}))},ee=function(e){if(e){if(e.minData&&!e.sources)return x.loaded&&!0;if(e.requirements&&!x.requirements.loaded)return!1;if(e.tx&&e.tx.enable&&(!x.tx.fromTime||"pending"===x.tx.fromTime))return!1;if(e.sigStock&&!x.sigStock)return!1}return x.loaded&&x.sources&&!0},te=function(){if(x.loaded)return!x.pubkey||!(x.isMember||x.requirements.pendingMembership||x.requirements.revoked||!x.requirements.needSelf||x.requirements.wasMember||x.sources&&x.sources.length>0||x.tx.history.length>0||x.tx.validating.length>0||x.tx.pendings.length>0||x.localName||x.name||x.avatar)},ne=function(){return!!x.isNew},ie=function(t){if(t=t&&"string"==typeof t?t:x.pubkey,C&&C.useLocalStorage){if(q()&&C.rememberMe){var n=Date.now();console.debug("[wallet] Storing...");var i=[];return C.keepAuthIdle==f.constants.KEEP_AUTH_IDLE_SESSION&&J()?i.push(d.put("seckey",m.util.encode_base58(x.keypair.signSk))):i.push(d.put("seckey",null)),i.push(u.put("pubkey",x.pubkey)),x.uid?i.push(u.put("uid",x.uid)):i.push(u.put("uid",null)),e.all(i).then((function(){console.debug("[wallet] Stored in "+(Date.now()-n)+"ms")}))}return e.all([d.put("seckey",null),u.put("pubkey",null),u.put("uid",null),t?d.put("data-"+t,null):e.when()])}return e.all([d.put("seckey",null),u.put("pubkey",null),u.put("uid",null),t?d.put("data-"+t,null):e.when(),t?u.put("data-"+t,null):e.when()])},ae=function(t){return console.debug("[wallet] Resetting stored pubkey (and uid) in local storage..."),d.put("seckey",null),u.put("pubkey",null),u.put("uid",null),C&&C.useLocalStorage?t?d.put("data-"+t,null):e.when():(console.debug("[wallet] Resetting stored data in local storage..."),e.all([t?d.put("data-"+t,null):e.when(),t?u.put("data-"+t,null):e.when()]))},oe=function(){if(!q())throw{message:"ERROR.NEED_LOGIN_FIRST"};var t,n,i=C&&C.useLocalStorageEncryption,a="data-"+x.pubkey;x.notifications&&x.notifications.time&&((t=t||{}).notifications={time:x.notifications.time}),x.invitations&&x.invitations.time&&((t=t||{}).invitations={time:x.invitations.time}),x.children&&x.children.length&&((t=t||{}).childrenCount=x.children.length,(n=n||{}).children=_.map(x.children,(function(e){return{pubkey:e.data.pubkey,uid:e.data.uid,localName:e.data.localName}})));var o=(t||n)&&JSON.stringify(angular.merge({},t||{},n||{}));return i&&n?J()?e.all([m.util.random_nonce(),m.box.keypair.fromSignKeypair(x.keypair),d.put(a,o||null)]).then((function(e){var i=e[0],o=e[1];return m.box.pack(JSON.stringify(n),i,o.boxPk,o.boxSk).then((function(e){return t=angular.merge(t||{},{encryptedData:{nonce:m.util.encode_base58(i),content:e}}),u.put(a,JSON.stringify(t))}))})):d.put(a,o||null):e.all([d.put(a,null),u.put(a,o||null)])},re=function(){return e.all([d.get("seckey"),u.get("pubkey"),u.get("uid")]).then((function(e){var t=e[0],n=e[1],i=e[2];if(n&&"null"!=n){var a;if(console.debug("[wallet] Restore {"+n.substring(0,8)+"} from local storage"),t&&t.length&&"null"!=t)try{a={signPk:m.util.decode_base58(n),signSk:m.util.decode_base58(t)}}catch(e){console.warn("[wallet] Secret key restoration failed: ",e),a=void 0}return x.pubkey=n,x.uid=i&&"null"!=i?i:void 0,x.keypair=a||{signPk:void 0,signSk:void 0},se()}})).then((function(){return J()?e.all([H.data.raisePromise.login(x),checkAuthIdle(!0),H.data.raisePromise.auth(x)]).catch((function(e){console.warn("Error during extension call [wallet.api.data.on.auth]",e)})):q()?H.data.raisePromise.login(x).catch((function(e){console.warn("Error during extension call [wallet.api.data.on.login]",e)})):void 0})).then((function(){return x}))},se=function(){if(!q())throw{message:"ERROR.NEED_LOGIN_FIRST"};return ne()?e.when(x):e.all([d.getObject("data-"+x.pubkey),u.getObject("data-"+x.pubkey)]).then((function(e){var t=e[0],n=e[1];return t&&t.children&&t.children.length===n.childrenCount?le(t).catch((function(e){return console.error("[wallet] Failed to restore from the session storage ! Retrying from the local storage...",e),le(n)})):le(n)}))},le=function(t){if(!t)return e.when();if(t.children){var n=x.childrenCount,i=ye({stop:!1,store:!1});try{var a={};_.forEach(t.children,(function(e){if(!a[e.pubkey]){a[e.pubkey]=!0;var t=ke();t.data.pubkey=e.pubkey,t.data.localName=e.localName,t.data.uid=e.uid,De(t,{store:!1})}})),delete t.children,delete x.childrenCount}catch(t){return console.error("[wallet] Failed to restore children wallet.",t),x.childrenCount=n,x.children=i,e.reject({message:"ERROR.RESTORE_WALLET_LIST_FAILED"})}_.forEach(i||[],(function(e){e.stop()}))}return delete t.pubkey,delete t.uid,angular.merge(x,t),j()&&J()?openEncryptedData({store:!1}).then((function(){return x})):e.when(x)},ce=function(e,t){return Le("requirements"),v.loadRequirements(x,e).catch((function(n){if(!t)return console.error("[wallet] Unable to load requirements: Will retrying... ",n),s.loading.update({template:"COMMON.LOADING_WAIT"}),ce(e,!0);throw n}))},ue=function(e){return I.load(x.pubkey,e).then((function(e){G(),angular.merge(x,e)})).catch((function(e){throw G(),e}))},de=function(){x.requirements.revoked?(delete x.requirements.meta.invalid,Ae({type:"info",message:"ERROR.WALLET_REVOKED",context:"requirements"})):x.requirements.pendingRevocation?(delete x.requirements.meta.invalid,Ae({type:"pending",message:"INFO.REVOCATION_SENT_WAITING_PROCESS",context:"requirements"})):(!x.isMember&&x.requirements.meta&&x.requirements.meta.invalid?(Ae({type:"error",message:"ERROR.WALLET_INVALID_BLOCK_HASH",context:"requirements"}),console.debug("Invalid membership for uid={0}: block hash changed".format(x.uid))):!x.isMember&&x.requirements.expired?(Ae({type:"error",message:"ERROR.WALLET_IDENTITY_EXPIRED",context:"requirements"}),console.debug("Identity expired for uid={0}.".format(x.uid))):x.requirements.pendingMembership?(Ae({type:"pending",message:"ACCOUNT.WAITING_MEMBERSHIP",context:"requirements"}),!x.requirements.needCertificationCount&&x.requirements.outdistanced&&Ae({type:"warn",message:"ACCOUNT.OUT_DISTANCED",context:"requirements"})):!x.requirements.needSelf&&x.requirements.needMembership&&Ae({type:"warn",message:"ACCOUNT.NO_WAITING_MEMBERSHIP",context:"requirements"}),x.requirements.needRenew?x.isMember&&x.requirements.membershipExpiresIn>0?Ae({type:"warn",message:"ACCOUNT.WILL_NEED_RENEW_MEMBERSHIP",messageParams:x.requirements,context:"requirements"}):!x.isMember&&x.requirements.membershipExpiresIn>0&&x.requirements.needCertificationCount>0?Ae({type:"warn",message:"ACCOUNT.NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED",messageParams:x.requirements,context:"requirements"}):Ae({type:"warn",message:"ACCOUNT.NEED_RENEW_MEMBERSHIP",messageParams:x.requirements,context:"requirements"}):(x.requirements.needCertificationCount>0&&(Ae({type:"info",message:"ACCOUNT.WAITING_CERTIFICATIONS",messageParams:x.requirements,context:"requirements"}),x.requirements.wasMember||Ae({type:"help",message:"ACCOUNT.WAITING_CERTIFICATIONS_HELP",messageParams:x.requirements,context:"requirements"})),x.requirements.willNeedCertificationCount>0&&Ae({type:"warn",message:"ACCOUNT.WILL_MISSING_CERTIFICATIONS",messageParams:x.requirements,context:"requirements"}),x.requirements.wasMember&&x.requirements.needMembership&&Ae({type:"warn",message:"ACCOUNT.NEED_RENEW_MEMBERSHIP",messageParams:x.requirements,context:"requirements"}),x.requirements.needCertificationCount||x.requirements.willNeedCertificationCount||!x.requirements.outdistanced||Ae({type:"warn",message:"ACCOUNT.OUT_DISTANCED",context:"requirements"})))},pe=function(){return A.wot.certifiedBy({pubkey:x.pubkey}).then((function(e){x.sigStock=e.certifications?e.certifications.reduce((function(e,t){return null===t.written?e:e+1}),0):0})).catch((function(e){if(e&&e.ucode==A.errorCodes.NO_MATCHING_MEMBER)x.sigStock=0;else{if(!e||1002!=e.ucode)throw e;console.warn("[wallet-service] Detecting Duniter issue #1309 ! Applying workaround... "),x.sigStock=0}}))},me=function(){return!x.pubkey||x.qrcode?e.when(x.qrcode):(console.debug("[wallet] Creating SVG QRCode..."),n((function(){return x.qrcode=s.qrcode.svg(x.pubkey),x.qrcode})))},Ee=function(t){var n=!O.data.initPhase&&(!f.data.wallet||f.data.wallet.alertIfUnusedWallet)&&!x.loaded&&(!t||!t.minData||!t.silent);return P?P.then((function(){return ee(t)?x:fe(t)})):(P=t&&t.minData?ge(t):t||x.loaded?fe(t):be(),e.all([P,me()]).then((function(){var e=te();return!(n&&!ne()&&!0===e)||s.loading.hide().then((function(){return s.alert.confirm("CONFIRM.LOGIN_UNUSED_WALLET","CONFIRM.LOGIN_UNUSED_WALLET_TITLE",{cancelText:"COMMON.BTN_CONTINUE",okText:"COMMON.BTN_RETRY"})})).then((function(e){return e?z().then((function(){throw"RETRY"})):(f.data.wallet.alertIfUnusedWallet&&(f.data.wallet.alertIfUnusedWallet=!1,f.store()),!0)}))})).then((function(e){if(P=null,e)return x;throw"CANCELLED"})))},be=function(t){x.loaded=!1;var n=Date.now();return console.debug("[wallet] Loading {{0}} full data...".format(x.pubkey.substr(0,8))),e.all([ce(!0).then((function(e){if(e.requirements&&(e.requirements.isMember||e.requirements.wasMember))return pe();e.sigStock=0})),ue(t||"pending")]).then((function(){return de(),H.data.raisePromise.load(x).catch((function(e){console.error("[wallet] Error during load API extension point. Try to continue",e)}))})).then((function(){return x.loaded=!0,console.debug("[wallet] Loaded {{0}} full data in {1}ms".format(x.pubkey.substr(0,8),Date.now()-n)),s.loading.hide(1e3),x})).catch((function(e){throw x.loaded=!1,e}))},ge=function(t){return(t=t||{}).requirements=angular.isDefined(t.requirements)?t.requirements:!x.requirements.loaded||angular.isUndefined(x.requirements.needSelf),t.requirements?fe(t).then((function(e){return e.loaded=!0,e})):e.when(x)},fe=function(t){(t=t||{requirements:!0,sources:!0,tx:{enable:!0,fromTime:x.tx&&"pending"!==x.tx.fromTime?x.tx.fromTime:void 0},sigStock:!0,api:!0}).requirements=angular.isDefined(t.requirements)?t.requirements:!x.requirements.loaded,angular.isUndefined(t.sources)&&t.tx&&t.tx.enable&&(t.sources=!0);var n=[],i=Date.now();return console.debug("[wallet] {0} {{1}} data, with options: ".format(x.loaded?"Refreshing":"Loading",x.pubkey.substr(0,8)),t),t.requirements&&(Le("requirements"),n.push(ce(!0).then(de))),!t.sources||t.tx&&!t.tx.enable?t.sources&&t.tx&&!t.tx.enable&&n.push(ue("pending")):n.push(ue(t.tx?t.tx.fromTime:void 0)),t.sigStock&&n.push(pe()),(n.length?e.all(n):e.when()).then((function(){return angular.isDefined(t.api)&&!t.api?x:H.data.raisePromise.load(x).then((function(){return console.debug("[wallet] {0} {{1}} data in {2}ms".format(x.loaded?"Refreshed":"Loaded",x.pubkey.substr(0,8),Date.now()-i)),x.loaded||(x.loaded=x.requirements.loaded&&x.sources&&!0),x}))})).catch((function(e){throw console.error("[wallet] Error while {0} data: ".format(x.loaded?"Refreshing":"Loading"),e),x.loaded=x.requirements.loaded&&x.sources&&!0,e}))},_e=function(t,n){return x.uid!=t||n&&x.blockUid!=n?x.loaded?(x.uid=t,x.blockUid=n,fe({requirements:!0,sigStock:!0}).then((function(){return ie({skipData:!0})}))):P?P.then((function(){return _e(t,n)})):e.when():e.when()},Te=function(e,t){var n=Math.pow(10,t);return e<n?0:Math.trunc(e/n)*n},he=function(e,t){return t<=0?e:e*Math.pow(10,t)},ve=function(e,t,n){angular.isUndefined(n)&&(n=t);var i=0,a=[],o=n,r=n;if(_.find(x.sources||[],(function(t){return!t.consumed&&t.base===n&&A.regexp.TX_OUTPUT_SIG.exec(t.conditions)&&(i+=he(t.amount,t.base),a.push(t)),i>=e})),i<e&&n>0){var s=ve(e-i,t,n-=1);s.amount>0&&(o=s.minBase,i+=s.amount,[].push.apply(a,s.sources))}return{minBase:o,maxBase:r,amount:i,sources:a}},Ie=function(t,i,r,l,c,u){return e.all([Z(),O.get(),u&&e.when(u)||O.blockchain.current(!0)]).then((function(e){var d=e[0],p=e[1];if(u=e[2],!A.regexp.PUBKEY.test(t))throw{message:"ERROR.INVALID_PUBKEY"};if(!A.regexp.COMMENT.test(r))throw{message:"ERROR.INVALID_COMMENT"};if(!q())throw{message:"ERROR.NEED_LOGIN_FIRST"};if(t===x.pubkey)throw{message:"ERROR.SAME_TX_RECIPIENT"};if(!i)throw{message:"ERROR.AMOUNT_REQUIRED"};if(i<=0)throw{message:"ERROR.AMOUNT_NEGATIVE"};i=Math.floor(i);var m={amount:0,minBase:u.unitbase,maxBase:u.unitbase+1,sources:[]},E=[];E.push("[wallet] amount="+i);for(var b=0;m.amount<i&&b<=u.unitbase;)(m=ve(i,u.unitbase)).amount<i&&++b<=u.unitbase&&(i=Te(i,b),E.push("[wallet] inputs not found. Retrying with amount ="+i+" be compatible with amountBase="+b));if(m.amount<i){if(x.balance<i)throw{message:"ERROR.NOT_ENOUGH_CREDIT"};if(0===m.amount)throw{message:"ERROR.ALL_SOURCES_USED"};return a("COMMON.UD").then((function(e){var t;return t=l?{amount:o("formatDecimal")(m.amount/p.currentUD),unit:e,subUnit:o("abbreviate")(p.name)}:{amount:o("formatDecimal")(m.amount/100),unit:o("abbreviate")(p.name),subUnit:""},a("ERROR.NOT_ENOUGH_SOURCES",t).then((function(e){throw{message:e}}))}))}return b<m.minBase&&!function(e,t){if(!t)return!0;if(e<Math.pow(10,t))return!1;var n="00000000"+e;return 0===parseInt(n.substring(n.length-t))}(i,m.minBase)?(i=function(e,t){var n=Math.pow(10,t);return e<n?n:Math.trunc(e/n)*n}(i,m.minBase),console.debug("[wallet] Amount has been truncate to "+i),E.push("[wallet] Amount has been truncate to "+i)):b>0&&(console.debug("[wallet] Amount has been truncate to "+i),E.push("[wallet] Will use amount truncated to "+i+" (amountBase="+b+")")),Oe(p,u,d,t,i,m,r,c||x.pubkey,E).then((function(e){x.balance-=e.amount,x.balance<0&&(x.balance=0),_.forEach(m.sources,(function(e){e.consumed=!0})),e&&e.sources.length&&(console.debug("[wallet-service] New sources to be add after the TX: ",e.sources),K(e.sources));var n={time:O.date.now(),amount:-i,pubkey:t,comment:r,isUD:!1,hash:e.hash,locktime:0,block_number:null};return v.extendAll([n],"pubkey").then((function(){return x.tx.pendings.unshift(n),H.data.raise.balanceChanged(x),H.data.raise.newTx(x),{hash:e.hash}}))})).catch((function(e){if(e&&e.ucode===A.errorCodes.SOURCE_ALREADY_CONSUMED)return console.debug("[wallet] TX rejected by node with error [{0}]. Reloading sources then retry...".format(e.message||"Source already consumed")),n(ue,500).then((function(){return Ie(t,i,r,l,c,u)}));if(e&&e.ucode===A.errorCodes.TX_INPUTS_OUTPUTS_NOT_EQUAL&&f.data.plugins&&f.data.plugins.es&&f.data.plugins.es.enable)return s.loading.hide(),s.alert.confirm("CONFIRM.ISSUE_524_SEND_LOG","ERROR.POPUP_TITLE",{cssClass:"warning",okText:"COMMON.BTN_OK",cancelText:"COMMON.BTN_NO"}).then((function(e){if(e)return H.error.raise.send({title:"Issue #524 logs",content:"App version: "+g.version+"\nApp build: "+g.build+"\nLogs:\n\n"+E.join("\n")}),n((function(){throw{message:"ERROR.ISSUE_524_TX_FAILED"}}),1500);throw{message:"ERROR.SEND_TX_FAILED"}}));throw e}))}))},Oe=function(e,t,n,a,o,r,s,l,c){if(r.sources.length>40){console.debug("[Wallet] TX has to many sources. Will chain TX...");var u={minBase:t.unitbase,maxBase:0,amount:0,sources:r.sources.slice(0,40)};return _.forEach(u.sources,(function(e){e.base<u.minBase&&(u.minBase=e.base),e.base>u.maxBase&&(u.maxBase=e.base),u.amount+=he(e.amount,e.base)})),Oe(e,t,n,x.pubkey,u.amount,u,void 0,x.pubkey,c).then((function(i){_.forEach(u.sources,(function(e){e.consumed=!0})),K(i.sources);var d={minBase:t.unitbase,maxBase:0,amount:0,sources:r.sources.slice(40).concat(i.sources)};return _.forEach(d.sources,(function(e){e.base<d.minBase&&(d.minBase=e.base),e.base>d.maxBase&&(d.maxBase=e.base),d.amount+=he(e.amount,e.base)})),Oe(e,t,n,a,o,d,s,l,c)}))}var d="Version: "+k+"\nType: Transaction\nCurrency: "+e.name+"\nBlockstamp: "+t.number+"-"+t.hash+"\nLocktime: 0\nIssuers:\n"+x.pubkey+"\nInputs:\n";for(_.forEach(r.sources,(function(e){d+=[e.amount,e.base,e.type,e.identifier,e.noffset].join(":")+"\n"})),d+="Unlocks:\n",i=0;i<r.sources.length;i++)d+=i+":SIG(0)\n";d+="Outputs:\n";var p,E=o,b=r.maxBase,g=0,f=[];if(a!==x.pubkey){for(;E>0;)E-=p=Te(E,b),p>0&&(p=0===b?p:p/Math.pow(10,b),d+=p+":"+b+":SIG("+a+")\n",g++),b--;E=r.amount-o,b=r.maxBase}for(;E>0;)E-=p=Te(E,b),p>0&&(p=0===b?p:p/Math.pow(10,b),d+=p+":"+b+":SIG("+l+")\n",x.pubkey===l&&f.push({type:"T",noffset:g,amount:p,base:b,conditions:"SIG("+l+")",consumed:!1}),g++),b--;return d+="Comment: "+(s||"")+"\n",c&&(a==x.pubkey?c.push("[wallet] Creating new TX, using inputs:\n - minBase: "+r.minBase+"\n - maxBase: "+r.maxBase):c.push("[wallet] Creating new TX, using inputs:\n - minBase: "+r.minBase+"\n - maxBase: "+r.maxBase+"\n - sources (=TX inputs):"),_.forEach(r.sources,(function(e){c.push([e.amount,e.base,e.type,e.identifier,e.noffset].join(":"))})),c.push("\n[wallet] generated TX document (without signature) :\n------ START ------\n"+d+"------ END ------\n")),m.sign(d,n).then((function(e){var t=d+e+"\n";return A.tx.process({transaction:t}).catch((function(e){if(!e||e.ucode!==A.errorCodes.TX_ALREADY_PROCESSED)throw e})).then((function(){return m.util.hash(t)})).then((function(e){return _.forEach(f,(function(t){t.identifier=e,t.consumed=!1,t.pending=!0})),{amount:x.pubkey===a?0:x.pubkey===l?o:r.amount,tx:t,hash:e,sources:f}}))}))},Ne=function(e,t,n,i){if(n=n||x.uid,i=i||x.blockUid,!n||!i)throw{message:"ERROR.WALLET_HAS_NO_SELF"};if(x.requirements.expired)throw{message:"ERROR.WALLET_IDENTITY_EXPIRED"};var a="Version: "+M+"\nType: Identity\nCurrency: "+e.name+"\nIssuer: "+x.pubkey+"\nUniqueID: "+n+"\nTimestamp: "+i+"\n";return m.sign(a,t).then((function(e){return a+=e+"\n",console.debug("Has generate an identity document:\n----\n"+a+"----"),a}))},Re=function(t){return function(){var i;return e.all([Z(),O.blockchain.lastValid()]).then((function(e){var n=e[0],a=e[1];return i="Version: "+w+"\nType: Membership\nCurrency: "+a.currency+"\nIssuer: "+x.pubkey+"\nBlock: "+a.number+"-"+a.hash+"\nMembership: "+(t?"IN":"OUT")+"\nUserID: "+x.uid+"\nCertTS: "+x.blockUid+"\n",m.sign(i,n)})).then((function(e){var t=i+e+"\n";return A.blockchain.membership({membership:t})})).then((function(){return n((function(){return ce(!1)}),1e3)})).then(de)}},Ae=function(e,t){(e=e||{}).type=e.type||"info",e.message=e.message||"",e.messageParams=e.messageParams||{},e.context=e.context||"undefined",e.message.trim().length?t?x.events.splice(0,0,e):x.events.push(e):console.debug("Event without message. Skipping this event")},Se=function(e){var t=Math.round(e.answer.length/2),n=e.answer.substr(0,t),i=e.answer.substr(t);return m.scryptKeypair(n,i).then((function(t){return e.pubkey=m.util.encode_base58(t.signPk),e.keypair=t,e}))},Ce=function(){return e.all([Z(),O.get()]).then((function(e){var t=e[0],n=e[1];return Ne(n,t).then((function(e){var i=e.trim().split("\n"),a=i[i.length-1],o="Version: "+B+"\nType: Revocation\nCurrency: "+n.name+"\nIssuer: "+x.pubkey+"\nIdtyUniqueID: "+x.uid+"\nIdtyTimestamp: "+x.blockUid+"\nIdtySignature: "+a+"\n";return m.sign(o,t).then((function(e){return o+=e+"\n",console.debug("Has generate an revocation document:\n----\n"+o+"----"),o}))}))}))},Le=function(e){x.events=x.events.reduce((function(t,n){return n.context&&n.context==e?t:t.concat(n)}),[])},De=function(t,n){return t.children.setParent(S),x.children=x.children||[],x.children.push(t),!n||angular.isUndefined(n.store)||n.store?oe():e.when()},ye=function(e){e&&!e.stop||_.forEach(x.children||[],(function(e){e.stop()}));var t=x.children.splice(0,x.children.length);return!e||angular.isUndefined(e.store)||e.store?oe():t},Pe=function(e){return _.find(x.children||[],(function(t){return t.isUserPubkey(e)}))},ke=function(){var e=(x.children||[]).reduce((function(e,t){return Math.max(e,t.id)}),0)+1;return N.instance(e,A)},Me=function(){return openEncryptedData().then((function(){return x.children}))};function we(e){return e&&{useLocalStorage:e.useLocalStorage,useLocalStorageEncryption:e.useLocalStorageEncryption,rememberMe:e.rememberMe,keepAuthIdle:e.keepAuthIdle}}function Ue(e){var t=we(e);if(!angular.equals(C,t)&&C){var n=!angular.equals(C.useLocalStorageEncryption,t.useLocalStorageEncryption),i=!angular.equals(C.useLocalStorage,t.useLocalStorage)||n,a=!angular.equals(C.keepAuthIdle,t.keepAuthIdle);if(C=t,a&&checkAuthIdle(),i){if(C.useLocalStorage)return ie().then((function(){if(x.childrenCount>0&&n&&C.useLocalStorageEncryption)return X({minData:!0,silent:!0}).catch((function(e){if("CANCELLED"===e)return f.apply({useLocalStorageEncryption:!1}),f.store();throw e}))})).then(oe);ae(x.pubkey)}}}function Be(){_.forEach(L,(function(e){e()})),L=[]}function xe(){console.debug("[wallet] Stopping..."),Be(),W()}function Fe(){return xe(),n(He,200)}function He(n){(n=n||{}).restore=angular.isDefined(n.restore)?n.restore:"default"===b,console.debug("[wallet] Starting...");var i=Date.now();return y=e.all([f.ready().then((function(){C=we(f.data)})),O.ready(),A.ready()]),n.restore&&(y=y.then(re)),y.then((function(){!function(){L=[f.api.data.on.changed(t,Ue,this),A.api.node.on.restart(t,Fe,this)],t.$on("IdleStart",Q)}(),console.debug("[wallet] Started in "+(Date.now()-i)+"ms"),D=!0,y=null})).then((function(){return x})),y}return getByPubkey=function(e){if(!e)throw new Error("Missing 'pubkey' argument !");if(!x.pubkey)throw new Error("User not login!");return x.pubkey===e?S:Pe(e)},downloadChildrenWalletFile=function(){return e.all([Me(),O.get()]).then((function(e){var t=e[0],n=e[1],i=(t||[]).reduce((function(e,t){return e+[t.data.pubkey,t.data.uid,t.data.localName||t.data.name].join("\t")+"\n"}),""),o=new h([i],{type:"text/plain; charset=utf-8"});return a("ACCOUNT.WALLET_LIST.EXPORT_FILENAME",{pubkey:x.pubkey,currency:n.name}).then((function(e){T.saveAs(o,e)}))}))},openEncryptedData=function(t){return j()?J()?m.box.keypair.fromSignKeypair(x.keypair).then((function(e){var t=m.util.decode_base58(x.encryptedData.nonce);return m.box.open(x.encryptedData.content,t,e.boxPk,e.boxSk)})).then((function(e){x.encryptedData=null;var n=le(JSON.parse(e));return(!t||angular.isUndefined(t.store)||t.store)&&n.then((function(){return oe()})),n})):X().then(openEncryptedData):e.when()},fromJson=function(t,n){return n=!!angular.isUndefined(n)||n,e((function(e,i){var a;try{a=JSON.parse(t||"{}")}catch(e){}if(a&&a.keypair&&a.keypair.signPk&&a.keypair.signSk){var o,r={},s=new Uint8Array(32);for(o=0;o<32;o++)s[o]=a.keypair.signPk[o];r.signPk=s;var l=new Uint8Array(64);for(o=0;o<64;o++)l[o]=a.keypair.signSk[o];if(r.signSk=l,a.version&&a.keypair.boxPk){var c=new Uint8Array(32);for(o=0;o<32;o++)c[o]=a.keypair.boxPk[o];r.boxPk=c}if(a.version&&a.keypair.boxSk){var u=new Uint8Array(32);for(o=0;o<64;o++)u[o]=a.keypair.boxSk[o];r.boxSk=u}e({pubkey:a.pubkey,keypair:r,tx:a.tx})}else n?i("Not a valid Wallet.data object"):e()}))},checkAuthIdle=function(e){var t=(e=angular.isDefined(e)?e:J())&&C&&C.keepAuthIdle>0&&C.keepAuthIdle!=f.constants.KEEP_AUTH_IDLE_SESSION,n=F!=t;n?(t?(console.debug("[wallet] Start idle (delay: {0}s)".format(C.keepAuthIdle)),c.setIdle(C.keepAuthIdle),c.watch()):F&&(console.debug("[wallet] Stop idle"),c.unwatch()),F=t):t&&c.getIdle()!==C.keepAuthIdle&&(console.debug("[idle] Updating auth idle (delay: {0}s)".format(C.keepAuthIdle)),c.setIdle(C.keepAuthIdle)),e&&C&&C.keepAuthIdle==f.constants.KEEP_AUTH_IDLE_SESSION?d.put("seckey",m.util.encode_base58(x.keypair.signSk)):n&&d.put("seckey",null)},H.registerEvent("data","init"),H.registerEvent("data","loginCheck"),H.registerEvent("data","login"),H.registerEvent("data","auth"),H.registerEvent("data","unauth"),H.registerEvent("data","load"),H.registerEvent("data","logout"),H.registerEvent("data","reset"),H.registerEvent("data","store"),H.registerEvent("error","send"),H.registerEvent("data","balanceChanged"),H.registerEvent("data","newTx"),H.registerEvent("action","certify"),W(!0),"default"!==b&&(ie=e.when,re=e.when,se=e.when),S={id:b,data:x,ready:function(){return D?e.when():y||He()},start:He,stop:xe,login:$,logout:z,auth:X,unauth:Q,isLogin:q,isAuth:J,getKeypair:Z,hasSelf:function(){return!!x.pubkey&&!x.requirements.needSelf},setSelf:_e,isMember:function(){return x.isMember},isDataLoaded:ee,isDefault:Y,isNeverUsed:te,isNew:ne,isUserPubkey:function(e){return q()&&x.pubkey===e},getData:function(){return x},loadData:Ee,refreshData:fe,loadQrCode:me,internal:{addListener:function(e){(L=L||[]).push(e)},removeListeners:Be},store:ie,storeData:oe,transfer:Ie,transferAll:function(t,n,i,a,o){return q()?o&&t!=o?O.blockchain.lastValid().then((function(e){return console.debug("[wallet] Using last valid block as TX reference (to avoid network fork): ",e),Ie(t,n,i,a,o,e).then((function(){if(x.balance>0&&o)return console.debug("[wallet] Wallet has some more money: transfering fund to [{0}]".format(o.substring(0,8))),Ie(o,x.balance,void 0,!1,o,e)}))})):e.reject({message:"Could not have same pubkey for 'destPub' and 'restPub'"}):e.reject({message:"ERROR.NEED_LOGIN_FIRST"})},self:function(t,n){return A.regexp.USER_ID.test(t)?e.all([Z(),O.get(),O.blockchain.lastValid()]).then((function(e){var n=e[0],a=e[1];return i=e[2],Ne(a,n,t,i.number+"-"+i.hash)})).then((function(e){return A.wot.add({identity:e})})).then((function(){if(n)return ce(!1).then(de);x.uid=t,x.blockUid=i.number+"-"+i.hash})).catch((function(e){if(e&&e.ucode===A.errorCodes.IDENTITY_SANDBOX_FULL)throw{ucode:A.errorCodes.IDENTITY_SANDBOX_FULL,message:"ERROR.IDENTITY_SANDBOX_FULL"};throw e})):e.reject({message:"ERROR.INVALID_USER_ID"});var i},revoke:function(){return Le("revocation"),Ce().then((function(e){return A.wot.revoke({revocation:e})})).then((function(){return n((function(){return ce(!1)}),1e3)})).then(de).catch((function(e){if(!e||e.ucode!=A.errorCodes.REVOCATION_ALREADY_REGISTERED)throw e;Ae({type:"pending",message:"INFO.REVOCATION_SENT_WAITING_PROCESS",context:"requirements"},!0)}))},revokeWithFile:function(t){return e.all([A.wot.revoke({revocation:t})]).then((function(e){if(q())return n((function(){return ce(!1)}),1e3).then(de).catch((function(e){if(!e||e.ucode!=A.errorCodes.REVOCATION_ALREADY_REGISTERED)throw e;Ae({type:"pending",message:"INFO.REVOCATION_SENT_WAITING_PROCESS",context:"requirements"},!0)}));Ae({type:"pending",message:"INFO.REVOCATION_SENT_WAITING_PROCESS",context:"requirements"},!0)}))},certify:function(t,n,i,a,o,r){return e.all([Z(),O.get(),O.blockchain.lastValid()]).then((function(e){var s=e[0],l=e[1],c=e[2];if(!x.isMember&&!g.initPhase)throw{message:"ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION"};var u="Version: "+U+"\nType: Certification\nCurrency: "+l.name+"\nIssuer: "+x.pubkey+"\nIdtyIssuer: "+n+"\nIdtyUniqueID: "+t+"\nIdtyTimestamp: "+i+"\nIdtySignature: "+a+"\nCertTimestamp: "+c.number+"-"+c.hash+"\n";return m.sign(u,s).then((function(e){var t=u+e+"\n";return A.wot.certify({cert:t})})).then((function(){var e={pubkey:n,uid:t,time:c.medianTime,isMember:o,wasMember:r,expiresIn:l.parameters.sigWindow,pending:!0,block:c.number,valid:!0};return H.action.raise.certify(e),e}))}))},downloadSaveId:function(e){return function(e){var t="Version: 10 \nType: SaveID\nQuestions: \n"+e.questions+"Issuer: "+x.pubkey+"\nCrypted-Nonce: "+e.nonce+"\nCrypted-Pubkey: "+e.pubkey+"\nCrypted-Salt: "+e.salt+"\nCrypted-Pwd: "+e.pwd+"\n";return m.sign(t,x.keypair).then((function(e){return t+=e+"\n",console.debug("Has generate an SaveID document:\n----\n"+t+"----"),t}))}(e).then((function(e){var t=new h([e],{type:"text/plain; charset=utf-8"});T.saveAs(t,"{0}-recover_ID.txt".format(x.pubkey.substring(0,8)))}))},getCryptedId:function(t){return Se(t).then(m.util.random_nonce).then((function(n){return t.nonce=m.util.encode_base58(n),e.all([m.box.pack(t.salt,n,t.keypair.boxPk,t.keypair.boxSk),m.box.pack(t.pwd,n,t.keypair.boxPk,t.keypair.boxSk)])})).then((function(e){return t.salt=e[0],t.pwd=e[1],t}))},recoverId:function(e){if(!(e&&e.cypherNonce&&e.cypherSalt&&e.cypherPwd))throw{message:"ERROR.INVALID_FILE_FORMAT"};var t=m.util.decode_base58(e.cypherNonce);return Se(e).then((function(e){return m.box.open(e.cypherSalt,t,e.keypair.boxPk,e.keypair.boxSk)})).then((function(n){return e.salt=n,m.box.open(e.cypherPwd,t,e.keypair.boxPk,e.keypair.boxSk)})).then((function(t){return e.pwd=t,e})).catch((function(e){throw console.warn("Incorrect answers: unable to recover identifiers",e),new Error("Incorrect answers: unable to recover identifiers")}))},downloadRevocation:function(){return e.all([O.get(),Ce()]).then((function(e){var t=e[0],n=e[1],i=new h([n],{type:"text/plain; charset=utf-8"});return a("ACCOUNT.SECURITY.REVOCATION_FILENAME",{uid:x.uid,currency:t.name,pubkey:x.pubkey}).then((function(e){T.saveAs(i,e)}))}))},downloadKeyFile:function(t){return J()?e.all([O.get(),E.keyfile.generateContent(x.keypair,{type:t,password:function(){return s.loading.hide(),p.showPassword({title:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE",subTitle:"ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP"}).then((function(e){return s.loading.show(10).then((function(){return e}))}))}})]).then((function(e){var n=e[0],i=e[1];return a("ACCOUNT.SECURITY.KEYFILE_FILENAME",{currency:n.name,pubkey:x.pubkey,format:t}).then((function(e){var t=new h([i],{type:"text/plain; charset=utf-8"});T.saveAs(t,e)}))})):e.reject("user not authenticated")},pubkeys:function(){if(!x.pubkey)throw new Error("User not login!");return(x.children||[]).reduce((function(e,t){return t.data.pubkey?e.concat(t.data.pubkey):e}),[x.pubkey])},getByPubkey:getByPubkey,membership:{inside:Re(!0),out:Re(!1)},events:{add:Ae,cleanByContext:Le},children:{create:function(e){var t=ke();return De(t,e),t},add:De,remove:function(e,t){x.children=x.children||[];var n=_.findIndex(x.children,(function(t){return t.id===e}));if(-1!==n)return x.children.splice(n,1)[0].stop(),!t||angular.isUndefined(t.store)||t.store?oe():void 0;console.warn("[wallet] Unable to remove child wallet {"+e+"} (not found)")},get:function(e){return"default"!==e&&_.find(x.children||[],(function(t){return t.id===+e}))||void 0},getByPubkey:Pe,all:Me,setParent:function(n){var i;L=L||[],_.forEach(["load","reset"],(function(a){i=H.data.on[a](t,(function(t,i){return i=i||e.defer(),n.api.data.raisePromise[a](t).then(i.resolve).catch(i.reject),i.promise}),this),L.push(i)})),i=n.api.data.on.unauth(t,(function(){J()&&Q()}),this),L.push(i)},count:function(){return angular.isDefined(x.childrenCount)?x.childrenCount:x.children&&x.children.length||0},hasPubkey:function(e){return!!Pe(e)},instance:ke,downloadFile:downloadChildrenWalletFile},api:H}}return(N=A("default",b)).instance=A,N}]),angular.module("cesium.help.services",[]).constant("csHelpConstants",{wallet:{stepCount:4}}).factory("csHelp",["$rootScope","csSettings","UIUtils","csHelpConstants","$controller",function(e,t,n,i,a){function o(o,r){if(o=angular.isDefined(o)?o:t.data.helptip.wallet,r=!!angular.isDefined(r)&&r,!(o<0||o>=i.wallet.stepCount)){var s=function(i,o){if(i||!e.tour&&t.data.helptip.enable&&!n.screen.isSmall()){var r=e.$new();return a("HelpTipCtrl",{$scope:r}),r}}(r);if(s)return s.tour=r,s.startWalletTour(o,!1).then((function(e){s.$destroy(),r||(t.data.helptip.wallet=e,t.store())}))}}return{wallet:{tour:function(){return o(0,!0)},helptip:o}}}]),angular.module("cesium.plugin.services",[]).provider("PluginService",(function(){var e=[],t={};this.registerEagerLoadingService=function(t){return e.push(t),this},this.extendState=function(e,n){return angular.isDefined(e)&&angular.isDefined(n)&&(t[e]||(t[e]=[]),t[e].push(n)),this},this.extendStates=function(e,t){var n=this;return e.forEach((function(e){n.extendState(e,t)})),this},this.$get=["$injector","$state",function(n,i){var a;return{start:function(){e.length>0&&_.forEach(e,(function(e){n.get(e)}))},extensions:{points:{getActivesByName:function(e){return _.keys(t).reduce((function(e,n){return i.includes(n)?e.concat(t[n]):e}),[]).reduce((function(t,n){return n.points&&n.points[e]?t.concat(n.points[e]):t}),[])},current:{get:function(){return a},set:function(e){a=e}}}}}}]})),angular.module("cesium.services",["cesium.settings.services","cesium.http.services","cesium.network.services","cesium.bma.services","cesium.crypto.services","cesium.utils.services","cesium.modal.services","cesium.storage.services","cesium.device.services","cesium.currency.services","cesium.wot.services","cesium.tx.services","cesium.wallet.services","cesium.help.services","cesium.plugin.services"]),e.prototype.regexp={BMA:/^BASIC_MERKLED_API[ ]?/,BMAS:/^BMAS[ ]?/,WS2P:/^WS2P[ ]?/,BMA_REGEXP:/^BASIC_MERKLED_API([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))$/,BMAS_REGEXP:/^BMAS([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))$/,WS2P_REGEXP:/^WS2P[ ]+([a-z0-9]+)([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))([ ]+([a-z0-9/.&#!]+))?$/,LOCAL_IP_ADDRESS:/^127[.]0[.]0.|192[.]168[.]|10[.]0[.]0[.]|172[.]16[.]/},e.prototype.regex=e.prototype.regexp,e.prototype.keyID=function(){var e=this.bma||this.getBMA();return e.useBma?[this.pubkey||"Unknown",e.dns,e.ipv4,e.ipv6,e.port,e.useSsl,e.path].join("-"):[this.pubkey||"Unknown",e.ws2pid,e.path].join("-")},e.prototype.copyValues=function(e){var t=this;["version","currency","pub","endpoints","hash","status","block","signature"].forEach((function(n){e[n]=t[n]}))},e.prototype.copyValuesFrom=function(e){var t=this;["version","currency","pub","endpoints","block","signature"].forEach((function(n){t[n]=e[n]}))},e.prototype.json=function(){var e=this,t={};return["version","currency","endpoints","status","block","signature"].forEach((function(n){t[n]=e[n]})),t.raw=this.raw&&this.getRaw(),t.pubkey=this.pubkey,t},e.prototype.getBMA=function(){if(this.bma)return this.bma;var e=null,t=this.regexp.BMA_REGEXP,n=this.regexp.BMAS_REGEXP;return this.endpoints.forEach((function(i){var a=!e&&t.exec(i);a&&(e={dns:a[2]||"",ipv4:a[4]||"",ipv6:a[6]||"",port:a[8]||80,useSsl:443==a[8],useBma:!0}),(a=!e&&n.exec(i))&&(e={dns:a[2]||"",ipv4:a[4]||"",ipv6:a[6]||"",port:a[8]||80,useSsl:!0,useBma:!0})})),e||{}},e.prototype.getEndpoints=function(e){return e?this.endpoints.reduce((function(t,n){return n.match(e)?t.concat(n):t}),[]):this.endpoints},e.prototype.hasEndpoint=function(e){var t=this.regexp[e]||new RegExp("^"+e);return!!this.getEndpoints(t).length},e.prototype.getDns=function(){var e=this.bma||this.getBMA();return e.dns?e.dns:null},e.prototype.getIPv4=function(){var e=this.bma||this.getBMA();return e.ipv4?e.ipv4:null},e.prototype.getIPv6=function(){var e=this.bma||this.getBMA();return e.ipv6?e.ipv6:null},e.prototype.getPort=function(){var e=this.bma||this.getBMA();return e.port?e.port:null},e.prototype.getHost=function(e){return bma=e||this.bma||this.getBMA(),(443==bma.port||bma.useSsl)&&bma.dns?bma.dns:this.hasValid4(bma)?bma.ipv4:bma.dns?bma.dns:bma.ipv6?"["+bma.ipv6+"]":""},e.prototype.getURL=function(e){e=e||this.bma||this.getBMA();var t=this.getHost(e);return(443==e.port||e.useSsl?"https":"http")+"://"+t+(e.port?":"+e.port:"")},e.prototype.getServer=function(e){e=e||this.bma||this.getBMA();var t=this.getHost(e);return t+(t&&e.port?":"+e.port:"")},e.prototype.hasValid4=function(e){return!(!e.ipv4||e.ipv4.match(this.regexp.LOCAL_IP_ADDRESS))},e.prototype.isReachable=function(){return!!this.getServer()},e.prototype.isSsl=function(){return(this.bma||this.getBMA()).useSsl},e.prototype.isTor=function(){return(this.bma||this.getBMA()).useTor},e.prototype.isWs2p=function(){return(this.bma||this.getBMA()).useWs2p},e.prototype.isBma=function(){var e=this.bma||this.getBMA();return!e.useWs2p&&!e.useTor},e.prototype.hasBma=function(){return this.hasEndpoint("(BASIC_MERKLE_API|BMAS|BMATOR)")},t.prototype.isEmpty=function(){"use strict";return!(this.transactionsCount||this.certificationsCount||this.joinersCount||this.dividend||this.activesCount||this.identitiesCount||this.leaversCount||this.excludedCount||this.revokedCount)},t.prototype.parseData=function(){this.identities=this.parseArrayValues(this.identities,["pubkey","signature","buid","uid"]),this.joiners=this.parseArrayValues(this.joiners,["pubkey","signature","mBuid","iBuid","uid"]),this.actives=this.parseArrayValues(this.actives,["pubkey","signature","mBuid","iBuid","uid"]),this.leavers=this.parseArrayValues(this.leavers,["pubkey","signature","mBuid","iBuid","uid"]),this.revoked=this.parseArrayValues(this.revoked,["pubkey","signature"]),this.excluded=this.parseArrayValues(this.excluded,["pubkey"]),this.certifications=this.parseArrayValues(this.certifications,["from","to","block","signature"]),this.transactions=this.parseTransactions(this.transactions),delete this.raw},t.prototype.cleanData=function(){delete this.identities,delete this.joiners,delete this.actives,delete this.leavers,delete this.revoked,delete this.excluded,delete this.certifications,delete this.transactions,delete this.raw},t.prototype.parseArrayValues=function(e,t){return e&&e.length?e.reduce((function(e,n){var i=n.split(":");if(i.length!=t.length)return console.debug("[block] Bad format for '{0}': [{1}]. Expected {1} parts. Skipping".format(arrayProperty,n,t.length)),e;for(var a={},o=0;o<t.length;o++)a[t[o]]=i[o];return e.concat(a)}),[]):[]},t.prototype.regexp={TX_OUTPUT_SIG:("SIG\\(([0-9a-zA-Z]{43,44})\\)",new RegExp("^SIG\\(([0-9a-zA-Z]{43,44})\\)$"))},t.prototype.parseTransactions=function(e){return e&&e.length?e.reduce((function(e,n){var i={issuers:n.issuers,time:n.time};return i.outputs=n.outputs.reduce((function(e,i){var a=i.split(":");if(3!=a.length)return console.debug("[block] Bad format a 'transactions': [{0}]. Expected 3 parts. Skipping".format(i)),e;var o=a[0],r=a[1],s=a[2],l=t.prototype.regexp.TX_OUTPUT_SIG.exec(a[2]);if(l){var c=l[1];return n.issuers&&-1==n.issuers.indexOf(c)?e.concat({amount:r<=0?o:o*Math.pow(10,r),unitbase:r,pubkey:c}):e}return e.concat({amount:r<=0?o:o*Math.pow(10,r),unitbase:r,unlockCondition:s})}),[]),i.error||i.outputs.length||(i.toHimself=!0),e.concat(i)}),[]):[]},n.prototype.regexp={WS2P_PREFIX:/^WS2P(?:O([CT][SAM]))?(?:I([CT]))?$/},o.$inject=["$scope","$rootScope","$state","$ionicSideMenuDelegate","$q","$timeout","$ionicHistory","$controller","$window","csPlatform","csSettings","CryptoUtils","csCrypto","UIUtils","BMA","csWallet","Device","Modals","csConfig","csHttp"],r.$inject=["$scope","$state","$timeout","$ionicHistory","$translate","$http","UIUtils","csConfig","csCache","csPlatform","csCurrency","csSettings"],a.$inject=["$scope","PluginService"],angular.module("cesium.app.controllers",["cesium.platform","cesium.services"]).config(["$stateProvider","$urlRouterProvider",function(e,t){e.state("app",{url:"/app",abstract:!0,templateUrl:"templates/menu.html",controller:"AppCtrl",data:{large:!1}}).state("app.home",{url:"/home?error",views:{menuContent:{templateUrl:"templates/home/home.html",controller:"HomeCtrl"}}}).state("app.lock",{cache:!1,url:"/lock",views:{menuContent:{templateUrl:"templates/common/view_passcode.html",controller:"PassCodeCtrl"}}}),t.otherwise("/app/home")}]).controller("AppCtrl",o).controller("HomeCtrl",r).controller("PluginExtensionPointCtrl",a),s.$inject=["$scope","$timeout","$controller","Modals","csWallet"],l.$inject=["$scope","$state","Modals","UIUtils","csCurrency"],c.$inject=["$scope","$state","$interval","$q","$timeout","Device","UIUtils","CryptoUtils","csSettings","Modals","csWallet","BMA","parameters"],angular.module("cesium.join.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.join",{url:"/join",views:{menuContent:{templateUrl:"templates/home/home.html",controller:"JoinCtrl"}}})}]).controller("JoinCtrl",s).controller("JoinChooseAccountTypeModalCtrl",l).controller("JoinModalCtrl",c),u.$inject=["$scope","$timeout","$controller","csWallet"],d.$inject=["$scope","$timeout","$q","$ionicPopover","$window","CryptoUtils","csCrypto","ionicReady","UIUtils","BMA","Modals","csSettings","Device","parameters"],p.$inject=["$scope","$controller"],angular.module("cesium.login.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.login",{url:"/login",views:{menuContent:{templateUrl:"templates/home/home.html",controller:"LoginCtrl"}}})}]).controller("LoginCtrl",u).controller("LoginModalCtrl",d).controller("AuthCtrl",p),m.$inject=["$scope","$state","$timeout","$anchorScroll","csSettings"],E.$inject=["$scope","$timeout","$anchorScroll","csSettings","parameters"],b.$inject=["$scope","$state","$window","$ionicSideMenuDelegate","$timeout","$q","$anchorScroll","UIUtils","csConfig","csSettings","csCurrency","csHelpConstants","Device","csWallet"],g.$inject=["$scope"],angular.module("cesium.help.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.help_tour",{url:"/tour",views:{menuContent:{templateUrl:"templates/home/home.html",controller:"HelpTourCtrl"}}}).state("app.help",{url:"/help?anchor",views:{menuContent:{templateUrl:"templates/help/view_help.html",controller:"HelpCtrl"}}}).state("app.help_anchor",{url:"/help/:anchor",views:{menuContent:{templateUrl:"templates/help/view_help.html",controller:"HelpCtrl"}}})}]).controller("HelpCtrl",m).controller("HelpModalCtrl",E).controller("HelpTipCtrl",b).controller("HelpTourCtrl",g),f.$inject=["$scope","$rootScope","$q","$ionicPopup","$timeout","$state","$translate","$ionicPopover","$location","UIUtils","ModalUtils","Modals","csPopovers","BMA","csConfig","csSettings","csWallet","csHelp"],T.$inject=["$scope","$ionicPopover","$state","$timeout","$location","UIUtils","Modals","csPopovers","BMA","csHttp","csSettings","csCurrency","csWallet","csTx"],h.$inject=["$scope","UIUtils","csSettings","csWallet"],v.$inject=["$scope","UIUtils","csWallet","$translate","parameters"],angular.module("cesium.wallet.controllers",["cesium.services","cesium.currency.controllers"]).config(["$stateProvider",function(e){e.state("app.view_wallet",{url:"/account?refresh",views:{menuContent:{templateUrl:"templates/wallet/view_wallet.html",controller:"WalletCtrl"}},data:{login:!0,silentLocationChange:!0}}).state("app.view_wallet_tx",{url:"/history/account?refresh",views:{menuContent:{templateUrl:"templates/wallet/view_wallet_tx.html",controller:"WalletTxCtrl"}},data:{login:!0,silentLocationChange:!0}}).state("app.view_wallet_tx_errors",{url:"/history/account/errors",views:{menuContent:{templateUrl:"templates/wallet/view_wallet_tx_error.html",controller:"WalletTxErrorCtrl"}},data:{login:!0}})}]).controller("WalletCtrl",f).controller("WalletTxCtrl",T).controller("WalletTxErrorCtrl",h).controller("WalletSecurityModalCtrl",v),I.$inject=["$scope","$q","$timeout","UIUtils","filterTranslations","csSettings","csCurrency","csWallet"],N.$inject=["$scope","$controller","$state","$timeout","$q","$translate","$ionicPopover","$ionicPopup","ModalUtils","UIUtils","Modals","csCurrency","csSettings","csWallet"],O.$inject=["$scope","$controller","parameters"],A.$inject=["$scope","$timeout","BMA","csWallet"],R.$inject=["$scope","$controller","UIUtils","parameters"],angular.module("cesium.wallets.controllers",["cesium.services","cesium.currency.controllers"]).config(["$stateProvider",function(e){e.state("app.view_wallets",{url:"/wallets",views:{menuContent:{templateUrl:"templates/wallet/list/view_wallets.html",controller:"WalletListViewCtrl"}},data:{login:!0}}).state("app.view_wallet_by_id",{url:"/wallets/:id?refresh",views:{menuContent:{templateUrl:"templates/wallet/view_wallet.html",controller:"WalletCtrl"}},data:{login:!0,silentLocationChange:!0}}).state("app.view_wallet_tx_by_id",{url:"/history/wallets/:id?refresh",views:{menuContent:{templateUrl:"templates/wallet/view_wallet_tx.html",controller:"WalletTxCtrl"}},data:{login:!0,silentLocationChange:!0}}).state("app.view_wallet_tx_errors_by_id",{url:"/history/wallets/:id/errors",views:{menuContent:{templateUrl:"templates/wallet/view_wallet_tx_error.html",controller:"WalletTxErrorCtrl"}},data:{login:!0}})}]).controller("WalletListAbstractCtrl",I).controller("WalletListViewCtrl",N).controller("WalletSelectModalCtrl",O).controller("WalletListImportModalCtrl",A).controller("WalletSelectPopoverCtrl",R),S.$inject=["$scope","$state","$q","$timeout","$focus","$location","$ionicPopover","$ionicHistory","UIUtils","csConfig","csCurrency","csSettings","Device","BMA","csWallet","csWot"],C.$inject=["$scope","$controller","$focus","csWallet","parameters"],D.$inject=["$scope","$rootScope","$state","$translate","$ionicHistory","$q","UIUtils","Modals","csConfig","csSettings","csCurrency","csWot","csWallet"],y.$inject=["$scope","$rootScope","$controller","$timeout","$state","UIUtils","Modals","csWallet"],P.$inject=["$scope","$timeout","$q","BMA","csSettings","csWot","csTx","UIUtils"],k.$inject=["$scope","$rootScope","$controller","csSettings","csWallet","UIUtils"],M.$inject=["$scope","$q","csWot","parameters"],angular.module("cesium.wot.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.wot_lookup",{url:"/wot",abstract:!0,enableBack:!1,views:{menuContent:{templateUrl:"templates/wot/lookup.html"}}}).state("app.wot_lookup.tab_search",{url:"/search?q&type&hash",views:{tab:{templateUrl:"templates/wot/tabs/tab_lookup.html",controller:"WotLookupCtrl"}},data:{silentLocationChange:!0,large:"app.wot_lookup_lg"}}).state("app.wot_lookup_lg",{url:"/wot/lg?q&type&hash",views:{menuContent:{templateUrl:"templates/wot/lookup_lg.html",controller:"WotLookupCtrl"}},data:{silentLocationChange:!0}}).state("app.wot_identity",{url:"/wot/:pubkey/:uid?action&block",views:{menuContent:{templateUrl:"templates/wot/view_identity.html",controller:"WotIdentityViewCtrl"}}}).state("app.wot_identity_uid",{url:"/lookup/:uid?action",views:{menuContent:{templateUrl:"templates/wot/view_identity.html",controller:"WotIdentityViewCtrl"}}}).state("app.wot_identity_tx_uid",{url:"/wot/tx/:pubkey/:uid?action",views:{menuContent:{templateUrl:"templates/wot/view_identity_tx.html",controller:"WotIdentityTxViewCtrl"}}}).state("app.wot_cert",{url:"/wot/:pubkey/:uid/:type?block",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}},data:{large:"app.wot_cert_lg"}}).state("app.wot_cert_lg",{url:"/wot/cert/lg/:pubkey/:uid?block",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}}}).state("app.wallet_cert",{url:"/account/cert/:type",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}},data:{large:"app.wallet_cert_lg"}}).state("app.wallet_cert_lg",{url:"/account/cert/lg",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}}}).state("app.wallet_cert_by_id",{url:"/wallets/:id/cert/:type",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}},data:{large:"app.wallet_cert_lg_by_id"}}).state("app.wallet_cert_lg_by_id",{url:"/wallets/:id/cert/lg",views:{menuContent:{templateUrl:"templates/wot/view_certifications.html",controller:"WotCertificationsViewCtrl"}}})}]).controller("WotLookupCtrl",S).controller("WotLookupModalCtrl",C).controller("WotIdentityAbstractCtrl",D).controller("WotIdentityViewCtrl",y).controller("WotIdentityTxViewCtrl",P).controller("WotCertificationsViewCtrl",k).controller("WotSelectPubkeyIdentityModalCtrl",M),w.$inject=["$scope","$state","$location","$ionicPopover","$window","$translate","BMA","UIUtils","csConfig","csSettings","csCurrency","csNetwork","csWot"],F.$inject=["$scope","$q","$window","$state","UIUtils","csWot","BMA"],U.$inject=["$scope","$controller","parameters"],B.$inject=["$scope","$controller"],x.$inject=["$scope","$q","csSettings","csCurrency","csHttp","BMA"],angular.module("cesium.network.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.network",{url:"/network?type&expert",cache:!1,views:{menuContent:{templateUrl:"templates/network/view_network.html",controller:"NetworkLookupCtrl"}},data:{silentLocationChange:!0}}).state("app.view_peer",{url:"/network/peer/:server?ssl&tor",cache:!1,views:{menuContent:{templateUrl:"templates/network/view_peer.html",controller:"PeerViewCtrl"}},data:{preferHttp:!0}})}]).controller("NetworkLookupCtrl",w).controller("PeerViewCtrl",F).controller("NetworkLookupModalCtrl",U).controller("NetworkLookupPopoverCtrl",B).controller("PeerInfoPopoverCtrl",x),H.$inject=["$scope","$q","$timeout","$ionicPopover","Modals","BMA","UIUtils","csSettings","csCurrency","csNetwork","ModalUtils"],W.$inject=["$scope","$http","UIUtils","csSettings","FileSaver"],angular.module("cesium.currency.controllers",["ngFileSaver","cesium.services"]).config(["$stateProvider",function(e){e.state("app.currency",{url:"/currency",views:{menuContent:{templateUrl:"templates/currency/view_currency.html",controller:"CurrencyViewCtrl"}},data:{large:"app.currency_lg"}}).state("app.currency.tab_parameters",{url:"/parameters",views:{"tab-parameters":{templateUrl:"templates/currency/tabs/tab_parameters.html"}}}).state("app.currency.tab_wot",{url:"/community",views:{"tab-wot":{templateUrl:"templates/currency/tabs/tab_wot.html"}}}).state("app.currency.tab_network",{url:"/network",views:{"tab-network":{templateUrl:"templates/currency/tabs/tab_network.html",controller:"NetworkLookupCtrl"}}}).state("app.currency.tab_blocks",{url:"/blocks",views:{"tab-blocks":{templateUrl:"templates/currency/tabs/tab_blocks.html",controller:"BlockLookupCtrl"}}}).state("app.currency_lg",{url:"/currency/lg",cache:!1,views:{menuContent:{templateUrl:"templates/currency/view_currency_lg.html",controller:"CurrencyViewCtrl"}}})}]).controller("CurrencyViewCtrl",H).controller("CurrencyLicenseModalCtrl",W),V.$inject=["$scope","$controller","UIUtils"],G.$inject=["$scope","$q","$translate","$timeout","$filter","$focus","Device","BMA","UIUtils","Modals","csWallet","csWot","csCurrency","csSettings","parameters"],angular.module("cesium.transfer.controllers",["cesium.services","cesium.currency.controllers"]).config(["$stateProvider",function(e){e.state("app.new_transfer",{cache:!1,url:"/transfer?amount&udAmount&comment&restPub&all&wallet",views:{menuContent:{templateUrl:"templates/wallet/new_transfer.html",controller:"TransferCtrl"}}}).state("app.new_transfer_pubkey_uid",{cache:!1,url:"/transfer/:pubkey/:uid?amount&udAmount&comment&restPub&all&wallet",views:{menuContent:{templateUrl:"templates/wallet/new_transfer.html",controller:"TransferCtrl"}}}).state("app.new_transfer_pubkey",{cache:!1,url:"/transfer/:pubkey?amount&udAmount&comment&restPub&all&wallet",views:{menuContent:{templateUrl:"templates/wallet/new_transfer.html",controller:"TransferCtrl"}}})}]).controller("TransferCtrl",V).controller("TransferModalCtrl",G),Y.$inject=["$scope","$q","$window","$ionicHistory","$ionicPopup","$timeout","$translate","$ionicPopover","UIUtils","Modals","BMA","csHttp","csConfig","csCurrency","csSettings","csPlatform"],angular.module("cesium.settings.controllers",["cesium.services","cesium.currency.controllers"]).config(["$stateProvider",function(e){e.state("app.settings",{url:"/settings",views:{menuContent:{templateUrl:"templates/settings/settings.html",controller:"SettingsCtrl"}}})}]).controller("SettingsCtrl",Y),j.$inject=["$scope","$timeout","$focus","$filter","$state","$anchorScroll","UIUtils","BMA","csCurrency","csWot","csSettings"],K.$inject=["$scope","$ionicPopover","$state","UIUtils","BMA","csCurrency","csWot"],angular.module("cesium.blockchain.controllers",["cesium.services"]).config(["$stateProvider",function(e){e.state("app.blockchain",{url:"/blockchain",views:{menuContent:{templateUrl:"templates/blockchain/lookup.html",controller:"BlockLookupCtrl"}},data:{large:"app.blockchain_lg"}}).state("app.blockchain_lg",{url:"/blockchain/lg",views:{menuContent:{templateUrl:"templates/blockchain/lookup_lg.html",controller:"BlockLookupCtrl"}}}).state("app.server_blockchain",{url:"/network/peer/:server/blockchain?ssl&tor",views:{menuContent:{templateUrl:"templates/blockchain/lookup.html",controller:"BlockLookupCtrl"}},data:{large:"app.server_blockchain_lg"}}).state("app.server_blockchain_lg",{url:"/network/peer/:server/blockchain/lg?ssl&tor",views:{menuContent:{templateUrl:"templates/blockchain/lookup_lg.html",controller:"BlockLookupCtrl"}}}).state("app.view_block",{url:"/block/:number",views:{menuContent:{templateUrl:"templates/blockchain/view_block.html",controller:"BlockViewCtrl"}}}).state("app.view_block_hash",{url:"/block/:number/:hash",views:{menuContent:{templateUrl:"templates/blockchain/view_block.html",controller:"BlockViewCtrl"}}}).state("app.view_server_block_hash",{url:"/network/peer/:server/block/:number/:hash?ssl&tor",views:{menuContent:{templateUrl:"templates/blockchain/view_block.html",controller:"BlockViewCtrl"}}})}]).controller("BlockLookupCtrl",j).controller("BlockViewCtrl",K),angular.module("cesium.controllers",["cesium.app.controllers","cesium.join.controllers","cesium.login.controllers","cesium.help.controllers","cesium.wallet.controllers","cesium.wallets.controllers","cesium.currency.controllers","cesium.wot.controllers","cesium.transfer.controllers","cesium.settings.controllers","cesium.network.controllers","cesium.blockchain.controllers"]),angular.module("cesium.templates",[]).run(["$templateCache",function(e){e.put("templates/menu.html",'<ion-side-menus enable-menu-with-back-views="true" bind-notifier="{locale: $root.settings.locale.id, peer: $root.currency.node.url}"><ion-side-menu-content><ion-nav-bar class="bar-dark" title-align="left"><ion-nav-back-button class="no-text"></ion-nav-back-button><ion-nav-buttons side="left"><button class="button button-clear visible-nomenu" menu-toggle="left"><i class="icon ion-navicon"></i></button></ion-nav-buttons><ion-nav-buttons side="right"><cs-extension-point name="nav-buttons-right"></cs-extension-point></ion-nav-buttons></ion-nav-bar><ion-nav-view name="menuContent"></ion-nav-view></ion-side-menu-content><ion-side-menu id="menu" side="left" expose-aside-when="large" enable-menu-with-back-views="false" width="225"><ion-header-bar class="bar-title"><div class="visible-sm visible-xs hero"><div class="content"><i class="avatar avatar-member hero-icon" ng-if="!walletData.avatar" ng-class="{\'royal-bg\': login, \'stable-bg\': !login}" ng-click="!login ? showHome() : loginAndGo()" menu-close=""></i> <a class="avatar hero-icon" ng-if="walletData.avatar" style="background-image: url(\'{{walletData.avatar.src}}\')" ui-sref="app.view_wallet" menu-close=""></a><h4 ng-if="login"><a class="light" ui-sref="app.view_wallet" menu-close="">{{walletData.name||walletData.uid}} <span ng-if="!walletData.name && !walletData.uid"><i class="icon ion-key"></i>&nbsp;{{walletData.pubkey|formatPubkey}}</span></a></h4><h4 ng-if="!login"><a class="light" ui-sref="app.login" menu-close="">{{\'COMMON.BTN_LOGIN\'|translate}} <i class="ion-arrow-right-b"></i></a></h4><cs-extension-point name="menu-profile-user"></cs-extension-point></div></div></ion-header-bar><ion-content scroll="false" class="scroll-content ionic-scroll" ng-class="{\'overflow-scroll\': smallscreen, \'scroll-content-false\': !smallscreen}"><ion-list class="list" ng-class="{\'scroll\': smallscreen}"><ion-item menu-close="" class="item item-actions item-button-right visible-xs visible-sm" ng-if="login" ng-class="::{\'item-button-left\': $root.device.barcode.enable}"><button class="button button-positive ink-dark" ng-click="showTransferModal()"><i class="icon ion-paper-airplane"></i></button> <button class="button button-stable ink" ng-if="$root.device.barcode.enable" ng-click="scanQrCodeAndGo()"><i class="icon ion-qr-scanner"></i></button></ion-item><ion-item menu-close="" class="item-icon-left hidden-xs" ui-sref="app.home" active-link="active"><i class="icon ion-home"></i> {{:locale:\'MENU.HOME\'|translate}}</ion-item><ion-item menu-close="" class="item-icon-left visible-xs" ui-sref="app.home" active-link="active"><i class="icon ion-home"></i> {{:locale:\'MENU.HOME\'|translate}}</ion-item><div class="item item-divider"></div><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/account" ui-sref="app.view_wallet" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-person"></i> {{:locale:\'MENU.ACCOUNT\'|translate}} </a><a id="helptip-menu-btn-account"></a> <a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/history" ui-sref="app.view_wallet_tx" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-clock" style="top: calc(100%/4); left: 25px; font-size: 10pt; display: block"></i> <b class="icon-secondary ion-card" style="top: calc(100%/2.5); left: 19px; font-size: 17pt; background-color: whitesmoke; width:17px; height: 14px"></b> {{:locale:\'MENU.TRANSACTIONS\'|translate}} </a><a id="helptip-menu-btn-tx"></a> <a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/wallets" ui-sref="app.view_wallets" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-card" style="top: calc(100%/5); left: 22px; font-size: 16pt; display: block"></i> <i class="icon-secondary ion-card" style="top: 20px; left: 19px; font-size: 16pt; background-color: whitesmoke; width:17px; height: 14px"></i> {{:locale:\'MENU.WALLETS\'|translate}} </a><a id="helptip-menu-btn-wallets"></a><div class="item item-divider visible-xs visible-sm"></div><cs-extension-point name="menu-user"></cs-extension-point><div class="item-spacer"></div><div class="item item-divider"></div><a menu-close="" class="item item-icon-left" id="helptip-menu-btn-wot" active-link="active" active-link-path-prefix="#/app/wot" ui-sref="app.wot_lookup.tab_search"><i class="icon ion-person-stalker"></i> {{:locale:\'MENU.WOT\'|translate}}</a><cs-extension-point name="menu-main"></cs-extension-point><a menu-close="" class="item item-icon-left" id="helptip-menu-btn-currency" active-link="active" active-link-path-prefix="#/app/currency" ui-sref="app.currency"><i class="icon ion-ios-world-outline"></i> {{:locale:\'MENU.CURRENCY\'|translate}}</a><cs-extension-point name="menu-discover"></cs-extension-point><div class="item item-divider visible-xs visible-sm"></div><a menu-close="" class="item item-icon-left visible-xs visible-sm" active-link="active" active-link-path-prefix="#/app/settings" ui-sref="app.settings"><i class="icon ion-android-settings"></i> {{:locale:\'MENU.SETTINGS\'|translate}} </a><a id="helptip-menu-btn-settings"></a><div class="item item-divider visible-xs visible-sm margin-top" ng-if="login"></div><a menu-close="" ng-if="login" class="item item-icon-left visible-xs visible-sm" ng-click="logout({askConfirm: true})"><i class="icon ion-log-out assertive"></i> <span class="assertive" translate="">{{:locale:\'COMMON.BTN_LOGOUT\'|translate}}</span></a></ion-list></ion-content></ion-side-menu></ion-side-menus>'),e.put("templates/modal_about.html",'<ion-modal-view class="about"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CLOSE</button><h1 class="title" translate>ABOUT.TITLE</h1></ion-header-bar><ion-content class="text-center" scroll="true"><div class="list item-wrap-text"><ion-item class="item-icon-left item-text-wrap"><span>{{\'COMMON.APP_NAME\'|translate}}&nbsp;<b>{{\'COMMON.APP_VERSION\'|translate:$root.config}}</b> - <a ng-click="openLink($event, \'http://cesium.app\')">www.cesium.app</a></span> <i ng-if="$root.newRelease" class="assertive ion-alert-circled"></i><h3 ng-if="$root.config.build" class="gray">{{\'COMMON.APP_BUILD\'|translate:$root.config}}</h3><span translate>ABOUT.LICENSE</span></ion-item><ion-item class="item-icon-left" ng-if="$root.newRelease"><i class="item-image icon ion-alert-circled assertive"></i> <span ng-if="!$root.device.isWeb()" ng-bind-html="\'ABOUT.PLEASE_UPDATE\' | translate:$root.newRelease "></span> <span ng-if="$root.device.isWeb()" ng-bind-html="\'ABOUT.LATEST_RELEASE\' | translate:$root.newRelease "></span><h3 ng-if="!$root.device.enable"><a ng-click="openLink($event, $root.newRelease.url)" translate>{{::$root.newRelease.url}}</a></h3></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="item-image icon ion-android-laptop"></i> <span translate>ABOUT.OFFICIAL_WEB_SITE</span><h3><a ng-click="openLink($event, \'https://www.cesium.app\')">https://www.cesium.app</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-chatbubbles"></i> {{\'ABOUT.FORUM\' | translate}}<h3><a ng-click="openLink($event, $root.settings.userForumUrl)">{{::$root.settings.userForumUrl}}</a></h3></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="item-image icon ion-bug"></i> <span translate>ABOUT.PLEASE_REPORT_ISSUE</span><h3><a ng-click="openLink($event, $root.settings.newIssueUrl)" translate>ABOUT.REPORT_ISSUE</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-network"></i> {{\'ABOUT.CODE\' | translate}}<h3><a ng-click="openLink($event, \'https://git.duniter.org/clients/cesium-grp/cesium\')">https://git.duniter.org/clients/cesium-grp/cesium</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-person-stalker"></i> {{\'ABOUT.DEVELOPERS\' | translate}}<h3><a href="https://github.com/blavenie" target="_system">Benoit Lavenier</a>, <a href="https://github.com/bpresles" target="_system">bpresles</a>, <a href="https://github.com/c-geek" target="_system">cgeek</a>, <a href="https://github.com/devingfx" target="_system">DiG</a>, <a href="https://git.duniter.org/ji_emme" target="_system">Ji_emme</a></h3></ion-item><div class="padding hidden-xs text-center"><button class="button button-stable icon-left ink" type="submit" ng-click="closeModal()" ui-sref="app.help"><i class="icon ion-ios-help-outline"></i> {{\'HOME.BTN_HELP\' | translate}}</button> <button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></div></ion-content></ion-modal-view>'),
-e.put("templates/api/doc.html",'<h2 class="padding" translate="">API.DOC.TRANSFER.TITLE</h2><div class="list padding no-padding-xs no-padding-top"><div class="item item-divider no-border"><p translate="">API.DOC.DESCRIPTION_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.TRANSFER.DESCRIPTION</p></div><div class="item item-divider no-border"><p translate="">API.DOC.URL_DIVIDER</p></div><div class="item item-text-wrap"><p class="gray text-right">{{$root.rootPath}}#/v1/payment/:pubkey?amount=<span class="text-italic" translate="">API.DOC.TRANSFER.PARAM_AMOUNT</span></p></div><div class="item item-divider no-border"><p translate="">API.DOC.PARAMETERS_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.AVAILABLE_PARAMETERS</p><div class="row"><div class="col col-20 text-italic">pubkey</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_PUBKEY_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">amount</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_AMOUNT_HELP</div></div><div class="row"><div class="col col-20 text-italic">comment</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_COMMENT_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">name</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_NAME_HELP</div></div><div class="row"><div class="col col-20 text-italic">preferred_node</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_PREFERRED_NODE_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">redirect_url</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_REDIRECT_URL_HELP</div></div><div class="row"><div class="col col-20 text-italic">cancel_url</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_CANCEL_URL_HELP</div></div></div><div class="item item-divider no-border"><p translate="">API.DOC.DEMO_DIVIDER</p></div><div class="item item-button-right item-text-wrap padding-bottom"><p class="item-icon-right-padding" translate="">API.DOC.DEMO_HELP</p><span class="badge" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></span><a ng-if="!loading" href="{{transferDemoUrl}}" class="button button-raised button-positive icon ion-play"></a></div><div class="item item-text-wrap" ng-if="result.type === \'payment\' && !result.cancelled"><h2 class="text-right balanced" translate="">API.DOC.DEMO_SUCCEED</h2><h4 class="gray" translate="">API.DOC.DEMO_RESULT</h4><p class="balanced-100-bg padding dark text-keep-lines">{{result.content}}</p><h4 class="gray"><span translate="">API.DOC.DEMO_RESULT_PEER</span> <b>{{result.node}}</b></h4></div><div class="item item-text-wrap" ng-if="result.type === \'payment\' && result.cancelled"><h2 class="text-right assertive" translate="">API.DOC.DEMO_CANCELLED</h2></div><div class="item item-divider no-border"><p translate="">API.DOC.INTEGRATE_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.TRANSFER.EXAMPLES_HELP</p><div class="row responsive-sm"><div class="col col-20 text-italic"><span translate="">API.DOC.TRANSFER.EXAMPLE_BUTTON</span></div><div class="col gray no-border"><p><i class="icon ion-code"></i> <span translate="">API.DOC.INTEGRATE_CODE</span></p><div class="item item-input"><textarea class="gray" select-on-click="" rows="5" ng-model="transferButton.html" ng-model-options="{ debounce: 650 }"></textarea></div><p class="padding-top"><i class="icon ion-eye"></i> <span translate="">API.DOC.INTEGRATE_RESULT</span></p><div class="padding-left" bind-notifier="{ notifierKey:watchedExpression }"><ng-bind-html ng-bind-html="transferButton.html|trustAsHtml"></ng-bind-html></div></div></div><div class="row responsive-sm"><div class="col gray no-border"><p class="padding-top"><a class="positive" ng-click="transferButton.showParameters=!transferButton.showParameters"><i class="icon ion-wrench"></i> <span translate="">API.DOC.INTEGRATE_PARAMETERS</span> <i class="icon" ng-class="{\'ion-arrow-down-b\': !transferButton.showParameters, \'ion-arrow-up-b\': transferButton.showParameters}"></i></a></p><div ng-if="transferButton.showParameters" class="padding-left"><form id="transferForm" class="stable-bg padding"><p class="padding-top"><i class="icon ion-key"></i> {{\'API.DOC.TRANSFER.PARAM_PUBKEY\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.pubkey" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_PUBKEY_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-pricetag"></i> {{\'API.DOC.TRANSFER.PARAM_AMOUNT\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.amount" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_AMOUNT_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-flag"></i> {{\'API.DOC.TRANSFER.PARAM_COMMENT\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.comment" placeholder="{{\'API.DOC.TRANSFER.PARAM_COMMENT\'|translate}}"></label><p class="padding-top"><i class="icon ion-ios-world-outline"></i> {{\'API.DOC.TRANSFER.PARAM_NAME\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.name" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_NAME\'|translate}}"></label><p class="padding-top"><i class="icon ion-key"></i> {{\'API.DOC.TRANSFER.PARAM_PREFERRED_NODE\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.preferred_node" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_PREFERRED_NODE_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-arrow-return-left"></i> {{\'API.DOC.TRANSFER.PARAM_REDIRECT_URL\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.redirect_url" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_REDIRECT_URL\'|translate}}"></label><p class="padding-top"><i class="icon ion-backspace"></i> {{\'API.DOC.TRANSFER.PARAM_CANCEL_URL\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.cancel_url" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_CANCEL_URL\'|translate}}"></label><p class="padding-top"><a class="positive" ng-click="transferButton.style.enable=!transferButton.style.enable"><i class="icon" ng-class="{\'ion-android-checkbox-outline\': transferButton.style.enable, \'ion-android-checkbox-outline-blank\': !transferButton.style.enable}"></i> <span translate="">API.DOC.TRANSFER.EXAMPLE_BUTTON_DEFAULT_STYLE</span></a></p><div ng-if="transferButton.style.enable"><p class="padding-top"><i class="icon ion-image"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_ICON\' | translate}} :</p><label class="item item-input item-select"><select class="stable-bg dark" ng-model="transferButton.style.icon" style="width: 100%; max-width: 100%" ng-options="l as (l.label | translate) for l in transferButton.icons track by l.filename"></select></label><p class="padding-top"><i class="icon ion-quote"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_HELP\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.text" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-paintbucket"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_BG_COLOR\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.bgColor" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_BG_COLOR_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-paintbrush"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_FONT_COLOR\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.fontColor" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_FONT_COLOR_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-ios-crop-strong"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_WIDTH\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.width" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_WIDTH_HELP\'|translate}}"></label></div></form></div></div></div></div></div>'),e.put("templates/api/home.html",'<ion-view class="circle-bg-dark"><ion-nav-title><span class="title visible-xs visible-sm" translate="">API.HOME.TITLE</span></ion-nav-title><ion-nav-buttons side="right"></ion-nav-buttons><ion-content class="no-padding-xs no-padding-sm positive-900-bg"><br class="hidden-xs"><div class="light text-center"><h4 class="hidden-xs" translate="">API.HOME.MESSAGE</h4><h4 class="visible-xs padding" translate="">API.HOME.MESSAGE_SHORT</h4></div><br class="hidden-xs"><div class="row no-padding-xs"><div class="col"><div class="light-bg no-padding"><ng-include src="::\'templates/api/doc.html\'"></ng-include></div></div></div><p class="visible-xs visible-sm light padding-top text-center">{{\'COMMON.APP_NAME\'|translate}} API - <a href="#" ng-click="showAboutModal($event)">v{{$root.config.version}}</a></p></ion-content></ion-view>'),e.put("templates/api/menu.html",'<ion-nav-bar class="bar-dark" title-align="left"><ion-nav-back-button class="no-text"></ion-nav-back-button><ion-nav-buttons side="left"></ion-nav-buttons><ion-nav-buttons side="right"></ion-nav-buttons></ion-nav-bar><ion-nav-view name="menuContent"></ion-nav-view>'),e.put("templates/api/popover_locales.html",'<ion-popover-view class="fit popover-locales" style="height: {{locales.length*48}}px"><ion-content scroll="false"><div class="list item-text-wrap block"><a ng-repeat="l in locales track by l.id" class="item item-icon-left ink" ng-click="changeLanguage(l.id)"><i class="item-image avatar" style="background-image: url(../img/flag-{{l.flag}}.png)"></i> {{l.label | translate}}</a></div></ion-content></ion-popover-view>'),e.put("templates/api/transfer.html",'<ion-view class="circle-bg-dark"><ion-nav-buttons side="left"><button class="button button-clear visible-xs" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button></ion-nav-buttons><ion-nav-title><span class="title visible-xs" translate="">API.TRANSFER.TITLE_SHORT</span></ion-nav-title><ion-nav-buttons side="right"><button class="button button-positive button-icon button-clear icon ion-android-send visible-xs" ng-click="doLogin()"></button></ion-nav-buttons><ion-content class="no-padding-xs positive-900-bg"><br class="hidden-xs"><div class="row no-padding-xs"><div class="col no-padding-xs"><div class="light-bg"><h2 class="padding-top text-center hidden-xs" translate="">API.TRANSFER.TITLE</h2><div class="no-padding energized-100-bg" ng-if="demo"><div class="item item-icon-left item-text-wrap no-border"><i class="icon ion-information-circled positive"></i><p translate="">API.TRANSFER.DEMO.HELP</p></div></div><ng-include src="::\'templates/login/form_login.html\'"></ng-include></div><br class="hidden-xs"><br class="hidden-xs"><div class="list padding no-padding-xs light-bg"><div class="item"><p translate="">API.TRANSFER.SUMMARY</p></div><div class="item item-icon-left-padding item-tx no-border" ng-if="!transferData.amounts" style="min-height: 56px"><h2 translate="">API.TRANSFER.AMOUNT</h2><ion-spinner class="badge item-note" icon="android" ng-show="loading"></ion-spinner><div class="badge badge-calm ng-hide" ng-show="!loading" ng-bind-html="transferData.amount|formatAmount:{useRelative: false, currency: currency.name}"></div><div class="badge badge-secondary ng-hide" ng-show="!loading" ng-bind-html="transferData.amount|formatAmount:{useRelative: true, currency: currency.name, currentUD: currency.currentUD}"></div></div><label ng-if="transferData.amounts" style="min-height: 58px" class="item item-icon-left-padding item-input item-select item-tx no-border" ng-class="{ \'item-input-error\': form.$submitted && !transferData.amount}"><div class="input-label"><span translate="">API.TRANSFER.AMOUNT</span></div><select ng-model="transferData.amount" required="true" ng-options="(amount |formatAmount:{useRelative: false, currency: currency.name}) for amount in transferData.amounts"></select><span class="badge badge-secondary ng-hide" ng-show="transferData.amount" ng-bind-html="transferData.amount|formatAmount:{useRelative: true, currency: currency.name, currentUD: currency.currentUD}"></span></label><div class="form-errors" ng-if="form.$submitted && !transferData.amount"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-icon-left-padding"><h2 translate="">API.TRANSFER.NAME</h2><div class="badge item-note">{{transferData.name}}</div></div><div class="item item-icon-left-padding item-text-wrap"><h2 translate="">API.TRANSFER.PUBKEY</h2><div class="badge"><span class="hidden-xs"><br class="visible-sm visible-md"><i class="icon ion-key"></i>{{transferData.pubkey}}</span> <span class="visible-xs" copy-on-click="{{transferData.pubkey}}"><br class="visible-xs"><i class="icon ion-key"></i> {{transferData.pubkey|formatPubkey}}</span></div></div><div class="item item-icon-left-padding"><h2 translate="">API.TRANSFER.COMMENT</h2><div class="badge item-note"><span class="hidden-xs"><br class="visible-sm visible-md">{{::transferData.comment}}</span> <span class="visible-xs" copy-on-click="{{transferData.comment}}"><br>{{::transferData.comment}}</span></div></div><div class="item item-icon-left-padding" ng-hide="error"><h2 translate="">API.TRANSFER.NODE</h2><div class="badge item-note" ng-if="!loading"><br class="visible-sm visible-md"><i class="icon ion-locked" ng-if="node.useSsl"></i>&nbsp;{{node.server}}</div></div><div class="center padding animate-fade-in animate-show-hide ng-hide" ng-show="!loading && error"><div class="card card-item padding"><p class="item-content item-text-wrap"><i class="icon ion-android-alert assertive"></i> <span class="dark" trust-as-html="\'API.COMMON.CONNECTION_ERROR\'|translate:node"></span></p><button type="button" class="button button-positive icon icon-left ion-refresh ink" ng-click="start()">{{\'COMMON.BTN_REFRESH\'|translate}}</button></div></div><div class="padding-bottom visible-xs">&nbsp;</div></div></div></div><p class="visible-xs visible-sm light padding-top text-center">{{\'COMMON.APP_NAME\'|translate}} - <a href="#" ng-click="showAboutModal($event)">v{{$root.config.version}}</a></p></ion-content></ion-view>'),e.put("templates/blockchain/item_block.html",'<a name="block-{{::block.number}}"></a><ion-item id="block-{{::block.number}}" class="item item-icon-left item-block {{::ionItemClass}}" ng-class=":rebind:{\'ink\': !block.empty||!block.compacted, \'item-block-empty\': block.empty, \'compacted\': block.compacted && compactMode}" ng-click="selectBlock(block)"><i class="icon ion-cube stable" ng-if="(!block.empty && !block.avatar)"></i> <i class="avatar" ng-if="!block.empty && block.avatar" style="background-image: url(\'{{block.avatar.src}}\')"></i><div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"><div class="col" style="min-width: 110px; max-width: 130px"><h4 ng-class=":rebind:{\'gray\': block.compacted, \'dark\': !block.compacted}"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h4><h4 ng-if=":rebind:!block.empty"><ng-if ng-if=":rebind:block.joinersCount||(block.excludedCount-block.revokedCount)"><i class="dark ion-person"></i> <span class="dark" ng-if=":rebind:block.joinersCount">+{{:rebind:block.joinersCount}}</span> <span class="dark" ng-if=":rebind:block.excludedCount">-{{:rebind:block.excludedCount-block.revokedCount}}</span></ng-if><span class="dark" ng-if=":rebind:block.revokedCount" class="assertive"><i class="ion-minus-circled"></i> {{:rebind:block.revokedCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.activesCount" class="gray"><i class="gray ion-refresh"></i> {{:rebind:block.activesCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.certificationsCount"><i class="ion-ribbon-a"></i> {{:rebind:block.certificationsCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.dividend" class="gray"><i class="gray ion-arrow-up-c"></i> {{\'COMMON.UD\'|translate}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.transactionsCount"><i class="ion-card">{{:rebind:block.transactionsCount}}</i></span></h4></div><div class="col positive hidden-md"><h4><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</h4></div><div class="col col-20"><span class="badge" ng-class=":rebind:{\'badge-balanced\': !$index , \'badge-calm\': $index && !block.compacted && !block.empty}">{{::block.number|formatInteger}}</span></div></div></ion-item>'),e.put("templates/blockchain/item_block_empty_lg.html",'<a name="block-{{::block.number}}"></a><div id="block-{{::block.number}}" class="item item-block item-icon-left item-block-empty" ng-class=":rebind:{\'compacted\': block.compacted && compactMode}" ng-click="selectBlock(block)"><div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"><div class="col"><h3 class="gray"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h3></div><div class="col"><h3><span class="gray" ng-if=":rebind:expertMode"><i class="ion-key"></i> {{:rebind:block.issuer|formatPubkey}} </span><span class="positive"><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</span></h3></div><div class="col col-20"></div><div class="col col-20"><span class="badge" ng-class="{\'badge-balanced\': !$index && search.type==\'last\'}">{{block.number|formatInteger}}</span></div></div></div>'),e.put("templates/blockchain/item_block_lg.html",'<ion-item id="block-{{::block.number}}" class="item item-block item-icon-left ink {{::ionItemClass}}" ng-class="{{::ionItemClass}}" ng-click="selectBlock(block)"><i class="icon ion-cube stable" ng-if=":rebind:!block.avatar"></i> <i class="avatar" ng-if=":rebind:!block.empty && block.avatar" style="background-image: url(\'{{:rebind:block.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h3 class="dark"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h3><h4 class="gray">{{:rebind:\'BLOCKCHAIN.HASH\'|translate}} {{:rebind:block.hash|formatHash}}</h4></div><div class="col"><h3><span class="gray" ng-if=":rebind:expertMode"><i class="ion-key"></i> {{:rebind:block.issuer|formatPubkey}} </span><span class="positive"><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</span></h3></div><div class="col col-20"><small><ng-if ng-if=":rebind:block.joinersCount||(block.excludedCount-block.revokedCount)"><i class="ion-person"></i> <span ng-if=":rebind:block.joinersCount">+{{:rebind:block.joinersCount}}</span> <span ng-if=":rebind:block.excludedCount">-{{:rebind:block.excludedCount-block.revokedCount}}</span> &nbsp;&nbsp;</ng-if><span ng-if=":rebind:block.revokedCount" class="assertive"><i class="ion-minus-circled"></i> -{{:rebind:block.revokedCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.activesCount"><i class="ion-refresh"></i> {{:rebind:block.activesCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.certificationsCount"><i class="ion-ribbon-a"></i> {{:rebind:block.certificationsCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.dividend"><i class="gray ion-arrow-up-c"></i> {{:rebind:\'COMMON.UD\'|translate}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.transactionsCount"><i class="ion-card">{{:rebind:block.transactionsCount}}</i>&nbsp;&nbsp;</span></small></div><div class="col col-20"><span class="badge" ng-class="{\'badge-balanced\': !$index && search.type==\'last\', \'badge-calm\': ($index  || search.type!=\'last\')&& !block.compacted && !block.empty}">{{:rebind:block.number}}</span></div></div></ion-item>'),e.put("templates/blockchain/items_blocks.html",'<div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="animate-ripple padding padding-xs"><div class="padding gray" ng-if="!search.loading && !search.results.length" translate>BLOCKCHAIN.LOOKUP.NO_BLOCK</div><ng-repeat ng-repeat="block in search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" icon="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("templates/blockchain/link_identity.html",'<a ui-sref="app.wot_identity({pubkey: identity.pubkey, uid: identity.uid})"><span class="positive" ng-if="identity.uid"><i class="icon ion-person"></i> {{::identity.uid}}&nbsp;</span> <span class="gray" ng-class="{\'hidden-xs hidden-sm\': identity.uid}"><i class="icon ion-key"></i>&nbsp;{{::identity.pubkey|formatPubkey}}</span></a>'),e.put("templates/blockchain/list_blocks.html",'<div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="padding padding-xs list-blocks {{::motion.ionListClass}}"><div class="padding gray" ng-if="!search.loading && !search.results.length" translate>BLOCKCHAIN.LOOKUP.NO_BLOCK</div><ng-repeat ng-repeat="block in search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("templates/blockchain/list_blocks_lg.html",'<div class="padding padding-xs" style="display: block; height: 100px"><h4 translate>BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4><div class="pull-right"><a class="button button-text button-small ink" ng-class="{\'button-text-positive\': compactMode, \'button-text-stable\': !compactMode}" ng-click="toggleCompactMode()"><i class="icon ion-navicon"></i> <b class="ion-arrow-down-b" style="position: absolute; top: -2px; left: 4px; font-size: 8px"></b> <b class="ion-arrow-up-b" style="position: absolute; top: 10px; left: 4px; font-size: 8px"></b> <span>{{:locale:\'BLOCKCHAIN.LOOKUP.BTN_COMPACT\'|translate}}</span></a></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="padding padding-xs list-blocks {{::motion.ionListClass}}"><div class="padding gray" ng-if="!search.loading && !search.results.length">{{:locale:\'BLOCKCHAIN.LOOKUP.NO_BLOCK\'|translate}}</div><ng-repeat ng-repeat="block in search.results track by block.id" ng-include="!block.empty ? \'templates/blockchain/item_block_lg.html\' : \'templates/blockchain/item_block_empty_lg.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("templates/blockchain/lookup.html",'<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-content class="padding no-padding-xs" scroll="true"><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/blockchain/lookup_lg.html",'<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'templates/blockchain/list_blocks_lg.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/blockchain/unlock_condition_popover.html",'<ion-popover-view class="fit"><ion-header-bar><h1 class="title" translate>BLOCKCHAIN.VIEW.TX_OUTPUT_UNLOCK_CONDITIONS</h1></ion-header-bar><ion-content scroll="true"><div class="row" ng-repeat="condition in popoverData.unlockConditions track by $index" ng-style="::condition.style"><span class="gray" ng-if="::condition.operator">{{::\'BLOCKCHAIN.VIEW.TX_OUTPUT_OPERATOR.\'+condition.operator|translate}}&nbsp;</span><div ng-if="::condition.type==\'SIG\'"><i class="icon ion-key dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.SIG\' | translate"></span> <a ng-click="goState(\'app.wot_identity\', {pubkey:condition.value})" style="text-decoration: none" class="positive">{{condition.value|formatPubkey}}</a></div><div ng-if="::condition.type==\'XHX\'"><i class="icon ion-lock-combination dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.XHX\' | translate"></span> <a copy-on-click="{{::condition.value}}" class="positive">{{::condition.value|formatPubkey}}...</a></div><div ng-if="condition.type==\'CSV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CSV\' | translate"></span> {{::condition.value|formatDuration}}</div><div ng-if="condition.type==\'CLTV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CLTV\' | translate"></span> {{::condition.value|medianDate}}</div></div></ion-content></ion-popover-view>'),e.put("templates/blockchain/view_block.html",'<ion-view><ion-nav-title><span class="title visible-xs visible-sm" ng-if="number==\'current\'">{{\'BLOCKCHAIN.VIEW.TITLE_CURRENT\'|translate}}</span> <span class="title visible-xs visible-sm" ng-if="number!=\'current\'">{{\'BLOCKCHAIN.VIEW.TITLE\'|translate:formData}}</span></ion-nav-title><ion-content class="no-padding-xs no-padding-sm" scroll="true"><div class="row no-padding"><div class="col no-padding"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list item-text-wrap no-padding-xs" ng-if="!loading"><div class="item item-text-wrap"><h3><span class="dark"><i class="icon ion-clock"></i> {{formData.medianTime | medianFromNowAndDate}}</span></h3><h3><span class="dark"><i class="icon ion-lock-combination"></i> {{\'BLOCKCHAIN.VIEW.COMPUTED_BY\'|translate}} </span><a class="positive" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.uid})"><i class="icon ion-person positive"></i> {{issuer.name||issuer.uid}} <span class="gray" ng-if="issuer.name">({{issuer.uid}})</span></a></h3><h3><a ng-click="openRawBlock($event)"><i class="icon ion-share"></i> {{\'BLOCKCHAIN.VIEW.SHOW_RAW\'|translate}}</a></h3></div><span class="item item-divider">{{\'BLOCKCHAIN.VIEW.TECHNICAL_DIVIDER\' | translate}}</span><ion-item class="item-icon-left item-text-wrap" ng-if="!compactMode || $root.settings.expertMode"><i class="icon ion-gear-b"></i> {{\'BLOCKCHAIN.VIEW.VERSION\'|translate}} <span class="badge badge-stable">{{::formData.version}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="!compactMode || $root.settings.expertMode" copy-on-click="{{::formData.powMin}}"><i class="icon ion-lock-combination"></i> {{\'BLOCKCHAIN.VIEW.POW_MIN\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.POW_MIN_HELP\'|translate}}</h4><span class="badge badge-stable">{{::formData.powMin}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" copy-on-click="{{::formData.hash}}"><i class="icon ion-pound"></i> {{\'BLOCKCHAIN.VIEW.HASH\'|translate}}<h5 class="visible-xs visible-sm dark">{{::formData.hash}}</h5></ion-item><span class="item item-divider">{{\'BLOCKCHAIN.VIEW.DATA_DIVIDER\' | translate}}</span><ion-item ng-if="compactMode && formData.empty" class="item-icon-left item-text-wrap">{{\'BLOCKCHAIN.VIEW.EMPTY\'|translate}}</ion-item><ion-item ng-if="!compactMode || formData.dividend" class="item-icon-left item-text-wrap" copy-on-click="{{::formData.dividend/100}}"><i class="icon ion-arrow-up-c"></i><div class="col col-60">{{\'COMMON.UNIVERSAL_DIVIDEND\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.UNIVERSAL_DIVIDEND_HELP\'|translate: {membersCount: formData.membersCount} }}</h4></div><span class="badge badge-balanced" ng-if="formData.dividend">+1 <span ng-bind-html="formData.currency|currencySymbol: {useRelative: true} "></span> / {{\'COMMON.MEMBER\'|translate|lowercase}} </span><span class="badge badge-stable" ng-if="!formData.dividend">0</span> <span class="badge badge-secondary" ng-if="formData.dividend">+ {{formData.dividend| formatAmount: {currency: formData.currency, useRelative: false} }} / {{\'COMMON.MEMBER\'|translate|lowercase}}</span></ion-item><ng-if ng-if="!compactMode || formData.identitiesCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-clock" style="position: absolute; top: 16px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.IDENTITIES_COUNT\'|translate}} <span class="badge badge-balanced" ng-if="formData.identitiesCount">+{{::formData.identitiesCount}}</span> <span class="badge badge-stable" ng-if="!formData.identitiesCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.identitiesCount"><ion-item ng-repeat="identity in ::formData.identities" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.joinersCount"><ion-item class="item-icon-left"><i class="icon ion-person-add"></i> {{\'BLOCKCHAIN.VIEW.JOINERS_COUNT\'|translate}} <span class="badge badge-balanced" ng-if="formData.joinersCount">+{{::formData.joinersCount}}</span> <span class="badge badge-stable" ng-if="!formData.joinersCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.joinersCount"><ion-item ng-repeat="identity in ::formData.joiners" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.activesCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-refresh" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.ACTIVES_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.ACTIVES_COUNT_HELP\'|translate}}</h4><span class="badge badge-balanced" ng-if="formData.activesCount">{{::formData.activesCount}}</span> <span class="badge badge-stable" ng-if="!formData.activesCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.activesCount"><ion-item ng-repeat="identity in ::formData.actives" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || (formData.excludedCount-formData.revokedCount)"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-close dark" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.EXCLUDED_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.EXCLUDED_COUNT_HELP\'|translate}}</h4><span class="badge badge-assertive" ng-if="formData.excludedCount-formData.revokedCount">-{{::formData.excludedCount-formData.revokedCount}}</span> <span class="badge badge-stable" ng-if="!(formData.excludedCount-formData.revokedCount)">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.excludedCount"><ion-item ng-repeat="identity in ::formData.excluded" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.leaversCount"><ion-item class="item-icon-left" ng-if="!compactMode || formData.leaversCount"><i class="icon ion-person"></i> <b class="ion-minus" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.LEAVERS_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.LEAVERS_COUNT_HELP\'|translate}}</h4><span class="badge badge-assertive" ng-if="formData.leaversCount">-{{::formData.leaversCount}}</span> <span class="badge badge-stable" ng-if="!formData.leaversCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.leaversCount"><ion-item ng-repeat="identity in ::formData.leavers" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.revokedCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-minus-circled assertive" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.REVOKED_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.REVOKED_COUNT_HELP\'|translate}}</h4><span class="badge badge-balanced" ng-if="formData.revokedCount">-{{::formData.revokedCount}}</span> <span class="badge badge-stable" ng-if="!formData.revokedCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.revokedCount"><ion-item ng-repeat="identity in ::formData.revoked" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.certificationsCount"><ion-item class="item-icon-left"><i class="icon ion-ribbon-a"></i> {{\'BLOCKCHAIN.VIEW.CERT_COUNT\'|translate}} <span class="badge badge-stable" ng-class="{\'badge-positive\':formData.certificationsCount}">{{::formData.certificationsCount}}</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding no-padding-xs" ng-if="formData.certificationsCount"><div ng-repeat="(key, certs) in formData.certifications" class="item item-border-large item-small-height"><div class="row no-padding"><div class="col col-center no-padding"><ng-repeat ng-repeat="cert in certs"><ng-include src="::\'templates/blockchain/link_identity.html\'" onload="identity=cert.from"></ng-include><br></ng-repeat></div><div class="col col-10 col-center gray text-center no-padding"><h2><i class="icon ion-arrow-right-a"></i></h2></div><div class="col col-40 col-center no-padding" ng-include="::\'templates/blockchain/link_identity.html\'" onload="identity=certs[0].to"></div></div></div></div></ng-if><ng-if ng-if="!compactMode || formData.transactionsCount"><ion-item class="item-icon-left"><i class="icon ion-card"></i> {{\'BLOCKCHAIN.VIEW.TX_COUNT\'|translate}} <span class="badge badge-stable" ng-class="{\'badge-positive\':formData.transactionsCount}">{{::formData.transactionsCount}}</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding no-padding-xs" ng-if="formData.transactionsCount"><div ng-repeat="tx in ::formData.transactions" class="item item-small-height item-border-large"><div class="row no-padding" style="padding-top: 3px"><div class="col col-40 col-center no-padding list no-margin"><div ng-repeat="identity in ::tx.issuers" class="item no-padding item-small-height"><ng-include src="\'templates/blockchain/link_identity.html\'"></ng-include></div></div><div class="col col-10 col-center gray text-center no-padding"><h2><i class="icon ion-arrow-right-a"></i></h2></div><div class="col no-padding padding-right no-padding-xs col-text-wrap list no-margin"><span class="gray" ng-if="tx.toHimself" translate="">BLOCKCHAIN.VIEW.TX_TO_HIMSELF</span><div ng-repeat="output in ::tx.outputs" class="item no-padding item-small-height"><ng-include ng-if="::output.pubkey" src="\'templates/blockchain/link_identity.html\'" onload="identity=output"></ng-include><span ng-if="::!output.pubkey && output.unlockFunctions"><i class="icon ion-locked"></i> (<a ng-click="showUnlockConditionPopover(output, $event)"> <i ng-repeat="unlockFunction in ::output.unlockFunctions" ng-class="::{\'ion-key\': (unlockFunction==\'SIG\'), \'ion-clock\': (unlockFunction==\'CSV\' || unlockFunction==\'CLTV\'), \'ion-lock-combination\': (unlockFunction==\'XHX\') }" class="icon"></i> </a>) </span><span class="badge badge-balanced" ng-bind-html="::output.amount | formatAmount:{currency: formData.currency, useRelative: false} "></span></div></div></div></div></div></ng-if></div></div></div></ion-content></ion-view>'),e.put("templates/common/badge_certification_count.html",'<span ng-attr-id="{{$ctrl.csId}}" class="badge badge-balanced" ng-class="{\'badge-energized\': $ctrl.requirements.willNeedCertificationCount || ($ctrl.requirements.needCertificationCount + $ctrl.requirements.pendingCertificationCount >= $ctrl.parameters.sigQty),\n               \'badge-assertive\': ($ctrl.requirements.needCertificationCount + $ctrl.requirements.pendingCertificationCount < $ctrl.parameters.sigQty)}"><span ng-if="$ctrl.requirements.certificationCount || !$ctrl.requirements.pendingCertificationCount"><i ng-if="!$ctrl.requirements.needCertificationCount" class="ion-android-done"></i> {{$ctrl.requirements.certificationCount}} <i ng-if="$ctrl.requirements.willNeedCertificationCount" class="ion-android-warning"></i> </span><span ng-if="$ctrl.requirements.pendingCertificationCount"><ng-if ng-if="$ctrl.requirements.certificationCount">+</ng-if><i class="ion-clock"></i> {{$ctrl.requirements.pendingCertificationCount}}</span></span>'),e.put("templates/common/badge_given_certification_count.html",'<div ng-attr-id="{{$ctrl.csId}}" class="badge badge-calm" ng-class="{\'badge-assertive\': $ctrl.identity.given_cert.length >= $ctrl.parameters.sigStock}"><span><i ng-if="$ctrl.identity.given_cert.length" class="ion-android-done"></i> {{$ctrl.identity.given_cert.length}} </span><span ng-if="$ctrl.identity.given_cert_pending.length">(<ng-if ng-if="$ctrl.identity.given_cert.length">+</ng-if><i class="ion-clock"></i> {{$ctrl.identity.given_cert_pending.length}}) </span><small>/ {{$ctrl.parameters.sigStock}}</small></div>'),e.put("templates/common/form_error_messages.html",'<div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div>'),e.put("templates/common/popover_copy.html",'<ion-popover-view class="popover-copy" style="height: {{(!rows || rows &lt;= 1) ? 50 : rows*22}}px"><ion-content scroll="false"><div class="list"><div class="item item-input"><input type="text" autocomplete="off" ng-if="!rows || rows &lt;= 1" ng-model="value"><textarea ng-if="rows && rows > 1" ng-model="value" rows="{{rows}}" cols="10">\n      </textarea></div></div></ion-content></ion-popover-view>'),e.put("templates/common/popover_helptip.html",'<ion-popover-view class="popover-helptip"><ion-content scroll="false" class="list"><p><i ng-if="icon.position && !icon.position.startsWith(\'bottom-\')" class="{{icon.class}} icon-{{icon.position}} hidden-xs" style="{{icon.style}}"></i><a ng-click="closePopover()" class="pull-right button-close" ng-class="{\'pull-left\': icon.position === \'right\', \'pull-right\': icon.position !== \'right\'}"><i class="ion-close"></i> </a><span>&nbsp;</span></p><p class="padding light"><ng-bind-html ng-bind-html="content | translate:contentParams"></ng-bind-html><ng-bind-html ng-bind-html="trustContent"></ng-bind-html></p><div class="text-center" ng-if="!tour"><button class="button button-small button-stable" ng-if="!hasNext" ng-click="closePopover(true)" translate>COMMON.BTN_UNDERSTOOD</button> <button class="button button-small button-stable" id="helptip-btn-ok" ng-if="hasNext" ng-click="closePopover(false)" translate>COMMON.BTN_UNDERSTOOD</button> <button id="helptip-btn-ok" class="button button-small button-positive icon-right ink" ng-if="hasNext" ng-click="closePopover(true)"><i class="icon ion-chevron-right"></i></button></div><div class="text-center" ng-if="tour"><button class="button button-small button-positive" id="helptip-btn-ok" ng-if="!hasNext" ng-click="closePopover(false)" translate>COMMON.BTN_CLOSE</button> <button id="helptip-btn-ok" class="button button-small button-positive icon-right ink" ng-if="hasNext" ng-click="closePopover(true)">{{\'COMMON.BTN_CONTINUE\'|translate}} <i class="icon ion-chevron-right"></i></button></div><p><i ng-if="icon.position && icon.position.startsWith(\'bottom-\')" class="{{icon.class}} icon-{{icon.position}} hidden-xs"></i></p></ion-content></ion-popover-view>'),e.put("templates/common/popover_locales.html",'<ion-popover-view class="fit popover-locales" style="height: {{locales.length*48}}px"><ion-content scroll="false"><div class="list item-text-wrap block"><a ng-repeat="l in locales track by l.id" class="item item-icon-left ink" ng-click="changeLanguage(l.id)"><i class="item-image avatar" style="background-image: url(./img/flag-{{l.flag}}.png)"></i> {{l.label | translate}}</a></div></ion-content></ion-popover-view>'),e.put("templates/common/popover_profile.html",""),e.put("templates/common/popover_share.html",'<ion-popover-view class="popover-share"><ion-content scroll="false"><div class="bar bar-header"><h1 class="title">{{titleKey|translate:titleValues}}</h1><span class="gray pull-right">{{time|formatDate}}</span></div><div class="list no-margin no-padding has-header has-footer block"><div class="item item-input"><input type="text" autocomplete="off" ng-model="value"></div></div><div class="bar bar-footer"><div class="button-bar"><a class="button button-icon positive icon ion-social-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{postUrl|formatEncodeURI}}&amp;title={{postMessage|formatEncodeURI}}" onclick="window.open(this.href, \'facebook-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_FACEBOOK\'|translate}}"></a> <a class="button button-icon positive icon ion-social-twitter" href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&amp;text={{postMessage|formatEncodeURI}}" onclick="window.open(this.href, \'twitter-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_TWITTER\'|translate}}"></a> <a class="button button-icon positive icon ion-social-googleplus" href="https://plus.google.com/share?url={{postUrl|formatEncodeURI}}" onclick="window.open(this.href, \'google-plus-share\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=296,width=580\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_GOOGLEPLUS\'|translate}}"></a> <a class="button button-icon positive icon ion-social-diaspora" href="https://sharetodiaspora.github.io/?title={{postMessage|formatEncodeURI}}&amp;url={{postUrl|formatEncodeURI}}" onclick="window.open(this.href, \'diaspora-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_DIASPORA\'|translate}}"></a> <a class="button-close" title="{{\'COMMON.BTN_CLOSE\'|translate}}" ng-click="closePopover()"><i class="icon ion-close"></i></a></div></div></ion-content></ion-popover-view>'),e.put("templates/common/popup_password.html",'<form name="pwdForm" ng-submit="submit($event)"><div class="list" ng-init="setForm(pwdForm)"><label class="item item-input" ng-class="{\'item-input-error\': pwdForm.$submitted && pwdForm.password.$invalid}"><input name="password" type="password" placeholder="{{\'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-minlength="1" required></label><div class="form-errors" ng-if="pwdForm.$submitted && pwdForm.pseudo.$error" ng-messages="pwdForm.password.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="form-errors" ng-if="error"><div class="form-error">{{error|translate}}</div></div></div></form>'),e.put("templates/common/qrcode.html",'<a ng-attr-id="{{ qrcodeId }}" ng-show="!loading" class="qrcode fade-in pull-right" ng-class="{\'active\': toggleQRCode}" ng-click="toggleQRCode = !toggleQRCode"><div class="content"></div><div class="footer item item-icon-left item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click="{{:rebind:formData.pubkey}}" ng-click="$event.stopPropagation()"><i class="icon ion-key"></i> <span>{{:locale:\'COMMON.PUBKEY\'|translate}}</span><h4 id="pubkey" class="dark">{{:rebind:formData.pubkey}}</h4></div></a>'),e.put("templates/common/view_passcode.html",'<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm" translate>COMMON.PASSCODE.TITLE</span></ion-nav-title><ion-content scroll="false"></ion-content></ion-view>'),e.put("templates/currency/items_network.html",'<ion-item id="helptip-network-blockchain" class="item-icon-left item-text-wrap"><i class="icon ion-clock"></i> <span class="col col-60" translate="">CURRENCY.VIEW.MEDIAN_TIME</span> <span class="badge badge-stable">{{formData.medianTime | medianDate}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-lock-combination"></i> <span class="col col-75" translate="">CURRENCY.VIEW.POW_MIN</span> <span class="badge badge-stable">{{formData.difficulty | formatInteger}}</span></ion-item><cs-extension-point name="network-actual"></cs-extension-point><div class="item item-divider"><span translate="">CURRENCY.VIEW.NETWORK_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-clock" style="position: absolute; font-size: 20px; left: 16px; margin-top: 11px"></i> <b class="icon-secondary ion-lock-combination" style="left: 14px; margin-top: -4px"></b> <b class="icon-secondary ion-arrow-right-c" style="font-size: 12px; left: 28px; margin-top: -4px"></b> <b class="icon-secondary ion-lock-combination" style="left: 38px; margin-top: -4px"></b> <span class="col col-75" translate="">CURRENCY.VIEW.AVG_GEN_TIME</span> <span class="badge badge-stable">{{formData.avgGenTime | formatDuration}}</span></ion-item><div id="helptip-network-peers" class="item item-divider"><div class="pull-left"><span ng-if="search.type==\'member\'" translate="">PEER.MEMBERS</span> <span ng-if="search.type==\'mirror\'" translate="">PEER.MIRRORS</span> <span ng-if="search.type==\'offline\'" translate="">PEER.OFFLINE</span> <span ng-if="!search.type" translate="">PEER.PEERS</span> <span ng-if="!search.loading">({{search.results.length}})</span></div><div class="buttons pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner></div></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include>'),e.put("templates/currency/items_parameters.html",'<div bind-notifier="{ rebind:formData.useRelative }"><ion-item class="item-icon-left item-text-wrap visible-xs visible-sm"><i class="icon ion-android-bookmark"></i> <span translate>CURRENCY.VIEW.CURRENCY_NAME</span><div class="item-note dark" ng-if="!loading">{{formData.currency}} (<span ng-bind-html=":rebind:formData.currency | currencySymbol:formData.useRelative"></span>)</div></ion-item><ion-item id="helptip-currency-mass-member" class="item-icon-left item-text-wrap"><i class="icon ion-pie-graph"></i><div class="col col-60"><span translate>CURRENCY.VIEW.SHARE</span> <span class="gray">(M<sub>t</sub>/N<sub>t</sub>)</span></div><span id="helptip-currency-mass-member-unit" ng-if="!loading" class="badge badge-calm" ng-bind-html=":rebind:formData.MoverN | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-record"></i><div class="col col-60"><span translate>CURRENCY.VIEW.MASS</span> <span class="gray">(M<sub>t</sub>)</span></div><span class="badge badge-energized" ng-if="!loading" ng-bind-html=":rebind:formData.M | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span></ion-item><cs-extension-point name="parameters-actual"></cs-extension-point><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-60"><span translate>CURRENCY.VIEW.C_ACTUAL</span> <span class="gray">(c<sub>{{\'CURRENCY.VIEW.CURRENT\'|translate}}</sub>)</span></div><span class="badge badge-stable">{{formData.cactual | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dt | formatPeriod}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-load-c"></i><div class="col col-60"><span translate>CURRENCY.VIEW.UD</span> <span class="gray">({{\'COMMON.UD\'|translate}}<sub>t</sub>)</span></div><div class="badge badge-royal" ng-if="!loading"><span ng-if="formData.useRelative">1<ng-bind-html ng-bind-html=":rebind:formData.currency| currencySymbol:true"></ng-bind-html></span><span ng-if="!formData.useRelative" ng-bind-html=":rebind:formData.currentUD | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span> &nbsp;/&nbsp;{{formData.dt | formatPeriod}}</div></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>COMMON.BTN_RELATIVE_UNIT</div><label class="toggle toggle-royal" id="helptip-currency-change-unit"><input type="checkbox" ng-model="formData.useRelative"><div class="track"><div class="handle"></div></div></label></div><a name="helptip-currency-rules-anchor"></a><div class="item item-divider" id="helptip-currency-rules"><span translate>CURRENCY.VIEW.MONEY_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-60"><span translate>CURRENCY.VIEW.C_RULE</span> <span class="gray">(c)</span></div><span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{formData.c*100 | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dt | formatPeriod}}</span><span class="badge badge-stable" ng-if="!loading && formData.udReevalTime0">{{formData.c*100 | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dtReeval | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0 && formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.DT_REEVAL</span> <span class="gray">(dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading" translate="CURRENCY.VIEW.DT_REEVAL_VALUE" translate-values="formData"></span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0 && formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.UD_REEVAL_TIME0</span> <span class="gray">(t0<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading">{{formData.udReevalTime0|medianDate}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-calculator icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.UD_RULE</span> <span class="gray" ng-if="formData.udReevalTime0">- {{\'COMMON.UD\'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{\'COMMON.UD\'|translate}}<sub>t-1</sub> + c<sup>2</sup> * M<sub>t-1</sub>/N<sub>t-1</sub></span><span class="item-note dark" ng-if="!loading && formData.udReevalTime0">{{\'COMMON.UD\'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub> - dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)+ c<sup>2</sup> * (M/N)(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub> - dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>) / dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub></span></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>CURRENCY.VIEW.DISPLAY_ALL_RULES</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.allRules"><div class="track"><div class="handle"></div></div></label></div></div>'),e.put("templates/currency/items_wot.html",'<div bind-notifier="{ rebind:formData.useRelative }"><a name="helptip-currency-newcomers-anchor"></a><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person-stalker"></i><div class="col col-60"><span translate>CURRENCY.VIEW.MEMBERS</span> <span class="gray">(N<sub>{{\'CURRENCY.VIEW.CURRENT\'|translate}}</sub>)</span></div><span class="badge badge-calm" ng-if="!loading">{{formData.N | formatInteger}}</span></ion-item><ion-item id="helptip-currency-newcomers" class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-75"><span translate="CURRENCY.VIEW.MEMBERS_VARIATION" translate-values="{duration: formData.durationFromLastUD}"></span> <span class="gray">(&#916;N)</span></div><div class="badge" ng-if="!loading" ng-class="{\'badge-balanced\': (formData.N>formData.Nprev), \'badge-stable\': (formData.N==formData.Nprev) ,\'badge-assertive\': (formData.Nprev>formData.N)}">{{formData.N > formData.Nprev ? \'+\' : \'\'}}{{formData.N - formData.Nprev}}</div></ion-item><cs-extension-point name="wot-actual"></cs-extension-point><div class="item item-divider"><span translate>CURRENCY.VIEW.WOT_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-ribbon-b"></i> <span class="col col-75" translate>CURRENCY.VIEW.SIG_QTY_RULE</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.sigQty}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.MS_WINDOW</span> <span class="badge badge-assertive" ng-if="!loading">{{formData.msWindow | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.MS_VALIDITY</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.msValidity | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.SIG_WINDOW</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigWindow | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.SIG_VALIDITY</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.sigValidity | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-a"></i> <span class="col col-75" translate>CURRENCY.VIEW.SIG_STOCK</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigStock}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-clock" style="position: absolute; font-size: 20px; left: 16px"></i> <b class="ion-ribbon-a icon-secondary" style="left: 16px; top: -15px"></b> <b class="ion-arrow-right-c icon-secondary" style="left: 28px; top: -15px"></b> <b class="ion-ribbon-a icon-secondary" style="left: 40px; top: -15px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SIG_PERIOD</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigPeriod | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-steam"></i> <b class="ion-person icon-secondary" style="left: 38px; top: -17px"></b><div class="col col-75"><span ng-bind-html="\'CURRENCY.VIEW.STEP_MAX\'|translate"></span> <span class="gray">(stepMax)</span></div><span class="badge badge-assertive" ng-if="!loading">{{formData.stepMax}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SENTRIES</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sentries}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SENTRIES_FORMULA</span> <span class="item-note dark" ng-if="!loading">{{\'CURRENCY.VIEW.MATH_CEILING\'| translate}}( N<sub>t</sub><sup>^ (1 / stepMax)</sup>)</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-pull-request"></i> <span class="col col-75" translate>CURRENCY.VIEW.XPERCENT</span> <span class="badge badge-stable" ng-if="!loading">{{formData.xpercent*100| formatNumeral: \'0,0\'}} %</span></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>CURRENCY.VIEW.DISPLAY_ALL_RULES</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.allWotRules"><div class="track"><div class="handle"></div></div></label></div></div>'),e.put("templates/currency/lookup.html",'<ion-view view-title="{{\'CURRENCY.SELECT.TITLE\' | translate}}"><ion-content class="padding no-padding-xs no-padding-sm"><h4 class="content double-padding-x" translate>CURRENCY.SELECT.CURRENCIES</h4><ng-include src="::\'templates/currency/lookup_form.html\'"></ion-content></ion-view>'),e.put("templates/currency/lookup_form.html",'<ion-list><div class="item center" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div ng-repeat="currency in search.results" ng-class="{ selected: selectedCurrency == currency }"><a class="item card card-item stable-bg padding ink" ng-click="selectCurrency(currency)" ng-class="{ selected: selectedCurrency && selectedCurrency.name == currency.name }"><h2>{{currency.name}}</h2><h4 class="gray">{{currency.peer.server}}</h4><span class="badge badge-royal">{{\'CURRENCY.SELECT.MEMBERS_COUNT\'|translate:currency}}</span></a></div></ion-list>'),e.put("templates/currency/modal_license.html",'<ion-modal-view class="modal-full-height modal-license"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>CURRENCY.LICENSE.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-header-bar><ion-content scroll="false" style="bottom: 0px"><p ng-if="!licenseUrl && !loading">translate>CURRENCY.LICENSE.NO_LICENSE_FILE</p><iframe ng-if="licenseUrl && !loading" class="padding-left padding-right no-padding-xs iframe-license" id="iframe-license" ng-src="{{licenseUrlHtml||licenseUrl}}"></iframe><div class="padding hidden-xs text-center"><button class="button button-stable ink" ng-click="downloadFile()">{{\'CURRENCY.LICENSE.BTN_DOWNLOAD\' | translate}}</button> <button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></ion-content></ion-modal-view>'),e.put("templates/currency/popover_actions.html",'<ion-popover-view class="fit has-header popover-wallet-actions"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"></div></ion-content></ion-popover-view>'),e.put("templates/currency/view_currency.html",'<ion-view left-buttons="leftButtons" cache-view="false"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'CURRENCY.VIEW.TAB_CURRENCY\'|translate}}" icon="ion-stats-bars" ui-sref="app.currency.tab_parameters"><ion-nav-view name="tab-parameters"></ion-nav-view></ion-tab><ion-tab title="{{\'CURRENCY.VIEW.TAB_WOT\'|translate}}" icon="ion-person-stalker" ui-sref="app.currency.tab_wot"><ion-nav-view name="tab-wot"></ion-nav-view></ion-tab><ion-tab id="helptip-currency-tab-peers" title="{{\'CURRENCY.VIEW.TAB_NETWORK\'|translate}}" icon="ion-cloud" ui-sref="app.currency.tab_network"><ion-nav-view name="tab-network"></ion-nav-view></ion-tab><ion-tab title="{{\'CURRENCY.VIEW.TAB_BLOCKS\'|translate}}" icon="ion-lock-combination" ui-sref="app.currency.tab_blocks"><ion-nav-view name="tab-blocks"></ion-nav-view></ion-tab></ion-tabs></ion-view>'),e.put("templates/currency/view_currency_lg.html",'<ion-view left-buttons="leftButtons" cache-view="false"><ion-nav-title bind-notifier="{ rebind:formData.useRelative }"><span ng-if="!loading">{{\'CURRENCY.VIEW.TITLE\' | translate}} {{formData.currency|abbreviate}}</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refreshPeers()"></button><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><div class="item item-text-wrap no-border no-padding pull-left"><div class="item-icon-left card padding stable-900-bg"><ion-spinner class="icon" icon="android" ng-if="loading"></ion-spinner><i class="icon ion-help-circled calm" ng-if="!loading"></i><div class="item-icon-left-padding" style="min-height: 26px"><span ng-if="!loading" trust-as-html="\'CURRENCY.VIEW.CURRENCY_SHORT_DESCRIPTION\'|translate:formData"></span></div></div></div><div class="row responsive-sm"><div class="col list"><div class="item item-divider"><span translate="">CURRENCY.VIEW.MONEY_DIVIDER</span></div><ng-include src="::\'templates/currency/items_parameters.html\'"></ng-include></div><div class="col list"><div class="item item-divider"><span translate="">CURRENCY.VIEW.WOT_DIVIDER</span></div><ng-include src="::\'templates/currency/items_wot.html\'"></ng-include></div></div></ion-content></ion-view>'),e.put("templates/help/help.html",'<a name="join"></a><h2 translate>HELP.JOIN.SECTION</h2><a name="join-salt"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-salt\']"><div class="col col-20" translate>LOGIN.SALT</div><div class="col" translate>HELP.JOIN.SALT</div></div><a name="join-password"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-password\']"><div class="col col-20" translate>LOGIN.PASSWORD</div><div class="col" translate>HELP.JOIN.PASSWORD</div></div><a name="join-pseudo"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-pseudo\']"><div class="col col-20" translate>ACCOUNT.NEW.PSEUDO</div><div class="col" translate>HELP.JOIN.PSEUDO</div></div><a name="login"></a><h2 translate>HELP.LOGIN.SECTION</h2><a name="login-pubkey"></a><div class="row responsive-sm" ng-class="itemsClass[\'login-pubkey\']"><div class="col col-20" translate>HELP.LOGIN.PUBKEY</div><div class="col" translate>HELP.LOGIN.PUBKEY_DEF</div></div><a name="login-method"></a><div class="row responsive-sm" ng-class="itemsClass[\'login-method\']"><div class="col col-20" translate>HELP.LOGIN.METHOD</div><div class="col" translate>HELP.LOGIN.METHOD_DEF</div></div><a name="glossary"></a><h2 translate>HELP.GLOSSARY.SECTION</h2><a name="pubkey"></a><div class="row responsive-sm" ng-class="itemsClass.pubkey"><div class="col col-20" translate>COMMON.PUBKEY</div><div class="col" translate>HELP.GLOSSARY.PUBKEY_DEF</div></div><a name="blockchain"></a><div class="row responsive-sm" ng-class="itemsClass.blockchain"><div class="col col-20" translate>HELP.GLOSSARY.BLOCKCHAIN</div><div class="col" translate>HELP.GLOSSARY.BLOCKCHAIN_DEF</div></div><a name="universal_dividend"></a> <a name="ud"></a><div class="row responsive-sm" ng-class="itemsClass.ud"><div class="col col-20" translate>COMMON.UNIVERSAL_DIVIDEND</div><div class="col" translate>HELP.GLOSSARY.UNIVERSAL_DIVIDEND_DEF</div></div><a name="member"></a><div class="row responsive-sm" ng-class="itemsClass.member"><div class="col col-20" translate>HELP.GLOSSARY.MEMBER</div><div class="col" translate>HELP.GLOSSARY.MEMBER_DEF</div></div><a name="wot"></a><div class="row responsive-sm" ng-class="itemsClass.wot"><div class="col col-20" translate>HELP.GLOSSARY.WOT</div><div class="col" translate>HELP.GLOSSARY.WOT_DEF</div></div><a name="currency_rules"></a><div class="row responsive-sm" ng-class="itemsClass.currency_rules"><div class="col col-20" translate>HELP.GLOSSARY.CURRENCY_RULES</div><div class="col" translate>HELP.GLOSSARY.CURRENCY_RULES_DEF</div></div><a name="distance_rule"></a><div class="row responsive-sm" ng-class="itemsClass.distance_rule"><div class="col col-20" translate>HELP.GLOSSARY.DISTANCE_RULE</div><div class="col" translate>HELP.GLOSSARY.DISTANCE_RULE_DEF</div></div>'),e.put("templates/help/modal_help.html",'<ion-modal-view class="modal-full-height modal-help"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CLOSE</button><h1 class="title" translate>HELP.TITLE</h1></ion-header-bar><ion-content scroll="true" class="padding no-padding-xs"><div ng-class="listClass"><ng-include src="::\'templates/help/help.html\'"></ng-include></div><div class="padding hidden-xs text-center"><button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></ion-content></ion-modal-view>'),e.put("templates/help/view_help.html",'<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm" translate="">HELP.TITLE</span></ion-nav-title><ion-content scroll="true" class="padding"><ng-include src="::\'templates/help/help.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/home/home.html",'<ion-view id="home"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"></ion-nav-buttons><ion-content class="positive-900-bg circle-bg-dark"><div class="row padding-horizontal no-padding-xxs responsive-lg"><div class="col text-center no-padding-xs main-container"><div id="helptip-home-logo" class="logo"></div><h4><span class="hidden-xs" translate="">HOME.WELCOME</span> <b ng-show="!loading" translate-values=":currency:{currency: $root.currency.name}" translate="">HOME.MESSAGE</b></h4><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding animate-fade-in animate-show-hide ng-hide" ng-show="!loading && error"><div class="card card-item padding"><p class="item-content item-text-wrap"><span class="dark" trust-as-html="\'HOME.CONNECTION_ERROR\'|translate:node"></span></p><button type="button" class="button button-positive icon icon-left ion-refresh ink" ng-click="reload()">{{\'COMMON.BTN_REFRESH\'|translate}}</button></div></div><div class="center animate-show-hide ng-hide" ng-show="!loading && !error"><button type="button" class="button button-block button-stable button-raised icon-left icon ion-easel ink-dark hidden-xs" ng-show="login" ng-click="startHelpTour($event)">{{\'COMMON.BTN_HELP_TOUR\'|translate}}</button> <button type="button" class="button button-block button-positive button-raised ink-dark" ng-click="showJoinModal()" ng-if="!login" translate="">LOGIN.CREATE_FREE_ACCOUNT</button> <button type="button" class="item button button-block button-raised icon icon-left ion-person ink-dark" ng-class="{\'button-stable\': smallscreen, \'button-positive\': !smallscreen}" ui-sref="app.view_wallet" ng-show="login" translate="">MENU.ACCOUNT</button> <button type="button" class="item button button-block button-stable button-raised icon icon-left ion-card ink-dark visible-xs" ui-sref="app.view_wallet_tx" ng-if="login"><b class="icon-secondary ion-clock" style="left: 52px; top: -2px; font-size: 10pt; display: block"></b> {{\'MENU.TRANSACTIONS\'|translate}}</button> <button type="button" class="item button button-block button-positive button-raised icon icon-left ion-paper-airplane ink-dark visible-xs" ng-click="showTransferModal()" ng-if="login" translate="">COMMON.BTN_SEND_MONEY</button><br class="visible-xs visible-sm"><div class="text-center no-padding" ng-show="!login"><br class="visible-xs visible-sm">{{\'LOGIN.HAVE_ACCOUNT_QUESTION\'|translate}} <b></b></div><div class="text-center no-padding" ng-show="login"><br class="visible-xs visible-sm"><span ng-bind-html="\'HOME.NOT_YOUR_ACCOUNT_QUESTION\'|translate:{pubkey: walletData.pubkey}"></span><br><b><a class="assertive" ng-click="logout({askConfirm: true})" translate="">HOME.BTN_CHANGE_ACCOUNT</a></b></div><button type="button" class="button button-block button-stable button-raised ink visible-xs visible-sm" ui-sref="app.view_wallet" ng-if="!login" translate="">COMMON.BTN_LOGIN</button><div class="text-center no-padding visible-xs stable"><br>{{\'COMMON.APP_VERSION\'|translate:{version: config.version} }} | <a href="#" ng-click="showAboutModal()" translate="">HOME.BTN_ABOUT</a></div></div></div><div class="col no-padding" ng-class="{\'col-30\': !feed, \'col-10\': feed}">&nbsp;</div><div class="col col-30 no-padding" ng-if="feed"><div class="feed padding-horizontal no-padding-xs padding-top"><h3 class="padding-left"><i class="icon ion-speakerphone"></i> {{feed.title}} <small><a ng-click="openLink($event, feed.home_page_url)" class="gray"><span translate="">HOME.SHOW_ALL_FEED</span> <i class="icon ion-chevron-right"></i></a></small></h3><div class="animate-show-hide ng-hide" ng-show="feed"><div ng-repeat="item in feed.items" class="card padding no-margin-xs"><div class="header"><i ng-if="item.author.avatar" class="avatar" style="background-image: url({{item.author.avatar}})"></i> <a ng-class="{\'avatar-left-padding\': item.author.avatar}" class="author" ng-click="item.author.url && openLink($event, item.author.url)">{{item.author.name}} </a><a ng-if="item.time" title="{{item.time|formatDate}}" ng-click="openLink($event, item.url)" class="item-note"><small><i class="icon ion-clock"></i>&nbsp;{{item.time|formatFromNow}}</small></a></div><h2 class="title feed-title"><a ng-click="openLink($event, item.url)">{{item.title}}</a></h2><div ng-if="item.content" class="content feed-content" trust-as-html="item.content"></div><h4 class="card-footer feed-footer text-right positive-100"><a ng-click="openLink($event, item.url)"><span ng-if="item.truncated" translate="">HOME.READ_MORE</span> <span ng-if="!item.truncated" translate="">COMMON.BTN_SHOW</span> <i class="icon ion-chevron-right"></i></a></h4></div></div></div></div></div></ion-content></ion-view>'),e.put("templates/join/modal_choose_account_type.html",'<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slides.slider.activeIndex"></button><h1 class="title" translate="">ACCOUNT.NEW.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slides.slider.activeIndex === 0" ng-click="slideNext()"><span translate="">COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header padding"><div class="center padding" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div ng-if="!loading"><p ng-bind-html="\'ACCOUNT.NEW.INTRO_WARNING_TIME\'|translate:currency"></p><div class="row responsive-sm"><div class="col"><div class="item card item-icon-left padding item-text-wrap stable-bg"><i class="icon ion-android-warning assertive"></i><p class="item-content item-icon-left-padding"><span class="dark" translate="">ACCOUNT.NEW.INTRO_WARNING_SECURITY</span><br><small translate="">ACCOUNT.NEW.INTRO_WARNING_SECURITY_HELP</small></p></div></div><div class="col"><div class="item card item-icon-left padding item-text-wrap stable-bg"><i class="icon ion-information-circled positive"></i><p class="item-content item-icon-left-padding"><span class="dark" trust-as-html="\'ACCOUNT.NEW.REGISTRATION_NODE\'|translate:currency.node"></span><br><small trust-as-html="\'ACCOUNT.NEW.REGISTRATION_NODE_HELP\'|translate:currency.node"></small></p></div></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button button-positive icon-right ion-chevron-right ink" ng-click="slideNext()" ng-disabled="loading" type="button" translate="">COMMON.BTN_START</button></div></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header padding"><p translate="">ACCOUNT.NEW.SELECT_ACCOUNT_TYPE</p><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectAccountTypeAndClose(\'member\')"><div class="item-content item-text-wrap"><i class="item-image icon dark ion-person"></i><h2 translate="">ACCOUNT.NEW.MEMBER_ACCOUNT</h2><h4 class="gray" ng-bind-html="\'ACCOUNT.NEW.MEMBER_ACCOUNT_HELP\'|translate:currency"></h4><i class="icon dark ion-ios-arrow-right"></i></div></div><cs-extension-point name="select-account-type"></cs-extension-point><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectAccountTypeAndClose(\'wallet\')"><div class="item-content item-text-wrap"><i class="item-image icon dark ion-card"></i><h2 translate="">ACCOUNT.NEW.WALLET_ACCOUNT</h2><h4 class="gray" translate="">ACCOUNT.NEW.WALLET_ACCOUNT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button></div></ion-content></ion-slide-page></ion-slides></ion-modal-view>'),e.put("templates/join/modal_join_member.html",'<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="doPrev()" ng-if="slides.slider.activeIndex && slideBehavior.hasPreviousButton"></button> <button class="button button-icon button-clear icon ion-ios-help-outline visible-xs" ng-if="slideBehavior.helpAnchor" ng-click="showHelpModal(slideBehavior.helpAnchor)"></button><h1 class="title" translate>ACCOUNT.NEW.MEMBER_ACCOUNT_TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasNextButton" ng-click="doNext()"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-class="{\'button-text-stable\': !isLicenseRead}" ng-if="slideBehavior.hasAcceptButton" ng-click="isLicenseRead ? doNext() : undefined"><span translate>ACCOUNT.NEW.BTN_ACCEPT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasSendButton" ng-click="doNewAccount()"><i class="icon ion-android-send"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page ng-if="licenseFileUrl"><ion-content class="has-header" scroll="false"><div class="padding" translate>ACCOUNT.NEW.INFO_LICENSE</div><div class="center padding" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><iframe ng-if="!loading" class="padding-left padding-right no-padding-xs iframe-license" id="iframe-license" ng-src="{{licenseFileUrl}}"></iframe><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doNext(\'licenceForm\')" ng-disabled="!isLicenseRead" type="button" translate>ACCOUNT.NEW.BTN_ACCEPT_LICENSE</button></div></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="true"><form name="pseudoForm" novalidate="" ng-submit="doNext(\'pseudoForm\')"><div class="item item-text-wrap text-center padding"><a class="pull-right icon-help hidden-xs" ng-click="showHelpModal(\'join-pseudo\')"></a> <span translate>ACCOUNT.NEW.PSEUDO_WARNING</span></div><div class="list" ng-init="setForm(pseudoForm, \'pseudoForm\')"><div class="item item-input" ng-class="{\'item-input-error\': (pseudoForm.$submitted && pseudoForm.pseudo.$invalid) || (uiAlreadyUsed && formData.pseudo)}"><span class="input-label" translate>ACCOUNT.NEW.PSEUDO</span> <input id="pseudo" name="pseudo" type="text" placeholder="{{\'ACCOUNT.NEW.PSEUDO_HELP\' | translate}}" ng-model="formData.pseudo" autocomplete="off" ng-minlength="3" ng-maxlength="100" ng-pattern="userIdPattern" ng-model-options="{ debounce: 250 }" required></div><div class="form-errors" ng-show="pseudoForm.$submitted && pseudoForm.pseudo.$error" ng-messages="pseudoForm.pseudo.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 3}"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG_WITH_LENGTH" translate-values="{maxLength: 100}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.INVALID_USER_ID"></span></div></div><div class="text-right" style="min-height: 18px"><div class="form-error gray" ng-if="formData.computing && formData.pseudo"><ion-spinner class="icon ion-spinner-small" icon="android" ng-if="formData.computing && formData.pseudo"></ion-spinner><span translate>ACCOUNT.NEW.CHECKING_PSEUDO</span></div><ng-if ng-if="!formData.computing && formData.pseudo"><div class="form-error balanced" ng-if="!uiAlreadyUsed "><i class="icon ion-checkmark balanced"></i> <span translate>ACCOUNT.NEW.PSEUDO_AVAILABLE</span></div><div class="form-error" ng-if="uiAlreadyUsed"><i class="icon ion-close-circled assertive"></i> <span translate>ACCOUNT.NEW.PSEUDO_NOT_AVAILABLE</span></div></ng-if></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" ng-disabled="uiAlreadyUsed" translate>COMMON.BTN_NEXT</button></div></div></form></ion-content></ion-slide-page><ion-slide-page ng-if="!formData.pubkey"><ion-content class="has-header" scroll="true"><form name="saltForm" novalidate="" ng-submit="doNext(\'saltForm\')"><div class="list" ng-init="setForm(saltForm, \'saltForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-salt\')"></a> <span translate>ACCOUNT.NEW.SALT_WARNING</span></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.username.$invalid}"><span class="input-label" translate>LOGIN.SALT</span> <input ng-if="!showUsername" name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" autocomplete="off" ng-minlength="8" different-to="formData.pseudo" required> <input ng-if="showUsername" name="username" type="text" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" autocomplete="off" ng-minlength="8" different-to="formData.pseudo" required></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.username.$error" ng-messages="saltForm.username.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="differentTo"><span translate="ERROR.EQUALS_TO_PSEUDO"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.confirmSalt.$invalid}"><span class="input-label pull-right" translate>ACCOUNT.NEW.SALT_CONFIRM</span> <input ng-if="!showUsername" name="confirmUsername" type="password" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" autocomplete="off" compare-to="formData.username"> <input ng-if="showUsername" name="confirmUsername" type="text" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" autocomplete="off" compare-to="formData.username"></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.confirmUsername.$error" ng-messages="saltForm.confirmUsername.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.SALT_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showUsername"><div class="track"><div class="handle"></div></div></label></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content></ion-slide-page><ion-slide-page ng-if="!formData.pubkey"><ion-content class="has-header" scroll="true"><form name="passwordForm" novalidate="" ng-submit="doNext(\'passwordForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-password\')"></a> <span translate>ACCOUNT.NEW.PASSWORD_WARNING</span></div><div class="list" ng-init="setForm(passwordForm, \'passwordForm\')"><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.password.$invalid}"><span class="input-label" translate>LOGIN.PASSWORD</span> <input ng-if="!showPassword" name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" autocomplete="off" ng-change="formDataChanged()" ng-minlength="8" different-to="formData.username" required> <input ng-if="showPassword" name="text" type="text" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" autocomplete="off" ng-change="formDataChanged()" ng-minlength="8" different-to="formData.username" required></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.password.$error" ng-messages="passwordForm.password.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="differentTo"><span translate="ERROR.EQUALS_TO_SALT"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.confirmPassword.$invalid}"><span class="input-label" translate>ACCOUNT.NEW.PASSWORD_CONFIRM</span> <input ng-if="!showPassword" name="confirmPassword" type="password" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" autocomplete="off" compare-to="formData.password"> <input ng-if="showPassword" name="confirmPassword" type="text" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" autocomplete="off" compare-to="formData.password"></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.confirmPassword.$error" ng-messages="passwordForm.confirmPassword.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.PASSWORD_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showPassword"><div class="track"><div class="handle"></div></div></label></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" ng-click="getRevocationDocument()" translate>COMMON.BTN_NEXT</button></div><div class="padding hidden-xs"></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="true"><div class="center padding" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><ng-if ng-if="!formData.computing"><div class="animate-fade-in animate-show-hide ng-hide" ng-show="accountAvailable"><div class="padding text-center" translate>ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION</div><div class="list"><ion-item class="item text-center item-text-wrap"><h3 class="gray" translate>LOGIN.ASSOCIATED_PUBKEY</h3><h3 class="dark bold">{{formData.pubkey}}</h3></ion-item></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-click="doNewAccount()" translate>COMMON.BTN_SEND <i class="icon ion-android-send"></i></button></div></div><div class="animate-fade-in animate-show-hide ng-hide" ng-show="!accountAvailable"><ion-item class="item-icon-left item-text-wrap text-center"><i class="icon ion-minus-circled assertive"></i> <span id="modal-license" trust-as-html="\'ERROR.EXISTING_ACCOUNT\'|translate"></span></ion-item><div class="list"><ion-item class="item item-text-wrap item-border"><div class="padding text-center"><span class="gray text-no-wrap">{{formData.pubkey}}</span></div></ion-item><div class="padding text-center"><span translate>ERROR.EXISTING_ACCOUNT_REQUEST</span></div></div><div class="padding hidden-xs text-left"><button class="button button-assertive icon-left ion-chevron-left ink" ng-click="identifierRecovery()" translate>COMMON.BTN_MODIFY</button></div></div></ng-if></ion-content></ion-slide-page></ion-slides></ion-modal-view>'),e.put("templates/join/modal_join_wallet.html",'<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slideBehavior.hasPreviousButton"></button> <button class="button button-icon button-clear icon ion-ios-help-outline visible-xs" ng-if="slideBehavior.helpAnchor" ng-click="showHelpModal(slideBehavior.helpAnchor)"></button><h1 class="title" translate>ACCOUNT.NEW.WALLET_ACCOUNT_TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasNextButton" ng-click="doNext()"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasSendButton" ng-click="doNewAccount()"><i class="icon ion-android-send"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header" scroll="false"><form name="saltForm" novalidate="" ng-submit="doNext(\'saltForm\')"><div class="list" ng-init="setForm(saltForm, \'saltForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-salt\')"></a> <span translate>ACCOUNT.NEW.SALT_WARNING</span></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.username.$invalid}"><span class="input-label" translate>LOGIN.SALT</span> <input ng-if="!showUsername" name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" ng-minlength="8" required> <input ng-if="showUsername" name="username" type="text" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" ng-minlength="8" required></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.username.$error" ng-messages="saltForm.username.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.confirmSalt.$invalid}"><span class="input-label pull-right" translate>ACCOUNT.NEW.SALT_CONFIRM</span> <input ng-if="!showUsername" name="confirmUsername" type="password" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" compare-to="formData.username"> <input ng-if="showUsername" name="confirmUsername" type="text" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" compare-to="formData.username"></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.confirmUsername.$error" ng-messages="saltForm.confirmUsername.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.SALT_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showUsername"><div class="track"><div class="handle"></div></div></label></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="false"><form name="passwordForm" novalidate="" ng-submit="doNext(\'passwordForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-password\')"></a> <span translate>ACCOUNT.NEW.PASSWORD_WARNING</span></div><div class="list" ng-init="setForm(passwordForm, \'passwordForm\')"><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.password.$invalid}"><span class="input-label" translate>LOGIN.PASSWORD</span> <input ng-if="!showPassword" name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-change="formDataChanged()" ng-minlength="8" required> <input ng-if="showPassword" name="text" type="text" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-change="formDataChanged()" ng-minlength="8" required></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.password.$error" ng-messages="passwordForm.password.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.confirmPassword.$invalid}"><span class="input-label" translate>ACCOUNT.NEW.PASSWORD_CONFIRM</span> <input ng-if="!showPassword" name="confirmPassword" type="password" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" compare-to="formData.password"> <input ng-if="showPassword" name="confirmPassword" type="text" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" compare-to="formData.password"></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.confirmPassword.$error" ng-messages="passwordForm.confirmPassword.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.PASSWORD_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showPassword"><div class="track"><div class="handle"></div></div></label></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT</button></div><div class="padding hidden-xs"></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="false"><div class="padding center" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><div ng-if="accountAvailable && !formData.computing"><div class="padding text-center" translate>ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION</div><div class="list"><ion-item class="item item-text-wrap item-border"><div class="dark pull-right padding-right" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><span class="input-label" translate>COMMON.PUBKEY</span> <span class="gray text-no-wrap" ng-if="formData.computing" translate>ACCOUNT.NEW.COMPUTING_PUBKEY </span><span class="gray text-no-wrap" ng-if="formData.pubkey">{{formData.pubkey}}</span></ion-item></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-click="doNewAccount()" translate>COMMON.BTN_CREATE</button></div></div><div ng-if="!accountAvailable && !formData.computing"><ion-item class="item-icon-left item-text-wrap text-center"><i class="icon ion-android-close active"></i> <span id="modal-license" translate>ERROR.EXISTING_ACCOUNT</span></ion-item><div class="list"><ion-item class="item item-text-wrap item-border"><div class="dark pull-right padding-right" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><span class="gray text-no-wrap" ng-if="formData.computing" translate>ACCOUNT.NEW.COMPUTING_PUBKEY</span><div class="padding text-center"><span class="gray text-no-wrap" ng-if="formData.pubkey">{{formData.pubkey}}</span></div></ion-item><div class="padding text-center"><span translate>ERROR.EXISTING_ACCOUNT_REQUEST</span></div></div><div class="padding hidden-xs text-left"><button class="button button-assertive icon-left ion-chevron-left ink" ng-click="identifierRecovery()" translate>COMMON.BTN_MODIFY</button></div></div></ion-content></ion-slide-page></ion-slides></ion-modal-view>'),e.put("templates/login/form_file_import.html",'<div class="item"><p class="item-text-wrap" translate>LOGIN.FILE_FORM_HELP</p></div><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i> <span class="positive" translate>LOGIN.FILE.HELP</span></div><div drop-zone="onFileChanged(file)"><div ng-if="!formData.file" file-select="onFileChanged(file)" accept=".dunikey,.yml"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div class="item item-icon-left item-icon-right stable-bg" ng-if="formData.file"><i class="icon ion-document-text dark"></i><div class="item-content row"><div class="col"><h2>{{formData.file.name}}</h2><h4 class="dark" ng-if="formData.file.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{formData.file.lastModified/1000|formatDate}}</h4><h5 class="dark"><span class="gray" translate>COMMON.FILE.SIZE</span> {{formData.file.size|formatInteger}} Ko</h5></div><div class="col"><h3><span class="gray" translate>COMMON.PUBKEY</span></h3><h3 ng-if="validatingFile" translate>COMMON.FILE.VALIDATING</h3><h3 ng-if="!validatingFile"><span class="dark animate-show-hide ng-hide" ng-show="formData.file.pubkey">{{formData.file.pubkey}}</span> <span class="assertive animate-show-hide ng-hide" ng-show="!formData.file.valid"><br><i class="ion-close-circled assertive"></i> {{formData.file.pubkey ? \'ERROR.AUTH_INVALID_PUBKEY\' : \'ERROR.AUTH_INVALID_FILE\' |translate}}</span></h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="removeKeyFile()"></a></div></div><ion-checkbox ng-model="formData.keepAuth" class="item ink item-text-wrap"><div class="item-content dark" translate>LOGIN.MEMORIZE_AUTH_FILE</div></ion-checkbox>'),e.put("templates/login/form_login.html",'<form name="loginForm" novalidate="" ng-submit="doLogin()" autocomplete="off"><div class="list padding no-padding-xs" ng-init="setForm(loginForm)" ng-switch on="formData.method"><div class="item hidden-xs no-padding" ng-if="showMethods"><div class="pull-right"><a class="button button-text button-small-padding icon-right ink" ng-click="showMethodsPopover($event)"><i class="icon ion-wrench"></i> {{\'LOGIN.BTN_METHODS\'| translate}} </a>&nbsp; <a class="button button-icon positive button-small-padding icon ion-ios-help-outline" style="right: 8px" ng-click="showHelpModal(\'login-method\')"></a></div></div><div class="item item-text-wrap" ng-if="::isAuth"><p ng-if="::expectedPubkey" ng-bind-html="::expectedUid ? \'AUTH.EXPECTED_UID_HELP\' : \'AUTH.EXPECTED_PUBKEY_HELP\' |translate: {uid: expectedUid, pubkey: expectedPubkey}"></p><p ng-if="::!expectedPubkey" ng-bind-html="::\'AUTH.GENERAL_HELP\'|translate"></p></div><div ng-switch-when="SCRYPT_DEFAULT"><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include></div><div ng-switch-when="SCRYPT_ADVANCED"><ng-include src="::\'templates/login/form_scrypt_advanced.html\'"></ng-include></div><div ng-switch-when="PUBKEY"><ng-include src="::\'templates/login/form_pubkey.html\'"></ng-include></div><div ng-switch-when="FILE"><ng-include src="::\'templates/login/form_file_import.html\'"></ng-include></div><div ng-switch-when="SCAN"><ng-include src="::\'templates/login/form_scan.html\'"></ng-include></div><div ng-switch-default><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-class="{\'button-assertive\': isAuth, \'button-positive\': !isAuth}" type="submit">{{okText || (isAuth ? \'AUTH.BTN_AUTH\' : \'COMMON.BTN_LOGIN\') | translate}}</button></div><div class="text-center no-padding visible-xs"><button type="button" class="button button-small icon-right ink" ng-click="showMethodsPopover($event)"><i class="icon ion-loop"></i> <span translate>LOGIN.BTN_METHODS_DOTS</span></button><br><br></div><ng-if ng-if="!isAuth && showNewAccountLink"><div class="text-center no-padding">{{\'LOGIN.NO_ACCOUNT_QUESTION\'|translate}}<br class="visible-xs"><a ng-click="showJoinModal()" translate>LOGIN.CREATE_ACCOUNT</a></div><br class="visible-xs"><div class="text-center no-padding"><a ng-click="showAccountSecurityModal()" translate>LOGIN.FORGOTTEN_ID</a></div></ng-if></form>'),e.put("templates/login/form_pubkey.html",'<div class="item"><p class="item-text-wrap" translate>LOGIN.PUBKEY_FORM_HELP</p></div><div class="item item-input item-button-right" ng-class="{ \'item-input-error\': form.$submitted && form.pubkey.$invalid}"><span class="input-label hidden-xs" translate>COMMON.PUBKEY</span> <input name="pubkey" type="text" placeholder="{{\'LOGIN.PUBKEY_HELP\' | translate}}" autocomplete="off" ng-model="formData.pubkey" ng-model-options="{ debounce: 650 }" required> <a class="button button-stable icon ion-android-search ink" ng-click="showWotLookupModal(form.pubkey.$viewValue)"></a></div><div class="form-errors" ng-show="form.$submitted && form.pubkey.$error" ng-messages="form.pubkey.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="checksum"><span translate="ERROR.INVALID_PUBKEY_CHECKSUM"></span></div></div>'),e.put("templates/login/form_scan.html",'<div class="item"><p class="item-text-wrap" ng-bind-html="::isAuth ? \'AUTH.SCAN_FORM_HELP\' : \'LOGIN.SCAN_FORM_HELP\' |translate"></p></div><div class="item item-icon-right item-text-wrap item-input" ng-class="{ \'item-input-error\': pubkeyError}"><span class="input-label" translate>COMMON.PUBKEY</span><div class="item-content text-wrap"><span class="gray animate-show-hide" ng-show="!computing && formData.pubkey">{{formData.pubkey}}</span><ion-spinner class="ion-spinner-small" icon="android" ng-if="computing"></ion-spinner><input type="hidden" ng-model="formData.pubkey" required></div><a class="button button-icon positive button-small-padding icon ion-qr-scanner animate-show-hide" ng-show="!computing && (!expectedPubkey || pubkeyError)" ng-click="doScan()"></a> <span class="button button-icon balanced button-small-padding icon ion-checkmark animate-show-hide" ng-if="expectedPubkey" ng-show="!computing && !pubkeyError"></span></div><div class="form-errors" ng-if="expectedPubkey"><div class="form-error" ng-show="pubkeyError"><span trust-as-html="::\'ERROR.AUTH_INVALID_PUBKEY\'|translate:{pubkey: expectedPubkey}"></span></div></div>'),e.put("templates/login/form_scrypt.html",'<div class="item item-text-wrap" ng-if="!isAuth"><p ng-bind-html="\'LOGIN.SCRYPT_FORM_HELP\'|translate"></p></div><input type="password" name="fake-password" autocomplete="off" style="visibility:hidden; position:absolute"><label class="item item-input" ng-class="{ \'item-input-error\': form.$submitted && form.username.$invalid}"><span class="input-label hidden-xs" translate>LOGIN.SALT</span> <input name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" autocomplete="off" ng-model="formData.username" ng-model-options="{ debounce: 650 }" class="highlight-light" required></label><div class="form-errors" ng-show="form.$submitted && form.username.$error" ng-messages="form.username.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><label class="item item-input" ng-class="{ \'item-input-error\': form.$submitted && form.password.$invalid}"><span class="input-label hidden-xs" translate>LOGIN.PASSWORD</span> <input name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" autocomplete="off" ng-model="formData.password" ng-model-options="{ debounce: 650 }" select-on-click required></label><div class="form-errors" ng-show="form.$submitted && form.password.$error" ng-messages="form.password.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-icon-right item-text-wrap" ng-class="{ \'item-input-error\': pubkeyError, \'item-input\': showPubkey}"><span class="input-label hidden-xs animate-show-hide ng-hide" ng-show="showPubkey" translate>COMMON.PUBKEY</span><div class="item-content text-wrap"><a class="positive ink animate-show-hide ng-hide" ng-show="showComputePubkeyButton && !pubkey" ng-click="computePubkey()"><i class="ion-eye"></i> {{\'COMMON.BTN_SHOW_PUBKEY\' | translate}} </a><span class="gray animate-show-hide" ng-show="!computing && pubkey">{{pubkey}}</span><ion-spinner class="ion-spinner-small" icon="android" ng-if="computing"></ion-spinner></div><a class="button button-icon positive button-small-padding icon ion-ios-help-outline animate-show-hide" ng-click="showHelpModal(\'login-pubkey\')" ng-if="!expectedPubkey" ng-show="showPubkey"></a> <span class="button button-icon balanced button-small-padding icon ion-checkmark animate-show-hide" ng-if="expectedPubkey" ng-show="showPubkey && !showComputePubkeyButton && !computing && !pubkeyError"></span></div><div class="form-errors" ng-if="expectedPubkey"><div class="form-error" ng-show="pubkeyError"><span trust-as-html="::\'ERROR.AUTH_INVALID_PUBKEY\'|translate:{pubkey: expectedPubkey}"></span></div></div>'),e.put("templates/login/form_scrypt_advanced.html",'<div class="row responsive-md responsive-sm padding-left"><div class="col col-33 no-padding"><label class="item item-input item-select"><select ng-model="formData.scrypt" style="max-width: 100%" ng-change="changeScrypt(formData.scrypt)" ng-options="l as (l.label | translate) for l in scryptParamsValues track by l.id"></select></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.N</span> <input class="no-padding-right" type="number" placeholder="N" autocomplete="off" ng-model="formData.scrypt.params.N" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.r</span> <input class="no-padding-right" type="number" placeholder="r" ng-model="formData.scrypt.params.r" autocomplete="off" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.p</span> <input class="no-padding-right" type="number" placeholder="p" autocomplete="off" ng-model="formData.scrypt.params.p" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div></div><p class="energized-100-bg padding dark"><i class="icon ion-android-warning"></i> <span translate>INFO.FEATURES_NOT_IMPLEMENTED</span></p><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include>'),e.put("templates/login/item_remember_me.html",'<ion-checkbox ng-model="formData.rememberMe" ng-if="!isAuth" class="item ink item-text-wrap"><div class="item-content dark" translate>SETTINGS.REMEMBER_ME</div></ion-checkbox>'),e.put("templates/login/modal_login.html",'<ion-modal-view class="modal-full-height modal-login"><ion-header-bar class="" ng-class="{\'bar-positive\': !isAuth, \'bar-assertive\': isAuth}"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" ng-bind-html="title | translate"></h1><div class="buttons buttons-right"><div class="secondary-buttons"><button class="button button-icon button-clear icon ion-android-done visible-xs" ng-class="{\'button-positive\': !isAuth}" style="color: #fff" ng-click="doLogin()"></button></div></div></ion-header-bar><ion-content scroll="true"><ng-include src="::\'templates/login/form_login.html\'"></ng-include></ion-content></ion-modal-view>'),e.put("templates/login/popover_methods.html",'<ion-popover-view class="fit has-header popover-login-methods" ng-class="{\'auth\': isAuth}"><ion-header-bar><h1 class="title" translate="">LOGIN.METHOD_POPOVER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="changeMethod(\'SCRYPT_DEFAULT\')"><i class="icon ion-shuffle" style="font-size: 22px"></i> {{\'LOGIN.METHOD.SCRYPT_DEFAULT\' | translate}} </a><a class="item item-icon-left ink" ng-click="changeMethod(\'SCRYPT_ADVANCED\')"><i class="icon ion-shuffle" style="font-size: 22px"></i> <i class="icon-secondary ion-plus" style="font-size: 13px; left: 40px; margin-top: -4px"></i> {{\'LOGIN.METHOD.SCRYPT_ADVANCED\' | translate}} </a><a class="item item-icon-left ink hidden-xs" ng-click="changeMethod(\'FILE\')"><i class="icon ion-document-text"></i> {{\'LOGIN.METHOD.FILE\' | translate}} </a><a class="item item-icon-left ink" ng-if="$root.device.barcode.enable" ng-click="changeMethod(\'SCAN\')"><i class="icon ion-qr-scanner"></i> {{\'LOGIN.METHOD.SCAN\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isAuth" ng-click="changeMethod(\'PUBKEY\')"><i class="icon ion-key"></i> {{\'LOGIN.METHOD.PUBKEY\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("templates/network/item_content_peer.html",'<i class="icon ion-android-desktop" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" ng-if=":rebind:!peer.avatar"></i> <b class="icon-secondary ion-person" ng-if=":rebind:!peer.avatar" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" style="left: 26px; top: -3px"></b> <i class="avatar" ng-if="::peer.avatar" style="background-image: url(\'{{::peer.avatar.src}}\')"></i> <b class="icon-secondary assertive ion-close-circled" ng-if=":rebind:!peer.online" style="left: 37px; top: -10px"></b><div class="row no-padding"><div class="col no-padding"><h3 class="dark" ng-if=":rebind:!peer.bma.private">{{:rebind:peer.dns || peer.server}}</h3><h4 class="gray" ng-if=":rebind:peer.bma.private"><i class="ion-flash"></i> {{:locale:\'NETWORK.VIEW.PRIVATE_ACCESS\'|translate}}</h4><h4><span class="gray" ng-if=":rebind:!peer.uid"><i class="ion-key"></i> {{:rebind:peer.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:peer.uid"><i class="ion-person"></i> {{:rebind:peer.name || peer.uid}} </span><span class="gray" ng-if=":rebind:!compactMode">{{:rebind:peer.dns && (\' | \' + peer.server) + (peer.bma.path||\'\') }}</span></h4></div><div class="col col-20 no-padding text-center" ng-if="::expertMode && search.type != \'offline\'"></div><div class="col col-20 no-padding text-center"><span id="{{$index === 0 ? helptipPrefix + \'-peer-0-block\' : \'\'}}" class="badge" ng-class=":rebind:{\'badge-balanced\': peer.hasMainConsensusBlock, \'badge-energized\': peer.hasConsensusBlock, \'ng-hide\': !peer.currentNumber && !peer.blockNumber }">{{:locale:!expertMode ? (\'COMMON.BLOCK\'|translate) : \'\' }} {{:rebind:(peer.currentNumber || peer.blockNumber) | formatInteger}}</span> <span class="badge badge-secondary" ng-if=":rebind:peer.consensusBlockDelta && expertMode"><i class="ion-clock"></i>&nbsp; {{:rebind:peer.consensusBlockDelta|formatDurationTime}}</span></div></div>'),e.put("templates/network/items_peers.html",'<div class="no-padding {{::motion.ionListClass}}"><div class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-if="::isHttps && expertMode"><small><i class="icon ion-alert-circled"></i> {{:locale:\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></div><div ng-repeat="peer in search.results track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-class=":rebind:{\'compacted\': peer.compacted && compactMode}" id="{{::helptipPrefix}}-peer-{{::$index}}" ng-click="selectPeer(peer)" ng-include="::\'templates/network/item_content_peer.html\'"></div></div>'),e.put("templates/network/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>PEER.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'member\')"><i class="icon ion-person"></i> {{\'PEER.MEMBERS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'member\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'mirror\')"><i class="icon ion-radio-waves"></i> {{\'PEER.MIRRORS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'mirror\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'offline\')"><i class="icon ion-eye-disabled"></i> {{\'PEER.OFFLINE\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'offline\'"></i></a></div></ion-content></ion-popover-view>'),e.put("templates/network/modal_network.html",'<ion-modal-view id="nodes" class="modal-full-height" cache-view="false"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button><h1 class="title" translate="">PEER.PEER_LIST</h1><div class="buttons buttons-right header-item"><span class="secondary"><button class="button button-clear icon ion-loop button-clear" ng-click="refresh()"></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></span></div></ion-header-bar><ion-content><div class="list"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && search.type==\'member\'" translate="">PEER.MEMBER_PEERS</span> <span ng-if="enableFilter && search.type==\'mirror\'" translate="">PEER.MIRROR_PEERS</span> <span ng-if="!enableFilter || !search.type" translate="">PEER.ALL_PEERS</span> <span ng-if="!search.loading">({{search.results.length}})</span></h4></div><div class="pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner>&nbsp;<div class="pull-right">&nbsp;</div></div></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include></div></ion-content></ion-modal-view>'),e.put("templates/network/popover_endpoints.html",'<ion-popover-view class="popover-endpoints popover-light" style="height: {{(titleKey?30:0)+((!items || items.length &lt;= 1) ? 55 : 3+items.length*52)}}px"><ion-header-bar class="bar bar-header stable-bg" ng-if="titleKey"><div class="title">{{titleKey | translate:titleValues }}</div></ion-header-bar><ion-content scroll="false"><div class="list" ng-class="{\'has-header\': titleKey}"><div class="item item-text-wrap" ng-repeat="item in items"><div class="item-label" ng-if="item.label">{{item.label | translate}}</div><div id="endpoint_{{$index}}" class="badge item-note dark">{{item.value}}</div></div></div></ion-content></ion-popover-view>'),e.put("templates/network/popover_network.html",""),e.put("templates/network/popover_peer_info.html",""),e.put("templates/network/view_network.html",'<ion-view><ion-nav-title><span translate="">MENU.NETWORK</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refresh()"></button></ion-nav-buttons><ion-content scroll="true" ng-init="enableFilter=true; ionItemClass=\'item-border-large\';"><div class="row responsive-sm responsive-md responsive-lg"><div class="col list col-border-right"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && search.type==\'member\'" translate="">PEER.MEMBER_PEERS</span> <span ng-if="enableFilter && search.type==\'mirror\'" translate="">PEER.MIRROR_PEERS</span> <span ng-if="enableFilter && search.type==\'offline\'" translate="">PEER.OFFLINE_PEERS</span> <span ng-if="!enableFilter || !search.type" translate="">PEER.ALL_PEERS</span> <span ng-if="search.results.length">({{search.results.length}})</span><ion-spinner ng-if="search.loading" class="icon ion-spinner-small" icon="android"></ion-spinner></h4></div><div class="pull-right"><div class="pull-right" ng-if="enableFilter">&nbsp;<cs-extension-point name="network-buttons"></cs-extension-point></div></div></div><div id="helptip-network-blockchain" style="display: block"></div><div id="helptip-network-peers" style="display: block"></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include></div><div class="col col-33" ng-controller="BlockLookupCtrl"><div class="padding padding-xs" style="display: block; height: 100px"><h4 translate="">BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4></div><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></div></div></ion-content></ion-view>'),
-e.put("templates/network/view_peer.html",'<ion-view><ion-nav-title><span translate="">PEER.VIEW.TITLE</span></ion-nav-title><ion-content><div class="row no-padding"><div class="col list"><ion-item><h1><span translate="">PEER.VIEW.TITLE</span> <span class="gray">{{node.host}}</span></h1><h2 class="gray"><i class="gray icon ion-android-globe"></i> {{node.bma.dns || node.server}} <span class="gray" ng-if="!loading && node.useSsl"><i class="gray ion-locked"></i> <small>SSL</small> </span><span class="gray" ng-if="!loading && node.useTor"><i class="gray ion-bma-tor-api"></i> </span><span class="assertive" ng-if="!loading && !node.uid">({{\'PEER.MIRROR\'|translate}})</span></h2><h3><span class="dark"><i class="icon ion-android-desktop"></i> {{\'PEER.VIEW.OWNER\'|translate}} </span><a class="positive" ng-if="node.uid" ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.uid})"><i class="ion-person"></i> {{node.name || node.uid}} <span class="gray" ng-if="node.name">({{node.uid}}) </span></a><span ng-if="!loading && !node.uid"><a class="gray" ui-sref="app.wot_identity({pubkey: node.pubkey})"><i class="ion-key"></i> {{node.pubkey|formatPubkey}} <span class="gray" ng-if="node.name">({{node.name}})</span></a></span></h3><h3><a ng-click="openRawPeering($event)"><i class="icon ion-share"></i> {{\'PEER.VIEW.SHOW_RAW_PEERING\'|translate}} </a><span class="gray" ng-if="!isReachable">| </span><a ng-if="!isReachable" ng-click="openRawCurrentBlock($event)"><i class="icon ion-share"></i> <span translate="">PEER.VIEW.SHOW_RAW_CURRENT_BLOCK</span></a></h3></ion-item><div class="item item-divider" translate="">PEER.VIEW.GENERAL_DIVIDER</div><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{node.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 class="dark text-left">{{node.pubkey}}</h4></ion-item><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.view_server_block_hash({server: node.server, ssl: node.useSsl, tor: node.useTor, number: current.number, hash: current.hash})"><i class="icon ion-cube"></i> <span translate="">BLOCKCHAIN.VIEW.TITLE_CURRENT</span><div class="badge badge-calm" ng-if="!loading">{{current.number|formatInteger}}</div><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.server_blockchain({server: node.server, ssl: node.useSsl, tor: node.useTor})"><i class="icon ion-cube" style="font-size: 25px"></i> <i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px"></i> <span translate="">PEER.VIEW.LAST_BLOCKS</span> <i class="gray icon ion-ios-arrow-right"></i></a><cs-extension-point name="general"></cs-extension-point><div class="item item-divider" ng-hide="loading || !isReachable" translate="">PEER.VIEW.KNOWN_PEERS</div><ion-item class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-show="!loading && !isReachable"><small><i class="icon ion-alert-circled"></i> {{\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></ion-item><div class="item center" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div class="list no-padding {{::motion.ionListClass}}" ng-if="isReachable"><div ng-repeat="peer in :rebind:peers track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-click="selectPeer(peer)" ng-include="::\'templates/network/item_content_peer.html\'"></div></div></div></div></ion-content></ion-view>'),e.put("templates/settings/popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="reset()"><i class="icon ion-refresh"></i> {{\'SETTINGS.BTN_RESET\' | translate}} </a><a class="item item-icon-left ink" ng-click="startSettingsTour()"><i class="icon ion-easel"></i> {{\'COMMON.BTN_HELP_TOUR_SCREEN\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("templates/settings/popup_node.html",'<form name="popupForm" ng-submit=""><div class="list no-padding" ng-init="setPopupForm(popupForm)"><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': popupForm.$submitted && popupForm.newNode.$invalid}"><span class="input-label" ng-bind-html="\'SETTINGS.POPUP_PEER.HOST\'|translate"></span> <input name="newNode" type="text" placeholder="{{\'SETTINGS.POPUP_PEER.HOST_HELP\' | translate}}" ng-model="popupData.newNode" ng-minlength="3" required></div><div class="form-errors" ng-if="popupForm.$submitted && popupForm.newNode.$error" ng-messages="popupForm.newNode.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-toggle"><span class="input-label">{{\'SETTINGS.POPUP_PEER.USE_SSL\' | translate}}</span><h4><small class="gray" ng-bind-html="\'SETTINGS.POPUP_PEER.USE_SSL_HELP\' | translate"></small></h4><label class="toggle toggle-royal no-padding-right"><input type="checkbox" ng-model="popupData.useSsl"><div class="track"><div class="handle"></div></div></label></div><a class="button button-positive button-clear positive button-outline button-full button-small-padding icon-left ink no-padding" ng-click="showNodeList()"><i class="icon ion-search"></i> {{\'SETTINGS.POPUP_PEER.BTN_SHOW_LIST\' | translate}}</a></div><button type="submit" class="hide"></button></form>'),e.put("templates/settings/settings.html",'<ion-view left-buttons="leftButtons" cache-view="false" class="settings"><ion-nav-title translate="">SETTINGS.TITLE</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><div class="row no-padding responsive-sm responsive-md responsive-lg"><div class="col col-50 list item-border-large padding-left padding-right no-padding-xs no-padding-sm" style="margin-bottom: 2px"><span class="item item-divider" translate="">SETTINGS.DISPLAY_DIVIDER</span><label class="item item-input item-select"><div class="input-label" translate="">COMMON.LANGUAGE</div><select ng-model="formData.locale" ng-change="changeLanguage(formData.locale.id)" ng-options="l as l.label for l in locales track by l.id"></select></label><div class="item item-toggle dark"><div class="input-label">{{\'COMMON.BTN_RELATIVE_UNIT\' | translate}}</div><label class="toggle toggle-royal" id="helptip-settings-btn-unit-relative"><input type="checkbox" ng-model="formData.useRelative"><div class="track"><div class="handle"></div></div></label></div><div class="item item-toggle dark item-text-wrap"><div class="input-label" ng-bind-html="\'SETTINGS.ENABLE_HELPTIP\' | translate"></div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.helptip.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.STORAGE_DIVIDER</span><div class="item item-text-wrap item-toggle dark"><div class="input-label">{{\'SETTINGS.USE_LOCAL_STORAGE\' | translate}}</div><h4 class="gray" ng-bind-html="\'SETTINGS.USE_LOCAL_STORAGE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useLocalStorage"><div class="track"><div class="handle"></div></div></label></div><div class="item item-text-wrap item-toggle dark"><div class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}" ng-bind-html="\'SETTINGS.PERSIST_CACHE\' | translate"></div><h4 class="gray" ng-bind-html="\'SETTINGS.PERSIST_CACHE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.persistCache" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><cs-extension-point name="common"></cs-extension-point><span class="item item-divider">{{\'SETTINGS.AUTHENTICATION_SETTINGS\' | translate}}</span><div class="item item-toggle item-text-wrap"><div class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}">{{\'SETTINGS.REMEMBER_ME\' | translate}}</div><h4 class="gray text-wrap" ng-bind-html="\'SETTINGS.REMEMBER_ME_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.rememberMe" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><label class="item item-input item-select item-text-wrap"><div class="input-label hidden-xs"><span class="hidden-xs" translate="">SETTINGS.KEEP_AUTH</span><h4 class="gray text-wrap hidden-xs" ng-bind-html="\'SETTINGS.KEEP_AUTH_HELP\' | translate"></h4></div><span class="visible-xs" translate="">SETTINGS.KEEP_AUTH_SHORT</span><select ng-model="formData.keepAuthIdle" ng-options="i as (keepAuthIdleLabels[i].labelKey | translate:keepAuthIdleLabels[i].labelParams ) for i in keepAuthIdles track by i"></select></label></div><div class="col col-50 list item-border-large padding-left padding-right no-padding-xs no-padding-sm no-margin-xs no-margin-sm"><span class="item item-divider">{{\'SETTINGS.WALLETS_SETTINGS\' | translate}}</span><div class="item item-toggle item-text-wrap dark"><span class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}" translate="">SETTINGS.USE_WALLETS_ENCRYPTION</span><h4 class="gray text-wrap" ng-bind-html="\'SETTINGS.USE_WALLETS_ENCRYPTION_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useLocalStorageEncryption" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.HISTORY_SETTINGS</span><div class="item item-toggle item-text-wrap dark"><div class="input-label" translate="">SETTINGS.DISPLAY_UD_HISTORY</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.showUDHistory"><div class="track"><div class="handle"></div></div></label></div><cs-extension-point name="history"></cs-extension-point><span class="item item-divider" translate="">SETTINGS.NETWORK_SETTINGS</span><ion-item class="ink item-icon-right visible-xs visible-sm" ng-click="changeNode()"><div class="input-label hidden-xs" translate="">SETTINGS.PEER</div><div class="input-label visible-xs" translate="">SETTINGS.PEER_SHORT</div><ng-if ng-if="formData.node.temporary"><h4 class="gray text-wrap assertive"><b class="ion-alert-circled"></b> <span ng-bind-html="\'SETTINGS.PEER_CHANGED_TEMPORARY\' | translate "></span></h4><div class="badge badge-assertive">{{bma.server}}</div></ng-if><div class="badge badge-balanced" ng-if="!formData.node.temporary">{{bma.server}}</div><i class="icon ion-ios-arrow-right"></i></ion-item><label class="item item-input item-select item-text-wrap"><div class="input-label hidden-xs"><span translate="">SETTINGS.BLOCK_VALIDITY_WINDOW</span><h4 class="gray text-wrap hidden-xs" ng-bind-html="\'SETTINGS.BLOCK_VALIDITY_WINDOW_HELP\' | translate"></h4></div><div class="input-label visible-xs" translate="">SETTINGS.BLOCK_VALIDITY_WINDOW_SHORT</div><select ng-model="formData.blockValidityWindow" ng-options="i as (blockValidityWindowLabels[i].labelKey | translate:blockValidityWindowLabels[i].labelParams ) for i in blockValidityWindows track by i"></select></label><cs-extension-point name="network"></cs-extension-point><span class="item item-divider" ng-if="$root.config.plugins" translate="">SETTINGS.PLUGINS_SETTINGS</span><cs-extension-point name="plugins"></cs-extension-point></div></div></ion-content></ion-view>'),e.put("templates/wallet/item_tx.html",'<i class="icon item-image" ng-if="::!tx.avatar" ng-class="::{\'ion-person dark\': tx.uid, \'ion-card dark\': !tx.uid}"></i> <i class="avatar" ng-if="::tx.avatar" style="background-image: url({{::tx.avatar.src}})"></i><div class="row no-padding"><div class="col col-pubkey no-padding"><a class="" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::tx.uid">{{::tx.name||tx.uid}} </a><a class="gray" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::!tx.uid && tx.pubkey"><i class="ion-key gray"></i> {{::tx.pubkey | formatPubkey}} <span ng-if="::tx.name">- {{::tx.name | truncText:40}}</span></a><p ng-if="::tx.pubkeys" class="pubkeys"><a class="gray" ng-repeat="pubkey in ::tx.pubkeys.slice(0, 4)" ui-sref="app.wot_identity({pubkey:pubkey})"><i class="ion-key gray"></i>&nbsp;{{::pubkey | formatPubkey}} </a><span ng-if="::tx.pubkeys.length &gt; 4">...</span></p><p class="dark visible-xs comment text-italic" ng-if="::tx.comment" title="{{::tx.comment}}"><i class="ion-ios-chatbubble-outline"></i> {{::tx.comment}}<br></p><h4><a ng-if="::!pending" class="gray underline" ui-sref="app.view_block({number: tx.block_number})">{{::tx.time | medianFromNowAndDate: false}} </a><span ng-if="::pending" class="gray">{{::tx.time | medianFromNowAndDate: false}}</span></h4></div><div class="col col-50 col-comment no-padding padding-left hidden-xs" ng-if="::tx.comment"><p class="vertical-center gray text-italic" data-toggle="tooltip" title="{{::tx.comment}}">{{::tx.comment}}</p></div><div class="col col-10 no-padding"><span ng-if="::!tx.lockedOutputs" class="badge item-note" ng-class="{\'badge-calm\': tx.amount > 0, \'badge-white\': tx.amount <= 0}"><span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span> </span><a ng-if=":rebind:tx.lockedOutputs" class="badge item-note" ng-class="{\'badge-calm\': tx.amount > 0}" ng-click="showLockedOutputsPopover(tx, $event)"><b class="ion-locked"></b> <span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span></a><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":rebind:tx.amount| formatAmount:{useRelative: !$root.settings.useRelative, currency:$root.currency.name}"></span>)</div></div></div>'),e.put("templates/wallet/item_ud.html",'<i class="icon item-image ion-arrow-up-c energized"></i><div class="row no-padding"><div class="col no-padding"><span class="energized" translate>COMMON.UNIVERSAL_DIVIDEND</span><h4><a class="gray underline" ui-sref="app.view_block({number: tx.block_number})">{{::tx.time | medianFromNowAndDate}}</a></h4></div><div class="col col-10 no-padding"><span class="badge item-note badge-energized"><span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span></span><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":rebind:tx.amount| formatAmount:{useRelative: !$root.settings.useRelative, currency:$root.currency.name}"></span>)</div></div></div>'),e.put("templates/wallet/modal_security.html",'<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slides.slider.activeIndex"></button><h1 class="title hidden-xs" translate="">ACCOUNT.SECURITY.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="!isLastSlide && slides.slider.activeIndex > 0" ng-click="doNext()"><span translate="">COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-positive button-icon button-clear icon ion-android-done visible-xs" ng-click="doNext()" ng-if="isLastSlide && option === \'saveID\'"></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header padding"><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectOption(\'recoverID\')" ng-if="!login"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-ios-undo icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.RECOVER_ID</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.RECOVER_ID_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectOption(\'revocation\')" ng-if="!login"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-close icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.REVOCATION_WITH_FILE</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.REVOCATION_WITH_FILE_DESCRIPTION</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink hidden-xs" ng-click="selectOption(\'saveID\')" ng-if="login && !$root.device.enable"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b> <b class="ion-locked icon-secondary dark" style="top: 0px; left: 40px; font-size: 8px"></b><h2 translate="">ACCOUNT.SECURITY.SAVE_ID</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.SAVE_ID_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink hidden-xs" ng-click="selectOption(\'generateKeyfile\')" ng-if="login && !$root.device.enable"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-key icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.GENERATE_KEYFILE</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.GENERATE_KEYFILE_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="self()" ng-if="needSelf"><div class="item-content item-text-wrap"><i class="item-image icon ion-person dark"></i> <b class="ion-flag icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.SEND_IDENTITY</h2><h4 class="gray" ng-bind-html="::\'ACCOUNT.SECURITY.SEND_IDENTITY_HELP\' | translate"></h4></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="membershipIn()" ng-if="needMembership"><div class="item-content item-text-wrap"><i class="item-image icon ion-person dark"></i> <b class="ion-plus icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.MEMBERSHIP_IN</h2><h4 class="gray" ng-bind-html="::\'ACCOUNT.SECURITY.MEMBERSHIP_IN_HELP\' | translate"></h4></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="revokeWalletIdentity()" ng-if="canRevoke"><div class="item-content item-text-wrap"><i class="item-image icon ion-person assertive-900"></i> <b class="ion-close icon-secondary assertive-900" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.REVOCATION_WALLET</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.REVOCATION_WALLET_HELP</h4></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button></div></ion-content></ion-slide-page><ion-slide-page ng-if="option == \'revocation\'"><ng-include src="::\'templates/wallet/slides/slides_revocation_file.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'saveID\'"><ng-include src="::\'templates/wallet/slides/slides_saveID_1.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'saveID\'"><ng-include src="::\'templates/wallet/slides/slides_saveID_2.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_1.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_2.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_3.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'generateKeyfile\'"><ng-include src="::\'templates/wallet/slides/slides_generate_keyfile.html\'"></ng-include></ion-slide-page></ion-slides></ion-modal-view>'),e.put("templates/wallet/modal_transfer.html",'<ion-modal-view id="transfer" class="modal-full-height modal-transfer"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>TRANSFER.MODAL.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-header-bar><ion-content><ng-include src="::\'templates/wallet/transfer_form.html\'"></ng-include></ion-content><ion-digit-keyboard settings="digitKeyboardSettings" ng-if="digitKeyboardVisible"></ion-digit-keyboard></ion-modal-view>'),e.put("templates/wallet/new_transfer.html",'<ion-view left-buttons="leftButtons" id="transfer"><ion-nav-title><span class="visible-xs visible-sm" translate="">TRANSFER.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding-xs"><div class="col no-padding-xs"><ng-include src="::\'templates/wallet/transfer_form.html\'"></ng-include></div></div></ion-content><ion-digit-keyboard settings="digitKeyboardSettings" ng-if="digitKeyboardVisible"></ion-digit-keyboard></ion-view>'),e.put("templates/wallet/popover_actions.html",'<ion-popover-view class="fit has-header popover-wallet-actions"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left ink" ng-if="walletData.requirements.alternatives" ng-click="showSelectIdentitiesModal()"><i class="icon ion-person"></i> <b class="icon-secondary ion-loop" style="margin-top: 4px; left: 15px"></b> {{\'ACCOUNT.BTN_SELECT_ALTERNATIVES_IDENTITIES\' | translate}} </a><a class="item item-icon-left ink visible-xs visible-sm" ng-if="!walletData.requirements.needSelf && walletData.requirements.needRenew" ng-click="renewMembership()"><i class="icon ion-loop"></i> {{\'ACCOUNT.BTN_MEMBERSHIP_RENEW_DOTS\' | translate}} </a><a class="item item-icon-left assertive ink" ng-if="walletData.requirements.canMembershipOut" ng-click="membershipOut()"><i class="icon ion-log-out"></i> {{\'ACCOUNT.BTN_MEMBERSHIP_OUT_DOTS\' | translate}} </a><a class="item item-icon-left ink" ng-click="showSecurityModal()"><i class="icon ion-locked"></i> <span ng-bind-html="\'ACCOUNT.BTN_SECURITY_DOTS\' | translate"></span></a></div></ion-content></ion-popover-view>'),e.put("templates/wallet/popover_unit.html",'<ion-popover-view class="popover-unit"><ion-content scroll="false"><div class="list"><a class="item item-icon-left" ng-class="{ \'selected\': !formData.useRelative}" ng-click="closePopover(false)"><i class="icon" ng-class="{ \'ion-ios-checkmark-empty\': !formData.useRelative}"></i> <i ng-bind-html="$root.currency.name | currencySymbol:false"></i> </a><a class="item item-icon-left" ng-class="{ \'selected\': formData.useRelative}" ng-click="closePopover(true)"><i class="icon" ng-class="{ \'ion-ios-checkmark-empty\': formData.useRelative}"></i> <i ng-bind-html="$root.currency.name | currencySymbol:true"></i></a></div></ion-content></ion-popover-view>'),e.put("templates/wallet/popup_register.html",'<form name="registerForm" ng-submit=""><div class="list" ng-init="setRegisterForm(registerForm)"><label class="item item-input" ng-class="{\'item-input-error\': registerForm.$submitted && registerForm.pseudo.$invalid}"><input name="pseudo" type="text" placeholder="{{\'ACCOUNT.NEW.PSEUDO_HELP\' | translate}}" ng-model="formData.newUid" ng-minlength="3" required></label><div class="form-errors" ng-if="registerForm.$submitted && registerForm.pseudo.$error" ng-messages="registerForm.pseudo.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div></div></form>'),e.put("templates/wallet/transfer_form.html",'<form name="transferForm" novalidate="" ng-submit="doTransfer()"><div class="list no-padding-xs" ng-init="setForm(transferForm)"><ion-item class="item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" tabindex="1" ng-click="showWotLookupModal()"><span class="gray" translate="">TRANSFER.TO</span> <span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="destUid"><i class="ion-person"></i> {{destUid}} </span>&nbsp; <span class="badge badge-royal" ng-show="!destUid && formData.destPub"><i class="ion-key"></i> {{formData.destPub | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></ion-item><div class="form-errors" ng-if="form.$submitted && !formData.destPub"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ion-item class="item-text-wrap ink" ng-class="{\'item-icon-right\': enableSelectWallet}" tabindex="2" ng-click="showSelectWalletModal()"><span class="gray" translate="">TRANSFER.FROM</span> <span class="badge animate-fade-in animate-show-hide ng-hide" ng-show="!loading" ng-class="{\'badge-assertive\': (convertedBalance <= 0 || form.amount.$error.max), \'badge-balanced\': (convertedBalance > 0 && (!form.amount.$error.max)) }"><ion-spinner icon="android" ng-show="!walletData.pubkey"></ion-spinner><span ng-if="walletData.pubkey && !walletData.isMember"><i class="ion-key"></i> {{walletData.pubkey| formatPubkey}}&nbsp;&nbsp; </span><span ng-if="walletData.isMember"><i class="ion-person"></i> {{walletData.name||walletData.uid}}&nbsp;&nbsp; </span><span ng-bind-html="walletData.balance|formatAmount:{useRelative: formData.useRelative, currency:currency}"></span> </span><i class="gray icon ion-ios-arrow-right" ng-if="enableSelectWallet"></i></ion-item><ion-item class="item-input item-floating-label item-button-right" ng-class="{\'item-input-error\': form.$submitted && form.amount.$invalid}"><div class="input-label"><span translate="">TRANSFER.AMOUNT</span> (<span ng-bind-html="$root.currency.name | currencySymbol:formData.useRelative"></span>)</div><input type="text" tabindex="-1" autocomplete="off" class="hidden-no-device" name="amount" placeholder="{{::\'TRANSFER.AMOUNT_HELP\' | translate}}" ng-model="formData.amount" required number-float=""><div class="block hidden-no-device" style="position:absolute; opacity:0; z-index:100; top: 0; left: 0; height: 100%; width: 100%" tabindex="4" ng-click="showDigitKeyboard()"></div><a class="button button-clear button-stable dark ink" tabindex="-1" style="z-index:110; padding: 0px 16px" ng-click="showUnitPopover($event)"><span ng-bind-html="$root.currency.name | currencySymbol:formData.useRelative"></span> &nbsp;<b class="ion-arrow-down-b" style="font-size: 12pt"></b></a></ion-item><div class="form-errors" ng-show="form.$submitted && form.amount.$error" ng-messages="form.amount.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="numberFloat"><span translate="ERROR.FIELD_NOT_NUMBER"></span></div><div class="form-error" ng-message="numberInt"><span translate="ERROR.FIELD_NOT_INT"></span></div><div class="form-error" ng-message="min"><span translate="ERROR.FIELD_MIN" translate-values="{min: minAmount}"></span></div><div class="form-error" ng-message="max"><span translate="ERROR.NOT_ENOUGH_CREDIT"></span></div></div><a class="item item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" ng-click="showWotLookupModal(\'restPub\')" tabindex="5" ng-if="formData.all && formData.restAmount"><span class="gray"><i translate="">TRANSFER.REST</i><ng-if ng-if="formData.restAmount">(<i ng-bind-html="formData.restAmount|formatAmount:{useRelative: formData.useRelative, currency:currency}"></i>)</ng-if><i translate="">TRANSFER.REST_TO</i> </span><span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="restUid"><i class="ion-person"></i> {{restUid}} </span>&nbsp; <span class="badge badge-royal" ng-show="!restUid && formData.restPub"><i class="ion-key"></i> {{formData.restPub | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && formData.all && !formData.restPub && formData.restAmount &gt; 0"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="pull-right visible-xs visible-sm" ng-if="!formData.useComment"><a class="button button-text button-small ink" tabindex="-1" ng-click="addComment()"><i class="icon ion-plus"></i> <span translate="">TRANSFER.BTN_ADD_COMMENT</span></a></div><label class="item item-input item-floating-label visible-xs visible-sm" ng-if="formData.useComment" ng-class="{\'item-input-error\': form.$submitted && form.comment.$invalid}"><span class="input-label">{{\'TRANSFER.COMMENT\' | translate}}</span> <input type="text" placeholder="{{\'TRANSFER.COMMENT_HELP\' | translate}}" id="{{commentInputId}}" tabindex="7" name="comment" autocomplete="off" ng-model="formData.comment" ng-model-options="{ debounce: 650 }" ng-maxlength="255" ng-pattern="commentPattern" ng-focus="hideDigitKeyboard()"></label><div class="form-errors" ng-show="form.comment.$error" ng-messages="form.comment.$error"><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div></div><div class="item item-icon-left item-text-wrap item-no-border visible-xs visible-sm" ng-if="formData.useComment"><i class="icon ion-android-alert positive"></i><h4 class="positive" translate="">TRANSFER.WARN_COMMENT_IS_PUBLIC</h4></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" tabindex="-1" ng-click="cancel()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button ink" tabindex="8" ng-class="{\'button-assertive\': formData.all, \'button-positive\': !formData.all}" type="submit" translate="">TRANSFER.BTN_SEND</button></div></form>'),e.put("templates/wallet/tx_locked_outputs_popover.html",'<ion-popover-view class="fit popover-locked-outputs"><ion-header-bar><h1 class="title" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.TITLE</h1></ion-header-bar><ion-content scroll="true"><div ng-if="popoverData.lockedOuputs.length == 1" class="item item-text-wrap no-border"><h4 class="positive" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.DESCRIPTION</h4></div><div ng-if="popoverData.lockedOuputs.length > 1" class="item item-text-wrap no-border"><h4 class="positive" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.DESCRIPTION_MANY</h4></div><div ng-repeat="output in popoverData.lockedOuputs track by $index" class="item"><h2 class="gray" ng-if="popoverData.lockedOuputs.length > 1" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.LOCKED_AMOUNT</h2><div ng-if="popoverData.lockedOuputs.length > 1" class="badge item-note" ng-class="{\'badge-balanced\': output.amount > 0}"><i class="icon ion-locked"></i> <span ng-bind-html="::output.amount| formatAmount"></span> <span ng-bind-html="::unit"></span></div><div ng-repeat="condition in output.unlockConditions track by $index" class="row" ng-class="::{\'padding-top\': !$index && popoverData.lockedOuputs.length > 1}" ng-style="::condition.style"><span class="gray" ng-if="::condition.operator">{{::\'BLOCKCHAIN.VIEW.TX_OUTPUT_OPERATOR.\'+condition.operator|translate}}&nbsp;</span><div ng-if="::condition.type==\'SIG\'"><i class="icon ion-key dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.SIG\' | translate"></span> <a ng-click="goState(\'app.wot_identity\', {pubkey:condition.value})" style="text-decoration: none" class="positive">{{condition.value|formatPubkey}}</a></div><div ng-if="::condition.type==\'XHX\'"><i class="icon ion-lock-combination dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.XHX\' | translate"></span> <a copy-on-click="{{::condition.value}}" class="positive">{{::condition.value|formatPubkey}}...</a></div><div ng-if="condition.type==\'CSV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CSV\' | translate"></span> {{::condition.value|formatDuration}}</div><div ng-if="condition.type==\'CLTV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CLTV\' | translate"></span> {{::condition.value|medianDate}}</div></div></div></ion-content></ion-popover-view>'),e.put("templates/wallet/view_wallet.html",'<ion-view left-buttons="leftButtons" class="view-wallet" id="wallet"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" id="helptip-wallet-options-xs" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="refresher-positive-900-bg" bind-notifier="{ rebind:settings.useRelative, locale:$root.settings.locale.id}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="positive-900-bg hero" style="max-width: 100%; display: block"><div class="content" ng-if="!loading" style="max-width: 100%"><i class="avatar" ng-if=":rebind:!formData.avatar" ng-class=":rebind:{\'avatar-wallet\': !formData.isMember, \'avatar-member\': formData.isMember}"></i> <i class="avatar" ng-if=":rebind:formData.avatar" style="background-image: url({{:rebind:formData.avatar.src}})"></i><h3 class="light" ng-if=":rebind:!enableSelectWallet"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span></h3><h3 class="light" ng-if=":rebind:enableSelectWallet"><a class="visible-xs visible-sm" style="color: lightgray" title="{{:locale:\'ACCOUNT.SELECT_WALLET_MODAL.TITLE\'|translate}}" ng-click="showSelectWalletModal($event)"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span> <small><i class="ion-arrow-down-b"></i></small></a></h3><h4><span class="assertive" ng-if=":rebind:(formData.name || formData.uid) && !formData.isMember" translate="">WOT.NOT_MEMBER_PARENTHESIS</span><cs-extension-point name="hero"></cs-extension-point></h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><a id="wallet-share-anchor"></a><div class="visible-xs visible-sm padding text-center" ng-if="!loading && formData.requirements.needRenew"><button class="button button-raised icon-left button-stable button-small-padding ink" ng-click="renewMembership()"><i class="icon ion-loop assertive"></i> <span class="assertive">{{:locale:\'ACCOUNT.BTN_MEMBERSHIP_RENEW\' | translate}}</span></button></div><div class="row no-padding"><div class="col"><div class="list {{::motion.ionListClass}}" ng-hide="loading"><span class="item item-divider" translate="">WOT.GENERAL_DIVIDER</span><div id="helptip-wallet-pubkey" class="item item-icon-left item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click="{{:rebind:formData.pubkey}}"><i class="icon ion-key"></i> <span>{{:locale:\'COMMON.PUBKEY\'|translate}}</span><h4 id="pubkey" class="dark">{{:rebind:formData.pubkey}}</h4></div><ion-item class="item-icon-left" ng-if=":rebind:formData.sigDate||formData.uid"><i class="icon ion-calendar"></i> <span translate="">COMMON.UID</span><h5 class="dark" ng-if=":rebind:formData.sigDate"><span translate="">WOT.REGISTERED_SINCE</span> {{:rebind:formData.sigDate | medianDate}}</h5><span class="badge badge-stable">{{:rebind:formData.uid}}</span></ion-item><a id="helptip-wallet-certifications" class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="formData.isMember||formData.requirements.pendingMembership||!formData.requirements.needSelf" ng-click="showCertifications()"><i class="icon ion-ribbon-b"></i> <b ng-if="formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> {{:locale:\'ACCOUNT.CERTIFICATION_COUNT\'|translate}}<cs-badge-certification requirements="formData.requirements" parameters="::currency.parameters"></cs-badge-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a id="helptip-wallet-given-certifications" class="item item-icon-left item-text-wrap item-icon-right ink visible-xs visible-sm" ng-if="formData.isMember" ng-click="showGivenCertifications()"><i class="icon ion-ribbon-a"></i> <span translate="">WOT.GIVEN_CERTIFICATIONS.SENT</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="showTxHistory()"><i class="icon ion-card"></i> <span translate="">WOT.ACCOUNT_OPERATIONS</span> <i class="gray icon ion-ios-arrow-right"></i> </a><span class="item item-divider" ng-if="formData.events.length">{{:locale:\'ACCOUNT.EVENTS\' | translate}}</span><div class="item item-text-wrap item-icon-left item-wallet-event" ng-repeat="event in formData.events"><i class="icon" ng-class="{\'ion-information-circled royal\': event.type==\'info\',\'ion-alert-circled assertive\': event.type==\'warn\'||event.type==\'error\',\'assertive\': event.type==\'error\',\'ion-clock\': event.type==\'pending\'}"></i> <span trust-as-html="event.message | translate:event.messageParams"></span></div><cs-extension-point name="general"></cs-extension-point><cs-extension-point name="after-general"></cs-extension-point></div></div></div></ion-content></ion-view>'),e.put("templates/wallet/view_wallet_tx.html",'<ion-view left-buttons="leftButtons" class="view-wallet-tx"><ion-nav-title><span class="visible-xs visible-sm" translate="">MENU.TRANSACTIONS</span></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content scroll="true" class="refresher-positive-900-bg" bind-notifier="{ rebind:settings.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="positive-900-bg hero"><div class="content" ng-if="!loading"><h1 class="light"><span ng-bind-html=":balance:rebind:formData.balance | formatAmount:{currency: $root.currency.name}"></span></h1><h4><ng-if ng-if="!loading && $root.settings.expertMode" style="font-style: italic">(<span ng-bind-html=":balance:rebind:formData.balance | formatAmount:{useRelative:!$root.settings.useRelative, currency: $root.currency.name}"></span>)</ng-if><ng-if ng-if=":rebind:!enableSelectWallet" style="color: lightgray"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span></ng-if><ng-if ng-if=":rebind:enableSelectWallet"><a class="visible-xs visible-sm" style="color: lightgray" title="{{:locale:\'ACCOUNT.SELECT_WALLET_MODAL.TITLE\'|translate}}" ng-click="showSelectWalletModal($event)"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span> <small><i class="ion-arrow-down-b"></i></small></a></ng-if></h4><div class="helptip-anchor-center"><a id="helptip-wallet-balance">&nbsp;</a></div></div><h2 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h2></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><div class="row no-padding"><div class="col"><div class="list {{::motion.ionListClass}}"><a class="item item-icon-left item-icon-right ink" ng-if="formData.tx.errors && formData.tx.errors.length" ng-click="showTxErrors()"><i class="icon ion-alert-circled"></i> {{:locale:\'ACCOUNT.ERROR_TX\'|translate}}<div class="badge badge-assertive">{{formData.tx.errors.length}}</div><i class="gray icon ion-ios-arrow-right"></i></a><ng-if ng-if="formData.tx.pendings.length"><span class="item item-pending item-divider"><b class="ion-clock"></b> {{:locale:\'ACCOUNT.PENDING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.pendings" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><ng-if ng-if="formData.tx.validating.length"><span class="item item-pending item-divider"><b class="icon ion-checkmark" style="font-size: 12px"></b> <b class="icon-secondary ion-help" style="font-size: 12px; top: 2px; left: 11px"></b> {{:locale:\'ACCOUNT.VALIDATING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.validating" ng-init="validating=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><span class="item item-divider" ng-if="!loading"><b class="icon ion-checkmark"></b> {{:locale:\'ACCOUNT.LAST_TX\'|translate}} <a id="helptip-wallet-tx" style="position: relative; bottom: 0; right: 0px">&nbsp;</a> </span><span class="item padding" ng-if="!loading && !formData.tx.history.length"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div ng-repeat="tx in formData.tx.history" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? \'templates/wallet/item_tx.html\' : \'templates/wallet/item_ud.html\'"></div><div class="item item-text-wrap text-center" ng-if="formData.tx.fromTime > 0"><p><a ng-click="showMoreTx()">{{:locale:\'ACCOUNT.SHOW_MORE_TX\'|translate}}</a> <span class="gray" translate="ACCOUNT.TX_FROM_DATE" translate-values="{fromTime: formData.tx.fromTime}"></span> <span class="gray">|</span> <a ng-click="showMoreTx(-1)" translate="">ACCOUNT.SHOW_ALL_TX</a></p></div></div></div></div></ion-content><button id="fab-transfer" ng-show="!loading" class="button button-fab button-fab-bottom-right button-energized-900 hidden-md hidden-lg drop ng-hide" ng-click="showTransferModal()"><i class="icon ion-android-send"></i></button></ion-view>'),e.put("templates/wallet/view_wallet_tx_error.html",'<ion-view left-buttons="leftButtons" class="view-wallet-tx-error"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content scroll="true" class="refresher-top-bg" bind-notifier="{ rebind:settings.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="row no-padding"><div class="col list {{::motion.ionListClass}}"><div class="item item-divider"><span><b class="ion-clock"></b> {{:locale:\'ACCOUNT.PENDING_TX_RECEIVED\'|translate}}</span><div class="badge item-note"><span ng-if="!$root.settings.useRelative">({{$root.currency.name | abbreviate}})</span> <span ng-if="$root.settings.useRelative">({{\'COMMON.UD\' | translate}}<sub>{{$root.currency.name | abbreviate}}</sub>)</span></div></div><span class="item padding" ng-if="!loading && !hasReceivedTx()"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterReceivedTx" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div><div class="item item-divider"><span><b class="ion-close-circled"></b> {{:locale:\'ACCOUNT.ERROR_TX_SENT\'|translate}}</span><div class="badge item-note"><span ng-if="!$root.settings.useRelative">({{$root.currency.name | abbreviate}})</span> <span ng-if="$root.settings.useRelative">({{\'COMMON.UD\' | translate}}<sub>{{$root.currency.name | abbreviate}}</sub>)</span></div></div><span class="item padding" ng-if="!loading && !hasSentTx()"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterSentTx" ng-init="error=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></div></div></ion-content></ion-view>'),e.put("templates/wot/item_certification.html",'<i class="item-image" ng-if="!cert.avatar" ng-class="{\'ion-card\': !cert.isMember, \'ion-person\': cert.isMember}"></i> <i class="item-image avatar" ng-if="cert.avatar" style="background-image: url({{::cert.avatar.src}})"></i> <span ng-if="cert.isMember"><h3><i class="icon ion-clock" ng-if="cert.pending"></i> <span class="positive">{{::cert.name||cert.uid}}</span></h3><h4 class="gray"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}} <span class="gray">| {{::cert.time|medianDate}}</span> <span class="gray" ng-if="$root.settings.expertMode">| {{::cert.pending ? \'WOT.SIGNED_ON_BLOCK\' : \'WOT.WRITTEN_ON_BLOCK\' | translate:cert}}</span></h4></span><span ng-if="!cert.isMember"><h3><i class="icon ion-clock" ng-if="cert.pending"></i> <span ng-if="cert.uid" class="dark">{{::cert.name||cert.uid}} </span><span ng-if="!cert.uid" class="gray"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}}</span></h3><h5 class="assertive">{{::\'WOT.NOT_MEMBER_PARENTHESIS\'|translate}}</h5><h4 class="gray"><span ng-if="cert.uid"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}} </span><span class="gray">| {{::cert.time|medianDate}}</span> <span class="gray" ng-if="$root.settings.expertMode">| {{::cert.pending ? \'WOT.SIGNED_ON_BLOCK\' : \'WOT.WRITTEN_ON_BLOCK\' | translate:cert}}</span></h4></span><div class="badge badge-stable" ng-class="{\'badge-energized\': cert.willExpire}" ng-if="cert.expiresIn">{{::cert.expiresIn | formatDurationTo}}</div><div class="badge badge-assertive" ng-if="!cert.expiresIn">{{::\'WOT.EXPIRED\' | translate}}</div>'),e.put("templates/wot/item_content_identity.html",'<i ng-if="::!item.avatar" class="item-image icon ion-person"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2><ng-if ng-if="::item.name||item.uid" ng-bind-html="::item.name||item.uid"></ng-if><ng-if ng-if="::!item.name && !item.uid">{{::item.pubkey|formatPubkey}}</ng-if></h2><h4 class="gray" ng-class="{\'pull-right\': !smallscreen}" ng-if="::item.sigDate"><i class="ion-clock"></i> {{::\'WOT.LOOKUP.REGISTERED\' | translate:item }}</h4><h4 class="gray" ng-class="{\'pull-right\': !smallscreen}" ng-if="item.memberDate"><i class="ion-clock"></i> {{::\'WOT.LOOKUP.MEMBER_FROM\' | translate:item}}</h4><h4 class="gray"><span class="positive" ng-if="::item.name && item.uid"><i class="ion-person"></i> {{::item.uid}}&nbsp; </span><b class="ion-key"></b> {{::item.pubkey | formatPubkey}} <span ng-if="::(!item.uid && !item.revoked)" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span> <span ng-if="::item.revoked" class="assertive" translate>WOT.IDENTITY_REVOKED_PARENTHESIS</span></h4><h4 ng-if="::item.events||item.tags"><span ng-repeat="event in ::item.events" class="assertive"><i class="ion-alert-circled" ng-if="::!item.valid"></i> <span ng-bind-html="::event.message|translate:event.messageParams"></span> </span><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>'),e.put("templates/wot/items_given_certifications.html",'<div class="list given-certifications" ng-class="::motions.givenCertifications.ionListClass"><span class="item item-divider hidden-xs"><span translate>WOT.GIVEN_CERTIFICATIONS.SUMMARY</span></span><div id="helptip-certs-stock" class="item item-icon-left item-text-wrap ink"><i class="icon ion-ribbon-a"></i> <span translate>WOT.GIVEN_CERTIFICATIONS.SENT</span><cs-badge-given-certification identity="formData" parameters="$root.currency.parameters"></cs-badge-given-certification></div><div class="item item-icon-left item-text-wrap ink" ng-if="formData.given_cert_error.length"><i class="icon ion-alert-circled"></i> <span translate>WOT.GIVEN_CERTIFICATIONS.ERROR</span> <span class="badge badge-assertive">{{formData.given_cert_error.length}}</span></div><span class="item item-divider" ng-if="formData.given_cert_pending.length"><span translate>WOT.GIVEN_CERTIFICATIONS.PENDING_LIST</span><div class="badge item-note" style="text-align: right !important" translate>WOT.NOT_WRITTEN_EXPIRE_IN</div></span><a class="item item-avatar ink" ng-repeat="cert in formData.given_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a><span class="item item-divider"><span translate>WOT.GIVEN_CERTIFICATIONS.LIST</span><div class="badge item-note" translate>WOT.EXPIRE_IN</div></span><span class="item gray" ng-if="!formData.given_cert.length" translate>WOT.NO_GIVEN_CERTIFICATION </span><a class="item item-avatar ink" ng-repeat="cert in formData.given_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a></div>'),e.put("templates/wot/items_received_certifications.html",'<div class="list certifications" ng-class="::motions.receivedCertifications.ionListClass"><span class="item item-divider hidden-xs"><span translate>WOT.CERTIFICATIONS.SUMMARY</span></span><div id="helptip-received-certs" class="item item-icon-left item-text-wrap ink"><i class="icon ion-ribbon-b"></i> <b ng-if="formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span translate>WOT.CERTIFICATIONS.RECEIVED</span><h4 class="gray" ng-if="formData.requirements.isSentry" translate>WOT.CERTIFICATIONS.SENTRY_MEMBER</h4><cs-badge-certification cs-id="helptip-wot-view-certifications-count" requirements="formData.requirements" parameters="$root.currency.parameters"></cs-badge-certification></div><div class="item item-icon-left item-text-wrap ink" ng-if="formData.received_cert_error.length"><i class="icon ion-alert-circled"></i> <span translate>WOT.CERTIFICATIONS.ERROR</span> <span class="badge badge-assertive">{{formData.received_cert_error.length}}</span></div><span class="item item-divider" ng-if="formData.received_cert_pending.length"><span translate>WOT.CERTIFICATIONS.PENDING_LIST</span><div class="badge item-note" style="text-align: right !important" translate>WOT.NOT_WRITTEN_EXPIRE_IN</div></span><a class="item item-avatar ink" ng-repeat="cert in formData.received_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a><span class="item item-divider"><span translate>WOT.CERTIFICATIONS.LIST</span><div class="badge item-note" translate>WOT.EXPIRE_IN</div></span><span class="item gray" ng-if="!formData.received_cert.length" translate>WOT.NO_CERTIFICATION</span> <a class="item item-avatar ink" ng-repeat="cert in formData.received_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a></div>'),e.put("templates/wot/lookup.html",'<ion-view left-buttons="leftButtons"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'WOT.LOOKUP.TITLE\'|translate}}" icon="ion-person-stalker" ui-sref="app.wot_lookup.tab_search"><ion-nav-view name="tab"></ion-nav-view></ion-tab><cs-extension-point name="tabs"></cs-extension-point></ion-tabs></ion-view>'),e.put("templates/wot/lookup_form.html",'<div class="lookupForm"><div class="item no-padding"><div class="double-padding-x padding-top-xs item-text-wrap" ng-if="::allowMultiple" style="height: 36px"><div class="gray padding-top" ng-if="!selection.length && parameters.help">{{::parameters.help|translate}}</div><div ng-repeat="identity in selection track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><span ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></span> <i class="icon ion-close" ng-click="removeSelection(identity, $event)">&nbsp;&nbsp;</i></div></div><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'WOT.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearchText()" select-on-click=""><div class="helptip-anchor-center"><a id="helptip-wot-search-text"></a></div></div></div><div class="padding-top padding-xs padding-sm" style="display: block; height: 60px" ng-class="::{\'hidden-xs hidden-sm\': !showResultLabel}"><div class="pull-left" ng-if="!search.loading && showResultLabel"><ng-if ng-if="search.type==\'newcomers\'"><h4 translate="">WOT.LOOKUP.NEWCOMERS</h4><small class="gray no-padding" ng-if="search.total">{{\'WOT.LOOKUP.NEWCOMERS_COUNT\'|translate:{count: search.total} }}</small></ng-if><ng-if ng-if="search.type==\'pending\'"><h4 translate="">WOT.LOOKUP.PENDING</h4><small class="gray no-padding" ng-if="search.total">{{\'WOT.LOOKUP.PENDING_COUNT\'|translate:{count: search.total} }}</small></ng-if><h4 ng-if="search.type==\'text\'"><span translate="">COMMON.RESULTS_LIST</span> <small class="gray" ng-if="search.total">({{search.total}})</small></h4></div></div><div class="text-center padding-top" ng-if="search.loading"><p class="gray" ng-if="::$root.currency.initPhase" translate="">WOT.SEARCH_INIT_PHASE_WARNING</p><ion-spinner icon="android"></ion-spinner></div><ng-if ng-if="!search.loading"><div class="assertive padding" ng-if="!search.results.length"><span ng-if="search.type==\'text\'" translate="">COMMON.SEARCH_NO_RESULT</span> <span ng-if="search.type==\'pending\'" translate="">WOT.LOOKUP.NO_PENDING</span> <span ng-if="search.type==\'newcomers\'" translate="">WOT.LOOKUP.NO_NEWCOMERS</span></div><ion-list ng-if="::!allowMultiple && $root.device.enable" class="{{::motion.ionListClass}}" can-swipe="true"><ng-repeat ng-repeat="item in search.results track by item.id"><div ng-if="::item.divider" class="item item-divider" id="helptip-wot-search-result-{{$index}}">{{::(\'WOT.SEARCH.DIVIDER_\' + item.index)|upper|translate}}</div><ion-item ng-if="::!item.divider" id="helptip-wot-search-result-{{$index}}" class="item item-border-large item-avatar item-icon-right ink" ng-click="::select(item)"><ng-include src="item.templateUrl || \'templates/wot/item_content_identity.html\'"></ng-include><i class="icon ion-ios-arrow-right"></i><ion-option-button class="button-positive" ng-click="showTransferModal({pubkey: item.pubkey, uid: item.name ||item.uid})" translate="">COMMON.BTN_SEND_MONEY_SHORT</ion-option-button></ion-item></ng-repeat></ion-list><div ng-if="::allowMultiple" class="list {{::motion.ionListClass}}"><ion-checkbox ng-repeat="item in search.results track by item.id" ng-model="item.checked" class="item item-border-large item-avatar ink" ng-click="toggleCheck($index, $event)"><ng-include src="::\'templates/wot/item_content_identity.html\'"></ng-include></ion-checkbox></div><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="20%"></ion-infinite-scroll></ng-if></div>'),e.put("templates/wot/lookup_lg.html",'<ion-view><ion-nav-title>{{\'MENU.WOT\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-qr-scanner hidden-no-device" ng-if="$root.device.barcode.enable" ng-click="scanQrCode()"></button> <button class="button button-icon button-clear visible-xs visible-sm" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content class="padding no-padding-x no-padding-sm" scroll="true"><cs-extension-point name="top"></cs-extension-point><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/wot/lookup_popover_actions.html",'<ion-popover-view class="fit has-header visible-sm visible-xs"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-if="enableWallets" ng-click="doGetWallets()"><i class="icon ion-card"></i> {{\'MENU.WALLETS\' | translate}} </a><a class="item item-icon-left ink" ng-click="doGetNewcomers()"><i class="icon ion-person"></i> {{\'WOT.LOOKUP.BTN_NEWCOMERS\' | translate}} </a><a class="item item-icon-left ink" ng-click="doGetPending()"><i class="icon ion-clock"></i> {{\'WOT.LOOKUP.BTN_PENDING\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("templates/wot/modal_lookup.html",'<ion-modal-view id="wotLookup" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title hidden-xs">{{::parameters.title?parameters.title:\'WOT.MODAL.TITLE\'|translate}}</h1><button class="button button-clear icon-right visible-xs ink" ng-if="allowMultiple && selection.length" ng-click="closeModal(selection)">{{::parameters.okText||\'COMMON.BTN_NEXT\' | translate}} <i ng-if="::!parameters.okText||parameters.okIcon" class="icon {{::parameters.okIcon||\'ion-ios-arrow-right\'}}"></i></button></ion-header-bar><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="visible-xs visible-sm text-right stable-bg stable"><button class="button button-icon button-small-padding dark hidden-no-device ink" ng-if="$root.device.barcode.enable" ng-click="scanQrCode()"><i class="icon ion-qr-scanner"></i></button> <button class="button button-icon button-small-padding dark ink" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></div><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-modal-view>'),e.put("templates/wot/modal_select_pubkey_identity.html",'<ion-modal-view id="transfer" class="modal-full-height modal-transfer"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.SELECT_IDENTITY_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true"><div class="padding"><p trust-as-html="\'ACCOUNT.SELECT_IDENTITY_MODAL.HELP\'|translate:{pubkey: pubkey}"></p></div><ion-list><ion-item class="item-avatar item-icon-right" ng-repeat="item in identities" ng-click="closeModal(item)"><i class="item-image icon ion-person"></i><h2>{{item.uid}}</h2><h4 class="gray"><b class="ion-key"></b> {{::item.pubkey | formatPubkey}} <span ng-if="::!item.revoked && !item.pendingRevocation && !item.isMember" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span> <span ng-if="::item.revoked || item.pendingRevocation" class="assertive bold" translate>WOT.IDENTITY_REVOKED_PARENTHESIS</span> <span ng-if="::item.meta.invalid" class="assertive" translate>ERROR.WOT_PENDING_INVALID_BLOCK_HASH</span></h4><h4 class="dark" ng-if="::item.meta.time"><i class="ion-calendar"></i> <span translate>WOT.REGISTERED_SINCE</span> {{::item.meta.time|medianDate}}</h4><ng-if ng-if="::!item.revoked && !item.pendingRevocation && (item.certificationCount || item.pendingCertificationCount)"><cs-badge-certification requirements="item" parameters="$root.currency.parameters"></cs-badge-certification><div class="gray badge badge-secondary hidden-xs"><span translate>ACCOUNT.CERTIFICATION_COUNT</span></div></ng-if><i class="icon ion-ios-arrow-right"></i></ion-item></ion-list></ion-content></ion-modal-view>'),e.put("templates/wot/view_certifications.html",'<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm">{{::formData.name||formData.uid}}</span></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content class="certifications certifications-lg"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate()"></ion-refresher><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="row responsive-sm responsive-md responsive-lg"><div class="col no-padding" ng-if="motions.receivedCertifications.enable"><ng-include src="::\'templates/wot/items_received_certifications.html\'"></ng-include></div><div class="col no-padding" ng-if="motions.givenCertifications.enable"><ng-include src="::\'templates/wot/items_given_certifications.html\'"></ng-include></div></div></ion-content><div class="visible-xs visible-sm"><button id="fab-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canCertify && !alreadyCertified" ng-click="certify()"><i class="icon ion-ribbon-b"></i></button> <button id="fab-select-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canSelectAndCertify" ng-click="selectAndCertify()"><i class="icon ion-plus"></i></button></div></ion-view>'),e.put("templates/wot/view_identity.html",'<ion-view left-buttons="leftButtons" class="view-identity"><ion-nav-title></ion-nav-title><ion-content scroll="true" ng-class="{\'member\': !loading && formData.isMember}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="hero"><div class="content" ng-if="!loading"><i class="avatar" ng-if=":rebind:!formData.avatar" ng-class="{\'avatar-wallet\': !formData.isMember, \'avatar-member\': formData.isMember}"></i> <i class="avatar" ng-if=":rebind:formData.avatar" style="background-image: url({{::formData.avatar.src}})"></i><ng-if ng-if=":rebind:formData.name"><h3 class="light">{{::formData.name}}</h3></ng-if><ng-if ng-if=":rebind:!formData.name"><h3 class="light" ng-if=":rebind:formData.uid">{{:rebind:formData.uid}}</h3><h3 class="light" ng-if=":rebind:!formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</h3></ng-if><h4><ng-if class="assertive" ng-if=":rebind:(formData.name || formData.uid) && !formData.isMember && revoked" translate="">WOT.IDENTITY_REVOKED_PARENTHESIS</ng-if><ng-if class="assertive" ng-if=":rebind:(formData.name || formData.uid) && formData.isMember && revoked" translate="">WOT.MEMBER_PENDING_REVOCATION_PARENTHESIS</ng-if><cs-extension-point name="hero"></cs-extension-point></h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><a id="wot-share-anchor-{{::formData.pubkey}}"></a><div class="visible-xs visible-sm"><button id="fab-certify-{{:rebind:formData.uid}}" class="button button-fab button-fab-top-left button-fab-hero button-calm spin" ng-if=":rebind:(canCertify && !alreadyCertified)" ng-click="certify()"><i class="icon ion-ribbon-b"></i></button><cs-extension-point name="buttons-top-fab"></cs-extension-point></div><div class="row no-padding"><div class="col list {{::motion.ionListClass}}" bind-notifier="{ rebind:loading}"><span class="item item-divider" translate="">WOT.GENERAL_DIVIDER</span><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{:rebind:formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 id="pubkey" class="dark text-left">{{:rebind:formData.pubkey}}</h4></ion-item><div class="item item-icon-left item-text-wrap" ng-if=":rebind:!formData.hasSelf"><i class="icon ion-ios-help-outline positive"></i> <span translate="">WOT.NOT_MEMBER_ACCOUNT</span><h4 class="gray" translate="">WOT.NOT_MEMBER_ACCOUNT_HELP</h4></div><ion-item class="item-icon-left" ng-if=":rebind:formData.sigDate||formData.uid"><i class="icon ion-calendar"></i> <span translate="">COMMON.UID</span><h5 class="dark" ng-if=":rebind:formData.sigDate "><span translate="">WOT.REGISTERED_SINCE</span> {{:rebind:formData.sigDate|medianDate}}</h5><span class="badge badge-energized">{{:rebind:formData.uid}}</span></ion-item><a id="helptip-wot-view-certifications" class="item item-icon-left item-text-wrap item-icon-right ink" ng-if=":rebind:formData.hasSelf" ng-click="showCertifications()"><i class="icon ion-ribbon-b"></i> <b ng-if=":rebind:formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span translate="">ACCOUNT.CERTIFICATION_COUNT</span><cs-badge-certification cs-id="helptip-wot-view-certifications-count" requirements="formData.requirements" parameters="{sigQty: formData.sigQty}"></cs-badge-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink visible-xs visible-sm" ng-if=":rebind:formData.hasSelf && formData.isMember" ng-click="showGivenCertifications()"><i class="icon ion-ribbon-a"></i> <span translate="">WOT.GIVEN_CERTIFICATIONS.SENT</span><cs-badge-given-certification identity="formData" parameters="$root.currency.parameters"></cs-badge-given-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right ink" ng-if="!loading" ui-sref="app.wot_identity_tx_uid({uid:formData.uid,pubkey:formData.pubkey})"><i class="icon ion-card"></i> <span translate="">WOT.ACCOUNT_OPERATIONS</span> <i class="gray icon ion-ios-arrow-right"></i></a><div class="item item-text-wrap item-icon-left item-wallet-event" ng-class="{\'assertive\': event.type==\'error\'}" ng-repeat="event in :rebind:formData.events"><i class="icon" ng-class="{\'ion-information-circled royal\': event.type==\'info\',\'ion-alert-circled\': event.type==\'warn\'||event.type==\'error\',\'assertive\': event.type==\'error\',\'ion-clock\': event.type==\'pending\'}"></i> <span trust-as-html="event.message | translate:event.messageParams"></span></div><cs-extension-point name="general"></cs-extension-point><cs-extension-point name="after-general"></cs-extension-point></div></div></ion-content><div class="visible-xs visible-sm" ng-hide="loading"><button id="fab-transfer" class="button button-fab button-fab-bottom-right button-assertive drop" ng-click="showTransferModal({pubkey:formData.pubkey, uid: formData.uid})"><i class="icon ion-android-send"></i></button></div></ion-view>'),e.put("templates/wot/view_identity_tx.html",'<ion-view left-buttons="leftButtons" class="view-identity-tx"><ion-nav-title><span class="visible-xs visible-sm" ng-if="!loading"><span ng-if="formData.name || formData.uid">{{formData.name || formData.uid}} </span><span ng-if="!formData.name && !formData.uid"><i class="ion-key"></i> {{formData.pubkey|formatPubkey}}</span></span></ion-nav-title><ion-content scroll="true"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list {{motion.ionListClass}}" ng-if="!loading"><div class="row"><div class="col"><div class="item item-tx item-divider">{{:locale:\'ACCOUNT.BALANCE_ACCOUNT\'|translate}}<div class="badge item-note" ng-class=":balance:{\'badge-assertive\': formData.balance <= 0, \'badge-balanced\': formData.balance > 0 }" ng-bind-html=":balance:formData.balance|formatAmount:{currency: $root.currency.name}"></div><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":balance:formData.balance| formatAmount: {useRelative: !$root.settings.useRelative, currency: $root.currency.name} "></span>)</div></div><div class="item item-icon-left" ng-if="formData.tx.errors.length"><i class="icon ion-alert-circled"></i> {{:locale:\'ACCOUNT.ERROR_TX\'|translate}}<div class="badge badge-assertive">{{formData.tx.errors.length}}</div></div><ng-if ng-if="formData.tx.pendings.length"><span class="item item-pending item-divider"><i class="ion-clock"></i> {{:locale:\'ACCOUNT.PENDING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.pendings" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><ng-if ng-if="formData.tx.validating.length"><span class="item item-pending item-divider">{{:locale:\'ACCOUNT.VALIDATING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.validating" ng-init="validating=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><span class="item item-divider" ng-if="!loading">{{:locale:\'ACCOUNT.LAST_TX\'|translate}} <a id="helptip-wallet-tx" style="position: relative; bottom: 0; right: 0px">&nbsp;</a></span><div ng-repeat="tx in formData.tx.history" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? \'templates/wallet/item_tx.html\' : \'templates/wallet/item_ud.html\'"></div><div class="item item-text-wrap text-center" ng-if="formData.tx.fromTime > 0"><p><a ng-click="showMoreTx()">{{:locale:\'ACCOUNT.SHOW_MORE_TX\'|translate}}</a> <span class="gray" translate="ACCOUNT.TX_FROM_DATE" translate-values="{fromTime: formData.tx.fromTime}"></span> <span class="gray">|</span> <a ng-click="showMoreTx(-1)" translate="">ACCOUNT.SHOW_ALL_TX</a></p></div></div></div></div></ion-content></ion-view>'),e.put("templates/currency/tabs/tab_blocks.html",'<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-navicon visible-xs visible-sm" ng-click="toggleCompactMode()"><b class="icon-secondary" ng-class="{\'ion-arrow-down-b\': !compactMode, \'ion-arrow-up-b\': compactMode}" style="top: -12px; left: 11px; font-size: 10px"></b> <b class="icon-secondary" ng-class="{\'ion-arrow-up-b\': !compactMode,\'ion-arrow-down-b\': compactMode}" style="top: 12px; left: 11px; font-size: 10px"></b></button><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><div class="item item-divider"><span translate>BLOCKCHAIN.LOOKUP.LAST_BLOCKS</span></div><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/currency/tabs/tab_network.html",'<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear" ng-click="showExtendActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refreshPeers()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_network.html\'"></ng-include></div></ion-content></ion-view>'),e.put("templates/currency/tabs/tab_parameters.html",'<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_parameters.html\'"></ng-include></div></ion-content></ion-view>'),e.put("templates/currency/tabs/tab_wot.html",'<ion-view><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_wot.html\'"></ng-include></div></ion-content></ion-view>'),e.put("templates/wallet/list/item_wallet.html",'<div class="item item-avatar item-icon-right item-border-large item-wallet ink" id="wallet-{{::wallet.id}}" ng-click="select($event, wallet)" ng-init="walletData=wallet.data;"><i ng-if=":rebind:!walletData.avatar" class="item-image icon" ng-class=":rebind:{\'ion-card\': !walletData.isMember, \'ion-person\': walletData.isMember}"></i> <i ng-if=":rebind:walletData.avatar" class="item-image avatar" style="background-image: url({{::walletData.avatar.src}})"></i><div class="badge badge-button badge-avatar badge-assertive ion-locked" ng-hide=":rebind:wallet.isAuth()"></div><h2><span class="text-editable" ng-click="editWallet($event, wallet)" title="{{\'ACCOUNT.WALLET_LIST.BTN_RENAME\'|translate}}"><ng-if ng-if=":rebind:walletData.localName||walletData.name||walletData.uid" ng-bind-html="::walletData.localName||walletData.name||walletData.uid"></ng-if><ng-if ng-if=":rebind:!walletData.localName && !walletData.name && !walletData.uid">{{::walletData.pubkey|formatPubkey}}</ng-if></span></h2><h4 class="gray"><span class="positive" ng-if="::walletData.name && walletData.uid"><i class="ion-person"></i> {{::walletData.uid}}&nbsp; </span><b class="ion-key"></b> {{::walletData.pubkey | formatPubkey}} <span ng-if="::!walletData.uid" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span></h4><cs-extension-point name="item-wallet"></cs-extension-point><span class="badge" ng-if=":rebind:formData.showBalance && walletData.sources" ng-class=":rebind:{\'badge-calm\': (walletData.balance > 0) }"><ion-spinner class="ion-spinner-small" ng-if="formData.updatingWalletId==wallet.id" icon="android"></ion-spinner><span ng-bind-html=":rebind:walletData.balance|formatAmount:{useRelative: formData.useRelative, currency: currency}"></span> </span><i class="icon ion-ios-arrow-right"></i></div>'),e.put("templates/wallet/list/item_wallet_light.html",'<div class="item item-avatar item-icon-right item-border item-wallet" ng-click="select($event, wallet)" ng-init="walletData=wallet.data;"><i ng-if="::!walletData.avatar" class="item-image icon" ng-class="::{\'ion-card\': !walletData.isMember, \'ion-person\': walletData.isMember}"></i> <i ng-if="::walletData.avatar" class="item-image avatar" style="background-image: url({{::walletData.avatar.src}})"></i><div class="badge badge-button badge-avatar badge-assertive ion-locked" ng-hide="::wallet.isAuth()"></div><h2><ng-if ng-if="::walletData.localName||walletData.name||walletData.uid">{{::walletData.localName||walletData.name||walletData.uid}}</ng-if><ng-if ng-if="::!walletData.localName && !walletData.name && !walletData.uid">{{::walletData.pubkey|formatPubkey}}</ng-if></h2><h4 class="gray"><span class="positive" ng-if="::walletData.name && walletData.uid"><i class="ion-person"></i> {{::walletData.uid}}&nbsp; </span><b class="ion-key"></b> {{::walletData.pubkey | formatPubkey}} <span ng-if="::!walletData.uid" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span></h4><div class="badge" ng-if="formData.showBalance" ng-class="{\'badge-calm\': (walletData.balance > 0) }"><span ng-bind-html="walletData.balance|formatAmount:{useRelative: formData.useRelative, currency: currency}"></span></div><i class="icon ion-ios-arrow-right"></i></div>'),e.put("templates/wallet/list/modal_import_file.html",'<ion-modal-view id="transfer" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.WALLET_LIST.IMPORT_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true" class="padding"><p translate>ACCOUNT.WALLET_LIST.IMPORT_MODAL.HELP</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".csv,.txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right stable-bg"><i class="icon ion-document-text gray"></i><div class="item-content row"><div class="col"><h2>{{fileData.name}}</h2><h4 ng-if="fileData.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{fileData.lastModified/1000|formatDate}}</h4><h5><span class="gray" translate>COMMON.FILE.SIZE</span> {{fileData.size|formatInteger}} Ko</h5></div><div class="col padding-left"><h3 ng-if="validatingFile" translate>COMMON.FILE.VALIDATING</h3><h3 ng-if="!validatingFile"><span class="dark animate-show-hide ng-hide" ng-show="isValidFile && content.length" ng-bind-html="\'ACCOUNT.WALLET_LIST.IMPORT_MODAL.WALLET_COUNT\'|translate:{count: content.length}"></span> <span class="assertive animate-show-hide ng-hide" ng-show="isValidFile && !content.length"><br><i class="ion-close-circled assertive"></i> {{\'ACCOUNT.WALLET_LIST.IMPORT_MODAL.NO_NEW_WALLET\' |translate}} </span><span class="assertive animate-show-hide ng-hide" ng-show="!isValidFile"><br><i class="ion-close-circled assertive"></i> {{\'ERROR.INVALID_FILE_FORMAT\' |translate}}</span></h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="removeFile()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-disabled="loading || !content.length" ng-click="closeModal(content)" translate>COMMON.BTN_IMPORT</button></div></ion-content></ion-modal-view>'),e.put("templates/wallet/list/modal_wallets.html",'<ion-modal-view id="transfer" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.SELECT_WALLET_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!loading && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list ng-if="!loading" class="{{::motion.ionListClass}}"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet.html\'"></ng-include><ng-repeat ng-repeat="wallet in wallets track by wallet.id" ng-include="::\'templates/wallet/list/item_wallet_light.html\'"></ng-repeat></ion-list></ion-content></ion-modal-view>'),e.put("templates/wallet/list/popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><button class="item item-icon-left ink" ng-class="{\'gray\': loading || !wallets.length, \'assertive\': !loading && wallets.length}" ng-disabled="loading || !wallets.length" ng-click="selectAndRemoveWallet()"><i class="icon ion-trash-a"></i> {{\'ACCOUNT.WALLET_LIST.BTN_DELETE\' | translate}}</button></div></ion-content></ion-popover-view>'),e.put("templates/wallet/list/popover_wallets.html",'<ion-popover-view class="fit popover-wallets popover-light"><ion-header-bar class="stable-bg block"><div class="title" translate>ACCOUNT.SELECT_WALLET_MODAL.TITLE</div><div class="pull-right"><a class="positive" ng-click="showNewWalletModal()" translate>ACCOUNT.WALLET_LIST.BTN_NEW</a></div></ion-header-bar><ion-content scroll="true"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!loading && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list ng-if="!loading"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet_light.html\'"></ng-include><ng-repeat ng-repeat="wallet in :rebind:wallets | filter:filterFn(formData) track by wallet.id" ng-include="::\'templates/wallet/list/item_wallet_light.html\'"></ng-repeat></ion-list></ion-content><ion-footer-bar class="stable-bg block"><div class="pull-right"><a class="positive" ui-sref="app.view_wallets" ng-click="closePopover()" translate>COMMON.NOTIFICATIONS.SHOW_ALL</a></div></ion-footer-bar></ion-popover-view>'),e.put("templates/wallet/list/popup_edit_name.html",'<form name="editForm" ng-submit=""><div class="list" ng-init="setEditForm(editForm)"><label class="item item-input" ng-class="{\'item-input-error\': editForm.$submitted && editForm.name.$invalid}"><input name="name" type="text" placeholder="{{\'ACCOUNT.WALLET_LIST.EDIT_POPOVER.NAME_HELP\' | translate}}" ng-model="formData.name" ng-minlength="3" required></label><div class="form-errors" ng-if="editForm.$submitted && editForm.name.$error" ng-messages="editForm.name.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div></div></form>'),e.put("templates/wallet/list/view_wallets.html",'<ion-view left-buttons="leftButtons" class="view-wallet-list"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="padding no-padding-xs no-padding-sm" bind-notifier="{ rebind:formData.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true, $event)"></ion-refresher><div class="center padding gray" ng-if="!loading && wallets && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list class="{{::motion.ionListClass}}"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet.html\'"></ng-include><ng-include ng-repeat="wallet in wallets track by wallet.id" src="\'templates/wallet/list/item_wallet.html\'"></ng-include></ion-list><div class="center padding visible-xs visible-sm" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div></ion-content><button id="fab-add-wallet" class="button button-fab button-fab-bottom-right button-assertive hidden-md hidden-lg drop ng-hide" ng-show="!loading" ng-click="showNewWalletModal()"><i class="icon ion-plus"></i></button></ion-view>'),e.put("templates/wallet/slides/slides_generate_keyfile.html",'<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.GENERATE_KEYFILE</h3><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'PubSec\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.PUBSEC_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.PUBSEC_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'WIF\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.WIF_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.WIF_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'EWIF\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b> <b class="ion-locked icon-secondary dark" style="top: 0px; left: 43px; font-size: 8px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.EWIF_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.EWIF_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></div></ion-content>'),e.put("templates/wallet/slides/slides_recoverID_1.html",'<ion-content class="has-header padding"><p translate>ACCOUNT.SECURITY.RECOVER_ID_SELECT_FILE</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right"><i class="icon ion-document-text dark"></i><div class="item-content row"><div class="col"><span>{{fileData.name}}</span><br><small>{{fileData.size}} Ko</small></div><div class="col-10"><b ng-class="{\'ion-close-circled assertive\': !isValidFile}" style="font-size: 28px; position: relative; top: 6px"></b></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="restore()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doNext()" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></ion-content>'),e.put("templates/wallet/slides/slides_recoverID_2.html",'<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.RECOVER_ID</h3><form name="recoverForm" novalidate ng-submit="recoverId()"><div class="list" ng-init="setForm(recoverForm, \'recoverForm\')"><ng-repeat ng-repeat="question in recover.questions "><label class="item item-input {{smallscreen ? \'item-stacked-label\' : \'item-floating-label\'}}" ng-class="{\'item-input-error\': recoverForm.$submitted && recoverForm[\'question{{$index}}\'].$invalid}"><span class="input-label" style="{{smallscreen ? \'white-space: normal\' : \'\'}}">{{question.value }}</span> <input type="text" autocomplete="off" name="question{{$index}}" placeholder="{{smallscreen ? \'\' : question.value }}" ng-model="question.answer" required></label><div class="form-errors" ng-show="recoverForm.$submitted && recoverForm[\'question{{$index}}\'].$error" ng-messages="recoverForm[\'question{{$index}}\'].$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></ng-repeat><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_CLEAN</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content>'),e.put("templates/wallet/slides/slides_recoverID_3.html",'<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.RECOVER_ID</h3><div class="item item-input"><span class="input-label">{{\'LOGIN.SALT\' | translate}} :</span> <span>{{recover.salt}}</span></div><div class="item item-input"><span class="input-label">{{\'LOGIN.PASSWORD\' | translate}} :</span> <span>{{recover.pwd}}</span></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CLOSE</button></div></ion-content>'),e.put("templates/wallet/slides/slides_revocation_file.html",'<ion-content class="has-header padding"><p translate>ACCOUNT.SECURITY.REVOCATION_WITH_FILE_HELP</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right"><i class="icon ion-document-text dark"></i><div class="row"><div class="col"><h2>{{fileData.name}}</h2><h4 ng-if="fileData.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{fileData.lastModified/1000|formatDate}}</h4><h5><span class="gray" translate>COMMON.FILE.SIZE</span> {{fileData.size|formatInteger}} Ko</h5></div><div class="col padding-left"><h3 class="assertive animate-show-hide ng-hide" ng-show="!isValidFile"><br><i class="ion-close-circled assertive"></i> {{revocationError|translate}}</h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="restore()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="revokeWithFile()" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></ion-content>'),e.put("templates/wallet/slides/slides_saveID_1.html",'<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.SAVE_ID</h3><label class="item item-input item-select"><div class="input-label" translate>ACCOUNT.SECURITY.LEVEL</div><select ng-model="formData.level"><option value="2" ng-bind-html="\'ACCOUNT.SECURITY.LOW_LEVEL\' | translate"></option><option value="4" translate>ACCOUNT.SECURITY.MEDIUM_LEVEL</option><option value="6" translate>ACCOUNT.SECURITY.STRONG_LEVEL</option></select></label><div class="padding-top" translate="ACCOUNT.SECURITY.HELP_LEVEL" translate-values="{nb: {{formData.level}}}"></div><form name="questionsForm" novalidate ng-submit="doNext(\'questionsForm\')"><div class="list" ng-init="setForm(questionsForm, \'questionsForm\')"><ion-checkbox ng-repeat="question in formData.questions" ng-model="question.checked" ng-required="isRequired()"><span style="white-space: normal">{{question.value | translate}}</span></ion-checkbox><div class="item item-icon-right no-padding-top"><a class="dark"><i class="icon ion-android-add" ng-click="addQuestion()"></i></a><div class="list list-inset"><label class="item item-input"><input type="text" autocomplete="off" placeholder="{{\'ACCOUNT.SECURITY.ADD_QUESTION\' | translate}}" ng-model="formData.addQuestion"></label></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_RESET</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-disabled="questionsForm.$invalid" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></form></ion-content>'),e.put("templates/wallet/slides/slides_saveID_2.html",'<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.SAVE_ID</h3><form name="answersForm" novalidate ng-submit="doNext(\'answersForm\')"><div class="list" ng-init="setForm(answersForm, \'answersForm\')"><ng-repeat ng-repeat="question in formData.questions |filter:true:checked"><label class="item item-input item-text-wrap {{smallscreen ? \'item-stacked-label\' : \'item-floating-label\'}}" ng-class="{\'item-input-error\': answersForm.$submitted && answersForm[\'question{{$index}}\'].$invalid}"><span class="input-label" style="width: 100%; max-width: inherit">{{question.value | translate}}</span> <input type="text" autocomplete="off" name="question{{$index}}" placeholder="{{smallscreen ? \'\' : question.value | translate}}" ng-model="question.answer" required></label><div class="form-errors" ng-show="answersForm.$submitted && answersForm[\'question{{$index}}\'].$error" ng-messages="answersForm[\'question{{$index}}\'].$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></ng-repeat><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_CLEAN</button> <button class="button button-positive ink" type="submit" translate>COMMON.BTN_CONTINUE <i class="icon ion-android-archive"></i></button></div></div></form></ion-content>'),e.put("templates/wot/tabs/tab_given_certifications.html",'<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop" ng-click="doUpdate()"></button></ion-nav-buttons><ion-content ng-init="motions.receivedCertifications=false; motions.avatar=false"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'templates/wot/items_given_certifications.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button id="fab-select-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canSelectAndCertify || $root.tour" ng-click="selectAndCertify()"><i class="icon ion-plus"></i></button></div></ion-view>'),e.put("templates/wot/tabs/tab_lookup.html",'<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doSearch()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-view>'),e.put("templates/wot/tabs/tab_received_certifications.html",'<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop" ng-click="doUpdate()"></button></ion-nav-buttons><ion-content ng-init="motions.givenCertifications=false; motions.avatar=false;"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'templates/wot/items_received_certifications.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button id="fab-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-click="certify()" ng-if="(formData.hasSelf && canCertify && !alreadyCertified) || $root.tour"><i class="icon ion-ribbon-b"></i></button></div></ion-view>')}]),angular.module("cesium.translations",[]).config(["$translateProvider",function(e){e.translations("en-GB",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"build {{build}}",PUBKEY:"Public key",MEMBER:"Member",BLOCK:"Block",BTN_OK:"OK",BTN_YES:"Yes",BTN_NO:"No",BTN_SEND:"Send",BTN_SEND_MONEY:"Transfer money",BTN_SEND_MONEY_SHORT:"Transfer",BTN_SAVE:"Save",BTN_YES_SAVE:"Yes, Save",BTN_YES_CONTINUE:"Yes, Continue",BTN_SHOW:"Show",BTN_SHOW_PUBKEY:"Show key",BTN_RELATIVE_UNIT:"Display amounts in UD?",BTN_BACK:"Back",BTN_NEXT:"Next",BTN_IMPORT:"Import",BTN_CANCEL:"Cancel",BTN_CLOSE:"Close",BTN_LATER:"Later",BTN_LOGIN:"Sign In",BTN_LOGOUT:"Logout",BTN_ADD_ACCOUNT:"New Account",BTN_SHARE:"Share",BTN_EDIT:"Edit",BTN_DELETE:"Delete",BTN_ADD:"Add",BTN_SEARCH:"Search",BTN_REFRESH:"Refresh",BTN_RETRY:"Retry",BTN_START:"Start",BTN_CONTINUE:"Continue",BTN_CREATE:"Create",BTN_UNDERSTOOD:"I understand",BTN_OPTIONS:"Options",BTN_HELP_TOUR:"Features tour",BTN_HELP_TOUR_SCREEN:"Discover this screen",BTN_DOWNLOAD:"Download",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Download account statement",BTN_MODIFY:"Modify",CHOOSE_FILE:"Drag your file<br/>or click to select",DAYS:"days",NO_ACCOUNT_QUESTION:"Not a member yet? Register now!",SEARCH_NO_RESULT:"No result found",LOADING:"Loading...",LOADING_WAIT:"Loading...<br/><small>(Waiting for node availability)</small>",SEARCHING:"Searching...",FROM:"From",TO:"To",COPY:"Copy",LANGUAGE:"Language",UNIVERSAL_DIVIDEND:"Universal dividend",UD:"UD",DATE_PATTERN:"DD/MM/YYYY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD/MM/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(empty)",UID:"Pseudonym",ENABLE:"Enabled",DISABLE:"Disabled",RESULTS_LIST:"Results:",RESULTS_COUNT:"{{count}} results",EXECUTION_TIME:"executed in {{duration|formatDurationMs}}",SHOW_VALUES:"Display values openly?",POPOVER_ACTIONS_TITLE:"Options",POPOVER_FILTER_TITLE:"Filters",SHOW_MORE:"Show more",SHOW_MORE_COUNT:"(current limit at {{limit}})",POPOVER_SHARE:{TITLE:"Share",SHARE_ON_TWITTER:"Share on Twitter",SHARE_ON_FACEBOOK:"Share on Facebook",SHARE_ON_DIASPORA:"Share on Diaspora*",SHARE_ON_GOOGLEPLUS:"Share on Google+"},FILE:{DATE:"Date:",TYPE:"Type:",SIZE:"Size:",VALIDATING:"Validating..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Choose source:",BTN_PICTURE_GALLERY:"Gallery",BTN_PICTURE_CAMERA:"<b>Camera</b>"},MENU:{HOME:"Home",WOT:"Registry",CURRENCY:"Currency",ACCOUNT:"My Account",WALLETS:"My wallets",SETTINGS:"Settings",NETWORK:"Network",TRANSACTIONS:"My transactions"},ABOUT:{TITLE:"About",LICENSE:"<b>Free/libre software</b> (License GNU AGPLv3).",LATEST_RELEASE:"There is a <b>newer version</ b> of {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",PLEASE_UPDATE:"Please update {{'COMMON.APP_NAME' | translate}} (latest version: <b>v{{version}}</b>)",CODE:"Source code:",OFFICIAL_WEB_SITE:"Official web site:",DEVELOPERS:"Developers:",FORUM:"Forum:",PLEASE_REPORT_ISSUE:"Please report any issue to us!",REPORT_ISSUE:"Report an issue",BTN_OPEN_DEV_WINDOW:"Open the debug window"},HOME:{TITLE:"Cesium",WELCOME:"Welcome to the Cesium Application!",MESSAGE:"Receive and send libre currency {{currency|abbreviate}}",BTN_CURRENCY:"Explore currency",BTN_ABOUT:"about",BTN_HELP:"Help",REPORT_ISSUE:"Report an issue",NOT_YOUR_ACCOUNT_QUESTION:'You do not own the account <b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b>?',BTN_CHANGE_ACCOUNT:"Disconnect this account",CONNECTION_ERROR:'Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or change node <a class="positive" ng-click="doQuickFix(\'settings\')">in the settings</a>.',SHOW_ALL_FEED:"Show all",READ_MORE:"Read more",FEED_SOURCE:"Source"},SETTINGS:{TITLE:"Settings",DISPLAY_DIVIDER:"Display",STORAGE_DIVIDER:"Storage",NETWORK_SETTINGS:"Network",PEER:"Duniter peer address",PEER_SHORT:"Peer address",PEER_CHANGED_TEMPORARY:"Address used temporarily",PERSIST_CACHE:"Keep navigation data (experimental)",PERSIST_CACHE_HELP:"Allows faster navigation, locally retaining the data received, for use from one session to another.",USE_LOCAL_STORAGE:"Enable local storage",USE_LOCAL_STORAGE_HELP:"Allows you to save your settings",WALLETS_SETTINGS:"My wallets",USE_WALLETS_ENCRYPTION:"Secure the list",USE_WALLETS_ENCRYPTION_HELP:"Enables you to encrypt the list of your wallets. Authentication required to access it.",ENABLE_HELPTIP:"Enable contextual help tips",DISABLE_HELPTIP:"Disable contextual help tips",ENABLE_UI_EFFECTS:"Enable visual effects",HISTORY_SETTINGS:"Account operations",DISPLAY_UD_HISTORY:"Display produced dividends?",TX_HISTORY_AUTO_REFRESH:"Enable automatic refresh?",TX_HISTORY_AUTO_REFRESH_HELP:"Updates the list of operations to each new block.",AUTHENTICATION_SETTINGS:"Authentication",KEEP_AUTH:"Expiration of authentication",KEEP_AUTH_SHORT:"Expiration",KEEP_AUTH_HELP:"Define when authentication is cleared from memory.",KEEP_AUTH_OPTION:{NEVER:"After each operation",SECONDS:"After {{value}}s of inactivity",MINUTE:"After {{value}}min of inactivity",MINUTES:"After {{value}}min of inactivity",HOUR:"After {{value}}h of inactivity",ALWAYS:"At the end of the session"},KEYRING_FILE:"Keyring file",KEYRING_FILE_HELP:'Allow auto-connect at startup, or to authenticate (only if "Expiration of authentication" is "at the end of the session"',REMEMBER_ME:"Remember me ?",REMEMBER_ME_HELP:"Allows to remain identified from one session to another, keeping the public key locally.",PLUGINS_SETTINGS:"Extensions",BTN_RESET:"Restore default values",EXPERT_MODE:"Enable expert mode",EXPERT_MODE_HELP:"Allow to see more details",BLOCK_VALIDITY_WINDOW:"Block uncertainty time",BLOCK_VALIDITY_WINDOW_SHORT:"Time of uncertainty",BLOCK_VALIDITY_WINDOW_HELP:"Time to wait before considering an information is validated",BLOCK_VALIDITY_OPTION:{NONE:"No delay",N:"{{time | formatDuration}} ({{count}} blocks)"},POPUP_PEER:{TITLE:"Duniter peer",HOST:"Address",HOST_HELP:"Address: server:port",USE_SSL:"Secured?",USE_SSL_HELP:"(SSL Encryption)",BTN_SHOW_LIST:"Peer's list"}},BLOCKCHAIN:{HASH:"Hash: {{hash}}",VIEW:{HEADER_TITLE:"Block #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Current block",TITLE:"Block #{{number|formatInteger}}",COMPUTED_BY:"Computed by",SHOW_RAW:"Show raw data",TECHNICAL_DIVIDER:"Technical informations",VERSION:"Format version",HASH:"Computed hash",UNIVERSAL_DIVIDEND_HELP:"Money co-produced by each of the {{membersCount}} members",EMPTY:"Aucune donnée dans ce bloc",POW_MIN:"Minimal difficulty",POW_MIN_HELP:"Difficulty imposed in calculating hash",DATA_DIVIDER:"Data",IDENTITIES_COUNT:"New identities",JOINERS_COUNT:"Joiners",ACTIVES_COUNT:"Renewals",ACTIVES_COUNT_HELP:"Members having renewed their membership",LEAVERS_COUNT:"Leavers",LEAVERS_COUNT_HELP:"Members that now refused certification",EXCLUDED_COUNT:"Excluded members",EXCLUDED_COUNT_HELP:"Old members, excluded because missing membreship renewal or certifications",REVOKED_COUNT:"Revoked identities",REVOKED_COUNT_HELP:"These accounts may no longer be member",TX_COUNT:"Transactions",CERT_COUNT:"Certifications",TX_TO_HIMSELF:"Change",TX_OUTPUT_UNLOCK_CONDITIONS:"Unlock conditions",TX_OUTPUT_OPERATOR:{AND:"and",OR:"or"},TX_OUTPUT_FUNCTION:{SIG:"<b>Sign</b> of the public key",XHX:"<b>Password</b>, including SHA256 =",CSV:"Blocked during",CLTV:"Bloqué until"}},LOOKUP:{TITLE:"Blocks",NO_BLOCK:"No bloc",LAST_BLOCKS:"Last blocks:",BTN_COMPACT:"Compact"}},CURRENCY:{VIEW:{TITLE:"Currency",TAB_CURRENCY:"Currency",TAB_WOT:"Web of trust",TAB_NETWORK:"Network",TAB_BLOCKS:"Blocks",CURRENCY_SHORT_DESCRIPTION:"{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.",NETWORK_RULES_DIVIDER:"Network rules",CURRENCY_NAME:"Currency name",MEMBERS:"Members count",MEMBERS_VARIATION:"Variation since {{duration|formatDuration}} (since last UD)",MONEY_DIVIDER:"Money",MASS:"Monetary mass",SHARE:"Money share",UD:"Universal Dividend",C_ACTUAL:"Current growth",MEDIAN_TIME:"Current blockchain time",POW_MIN:"Common difficulty",MONEY_RULES_DIVIDER:"Rules of currency",C_RULE:"Theoretical growth target",UD_RULE:"Universal dividend (formula)",DT_REEVAL:"Period between two re-evaluation of the UD",REEVAL_SYMBOL:"reeval",DT_REEVAL_VALUE:"Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Date of first reevaluation of the UD",SIG_QTY_RULE:"Required number of certifications to become a member",SIG_STOCK:"Maximum number of certifications sent by a member",SIG_PERIOD:"Minimum delay between 2 certifications sent by one and the same issuer.",SIG_WINDOW:"Maximum delay before a certification will be treated",SIG_VALIDITY:"Lifetime of a certification that has been treated",MS_WINDOW:"Maximum delay before a pending membership will be treated",MS_VALIDITY:"Lifetime of a membership that has been treated",STEP_MAX:"Maximum distance between a newcomer and each referring members.",WOT_RULES_DIVIDER:"Rules for web of trust",SENTRIES:"Required number of certifications (given <b>and</b> received) to become a referring member",SENTRIES_FORMULA:"Required number of certifications to become a referring member (formula)",XPERCENT:"Minimum percent of referring member to reach to match the distance rule",AVG_GEN_TIME:"The average time between 2 blocks",CURRENT:"current",MATH_CEILING:"CEILING",DISPLAY_ALL_RULES:"Display all rules?",BTN_SHOW_LICENSE:"Show license",WOT_DIVIDER:"Web of trust"},LICENSE:{TITLE:"Currency license",BTN_DOWNLOAD:"Download file",NO_LICENSE_FILE:"License file not found."}},NETWORK:{VIEW:{MEDIAN_TIME:"Blockchain time",LOADING_PEERS:"Loading peers...",NODE_ADDRESS:"Address:",SOFTWARE:"Software:",WARN_PRE_RELEASE:"Pre-release (latest stable: <b>{{version}}</b>)",WARN_NEW_RELEASE:"Version <b>{{version}}</b> available",WS2PID:"Identifier:",PRIVATE_ACCESS:"Private access",POW_PREFIX:"Proof of work prefix:",ENDPOINTS:{BMAS:"Secure endpoint (SSL)",BMATOR:"TOR endpoint",WS2P:"WS2P endpoint",ES_USER_API:"Cesium+ data node"}},INFO:{ONLY_SSL_PEERS:"Non-SSL nodes have a degraded display because Cesium works in HTTPS mode."}},PEER:{PEERS:"Peers",SIGNED_ON_BLOCK:"Signed on block",MIRROR:"mirror",MIRRORS:"Mirrors",MIRROR_PEERS:"Mirror peers",PEER_LIST:"Peer's list",MEMBERS:"Members",MEMBER_PEERS:"Member peers",ALL_PEERS:"All peers",DIFFICULTY:"Difficulty",API:"API",CURRENT_BLOCK:"Block #",POPOVER_FILTER_TITLE:"Filter",OFFLINE:"Offline",OFFLINE_PEERS:"Offline peers",BTN_SHOW_PEER:"Show peer",VIEW:{TITLE:"Peer",OWNER:"Owned by ",SHOW_RAW_PEERING:"See peering document",SHOW_RAW_CURRENT_BLOCK:"See current block (raw format)",LAST_BLOCKS:"Last blocks",KNOWN_PEERS:"Known peers :",GENERAL_DIVIDER:"General information",ERROR:{LOADING_TOR_NODE_ERROR:"Could not get peer data, using the TOR network.",LOADING_NODE_ERROR:"Could not get peer data"}}},WOT:{SEARCH_HELP:"Search (member or public key)",SEARCH_INIT_PHASE_WARNING:"During the pre-registration phase, the search for pending registrations <b>may be long</b>. Please wait ...",REGISTERED_SINCE:"Registered on",REGISTERED_SINCE_BLOCK:"Registered since block #",NO_CERTIFICATION:"No validated certification",NO_GIVEN_CERTIFICATION:"No given certification",NOT_MEMBER_PARENTHESIS:"(non-member)",IDENTITY_REVOKED_PARENTHESIS:"(identity revoked)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(being revoked)",EXPIRE_IN:"Expires",NOT_WRITTEN_EXPIRE_IN:"Deadline<br/>treatment",EXPIRED:"Expired",PSEUDO:"Pseudonym",SIGNED_ON_BLOCK:"Emitted on block #{{block}}",WRITTEN_ON_BLOCK:"Written on block #{{block}}",GENERAL_DIVIDER:"General information",NOT_MEMBER_ACCOUNT:"Non-member account",NOT_MEMBER_ACCOUNT_HELP:"This is a simple wallet, with no pending membership application.",TECHNICAL_DIVIDER:"Technical data",BTN_CERTIFY:"Certify",BTN_YES_CERTIFY:"Yes, certify",BTN_SELECT_AND_CERTIFY:"New certification",ACCOUNT_OPERATIONS:"Account operations",VIEW:{POPOVER_SHARE_TITLE:"Identity {{title}}"},LOOKUP:{TITLE:"Registry",NEWCOMERS:"New members:",NEWCOMERS_COUNT:"{{count}} members",PENDING:"Pending registrations:",PENDING_COUNT:"{{count}} pending registrations",REGISTERED:"Registered {{sigDate | formatFromNow}}",MEMBER_FROM:"Member since {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Latest members",BTN_PENDING:"Pending registrations",SHOW_MORE:"Show more",SHOW_MORE_COUNT:"(current limit to {{limit}})",NO_PENDING:"No pending registrations.",NO_NEWCOMERS:"No members."},CONTACTS:{TITLE:"Contacts"},MODAL:{TITLE:"Search"},CERTIFICATIONS:{TITLE:"{{uid}} - Certifications",SUMMARY:"Received certifications",LIST:"Details of received certifications",PENDING_LIST:"Pending certifications",RECEIVED:"Received certifications",RECEIVED_BY:"Certifications received by {{uid}}",ERROR:"Received certifications in error",SENTRY_MEMBER:"Referring member"},OPERATIONS:{TITLE:"{{uid}} - Operations"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Certifications sent",SUMMARY:"Sent certifications",LIST:"Details of sent certifications",PENDING_LIST:"Pending certifications",SENT:"Sent certifications",SENT_BY:"Certifications sent by {{uid}}",ERROR:"Sent certifications with error"}},LOGIN:{TITLE:'<i class="icon ion-log-in"></i> Login',SCRYPT_FORM_HELP:"Please enter your credentials. <br> Remember to check the public key for your account.",PUBKEY_FORM_HELP:"Please enter a public account key:",FILE_FORM_HELP:"Choose the keychain file to use:",SCAN_FORM_HELP:"Scan the QR code of a wallet.",SALT:"Secret identifier",SALT_HELP:"Secret identifier",SHOW_SALT:"Display secret identifier?",PASSWORD:"Password",PASSWORD_HELP:"Password",PUBKEY_HELP:"Public key or pseudonym",NO_ACCOUNT_QUESTION:"Don't have an account yet?",HAVE_ACCOUNT_QUESTION:"Already have an account ?",CREATE_ACCOUNT:"Create an account",CREATE_FREE_ACCOUNT:"Create a free account",FORGOTTEN_ID:"Forgot password?",ASSOCIATED_PUBKEY:"Public key :",BTN_METHODS:"Other methods",BTN_METHODS_DOTS:"Change method...",METHOD_POPOVER_TITLE:"Methods",MEMORIZE_AUTH_FILE:"Memorize this keychain during the navigation session",SCRYPT_PARAMETERS:"Paramètres (Scrypt) :",AUTO_LOGOUT:{TITLE:"Information",MESSAGE:'<i class="ion-android-time"></i> You were <b>logout</ b> automatically, due to prolonged inactivity.',BTN_RELOGIN:"Sign In",IDLE_WARNING:"You will be logout... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Secret identifier and password",SCRYPT_ADVANCED:"Advanced salt",FILE:"Keychain file",PUBKEY:"Public key or pseudonym",SCAN:"Scan a QR code"},SCRYPT:{SIMPLE:"Light salt",DEFAULT:"Standard salt",SECURE:"Secure salt",HARDEST:"Hardest salt",EXTREME:"Extreme salt",USER:"Personal value",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Expected file format: <b>.dunikey</b> (type PubSec). Other formats are under development (EWIF, WIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> Authentication',BTN_AUTH:"Authenticate",GENERAL_HELP:"Please authenticate yourself:",EXPECTED_UID_HELP:'Please authenticate to the account <i class="ion-person"></i> {{uid}}:',EXPECTED_PUBKEY_HELP:'Please authenticate to the wallet <i class="ion-key"></i> {{pubkey|formatPubkey}}:',SCAN_FORM_HELP:"Scan the QR code of the <b>private key</b> of the wallet."},ACCOUNT:{TITLE:"My Account",BALANCE:"Balance",LAST_TX:"Latest validated transactions",BALANCE_ACCOUNT:"Account balance",NO_TX:"No transaction",SHOW_MORE_TX:"Show more",SHOW_ALL_TX:"Show all",TX_FROM_DATE:"(current limit to {{fromTime|medianFromNowShort}})",PENDING_TX:"Pending transactions",VALIDATING_TX:"Transactions being validated",ERROR_TX:"Transaction not executed",ERROR_TX_SENT:"Sent transactions",PENDING_TX_RECEIVED:"Transactions awaiting receipt",EVENTS:"Events",OUT_DISTANCED:"Your current certifications come from a group too isolated from the <a ng-click=\"showHelpModal('wot')\"> Web of Trust</a> (WoT): the <a ng-click=\"showHelpModal('distance_rule')\">maximum distance rule</a> is violated.<br/>You must obtain certifications from another area of the Web of Trust, or wait for it to tighten.",WAITING_MEMBERSHIP:"Membership application sent. Waiting validation.",WAITING_CERTIFICATIONS:"You need {{needCertificationCount}} certification(s) to become a member and produce the <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a>. Your account is however already operational, to receive and send payments.",WAITING_CERTIFICATIONS_HELP:'To get your certifications, only request members <b>who know you enough</b>, as required by <a ng-click="showLicenseModal()">the currency license</a> that you have accepted.<br/>If you do not know enough members, let them know on <a ng-click="openLink($event, $root.settings.userForumUrl)">the user forum</a>.',WILL_MISSING_CERTIFICATIONS:"You will <b>lack certifications</b> soon (at least {{willNeedCertificationCount}} more are needed)",WILL_NEED_RENEW_MEMBERSHIP:"Your membership <b>will expire {{membershipExpiresIn|formatDurationTo}}</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a> before then.",NEED_RENEW_MEMBERSHIP:"You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED:"You are no longer a member because your membership <b>has been cancelled</b> for lack of certifications. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",NO_WAITING_MEMBERSHIP:"No membership application pending. If you'd like to <b>become a member</ b>, please <a ng-click=\"doQuickFix('membership')\">send the membership application</a>.",CERTIFICATION_COUNT:"Received certifications",CERTIFICATION_COUNT_SHORT:"Certifications",SIG_STOCK:"Stock of certifications to give",BTN_RECEIVE_MONEY:"Receive",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Switch to another identity...",BTN_FIX_MEMBERSHIP:"Resubmit membership request...",BTN_MEMBERSHIP_RENEW:"Renew membership",BTN_MEMBERSHIP_RENEW_DOTS:"Renew membership...",BTN_MEMBERSHIP_OUT_DOTS:"Revoke membership...",BTN_SECURITY_DOTS:"Sign-in and security...",BTN_SHOW_DETAILS:"Display technical data",LOCKED_OUTPUTS_POPOVER:{TITLE:"Locked amount",DESCRIPTION:"Here are the conditions for unlocking this amount:",DESCRIPTION_MANY:"This transaction consists of several parts, of which the unlock conditions are:",LOCKED_AMOUNT:"Conditions for the amount:"},NEW:{TITLE:"Registration",INTRO_WARNING_TIME:"Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).",INTRO_WARNING_SECURITY:"Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.",INTRO_WARNING_SECURITY_HELP:"Up-to-date anti-virus, firewall enabled, session protected by password or pin code...",INTRO_HELP:"Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.",REGISTRATION_NODE:"Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.",REGISTRATION_NODE_HELP:"If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.",SELECT_ACCOUNT_TYPE:"Choose the type of account to create:",MEMBER_ACCOUNT:"Member account",MEMBER_ACCOUNT_TITLE:"Create a member account",MEMBER_ACCOUNT_HELP:"If you are not yet registered as an individual (one account possible per individual).",WALLET_ACCOUNT:"Simple wallet",WALLET_ACCOUNT_TITLE:"Create a wallet",WALLET_ACCOUNT_HELP:"If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.",SALT_WARNING:"Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!",PASSWORD_WARNING:"Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!",PSEUDO_WARNING:"Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>",PSEUDO:"Pseudonym",PSEUDO_HELP:"joe123",SALT_CONFIRM:"Confirm",SALT_CONFIRM_HELP:"Confirm the secret identifier",PASSWORD_CONFIRM:"Confirm",PASSWORD_CONFIRM_HELP:"Confirm the password",SLIDE_6_TITLE:"Confirmation:",COMPUTING_PUBKEY:"Computing...",LAST_SLIDE_CONGRATULATION:"You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?',CHECKING_PSEUDO:"Checking...",PSEUDO_AVAILABLE:"This pseudonym is available",PSEUDO_NOT_AVAILABLE:"This pseudonym is not available",INFO_LICENSE:"To be able to adhere to the currency, we ask you to kindly read and accept this license.",BTN_ACCEPT:"I accept",BTN_ACCEPT_LICENSE:"I accept the license"},POPUP_REGISTER:{TITLE:"Enter a pseudonym",HELP:"A pseudonym is needed to let other members find you."},SELECT_IDENTITY_MODAL:{TITLE:"Identity selection",HELP:'Several <b>different identities</b> have been sent, for the public key <span class="gray"> <i class="ion-key"></i> {{pubkey | formatPubkey}}</span>.<br/>Please select the identity to use:'},SELECT_WALLET_MODAL:{TITLE:"Wallet selection"},WALLET_LIST:{TITLE:"My wallets",BTN_NEW:"Add a wallet",BTN_DOWNLOAD:"Download the list",BTN_IMPORT_FILE_DOTS:"Import from a file...",NO_WALLET:"No secondary wallet",BTN_DELETE:"Remove a secondary wallet...",BTN_RENAME:"Rename the wallet",EXPORT_FILENAME:"my_wallets-{{pubkey|formatPubkey}}-{{currency}}.csv",TOTAL_DOTS:"Total: ",EDIT_POPOVER:{TITLE:"Rename the wallet",HELP:"Fill in the new name",NAME_HELP:"Wallet name"},IMPORT_MODAL:{TITLE:"Import secondary wallets",HELP:"To <b>import secodnary wallets</b>, please drag the file in the box below, or click in the box to search for a file.",WALLET_COUNT:"<b>{{count}}</b> new wallet{{count > 1 ? 's' : ''}}",NO_NEW_WALLET:"No new wallet"}},SECURITY:{ADD_QUESTION:"Add custom question",BTN_CLEAN:"Clean",BTN_RESET:"Reset",DOWNLOAD_REVOKE:"Save a revocation file",DOWNLOAD_REVOKE_HELP:"Having a revocation file is important, for example in case of loss of identifiers. It allows you to <b>get this account out of the Web Of Trust</b>, thus becoming a simple wallet.",GENERATE_KEYFILE:"Generate my keychain file ...",GENERATE_KEYFILE_HELP:"Generate a file allowing you to authenticate without entering your identifiers.<br/><b>Warning:</b> this file will contain your secret key; It is therefore very important to put it in a safe place!",KEYFILE_FILENAME:"keychain-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",MEMBERSHIP_IN:"Register as member...",MEMBERSHIP_IN_HELP:"Allows you to <b>transform </b> a simple wallet account <b>into a member account</b>, by sending a membership request. Useful only if you do not already have another member account.",SEND_IDENTITY:"Publish identity...",SEND_IDENTITY_HELP:"Allows you to associate a pseudonym to this account, but <b>without applying for membership</b> to become a member. This is not very useful because the validity of this pseudonym association is limited in time.",HELP_LEVEL:"Choose <strong> at least {{nb}} questions </strong> :",LEVEL:"Security level",
-LOW_LEVEL:'Low <span class="hidden-xs">(2 questions minimum)</span>',MEDIUM_LEVEL:'Medium <span class="hidden-xs">(4 questions minimum)</span>',QUESTION_1:"What was your best friend's name when you were a teen ?",QUESTION_2:"What was the name of your first pet ?",QUESTION_3:"What is the first meal you have learned to cook ?",QUESTION_4:"What is the first movie you saw in the cinema?",QUESTION_5:"Where did you go the first time you flew ?",QUESTION_6:"What was your favorite elementary school teacher's name  ?",QUESTION_7:"What would you consider the ideal job ?",QUESTION_8:"Which children's book do you prefer?",QUESTION_9:"What was the model of your first vehicle?",QUESTION_10:"What was your nickname when you were a child ?",QUESTION_11:"What was your favorite movie character or actor when you were a student ?",QUESTION_12:"What was your favorite singer or band when you were a student ?",QUESTION_13:"In which city did your parents meet ?",QUESTION_14:"What was the name of your first boss ?",QUESTION_15:"What is the name of the street where you grew up ?",QUESTION_16:"What is the name of the first beach where you go swim ?",QUESTION_17:"QWhat is the first album you bought ?",QUESTION_18:"What is the name of your favorite sport team ?",QUESTION_19:"What was your grand-father's job ?",RECOVER_ID:"Recover my password...",RECOVER_ID_HELP:"If you have a <b>backup file of your identifiers</b>, you can find them by answering your personal questions correctly.",RECOVER_ID_SELECT_FILE:"Select the <b>backup file of your identifiers</b> to use:",REVOCATION_WITH_FILE:"Revoke my member account...",REVOCATION_WITH_FILE_DESCRIPTION:"If you have <b>permanently lost your member account credentials (or if account security is compromised), you can use <b>the revocation file</b> of the account <b>to quit the Web Of Trust</b>.",REVOCATION_WITH_FILE_HELP:"To <b>permanently revoke</ b> a member account, please drag the revocation file in the box below, or click in the box to search for a file.",REVOCATION_WALLET:"Revoke this account immediately",REVOCATION_WALLET_HELP:"Requesting revocation of your identity causes <b>will revoke your membership</ b> (definitely for the associated pseudonym and public key). The account will no longer be able to produce a Universal Dividend.<br/>However, you can still use it as a simple wallet.",REVOCATION_FILENAME:"revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",SAVE_ID:"Save my credentials...",SAVE_ID_HELP:"Creating a backup file, to <b>retrieve your password</b> (and the secret identifier) <b> in case of forgetting</b>. The file is <b>secured</ b> (encrypted) using personal questions.",STRONG_LEVEL:'Strong <span class="hidden-xs ">(6 questions minimum)</span>',TITLE:"Account and security",KEYFILE:{PUBSEC_FORMAT:"PubSec format.",PUBSEC_FORMAT_HELP:"This file format is compatible in particular with Cesium and Gannonce. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",WIF_FORMAT:"Wallet Import Format (WIF)",WIF_FORMAT_HELP:"This format is used in particular by paper wallets. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",EWIF_FORMAT:"Encrypted Wallet Import Format (WIF)",EWIF_FORMAT_HELP:"This format is used in particular by paper wallets. However, <b>the keychain is encrypted</b> from a passphrase of your choice.",PASSWORD_POPUP:{TITLE:"Keychain file encrypted",HELP:"Please enter the passphrase:",PASSWORD_HELP:"Passphrase"},ERROR:{BAD_PASSWORD:"Bad passphrase",BAD_CHECKSUM:"Bad checksum"}}},FILE_NAME:"{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Date",AMOUNT:"Amount",COMMENT:"Comment"}},TRANSFER:{TITLE:"Transfer",SUB_TITLE:"Transfer money",SUB_TITLE_ALL:"Empty the account",FROM:"From",TO:"To",AMOUNT:"Amount",AMOUNT_HELP:"Amount",COMMENT:"Comment",COMMENT_HELP:"Comment (optional)",BTN_SEND:"Send",BTN_ADD_COMMENT:"Add a comment",REST:"Rest of account",REST_TO:"to",WARN_COMMENT_IS_PUBLIC:"Please note that <b>comments are public</b> (not encrypted).",MODAL:{TITLE:"Transfer"}},ERROR:{UNKNOWN_URI_FORMAT:"Unknown URI format",PUBKEY_INVALID_CHECKSUM:"Invalid public key (bad checksum).",POPUP_TITLE:"Error",UNKNOWN_ERROR:"Unknown error",CRYPTO_UNKNOWN_ERROR:"Your browser is not compatible with cryptographic features.",DOWNLOAD_KEYFILE_FAILED:"Failed to generate the keychain file.",EQUALS_TO_PSEUDO:"Must be different from pseudonym",EQUALS_TO_SALT:"Must be different from secret identifier",FIELD_REQUIRED:"This field is required.",FIELD_TOO_SHORT:"This field value is too short.",FIELD_TOO_SHORT_WITH_LENGTH:"Value is too short (min {{minLength]] characters).",FIELD_TOO_LONG:"Value is exceeding max length.",FIELD_TOO_LONG_WITH_LENGTH:"Value is too long (max {{maxLength}} characters).",FIELD_MIN:"Minimum value: {{min}}",FIELD_MAX:"Maximal value: {{max}}",FIELD_ACCENT:"Commas and accent characters not allowed",FIELD_NOT_NUMBER:"Value is not a number",FIELD_NOT_INT:"Value is not an integer",FIELD_NOT_EMAIL:"Email adress not valid",PASSWORD_NOT_CONFIRMED:"Must match previous password.",SALT_NOT_CONFIRMED:"Must match previous identifier.",SEND_IDENTITY_FAILED:"Error while trying to register.",SEND_CERTIFICATION_FAILED:"Could not certify identity.",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"You could not send certification, because your account is <b>not a member account</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"This account could not be certified. No registration found, or need to renew.",LOGIN_FAILED:"Error while sign in.",LOAD_IDENTITY_FAILED:"Could not load identity.",LOAD_REQUIREMENTS_FAILED:"Could not load identity requirements.",SEND_MEMBERSHIP_IN_FAILED:"Error while sending registration as member.",SEND_MEMBERSHIP_OUT_FAILED:"Error while sending membership revocation.",REFRESH_WALLET_DATA:"Could not refresh wallet.",GET_CURRENCY_PARAMETER:"Could not get currency parameters.",GET_CURRENCY_FAILED:"Could not load currency. Please retry later.",SEND_TX_FAILED:"Could not send transaction.",ALL_SOURCES_USED:"Please wait the next block computation (All transaction sources has been used).",NOT_ENOUGH_SOURCES:"Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Error while creating your member account.",RESTORE_WALLET_DATA_ERROR:"Error while reloading settings from local storage",LOAD_WALLET_DATA_ERROR:"Error while loading wallet data.",COPY_CLIPBOARD_FAILED:"Could not copy to clipboard",TAKE_PICTURE_FAILED:"Could not get picture.",SCAN_FAILED:"Could not scan QR code.",SCAN_UNKNOWN_FORMAT:"Code not recognized.",WOT_LOOKUP_FAILED:"Search failed.",LOAD_PEER_DATA_FAILED:"Duniter peer not accessible. Please retry later.",NEED_LOGIN_FIRST:"Please sign in first.",AMOUNT_REQUIRED:"Amount is required.",AMOUNT_NEGATIVE:"Negative amount not allowed.",NOT_ENOUGH_CREDIT:"Not enough credit.",INVALID_NODE_SUMMARY:"Unreachable peer or invalid address",INVALID_USER_ID:"Field 'pseudonym' must not contains spaces or special characters.",INVALID_COMMENT:"Field 'reference' has a bad format.",INVALID_PUBKEY:"Public key has a bad format.",INVALID_PUBKEY_CHECKSUM:"Invalid checksum.",IDENTITY_REVOKED:"This identity <b>has been revoked</b>. It can no longer become a member.",IDENTITY_REVOKED_WITH_TIME:"This identity <b>has been revoked {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). It can no longer become a member.",IDENTITY_PENDING_REVOCATION:"The <b>revocation of this identity</b> has been requested and is awaiting processing. Certification is therefore disabled.",IDENTITY_INVALID_BLOCK_HASH:"This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",IDENTITY_EXPIRED:"This identity has expired: this person must re-apply <b>before</b> being certified.",IDENTITY_SANDBOX_FULL:"Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",IDENTITY_NOT_FOUND:"Identity not found",IDENTITY_TX_FAILED:"Error while getting identity's transactions",WOT_PENDING_INVALID_BLOCK_HASH:"Membership not valid.",WALLET_INVALID_BLOCK_HASH:"Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",WALLET_IDENTITY_EXPIRED:"The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",WALLET_REVOKED:"Your identity has been <b>revoked</b>: neither your pseudonym nor your public key will be used in the future for a member account.",WALLET_HAS_NO_SELF:"Your identity must first have been published, and not expired.",AUTH_REQUIRED:"Authentication required.",AUTH_INVALID_PUBKEY:"The public key does not match the connected account.",AUTH_INVALID_SCRYPT:"Invalid username or password.",AUTH_INVALID_FILE:"Invalid keychain file.",AUTH_FILE_ERROR:"Failed to open keychain file",IDENTITY_ALREADY_CERTIFY:"You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",UNABLE_TO_CERTIFY_TITLE:"Unable to certify",LOAD_NEWCOMERS_FAILED:"Unable to load new members.",LOAD_PENDING_FAILED:"Unable to load pending registrations.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"You must <b>be a member</b> in order to perform this action.",ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION:"You must <b>be a member (or old member)</b> in order to perform this action.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"You must have <b>published your identity</b> in order to perform this action.",GET_BLOCK_FAILED:"Error while getting block",INVALID_BLOCK_HASH:"Block not found (incorrect hash)",DOWNLOAD_REVOCATION_FAILED:"Error while downloading revocation file.",REVOCATION_FAILED:"Error while trying to revoke the identity.",SALT_OR_PASSWORD_NOT_CONFIRMED:"Wrong secret identifier or password ",RECOVER_ID_FAILED:"Could not recover password",LOAD_FILE_FAILED:"Unable to load file",NOT_VALID_REVOCATION_FILE:"Invalid revocation file (wrong file format)",NOT_VALID_SAVE_ID_FILE:"Invalid credentials backup file (wrong file format)",NOT_VALID_KEY_FILE:"Invalid keychain file (unrecognized format)",EXISTING_ACCOUNT:"Your identifiers correspond to an already existing account, whose <a ng-click=\"showHelpModal('pubkey')\">public key</a> is:",EXISTING_ACCOUNT_REQUEST:"Please modify your credentials so that they correspond to an unused account.",GET_LICENSE_FILE_FAILED:"Unable to get license file",CHECK_NETWORK_CONNECTION:"No peer appears to be accessible.<br/><br/>Please <b>check your Internet connection</b>.",ISSUE_524_TX_FAILED:"Failed to transfer.<br/><br/>A message has been sent to developers to help solve the problem.<b>Thank you for your help</b>.",ADD_SECONDARY_WALLET_FAILED:"Unable to add secondary wallet.",UPDATE_WALLET_LIST_FAILED:"Unable to refresh the list of wallets.",LOAD_WALLET_LIST_FAILED:"Unable to load the list of wallets.",SAVE_WALLET_LIST_FAILED:"Unable to save the list of wallets.",COULD_NOT_ADD_MAIN_WALLET:"This wallet <b>is the main account</b> with which you are connected. Unable to add it as a secondary wallet.",COULD_NOT_ADD_EXISTING_WALLET:"Wallet already existing in the list.",UNKNOWN_WALLET_ID:"Unknown secondary wallet.",RESTORE_WALLET_LIST_FAILED:"Unable to restore the list of wallets.",INVALID_FILE_FORMAT:"Invalid file format.",SAME_TX_RECIPIENT:"The recipient must be different from the issuer."},INFO:{POPUP_TITLE:"Information",CERTIFICATION_DONE:"Identity successfully signed",NOT_ENOUGH_CREDIT:"Not enough credit",TRANSFER_SENT:"Transfer request successfully sent",COPY_TO_CLIPBOARD_DONE:"Copy succeeded",MEMBERSHIP_OUT_SENT:"Membership revocation sent",NOT_NEED_MEMBERSHIP:"Already a member.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"This identity will soon lack certification (at least {{willNeedCertificationCount}}).",IDENTITY_NEED_MEMBERSHIP:"This identity did not send a membership request. She will have to if she wishes to become a member.",HAS_ALTERNATIVE_IDENTITIES:"There are <b>multiple identities</b> attached to this public key. <b>Before any certification</b>, please <a ng-click=\"doQuickFix('showSelectIdentities')\">check other identities</a> to choose the correct one, or contact the wallet owner.",REVOCATION_SENT:"Revocation sent successfully",REVOCATION_SENT_WAITING_PROCESS:"Revocation <b>has been sent successfully</b>. It is awaiting processing.",FEATURES_NOT_IMPLEMENTED:"This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)",EMPTY_TX_HISTORY:"No operations to export"},CONFIRM:{POPUP_TITLE:"<b>Confirmation</b>",POPUP_WARNING_TITLE:"<b>Warning</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Security warning</b>',CERTIFY_RULES_TITLE_UID:"Certify {{uid}}",CERTIFY_RULES:'<b class="assertive">Don\'t certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?',FULLSCREEN:"View the application in full screen?",EXIT_APP:"Close the application ?",TRANSFER:"<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",TRANSFER_ALL:"<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",MEMBERSHIP_OUT:"This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",MEMBERSHIP_OUT_2:"This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>terminate your membership</b>?",LOGIN_UNUSED_WALLET_TITLE:"Typing error?",LOGIN_UNUSED_WALLET:"The account seems to be <b>inactive</b>.<br/><br/>It's probably a <b>typing error</b> when sign in. Please try again, checking that <b>public key is yours<b/>.",FIX_IDENTITY:"The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?",FIX_MEMBERSHIP:"Your application for membership will be sent.<br/></br/><b>Are you sure?</b>",MEMBERSHIP:"Your membership request will be sent. <br/></br/><b>Are you sure?</b>",RENEW_MEMBERSHIP:"Your membership will be renewed.<br/></br/><b>Are you sure?</b>",REVOKE_IDENTITY:"You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?",REVOKE_IDENTITY_2:"This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?",NOT_NEED_RENEW_MEMBERSHIP:"Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?",SAVE_BEFORE_LEAVE:"Do you want to <b>save your changes</b> before leaving the page?",SAVE_BEFORE_LEAVE_TITLE:"Changes not saved",LOGOUT:"Are you sure you want to logout?",USE_FALLBACK_NODE:"Peer <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the <b>{{new}}</b> node?",ISSUE_524_SEND_LOG:"The transaction was rejected because of a known problem (issue #524) but not reproduced.<br/><br/>To help developers correct this error, do you accept <b>the transmission of your logs</b> per message?<br/><small>(No confidential data is sent)</small>"},DOWNLOAD:{POPUP_TITLE:"<b>Revocation file</b>",POPUP_REVOKE_MESSAGE:"To safeguard your account, please download the <b>account revocation document</b>. It will allow you to cancel your account (in case of account theft, ID, an incorrectly created account, etc.).<br/><br/><b>Please store it in a safe place.</b>"},HELP:{TITLE:"Online help",JOIN:{SECTION:"Join",SALT:'The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class="text-italic">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.',PASSWORD:"The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",PSEUDO:'A pseudonym is used only when joining as <span class="text-italic">member</span>. It is always associated with a wallet (by its <span class="text-italic">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past).'},LOGIN:{SECTION:"Log in",PUBKEY:"Account public key",PUBKEY_DEF:'The public key of the keychain is generated from the entered identifiers (any), but does not correspond to an account already used.<br/><b>Make sure your public key is the same as your account</b>. Otherwise, you will be logged into an account that is probably never used, as the risk of collision with an existing account is very small.<br/><a href="https://en.wikipedia.org/wiki/Elliptic_curve_cryptography" target="_ system">Learn more about cryptography</a> by public key.',METHOD:"Connection methods",METHOD_DEF:"Several options are available to connect to a portfolios: <br/> - The connection <b>with salt (simple or advanced)</b> mixes your password with the secret identifier, to limit the attempts of piracy<br/> - The connection <b>using public key</b> prevents you from entering your credentials, which you will be asked only when an operation need it.<br/> - The connection <b>using keychain file</b> will read the public and private keys of the account from a file without the need to enter credentials. Several file formats are possible."},GLOSSARY:{SECTION:"Glossary",PUBKEY_DEF:"A public key always identifies a wallet. It may identify a member. In Cesium it is calculated using the secret identifier and the password.",MEMBER:"Member",MEMBER_DEF:'A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class="text-italic">currency parameters</span>.',CURRENCY_RULES:"Currency rules",CURRENCY_RULES_DEF:'The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class="text-italic">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href="#/app/currency">See current parameters</a>.',BLOCKCHAIN:"Blockchain",BLOCKCHAIN_DEF:'The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class="text-italic">currency rules</span>.<br/><a href="http://en.duniter.org/presentation/" target="_blank">Read more about Duniter</a> and the working of its blockchain.',UNIVERSAL_DIVIDEND_DEF:'The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class="text-italic">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href="http://trm.creationmonetaire.info" target="_system">Read more about RTM</a> and open money.',WOT:"Web of Trust (WoT)",WOT_DEF:"The Web of Trust is made up of all the members of the currency, and the links of certification which connect them.",DISTANCE_RULE:"Distance rule",DISTANCE_RULE_DEF:"The rule of distance defines <b>a maximum distance to meet</b> between an applicant and a minimum number of referring member. This distance is calculated using the certification links."},TIP:{MENU_BTN_CURRENCY:"Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",CURRENCY_WOT:"The <b>member count</b> shows the <b>community's weight and evolution</b>.",CURRENCY_MASS:"Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",CURRENCY_UNIT_RELATIVE:"The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",CURRENCY_CHANGE_UNIT:"The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",CURRENCY_RULES:"The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",MENU_BTN_NETWORK:"Menu <b>{{'MENU.NETWORK'|translate}}</b> allows discovery of <b>network's state<b>.",NETWORK_BLOCKCHAIN:"All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",NETWORK_PEERS:"The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",NETWORK_PEERS_BLOCK_NUMBER:"This <b>number</b> (in green) indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre). <a target="_new" href="{{installDocUrl}}" target="_system">Read the installation manual &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",MENU_BTN_ACCOUNT_MEMBER:"Here you can consult your account status, transaction history and your certifications.",WALLET_CERTIFICATIONS:"Click here to reveiw the details of your certifications (given and received).",WALLET_RECEIVED_CERTIFICATIONS:"Click here to review the details of your <b>received certifications</b>.",WALLET_GIVEN_CERTIFICATIONS:"Click here to review the details of your <b>given certifications</b>.",WALLET_BALANCE:"Your account <b>balance</b> is shown here.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",WALLET_BALANCE_CHANGE_UNIT:"You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",WALLET_PUBKEY:"This is your account public key. You can communicate it to a third party so that it more easily identifies your account.",WALLET_SEND:"Issue a payment in just a few clicks.",WALLET_SEND_NO_MONEY:"Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",WALLET_OPTIONS:"Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",WALLET_RECEIVED_CERTS:"This shows the list of persons that certified you.",WALLET_CERTIFY:"The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",WALLET_CERT_STOCK:"Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",MENU_BTN_WALLETS:"The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.",MENU_BTN_TX:"The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.",MENU_BTN_WOT:"The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",WOT_SEARCH_TEXT_XS:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",WOT_SEARCH_TEXT:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",WOT_SEARCH_RESULT:"Simply click a user row to view the details sheet.",WOT_VIEW_CERTIFICATIONS:"The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Click here to open <b>a list of all certifications</b> given to and by this identity.",WOT_VIEW_CERTIFY:"The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",CERTIFY_RULES:"<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",MENU_BTN_SETTINGS:"The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",HEADER_BAR_BTN_PROFILE:"Click here to access your <b>user profile</b>",SETTINGS_CHANGE_UNIT:"You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",END_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",END_NOT_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below."}},API:{COMMON:{LINK_DOC:"API documentation",LINK_DOC_HELP:"API documentation for developers",LINK_STANDARD_APP:"Standard version",LINK_STANDARD_APP_HELP:"Open standard version of {{'COMMON.APP_NAME'|translate}}",CONNECTION_ERROR:"Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or contact the web site administrator."},HOME:{TITLE:"{{'COMMON.APP_NAME'|translate}} API Documentation",MESSAGE:'Welcome to the {{\'COMMON.APP_NAME\'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href="http://duniter.org" target="_system">Duniter</a> very easily!',MESSAGE_SHORT:'Connect your websites to <a href="http://duniter.org" target="_system">Duniter</a> very easily!',DOC_HEADER:"Available services:"},TRANSFER:{TITLE:"{{'COMMON.APP_NAME'|translate}} - Online payment",TITLE_SHORT:"Online payment",SUMMARY:"Order summary:",AMOUNT:"Amount:",AMOUNTS_HELP:"Please select the amount:",NAME:"Name:",PUBKEY:"Public key of the recipient:",COMMENT:"Order reference:",NODE:"Peer address:",DEMO:{SALT:"demo",PASSWORD:"demo",PUBKEY:"3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",HELP:"<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",BAD_CREDENTIALS:"Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"},INFO:{SUCCESS_REDIRECTING_WITH_NAME:"Payment sent.<br/>Redirect to <b>{{name}}</b>...",SUCCESS_REDIRECTING:"Payment sent.<br/>Redirect to the seller's website...",CANCEL_REDIRECTING_WITH_NAME:"Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",CANCEL_REDIRECTING:"Payment cancelled.<br/>Redirect to the seller's website..."},ERROR:{TRANSFER_FAILED:"Payment failed"}},DOC:{DESCRIPTION_DIVIDER:"Description",URL_DIVIDER:"Calling address",PARAMETERS_DIVIDER:"Parameters",AVAILABLE_PARAMETERS:"Here is the list of al available parameters:",DEMO_DIVIDER:"Try it !",DEMO_HELP:"To test this service, click on this button. The result content will be display below.",DEMO_RESULT:"Result returned by call:",DEMO_RESULT_PEER:"Peer address used:",DEMO_SUCCEED:'<i class="icon ion-checkmark"></i> Success!',DEMO_CANCELLED:'<i class="icon ion-close"></i> Canceled by user',INTEGRATE_DIVIDER:"Website integration",INTEGRATE_CODE:"Code:",INTEGRATE_RESULT:"Result preview:",INTEGRATE_PARAMETERS:"Parameters",TRANSFER:{TITLE:"Payments",DESCRIPTION:"From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",PARAM_PUBKEY:"Recipient's public key",PARAM_PUBKEY_HELP:"Recipient's public key (required)",PARAM_AMOUNT:"Amount",PARAM_AMOUNT_HELP:"Transaction amount (required)",PARAM_COMMENT:"Reference (or comment)",PARAM_COMMENT_HELP:"Reference or comment. You will allow for example to identify the payment in the BlockChain.",PARAM_NAME:"Name (of recipient or website)",PARAM_NAME_HELP:'The name of your website. This can be a readable name (eg "My online site"), or a web address (eg "www.MySite.com").',PARAM_REDIRECT_URL:"URL redirection",PARAM_REDIRECT_URL_HELP:'URL redirection after sending payment, after the payment has been sent. Can contain the following strings, which will be replaced by the values of the transaction: "{tx}", "{hash}", "{comment}", "{amount}" and "{pubkey}".',PARAM_CANCEL_URL:"URL if cancelled",PARAM_CANCEL_URL_HELP:'URL in case of cancellation.  Can contain the following strings, which will be replaced: "{comment}", "{amount}" and "{pubkey}".',PARAM_PREFERRED_NODE:"Preferred Duniter peer",PARAM_PREFERRED_NODE_HELP:'Peer address (URL) to use preferably ("g1.domain.com:443" or "https://g1.domain.com")',EXAMPLES_HELP:"Examples of integration:",EXAMPLE_BUTTON:"HTML Button",EXAMPLE_BUTTON_DEFAULT_TEXT:"Pay in {{currency|abbreviate}}",EXAMPLE_BUTTON_DEFAULT_STYLE:"Custom style",EXAMPLE_BUTTON_TEXT_HELP:"Button text",EXAMPLE_BUTTON_BG_COLOR:"Background color",EXAMPLE_BUTTON_BG_COLOR_HELP:"eg: #fbc14c, yellow, lightgrey, rgb(180,180,180)",EXAMPLE_BUTTON_FONT_COLOR:"Font color",EXAMPLE_BUTTON_FONT_COLOR_HELP:"eg: black, orange, rgb(180,180,180)",EXAMPLE_BUTTON_TEXT_ICON:"Icon",EXAMPLE_BUTTON_TEXT_WIDTH:"Width",EXAMPLE_BUTTON_TEXT_WIDTH_HELP:"eg: 200px, 50%",EXAMPLE_BUTTON_ICON_NONE:"No icon",EXAMPLE_BUTTON_ICON_DUNITER:"Duniter logo",EXAMPLE_BUTTON_ICON_CESIUM:"Cesium logo",EXAMPLE_BUTTON_ICON_G1_COLOR:"Ğ1 logo",EXAMPLE_BUTTON_ICON_G1_BLACK:"Ğ1 logo (outline)"}}}}),e.translations("en",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"build {{build}}",PUBKEY:"Public key",MEMBER:"Member",BLOCK:"Block",BTN_OK:"OK",BTN_YES:"Yes",BTN_NO:"No",BTN_SEND:"Send",BTN_SEND_MONEY:"Transfer money",BTN_SEND_MONEY_SHORT:"Transfer",BTN_SAVE:"Save",BTN_YES_SAVE:"Yes, Save",BTN_YES_CONTINUE:"Yes, Continue",BTN_SHOW:"Show",BTN_SHOW_PUBKEY:"Show key",BTN_RELATIVE_UNIT:"Display amounts in UD?",BTN_BACK:"Back",BTN_NEXT:"Next",BTN_IMPORT:"Import",BTN_CANCEL:"Cancel",BTN_CLOSE:"Close",BTN_LATER:"Later",BTN_LOGIN:"Sign In",BTN_LOGOUT:"Logout",BTN_ADD_ACCOUNT:"New Account",BTN_SHARE:"Share",BTN_EDIT:"Edit",BTN_DELETE:"Delete",BTN_ADD:"Add",BTN_SEARCH:"Search",BTN_REFRESH:"Refresh",BTN_RETRY:"Retry",BTN_START:"Start",BTN_CONTINUE:"Continue",BTN_CREATE:"Create",BTN_UNDERSTOOD:"I understand",BTN_OPTIONS:"Options",BTN_HELP_TOUR:"Features tour",BTN_HELP_TOUR_SCREEN:"Discover this screen",BTN_DOWNLOAD:"Download",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Download account statement",BTN_MODIFY:"Modify",CHOOSE_FILE:"Drag your file<br/>or click to select",DAYS:"days",NO_ACCOUNT_QUESTION:"Not a member yet? Register now!",SEARCH_NO_RESULT:"No result found",LOADING:"Loading...",LOADING_WAIT:"Loading...<br/><small>(Waiting for node availability)</small>",SEARCHING:"Searching...",FROM:"From",TO:"To",COPY:"Copy",LANGUAGE:"Language",UNIVERSAL_DIVIDEND:"Universal dividend",UD:"UD",DATE_PATTERN:"MM/DD/YYYY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"MM/DD/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(empty)",UID:"Pseudonym",ENABLE:"Enabled",DISABLE:"Disabled",RESULTS_LIST:"Results:",RESULTS_COUNT:"{{count}} results",EXECUTION_TIME:"executed in {{duration|formatDurationMs}}",SHOW_VALUES:"Display values openly?",POPOVER_ACTIONS_TITLE:"Options",POPOVER_FILTER_TITLE:"Filters",SHOW_MORE:"Show more",SHOW_MORE_COUNT:"(current limit at {{limit}})",POPOVER_SHARE:{TITLE:"Share",SHARE_ON_TWITTER:"Share on Twitter",SHARE_ON_FACEBOOK:"Share on Facebook",SHARE_ON_DIASPORA:"Share on Diaspora*",SHARE_ON_GOOGLEPLUS:"Share on Google+"},FILE:{DATE:"Date:",TYPE:"Type:",SIZE:"Size:",VALIDATING:"Validating..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Choose source:",BTN_PICTURE_GALLERY:"Gallery",BTN_PICTURE_CAMERA:"<b>Camera</b>"},MENU:{HOME:"Home",WOT:"Registry",CURRENCY:"Currency",ACCOUNT:"My Account",WALLETS:"My wallets",SETTINGS:"Settings",NETWORK:"Network",TRANSACTIONS:"My transactions"},ABOUT:{TITLE:"About",LICENSE:"<b>Free/libre software</b> (License GNU AGPLv3).",LATEST_RELEASE:"There is a <b>newer version</ b> of {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",PLEASE_UPDATE:"Please update {{'COMMON.APP_NAME' | translate}} (latest version: <b>v{{version}}</b>)",CODE:"Source code:",OFFICIAL_WEB_SITE:"Official web site:",DEVELOPERS:"Developers:",FORUM:"Forum:",PLEASE_REPORT_ISSUE:"Please report any issue to us!",REPORT_ISSUE:"Report an issue",BTN_OPEN_DEV_WINDOW:"Open the debug window"},HOME:{TITLE:"Cesium",WELCOME:"Welcome to the Cesium Application!",MESSAGE:"Receive and send libre currency {{currency|abbreviate}}",BTN_CURRENCY:"Explore currency",BTN_ABOUT:"about",BTN_HELP:"Help",REPORT_ISSUE:"Report an issue",NOT_YOUR_ACCOUNT_QUESTION:'You do not own the account <b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b>?',BTN_CHANGE_ACCOUNT:"Disconnect this account",CONNECTION_ERROR:'Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or change node <a class="positive" ng-click="doQuickFix(\'settings\')">in the settings</a>.',SHOW_ALL_FEED:"Show all",READ_MORE:"Read more",FEED_SOURCE:"Source"},SETTINGS:{TITLE:"Settings",DISPLAY_DIVIDER:"Display",STORAGE_DIVIDER:"Storage",NETWORK_SETTINGS:"Network",PEER:"Duniter peer address",PEER_SHORT:"Peer address",PEER_CHANGED_TEMPORARY:"Address used temporarily",PERSIST_CACHE:"Keep navigation data (experimental)",PERSIST_CACHE_HELP:"Allows faster navigation, locally retaining the data received, for use from one session to another.",USE_LOCAL_STORAGE:"Enable local storage",USE_LOCAL_STORAGE_HELP:"Allows you to save your settings",WALLETS_SETTINGS:"My wallets",USE_WALLETS_ENCRYPTION:"Secure the list",USE_WALLETS_ENCRYPTION_HELP:"Enables you to encrypt the list of your wallets. Authentication required to access it.",ENABLE_HELPTIP:"Enable contextual help tips",DISABLE_HELPTIP:"Disable contextual help tips",ENABLE_UI_EFFECTS:"Enable visual effects",HISTORY_SETTINGS:"Account operations",DISPLAY_UD_HISTORY:"Display produced dividends?",TX_HISTORY_AUTO_REFRESH:"Enable automatic refresh?",TX_HISTORY_AUTO_REFRESH_HELP:"Updates the list of operations to each new block.",AUTHENTICATION_SETTINGS:"Authentication",KEEP_AUTH:"Expiration of authentication",KEEP_AUTH_SHORT:"Expiration",KEEP_AUTH_HELP:"Define when authentication is cleared from memory.",KEEP_AUTH_OPTION:{NEVER:"After each operation",SECONDS:"After {{value}}s of inactivity",MINUTE:"After {{value}}min of inactivity",MINUTES:"After {{value}}min of inactivity",HOUR:"After {{value}}h of inactivity",ALWAYS:"At the end of the session"},KEYRING_FILE:"Keyring file",KEYRING_FILE_HELP:'Allow auto-connect at startup, or to authenticate (only if "Expiration of authentication" is "at the end of the session"',REMEMBER_ME:"Remember me ?",REMEMBER_ME_HELP:"Allows to remain identified from one session to another, keeping the public key locally.",PLUGINS_SETTINGS:"Extensions",BTN_RESET:"Restore default values",EXPERT_MODE:"Enable expert mode",EXPERT_MODE_HELP:"Allow to see more details",BLOCK_VALIDITY_WINDOW:"Block uncertainty time",BLOCK_VALIDITY_WINDOW_SHORT:"Time of uncertainty",BLOCK_VALIDITY_WINDOW_HELP:"Time to wait before considering an information is validated",BLOCK_VALIDITY_OPTION:{NONE:"No delay",N:"{{time | formatDuration}} ({{count}} blocks)"},POPUP_PEER:{TITLE:"Duniter peer",HOST:"Address",HOST_HELP:"Address: server:port",USE_SSL:"Secured?",USE_SSL_HELP:"(SSL Encryption)",BTN_SHOW_LIST:"Peer's list"}},BLOCKCHAIN:{HASH:"Hash: {{hash}}",VIEW:{HEADER_TITLE:"Block #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Current block",TITLE:"Block #{{number|formatInteger}}",COMPUTED_BY:"Computed by",SHOW_RAW:"Show raw data",TECHNICAL_DIVIDER:"Technical informations",VERSION:"Format version",HASH:"Computed hash",UNIVERSAL_DIVIDEND_HELP:"Money co-produced by each of the {{membersCount}} members",EMPTY:"Aucune donnée dans ce bloc",POW_MIN:"Minimal difficulty",POW_MIN_HELP:"Difficulty imposed in calculating hash",DATA_DIVIDER:"Data",IDENTITIES_COUNT:"New identities",JOINERS_COUNT:"Joiners",ACTIVES_COUNT:"Renewals",ACTIVES_COUNT_HELP:"Members having renewed their membership",LEAVERS_COUNT:"Leavers",LEAVERS_COUNT_HELP:"Members that now refused certification",EXCLUDED_COUNT:"Excluded members",EXCLUDED_COUNT_HELP:"Old members, excluded because missing membreship renewal or certifications",REVOKED_COUNT:"Revoked identities",REVOKED_COUNT_HELP:"These accounts may no longer be member",TX_COUNT:"Transactions",CERT_COUNT:"Certifications",TX_TO_HIMSELF:"Change",TX_OUTPUT_UNLOCK_CONDITIONS:"Unlock conditions",TX_OUTPUT_OPERATOR:{AND:"and",OR:"or"},TX_OUTPUT_FUNCTION:{SIG:"<b>Sign</b> of the public key",XHX:"<b>Password</b>, including SHA256 =",CSV:"Blocked during",CLTV:"Bloqué until"}},LOOKUP:{TITLE:"Blocks",NO_BLOCK:"No bloc",LAST_BLOCKS:"Last blocks:",BTN_COMPACT:"Compact"}},CURRENCY:{VIEW:{TITLE:"Currency",TAB_CURRENCY:"Currency",TAB_WOT:"Web of trust",TAB_NETWORK:"Network",TAB_BLOCKS:"Blocks",CURRENCY_SHORT_DESCRIPTION:"{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.",NETWORK_RULES_DIVIDER:"Network rules",CURRENCY_NAME:"Currency name",MEMBERS:"Members count",MEMBERS_VARIATION:"Variation since {{duration|formatDuration}} (since last UD)",MONEY_DIVIDER:"Money",MASS:"Monetary mass",SHARE:"Money share",UD:"Universal Dividend",C_ACTUAL:"Current growth",MEDIAN_TIME:"Current blockchain time",POW_MIN:"Common difficulty",MONEY_RULES_DIVIDER:"Rules of currency",C_RULE:"Theoretical growth target",UD_RULE:"Universal dividend (formula)",DT_REEVAL:"Period between two re-evaluation of the UD",REEVAL_SYMBOL:"reeval",DT_REEVAL_VALUE:"Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Date of first reevaluation of the UD",SIG_QTY_RULE:"Required number of certifications to become a member",SIG_STOCK:"Maximum number of certifications sent by a member",SIG_PERIOD:"Minimum delay between 2 certifications sent by one and the same issuer.",SIG_WINDOW:"Maximum delay before a certification will be treated",SIG_VALIDITY:"Lifetime of a certification that has been treated",MS_WINDOW:"Maximum delay before a pending membership will be treated",MS_VALIDITY:"Lifetime of a membership that has been treated",STEP_MAX:"Maximum distance between a newcomer and each referring members.",WOT_RULES_DIVIDER:"Rules for web of trust",SENTRIES:"Required number of certifications (given <b>and</b> received) to become a referring member",SENTRIES_FORMULA:"Required number of certifications to become a referring member (formula)",XPERCENT:"Minimum percent of referring member to reach to match the distance rule",AVG_GEN_TIME:"The average time between 2 blocks",CURRENT:"current",MATH_CEILING:"CEILING",DISPLAY_ALL_RULES:"Display all rules?",BTN_SHOW_LICENSE:"Show license",WOT_DIVIDER:"Web of trust"},LICENSE:{TITLE:"Currency license",BTN_DOWNLOAD:"Download file",NO_LICENSE_FILE:"License file not found."}},NETWORK:{VIEW:{MEDIAN_TIME:"Blockchain time",LOADING_PEERS:"Loading peers...",NODE_ADDRESS:"Address:",SOFTWARE:"Software:",WARN_PRE_RELEASE:"Pre-release (latest stable: <b>{{version}}</b>)",WARN_NEW_RELEASE:"Version <b>{{version}}</b> available",WS2PID:"Identifier:",PRIVATE_ACCESS:"Private access",POW_PREFIX:"Proof of work prefix:",ENDPOINTS:{BMAS:"Secure endpoint (SSL)",BMATOR:"TOR endpoint",WS2P:"WS2P endpoint",ES_USER_API:"Cesium+ data node"}},INFO:{ONLY_SSL_PEERS:"Non-SSL nodes have a degraded display because Cesium works in HTTPS mode."}},PEER:{PEERS:"Peers",SIGNED_ON_BLOCK:"Signed on block",MIRROR:"mirror",MIRRORS:"Mirrors",MIRROR_PEERS:"Mirror peers",PEER_LIST:"Peer's list",MEMBERS:"Members",MEMBER_PEERS:"Member peers",ALL_PEERS:"All peers",DIFFICULTY:"Difficulty",API:"API",CURRENT_BLOCK:"Block #",POPOVER_FILTER_TITLE:"Filter",OFFLINE:"Offline",OFFLINE_PEERS:"Offline peers",BTN_SHOW_PEER:"Show peer",VIEW:{TITLE:"Peer",OWNER:"Owned by ",SHOW_RAW_PEERING:"See peering document",SHOW_RAW_CURRENT_BLOCK:"See current block (raw format)",LAST_BLOCKS:"Last blocks",KNOWN_PEERS:"Known peers :",GENERAL_DIVIDER:"General information",ERROR:{LOADING_TOR_NODE_ERROR:"Could not get peer data, using the TOR network.",LOADING_NODE_ERROR:"Could not get peer data"}}},WOT:{SEARCH_HELP:"Search (member or public key)",SEARCH_INIT_PHASE_WARNING:"During the pre-registration phase, the search for pending registrations <b>may be long</b>. Please wait ...",REGISTERED_SINCE:"Registered on",REGISTERED_SINCE_BLOCK:"Registered since block #",NO_CERTIFICATION:"No validated certification",NO_GIVEN_CERTIFICATION:"No given certification",NOT_MEMBER_PARENTHESIS:"(non-member)",IDENTITY_REVOKED_PARENTHESIS:"(identity revoked)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(being revoked)",EXPIRE_IN:"Expires",NOT_WRITTEN_EXPIRE_IN:"Deadline<br/>treatment",EXPIRED:"Expired",PSEUDO:"Pseudonym",SIGNED_ON_BLOCK:"Emitted on block #{{block}}",WRITTEN_ON_BLOCK:"Written on block #{{block}}",GENERAL_DIVIDER:"General information",NOT_MEMBER_ACCOUNT:"Non-member account",NOT_MEMBER_ACCOUNT_HELP:"This is a simple wallet, with no pending membership application.",TECHNICAL_DIVIDER:"Technical data",BTN_CERTIFY:"Certify",BTN_YES_CERTIFY:"Yes, certify",BTN_SELECT_AND_CERTIFY:"New certification",ACCOUNT_OPERATIONS:"Account operations",VIEW:{POPOVER_SHARE_TITLE:"Identity {{title}}"},LOOKUP:{TITLE:"Registry",NEWCOMERS:"New members:",NEWCOMERS_COUNT:"{{count}} members",PENDING:"Pending registrations:",PENDING_COUNT:"{{count}} pending registrations",REGISTERED:"Registered {{sigDate | formatFromNow}}",MEMBER_FROM:"Member since {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Latest members",BTN_PENDING:"Pending registrations",SHOW_MORE:"Show more",SHOW_MORE_COUNT:"(current limit to {{limit}})",NO_PENDING:"No pending registrations.",NO_NEWCOMERS:"No members."},CONTACTS:{TITLE:"Contacts"},MODAL:{TITLE:"Search"},CERTIFICATIONS:{TITLE:"{{uid}} - Certifications",SUMMARY:"Received certifications",LIST:"Details of received certifications",PENDING_LIST:"Pending certifications",RECEIVED:"Received certifications",RECEIVED_BY:"Certifications received by {{uid}}",ERROR:"Received certifications in error",SENTRY_MEMBER:"Referring member"},OPERATIONS:{TITLE:"{{uid}} - Operations"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Certifications sent",SUMMARY:"Sent certifications",LIST:"Details of sent certifications",PENDING_LIST:"Pending certifications",SENT:"Sent certifications",SENT_BY:"Certifications sent by {{uid}}",ERROR:"Sent certifications with error"}},LOGIN:{TITLE:'<i class="icon ion-log-in"></i> Login',SCRYPT_FORM_HELP:"Please enter your credentials. <br> Remember to check the public key for your account.",PUBKEY_FORM_HELP:"Please enter a public account key:",FILE_FORM_HELP:"Choose the keychain file to use:",SCAN_FORM_HELP:"Scan the QR code of a wallet.",SALT:"Secret identifier",SALT_HELP:"Secret identifier",SHOW_SALT:"Display secret identifier?",PASSWORD:"Password",PASSWORD_HELP:"Password",PUBKEY_HELP:"Public key or pseudonym",NO_ACCOUNT_QUESTION:"Don't have an account yet?",HAVE_ACCOUNT_QUESTION:"Already have an account ?",CREATE_ACCOUNT:"Create an account",CREATE_FREE_ACCOUNT:"Create a free account",FORGOTTEN_ID:"Forgot password?",ASSOCIATED_PUBKEY:"Public key :",BTN_METHODS:"Other methods",BTN_METHODS_DOTS:"Change method...",METHOD_POPOVER_TITLE:"Methods",MEMORIZE_AUTH_FILE:"Memorize this keychain during the navigation session",SCRYPT_PARAMETERS:"Paramètres (Scrypt) :",AUTO_LOGOUT:{TITLE:"Information",MESSAGE:'<i class="ion-android-time"></i> You were <b>logout</ b> automatically, due to prolonged inactivity.',BTN_RELOGIN:"Sign In",IDLE_WARNING:"You will be logout... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Secret identifier and password",SCRYPT_ADVANCED:"Advanced salt",FILE:"Keychain file",PUBKEY:"Public key or pseudonym",SCAN:"Scan a QR code"},SCRYPT:{SIMPLE:"Light salt",DEFAULT:"Standard salt",SECURE:"Secure salt",HARDEST:"Hardest salt",EXTREME:"Extreme salt",USER:"Personal value",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Expected file format: <b>.dunikey</b> (type PubSec). Other formats are under development (EWIF, WIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> Authentication',BTN_AUTH:"Authenticate",GENERAL_HELP:"Please authenticate yourself:",EXPECTED_UID_HELP:'Please authenticate to the account <i class="ion-person"></i> {{uid}}:',EXPECTED_PUBKEY_HELP:'Please authenticate to the wallet <i class="ion-key"></i> {{pubkey|formatPubkey}}:',SCAN_FORM_HELP:"Scan the QR code of the <b>private key</b> of the wallet."},ACCOUNT:{TITLE:"My Account",BALANCE:"Balance",LAST_TX:"Latest validated transactions",BALANCE_ACCOUNT:"Account balance",NO_TX:"No transaction",SHOW_MORE_TX:"Show more",SHOW_ALL_TX:"Show all",TX_FROM_DATE:"(current limit to {{fromTime|medianFromNowShort}})",PENDING_TX:"Pending transactions",VALIDATING_TX:"Transactions being validated",ERROR_TX:"Transaction not executed",ERROR_TX_SENT:"Sent transactions",PENDING_TX_RECEIVED:"Transactions awaiting receipt",EVENTS:"Events",OUT_DISTANCED:"Your current certifications come from a group too isolated from the <a ng-click=\"showHelpModal('wot')\"> Web of Trust</a> (WoT): the <a ng-click=\"showHelpModal('distance_rule')\">maximum distance rule</a> is violated.<br/>You must obtain certifications from another area of the Web of Trust, or wait for it to tighten.",WAITING_MEMBERSHIP:"Membership application sent. Waiting validation.",WAITING_CERTIFICATIONS:"You need {{needCertificationCount}} certification(s) to become a member and produce the <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a>. Your account is however already operational, to receive and send payments.",WAITING_CERTIFICATIONS_HELP:'To get your certifications, only request members <b>who know you enough</b>, as required by <a ng-click="showLicenseModal()">the currency license</a> that you have accepted.<br/>If you do not know enough members, let them know on <a ng-click="openLink($event, $root.settings.userForumUrl)">the user forum</a>.',WILL_MISSING_CERTIFICATIONS:"You will <b>lack certifications</b> soon (at least {{willNeedCertificationCount}} more are needed)",WILL_NEED_RENEW_MEMBERSHIP:"Your membership <b>will expire {{membershipExpiresIn|formatDurationTo}}</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a> before then.",NEED_RENEW_MEMBERSHIP:"You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED:"You are no longer a member because your membership <b>has been canceled</b> for lack of certifications. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",NO_WAITING_MEMBERSHIP:"No membership application pending. If you'd like to <b>become a member</ b>, please <a ng-click=\"doQuickFix('membership')\">send the membership application</a>.",CERTIFICATION_COUNT:"Received certifications",CERTIFICATION_COUNT_SHORT:"Certifications",SIG_STOCK:"Stock of certifications to give",BTN_RECEIVE_MONEY:"Receive",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Switch to another identity...",BTN_FIX_MEMBERSHIP:"Resubmit membership request...",BTN_MEMBERSHIP_RENEW:"Renew membership",BTN_MEMBERSHIP_RENEW_DOTS:"Renew membership...",BTN_MEMBERSHIP_OUT_DOTS:"Revoke membership...",BTN_SECURITY_DOTS:"Sign-in and security...",BTN_SHOW_DETAILS:"Display technical data",LOCKED_OUTPUTS_POPOVER:{TITLE:"Locked amount",DESCRIPTION:"Here are the conditions for unlocking this amount:",DESCRIPTION_MANY:"This transaction consists of several parts, of which the unlock conditions are:",LOCKED_AMOUNT:"Conditions for the amount:"},NEW:{TITLE:"Registration",INTRO_WARNING_TIME:"Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).",INTRO_WARNING_SECURITY:"Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.",INTRO_WARNING_SECURITY_HELP:"Up-to-date anti-virus, firewall enabled, session protected by password or pin code...",INTRO_HELP:"Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.",REGISTRATION_NODE:"Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.",REGISTRATION_NODE_HELP:"If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.",SELECT_ACCOUNT_TYPE:"Choose the type of account to create:",MEMBER_ACCOUNT:"Member account",MEMBER_ACCOUNT_TITLE:"Create a member account",MEMBER_ACCOUNT_HELP:"If you are not yet registered as an individual (one account possible per individual).",WALLET_ACCOUNT:"Simple wallet",WALLET_ACCOUNT_TITLE:"Create a wallet",WALLET_ACCOUNT_HELP:"If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.",SALT_WARNING:"Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!",PASSWORD_WARNING:"Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!",PSEUDO_WARNING:"Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>",PSEUDO:"Pseudonym",PSEUDO_HELP:"joe123",SALT_CONFIRM:"Confirm",SALT_CONFIRM_HELP:"Confirm the secret identifier",PASSWORD_CONFIRM:"Confirm",PASSWORD_CONFIRM_HELP:"Confirm the password",SLIDE_6_TITLE:"Confirmation:",COMPUTING_PUBKEY:"Computing...",LAST_SLIDE_CONGRATULATION:"You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?',CHECKING_PSEUDO:"Checking...",PSEUDO_AVAILABLE:"This pseudonym is available",PSEUDO_NOT_AVAILABLE:"This pseudonym is not available",INFO_LICENSE:"To be able to adhere to the currency, we ask you to kindly read and accept this license.",BTN_ACCEPT:"I accept",BTN_ACCEPT_LICENSE:"I accept the license"},POPUP_REGISTER:{TITLE:"Enter a pseudonym",HELP:"A pseudonym is needed to let other members find you."},SELECT_IDENTITY_MODAL:{TITLE:"Identity selection",HELP:'Several <b>different identities</b> have been sent, for the public key <span class="gray"> <i class="ion-key"></i> {{pubkey | formatPubkey}}</span>.<br/>Please select the identity to use:'},SELECT_WALLET_MODAL:{TITLE:"Wallet selection"},WALLET_LIST:{TITLE:"My wallets",BTN_NEW:"Add a wallet",BTN_DOWNLOAD:"Download the list",BTN_IMPORT_FILE_DOTS:"Import from a file...",NO_WALLET:"No secondary wallet",BTN_DELETE:"Remove a secondary wallet...",BTN_RENAME:"Rename the wallet",EXPORT_FILENAME:"my_wallets-{{pubkey|formatPubkey}}-{{currency}}.csv",TOTAL_DOTS:"Total: ",EDIT_POPOVER:{TITLE:"Rename the wallet",HELP:"Fill in the new name",NAME_HELP:"Wallet name"},IMPORT_MODAL:{TITLE:"Import secondary wallets",HELP:"To <b>import secodnary wallets</b>, please drag the file in the box below, or click in the box to search for a file.",WALLET_COUNT:"<b>{{count}}</b> new wallet{{count > 1 ? 's' : ''}}",NO_NEW_WALLET:"No new wallet"}},SECURITY:{ADD_QUESTION:"Add custom question",BTN_CLEAN:"Clean",BTN_RESET:"Reset",DOWNLOAD_REVOKE:"Save a revocation file",DOWNLOAD_REVOKE_HELP:"Having a revocation file is important, for example in case of loss of identifiers. It allows you to <b>get this account out of the Web Of Trust</b>, thus becoming a simple wallet.",GENERATE_KEYFILE:"Generate my keychain file ...",GENERATE_KEYFILE_HELP:"Generate a file allowing you to authenticate without entering your identifiers.<br/><b>Warning:</b> this file will contain your secret key; It is therefore very important to put it in a safe place!",KEYFILE_FILENAME:"keychain-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",MEMBERSHIP_IN:"Register as member...",MEMBERSHIP_IN_HELP:"Allows you to <b>transform </b> a simple wallet account <b>into a member account</b>, by sending a membership request. Useful only if you do not already have another member account.",SEND_IDENTITY:"Publish identity...",SEND_IDENTITY_HELP:"Allows you to associate a pseudonym to this account, but <b>without applying for membership</b> to become a member. This is not very useful because the validity of this pseudonym association is limited in time.",HELP_LEVEL:"Choose <strong> at least {{nb}} questions </strong> :",LEVEL:"Security level",LOW_LEVEL:'Low <span class="hidden-xs">(2 questions minimum)</span>',MEDIUM_LEVEL:'Medium <span class="hidden-xs">(4 questions minimum)</span>',QUESTION_1:"What was your best friend's name when you were a teen ?",QUESTION_2:"What was the name of your first pet ?",QUESTION_3:"What is the first meal you have learned to cook ?",QUESTION_4:"What is the first movie you saw in the cinema?",QUESTION_5:"Where did you go the first time you flew ?",QUESTION_6:"What was your favorite elementary school teacher's name  ?",QUESTION_7:"What would you consider the ideal job ?",QUESTION_8:"Which children's book do you prefer?",QUESTION_9:"What was the model of your first vehicle?",QUESTION_10:"What was your nickname when you were a child ?",QUESTION_11:"What was your favorite movie character or actor when you were a student ?",QUESTION_12:"What was your favorite singer or band when you were a student ?",QUESTION_13:"In which city did your parents meet ?",QUESTION_14:"What was the name of your first boss ?",QUESTION_15:"What is the name of the street where you grew up ?",QUESTION_16:"What is the name of the first beach where you go swim ?",QUESTION_17:"QWhat is the first album you bought ?",QUESTION_18:"What is the name of your favorite sport team ?",QUESTION_19:"What was your grand-father's job ?",RECOVER_ID:"Recover my password...",RECOVER_ID_HELP:"If you have a <b>backup file of your identifiers</b>, you can find them by answering your personal questions correctly.",RECOVER_ID_SELECT_FILE:"Select the <b>backup file of your identifiers</b> to use:",REVOCATION_WITH_FILE:"Revoke my member account...",REVOCATION_WITH_FILE_DESCRIPTION:"If you have <b>permanently lost your member account credentials (or if account security is compromised), you can use <b>the revocation file</b> of the account <b>to quit the Web Of Trust</b>.",REVOCATION_WITH_FILE_HELP:"To <b>permanently revoke</ b> a member account, please drag the revocation file in the box below, or click in the box to search for a file.",REVOCATION_WALLET:"Revoke this account immediately",REVOCATION_WALLET_HELP:"Requesting revocation of your identity causes <b>will revoke your membership</ b> (definitely for the associated pseudonym and public key). The account will no longer be able to produce a Universal Dividend.<br/>However, you can still use it as a simple wallet.",REVOCATION_FILENAME:"revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",SAVE_ID:"Save my credentials...",SAVE_ID_HELP:"Creating a backup file, to <b>retrieve your password</b> (and the secret identifier) <b> in case of forgetting</b>. The file is <b>secured</ b> (encrypted) using personal questions.",STRONG_LEVEL:'Strong <span class="hidden-xs ">(6 questions minimum)</span>',TITLE:"Account and security",KEYFILE:{PUBSEC_FORMAT:"PubSec format.",PUBSEC_FORMAT_HELP:"This file format is compatible in particular with Cesium and Gannonce. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",WIF_FORMAT:"Wallet Import Format (WIF)",WIF_FORMAT_HELP:"This format is used in particular by paper wallets. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",EWIF_FORMAT:"Encrypted Wallet Import Format (WIF)",EWIF_FORMAT_HELP:"This format is used in particular by paper wallets. However, <b>the keychain is encrypted</b> from a passphrase of your choice.",PASSWORD_POPUP:{TITLE:"Keychain file encrypted",HELP:"Please enter the passphrase:",PASSWORD_HELP:"Passphrase"},ERROR:{BAD_PASSWORD:"Bad passphrase",BAD_CHECKSUM:"Bad checksum"}}},FILE_NAME:"{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Date",AMOUNT:"Amount",COMMENT:"Comment"}},TRANSFER:{TITLE:"Transfer",SUB_TITLE:"Transfer money",SUB_TITLE_ALL:"Empty the account",FROM:"From",TO:"To",AMOUNT:"Amount",AMOUNT_HELP:"Amount",COMMENT:"Comment",COMMENT_HELP:"Comment (optional)",BTN_SEND:"Send",BTN_ADD_COMMENT:"Add a comment",REST:"Rest of account",REST_TO:"to",WARN_COMMENT_IS_PUBLIC:"Please note that <b>comments are public</b> (not encrypted).",MODAL:{TITLE:"Transfer"}},ERROR:{UNKNOWN_URI_FORMAT:"Unknown URI format",PUBKEY_INVALID_CHECKSUM:"Invalid public key (bad checksum).",POPUP_TITLE:"Error",UNKNOWN_ERROR:"Unknown error",CRYPTO_UNKNOWN_ERROR:"Your browser is not compatible with cryptographic features.",DOWNLOAD_KEYFILE_FAILED:"Failed to generate the keychain file.",EQUALS_TO_PSEUDO:"Must be different from pseudonym",EQUALS_TO_SALT:"Must be different from secret identifier",FIELD_REQUIRED:"This field is required.",FIELD_TOO_SHORT:"This field value is too short.",FIELD_TOO_SHORT_WITH_LENGTH:"Value is too short (min {{minLength]] characters).",FIELD_TOO_LONG:"Value is exceeding max length.",FIELD_TOO_LONG_WITH_LENGTH:"Value is too long (max {{maxLength}} characters).",FIELD_MIN:"Minimum value: {{min}}",FIELD_MAX:"Maximal value: {{max}}",FIELD_ACCENT:"Commas and accent characters not allowed",FIELD_NOT_NUMBER:"Value is not a number",FIELD_NOT_INT:"Value is not an integer",FIELD_NOT_EMAIL:"Email adress not valid",PASSWORD_NOT_CONFIRMED:"Must match previous password.",SALT_NOT_CONFIRMED:"Must match previous identifier.",SEND_IDENTITY_FAILED:"Error while trying to register.",SEND_CERTIFICATION_FAILED:"Could not certify identity.",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"You could not send certification, because your account is <b>not a member account</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"This account could not be certified. No registration found, or need to renew.",LOGIN_FAILED:"Error while sign in.",LOAD_IDENTITY_FAILED:"Could not load identity.",LOAD_REQUIREMENTS_FAILED:"Could not load identity requirements.",SEND_MEMBERSHIP_IN_FAILED:"Error while sending registration as member.",SEND_MEMBERSHIP_OUT_FAILED:"Error while sending membership revocation.",REFRESH_WALLET_DATA:"Could not refresh wallet.",GET_CURRENCY_PARAMETER:"Could not get currency parameters.",GET_CURRENCY_FAILED:"Could not load currency. Please retry later.",SEND_TX_FAILED:"Could not send transaction.",ALL_SOURCES_USED:"Please wait the next block computation (All transaction sources has been used).",NOT_ENOUGH_SOURCES:"Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Error while creating your member account.",RESTORE_WALLET_DATA_ERROR:"Error while reloading settings from local storage",LOAD_WALLET_DATA_ERROR:"Error while loading wallet data.",COPY_CLIPBOARD_FAILED:"Could not copy to clipboard",TAKE_PICTURE_FAILED:"Could not get picture.",SCAN_FAILED:"Could not scan QR code.",SCAN_UNKNOWN_FORMAT:"Code not recognized.",WOT_LOOKUP_FAILED:"Search failed.",LOAD_PEER_DATA_FAILED:"Duniter peer not accessible. Please retry later.",NEED_LOGIN_FIRST:"Please sign in first.",AMOUNT_REQUIRED:"Amount is required.",AMOUNT_NEGATIVE:"Negative amount not allowed.",NOT_ENOUGH_CREDIT:"Not enough credit.",INVALID_NODE_SUMMARY:"Unreachable peer or invalid address",INVALID_USER_ID:"Field 'pseudonym' must not contains spaces or special characters.",INVALID_COMMENT:"Field 'reference' has a bad format.",INVALID_PUBKEY:"Public key has a bad format.",INVALID_PUBKEY_CHECKSUM:"Invalid checksum.",IDENTITY_REVOKED:"This identity <b>has been revoked</b>. It can no longer become a member.",IDENTITY_REVOKED_WITH_TIME:"This identity <b>has been revoked {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). It can no longer become a member.",IDENTITY_PENDING_REVOCATION:"The <b>revocation of this identity</b> has been requested and is awaiting processing. Certification is therefore disabled.",IDENTITY_INVALID_BLOCK_HASH:"This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",IDENTITY_EXPIRED:"This identity has expired: this person must re-apply <b>before</b> being certified.",IDENTITY_SANDBOX_FULL:"Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",IDENTITY_NOT_FOUND:"Identity not found",IDENTITY_TX_FAILED:"Error while getting identity's transactions",WOT_PENDING_INVALID_BLOCK_HASH:"Membership not valid.",WALLET_INVALID_BLOCK_HASH:"Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",WALLET_IDENTITY_EXPIRED:"The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",WALLET_REVOKED:"Your identity has been <b>revoked</b>: neither your pseudonym nor your public key will be used in the future for a member account.",WALLET_HAS_NO_SELF:"Your identity must first have been published, and not expired.",AUTH_REQUIRED:"Authentication required.",AUTH_INVALID_PUBKEY:"The public key does not match the connected account.",AUTH_INVALID_SCRYPT:"Invalid username or password.",AUTH_INVALID_FILE:"Invalid keychain file.",AUTH_FILE_ERROR:"Failed to open keychain file",IDENTITY_ALREADY_CERTIFY:"You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",UNABLE_TO_CERTIFY_TITLE:"Unable to certify",LOAD_NEWCOMERS_FAILED:"Unable to load new members.",LOAD_PENDING_FAILED:"Unable to load pending registrations.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"You must <b>be a member</b> in order to perform this action.",ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION:"You must <b>be a member (or old member)</b> in order to perform this action.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"You must have <b>published your identity</b> in order to perform this action.",GET_BLOCK_FAILED:"Error while getting block",INVALID_BLOCK_HASH:"Block not found (incorrect hash)",DOWNLOAD_REVOCATION_FAILED:"Error while downloading revocation file.",REVOCATION_FAILED:"Error while trying to revoke the identity.",SALT_OR_PASSWORD_NOT_CONFIRMED:"Wrong secret identifier or password ",RECOVER_ID_FAILED:"Could not recover password",LOAD_FILE_FAILED:"Unable to load file",NOT_VALID_REVOCATION_FILE:"Invalid revocation file (wrong file format)",NOT_VALID_SAVE_ID_FILE:"Invalid credentials backup file (wrong file format)",NOT_VALID_KEY_FILE:"Invalid keychain file (unrecognized format)",EXISTING_ACCOUNT:"Your identifiers correspond to an already existing account, whose <a ng-click=\"showHelpModal('pubkey')\">public key</a> is:",EXISTING_ACCOUNT_REQUEST:"Please modify your credentials so that they correspond to an unused account.",GET_LICENSE_FILE_FAILED:"Unable to get license file",CHECK_NETWORK_CONNECTION:"No peer appears to be accessible.<br/><br/>Please <b>check your Internet connection</b>.",ISSUE_524_TX_FAILED:"Failed to transfer.<br/><br/>A message has been sent to developers to help solve the problem.<b>Thank you for your help</b>.",ADD_SECONDARY_WALLET_FAILED:"Unable to add secondary wallet.",UPDATE_WALLET_LIST_FAILED:"Unable to refresh the list of wallets.",LOAD_WALLET_LIST_FAILED:"Unable to load the list of wallets.",SAVE_WALLET_LIST_FAILED:"Unable to save the list of wallets.",COULD_NOT_ADD_MAIN_WALLET:"This wallet <b>is the main account</b> with which you are connected. Unable to add it as a secondary wallet.",COULD_NOT_ADD_EXISTING_WALLET:"Wallet already existing in the list.",UNKNOWN_WALLET_ID:"Unknown secondary wallet.",RESTORE_WALLET_LIST_FAILED:"Unable to restore the list of wallets.",INVALID_FILE_FORMAT:"Invalid file format.",SAME_TX_RECIPIENT:"The recipient must be different from the issuer."},INFO:{POPUP_TITLE:"Information",CERTIFICATION_DONE:"Identity successfully signed",NOT_ENOUGH_CREDIT:"Not enough credit",TRANSFER_SENT:"Transfer request successfully sent",COPY_TO_CLIPBOARD_DONE:"Copy succeeded",MEMBERSHIP_OUT_SENT:"Membership revocation sent",NOT_NEED_MEMBERSHIP:"Already a member.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"This identity will soon lack certification (at least {{willNeedCertificationCount}}).",IDENTITY_NEED_MEMBERSHIP:"This identity did not send a membership request. She will have to if she wishes to become a member.",HAS_ALTERNATIVE_IDENTITIES:"There are <b>multiple identities</b> attached to this public key. <b>Before any certification</b>, please <a ng-click=\"doQuickFix('showSelectIdentities')\">check other identities</a> to choose the correct one, or contact the wallet owner.",REVOCATION_SENT:"Revocation sent successfully",REVOCATION_SENT_WAITING_PROCESS:"Revocation <b>has been sent successfully</b>. It is awaiting processing.",FEATURES_NOT_IMPLEMENTED:"This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)",EMPTY_TX_HISTORY:"No operations to export"},CONFIRM:{POPUP_TITLE:"<b>Confirmation</b>",POPUP_WARNING_TITLE:"<b>Warning</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Security warning</b>',CERTIFY_RULES_TITLE_UID:"Certify {{uid}}",CERTIFY_RULES:'<b class="assertive">Don\'t certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?',FULLSCREEN:"View the application in full screen?",EXIT_APP:"Close the application ?",TRANSFER:"<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",TRANSFER_ALL:"<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",MEMBERSHIP_OUT:"This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",MEMBERSHIP_OUT_2:"This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>terminate your membership</b>?",LOGIN_UNUSED_WALLET_TITLE:"Typing error?",LOGIN_UNUSED_WALLET:"The account seems to be <b>inactive</b>.<br/><br/>It's probably a <b>typing error</b> when sign in. Please try again, checking that <b>public key is yours<b/>.",FIX_IDENTITY:"The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?",FIX_MEMBERSHIP:"Your application for membership will be sent.<br/></br/><b>Are you sure?</b>",MEMBERSHIP:"Your membership request will be sent. <br/></br/><b>Are you sure?</b>",RENEW_MEMBERSHIP:"Your membership will be renewed.<br/></br/><b>Are you sure?</b>",REVOKE_IDENTITY:"You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?",REVOKE_IDENTITY_2:"This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?",NOT_NEED_RENEW_MEMBERSHIP:"Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?",SAVE_BEFORE_LEAVE:"Do you want to <b>save your changes</b> before leaving the page?",SAVE_BEFORE_LEAVE_TITLE:"Changes not saved",LOGOUT:"Are you sure you want to logout?",USE_FALLBACK_NODE:"Peer <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the <b>{{new}}</b> node?",ISSUE_524_SEND_LOG:"The transaction was rejected because of a known problem (issue #524) but not reproduced.<br/><br/>To help developers correct this error, do you accept <b>the transmission of your logs</b> per message?<br/><small>(No confidential data is sent)</small>"},DOWNLOAD:{POPUP_TITLE:"<b>Revocation file</b>",POPUP_REVOKE_MESSAGE:"To safeguard your account, please download the <b>account revocation document</b>. It will allow you to cancel your account (in case of account theft, ID, an incorrectly created account, etc.).<br/><br/><b>Please store it in a safe place.</b>"},HELP:{TITLE:"Online help",JOIN:{SECTION:"Join",SALT:'The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class="text-italic">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.',PASSWORD:"The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",PSEUDO:'A pseudonym is used only when joining as <span class="text-italic">member</span>. It is always associated with a wallet (by its <span class="text-italic">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past).'},LOGIN:{SECTION:"Log in",PUBKEY:"Account public key",PUBKEY_DEF:'The public key of the keychain is generated from the entered identifiers (any), but does not correspond to an account already used.<br/><b>Make sure your public key is the same as your account</b>. Otherwise, you will be logged into an account that is probably never used, as the risk of collision with an existing account is very small.<br/><a href="https://en.wikipedia.org/wiki/Elliptic_curve_cryptography" target="_ system">Learn more about cryptography</a> by public key.',METHOD:"Connection methods",METHOD_DEF:"Several options are available to connect to a portfolios: <br/> - The connection <b>with salt (simple or advanced)</b> mixes your password with the secret identifier, to limit the attempts of piracy<br/> - The connection <b>using public key</b> prevents you from entering your credentials, which you will be asked only when an operation need it.<br/> - The connection <b>using keychain file</b> will read the public and private keys of the account from a file without the need to enter credentials. Several file formats are possible."},GLOSSARY:{SECTION:"Glossary",PUBKEY_DEF:"A public key always identifies a wallet. It may identify a member. In Cesium it is calculated using the secret identifier and the password.",MEMBER:"Member",MEMBER_DEF:'A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class="text-italic">currency parameters</span>.',CURRENCY_RULES:"Currency rules",CURRENCY_RULES_DEF:'The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class="text-italic">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href="#/app/currency">See current parameters</a>.',BLOCKCHAIN:"Blockchain",BLOCKCHAIN_DEF:'The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class="text-italic">currency rules</span>.<br/><a href="http://en.duniter.org/presentation/" target="_blank">Read more about Duniter</a> and the working of its blockchain.',UNIVERSAL_DIVIDEND_DEF:'The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class="text-italic">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href="http://trm.creationmonetaire.info" target="_system">Read more about RTM</a> and open money.',WOT:"Web of Trust (WoT)",WOT_DEF:"The Web of Trust is made up of all the members of the currency, and the links of certification which connect them.",DISTANCE_RULE:"Distance rule",DISTANCE_RULE_DEF:"The rule of distance defines <b>a maximum distance to meet</b> between an applicant and a minimum number of referring member. This distance is calculated using the certification links."},TIP:{MENU_BTN_CURRENCY:"Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",CURRENCY_WOT:"The <b>member count</b> shows the <b>community's weight and evolution</b>.",CURRENCY_MASS:"Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",CURRENCY_UNIT_RELATIVE:"The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",CURRENCY_CHANGE_UNIT:"The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",CURRENCY_RULES:"The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",MENU_BTN_NETWORK:"Menu <b>{{'MENU.NETWORK'|translate}}</b> allows discovery of <b>network's state<b>.",NETWORK_BLOCKCHAIN:"All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",NETWORK_PEERS:"The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",NETWORK_PEERS_BLOCK_NUMBER:"This <b>number</b> (in green) indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre). <a target="_new" href="{{installDocUrl}}" target="_system">Read the installation manual &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",MENU_BTN_ACCOUNT_MEMBER:"Here you can consult your account status, transaction history and your certifications.",WALLET_CERTIFICATIONS:"Click here to reveiw the details of your certifications (given and received).",WALLET_RECEIVED_CERTIFICATIONS:"Click here to review the details of your <b>received certifications</b>.",WALLET_GIVEN_CERTIFICATIONS:"Click here to review the details of your <b>given certifications</b>.",WALLET_BALANCE:"Your account <b>balance</b> is shown here.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",WALLET_BALANCE_CHANGE_UNIT:"You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",WALLET_PUBKEY:"This is your account public key. You can communicate it to a third party so that it more easily identifies your account.",WALLET_SEND:"Issue a payment in just a few clicks.",WALLET_SEND_NO_MONEY:"Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",WALLET_OPTIONS:"Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",WALLET_RECEIVED_CERTS:"This shows the list of persons that certified you.",WALLET_CERTIFY:"The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",WALLET_CERT_STOCK:"Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",MENU_BTN_WALLETS:"The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.",MENU_BTN_TX:"The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.",MENU_BTN_WOT:"The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",WOT_SEARCH_TEXT_XS:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",WOT_SEARCH_TEXT:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",WOT_SEARCH_RESULT:"Simply click a user row to view the details sheet.",WOT_VIEW_CERTIFICATIONS:"The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Click here to open <b>a list of all certifications</b> given to and by this identity.",WOT_VIEW_CERTIFY:"The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",CERTIFY_RULES:"<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",MENU_BTN_SETTINGS:"The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",HEADER_BAR_BTN_PROFILE:"Click here to access your <b>user profile</b>",SETTINGS_CHANGE_UNIT:"You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",END_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",END_NOT_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below."}},API:{COMMON:{LINK_DOC:"API documentation",LINK_DOC_HELP:"API documentation for developers",LINK_STANDARD_APP:"Standard version",LINK_STANDARD_APP_HELP:"Open standard version of {{'COMMON.APP_NAME'|translate}}",CONNECTION_ERROR:"Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or contact the web site administrator."},HOME:{TITLE:"{{'COMMON.APP_NAME'|translate}} API Documentation",MESSAGE:'Welcome to the {{\'COMMON.APP_NAME\'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href="http://duniter.org" target="_system">Duniter</a> very easily!',MESSAGE_SHORT:'Connect your websites to <a href="http://duniter.org" target="_system">Duniter</a> very easily!',DOC_HEADER:"Available services:"},TRANSFER:{TITLE:"{{'COMMON.APP_NAME'|translate}} - Online payment",TITLE_SHORT:"Online payment",SUMMARY:"Order summary:",AMOUNT:"Amount:",AMOUNTS_HELP:"Please select the amount:",NAME:"Name:",PUBKEY:"Public key of the recipient:",COMMENT:"Order reference:",NODE:"Peer address:",DEMO:{SALT:"demo",PASSWORD:"demo",PUBKEY:"3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",HELP:"<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",BAD_CREDENTIALS:"Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"},INFO:{SUCCESS_REDIRECTING_WITH_NAME:"Payment sent.<br/>Redirect to <b>{{name}}</b>...",SUCCESS_REDIRECTING:"Payment sent.<br/>Redirect to the seller's website...",CANCEL_REDIRECTING_WITH_NAME:"Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",CANCEL_REDIRECTING:"Payment cancelled.<br/>Redirect to the seller's website..."},ERROR:{TRANSFER_FAILED:"Payment failed"}},DOC:{DESCRIPTION_DIVIDER:"Description",URL_DIVIDER:"Calling address",PARAMETERS_DIVIDER:"Parameters",AVAILABLE_PARAMETERS:"Here is the list of al available parameters:",DEMO_DIVIDER:"Try it !",DEMO_HELP:"To test this service, click on this button. The result content will be display below.",DEMO_RESULT:"Result returned by call:",DEMO_RESULT_PEER:"Peer address used:",DEMO_SUCCEED:'<i class="icon ion-checkmark"></i> Success!',DEMO_CANCELLED:'<i class="icon ion-close"></i> Canceled by user',INTEGRATE_DIVIDER:"Website integration",INTEGRATE_CODE:"Code:",INTEGRATE_RESULT:"Result preview:",INTEGRATE_PARAMETERS:"Parameters",TRANSFER:{TITLE:"Payments",DESCRIPTION:"From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",PARAM_PUBKEY:"Recipient's public key",PARAM_PUBKEY_HELP:"Recipient's public key (required)",PARAM_AMOUNT:"Amount",PARAM_AMOUNT_HELP:"Transaction amount (required)",PARAM_COMMENT:"Reference (or comment)",PARAM_COMMENT_HELP:"Reference or comment. You will allow for example to identify the payment in the BlockChain.",PARAM_NAME:"Name (of recipient or website)",PARAM_NAME_HELP:'The name of your website. This can be a readable name (eg "My online site"), or a web address (eg "www.MySite.com").',PARAM_REDIRECT_URL:"URL redirection",PARAM_REDIRECT_URL_HELP:'URL redirection after sending payment, after the payment has been sent. Can contain the following strings, which will be replaced by the values of the transaction: "{tx}", "{hash}", "{comment}", "{amount}" and "{pubkey}".',PARAM_CANCEL_URL:"URL if cancelled",PARAM_CANCEL_URL_HELP:'URL in case of cancellation.  Can contain the following strings, which will be replaced: "{comment}", "{amount}" and "{pubkey}".',PARAM_PREFERRED_NODE:"Preferred Duniter peer",PARAM_PREFERRED_NODE_HELP:'Peer address (URL) to use preferably ("g1.domain.com:443" or "https://g1.domain.com")',EXAMPLES_HELP:"Examples of integration:",EXAMPLE_BUTTON:"HTML Button",EXAMPLE_BUTTON_DEFAULT_TEXT:"Pay in {{currency|abbreviate}}",EXAMPLE_BUTTON_DEFAULT_STYLE:"Custom style",EXAMPLE_BUTTON_TEXT_HELP:"Button text",EXAMPLE_BUTTON_BG_COLOR:"Background color",EXAMPLE_BUTTON_BG_COLOR_HELP:"eg: #fbc14c, yellow, lightgrey, rgb(180,180,180)",EXAMPLE_BUTTON_FONT_COLOR:"Font color",EXAMPLE_BUTTON_FONT_COLOR_HELP:"eg: black, orange, rgb(180,180,180)",EXAMPLE_BUTTON_TEXT_ICON:"Icon",EXAMPLE_BUTTON_TEXT_WIDTH:"Width",EXAMPLE_BUTTON_TEXT_WIDTH_HELP:"eg: 200px, 50%",EXAMPLE_BUTTON_ICON_NONE:"No icon",EXAMPLE_BUTTON_ICON_DUNITER:"Duniter logo",EXAMPLE_BUTTON_ICON_CESIUM:"Cesium logo",EXAMPLE_BUTTON_ICON_G1_COLOR:"Ğ1 logo",EXAMPLE_BUTTON_ICON_G1_BLACK:"Ğ1 logo (outline)"}}}}),e.translations("eo-EO",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"date : {{build}}",PUBKEY:"Publika ŝlosilo",MEMBER:"Membro",BLOCK:"Bloko",BTN_OK:"OK",BTN_YES:"Jes",BTN_NO:"Ne",BTN_SEND:"Sendi",BTN_SEND_MONEY:"Fari elspezon",BTN_SEND_MONEY_SHORT:"Elspezo",BTN_SAVE:"Konservi",BTN_YES_SAVE:"Jes, Konservi",BTN_YES_CONTINUE:"Jes, Daŭrigi",BTN_SHOW:"Vidi",BTN_SHOW_PUBKEY:"Afiŝi la publikan ŝlosilon",BTN_RELATIVE_UNIT:"Afiŝi la sumojn en UD?",BTN_BACK:"Reiro",BTN_NEXT:"Sekva",BTN_IMPORT:"Enporti",BTN_CANCEL:"Nuligi",BTN_CLOSE:"Fermi",BTN_LATER:"Poste",BTN_LOGIN:"Konektiĝi",BTN_LOGOUT:"Malkonektiĝo",BTN_ADD_ACCOUNT:"Nova konto",BTN_SHARE:"Diskonigi",BTN_EDIT:"Modifi",BTN_DELETE:"Forigi",BTN_ADD:"Aldoni",BTN_SEARCH:"Serĉi",BTN_REFRESH:"Aktualigi",BTN_RETRY:"Rekomenci",BTN_START:"Komenci",BTN_CONTINUE:"Daŭrigi",BTN_CREATE:"Krei",BTN_UNDERSTOOD:"Mi komprenis",BTN_OPTIONS:"Kromeblecoj",BTN_HELP_TOUR:"Gvidata vizito",BTN_HELP_TOUR_SCREEN:"Malkovri tiun ĉi paĝon",BTN_DOWNLOAD:"Elŝuti",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Elŝuti la konto-tabelon",BTN_MODIFY:"Modifi",CHOOSE_FILE:"Almetu vian dosieron <br/>aŭ klaku por elekti ĝin",DAYS:"tagoj",NO_ACCOUNT_QUESTION:"Ankoraŭ sen konto? Kreu ĝin senpage!",SEARCH_NO_RESULT:"Neniu rezulto trovita",LOADING:"Bonvolu pacienci...",LOADING_WAIT:"Bonvolu pacienci...<br/><small>(Atendado pri disponebleco de la nodo)</small>",SEARCHING:"Serĉanta...",FROM:"De",TO:"Al",COPY:"Kopii",LANGUAGE:"Lingvo",UNIVERSAL_DIVIDEND:"Universala dividendo",UD:"UD",DATE_PATTERN:"DD/MM/YY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD/MM/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(malplena)",UID:"Pseŭdonimo",ENABLE:"Aktiva",DISABLE:"Malaktiva",RESULTS_LIST:"Rezultoj",RESULTS_COUNT:"{{count}} rezultoj",EXECUTION_TIME:"Plenumita en {{duration|formatDurationMs}}",SHOW_VALUES:"Afiŝi la signojn klare?",POPOVER_ACTIONS_TITLE:"Kromeblecoj",POPOVER_FILTER_TITLE:"Filtriloj",SHOW_MORE:"Afiŝi pli",SHOW_MORE_COUNT:"(nuna limo je {{limit}})",POPOVER_SHARE:{TITLE:"Diskonigi",SHARE_ON_TWITTER:"Diskonigi ĉe Twitter",SHARE_ON_FACEBOOK:"Diskonigi ĉe Facebook",SHARE_ON_DIASPORA:"Diskonigi ĉe Diaspora*",SHARE_ON_GOOGLEPLUS:"Diskonigi ĉe Google+"},FILE:{DATE:"Dato:",TYPE:"Tipo:",SIZE:"Pezo:",VALIDATING:"Validiĝanta..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Elekti la fonton:",BTN_PICTURE_GALLERY:"Bildaro",BTN_PICTURE_CAMERA:"<b>Kamerao</b>"},MENU:{HOME:"Hejmpaĝo",WOT:"Kontaro",CURRENCY:"Mono",ACCOUNT:"Mia konto",WALLETS:"Miaj monujoj",SETTINGS:"Parametroj",NETWORK:"Reto",TRANSACTIONS:"Miaj spezoj"},ABOUT:{TITLE:"Prie",LICENSE:"Programo <b>libera</b> (Licenco GNU AGPLv3).",LATEST_RELEASE:"Ekzistas <b>pli freŝdata versio</b> de {{'COMMON.APP_NAME'|translate}} (<b>v{{version}}</b>)",PLEASE_UPDATE:"Bonvolu ĝisdatigi {{'COMMON.APP_NAME'|translate}} (lasta versio: <b>v{{version}}</b>)",CODE:"Fonto-kodo:",OFFICIAL_WEB_SITE:"Oficiala retejo:",DEVELOPERS:"Programita de:",FORUM:"Forumo:",PLEASE_REPORT_ISSUE:"Ne hezitu sciigi al ni la renkontitajn fuŝaĵojn",REPORT_ISSUE:"Sciigi problemon",BTN_OPEN_DEV_WINDOW:"Malfermi la fenestron pri malfuŝigado"},HOME:{TITLE:"Cesium",WELCOME:"Bonvenon ĉe la programo Cesium!",MESSAGE:"Ricevu kaj sendu liberan monon {{currency|abbreviate}}",BTN_CURRENCY:"Esploru la monon {{name|abbreviate}}",BTN_ABOUT:"prie",BTN_HELP:"Reta helpo",REPORT_ISSUE:"fuŝaĵo",NOT_YOUR_ACCOUNT_QUESTION:'Vi ne posedas la konton <b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b> ?',BTN_CHANGE_ACCOUNT:"Malkonektu tiun ĉi konton",CONNECTION_ERROR:'Nodo <b>{{server}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Kontrolu vian retkonekton, aŭ elektu alian nodon <a class="positive" ng-click="doQuickFix(\'settings\')">ĉe la parametroj</a>.'},SETTINGS:{TITLE:"Parametroj",DISPLAY_DIVIDER:"Afiŝado",STORAGE_DIVIDER:"Stokado",NETWORK_SETTINGS:"Reto",PEER:"Adreso de la nodo Duniter",PEER_SHORT:"Adreso de la nodo",PEER_CHANGED_TEMPORARY:"Adreso provizore uzata",USE_LOCAL_STORAGE:"Aktivigi lokan stokadon",USE_LOCAL_STORAGE_HELP:"Ebligas konservi viajn parametrojn",WALLETS_SETTINGS:"Miaj monujoj",USE_WALLETS_ENCRYPTION:"Sekurigi la liston?",USE_WALLETS_ENCRYPTION_HELP:"Ebligas sekurigi la liston de viaj monujoj (per ĉifrado), postulante aŭtentigado por aliri ilin.",ENABLE_HELPTIP:"Aktivigi la rilatigajn help-vezikojn",ENABLE_UI_EFFECTS:"Aktivigi la vid-efikojn",HISTORY_SETTINGS:"Miaj spezoj",DISPLAY_UD_HISTORY:"Afiŝi la produktitajn dividendojn?",TX_HISTORY_AUTO_REFRESH:"Aktualigi aŭtomate",TX_HISTORY_AUTO_REFRESH_HELP:"Aktualigas la saldon kaj la spezojn aŭtomate, por ĉiu nova bloko de la reto.",AUTHENTICATION_SETTINGS:"Aŭtentigado",KEEP_AUTH:"Aŭtomata malaŭtentigado",KEEP_AUTH_SHORT:"Malaŭtentigado",KEEP_AUTH_HELP:"Difinas la momenton, kiam la aŭtentigado estas forviŝita de la memoro.",KEEP_AUTH_OPTION:{NEVER:"Post ĉiu ago",SECONDS:"Post {{value}}s de neatktiveco",MINUTE:"Post {{value}}min de neatktiveco",MINUTES:"Post {{value}}min de neatktiveco",HOUR:"Post {{value}}h de neatktiveco",ALWAYS:"Fine de la sesio"},KEYRING_FILE:"Dosiero pri ŝlosilaro",KEYRING_FILE_HELP:'Ebligas <b>konektiĝi</b> aŭtomate por ĉiu ekuzo<br/>kaj eĉ <b>aŭtentiĝi</b> (nur se "Finiĝo de la aŭtentiĝo" estas agordita kiel "fine de la sesio").',REMEMBER_ME:"Memori min?",REMEMBER_ME_HELP:"Ebligas resti identigita de sesio al alia, loke konservante la publikan ŝlosilon.",PLUGINS_SETTINGS:"Krom-programoj",BTN_RESET:"Restarigi la originajn valorojn",EXPERT_MODE:"Aktivigi la spertan moduson",EXPERT_MODE_HELP:"Ebligas pli detalan afiŝadon.",BLOCK_VALIDITY_WINDOW:"Limtempo pri necerteco de la blokoj",BLOCK_VALIDITY_WINDOW_SHORT:"Limtempo pri necerteco",BLOCK_VALIDITY_WINDOW_HELP:"Limtempo antaŭ ol taksi, ke iu informo estas validigita",BLOCK_VALIDITY_OPTION:{NONE:"Neniu limtempo",N:"{{time | formatDuration}} ({{count}} blokoj)"},POPUP_PEER:{TITLE:"Nodo Duniter",HOST:"Adreso",HOST_HELP:"Adreso: servilo: konektujo",USE_SSL:"Sekurigita?",USE_SSL_HELP:"(SSL-ĉifrado)",BTN_SHOW_LIST:"Listo de la nodoj"}},BLOCKCHAIN:{HASH:"Haketo: {{hash}}",VIEW:{HEADER_TITLE:"Bloko #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Nuna bloko",TITLE:"Bloko #{{number|formatInteger}}",COMPUTED_BY:"Kalkulita de la nodo de",SHOW_RAW:"Vidi la kompletan dosieron",TECHNICAL_DIVIDER:"Teknikaj informoj",VERSION:"Versio de la daten-strukturo",HASH:"Kalkulita haketo",UNIVERSAL_DIVIDEND_HELP:"Mono kunproduktita de ĉiu el la {{membersCount}} membroj",EMPTY:"Neniu dateno en tiu ĉi bloko",POW_MIN:"Minimuma malfacileco",POW_MIN_HELP:"Malfacileco trudita por la haket-kalkulo",DATA_DIVIDER:"Datenoj",IDENTITIES_COUNT:"Novaj identecoj",JOINERS_COUNT:"Novaj membroj",ACTIVES_COUNT:"Revalidigoj",ACTIVES_COUNT_HELP:"Membroj revalidigintaj sian membrecon",LEAVERS_COUNT:"Membroj elirintaj",LEAVERS_COUNT_HELP:"Membroj ne plu dezirantaj atestaĵon",EXCLUDED_COUNT:"Membroj eksigitaj",EXCLUDED_COUNT_HELP:"Malnovaj membroj eksigitaj pro nerevalidiĝo aŭ manko de atestaĵoj",REVOKED_COUNT:"Nuligitaj identecoj",REVOKED_COUNT_HELP:"Tiuj kontoj ne plu povos esti membroj",TX_COUNT:"Spezoj",CERT_COUNT:"Atestaĵoj",TX_TO_HIMSELF:"Operacio pri monŝanĝo",TX_OUTPUT_UNLOCK_CONDITIONS:"Kondiĉoj por malblokado",TX_OUTPUT_OPERATOR:{AND:"kaj",OR:"aŭ"},TX_OUTPUT_FUNCTION:{SIG:"<b>Subskribo</b> de ",XHX:"<b>Pasvorto</b>, el kiu SHA256 =",CSV:"Blokita dum",CLTV:"Blokita ĝis"}},LOOKUP:{TITLE:"Blokoj",NO_BLOCK:"Neniu bloko",LAST_BLOCKS:"Lastaj blokoj:",BTN_COMPACT:"Densigi"}},CURRENCY:{VIEW:{TITLE:"Mono",TAB_CURRENCY:"Mono",TAB_WOT:"Reto de fido",TAB_NETWORK:"Reto",TAB_BLOCKS:"Blokoj",CURRENCY_SHORT_DESCRIPTION:"{{currency|abbreviate}} estas <b>libera mono</b>, kiu ekis {{firstBlockTime|formatFromNow}}. Ĝi nombras nun <b>{{N}} membrojn</b>, kiuj produktas kaj ricevas <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a> (UD), ĉiun {{dt|formatPeriod}}n.",NETWORK_RULES_DIVIDER:"Reguloj de la reto",CURRENCY_NAME:"Nomo de la mono",MEMBERS:"Nombro de membroj",MEMBERS_VARIATION:"Variado depost la lasta UD",MONEY_DIVIDER:"Mono",MASS:"Mona maso",SHARE:"Maso por membro",UD:"Universala Dividendo",C_ACTUAL:"Nuna kreskado",MEDIAN_TIME:"Horo de la blokĉeno",POW_MIN:"Minimuma nivelo pri malfacileco de kalkulo",MONEY_RULES_DIVIDER:"Reguloj de la mono",C_RULE:"Teoria kreskado celata",UD_RULE:"Kalkulo de la universala dividendo",DT_REEVAL:"Periodo de revalorigo de la UD",REEVAL_SYMBOL:"reval",DT_REEVAL_VALUE:"Ĉiuj <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Dato de la unua revalorigo",SIG_QTY_RULE:"Nombro de necesaj atestaĵoj por fariĝi membro",SIG_STOCK:"Maksimuma nombro da senditaj atestaĵoj por membro",SIG_PERIOD:"Minimuma daŭro de atendado inter 2 sinsekvaj atestaĵoj senditaj de sama persono",SIG_WINDOW:"Limdaŭro por akcepti atestaĵon",SIG_VALIDITY:"Vivdaŭro de atestaĵo, kiu estis akceptita",MS_WINDOW:"Limdaŭro por akcepti aliĝ-peton kiel membron",MS_VALIDITY:"Vivdaŭro de aliĝo, kiu estis akceptita",STEP_MAX:"Maksimuma distanco, per la atestaĵoj, inter nova eniranto kaj la referencaj membroj",WOT_RULES_DIVIDER:"Reguloj de la reto de fido",SENTRIES:"Nombro de atestaĵoj (senditaj <b>kaj</b> ricevitaj) por fariĝi referenca membro",SENTRIES_FORMULA:"Nombro de atestaĵoj (senditaj <b>kaj</b> ricevitaj) por fariĝi referenca membro (formulo)",XPERCENT:"Minimuma procento da referencaj membroj atingenda por konformiĝi al la regulo pri distanco",AVG_GEN_TIME:"Meza daŭro inter du blokoj",CURRENT:"nuna",MATH_CEILING:"PLAFONO",DISPLAY_ALL_RULES:"Afiŝi ĉiujn regulojn?",BTN_SHOW_LICENSE:"Vidi la licencon",WOT_DIVIDER:"Reto de fido"},LICENSE:{TITLE:"Licenco de la mono",BTN_DOWNLOAD:"Elŝuti la dosieron",NO_LICENSE_FILE:"Dosiero pri licenco ne trovita."}},NETWORK:{VIEW:{MEDIAN_TIME:"Horo de la blokĉeno",LOADING_PEERS:"Nodoj ŝarĝiĝantaj...",NODE_ADDRESS:"Adreso:",SOFTWARE:"Programo",WARN_PRE_RELEASE:"Antaŭ-versio (lasta stabila versio: <b>{{version}}</b>)",WARN_NEW_RELEASE:"Versio <b>{{version}}</b> disponebla",WS2PID:"Identigilo:",PRIVATE_ACCESS:"Privata aliro",POW_PREFIX:"Prefikso pri labor-pruvo:",ENDPOINTS:{BMAS:"Sekurigita interfaco (SSL)",BMATOR:"Reta interfaco TOR",WS2P:"Interfaco WS2P",ES_USER_API:"Nodo de datenoj Cesium+"}},INFO:{ONLY_SSL_PEERS:"La nodoj ne-SSL estas mis-afiŝitaj, ĉar Cesium funkcias laŭ moduso HTTPS."}},PEER:{PEERS:"Nodoj",SIGNED_ON_BLOCK:"Skribita en la bloko",MIRROR:"spegulo",MIRRORS:"Speguloj",MIRROR_PEERS:"Spegul-nodoj",PEER_LIST:"Listo de la nodoj",MEMBERS:"Membroj",MEMBER_PEERS:"Membro-nodoj",ALL_PEERS:"Ĉiuj nodoj",DIFFICULTY:"Malfacileco",API:"API",CURRENT_BLOCK:"Bloko #",POPOVER_FILTER_TITLE:"Filtrilo",OFFLINE:"Nekonektita",OFFLINE_PEERS:"Nekonektitaj nodoj",BTN_SHOW_PEER:"Vidi la nodon",VIEW:{TITLE:"Nodo",OWNER:"Apartenas al",SHOW_RAW_PEERING:"Vidi la samrangan dokumenton",SHOW_RAW_CURRENT_BLOCK:"Vidi la lastan blokon (kompleta strukturo)",LAST_BLOCKS:"Lastaj blokoj konataj",KNOWN_PEERS:"Konataj nodoj:",GENERAL_DIVIDER:"Ĝeneralaj informoj",ERROR:{LOADING_TOR_NODE_ERROR:"Neeblas ricevi la informojn de la nodo. La limdaŭro de atendado estas transpasita.",LOADING_NODE_ERROR:"Neeblas ricevi la informojn de la nodo"}}},WOT:{SEARCH_HELP:"Traserĉado (pseŭdo aŭ publika ŝlosilo)",SEARCH_INIT_PHASE_WARNING:"Dum la periodo de antaŭ-aliĝo, la traserĉado de la atendantaj aliĝoj <b>povas esti longa</b>. Bonvolu pacienci...",REGISTERED_SINCE:"Enskribita la",REGISTERED_SINCE_BLOCK:"Enskribita en la bloko #",NO_CERTIFICATION:"Neniu atestaĵo validigita",NO_GIVEN_CERTIFICATION:"Neniu atestaĵo sendita",NOT_MEMBER_PARENTHESIS:"(ne membro)",IDENTITY_REVOKED_PARENTHESIS:"(identeco nuligita)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(nuliĝanta)",EXPIRE_IN:"Finiĝo",NOT_WRITTEN_EXPIRE_IN:"Limdato<br/>de traktado",EXPIRED:"Finiĝinta",PSEUDO:"Pseŭdonimo",SIGNED_ON_BLOCK:"Sendita en la bloko #{{block}}",WRITTEN_ON_BLOCK:"Enskribita en la bloko #{{block}}",GENERAL_DIVIDER:"Ĝeneralaj informoj",NOT_MEMBER_ACCOUNT:"Simpla konto (ne membro)",NOT_MEMBER_ACCOUNT_HELP:"Temas pri simpla monujo, sen aliĝ-peto atendanta.",TECHNICAL_DIVIDER:"Teknikaj informoj",BTN_CERTIFY:"Atesti",BTN_YES_CERTIFY:"Jes, atesti",BTN_SELECT_AND_CERTIFY:"Nova atestaĵo",ACCOUNT_OPERATIONS:"Spezoj en la konto",VIEW:{POPOVER_SHARE_TITLE:"Identeco {{title}}"},LOOKUP:{TITLE:"Reto de fido",NEWCOMERS:"Novaj membroj",NEWCOMERS_COUNT:"{{count}} membroj",PENDING:"Atendantaj enskribiĝoj",PENDING_COUNT:"{{count}} atendantaj enskribiĝoj",REGISTERED:"Enskribita {{sigDate | formatFromNow}}",MEMBER_FROM:"Membro depost {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Novaj membroj",BTN_PENDING:"Atendantaj enskribiĝoj",SHOW_MORE:"Afiŝi pli",SHOW_MORE_COUNT:"(nuna limo je {{limit}})",NO_PENDING:"Neniu enskribiĝo atendanta.",NO_NEWCOMERS:"Neniu membro."},CONTACTS:{TITLE:"Kontaktoj"},MODAL:{TITLE:"Traserĉado"},CERTIFICATIONS:{TITLE:"{{uid}} - Atestaĵoj",SUMMARY:"Ricevitaj atestaĵoj",LIST:"Detalo pri la ricevitaj atestaĵoj",PENDING_LIST:"Atestaĵoj atendantaj traktadon",RECEIVED:"Ricevitaj atestaĵoj",RECEIVED_BY:"Atestaĵoj ricevitaj de {{uid}}",ERROR:"Atestaĵoj erare ricevitaj",SENTRY_MEMBER:"Referenca membro"},OPERATIONS:{TITLE:"{{uid}} - Spezoj"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Senditaj atestaĵoj",SUMMARY:"Senditaj atestaĵoj",LIST:"Detalo pri la senditaj atestaĵoj",PENDING_LIST:"Atestaĵoj atendantaj traktadon",SENT:"Senditaj atestaĵoj",SENT_BY:"Atestaĵoj senditaj de {{uid}}",ERROR:"Atestaĵoj erare senditaj"}},LOGIN:{TITLE:'<i class="icon ion-log-in"></i> Konektiĝo',SCRYPT_FORM_HELP:"Bonvolu tajpi viajn identigilojn.<br>Pensu kontroli, ke la publika ŝlosilo estas tiu de via konto.",PUBKEY_FORM_HELP:"Bonvolu tajpi publikan ŝlosilon de konto:",FILE_FORM_HELP:"Elektu la ŝlosilaro-dosieron uzotan:",SCAN_FORM_HELP:"Skani la QR-kodon de monujo.",SALT:"Sekreta identigilo",SALT_HELP:"Sekreta identigilo",SHOW_SALT:"Afiŝi la sekretan identigilon?",PASSWORD:"Pasvorto",PASSWORD_HELP:"Pasvorto",PUBKEY_HELP:"Publika ŝlosilo aŭ pseŭdonimo",NO_ACCOUNT_QUESTION:"Vi ankoraŭ ne havas konton?",HAVE_ACCOUNT_QUESTION:"Vi jam havas konton?",CREATE_ACCOUNT:"Krei konton...",CREATE_FREE_ACCOUNT:"Krei konton senpage",FORGOTTEN_ID:"Pasvorto forgesita?",ASSOCIATED_PUBKEY:"Publika ŝlosilo de la ŝlosilaro:",BTN_METHODS:"Aliaj metodoj",BTN_METHODS_DOTS:"Ŝanĝi metodon...",METHOD_POPOVER_TITLE:"Metodoj",MEMORIZE_AUTH_FILE:"Memorigi tiun ŝlosilaron por la daŭro de la sesio de retumado",SCRYPT_PARAMETERS:"Parametroj (Skripto):",AUTO_LOGOUT:{TITLE:"Informo",MESSAGE:'<i class="ion-android-time"></i> Vi estis <b>malkonektita</b> aŭtomate, pro tro longa senaktiveco.',BTN_RELOGIN:"Rekonektiĝi",IDLE_WARNING:"Vi estos malkonektita... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Sekreta identigilo kaj pasvorto",SCRYPT_ADVANCED:"Sperta salumado",FILE:"Dosiero pri ŝlosilaro",PUBKEY:"Publika ŝlosilo aŭ pseŭdonimo",SCAN:"Skani QR-kodon"},SCRYPT:{SIMPLE:"Malpeza salumado",DEFAULT:"Kutima salumado",SECURE:"Sekura salumado",HARDEST:"Plej sekura salumado",EXTREME:"Ekstrema salumado",USER:"Personigita salumado",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Atendita strukturo de dosiero: <b>.yml</b> aŭ <b>.dunikey</b> (tipo PubSec, WIF aŭ EWIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> Aŭtentigado',BTN_AUTH:"Aŭtentiĝi",GENERAL_HELP:"Bonvolu aŭtentiĝi:",EXPECTED_UID_HELP:'Bonvolu aŭtentiĝi ĉe la konto <i class="ion-person"></i> {{uid}} :',EXPECTED_PUBKEY_HELP:'Bonvolu aŭtentiĝi ĉe la monujo <br class="visible-xs"/><i class="ion-key"></i> {{pubkey|formatPubkey}} :',SCAN_FORM_HELP:"Skani la QR-kodon de la <b>privata ŝlosilo</b> de la monujo."},ACCOUNT:{TITLE:"Mia konto",BALANCE:"Saldo",LAST_TX:"Lastaj spezoj validigitaj",BALANCE_ACCOUNT:"Konto-saldo",NO_TX:"Neniu spezo",SHOW_MORE_TX:"Afiŝi pli",SHOW_ALL_TX:"Afiŝi ĉion",TX_FROM_DATE:"(nuna limo je {{fromTime|medianFromNowShort}})",PENDING_TX:"Spezoj atendantaj traktadon",VALIDATING_TX:"Spezoj traktitaj, ne validigitaj",ERROR_TX:"Spezoj ne realigitaj",ERROR_TX_SENT:"Spezoj malsukcesintaj",PENDING_TX_RECEIVED:"Spezoj atendantaj ricevon",EVENTS:"Okazaĵoj",OUT_DISTANCED:"Viaj nunaj atestaĵoj venas de tro izolita grupo de la <a ng-click=\"showHelpModal('wot')\">Reto de Fido</a> (RdF): al la <a ng-click=\"showHelpModal('distance_rule')\">regulo de maksimuma distanco</a> vi ne konformiĝas.<br/>Vi devas akiri atestaĵojn venantajn de aliaj lokoj de la RdF, aŭ atendi ke tiu ĉi densiĝos.",WAITING_MEMBERSHIP:"Aliĝo-peto sendita. Atendanta akcepton.",WAITING_CERTIFICATIONS:"Vi devas <b>akiri {{needCertificationCount}} atestaĵo(j)n</b> por fariĝi membro kaj produkti la <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a>. Via konto tamen estas jam funkcianta, por ricevi kaj efektivigi pagojn.",WAITING_CERTIFICATIONS_HELP:'Por akiri viajn atestaĵojn, petu nur membrojn <b>kiuj sufiĉe konas vin</b>, kiel postulas <a ng-click="showLicenseModal()">la licenco de la mono</a>, kiun vi akceptis.<br/>Se vi ne konas sufiĉe da membroj, sciigu tion ĉe <a ng-click="openLink($event, $root.settings.userForumUrl)">la forumo por uzantoj</a>.',WILL_MISSING_CERTIFICATIONS:"Baldaŭ <b>mankos al vi atestaĵoj</b> (almenaŭ {{willNeedCertificationCount}} estas necesaj)",WILL_NEED_RENEW_MEMBERSHIP:"Via aliĝo kiel membro <b>estas finiĝonta {{membershipExpiresIn|formatDurationTo}}</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a> ĝis tiam.",NEED_RENEW_MEMBERSHIP:"Vi ne plu estas membro de la mono, ĉar <b>via aliĝo finiĝis</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a>.",NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED:"Vi ne plu estas membro de la mono, <b>pro manko da atestaĵoj</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a>.",NO_WAITING_MEMBERSHIP:"Neniu aliĝo-peto atendanta. Se vi deziras <b>fariĝi membro</b>, pensu <a ng-click=\"doQuickFix('membership')\">sendi la aliĝo-peton</a>.",CERTIFICATION_COUNT:"Ricevitaj atestaĵoj",CERTIFICATION_COUNT_SHORT:"Atestaĵoj",SIG_STOCK:"Senditaj atestaĵoj",BTN_RECEIVE_MONEY:"Enkasigi",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Aliri alian identecon...",BTN_FIX_MEMBERSHIP:"Resendi la aliĝo-peton...",BTN_MEMBERSHIP_RENEW:"Revalidigi la aliĝon",BTN_MEMBERSHIP_RENEW_DOTS:"Revalidigi la aliĝon...",BTN_MEMBERSHIP_OUT_DOTS:"Ĉesigi la aliĝon...",BTN_SECURITY_DOTS:"Konto kaj sekureco...",BTN_SHOW_DETAILS:"Afiŝi la teknikajn informojn",LOCKED_OUTPUTS_POPOVER:{TITLE:"Sumo blokita",DESCRIPTION:"Jen la kondiĉoj de malblokado de tiu sumo:",DESCRIPTION_MANY:"Tiu spezo entenas plurajn partojn, pri kiuj la kondiĉoj de malblokado estas:",LOCKED_AMOUNT:"Kondiĉoj por la sumo:"},NEW:{TITLE:"Kreado de konto",INTRO_WARNING_TIME:"La kreado de konto ĉe {{name|capitalize}} estas tre simpla. Bonvolu tamen dediĉi sufiĉe da tempo por ĝuste efektivigi tiun proceduron (por ne forgesi la identigilojn, pasvortojn, ktp.).",INTRO_WARNING_SECURITY:"Kontrolu ke la aparatoj, kiujn vi nun uzas (komputilo, tabuleto, telefono), <b>estas sekurigitaj kaj fidindaj</b>.",INTRO_WARNING_SECURITY_HELP:"Senvirusigilo ĝisdata, fajroŝirmilo aktivigita, sesio protektita per pasvorto aŭ PIN-kodo, ktp.",INTRO_HELP:"Alklaku <b>{{'COMMON.BTN_START'|translate}}</b> por ekigi la kreadon de konto. Vi estos gvidata paŝon post paŝo.",REGISTRATION_NODE:"Via aliĝo estos registrita tra la nodo Duniter <b>{{server}}</b>, kiu dissendos ĝin poste al la cetero de la mon-reto.",REGISTRATION_NODE_HELP:"Se vi ne fidas tiun nodon, bonvolu ŝanĝi ĝin <a ng-click=\"doQuickFix('settings')\">en la parametroj</a> de Cesium.",SELECT_ACCOUNT_TYPE:"Elektu la tipon de konto kreota:",MEMBER_ACCOUNT:"Membro-konto",MEMBER_ACCOUNT_TITLE:"Kreado de membro-konto",MEMBER_ACCOUNT_HELP:"Se vi ankoraŭ ne enskribiĝis kiel individuo (nur unu konto eblas por unu individuo). Tia konto ebligas kunprodukti la monon, ricevante <b> universalan dividendon</b> ĉiun {{parameters.dt|formatPeriod}}n.",WALLET_ACCOUNT:"Simpla monujo",WALLET_ACCOUNT_TITLE:"Kreado de monujo",WALLET_ACCOUNT_HELP:"Por ĉiuj aliaj kazoj, ekzemple se vi bezonas plian konton.<br/>Neniu universala dividendo estos kreita per tia konto.",SALT_WARNING:"Elektu vian sekretan identigilon.<br/>Oni petos ĝin de vi ĉiufoje, kiam vi konektiĝos al tiu konto.<br/><br/><b>Bone memorigu ĝin</b>: kaze de perdo, neniu alia povos aliri vian konton!",PASSWORD_WARNING:"Elektu pasvorton.<br/>Oni petos ĝin de vi ĉiufoje, kiam vi konektiĝos al tiu konto.<br/><br/><b>Bone memorigu tiun pasvorton</b: kaze de perdo, neniu alia povos aliri vian konton!",PSEUDO_WARNING:"Elektu pseŭdonimon.<br/>Ĝi utilas al la aliaj membroj, por identigi vin pli facile.<div class='hidden-xs'><br/>Ĝi <b>ne povos esti modifita</b>, sen rekrei konton.</div><br/><br/>Ĝi entenu <b>nek spacon, nek diakritan literon (kun supersigno, ktp.)</b>.<div class='hidden-xs'><br/>Ekzemple: <span class='gray'>NataljaBelulino, JohanoStelaro, ktp.</span>",PSEUDO:"Pseŭdonimo",PSEUDO_HELP:"Pseŭdonimo",SALT_CONFIRM:"Konfirmo",SALT_CONFIRM_HELP:"Konfirmo de la sekreta identigilo",PASSWORD_CONFIRM:"Konfirmo",PASSWORD_CONFIRM_HELP:"Konfirmo de la pasvorto",SLIDE_6_TITLE:"Konfirmo:",COMPUTING_PUBKEY:"Kalkulanta...",LAST_SLIDE_CONGRATULATION:"Vi tajpis ĉiujn necesajn informojn: Gratulon!<br/>Vi nun povas <b>sendi la peton por kreado</b> de la konto.</b><br/><br/>Por informo, la publika ŝlosilo ĉi-sube identigos vian estontan konton.<br/>Ĝi povos estis sciigita al aliuloj por ricevi iliajn pagojn.<br/><b>Ne estas devige</b> noti ĝin nun, vi ankaŭ povos fari tion poste.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Averto:</b> la sekreta identigilo, la pasvorto kaj la pseŭdonimo ne plu povos esti modifitaj.<br/><br/><b>Certiĝu, ke vi ĉiam rememorigos ĝin!</b><br/><br/><b>Ĉu vi certas</b>, ke vi deziras sendi tiun ĉi aliĝo-peton?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Averto:</b> la sekreta identigilo kaj la pasvorto ne plu povos esti modifitaj.<br/><br/><b>Certiĝu, ke vi ĉiam rememorigos ĝin!</b><br/><br/><b>Ĉu vi certas</b>, ke vi deziras daŭrigi per tiuj ĉi identigiloj?',CHECKING_PSEUDO:"Kontrolo...",PSEUDO_AVAILABLE:"Pseŭdonimo disponebla",PSEUDO_NOT_AVAILABLE:"Pseŭdonimo ne disponebla",INFO_LICENSE:"Antaŭ ol krei membro-konton, <b>bonvolu legi kaj akcepti la licencon</b> pri uzado de la mono:",BTN_ACCEPT:"Mi akceptas",BTN_ACCEPT_LICENSE:"Mi akceptas la licencon"},POPUP_REGISTER:{TITLE:"Elektu pseŭdonimon",HELP:"Pseŭdonimo estas deviga por fariĝi membro."},SELECT_IDENTITY_MODAL:{TITLE:"Elekto de la identeco",HELP:'Pluraj <b>malsamaj identecoj</b> estis senditaj, por la publika ŝlosilo <span class="gray"><i class="ion-key"></i> {{pubkey|formatPubkey}}</span>.<br/>Bonvolu elekti la dosierujon uzotan:'},SELECT_WALLET_MODAL:{TITLE:"Elekto de la monujo"},WALLET_LIST:{TITLE:"Miaj monujoj",BTN_NEW:"Aldoni monujon",BTN_DOWNLOAD:"Elŝuti la liston",BTN_IMPORT_FILE_DOTS:"Enporti el dosiero...",NO_WALLET:"Neniu kroma monujo",BTN_DELETE:"Forigi kroman monujon...",BTN_RENAME:"Renomi la monujon",EXPORT_FILENAME:"miaj_monujoj-{{pubkey|formatPubkey}}-{{currency}}.csv",TOTAL_DOTS:"Sumo: ",EDIT_POPOVER:{TITLE:"Renomi la monujon",HELP:"Sciigu la novan nomon",NAME_HELP:"Nomo de la monujo"},IMPORT_MODAL:{TITLE:"Enporti monujojn",HELP:"Por <b>enporti monujojn</b>, bonvolu glitigi en la ĉi-suban zonon la dosieron pri la listo de monujoj, aŭ alklaki la zonon por serĉadi dosieron.",WALLET_COUNT:"<b>{{count}}</b> nova{{count > 1 ? 'j' : ''}} monujo{{count > 1 ? 'j' : ''}}",NO_NEW_WALLET:"Neniu nova monujo"}},SECURITY:{ADD_QUESTION:"Aldoni personigitan demandon",BTN_CLEAN:"Malplenigi",BTN_RESET:"Restartigi",DOWNLOAD_REVOKE:"Konservi mian dosieron pri nuligo",DOWNLOAD_REVOKE_HELP:"Disponi dosieron pri nuligo estas grave, ekzemple kaze de perdo de viaj identigiloj. Ĝi ebligas al vi <b>elirigi tiun konton el la reto de fido</b>, tiel ke ĝi refariĝu simpla monujo.",GENERATE_KEYFILE:"Krei mian dosieron pri ŝlosilaro...",GENERATE_KEYFILE_HELP:"Kreas dosieron, kiu ebligas al vi aŭtentiĝi sen tajpi viajn identigilojn.<br/><b>Atenton:</b> tiu dosiero entenos vian konto-ŝlosilaron (publikan kaj sekretan ŝlosilojn); do tre gravas meti ĝin en sekuran lokon!",KEYFILE_FILENAME:"ŝlosilaro-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",MEMBERSHIP_IN:"Transformi en membro-konton...",MEMBERSHIP_IN_HELP:"Ebligas <b>transformi</b> simplan monujo-konton <b>en membro-konton</b>, sendante aliĝo-peton. Utilas nur se vi ne havas jam alian membro-konton.",SEND_IDENTITY:"Publikigi sian identecon...",SEND_IDENTITY_HELP:"Ebligas kunligi pseŭdonimon kun tiu ĉi konto, sed <b>sen fari aliĝo-peton</b> por iĝi membro. Tiu kunligo kutime ne utilas, ĉar la valideco de tiu kunligo de pseŭdonimo estas limigita en la tempo.",HELP_LEVEL:"Por krei konserv-dosieron pri viaj identigiloj, elektu <strong> almenaŭ {{nb}} demandojn:</strong>",LEVEL:"Nivelo de sekureco",LOW_LEVEL:'Malforta <span class="hidden-xs">(2 demandoj minimume)</span>',MEDIUM_LEVEL:'Meza <span class="hidden-xs">(4 demandoj minimume)</span>',QUESTION_1:"Kiel nomiĝis via plej bona amik.in.o, kiam vi estis adoleskant.in.o?",QUESTION_2:"Kiel nomiĝis via unua hejm-besto?",QUESTION_3:"Kiun pladon vi unue lernis kuiradi?",QUESTION_4:"Kiun filmon vi unue spektis en kinejo?",QUESTION_5:"Kien vi iris la unuan fojon, kiam vi vojaĝis per aviadilo?",QUESTION_6:"Kiel nomiĝis via preferata instruist.i.no en bazlernejo?",QUESTION_7:"Kio estus laŭ vi la ideala profesio?",QUESTION_8:"Kiun libron por infanoj vi preferas?",QUESTION_9:"Kio estis la marko de via unua veturilo?",QUESTION_10:"Kio estis via kromnomo, kiam vi estis infano?",QUESTION_11:"Kiun rolant.in.on aŭ aktor.in.on vi preferis en kino, kiam vi estis student.in.o?",QUESTION_12:"Kiun kanzonist.ino.n aŭ muzikgrupon vi preferis, kiam vi estis student.in.o?",QUESTION_13:"En kiu urbo renkontiĝis viaj gepatroj?",QUESTION_14:"Kiel nomiĝis via unua ĉefo?",QUESTION_15:"Kiel nomiĝas la strato, kie vi kreskis?",QUESTION_16:"Kiel nomiĝas la marbordo, kie vi unuafoje baniĝis?",QUESTION_17:"Kiun muzik-albumon vi unuafoje aĉetis?",QUESTION_18:"Kiel nomiĝas via preferata sporto-teamo?",QUESTION_19:"Kio estis la profesio de via avo?",RECOVER_ID:"Retrovi mian pasvorton...",RECOVER_ID_HELP:"Se vi disponas <b>konserv-dosieron pri viaj identigiloj</b>, vi povas retrovi ilin respondante ĝuste viajn personajn demandojn.",REVOCATION_WITH_FILE:"Nuligi mian membro-konton...",REVOCATION_WITH_FILE_DESCRIPTION:"Se vi <b>definitive perdis viajn identigilojn</b> pri via membro-konto (aŭ ke la sekureco de la konto estas endanĝerigita), vi povas uzi <b>la dosieron pri nuligo</b> de la konto por <b>trudi ties definitivan eliradon el la reto de fido</b>.",REVOCATION_WITH_FILE_HELP:"Por <b>definitive nuligi</b> membro-konton, bonvolu glitigi en la ĉi-suban zonon vian dosieron pri nuligo, aŭ alklaki la zonon por serĉadi dosieron.",REVOCATION_WALLET:"Nuligi tiun ĉi konton tuj",REVOCATION_WALLET_HELP:"Peti la nuligon de via identeco estigas la <b>eliradon el la reto de fido</b> (definitivan por la pseŭdonimo kaj la publika ŝlosilo kunligitaj). La konto ne plu povos produkti Universalan Dividendon.<br/>Vi tamen daŭre povos konektiĝi al ĝi, kiel al simpla monujo.",REVOCATION_FILENAME:"nuligo-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",SAVE_ID:"Konservi miajn identigilojn...",SAVE_ID_HELP:"Kreado de konserv-dosiero, por <b>retrovi vian pasvorton</b> (kaj la sekretan identigilon) <b>kaze de forgeso</b>. La dosiero estas <b>sekurigita</b> (ĉifrita) dank'al personaj demandoj.",STRONG_LEVEL:'Forta <span class="hidden-xs ">(6 demandoj minimume)</span>',TITLE:"Konto kaj sekureco",KEYFILE:{PUBSEC_FORMAT:"Strukturo PubSec.",PUBSEC_FORMAT_HELP:"Tiu strukturo stokas vian ŝlosilaron laŭ tre simpla maniero. Ĝi kongruas aparte kun Cesium, ğannonce kaj Duniter.<br/><b>Atenton:</b>La dosiero <b>ne estas ĉifrita</b> (la sekreta ŝlosilo klare aperas en ĝi); bonvolu do stoki ĝin en sekura loko!",WIF_FORMAT:"Strukturo WIF (Wallet Import Format) - v1",WIF_FORMAT_HELP:"Tiu strukturo stokas vian ŝlosilaron inkluzivante en ĝin kontrol-sumon por kontroli la sendifektecon de la dosiero. Ĝi kongruas aparte kun la paper-monujoj (Duniter paper wallet).<br/><b>Atenton:</b>La dosiero <b>ne estas ĉifrita</b> (la sekreta ŝlosilo klare aperas en ĝi); bonvolu do stoki ĝin en sekura loko!",EWIF_FORMAT:"Strukturo EWIF (Encrypted Wallet Import Format) - v1",EWIF_FORMAT_HELP:"Tiu strukturo stokas vian ŝlosilaron <b>laŭ ĉifrita maniero</b> dank'al sekreta frazo elektita de vi. Ĝi ankaŭ inkluzivas kontrol-sumon por kontroli la sendifektecon de la dosiero.<br/><b>Atenton:</b> Zorgu, ke vi ĉiam rememoru vian sekretan frazon!",PASSWORD_POPUP:{TITLE:"Ĉifrita dosiero pri ŝlosilaro",
-HELP:"Bonvolu indiki la la sekretan frazon:",PASSWORD_HELP:"Sekreta frazo"},ERROR:{BAD_PASSWORD:"Sekreta frazo malĝusta",BAD_CHECKSUM:"Kontrol-sumo malĝusta"}}},FILE_NAME:"{{currency}} - Konto-tabelo {{pubkey|formatPubkey}} je {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Dato",AMOUNT:"Sumo",COMMENT:"Komento"}},TRANSFER:{TITLE:"Elspezo",SUB_TITLE:"Fari elspezon",SUB_TITLE_ALL:"Malplenigi la konton",FROM:"De",TO:"Al",AMOUNT:"Sumo",AMOUNT_HELP:"Sumo",COMMENT:"Komento",COMMENT_HELP:"Komento",BTN_SEND:"Sendi",BTN_ADD_COMMENT:"Aldoni komenton",REST:"Resto de la konto",REST_TO:"al",WARN_COMMENT_IS_PUBLIC:"Bonvolu noti, ke <b>la komentoj estas publikaj</b> (ne ĉifritaj).",MODAL:{TITLE:"Elspezo"}},ERROR:{UNKNOWN_URI_FORMAT:"URI-strukturo nekonata",PUBKEY_INVALID_CHECKSUM:"Publika ŝlosilo nevalida (bad checksum).",POPUP_TITLE:"Eraro",UNKNOWN_ERROR:"Eraro nekonata",CRYPTO_UNKNOWN_ERROR:"Via retumilo ŝajnas ne kongrua kun la kriptografiaj funkcioj.",DOWNLOAD_KEYFILE_FAILED:"Malsukceso por la kreado de la dosiero pri ŝlosilaro.",EQUALS_TO_PSEUDO:"Devas esti malsama ol la pseŭdonimo",EQUALS_TO_SALT:"Devas esti malsama ol la sekreta identigilo",FIELD_REQUIRED:"Deviga kampo",FIELD_TOO_SHORT:"Signaro tro mallonga",FIELD_TOO_SHORT_WITH_LENGTH:"Signaro tro mallonga ({{minLength}} signoj minimume)",FIELD_TOO_LONG:"Signaro tro longa",FIELD_TOO_LONG_WITH_LENGTH:"Signaro tro longa ({{maxLength}} signoj maksimume)",FIELD_MIN:"Minimuma longeco: {{min}}",FIELD_MAX:"Maksimuma longeco: {{max}}",FIELD_ACCENT:"Diakritaj literoj kaj komoj ne permesataj",FIELD_NOT_NUMBER:"Nombra valoro atendata",FIELD_NOT_INT:"Entjera nombro atendata",FIELD_NOT_EMAIL:"Retadreso nevalida",PASSWORD_NOT_CONFIRMED:"Ne kongruas kun la pasvorto",SALT_NOT_CONFIRMED:"Ne kongruas kun la sekreta identigilo",SEND_IDENTITY_FAILED:"Aliĝo malsukcesa",SEND_CERTIFICATION_FAILED:"Atestado malsukcesa",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"Vi ne povas efektivigi atestadon, ĉar via konto <b>ne estas membro</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"Vi ne povas efektivigi atestadon, ĉar via konto ankoraŭ ne estas membro.<br/><br/>Ankoraŭ mankas al vi atestaĵoj, aŭ tiuj ĉi ankoraŭ ne estis validigitaj.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"Konto ne atestebla. Neniu aliĝo-peto estis farita, aŭ la aliĝo ne estis revalidigita.",LOGIN_FAILED:"Eraro dum konektiĝo.",LOAD_IDENTITY_FAILED:"Eraro por ŝarĝi la identecon.",LOAD_REQUIREMENTS_FAILED:"Eraro por ŝarĝi la antaŭ-necesaĵoj de la identeco.",SEND_MEMBERSHIP_IN_FAILED:"Malsukceso pri la provado eniri la komunumon.",SEND_MEMBERSHIP_OUT_FAILED:"Malsukceso pri la ĉesigo de la aliĝo.",REFRESH_WALLET_DATA:"Malsukceso pri la ĝisdatigo de la monujo.",GET_CURRENCY_PARAMETER:"Malsukceso por ricevi la regulojn de la mono.",GET_CURRENCY_FAILED:"Ne eblis ŝarĝi la monon. Bonvolu reprovi pli poste.",SEND_TX_FAILED:"Elspezado malsukcesa.",ALL_SOURCES_USED:"Bonvolu atendi la kalkulon de la venonta bloko (ĉiuj viaj monfontoj estis uzitaj).",NOT_ENOUGH_SOURCES:"Ne sufiĉe da mono por sendi tiun ĉi sumon per ununura spezo.<br/>Maksimuma sumo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Malsukceso por krei la membro-konton.",RESTORE_WALLET_DATA_ERROR:"Malsukceso por reŝarĝi la parametrojn de la loka stokaĵo",LOAD_WALLET_DATA_ERROR:"Malsukceso por ŝarĝi la datenojn de la monujo.",COPY_CLIPBOARD_FAILED:"Ne eblis kopii la valoron.",TAKE_PICTURE_FAILED:"Malsukceso por ricevi la foton.",SCAN_FAILED:"Malsukceso por skani la QR-kodon.",SCAN_UNKNOWN_FORMAT:"Kodo nerekonata.",WOT_LOOKUP_FAILED:"Serĉado malsukcesa.",LOAD_PEER_DATA_FAILED:"Ne eblis legi la nodon Duniter. Bonvolu reprovi poste.",NEED_LOGIN_FIRST:"Bonvolu unue konektiĝi.",AMOUNT_REQUIRED:"La monsumo estas deviga.",AMOUNT_NEGATIVE:"Negativa sumo nepermesata.",NOT_ENOUGH_CREDIT:"Saldo nesufiĉa.",INVALID_NODE_SUMMARY:"Nodo neatingebla aŭ adreso nevalida.",INVALID_USER_ID:"La pseŭdonimo devas enteni nek spacon nek signon specialan aŭ kun supersigno.",INVALID_COMMENT:"La kampo 'referenco' ne devas enteni literojn kun supersigno.",INVALID_PUBKEY:"La publika ŝlosilo ne havas la atenditan strukturon.",INVALID_PUBKEY_CHECKSUM:"Kontrol-sumo nevalida.",IDENTITY_REVOKED:"Tiu ĉi identeco <b>estis nuligita</b>. Ĝi ne plu povas fariĝi membro.",IDENTITY_REVOKED_WITH_TIME:"Tiu ĉi identeco <b>estis nuligita {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Ĝi ne plu povas fariĝi membro.",IDENTITY_PENDING_REVOCATION:"La <b>nuligo de tiu ĉi identeco</b> estis petita kaj atendas traktadon. La atestado estas do malaktivigita.",IDENTITY_INVALID_BLOCK_HASH:"Tiu ĉi aliĝo-peto ne plu validas (ĉar ĝi rilatas al bloko, kiun nuligis la nodoj de la reto): tiu persono devas refari sian aliĝo-peton <b>antaŭ ol</b> esti atestita.",IDENTITY_EXPIRED:"La publikigo de tiu ĉi identeco finiĝis: tiu persono devas fari novan aliĝo-peton <b>antaŭ ol</b> esti atestita.",IDENTITY_SANDBOX_FULL:"La nodo Duniter uzata de Cesium ne plu povas ricevi novajn identecojn, ĉar ĝia atendo-vico estas plena.<br/><br/>Bonvolu reprovi poste aŭ ŝanĝi la nodon (per la menuo <b>Parametroj</b>).",IDENTITY_NOT_FOUND:"Identeco ne trovita.",IDENTITY_TX_FAILED:"Malsukceso por ŝarĝi la spezojn.",WOT_PENDING_INVALID_BLOCK_HASH:"Aliĝo ne valida.",WALLET_INVALID_BLOCK_HASH:"Via aliĝo-peto ne plu validas (ĉar ĝi rilatas al bloko, kiun nuligis la nodoj de la reto).<br/>Vi devas <a ng-click=\"doQuickFix('fixMembership')\">sendi novan peton</a> por solvi tiun ĉi problemon.",WALLET_IDENTITY_EXPIRED:"La publikigo de <b>via identeco finiĝis</b>.<br/>Vi devas <a ng-click=\"doQuickFix('fixIdentity')\">publikigi denove vian identecon</a> por solvi tiun ĉi problemon.",WALLET_REVOKED:"Via identeco estis <b>nuligita</b>: nek via pseŭdonimo nek via publika ŝlosilo povos esti uzata en la estonteco por membro-konto.",WALLET_HAS_NO_SELF:"Via identeco devas unue esti publikigita, kaj ne esti finiĝinta.",AUTH_REQUIRED:"Aŭtentigado necesa.",AUTH_INVALID_PUBKEY:'La atendata ŝlosilo estas <i class="ion-key"></i> {{pubkey|formatPubkey}}...',AUTH_INVALID_SCRYPT:"Identigilo aŭ pasvorto nevalida.",AUTH_INVALID_FILE:"Dosiero pri ŝlosilaro nevalida.",AUTH_FILE_ERROR:"Malsukceso por malfermi la dosieron pri ŝlosilaro.",IDENTITY_ALREADY_CERTIFY:"Vi <b>jam atestis</b> tiun identecon.<br/><br/>Tiu atestado daŭre validas (finiĝo {{expiresIn|formatDurationTo}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"Vi <b>jam atestis</b> tiun identecon.<br/><br/>Tiu atestado atendas traktadon (limdato de traktado {{expiresIn|formatDurationTo}}).",UNABLE_TO_CERTIFY_TITLE:"Atestado neebla",LOAD_NEWCOMERS_FAILED:"Malsukceso por ŝarĝi la novajn membrojn.",LOAD_PENDING_FAILED:"Malsukceso por ŝarĝi la atendantajn aliĝojn.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"Vi devas <b>esti membro</b> por rajti efektivigi tiun ĉi agon.",ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION:"Vi devas <b>esti membro (aŭ eksa membro)</b> por rajti efektivigi tiun ĉi agon.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"Via identeco devas <b>jam esti publikigita</b>, por ke vi rajtu efektivigi tiun ĉi agon.",GET_BLOCK_FAILED:"Malsukceso por ricevi la blokon.",INVALID_BLOCK_HASH:"Bloko ne trovita (haketo malsama)",DOWNLOAD_REVOCATION_FAILED:"Malsukceso por elŝuti la dosieron pri nuligo.",REVOCATION_FAILED:"Malsukceso pri nuligo.",SALT_OR_PASSWORD_NOT_CONFIRMED:"Sekreta identigilo aŭ pasvorto malĝusta.",RECOVER_ID_FAILED:"Malsukceso por ricevi la identigilojn",LOAD_FILE_FAILED:"Malsukceso por ŝarĝi la dosieron",NOT_VALID_REVOCATION_FILE:"Dosiero pri nuligo ne valida (malĝusta strukturo de dosiero)",NOT_VALID_SAVE_ID_FILE:"Dosiero pri konservado ne valida (malĝusta strukturo de dosiero)",NOT_VALID_KEY_FILE:"Dosiero pri ŝlosilaro ne valida (strukturo ne rekonata)",EXISTING_ACCOUNT:"Viaj identigiloj rilatas al jam ekzistanta konto, kies <a ng-click=\"showHelpModal('pubkey')\">publika ŝlosilo</a> estas:",EXISTING_ACCOUNT_REQUEST:"Bonvolu modifi viajn identigilojn, por ke ili rilatu al ne uzata konto.",GET_LICENSE_FILE_FAILED:"La ricevo de la dosiero pri licenco ne eblis.",CHECK_NETWORK_CONNECTION:"Neniu nodo ŝajnas atingebla.<br/><br/>Bonvolu <b>kontroli vian retkonekton</b>.",ISSUE_524_TX_FAILED:"Malsukcesa elspezo.<br/><br/>Mesaĝo estis sendita al la programistoj por faciligi la solvadon de la problemo. <b>Dankon pro via helpo</b>.",ADD_SECONDARY_WALLET_FAILED:"Malsukceso por aldoni kroman monujon.",UPDATE_WALLET_LIST_FAILED:"Malsukceso por ĝisdatigi la kromajn monujojn.",LOAD_WALLET_LIST_FAILED:"Malsukceso por ŝarĝi la kromajn monujojn.",SAVE_WALLET_LIST_FAILED:"Malsukceso por konservi la kromajn monujojn.",COULD_NOT_ADD_MAIN_WALLET:"Tiu ĉi monujo <b>rilatas al la ĉefa konto</b>, kun kiu vi estas konektita.<br/>Ne eblas aldoni ĝin kiel kroman monujon.",COULD_NOT_ADD_EXISTING_WALLET:"Monujo jam ekzistanta en la listo.",UNKNOWN_WALLET_ID:"Kroma monujo nekonata.",RESTORE_WALLET_LIST_FAILED:"Malsukceso por restarigi la kromajn monujojn.",INVALID_FILE_FORMAT:"Strukturo de dosiero nevalida."},INFO:{POPUP_TITLE:"Informo",CERTIFICATION_DONE:"Atestaĵo sendita",NOT_ENOUGH_CREDIT:"Saldo nesufiĉa",TRANSFER_SENT:"Elspezo sendita",COPY_TO_CLIPBOARD_DONE:"Kopiita en la memoreto",MEMBERSHIP_OUT_SENT:"Eksiĝo sendita",NOT_NEED_MEMBERSHIP:"Vi jam estas membro.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"Al tiu ĉi identeco baldaŭ mankos atestaĵoj (almenaŭ {{willNeedCertificationCount}}).",IDENTITY_NEED_MEMBERSHIP:"Tiu ĉi identeco ne sendis aliĝo-peton. Tion ĝi devos fari, se ĝi deziras fariĝi membro.",HAS_ALTERNATIVE_IDENTITIES:"Ekzistas <b>pluraj identecoj</b> ligitaj kun tiu ĉi publika ŝlosilo. <b>Antaŭ ĉia atestado</b>, pensu <a ng-click=\"doQuickFix('showSelectIdentities')\">trarigardi la aliajn identecojn</a> por elekti la ĝustan, aŭ kontaktu la posedanton de la konto.",REVOCATION_SENT:"Nuligo sendita",REVOCATION_SENT_WAITING_PROCESS:"La <b>nuligo de tiu ĉi identeco</b> estis petita kaj atendas traktadon.",FEATURES_NOT_IMPLEMENTED:"Tiu ĉi funkciaro ankoraŭ estas programiĝanta.<br/>Kial ne <b>kontribui al Cesium</b>, por ekhavi ĝin pli rapide? ;)",EMPTY_TX_HISTORY:"Neniu spezo elportota"},CONFIRM:{POPUP_TITLE:"<b>Konfirmo</b>",POPUP_WARNING_TITLE:"<b>Averto</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Averto pri sekureco</b>',CERTIFY_RULES_TITLE_UID:"Atesti {{uid}}",CERTIFY_RULES:'<b class="assertive">NE atestu</b> konton, se vi pensas ke:<br/><br/><ul><li>1.) ĝi ne rilatas al persono <b>fizika kaj vivanta</b>.<li>2.) ĝia posedanto <b>havas alian konton</b> jam atestitan.<li>3.) ĝia posedanto malobservas (vole aŭ ne) la regulon 1 aŭ 2 (ekzemple atestante falsajn kontojn aŭ duoblajn).</ul><br/><b>Ĉu vi certas,</b> ke vi tamen volas atesti tiun ĉi identecon?',FULLSCREEN:"Afiŝi la programon plen-ekrane?",EXIT_APP:"Fermi la programon?",TRANSFER:"<b>Resumo de la elspezo</b> :<br/><br/><ul><li> - De: {{from}}</li><li> - Al: <b>{{to}}</b></li><li> - Sumo: <b>{{amount}} {{unit}}</b></li><li> - Komento: <i>{{comment}}</i></li></ul><br/><b>Ĉu vi certas, ke vi volas efektivigi tiun ĉi elspezon?</b>",TRANSFER_ALL:"<b>Resumo de la elspezo</b>:<br/><br/><ul><li> - De : {{from}}</li><li> - Al : <b>{{to}}</b></li><li> - Sumo: <b>{{amount}} {{unit}}</b></li><li> - Komento: <i>{{comment}}</i></li><br/><li> - Resto: <b>{{restAmount}} {{unit}}</b> al <b>{{restTo}}</b></li></ul><br/><b>Ĉu vi certas, ke vi volas efektivigi tiun ĉi elspezon?</b>",MEMBERSHIP_OUT:"Tiu ĉi ago estas <b>neinversigebla</b>.<br/></br/>Ĉu vi certas, ke vi volas <b>nuligi vian membro-konton</b>?",MEMBERSHIP_OUT_2:"Tiu ĉi ago estas <b>neinversigebla</b> !<br/><br/>Ĉu vi vere certas, ke vi volas <b>nuligi vian aliĝon</b> kiel membron?",LOGIN_UNUSED_WALLET_TITLE:"Tajperaro?",LOGIN_UNUSED_WALLET:"La konektita konto ŝajnas <b>neaktiva</b>.<br/><br/>Temas probable pri <b>tajperaro</b> en viaj konekto-identigiloj. Bonvolu rekomenci, kontrolante ke <b>la publika ŝlosilo estas tiu de via konto</b>.",FIX_IDENTITY:"La pseŭdonimo <b>{{uid}}</b> estos denove publikigita, anstataŭigante la malnovan publikigon, kiu finiĝis.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",FIX_MEMBERSHIP:"Via aliĝo-peto kiel membro tuj estos resendita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",MEMBERSHIP:"Via aliĝo-peto kiel membro tuj estos sendita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",RENEW_MEMBERSHIP:"Via aliĝo kiel membro tuj estos revalidigita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",REVOKE_IDENTITY:"Vi estas <b>nuligonta definitive tiun ĉi identecon</b>.<br/><br/>La publika ŝlosilo kaj la ligita pseŭdonimo <b>neniam plu povos esti uzataj</b> (por membro-konto). <br/></br/><b>Ĉu vi certas</b>, ke vi volas definitive nuligi tiun ĉi konton?",REVOKE_IDENTITY_2:"Tiu ĉi ago estas <b>neinversigebla</b>!<br/><br/>Ĉu vi vere certas, ke vi volas <b>definitive nuligi</b> tiun ĉi konton?",NOT_NEED_RENEW_MEMBERSHIP:"Via aliĝo ne bezonas esti revalidigita (ĝi finiĝos nur post {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Ĉu vi certas</b>, ke vi volas revalidigi vian aliĝon?",SAVE_BEFORE_LEAVE:"Ĉu vi volas <b>konservi viajn modifojn</b> antaŭ ol eliri el la paĝo?",SAVE_BEFORE_LEAVE_TITLE:"Modifoj ne registritaj",LOGOUT:"Ĉu vi certas, ke vi volas malkonektiĝi?",USE_FALLBACK_NODE:"Nodo <b>{{old}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Ĉu vi volas provizore uzi la nodon <b>{{new}}</b> ?",ISSUE_524_SEND_LOG:"La spezo estis forĵetita, pro konata anomalio (petslipo #524) sed <b>ne ripetita</b>.<br/><br/>Por helpi la programistojn korekti tiun eraron, <b>ĉu vi akceptas la sendadon de viaj protokolaj dosieroj</b> per mesaĝo?<br/><small>(neniu konfidenca dateno estas sendita)</small>."},DOWNLOAD:{POPUP_TITLE:"<b>Dosiero pri nuligo</b>",POPUP_REVOKE_MESSAGE:"Por sekurigi vian konton, bonvolu elŝuti la <b>dokumenton pri konto-nuligo</b>. Ĝi ebligos al vi eventuale nuligi vian konton (kaze de konto-ŝtelo, ŝanĝo de identigilo, konto erare kreita, ktp.).<br/><br/><b>Bonvolu stoki ĝin en sekura loko.</b>"},HELP:{TITLE:"Ret-helpo",JOIN:{SECTION:"Enskribiĝo",SALT:'La sekreta identigilo estas tre grava. Ĝi utilas por miksi la pasvorton, antaŭ ol ĝi servos por kalkuli la <span class="text-italic">publikan ŝlosilon</span> de via konto (ties numeron) kaj la sekretan ŝlosilon por aliri ĝin.<br/><b>Zorgu pri ĝia bona memorigado</b>, ĉar neniu rimedo estas nuntempe planita por retrovi ĝin kaze de perdo.<br/>Krom tio, ĝi ne povas esti modifita sen devige krei novan konton.<br/><br/>Bona sekreta identigilo devas esti sufiĉe longa (kun almenaŭ 8 signoj) kaj kiel eble plej originala.',PASSWORD:"La pasvorto estas tre grava. Kun la sekreta identigilo, ĝi servas por kalkuli la numeron (la publikan ŝlosilon) de via konto, kaj la sekretan ŝlosilon por aliri ĝin.<br/><b>Zorgu pri ĝia bona memorigado</b>, ĉar neniu rimedo estas planita por retrovi ĝin kaze de perdo (krom se oni generas konserv-dosieron).<br/>Krom tio, ĝi ne povas esti modifita sen devige krei novan konton.<br/><br/>Bona pasvorto entenas (ideale) almenaŭ 8 signojn, inter kiuj estas almenaŭ unu majusklo kaj unu cifero.",PSEUDO:'La pseŭdonimo estas utila nur kaze de enskribiĝo kiel <span class="text-italic">membro</span>. Ĝi ĉiam estas ligita kun monujo (tra ĝia <span class="text-italic">publika ŝlosilo</span>).<br/>Ĝi estas publikigita en la reto, tiel ke la aliaj uzantoj povu identigi ĝin, atesti ĝin aŭ sendi monon al ĝia konto.<br/>Pseŭdonimo devas esti unika ene de la membroj (<u>nunaj</u> kaj eksaj).'},LOGIN:{SECTION:"Konekto",PUBKEY:"Publika ŝlosilo de la ŝlosilaro",PUBKEY_DEF:'La publika ŝlosilo de la ŝlosilaro estas kreita per la tajpitaj identigiloj (iuj ajn), sen ke ili necese rilatu al konto jam uzata.<br/><b>Atente kontrolu, ke la publika ŝlosilo estas tiu de via konto</b>. Alikaze, vi estos konektita al konto probable neniam uzita, la risko de kolizio kun ekzistanta konto estante tre eta.<br/><a href="https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique" target="_system">Scii pli pri kriptografio</a> per publika ŝlosilo.',METHOD:"Konekto-metodoj",METHOD_DEF:'Pluraj eblecoj disponeblas por konekti vin al monujo:<br/> - La konekto <b>per salumado (simpla aŭ sperta)</b> miksas vian pasvorton dank\'al la sekreta identigilo, por limigi la provojn de <a href="https://fr.wikipedia.org/wiki/Attaque_par_force_brute" target="_system">kodrompado per kruda forto</a> (ekzemple per konataj vortoj.<br/> - La konekto <b>per publika ŝlosilo</b> evitigas tajpi viajn identigilojn, kiuj estos petataj de vi, nur kiam venos la momento dum operacio ĉe la konto.<br/> - La konekto <b>per dosiero pri ŝlosilaro</b> legas la ŝlosilojn (publikan kaj privatan) de la konto, per dosiero, sen la bezono tajpi identigilojn. Pluraj strukturoj de dosiero eblas.'},GLOSSARY:{SECTION:"Glosaro",PUBKEY_DEF:'Publika ŝlosilo identigas monujon, kiu povas identigi membron aŭ rilati al anonima monujo. Ĉe Cesium la publika ŝlosilo estas kalkulita (implicite) dank\'al la sekreta identigilo kaj la pasvorto.<br/><a href="https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique" target="_system">Scii pli pri kriptografio</a> per publika ŝlosilo.',MEMBER:"Membro",MEMBER_DEF:'Membro estas homa persono fizika kaj vivanta, kiu deziras libere partopreni en la mona komunumo. Li/ŝi kunproduktas universalan dividendon, laŭ periodo kaj sumo tiel difinitaj kiel en la <span class="text-italic">reguloj de la mono</span>',CURRENCY_RULES:"Reguloj de la mono",CURRENCY_RULES_DEF:'La reguloj de la mono estas difinitaj definitive. Ili fiksas la funkciadon de la mono: la kalkulon de la universala dividendo, la nombron de necesaj atestaĵoj por esti membro, la maksimuman nombron da atestaĵoj, kiujn povas doni unu membro, ktp. <a href="#/app/currency">Vidi la nuntempajn regulojn</a>.<br/>La nemodifo de la reguloj tra la tempo eblas per uzado de <span class="text-italic">Blokĉeno</span>, kiu entenas kaj plenumas tiujn regulojn, kaj konstante kontrolas ties ĝustan aplikadon.',BLOCKCHAIN:'Ĉeno de blokoj (<span class="text-italic">Blokchain/Blokĉeno</span>)',BLOCKCHAIN_DEF:'La Blokĉeno estas malcentrigita sistemo, kiu, kaze de Duniter, servas por enteni kaj plenumi la <span class="text-italic">regulojn de la mono</span>.<br/><a href="https://duniter.org/fr/comprendre/" target="_system">Scii pli pri Duniter</a> kaj la funkciado de ties blokĉeno.',UNIVERSAL_DIVIDEND_DEF:'La Universala Dividendo (UD) estas la kvanto de mono kunkreita de ĉiu membro, laŭ la periodo kaj kalkulo difinitaj en la <span class="text-italic">reguloj de la mono</span>.<br/>Por ĉiu perioda dato, la membroj ricevas en sian konton la saman kvanton da nova mono.<br/><br/>La UD spertas regulan kreskon, por resti justa inter la membroj (nunaj kaj venontaj), kalkulitan depende de la meza vivespero, kiel estas demonstrite en la Teorio Relativa pri la Mono (TRM).<br/><a href="http://trm.creationmonetaire.info" target="_system">Scii pli pri la TRM</a> kaj la liberaj monoj.',WOT:"Reto de Fido (RdF)",WOT_DEF:"La Reto de Fido konsistas el la tuto de la membroj de la mono, kaj el la atesto-ligoj, kiuj kunligas ilin.",DISTANCE_RULE:"Regulo pri distanco",DISTANCE_RULE_DEF:"La regulo pri distanco de la Reto de Fido difinas <b>maksimuman distancon nepran</b> inter petanto kaj minimuma nombro da referencaj membroj (aŭ centraj membroj). Tiu distanco estas kalkulita uzante la ligojn inter atestaĵoj."},TIP:{MENU_BTN_CURRENCY:"La menuo <b>{{'MENU.CURRENCY'|translate}}</b> ebligas konsulti la <b>regulojn de la mono</b> kaj ties staton.",CURRENCY_WOT:"La <b>nombro de membroj</b> montras la gravecon de la komunumo kaj ebligas <b>sekvi ties evoluon</b>.",CURRENCY_MASS:"Sekvu ĉi tie la <b>ĉioman kvanton da mono</b> ekzistanta kaj ties <b>mezan distribuon</b> por membro.<br/><br/>Tio ĉi ebligas taksi la <b>gravecon de iu sumo</b>, kompare kun tio, kion <b>posedas la aliuloj</b> en sia konto (mezume).",CURRENCY_UNIT_RELATIVE:"La unuo uzata (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifas, ke la sumoj en {{currency|capitalize}} estis dividitaj per la <b> Universala Dividendo</b> (UD).<br/><br/><small>Tiu relativa unuo estas <b>trafa</b>, ĉar stabila malgraŭ la kvanto de mono, kiu kreskas seninterrompe.</small>",CURRENCY_CHANGE_UNIT:"La kromaĵo <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> ebligas <b>ŝanĝi la unuon</b>, por vidigi la sumojn <b>rekte en {{currency|capitalize}}</b> (prefere ol en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"La kromaĵo <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> ebligas <b>ŝanĝi la unuon</b>, por vidigi la sumojn en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, tio estas rilate al la Universala Dividendo (la sumo kunproduktita de ĉiu membro).",CURRENCY_RULES:"La <b>reguloj</b> de la mono fiksas ties funkciadon <b>ĝustan kaj antaŭvideblan</b>.<br/><br/>Vera DNA de la mono, ili igas sian monan kodon <b>legebla kaj travidebla</b>.",MENU_BTN_NETWORK:"La menuo <b>{{'MENU.NETWORK'|translate}}</b> ebligas konsulti la staton de la reto.",NETWORK_BLOCKCHAIN:"Ĉiuj operacioj pri la mono estas registritaj en granda konto-libro <b>publika kaj nefalsigebla</b>, ankaŭ nomata <b>blokĉeno</b> (<em>BlockChain</em> en la angla).",NETWORK_PEERS:"La <b>nodoj</b> videblaj ĉi tie rilatas al la <b>komputiloj, kiuj ĝisdatigas kaj kontrolas</b> la blokĉenon.<br/><br/>Ju pli estas nodoj, des pli la mono havas administradon <b>malcentrigitan</b> kaj fidindan.",NETWORK_PEERS_BLOCK_NUMBER:"Tiu ĉi <b>numero</b> (verda) indikas la <b>lastan blokon validigitan</b> por tiu ĉi nodo (lasta paĝo skribita en la granda konto-libro).<br/><br/>La verda koloro indikas, ke tiu ĉi bloko estas validigita ankaŭ de <b>la plej multaj el la aliaj nodoj</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Ĉiu membro</b>, ekipita per komputilo kun interreto, <b>povas partopreni aldonante nodon</b>. Sufiĉas <b>instali la programon Duniter</b> (libera kaj senpaga). <a href="{{installDocUrl}}" target="_system">Vidi la gvidilon pri instalado &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"La menuo <b>{{'ACCOUNT.TITLE'|translate}}</b> ebligas aliri la administradon de via konto.",MENU_BTN_ACCOUNT_MEMBER:"Konsultu ĉi tie la staton de via konto kaj la informojn pri viaj atestaĵoj.",WALLET_CERTIFICATIONS:"Alklaku ĉi tien por konsulti la detalon pri viaj atestaĵoj (ricevitaj kaj senditaj).",WALLET_RECEIVED_CERTIFICATIONS:"Alklaku ĉi tien por konsulti la detalon pri viaj <b>ricevitaj atestaĵoj</b>.",WALLET_GIVEN_CERTIFICATIONS:"Alklaku ĉi tien por konsulti la detalon pri viaj <b>senditaj atestaĵoj</b>.",WALLET_BALANCE:"La <b>saldo</b> de via konto afiŝiĝas tie ĉi.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>La uzata unuo (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifas, ke la sumo en {{currency|capitalize}} estis dividita per la <b>Universala Dividendo</b> (UD) kunkreita de ĉiu membro.<br/><br/>Nuntempe 1 UD valoras {{currentUD|formatInteger}} {{currency|capitalize}}j.",WALLET_BALANCE_CHANGE_UNIT:"Vi povos <b>ŝanĝi la unuon</b> afiŝitan por la sumoj en la <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Ekzemple por vidigi la sumojn <b>rekte en {{currency|capitalize}}</b>, prefere ol en relativa unuo.",WALLET_PUBKEY:"Jen la publika ŝlosilo de via konto. Vi povas sciigi ĝin al aliulo, por ke li identigu pli simple vian konton.",WALLET_SEND:"Efektivigi pagon per kelkaj klakoj.",WALLET_SEND_NO_MONEY:"Efektivigi pagon per kelkaj klakoj.<br/>(Via saldo ankoraŭ ne permesas tion)",WALLET_OPTIONS:"Tiu ĉi butono ebligas aliri la <b>agojn pri aliĝo</b> kaj sekureco.<br/><br/>Ne forgesu okulumi al ĝi!",WALLET_RECEIVED_CERTS:"Afiŝiĝos ĉi tie la listo de la personoj, kiuj atestis vin.",WALLET_CERTIFY:"La butono <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> ebligas elekti identecon kaj atesti ĝin.<br/><br/>Nur uzantoj <b>jam membroj</b> povas atesti aliajn.",WALLET_CERT_STOCK:"Via stoko da atestaĵoj (senditaj) estas limigita je <b>{{sigStock}} atestaĵoj</b>.<br/><br/>Tiu stoko plu evoluas laŭ la tempo, samtempe kiam la atestaĵoj malvalidiĝas.",MENU_BTN_TX:"La menuo <b>{{'MENU.TRANSACTIONS'|translate}}</b> ebligas konsulti vian konton, la liston de viaj spezoj, kaj sendi pagon.",MENU_BTN_WOT:"La menuo <b>{{'MENU.WOT'|translate}}</b> ebligas traserĉi inter la <b>uzantoj</b> de la mono (membroj aŭ ne).",WOT_SEARCH_TEXT_XS:"Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de pseŭdonimo</b> (aŭ de publika ŝlosilo).<br/><br/>La serĉado ekos aŭtomate.",WOT_SEARCH_TEXT:"Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de de pseŭdonimo</b> (aŭ de publika ŝlosilo). <br/><br/>Premu poste sur la klavon <b>Enigi</b> por ekigi la serĉadon.",WOT_SEARCH_RESULT:"Vidigu la detalan slipon simple <b>alklakante</b> linion.",WOT_VIEW_CERTIFICATIONS:"La linio <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> montras kiom da membroj validigis tiun ĉi identecon.<br/><br/>Tiuj atestaĵoj pruvas, ke la konto apartenas al <b>persono homa kaj vivanta</b>, havanta <b>neniun alian membro-konton</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"Necesas almenaŭ <b>{{sigQty}} atestaĵoj</b> por fariĝi membro kaj ricevi la <b>Universalan Dividendon</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Alklaki ĉi tien ebligas malfermi <b>la liston de ĉiuj atestaĵoj</b> de la identeco (ricevitaj kaj senditaj).",WOT_VIEW_CERTIFY:"La butono <b>{{'WOT.BTN_CERTIFY'|translate}}</b> ebligas aldoni vian atestaĵon al tiu identeco.",CERTIFY_RULES:"<b>Atenton:</b> Atestu nur <b>personojn fizikajn vivantajn</b>, posedantajn neniun alian membro-konton.<br/><br/>La sekureco de la mono dependas de ĉies atentego!",MENU_BTN_SETTINGS:"La <b>{{'MENU.SETTINGS'|translate}}</b> ebligos al vi agordi la programon.",HEADER_BAR_BTN_PROFILE:"Alklaku ĉi tien por aliri vian <b>uzanto-profilon.</b>",SETTINGS_CHANGE_UNIT:"Vi povos <b>ŝanĝi la afiŝ-unuon</b> de la sumoj alklakante ĉi-supren.<br/><br/>- Malaktivigu la kromaĵon por afiŝi sumojn en {{currency|capitalize}}.<br/>- Aktivigu la kromaĵon por relativa afiŝado en {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (ĉiuj sumoj estos <b>dividitaj</b> per la Universala Dividendo aktuala).",END_LOGIN:"Tiu ĉi gvidata vizito <b>finiĝis</b>!<br/><br/>Bonan daŭrigon al vi, en la nova mondo de la<b>libera ekonomio</b>!",END_NOT_LOGIN:"Tiu ĉi gvidata vizito <b>finiĝis</b>!<br/><br/>Se vi deziras partopreni en la mono {{currency|capitalize}}, sufiĉos al vi alklaki <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> ĉi-sube."}},API:{COMMON:{LINK_DOC:"Dokumentaro API",LINK_DOC_HELP:"Dokumentaro por la programistoj",LINK_STANDARD_APP:"Klasika versio",LINK_STANDARD_APP_HELP:"Malfermi la klasikan version de {{'COMMON.APP_NAME'|translate}}",CONNECTION_ERROR:"Nodo <b>{{server}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Kontrolu vian interretan konekton, aŭ kontaktu la administranton de la retejo</a>."},HOME:{TITLE:"Dokumentaro API {{'COMMON.APP_NAME'|translate}}",MESSAGE:'Bonvenon en la <b>dokumentaro de la API</b> {{\'COMMON.APP_NAME\'|translate}}.<br/>Konektu viajn retejojn al <a href="http://duniter.org" target="_system">Duniter</a> tre simple!',MESSAGE_SHORT:'Konektu viajn retejojn al <a href="http://duniter.org" target="_system">Duniter</a> tre simple!',DOC_HEADER:"Servoj disponeblaj:"},TRANSFER:{TITLE:"{{'COMMON.APP_NAME'|translate}} - Reta pago",TITLE_SHORT:"Reta pago",SUMMARY:"Resumo de la pago:",AMOUNT:"Sumo:",AMOUNTS_HELP:"Bonvolu elekti la sumon:",NAME:"Nomo:",PUBKEY:"Publika ŝlosilo de la ricevonto:",COMMENT:"Referenco de la spezo:",NODE:"Adreso de la nodo:",DEMO:{SALT:"demo",PASSWORD:"demo",PUBKEY:"3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",HELP:"<b>Demonstra moduso</b>: Neniu pago reale estos sendita dum tiu simulado.<br/>Bonvolu uzi la identigilojn: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",BAD_CREDENTIALS:"Kontrolu vian tajpaĵon.<br/>En demonstra moduso, la identigiloj estas: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"},INFO:{SUCCESS_REDIRECTING_WITH_NAME:"Pago sendita.<br/>Redirektiĝo al <b>{{name}}</b>...",SUCCESS_REDIRECTING:"Pago sendita.<br/>Redirektiĝo al la retejo de la vendanto...",CANCEL_REDIRECTING_WITH_NAME:"Pago nuligita.<br/>Redirektiĝo al <b>{{name}}</b>...",CANCEL_REDIRECTING:"Pago nuligita.<br/>Redirektiĝo al la retejo de la vendanto..."},ERROR:{TRANSFER_FAILED:"Pago malsukcesa"}},DOC:{DESCRIPTION_DIVIDER:"Priskribo",URL_DIVIDER:"Adreso alvokita",PARAMETERS_DIVIDER:"Parametroj",AVAILABLE_PARAMETERS:"Jen la listo de la eblaj parametroj:",DEMO_DIVIDER:"Testi",DEMO_HELP:"Por testi tiun servon, alklaku la butonon ĉi-apude. La rezulto afiŝiĝos sube.",DEMO_RESULT:"Rezulto sendita de la alvoko:",DEMO_RESULT_PEER:"Adreso de la uzata nodo:",DEMO_SUCCEED:'<i class="icon ion-checkmark"></i> Sukceso!',DEMO_CANCELLED:'<i class="icon ion-close"></i> Nuligita de la uzanto',INTEGRATE_DIVIDER:"Integri",INTEGRATE_CODE:"Kodo:",INTEGRATE_RESULT:"Antaŭvidigo de la rezulto:",INTEGRATE_PARAMETERS:"Parametroj",TRANSFER:{TITLE:"Pagoj",DESCRIPTION:"De retejo (ekz.: ret-vendado) vi povas komisii la pagon en libera mono al Cesium API. Por tio, sufiĉas al vi ekigi la malfermon de paĝo ĉe la sekvanta adreso:",PARAM_PUBKEY:"Publika ŝlosilo de la ricevonto",PARAM_PUBKEY_HELP:"Publika ŝlosilo de la ricevonto (devige)",PARAM_AMOUNT:"Sumo",PARAM_AMOUNT_HELP:"Sumo de la spezo (devige). Pluraj valoroj permesataj, uzante apartigilon (punkto-komo, vertikala streko aŭ spaco).",PARAM_COMMENT:"Referenco (aŭ komento)",PARAM_COMMENT_HELP:"Referenco aŭ komento. Tio ekzemple ebligos al vi identigi la pagon en la blokĉeno.",PARAM_NAME:"Nomo (de la ricevonto aŭ de la retejo)",PARAM_NAME_HELP:'La nomo de la ricevonto, aŭ de la retejo alvokanta. Tio povas estis legebla nomo ("Mia retejo"), aŭ alie pseŭdo-retadreso ("MiaRetejo.com").',PARAM_REDIRECT_URL:"Retadreso por redirektiĝo",PARAM_REDIRECT_URL_HELP:'Retadreso (URL) por redirektiĝo, alvokita kiam la pago estis sendita. Ĝi povas enteni la sekvantajn signojn, kiuj estos anstataŭigitaj per la valoroj de la spezo: "{tx}", "{hash}", "{comment}", "{amount}", "{pubkey}" kaj "{node}".',PARAM_CANCEL_URL:"Retadreso por nuligo",PARAM_CANCEL_URL_HELP:'Retadreso (URL) kaze de nuligo de la pago, fare de la uzanto. Ĝi povas enteni la sekvantajn signojn, kiuj estos anstataŭigitaj lastmomente: "{comment}", "{amount}" kaj {pubkey}.',PARAM_PREFERRED_NODE:"Adreso de la preferata nodo",PARAM_PREFERRED_NODE_HELP:'Adreso (URL) de la nodo Duniter preferinde uzota ("g1.domaine.com:443" aŭ "https://g1.domaine.com").',EXAMPLES_HELP:"Jen ekzemploj pri integrado:",EXAMPLE_BUTTON:"Butono HTML",EXAMPLE_BUTTON_DEFAULT_TEXT:"Pagi en {{currency|currencySymbol}}",EXAMPLE_BUTTON_DEFAULT_STYLE:"Personigita stilo",EXAMPLE_BUTTON_TEXT_HELP:"Buton-teksto",EXAMPLE_BUTTON_BG_COLOR:"Fon-koloro",EXAMPLE_BUTTON_BG_COLOR_HELP:"Ekzemplo: #fbc14c, nigra, helgriza, rgb(180,180,180)",EXAMPLE_BUTTON_FONT_COLOR:"Teksto-koloro",EXAMPLE_BUTTON_FONT_COLOR_HELP:"Ekzemplo: nigra, oranĝa, rgb(180,180,180)",EXAMPLE_BUTTON_TEXT_ICON:"Ikono",EXAMPLE_BUTTON_TEXT_WIDTH:"Larĝeco",EXAMPLE_BUTTON_TEXT_WIDTH_HELP:"Ekzemplo: 200px, 50%",EXAMPLE_BUTTON_ICON_NONE:"Neniu",EXAMPLE_BUTTON_ICON_DUNITER:"Insigno Duniter",EXAMPLE_BUTTON_ICON_CESIUM:"Insigno Cesium",EXAMPLE_BUTTON_ICON_G1_COLOR:"Insigno Ğ1",EXAMPLE_BUTTON_ICON_G1_BLACK:"Insigno Ğ1 (nigra)"}}}}),e.translations("es-ES",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"fecha: {{build}}",PUBKEY:"Llave pública",MEMBER:"Miembro",BLOCK:"Bloque",BTN_OK:"OK",BTN_YES:"Sí",BTN_NO:"No",BTN_SEND:"Enviar",BTN_SEND_MONEY:"Hacer una transferencia",BTN_SEND_MONEY_SHORT:"Transferencia",BTN_SAVE:"Guardar",BTN_YES_SAVE:"Sí, guardar",BTN_YES_CONTINUE:"Sí, continuar",BTN_SHOW:"Ver",BTN_SHOW_PUBKEY:"Ver la llave",BTN_RELATIVE_UNIT:"¿Mostrar las importes en DU?",BTN_BACK:"Anterior",BTN_NEXT:"Siguiente",BTN_IMPORT:"Importar",BTN_CANCEL:"Cancelar",BTN_CLOSE:"Cerrar",BTN_LATER:"Más tarde",BTN_LOGIN:"Connectarse",BTN_LOGOUT:"Desconexión",BTN_ADD_ACCOUNT:"Nueva cuenta",BTN_SHARE:"Compartir",BTN_EDIT:"Modificar",BTN_DELETE:"Suprimir",BTN_ADD:"Añadir",BTN_SEARCH:"Buscar",BTN_REFRESH:"Actualizar",BTN_RETRY:"Empezar de nuevo",BTN_START:"Empezar",BTN_CONTINUE:"Continuar",BTN_CREATE:"Crear",BTN_UNDERSTOOD:"Entendido",BTN_OPTIONS:"Opciones",BTN_HELP_TOUR:"Visita guiada",BTN_HELP_TOUR_SCREEN:"Descubrir esta pantalla",BTN_DOWNLOAD:"Descargar",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Descargar el estado de cuenta",BTN_MODIFY:"Modificar",CHOOSE_FILE:"Deposite archivo<br/>o clique para seleccionarlo",DAYS:"Días",NO_ACCOUNT_QUESTION:"¿Todavía no es miembro? ¡Crear una cuenta!",SEARCH_NO_RESULT:"Ningún resultado encontrado",LOADING:"Espere por favor...",LOADING_WAIT:"Espere por favor...<br/><small>(Esperando disponibilidad de nodo)</small>",SEARCHING:"Búsqueda en proceso...",FROM:"De",TO:"A",COPY:"Copiar",LANGUAGE:"Idioma",UNIVERSAL_DIVIDEND:"Dividendo universal",UD:"DU",DATE_PATTERN:"DD/MM/YYYY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD/MM/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(vacío)",UID:"Seudónimo",ENABLE:"Activado",DISABLE:"Desactivado",RESULTS_LIST:"Resultados:",RESULTS_COUNT:"{{count}} resultados",EXECUTION_TIME:"ejecutado en {{duration|formatDurationMs}}",SHOW_VALUES:"¿Publicar los valores no codificados?",POPOVER_ACTIONS_TITLE:"Opciones",POPOVER_FILTER_TITLE:"Filtros",SHOW_MORE:"Mostrar más",SHOW_MORE_COUNT:"(límite actual {{limit}})",POPOVER_SHARE:{TITLE:"Compartir",SHARE_ON_TWITTER:"Compartir en Twitter",SHARE_ON_FACEBOOK:"Compartir en Facebook",SHARE_ON_DIASPORA:"Compartir en Diaspora*",SHARE_ON_GOOGLEPLUS:"Compartir en Google+"},FILE:{DATE:"Fecha:",TYPE:"Tipo:",SIZE:"Tamaño:",VALIDATING:"Validación en progreso..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Elegir la fuente:",BTN_PICTURE_GALLERY:"Galería",BTN_PICTURE_CAMERA:"<b>Cámara</b>"},MENU:{HOME:"Recepción",WOT:"Directorio",CURRENCY:"Moneda",ACCOUNT:"Mi cuenta",WALLETS:"Mis monederos",SETTINGS:"Configuraciones",NETWORK:"Red",TRANSACTIONS:"Mis operaciones"},ABOUT:{TITLE:"A propósito ",LICENSE:"Aplicación <b>libre</b> (licencia GNU AGPLv3).",LATEST_RELEASE:"Hay una <b>versión más nueva</b> de {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",PLEASE_UPDATE:"Por favor actualice {{'COMMON.APP_NAME' | translate}} (última versión: <b>v{{version}}</b>)",CODE:"Código fuente:",DEVELOPERS:"Desarrollado por:",FORUM:"Foro:",PLEASE_REPORT_ISSUE:"No dude en informarnos de las anomalías encontradas",REPORT_ISSUE:"Reportar un problema"},HOME:{TITLE:"Cesium",WELCOME:"Bienvenido(a) a la aplicación Cesium !",MESSAGE:"Seguir las cuentas de {{currency|abbreviate}} fácilmente",BTN_CURRENCY:"Explorar la moneda",BTN_ABOUT:"Acerca de:",BTN_HELP:"Ayuda en línea",REPORT_ISSUE:"anomalía",NOT_YOUR_ACCOUNT_QUESTION:'¿Usted no es dueño de la cuenta <<b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b>?',BTN_CHANGE_ACCOUNT:"Desconectar esta cuenta",CONNECTION_ERROR:'Nodo <b>{{servidor}}</b> inalcanzable o dirección inválida.<br/><br/>Compruebe su conexión a Internet, o nodo de conmutación <a class="positive" ng-click="doQuickFix(\'settings\')">en la configuración</a>.'},SETTINGS:{TITLE:"Configuración",DISPLAY_DIVIDER:"Visualización",STORAGE_DIVIDER:"Almacenamiento",NETWORK_SETTINGS:"Red",PEER:"Dirección del nodo Duniter",PEER_CHANGED_TEMPORARY:"Dirección utilizada temporalmente",PERSIST_CACHE:"Mantener datos de navegación (experimental)",PERSIST_CACHE_HELP:"Permite una navegación más rápida, conservando localmente los datos recibidos, para usar de una sesión a otra.",USE_LOCAL_STORAGE:"Activar el almacenamiento local",USE_LOCAL_STORAGE_HELP:"Permitir el ahorro de almacenamiento local",WALLETS_SETTINGS:"Mis monederos",USE_WALLETS_ENCRYPTION:"¿Asegurar la lista?",ENABLE_HELPTIP:"Activar las ayudas contextuales",ENABLE_UI_EFFECTS:"Activar los efectos visuales",HISTORY_SETTINGS:"Operaciones de cuentas",DISPLAY_UD_HISTORY:"¿Publicar los dividendos producidos?",TX_HISTORY_AUTO_REFRESH:"Activar actualización automática?",TX_HISTORY_AUTO_REFRESH_HELP:"Actualice el saldo y las operaciones automáticamente, en cada nuevo bloque.",AUTHENTICATION_SETTINGS:"Autenticación",KEEP_AUTH:"Caducidad de la autenticación",KEEP_AUTH_SHORT:"Caducidad",KEEP_AUTH_HELP:"Definir cuándo limpiar la memoria de autenticación.",KEEP_AUTH_OPTION:{NEVER:"Después de cada operación",SECONDS:"Después de {{value}} segundos de inactividad",MINUTE:"Después de {{value}}min de inactividad",MINUTES:"Después de {{value}}mins de inactividad",HOUR:"Después de {{value}}h de inactividad",ALWAYS:"Al finalizar la sesión"},KEYRING_FILE:"Archivo de llavero",REMEMBER_ME:"Recordarme",REMEMBER_ME_HELP:"Permite mantenerse siempre conectado (no recomendado), conservando localmente la llave pública.",PLUGINS_SETTINGS:"Extensiones",BTN_RESET:"Restaurar los valores por defecto",EXPERT_MODE:"Activar el modo experto",EXPERT_MODE_HELP:"Permite una visualización más detallada",POPUP_PEER:{TITLE:"Nodo Duniter",HOST:"Dirección",HOST_HELP:"Dirección: servidor:puerto",USE_SSL:"¿Segura?",USE_SSL_HELP:"(Cifrado SSL)",BTN_SHOW_LIST:"Lista de nodos"}},BLOCKCHAIN:{HASH:"Hash: {{hash}}",VIEW:{HEADER_TITLE:"Bloque #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Bloque corriente",TITLE:"Bloque #{{number|formatInteger}}",COMPUTED_BY:"Calculado por el nodo de",SHOW_RAW:"Ver el fichero en bruto",TECHNICAL_DIVIDER:"Informaciones técnicas",VERSION:"Versión del formato",HASH:"Hash calculado",UNIVERSAL_DIVIDEND_HELP:"Moneda co-producida por cada uno de los {{membersCount}} miembros",EMPTY:"Ningún dato en este bloque",POW_MIN:"Dificultad mínima",POW_MIN_HELP:"Dificultad impuesta por el cálculo del hash",DATA_DIVIDER:"Datos",IDENTITIES_COUNT:"Nuevas identidades",JOINERS_COUNT:"Nuevos miembros",ACTIVES_COUNT:"Renovaciones",ACTIVES_COUNT_HELP:"Miembros que han renovado sus adhesiones",LEAVERS_COUNT:"Miembros salientes",LEAVERS_COUNT_HELP:"Miembros salientes que ya no quieren estar certificados",EXCLUDED_COUNT:"Miembros excluidos",EXCLUDED_COUNT_HELP:"Antiguos miembros excluidos por no renovación o falta de certificaciones",REVOKED_COUNT:"Identidades revocadas",REVOKED_COUNT_HELP:"Estas cuentas no podrán ser miembros",TX_COUNT:"Transacciones",CERT_COUNT:"Certificaciones",TX_TO_HIMSELF:"Operación de cambio",TX_OUTPUT_UNLOCK_CONDITIONS:"Condiciones de desbloqueo",TX_OUTPUT_OPERATOR:{AND:"y",OR:"o"},TX_OUTPUT_FUNCTION:{SIG:"<b>Firma</b> de ",XHX:"<b>Contraseña</b>, cuyo SHA256 =",CSV:"Bloqueado durante",CLTV:"Bloqueado hasta"}},LOOKUP:{TITLE:"Bloques",NO_BLOCK:"Ningún bloque",LAST_BLOCKS:"últimos bloques:",BTN_COMPACT:"Compactar"}},CURRENCY:{VIEW:{TITLE:"Moneda",TAB_CURRENCY:"Moneda",TAB_WOT:"Red de confianza",TAB_NETWORK:"Red",TAB_BLOCKS:"Bloques",CURRENCY_SHORT_DESCRIPTION:"{{currency|abbreviate}} es una <b>moneda libre</b>, originada el {{firstBlockTime|formatFromNow}}. Ella cuenta actualmente <b>{{N}} miembros</b>, que producen y recibir un <a ng-click=\"showHelpModal('ud')\">Dividendo universal</a> (DU), cada {{dt|formatPeriod}}.",NETWORK_RULES_DIVIDER:"Reglas de la red",CURRENCY_NAME:"Nombre de la moneda",MEMBERS:"Cantidad de miembros",MEMBERS_VARIATION:"variaciones del último DU",MONEY_DIVIDER:"Moneda",MASS:"Masa monetaria",SHARE:"Masa por miembro",UD:"Dividendo universal",C_ACTUAL:"Crecimiento actual",MEDIAN_TIME:"Hora de la blockchain",POW_MIN:"Nivel mínimo de dificultad de cálculo",MONEY_RULES_DIVIDER:"Reglas de la moneda",C_RULE:"Crecimiento teórico objetivo",UD_RULE:"Cálculo del dividendo universal",DT_REEVAL:"Periodo de revalorización del DU",REEVAL_SYMBOL:"reval",DT_REEVAL_VALUE:"Todos los <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Fecha de la primera revalorización",SIG_QTY_RULE:"Número de certificaciones requeridas para ser miembro",SIG_STOCK:"Número máximo de certificaciones emitidas por miembros",SIG_PERIOD:"Plazo mínimo de espera entre 2 certificaciones sucesivas emitidas por la misma persona",SIG_WINDOW:"Plazo límite para tomar en cuenta una certificación",SIG_VALIDITY:"Duración de una certificación que se ha tenido en cuenta.",MS_WINDOW:"Duración límite para toma en cuenta de una adhesión",MS_VALIDITY:"Duración de una certificación",STEP_MAX:"Distancia máxima entre un nuevo entrante y los miembros referentes",WOT_RULES_DIVIDER:"Reglas de la red de confianza",SENTRIES:"Cantidad de certificaciones necesarias para ser miembro referente",SENTRIES_FORMULA:"Cantidad de certificaciones necesarias para ser miembro referente (fórmula)",XPERCENT:"Porcentaje mínimo de miembros referentes necesario para respetar la regla de distancia",AVG_GEN_TIME:"Tiempo medio entre dos bloques",CURRENT:"actual",MATH_CEILING:"TECHO",DISPLAY_ALL_RULES:"¿Ver todas las reglas?",BTN_SHOW_LICENSE:"Ver la licencia",WOT_DIVIDER:"Red de confianza"},LICENSE:{TITLE:"Licencia de la moneda",BTN_DOWNLOAD:"Descagar el fichero",NO_LICENSE_FILE:"Fichero de licencia no encontrado."}},NETWORK:{VIEW:{MEDIAN_TIME:"Hora de la blockchain",LOADING_PEERS:"Cargando los nodos...",NODE_ADDRESS:"Dirección:",SOFTWARE:"Software:",WARN_PRE_RELEASE:"prelanzamiento (última versión estable: <b>{{version}}</b>)",WARN_NEW_RELEASE:"Versión <b>{{version}}</b> disponible",WS2PID:"ID:",PRIVATE_ACCESS:"Acceso privado",POW_PREFIX:"Prefijo de la prueba de trabajo:",ENDPOINTS:{BMAS:"Interfaz segura (SSL)",BMATOR:"Interfaz red TOR",WS2P:"Interfaz WS2P",ES_USER_API:"Nodo de datos Cesium+"}},INFO:{ONLY_SSL_PEERS:"La visualización de los nodos sin SSL está deteriorada porque Cesium funciona en modo HTTPS."}},PEER:{PEERS:"Nodos",SIGNED_ON_BLOCK:"Firmado sobre el bloque",MIRROR:"espejo",MIRRORS:"Espejo",MIRROR_PEERS:"Nodos espejo",PEER_LIST:"Lista de nodos",MEMBERS:"Miembro",MEMBER_PEERS:"Nodos miembro",ALL_PEERS:"Todos los nodos",DIFFICULTY:"Dificultad",API:"API",CURRENT_BLOCK:"Bloque #",POPOVER_FILTER_TITLE:"Filtro",OFFLINE:"Fuera de línea",OFFLINE_PEERS:"Nodos fuera de línea",BTN_SHOW_PEER:"Ver nodo",VIEW:{TITLE:"Nodo",OWNER:"Propiedad de",SHOW_RAW_PEERING:"Ver la mapa de red",SHOW_RAW_CURRENT_BLOCK:"Ver el último bloque (formato bruto)",LAST_BLOCKS:"Bloques recientes",KNOWN_PEERS:"Nodos conocidos:",GENERAL_DIVIDER:"Información general",ERROR:{LOADING_TOR_NODE_ERROR:"No se pudo obtener la información del nodo usando la red TOR.",LOADING_NODE_ERROR:"No se pudo obtener la información del nodo"}}},WOT:{SEARCH_HELP:"Buscar (seudónimo o llave pública)",SEARCH_INIT_PHASE_WARNING:"Durante la etapa de preinscripción, el tiempo de búsqueda de las inscripciones en espera <b>puede ser largo</b>. Gracias por su paciencia...",REGISTERED_SINCE:"Registrado en",REGISTERED_SINCE_BLOCK:"Registrado en el bloque #",NO_CERTIFICATION:"Ninguna certificación validada",NO_GIVEN_CERTIFICATION:"Ninguna certificación emitida",NOT_MEMBER_PARENTHESIS:"(no miembro)",IDENTITY_REVOKED_PARENTHESIS:"(identidad revocada)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(revocación en proceso)",EXPIRE_IN:"Expira el",NOT_WRITTEN_EXPIRE_IN:"Fecha límite<br/>de procesamiento",EXPIRED:"Expirado",PSEUDO:"Seudónimo",SIGNED_ON_BLOCK:"Emitida en el bloque #{{block}}",WRITTEN_ON_BLOCK:"Escrita en el bloque #{{block}}",GENERAL_DIVIDER:"Informaciones generales",NOT_MEMBER_ACCOUNT:"Cuenta no miembro",NOT_MEMBER_ACCOUNT_HELP:"Se trata de un simple monedero, sin solicitud de adhesión en espera.",TECHNICAL_DIVIDER:"Informaciones técnicas",BTN_CERTIFY:"Certificar",BTN_YES_CERTIFY:"Sí, certificar",BTN_SELECT_AND_CERTIFY:"Nueva certificación",ACCOUNT_OPERATIONS:"Operaciones de cuenta",VIEW:{POPOVER_SHARE_TITLE:"Identidad {{title}}"},LOOKUP:{TITLE:"Directorio",NEWCOMERS:"Nuevos miembros:",NEWCOMERS_COUNT:"{{count}} miembros",PENDING:"Inscripciones en espera:",PENDING_COUNT:"{{count}} inscripciones en espera",REGISTERED:"Inscrito {{sigDate | formatFromNow}}",MEMBER_FROM:"Miembro desde {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Nuevos miembros",BTN_PENDING:"Inscripciones en espera",SHOW_MORE:"Mostrar más",SHOW_MORE_COUNT:"(límite actual a {{limit}})",NO_PENDING:"Ninguna inscripción en espera.",NO_NEWCOMERS:"Ningun miembro."},CONTACTS:{TITLE:"Contactos"},MODAL:{TITLE:"Buscar"},CERTIFICATIONS:{TITLE:"{{uid}} - Certificaciones",SUMMARY:"Certificaciones recibidas",LIST:"Detalle de las certificaciones recibidas",PENDING_LIST:"Certificaciones en espera de tratamiento",RECEIVED:"Certificaciones recibidas",RECEIVED_BY:"Certificaciones recibidas por {{uid}}",ERROR:"Certificaciones recibidas por error",SENTRY_MEMBER:"Miembro referente"},OPERATIONS:{TITLE:"{{uid}} - Operaciones"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Certificaciones emitidas",SUMMARY:"Certificaciones emitidas",LIST:"Detalle de las certificaciones emitidas",PENDING_LIST:"Certificaciones en espera a ser procesadas",SENT:"Certificaciones emitidas",SENT_BY:"Certificaciones emitidas por {{uid}}",ERROR:"Certificaciones emitidas por error"}},LOGIN:{TITLE:'<i class="icon ion-locked"></i> Conexión',SCRYPT_FORM_HELP:"Ingrese sus credenciales.<br>Recuerde verificar que la clave pública es su cuenta.",PUBKEY_FORM_HELP:"Por favor ingrese una clave de cuenta pública:",FILE_FORM_HELP:"Elija el archivo de llavero para usar:",SCAN_FORM_HELP:"Escanee el código QR de la monedero.",SALT:"Identificador secreto",SALT_HELP:"Identificador secreto",SHOW_SALT:"¿Visualizar el identificador secreto?",PASSWORD:"Frase secreta",PASSWORD_HELP:"Frase secreta",PUBKEY_HELP:"llave pública",NO_ACCOUNT_QUESTION:"¿Aún no tiene cuenta?",HAVE_ACCOUNT_QUESTION:"¿Ya tienes una cuenta?",CREATE_ACCOUNT:"Crear una cuenta",CREATE_FREE_ACCOUNT:"Crear una cuenta gratis",FORGOTTEN_ID:"¿Olvidó su frase secreta?",ASSOCIATED_PUBKEY:"Clave pública del llavero:",BTN_METHODS:"Otros métodos",BTN_METHODS_DOTS:"Método de cambio...",METHOD_POPOVER_TITLE:"Métodos",MEMORIZE_AUTH_FILE:"Recuerda este llavero al momento de la sesión de navegación",SCRYPT_PARAMETERS:"Configuraciones (Scrypt) :",AUTO_LOGOUT:{TITLE:"Información",MESSAGE:'<i class="ion-android-time"></i> Se ha <b>desconectado</b> de forma automática, después de un periodo de inactividad prolongada.',BTN_RELOGIN:"Volver a conectarme",IDLE_WARNING:"Se desconectará en... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Identificación predeterminada",SCRYPT_ADVANCED:"Sallaje avanzado",FILE:"Archivo llavero",PUBKEY:"Solo clave pública",SCAN:"Escanear un código QR"},SCRYPT:{SIMPLE:"Ligero",DEFAULT:"Predeterminado",SECURE:"Seguro",HARDEST:"El más seguro",EXTREME:"Extremo",USER:"Personalizado",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Formato de archivo esperado: <b>.yml</b> o <b>.dunikey</b> (tipo PubSec, WIF o EWIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> AAutenticación',BTN_AUTH:"Autenticar",GENERAL_HELP:"Por favor, autentíquese:",EXPECTED_UID_HELP:'Por favor inicie sesión en la cuenta de <i class="ion-person"></i> {{uid}}:',EXPECTED_PUBKEY_HELP:'Por favor, autentifíquese en la monedero <i class="ion-key"></i> {{pubkey|formatPubkey}} :',SCAN_FORM_HELP:"Escanee el código QR de la <b>clave privada</b> de la monedero."},ACCOUNT:{TITLE:"Mi cuenta",BALANCE:"Saldo",LAST_TX:"última validadas transacción",BALANCE_ACCOUNT:"Saldo de la cuenta",NO_TX:"Ninguna transacción",SHOW_MORE_TX:"Mostrar más",SHOW_ALL_TX:"Mostrar todo",TX_FROM_DATE:"(límite actual a {{fromTime|medianFromNowShort}})",PENDING_TX:"Transacciones en proceso de se procesadas",VALIDATING_TX:"Transacciones validadas",ERROR_TX:"Transacciones no ejecutadas",ERROR_TX_SENT:"Transacciones ejecutadas fallidas",PENDING_TX_RECEIVED:"Tansacciones en espera de recepción",EVENTS:"Eventos",WAITING_MEMBERSHIP:"Solicitud de adhesión emitida. En espera de aceptación.",WAITING_CERTIFICATIONS:"Debe obtener {{needCertificationCount}} certificación(es) para ser miembro.",WILL_MISSING_CERTIFICATIONS:"Pronto le van a <b>faltar certificaciones</b> (al menos {{willNeedCertificationCount}} son necesarias)",WILL_NEED_RENEW_MEMBERSHIP:"Su adhesión como miembro <b>va a expirar {{membershipExpiresIn|formatDurationTo}}</b>. Piense en <a ng-click=\"doQuickFix('renew')\">renovar su adhesión</a> mientras tanto.",NEED_RENEW_MEMBERSHIP:"No es miembro porque su adhesión <b>ha expirado</b>. Piense en <a ng-click=\"doQuickFix('renew')\">renovar su adhesión</a>.",NO_WAITING_MEMBERSHIP:"No hay adhesión miembro en espera. Si desea <b>convertirse en miembro</b>, por favor <a ng-click=\"doQuickFix('membership')\">envíe su adhesión como miembro</a>.",CERTIFICATION_COUNT:"Certificaciones recibidas",CERTIFICATION_COUNT_SHORT:"Certificaciones",SIG_STOCK:"Certificaciones emitidas",BTN_RECEIVE_MONEY:"Recibir",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Cambiar a otra identidad...",BTN_FIX_MEMBERSHIP:"Volver a enviar la adhesión...",BTN_MEMBERSHIP_RENEW:"Renovar la adhesión",BTN_MEMBERSHIP_RENEW_DOTS:"Renovar la adhesión...",BTN_MEMBERSHIP_OUT_DOTS:"Cancelar la adhesión...",BTN_SECURITY_DOTS:"Cuenta y securidad...",BTN_SHOW_DETAILS:"Publicar la información técnica",LOCKED_OUTPUTS_POPOVER:{TITLE:"Importe bloqueado",DESCRIPTION:"Aquí están las condiciones para desbloquear este importe:",DESCRIPTION_MANY:"Esta transacción esta compuesta de varias partes, cuyas condiciones de desbloqueo son:",LOCKED_AMOUNT:"Condiciones del importe:"},NEW:{TITLE:"Inscripción",INTRO_WARNING_TIME:"Crear una cuenta en {{name|capitalize}} es muy simple. Sin embargo, por favor tome el tiempo suficiente para dar correctamente este paso (no olvidar los identificadores, frase secreta, etc.).",INTRO_WARNING_SECURITY:"Asegúrece de que el equipo que utiliza actualmente (ordenador, tableta, teléfono) <b>es seguro y digno de confianza</b>.",INTRO_WARNING_SECURITY_HELP:"Actualizaciones de antivirus, firewall activado, sesión protegidos por contraseña o código PIN, etc.",INTRO_HELP:"Haga clic en <b>{{'COMMON.BTN_START'|translate}}</b> para iniciar la creación de la cuenta. Se le guiará paso a paso.",REGISTRATION_NODE:"Su registro será grabado a través del nodo Duniter <b>{{server}}</b>, que luego se transmitirá al resto del sistema de la moneda.",REGISTRATION_NODE_HELP:"Si usted no confía en este nodo, <a ng-click=\"doQuickFix('settings')\">cambie la configuración</a> de Cesium.",SELECT_ACCOUNT_TYPE:"Elegir el tipo de cuenta a crear:",MEMBER_ACCOUNT:"Cuenta miembro",MEMBER_ACCOUNT_TITLE:"Crear una cuenta miembro",MEMBER_ACCOUNT_HELP:"Si aún no está inscrito como un individuo (Solamente una cuenta posible por individuo).",WALLET_ACCOUNT:"Simple monedero",WALLET_ACCOUNT_TITLE:"Crear una cuenta simple",WALLET_ACCOUNT_HELP:"Monedero simple para todos los otros casos, por ejemplo si necesita una cuenta suplementaria.<br/>El Dividendo Universal no será producido para esta cuenta.",SALT_WARNING:"Elija su identificador secreto.<br/>Se solicitará cada vez que se conectará con esta cuenta.<br/><br/><b>Retenga bien este identificador secreto</b>.<br/>¡En caso de pérdida, nadie podrá acceder a su cuenta!",PASSWORD_WARNING:"Elija su frase secreta.<br/>Se solicitará cada vez que se conectará con esta cuenta.<br/><br/><b>Retenga bien esta frase secreta</b>.<br/>¡En caso de pérdida, nadie podrá acceder su cuenta!",PSEUDO_WARNING:"Elija un seudónimo.<br/>Sirve para que los otros miembros puedan encontrarlo más fácilmente.<br/><br/>No debe contener <b>ni espacios ni caracteres acentuados</b>.<div class='hidden-xs'><br/>Ejemplo: <span class='gray'>SophieDupond, MarcelChemin, etc.</span>",PSEUDO:"Seudónimo",PSEUDO_HELP:"Seudónimo",SALT_CONFIRM:"Confirmación",SALT_CONFIRM_HELP:"Confirmación del identificador secreto",PASSWORD_CONFIRM:"Confirmación",PASSWORD_CONFIRM_HELP:"Confirmación de la frase secreta",SLIDE_6_TITLE:"Confirmación:",COMPUTING_PUBKEY:"Cálculo en proceso...",LAST_SLIDE_CONGRATULATION:"<b>¡Bien!</b> Ha introducido todas los datos necesarias.<br/><b>Puede solicitar</b> la creación de su cuenta.</b><br/><br/>Para su información, la llave pública que se muestra más abajo identificará su futura cuenta.<br/>Esta podrá ser comunicada a terceros para recibir sus pagos.<br/>Sin embargo, <b>no es útil</b> anotarla aquí.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Advertencia:</b> el identificador secreto, la frase secreta y el seudónimo no podrán estar modificados.<br/><b>¡Asegúrese siempre de recordarlos!</b><br/><br/><b>¿Está usted seguro</b> de querer solicitar la inscripción?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Advertencia:</b> el identificador secreto y la frase secreta no podrán estar modificados.<br/><b>¡Asegúrese de recordarlos siempre!</b><br/><br/><b>¿Está usted seguro</b> de querer continuar con estos identificadores?',CHECKING_PSEUDO:"Comprobar de disponibilidad...",PSEUDO_AVAILABLE:"Este nombre está disponible",PSEUDO_NOT_AVAILABLE:"Este nombre de usuario no está disponible",INFO_LICENSE:"Para unirse a la moneda, le pedimos leer y aceptar esta licencia.",BTN_ACCEPT:"Acepto",BTN_ACCEPT_LICENSE:"Acepto la licencia"},POPUP_REGISTER:{TITLE:"Elija un seudónimo",HELP:"Un seudónimo es obligatorio para ser miembro."},SELECT_IDENTITY_MODAL:{TITLE:"Selección de identidad",HELP:'Se han enviado varias <b>identidades diferentes</b> para la clave pública <span class="gray"><i class="ion-key"></i>{{pubkey | formatPubkey}}</span>.<br/>Por favor, selecciona la carpeta para usar:'},SELECT_WALLET_MODAL:{TITLE:"Selección de monedero"},WALLET_LIST:{TITLE:"Mis monederos",BTN_NEW:"Añadir un monedero",BTN_DOWNLOAD:"Descargue la lista",BTN_IMPORT_FILE_DOTS:"Importar desde un archivo...",NO_WALLET:"Sin monedero secundaria",BTN_DELETE:"Eliminar una monedero secundaria...",BTN_RENAME:"Renombrar el monedero",EXPORT_FILENAME:"monederos-{{pubkey|formatPubkey}}-{{currency}}.csv",EDIT_POPOVER:{TITLE:"Renombrar el monedero",HELP:"Completa el nuevo nombre",NAME_HELP:"Nombre de la monedero"}},SECURITY:{ADD_QUESTION:"Añadir una pregunta personalizada",BTN_CLEAN:"Limpiar",BTN_RESET:"Reinicializar",DOWNLOAD_REVOKE:"Grabar un fichero de revocación",HELP_LEVEL:"Para generar un fichero de respaldo de sus identificadores, elija <strong> al menos {{nb}} preguntas:</strong>",LEVEL:"Nivel de seguridad",LOW_LEVEL:'Bajo <span class="hidden-xs">(mínimo dos preguntas)</span>',MEDIUM_LEVEL:'Medio <span class="hidden-xs">(mínimo cuatro preguntas)</span>',QUESTION_1:"¿Cómo se llamaba su mejor amigo de la adolescencia?",QUESTION_2:"¿Cómo se llamaba su primer animal de compañía?",QUESTION_3:"¿Cuál es el primer plato que aprendió a cocinar?",QUESTION_4:"¿Cuál es la primera película que vió en un cine?",QUESTION_5:"¿Cuál era el destino del primer avión que cogió?",QUESTION_6:"¿Cómo se llamaba su maestro favorito en la escuela primaria?",QUESTION_7:"¿Cuál sería para usted el mejor oficio?",QUESTION_8:"¿Cuál es su libro para niños preferido?",QUESTION_9:"¿Cuál fue el modelo de su primer vehículo?",QUESTION_10:"¿Cuál fue su sobrenombre cuando era niña(o)?",QUESTION_11:"¿Cuál fue su personaje o actor/actriz preferido/a cuando era estudiante?",QUESTION_12:"¿Cuál fue su cantante o grupo preferido/a cuando era estudiante?",QUESTION_13:"¿En qué ciudad sus padres se encontraron?",QUESTION_14:"¿Cómo se llamaba su primer jefe?",QUESTION_15:"¿Cómo se llama la calle donde creció?",QUESTION_16:"¿Cómo se llama la primera playa donde se bañó?",QUESTION_17:"¿Cuál es el primer álbum que compró?",QUESTION_18:"¿Cuál es el nombre de su equipo deportivo preferido?",QUESTION_19:"¿Cuál fue el oficio de su abuelo?",RECOVER_ID:"Recuperar sus identificadores",REVOCATION_WITH_FILE:"Revocar una identidad a partir de un fichero",REVOCATION_WITH_FILE_DESCRIPTION:"Si ha perdido las credenciales de su cuenta de miembro de forma permanente (o la seguridad de la cuenta se ve comprometida), puede usar <b>el archivo de revocación de la cuenta</b> para forzar publicación final de la web de confianza.",REVOCATION_WITH_FILE_HELP:"Para <b>revocar permanentemente</b> una cuenta de miembro, arrastre el archivo de revocación en el cuadro siguiente o haga clic en el cuadro para buscar un archivo.",REVOCATION_FILENAME:"revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",REVOCATION_WALLET:"Revocar esta identidad",SAVE_ID:"Grabar sus identificadores",STRONG_LEVEL:'Alto <span class="hidden-xs ">(6 preguntas mínimo)</span>',TITLE:"Cuenta y seguridad"},FILE_NAME:"{{currency}} - Estado de cuenta {{pubkey|formatPubkey}} a {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Fecha",AMOUNT:"Cantidad",COMMENT:"Comentario"}},TRANSFER:{TITLE:"Transferencia",SUB_TITLE:"Hacer una transferencia",FROM:"De",TO:"A",AMOUNT:"Importe",AMOUNT_HELP:"Importe",COMMENT:"Comentario",COMMENT_HELP:"Comentario",BTN_SEND:"Enviar",BTN_ADD_COMMENT:"Añadir un comentario",REST:"Resto de cuenta",REST_TO:"a",WARN_COMMENT_IS_PUBLIC:"Tenga en cuenta que los <b>comentarios son públicos</b> (sin encriptar).",MODAL:{TITLE:"Transferencia"}},ERROR:{UNKNOWN_URI_FORMAT:"Formato URI desconocido",PUBKEY_INVALID_CHECKSUM:"Clave pública no válida (suma de comprobación incorrecta).",POPUP_TITLE:"Error",UNKNOWN_ERROR:"Error desconocido",CRYPTO_UNKNOWN_ERROR:"Su navegador parece incompatible con las funcionalidades de cryptografía.",DOWNLOAD_KEYFILE_FAILED:"Error al generar el archivo de llavero.",EQUALS_TO_PSEUDO:"Debe ser diferente del seudónimo.",EQUALS_TO_SALT:"Debe ser diferente del identificador secreto.",FIELD_REQUIRED:"Campo obligatorio.",FIELD_TOO_SHORT:"Valor demasiado corta.",FIELD_TOO_SHORT_WITH_LENGTH:"Valor demasiado corta ({{minLength}} carácteres mín)",FIELD_TOO_LONG:"Valor demasiado largo",FIELD_TOO_LONG_WITH_LENGTH:"Valor demasiado largo, ({{maxLength}} carácteres máx)",FIELD_MIN:"Valor mínimo: {{min}}",FIELD_MAX:"Valor máximo: {{max}}",FIELD_ACCENT:"Caracteres acentuados y comas no autorizados",FIELD_NOT_NUMBER:"Valor numérico esperado",FIELD_NOT_INT:"Valor entero esperado",FIELD_NOT_EMAIL:"Email no válido",PASSWORD_NOT_CONFIRMED:"No corresponde a la frase secreta.",SALT_NOT_CONFIRMED:"No corresponde al identificador secreto.",SEND_IDENTITY_FAILED:"Error de la inscripción.",SEND_CERTIFICATION_FAILED:"Error de la certificación.",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"No se puede certificar, porque su cuenta no <b>es miembro</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"No se puede certificar, porque su cuenta ya no es miembro.<br/><br/>Todavía faltan certificaciones, o ahora no son validas.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"Cuenta no certificable. No se ha solicitado la adhesión, o no fue renovada.",LOGIN_FAILED:"Error durante la autentificación.",LOAD_IDENTITY_FAILED:"Error de carga de la identidad.",LOAD_REQUIREMENTS_FAILED:"Error de carga de las condiciones de la identidad.",SEND_MEMBERSHIP_IN_FAILED:"Error en el intento de entrada en la comunidad.",SEND_MEMBERSHIP_OUT_FAILED:"Error en la interrupción de adhesión.",REFRESH_WALLET_DATA:"Error en la actualización del monedero.",GET_CURRENCY_PARAMETER:"Error en la recuperación de las reglas de moneda.",GET_CURRENCY_FAILED:"Carga de la moneda imposible. Por favor, intente más tarde.",SEND_TX_FAILED:"Error en la transferencia.",ALL_SOURCES_USED:"Por favor, espera el cálculo del bloque siguiente (Todas sus fuentes de moneda fueron utilizada).",NOT_ENOUGH_SOURCES:"No lo bastante cambio para mandar este importe en una sola transacción.<br/>Importe máximo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Error en la creación de la cuenta miembro.",RESTORE_WALLET_DATA_ERROR:"Error en la recarga de las configuración desde el almacenamiento local",LOAD_WALLET_DATA_ERROR:"Error en la carga de los datos del monedero.",COPY_CLIPBOARD_FAILED:"Copia de la valor imposible.",TAKE_PICTURE_FAILED:"Error en la recuperación de la foto.",SCAN_FAILED:"Error en el escán del Codigo QR",SCAN_UNKNOWN_FORMAT:"Codigo no reconocido.",WOT_LOOKUP_FAILED:"Error en la búsqueda",LOAD_PEER_DATA_FAILED:"Lectura del nodo Duniter imposible. Por favor, intente más tarde.",NEED_LOGIN_FIRST:"Por favor, conéctese en primer lugar.",AMOUNT_REQUIRED:"El importe es obligatorio.",AMOUNT_NEGATIVE:"Importe negativo no autorizado.",NOT_ENOUGH_CREDIT:"Crédito insuficiente.",INVALID_NODE_SUMMARY:"Nodo ilocalizable o dirección inválida.",INVALID_USER_ID:"El seudónimo no debe contener ni espacios ni caracteres especiales o acentuado.",INVALID_COMMENT:"El campo 'referencia’ no debe contener carácteres acentuados.",INVALID_PUBKEY:"La clave pública no tiene el formato esperado.",INVALID_PUBKEY_CHECKSUM:"Suma de comprobación inválida.",IDENTITY_REVOKED:"Esta identidad <b>fue revocada</b>. No puede estar miembro.",IDENTITY_REVOKED_WITH_TIME:"Esta identidad <b>fue revocada {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). No puede estar miembro.",IDENTITY_PENDING_REVOCATION:"La <b>revocación de esta identidad</b> fue solicitado y esta en espera de tratamiento. Por lo que, la certificación es desactivada.",IDENTITY_INVALID_BLOCK_HASH:"Esta solicitud de adhesión no es valida (porque denomina un bloque los nodos de la red han anulado): esta persona debe renovelar su solicitud de adhesión <b>antes que</b> estar certificada.",IDENTITY_EXPIRED:"La publicación de esta identidad ha caducada: esta persona debe realizar una nueva solicitud de adhesión <b>antes que</b> estar certificada.",IDENTITY_SANDBOX_FULL:"EL nodo Duniter utilizado por Cesium ya no puede recibir más nuevas identidades, porque la fila de espera es llena.<br/><br/>Por favor, intenta ulteriormente o cambia de nodo (vía el menú <b>Paramètres</b>).",IDENTITY_NOT_FOUND:"Identidad no encontrada",IDENTITY_TX_FAILED:"Las operaciones de carga fallidos",WOT_PENDING_INVALID_BLOCK_HASH:"Adhesión no validada.",WALLET_INVALID_BLOCK_HASH:"Su solicitud de adhesión ya no está validada (porque denomina un bloque los nodos de la red han anulado).<br/>Debe <a ng-click=\"doQuickFix('fixMembership')\">mandar una nueva solicitud</a> para resolver este problema.",WALLET_IDENTITY_EXPIRED:"La publicación de <b>su identidad ha caducada</b>.<br/>Debe <a ng-click=\"doQuickFix('fixIdentity')\">publicar une outra vez su identidad</a> para resolver este problema.",WALLET_REVOKED:"Su identidad fue <b>revocada</b>: ni su seudónimo ni su llave pública podrán estar utilizados en el futuro por una cuenta miembro.",WALLET_HAS_NO_SELF:"Su identidad debe en primer lugar haber estado publicado, y no estar caducada.",AUTH_REQUIRED:"Autenticación requerida.",AUTH_INVALID_PUBKEY:"La llave pública no se corresponde con la cuenta conectada",AUTH_INVALID_SCRYPT:"De usuario o contraseña no válidos.",AUTH_INVALID_FILE:"archivo de llave no válido.",AUTH_FILE_ERROR:"No se pudo abrir el archivo de llave",IDENTITY_ALREADY_CERTIFY:"Ha <b>ya certificado</b> esta identidad.<br/><br/>Esta certificación todavía es valida (expiration {{expiresIn|formatDurationTo}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"Ha <b>ya certificado</b> esta identidad.<br/><br/>Esta certificación está en espera de tratamiento (fecha límite de tratamiento {{expiresIn|formatDurationTo}}).",UNABLE_TO_CERTIFY_TITLE:"Certificación imposible",LOAD_NEWCOMERS_FAILED:"Error el la carga de los miembros nuevos.",LOAD_PENDING_FAILED:"Error el la carga de las inscripciones en espera.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"Debe <b>estar miembro</b> para poder realizar esta acción.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"Debe haber <b>publicado su identidad</b> para poder realizar esta acción.",GET_BLOCK_FAILED:"Error en la recuperación del bloque",INVALID_BLOCK_HASH:"Bloque no encontrado (hash diferente)",DOWNLOAD_REVOCATION_FAILED:"Debe seleccionar un fichero de texto",REVOCATION_FAILED:"Error en la revocación.",SALT_OR_PASSWORD_NOT_CONFIRMED:"Identificador secreto o contraseña incorrectos",RECOVER_ID_FAILED:"Error en la recuperación de los identificadores",LOAD_FILE_FAILED:"Error en la carga del fichero",NOT_VALID_REVOCATION_FILE:"Archivo de revocación no válido (formato de archivo erróneo)",NOT_VALID_SAVE_ID_FILE:"Archivo no válido (formato de archivo erróneo)",NOT_VALID_KEY_FILE:"Archivo no válido (formato de archivo erróneo)",EXISTING_ACCOUNT:"Su frase secreta corresponde a una cuenta existente, la <a ng-click=\"showHelpModal('pubkey')\">clave pública</a> es:",EXISTING_ACCOUNT_REQUEST:"Por favor, cambie su frase secreta para que coincida con una cuenta sin usar.",GET_LICENSE_FILE_FAILED:"Error al obtener el archivo de licencia",CHECK_NETWORK_CONNECTION:"Ningún nodo parece alcanzable.<br/><br/><b>Compruebe la conexión a Internet</b>.",INVALID_FILE_FORMAT:"Formato de archivo inválido.",SAME_TX_RECIPIENT:"El destinatario debe ser diferente del emisor."},INFO:{POPUP_TITLE:"Información",CERTIFICATION_DONE:"Certificación enviada",NOT_ENOUGH_CREDIT:"Crédito insuficiente",TRANSFER_SENT:"Transferencia enviada",COPY_TO_CLIPBOARD_DONE:"Copia realizada",MEMBERSHIP_OUT_SENT:"Anulación enviada",NOT_NEED_MEMBERSHIP:"Ya es miembro.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"Esta identidad pronto va a necesitar certificaciones (al menos {{willNeedCertificationCount}}).",IDENTITY_NEED_MEMBERSHIP:"Esta identidad no envió una solicitud de membresía. Ella tendrá que hacerlo si desea hacerse miembro.",HAS_ALTERNATIVE_IDENTITIES:"Hay <b>identidades múltiples</b> adjuntas a esta clave pública. <b>Antes de cualquier certificación</b>, <a ng-click=\"doQuickFix('showSelectIdentities')\">verifique otras identidades</a> para elegir la correcta o comuníquese con el propietario de la cuenta.",REVOCATION_SENT:"Revocación enviada",REVOCATION_SENT_WAITING_PROCESS:"La <b>revocación de esta identidad</b> fue solicitada y está en espera de ser procesada.",FEATURES_NOT_IMPLEMENTED:"Esta funcionalidad todavía está en proceso de desarrollo.<br/><br/>¿Por qué no <b>contribuir a Cesium</b>, para obtenerla más rápido? ;)",EMPTY_TX_HISTORY:"Ninguna operación a exportar"},CONFIRM:{POPUP_TITLE:"<b>Confirmación</b>",POPUP_WARNING_TITLE:"<b>Advertencia</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Advertencia de seguridad</b>',CERTIFY_RULES_TITLE_UID:"Certificar {{uid}}",CERTIFY_RULES:'<b class="assertive">NO CERTIFICAR</b> una cuenta si piense que :<br/><br/><ul><li>1.) no corresponde a una persona <b>física y viviente</b>.<li>2.) su propietario <b>posee una otra cuenta</b> ya certificada.<li>3.) su propietario viola (voluntariamente o no) la regla 1 o 2 (por ejemplo certificando cuentas falsas o duplicadas).</ul><br/><b>¿Está usted seguro</b> sin embargo querer certificar esta identidad?',TRANSFER:"<b>Recapitulativo de la transferencia</b>:<br/><br/><ul><li> - De: {{from}}</li><li> - A: <b>{{to}}</b></li><li> - Importe: <b>{{amount}} {{unit}}</b></li><li> - Comentario: <i>{{comment}}</i></li></ul><br/><b>¿Está usted seguro de querer realizar esta transferencia?</b>",TRANSFER_ALL:"<b>Recapitulativo de la transferencia</b>:<br/><br/><ul><li> - De: {{from}}</li><li> - A: <b>{{to}}</b></li><li> - Importe: <b>{{amount}} {{unit}}</b></li><li> - Comentario: <i>{{comment}}</i></li><br/><li> - Resto: <b>{{restAmount}} {{unit}}</b> para <b>{{restTo}}</b></li></ul><br/><b>¿Está usted seguro de querer realizar esta transferencia?</b>",MEMBERSHIP_OUT:"Esta operación es <b>irreversible</b>.<br/></br/>¿Está usted seguro querer <b>anular su cuenta miembro</b>?",MEMBERSHIP_OUT_2:"¡Esta operación es <b>irreversible</b>!<br/><br/>¿Está usted seguro querer <b>anular su adhesión</b> como miembro?",LOGIN_UNUSED_WALLET_TITLE:"¿Error de introducción de datos?",LOGIN_UNUSED_WALLET:"Está usted conectado a une cuenta que parece <b>inactiva</b>.<br/><br/>Si esta cuenta no corresponde a la suya, se trata probablemente de un <b>error al introducir los datos</b> de sus identificadores de conexión.<br/></br/><b>¿Quiere usted sin embargo continuar con esta cuenta?</b>",FIX_IDENTITY:"El seudónimo <b>{{uid}}</b> va a ser publicado de nuevo, en reemplazo del antiguo que caducó.<br/></br/><b>¿Está usted seguro</b> de querer continuar?",FIX_MEMBERSHIP:"Su solicitud de adhesión como miembro va a ser enviada de nuevo.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",MEMBERSHIP:"Se enviará su solicitud de membresía como miembro.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",RENEW_MEMBERSHIP:"Su adhesión como miembro va a estar renovada.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",REVOKE_IDENTITY:"Va a <b>revocar definitivamente esta identidad</b>.<br/><br/>La llave pública y el seudónimo asociados <b>jamás podrán ser utilizados</b> (para una cuenta miembro). <br/></br/><b>¿Está usted seguro</b> de querer revocar definitivamente esta cuenta?",REVOKE_IDENTITY_2:"¡Esta operación es <b>irreversible</b>!<br/><br/>¿Está usted seguro de querer <b>revocar definitivamente</b> esta cuenta?",NOT_NEED_RENEW_MEMBERSHIP:"Su adhesión no necesita ser renovada (solo va a caducar en {{membershipExpiresIn|formatDuration}}).<br/></br/><b>¿Está usted segura(o)</b> de querer renovar su adhesión?",SAVE_BEFORE_LEAVE:"¿Quiere usted <b>guardar sus cambios</b> antes dejar la página?",SAVE_BEFORE_LEAVE_TITLE:"Cambios no registrados",LOGOUT:"¿Está usted segura(o) de querer desconectarse?",USE_FALLBACK_NODE:"Nodo <b>{{edad}}</ b> inalcanzable o no válido.<br/><br/>¿Desea utilizar temporalmente el nodo <b>{{nuevo}}</b>?"},DOWNLOAD:{POPUP_TITLE:"<b>Revocación del archivo</b>",POPUP_REVOKE_MESSAGE:"Para proteger su cuenta, descargar el <b>documento de revocación de cuenta</b>. Si se necesita cancelar su cuenta (en caso de robo, cambio de identificador, una cuenta falsa creada, etc.).<br/><br/><b>Por favor, almacénelo en un lugar seguro.</b>"},HELP:{TITLE:"Ayuda en línea",JOIN:{SECTION:"Inscripción",SALT:'El identificador secreto es muy importante. Sirve para mezclar la frase secreta, antes de calcular la <span class="text-italic">llave pública</span> de su cuenta (su número) y la llave secreta para acceder a esta.<br/><b>Por favor, memorícelo muy bien</b> porque actualmente no existe ninguna manera para encontrarlo en caso de pérdida.<br/>Por otra parte, no puede ser modificado sin tener que crear una nueva cuenta.<br/><br/>Un buen identificador secreto debe ser suficientemente largo (al menos 8 carácteres) y lo más original posible.',PASSWORD:"La frase secreta es muy importante. Junto al identificador secreto, sirve a calcular el número (la llave pública) de su cuenta, y la llave secreta para acceder a ella.<br/><b>Por favor, memorícela muy bien</b> porque actualmente no existe ninguna manera para encontrarla en caso de pérdida (excepto el generar un fichero de respaldo).<br/>Por otra parte, no puede ser modificado sin deber creer una nueva cuenta.<br/><br/>Una buena frase secreta contiene (idealmente) al menos 8 carácteres, del que al menos una mayúscula y un número.",PSEUDO:'El seudónimo es solamente utilizado en caso de inscripción como <span class="text-italic">miembro</span>. Siempre es asociado a un monedero (vía su <span class="text-italic">llave pública</span>).<br/>El seudónimo se publica en la red para que los otros usuarios puedan identificarlo, certificarlo o enviar dinero a la cuenta.<br/>Un seudónimo debe ser único dentro de los miembros (<u>actuales</u> y antiguos).'},GLOSSARY:{SECTION:"Glosario",PUBKEY_DEF:"Una llave pública identifica un monedero. Puede identificar un miembro. En Cesium se calcula con el identificador y la frase secreta.",MEMBER:"Miembro",MEMBER_DEF:'Un miembro es una persona humana física y viviente, deseosa de participar libremente a la comunidad monetaria. Percibe un dividendo universal, dependiendo de un período y un importe definido en las <span class="text-italic">reglas de la moneda</span>',CURRENCY_RULES:"Reglas de la moneda",CURRENCY_RULES_DEF:'Las reglas de la moneda son definidas una sola vez por todas. Establecen el funcionamiento de la moneda: el cálculo del dividendo universal, la cantidad de certificaciones necesarias para ser miembro, la cantidad máxima de certificaciones que un miembro puede emitir, etc. <a href="#/app/currency">Ver las reglas actuales</a>.<br/> Una <span class="text-italic">BlockChain</span> que soporta y ejecuta estas reglas, y verifica continuamente su buena aplicación, hace posible que ellas no se modifiquen en el tiempo.',BLOCKCHAIN:'Cadena de bloques (<span class="text-italic">Blockchain</span>)',BLOCKCHAIN_DEF:'La BlockChain es un sistema descentralizado, que, para el caso de Duniter, sirve a mantener y ejecutar las <span class="text-italic">reglas de la moneda</span>.<br/><a href="http://duniter.org" target="_system">Saber más a proposito de Duniter</a> y el funcionamiento de su blockchain.',UNIVERSAL_DIVIDEND_DEF:'El Dividendo Universal (DU) es la cantidad de moneda co-creada por cada miembro, dependiendo del periodo y del cálculo definidos en las <span class="text-italic">reglas de la moneda</span>.<br/>En cada periodo, los miembros reciben en sus cuentas la misma cantidad de dinero.<br/><br/>El DU crece regularmente, para ser justo entre los miembros (actuales y futuros), calculado en función de la esperanza de vida media, como demostrado en la Théorie Relative de la Monnaie (TRM) = Teoría Relativa de la Moneda, aún no está traducida en español, contáctenos para contribuir a su traducción.<br/><a href="http://trm.creationmonetaire.info">Saber más a propósito de la TRM</a> y las monedas libres.'},TIP:{MENU_BTN_CURRENCY:"El menú <b>{{'MENU.CURRENCY'|translate}}</b> permite consultar las <b>reglas de la moneda</b> y su estado.",CURRENCY_WOT:"El <b>número de miembros</b> demuestra la importancia de la comunidad y permite <b>seguir su evolución</b>.",CURRENCY_MASS:"Siga aquí la <b>cantidad total de moneda</b> existente y su <b>distribución media</b> por miembro.<br/><br/>Esto permite juzgar la <b>importancia de un importe</b>, en relación con lo que <b>poseen los otros</b> en sus cuentas (como media).",CURRENCY_UNIT_RELATIVE:"La unidad utilizada (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa que los importes en {{currency|capitalize}} han sido divididos entre el valor del <b>Dividendo Universal</b> (DU).<br/><br/><small> Esta unidad relativa es <b>pertinente</b>, porque permanece estable, independiente de la cantidad de moneda que aumenta constantemente.</small>",CURRENCY_CHANGE_UNIT:"Este botón permite <b>cambiar la unidad</b>, para visualizar los importes <b>directamente en {{currency|capitalize}}</b> (en lugar de &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"Este botón permite <b>cambiar la unidad</b>, para visualizar los importes en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, es decir, relativo al Dividendo Universal (el monto co-producido por cada miembro).",CURRENCY_RULES:"Las <b>reglas</b> de la moneda fijan su funcionamiento <b>exacto y previsible</b>.<br/><br/>Es el propio ADN de la moneda, que hace que su código monetario sea <b>legible y transparente</b>.",MENU_BTN_NETWORK:"El menú <b>{{'MENU.NETWORK'|translate}}</b> permite consultar el estado de la red.",NETWORK_BLOCKCHAIN:"Todas las operaciones de la moneda están registradas dentro de un grand libro de cuenta <b>público e infalsificable</b>, también llamado <b>cadena de bloques</b> (<em>BlockChain</em> en inglés).",NETWORK_PEERS:"Los <b>nodos</b> visibles aquí corresponden a los <b>ordenadores que actualizan y controlan</b> la cadena de bloques.<br/><br/>Entre más nodos estén conectados, la moneda tendrá una gestión más <b>descentralizada</b> y digna de confianza.",NETWORK_PEERS_BLOCK_NUMBER:"Este <b>número</b> (en verde) indica el <b>último bloque validado</b> por este nodo (última pagina escrita dentro del grand libro de cuentas).<br/><br/>El color verde indica que este bloque ha sido también validado por <b>la mayoría de los otros nodos</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Cada miembro</b>, equipado de un ordenador conectador a Internet, <b>puede participar añadiendo un nodo</b>.  Necesita <b>instalar el programa Duniter</b> (libre y gratis). <a href="{{installDocUrl}}" target="_system">Ver el manual de uso &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"El menú <b>{{'ACCOUNT.TITLE'|translate}}</b> permite acceder a la gestión de su cuenta.",MENU_BTN_ACCOUNT_MEMBER:"Consulte aquí el estado de su cuenta y la información sobre sus certificaciones.",WALLET_CERTIFICATIONS:"Haga clic aquí para consultar el detalle de sus certificaciones (recibidas y emitidas).",WALLET_RECEIVED_CERTIFICATIONS:"Haga clic aquí para consultar el detalle de sus <b>certificaciones recibidas</b>.",WALLET_GIVEN_CERTIFICATIONS:"Haga clic aquí para consultar el detalle de sus <b>certificaciones emitidas</b>.",WALLET_BALANCE:"El <b>saldo</b> de su cuenta se visualiza aquí.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>La unidad utilizada (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa que el importe en {{currency|capitalize}} fue dividido entre el <b>Dividendo Universal</b> (DU) co-producido por cada miembro.<br/><br/>Actualmente un DU vale {{currentUD|formatInteger}} {{currency|capitalize}}s.",WALLET_BALANCE_CHANGE_UNIT:"Podrá <b>cambiar la unidad</b> de visualización de los importes en los <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Por ejemplo, para visualizar los importes <b>directamente en {{currency|capitalize}}</b>, en lugar de unidad relativa.",WALLET_PUBKEY:"Esta es la llave pública de su cuenta. Puede comunicarla a un tercero para que pueda identificar su cuenta de forma simple.",WALLET_SEND:"Realizar un pago en algunos clics",WALLET_SEND_NO_MONEY:"Realizar un pago en algunos clics.<br/>(Su saldo ya no lo permite)",WALLET_OPTIONS:"Este botón permite acceder a las <b>acciones de adhesión</b> y de seguridad.<br/><br/>¡No olvide echar un vistazo!",WALLET_RECEIVED_CERTS:"Se exhibirá aquí la lista de las personas que le han certificado.",WALLET_CERTIFY:"El botón <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permite seleccionar una identidad y certificarla.<br/><br/>Sólo usuarios <b>miembros</b> pueden certificar a otros.",WALLET_CERT_STOCK:"Su stock de certificaciones (emitidas) es limitado a <b>{{sigStock}} certificaciones</b>.<br/><br/>Este stock se renueva con el tiempo, a medida que las certificaciones caducan.",MENU_BTN_TX:"El menú <b>{{'MENU.TRANSACTIONS'|translate}}</b> permite consultar su saldo, el historial de sus transacciones y mandar un pago.",MENU_BTN_WOT:"El menú <b>{{'MENU.WOT'|translate}}</b> permite buscar <b>usuarios</b> de la moneda (miembro o no).",WOT_SEARCH_TEXT_XS:"Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública).<br/><br/>La búsqueda se iniciará automáticamente.",WOT_SEARCH_TEXT:"Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública). <br/><br/>Luego, pulsa en la tecla <b>Entrada</b> para iniciar la búsqueda.",WOT_SEARCH_RESULT:"Visualiza la ficha detallada simplemente <b>haciendo un clic</b> sobre una línea.",WOT_VIEW_CERTIFICATIONS:"La línea <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> muestra cuántos miembros han validado esta identidad.<br/><br/>Estas certificaciones atestiguan que la cuenta pertenece a <b>una persona humana viviente</b> y que no tenga <b>ninguna otra cuenta miembro</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"Necesita al menos <b>{{sigQty}} certificaciones</b> para ser miembro y recibir el <b>Dividendo Universal</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Un clic aquí permite abrir <b>la lista de todas las certificaciones</b> de la identidad (recibidas y emitidas).",WOT_VIEW_CERTIFY:"El botón <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permite añadir su certificación a esta identidad.",CERTIFY_RULES:"<b>Atención:</b> Certificar solamente <b>personas físicas vivas</b>, que no posean ninguna otra cuenta miembro.<br/><br/>¡La seguridad de la moneda depende de la vigilancia de cada uno!",MENU_BTN_SETTINGS:"Los <b>{{'MENU.SETTINGS'|translate}}</b> le permitirán configurar la aplicación.",HEADER_BAR_BTN_PROFILE:"Haga un clic aquí para acceder a su <b>perfil de usuario</b>",SETTINGS_CHANGE_UNIT:"Podrá <b>cambiar la unidad de visualización</b> de los importes haciendo un clic más arriba.<br/><br/>- Desactive la opción para visualizar los importes en {{currency|capitalize}}.<br/>- Active la opción para visualizar los importes relativos al {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (todos los importes serán <b>dividido</b> entre el Dividendo Universal actual).",END_LOGIN:"¡La visita guiada ha <b>terminado</b>!<br/><br/>¡Buena suerte en este nuevo mundo de la <b>economía libre</b> !",END_NOT_LOGIN:"¡La visita guiada ha <b>terminado</b>!<br/><br/>Si quiere utilizar la moneda {{currency|capitalize}}, tiene que hacer un clic en <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> más abajo."}}}),e.translations("fr-FR",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"date : {{build}}",PUBKEY:"Clé publique",MEMBER:"Membre",BLOCK:"Bloc",BTN_OK:"OK",BTN_YES:"Oui",BTN_NO:"Non",BTN_SEND:"Envoyer",BTN_SEND_MONEY:"Faire un virement",BTN_SEND_MONEY_SHORT:"Virement",BTN_SAVE:"Enregistrer",BTN_YES_SAVE:"Oui, Enregistrer",BTN_YES_CONTINUE:"Oui, Continuer",BTN_SHOW:"Voir",BTN_SHOW_PUBKEY:"Afficher la clé publique",BTN_RELATIVE_UNIT:"Afficher les montants en DU ?",BTN_BACK:"Retour",BTN_NEXT:"Suivant",BTN_IMPORT:"Importer",BTN_CANCEL:"Annuler",BTN_CLOSE:"Fermer",BTN_LATER:"Plus tard",BTN_LOGIN:"Se connecter",BTN_LOGOUT:"Déconnexion",BTN_ADD_ACCOUNT:"Nouveau compte",BTN_SHARE:"Partager",BTN_EDIT:"Modifier",BTN_DELETE:"Supprimer",BTN_ADD:"Ajouter",BTN_SEARCH:"Rechercher",BTN_REFRESH:"Actualiser",BTN_RETRY:"Recommencer",BTN_START:"Commencer",BTN_CONTINUE:"Continuer",BTN_CREATE:"Créer",BTN_UNDERSTOOD:"J'ai compris",BTN_OPTIONS:"Options",BTN_HELP_TOUR:"Visite guidée",BTN_HELP_TOUR_SCREEN:"Découvrir cet écran",BTN_DOWNLOAD:"Télécharger",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Télécharger le relevé du compte",BTN_MODIFY:"Modifier",CHOOSE_FILE:"Déposez votre fichier <br/>ou cliquez pour le sélectionner",DAYS:"jours",NO_ACCOUNT_QUESTION:"Pas encore de compte ? Créez-en un gratuitement !",SEARCH_NO_RESULT:"Aucun résultat trouvé",LOADING:"Veuillez patienter...",LOADING_WAIT:"Veuillez patienter...<br/><small>(Cesium interroge le nœud Duniter)</small>",SEARCHING:"Recherche en cours...",FROM:"De",TO:"À",COPY:"Copier",LANGUAGE:"Langue",UNIVERSAL_DIVIDEND:"Dividende universel",UD:"DU",DATE_PATTERN:"DD/MM/YY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD/MM/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(vide)",UID:"Pseudonyme",ENABLE:"Activé",DISABLE:"Désactivé",RESULTS_LIST:"Résultats",RESULTS_COUNT:"{{count}} résultats",EXECUTION_TIME:"exécuté en {{duration|formatDurationMs}}",SHOW_VALUES:"Afficher les valeurs en clair ?",POPOVER_ACTIONS_TITLE:"Options",POPOVER_FILTER_TITLE:"Filtres",SHOW_MORE:"Afficher plus",SHOW_MORE_COUNT:"(limite actuelle à {{limit}})",POPOVER_SHARE:{TITLE:"Partager",SHARE_ON_TWITTER:"Partager sur Twitter",SHARE_ON_FACEBOOK:"Partager sur Facebook",SHARE_ON_DIASPORA:"Partager sur Diaspora*",SHARE_ON_GOOGLEPLUS:"Partager sur Google+"},FILE:{DATE:"Date :",TYPE:"Type :",SIZE:"Taille :",VALIDATING:"Validation en cours..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Choisir la source :",BTN_PICTURE_GALLERY:"Galerie",BTN_PICTURE_CAMERA:"<b>Caméra</b>"},MENU:{HOME:"Accueil",WOT:"Annuaire",CURRENCY:"Monnaie",ACCOUNT:"Mon compte",WALLETS:"Mes portefeuilles",SETTINGS:"Paramètres",NETWORK:"Réseau",TRANSACTIONS:"Mes opérations"},ABOUT:{TITLE:"À propos",LICENSE:"Application <b>libre</b> (Licence GNU AGPLv3).",LATEST_RELEASE:"Il existe une <b>version plus récente</b> de {{'COMMON.APP_NAME'|translate}} (<b>v{{version}}</b>)",PLEASE_UPDATE:"Veuillez mettre à jour {{'COMMON.APP_NAME'|translate}} (dernière version : <b>v{{version}}</b>)",CODE:"Code source :",OFFICIAL_WEB_SITE:"Site web officiel :",DEVELOPERS:"Développé par :",FORUM:"Forum :",PLEASE_REPORT_ISSUE:"N'hésitez pas à nous remonter les anomalies rencontrées",REPORT_ISSUE:"Remonter un problème",BTN_OPEN_DEV_WINDOW:"Ouvrir la fenêtre de debuggage"},HOME:{TITLE:"Cesium",WELCOME:"Bienvenue dans l'application Cesium !",MESSAGE:"Recevez et envoyez de la monnaie libre {{currency|abbreviate}}",BTN_CURRENCY:"Explorer la monnaie {{name|abbreviate}}",BTN_ABOUT:"à propos",BTN_HELP:"Aide en ligne",REPORT_ISSUE:"anomalie",NOT_YOUR_ACCOUNT_QUESTION:'Vous n\'êtes pas propriétaire du compte <b class="ion-key"> {{pubkey|formatPubkey}}</b>&nbsp;?',BTN_CHANGE_ACCOUNT:"Déconnecter ce compte",CONNECTION_ERROR:'Nœud <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Vérifiez votre connexion Internet, ou changer de nœud <a class="positive" ng-click="doQuickFix(\'settings\')">dans les paramètres</a>.',SHOW_ALL_FEED:"Voir tout",READ_MORE:"Lire la suite",FEED_SOURCE:"Source"},SETTINGS:{TITLE:"Paramètres",DISPLAY_DIVIDER:"Affichage",STORAGE_DIVIDER:"Stockage",NETWORK_SETTINGS:"Réseau",PEER:"Nœud Duniter",PEER_SHORT:"Nœud Duniter",PEER_CHANGED_TEMPORARY:"Adresse utilisée temporairement",PERSIST_CACHE:"Conserver les données de navigation (expérimental)",PERSIST_CACHE_HELP:"Permet une navigation plus rapide, en conservant localement les données reçues, pour les utiliser d'une session à l'autre.",USE_LOCAL_STORAGE:"Activer le stockage local",USE_LOCAL_STORAGE_HELP:"Permet de sauvegarder vos paramètres",WALLETS_SETTINGS:"Mes portefeuilles",USE_WALLETS_ENCRYPTION:"Sécuriser la liste ?",USE_WALLETS_ENCRYPTION_HELP:"Permet de sécuriser la liste de vos portefeuilles (par chiffrement), en exigeant une authentification pour y accéder.",ENABLE_HELPTIP:"Activer les bulles d'aide contextuelles",DISABLE_HELPTIP:"Désactiver les bulles d'aide contextuelles",ENABLE_UI_EFFECTS:"Activer les effets visuels",HISTORY_SETTINGS:"Mes opérations",DISPLAY_UD_HISTORY:"Afficher les dividendes produits ?",TX_HISTORY_AUTO_REFRESH:"Rafraîchir automatiquement",TX_HISTORY_AUTO_REFRESH_HELP:"Rafraîchit le solde et les opérations automatiquement, à chaque nouveau bloc du réseau.",AUTHENTICATION_SETTINGS:"Authentification",KEEP_AUTH:"Désauthentification automatique",KEEP_AUTH_SHORT:"Désauthentification",KEEP_AUTH_HELP:"Définit le moment où l'authentification est nettoyée de la mémoire.",KEEP_AUTH_OPTION:{NEVER:"Après chaque opération",SECONDS:"Après {{value}}s d'inactivité",MINUTE:"Après {{value}}min d'inactivité",MINUTES:"Après {{value}}min d'inactivité",HOUR:"Après {{value}}h d'inactivité",ALWAYS:"A la fin de la session"},KEYRING_FILE:"Fichier de trousseau",KEYRING_FILE_HELP:'Permet de vous <b>connecter</b> automatiquement à chaque lancement<br/>et même de vous <b>authentifier</b> (seulement si "Expiration de l\'authentification" est configurée "à la fin de la session").',REMEMBER_ME:"Se souvenir de moi ?",REMEMBER_ME_HELP:"Permet de rester identifié d'une session à l'autre, en conservant localement la clé publique.",PLUGINS_SETTINGS:"Extensions",BTN_RESET:"Restaurer les valeurs par défaut",EXPERT_MODE:"Activer le mode expert",EXPERT_MODE_HELP:"Permet un affichage plus détaillé.",BLOCK_VALIDITY_WINDOW:"Délai d'incertitude des blocs",BLOCK_VALIDITY_WINDOW_SHORT:"Délai d'incertitude",BLOCK_VALIDITY_WINDOW_HELP:"Délai avant de considérer qu'une information est validée",BLOCK_VALIDITY_OPTION:{NONE:"Aucun délai",N:"{{time | formatDuration}} ({{count}} blocs)"},POPUP_PEER:{TITLE:"Nœud Duniter",HOST:"Adresse",HOST_HELP:"Adresse : serveur:port",USE_SSL:"Sécurisé ?",USE_SSL_HELP:"(Chiffrement SSL)",BTN_SHOW_LIST:"Liste des noeuds"}},BLOCKCHAIN:{HASH:"Hash : {{hash}}",VIEW:{HEADER_TITLE:"Bloc #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Bloc courant",TITLE:"Bloc #{{number|formatInteger}}",COMPUTED_BY:"Calculé par le noeud de",SHOW_RAW:"Voir le fichier brut",TECHNICAL_DIVIDER:"Informations techniques",VERSION:"Version du format",HASH:"Hash calculé",UNIVERSAL_DIVIDEND_HELP:"Monnaie co-produite par chacun des {{membersCount}} membres",EMPTY:"Aucune donnée dans ce bloc",POW_MIN:"Difficulté minimale",POW_MIN_HELP:"Difficulté imposée pour le calcul du hash",DATA_DIVIDER:"Données",IDENTITIES_COUNT:"Nouvelles identités",JOINERS_COUNT:"Nouveaux membres",ACTIVES_COUNT:"Renouvellements",ACTIVES_COUNT_HELP:"Membres ayant renouvelé leur adhésion",LEAVERS_COUNT:"Membres sortants",LEAVERS_COUNT_HELP:"Membres ne souhaitant plus de certification",EXCLUDED_COUNT:"Membres exclus",EXCLUDED_COUNT_HELP:"Anciens membres exclus par non renouvellement ou manque de certifications",REVOKED_COUNT:"Identités révoquées",REVOKED_COUNT_HELP:"Ces comptes ne pourront plus être membres",TX_COUNT:"Transactions",CERT_COUNT:"Certifications",TX_TO_HIMSELF:"Opération de change",TX_OUTPUT_UNLOCK_CONDITIONS:"Conditions de déblocage",TX_OUTPUT_OPERATOR:{AND:"et",OR:"ou"},TX_OUTPUT_FUNCTION:{SIG:"<b>Signature</b> de ",XHX:"<b>Mot de passe</b>, dont SHA256 =",CSV:"Bloqué pendant",CLTV:"Bloqué jusqu'à"}},LOOKUP:{TITLE:"Blocs",NO_BLOCK:"Aucun bloc",LAST_BLOCKS:"Derniers blocs :",BTN_COMPACT:"Compacter"}},CURRENCY:{VIEW:{TITLE:"Monnaie",TAB_CURRENCY:"Monnaie",TAB_WOT:"Toile de confiance",TAB_NETWORK:"Réseau",TAB_BLOCKS:"Blocs",CURRENCY_SHORT_DESCRIPTION:"{{currency|abbreviate}} est une <b>monnaie libre</b>, démarrée {{firstBlockTime|formatFromNow}}. Elle compte actuellement <b>{{N}} membres</b>, qui produisent et perçoivent un <a ng-click=\"showHelpModal('ud')\">Dividende Universel</a> (DU), chaque {{dt|formatPeriod}}.",NETWORK_RULES_DIVIDER:"Règles du réseau",CURRENCY_NAME:"Nom de la monnaie",MEMBERS:"Nombre de membres",MEMBERS_VARIATION:"Variation depuis le dernier DU",MONEY_DIVIDER:"Monnaie",MASS:"Masse monétaire",SHARE:"Masse par membre",UD:"Dividende universel",C_ACTUAL:"Croissance actuelle",MEDIAN_TIME:"Heure de la blockchain",POW_MIN:"Niveau minimal de difficulté de calcul",MONEY_RULES_DIVIDER:"Règles de la monnaie",C_RULE:"Croissance théorique cible",UD_RULE:"Calcul du dividende universel",DT_REEVAL:"Période de revalorisation du DU",REEVAL_SYMBOL:"reval",DT_REEVAL_VALUE:"Tous les <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Date de la 1ère revalorisation",SIG_QTY_RULE:"Nombre de certifications requises pour devenir membre",SIG_STOCK:"Nombre maximal de certifications émises par membre",SIG_PERIOD:"Délai minimal d'attente entre 2 certifications successives émises par une même personne",SIG_WINDOW:"Délai limite de prise en compte d'une certification",SIG_VALIDITY:"Durée de vie d'une certification qui a été prise en compte",MS_WINDOW:"Délai limite de prise en compte d'une demande d'adhésion comme membre",MS_VALIDITY:"Durée de vie d'une adhésion qui a été prise en compte",STEP_MAX:"Distance maximale, par les certifications, entre un nouvel entrant et les membres référents",WOT_RULES_DIVIDER:"Règles de la toile de confiance",SENTRIES:"Nombre de certifications (émises <b>et</b> reçues) pour devenir membre référent",SENTRIES_FORMULA:"Nombre de certifications (émises <b>et</b> reçues) pour devenir membre référent (formule)",XPERCENT:"Pourcentage minimum de membres référents à atteindre pour respecter la règle de distance",AVG_GEN_TIME:"Temps moyen entre deux blocs",CURRENT:"actuel",MATH_CEILING:"PLAFOND",DISPLAY_ALL_RULES:"Afficher toutes les règles ?",BTN_SHOW_LICENSE:"Voir la licence",WOT_DIVIDER:"Toile de confiance"},LICENSE:{TITLE:"Licence de la monnaie",BTN_DOWNLOAD:"Télécharger le fichier",NO_LICENSE_FILE:"Fichier de licence non trouvé."}},NETWORK:{VIEW:{MEDIAN_TIME:"Heure de la blockchain",LOADING_PEERS:"Chargement des noeuds...",NODE_ADDRESS:"Adresse :",SOFTWARE:"Logiciel",WARN_PRE_RELEASE:"Pré-version (dernière version stable : <b>{{version}}</b>)",WARN_NEW_RELEASE:"Version <b>{{version}}</b> disponible",WS2PID:"Identifiant :",PRIVATE_ACCESS:"Accès privé",POW_PREFIX:"Préfixe de preuve de travail :",ENDPOINTS:{BMAS:"Interface sécurisée (SSL)",BMATOR:"Interface réseau TOR",WS2P:"Interface WS2P",ES_USER_API:"Noeud de données Cesium+"}},INFO:{ONLY_SSL_PEERS:"Les noeuds non SSL ont un affichage dégradé, car Cesium fonctionne en mode HTTPS."}},PEER:{PEERS:"Nœuds",SIGNED_ON_BLOCK:"Signé sur le bloc",MIRROR:"miroir",MIRRORS:"Miroirs",MIRROR_PEERS:"Nœuds miroirs",PEER_LIST:"Liste des nœuds",MEMBERS:"Membres",MEMBER_PEERS:"Nœuds membres",ALL_PEERS:"Tous les nœuds",DIFFICULTY:"Difficulté",API:"API",CURRENT_BLOCK:"Bloc #",POPOVER_FILTER_TITLE:"Filtre",OFFLINE:"Hors ligne",OFFLINE_PEERS:"Nœuds hors ligne",BTN_SHOW_PEER:"Voir le nœud",VIEW:{TITLE:"Nœud",OWNER:"Appartient à",SHOW_RAW_PEERING:"Voir la fiche de pair",SHOW_RAW_CURRENT_BLOCK:"Voir le dernier bloc (format brut)",LAST_BLOCKS:"Derniers blocs connus",KNOWN_PEERS:"Nœuds connus :",GENERAL_DIVIDER:"Informations générales",ERROR:{LOADING_TOR_NODE_ERROR:"Récupération des informations du noeud impossible. Le délai d'attente est dépassé.",LOADING_NODE_ERROR:"Récupération des informations du noeud impossible"}}},WOT:{SEARCH_HELP:"Recherche (pseudo ou clé publique)",SEARCH_INIT_PHASE_WARNING:"Durant la phase de pré-inscription, la recherche des inscriptions en attente <b>peut être longue</b>. Merci de patienter...",REGISTERED_SINCE:"Inscrit le",REGISTERED_SINCE_BLOCK:"Inscrit au bloc #",NO_CERTIFICATION:"Aucune certification validée",NO_GIVEN_CERTIFICATION:"Aucune certification émise",NOT_MEMBER_PARENTHESIS:"(non membre)",IDENTITY_REVOKED_PARENTHESIS:"(identité révoquée)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(en cours de révocation)",EXPIRE_IN:"Expiration",NOT_WRITTEN_EXPIRE_IN:"Date limite<br/>de traitement",EXPIRED:"Expiré",PSEUDO:"Pseudonyme",SIGNED_ON_BLOCK:"Emise au bloc #{{block}}",WRITTEN_ON_BLOCK:"Ecrite au bloc #{{block}}",GENERAL_DIVIDER:"Informations générales",NOT_MEMBER_ACCOUNT:"Compte simple (non membre)",NOT_MEMBER_ACCOUNT_HELP:"Il s'agit d'un simple portefeuille, sans demande d'adhésion en attente.",TECHNICAL_DIVIDER:"Informations techniques",BTN_CERTIFY:"Certifier",BTN_YES_CERTIFY:"Oui, certifier",BTN_SELECT_AND_CERTIFY:"Nouvelle certification",ACCOUNT_OPERATIONS:"Opérations sur le compte",VIEW:{POPOVER_SHARE_TITLE:"Identité {{title}}"},LOOKUP:{TITLE:"Toile de confiance",NEWCOMERS:"Nouveaux membres",NEWCOMERS_COUNT:"{{count}} membres",PENDING:"Inscriptions en attente",PENDING_COUNT:"{{count}} inscriptions en attente",REGISTERED:"Inscrit {{sigDate | formatFromNow}}",MEMBER_FROM:"Membre depuis {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Nouveaux membres",BTN_PENDING:"Inscriptions en attente",SHOW_MORE:"Afficher plus",SHOW_MORE_COUNT:"(limite actuelle à {{limit}})",NO_PENDING:"Aucune inscription en attente.",NO_NEWCOMERS:"Aucun membre."},CONTACTS:{TITLE:"Contacts"},MODAL:{TITLE:"Recherche"},CERTIFICATIONS:{TITLE:"{{uid}} - Certifications",SUMMARY:"Certifications reçues",LIST:"Détail des certifications reçues",PENDING_LIST:"Certifications en attente de traitement",RECEIVED:"Certifications reçues",RECEIVED_BY:"Certifications reçues par {{uid}}",ERROR:"Certifications reçues en erreur",SENTRY_MEMBER:"Membre référent"},OPERATIONS:{TITLE:"{{uid}} - Opérations"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Certifications émises",SUMMARY:"Certifications émises",LIST:"Détail des certifications émises",PENDING_LIST:"Certifications en attente de traitement",SENT:"Certifications émises",SENT_BY:"Certifications émises par {{uid}}",ERROR:"Certifications émises en erreur"}},LOGIN:{TITLE:'<i class="icon ion-log-in"></i> Connexion',SCRYPT_FORM_HELP:"Veuillez saisir vos identifiants.<br>Pensez à vérifier que la clé publique est celle de votre compte.",PUBKEY_FORM_HELP:"Veuillez saisir une clé publique de compte :",FILE_FORM_HELP:"Choisissez le fichier de trousseau à utiliser :",SCAN_FORM_HELP:"Scanner le QR code d'un portefeuille.",SALT:"Identifiant secret",SALT_HELP:"Identifiant secret",SHOW_SALT:"Afficher l'identifiant secret ?",PASSWORD:"Mot de passe",PASSWORD_HELP:"Mot de passe",PUBKEY_HELP:"Clé publique ou pseudonyme",NO_ACCOUNT_QUESTION:"Vous n'avez pas encore de compte ?",HAVE_ACCOUNT_QUESTION:"Vous avez déjà un compte ?",CREATE_ACCOUNT:"Créer un compte...",CREATE_FREE_ACCOUNT:"Créer un compte gratuitement",FORGOTTEN_ID:"Mot de passe oublié ?",ASSOCIATED_PUBKEY:"Clé publique du trousseau :",BTN_METHODS:"Autres méthodes",BTN_METHODS_DOTS:"Changer de méthode...",METHOD_POPOVER_TITLE:"Méthodes",MEMORIZE_AUTH_FILE:"Mémoriser ce trousseau le temps de la session de navigation",SCRYPT_PARAMETERS:"Paramètres (Scrypt) :",AUTO_LOGOUT:{TITLE:"Information",MESSAGE:'<i class="ion-android-time"></i> Vous avez été <b>déconnecté</b> automatiquement, suite à une inactivité prolongée.',BTN_RELOGIN:"Me reconnecter",IDLE_WARNING:"Vous allez être déconnecté... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Identifiant secret et mot de passe",SCRYPT_ADVANCED:"Salage avancé",FILE:"Fichier de trousseau",PUBKEY:"Clé publique ou pseudonyme",SCAN:"Scanner un QR code"},SCRYPT:{SIMPLE:"Salage léger",DEFAULT:"Salage standard",SECURE:"Salage sûr",HARDEST:"Salage le plus sûr",EXTREME:"Salage extrême",USER:"Salage personnalisé",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Format de fichier attendu : <b>.yml</b> ou <b>.dunikey</b> (type PubSec, WIF ou EWIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> Authentification',BTN_AUTH:"S'authentifier",GENERAL_HELP:"Veuillez vous authentifier :",EXPECTED_UID_HELP:'Veuillez vous authentifier sur le compte <i class="ion-person"></i> {{uid}} :',EXPECTED_PUBKEY_HELP:'Veuillez vous authentifier sur le portefeuille <br class="visible-xs"/><i class="ion-key"></i> {{pubkey|formatPubkey}} :',SCAN_FORM_HELP:"Scanner le QR code de la <b>clef privée</b> du portefeuille."},ACCOUNT:{TITLE:"Mon compte",BALANCE:"Solde",LAST_TX:"Dernières transactions validées",BALANCE_ACCOUNT:"Solde du compte",NO_TX:"Aucune transaction",SHOW_MORE_TX:"Afficher plus",SHOW_ALL_TX:"Afficher tout",TX_FROM_DATE:"(limite actuelle à {{fromTime|medianFromNowShort}})",PENDING_TX:"Transactions en attente de traitement",VALIDATING_TX:"Transactions traitées, non validées",ERROR_TX:"Transactions non executées",ERROR_TX_SENT:"Transactions envoyées en échec",PENDING_TX_RECEIVED:"Transactions en attente de réception",EVENTS:"Evénements",OUT_DISTANCED:"Vos certifications actuelles proviennent d'un groupe trop isolé de la <a ng-click=\"showHelpModal('wot')\">Toile de Confiance</a> (TdC) : la <a ng-click=\"showHelpModal('distance_rule')\">règle de distance maximale</a> n'est pas respectée.<br/>Vous devez obtenir des certifications provenant d'autres secteurs de la TdC, ou bien attendre que celle-ci se resserre.",WAITING_MEMBERSHIP:"Demande d'adhésion envoyée. En attente d'acceptation.",WAITING_CERTIFICATIONS:"Vous devez <b>obtenir {{needCertificationCount}} certification(s)</b> pour devenir membre et produire le <a ng-click=\"showHelpModal('ud')\">Dividende Universel</a>. Votre compte est cependant déjà opérationnel, pour recevoir et effectuer des paiements.",WAITING_CERTIFICATIONS_HELP:'Pour obtenir vos certifications, sollicitez uniquement des membres <b>qui vous connaissent suffisamment</b>, comme l\'exige <a ng-click="showLicenseModal()">la licence de la monnaie</a> que vous avez acceptée.<br/>Si vous ne connaissez pas suffisamment de membres, faites-le savoir sur <a ng-click="openLink($event, $root.settings.userForumUrl)">le forum utilisateur</a>.',WILL_MISSING_CERTIFICATIONS:"Vous allez bientôt <b>manquer de certifications</b> (au moins {{willNeedCertificationCount}} sont requises)",WILL_NEED_RENEW_MEMBERSHIP:"Votre adhésion comme membre <b>va expirer {{membershipExpiresIn|formatDurationTo}}</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a> d'ici là.",NEED_RENEW_MEMBERSHIP:"Vous n'êtes plus membre de la monnaie, car <b>votre adhésion a expiré</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a>.",NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED:"Vous n'êtes plus membre de la monnaie, <b>pour manque de certifications</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a>.",NO_WAITING_MEMBERSHIP:"Aucune demande d'adhésion en attente. Si vous souhaitez <b>devenir membre</b>, pensez à <a ng-click=\"doQuickFix('membership')\">envoyer la demande d'adhésion</a>.",CERTIFICATION_COUNT:"Certifications reçues",CERTIFICATION_COUNT_SHORT:"Certifications",SIG_STOCK:"Certifications envoyées",BTN_RECEIVE_MONEY:"Encaisser",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Basculer vers une autre identité...",BTN_FIX_MEMBERSHIP:"Renvoyer la demande d'adhésion...",BTN_MEMBERSHIP_RENEW:"Renouveler l'adhésion",BTN_MEMBERSHIP_RENEW_DOTS:"Renouveler l'adhésion...",BTN_MEMBERSHIP_OUT_DOTS:"Arrêter l'adhésion...",BTN_SECURITY_DOTS:"Compte et sécurité...",BTN_SHOW_DETAILS:"Afficher les infos techniques",LOCKED_OUTPUTS_POPOVER:{TITLE:"Montant verrouillé",DESCRIPTION:"Voici les conditions de déverrouillage de ce montant :",DESCRIPTION_MANY:"Cette transaction est composé de plusieurs parties, dont voici les conditions de déverrouillage :",LOCKED_AMOUNT:"Conditions pour le montant :"},NEW:{TITLE:"Création de compte",INTRO_WARNING_TIME:"La création d'un compte sur {{name|capitalize}} est très simple. Veuillez néanmoins prendre suffisament de temps pour faire correctement cette formalité (pour ne pas oublier les identifiants, mots de passe, etc.).",INTRO_WARNING_SECURITY:"Vérifiez que le matériel que vous utilisez actuellement (ordinateur, tablette, téléphone) <b>est sécurisé et digne de confiance</b>.",INTRO_WARNING_SECURITY_HELP:"Anti-virus à jour, pare-feu activé, session protégée par mot de passe ou code pin, etc.",INTRO_HELP:"Cliquez sur <b>{{'COMMON.BTN_START'|translate}}</b> pour débuter la création de compte. Vous serez guidé étape par étape.",REGISTRATION_NODE:"Votre inscription sera enregistrée via le noeud Duniter <b>{{server}}</b>, qui le diffusera ensuite au reste du réseau de la monnaie.",REGISTRATION_NODE_HELP:"Si vous ne faites pas confiance en ce noeud, veuillez en changer <a ng-click=\"doQuickFix('settings')\">dans les paramètres</a> de Cesium.",SELECT_ACCOUNT_TYPE:"Choisissez le type de compte à créer :",MEMBER_ACCOUNT:"Compte membre",MEMBER_ACCOUNT_TITLE:"Création d'un compte membre",MEMBER_ACCOUNT_HELP:"Si vous n'êtes pas encore inscrit en tant qu'individu (un seul compte possible par individu). Ce compte permet de co-produire la monnaie, en recevant un <b>dividende universel</b> chaque {{parameters.dt|formatPeriod}}.",WALLET_ACCOUNT:"Simple portefeuille",WALLET_ACCOUNT_TITLE:"Création d'un portefeuille",WALLET_ACCOUNT_HELP:"Pour tous les autres cas, par exemple si vous avez besoin d'un compte supplémentaire.<br/>Aucun dividende universel ne sera créé par ce compte.",SALT_WARNING:"Choisissez votre identifiant secret.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez le bien</b> : en cas de perte, plus personne ne pourra accéder à votre compte !",PASSWORD_WARNING:"Choisissez un mot de passe.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez bien ce mot de passe</b : en cas de perte, plus personne ne pourra accéder à votre compte !",PSEUDO_WARNING:"Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous identifier plus facilement.<div class='hidden-xs'><br/>Il <b>ne pourra pas être modifié</b>, sans refaire un compte.</div><br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>",PSEUDO:"Pseudonyme",PSEUDO_HELP:"Pseudonyme",SALT_CONFIRM:"Confirmation",SALT_CONFIRM_HELP:"Confirmation de l'identifiant secret",PASSWORD_CONFIRM:"Confirmation",PASSWORD_CONFIRM_HELP:"Confirmation du mot de passe",SLIDE_6_TITLE:"Confirmation :",COMPUTING_PUBKEY:"Calcul en cours...",LAST_SLIDE_CONGRATULATION:"Vous avez saisi toutes les informations nécessaires : Bravo !<br/>Vous pouvez maintenant <b>envoyer la demande de création</b> de compte.</b><br/><br/>Pour information, la clé publique ci-dessous identifiera votre futur compte.<br/>Elle pourra être communiquée à des tiers pour recevoir leurs paiements.<br/><b>Il n'est pas obligatoire</b> de la noter ici, vous pourrez également le faire plus tard.",CONFIRMATION_MEMBER_ACCOUNT:"<b class=\"assertive\">Avertissement :</b> l'identifiant secret, le mot de passe et le pseudonyme ne pourront plus être modifiés.<br/><br/><b>Assurez-vous de toujours vous en rappeler !</b><br/><br/><b>Êtes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?",CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Avertissement :</b> l\'identifiant secret et le mot de passe ne pourront plus être modifiés.<br/><br/><b>Assurez-vous de toujours vous en rappeler !</b><br/><br/><b>Êtes-vous sûr</b> de vouloir continuer avec ces identifiants ?',CHECKING_PSEUDO:"Vérification...",PSEUDO_AVAILABLE:"Pseudonyme disponible",PSEUDO_NOT_AVAILABLE:"Pseudonyme non disponible",INFO_LICENSE:"Avant de créer un compte membre, <b>veuillez lire et accepter la licence</b> d'usage de la monnaie :",BTN_ACCEPT:"J'accepte",BTN_ACCEPT_LICENSE:"J'accepte la licence"},POPUP_REGISTER:{TITLE:"Choisissez un pseudonyme",HELP:"Un pseudonyme est obligatoire pour devenir membre."},SELECT_IDENTITY_MODAL:{TITLE:"Sélection de l'identité",HELP:'Plusieurs <b>identités différentes</b> ont été envoyées, pour la clé publique <span class="gray"><i class="ion-key"></i> {{pubkey|formatPubkey}}</span>.<br/>Veuillez sélectionner le dossier à utiliser :'},SELECT_WALLET_MODAL:{TITLE:"Sélection du portefeuille"},WALLET_LIST:{TITLE:"Mes portefeuilles",BTN_NEW:"Ajouter un portefeuille",BTN_DOWNLOAD:"Télécharger la liste",BTN_IMPORT_FILE_DOTS:"Importer depuis un fichier...",NO_WALLET:"Aucun portefeuille secondaire",BTN_DELETE:"Retirer un portefeuille secondaire...",BTN_RENAME:"Renommer le portefeuille",EXPORT_FILENAME:"mes_portefeuilles-{{pubkey|formatPubkey}}-{{currency}}.csv",TOTAL_DOTS:"Total : ",EDIT_POPOVER:{TITLE:"Renommer le portefeuille",HELP:"Renseignez le nouveau nom",NAME_HELP:"Nom du portefeuille"},IMPORT_MODAL:{TITLE:"Importer des portefeuilles",HELP:"Pour <b>importer des porftefeuilles</b>, veuillez glisser dans la zone ci-dessous le fichier de la liste des portefeuilles, ou bien cliquer dans la zone pour rechercher un fichier.",WALLET_COUNT:"<b>{{count}}</b> nouveau{{count > 1 ? 'x' : ''}} portefeuille{{count > 1 ? 's' : ''}}",NO_NEW_WALLET:"Aucun nouveau portefeuille"}},SECURITY:{ADD_QUESTION:"Ajouter une question personnalisée",BTN_CLEAN:"Vider",BTN_RESET:"Réinitialiser",DOWNLOAD_REVOKE:"Sauvegarder mon fichier de révocation",DOWNLOAD_REVOKE_HELP:"Disposer d'un fichier de révocation est important, par exemple en cas de perte de vos identifiants. Il vous permet de <b>sortir ce compte de la toile de confiance</b>, en redevenant ainsi un simple portefeuille.",GENERATE_KEYFILE:"Générer mon fichier de trousseau...",GENERATE_KEYFILE_HELP:"Génère un fichier permettant de vous authentifier sans saisir vos identifiants.<br/><b>Attention :</b> ce fichier contiendra votre trousseau de compte (clefs publique et secrète) ; il est donc très important de le mettre en lieu sûr !",KEYFILE_FILENAME:"trousseau-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",MEMBERSHIP_IN:"Transformer en compte membre...",MEMBERSHIP_IN_HELP:"Permet de <b>transformer</b> un compte simple portefeuille <b>en compte membre</b>, en envoyant une demande d'adhésion. Utile uniquement si vous n'avez pas déjà un autre compte membre.",SEND_IDENTITY:"Publier son identité...",SEND_IDENTITY_HELP:"Permet d'associer un pseudonyme à ce compte, mais <b>sans faire de demande d'adhésion</b> pour devenir membre. Cette association n'est généralement pas utile, car la validité de cette association de pseudonyme est limitée dans le temps.",HELP_LEVEL:"Pour générer un fichier de sauvegarde de vos identifiants, choisissez <strong> au moins {{nb}} questions :</strong>",LEVEL:"Niveau de sécurité",LOW_LEVEL:'Faible <span class="hidden-xs">(2 questions minimum)</span>',MEDIUM_LEVEL:'Moyen <span class="hidden-xs">(4 questions minimum)</span>',QUESTION_1:"Comment s'appelait votre meilleur ami lorsque vous étiez adolescent ?",QUESTION_2:"Comment s'appelait votre premier animal de compagnie ?",QUESTION_3:"Quel est le premier plat que vous avez appris à cuisiner ?",QUESTION_4:"Quel est le premier film que vous avez vu au cinéma ?",QUESTION_5:"Où êtes-vous allé la première fois que vous avez pris l'avion ?",QUESTION_6:"Comment s'appelait votre instituteur préféré à l'école primaire ?",QUESTION_7:"Quel serait selon vous le métier idéal ?",QUESTION_8:"Quel est le livre pour enfants que vous préférez ?",QUESTION_9:"Quel était le modèle de votre premier véhicule ?",QUESTION_10:"Quel était votre surnom lorsque vous étiez enfant ?",QUESTION_11:"Quel était votre personnage ou acteur de cinéma préféré lorsque vous étiez étudiant ?",QUESTION_12:"Quel était votre chanteur ou groupe préféré lorsque vous étiez étudiant ?",QUESTION_13:"Dans quelle ville vos parents se sont-ils rencontrés ?",QUESTION_14:"Comment s'appelait votre premier patron ?",QUESTION_15:"Quel est le nom de la rue où vous avez grandi ?",QUESTION_16:"Quel est le nom de la première plage où vous vous êtes baigné ?",QUESTION_17:"Quel est le premier album que vous avez acheté ?",QUESTION_18:"Quel est le nom de votre équipe de sport préférée ?",QUESTION_19:"Quel était le métier de votre grand-père ?",RECOVER_ID:"Retrouver mon mot de passe...",RECOVER_ID_HELP:"Si vous disposez d'un <b>fichier de sauvegarde de vos identifiants</b>, vous pouvez les retrouver en répondant correctement à vos questions personnelles.",RECOVER_ID_SELECT_FILE:"Choisissez le <b>fichier de sauvegarde de vos identifiants</b> à utiliser :",REVOCATION_WITH_FILE:"Révoquer mon compte membre...",REVOCATION_WITH_FILE_DESCRIPTION:"Si vous avez <b>définitivement perdus vos identifiants</b> de compte membre (ou que la sécurité du compte est compromise), vous pouvez utiliser <b>le fichier de révocation</b> du compte pour <b>forcer sa sortie définitive de la toile de confiance</b>.",REVOCATION_WITH_FILE_HELP:"Pour <b>révoquer définitivement</b> un compte membre, veuillez glisser dans la zone ci-dessous votre fichier de révocation, ou bien cliquer dans la zone pour rechercher un fichier.",REVOCATION_WALLET:"Révoquer immédiatement ce compte",REVOCATION_WALLET_HELP:"Demander la révocation de votre identité entraîne la <b>sortie de la toile de confiance</b> (définitive pour le pseudonyme et la clé publique associés). Le compte ne pourra plus produire de Dividende Universel.<br/>Vous pourrez toutefois encore vous y connecter, comme à un simple portefeuille.",REVOCATION_FILENAME:"revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",SAVE_ID:"Sauvegarder mes identifiants...",SAVE_ID_HELP:"Création d'un fichier de sauvegarde, pour <b>retrouver votre mot de passe</b> (et l'identifiant secret) <b>en cas de d'oubli</b>. Le fichier est <b>sécurisé</b> (chiffré) à l'aide de questions personnelles.",STRONG_LEVEL:'Fort <span class="hidden-xs ">(6 questions minimum)</span>',TITLE:"Compte et sécurité",KEYFILE:{PUBSEC_FORMAT:"Format PubSec.",PUBSEC_FORMAT_HELP:"Ce format stocke votre trousseau de manière très simple. Il est compatible notamment avec Cesium, ğannonce et Duniter.<br/><b>Attention :</b>Le fichier <b>n'est pas chiffré</b> (la clef secrète y apparaît en clair) ; veuillez donc le stocker en lieu sûr !",WIF_FORMAT:"Format WIF (Wallet Import Format) - v1",WIF_FORMAT_HELP:"Ce format stocke votre trousseau en y intégrant une somme de contrôle pour vérifier l'intégrité du fichier. Il est compatible notamment avec les portefeuilles papier (Duniter paper wallet).<br/><b>Attention :</b>Le fichier <b>n'est pas chiffré</b> (la clef secrète y apparaît en clair) ; veuillez donc le stocker en lieu sûr !",EWIF_FORMAT:"Format EWIF (Encrypted Wallet Import Format) - v1",EWIF_FORMAT_HELP:"Ce format stocke votre trousseau <b>de manière chiffrée</b> à partir d'une phrase secrète de votre choix. Il intègre aussi une somme de contrôle pour vérifier l'intégrité du fichier.<br/><b>Attention :</b> Veillez à toujours vous souvenir de votre phrase secrète !",PASSWORD_POPUP:{TITLE:"Fichier de trousseau chiffré",HELP:"Veuillez indiquer la phrase secrète :",PASSWORD_HELP:"Phrase secrète"},ERROR:{BAD_PASSWORD:"Phrase secrète incorrecte",BAD_CHECKSUM:"Somme de contrôle incorrecte"}}},FILE_NAME:"{{currency}} - Relevé du compte {{pubkey|formatPubkey}} au {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Date",AMOUNT:"Montant",COMMENT:"Commentaire"}},TRANSFER:{TITLE:"Virement",SUB_TITLE:"Faire un virement",SUB_TITLE_ALL:"Vider le compte",FROM:"De",TO:"À",AMOUNT:"Montant",AMOUNT_HELP:"Montant",COMMENT:"Commentaire",COMMENT_HELP:"Commentaire",BTN_SEND:"Envoyer",BTN_ADD_COMMENT:"Ajouter un commentaire",REST:"Reste du compte",REST_TO:"à",WARN_COMMENT_IS_PUBLIC:"Veuillez noter que <b>les commentaires sont publics</b> (non chiffrés).",MODAL:{TITLE:"Virement"}},ERROR:{UNKNOWN_URI_FORMAT:"Format d'URI inconnu",PUBKEY_INVALID_CHECKSUM:"Clé publique invalide (bad checksum).",POPUP_TITLE:"Erreur",UNKNOWN_ERROR:"Erreur inconnue",CRYPTO_UNKNOWN_ERROR:"Votre navigateur ne semble pas compatible avec les fonctionnalités de cryptographie.",DOWNLOAD_KEYFILE_FAILED:"Échec de la génération du fichier de trousseau.",EQUALS_TO_PSEUDO:"Doit être différent du pseudonyme",EQUALS_TO_SALT:"Doit être différent de l'identifiant secret",FIELD_REQUIRED:"Champ obligatoire",FIELD_TOO_SHORT:"Valeur trop courte",FIELD_TOO_SHORT_WITH_LENGTH:"Valeur trop courte ({{minLength}} caractères min)",FIELD_TOO_LONG:"Valeur trop longue",FIELD_TOO_LONG_WITH_LENGTH:"Valeur trop longue ({{maxLength}} caractères max)",FIELD_MIN:"Valeur minimale : {{min}}",FIELD_MAX:"Valeur maximale : {{max}}",FIELD_ACCENT:"Caractères accentués et virgules non autorisés",FIELD_NOT_NUMBER:"Valeur numérique attendue",FIELD_NOT_INT:"Valeur entière attendue",FIELD_NOT_EMAIL:"Adresse email non valide",PASSWORD_NOT_CONFIRMED:"Ne correspond pas au mot de passe",SALT_NOT_CONFIRMED:"Ne correspond pas à l'identifiant secret",SEND_IDENTITY_FAILED:"Échec de l'inscription",SEND_CERTIFICATION_FAILED:"Échec de la certification",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"Vous ne pouvez pas effectuer de certification, car ce compte n'est <b>pas membre</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"Vous ne pouvez pas effectuer de certification, car ce compte n'est pas encore membre.<br/><br/>Il vous manque encore des certifications, ou bien celles-ci n'ont pas encore été validées.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"Compte non certifiable. Aucune demande d'adhésion n'a été faite, ou bien elle n'a pas été renouvelée.",LOGIN_FAILED:"Erreur lors de la connexion.",LOAD_IDENTITY_FAILED:"Erreur de chargement de l'identité.",LOAD_REQUIREMENTS_FAILED:"Erreur de chargement des prérequis de l'identité.",SEND_MEMBERSHIP_IN_FAILED:"Échec de la tentative d'entrée dans la communauté.",SEND_MEMBERSHIP_OUT_FAILED:"Échec de l'arrêt de l'adhésion.",REFRESH_WALLET_DATA:"Échec du rafraîchissement du portefeuille.",GET_CURRENCY_PARAMETER:"Échec de la récupération des règles de la monnaie.",GET_CURRENCY_FAILED:"Chargement de la monnaie impossible. Veuillez réessayer plus tard.",SEND_TX_FAILED:"Échec du virement.",ALL_SOURCES_USED:"Veuillez attendre le calcul du prochain bloc (toutes vos sources de monnaie ont été utilisées).",NOT_ENOUGH_SOURCES:"Pas assez de change pour envoyer ce montant en une seule transaction.<br/>Montant maximum : {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Échec de la création du compte membre.",RESTORE_WALLET_DATA_ERROR:"Échec du rechargement des paramètres depuis le stockage local",LOAD_WALLET_DATA_ERROR:"Échec du chargement des données du portefeuille.",COPY_CLIPBOARD_FAILED:"Copie de la valeur impossible.",TAKE_PICTURE_FAILED:"Échec de la récupération de la photo.",SCAN_FAILED:"Échec du scan de QR-code.",SCAN_UNKNOWN_FORMAT:"Code non reconnu.",WOT_LOOKUP_FAILED:"Échec de la recherche.",LOAD_PEER_DATA_FAILED:"Lecture du nœud Duniter impossible. Veuillez réessayer ultérieurement.",NEED_LOGIN_FIRST:"Veuillez d'abord vous connecter.",AMOUNT_REQUIRED:"Le montant est obligatoire.",AMOUNT_NEGATIVE:"Montant négatif non autorisé.",NOT_ENOUGH_CREDIT:"Crédit insuffisant.",INVALID_NODE_SUMMARY:"Nœud injoignable ou adresse invalide.",INVALID_USER_ID:"Le pseudonyme ne doit contenir ni espace ni caractère spécial ou accentué.",INVALID_COMMENT:"Le champ 'référence' ne doit pas contenir de caractères accentués.",INVALID_PUBKEY:"La clé publique n'a pas le format attendu.",INVALID_PUBKEY_CHECKSUM:"Somme de contrôle invalide.",IDENTITY_REVOKED:"Cette identité <b>a été révoquée</b>. Elle ne peut plus devenir membre.",IDENTITY_REVOKED_WITH_TIME:"Cette identité <b>a été révoquée {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Elle ne peut plus devenir membre.",IDENTITY_PENDING_REVOCATION:"La <b>révocation de cette identité</b> a été demandée et est en attente de traitement. La certification est donc désactivée.",IDENTITY_INVALID_BLOCK_HASH:"Cette demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé) : cette personne doit renouveler sa demande d'adhésion <b>avant</b> d'être certifiée.",IDENTITY_EXPIRED:"La publication de cette identité a expiré : cette personne doit effectuer une nouvelle demande d'adhésion <b>avant</b> d'être certifiée.",IDENTITY_SANDBOX_FULL:"Le nœud Duniter utilisé par Cesium ne peut plus recevoir de nouvelles identités, car sa file d'attente est pleine.<br/><br/>Veuillez réessayer ultérieurement ou changer de nœud (via le menu <b>Paramètres</b>).",IDENTITY_NOT_FOUND:"Identité non trouvée.",IDENTITY_TX_FAILED:"Échec du chargement des opérations.",WOT_PENDING_INVALID_BLOCK_HASH:"Adhésion non valide.",WALLET_INVALID_BLOCK_HASH:"Votre demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé).<br/>Vous devez <a ng-click=\"doQuickFix('fixMembership')\">envoyer une nouvelle demande</a> pour résoudre ce problème.",WALLET_IDENTITY_EXPIRED:"La publication de <b>votre identité a expirée</b>.<br/>Vous devez <a ng-click=\"doQuickFix('fixIdentity')\">publier à nouveau votre identité</a> pour résoudre ce problème.",WALLET_REVOKED:"Votre identité a été <b>révoquée</b> : ni votre pseudonyme ni votre clef publique ne pourra être utilisé à l'avenir pour un compte membre.",WALLET_HAS_NO_SELF:"Votre identité doit d'abord avoir été publiée, et ne pas être expirée.",AUTH_REQUIRED:"Authentification requise.",AUTH_INVALID_PUBKEY:'La clef attendue est <i class="ion-key"></i> {{pubkey|formatPubkey}}...',AUTH_INVALID_SCRYPT:"Identifiant ou mot de passe invalide.",AUTH_INVALID_FILE:"Fichier de trousseau invalide.",AUTH_FILE_ERROR:"Échec de l'ouverture du fichier de trousseau.",IDENTITY_ALREADY_CERTIFY:"Vous avez <b>déjà certifié</b> cette identité.<br/><br/>Cette certification est encore valide (expiration {{expiresIn|formatDurationTo}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"Vous avez <b>déjà certifié</b> cette identité.<br/><br/>Cette certification est en attente de traitement (date limite de traitement {{expiresIn|formatDurationTo}}).",UNABLE_TO_CERTIFY_TITLE:"Certification impossible",LOAD_NEWCOMERS_FAILED:"Échec du chargement des nouveaux membres.",LOAD_PENDING_FAILED:"Échec du chargement des inscriptions en attente.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"Vous devez <b>être membre</b> pour pouvoir effectuer cette action.",ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION:"Vous devez <b>être membre (ou ancien membre)</b> pour pouvoir effectuer cette action.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"Vous devez avoir <b>publié votre identité</b> pour pouvoir effectuer cette action.",GET_BLOCK_FAILED:"Échec de la récupération du bloc.",INVALID_BLOCK_HASH:"Bloc non trouvé (hash différent).",DOWNLOAD_REVOCATION_FAILED:"Échec du téléchargement du fichier de révocation.",REVOCATION_FAILED:"Échec de la révocation.",SALT_OR_PASSWORD_NOT_CONFIRMED:"Identifiant secret ou mot de passe incorrect.",RECOVER_ID_FAILED:"Échec de la récupération des identifiants",LOAD_FILE_FAILED:"Échec du chargement du fichier",NOT_VALID_REVOCATION_FILE:"Fichier de révocation non valide (mauvais format de fichier)",NOT_VALID_SAVE_ID_FILE:"Fichier de récupération non valide (mauvais format de fichier)",NOT_VALID_KEY_FILE:"Fichier de trousseau non valide (format non reconnu)",EXISTING_ACCOUNT:"Vos identifiants correspondent à un compte déjà existant, dont la <a ng-click=\"showHelpModal('pubkey')\">clef publique</a> est :",
-EXISTING_ACCOUNT_REQUEST:"Veuillez modifier vos identifiants afin qu'ils correspondent à un compte non utilisé.",GET_LICENSE_FILE_FAILED:"Récupération du fichier de licence impossible.",CHECK_NETWORK_CONNECTION:"Aucun nœud ne semble accessible.<br/><br/>Veuillez <b>vérifier votre connexion Internet</b>.",ISSUE_524_TX_FAILED:"Échec du virement.<br/><br/>Un message a été envoyé aux développeurs pour faciliter la résolution du problème. <b>Merci de votre aide</b>.",ADD_SECONDARY_WALLET_FAILED:"Échec de l'ajout du portefeuille secondaire.",UPDATE_WALLET_LIST_FAILED:"Échec du rafraîchissement des portefeuilles secondaires.",LOAD_WALLET_LIST_FAILED:"Échec du chargement des portefeuilles secondaires.",SAVE_WALLET_LIST_FAILED:"Échec de la sauvegarde des portefeuilles secondaires.",COULD_NOT_ADD_MAIN_WALLET:"Ce portefeuille <b>correspond au compte principal</b> avec lequel vous êtes connecté.<br/>Impossible de l'ajouter comme portefeuille secondaire.",COULD_NOT_ADD_EXISTING_WALLET:"Portefeuille déjà existant dans la liste.",UNKNOWN_WALLET_ID:"Portefeuille secondaire inconnu.",RESTORE_WALLET_LIST_FAILED:"Échec de la restauration des portefeuilles secondaires.",INVALID_FILE_FORMAT:"Format de fichier invalide.",SAME_TX_RECIPIENT:"Le destinataire doit être différent de l'émetteur."},INFO:{POPUP_TITLE:"Information",CERTIFICATION_DONE:"Certification envoyée",NOT_ENOUGH_CREDIT:"Crédit insuffisant",TRANSFER_SENT:"Virement envoyé",COPY_TO_CLIPBOARD_DONE:"Copié dans le presse-papier",MEMBERSHIP_OUT_SENT:"Résiliation envoyée",NOT_NEED_MEMBERSHIP:"Vous êtes déjà membre.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"Cette identité va bientôt manquer de certifications (au moins {{willNeedCertificationCount}}).",IDENTITY_NEED_MEMBERSHIP:"Cette identité n'a pas envoyée de demande d'adhésion. Elle le devra si elle souhaite devenir membre.",HAS_ALTERNATIVE_IDENTITIES:"Il existe <b>plusieurs identités</b> rattachées à cette clé publique. <b>Avant toute certification</b>, pensez à <a ng-click=\"doQuickFix('showSelectIdentities')\">consulter les autres identités</a> pour choisir la bonne, ou bien contacter le propriétaire du compte.",REVOCATION_SENT:"Révocation envoyée",REVOCATION_SENT_WAITING_PROCESS:"La <b>révocation de cette identité</b> a été demandée et est en attente de traitement.",FEATURES_NOT_IMPLEMENTED:"Cette fonctionnalité est encore en cours de développement.<br/>Pourquoi ne pas <b>contribuer à Cesium</b>, pour l'obtenir plus rapidement ? ;)",EMPTY_TX_HISTORY:"Aucune opération à exporter"},CONFIRM:{POPUP_TITLE:"<b>Confirmation</b>",POPUP_WARNING_TITLE:"<b>Avertissement</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Avertissement de sécurité</b>',CERTIFY_RULES_TITLE_UID:"Certifier {{uid}}",CERTIFY_RULES:'<b class="assertive">Ne PAS certifier</b> un compte si vous pensez que :<br/><br/><ul><li>1.) il ne correspond pas à une personne <b>physique et vivante</b>.<li>2.) son propriétaire <b>possède un autre compte</b> déjà certifié.<li>3.) son propriétaire viole (volontairement ou non) la règle 1 ou 2 (par exemple en certifiant des comptes factices ou en double).</ul><br/><b>Êtes-vous sûr</b> de vouloir néanmoins certifier cette identité ?',FULLSCREEN:"Afficher l'application en plein écran ?",EXIT_APP:"Fermer l'application ?",TRANSFER:"<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>",TRANSFER_ALL:"<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li><br/><li> - Reste : <b>{{restAmount}} {{unit}}</b> à <b>{{restTo}}</b></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>",MEMBERSHIP_OUT:"Cette opération est <b>irréversible</b>.<br/></br/>Êtes-vous sûr de vouloir <b>résilier votre compte membre</b> ?",MEMBERSHIP_OUT_2:"Cette opération est <b>irreversible</b> !<br/><br/>Êtes-vous vraiment sûr de vouloir <b>résilier votre adhésion</b> comme membre ?",LOGIN_UNUSED_WALLET_TITLE:"Erreur de saisie ?",LOGIN_UNUSED_WALLET:"Le compte connecté semble <b>inactif</b>.<br/><br/>Il s'agit probablement d'une <b>erreur de saisie</b> dans vos identifiants de connexion. Veuillez recommencer, en vérifiant que <b>la clé publique est celle de votre compte</b>.",FIX_IDENTITY:"Le pseudonyme <b>{{uid}}</b> va être publiée à nouveau, en remplacement de l'ancienne publication qui a expirée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",FIX_MEMBERSHIP:"Votre demande d'adhésion comme membre va être renvoyée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",MEMBERSHIP:"Votre demande d'adhésion comme membre va être envoyée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",RENEW_MEMBERSHIP:"Votre adhésion comme membre va être renouvelée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",REVOKE_IDENTITY:"Vous allez <b>revoquer définitivement cette identité</b>.<br/><br/>La clé publique et le pseudonyme associés <b>ne pourront plus jamais être utilisés</b> (pour un compte membre). <br/></br/><b>Êtes-vous sûr</b> de vouloir révoquer définitivement ce compte ?",REVOKE_IDENTITY_2:"Cette opération est <b>irreversible</b> !<br/><br/>Êtes-vous vraiment sûr de vouloir <b>révoquer définitivement</b> ce compte ?",NOT_NEED_RENEW_MEMBERSHIP:"Votre adhésion n'a pas besoin d'être renouvelée (elle n'expirera que dans {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Êtes-vous sûr</b> de vouloir renouveler votre adhésion ?",SAVE_BEFORE_LEAVE:"Voulez-vous <b>sauvegarder vos modifications</b> avant de quitter la page ?",SAVE_BEFORE_LEAVE_TITLE:"Modifications non enregistrées",LOGOUT:"Êtes-vous sûr de vouloir vous déconnecter ?",USE_FALLBACK_NODE:"Nœud <b>{{old}}</b> injoignable ou adresse invalide.<br/><br/>Voulez-vous temporairement utiliser le nœud <b>{{new}}</b> ?",ISSUE_524_SEND_LOG:"La transaction a été rejetée, à cause d'une anomalie connue (ticket #524) mais <b>non reproduite</b>.<br/><br/>Pour aider les développeurs à corriger cette erreur, <b>acceptez-vous la transmission de vos logs</b> par message ?<br/><small>(aucune donnée confidentielle n'est envoyée)</small>."},DOWNLOAD:{POPUP_TITLE:"<b>Fichier de révocation</b>",POPUP_REVOKE_MESSAGE:"Pour sécuriser votre compte, veuillez télécharger le <b>document de révocation de compte</b>. Il vous permettra le cas échéant d'annuler votre compte (en cas d'un vol de compte, d'un changement d'identifiant, d'un compte créé à tort, etc.).<br/><br/><b>Veuillez le stocker en lieu sûr.</b>"},HELP:{TITLE:"Aide en ligne",JOIN:{SECTION:"Inscription",SALT:"L'identifiant secret est très important. Il sert à mélanger le mot de passe, avant qu'il ne serve à calculer la <span class=\"text-italic\">clé publique</span> de votre compte (son numéro) et la clé secrète pour y accéder.<br/><b>Veillez à bien la mémoriser</b>, car aucun moyen n'est actuellement prévu pour la retrouver en cas de perte.<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon identifiant secret doit être suffisamment long (au moins 8 caractères) et le plus original possible.",PASSWORD:"Le mot de passe est très important. Avec l'identifiant secret, il sert à calculer le numéro (la clé publique) de votre compte, et la clé secrète pour y accéder.<br/><b>Veillez à bien le mémoriser</b>, car aucun moyen n'est prévu de le retrouver en cas de perte (sauf à générer un fichier de sauvegarde).<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon mot de passe contient (idéalement) au moins 8 caractères, dont au moins une majuscule et un chiffre.",PSEUDO:'Le pseudonyme est utilisé uniquement dans le cas d\'inscription comme <span class="text-italic">membre</span>. Il est toujours associé à un portefeuille (via sa <span class="text-italic">clé publique</span>).<br/>Il est publié sur le réseau, afin que les autres utilisateurs puisse l\'identifier, le certifier ou envoyer de la monnaie sur le compte.<br/>Un pseudonyme doit être unique au sein des membres (<u>actuels</u> et anciens).'},LOGIN:{SECTION:"Connexion",PUBKEY:"Clé publique du trousseau",PUBKEY_DEF:'La clef publique du trousseau est générée à partir des identifiants saisis (n\'importe lesquels), sans pour autant qu\'ils correspondent à un compte déjà utilisé.<br/><b>Vérifiez attentivement que la clé publique est celle de votre compte</b>. Dans le cas contraire, vous serez connecté à un compte probablement jamais utilisé, le risque de collision avec un compte existant étant infime.<br/><a href="https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique" target="_system">En savoir plus sur la cryptographie</a> par clé publique.',METHOD:"Méthodes de connexion",METHOD_DEF:'Plusieurs options sont disponibles pour vous connecter à un portefeuille :<br/> - La connexion <b>par salage (simple ou avancé)</b> mélange votre mot de passe grâce à l\'identifiant secret, pour limiter les tentatives de <a href="https://fr.wikipedia.org/wiki/Attaque_par_force_brute" target="_system">piratage par force brute</a> (par exemple à partir de mots connus).<br/> - La connexion <b>par clé publique</b> évite de saisir vos identifiants, qui vous seront demandé seulement le moment venu lors d\'une opération sur le compte.<br/> - La connexion <b>par fichier de trousseau</b> va lire les clés (publique et privée) du compte, depuis un fichier, sans besoin de saisir d\'identifiants. Plusieurs formats de fichier sont possibles.'},GLOSSARY:{SECTION:"Glossaire",PUBKEY_DEF:'Une clé publique identifie un portefeuille de monnaie, qui peut identifier un membre ou correspondre à un portefeuille anonyme. Dans Cesium la clé publique est calculée (par défaut) grâce à l\'identifiant secret et au mot de passe.<br/><a href="https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique" target="_system">En savoir plus sur la cryptographie</a> par clé publique.',MEMBER:"Membre",MEMBER_DEF:'Un membre est une personne humaine physique et vivante, désireuse de participer librement à la communauté monétaire. Elle co-produit un dividende universel, suivant une période et un montant tels que définis dans les <span class="text-italic">règles de la monnaie</span>',CURRENCY_RULES:"Règles de la monnaie",CURRENCY_RULES_DEF:'Les règles de la monnaie sont définies une fois pour toutes. Elle fixe le fonctionnement de la monnaie : le calcul du dividende universel, le nombre de certifications nécessaire pour être membre, le nombre de certification maximum qu\'un membre peut donner, etc. <a href="#/app/currency">Voir les règles actuelles</a>.<br/>La non modification des règles dans le temps est possible par l\'utilisation d\'une <span class="text-italic">BlockChain</span> qui porte et exécute ces règles, et en vérifie constamment la bonne application.',BLOCKCHAIN:'Chaîne de blocs (<span class="text-italic">Blockchain</span>)',BLOCKCHAIN_DEF:'La BlockChain est un système décentralisé, qui, dans le cas de Duniter, sert à porter et exécuter les <span class="text-italic">règles de la monnaie</span>.<br/><a href="https://duniter.org/fr/comprendre/" target="_system">En savoir plus sur Duniter</a> et le fonctionnement de sa blockchain.',UNIVERSAL_DIVIDEND_DEF:'Le Dividende Universel (DU) est la quantité de monnaie co-créée par chaque membre, suivant la période et le calcul définis dans les <span class="text-italic">règles de la monnaie</span>.<br/>A chaque échéance, les membres recoivent sur leur compte la meme quantité de nouvelle monnaie.<br/><br/>Le DU subit une croissance régulière, pour rester juste entre les membres (actuels et à venir), calculée en fonction de l\'espérance de vie moyenne, telle que démontré dans la Thérorie Relative de la Monnaie (TRM).<br/><a href="http://trm.creationmonetaire.info" target="_system">En savoir plus sur la TRM</a> et les monnaies libres.',WOT:"Toile de Confiance (TdC)",WOT_DEF:"La Toile de Confiance est constituée de l'ensemble des membres de la monnaie, et des liens de certification qui les relient.",DISTANCE_RULE:"Règle de distance",DISTANCE_RULE_DEF:"La règle de distance de la Toile de Confiance définie <b>une distance maximale à respecter</b> entre un postulant et un nombre minimum de membres référents (ou membres centraux). Cette distance est calculée en utilisant les liens de certification."},TIP:{MENU_BTN_CURRENCY:"Le menu <b>{{'MENU.CURRENCY'|translate}}</b> permet la consultation des <b>règles de la monnaie</b> et de son état.",CURRENCY_WOT:"Le <b>nombre de membres</b> montre l'importance de la communauté et permet de <b>suivre son évolution</b>.",CURRENCY_MASS:"Suivez ici la <b>quantité totale de monnaie</b> existante et sa <b>répartition moyenne</b> par membre.<br/><br/>Ceci permet de juger de l'<b>importance d'un montant</b>, vis à vis de ce que <b>possède les autres</b> sur leur compte (en moyenne).",CURRENCY_UNIT_RELATIVE:"L'unité utilisée (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifie que les montants en {{currency|capitalize}} ont été divisés par le <b>Dividende Universel</b> (DU).<br/><br/><small>Cette unité relative est <b>pertinente</b>, car stable malgré la quantitié de monnaie qui augmente en permanence.</small>",CURRENCY_CHANGE_UNIT:"L'option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permet de <b>changer d'unité</b>, pour visualiser les montants <b>directement en {{currency|capitalize}}</b> (plutôt qu'en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"L'option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permet de <b>changer d'unité</b>, pour visualiser les montants en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, c'est-à-dire relativement au Dividende Universel (le montant co-produit par chaque membre).",CURRENCY_RULES:"Les <b>règles</b> de la monnaie fixent son fonctionnement <b>exact et prévisible</b>.<br/><br/>Véritable ADN de la monnaie, elles rendent son code monétaire <b>lisible et transparent</b>.",MENU_BTN_NETWORK:"Le menu <b>{{'MENU.NETWORK'|translate}}</b> permet la consultation de l'état du réseau.",NETWORK_BLOCKCHAIN:"Toutes les opérations de la monnaie sont enregistrées dans un grand livre de compte <b>public et infalsifiable</b>, appelé aussi <b>chaine de blocs</b> (<em>BlockChain</em> en anglais).",NETWORK_PEERS:"Les <b>nœuds</b> visibles ici correspondent aux <b>ordinateurs qui actualisent et contrôlent</b> la chaine de blocs.<br/><br/>Plus il y a de nœuds, plus la monnaie a une gestion <b>décentralisée</b> et digne de confiance.",NETWORK_PEERS_BLOCK_NUMBER:"Ce <b>numéro</b> (en vert) indique le <b>dernier bloc validé</b> pour ce nœud (dernière page écrite dans le grand livre de comptes).<br/><br/>La couleur verte indique que ce bloc est également validé par <b>la plupart des autres nœuds</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Chaque membre</b>, équipé d\'un ordinateur avec Internet, <b>peut participer en ajoutant un nœud</b>. Il suffit d\'<b>installer le logiciel Duniter</b> (libre et gratuit). <a href="{{installDocUrl}}" target="_system">Voir le manuel d\'installation &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"Le menu <b>{{'MENU.ACCOUNT'|translate}}</b> permet d'accéder à la gestion de votre compte.",MENU_BTN_ACCOUNT_MEMBER:"Consultez ici l'état de votre compte et les informations sur vos certifications.",WALLET_CERTIFICATIONS:"Cliquez ici pour consulter le détail de vos certifications (reçues et émises).",WALLET_RECEIVED_CERTIFICATIONS:"Cliquez ici pour consulter le détail de vos <b>certifications reçues</b>.",WALLET_GIVEN_CERTIFICATIONS:"Cliquez ici pour consulter le détail de vos <b>certifications émises</b>.",WALLET_BALANCE:"Le <b>solde</b> de votre compte s'affiche ici.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>L'unité utilisée (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifie que le montant en {{currency|capitalize}} a été divisé par le <b>Dividende Universel</b> (DU) co-créé par chaque membre.<br/><br/>Actuellement 1 DU vaut {{currentUD|formatInteger}} {{currency|capitalize}}s.",WALLET_BALANCE_CHANGE_UNIT:"Vous pourrez <b>changer l'unité</b> d'affichage des montants dans les <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Par exemple pour visualiser les montants <b>directement en {{currency|capitalize}}</b>, plutôt qu'en unité relative.",WALLET_PUBKEY:"Voici la clé publique de votre compte. Vous pouvez la communiquer à un tiers afin qu'il identifie plus simplement votre compte.",WALLET_SEND:"Effectuer un paiement en quelques clics.",WALLET_SEND_NO_MONEY:"Effectuer un paiement en quelques clics.<br/>(Votre solde ne le permet pas encore)",WALLET_OPTIONS:"Ce bouton permet l'accès aux <b>actions d'adhésion</b> et de sécurité.<br/><br/>N'oubliez pas d'y jeter un oeil !",WALLET_RECEIVED_CERTS:"S'affichera ici la liste des personnes qui vous ont certifié.",WALLET_CERTIFY:"Le bouton <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permet de sélectionner une identité et de la certifier.<br/><br/>Seuls des utilisateurs <b>déjà membres</b> peuvent en certifier d'autres.",WALLET_CERT_STOCK:"Votre stock de certifications (émises) est limité à <b>{{sigStock}} certifications</b>.<br/><br/>Ce stock se renouvelle avec le temps, au fur et à mesure que les certifications s'invalident.",MENU_BTN_WALLETS:"Le menu <b>{{'MENU.WALLETS'|translate}}</b> permet d'ajouter des portefeuilles supplémentaires que vous gérer.",MENU_BTN_TX:"Le menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> permet de consulter votre solde, l'historique vos transactions et d'envoyer un paiement.",MENU_BTN_WOT:"Le menu <b>{{'MENU.WOT'|translate}}</b> permet de rechercher parmi les <b>utilisateurs</b> de la monnaie (membres ou non).",WOT_SEARCH_TEXT_XS:"Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique).<br/><br/>La recherche se lancera automatiquement.",WOT_SEARCH_TEXT:"Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique). <br/><br/>Appuyer ensuite sur <b>Entrée</b> pour lancer la recherche.",WOT_SEARCH_RESULT:"Visualisez la fiche détaillée simplement en <b>cliquant</b> sur une ligne.",WOT_VIEW_CERTIFICATIONS:"La ligne <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> montre combien de membres ont validé cette identité.<br/><br/>Ces certifications attestent que le compte appartient à <b>une personne humaine vivante</b> n'ayant <b>aucun autre compte membre</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"Il faut au moins <b>{{sigQty}} certifications</b> pour devenir membre et recevoir le <b>Dividende Universel</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Un clic ici permet d'ouvrir <b>la liste de toutes les certifications</b> de l'identité (reçues et émises).",WOT_VIEW_CERTIFY:"Le bouton <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permet d'ajouter votre certification à cette identité.",CERTIFY_RULES:"<b>Attention :</b> Ne certifiez que des <b>personnes physiques vivantes</b>, ne possédant aucun autre compte membre.<br/><br/>La sécurité de la monnaie dépend de la vigilance de chacun !",MENU_BTN_SETTINGS:"Les <b>{{'MENU.SETTINGS'|translate}}</b> vous permettront de configurer l'application.",HEADER_BAR_BTN_PROFILE:"Cliquez ici pour accéder à votre <b>profil utilisateur.</b>",SETTINGS_CHANGE_UNIT:"Vous pourrez <b>changer d'unité d'affichage</b> des montants en cliquant ci-dessus.<br/><br/>- Désactivez l'option pour un affichage des montants en {{currency|capitalize}}.<br/>- Activez l'option pour un affichage relatif en {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (tous les montants seront <b>divisés</b> par le Dividende Universel courant).",END_LOGIN:"Cette visite guidée est <b>terminée</b> !<br/><br/>Bonne continuation à vous, dans le nouveau monde de l'<b>économie libre</b> !",END_NOT_LOGIN:"Cette visite guidée est <b>terminée</b> !<br/><br/>Si vous souhaitez rejoindre la monnaie {{currency|capitalize}}, il vous suffira de cliquer sur <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> ci-dessous."}},API:{COMMON:{LINK_DOC:"Documentation API",LINK_DOC_HELP:"Documentation pour les développeurs",LINK_STANDARD_APP:"Version classique",LINK_STANDARD_APP_HELP:"Ouvrir la version classique de {{'COMMON.APP_NAME'|translate}}",CONNECTION_ERROR:"Nœud <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Vérifiez votre connexion Internet, ou contactez l'administrateur du site</a>."},HOME:{TITLE:"Documentation API {{'COMMON.APP_NAME'|translate}}",MESSAGE:'Bienvenue dans la <b>documentation de l\'API</b> {{\'COMMON.APP_NAME\'|translate}}.<br/>Connectez vos sites web à <a href="http://duniter.org" target="_system">Duniter</a> très simplement !',MESSAGE_SHORT:'Connectez vos sites à <a href="http://duniter.org" target="_system">Duniter</a> très simplement !',DOC_HEADER:"Services disponibles :"},TRANSFER:{TITLE:"{{'COMMON.APP_NAME'|translate}} - Paiement en ligne",TITLE_SHORT:"Paiement en ligne",SUMMARY:"Récapitulatif du paiement :",AMOUNT:"Montant :",AMOUNTS_HELP:"Veuillez choisir le montant :",NAME:"Nom :",PUBKEY:"Clé publique du destinataire :",COMMENT:"Référence de l'opération :",NODE:"Adresse du nœud :",DEMO:{SALT:"demo",PASSWORD:"demo",PUBKEY:"3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",HELP:"<b>Mode démonstration</b> : Aucun paiement ne sera réellement envoyé pendant cette simulation.<br/>Veuillez utiliser les identifiants : <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",BAD_CREDENTIALS:"Vérifiez votre saisie.<br/>En mode démonstration, les identifiants sont : {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"},INFO:{SUCCESS_REDIRECTING_WITH_NAME:"Paiement envoyé.<br/>Redirection vers <b>{{name}}</b>...",SUCCESS_REDIRECTING:"Paiement envoyé.<br/>Redirection vers le site du vendeur...",CANCEL_REDIRECTING_WITH_NAME:"Paiement annulé.<br/>Redirection vers <b>{{name}}</b>...",CANCEL_REDIRECTING:"Paiement annulé.<br/>Redirection vers le site du vendeur..."},ERROR:{TRANSFER_FAILED:"Échec du paiement"}},DOC:{DESCRIPTION_DIVIDER:"Description",URL_DIVIDER:"Adresse d'appel",PARAMETERS_DIVIDER:"Paramètres",AVAILABLE_PARAMETERS:"Voici la liste des paramètres possibles :",DEMO_DIVIDER:"Tester",DEMO_HELP:"Pour tester ce service, cliquez sur le bouton ci-contre. Le résultat s'affichera en dessous.",DEMO_RESULT:"Résultat retourné par l'appel :",DEMO_RESULT_PEER:"Adresse du nœud utilisé :",DEMO_SUCCEED:'<i class="icon ion-checkmark"></i> Succès !',DEMO_CANCELLED:'<i class="icon ion-close"></i> Annulé par l\'utilisateur',INTEGRATE_DIVIDER:"Intégrer",INTEGRATE_CODE:"Code :",INTEGRATE_RESULT:"Prévisualisation du résultat :",INTEGRATE_PARAMETERS:"Paramètres",TRANSFER:{TITLE:"Paiements",DESCRIPTION:"Depuis un site (ex: vente en ligne) vous pouvez déléguer le paiement en monnaie libre à Cesium API. Pour cela, il vous suffit de déclencher l'ouverture d'une page sur l'adresse suivante :",PARAM_PUBKEY:"Clé publique du destinataire",PARAM_PUBKEY_HELP:"Clé publique du destinataire (obligatoire)",PARAM_AMOUNT:"Montant",PARAM_AMOUNT_HELP:"Montant de la transaction (obligatoire). Valeurs multiples autorisées, en utilisant un séparateur (point-virgule, barre verticale ou espace).",PARAM_COMMENT:"Référence (ou commentaire)",PARAM_COMMENT_HELP:"Référence ou commentaire. Vous permettra par exemple d'identifier le paiement dans la BlockChain.",PARAM_NAME:"Nom (du destinataire ou du site web)",PARAM_NAME_HELP:'Le nom du destinataire, ou du site web appelant. Cela peut être un nom lisible ("Mon site en ligne"), ou encore une pseudo-adresse web ("MonSite.com").',PARAM_REDIRECT_URL:"Adresse web de redirection",PARAM_REDIRECT_URL_HELP:'Adresse web (URL) de redirection, appelé quand le paiement a été envoyé. Peut contenir les chaînes suivantes, qui seront remplacées par les valeurs de la transaction : "{tx}", "{hash}", "{comment}", "{amount}", "{pubkey}" et "{node}".',PARAM_CANCEL_URL:"Adresse web d'annulation",PARAM_CANCEL_URL_HELP:'Adresse web (URL) en cas d\'annulation du paiement, par l\'utilisateur. Peut contenir les chaînes suivantes, qui seront remplacées dynamiquement : "{comment}", "{amount}" et {pubkey}.',PARAM_PREFERRED_NODE:"Adresse du nœud préféré",PARAM_PREFERRED_NODE_HELP:'Adresse (URL) du nœud Duniter à utiliser de préférence ("g1.domaine.com:443" ou "https://g1.domaine.com").',EXAMPLES_HELP:"Voici des exemples d'intégration :",EXAMPLE_BUTTON:"Bouton HTML",EXAMPLE_BUTTON_DEFAULT_TEXT:"Payer en {{currency|currencySymbol}}",EXAMPLE_BUTTON_DEFAULT_STYLE:"Style personnalisé",EXAMPLE_BUTTON_TEXT_HELP:"Texte du bouton",EXAMPLE_BUTTON_BG_COLOR:"Couleur du fond",EXAMPLE_BUTTON_BG_COLOR_HELP:"Exemple : #fbc14c, black, lightgrey, rgb(180,180,180)",EXAMPLE_BUTTON_FONT_COLOR:"Couleur du texte",EXAMPLE_BUTTON_FONT_COLOR_HELP:"Exemple : black, orange, rgb(180,180,180)",EXAMPLE_BUTTON_TEXT_ICON:"Icône",EXAMPLE_BUTTON_TEXT_WIDTH:"Largeur",EXAMPLE_BUTTON_TEXT_WIDTH_HELP:"Exemple : 200px, 50%",EXAMPLE_BUTTON_ICON_NONE:"Aucune",EXAMPLE_BUTTON_ICON_DUNITER:"Logo Duniter",EXAMPLE_BUTTON_ICON_CESIUM:"Logo Cesium",EXAMPLE_BUTTON_ICON_G1_COLOR:"Logo Ğ1",EXAMPLE_BUTTON_ICON_G1_BLACK:"Logo Ğ1 (noir)"}}}}),e.translations("it-IT",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"build {{build}}",PUBKEY:"Chiave privata",MEMBER:"Membro",BLOCK:"Blocco",BTN_OK:"OK",BTN_YES:"Si",BTN_NO:"No",BTN_SEND:"Inviare",BTN_SEND_MONEY:"Trasferire soldi",BTN_SEND_MONEY_SHORT:"Trasferire",BTN_SAVE:"Salvare",BTN_YES_SAVE:"Si, salvare",BTN_YES_CONTINUE:"Si, continuare",BTN_SHOW:"Mostrare",BTN_SHOW_PUBKEY:"Mostrare chiave pubblica",BTN_RELATIVE_UNIT:"Mostra importi in DU?",BTN_BACK:"Indietro",BTN_NEXT:"Avanti",BTN_CANCEL:"Cancellare",BTN_CLOSE:"Chiudere",BTN_LATER:"Più tardi",BTN_LOGIN:"Accedi",BTN_LOGOUT:"Log out",BTN_ADD_ACCOUNT:"Nuovo conto",BTN_SHARE:"Condividere",BTN_EDIT:"Modificare",BTN_DELETE:"Eliminare",BTN_ADD:"Aggiungere",BTN_SEARCH:"Cercare",BTN_REFRESH:"Aggiornare",BTN_RETRY:"Riprovare",BTN_START:"Iniziare",BTN_CONTINUE:"Continuare",BTN_CREATE:"Creare",BTN_UNDERSTOOD:"Ho capito",BTN_OPTIONS:"Opzioni",BTN_HELP_TOUR:"Mostrami le funzionalità",BTN_HELP_TOUR_SCREEN:"Scoprire questo schermo",BTN_DOWNLOAD:"Scaricare",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Scaricare estratto conto",BTN_MODIFY:"Modificare",CHOOSE_FILE:"Trascini un file <br/>o cliccare per selezionare",DAYS:"giorni",NO_ACCOUNT_QUESTION:"Non sei ancora membro? Registrati subito!",SEARCH_NO_RESULT:"Nessun risultato trovato",LOADING:"Caricando...",SEARCHING:"Cercando...",FROM:"Da",TO:"A",COPY:"Copiare",LANGUAGE:"Lingua",UNIVERSAL_DIVIDEND:"Dividendo universale",UD:"UD",DATE_PATTERN:"DD/MM/YYYY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD/MM/YY",DATE_MONTH_YEAR_PATTERN:"MM/YYYY",EMPTY_PARENTHESIS:"(empty)",UID:"Pseudonimo",ENABLE:"Attivato",DISABLE:"Disattivato",RESULTS_LIST:"Risultati:",RESULTS_COUNT:"{{count}} risultati",EXECUTION_TIME:"eeseguit in {{duration|formatDurationMs}}",SHOW_VALUES:"Mostrare valori in modo trasparente?",POPOVER_ACTIONS_TITLE:"Opzioni",POPOVER_FILTER_TITLE:"Filtri",SHOW_MORE:"Mostrare di più",SHOW_MORE_COUNT:"(limite attuale di {{limit}})",POPOVER_SHARE:{TITLE:"Condividere",SHARE_ON_TWITTER:"Condividere su Twitter",SHARE_ON_FACEBOOK:"Condividere su Facebook",SHARE_ON_DIASPORA:"Condividere su Diaspora*",SHARE_ON_GOOGLEPLUS:"Condividere su Google+"},FILE:{DATE:"Data:",TYPE:"Tipo:",SIZE:"Dimensioni del file:",VALIDATING:"Validazione in corso..."}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Scegliere un file:",BTN_PICTURE_GALLERY:"Galleria",BTN_PICTURE_CAMERA:"<b>Camera</b>"},MENU:{HOME:"Home",WOT:"Annuario",CURRENCY:"Moneta",ACCOUNT:"Mio conto",WALLETS:"I miei portafogli",SETTINGS:"Impostazioni",NETWORK:"Rete",TRANSACTIONS:"Miei pagamenti"},ABOUT:{TITLE:"A proposito",LICENSE:"<b>Free/libre software</b> (License GNU AGPLv3).",CODE:"Codice sorgente:",DEVELOPERS:"Sviluppatori:",FORUM:"Forum:",DEV_WARNING:"Attenzione!",DEV_WARNING_MESSAGE:"Questa app è ancora in sviluppo attivo.<br/>Facci sapere se trovi dei bugs!",DEV_WARNING_MESSAGE_SHORT:"Questa app è tutt'ora instabile (in sviluppo)",REPORT_ISSUE:"Segnalare un bug"},HOME:{TITLE:"Cesium",WELCOME:"Benvenuti nell'{{'COMMON.APP_NAME'|translate}} App!",MESSAGE:"Scambiate in moneta libera. {{currency|abbreviate}}!",BTN_CURRENCY:"Esplorare la moneta",BTN_ABOUT:"a proposito",BTN_HELP:"Aiuto",REPORT_ISSUE:"Segnalare un bug",NOT_YOUR_ACCOUNT_QUESTION:'Non sei proprietario del conto <b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b>?',BTN_CHANGE_ACCOUNT:"Disconettere questo conto",CONNECTION_ERROR:'Peer <b>{{server}}</b> irraggiungibile o indirizzo invalido. <br/><br/> Verifica tua connessione or cambia nodo. <a class="positive" ng-click="doQuickFix(\'settings\')">nell impostazioni. </a>.'},SETTINGS:{TITLE:"Impostazioni",NETWORK_SETTINGS:"Rete",PEER:"Indirizzo peer Duniter",PEER_CHANGED_TEMPORARY:"Indirizzo usato per un tempo determinato",USE_LOCAL_STORAGE:"Abilitare local storage",USE_LOCAL_STORAGE_HELP:"Permette di salvare tue impostazioni",ENABLE_HELPTIP:"Abilitare consigli dinamici",ENABLE_UI_EFFECTS:"Abilitare effetti visivi",HISTORY_SETTINGS:"Mio conto",DISPLAY_UD_HISTORY:"Mostrare dividendi prodotti?",AUTHENTICATION_SETTINGS:"Autenticazione",KEEP_AUTH:"Scadenza dell'autenticazione",KEEP_AUTH_SHORT:"Scadenza",KEEP_AUTH_HELP:"Definire quando l'autenticazione verrà eliminata dalla memoria.",KEEP_AUTH_OPTION:{NEVER:"Dopo ogni operazione",SECONDS:"Dopo {{value}}s d'inattività",MINUTE:"Dopo{{value}}min d'inattività",MINUTES:"Dopo {{value}}min d'inattività",HOUR:"Dopo {{value}}h d'inattività",ALWAYS:"Alla fine della sessione"},REMEMBER_ME:"Ricordarsi di me?",REMEMBER_ME_HELP:"Rimanere identificato/a da una sessione all'altra, conservando la chiave localmente.",PLUGINS_SETTINGS:"Estensioni",BTN_RESET:"Ripristini valori predefiniti",EXPERT_MODE:"Abilitare modlità eseperto",EXPERT_MODE_HELP:"Permette di vedere più dettagli",POPUP_PEER:{TITLE:"Peer Duniter",HOST:"Indirizzo",HOST_HELP:"Indirizzo: server:port",USE_SSL:"Securizzato?",USE_SSL_HELP:"(SSL Encryption)",BTN_SHOW_LIST:"Lista dei peers"}},BLOCKCHAIN:{HASH:"Hash: {{hash}}",VIEW:{HEADER_TITLE:"Blocco #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Blocco attuale",TITLE:"Blocco #{{number|formatInteger}}",COMPUTED_BY:"Calcolato da",SHOW_RAW:"Mostrare dati grezzi",TECHNICAL_DIVIDER:"Informazioni tecniche",VERSION:"Versione di formatto",HASH:"Hash calcolato",UNIVERSAL_DIVIDEND_HELP:"Moneta co-prodotta da ciasciun dei {{membersCount}} membri",EMPTY:"Nessun dati in questo blocco",POW_MIN:"Difficoltà minimale",POW_MIN_HELP:"Difficoltà imposta nel calcolo del hash",DATA_DIVIDER:"Dati",IDENTITIES_COUNT:"Nuove identità",JOINERS_COUNT:"Nuovi membri",ACTIVES_COUNT:"Rinnovi",ACTIVES_COUNT_HELP:"Membri che hanno rinnovato la loro presenza nella rete",LEAVERS_COUNT:"",LEAVERS_COUNT_HELP:"Membri che si sono fatti escludere dalla rete",EXCLUDED_COUNT:"Membri esclusi",EXCLUDED_COUNT_HELP:"Vecchi membri, esclusi per certificazione non rinnovata o soglia di certificazioni non raggiunta.",REVOKED_COUNT:"Identità revocate",REVOKED_COUNT_HELP:"Può essere che questi conti non siano più attivi",TX_COUNT:"Transazioni",CERT_COUNT:"Certificazioni",TX_TO_HIMSELF:"Cambio",TX_OUTPUT_UNLOCK_CONDITIONS:"Sbloccare condizioni",TX_OUTPUT_OPERATOR:{AND:"e",OR:"o"},TX_OUTPUT_FUNCTION:{SIG:"<b>Firma</b> della chive pubblica",XHX:"<b>Password</b>, incluso SHA256 =",CSV:"Bloccato per",CLTV:"Bloccato fino a"}},LOOKUP:{TITLE:"Blocchi",NO_BLOCK:"Nessun blocco",LAST_BLOCKS:"Ultimi blocchi:",BTN_COMPACT:"Compact"}},CURRENCY:{VIEW:{TITLE:"Moneta",TAB_CURRENCY:"Moneta",TAB_WOT:"Web of trust",TAB_NETWORK:"Rete",TAB_BLOCKS:"Blocchi",CURRENCY_SHORT_DESCRIPTION:"{{currency|capitalize}} è <b>una moneta libera</b>, {{firstBlockTime | formatFromNow}}. La rete comprende <b>{{N}} membri </b>, che produccono e ricevono un <a ng-click=\"showHelpModal('ud')\">Dividendo Universale</a> (DU), ogni {{dt | formatPeriod}}.",NETWORK_RULES_DIVIDER:"Regole della rete",CURRENCY_NAME:"Nome della moneta",MEMBERS:"Numero di membri",MEMBERS_VARIATION:"Variazione da {{duration|formatDuration}} (dall' ultimo UD)",MONEY_DIVIDER:"Moneta",MASS:"Massa monetaria",SHARE:"Quantità a testa",UD:"Dividendo universale",C_ACTUAL:"Crescita attuale",MEDIAN_TIME:"Current blockchain time",POW_MIN:"Difficoltà commune",MONEY_RULES_DIVIDER:"Regole della moneta",C_RULE:"Obbietivo teorico di crescità",UD_RULE:"Dividendo universale (formula)",DT_REEVAL:"Periodo tra due re-evaluazioni del UD",REEVAL_SYMBOL:"reeval",DT_REEVAL_VALUE:"Ogni <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",UD_REEVAL_TIME0:"Data della prima re-evaluzione del UD",SIG_QTY_RULE:"Numero di certificazioni requisiti per diventare membro",SIG_STOCK:"Numero massimo di certificazioni inviate da un membro",SIG_PERIOD:"Tempo minimo tra 2 certificazioni inviate da un unico membro.",SIG_WINDOW:"Periodo massimo prima che una certificazione venga studiata",SIG_VALIDITY:"Durata di vita di una certificazione che è state presa in conto",MS_WINDOW:"Periodo massimo prima che una certificazione pendente sia validata",MS_VALIDITY:"Durata di vita di un'adesione che è state presa in conto",STEP_MAX:"Distanza massima tra un nuovo membro e ogni membro referente.",WOT_RULES_DIVIDER:"Regole della Web of Trust",SENTRIES:"Numero di certificazioni (date <b>e</b> ricevute) per diventare membro referente ",SENTRIES_FORMULA:"Numero di certificazioni necessarie per diventare membro (formula)",XPERCENT:"Percentaggio minimino di membri referenti per rispettare la regola di distanza tra i membri",AVG_GEN_TIME:"Tempo medio tra due blocchi",CURRENT:"attuale",MATH_CEILING:"CEILING",DISPLAY_ALL_RULES:"Mostrare tutte le regole?",BTN_SHOW_LICENSE:"Mostrare licenza",WOT_DIVIDER:"Web of trust"},LICENSE:{TITLE:"Licensa attuale",BTN_DOWNLOAD:"Scaricare il file",NO_LICENSE_FILE:"File di licenza non trovato ."}},NETWORK:{VIEW:{MEDIAN_TIME:"Blockchain time",LOADING_PEERS:"Caricando peers...",NODE_ADDRESS:"Indirizzo del peer",SOFTWARE:"Software",WARN_PRE_RELEASE:"Pre-versione (ultima versione stabile: <b>{{version}}</b>)",WARN_NEW_RELEASE:"Versione <b>{{version}}</b> disponibile",WS2PID:"Identificativo :",PRIVATE_ACCESS:"Accesso privato",POW_PREFIX:"Prefisso Prova di Lavoro :",ENDPOINTS:{BMAS:"Endpoint sicuro (SSL)",BMATOR:"Interfaccia rete TOR",WS2P:"Interfaccia WS2P",ES_USER_API:"Cesium+ data node"}},INFO:{ONLY_SSL_PEERS:"I nodi non-SSL hanno un display semplificato perche Cesium funziona in modalità HTTPS."}},PEER:{PEERS:"Peers-Nodi",SIGNED_ON_BLOCK:"Firmato nel blocco",MIRROR:"Specchio",MIRRORS:"Specchio",MIRROR_PEERS:"Peers specchio",PEER_LIST:"Lista dei peers",MEMBERS:"Membri",MEMBER_PEERS:"Peers membri",ALL_PEERS:"Tutti i peers",DIFFICULTY:"Difficoltà",API:"API",CURRENT_BLOCK:"Blocco #",POPOVER_FILTER_TITLE:"Filtro",OFFLINE:"Sconessi",OFFLINE_PEERS:"Peers sconessi",BTN_SHOW_PEER:"Mostrare peer",VIEW:{TITLE:"Peer",OWNER:"Proprietà di ",SHOW_RAW_PEERING:"Vedere il documento di peering",SHOW_RAW_CURRENT_BLOCK:"Vedere l'utimo blocco (formatto grezzo)",LAST_BLOCKS:"Ultimi blocchi",KNOWN_PEERS:"Peers conosciuti :",GENERAL_DIVIDER:"Informazioni generali",ERROR:{LOADING_TOR_NODE_ERROR:"Impossibile ottenere i dati del peer, periodo di attesa scaduto.",LOADING_NODE_ERROR:"Impossibile ottenere i dati del peer"}}},WOT:{SEARCH_HELP:"Cercare (membro o chiave pubblica)",SEARCH_INIT_PHASE_WARNING:"La ricerca per le certificazioni pendenti <b>può essere lunga</b> durante la fase di pre-certificazione. La preghiamo di attendere...",REGISTERED_SINCE:"Certificato/a dal",REGISTERED_SINCE_BLOCK:"Certificato/a dal blocco #",NO_CERTIFICATION:"Nessuna certificazione valida",NO_GIVEN_CERTIFICATION:"Nessuna certificazione data",NOT_MEMBER_PARENTHESIS:"(non-membro)",IDENTITY_REVOKED_PARENTHESIS:"(identità revocata)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(Cancellazione dell'identità pendente)",EXPIRE_IN:"Scade",NOT_WRITTEN_EXPIRE_IN:"Scadenza <br/> ",EXPIRED:"Scaduto",PSEUDO:"Pseudonimo",SIGNED_ON_BLOCK:"Emessa nel blocco #{{block}}",WRITTEN_ON_BLOCK:"Scritta nel blocco #{{block}}",GENERAL_DIVIDER:"Informazioni generali",NOT_MEMBER_ACCOUNT:"Conto non-membro",NOT_MEMBER_ACCOUNT_HELP:"Questo è un semplice portafoglio osservatore, senza richiesta di certificazione emessa.",TECHNICAL_DIVIDER:"Dati tecnici",BTN_CERTIFY:"Certificare",BTN_YES_CERTIFY:"Si, certificare",BTN_SELECT_AND_CERTIFY:"Nuova certificazione",ACCOUNT_OPERATIONS:"Operazioni sul conto",VIEW:{POPOVER_SHARE_TITLE:"Identità {{title}}"},LOOKUP:{TITLE:"Annuario",NEWCOMERS:"Nuovi membri:",NEWCOMERS_COUNT:"{{count}} membri",PENDING:"Registrazioni pendenti",PENDING_COUNT:"{{count}} inscrizioni pendenti",REGISTERED:"Registrato {{sigDate | formatFromNow}}",MEMBER_FROM:"Membro dal {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Ultimi membri",BTN_PENDING:"Registrazioni pendenti",SHOW_MORE:"Vedere di più",SHOW_MORE_COUNT:"(limite attuale di {{limit}})",NO_PENDING:"Nessuna certificazione pendente.",NO_NEWCOMERS:"Nessun membro."},CONTACTS:{TITLE:"Contatti"},MODAL:{TITLE:"Ricerca"},CERTIFICATIONS:{TITLE:"{{uid}} - Certificazioni",SUMMARY:"Certificazioni ricevute",LIST:"Dettagli delle certificazioni ricevute",PENDING_LIST:"Certificazioni pendenti",RECEIVED:"Certificazioni ricevute",RECEIVED_BY:"Certifications ricevute da {{uid}}",ERROR:"Certificazioni ricevute per errore",SENTRY_MEMBER:"Membro referente"},OPERATIONS:{TITLE:"{{uid}} - Operazioni"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Certificazioni inviate",SUMMARY:"Certificazioni inviate",LIST:"Dettagli delle certificazioni inviate",PENDING_LIST:"Certificazioni ",SENT:"Certificazioni inviate",SENT_BY:"Certificazioni inviate da {{uid}}",ERROR:"Certificazioni inviate per errore"}},LOGIN:{TITLE:'<i class="icon ion-log-in"></i> Accedi',SCRYPT_FORM_HELP:"Accedi con tuoi dati <br> Ricordati di verificare che stai utilizzando la chiave del tuo conto.",PUBKEY_FORM_HELP:"Scrivi qui la tua chiave privata:",FILE_FORM_HELP:"Scegliere un portachiavi da utilizzare:",SCAN_FORM_HELP:"Scansiona il codice QR di un portafoglio.",SALT:"Identificativo segreto",SALT_HELP:"Identificativo segreto",SHOW_SALT:"Mostrare identificativo segreto?",PASSWORD:"Passsord",PASSWORD_HELP:"Password",PUBKEY_HELP:"Chiave pubblica, pseudonimo",NO_ACCOUNT_QUESTION:"Ancora non hai un conto?",HAVE_ACCOUNT_QUESTION:"Hai già un account?",CREATE_ACCOUNT:"Creare un conto",CREATE_FREE_ACCOUNT:"Crea un conto gratuito",FORGOTTEN_ID:"Non ricordi la password?",ASSOCIATED_PUBKEY:"Chiave pubblica:",BTN_METHODS:"Altri metodi",BTN_METHODS_DOTS:"Cambiare metodo...",METHOD_POPOVER_TITLE:"Metodi",MEMORIZE_AUTH_FILE:"Memorizzare questo portachiavi per la durata di questa sessione",SCRYPT_PARAMETERS:"Parametri (Scrypt) :",AUTO_LOGOUT:{TITLE:"Informazioni",MESSAGE:'<i class="ion-android-time"></i> Sei stato <b>sconesso/ b> automaticamente, per un periodo di inattività prolongata',BTN_RELOGIN:"Accedi",IDLE_WARNING:"Sarai disconesso in... {{countdown}}"},METHOD:{SCRYPT_DEFAULT:"Salatura standard (imp. predefinita)",SCRYPT_ADVANCED:"Salatura avanzata",FILE:"File del portachiavi",PUBKEY:"Chiave pubblica soltanto",SCAN:"Scansiona un codice QR"},SCRYPT:{SIMPLE:"Salatura leggera",DEFAULT:"Salatura standard",SECURE:"Salatura sicura",HARDEST:"Salatura più sicura",EXTREME:"Salatura estrema",USER:"Salatura personalizzata",N:"N (Loop):",r:"r (RAM):",p:"p (CPU):"},FILE:{HELP:"Format del file atteso: <b>.dunikey</b> (type PubSec). Altri formati in sviluppo (EWIF, WIF)."}},AUTH:{TITLE:'<i class="icon ion-locked"></i> Autenticazione',BTN_AUTH:"Autenticarsi",GENERAL_HELP:"Autenticati :",EXPECTED_UID_HELP:'Effettua il login nell\'account <i class="ion-person"></i> {{uid}}:',EXPECTED_PUBKEY_HELP:'Si prega di autenticarsi sul portafoglio <i class="ion-key"></i> {{pubkey|formatPubkey}}:',SCAN_FORM_HELP:"Scansiona il codice QR della <b>chiave privata</b> del portafoglio."},ACCOUNT:{TITLE:"Mio conto",BALANCE:"Saldo",LAST_TX:"Ultime transazioni",BALANCE_ACCOUNT:"Saldo del conto",NO_TX:"Nessuna transazione",SHOW_MORE_TX:"Mostrare di più",SHOW_ALL_TX:"Mostrare tutte",TX_FROM_DATE:"(limite attuale del {{fromTime|medianFromNowShort}})",PENDING_TX:"Transazioni pendenti",VALIDATING_TX:"Transazioni in corso di convalida",ERROR_TX:"Transaction non eseguite",ERROR_TX_SENT:"Transazioni inviate",PENDING_TX_RECEIVED:"Transazioni in attesa di recezione",EVENTS:"Eventi",WAITING_MEMBERSHIP:"Richiesta di certificazione inviata. In attesa di validazione.",WAITING_CERTIFICATIONS:"Hai bisogno di {{needCertificationCount}} certificazione(i) per diventare membro.",WILL_MISSING_CERTIFICATIONS:"Mancherai a breve <b>di certificazioni</b> (occorrono almeno {{willNeedCertificationCount}} altre certificazioni)",WILL_NEED_RENEW_MEMBERSHIP:"Tua certificazione <b>scaderà{{membershipExpiresIn|formatDurationTo}}</b>. Ricordati di <a ng-click=\"doQuickFix('renew')\">rinnovarla</a> prima.",NEED_RENEW_MEMBERSHIP:"You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",NO_WAITING_MEMBERSHIP:"Nessuna domanda di adesione pendente. Se desideri <b>diventare membro</b>, ricordati di <a ng-click=\"doQuickFix('membership')\">inviare tua domanda di adesione</a>.",CERTIFICATION_COUNT:"Certificazioni ricevute",CERTIFICATION_COUNT_SHORT:"Certificazioni",SIG_STOCK:"Stock di certificazioni da inviare",BTN_RECEIVE_MONEY:"Ricevere",BTN_SELECT_ALTERNATIVES_IDENTITIES:"Usare un'altra identità..",BTN_FIX_MEMBERSHIP:"Invia nuovamente di adesione...",BTN_MEMBERSHIP_RENEW:"Rinnovare adesione",BTN_MEMBERSHIP_RENEW_DOTS:"Rinnovare adesione ...",BTN_MEMBERSHIP_OUT_DOTS:"Revocare adesione...",BTN_SECURITY_DOTS:"Login e securità...",BTN_SHOW_DETAILS:"Visualizzare dati tecnici",LOCKED_OUTPUTS_POPOVER:{TITLE:"Importo bloccata",DESCRIPTION:"Ecco le condizioni per sbloccare questo importo:",DESCRIPTION_MANY:"Questa transazione è fatta da diverse parti, di cui queste sono le condizioni di sblocco:",LOCKED_AMOUNT:"Condizioni per l'importo:"},NEW:{TITLE:"Registrazione",INTRO_WARNING_TIME:"Crearsi un conto su {{name|capitalize}} è molto semplice. E consigliato prendere il giusto tempo per farlo correttamente (per evitare di dimenticare passwords, pseudonimi etc.).",INTRO_WARNING_SECURITY:"Occorre verificare che il hardware che stai utilizzando (computer, tablet, cellulare) <b>è sicuro e affidabile</b>.",INTRO_WARNING_SECURITY_HELP:"Anti-virus aggiornato, firewall abilitato, session protteta da un password o codice PIN...",INTRO_HELP:"Cliccare <b> {{'COMMON.BTN_START'|translate}}</b> per avviare la creazione del conto. Ti accompagniamo passo alla volta.",REGISTRATION_NODE:"Tua iscrizione verrà salvata dal nodo peer Duniter <b>{{server}}</b>, è verrà poi condivisa nella rete della moneta.",REGISTRATION_NODE_HELP:"Se non ti fidi di questo peer, per favore cambialo <a ng-click=\"doQuickFix('settings')\">nelle impostazioni/a> di Cesium.",SELECT_ACCOUNT_TYPE:"Scegliere un tipo di conto:",MEMBER_ACCOUNT:"Conto membro",MEMBER_ACCOUNT_TITLE:"Creare un conto membro",MEMBER_ACCOUNT_HELP:"Se non sei ancora registrato come individuo (un conto a persona soltanto).",WALLET_ACCOUNT:"Semplice portafoglio",WALLET_ACCOUNT_TITLE:"Creare un portafoglio",WALLET_ACCOUNT_HELP:"Se rappresenti un'azienda, associazione, altra ente o hai necessita di un altro portafoglio. Nessun Dividendo Universale sarà prodotto da questo conto.",SALT_WARNING:"Scegliere un identificativo segreto.<br/>E necessario per ogni connessione a questo conto.<br/><br/><b>Accertati di ricordarlo!</b>.<br/>Se lo dimentichi non ti potrà aiutare nessuno!",PASSWORD_WARNING:"Scegliere una password.<br/>E necessario per ogni connessione a questo conto.<br/><br/><b>Accertati di ricordarla!</b>.<br/>Se la dimentichi non ti potrà aiutare nessuno!",PSEUDO_WARNING:"Segliere uno pseudonimo.<br/>Puo essere utile per chi ti cerca nella rete.<br/><br/>.L'utilizzo delle<b>virgole, spazi e accenti</b> è vietato.<br/><div class='hidden-xs'><br/>Esempio: <span class='gray'>JohnDalton, JackieChan, etc.</span>",PSEUDO:"Pseudonimo",PSEUDO_HELP:"joe123",SALT_CONFIRM:"Confermare",SALT_CONFIRM_HELP:"Confermare l'identificativo segreto",PASSWORD_CONFIRM:"Confermare",PASSWORD_CONFIRM_HELP:"Confermare la password",SLIDE_6_TITLE:"Conferma:",COMPUTING_PUBKEY:"Calcolando...",LAST_SLIDE_CONGRATULATION:"Hai riempito tutti i campi richiesti.<br/><b>Puoi inviare la richiesta di creazione del conto</b>.<br/><br/>Per tua informazione, la chiave pubblica qui sotto identifica il tuo futuro conto.<br/>Puo essere communicata a chi ti deve pagare per esempio.<br/>Quando tuo conto verrà approvato potrai trovare la chiave qui <b>{{'ACCOUNT.TITLE'|translate}}</b>.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Warning:</b> tuo identificare segreto, tua password e tuo pseudonimo non si possono cambiare.<br/><b>Ricordali per sempre!</b><br/><b>Sei sicuro/a</b>di voler inviare questa richiesta di creazione di conto?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Warning:</b> tuo identificare segreto, tua password e tuo pseudonimo non si possono cambiare..<br/><b>Ricordali per sempre!</b><br/><b>Sei sicuro/a</b> di voler continuare?',CHECKING_PSEUDO:"Verificazione in corso...",PSEUDO_AVAILABLE:"Pseudonimo disponibile",PSEUDO_NOT_AVAILABLE:"Pseudonimo indisponibile",INFO_LICENSE:"TPer aderire alla moneta, ti chiediamo di leggere e accetare le condizioni della licenza.",BTN_ACCEPT:"Accetto",BTN_ACCEPT_LICENSE:"Accetto la licenza"},POPUP_REGISTER:{TITLE:"Pseudonimo",HELP:"Un pseudonimo è necessario per che gli altri ti possino trovare."},SELECT_IDENTITY_MODAL:{TITLE:"Selezionare una identità",HELP:'Più <b>identità diverse</b> sono state inviate per la chiave pubblica <span class="gray"><i class="ion-key"></i> {{pubkey|formatPubkey}}</span>.<br/>Seleziona un dossier da usare :'},SELECT_WALLET_MODAL:{TITLE:"Selezione del portafoglio"},WALLET_LIST:{TITLE:"Portafoglio secondario",BTN_NEW:"Aggiungi un portfolio",NO_WALLET:"Nessun portafoglio secondario",BTN_DELETE:"Rimuovi un portafoglio secondario ...",BTN_RENAME:"Rinominare il portafoglio",EDIT_POPOVER:{TITLE:"Rinominare il portafoglio",HELP:"Compila il nuovo nome",NAME_HELP:"Nome del portafoglio"}},SECURITY:{ADD_QUESTION:"Aggiungere domanda personalizzata",BTN_CLEAN:"Svuotare",BTN_RESET:"Reset",DOWNLOAD_REVOKE:"Salvare un file di revoca",DOWNLOAD_REVOKE_HELP:"Avere une file di revoca è necessario in caso di smarrimento dei tuoi credenziali. Ti permette <b> di rimuovere tuo conto dalla Web Of Trust</b>, per farlo tornare ad essere un semplice portafoglio.",HELP_LEVEL:"Scegliere <strong> almeno{{nb}} domande </strong> :",LEVEL:"Livello di sicurezza",LOW_LEVEL:'Basso <span class="hidden-xs">(minimo di 2 domande)</span>',MEDIUM_LEVEL:'Medio <span class="hidden-xs">(minimo di 4 domande)</span>',QUESTION_1:"Qual'era il nome del tuo miglior amico quando eri adolescente ?",QUESTION_2:"Qual'era il nome del tuo primo animale domestico?",QUESTION_3:"Qual'è il primo piatto che imparasti a cucinare?",QUESTION_4:"Qual'è il primo film che hai visto al cinema?",QUESTION_5:"Qual'era la destinazione del tuo primo volo?",QUESTION_6:"Qual'era il nome del tuo professore preferito in scuola ?",QUESTION_7:"Quale sarebbe il tuo lavoro preferito?",QUESTION_8:"Qual'è il tuo libro per bimbi preferito?",QUESTION_9:"Qual'era il marchio della tua prima macchina?",QUESTION_10:"Qual'era il tuo nomignolo da ragazzino/a ?",QUESTION_11:"Qual'era il tuo personaggio di film o attore preferito quand eri studente?",QUESTION_12:"Qual'era il tuo musicista/cantante/grupo preferito quand eri studente ?",QUESTION_13:"In che città si sono conosciuti tuoi genitori ?",QUESTION_14:"Qual'era il nome del tuo primo capo ?",QUESTION_15:"Qual'è il nome della strada dove sei cresciuto/a ?",QUESTION_16:"Qual'è il nome della tua spiaggia preferita ?",QUESTION_17:"Qual'è il primo album che ti sei comprato ?",QUESTION_18:"Qual'è il nome della squadra di sport preferita ?",QUESTION_19:"Cosa faceva tuo nonno ?",RECOVER_ID:"Ricuperare mia password...",RECOVER_ID_HELP:"Se hai un<b<file di backup dei tuoi credenziali</b>, li puoi trovare rispondendo correttamente alle tue domande personalizzate.",REVOCATION_WITH_FILE:"Revocare il mio conto membro...",REVOCATION_WITH_FILE_DESCRIPTION:"Se pensi di aver perso <b>definitivamente tuoi credenziali</b> di conto membro (o che la sicurezza del tuo conto è compromessa), puoi usare <b>il file di revoca</b> del conto <b>per forzare la sua uscita permanente dalla Tela di Fiducia</b>.",REVOCATION_WITH_FILE_HELP:"Se hai <b>definitivamente perso tuoi credenziali (o se la sicurezza del tuo conto è compromessa), puoi usare <b>il file di revoca</b> del conto <b>per uscire dalla Web Of Trust</b>.",REVOCATION_WALLET:"Revocare questo conto subito",REVOCATION_WALLET_HELP:"Richiedere la cancellazione dell'identità <b>revocherà la tua adesione alla tua rete</ b> (con certezza per il pseudonimo e la chiave pubblica associata). Il conto non potrà più produrre il Dividendo Universale.<br/>Nonostante ciò, puoi ancora usare il conto come semplice portafoglio.",REVOCATION_FILENAME:"revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",SAVE_ID:"Salvare miei credenziali...",SAVE_ID_HELP:"Creare un file di backup, per <b>ricuperare vostra password</b> (e l'identificativo segreto) <b> in caso di smarrimento</b>. Il file è <b>sicuro</ b> (cryptato) utilizzando le domande personalizzate.",STRONG_LEVEL:'Alto <span class="hidden-xs ">(minimo di 6 domande)</span>',TITLE:"Conto e sicurezza"},FILE_NAME:"{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Date",AMOUNT:"Amount",COMMENT:"Comment"}},TRANSFER:{TITLE:"Bonifico",SUB_TITLE:"Fare un bonifico",FROM:"Da",TO:"A",AMOUNT:"Importo",AMOUNT_HELP:"Importo",COMMENT:"Commenti",COMMENT_HELP:"Commenti",BTN_SEND:"Inviare",BTN_ADD_COMMENT:"Scrivere un comento ?",WARN_COMMENT_IS_PUBLIC:"Ti avvertiamo <b>che i commenti sono pubblici</b> (non cifrati).",MODAL:{TITLE:"Bonifico"}},ERROR:{POPUP_TITLE:"Errore",UNKNOWN_ERROR:"Errore",CRYPTO_UNKNOWN_ERROR:"Suo navigatore non sembra compatibile con le funzionalità di cryptografia.",EQUALS_TO_PSEUDO:"Deve essere diverso dal pseudonimo",EQUALS_TO_SALT:"Deve essere diverso dal identificativo segreto",FIELD_REQUIRED:"Campo obbligatorio.",FIELD_TOO_SHORT:"Valore troppo corto.",FIELD_TOO_SHORT_WITH_LENGTH:"Valore troppo corto ({{minLength}} caratteri min)",FIELD_TOO_LONG:"Valore troppo lungo",FIELD_TOO_LONG_WITH_LENGTH:"Valore troppo lungo ({{maxLength}} caractteri max)",FIELD_MIN:"Valore minimo : {{min}}",FIELD_MAX:"Valore massimo : {{max}}",FIELD_ACCENT:"Virgole e caratteri accentati vietati",FIELD_NOT_NUMBER:"Valore numerico atteso",FIELD_NOT_INT:"Valore intero atteso",FIELD_NOT_EMAIL:"Indirizzo mail non valido",PASSWORD_NOT_CONFIRMED:"Non corrisponde alla password.",SALT_NOT_CONFIRMED:"Non corrisponde al identificativo segreto.",SEND_IDENTITY_FAILED:"Iscrizione fallita.",SEND_CERTIFICATION_FAILED:"Certificazione fallita.",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"Non puoi inviare certificazioni perche tuo conto <b>non è ancora un conto membro</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"Non puoi inviare certificazioni adesso perche <b>non sei ancora membro</b>.<br/><br/>Devi ancora entrare nella WOT.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"Impossibile certificare questo conto. Nessuna richiesta di certificazione trovata o bisogna rinnovarla.",LOGIN_FAILED:"Errore di login.",LOAD_IDENTITY_FAILED:"Impossibile caricare la tua identità.",LOAD_REQUIREMENTS_FAILED:"Impossibile caricare i prerequisiti dell'identità.",SEND_MEMBERSHIP_IN_FAILED:"Ingresso nella WOT fallito.",SEND_MEMBERSHIP_OUT_FAILED:"Errore nel invio della revocazione.",REFRESH_WALLET_DATA:"Impossibile aggiornare il portafoglio.",GET_CURRENCY_PARAMETER:"Impossibile ricuperare i parametri della moneta.",GET_CURRENCY_FAILED:"Impossibile caricare la moneta. Riprovare più tardi.",SEND_TX_FAILED:"Impossibile eseguire la transazione.",ALL_SOURCES_USED:"Per favore aspetta il calcolo del prossimo blocco (Tutte le tue fonti di moneta sono state utilizzate).",NOT_ENOUGH_SOURCES:"Non hai abbastanza cambio per inviare questo importo in una sola transazione.<br/>Importo massimo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Errore nella creazione del tuo conto membro.",RESTORE_WALLET_DATA_ERROR:"Errore nel aggiornamento delle impostazioni definite in local storage.",LOAD_WALLET_DATA_ERROR:"Errore nel caricamento dei dati del portafoglio.",COPY_CLIPBOARD_FAILED:"Impossibile copiare al clipboard",TAKE_PICTURE_FAILED:"Impossibile ricuperare foto.",SCAN_FAILED:"Impossibile scansionare il codice QR.",SCAN_UNKNOWN_FORMAT:"Codice non riconosciuto.",WOT_LOOKUP_FAILED:"Ricerca fallita.",LOAD_PEER_DATA_FAILED:"Peer Duniter non accessibile. Riprovare più tardi.",NEED_LOGIN_FIRST:"Accedi al tuo conto prima.",AMOUNT_REQUIRED:"Importo necessario.",AMOUNT_NEGATIVE:"Importo negativo non consentito.",NOT_ENOUGH_CREDIT:"Saldo insufficiente",INVALID_NODE_SUMMARY:"Impossibile comunicare col peer o indirizzo non valido",INVALID_USER_ID:"Il campo del 'pseudonimo' non deve avere spazi vuoti o caratteri speciali.",INVALID_COMMENT:"Il formato del campo 'reference' è errato.",INVALID_PUBKEY:"If formato della chiave pubblica è errato.",IDENTITY_REVOKED:"Questa identità <b>è stata revocata</b>. Non puo più diventare membro.",IDENTITY_REVOKED_WITH_TIME:"Questa identità <b>è stata revocata {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Non puo più diventare membro.",IDENTITY_PENDING_REVOCATION:"L'<b>annulamento di questa identità</b> è stata richiesta ed è in corso di evaluazione. Capacità ad inviare certificazioni disabilitata",IDENTITY_INVALID_BLOCK_HASH:"Questa richiesta di certificazione non è più valida (perche si riferisce ad un blocco che è stato eliminato dai peers): la persona deve rinnovare la sua domanda di certificazione <b>prima</b> di essere certificata.",IDENTITY_EXPIRED:"Questa identità è scaduta: la persona deve fare una nuova domanda di certificazione <b>prima di</b> essere certificata.",IDENTITY_SANDBOX_FULL:"Il nodo Duniter utilizzato da Cesium non puo ricevere altre domande di certificazione per ora, la lista d'attesa è piena.<br/><br/>Riprova più tardi o scegli un'altro peer Duniter (nelle <b>Impostazioni</b>).",IDENTITY_NOT_FOUND:"Identità non trovata",IDENTITY_TX_FAILED:"Impossibile caricare le operazioni",WOT_PENDING_INVALID_BLOCK_HASH:"Adesione non valida.",WALLET_INVALID_BLOCK_HASH:"Tua domanda di certificazione non è più valida (perche si riferisce ad un blocco che è stato eliminato dai peers).<br/>Devi <a ng-click=\"doQuickFix('renew')\">rinnvoare la tua richiesta di adesione alla WOT</a> per risolvere il problema.",WALLET_IDENTITY_EXPIRED:"La pubblicazione della tua identità <b>è scaduta</b>.<br/>Devi <a ng-click=\"doQuickFix('fixIdentity')\">ripubblicare la tua identità</a> per risolvere il problema.",WALLET_REVOKED:"La tua identità è stata <b>revocata</b>: ne tuo pseudonimo ne tua chiave pubblica sarano utilizzati in futuro.",WALLET_HAS_NO_SELF:"La tua identità deve prima essere stata pubblicata e non essere ancora scaduta.",AUTH_REQUIRED:"Autenticazione necessaria.",AUTH_INVALID_PUBKEY:"La chiave pubblica non corrisponde al conto conesso.",AUTH_INVALID_SCRYPT:"Password o nome di utente non valido.",AUTH_INVALID_FILE:"File di portachiavi non valido.",AUTH_FILE_ERROR:"Impossibile aprire il file di portachiavi",IDENTITY_ALREADY_CERTIFY:"Hai <b>già certificato</b> questa identità.<br/><br/>Tuo certificato è ancora valido (scade {{expiresIn|formatDuration}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"Hai <b>già certificato</b> questa identità.<br/><br/>Tua certificazione è ancora pendente (Scadenza del periodo di  treatment {{expiresIn|formatDuration}}).",UNABLE_TO_CERTIFY_TITLE:"Impossibile certificare",LOAD_NEWCOMERS_FAILED:"Impossibile caricare i nuovi membri.",LOAD_PENDING_FAILED:"Impossibile caricare le certificazioni pendenti.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"Devi <b>essere membro</b> per poter fare questo.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"Devi aver <b>publiccato tua identità</b> per poter fare questo.",GET_BLOCK_FAILED:"Impossibile caricare il blocco",INVALID_BLOCK_HASH:"Blocco non trovato (hash errato)",DOWNLOAD_REVOCATION_FAILED:"Errore avvenuto nel download del file di cancellazione d'identità.",REVOCATION_FAILED:"Errore avvenuto durante la richiesta di cancellazione dell'identità.",SALT_OR_PASSWORD_NOT_CONFIRMED:"identificativo segreto o password sbagliati",RECOVER_ID_FAILED:"Impossibile ricuperare la password",LOAD_FILE_FAILED:"Impossibile caricare il file",NOT_VALID_REVOCATION_FILE:"File di cancellazione dell'identità errato (formato di file incorreto)",NOT_VALID_SAVE_ID_FILE:"File di backup dei credenziali errato (formato di file incorreto)",NOT_VALID_KEY_FILE:"File di portachiavi non valido (formato non riconosciuto)",EXISTING_ACCOUNT:"Tuoi credenziali corrispondono a quelli di un conto già esistente,di cui <a ng-click=\"showHelpModal('pubkey')\">la chiave pubblica</a> è:",EXISTING_ACCOUNT_REQUEST:"Per favore cambi tuoi credenziali in modo che corrispondino ad un conto non utilizzato.",GET_LICENSE_FILE_FAILED:"Impossibile caricare il file della licenza",CHECK_NETWORK_CONNECTION:"Nessun peer sembra disponibile.<br/><br/>Per favore <b>verifica la tua connessione Internet</b>.",ISSUE_524_TX_FAILED:"Bonifico .<br/><br/>Un message a été envoyé aux développeurs pour faciliter la résolution du problème. <b>Merci de votre aide</b>."},INFO:{POPUP_TITLE:"Informazioni",CERTIFICATION_DONE:"Identità firmata con successo",NOT_ENOUGH_CREDIT:"Saldo insufficiente",TRANSFER_SENT:"Transazione inviata con successo",COPY_TO_CLIPBOARD_DONE:"Copiato con successo",MEMBERSHIP_OUT_SENT:"Revoca dell'identità inviata",NOT_NEED_MEMBERSHIP:"Già un membro.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"Questa identità mancherà a breve di certificazioni (almeno {{willNeedCertificationCount}}).",REVOCATION_SENT:"Revoca dell'identità inviata",REVOCATION_SENT_WAITING_PROCESS:"Cancellazione dell'identità <b>inviata con successo</b>. In attesa di validazione.",FEATURES_NOT_IMPLEMENTED:"Questa funzionalità non è ancora disponibile.<br/><br/>Vuoi contribuire per velocizzarne la disponibilità? ;)",EMPTY_TX_HISTORY:"Nessuna operazione da esportare"},CONFIRM:{POPUP_TITLE:"<b>Conferma</b>",POPUP_WARNING_TITLE:"<b>Avviso</b>",POPUP_SECURITY_WARNING_TITLE:'<i class="icon ion-alert-circled"></i> <b>Avvertimento di sicurezza</b>',CERTIFY_RULES_TITLE_UID:"Certificare {{uid}}",CERTIFY_RULES:'<b class="assertive">Non certificare un conto</b> se credi che: <ul><li>1.) l\'identità della persona potrebbe essere finta.<li>2.) la oersona ha già un conto certicato.<li>3.) la persona trasgredisce la regola 1 o 2 o entrambe. (Certifica conti finti o gemelli).</ul></small><br/>Sei sicuro/a di voler certificare questa identità?',TRANSFER:"<b>Resoconto del bonifico:</b><br/><br/><ul><li> - Inviato da: <b>{{from}}</b></li><li> - A: <b>{{to}}</b></li><li> - Importo: <b>{{amount}} {{unit}}</b></li><li> - Comento: <i>{{comment}}</i></li></ul><br/><b>Sei sicuro di voler procedere con questo bonifico?</b>",MEMBERSHIP_OUT:"Questa operazione è <b>irreversibile</b>.<br/></br/><b>Sei sicuro/a di voler cancellare la tua presenza nella WOT?</b>",MEMBERSHIP_OUT_2:"Questa operazione è <b>irreversibile</b>!<br/><br/>Sei sicuro/a <b>di voler revocare la tua identità</b>?",LOGIN_UNUSED_WALLET_TITLE:"Errore di battitura?",LOGIN_UNUSED_WALLET:"Il conto sembra <b>inattivo</b>.<br/><br/>Probabilmente è un<b>errore di battitura</b> mientre digitavi i tuoi credenziali. Per favore riprova, verificando che la <b>chiave pubblica sia tua<b/>.",FIX_IDENTITY:"Lo pseudonimo <b>{{uid}}</b> verrà pubblicato nuovamente. Si sostituirà alla precedente pubblicazione che è scaduta.<br/></br/><b>Sei sicuro/a</b> di voler procedere?",FIX_MEMBERSHIP:"Tua domanda di certificazione sarà inviata alla rete.<br/></br/><b>Sei sicuro/a?</b>",MEMBERSHIP:"Tua domanda per diventare membro sta per essere inviata alla rete.<br/></br/><b>Sei sicuro/a/b> di voler continuare ?",RENEW_MEMBERSHIP:"Tua adesione verrà rinnovata.<br/></br/><b>Sei sicuro/a?</b>",REVOKE_IDENTITY:"Stai per <b>revocare definitivamente questa identità</b>.<br/><br/>La chiave pubblica e lo pseudonimo associato <b>non saranno mai più utilizzati</b> (per un conto membro).<br/></br/><b>Sei sicuro/a</b> di voler revocare questa identità?",REVOKE_IDENTITY_2:"Questa operazione è <b>irreversibile</b>!<br/><br/>Sei sicuro/a di volern<b>revocare questa identità</b>?",NOT_NEED_RENEW_MEMBERSHIP:"Tua presenza nella rete non deve ancora essere rinnovata (scaderà tra {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Sei sicuro/a</b> di voler rinnovare la tua presenza?",SAVE_BEFORE_LEAVE:"Vuoi <b>salvare tue modifiche</b> prima di uscira dalla pagina?",SAVE_BEFORE_LEAVE_TITLE:"Modifiche non salvate",LOGOUT:"Sei sicuro/a di voler chiudere la sessione?",USE_FALLBACK_NODE:"Peer <b>{{old}}</b> indisponibile o indirizzo errato.<br/><br/>Vuoi utilizzare temporanemante il <b>{{new}}</b> nodo?",INVALID_FILE_FORMAT:"Formato file non valido.",SAME_TX_RECIPIENT:"Il destinatario deve essere diverso dall'emittente."},DOWNLOAD:{POPUP_TITLE:"<b>File di cancellazione dell'identità/b>",POPUP_REVOKE_MESSAGE:"Per migliorare la sicurezza del tuo conto, scarica <b>il documento di revoca del conto</b>. Ti consentirà di revocare tuo conto (nel caso di violazione del conto, della tua identità, conto creato con errori, etc.).<br/><br/><b>Tiene questo document al sicuro.</b>"},HELP:{TITLE:"Aiuto online",JOIN:{SECTION:"Entrare nella rete",SALT:"Il tuo identificativo segreto è molto importante. E utilizzato per cryptare tua password che permette poi di calcolare tua <span class=\"text-italic\">chiave pubblica</span> (suo numero) è la chiave privata che ne consenta l'accesso.<br/><b>Ricordati bene di questo identificativo</b>, perche non ti potrà aiutare nessuno se lo perdi.<br/>Tra l'altro, non puo essere cambiato senza dover creare un conto nuovo.<br/><br/>Raccomandiamo che sia abbastanza lungo (8 caratteri almeno) è il più originale possibile. (buona entropia)",PASSWORD:"La password è molto importante, è utilizzata per calcolare tuo numero di conto (tua chiave pubblica) e la chiave privata che ne consento l'accesso.<br/><b>Ricordatila bene</b>, perche non ti potrà aiutare nessuno se lo perdi.<br/>Tra l'altro, non puo essere cambiata senza dover creare un conto nuovo.<br/><br/>Una buona password (preferibilmente) è composta da almeno 8 caratteri, con almeno una maiuscola e un numero.",PSEUDO:'Un pseudonimo è utilizzato quando ti iscrivi come <span class="text-italic">membro</span>. E sempre associato ad un portafoglio (con sua <span class="text-italic">chiave pubblica</span>).<br/>E pubblicato sulla rete perche gli altri membri possino identificarla, certificarla o invarle soldi. <br/> Lo pseudonimo deve essere unico nella rete (tra quelli utilizzati adesso e in passato).'},LOGIN:{SECTION:"Accedi",PUBKEY:"Chiave pubblica del conto",PUBKEY_DEF:'La chiave pubblica del portachiavi è generata dai credenziali, ma non corrispode ad un conto già utilizzato.<br/><b>Accertati che tua chiave pubblica corrisponda al tuo conto</b>. Nel caso contrario, sarai conesso/a ad un conto probabilmente mai usato, datto che il rischio di collisione con un conto esistente è molto ridotto.<br/><a href="https://en.wikipedia.org/wiki/Elliptic_curve_cryptography" target="_ system">Saperne di più sulla cryptografia </a> con chiave pubblica.',METHOD:"Metodi di connessione",METHOD_DEF:"Hai diverse opzioni per accedere ad un portafoglio:<br/> - Accedendo con <b>salatura (leggera o sicura)</b> tua password sarà cryptata dal tuo identificativo segreto per scoraggiare tentativi di attachi di 'brute force' (per esempio con passwords conosciute).<br/> - Accedendo con la <b>chiave pubblica</b> ti evita di dover digitare tuoi credenziali che ti saranno chiesti solo quando vorrai fare una operazione col conto.<br/> - Accedendo <b>con un portachiavi</b> che leggerà tue chiave pubbliche e private da un file esterno, senza che tu li debba entrare."},GLOSSARY:{SECTION:"Glossario",PUBKEY_DEF:"Una chiave pubblica permette di identificare un portafoglio. Puo anche identificare un membro. In Cesium  è calcolata con la password e lo pseudonimo.",MEMBER:"Membro",MEMBER_DEF:'Un membro è una persona reale e viva, che desidera participare liberamente alla communità monetaria. Questo membro riceverà un Dividendo Universale, a secondo delle regole definite <span class="text-italic">nei parametri della moneta</span>.',CURRENCY_RULES:"Regole della moneta",CURRENCY_RULES_DEF:'I parametri delle moneta sono state definite per sempre e per tutti. I parametri con i quali la moneta si comporta: il calcolo del Dividendo Universale, il numero di certificazioni necessarie per diventare membro, il numero massimo di certificazioni che un membro puo inviare, etc.<br/><br/>I parametri non possono essere modificati perche c\'è una<span class="text-italic">Blockchain</span> che implementa e esegue queste regole e verifica costantemente la loro applicazione. <a href="#/app/currency">Vedere i parametri </a>.',BLOCKCHAIN:"Blockchain",BLOCKCHAIN_DEF:'La Blockchain è un sistema decentralizzato che, nel caso di Duniter, permette di rispettare e implementare <span class="text-italic">le regole della moneta</span>.<br/><a href="http://en.duniter.org/presentation/" target="_blank">Saperne di più su Duniter</a> e il funzionamento della blockchain.',UNIVERSAL_DIVIDEND_DEF:'Il Dividendo Universale (UD) è la quantità di moneta co-creata da ogni membro, seguendo le formule mathematiche definite nelle <span class="text-italic">regole della moneta</span>.<br/>Al inizio di ogni periodo, il conto di ogni membro riceve una quantità uguale della nuova moneta creata. <br/><br/>Il DU conosce una crescita costante per rimanere equo nei confronti dei membri (attuali e passati). Viene calcolato tenendo in conto la speranza di vità media, cosi come dimostrato nella Teoria Relativa della Moneta (TRM).<br/><a href="http://trm.creationmonetaire.info" target="_system">Saperne di più sulla TRM</a> e la moneta libera.'},TIP:{MENU_BTN_CURRENCY:"Menu <b>{{'MENU.CURRENCY'|translate}}</b> permette la scoperta dei <b>parametri della moneta</b> e la sua condizione presente.",CURRENCY_WOT:"Il <b>numero di membri</b> mostra <b>le dimensioni della WoT e la sua evoluzione </b>.",CURRENCY_MASS:"In evidenza qui è <b>l'importo totale</b> attualmente in circolazione e la sua <b> ripartizione media </b> a testa.<br/><br/>Questa cifra permette di avere un'idea <b>del valore di qualsiasi importo</b>, in base a quello <b>hanno gli altri</b> sul loro conto (in media).",CURRENCY_UNIT_RELATIVE:"L'unità usata qui (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa che gli importi in {{currency|capitalize}} sono stati divisi dal <b>Dividendo Universale</b> (DU).<br/><br/><small>Questa unità relativa <b>ha senso</b> perche è stabile in contrasto con la massa monetaria che cresce costantemente.</small>",CURRENCY_CHANGE_UNIT:"Questa opzione <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permette di <b>permutare unità</b> per vedere gli importi in <b>{{currency|capitalize}}</b>, non divisi dal Dividendo Universale (piuttosto che in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"Questa opzione <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permette <b>di permutare unità</b> per vedere gli importi in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, che è relativo al Dividendo Universale (l'importo co-prodotto da ogni membro).",CURRENCY_RULES:"Le<b>regole</b> della moneta determinano il suo <b>esatto e previdibile</b> comportamento.<br/><br/> Considerate come il proprio DNA della moneta, queste regole rendono il codice monetario <b>trasparente e comprensibile</b>.",MENU_BTN_NETWORK:"Menu <b>{{'MENU.NETWORK'|translate}}</b> permette la scopertà dello <b>stato della rete<b>.",NETWORK_BLOCKCHAIN:"Tutte le transazioni monetarie sono registrate in <b>registro sicuro e a prova di manomissione</b>, spesso chiamato <b>blockchain</b>.",NETWORK_PEERS:"I<b>peers</b> mostrati qui corrispondono a <b>dei computers che aggiornano e monitorano</b> la blockchain.<br/><br/>Più peers ci sono, più <b>decentralizzata</b> e più affidabile diventa la moneta.",NETWORK_PEERS_BLOCK_NUMBER:"Questo <b>numero</b> (in verda) indica <b>l'ultimo blocco validato</b> dal peer (ultima pagina scritta nel regitro).<br/><br/>Il verda indica che il blocco è stato validato anche dalla <b>maggioranza degli altri peers</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Ogni membro</b>, che dispone di un computer connesso a Internet <b>puo partecipare, aggiungendosi come peer installando il software Duniter</b> (free/libre). <a target="_new" href="{{installDocUrl}}" target="_system">Leggi il manuale d\'installazione &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"<b>{{'ACCOUNT.TITLE'|translate}}</b> permette l'accesso al saldo del conto e la cronologia delle transazioni.",MENU_BTN_ACCOUNT_MEMBER:"Qui puoi consultare lo stato del tuo conto, la cronologia delle transazioni e le tue certificazioni.",WALLET_CERTIFICATIONS:"Clicca qui per vedere i dettagli delle tue certificazioni (date o ricevute).",WALLET_RECEIVED_CERTIFICATIONS:"Clicca qui per vedere i dettagli delle <b>certificazioni che hai ricevuto</b>.",WALLET_GIVEN_CERTIFICATIONS:"Clicca qui per vedere i dettagli delle <b>certificazioni che hai date</b>.",WALLET_BALANCE:"Il <b>soldo</b> del tuo conto è visibile qui.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>L'unità utilizzata (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa che questo importo in {{currency|capitalize}} è stato diviso dal <b>Dividendo Universale</b> (DU) co-creato da ogni membro.<br/>Ad oggi, 1 DU equivale a {{currentUD}} {{currency|capitalize}}.",WALLET_BALANCE_CHANGE_UNIT:"Puoi <b>cambiare l'unità</b> in cui sono mostrati gli importi in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Per esempio, per mostrare gli importi <b>direttamente in {{currency|capitalize}}</b> piuttosto che in unità relativa.",WALLET_PUBKEY:"Questa è la chiave pubblica del tuo conto. La puoi dare ad un terzo perche possa identificare tuo conto.",WALLET_SEND:"Paghi in pochi clics.",WALLET_SEND_NO_MONEY:"Paghi in pochi clics.<br/>(Tuo saldo ancora non lo permette)",WALLET_OPTIONS:"Questo bottone permette di fare <b>altre, meno frequenti azioni</b>.<br/><br/> Non dimenticarti di fare il tour guidato di Cesium quando hai un attimo!",WALLET_RECEIVED_CERTS:"Questo mostra l'elenco delle persone che ti hanno fatto entrare nella WoT.",WALLET_CERTIFY:"Questo bottone <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permette di selezionare e certificare una identità.<br/><br/>Solo gli utenti <b>che sono già membri</b> possono certificare gli altri.",WALLET_CERT_STOCK:"Tuo stock di certificazioni da dare è limitato a <b>{{sigStock}} certificazioni</b>.<br/><br/>Questo stock si rifornisce col tempo, man mano che le certificazioni inviate scadono.",MENU_BTN_TX:"<b>{{'MENU.TRANSACTIONS'|translate}}</b> permette l'accesso alla cronologia delle transazioni, e permette di fare nuovi bonifici.",MENU_BTN_WOT:"Il menu<b>{{'MENU.WOT'|translate}}</b> permette di cercare <b>utenti</b> della moneta (membri o non).",WOT_SEARCH_TEXT_XS:"Per fare una ricerca nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>La ricerca inizierà automaticamente.",WOT_SEARCH_TEXT:"Per cercare nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>Dopodichè calca <b>Enter</b> per avviare la ricerca.",WOT_SEARCH_RESULT:"Visualizza la scheda dettagliata di un utente con un semplice click sulla linea.",WOT_VIEW_CERTIFICATIONS:"La linea <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> mostra quanti membri hanno certificato questa identità.<br/><br/>Queste certificazioni dimostrano che il conto appartiene ad <b>una persona viva</b> e che questa persona non ha <b>nessun altro conto membro</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"Ci vogliono almeno <b>{{sigQty}} certificazioni</b> per diventare membro e co-produrre il <b>Dividendo Universale</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Clicca qui per aprire <b>una lista di tutte le certificazioni</b> ricevute e date da questa identità.",WOT_VIEW_CERTIFY:"Il bottone <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permette di aggiungere tua certificazione a questa identità.",CERTIFY_RULES:"<b>Attenzione:</b> Certifichi <b> solo persone reali e vive</b> che non hanno nessun altro conto membro.<br/><br/>L'affidabilità della moneta dipende della vigilanza di ciascuno.",MENU_BTN_SETTINGS:"Les <b>{{'MENU.SETTINGS'|translate}}</b> ti permettono di configurare Cesium.<br/><br/>Per esempio, puoi <b>cambiare l'unità</b> in cui visualizzi la moneta.",HEADER_BAR_BTN_PROFILE:"Clicca qui per entrare nel <b>tuo profilo utente</b>",SETTINGS_CHANGE_UNIT:"Puoi cambiare <b>l'unità</b> della moneta cliccando qui.<br/><br/>- Disabilita questa opzione per vedere gli importi in {{currency|capitalize}}.<br/>- Abilita l'opzione per importi relativi in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divisi</b> dal attuale Dividendo Universale).",END_LOGIN:"Il tour guidato <b>è finito</b>.<br/><br/>Benvenuto nel <b>economia libera</b>!",END_NOT_LOGIN:"Il tour guidato <b>è finito</b>.<br/><br/>Se desideri entrare nella Web of Trust {{currency|capitalize}}, basta cliccare <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> qui sotto."}},API:{COMMON:{LINK_DOC:"documentazione API",LINK_DOC_HELP:"Documentazione dello sviluppatore",LINK_STANDARD_APP:"versione classica",LINK_STANDARD_APP_HELP:"Apri la versione classica di {{'COMMON.APP_NAME'|translate}}"},HOME:{TITLE:"Documentazione API {{'COMMON.APP_NAME'|translate}}",MESSAGE:'Bienvenue dans la <b>documentation de l\'API</b> {{\'COMMON.APP_NAME\'|translate}}.<br/>Connecter vos sites web à <a href="http://duniter.org" target="_system">Duniter</a> très simplement !',MESSAGE_SHORT:'Connecter vos sites à <a href="http://duniter.org" target="_system">Duniter</a> très simplement !',DOC_HEADER:"Services disponibles :"},TRANSFER:{TITLE:"{{'COMMON.APP_NAME'|translate}} - Paiement en ligne",TITLE_SHORT:"Pagamento online",SUMMARY:"Récapitulatif de la commande :",AMOUNT:"Montant :",NAME:"Nom :",PUBKEY:"Clé publique du destinaire :",COMMENT:"Référence de la commande :",DEMO:{SALT:"demo",PASSWORD:"demo",PUBKEY:"3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",HELP:"<b>Mode démonstration</b> : Aucun paiement ne sera réellement envoyé pendant cette simulation.<br/>Veuillez utiliser les identifiants : <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",BAD_CREDENTIALS:"Vérifiez votre saisie.<br/>En mode démonstration, les identifiants sont : {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"},INFO:{SUCCESS_REDIRECTING_WITH_NAME:"Paiement envoyé.<br/>Redirection vers <b>{{name}}</b>...",SUCCESS_REDIRECTING:"Paiement envoyé.<br/>Redirection vers le site du vendeur...",CANCEL_REDIRECTING_WITH_NAME:"Paiement annulé.<br/>Redirection vers <b>{{name}}</b>...",CANCEL_REDIRECTING:"Paiement annulé.<br/>Redirection vers le site du vendeur..."},ERROR:{TRANSFER_FAILED:"Mancato pagamento"}},DOC:{DESCRIPTION_DIVIDER:"Descrizione",URL_DIVIDER:"Indirizzo chiamata",PARAMETERS_DIVIDER:"Impostazioni",AVAILABLE_PARAMETERS:"Ecco l'elenco dei parametri disponibili :",DEMO_DIVIDER:"Provare",DEMO_HELP:"Per provare questo servizio, clicca sul bottone qui a fianco. Il risultato apparirà qui sotto .",DEMO_RESULT:"Risultato della chiamata :",DEMO_SUCCEED:'<i class="icon ion-checkmark"></i> Successo !',DEMO_CANCELLED:'<i class="icon ion-close"></i> Annulato dal utente',INTEGRATE_DIVIDER:"Integrare",INTEGRATE_CODE:"Codice :",INTEGRATE_RESULT:"Previsualizzare il risultato :",INTEGRATE_PARAMETERS:"Parametri",TRANSFER:{TITLE:"Pagamenti",DESCRIPTION:"Da un sito (per es. : un sito e-commerce) si può delegare il pagamento in moneta libera a Cesium API. Per invocare l'API, basta innescare l'apertura di una pagina con questo indirizzo:",PARAM_PUBKEY:"Chiave pubblica del destinatario",PARAM_PUBKEY_HELP:"Chiave pubblica del destinatario (obliggatoria)",PARAM_AMOUNT:"Importo",PARAM_AMOUNT_HELP:"Importo della transazione (obligatorio)",PARAM_COMMENT:"Riferimento (o commento)",PARAM_COMMENT_HELP:"Riferimento o commento. Ti può aiutare per esempio a trovare tuo pagamento nella blockchain.",PARAM_NAME:"Nome (de destinatario o del sito web)",PARAM_NAME_HELP:'Nom del sito web o del destinatario chiamando l\'API. Può essere un nome leggibile ("Mio sito"), oppure l\'indirizzo http del sito ("MioSito.com").',PARAM_REDIRECT_URL:"Indirizzo web di redirezione",PARAM_REDIRECT_URL_HELP:'Indirizzo web (URL) di redirezione, chiamato dopo aver inviato il pagamento. Può includere le seguenti stringe, che saranno sostituite con i valori della transazione : "{tx}", "{hash}", "{comment}", "{amount}" e {pubkey}.',PARAM_CANCEL_URL:"Indirizzo web della cancellazione",PARAM_CANCEL_URL_HELP:'Indirizzo web (URL) in caso dell\'annullamento del pagamento dall\'utente. Può includere le seguenti stringe, che saranno sostituite dinamicamente : "{comment}", "{amount}" e {pubkey}.',EXAMPLES_HELP:"Ecco esempi di integrazione :",EXAMPLE_BUTTON:"Bottone HTML",EXAMPLE_BUTTON_DEFAULT_TEXT:"Pagare in {{currency|currencySymbol}}",EXAMPLE_BUTTON_DEFAULT_STYLE:"Stile personnalizzato",EXAMPLE_BUTTON_TEXT_HELP:"Testo del bottone",EXAMPLE_BUTTON_BG_COLOR:"Colore del fondo",EXAMPLE_BUTTON_BG_COLOR_HELP:"Per esempio: #fbc14c, black, lightgrey, rgb(180,180,180)",EXAMPLE_BUTTON_FONT_COLOR:"Colore del testo",EXAMPLE_BUTTON_FONT_COLOR_HELP:"Esempio: black, orange, rgb(180,180,180)",EXAMPLE_BUTTON_TEXT_ICON:"Icona",EXAMPLE_BUTTON_TEXT_WIDTH:"Larghezza",EXAMPLE_BUTTON_TEXT_WIDTH_HELP:"Esempio: 200px, 50%",EXAMPLE_BUTTON_ICON_NONE:"Nessuna",EXAMPLE_BUTTON_ICON_DUNITER:"Logo Duniter",EXAMPLE_BUTTON_ICON_CESIUM:"Logo Cesium",EXAMPLE_BUTTON_ICON_G1_COLOR:"Logo Ğ1",EXAMPLE_BUTTON_ICON_G1_BLACK:"Logo Ğ1 (nero)"}}}}),e.translations("nl-NL",{COMMON:{APP_NAME:"Cesium",APP_VERSION:"v{{version}}",APP_BUILD:"build {{build}}",PUBKEY:"Publieke sleutel",MEMBER:"Lid",BLOCK:"Blok",BTN_OK:"OK",BTN_YES:"Ja",BTN_NO:"Nee",BTN_SEND:"Verzenden",BTN_SEND_MONEY:"Verstuur geld",BTN_SEND_MONEY_SHORT:"Versturen",BTN_SAVE:"Opslaan",BTN_YES_SAVE:"Ja, opslaan",BTN_YES_CONTINUE:"Ja, doorgaan",BTN_SHOW:"Tonen",BTN_SHOW_PUBKEY:"Toon sleutel",BTN_RELATIVE_UNIT:"Gebruik relatieve eenheid",BTN_BACK:"Terug",BTN_NEXT:"Volgende",BTN_CANCEL:"Annuleer",BTN_CLOSE:"Sluit",BTN_LATER:"Later",BTN_LOGIN:"Aanmelden",BTN_LOGOUT:"Uitloggen",BTN_ADD_ACCOUNT:"Nieuwe Rekening",BTN_SHARE:"Delen",BTN_EDIT:"Bewerken",BTN_DELETE:"Wissen",BTN_ADD:"Toevoegen",BTN_SEARCH:"Zoeken",BTN_REFRESH:"Verwezenlijken",BTN_START:"Beginnen",BTN_CONTINUE:"Doorgaan",BTN_UNDERSTOOD:"Ik heb het begrepen",BTN_OPTIONS:"Opties",BTN_HELP_TOUR:"Rondleiding",BTN_HELP_TOUR_SCREEN:"Ontdek dit scherm",BTN_DOWNLOAD:"Downloaden",BTN_DOWNLOAD_ACCOUNT_STATEMENT:"Downloaden het rekeningoverzicht",BTN_MODIFY:"Bewerken",DAYS:"dagen",NO_ACCOUNT_QUESTION:"Nog geen lid? Registreer nu!",SEARCH_NO_RESULT:"Geen resultaten",LOADING:"Even geduld...",SEARCHING:"Zoeken...",FROM:"Van",TO:"Aan",COPY:"Kopieren",LANGUAGE:"Taal",UNIVERSAL_DIVIDEND:"Universeel dividend",UD:"UD",DATE_PATTERN:"DD-MM-YYYY HH:mm",DATE_FILE_PATTERN:"YYYY-MM-DD",DATE_SHORT_PATTERN:"DD-MM-YY",DATE_MONTH_YEAR_PATTERN:"MM-YYYY",EMPTY_PARENTHESIS:"(leeg)",UID:"Pseudoniem",ENABLE:"Geactiveerd",DISABLE:"Gedeactiveerd",RESULTS_LIST:"Resultaten:",RESULTS_COUNT:"{{count}} uitslagen",EXECUTION_TIME:"uitgevoerd in {{duration|formatDurationMs}}",SHOW_VALUES:"Toon waarden openlijk?",POPOVER_ACTIONS_TITLE:"Opties",POPOVER_FILTER_TITLE:"Filters",SHOW_MORE:"Toon meer",SHOW_MORE_COUNT:"(huidig limiet op {{limit}})",POPOVER_SHARE:{TITLE:"Delen",SHARE_ON_TWITTER:"Deel op Twitter",SHARE_ON_FACEBOOK:"Deel op Facebook",SHARE_ON_DIASPORA:"Deel op Diaspora*",SHARE_ON_GOOGLEPLUS:"Deel op Google+"}},SYSTEM:{PICTURE_CHOOSE_TYPE:"Selecteer bron:",BTN_PICTURE_GALLERY:"Gallerij",BTN_PICTURE_CAMERA:"<b>Camera</b>"},MENU:{HOME:"Welkom",WOT:"Register",CURRENCY:"Valuta",CURRENCIES:"Valuta's",ACCOUNT:"Mijn rekening",SETTINGS:"Instellingen",NETWORK:"Netwerk",TRANSACTIONS:"Mijn transacties"},ABOUT:{TITLE:"Over",LICENSE:"<b>Vrije</b> software (GNU AGPLv3 licentie).",CODE:"Broncode:",DEVELOPERS:"Ontwikkelaars:",FORUM:"Forum:",DEV_WARNING:"Waarschuwing",DEV_WARNING_MESSAGE:"Deze applicatie is nog in actieve onwikkeling.<br/>Meld ons elk pobleem!",DEV_WARNING_MESSAGE_SHORT:"Deze App is nog instabiel (in ontwikkeling).",REPORT_ISSUE:"Meld een probleem"},HOME:{TITLE:"Cesium",WELCOME:"Welkom bij de Cesium Applicatie!",MESSAGE:"Bekijk je {{currency|abbreviate}} portefeilles in real time.",BTN_REGISTRY:"Register",BTN_CURRENCY:"Verken valuta",BTN_ABOUT:"over",BTN_HELP:"Help",REPORT_ISSUE:"Meld een probleem",NOT_YOUR_ACCOUNT_QUESTION:'Is rekening <b><i class="ion-key"></i> {{pubkey|formatPubkey}}</b> niet van jou?',BTN_CHANGE_ACCOUNT:"Dze rekening ontkoppelen",CONNECTION_ERROR:'Node <b>{{server}}</b> onbereikbaar of ongeldig adres.<br/><br/>Controleer de internetverbinding, of schakel knooppunt <a class="positive" ng-click="doQuickFix(\'settings\')">in parameters</a>.'},SETTINGS:{TITLE:"Instellingen",NETWORK_SETTINGS:"Netwerk",PEER:"Duniter knooppunt adres",PEER_CHANGED_TEMPORARY:"Adres tijdelijk worden gebruikt",USE_LOCAL_STORAGE:"Lokale opslag inschakelen",USE_LOCAL_STORAGE_HELP:"Laat je instellingen opslaan",ENABLE_HELPTIP:"Contextgebonden hulp inschakelen",ENABLE_UI_EFFECTS:"Schakel visuele effecten",HISTORY_SETTINGS:"Mijn rekening",DISPLAY_UD_HISTORY:"Toon geproduceerde dividenden?",AUTHENTICATION_SETTINGS:"Authentificatie",REMEMBER_ME:"Onthoud mij",REMEMBER_ME_HELP:"Hiermee kunt u blijven altijd aangesloten (niet aanbevolen).",PLUGINS_SETTINGS:"Uitbreidingen",BTN_RESET:"Herstel standaardinstellingen",EXPERT_MODE:"Geavanceerde modus inschakelen",EXPERT_MODE_HELP:"Toon meer details",POPUP_PEER:{TITLE:"Duniter Knooppunt",HOST:"Adres",HOST_HELP:"Aadres: server:poort",USE_SSL:"Secure?",USE_SSL_HELP:"(SSL-encryptie)",BTN_SHOW_LIST:"Lijst van knooppunten"}},BLOCKCHAIN:{HASH:"Hachee : {{hash}}",VIEW:{HEADER_TITLE:"Blok #{{number}}-{{hash|formatHash}}",TITLE_CURRENT:"Huidige blok",TITLE:"Blok #{{number|formatInteger}}",COMPUTED_BY:"Berekend door het knooppunt",SHOW_RAW:"Bekijk RAW-bestand",TECHNICAL_DIVIDER:"Technische informatie",VERSION:"Format versie",HASH:"Hash berekend",UNIVERSAL_DIVIDEND_HELP:"Munt gecoproduceerd door elk van de {{membersCount}} ledental",EMPTY:"Er zijn geen gegevens in dit blok",POW_MIN:"Mminimum moeilijkheid",POW_MIN_HELP:"Moeilijkheid opgelegd hash te berekenen",DATA_DIVIDER:"Gegevens",IDENTITIES_COUNT:"Nieuwe identiteiten",JOINERS_COUNT:"Nieuwe leden",ACTIVES_COUNT:"Verlengingen",ACTIVES_COUNT_HELP:"Leden die hun lidmaatschap te vernieuwen",LEAVERS_COUNT:"Verlaters",LEAVERS_COUNT_HELP:"Leden die niet langer wenst certificering",EXCLUDED_COUNT:"Uitgesloten leden",EXCLUDED_COUNT_HELP:"Oud-leden uitgesloten door niet-verlenging of gebrek aan certificeringen",REVOKED_COUNT:"Identiteiten ingetrokken",REVOKED_COUNT_HELP:"Deze rekeningen zullen niet langer leden",TX_COUNT:"Transacties",CERT_COUNT:"Certificeringen",TX_TO_HIMSELF:"Ruil deal",TX_OUTPUT_UNLOCK_CONDITIONS:"Omstandigheden van de introductie",TX_OUTPUT_OPERATOR:{AND:"en",OR:"of"},TX_OUTPUT_FUNCTION:{SIG:"<b>handtekening</b> ",XHX:"<b>Wachtwoord</b>, wiens SHA256 =",CSV:"Geblokkeerd",CLTV:"Opgesloten"}},LOOKUP:{TITLE:"Blokken",NO_BLOCK:"Geen blok",LAST_BLOCKS:"Recente blokken :",BTN_COMPACT:"Compact"}},CURRENCY:{SELECT:{TITLE:"Valuta's",CURRENCIES:"Bekende valuta's",MEMBERS_COUNT:"{{membersCount}} leden"},VIEW:{TITLE:"Valuta",TAB_CURRENCY:"Valuta",TAB_WOT:"Gemeenschap",TAB_NETWORK:"Netwerk",CURRENCY_NAME:"Valuta naam",MEMBERS:"Ledental",MEMBERS_VARIATION:"Variatie since {{duration | formatDuration}}",MONEY_DIVIDER:"Geld",MASS:"Monetaire massa",SHARE:"Aandeel per lid",UD:"Universeel Dividend",C_ACTUAL:"Huidige toename",MEDIAN_TIME:"Blockchain tijd",POW_MIN:"Algemene moeilijkheidsgraad",MONEY_RULES_DIVIDER:"Monetaire regels",C_RULE:"Toename",UD_RULE:"Universeel dividend (formule)",SIG_QTY_RULE:"Benodigd aantal certificaties om lid te worden",SIG_STOCK:"Maximum aantal certificaties te versturen per lid",SIG_PERIOD:"Minimum vertraging tussen 2 certificaties verzonden door één en dezelfde persoon.",SIG_WINDOW:"Maximum vertraging voor een certificatie in behandeling wordt genomen",STEP_MAX:"Maximum afstand tussen elk WoT lid en een nieuw lid.",WOT_RULES_DIVIDER:"Lidmaatschapseisen",XPERCENT:"Minimum percentage schildwachten te bereiken om de afstandsregel te respecteren"}},NETWORK:{VIEW:{MEDIAN_TIME:"Blockchain tijd",LOADING_PEERS:"Even geduld...",NODE_ADDRESS:"Adres :",ENDPOINTS:{BMAS:"Endpoint (SSL)",BMATOR:"Endpoint TOR",ES_USER_API:"Knoop Cesium+"}},INFO:{ONLY_SSL_PEERS:"Les noeuds non SSL ont un affichage dégradé, car Cesium fonctionne en mode HTTPS."}},PEER:{PEERS:"Knopen",SIGNED_ON_BLOCK:"Getekend op blok",MIRROR:"spiegel",CURRENT_BLOCK:"Blok #",VIEW:{TITLE:"Knoop",OWNER:"Maakt deel uit van",SHOW_RAW_PEERING:"Zie netwerkdocument",KNOWN_PEERS:"Bekende knopen :",GENERAL_DIVIDER:"Algemene informatie",ERROR:{LOADING_TOR_NODE_ERROR:"Kan knooppunt niet worden opgehaald. De wachttijd wordt overschreden.",LOADING_NODE_ERROR:"Kan knooppunt niet worden opgehaald"}}},WOT:{SEARCH_HELP:"Zoeken (lid of publieke sleutel)",SEARCH_INIT_PHASE_WARNING:"Tijdens de pre-registratiefase, het zoeken van lopende registraties <b>kan lang</b> zijn. Dank je wel geduld...",REGISTERED_SINCE:"Registratie",REGISTERED_SINCE_BLOCK:"Geregistreerd op blok #",NO_CERTIFICATION:"Geen gevalideerde certificaties",NO_GIVEN_CERTIFICATION:"Geen uitgegeven certificaties",NOT_MEMBER_PARENTHESIS:"(niet-lid)",IDENTITY_REVOKED_PARENTHESIS:"(ingetrokken identiteit)",MEMBER_PENDING_REVOCATION_PARENTHESIS:"(intrekking in behandeling)",EXPIRE_IN:"Verloopt",NOT_WRITTEN_EXPIRE_IN:"Uiterlijke<br/>behandeling",EXPIRED:"Verlopen",PSEUDO:"Pseudoniem",SIGNED_ON_BLOCK:"Uitgegeven op block #{{block}}",WRITTEN_ON_BLOCK:"Geschreven op block #{{block}}",GENERAL_DIVIDER:"Algemene informatie",NOT_MEMBER_ACCOUNT:"Simpele rekening (geen lid)",NOT_MEMBER_ACCOUNT_HELP:"Dit is een eenvoudige rekening, zonder dat er een aanvraag voor lidmaatschap in de wacht wordt gezet.",TECHNICAL_DIVIDER:"Technische informatie",BTN_CERTIFY:"Certificeren",BTN_YES_CERTIFY:"Ja, Certificeren",BTN_SELECT_AND_CERTIFY:"Nieuwe certificatie",ACCOUNT_OPERATIONS:"Operaties op de rekening",VIEW:{POPOVER_SHARE_TITLE:"Identiteit {{title}}"},LOOKUP:{TITLE:"Register",NEWCOMERS:"Nieuwe leden:",PENDING:"Aspirant leden:",REGISTERED:"Geregistreerd {{sigDate | formatFromNow}}",MEMBER_FROM:"Lid sinds {{memberDate|medianFromNowShort}}",BTN_NEWCOMERS:"Nieuwste leden",BTN_PENDING:"Registraties in afwachting",SHOW_MORE:"Toon meer",SHOW_MORE_COUNT:"(huidige limiet op {{limit}})",NO_PENDING:"Er zijn geen registraties in afwachting gevonden.",NO_NEWCOMERS:"Er zijn geen nieuwe leden gevonden."},MODAL:{TITLE:"Zoeken"},CERTIFICATIONS:{TITLE:"{{uid}} - Certificaties",SUMMARY:"Ontvangen certificaties",LIST:"Details van ontvangen certificaties",PENDING_LIST:"Certificaties in afwachting",RECEIVED:"Ontvangen certificaties",RECEIVED_BY:"Certificaties ontvanged door {{uid}}",ERROR:"Ontvangen vertificaties met fout",SENTRY_MEMBER:"Referent lid"},GIVEN_CERTIFICATIONS:{TITLE:"{{uid}} - Verzonden certificaties",SUMMARY:"Verzonden certificaties",LIST:"Details van verzonden certificaties",PENDING_LIST:"Certificaties in afwachting",SENT:"Verzonden certificaties",SENT_BY:"Certificaties verzonden door {{uid}}",ERROR:"Verzonden certificaties met fout"}},LOGIN:{TITLE:'<i class="icon ion-locked"></i> Inloggen',SALT:"Beveiligingszin",SALT_HELP:"Zin ter beveiliging van je rekening",SHOW_SALT:"Toon de beveiligingszin",PASSWORD:"Wachtwoord",PASSWORD_HELP:"Wachtwoord ter beveiliging van je rekening",NO_ACCOUNT_QUESTION:"Nog geen rekening?",CREATE_ACCOUNT:"Open een rekening",FORGOTTEN_ID:"Wachtwoord vergeten?"},ACCOUNT:{TITLE:"Mijn rekening",BALANCE:"Saldo",LAST_TX:"Recente transacties",BALANCE_ACCOUNT:"Rekeningsaldo",NO_TX:"Geen transacties",SHOW_MORE_TX:"Show more",SHOW_ALL_TX:"Show all",TX_FROM_DATE:"(huidige limiet op {{fromTime|medianFromNowShort}})",PENDING_TX:"Transacties in afwachting",ERROR_TX:"Niet uitgevoerde transacties",ERROR_TX_SENT:"Verzonden transacties",ERROR_TX_RECEIVED:"Ontvangen transacties",EVENTS:"Gebeurtenissen",WAITING_MEMBERSHIP:"Lidmaatschapsverzoek verzonden. In afwachting van validatie.",WAITING_CERTIFICATIONS:"Je hebt {{needCertificationCount}} certificatie(s) nodig om lid te worden",WILL_MISSING_CERTIFICATIONS:"Je heeft binnenkort <b>onvoldoende certificaties</b> (ten minste {{willNeedCertificationCount}} benodigd)",WILL_NEED_RENEW_MEMBERSHIP:"Je lidmaatschap <b>gaat verlopen op {{membershipExpiresIn|formatDurationTo}}</b>. Vergeet niet <a ng-click=\"doQuickFix('renew')\">je lidmaatschap te vernieuwen</a> voor die tijd.",CERTIFICATION_COUNT:"Aantal certificaties",CERTIFICATION_COUNT_SHORT:"Certificaties",SIG_STOCK:"Voorraad uit te geven certificaties",BTN_RECEIVE_MONEY:"Ontvangen",BTN_MEMBERSHIP_IN_DOTS:"Lidmaatschap aanvragen...",BTN_MEMBERSHIP_RENEW:"Lidmaatschap verlengen",BTN_MEMBERSHIP_RENEW_DOTS:"Lidmaatschap verlengen...",BTN_MEMBERSHIP_OUT_DOTS:"Lidmaatschap opzeggen...",BTN_SEND_IDENTITY_DOTS:"Identiteit publiceren...",BTN_SECURITY_DOTS:"Rekening en veiligheid...",BTN_SHOW_DETAILS:"Tonen technische informatie",BTN_REVOKE:"Deze identiteit<span class='hidden-xs hidden-sm'> definitief</span> opzeggen...",NEW:{TITLE:"Registratie",SLIDE_1_TITLE:"Selecteer een valuta:",SLIDE_2_TITLE:"Soort rekening:",MEMBER_ACCOUNT:"Persoonlijke rekening (lidmaatschap)",MEMBER_ACCOUNT_HELP:"Als je nog niet als individu geregistreerd bent (één rekening per individu mogelijk).",WALLET_ACCOUNT:"Eenvoudige portefeille",WALLET_ACCOUNT_HELP:"Als je een onderneming, stichting etc. vertegenwoordigd of eenvoudigweg een additionele portefeille nodig hebt. Geen individueel universeel dividend zal door deze rekening gecréeerd worden.",SALT_WARNING:"Kies een beveiligingszin.<br/>Deze heb je nodig voor ieder verbinding met je rekening.<br/><br/><b>Zorg dat je deze zin goed onthoud</b>.<br/>Eenmaal verloren, is er geen mogelijkheid om hem te achterhalen!",PASSWORD_WARNING:"Kies een wachtwoord.<br/>Deze heb je nodig voor ieder verbinding met je rekening.<br/><br/><b>Zorg dat je dit woord goed onthoud</b>.<br/>Eenmaal verloren, is er geen mogelijkheid om hem te achterhalen!",PSEUDO_WARNING:"Kies een pseudoniem.<br/>Het dient om makkelijker gevonden te worden door anderen.<br/><br/>.Gebruik van spaties, komma's en accenten is niet toegestaan.<br/><div class='hidden-xs'><br/>Voorbeeld: <span class='gray'>JulesDeelder, JohanVermeer, etc.</span>",PSEUDO:"Pseudoniem",PSEUDO_HELP:"joe123",SALT_CONFIRM:"Bevestig",SALT_CONFIRM_HELP:"Bevestig de beveiligingszin",PASSWORD_CONFIRM:"Bevestig",PASSWORD_CONFIRM_HELP:"Bevestig het wachtwoord",SLIDE_6_TITLE:"Bevestiging:",COMPUTING_PUBKEY:"Berekening...",LAST_SLIDE_CONGRATULATION:"Bravo! Je hebt alle verplichte velden ingevuld.<br/>Je kunt je <b>rekeningaanvraag verzenden</b>.<br/><br/>Ter informatie, de publieke sleutel hieronder identificeert je toekomstige rekening.<br/>Je kunt deze aan derde partijen communiceren om geld te ontvangen. Zodra je rekening geopend is, kun je de sleutel terugvinden onder <b>{{'ACCOUNT.TITLE'|translate}}</b>.",CONFIRMATION_MEMBER_ACCOUNT:'<b class="assertive">Waarschuwing:</b> je beveiligingszin, wachtwoord en pseudoniem kunnen hierna niet gewijzigd worden.<br/><b>Zorg dat ze goed onthoudt!</b><br/><b>Weet je zeker</b> dat je je persoonlijke rekeningaanvraag wil verzenden?',CONFIRMATION_WALLET_ACCOUNT:'<b class="assertive">Waarschuwing:</b> je wachtwoord en pseudoniem kunnen hierna niet gewijzigd worden.<br/><b>Zorg dat ze goed onthoudt!</b><br/><b>Weet je zeker</b> dat je deze portefeilleaanvraag wil verzenden?',PSEUDO_AVAILABLE:"Deze naam is beschikbaar",PSEUDO_NOT_AVAILABLE:"Deze gebruikersnaam is niet beschikbaar",INFO_LICENSE:"Om de valuta te sluiten, vragen wij u om te lezen en deze licentie te accepteren.",BTN_ACCEPT:"Ik accepteer",BTN_ACCEPT_LICENSE:"Ik ga akkoord met de licentie"},POPUP_REGISTER:{TITLE:"Voer een pseudoniem in",HELP:"Een pseudoniem is nodig voor anderen om je te kunnen vinden."},FILE_NAME:"{{currency}} - Rekeningafschrift {{pubkey|formatPubkey}} {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Datum",AMOUNT:"Bedrag",COMMENT:"Commentaar"}},TRANSFER:{TITLE:"Overboeken",SUB_TITLE:"Geld overboeken",FROM:"Van",TO:"Aan",AMOUNT:"Bedrag",AMOUNT_HELP:"Bedrag",COMMENT:"Opmerking",COMMENT_HELP:"Opmerking (optioneel)",BTN_SEND:"Verzenden",BTN_ADD_COMMENT:"Opmerking toevoegen",WARN_COMMENT_IS_PUBLIC:"Houd er rekening mee dat <b>reacties openbaar zijn </b> (niet-versleuteld).",MODAL:{TITLE:"Overboeking"}},ERROR:{POPUP_TITLE:"Error",UNKNOWN_ERROR:"Unknown error",CRYPTO_UNKNOWN_ERROR:"Your browser is not compatible with cryptographic features.",FIELD_REQUIRED:"This field is required.",FIELD_TOO_SHORT:"Value is too short (min {{minLength]] characters).",FIELD_TOO_SHORT_WITH_LENGTH:"This field value is too short.",FIELD_TOO_LONG:"Value is exceeding max length.",FIELD_TOO_LONG_WITH_LENGTH:"Value is too long (max {{maxLength}} characters).",FIELD_ACCENT:"Commas and accent characters not allowed",FIELD_NOT_NUMBER:"Value is not a number",FIELD_NOT_INT:"Value is not an integer",PASSWORD_NOT_CONFIRMED:"Must match previous password.",SALT_NOT_CONFIRMED:"Must match previous phrase.",SEND_IDENTITY_FAILED:"Error while trying to register.",SEND_CERTIFICATION_FAILED:"Could not certify identity.",NEED_MEMBER_ACCOUNT_TO_CERTIFY:"You could not send certification, because your account is <b>not a member account</b>.",NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF:"You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",IDENTITY_TO_CERTIFY_HAS_NO_SELF:"This account could not be certified. No registration found, or need to renew.",LOGIN_FAILED:"Error while sign in.",LOAD_IDENTITY_FAILED:"Could not load identity.",LOAD_REQUIREMENTS_FAILED:"Could not load identity requirements.",SEND_MEMBERSHIP_IN_FAILED:"Error while sending registration as member.",SEND_MEMBERSHIP_OUT_FAILED:"Error while sending membership revocation.",REFRESH_WALLET_DATA:"Could not refresh wallet.",GET_CURRENCY_PARAMETER:"Could not get currency parameters.",GET_CURRENCY_FAILED:"Could not load currency.",SEND_TX_FAILED:"Could not send transaction.",ALL_SOURCES_USED:"Please wait the next block computation (All transaction sources has been used).",NOT_ENOUGH_SOURCES:"Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",ACCOUNT_CREATION_FAILED:"Error while creating your member account.",RESTORE_WALLET_DATA_ERROR:"Error while reloading settings from local storage",LOAD_WALLET_DATA_ERROR:"Error while loading wallet data.",COPY_CLIPBOARD_FAILED:"Could not copy to clipboard",TAKE_PICTURE_FAILED:"Could not get picture.",SCAN_FAILED:"Could not scan QR code.",SCAN_UNKNOWN_FORMAT:"Code not recognized.",WOT_LOOKUP_FAILED:"Search failed.",LOAD_PEER_DATA_FAILED:"Duniter peer not accessible. Please retry later.",NEED_LOGIN_FIRST:"Please sign in first.",AMOUNT_REQUIRED:"Amount is required.",AMOUNT_NEGATIVE:"Negative amount not allowed.",NOT_ENOUGH_CREDIT:"Not enough credit.",INVALID_NODE_SUMMARY:"Unreachable peer or invalid address",INVALID_USER_ID:"Field 'pseudonym' must not contains spaces or special characters.",INVALID_COMMENT:"Field 'reference' has a bad format.",INVALID_PUBKEY:"Public key has a bad format.",IDENTITY_INVALID_BLOCK_HASH:"This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",IDENTITY_EXPIRED:"This identity has expired: this person must re-apply <b>before</b> being certified.",IDENTITY_SANDBOX_FULL:"Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",WOT_PENDING_INVALID_BLOCK_HASH:"Membership not valid.",WALLET_INVALID_BLOCK_HASH:"Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",WALLET_IDENTITY_EXPIRED:"The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",WALLET_HAS_NO_SELF:"Your identity must first have been published, and not expired.",IDENTITY_ALREADY_CERTIFY:"You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",IDENTITY_ALREADY_CERTIFY_PENDING:"You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",UNABLE_TO_CERTIFY_TITLE:"Unable to certify",LOAD_NEWCOMERS_FAILED:"Unable to load new members.",LOAD_PENDING_FAILED:"Unable to load pending registrations.",ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION:"You must <b>be a member</b> in order to perform this action.",ONLY_SELF_CAN_EXECUTE_THIS_ACTION:"You must have <b>published your identity</b> in order to perform this action.",EXISTING_ACCOUNT:"Je gegevens komen overeen met een bestaande rekening, met de <a ng-click=\"showHelpModal('pubkey')\">publieke sleutel</a>:",EXISTING_ACCOUNT_REQUEST:"Gelieve je gegevens te wijzigen zodat ze met een niet gebruikte rekening overeenkomen."},INFO:{POPUP_TITLE:"Informatie",CERTIFICATION_DONE:"Identiteit succesvol getekend",NOT_ENOUGH_CREDIT:"Niet genoeg krediet",TRANSFER_SENT:"Verzoek tot overboeken succesvol verzonden",COPY_TO_CLIPBOARD_DONE:"Kopie geslaagd",MEMBERSHIP_OUT_SENT:"Opzegging lidmaatschap succesvol verzonden",NOT_NEED_MEMBERSHIP:"Je bent al lid.",IDENTITY_WILL_MISSING_CERTIFICATIONS:"Deze identiteit heeft binnenkort onvoldoende certificaties (ten minste {{willNeedCertificationCount}} nodig)."},CONFIRM:{POPUP_TITLE:"<b>Bevestiging</b>",POPUP_WARNING_TITLE:"<b>Waarschuwing</b>",CERTIFY_RULES_TITLE_UID:"Certificeer {{uid}}",CERTIFY_RULES:'<b>Beveiligingswaarschuwing:</b><br/><br/><b class="assertive">Certificeer een rekening niet</b> als je gelooft dat: <ul><li>1.) de aanvrager niet echt is.<li>2.) de aanvrager al een andere gecertificeerde rekening heeft.<li>3.) de aanvrager opzettelijk of door onzorgvuldigheid regel 1 of 2 overtreedt bij het verzenden van certificaten.</ul></small><br/>Weet je zeker dat je deze identieit wilt certificeren?',TRANSFER:"<b>Samenvatting van de overboeking:</b><br/><br/><ul><li> - Van: <b>{{from}}</b></li><li> - Aan: <b>{{to}}</b></li><li> - Bedrag: <b>{{amount}} {{unit}}</b></li><li> - Opmerking: <i>{{comment}}</i></li></ul><br/><b>Weet je zeker dat je deze overboeking wil doen?</b>",MEMBERSHIP_OUT:"<b>Waarschuwing</b>:<br/>Je staat op het punt je lidmaatschap te beëindigen. Dit kan <b>niet ongedaan</b> worden gemaakt.<br/></br/><b>Weet je zeker dat je door wil gaan?</b>",LOGIN_UNUSED_WALLET_TITLE:"Typefout?",LOGIN_UNUSED_WALLET:"Je bent ingelogged op een rekening die <b>inactief</b> lijkt te zijn.<br/><br/>Als deze rekening niet met de jouwe overeenkomt, komt dat waarschijnlijk door een <b>typefout</b> bij het inloggen.<br/><br/><b>Wilt u toch doorgaan met deze rekening?</b>",FIX_IDENTITY:"De pseudoniem <b>{{uid}}</b> zal opnieuw gepubliceerd worden, waarmee de oude verlopen publicatie wordt vervangen.<br/></br/><bWeet je zeker</b> dat je door wil gaan?",FIX_MEMBERSHIP:"Je verzoek to lidmaatschap zal verstuurd worden.<br/></br/><b>Weet je het zeker?</b>",RENEW_MEMBERSHIP:"Je lidmaatschap zal verlengd worden.<br/></br/><b>Weet je het zeker?</b>",REVOKE_IDENTITY:"<b>Beveiligingswaarschuwing:</b><br/>You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated nickname <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to continue?",REVOKE_IDENTITY_2:"Deze handeling is <b>niet terug te draaien</b>!<br/><br/><b>Weet je zeker</b> dat je door wil gaan?",NOT_NEED_RENEW_MEMBERSHIP:"Je lidmaatschap hoeft niet verlengd te worden (het zal pas verlopen na {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Weet je zeker</b> dat je een verlengingsaanvraag wil versturen?",SAVE_BEFORE_LEAVE:"Wil je <b>je wijzigingen opslaan</b> voor je de pagina verlaat?",SAVE_BEFORE_LEAVE_TITLE:"Wijzigingen niet opgeslagen",LICENCE:"Ik heb gelezen en geaccepteerd de voorwaarden van de vergunning G1"},DOWNLOAD:{POPUP_TITLE:"<b>Intrekkingsdocument</b>",POPUP_REVOKE_MESSAGE:"Om je rekening te beveiligen, download het <b>rekening intrekkingsdocument</b>. Dit heb je nodig om je rekening op te heffen (in het geval van diefstal, een verandering van ID, een ten onrechte gemaakte rekening, etc.).<br/><br/><b>Bewaar deze op een veilige plaats.</b>"},HELP:{TITLE:"Online help",JOIN:{SECTION:"Join",SALT:'The protection phrase is very important. It is used to hash you password, which in turn is used to calculate your <span class="text-italic">public account key</span> (its number) and the private key to access it. <b>Please remeber this phrase well</b>, because there is no way to recover it when lost. What\'s more, it cannot be changed without having to create a new account.<br/><br/>A good protection phrase must be sufficiently long (8 characters at the very least) and as original as possible.',PASSWORD:"The password is very important. Together with the protection phrase, it is use to calculate your account number (public key) and the private key to access it. <b>Please remember it well</b>, because there is no way to recover it when lost. What's more, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",PSEUDO:'A pseudonym is used only when joining as <span class="text-italic">member</span>. It is always associated with a wallet (by its <span class="text-italic">public key</span>). It is published on the network so that other users may identify it, certify or send money to the account. A pseudonym must be unique among all members (current and past).'},GLOSSARY:{SECTION:"Glossary",PUBKEY_DEF:"Een publieke sleutel identificeert altijd een portemonnee. Het kan een lid identificeren. In Cesium wordt berekend met de geheime ID en wachtwoord.",MEMBER:"Member",MEMBER_DEF:'A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class="text-italic">currency parameters</span>.',CURRENCY_RULES:"Currency rules",CURRENCY_RULES_DEF:'The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class="text-italic">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href="#/app/currency">See current parameters</a>.',BLOCKCHAIN:"Blockchain",BLOCKCHAIN_DEF:'The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class="text-italic">currency rules</span>.<br/><a href="http://en.duniter.org/presentation/" target="_blank">Read more about Duniter</a> and the working of its blockchain.',UNIVERSAL_DIVIDEND_DEF:'The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class="text-italic">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href="http://trm.creationmonetaire.info" target="_system">Read more about RTM</a> and open money.'},TIP:{MENU_BTN_CURRENCY:"Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",CURRENCY_WOT:"The <b>member count</b> shows the <b>community's weight and evolution</b>.",CURRENCY_MASS:"Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",CURRENCY_UNIT_RELATIVE:"The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",CURRENCY_CHANGE_UNIT:"This button allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",CURRENCY_CHANGE_UNIT_TO_RELATIVE:"This button allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",CURRENCY_RULES:"The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",NETWORK_BLOCKCHAIN:"All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",NETWORK_PEERS:"The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",NETWORK_PEERS_BLOCK_NUMBER:"This <b>number</b> indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",NETWORK_PEERS_PARTICIPATE:'<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre and open source). <a href="{{installDocUrl}}" target="_system">Read the installation manual &gt;&gt;</a>.',MENU_BTN_ACCOUNT:"<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",MENU_BTN_ACCOUNT_MEMBER:"Here you can consult your account status, transaction history and your certifications.",WALLET_CERTIFICATIONS:"Click here to reveiw the details of your certifications (given and received).",WALLET_BALANCE:"Your account <b>balance</b> is shown here.",WALLET_BALANCE_RELATIVE:"{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",WALLET_BALANCE_CHANGE_UNIT:"You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",WALLET_SEND:"Issue a payment in just a few clicks.",WALLET_SEND_NO_MONEY:"Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",WALLET_OPTIONS:"Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",WALLET_RECEIVED_CERTS:"This shows the list of persons that certified you.",WALLET_CERTIFY:"The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",WALLET_CERT_STOCK:"Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",MENU_BTN_WOT:"The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",WOT_SEARCH_TEXT_XS:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",WOT_SEARCH_TEXT:"To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",WOT_SEARCH_RESULT:"Simply click a user row to view the details sheet.",WOT_VIEW_CERTIFICATIONS:"The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",WOT_VIEW_CERTIFICATIONS_COUNT:"There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",WOT_VIEW_CERTIFICATIONS_CLICK:"Click here to open <b>a list of all certifications</b> given to and by this identity.",WOT_VIEW_CERTIFY:"The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",CERTIFY_RULES:"<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",MENU_BTN_SETTINGS:"The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",HEADER_BAR_BTN_PROFILE:"Click here to access your <b>user profile</b>",SETTINGS_CHANGE_UNIT:"You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",END_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",END_NOT_LOGIN:"This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below."}}})}]),angular.module("cesium.plugins",["cesium.plugins.translations","cesium.plugins.templates","cesium.graph.plugin","cesium.es.plugin","cesium.map.plugin"]),angular.module("cesium.plugins.translations",[]).config(["$translateProvider",function(e){e.translations("en-GB",{COMMON:{CATEGORY:"Category",CATEGORIES:"Categories",CATEGORY_SEARCH_HELP:"Search",COMMENT_HELP:"Comments",LAST_MODIFICATION_DATE:"Updated on ",SUBMIT_BY:"Submitted by",BTN_LIKE:"I like",BTN_LIKE_REMOVE:"I don't like anymore",LIKES_TEXT:"{{total}} {{total > 1 ? 'people' : 'person'}} liked this page",ABUSES_TEXT:"{{total}} {{total > 1 ? 'people' : 'person'}} reported a problem on this page",BTN_REPORT_ABUSE_DOTS:"Report a problem or an abuse...",BTN_REMOVE_REPORTED_ABUSE:"Cancel my problem report",BTN_PUBLISH:"Publish",BTN_PICTURE_DELETE:"Delete",BTN_PICTURE_FAVORISE:"Default",BTN_PICTURE_ROTATE:"Rotate",BTN_ADD_PICTURE:"Add picture",NOTIFICATION:{TITLE:"New notification | {{'COMMON.APP_NAME'|translate}}",HAS_UNREAD:"You have {{count}} unread notification{{count>0?'s':''}}"},NOTIFICATIONS:{TITLE:"Notifications",MARK_ALL_AS_READ:"Mark all as read",NO_RESULT:"No notification",SHOW_ALL:"Show all",LOAD_NOTIFICATIONS_FAILED:"Could not load notifications"},REPORT_ABUSE:{TITLE:"Report a problem",SUB_TITLE:"Please explain briefly the problem:",REASON_HELP:"I explain the problem...",ASK_DELETE:"Request removal?",CONFIRM:{SENT:"Request sent. Thnak you!"}}},MENU:{REGISTRY:"Pages",USER_PROFILE:"My Profile",MESSAGES:"Messages",NOTIFICATIONS:"Notifications",INVITATIONS:"Invitations"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Account for an organization",ORGANIZATION_ACCOUNT_HELP:"If you represent a company, association, etc.<br/>No universal dividend will be created by this account."},EVENT:{MEMBER_WITHOUT_PROFILE:'You can <a ui-sref="app.edit_profile">fill your Cesium+ profile</a> (optional) to provide better visibility of your account. This profile will be stored in <b>a directory independent</b> of the currency, but decentralized.'},ERROR:{WS_CONNECTION_FAILED:"Cesium can not receive notifications because of a technical error (connection to the Cesium + data node).<br/><br/>If the problem persists, please <b>choose another data node</b> in Cesium+ settings."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Suggest identities to certify...",BTN_ASK_CERTIFICATIONS_DOTS:"Ask members to certify me...",BTN_ASK_CERTIFICATION:"Ask a certification",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Suggest certifications",HELP:"Select your suggestions"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Ask certifications",HELP:"Select recipients"},SEARCH:{DIVIDER_PROFILE:"Accounts",DIVIDER_PAGE:"Pages",DIVIDER_GROUP:"Groups"},CONFIRM:{SUGGEST_CERTIFICATIONS:"Are you sure you want <b>to send these certification suggestions</b>?",ASK_CERTIFICATION:"Are you sure you want to <b>send a certification request</b>?",ASK_CERTIFICATIONS:"Are you sure you want to <b>send a certification request</b> to these people?"}},INVITATION:{TITLE:"Invitations",NO_RESULT:"No invitation received",BTN_DELETE_ALL:"Delete all invitations",BTN_DELETE:"Delete invitation",BTN_NEW_INVITATION:"New invitation",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> asks for your certification',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> is suggested for certification',SUGGESTED_BY:'Suggestion sent by <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Invitations"},LIST:{TITLE:"Invitations"},NEW:{TITLE:"New invitation",RECIPIENTS:"A",RECIPIENTS_HELP:"Recipients of the invitation",RECIPIENTS_MODAL_TITLE:"Recipients",RECIPIENTS_MODAL_HELP:"Please choose recipients:",SUGGESTION_IDENTITIES:"Suggestions for certification",SUGGESTION_IDENTITIES_HELP:"Certifications to suggest",SUGGESTION_IDENTITIES_MODAL_TITLE:"Suggestions",SUGGESTION_IDENTITIES_MODAL_HELP:"Please choose your suggestions:"},CONFIRM:{DELETE_ALL_CONFIRMATION:"Removing invitations is <b>an irreversible operation</b>.<br/><br/><b>Are you sure</b> you want to continue",SEND_INVITATIONS_TO_CERTIFY:"<b>Are you sure</b> you want <b>to sent this invitation to certify</b> ?"},INFO:{INVITATION_SENT:"Invitation sent"},ERROR:{LOAD_INVITATIONS_FAILED:"Error while loading invitations",REMOVE_INVITATION_FAILED:"Error while deleting the invitation",REMOVE_ALL_INVITATIONS_FAILED:"Error while deleting invitations",SEND_INVITATION_FAILED:"Error while sending invitation",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invitation unreadable (format unknown)</span> - sent by <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Comments",SHOW_MORE_COMMENTS:"Show previous comments",COMMENT_HELP:"Your comment, question...",COMMENT_HELP_REPLY_TO:"Your answer...",BTN_SEND:"Send",POPOVER_SHARE_TITLE:"Message #{{number}}",REPLY:"Reply",REPLY_TO:"Respond to:",REPLY_TO_LINK:"In response to ",REPLY_TO_DELETED_COMMENT:"In response to a deleted comment",REPLY_COUNT:"{{replyCount}} responses",DELETED_COMMENT:"Comment deleted",MODIFIED_ON:"modified on {{time|formatDate}}",MODIFIED_PARENTHESIS:"(modified then)",ERROR:{FAILED_SAVE_COMMENT:"Saving comment failed",FAILED_REMOVE_COMMENT:"Deleting comment failed"}},MESSAGE:{REPLY_TITLE_PREFIX:"Re: ",FORWARD_TITLE_PREFIX:"Fw: ",BTN_REPLY:"Reply",BTN_COMPOSE:"New message",BTN_WRITE:"Write",NO_MESSAGE_INBOX:"No message received",NO_MESSAGE_OUTBOX:"No message sent",NOTIFICATIONS:{TITLE:"Messages",MESSAGE_RECEIVED:"You <b>received a message</b><br/>from"},LIST:{INBOX:"Inbox",OUTBOX:"Outbox",LAST_INBOX:"New messages",LAST_OUTBOX:"Sent messages",BTN_LAST_MESSAGES:"Recent messages",TITLE:"Private messages",SEARCH_HELP:"Search in messages",POPOVER_ACTIONS:{TITLE:"Options",DELETE_ALL:"Delete all messages"}},COMPOSE:{TITLE:"New message",TITLE_REPLY:"Reply",SUB_TITLE:"New message",TO:"To",OBJECT:"Object",OBJECT_HELP:"Object",ENCRYPTED_HELP:"Please note this message will be encrypted before sending so that only the recipient can read it and be sure you are the author.",MESSAGE:"Message",MESSAGE_HELP:"Message content",CONTENT_CONFIRMATION:"No message content.<br/><br/>Are your sure you want to send this message?"},VIEW:{TITLE:"Message",SENDER:"Sent by",RECIPIENT:"Sent to",NO_CONTENT:"Empty message",DELETE:"Delete the message"},CONFIRM:{REMOVE:"Are you sure you want to <b>delete this message</b>?<br/><br/> This operation is irreversible.",REMOVE_ALL:"Are you sure you want to <b>delete all messages</b>?<br/><br/> This operation is irreversible.",MARK_ALL_AS_READ:"Are you sure you want to <b>mark all message as read</b>?",USER_HAS_NO_PROFILE:"This identity has no Cesium + profile. It may not use the Cesium + extension, so it <b>will not read your message</b>.<br/><br/>Are you sure you want <b>to continue</b>?"},INFO:{MESSAGE_REMOVED:"Message successfully deleted",All_MESSAGE_REMOVED:"Messages successfully deleted",MESSAGE_SENT:"Message sent"},ERROR:{SEND_MSG_FAILED:"Error while sending message.",LOAD_MESSAGES_FAILED:"Error while loading messages.",LOAD_MESSAGE_FAILED:"Error while loading message.",MESSAGE_NOT_READABLE:"Unable to read message.",USER_NOT_RECIPIENT:"You are not the recipient of this message: unable to read it.",NOT_AUTHENTICATED_MESSAGE:"The authenticity of the message is not certain or its content is corrupted.",REMOVE_MESSAGE_FAILED:"Error while deleting message",MESSAGE_CONTENT_TOO_LONG:"Value too long ({{maxLength}} characters max).",MARK_AS_READ_FAILED:"Unable to mark the message as 'read'.",LOAD_NOTIFICATIONS_FAILED:"Error while loading messages notifications.",REMOVE_All_MESSAGES_FAILED:"Error while removing all messages.",MARK_ALL_AS_READ_FAILED:"Error while marking messages as read.",RECIPIENT_IS_MANDATORY:"Recipient is mandatory."}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Block number, hash...",POPOVER_FILTER_TITLE:"Filter",HEADER_MEDIAN_TIME:"Date / Time",HEADER_BLOCK:"Block #",HEADER_ISSUER:"Peer owner",BTN_LAST:"Last blocks",DISPLAY_QUERY:"View query",HIDE_QUERY:"Hide query",TX_SEARCH_FILTER:{MEMBER_FLOWS:'<b class="ion-person"></b> Members input/output',EXISTING_TRANSACTION:'<b class="ion-card"></b> Having transactions',
-PERIOD:'<b class="ion-clock"></b> Between <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) and <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Computed by {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Transactions concerning <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Error while searching blocks."}},REGISTRY:{CATEGORY:"Main activity",GENERAL_DIVIDER:"Basic information",LOCATION_DIVIDER:"Address",SOCIAL_NETWORKS_DIVIDER:"Social networks, web sites",TECHNICAL_DIVIDER:"Technical data",BTN_SHOW_WOT:"People",BTN_SHOW_WOT_HELP:"Search for people",BTN_SHOW_PAGES:"Pages",BTN_SHOW_PAGES_HELP:"Search for pages",BTN_NEW:"New page",MY_PAGES:"My pages",NO_PAGE:"No page",SEARCH:{TITLE:"Pages",SEARCH_HELP:"What, Who: hairdresser, Lili's restaurant, ...",BTN_ADD:"New",BTN_LAST_RECORDS:"Recent pages",BTN_ADVANCED_SEARCH:"Advanced search",BTN_OPTIONS:"Advanced search",TYPE:"Kind of organization",LOCATION_HELP:"Where: City, Country",RESULTS:"Results",RESULT_COUNT_LOCATION:"{{count}} result{{count>0?'s':''}}, near {{location}}",RESULT_COUNT:"{{count}} result{{count>0?'s':''}}",LAST_RECORDS:"Recent pages",LAST_RECORD_COUNT_LOCATION:"{{count}} recent page{{count>0?'s':''}}, near {{location}}",LAST_RECORD_COUNT:"{{count}} recent page{{count>0?'s':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Advanced options?"}},VIEW:{TITLE:"Registry",CATEGORY:"Main activity:",LOCATION:"Address:",MENU_TITLE:"Options",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Are you sure you want to delete this reference?<br/><br/>This is irreversible."},TYPE:{TITLE:"New page",SELECT_TYPE:"Kind of organization:",ENUM:{SHOP:"Local shops",COMPANY:"Company",ASSOCIATION:"Association",INSTITUTION:"Institution"}},EDIT:{TITLE:"Edit",TITLE_NEW:"New page",RECORD_TYPE:"Kind of organization",RECORD_TITLE:"Name",RECORD_TITLE_HELP:"Name",RECORD_DESCRIPTION:"Description",RECORD_DESCRIPTION_HELP:"Describe activity",RECORD_ADDRESS:"Street",RECORD_ADDRESS_HELP:"Street, building...",RECORD_CITY:"City",RECORD_CITY_HELP:"City, Country",RECORD_SOCIAL_NETWORKS:"Social networks and web site",RECORD_PUBKEY:"Public key",RECORD_PUBKEY_HELP:"Public key to receive payments"},WALLET:{PAGE_DIVIDER:"Pages",PAGE_DIVIDER_HELP:'Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref="app.es_network">the Cesium+ network</a>.'},ERROR:{LOAD_CATEGORY_FAILED:"Loading main activities failed",LOAD_RECORD_FAILED:"Loading failed",LOOKUP_RECORDS_FAILED:"Error while loading records.",REMOVE_RECORD_FAILED:"Deleting failed",SAVE_RECORD_FAILED:"Saving failed",RECORD_NOT_EXISTS:"Record not found",GEO_LOCATION_NOT_FOUND:"City or zip code not found"},INFO:{RECORD_REMOVED:"Page successfully deleted",RECORD_SAVED:"Page successfully saved"}},PROFILE:{PROFILE_DIVIDER:"Cesium+ profile",PROFILE_DIVIDER_HELP:'These are ancillary data, stored outside the currency network, in <a ui-sref="app.es_network">the Cesium+ network</a>.',NO_PROFILE_DEFINED:"No Cesium+ profile",BTN_ADD:"Create my profile",BTN_EDIT:"Edit my profile",BTN_DELETE:"Delete my profile",BTN_REORDER:"Reorder",UID:"Pseudonym",TITLE:"Lastname, FirstName",TITLE_HELP:"Name",DESCRIPTION:"About me",DESCRIPTION_HELP:"About me...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"General data",SOCIAL_NETWORKS_DIVIDER:"Social networks and web site",TECHNICAL_DIVIDER:"Technical data",MODAL_AVATAR:{TITLE:"Avatar",SELECT_FILE_HELP:"<b>Choose an image file</b>, by clicking on the button below:",BTN_SELECT_FILE:"Choose an image",RESIZE_HELP:"<b>Re-crop the image</b> if necessary. A click on the image allows to move it. Click on the area at the bottom left to zoom in.",RESULT_HELP:"<b>Here is the result</b> as seen on your profile:"},CONFIRM:{DELETE:"Are you sure you want to <b>delete your Cesium+ profile ?</b><br/><br/>This operation is irreversible."},ERROR:{REMOVE_PROFILE_FAILED:"Deleting profile failed",LOAD_PROFILE_FAILED:"Could not load user profile.",SAVE_PROFILE_FAILED:"Saving profile failed",INVALID_SOCIAL_NETWORK_FORMAT:"Invalid format: please fill a valid Internet address.<br/><br/>Examples :<ul><li>- A Facebook page (https://www.facebook.com/user)</li><li>- A web page (http://www.domain.com)</li><li>- An email address (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Error while resizing picture"},INFO:{PROFILE_REMOVED:"Profile deleted",PROFILE_SAVED:"Profile saved"},HELP:{WARNING_PUBLIC_DATA:"Please note that the information published here <b>is public</b>: visible including by <b>not logged in people</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"}},LOCATION:{BTN_GEOLOC_ADDRESS:"Find my address on the map",USE_GEO_POINT:"Appear on {{'COMMON.APP_NAME'|translate}} maps?",LOADING_LOCATION:"Searching address...",LOCATION_DIVIDER:"Localisation",ADDRESS:"Address",ADDRESS_HELP:"Address (optional)",CITY:"City",CITY_HELP:"City, Country",DISTANCE:"Maximum distance around the city",DISTANCE_UNIT:"mi",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"City, Country",PROFILE_POSITION:"Profile position",MODAL:{TITLE:"Search address",SEARCH_HELP:"City, Country",ALTERNATIVE_RESULT_DIVIDER:"Alternative results for <b>{{address}}</b>:",POSITION:"lat/lon : {{lat}} / {{lon}}"},ERROR:{CITY_REQUIRED_IF_STREET:"Required if a street has been filled",REQUIRED_FOR_LOCATION:"Required field to appear on the map",INVALID_FOR_LOCATION:"Unknown address",GEO_LOCATION_FAILED:"Unable to retrieve your current position. Please use the search button.",ADDRESS_LOCATION_FAILED:"Unable to retrieve the address position"}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Online services",SUBSCRIPTION_DIVIDER_HELP:"Online services offer optional additional services, delegated to a third party.",BTN_ADD:"Add a service",BTN_EDIT:"Manage my services",NO_SUBSCRIPTION:"No service defined",SUBSCRIPTION_COUNT:"Services / Subscription",EDIT:{TITLE:"Online services",HELP_TEXT:"Manage your subscriptions and other online services here",PROVIDER:"Provider:"},TYPE:{ENUM:{EMAIL:"Receive email notifications"}},CONFIRM:{DELETE_SUBSCRIPTION:"Are you sur you want to <b>delete this subscription</b>?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Error while loading online services",ADD_SUBSCRIPTION_FAILED:"Error while adding subscription",UPDATE_SUBSCRIPTION_FAILED:"Error during subscription update",DELETE_SUBSCRIPTION_FAILED:"Error while deleting subscription"},MODAL_EMAIL:{TITLE:"Notification by email",HELP:"Fill out this form to <b>be notified by email</ b> of your account's events. <br/>Your email address will be encrypted only to be visible to the service provider.",EMAIL_LABEL:"Your email:",EMAIL_HELP:"john@domain.com",FREQUENCY_LABEL:"Frequency of notifications:",FREQUENCY_DAILY:"Daily",FREQUENCY_WEEKLY:"Weekly",PROVIDER:"Service Provider:"}},DOCUMENT:{HASH:"Hash: ",LOOKUP:{TITLE:"Document search",BTN_ACTIONS:"Actions",SEARCH_HELP:"issuer:AAA*, time:1508406169",LAST_DOCUMENTS_DOTS:"Last documents:",LAST_DOCUMENTS:"Last documents",SHOW_QUERY:"Show query",HIDE_QUERY:"Hide query",HEADER_TIME:"Time/Hour",HEADER_ISSUER:"Issuer",HEADER_RECIPIENT:"Recipient",READ:"Read",BTN_REMOVE:"Delete this document",BTN_COMPACT:"Compact",HAS_CREATE_OR_UPDATE_PROFILE:"create or edit his profile",POPOVER_ACTIONS:{TITLE:"Actions",REMOVE_ALL:"Delete these documents..."}},INFO:{REMOVED:"Deleted document"},CONFIRM:{REMOVE:"Are you sure you want to <b>delete this document</b>?",REMOVE_ALL:"Are you sure you want to <b>delete these documents</b>?"},ERROR:{LOAD_DOCUMENTS_FAILED:"Error searching documents",REMOVE_FAILED:"Error deleting the document",REMOVE_ALL_FAILED:"Error deleting documents"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"User profiles, notifications, private messages",ENABLE_TOGGLE:"Enable extension?",ENABLE_REMOTE_STORAGE:"Enable remote storage for settings?",ENABLE_REMOTE_STORAGE_HELP:"Enables (encrypted) storage of your settings on Cesium + nodes",ENABLE_MESSAGE_TOGGLE:"Enable private messages?",PEER:"Data peer address",POPUP_PEER:{TITLE:"Data peer",HELP:"Set the address of the peer to use:",PEER_HELP:"server.domain.com:port"},NOTIFICATIONS:{DIVIDER:"Notifications",HELP_TEXT:"Enable the types of notifications you want to receive:",ENABLE_TX_SENT:"Notify the validation of <b>sent payments</b>?",ENABLE_TX_RECEIVED:"Notify the validation of <b>received payments</b>?",ENABLE_CERT_SENT:"Notify the validation of <b>sent certifications</b>?",ENABLE_CERT_RECEIVED:"Notify the validation of <b>received certifications</b>?",ENABLE_HTML5_NOTIFICATION:"Warn with each new notification?",ENABLE_HTML5_NOTIFICATION_HELP:"Opens a small popup window with each new notification."},CONFIRM:{ASK_ENABLE_TITLE:"Optional features",ASK_ENABLE:'Cesium+ extension is <b>disabled</b> in your settings, making some features inactive: <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> user profiles</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Private messages</b>.</ul><br/><br/><b>Do you want to enable</b> the extension?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"A recipient is required for encryption."},ES_PEER:{NAME:"Name",DOCUMENTS:"Documents",SOFTWARE:"Software",DOCUMENT_COUNT:"Number of documents",EMAIL_SUBSCRIPTION_COUNT:"{{emailSubscription}} subscribers to email notification"}},EVENT:{NODE_STARTED:"Your node ES API <b>{{params[0]}}</b> is UP",NODE_BMA_DOWN:"Node <b>{{params[0]}}:{{params[1]}}</b> (used by your ES API) is <b>unreachable</b>.",NODE_BMA_UP:"Node <b>{{params[0]}}:{{params[1]}}</b> is reachable again.",MEMBER_JOIN:"You are now a <b>member</b> of currency <b>{{params[0]}}</b>!",MEMBER_LEAVE:"You are <b>not a member anymore</b> of currency <b>{{params[0]}}</b>!",MEMBER_EXCLUDE:"You are <b>not more member</b> of the currency <b>{{params[0]}}</b>, for lack of renewal or lack of certifications.",MEMBER_REVOKE:"Your account has been revoked. It will no longer be a member of the currency <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"Your membership to <b>{{params[0]}}</b> has been <b>renewed successfully</b>.",TX_SENT:"Your payment to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",TX_SENT_MULTI:"Your payment to <b>{{params[1]}}</b> was executed.",TX_RECEIVED:"You received a payment from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"You received a payment from <b>{{params[1]}}</b>.",CERT_SENT:"Your <b>certification</b> to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",CERT_RECEIVED:"You  have <b>received a certification</b> from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",USER:{LIKE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> like your profile",FOLLOW_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> follows your activity",STAR_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> rated you ({{params[3]}} <i class=\"ion-star\">)",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the profile: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> reported a profile to be deleted: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your profile"},PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on your referencing: <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on your referencing: <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has replied to your comment on the referencing: <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>",FOLLOW_NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on the page: <b>{{params[2]}}</b>",FOLLOW_UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on the page: <b>{{params[2]}}</b>",FOLLOW_NEW:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> added a page: <b>{{params[2]}}</b>",FOLLOW_UPDATE:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> updated the page: <b>{{params[2]}}</b>",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the page: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> reported a page to be deleted: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your page: <b>{{params[2]}}</b>"}},LIKE:{ERROR:{FAILED_TOGGLE_LIKE:"Unable to execute this action."}},CONFIRM:{ES_USE_FALLBACK_NODE:"Data node <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the data node <b>{{new}}</b>?"},ERROR:{ES_CONNECTION_ERROR:'Data node <b>{{server}}</b> unreachable or invalid address.<br/><br/>Cesium will continue to work, <b>without the Cesium+</b> extension (user profiles, private messages, maps and graphics).<br/><br/>Check your Internet connection, or change data node in <a class="positive" ng-click="doQuickFix(\'settings\')">extension settings</a>.',ES_MAX_UPLOAD_BODY_SIZE:"The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."}}),e.translations("en",{COMMON:{CATEGORY:"Category",CATEGORIES:"Categories",CATEGORY_SEARCH_HELP:"Search",COMMENT_HELP:"Comments",LAST_MODIFICATION_DATE:"Updated on ",SUBMIT_BY:"Submitted by",BTN_LIKE:"I like",BTN_LIKE_REMOVE:"I don't like anymore",LIKES_TEXT:"{{total}} {{total > 1 ? 'people' : 'person'}} liked this page",ABUSES_TEXT:"{{total}} {{total > 1 ? 'people' : 'person'}} reported a problem on this page",BTN_REPORT_ABUSE_DOTS:"Report a problem or an abuse...",BTN_REMOVE_REPORTED_ABUSE:"Cancel my problem report",BTN_PUBLISH:"Publish",BTN_PICTURE_DELETE:"Delete",BTN_PICTURE_FAVORISE:"Default",BTN_PICTURE_ROTATE:"Rotate",BTN_ADD_PICTURE:"Add picture",NOTIFICATION:{TITLE:"New notification | {{'COMMON.APP_NAME'|translate}}",HAS_UNREAD:"You have {{count}} unread notification{{count>0?'s':''}}"},NOTIFICATIONS:{TITLE:"Notifications",MARK_ALL_AS_READ:"Mark all as read",NO_RESULT:"No notification",SHOW_ALL:"Show all",LOAD_NOTIFICATIONS_FAILED:"Could not load notifications"},REPORT_ABUSE:{TITLE:"Report a problem",SUB_TITLE:"Please explain briefly the problem:",REASON_HELP:"I explain the problem...",ASK_DELETE:"Request removal?",CONFIRM:{SENT:"Request sent. Thnak you!"}}},MENU:{REGISTRY:"Pages",USER_PROFILE:"My Profile",MESSAGES:"Messages",NOTIFICATIONS:"Notifications",INVITATIONS:"Invitations"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Account for an organization",ORGANIZATION_ACCOUNT_HELP:"If you represent a company, association, etc.<br/>No universal dividend will be created by this account."},EVENT:{MEMBER_WITHOUT_PROFILE:'You can <a ui-sref="app.edit_profile">fill your Cesium+ profile</a> (optional) to provide better visibility of your account. This profile will be stored in <b>a directory independent</b> of the currency, but decentralized.'},ERROR:{WS_CONNECTION_FAILED:"Cesium can not receive notifications because of a technical error (connection to the Cesium + data node).<br/><br/>If the problem persists, please <b>choose another data node</b> in Cesium+ settings."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Suggest identities to certify...",BTN_ASK_CERTIFICATIONS_DOTS:"Ask members to certify me...",BTN_ASK_CERTIFICATION:"Ask a certification",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Suggest certifications",HELP:"Select your suggestions"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Ask certifications",HELP:"Select recipients"},SEARCH:{DIVIDER_PROFILE:"Accounts",DIVIDER_PAGE:"Pages",DIVIDER_GROUP:"Groups"},CONFIRM:{SUGGEST_CERTIFICATIONS:"Are you sure you want <b>to send these certification suggestions</b>?",ASK_CERTIFICATION:"Are you sure you want to <b>send a certification request</b>?",ASK_CERTIFICATIONS:"Are you sure you want to <b>send a certification request</b> to these people?"}},INVITATION:{TITLE:"Invitations",NO_RESULT:"No invitation received",BTN_DELETE_ALL:"Delete all invitations",BTN_DELETE:"Delete invitation",BTN_NEW_INVITATION:"New invitation",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> asks for your certification',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> is suggested for certification',SUGGESTED_BY:'Suggestion sent by <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Invitations"},LIST:{TITLE:"Invitations"},NEW:{TITLE:"New invitation",RECIPIENTS:"A",RECIPIENTS_HELP:"Recipients of the invitation",RECIPIENTS_MODAL_TITLE:"Recipients",RECIPIENTS_MODAL_HELP:"Please choose recipients:",SUGGESTION_IDENTITIES:"Suggestions for certification",SUGGESTION_IDENTITIES_HELP:"Certifications to suggest",SUGGESTION_IDENTITIES_MODAL_TITLE:"Suggestions",SUGGESTION_IDENTITIES_MODAL_HELP:"Please choose your suggestions:"},CONFIRM:{DELETE_ALL_CONFIRMATION:"Removing invitations is <b>an irreversible operation</b>.<br/><br/><b>Are you sure</b> you want to continue",SEND_INVITATIONS_TO_CERTIFY:"<b>Are you sure</b> you want <b>to sent this invitation to certify</b> ?"},INFO:{INVITATION_SENT:"Invitation sent"},ERROR:{LOAD_INVITATIONS_FAILED:"Error while loading invitations",REMOVE_INVITATION_FAILED:"Error while deleting the invitation",REMOVE_ALL_INVITATIONS_FAILED:"Error while deleting invitations",SEND_INVITATION_FAILED:"Error while sending invitation",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invitation unreadable (format unknown)</span> - sent by <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Comments",SHOW_MORE_COMMENTS:"Show previous comments",COMMENT_HELP:"Your comment, question...",COMMENT_HELP_REPLY_TO:"Your answer...",BTN_SEND:"Send",POPOVER_SHARE_TITLE:"Message #{{number}}",REPLY:"Reply",REPLY_TO:"Respond to:",REPLY_TO_LINK:"In response to ",REPLY_TO_DELETED_COMMENT:"In response to a deleted comment",REPLY_COUNT:"{{replyCount}} responses",DELETED_COMMENT:"Comment deleted",MODIFIED_ON:"modified on {{time|formatDate}}",MODIFIED_PARENTHESIS:"(modified then)",ERROR:{FAILED_SAVE_COMMENT:"Saving comment failed",FAILED_REMOVE_COMMENT:"Deleting comment failed"}},MESSAGE:{REPLY_TITLE_PREFIX:"Re: ",FORWARD_TITLE_PREFIX:"Fw: ",BTN_REPLY:"Reply",BTN_COMPOSE:"New message",BTN_WRITE:"Write",NO_MESSAGE_INBOX:"No message received",NO_MESSAGE_OUTBOX:"No message sent",NOTIFICATIONS:{TITLE:"Messages",MESSAGE_RECEIVED:"You <b>received a message</b><br/>from"},LIST:{INBOX:"Inbox",OUTBOX:"Outbox",LAST_INBOX:"New messages",LAST_OUTBOX:"Sent messages",BTN_LAST_MESSAGES:"Recent messages",TITLE:"Private messages",SEARCH_HELP:"Search in messages",POPOVER_ACTIONS:{TITLE:"Options",DELETE_ALL:"Delete all messages"}},COMPOSE:{TITLE:"New message",TITLE_REPLY:"Reply",SUB_TITLE:"New message",TO:"To",OBJECT:"Object",OBJECT_HELP:"Object",ENCRYPTED_HELP:"Please note this message will be encrypted before sending so that only the recipient can read it and be sure you are the author.",MESSAGE:"Message",MESSAGE_HELP:"Message content",CONTENT_CONFIRMATION:"No message content.<br/><br/>Are your sure you want to send this message?"},VIEW:{TITLE:"Message",SENDER:"Sent by",RECIPIENT:"Sent to",NO_CONTENT:"Empty message",DELETE:"Delete the message"},CONFIRM:{REMOVE:"Are you sure you want to <b>delete this message</b>?<br/><br/> This operation is irreversible.",REMOVE_ALL:"Are you sure you want to <b>delete all messages</b>?<br/><br/> This operation is irreversible.",MARK_ALL_AS_READ:"Are you sure you want to <b>mark all message as read</b>?",USER_HAS_NO_PROFILE:"This identity has no Cesium + profile. It may not use the Cesium + extension, so it <b>will not read your message</b>.<br/><br/>Are you sure you want <b>to continue</b>?"},INFO:{MESSAGE_REMOVED:"Message successfully deleted",All_MESSAGE_REMOVED:"Messages successfully deleted",MESSAGE_SENT:"Message sent"},ERROR:{SEND_MSG_FAILED:"Error while sending message.",LOAD_MESSAGES_FAILED:"Error while loading messages.",LOAD_MESSAGE_FAILED:"Error while loading message.",MESSAGE_NOT_READABLE:"Unable to read message.",USER_NOT_RECIPIENT:"You are not the recipient of this message: unable to read it.",NOT_AUTHENTICATED_MESSAGE:"The authenticity of the message is not certain or its content is corrupted.",REMOVE_MESSAGE_FAILED:"Error while deleting message",MESSAGE_CONTENT_TOO_LONG:"Value too long ({{maxLength}} characters max).",MARK_AS_READ_FAILED:"Unable to mark the message as 'read'.",LOAD_NOTIFICATIONS_FAILED:"Error while loading messages notifications.",REMOVE_All_MESSAGES_FAILED:"Error while removing all messages.",MARK_ALL_AS_READ_FAILED:"Error while marking messages as read.",RECIPIENT_IS_MANDATORY:"Recipient is mandatory."}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Block number, hash...",POPOVER_FILTER_TITLE:"Filter",HEADER_MEDIAN_TIME:"Date / Time",HEADER_BLOCK:"Block #",HEADER_ISSUER:"Peer owner",BTN_LAST:"Last blocks",DISPLAY_QUERY:"View query",HIDE_QUERY:"Hide query",TX_SEARCH_FILTER:{MEMBER_FLOWS:'<b class="ion-person"></b> Members input/output',EXISTING_TRANSACTION:'<b class="ion-card"></b> Having transactions',PERIOD:'<b class="ion-clock"></b> Between <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) and <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Computed by {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Transactions concerning <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Error while searching blocks."}},REGISTRY:{CATEGORY:"Main activity",GENERAL_DIVIDER:"Basic information",LOCATION_DIVIDER:"Address",SOCIAL_NETWORKS_DIVIDER:"Social networks, web sites",TECHNICAL_DIVIDER:"Technical data",BTN_SHOW_WOT:"People",BTN_SHOW_WOT_HELP:"Search for people",BTN_SHOW_PAGES:"Pages",BTN_SHOW_PAGES_HELP:"Search for pages",BTN_NEW:"New page",MY_PAGES:"My pages",NO_PAGE:"No page",SEARCH:{TITLE:"Pages",SEARCH_HELP:"What, Who: hairdresser, Lili's restaurant, ...",BTN_ADD:"New",BTN_LAST_RECORDS:"Recent pages",BTN_ADVANCED_SEARCH:"Advanced search",BTN_OPTIONS:"Advanced search",TYPE:"Kind of organization",LOCATION_HELP:"Where: City, Country",RESULTS:"Results",RESULT_COUNT_LOCATION:"{{count}} result{{count>0?'s':''}}, near {{location}}",RESULT_COUNT:"{{count}} result{{count>0?'s':''}}",LAST_RECORDS:"Recent pages",LAST_RECORD_COUNT_LOCATION:"{{count}} recent page{{count>0?'s':''}}, near {{location}}",LAST_RECORD_COUNT:"{{count}} recent page{{count>0?'s':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Advanced options?"}},VIEW:{TITLE:"Registry",CATEGORY:"Main activity:",LOCATION:"Address:",MENU_TITLE:"Options",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Are you sure you want to delete this reference?<br/><br/>This is irreversible."},TYPE:{TITLE:"New page",SELECT_TYPE:"Kind of organization:",ENUM:{SHOP:"Local shops",COMPANY:"Company",ASSOCIATION:"Association",INSTITUTION:"Institution"}},EDIT:{TITLE:"Edit",TITLE_NEW:"New page",RECORD_TYPE:"Kind of organization",RECORD_TITLE:"Name",RECORD_TITLE_HELP:"Name",RECORD_DESCRIPTION:"Description",RECORD_DESCRIPTION_HELP:"Describe activity",RECORD_ADDRESS:"Street",RECORD_ADDRESS_HELP:"Street, building...",RECORD_CITY:"City",RECORD_CITY_HELP:"City, Country",RECORD_SOCIAL_NETWORKS:"Social networks and web site",RECORD_PUBKEY:"Public key",RECORD_PUBKEY_HELP:"Public key to receive payments"},WALLET:{PAGE_DIVIDER:"Pages",PAGE_DIVIDER_HELP:'Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref="app.es_network">the Cesium+ network</a>.'},ERROR:{LOAD_CATEGORY_FAILED:"Loading main activities failed",LOAD_RECORD_FAILED:"Loading failed",LOOKUP_RECORDS_FAILED:"Error while loading records.",REMOVE_RECORD_FAILED:"Deleting failed",SAVE_RECORD_FAILED:"Saving failed",RECORD_NOT_EXISTS:"Record not found",GEO_LOCATION_NOT_FOUND:"City or zip code not found"},INFO:{RECORD_REMOVED:"Page successfully deleted",RECORD_SAVED:"Page successfully saved"}},PROFILE:{PROFILE_DIVIDER:"Cesium+ profile",PROFILE_DIVIDER_HELP:'These are ancillary data, stored outside the currency network, in <a ui-sref="app.es_network">the Cesium+ network</a>.',NO_PROFILE_DEFINED:"No Cesium+ profile",BTN_ADD:"Create my profile",BTN_EDIT:"Edit my profile",BTN_DELETE:"Delete my profile",BTN_REORDER:"Reorder",UID:"Pseudonym",TITLE:"Lastname, FirstName",TITLE_HELP:"Name",DESCRIPTION:"About me",DESCRIPTION_HELP:"About me...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"General data",SOCIAL_NETWORKS_DIVIDER:"Social networks and web site",TECHNICAL_DIVIDER:"Technical data",MODAL_AVATAR:{TITLE:"Avatar",SELECT_FILE_HELP:"<b>Choose an image file</b>, by clicking on the button below:",BTN_SELECT_FILE:"Choose an image",RESIZE_HELP:"<b>Re-crop the image</b> if necessary. A click on the image allows to move it. Click on the area at the bottom left to zoom in.",RESULT_HELP:"<b>Here is the result</b> as seen on your profile:"},CONFIRM:{DELETE:"Are you sure you want to <b>delete your Cesium+ profile ?</b><br/><br/>This operation is irreversible."},ERROR:{REMOVE_PROFILE_FAILED:"Deleting profile failed",LOAD_PROFILE_FAILED:"Could not load user profile.",SAVE_PROFILE_FAILED:"Saving profile failed",INVALID_SOCIAL_NETWORK_FORMAT:"Invalid format: please fill a valid Internet address.<br/><br/>Examples :<ul><li>- A Facebook page (https://www.facebook.com/user)</li><li>- A web page (http://www.domain.com)</li><li>- An email address (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Error while resizing picture"},INFO:{PROFILE_REMOVED:"Profile deleted",PROFILE_SAVED:"Profile saved"},HELP:{WARNING_PUBLIC_DATA:"Please note that the information published here <b>is public</b>: visible including by <b>not logged in people</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"}},LOCATION:{BTN_GEOLOC_ADDRESS:"Find my address on the map",USE_GEO_POINT:"Appear on {{'COMMON.APP_NAME'|translate}} maps?",LOADING_LOCATION:"Searching address...",LOCATION_DIVIDER:"Localisation",ADDRESS:"Address",ADDRESS_HELP:"Address (optional)",CITY:"City",CITY_HELP:"City, Country",DISTANCE:"Maximum distance around the city",DISTANCE_UNIT:"mi",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"City, Country",PROFILE_POSITION:"Profile position",MODAL:{TITLE:"Search address",SEARCH_HELP:"City, Country",ALTERNATIVE_RESULT_DIVIDER:"Alternative results for <b>{{address}}</b>:",POSITION:"lat/lon : {{lat}} / {{lon}}"},ERROR:{CITY_REQUIRED_IF_STREET:"Required if a street has been filled",REQUIRED_FOR_LOCATION:"Required field to appear on the map",INVALID_FOR_LOCATION:"Unknown address",GEO_LOCATION_FAILED:"Unable to retrieve your current position. Please use the search button.",ADDRESS_LOCATION_FAILED:"Unable to retrieve the address position"}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Online services",SUBSCRIPTION_DIVIDER_HELP:"Online services offer optional additional services, delegated to a third party.",BTN_ADD:"Add a service",BTN_EDIT:"Manage my services",NO_SUBSCRIPTION:"No service defined",SUBSCRIPTION_COUNT:"Services / Subscription",EDIT:{TITLE:"Online services",HELP_TEXT:"Manage your subscriptions and other online services here",PROVIDER:"Provider:"},TYPE:{ENUM:{EMAIL:"Receive email notifications"}},CONFIRM:{DELETE_SUBSCRIPTION:"Are you sur you want to <b>delete this subscription</b>?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Error while loading online services",ADD_SUBSCRIPTION_FAILED:"Error while adding subscription",UPDATE_SUBSCRIPTION_FAILED:"Error during subscription update",DELETE_SUBSCRIPTION_FAILED:"Error while deleting subscription"},MODAL_EMAIL:{TITLE:"Notification by email",HELP:"Fill out this form to <b>be notified by email</ b> of your account's events. <br/>Your email address will be encrypted only to be visible to the service provider.",EMAIL_LABEL:"Your email:",EMAIL_HELP:"john@domain.com",FREQUENCY_LABEL:"Frequency of notifications:",FREQUENCY_DAILY:"Daily",FREQUENCY_WEEKLY:"Weekly",PROVIDER:"Service Provider:"}},DOCUMENT:{HASH:"Hash: ",LOOKUP:{TITLE:"Document search",BTN_ACTIONS:"Actions",SEARCH_HELP:"issuer:AAA*, time:1508406169",LAST_DOCUMENTS_DOTS:"Last documents:",LAST_DOCUMENTS:"Last documents",SHOW_QUERY:"Show query",HIDE_QUERY:"Hide query",HEADER_TIME:"Time/Hour",HEADER_ISSUER:"Issuer",HEADER_RECIPIENT:"Recipient",READ:"Read",BTN_REMOVE:"Delete this document",BTN_COMPACT:"Compact",HAS_CREATE_OR_UPDATE_PROFILE:"create or edit his profile",POPOVER_ACTIONS:{TITLE:"Actions",REMOVE_ALL:"Delete these documents..."}},INFO:{REMOVED:"Deleted document"},CONFIRM:{REMOVE:"Are you sure you want to <b>delete this document</b>?",REMOVE_ALL:"Are you sure you want to <b>delete these documents</b>?"},ERROR:{LOAD_DOCUMENTS_FAILED:"Error searching documents",REMOVE_FAILED:"Error deleting the document",REMOVE_ALL_FAILED:"Error deleting documents"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"User profiles, notifications, private messages",ENABLE_TOGGLE:"Enable extension?",ENABLE_REMOTE_STORAGE:"Enable remote storage for settings?",ENABLE_REMOTE_STORAGE_HELP:"Enables (encrypted) storage of your settings on Cesium + nodes",ENABLE_MESSAGE_TOGGLE:"Enable private messages?",PEER:"Data peer address",POPUP_PEER:{TITLE:"Data peer",HELP:"Set the address of the peer to use:",PEER_HELP:"server.domain.com:port"},NOTIFICATIONS:{DIVIDER:"Notifications",HELP_TEXT:"Enable the types of notifications you want to receive:",ENABLE_TX_SENT:"Notify the validation of <b>sent payments</b>?",ENABLE_TX_RECEIVED:"Notify the validation of <b>received payments</b>?",ENABLE_CERT_SENT:"Notify the validation of <b>sent certifications</b>?",ENABLE_CERT_RECEIVED:"Notify the validation of <b>received certifications</b>?",ENABLE_HTML5_NOTIFICATION:"Warn with each new notification?",ENABLE_HTML5_NOTIFICATION_HELP:"Opens a small popup window with each new notification."},CONFIRM:{ASK_ENABLE_TITLE:"Optional features",ASK_ENABLE:'Cesium+ extension is <b>disabled</b> in your settings, making some features inactive: <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> user profiles</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Private messages</b>.</ul><br/><br/><b>Do you want to enable</b> the extension?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"A recipient is required for encryption."},ES_PEER:{NAME:"Name",DOCUMENTS:"Documents",SOFTWARE:"Software",DOCUMENT_COUNT:"Number of documents",EMAIL_SUBSCRIPTION_COUNT:"{{emailSubscription}} subscribers to email notification"}},EVENT:{NODE_STARTED:"Your node ES API <b>{{params[0]}}</b> is UP",NODE_BMA_DOWN:"Node <b>{{params[0]}}:{{params[1]}}</b> (used by your ES API) is <b>unreachable</b>.",NODE_BMA_UP:"Node <b>{{params[0]}}:{{params[1]}}</b> is reachable again.",MEMBER_JOIN:"You are now a <b>member</b> of currency <b>{{params[0]}}</b>!",MEMBER_LEAVE:"You are <b>not a member anymore</b> of currency <b>{{params[0]}}</b>!",MEMBER_EXCLUDE:"You are <b>not more member</b> of the currency <b>{{params[0]}}</b>, for lack of renewal or lack of certifications.",MEMBER_REVOKE:"Your account has been revoked. It will no longer be a member of the currency <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"Your membership to <b>{{params[0]}}</b> has been <b>renewed successfully</b>.",TX_SENT:"Your payment to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",TX_SENT_MULTI:"Your payment to <b>{{params[1]}}</b> was executed.",TX_RECEIVED:"You received a payment from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"You received a payment from <b>{{params[1]}}</b>.",CERT_SENT:"Your <b>certification</b> to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",CERT_RECEIVED:"You  have <b>received a certification</b> from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",USER:{LIKE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> like your profile",FOLLOW_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> follows your activity",STAR_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> rated you ({{params[3]}} <i class=\"ion-star\">)",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the profile: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> reported a profile to be deleted: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your profile"},PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on your referencing: <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on your referencing: <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has replied to your comment on the referencing: <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>",FOLLOW_NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on the page: <b>{{params[2]}}</b>",FOLLOW_UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on the page: <b>{{params[2]}}</b>",FOLLOW_NEW:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> added a page: <b>{{params[2]}}</b>",FOLLOW_UPDATE:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> updated the page: <b>{{params[2]}}</b>",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the page: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid }"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> reported a page to be deleted: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your page: <b>{{params[2]}}</b>"}},LIKE:{ERROR:{FAILED_TOGGLE_LIKE:"Unable to execute this action."}},CONFIRM:{ES_USE_FALLBACK_NODE:"Data node <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the data node <b>{{new}}</b>?"},ERROR:{ES_CONNECTION_ERROR:'Data node <b>{{server}}</b> unreachable or invalid address.<br/><br/>Cesium will continue to work, <b>without the Cesium+</b> extension (user profiles, private messages, maps and graphics).<br/><br/>Check your Internet connection, or change data node in <a class="positive" ng-click="doQuickFix(\'settings\')">extension settings</a>.',ES_MAX_UPLOAD_BODY_SIZE:"The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."}}),e.translations("eo-EO",{COMMON:{CATEGORY:"Kategorio",CATEGORIES:"Kategorioj",CATEGORY_SEARCH_HELP:"Serĉado",COMMENT_HELP:"Komento",LAST_MODIFICATION_DATE:"Ĝisdatigita la",SUBMIT_BY:"Submetita de",BTN_LIKE:"Mi ŝatas",LIKES_TEXT:"{{total}} persono{{total > 1 ? 'j' : ''}} ŝatis tiun ĉi paĝon",ABUSES_TEXT:"{{total}} persono{{total > 1 ? 'j' : ''}} atentigis pri problemo",BTN_REPORT_ABUSE_DOTS:"Atentigi pri problemo aŭ misuzo...",BTN_REMOVE_REPORTED_ABUSE:"Nuligi mian atentigon",BTN_PUBLISH:"Publikigi",BTN_PICTURE_DELETE:"Forigi",BTN_PICTURE_FAVORISE:"Precipa",BTN_PICTURE_ROTATE:"Turni",BTN_ADD_PICTURE:"Aldoni foton",NOTIFICATION:{TITLE:"Nova avizo | {{'COMMON.APP_NAME'|translate}}",HAS_UNREAD:"Vi havas {{count}} avizo{{count>0?'j':''}}n ne legita{{count>0?'j':''}}n"},NOTIFICATIONS:{TITLE:"Avizoj",MARK_ALL_AS_READ:"Ĉion marki legita",NO_RESULT:"Neniu avizo",SHOW_ALL:"Vidi ĉion",LOAD_NOTIFICATIONS_FAILED:"Malsukceso por ŝarĝi la avizojn"},REPORT_ABUSE:{TITLE:"Atentigi pri problemo",SUB_TITLE:"Bonvolu klarigi rapide la problemon:",REASON_HELP:"Mi klarigas la problemon...",ASK_DELETE:"Peti la forigon?",CONFIRM:{SENT:"Atentigo sendita. Dankon!"}}},MENU:{REGISTRY:"Paĝoj",USER_PROFILE:"Mia profilo",MESSAGES:"Mesaĝoj",NOTIFICATIONS:"Avizoj",INVITATIONS:"Invitoj"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Konto por organizaĵo",ORGANIZATION_ACCOUNT_HELP:"Se vi reprezentas entreprenon, asocion, ktp.<br/>Neniu universala dividendo estos kreita per tiu ĉi konto."},EVENT:{MEMBER_WITHOUT_PROFILE:'Vi povas <a ui-sref="app.edit_profile">tajpi vian profilon Cesium+</a> (kromebleco) por disponi pli bonan videblecon por via konto.'},ERROR:{WS_CONNECTION_FAILED:"Cesium ne povas ricevi la avizojn pro teknika eraro (konekto al la daten-nodo Cesium+).<br/><br/>Se la problemo daŭradas, bonvolu <b>elekti alian daten-nodon</b> ĉe la parametroj Cesium+."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Sugesti identecojn atestotajn...",BTN_ASK_CERTIFICATIONS_DOTS:"Peti membrojn atesti min...",BTN_ASK_CERTIFICATION:"Peti atestaĵon",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Sugesti atestadojn",HELP:"Elekti viajn sugestojn"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Peti atestaĵojn",HELP:"Elekti la ricevontojn"},SEARCH:{DIVIDER_PROFILE:"Kontoj",DIVIDER_PAGE:"Paĝoj",DIVIDER_GROUP:"Grupoj"},CONFIRM:{SUGGEST_CERTIFICATIONS:"Ĉu vi certas, ke vi volas <b>sendi tiujn sugestojn por atestado</b>?",ASK_CERTIFICATION:"Ĉu vi certas, ke vi volas <b>sendi atesto-peton</b>?",ASK_CERTIFICATIONS:"Ĉu vi certas, ke vi volas <b>sendi atesto-peton</b> al tiuj personoj?"}},INVITATION:{TITLE:"Invitoj",NO_RESULT:"Neniu invito atendanta",BTN_DELETE_ALL:"Forigi ĉiujn invitojn",BTN_DELETE:"Forigi la inviton",BTN_NEW_INVITATION:"Nova invito",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> petas vian atestadon',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> estas sugestita al vi por atestado',SUGGESTED_BY:'Sugesto sendita de <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Invitoj"},LIST:{TITLE:"Invitoj"},NEW:{TITLE:"Nova invito",RECIPIENTS:"Al",RECIPIENTS_HELP:"Ricevontoj de la invito",RECIPIENTS_MODAL_TITLE:"Ricevontoj",RECIPIENTS_MODAL_HELP:"Bonvolu elekti la ricevontojn:",SUGGESTION_IDENTITIES:"Sugestoj por atestado",SUGGESTION_IDENTITIES_HELP:"Atestadoj sugestotaj",SUGGESTION_IDENTITIES_MODAL_TITLE:"Sugestoj",SUGGESTION_IDENTITIES_MODAL_HELP:"Bonvolu elekti viajn sugestojn:"},CONFIRM:{DELETE_ALL_CONFIRMATION:"La forigo de la invitoj estas <b>neinversigebla ago</b>.<br/><br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",SEND_INVITATIONS_TO_CERTIFY:"Ĉu vi certas, ke vi volas <b>sendi tiun inviton atestotan</b>?"},INFO:{INVITATION_SENT:"Invito sendita"},ERROR:{LOAD_INVITATIONS_FAILED:"Malsukceso por ŝarĝi la invitojn",REMOVE_INVITATION_FAILED:"Eraro dum la forigo de la invito",REMOVE_ALL_INVITATIONS_FAILED:"Eraro dum la forigo de la invitoj",SEND_INVITATION_FAILED:"Eraro dum la sendo de la invito",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invito nelegebla (strukturo nekonata)</span> - sendita de <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Komentoj",SHOW_MORE_COMMENTS:"Afiŝi la antaŭajn komentojn",COMMENT_HELP:"Via komento, demando, ktp.",COMMENT_HELP_REPLY_TO:"Via respondo...",BTN_SEND:"Sendi",POPOVER_SHARE_TITLE:"Mesaĝo #{{number}}",REPLY:"Respondi",REPLY_TO:"Respondo al:",REPLY_TO_LINK:"Responde al ",REPLY_TO_DELETED_COMMENT:"Responde al forigita komento",REPLY_COUNT:"{{replyCount}} respondoj",DELETED_COMMENT:"Komento forigita",MODIFIED_ON:"modifita la {{time|formatDate}}",MODIFIED_PARENTHESIS:"(modifita poste)",ERROR:{FAILED_SAVE_COMMENT:"Eraro dum la konservo de la komento",FAILED_REMOVE_COMMENT:"Eraro dum la forigo de la komento"}},MESSAGE:{REPLY_TITLE_PREFIX:"Resp: ",FORWARD_TITLE_PREFIX:"Tr: ",BTN_REPLY:"Respondi",BTN_COMPOSE:"Nova mesaĝo",BTN_WRITE:"Skribi",NO_MESSAGE_INBOX:"Neniu mesaĝo ricevita",NO_MESSAGE_OUTBOX:"Neniu mesaĝo sendita",NOTIFICATIONS:{TITLE:"Mesaĝoj",MESSAGE_RECEIVED:"Vi <b>ricevis mesaĝon</b><br/>de"},LIST:{INBOX:"Ricevujo",OUTBOX:"Senditaj mesaĝoj",LAST_INBOX:"Novaj mesaĝoj",LAST_OUTBOX:"Senditaj mesaĝoj",BTN_LAST_MESSAGES:"Freŝdataj mesaĝoj",TITLE:"Mesaĝoj",SEARCH_HELP:"Serĉado en la mesaĝoj",POPOVER_ACTIONS:{TITLE:"Kromaĵoj",DELETE_ALL:"Forigi ĉiujn mesaĝojn"}},COMPOSE:{TITLE:"Nova mesaĝo",TITLE_REPLY:"Respondi",SUB_TITLE:"Nova mesaĝo",TO:"Al",OBJECT:"Temo",OBJECT_HELP:"Temo",ENCRYPTED_HELP:"Bonvolu noti, ke tiu ĉi mesaĝo estos ĉifrita antaŭ sendo, tiel ke nur la adresato povos legi ĝin, kaj ke li estos certa, ke vi ja estas ties aŭtoro.",MESSAGE:"Mesaĝo",MESSAGE_HELP:"Enhavo de la mesaĝo",CONTENT_CONFIRMATION:"La enhavo de la mesaĝo estas malplena.<br/><br/>Ĉu vi volas tamen sendi la mesaĝon?"},VIEW:{TITLE:"Mesaĝo",SENDER:"Sendita de",RECIPIENT:"Sendita al",NO_CONTENT:"Mesaĝo malplena",DELETE:"Forigi la mesaĝon"},CONFIRM:{REMOVE:"Ĉu vi certas, ke vi volas <b>forigi tiun ĉi mesaĝon</b>?<br/><br/>Tiu ago estas neinversigebla.",REMOVE_ALL:"Ĉu vi certas, ke vi volas <b>forigi ĉiujn mesaĝojn</b>?<br/><br/>Tiu ago estas neinversigebla.",MARK_ALL_AS_READ:"Ĉu vi certas, ke vi volas <b>marki ĉiujn mesaĝojn legitaj</b>?",USER_HAS_NO_PROFILE:"Tiu identeco havas neniun profilon Cesium+. Eblas ke ĝi ne uzas la krom-programon Cesium+, kaj <b>do ne legos vian mesaĝon</b>.<br/><br/>Ĉu vi certas, ke vi volas tamen <b>daŭrigi</b>?"},INFO:{MESSAGE_REMOVED:"Mesaĝo forigita",All_MESSAGE_REMOVED:"Ĉiuj mesaĝoj estis forigitaj",MESSAGE_SENT:"Mesaĝo sendita"},ERROR:{SEND_MSG_FAILED:"Eraro dum la sendo de la mesaĝo.",LOAD_MESSAGES_FAILED:"Eraro dum la ricevo de la mesaĝoj.",LOAD_MESSAGE_FAILED:"Eraro dum la ricevo de la mesaĝo.",MESSAGE_NOT_READABLE:"Legado de la mesaĝo neebla.",USER_NOT_RECIPIENT:"Vi ne estas la adresato de tiu ĉi mesaĝo: malĉifrado neebla.",NOT_AUTHENTICATED_MESSAGE:"La aŭtenteco de la mesaĝo estas dubinda aŭ ties enhavo estas difektita.",REMOVE_MESSAGE_FAILED:"Malsukceso por forigi la mesaĝon",MESSAGE_CONTENT_TOO_LONG:"Signaro tro longa ({{maxLength}} signoj maksimume).",MARK_AS_READ_FAILED:"Neeblas marki la mesaĝon 'legita'.",LOAD_NOTIFICATIONS_FAILED:"Eraro dum la ricevo de la mesaĝo-avizoj.",REMOVE_All_MESSAGES_FAILED:"Eraro dum la forigo de ĉiuj mesaĝoj.",MARK_ALL_AS_READ_FAILED:"Eraro por marki la mesaĝojn legitaj.",RECIPIENT_IS_MANDATORY:"La adresato estas deviga."}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Numero de bloko, haketo, publika ŝlosilo, ktp.",POPOVER_FILTER_TITLE:"Filtriloj",HEADER_MEDIAN_TIME:"Dato / Horo",HEADER_BLOCK:"Bloko #",HEADER_ISSUER:"Nodo elsendinta",BTN_LAST:"Lastaj blokoj",DISPLAY_QUERY:"Afiŝi la informpeton",HIDE_QUERY:"Kaŝi la informpeton",TX_SEARCH_FILTER:{MEMBER_FLOWS:'<b class="ion-person"></b> Eniroj/eliroj de membroj',EXISTING_TRANSACTION:'<b class="ion-card"></b> Kun spezoj',PERIOD:'<b class="ion-clock"></b> Inter <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) kaj <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Kalkulita de <b class="ion-key"></b> {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Spezoj koncernantaj <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Eraro dum la serĉado de la blokoj."}},GROUP:{GENERAL_DIVIDER:"Ĝeneralaj informoj",LOCATION_DIVIDER:"Adreso",SOCIAL_NETWORKS_DIVIDER:"Sociaj retoj kaj retejo",TECHNICAL_DIVIDER:"Teknikaj informoj",CREATED_TIME:"Kreita {{creationTime|formatFromNow}}",NOTIFICATIONS:{TITLE:"Invitoj"},LOOKUP:{TITLE:"Grupoj",SEARCH_HELP:"Nomo de grupo, vortoj, loko, ktp.",LAST_RESULTS_LIST:"Novaj grupoj:",OPEN_RESULTS_LIST:"Malfermitaj grupoj:",MANAGED_RESULTS_LIST:"Fermitaj grupoj:",BTN_LAST:"Novaj grupoj",BTN_NEW:"Mi aldonas grupon"},TYPE:{TITLE:"Nova grupo",SELECT_TYPE:"Tipo de grupo:",OPEN_GROUP:"Malfermita grupo",OPEN_GROUP_HELP:"Malfermita grupo estas alirebla de iu ajn membro de la mono.",MANAGED_GROUP:"Administrita grupo",MANAGED_GROUP_HELP:"Administrita grupo estas mastrumata de administrantoj kaj moderigantoj, kiuj povas akcepti, rifuzi aŭ eksigi membron.",ENUM:{OPEN:"Malfermita grupo",MANAGED:"Administrita grupo"}},VIEW:{POPOVER_SHARE_TITLE:"{{title}}",MENU_TITLE:"Kromaĵoj",REMOVE_CONFIRMATION:"Ĉu vi certas, ke vi volas forigi tiun ĉi grupon?<br/><br/>Tiu ago estas neinversigebla."},EDIT:{TITLE:"Grupo",TITLE_NEW:"Nova grupo",RECORD_TITLE:"Titolo",RECORD_TITLE_HELP:"Titolo",RECORD_DESCRIPTION:"Priskribo",RECORD_DESCRIPTION_HELP:"Priskribo"},ERROR:{SEARCH_GROUPS_FAILED:"Malsukceso por traserĉi grupojn",REMOVE_RECORD_FAILED:"Malsukceso por forigi la grupon"},INFO:{RECORD_REMOVED:"Grupo forigita"}},REGISTRY:{CATEGORY:"Ĉefa agado",GENERAL_DIVIDER:"Ĝeneralaj informoj",LOCATION_DIVIDER:"Adreso",SOCIAL_NETWORKS_DIVIDER:"Sociaj retoj kaj retejo",TECHNICAL_DIVIDER:"Teknikaj informoj",BTN_SHOW_WOT:"Personoj",BTN_SHOW_WOT_HELP:"Traserĉi personojn",BTN_SHOW_PAGES:"Paĝoj",BTN_SHOW_PAGES_HELP:"Traserĉi paĝojn",BTN_NEW:"Krei paĝon",MY_PAGES:"Miaj paĝoj",NO_PAGE:"Neniu paĝo",SEARCH:{TITLE:"Paĝoj",SEARCH_HELP:"Kio, Kiu: restoracio, Ĉe Marcelo, ...",BTN_ADD:"Nova",BTN_LAST_RECORDS:"Freŝdataj paĝoj",BTN_ADVANCED_SEARCH:"Sperta serĉado",BTN_OPTIONS:"Sperta serĉado",TYPE:"Tipo de paĝo",LOCATION_HELP:"Kie: Poŝto-kodo, Urbo",RESULTS:"Rezultoj",RESULT_COUNT_LOCATION:"{{count}} rezulto{{count>0?'j':''}}, proksime de {{location}}",RESULT_COUNT:"{{count}} rezulto{{count>0?'j':''}}",LAST_RECORDS:"Freŝdataj paĝoj",LAST_RECORD_COUNT_LOCATION:"{{count}} paĝo{{count>0?'j':''}} freŝdata{{count>0?'j':''}}, proksime de {{location}}",LAST_RECORD_COUNT:"{{count}} paĝo{{count>0?'j':''}} freŝdata{{count>0?'j':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Spertaj kromaĵoj?"}},VIEW:{TITLE:"Adresaro",CATEGORY:"Ĉefa agado:",LOCATION:"Adreso:",MENU_TITLE:"Kromaĵoj",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Ĉu vi certas, ke vi volas forigi tiun ĉi paĝon?<br/><br/>Tiu ago estas neinversigebla."},TYPE:{TITLE:"Tipoj",SELECT_TYPE:"Tipo de paĝo:",ENUM:{SHOP:"Loka komerco",COMPANY:"Entrepreno",ASSOCIATION:"Asocio",INSTITUTION:"Institucio"}},EDIT:{TITLE:"Redaktado",TITLE_NEW:"Nova paĝo",RECORD_TYPE:"Tipo de paĝo",RECORD_TITLE:"Nomo",RECORD_TITLE_HELP:"Nomo",RECORD_DESCRIPTION:"Priskribo",RECORD_DESCRIPTION_HELP:"Priskribo de la agado",RECORD_ADDRESS:"Strato",RECORD_ADDRESS_HELP:"Strato, konstruaĵo...",RECORD_CITY:"Urbo",RECORD_CITY_HELP:"Urbo",RECORD_SOCIAL_NETWORKS:"Sociaj retoj kaj retejo",RECORD_PUBKEY:"Publika ŝlosilo",RECORD_PUBKEY_HELP:"Publika ŝlosilo por ricevi la pagojn"},WALLET:{PAGE_DIVIDER:"Paĝoj",PAGE_DIVIDER_HELP:"La paĝoj listigas agadojn, kiuj akceptas la liberan monon aŭ helpas ĝin: komercoj, entreprenoj, asocioj, institucioj."},ERROR:{LOAD_CATEGORY_FAILED:"Malsukceso por ŝarĝi la liston de la agadoj",LOAD_RECORD_FAILED:"Eraro dum la ŝarĝado de la paĝo",LOOKUP_RECORDS_FAILED:"Eraro dum la serĉado",REMOVE_RECORD_FAILED:"Malsukceso por forigi la paĝon",SAVE_RECORD_FAILED:"Eraro dum la konservado",RECORD_NOT_EXISTS:"Paĝo neekzistanta",GEO_LOCATION_NOT_FOUND:"Urbo aŭ poŝto-kodo ne trovita"},INFO:{RECORD_REMOVED:"Paĝo forigita",RECORD_SAVED:"Paĝo konservita"}},PROFILE:{PROFILE_DIVIDER:"Profilo Cesium+",PROFILE_DIVIDER_HELP:"Temas pri kromaj datenoj, stokitaj ekster la mon-reto.",NO_PROFILE_DEFINED:"Neniu profilo tajpita",BTN_ADD:"Tajpi mian profilon",BTN_EDIT:"Redakti mian profilon",BTN_DELETE:"Forigi mian profilon",BTN_REORDER:"Reordigi",UID:"Pseŭdonimo",TITLE:"Familia nomo, Persona nomo",TITLE_HELP:"Familia nomo, Persona nomo",DESCRIPTION:"Pri mi",DESCRIPTION_HELP:"Pri mi...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"Ĝeneralaj informoj",SOCIAL_NETWORKS_DIVIDER:"Sociaj retoj, retejoj",TECHNICAL_DIVIDER:"Teknikaj informoj",MODAL_AVATAR:{TITLE:"Profil-foto",SELECT_FILE_HELP:"Bonvolu <b>elekti bildo-dosieron</b>, alklakante la ĉi-suban butonon:",BTN_SELECT_FILE:"Elekti foton",RESIZE_HELP:"<b>Rekadri la bildon</b>, laŭbezone. Pluigi klakon sur la bildo ebligas movi ĝin. Alklaku la zonon malsupre maldekstre por zomi.",RESULT_HELP:"<b>Jen la rezulto</b> tiel videbla ĉe via profilo:"},CONFIRM:{DELETE:"Ĉu vi certas, ke vi volas <b>forigi vian profilon Cesium+ ?</b><br/><br/>Tiu ago estas neinversigebla."},ERROR:{REMOVE_PROFILE_FAILED:"Malsukceso por forigi la profilon",LOAD_PROFILE_FAILED:"Malsukceso por ŝarĝi la profilon de la uzanto.",SAVE_PROFILE_FAILED:"Eraro dum la konservado",INVALID_SOCIAL_NETWORK_FORMAT:"Strukturo ne rekonata: bonvolu tajpi validan adreson.<br/><br/>Ezemploj:<ul><li>- Facebook-paĝo (https://www.facebook.com/uzanto)</li><li>- Retpaĝo (http://www.miaretejo.net)</li><li>- Retadreso (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Eraro dum la reformatigo de la bildo"},INFO:{PROFILE_REMOVED:"Profilo forigita",PROFILE_SAVED:"Profilo konservita"},HELP:{WARNING_PUBLIC_DATA:"La informoj afiŝitaj en via profilo <b>estas publikaj</b>: videblaj inkluzive de la personoj <b>ne konektitaj</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"}},LOCATION:{BTN_GEOLOC_ADDRESS:"Trovi mian adreson surmape",USE_GEO_POINT:"Aperi sur la mapoj {{'COMMON.APP_NAME'|translate}}?",LOADING_LOCATION:"Serĉado de la adreso...",LOCATION_DIVIDER:"Adreso",ADDRESS:"Strato",ADDRESS_HELP:"Strato, adres-aldonaĵo...",CITY:"Urbo",CITY_HELP:"Poŝto-kodo, Urbo, Lando",DISTANCE:"Maksimuma distanco ĉirkaŭ la urbo",DISTANCE_UNIT:"km",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"Poŝto-kodo, Urbo",PROFILE_POSITION:"Loko de la profilo",MODAL:{TITLE:"Serĉado de la adreso",SEARCH_HELP:"Urbo, Poŝto-kodo, Lando",ALTERNATIVE_RESULT_DIVIDER:"Alternativaj rezultoj por <b>{{address}}</b>:",POSITION:"Lat/Lon: {{lat}}/{{lon}}"},ERROR:{CITY_REQUIRED_IF_STREET:"Deviga kampo (ĉar strato estas tajpita)",REQUIRED_FOR_LOCATION:"Deviga kampo por aperi sur la mapo",INVALID_FOR_LOCATION:"Adreso nekonata",GEO_LOCATION_FAILED:"Neeblas ricevi vian lokiĝon. Bonvolu uzi la serĉo-butonon.",ADDRESS_LOCATION_FAILED:"Neeblas ricevi la lokon per la adreso"}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Retaj servoj",SUBSCRIPTION_DIVIDER_HELP:"La retaj servoj proponas pliajn nedevigajn servojn, delegitajn al aliulo.",BTN_ADD:"Aldoni servon",BTN_EDIT:"Mastrumi miajn servojn",NO_SUBSCRIPTION:"Neniu servo uzata",SUBSCRIPTION_COUNT:"Servoj / Abonoj",EDIT:{TITLE:"Retaj servoj",HELP_TEXT:"Mastrumu ĉi tie viajn abonojn kaj aliajn retajn servojn",PROVIDER:"Provizanto:"},TYPE:{ENUM:{EMAIL:"Ricevi la avizojn per retmesaĝo"}},CONFIRM:{DELETE_SUBSCRIPTION:"Ĉu vi certas, ke vi volas <b>forigi tiun abonon</b>?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Eraro dum la ŝarĝo de la retaj servoj",ADD_SUBSCRIPTION_FAILED:"Malsukceso por sendi la abonon",UPDATE_SUBSCRIPTION_FAILED:"Malsukceso por ĝisdatigi la abonon",DELETE_SUBSCRIPTION_FAILED:"Eraro dum la forigo de la abono"},MODAL_EMAIL:{TITLE:"Avizo per retmesaĝo",HELP:"Plenigu tiun ĉi formularon por <b>esti avizita per retmesaĝo</b> pri la okazaĵoj ĉe via konto.<br/>Via retadreso estos ĉifrita por esti videbla nur de la servo-provizanto.",EMAIL_LABEL:"Via retadreso:",EMAIL_HELP:"johano.stelaro@esperanto.org",FREQUENCY_LABEL:"Periodo de la avizoj:",FREQUENCY_DAILY:"Ĉiutaga",FREQUENCY_WEEKLY:"Ĉiusemajna",PROVIDER:"Servo-provizanto:"}},DOCUMENT:{HASH:"Haketo: ",LOOKUP:{TITLE:"Serĉado de dokumentoj",BTN_ACTIONS:"Agoj",SEARCH_HELP:"Sendanto:AAA*, tempo:1508406169",LAST_DOCUMENTS_DOTS:"Lastaj dokumentoj:",LAST_DOCUMENTS:"Lastaj dokumentoj",SHOW_QUERY:"Vidi la informpeton",HIDE_QUERY:"Kaŝi la informpeton",HEADER_TIME:"Dato/Horo",HEADER_ISSUER:"Sendanto",HEADER_RECIPIENT:"Ricevonto",READ:"Legita",BTN_REMOVE:"Forigi tiun ĉi dokumenton",BTN_COMPACT:"Densigi",HAS_CREATE_OR_UPDATE_PROFILE:"kreis aŭ modifis sian profilon",POPOVER_ACTIONS:{TITLE:"Agoj",REMOVE_ALL:"Forigi tiujn ĉi dokumentojn..."}},INFO:{REMOVED:"Dokumento forigita"},CONFIRM:{REMOVE:"Ĉu vi certas, ke vi volas <b>forigi tiun ĉi dokumenton</b>?",REMOVE_ALL:"Ĉu vi certas, ke vi volas <b>forigi tiujn ĉi dokumentojn</b>?"},ERROR:{LOAD_DOCUMENTS_FAILED:"Eraro dum la serĉado de dokumentoj",REMOVE_FAILED:"Eraro dum la forigo de la dokumento",REMOVE_ALL_FAILED:"Eraro dum la forigo de la dokumentoj"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"Profiloj, avizoj, privataj mesaĝoj",ENABLE_TOGGLE:"Aktivigi la krom-programon?",ENABLE_REMOTE_STORAGE:"Aktivigi la foran stokadon?",ENABLE_REMOTE_STORAGE_HELP:"Ebligas stoki (ĉifrite) viajn parametrojn ĉe la nodoj Cesium+",ENABLE_MESSAGE_TOGGLE:"Aktivigi la privatajn mesaĝojn?",PEER:"Adreso de la daten-nodo",POPUP_PEER:{TITLE:"Daten-nodo",HELP:"Tajpu la adreson de la nodo, kiun vi volas uzi:",PEER_HELP:"servo.domajno.com:port"},NOTIFICATIONS:{DIVIDER:"Avizoj",HELP_TEXT:"Aktivigu la avizo-tipojn, kiujn vi deziras ricevi:",ENABLE_TX_SENT:"Avizi pri la <b>senditaj pagoj</b>?",ENABLE_TX_RECEIVED:"Avizi pri la <b>ricevitaj pagoj</b>?",ENABLE_CERT_SENT:"Avizi pri la <b>senditaj atestaĵoj</b>?",ENABLE_CERT_RECEIVED:"Avizi pri <b>la ricevitaj atestaĵoj</b>?",ENABLE_HTML5_NOTIFICATION:"Anonci ĉiun novan avizon?",ENABLE_HTML5_NOTIFICATION_HELP:"Malfermas fenestreton por ĉiu nova avizo."},CONFIRM:{ASK_ENABLE_TITLE:"Kromaj funkcioj",ASK_ENABLE:'La krom-programo Cesium+ estas <b>malaktivigita</b> ĉe viaj parametroj, kio senaktivigas la funkciojn: <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> Profiloj Cesium+</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Avizoj</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Privataj mesaĝoj</b>.<li>&nbsp;&nbsp;<b><i class="icon ion-location"></i> Mapoj, ktp.</b>.</ul><br/><b>Ĉu vi deziras reaktivigi</b> la krom-programon?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"Adresito estas deviga por la ĉifrado."}},ES_PEER:{NAME:"Nomo",DOCUMENTS:"Dokumentoj",SOFTWARE:"Programo",DOCUMENT_COUNT:"Nombro de dokumentoj",EMAIL_SUBSCRIPTION_COUNT:"{{emailSubscription}} abonantoj pri avizoj per retmesaĝoj"},EVENT:{NODE_STARTED:"Via nodo ES API <b>{{params[0]}}</b> ekis",NODE_BMA_DOWN:"La nodo <b>{{params[0]}}:{{params[1]}}</b> (uzata de via nodo ES API) estas <b>neatingebla</b>.",NODE_BMA_UP:"La nodo <b>{{params[0]}}:{{params[1]}}</b> estas denove alirebla.",MEMBER_JOIN:"Vi estas nun <b>membro</b> de la mono <b>{{params[0]}}</b>!",MEMBER_LEAVE:"Vi <b>ne plu estas membro</b> de la mono <b>{{params[0]}}</b>!",MEMBER_EXCLUDE:"Vi <b>ne plu estas membro</b> de la mono <b>{{params[0]}}</b>, pro ne revalidiĝo aŭ pro manko da atestaĵoj.",MEMBER_REVOKE:"La nuligo de via konto efektiviĝis. Ĝi ne plu povos esti membro-konto de la mono <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"La revalidiĝo de via aliĝo al la mono <b>{{params[0]}}</b> estis <b>ricevita</b>.",TX_SENT:"Via <b>pago</b> al <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> efektiviĝis.",TX_SENT_MULTI:"Via <b>pago</b> al <b>{{params[1]}}</b> efektiviĝis.",TX_RECEIVED:"Vi <b>ricevis pagon</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"Vi <b>ricevis pagon</b> de <b>{{params[1]}}</b>.",CERT_SENT:"Via <b>atestado</b> al <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> efektiviĝis.",CERT_RECEIVED:"Vi <b>ricevis atestaĵon</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",USER:{LIKE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ŝatas vian profilon",FOLLOW_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> sekvas viajn agojn",STAR_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> notis vin ({{params[3]}} <b class=\"ion-star\">)",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid}"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> petas de vi moderigon pri la profilo: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri profilo foriginda: <b>{{params[2]}}</b>",ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri via profilo"},PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> komentis vian anoncon: <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian komenton pri via anonco: <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> respondis al via komento pri la anonco: <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian respondon al via komento pri la anonco: <b>{{params[2]}}</b>",FOLLOW_NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> komentis la paĝon: <b>{{params[2]}}</b>",FOLLOW_UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian komenton ĉe la paĝo: <b>{{params[2]}}</b>",FOLLOW_NEW:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> aldonis la paĝon: <b>{{params[2]}}</b>",FOLLOW_UPDATE:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis la paĝon: <b>{{params[2]}}</b>",MODERATION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid}"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> petas de vis moderigon pri la paĝo: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span ng-class="{\'gray\': !notification.uid, \'positive\':notification.uid}"><i class="icon" ng-class="{\'ion-person\': notification.uid, \'ion-key\': !notification.uid}"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri paĝo foriginda: <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri via paĝo: <b>{{params[2]}}</b>"}},CONFIRM:{ES_USE_FALLBACK_NODE:"Daten-nodo <b>{{old}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Ĉu vi volas provizore uzi la daten-nodon <b>{{new}}</b> ?"},ERROR:{ES_CONNECTION_ERROR:'Daten-nodo <b>{{server}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Cesium daŭrigos funkcii, <b>sen la krom-programo Cesium+</b> (uzanto-profiloj, privataj mesaĝoj, mapoj kaj grafikoj)<br/><br/>Kontrolu vian ret-konekton, aŭ ŝanĝu daten-nodon ĉe la <a class="positive" ng-click="doQuickFix(\'settings\')">parametroj de la krom-programo</a>.',ES_MAX_UPLOAD_BODY_SIZE:"La kvanto de datenoj sendotaj superas la limon fiksitan de la servilo.<br/>Bonvolu reprovi post, ekzemple, forigo de fotoj."}}),e.translations("es-ES",{COMMON:{CATEGORY:"Categoría",CATEGORIES:"Categorías",CATEGORY_SEARCH_HELP:"Búsqueda",LAST_MODIFICATION_DATE:"Actualización el",SUBMIT_BY:"Sometido por",BTN_PUBLISH:"Publicar",BTN_PICTURE_DELETE:"Suprimir",BTN_PICTURE_FAVORISE:"Principal",BTN_PICTURE_ROTATE:"Girar",BTN_ADD_PICTURE:"Añadir una foto",NOTIFICATIONS:{TITLE:"Notificaciónes",MARK_ALL_AS_READ:"Marcar todo como leído",NO_RESULT:"Ningúna notificación",SHOW_ALL:"Ver todo",LOAD_NOTIFICATIONS_FAILED:"Fracaso en la carga de las notificaciónes"}},MENU:{REGISTRY:"Profesionales",USER_PROFILE:"Mi perfil",MESSAGES:"Mensajes",NOTIFICATIONS:"Notificaciónes",INVITATIONS:"Invitaciónes"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Cuenta para una organización",ORGANIZATION_ACCOUNT_HELP:"Si representa una empresa, una asociación, etc.<br/>Ningún dividendo universal será creído por esta cuenta."},EVENT:{MEMBER_WITHOUT_PROFILE:'Para obtener sus certificaciónes más rapidamente, completa <a ui-sref="app.edit_profile">su perfil usuario</a>. Los miembros concederán más fácilmente su confianza a una identidad verificable.'},ERROR:{WS_CONNECTION_FAILED:"Cesium no puede recibir las notificaciónes, a causa de un error técnico (conexión al nodo de datos Cesium+).<br/><br/>Si el problema persiste, por favor <b>elige un otro nodo de datos</b> en las configuraciónes Cesium+."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Sugerir identidad a certificar...",BTN_ASK_CERTIFICATIONS_DOTS:"Solicitar otros miembros a certificarme…",BTN_ASK_CERTIFICATION:"Solicitar una certificación",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Sugerir certificaciónes",HELP:"Selectionar sus sugerencias"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Solicitar certificaciónes",HELP:"Selectionar los destinatarios"},SEARCH:{DIVIDER_PROFILE:"Cuentas",DIVIDER_PAGE:"Páginas",DIVIDER_GROUP:"Grupos"},CONFIRM:{SUGGEST_CERTIFICATIONS:"Está usted segura/o querer <b>mandar estas sugerencia de certificatión</b> ?",ASK_CERTIFICATION:"Está usted segura/o querer <b>mandar una solicitud de certificación</b> ?",ASK_CERTIFICATIONS:"Está usted segura/o querer <b>mandar una solicitud de certificación</b> a estas personas ?"}},INVITATION:{TITLE:"Invitaciónes",NO_RESULT:"Ningúna invitación en espera",BTN_DELETE_ALL:"Suprimir todas las invitaciónes",BTN_DELETE:"Suprimir la invitación",BTN_NEW_INVITATION:"Nueva invitación",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> solicita su certificación',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> él es sugerido por certificación',SUGGESTED_BY:'Sugerencia mandada por <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Invitaciónes"},LIST:{TITLE:"Invitaciónes"},NEW:{TITLE:"Nueva invitación",RECIPIENTS:"A",RECIPIENTS_HELP:"Destinatarios de la invitación",RECIPIENTS_MODAL_TITLE:"Destinatarios",RECIPIENTS_MODAL_HELP:"Por favor, elige los destinatarios :",SUGGESTION_IDENTITIES:"Sugerencia de certificación",SUGGESTION_IDENTITIES_HELP:"Certificaciónes a sugerir",SUGGESTION_IDENTITIES_MODAL_TITLE:"Sugerencias",SUGGESTION_IDENTITIES_MODAL_HELP:"Por favor, elige sus sugerencias :"},CONFIRM:{DELETE_ALL_CONFIRMATION:"La supresión de las invitaciónes es una <b>operación ireversible</b>.<br/><br/><b>Está usted segura/o </b> querer continuar ?",SEND_INVITATIONS_TO_CERTIFY:"Está usted segura/o querer <b>mandar esta invitación a certificar</b> ?"},INFO:{INVITATION_SENT:"Invitación mandada"},ERROR:{LOAD_INVITATIONS_FAILED:"Fracaso en la carga de las invitaciónes",REMOVE_INVITATION_FAILED:"Fracaso durante la supresión de la invitación",REMOVE_ALL_INVITATIONS_FAILED:"Fracaso durante la supresión de las invitaciónes",SEND_INVITATION_FAILED:"Fracaso durante el envío de la invitación",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invitación ilegible (formato desconocido)</span> - mandada por <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Comentarios",SHOW_MORE_COMMENTS:"Visualizar los comentarios anteriores",COMMENT_HELP:"Su comentario, preguntas, etc.",COMMENT_HELP_REPLY_TO:"Su repuesta…",BTN_SEND:"Mandar",POPOVER_SHARE_TITLE:"Mensaje #{{number}}",REPLY:"Responder",REPLY_TO:"Repuesta a :",REPLY_TO_LINK:"En repuesta a ",REPLY_TO_DELETED_COMMENT:"En repuesta a un comentario suprimido",REPLY_COUNT:"{{replyCount}} repuestas",DELETED_COMMENT:"Comentario suprimido",ERROR:{FAILED_SAVE_COMMENT:"Fracaso durante el respaldo del comentario",FAILED_REMOVE_COMMENT:"Fracaso durante la supresión del comentario"}},MESSAGE:{REPLY_TITLE_PREFIX:"Rep: ",FORWARD_TITLE_PREFIX:"Tr: ",BTN_REPLY:"Responder",BTN_COMPOSE:"Nuevo mensaje",BTN_WRITE:"Escribir",NO_MESSAGE_INBOX:"Ningun mensaje recibido",NO_MESSAGE_OUTBOX:"Ningun mensaje mandado",NOTIFICATIONS:{TITLE:"Mensajes",MESSAGE_RECEIVED:"Ha <b>recibido un mensaje</b><br/>de"},LIST:{INBOX:"Bandeja de entrada",OUTBOX:"Mensajes mandados",LAST_INBOX:"Nuevos mensajes",LAST_OUTBOX:"Mensajes enviados",BTN_LAST_MESSAGES:"Mensajes recientes",TITLE:"Mensajes",SEARCH_HELP:"Buscar en mensajes",POPOVER_ACTIONS:{TITLE:"Opciónes",DELETE_ALL:"Suprimir todos los mensajes"}},COMPOSE:{TITLE:"Nuevo mensaje",TITLE_REPLY:"Responder",SUB_TITLE:"Nuevo mensaje",TO:"A",OBJECT:"Objeto",OBJECT_HELP:"Objeto",ENCRYPTED_HELP:"Por favor, nota que este mensaje será cifrado antes envío, a fin que solo el destinatario pueda leerlo, y que esté asegurado que usted esté bien su autor.",MESSAGE:"Mensaje",MESSAGE_HELP:"Contenido del mensaje",CONTENT_CONFIRMATION:"El contenido del mensaje es vacío.<br/><br/>Sin embargo, quiere mandar el mensaje ?"},VIEW:{TITLE:"Mensaje",SENDER:"Mandado por",RECIPIENT:"Mandado a",NO_CONTENT:"Mensaje vacío",DELETE:"Eliminar el mensaje"},CONFIRM:{REMOVE:"Está usted segura/o querer <b>suprimir este mensaje</b> ?<br/><br/>Esta operación es ireversible.",REMOVE_ALL:"Está usted segura/o querer <b>suprimir todos los mensajes</b> ?<br/><br/>Esta operación es ireversible.",MARK_ALL_AS_READ:"Está usted segura/o querer <b>marcar todos los mensajes como leído</b> ?",USER_HAS_NO_PROFILE:"Esta identidad no tiene ningún perfil Cesium+. Se puede que no utilice la extensión Cesium+, y <b>así no consultará su mensaje</b>.<br/><br/>Está usted segura/o querer <b>continuar</b> a pesar de todo ?"},INFO:{MESSAGE_REMOVED:"Mensaje suprimido",All_MESSAGE_REMOVED:"Todos los mensajes fueron suprimido",MESSAGE_SENT:"Mensaje mandado"},ERROR:{SEND_MSG_FAILED:"Fracaso durante el envío del mensaje.",LOAD_MESSAGES_FAILED:"Fracaso durante la recuperación de los mensajes.",LOAD_MESSAGE_FAILED:"Fracaso durante la recuperación del mensaje.",MESSAGE_NOT_READABLE:"Lectura del mensaje imposible.",USER_NOT_RECIPIENT:"No esta el destinatario de este mensaje : deciframiento imposible.",NOT_AUTHENTICATED_MESSAGE:"La autenticidad del mensaje es dudosa o su contenido es corrupto.",REMOVE_MESSAGE_FAILED:"Fracaso en la supresión del mensaje",MESSAGE_CONTENT_TOO_LONG:"Valor demasiado largo ({{maxLength}} carácteres max).",MARK_AS_READ_FAILED:"Imposible marcar el mensaje como 'leído'.",LOAD_NOTIFICATIONS_FAILED:"Fracaso durante la recuperación de las notificaciónes de mensajes.",REMOVE_All_MESSAGES_FAILED:"Fracaso durante la supresión de todos los mensajes.",MARK_ALL_AS_READ_FAILED:"Fracaso durante el marcaje de los mensajes como leído.",RECIPIENT_IS_MANDATORY:"El destinatario es obligatorio."}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Número de bloque, hash, llave pública, etc.",POPOVER_FILTER_TITLE:"Filtros",HEADER_MEDIAN_TIME:"Fecha / Hora",HEADER_BLOCK:"Bloque #",HEADER_ISSUER:"Nodo emisor",BTN_LAST:"últimos bloques",DISPLAY_QUERY:"Mostrar la consulta",HIDE_QUERY:"Ocultar la consulta",TX_SEARCH_FILTER:{MEMBER_FLOWS:"Entradas/salidas de miembros",EXISTING_TRANSACTION:"Con transacciones",PERIOD:'<b class="ion-clock"></b> Entre el <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) y el <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Calculado por <b class="ion-key"></b> {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Transacciones que implican <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Fracaso en la búsqueda de los bloques."}},GROUP:{GENERAL_DIVIDER:"Informaciónes generales",LOCATION_DIVIDER:"Dirección",SOCIAL_NETWORKS_DIVIDER:"Redes sociales y sitio web",TECHNICAL_DIVIDER:"Informaciónes técnicas",CREATED_TIME:"Creada {{creationTime|formatFromNow}}",NOTIFICATIONS:{TITLE:"Invitaciónes"},LOOKUP:{TITLE:"Grupos",SEARCH_HELP:"Nombre de grupo, palabras , lugar, etc.",LAST_RESULTS_LIST:"Nuevos grupos :",OPEN_RESULTS_LIST:"Grupos abiertos :",MANAGED_RESULTS_LIST:"Grupos cerrados :",BTN_LAST:"Nuevos grupos",BTN_NEW:"Añado un grupo"},TYPE:{TITLE:"Nuevo grupo",SELECT_TYPE:"Tipo de grupo :",OPEN_GROUP:"Grupo abierto",OPEN_GROUP_HELP:"Un grupo abierto es accesible por cualquier miembro de la moneda.",MANAGED_GROUP:"Grupo administrado",MANAGED_GROUP_HELP:"un grupo administrado es gestionado por administradores y moderadores, que pueden aceptar, rechazar o excluir un miembro en su seno.",ENUM:{OPEN:"Grupo abierto",MANAGED:"Grupo administrado"}},VIEW:{POPOVER_SHARE_TITLE:"{{title}}",MENU_TITLE:"Opciones",REMOVE_CONFIRMATION:"Seguro que quieres eliminar este grupo?<br/><br/>Esta operación es irreversible."},EDIT:{TITLE:"Grupo",TITLE_NEW:"Nuevo grupo",RECORD_TITLE:"Título",RECORD_TITLE_HELP:"Título",RECORD_DESCRIPTION:"Descripción",RECORD_DESCRIPTION_HELP:"Descripción"},ERROR:{SEARCH_GROUPS_FAILED:"Fracaso en la búsqueda de grupos",REMOVE_RECORD_FAILED:"Error al eliminar el grupo"},INFO:{RECORD_REMOVED:"Grupo eliminado"}},REGISTRY:{CATEGORY:"Actividad principal",GENERAL_DIVIDER:"Informaciónes generales",LOCATION_DIVIDER:"Dirección",SOCIAL_NETWORKS_DIVIDER:"Redes sociales y sitio web",TECHNICAL_DIVIDER:"Informaciónes técnicas",BTN_SHOW_WOT:"Personas",BTN_SHOW_WOT_HELP:"Buscar personas",BTN_SHOW_PAGES:"Páginas",BTN_SHOW_PAGES_HELP:"Búsqueda de páginas",BTN_NEW:"Creer una página",MY_PAGES:"Mis páginas",NO_PAGE:"Sin página",SEARCH:{TITLE:"Páginas",SEARCH_HELP:"Qué, Quién : restaurante, Con Marcel, ...",BTN_ADD:"Nuevo",BTN_LAST_RECORDS:"Páginas recientes",BTN_ADVANCED_SEARCH:"búsqueda avanzada",BTN_OPTIONS:"Búsqueda avanzada",TYPE:"Tipo de página",LOCATION_HELP:"Ciudad",RESULTS:"Resultados",RESULT_COUNT_LOCATION:"{{count}} Resultado{{count>0?'s':''}}, cerca de {{location}}",RESULT_COUNT:"{{count}} resultado{{count>0?'s':''}}",LAST_RECORDS:"Páginas recientes",LAST_RECORD_COUNT_LOCATION:"{{count}} página{{count>0?'s':''}} reciente{{count>0?'s':''}}, cerca de {{location}}",LAST_RECORD_COUNT:"{{count}} página{{count>0?'s':''}} reciente{{count>0?'s':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Opciones avanzadas?"}},VIEW:{TITLE:"Anuario",CATEGORY:"Actividad principal :",LOCATION:"Dirección :",MENU_TITLE:"Opciónes",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Está usted segura/o querer suprimir esta página ?<br/><br/>Esta operación es ireversible."},TYPE:{TITLE:"Nueva página",SELECT_TYPE:"Tipo de página :",ENUM:{SHOP:"Comercio local",COMPANY:"Empresa",ASSOCIATION:"Asociación",INSTITUTION:"Institución"}},EDIT:{TITLE:"Edición",TITLE_NEW:"Nueva página",RECORD_TYPE:"Tipo de página",RECORD_TITLE:"Nombre",RECORD_TITLE_HELP:"Nombre",RECORD_DESCRIPTION:"Descripción",RECORD_DESCRIPTION_HELP:"Descripción de la actividad",RECORD_ADDRESS:"Calle",RECORD_ADDRESS_HELP:"Calle, edificio...",RECORD_CITY:"Ciudad",RECORD_CITY_HELP:"Ciudad",RECORD_SOCIAL_NETWORKS:"Redes sociales y sitio web",RECORD_PUBKEY:"Llave pública",RECORD_PUBKEY_HELP:"Llave pública de recepción de los pagos"},WALLET:{PAGE_DIVIDER:"Páginas",PAGE_DIVIDER_HELP:"Las páginas se refieren a actividades que aceptan dinero o lo favorecen: empresas, negocios, asociaciones, instituciones."},ERROR:{LOAD_CATEGORY_FAILED:"Fracaso en la carga de la lista de actividades",LOAD_RECORD_FAILED:"Fracaso durante la carga de la página",LOOKUP_RECORDS_FAILED:"Fracaso durante la ejecución de la búsqueda.",REMOVE_RECORD_FAILED:"Fracaso en la supresión de la página",SAVE_RECORD_FAILED:"Fracaso durante el respaldo",RECORD_NOT_EXISTS:"Página inexistente",GEO_LOCATION_NOT_FOUND:"Ciudad o código postal no encontrado"},INFO:{RECORD_REMOVED:"Página suprimida",RECORD_SAVED:"Página guardada"}},PROFILE:{PROFILE_DIVIDER:"Perfil Cesium+",PROFILE_DIVIDER_HELP:"Estos son datos auxiliares, almacenados fuera de la red monetaria.",NO_PROFILE_DEFINED:"Ningún perfil Cesium+",BTN_ADD:"Ingresar mi perfil",BTN_EDIT:"Editar mi perfil",BTN_DELETE:"Eliminar mi perfil",BTN_REORDER:"Reordenar",UID:"Seudónimo",TITLE:"Nombre, Apellido",TITLE_HELP:"Nombre, Apellido",DESCRIPTION:"A propósito de yo",DESCRIPTION_HELP:"A propósito de yo...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"Informaciónes generales",SOCIAL_NETWORKS_DIVIDER:"Redes sociales, sitios web",TECHNICAL_DIVIDER:"Informaciónes técnicas",MODAL_AVATAR:{TITLE:"Foto de perfil",SELECT_FILE_HELP:"Por favor, <b>elige un fichero imagen</b>, haciendo un clic sobre el botón por debajo :",BTN_SELECT_FILE:"Eligir una foto",RESIZE_HELP:"<b>Encuadra la imagen</b>, si es necesario. Un clic mantenido sobre la imagen permite desplazarla. Hace un clic sobre la zona abajo a la izquierda para hacer zoom.",RESULT_HELP:"<b>Aquí está el resultado</b> tal como está visible sobre su perfil :"},CONFIRM:{DELETE:"¿Estás seguro de que quieres <b>eliminar tu perfil Cesium+?</b><br/><br/>Esta operación es irreversible."},ERROR:{REMOVE_PROFILE_FAILED:"Error de eliminación de perfil",LOAD_PROFILE_FAILED:"Fracaso en la carga del perfil usuario.",SAVE_PROFILE_FAILED:"Fracaso durante el respaldo",INVALID_SOCIAL_NETWORK_FORMAT:"Formato no tomado en cuenta : por favor, indica una dirección válida.<br/><br/>Ejemplos :<ul><li>- Una página Facebook (https://www.facebook.com/user)</li><li>- Una página web (http://www.misitio.es)</li><li>- Una dirección email (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Fracaso durante el redimensionamiento de la imagen"},INFO:{PROFILE_REMOVED:"Perfil eliminado",PROFILE_SAVED:"Perfil respaldado"},HELP:{WARNING_PUBLIC_DATA:"Las informaciónes informadas en su perfil <b>están públicas</b> : visibles también por personas <b>no conectadas</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"}},LOCATION:{BTN_GEOLOC_ADDRESS:"Actualizar desde la dirección",USE_GEO_POINT:"Aparecer en la tarjeta {{'COMMON.APP_NAME'|translate}} ?",LOADING_LOCATION:"Encontrar la dirección ...",LOCATION_DIVIDER:"Dirección",ADDRESS:"Calle",ADDRESS_HELP:"Calle, complemento de dirección...",CITY:"Ciudad",CITY_HELP:"Ciudad, País",DISTANCE:"Distancia máxima alrededor de la ciudad",DISTANCE_UNIT:"km",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"Ciudad, País",PROFILE_POSITION:"Posición del perfil",MODAL:{TITLE:"Búsqueda de dirección",SEARCH_HELP:"Ciudad, País",ALTERNATIVE_RESULT_DIVIDER:"Resultados alternativos para <b>{{address}}</b> :",POSITION:"Latitud/Longitud : {{lat}} / {{lon}}"},ERROR:{CITY_REQUIRED_IF_STREET:"Requerido si una calle ha sido llenada",REQUIRED_FOR_LOCATION:"Campo obligatorio para aparecer en el mapa",INVALID_FOR_LOCATION:"Dirección desconocida",GEO_LOCATION_FAILED:"No se puede recuperar su ubicación Por favor usa el botón de búsqueda.",ADDRESS_LOCATION_FAILED:"No se puede recuperar la posición de la dirección."}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Servicios en línea",SUBSCRIPTION_DIVIDER_HELP:"Los servicios en línea ofrecen servicios adicionales opcionales, delegados a un tercero.",BTN_ADD:"Agregar un servicio",BTN_EDIT:"Administrar mis servicios",NO_SUBSCRIPTION:"Ningún servicio definido",SUBSCRIPTION_COUNT:"Servicios / Suscripción",EDIT:{TITLE:"Servicios en línea",HELP_TEXT:"Gestione sus suscripciones y otros servicios en línea aquí",PROVIDER:"Proveedor:"},TYPE:{ENUM:{EMAIL:"Recibir notificaciones por correo electrónico"}},CONFIRM:{DELETE_SUBSCRIPTION:"Deseas <b>eliminar</b> esta suscripción ?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Error al cargar servicios en línea",ADD_SUBSCRIPTION_FAILED:"Error al agregar suscripción",UPDATE_SUBSCRIPTION_FAILED:"Error durante la actualización de la suscripción",DELETE_SUBSCRIPTION_FAILED:"Error al eliminar la suscripción"},MODAL_EMAIL:{TITLE:"Notificación por correo electrónico",HELP:"Rellene este formulario para <b>ser notificado por correo electrónico</b> de los eventos de su cuenta. <br/> Su dirección de correo electrónico se cifrará únicamente para que sea visible para el proveedor de servicios.",EMAIL_LABEL:"Tu correo electrónico :",EMAIL_HELP:"carlos@dominio.com",FREQUENCY_LABEL:"Frecuencia de las notificaciones :",FREQUENCY_DAILY:"Diariamente",FREQUENCY_WEEKLY:"Semanal",PROVIDER:"Proveedor de servicio :"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"Perfiles, notificaciónes, mensajes privados",ENABLE_TOGGLE:"Activar la extensión ?",ENABLE_MESSAGE_TOGGLE:"Activar los mensajes privados ?",ENABLE_SETTINGS_TOGGLE:"Activar el almacenamiento a distancia de las configuraciónes ?",PEER:"Dirección del nodo de datos",POPUP_PEER:{TITLE:"Nodo de datos",HELP:"Ingresa la dirección del nodo que quiere utilizar :",PEER_HELP:"servidor.dominio.com:puerto"},NOTIFICATIONS:{DIVIDER:"Notificaciónes",HELP_TEXT:"Activa los tipos de notificaciónes que usted desea recibir :",ENABLE_TX_SENT:"Notificar la validación de los <b>pagos emitidos</b> ?",ENABLE_TX_RECEIVED:"Notificar la validación de los <b>pagos recibidos</b> ?",ENABLE_CERT_SENT:"Notificar la validación de las <b>certificaciónes emitidas</b> ?",ENABLE_CERT_RECEIVED:"Notificar la validación de las <b>certificaciónes recibidas</b> ?"},CONFIRM:{ASK_ENABLE_TITLE:"Nuevas funcionalidades",ASK_ENABLE:'Nuevas funcionalidades son disponibles : <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> Perfiles Cesium+</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Notificaciónes</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Mensajes privados</b>.</ul><br/>Fueron <b>desactivadas</b> en sus configuraciones.<br/><br/><b>Quiere usted activarlas</b> ?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"Un destinatario es obligatorio para el cifrado."}},EVENT:{NODE_STARTED:"Su nodo ES API <b>{{params[0]}}</b> es comenzado",NODE_BMA_DOWN:"El nodo <b>{{params[0]}}:{{params[1]}}</b> (utilizado por su nodo ES API) <b>no es localizable</b>.",NODE_BMA_UP:"El nodo <b>{{params[0]}}:{{params[1]}}</b> es de nuevo accesible.",MEMBER_JOIN:"Ahora usted está <b>miembro</b> de la moneda <b>{{params[0]}}</b> !",MEMBER_LEAVE:"No está <b>miembro</b> de la moneda <b>{{params[0]}}</b>!",MEMBER_EXCLUDE:"Usted ya no es un miembro de la moneda <b>{{params[0]}}</b>, la falta de no renovación o la falta de certificaciones.",MEMBER_REVOKE:"La revocación de su cuenta se ha hecho. Puede que no sea un miembro de la cuenta en moneda <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"Su renovación de adhesión a la moneda <b>{{params[0]}}</b> fue <b>tomado en cuenta</b>.",TX_SENT:"Su <b>pago</b> a <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> fue efectuado.",TX_SENT_MULTI:"Su <b>pago</b> a <b>{{params[1]}}</b> fue efectuado.",TX_RECEIVED:"Ha <b>recibido un pago</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"Ha <b>recibido un pago</b> de <b>{{params[1]}}</b>.",CERT_SENT:"Su <b>certificación</b> a <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> fue efectuada.",CERT_RECEIVED:"Ha <b>recibido una certificación</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha comentado su referencia : <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificado su comentario sobre su referencia : <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha contestado a su comentario sobre el referencia : <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificado la repuesta a su comentario sobre el referencia : <b>{{params[2]}}</b>"}},CONFIRM:{ES_USE_FALLBACK_NODE:"Nodo de datos <b> {{old}} </ b> dirección inalcanzable o no válida.<br/><br/>¿Desea utilizar temporalmente el nodo de datos <b>{{new}}</b>?"},ERROR:{ES_CONNECTION_ERROR:'Nodo de datos <b>{{server}}</b> dirección inalcanzable o no válida.<br/><br/>Cesium continuará funcionando, <b>sin la extensión Cesium+</b> (perfiles de usuario, mensajes privados), mapas y gráficos).<br/><br/>Verifique su conexión a Internet, o cambie el nodo de datos en <a class="positive" ng-click="doQuickFix(\'settings\')"> configuración de extensión </a>.',ES_MAX_UPLOAD_BODY_SIZE:"El volumen de datos a enviar excede el límite establecido por el servidor.<br/><br/>Por favor, inténtelo de nuevo después, por ejemplo, borrando fotos."}}),e.translations("fr-FR",{COMMON:{CATEGORY:"Catégorie",CATEGORIES:"Catégories",CATEGORY_SEARCH_HELP:"Recherche",COMMENT_HELP:"Commentaire",LAST_MODIFICATION_DATE:"Mise à jour le",SUBMIT_BY:"Soumis par",BTN_LIKE:"J'aime",BTN_LIKE_REMOVE:"Je n'aime plus",LIKES_TEXT:"{{total}} personne{{total > 1 ? 's' : ''}} {{total > 1 ? 'ont' : 'a'}} aimé cette page",ABUSES_TEXT:"{{total}} personne{{total > 1 ? 's' : ''}} {{total > 1 ? 'ont' : 'a'}} signalé un problème",BTN_REPORT_ABUSE_DOTS:"Signaler un problème ou un abus...",BTN_REMOVE_REPORTED_ABUSE:"Annuler mon signalement",BTN_PUBLISH:"Publier",BTN_PICTURE_DELETE:"Supprimer",BTN_PICTURE_FAVORISE:"Principale",BTN_PICTURE_ROTATE:"Tourner",BTN_ADD_PICTURE:"Ajouter une photo",NOTIFICATION:{TITLE:"Nouvelle notification | {{'COMMON.APP_NAME'|translate}}",HAS_UNREAD:"Vous avez {{count}} notification{{count>0?'s':''}} non lue{{count>0?'s':''}}"},NOTIFICATIONS:{TITLE:"Notifications",MARK_ALL_AS_READ:"Tout marquer comme lu",NO_RESULT:"Aucune notification",SHOW_ALL:"Voir tout",LOAD_NOTIFICATIONS_FAILED:"Erreur de chargement des notifications"},REPORT_ABUSE:{TITLE:"Signaler un problème",SUB_TITLE:"Merci d'expliquer succintement le problème :",REASON_HELP:"J'explique le problème...",ASK_DELETE:"Demander la suppression ?",CONFIRM:{SENT:"Signalement envoyé. Merci !"}}},MENU:{REGISTRY:"Pages",USER_PROFILE:"Mon profil",MESSAGES:"Messages",NOTIFICATIONS:"Notifications",INVITATIONS:"Invitations"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Compte pour une organisation",ORGANIZATION_ACCOUNT_HELP:"Si vous représentez une entreprise, une association, etc.<br/>Aucun dividende universel ne sera créé par ce compte."},EVENT:{MEMBER_WITHOUT_PROFILE:'Vous pouvez <a ui-sref="app.edit_profile">saisir votre profil Cesium+</a> (optionnel) pour offrir une meilleure visibilité de votre compte. Ce profil sera stocké dans <b>un annuaire indépendant</b> de la monnaie, mais décentralisé.'},ERROR:{WS_CONNECTION_FAILED:"Cesium ne peut pas recevoir les notifications, à cause d'une erreur technique (connexion au noeud de données Cesium+).<br/><br/>Si le problème persiste, veuillez <b>choisir un autre noeud de données</b> dans les paramètres Cesium+."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Suggérer des identités à certifier...",BTN_ASK_CERTIFICATIONS_DOTS:"Demander à des membres de me certifier...",BTN_ASK_CERTIFICATION:"Demander une certification",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Suggérer des certifications",HELP:"Sélectionner vos suggestions"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Demander des certifications",HELP:"Sélectionner les destinataires"},SEARCH:{DIVIDER_PROFILE:"Comptes",DIVIDER_PAGE:"Pages",DIVIDER_GROUP:"Groupes"},CONFIRM:{SUGGEST_CERTIFICATIONS:"Êtes-vous sûr de vouloir <b>envoyer ces suggestions de certification</b> ?",ASK_CERTIFICATION:"Êtes-vous sûr de vouloir <b>envoyer une demande de certification</b> ?",ASK_CERTIFICATIONS:"Êtes-vous sûr de vouloir <b>envoyer une demande de certification</b> à ces personnes ?"}},INVITATION:{TITLE:"Invitations",NO_RESULT:"Aucune invitation en attente",BTN_DELETE_ALL:"Supprimer toutes les invitations",BTN_DELETE:"Supprimer l'invitation",BTN_NEW_INVITATION:"Nouvelle invitation",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> demande votre certification',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> vous est suggéré pour certification',SUGGESTED_BY:'Suggestion envoyée par <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Invitations"},LIST:{TITLE:"Invitations"},NEW:{TITLE:"Nouvelle invitation",RECIPIENTS:"A",RECIPIENTS_HELP:"Destinataires de l'invitation",RECIPIENTS_MODAL_TITLE:"Destinataires",RECIPIENTS_MODAL_HELP:"Veuillez choisir les destinataires :",SUGGESTION_IDENTITIES:"Suggestions de certification",SUGGESTION_IDENTITIES_HELP:"Certifications à suggérer",SUGGESTION_IDENTITIES_MODAL_TITLE:"Suggestions",SUGGESTION_IDENTITIES_MODAL_HELP:"Veuillez choisir vos suggestions :"},CONFIRM:{DELETE_ALL_CONFIRMATION:"La suppression des invitations est une <b>opération irréversible</b>.<br/><br/><b>Êtes-vous sûr</b> de vouloir continuer ?",SEND_INVITATIONS_TO_CERTIFY:"Êtes-vous sûr de vouloir <b>envoyer cette invitation à certifier</b> ?"},INFO:{INVITATION_SENT:"Invitation envoyée"},ERROR:{LOAD_INVITATIONS_FAILED:"Échec du chargement des invitations",REMOVE_INVITATION_FAILED:"Erreur lors de la suppression de l'invitation",REMOVE_ALL_INVITATIONS_FAILED:"Erreur lors de la suppression des invitations",SEND_INVITATION_FAILED:"Erreur lors de l'envoi de l'invitation",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invitation illisible (format inconnu)</span> - envoyée par <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Commentaires",SHOW_MORE_COMMENTS:"Afficher les commentaires précédents",COMMENT_HELP:"Votre commentaire, question, etc.",COMMENT_HELP_REPLY_TO:"Votre réponse...",BTN_SEND:"Envoyer",POPOVER_SHARE_TITLE:"Message #{{number}}",REPLY:"Répondre",REPLY_TO:"Réponse à :",REPLY_TO_LINK:"En réponse à ",REPLY_TO_DELETED_COMMENT:"En réponse à un commentaire supprimé",REPLY_COUNT:"{{replyCount}} réponses",DELETED_COMMENT:"Commentaire supprimé",MODIFIED_ON:"modifié le {{time|formatDate}}",MODIFIED_PARENTHESIS:"(modifié ensuite)",ERROR:{FAILED_SAVE_COMMENT:"Erreur lors de la sauvegarde du commentaire",FAILED_REMOVE_COMMENT:"Erreur lors de la suppression du commentaire"}},MESSAGE:{REPLY_TITLE_PREFIX:"Rep: ",FORWARD_TITLE_PREFIX:"Tr: ",BTN_REPLY:"Répondre",BTN_COMPOSE:"Nouveau message",BTN_WRITE:"Ecrire",NO_MESSAGE_INBOX:"Aucun message reçu",NO_MESSAGE_OUTBOX:"Aucun message envoyé",NOTIFICATIONS:{TITLE:"Messages",MESSAGE_RECEIVED:"Vous avez <b>reçu un message</b><br/>de"},LIST:{INBOX:"Boîte de réception",OUTBOX:"Messages envoyés",LAST_INBOX:"Nouveaux messages",LAST_OUTBOX:"Messages envoyés",BTN_LAST_MESSAGES:"Messages récents",TITLE:"Messages",SEARCH_HELP:"Recherche dans les messages",POPOVER_ACTIONS:{TITLE:"Options",DELETE_ALL:"Supprimer tous les messages"}},COMPOSE:{TITLE:"Nouveau message",TITLE_REPLY:"Répondre",SUB_TITLE:"Nouveau message",TO:"A",OBJECT:"Objet",OBJECT_HELP:"Objet",ENCRYPTED_HELP:"Veuillez noter que ce message sera chiffré avant envoi, afin que seul le destinataire puisse le lire, et qu'il soit assuré que vous soyez bien son auteur.",MESSAGE:"Message",MESSAGE_HELP:"Contenu du message",CONTENT_CONFIRMATION:"Le contenu du message est vide.<br/><br/>Voulez-vous néanmoins envoyer le message ?"},VIEW:{TITLE:"Message",SENDER:"Envoyé par",RECIPIENT:"Envoyé à",NO_CONTENT:"Message vide",DELETE:"Supprimer le message"},CONFIRM:{REMOVE:"Êtes-vous sûr de vouloir <b>supprimer ce message</b> ?<br/><br/>Cette opération est irréversible.",REMOVE_ALL:"Êtes-vous sûr de vouloir <b>supprimer tous les messages</b> ?<br/><br/>Cette opération est irréversible.",MARK_ALL_AS_READ:"Êtes-vous sûr de vouloir <b>marquer tous les messages comme lus</b> ?",USER_HAS_NO_PROFILE:"Cette identité n'a aucun profil Cesium+. Il se peut qu'elle n'utilise pas l'extension Cesium+, et <b>ne consultera donc pas votre message</b>.<br/><br/>Êtes-vous sûr de vouloir <b>continuer</b> malgré tout ?"},INFO:{MESSAGE_REMOVED:"Message supprimé",All_MESSAGE_REMOVED:"Tous les messages ont été supprimés",MESSAGE_SENT:"Message envoyé"},ERROR:{SEND_MSG_FAILED:"Erreur lors de l'envoi du message.",LOAD_MESSAGES_FAILED:"Erreur lors de la récupération des messages.",LOAD_MESSAGE_FAILED:"Erreur lors de la récupération du message.",MESSAGE_NOT_READABLE:"Lecture du message impossible.",USER_NOT_RECIPIENT:"Vous n'êtes pas le destinataire de ce message : déchiffrement impossible.",NOT_AUTHENTICATED_MESSAGE:"L'authenticité du message est douteuse ou son contenu est corrompu.",REMOVE_MESSAGE_FAILED:"Erreur de suppression du message",MESSAGE_CONTENT_TOO_LONG:"Valeur trop longue ({{maxLength}} caractères max).",MARK_AS_READ_FAILED:"Impossible de marquer le message comme 'lu'.",LOAD_NOTIFICATIONS_FAILED:"Erreur lors de la récupération des notifications de messages.",REMOVE_All_MESSAGES_FAILED:"Erreur lors de la suppression de tous les messages.",MARK_ALL_AS_READ_FAILED:"Erreur lors du marquage des messages comme lus.",RECIPIENT_IS_MANDATORY:"Le destinataire est obligatoire."}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Numéro de bloc, hash, clé publique, etc.",POPOVER_FILTER_TITLE:"Filtres",HEADER_MEDIAN_TIME:"Date / Heure",HEADER_BLOCK:"Bloc #",HEADER_ISSUER:"Noeud émetteur",BTN_LAST:"Derniers blocs",DISPLAY_QUERY:"Afficher la requête",HIDE_QUERY:"Masquer la requête",TX_SEARCH_FILTER:{MEMBER_FLOWS:'<b class="ion-person"></b> Entrées/sorties de membres',EXISTING_TRANSACTION:'<b class="ion-card"></b> Avec transactions',PERIOD:'<b class="ion-clock"></b> Entre <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) et <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Calculé par <b class="ion-key"></b> {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Transactions concernant <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Erreur de la recherche des blocs."}},GROUP:{GENERAL_DIVIDER:"Informations générales",LOCATION_DIVIDER:"Adresse",SOCIAL_NETWORKS_DIVIDER:"Réseaux sociaux et site web",TECHNICAL_DIVIDER:"Informations techniques",CREATED_TIME:"Créé {{creationTime|formatFromNow}}",NOTIFICATIONS:{TITLE:"Invitations"},LOOKUP:{TITLE:"Groupes",SEARCH_HELP:"Nom de groupe, mots, lieu, etc.",LAST_RESULTS_LIST:"Nouveaux groupes :",OPEN_RESULTS_LIST:"Groupes ouverts :",MANAGED_RESULTS_LIST:"Groupes fermés :",BTN_LAST:"Nouveaux groupes",BTN_NEW:"J'ajoute un groupe"},TYPE:{TITLE:"Nouveau groupe",SELECT_TYPE:"Type de groupe :",OPEN_GROUP:"Groupe ouvert",OPEN_GROUP_HELP:"Un groupe ouvert est accessible par n'importe quel membre de la monnaie.",MANAGED_GROUP:"Groupe administré",MANAGED_GROUP_HELP:"un groupe administré est géré par des administrateurs et des modérateurs, qui peuvent accepter, refuser ou exclure un membre en son sein.",ENUM:{OPEN:"Groupe ouvert",MANAGED:"Groupe administré"}},VIEW:{POPOVER_SHARE_TITLE:"{{title}}",MENU_TITLE:"Options",REMOVE_CONFIRMATION:"Êtes-vous sûr de vouloir supprimer ce groupe ?<br/><br/>Cette opération est irréversible."},EDIT:{TITLE:"Groupe",TITLE_NEW:"Nouveau groupe",RECORD_TITLE:"Titre",RECORD_TITLE_HELP:"Titre",RECORD_DESCRIPTION:"Description",RECORD_DESCRIPTION_HELP:"Description"},ERROR:{SEARCH_GROUPS_FAILED:"Échec de la recherche de groupes",REMOVE_RECORD_FAILED:"Erreur de la suppression du groupe"},INFO:{RECORD_REMOVED:"Groupe supprimé"}},REGISTRY:{CATEGORY:"Activité principale",GENERAL_DIVIDER:"Informations générales",LOCATION_DIVIDER:"Adresse",SOCIAL_NETWORKS_DIVIDER:"Réseaux sociaux et site web",TECHNICAL_DIVIDER:"Informations techniques",BTN_SHOW_WOT:"Personnes",BTN_SHOW_WOT_HELP:"Rechercher des personnes",BTN_SHOW_PAGES:"Pages",BTN_SHOW_PAGES_HELP:"Rechercher des pages",BTN_NEW:"Créer une page",MY_PAGES:"Mes pages",NO_PAGE:"Aucune page",SEARCH:{TITLE:"Pages",SEARCH_HELP:"Quoi, Qui : restaurant, Chez Marcel, ...",BTN_ADD:"Nouveau",BTN_LAST_RECORDS:"Pages récentes",BTN_ADVANCED_SEARCH:"Recherche avancée",BTN_OPTIONS:"Recherche avancée",TYPE:"Type de page",LOCATION_HELP:"Où : Code postal, Ville",RESULTS:"Résultats",RESULT_COUNT_LOCATION:"{{count}} résultat{{count>0?'s':''}}, près de {{location}}",RESULT_COUNT:"{{count}} résultat{{count>0?'s':''}}",LAST_RECORDS:"Pages récentes",LAST_RECORD_COUNT_LOCATION:"{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}, près de {{location}}",LAST_RECORD_COUNT:"{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Options avancées ?"}},VIEW:{TITLE:"Annuaire",CATEGORY:"Activité principale :",LOCATION:"Adresse :",MENU_TITLE:"Options",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Êtes-vous sûr de vouloir supprimer cette page ?<br/><br/>Cette opération est irréversible."},TYPE:{TITLE:"Types",SELECT_TYPE:"Type de page :",ENUM:{SHOP:"Commerce local",COMPANY:"Entreprise",ASSOCIATION:"Association",INSTITUTION:"Institution"}},EDIT:{TITLE:"Edition",TITLE_NEW:"Nouvelle page",RECORD_TYPE:"Type de page",RECORD_TITLE:"Nom",RECORD_TITLE_HELP:"Nom",RECORD_DESCRIPTION:"Description",RECORD_DESCRIPTION_HELP:"Description de l'activité",RECORD_ADDRESS:"Rue",RECORD_ADDRESS_HELP:"Rue, bâtiment...",RECORD_CITY:"Ville",RECORD_CITY_HELP:"Ville",RECORD_SOCIAL_NETWORKS:"Réseaux sociaux et site web",RECORD_PUBKEY:"Clé publique",RECORD_PUBKEY_HELP:"Clé publique de réception des paiements"},WALLET:{PAGE_DIVIDER:"Pages",PAGE_DIVIDER_HELP:'Les pages référencent des activités acceptant la monnaie ou la favorisant : commerces, entreprises, associations, institutions. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref="app.es_network">le réseau des nœuds Cesium+</a>.'},ERROR:{LOAD_CATEGORY_FAILED:"Erreur de chargement de la liste des activités",LOAD_RECORD_FAILED:"Erreur lors du chargement de la page",LOOKUP_RECORDS_FAILED:"Erreur lors de l'exécution de la recherche",REMOVE_RECORD_FAILED:"Erreur lors de la suppression de la page",SAVE_RECORD_FAILED:"Erreur lors de la sauvegarde",RECORD_NOT_EXISTS:"Page inexistante",GEO_LOCATION_NOT_FOUND:"Ville ou code postal non trouvé"},INFO:{RECORD_REMOVED:"Page supprimée",RECORD_SAVED:"Page sauvegardée"}},PROFILE:{PROFILE_DIVIDER:"Profil Cesium+",PROFILE_DIVIDER_HELP:'Il s\'agit de données annexes, optionnelles. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref="app.es_network">le réseau Cesium+</a>.',NO_PROFILE_DEFINED:"Aucun profil saisi",BTN_ADD:"Saisir mon profil",BTN_EDIT:"Editer mon profil",BTN_DELETE:"Supprimer mon profil",BTN_REORDER:"Réordonner",UID:"Pseudonyme",TITLE:"Nom, Prénom",TITLE_HELP:"Nom, Prénom",DESCRIPTION:"A propos de moi",DESCRIPTION_HELP:"A propos de moi...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"Informations générales",SOCIAL_NETWORKS_DIVIDER:"Réseaux sociaux, sites web",TECHNICAL_DIVIDER:"Informations techniques",MODAL_AVATAR:{TITLE:"Photo de profil",SELECT_FILE_HELP:"Veuillez <b>choisir un fichier image</b>, en cliquant sur le bouton ci-dessous :",BTN_SELECT_FILE:"Choisir une photo",RESIZE_HELP:"<b>Recadrez l'image</b>, si besoin. Un clic maintenu sur l'image permet de la déplacer. Cliquez sur la zone en bas à gauche pour zoomer.",RESULT_HELP:"<b>Voici le résultat</b> tel que visible sur votre profil :"},CONFIRM:{DELETE:"Êtes-vous sûr de vouloir <b>supprimer votre profil Cesium+ ?</b><br/><br/>Cette opération est irréversible.",DELETE_BY_MODERATOR:"Êtes-vous sûr de vouloir <b>supprimer ce profil Cesium+ ?</b><br/><br/>Cette opération est irréversible."},ERROR:{REMOVE_PROFILE_FAILED:"Erreur de suppression du profil",LOAD_PROFILE_FAILED:"Erreur de chargement du profil",SAVE_PROFILE_FAILED:"Erreur lors de la sauvegarde",DELETE_PROFILE_FAILED:"Erreur lors de la suppression du profil",INVALID_SOCIAL_NETWORK_FORMAT:"Format non pris en compte : veuillez indiquer une adresse valide.<br/><br/>Exemples :<ul><li>- Une page Facebook (https://www.facebook.com/user)</li><li>- Une page web (http://www.monsite.fr)</li><li>- Une adresse email (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Erreur lors du redimensionnement de l'image"},INFO:{PROFILE_REMOVED:"Profil supprimé",PROFILE_SAVED:"Profil sauvegardé"},HELP:{WARNING_PUBLIC_DATA:"Les informations renseignées dans votre profil <b>sont publiques</b> : visibles y compris par des personnes <b>non connectées</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"}},LOCATION:{BTN_GEOLOC_ADDRESS:"Trouver mon adresse sur la carte",USE_GEO_POINT:"Apparaître sur les cartes {{'COMMON.APP_NAME'|translate}} ?",LOADING_LOCATION:"Recherche de l'adresse...",LOCATION_DIVIDER:"Adresse",ADDRESS:"Rue",ADDRESS_HELP:"Rue, complément d'adresse...",CITY:"Ville",CITY_HELP:"Code postal, Ville, Pays",DISTANCE:"Distance maximale autour de la ville",DISTANCE_UNIT:"km",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"Code postal, Ville",PROFILE_POSITION:"Position du profil",MODAL:{TITLE:"Recherche de l'adresse",SEARCH_HELP:"Ville, Code postal, Pays",ALTERNATIVE_RESULT_DIVIDER:"Résultats alternatifs pour <b>{{address}}</b> :",POSITION:"Lat/Lon : {{lat}}/{{lon}}"},ERROR:{CITY_REQUIRED_IF_STREET:"Champ obligatoire (car une rue est saisie)",REQUIRED_FOR_LOCATION:"Champ obligatoire pour apparaître sur la carte",INVALID_FOR_LOCATION:"Adresse inconnue",GEO_LOCATION_FAILED:"Impossible de récupérer votre position. Veuillez utiliser le bouton de recherche.",ADDRESS_LOCATION_FAILED:"Impossible de récupérer la position à partir de l'adresse"}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Services en ligne",SUBSCRIPTION_DIVIDER_HELP:"Les services en ligne offrent des services supplémentaires et optionnels, délégués à un perstataire de votre choix. Par exemple, pour recevoir les notifications de paiement par email.",BTN_ADD:"Ajouter un service",BTN_EDIT:"Gérer mes services",NO_SUBSCRIPTION:"Aucun service utilisé",SUBSCRIPTION_COUNT:"Services / Abonnements",EDIT:{TITLE:"Services en ligne",HELP_TEXT:"Gérez ici vos abonnements et autres services en ligne",PROVIDER:"Prestataire :"},TYPE:{ENUM:{EMAIL:"Recevoir les notifications par email"}},CONFIRM:{DELETE_SUBSCRIPTION:"Êtes-vous sûr de vouloir <b>supprimer cet abonnement</b> ?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Erreur lors du chargement des services en ligne",ADD_SUBSCRIPTION_FAILED:"Erreur de l'envoi de l'abonnement",UPDATE_SUBSCRIPTION_FAILED:"Erreur de la mise à jour de l'abonnement",DELETE_SUBSCRIPTION_FAILED:"Erreur lors de la suppression de l'abonnement"},MODAL_EMAIL:{TITLE:"Notification par email",HELP:"Remplissez ce formulaire pour <b>être notifié par email</b> des événements de votre compte.<br/>Votre adresse email sera chiffrée pour n'être visible que par le prestataire de service.",EMAIL_LABEL:"Votre email :",EMAIL_HELP:"jean.dupond@domaine.com",FREQUENCY_LABEL:"Fréquence des notifications :",FREQUENCY_DAILY:"Journalier",FREQUENCY_WEEKLY:"Hebdomadaire",PROVIDER:"Prestataire du service :"}},DOCUMENT:{HASH:"Hash : ",LOOKUP:{TITLE:"Recherche de documents",BTN_ACTIONS:"Actions",SEARCH_HELP:"issuer:AAA*, time:1508406169",LAST_DOCUMENTS_DOTS:"Derniers documents :",LAST_DOCUMENTS:"Derniers documents",SHOW_QUERY:"Voir la requête",HIDE_QUERY:"Masquer la requête",HEADER_TIME:"Date/Heure",HEADER_ISSUER:"Emetteur",HEADER_RECIPIENT:"Destinataire",READ:"Lu",BTN_REMOVE:"Supprimer ce document",BTN_COMPACT:"Compacter",HAS_CREATE_OR_UPDATE_PROFILE:"a créé ou modifié son profil",POPOVER_ACTIONS:{TITLE:"Actions",REMOVE_ALL:"Supprimer ces documents..."}},INFO:{REMOVED:"Document supprimé"},CONFIRM:{REMOVE:"Êtes-vous sûr de vouloir <b>supprimer ce document</b> ?",REMOVE_ALL:"Êtes-vous sûr de vouloir <b>supprimer ces documents</b> ?"},ERROR:{LOAD_DOCUMENTS_FAILED:"Erreur lors de la recherche de documents",REMOVE_FAILED:"Erreur lors de la suppression du document",REMOVE_ALL_FAILED:"Erreur lors de la suppression des documents"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"Profils, notifications, messages privés",ENABLE_TOGGLE:"Activer l'extension ?",ENABLE_REMOTE_STORAGE:"Activer le stockage distant ?",ENABLE_REMOTE_STORAGE_HELP:"Permet de stockage (chiffré) de vos paramètres sur les noeuds Cesium+",ENABLE_MESSAGE_TOGGLE:"Activer les messages privés ?",PEER:"Nœud de données Cesium+",POPUP_PEER:{TITLE:"Nœud de données",HELP:"Saisissez l'adresse du nœud que vous voulez utiliser :",PEER_HELP:"serveur.domaine.com:port"},NOTIFICATIONS:{DIVIDER:"Notifications",HELP_TEXT:"Activez les types de notifications que vous souhaitez recevoir :",ENABLE_TX_SENT:"Notifier les <b>paiements émis</b> ?",ENABLE_TX_RECEIVED:"Notifier les <b>paiements reçus</b> ?",ENABLE_CERT_SENT:"Notifier les <b>certifications émises</b> ?",ENABLE_CERT_RECEIVED:"Notifier les <b>certifications reçues</b> ?",ENABLE_HTML5_NOTIFICATION:"Avertir à chaque nouvelle notification ?",ENABLE_HTML5_NOTIFICATION_HELP:"Ouvre une petite fenêtre à chaque nouvelle notification."},CONFIRM:{ASK_ENABLE_TITLE:"Fonctionnalités optionnelles",ASK_ENABLE:'L\'extension Cesium+ est <b>désactivée</b> dans vos paramètres, rendant inactives les fonctionnalités : <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> Profils Cesium+</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Messages privés</b>.<li>&nbsp;&nbsp;<b><i class="icon ion-location"></i> Cartes, etc.</b>.</ul><br/><b>Souhaitez-vous ré-activer</b> l\'extension ?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"Un destinataire est obligatoire pour le chiffrement."}},ES_PEER:{NAME:"Nom",DOCUMENTS:"Documents",SOFTWARE:"Logiciel",DOCUMENT_COUNT:"Nombre de documents",EMAIL_SUBSCRIPTION_COUNT:"{{emailSubscription}} abonné{{emailSubscription ? 's' : ''}} aux notifications par email"},EVENT:{NODE_STARTED:"Votre noeud ES API <b>{{params[0]}}</b> est démarré",NODE_BMA_DOWN:"Le noeud <b>{{params[0]}}:{{params[1]}}</b> (utilisé par votre noeud ES API) est <b>injoignable</b>.",NODE_BMA_UP:"Le noeud <b>{{params[0]}}:{{params[1]}}</b> est à nouveau accessible.",MEMBER_JOIN:"Vous êtes maintenant <b>membre</b> de la monnaie <b>{{params[0]}}</b> !",MEMBER_LEAVE:"Vous n'êtes <b>plus membre</b> de la monnaie <b>{{params[0]}}</b> !",MEMBER_EXCLUDE:"Vous n'êtes <b>plus membre</b> de la monnaie <b>{{params[0]}}</b>, faute de non renouvellement ou par manque de certifications.",MEMBER_REVOKE:"La révocation de votre compte a été effectuée. Il ne pourra plus être un compte membre de la monnaie <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"Votre renouvellement d'adhésion à la monnaie <b>{{params[0]}}</b> a été <b>pris en compte</b>.",TX_SENT:"Votre <b>paiement</b> à <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a été effectué.",TX_SENT_MULTI:"Votre <b>paiement</b> à <b>{{params[1]}}</b> a été effectué.",TX_RECEIVED:"Vous avez <b>reçu un paiement</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"Vous avez <b>reçu un paiement</b> de <b>{{params[1]}}</b>.",CERT_SENT:"Votre <b>certification</b> à <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a été effectuée.",CERT_RECEIVED:"Vous avez <b>reçu une certification</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",USER:{LIKE_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> aime votre profil',FOLLOW_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> suit votre activité',STAR_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> vous a noté ({{params[3]}} <b class="ion-star">)',MODERATION_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> vous demande une modération sur le profil : <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> demande la suppression d\'un profil : <b>{{params[2]}}</b>',ABUSE_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a signalé votre profil'},PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a commenté votre page : <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a modifié son commentaire sur votre page : <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a répondu à votre commentaire sur la page : <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a modifié sa réponse à votre commentaire sur la page : <b>{{params[2]}}</b>",FOLLOW_NEW_COMMENT:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a commenté la page : <b>{{params[2]}}</b>',FOLLOW_UPDATE_COMMENT:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a modifié son commentaire sur la page : <b>{{params[2]}}</b>',FOLLOW_NEW:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a ajouté la page : <b>{{params[2]}}</b>',FOLLOW_UPDATE:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a modifié la page : <b>{{params[2]}}</b>',MODERATION_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> vous demande une modération sur la page : <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',DELETION_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a signalé une page à supprimer : <b>{{params[2]}}</b><br/><b class="dark ion-quote"> </b><span class="text-italic">{{params[3]}}</span>',ABUSE_RECEIVED:'<span class="positive"><i class="icon ion-person"></i>&thinsp;{{name||params[1]}}</span> a signalé votre page : <b>{{params[2]}}</b>'}},LIKE:{ERROR:{FAILED_TOGGLE_LIKE:"Impossible d'exécuter cette action."}},CONFIRM:{ES_USE_FALLBACK_NODE:"Nœud de données <b>{{old}}</b> injoignable ou adresse invalide.<br/><br/>Voulez-vous temporairement utiliser le nœud de données <b>{{new}}</b> ?"},ERROR:{ES_CONNECTION_ERROR:"Nœud de données <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Cesium va continuer à fonctionner, <b>sans l'extension Cesium+</b> (profils utilisateur, messages privés, cartes et graphiques)<br/><br/>Vérifiez votre connexion Internet, ou changez de nœud de données dans les <a class=\"positive\" ng-click=\"doQuickFix('settings')\">paramètres de l'extension</a>.",ES_MAX_UPLOAD_BODY_SIZE:"Le volume des données à envoyer dépasse la limite fixée par le serveur.<br/>Veuillez ré-essayer après avoir, par exemple, supprimer des photos."}}),e.translations("it-IT",{COMMON:{CATEGORY:"Categoria",CATEGORIES:"Categorie",CATEGORY_SEARCH_HELP:"Ricerca",LAST_MODIFICATION_DATE:"Aggiornato il ",SUBMIT_BY:"Inviato da",BTN_PUBLISH:"Pubblicare",BTN_PICTURE_DELETE:"Eliminare",BTN_PICTURE_FAVORISE:"Predefinito",BTN_PICTURE_ROTATE:"Girare",BTN_ADD_PICTURE:"Aggiungere foto",NOTIFICATIONS:{TITLE:"Notifiche",MARK_ALL_AS_READ:"Segna tutte come lette",NO_RESULT:"Nessuna notifica",SHOW_ALL:"Mostrare tutte",LOAD_NOTIFICATIONS_FAILED:"Impossibile caricare le notifiche"}},MENU:{REGISTRY:"Pagine",USER_PROFILE:"Mio profilo",MESSAGES:"Messaggi",NOTIFICATIONS:"Notifiche",INVITATIONS:"Inviti"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Conto per enti",ORGANIZATION_ACCOUNT_HELP:"Se rappresenta un'azienda, un'associazione, etc.<br/>Questo conto non potrà creare il Dividendo Universale."},EVENT:{MEMBER_WITHOUT_PROFILE:'Per ottenere sue certificazioni più velocemente, riempire le informazioni<a ui-sref="app.edit_profile">del suo profilo</a>. I membri della rete si fidano più volontieri di profili verificabili.'},ERROR:{
-WS_CONNECTION_FAILED:"Cesium non può ricevere notifiche a causa di un problema tecnico (di conessione al data node Cesium+).<br/><br/>Se il problema persiste, le chiediamo di <b>scegliere un'altro data node</b> nelle impostazioni di Cesium+."}},WOT:{BTN_SUGGEST_CERTIFICATIONS_DOTS:"Suggerire delle identità da certificare..",BTN_ASK_CERTIFICATIONS_DOTS:"Chiedere una certificazione ai membri...",BTN_ASK_CERTIFICATION:"Chiedere una certificazione",SUGGEST_CERTIFICATIONS_MODAL:{TITLE:"Suggerire delle certificazioni",HELP:"Scegliere i suoi suggerimenti, aiuti"},ASK_CERTIFICATIONS_MODAL:{TITLE:"Chiedere delle certificazioni",HELP:"Selezionare un ricevente"},SEARCH:{DIVIDER_PROFILE:"Conti",DIVIDER_PAGE:"Pagine",DIVIDER_GROUP:"Gruppi"},CONFIRM:{SUGGEST_CERTIFICATIONS:"E’ sicuro(a) di voler <b>suggerire queste certificazioni</b> ?",ASK_CERTIFICATION:" E’ sicuro(a) di voler  <b>chiedere una certificazione</b> ?",ASK_CERTIFICATIONS:" E’ sicuro(a) di voler <b>chiedere una certificazione</b> a questi membri ?"}},INVITATION:{TITLE:"Invitazioni",NO_RESULT:"Nessun invito ricevuto",BTN_DELETE_ALL:"Cancellare tutti gli inviti",BTN_DELETE:"Cancellare l'invito",BTN_NEW_INVITATION:"Nuovo invito",ASK_CERTIFICATION:'<a href="#/app/wot/{{pubkey}}/{{::uid}}">{{::name||uid}}</a> ti ha chiesto una certificazione',SUGGESTION_CERTIFICATION:'<a href="#/app/wot/{{::pubkey}}/{{::uid}}">{{::name||uid}}</a> è proposto per ricevere una certificazione',SUGGESTED_BY:'Suggerimento inviato da by <a class="positive" href="#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}">{{::issuer.name||issuer.uid}}</a>',NOTIFICATIONS:{TITLE:"Inviti"},LIST:{TITLE:"Inviti"},NEW:{TITLE:"Nuovo invito",RECIPIENTS:"A",RECIPIENTS_HELP:"Riceventi dell'invito",RECIPIENTS_MODAL_TITLE:"Riceventi",RECIPIENTS_MODAL_HELP:"Scegliere riceventi:",SUGGESTION_IDENTITIES:"Suggerimenti di identità da certificare",SUGGESTION_IDENTITIES_HELP:"Suggerimenti di certificazioni",SUGGESTION_IDENTITIES_MODAL_TITLE:"Suggerimenti",SUGGESTION_IDENTITIES_MODAL_HELP:"Scegli tuoi sugerimenti:"},CONFIRM:{DELETE_ALL_CONFIRMATION:"Cancellare degli inviti è <b>una operazione irreversibile</b>.<br/><br/><b>Sei sicuro/a</b> di voler proseguire",SEND_INVITATIONS_TO_CERTIFY:"<b>Sei sicuro/a</b> di voler <b>inviare questo suggerimento di certificazione</b> ?"},INFO:{INVITATION_SENT:"Invito inviato"},ERROR:{LOAD_INVITATIONS_FAILED:"Errore nel caricare gli inviti",REMOVE_INVITATION_FAILED:"Errore nel cancellare gli inviti",REMOVE_ALL_INVITATIONS_FAILED:"Errore nel cancellare inviti",SEND_INVITATION_FAILED:"Errore nel invio degli inviti",BAD_INVITATION_FORMAT:'<span class="assertive"><i class="ion-close-circled"></i> Invito illegibile (formatto sconosciuto)</span> - inviato da <a ui-sref="app.wot_identity({pubkey: \'{{::pubkey}}\', uid: \'{{::uid}}\' })">{{::name||uid}}</a>'}},COMMENTS:{DIVIDER:"Commenti",SHOW_MORE_COMMENTS:"Mostrare commenti precedenti",COMMENT_HELP:"Suo commento o domanda...",COMMENT_HELP_REPLY_TO:"Sua risposta...",BTN_SEND:"Inviare",POPOVER_SHARE_TITLE:"Messaggio #{{number}}",REPLY:"Rispondere",REPLY_TO:"Rispondere a:",REPLY_TO_LINK:"In risposta a",REPLY_TO_DELETED_COMMENT:"In risposta ad un commento cancellato",REPLY_COUNT:"{{replyCount}} risposte",DELETED_COMMENT:"Commento cancellato",ERROR:{FAILED_SAVE_COMMENT:"Salvare il commento cancellato",FAILED_REMOVE_COMMENT:"Cancellazione del commento fallita"}},MESSAGE:{REPLY_TITLE_PREFIX:"Re: ",FORWARD_TITLE_PREFIX:"Fw: ",BTN_REPLY:"Rispondere",BTN_COMPOSE:"Nuovo messaggio",BTN_WRITE:"Scrivere",NO_MESSAGE_INBOX:"Nessun messaggio ricevuto",NO_MESSAGE_OUTBOX:"Nessun messaggio inviato",NOTIFICATIONS:{TITLE:"Messaggi",MESSAGE_RECEIVED:"Hai <b>ricevuto un messaggio/b><br/>da"},LIST:{INBOX:"In entrata",OUTBOX:"In uscita",TITLE:"Messaggi privati",POPOVER_ACTIONS:{TITLE:"Opzioni",DELETE_ALL:"Eliminare tutti i messaggi"}},COMPOSE:{TITLE:"Nuovo messaggio",TITLE_REPLY:"Rispondere",SUB_TITLE:"Nuovo messaggio",TO:"A",OBJECT:"Oggetto",OBJECT_HELP:"Oggetto",ENCRYPTED_HELP:"La informiamo che questo messaggio verrà criptato prima della sua spedizione in modo che solo il destinatario lo possa leggere e essere sicuro che ne sia Lei l'autore.",MESSAGE:"Messaggio",MESSAGE_HELP:"Contenuto del messaggio",CONTENT_CONFIRMATION:"Nessun contenuto. <br/><br/>E’ sicura di voler inviare questo messaggio?"},VIEW:{TITLE:"Messaggio",SENDER:"Inviato da",RECIPIENT:"Inviato a",NO_CONTENT:"Messaggio vuoto",DELETE:"Cancellare il messaggio"},CONFIRM:{REMOVE:"E’ sicuro/a di voler <b>eliminare il messaggio</b>?<br/><br/> Questa operazione è irreversibile.",REMOVE_ALL:"E’ sicuro/a di voler <b>eliminare tutti i messaggi</b>?<br/><br/> Questa operazione è irreversibile.",MARK_ALL_AS_READ:"E’ sicuro/a di voler <b>segnare tutti i messaggi come letti/b>?",USER_HAS_NO_PROFILE:"Questa identità non ha un profilo Cesium+. Pertanto non può <b>leggere il suo messaggio</b>.<br/><br/>E’ sicuro/a di voler <b>continuare</b>?"},INFO:{MESSAGE_REMOVED:"Messaggio eliminato correttamente",All_MESSAGE_REMOVED:"Messaggi eliminati correttamente",MESSAGE_SENT:"Messaggio inviato"},ERROR:{SEND_MSG_FAILED:"Errore nella spedizione del messaggio.",LOAD_MESSAGES_FAILED:"Errore durante il caricamento dei messaggi.",LOAD_MESSAGE_FAILED:"Errore durante il caricamento del messaggio.",MESSAGE_NOT_READABLE:"Impossibile leggere il messaggio.",USER_NOT_RECIPIENT:"Lei non è il destinatario del messaggio: impossibile leggerlo.",NOT_AUTHENTICATED_MESSAGE:"Impossibile verificare l'autenticità del messaggio o contenuto corrotto.",REMOVE_MESSAGE_FAILED:"Errore avvenuto durante l'eliminazione del messaggio",MESSAGE_CONTENT_TOO_LONG:"Il contenuto supera il limite ({{maxLength}} caratteri ammessi).",MARK_AS_READ_FAILED:"Impossibile segnare il messaggio come 'letto'.",LOAD_NOTIFICATIONS_FAILED:"Errore nel caricare le notifiche.",REMOVE_All_MESSAGES_FAILED:"Errore avvenuto durante l'eliminazione dei messaggi.",MARK_ALL_AS_READ_FAILED:"Errore avvenuto nel segnare i messaggi come 'letti",RECIPIENT_IS_MANDATORY:"Destinatario obbligatorio"}},BLOCKCHAIN:{LOOKUP:{SEARCH_HELP:"Numero di blocco, hash...",POPOVER_FILTER_TITLE:"Filtro",HEADER_MEDIAN_TIME:"Data / Ora",HEADER_BLOCK:"Blocco #",HEADER_ISSUER:"Peer proprietario",BTN_LAST:"Ultimi blocchi",DISPLAY_QUERY:"Visualizzare query",HIDE_QUERY:"Nascondere query",TX_SEARCH_FILTER:{MEMBER_FLOWS:'<b class="ion-person"></b> Input/output Membri',EXISTING_TRANSACTION:'<b class="ion-card"></b> hanno transazioni',PERIOD:'<b class="ion-clock"></b> Tra <b class="gray">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) e <b class="gray">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})',ISSUER:'<b class="ion-android-desktop"></b> Calcolato da {{params[1]|formatPubkey}}',TX_PUBKEY:'<b class="ion-card"></b> Transazioni legate a  <b class="ion-key"></b> {{params[1]|formatPubkey}}'}},ERROR:{SEARCH_BLOCKS_FAILED:"Errore durante la ricerca dei blocchi."}},GROUP:{GENERAL_DIVIDER:"Informazioni generali",LOCATION_DIVIDER:"Indirizzo",SOCIAL_NETWORKS_DIVIDER:"Presenza sui social e/o sito web",TECHNICAL_DIVIDER:"Dati tecnici",CREATED_TIME:"Creato {{creationTime|formatFromNow}}",NOTIFICATIONS:{TITLE:"Inviti"},LOOKUP:{TITLE:"Gruppi",SEARCH_HELP:"Nome del grupo, parole chiavi, luogo, etc.",LAST_RESULTS_LIST:"Nuovi gruppi :",OPEN_RESULTS_LIST:"Gruppi aperti :",MANAGED_RESULTS_LIST:"Gruppi chiusi :",BTN_LAST:"Nuovi gruppi",BTN_NEW:"Aggiungo un grupo!"},TYPE:{TITLE:"Nuovo gruppo",SELECT_TYPE:"Tipo di gruppo :",OPEN_GROUP:"Gruppo aperto",OPEN_GROUP_HELP:"Un gruppo aperto è accessibile da qualsiasi membro della moneta.",MANAGED_GROUP:"Gruppo amministrato",MANAGED_GROUP_HELP:"un gruppo amministrato è gestito da amministratori e moderatori, che possono accetare, rifiutare o escludere membri del gruppo.",ENUM:{OPEN:"Gruppo aperto",MANAGED:"Gruppo amministrato"}},VIEW:{POPOVER_SHARE_TITLE:"{{title}}",MENU_TITLE:"Opzioni",REMOVE_CONFIRMATION:"Sei sicuro/a di voler chiudere questo gruppo ?<br/><br/>Questa operazione è irreversibile."},EDIT:{TITLE:"Gruppo",TITLE_NEW:"Nuovo gruppo",RECORD_TITLE:"Titolo",RECORD_TITLE_HELP:"Titolo",RECORD_DESCRIPTION:"Descrizione",RECORD_DESCRIPTION_HELP:"Descrizione"},ERROR:{SEARCH_GROUPS_FAILED:"Errore nella ricerca di gruppi",REMOVE_RECORD_FAILED:"Errore nel chiudere il gruppo"},INFO:{RECORD_REMOVED:"Gruppo eliminato"}},REGISTRY:{CATEGORY:"Attività principale",GENERAL_DIVIDER:"Informazioni di base",LOCATION_DIVIDER:"Indirizzo",SOCIAL_NETWORKS_DIVIDER:"Presenza sui social, sito web",TECHNICAL_DIVIDER:"Dati tecnici",BTN_SHOW_WOT:"Persone",BTN_SHOW_WOT_HELP:"Cercare persone",BTN_SHOW_PAGES:"Pagine",BTN_SHOW_PAGES_HELP:"Cercare pagine",BTN_NEW:"Aggiungere",MY_PAGES:"Mie pagine",NO_PAGE:"Nessuna pagina",SEARCH:{TITLE:"Pagine",SEARCH_HELP:"Che, chi: parrucchiere, Pizza Efisio, ...",BTN_ADD:"Nuovo",BTN_LAST_RECORDS:"Pagine recenti",BTN_ADVANCED_SEARCH:"Ricerca avanzata",BTN_OPTIONS:"Ricerca avanzata",TYPE:"Tipo di ente",LOCATION_HELP:"Città",RESULTS:"Risultati",RESULT_COUNT_LOCATION:"{{count}} risultato{{count>0?'i':''}}, vicino a {{location}}",RESULT_COUNT:"{{count}} risultato{{count>0?'i':''}}",LAST_RECORDS:"Pagine recenti:",LAST_RECORD_COUNT_LOCATION:"{{count}} pagina{{count>0?'e':''}} recente{{count>0?'i':''}}, vicino a{{location}}",LAST_RECORD_COUNT:"{{count}} pagina{{count>0?'e':''}} recente{{count>0?'i':''}}",POPOVER_FILTERS:{BTN_ADVANCED_SEARCH:"Opzioni avanzate ?"}},VIEW:{TITLE:"Annuario",CATEGORY:"Attività principale:",LOCATION:"Indirizzo:",MENU_TITLE:"Impostazioni",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"E’ sicuro/a di voler eliminare questo riferimento?<br/><br/>Questa operazione è irreversibile."},TYPE:{TITLE:"Nuovo riferimento",SELECT_TYPE:"Tipo di ente/organismo:",ENUM:{SHOP:"Negozi locali",COMPANY:"Azienda",ASSOCIATION:"Associazione",INSTITUTION:"Istituto"}},EDIT:{TITLE:"Modificare",TITLE_NEW:"Nuovo riferimento",RECORD_TYPE:"Tipo di ente",RECORD_TITLE:"Nome",RECORD_TITLE_HELP:"Nome",RECORD_DESCRIPTION:"Descrizione",RECORD_DESCRIPTION_HELP:"Descrivere l'attività",RECORD_ADDRESS:"Indirizzo",RECORD_ADDRESS_HELP:"Indirizzo: Strada, numero civico...",RECORD_CITY:"Città",RECORD_CITY_HELP:"Città, Paese",RECORD_SOCIAL_NETWORKS:"Presenza sui social e/o sito web",RECORD_PUBKEY:"Chiave pubblica",RECORD_PUBKEY_HELP:"Chiave pubblica per ricevere pagamenti"},WALLET:{PAGE_DIVIDER:"Pagine",PAGE_DIVIDER_HELP:"Le pagine sono un elenco dei profesionisti che accettano o favoriscono: negozi, aziende, associazioni, istituti..."},ERROR:{LOAD_CATEGORY_FAILED:"Errore nel caricamento delle attività principali",LOAD_RECORD_FAILED:"Caricamento fallito",LOOKUP_RECORDS_FAILED:"Errore nel caricare i dati",REMOVE_RECORD_FAILED:"Errore nella cancellazione",SAVE_RECORD_FAILED:"Impossibile salvare",RECORD_NOT_EXISTS:"Inesistente",GEO_LOCATION_NOT_FOUND:"Città o CAP inesistente"},INFO:{RECORD_REMOVED:"Pagina eliminata con successo.",RECORD_SAVED:"Pagina salvata"}},PROFILE:{PROFILE_DIVIDER:"Profilo Cesium+",PROFILE_DIVIDER_HELP:"Si tratta qui di data esterni, salvati fuori della rete della moneta.",NO_PROFILE_DEFINED:"Nessun profilo Cesium+",BTN_ADD:"Creare mio profilo",BTN_EDIT:"Modificare mio profilo",UID:"Pseudonimo",TITLE:"Cognome, Nome",TITLE_HELP:"Nome",DESCRIPTION:"A proposito di me",DESCRIPTION_HELP:"A proposito di me...",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"Informazioni generali",SOCIAL_NETWORKS_DIVIDER:"Presenza sui social e sito/i web",TECHNICAL_DIVIDER:"Dati tecnici",MODAL_AVATAR:{TITLE:"Avatar",SELECT_FILE_HELP:"<b>Scegliere un'immagine</b>, cliccando sul bottone qui sotto:",BTN_SELECT_FILE:"Scegliere un'immagine",RESIZE_HELP:"<b>Ritagliare l'immagine</b> se necessario. Cliccare sull'immagine permette di spostarla. Cliccando nella zona a basso sinistra permette di fare uno zoom-in.",RESULT_HELP:"<b>Questo è il risultato</b> come visibile sul suo profilo:"},ERROR:{LOAD_PROFILE_FAILED:"Impossibile caricare il profilo dell’utente.",SAVE_PROFILE_FAILED:"Impossibile salvare il profilo",INVALID_SOCIAL_NETWORK_FORMAT:"Formatto scorretto: URL sbagliato.<br/><br/>Esempi: :<ul><li>- Una pagina Facebook (https://www.facebook.com/user)</li><li>- Un sito: (http://www.domain.com)</li><li>- Un indirizzo mail: (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Errore nel ritagliare l'immagine"},INFO:{PROFILE_SAVED:"Profilo salvato"},HELP:{WARNING_PUBLIC_DATA:"La informiamo che le informazioni qui pubblicate <b>sono pubbliche</b>: sono anche visibili <b>da gente non registrata/b>."}},LOCATION:{BTN_GEOLOC_ADDRESS:"Trovare mio indirizzo sulla mappa",USE_GEO_POINT:"Geo-localizzare (raccomandato)?",LOADING_LOCATION:"Cercando indirizzo...",LOCATION_DIVIDER:"Posizione",ADDRESS:"Indirizzo",ADDRESS_HELP:"Indirizzo (opzionale)",CITY:"Città",CITY_HELP:"Città, Paese",DISTANCE:"Distanza massimale intorno alla città",DISTANCE_UNIT:"km",DISTANCE_OPTION:"{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",SEARCH_HELP:"Città, CAP",MODAL:{TITLE:"Cercare indirizzo",SEARCH_HELP:"Città, Paese",ALTERNATIVE_RESULT_DIVIDER:"Risultati alternativi <b>{{address}}</b>:",POSITION:"lat/lon : {{lat}} {{lon}}"},ERROR:{REQUIRED_FOR_LOCATION:"Campo obbligatorio per apparire sulla mappa",INVALID_FOR_LOCATION:"Indirizzo sconosciuto",GEO_LOCATION_FAILED:"Impossibile trovare sua posizione. Utilizzi il bottone di ricerca.",ADDRESS_LOCATION_FAILED:"Indirizzo non trovato"}},SUBSCRIPTION:{SUBSCRIPTION_DIVIDER:"Servizi online",SUBSCRIPTION_DIVIDER_HELP:"I servizi online offrono servizi addizionali opzionali, delegati ad terzi.",BTN_ADD:"Aggiungere un servizio",BTN_EDIT:"Gestire miei servizi",NO_SUBSCRIPTION:"Nessun servizio utilizzato",SUBSCRIPTION_COUNT:"Servizi/ Abbonamenti",EDIT:{TITLE:"Servizi online",HELP_TEXT:"Qui si possono gestire gli abbonamenti e/o altri servizi online",PROVIDER:"Prestatore :"},TYPE:{ENUM:{EMAIL:"Ricevere notifiche per posta elettronica"}},CONFIRM:{DELETE_SUBSCRIPTION:"Sei sicuro/a di voler <b>cancellare questo abbonamento</b> ?"},ERROR:{LOAD_SUBSCRIPTIONS_FAILED:"Errore nel caricamento dei servizi online",ADD_SUBSCRIPTION_FAILED:"Errore nel invio dell' abbonamento",UPDATE_SUBSCRIPTION_FAILED:"Errore nel aggiornamento dell' abbonamento",DELETE_SUBSCRIPTION_FAILED:"Errore nella cancellazine dell' abbonamento"},MODAL_EMAIL:{TITLE:"Notifiche per posta elettronica",HELP:"Riempi questo formulario per <b>essere notificato/a per e-mail</b> degli eventi che avvengono sul tuo conto.<br/>Tuo indizzo mail sarà cifrato e solo il prestatore del servizio lo potrà vedere.",EMAIL_LABEL:"Tuo indirizzo mail :",EMAIL_HELP:"cristiana.leonardi@dominio.com",FREQUENCY_LABEL:"Frequenza delle notifiche :",FREQUENCY_DAILY:"Quotidiano",FREQUENCY_WEEKLY:"Settimanale",PROVIDER:"Prestatore del servizio :"}},DOCUMENT:{HASH:"Hash: ",LOOKUP:{TITLE:"Ricerca di documenti",BTN_ACTIONS:"Azioni",SEARCH_HELP:"issuer:AAA*, time:1508406169",LAST_DOCUMENTS:"Ultimi documenti",SHOW_QUERY:"Visualizzare la richiesta",HIDE_QUERY:"Nacondere la richiesta",HEADER_TIME:"Data/Ora",HEADER_ISSUER:"Emittente",HEADER_RECIPIENT:"Destinatario",READ:"Letto",BTN_REMOVE:"Eliminare questo documento",POPOVER_ACTIONS:{TITLE:"Azioni",REMOVE_ALL:"Eliminare questi documenti..."}},INFO:{REMOVED:"Documento eliminato"},CONFIRM:{REMOVE:"Sei sicuro/a di voler <b>eliminare questo documento</b> ?",REMOVE_ALL:"Si sicuro/a di voler <b>eliminare questi documenti</b> ?"},ERROR:{LOAD_DOCUMENTS_FAILED:"Errore nella ricerca dei documenti",REMOVE_FAILED:"Errore nell'eliminazione del documento",REMOVE_ALL_FAILED:"Errore nell'eliminazione dei documenti"}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",PLUGIN_NAME_HELP:"Profili di utenti, notifiche, messaggi privati",ENABLE_TOGGLE:"Abilitare l'estensione ?",ENABLE_MESSAGE_TOGGLE:"Abilitare i messaggi? privati",ENABLE_SETTINGS_TOGGLE:"Abilitare stoccaggio su dispositivi esterni per le impostazioni?",PEER:"Indirizzo di data peers",POPUP_PEER:{TITLE:"Data peer",HELP:"Definire l'indirizzo da usare per il peer:",PEER_HELP:"server.domain.com:port"},NOTIFICATIONS:{DIVIDER:"Notifiche",HELP_TEXT:"Scegliere le notifiche che accetta ricevere:",ENABLE_TX_SENT:"Notificarmi di <b>pagamenti inviati</b> con successo?",ENABLE_TX_RECEIVED:"Notificarmi di <b>pagamenti in entrata</b>?",ENABLE_CERT_SENT:"Notificarmi delle <b>certificazioni inviate</b>?",ENABLE_CERT_RECEIVED:"Notificarmi di <b>certificazioni ricevute</b>?"},CONFIRM:{ASK_ENABLE_TITLE:"Nuove funzionalità",ASK_ENABLE:'Sono disponibili nuove funzionalità: <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i>Profili di utenti</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifications"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Messaggi privati/b>.</ul><br/>Sono state <b>disabilitate</b> nelle sue impostazioni.<br/><br/><b>Desidera abilitare</b> queste funzionalità?'}},ES_WALLET:{ERROR:{RECIPIENT_IS_MANDATORY:"Un destinatario è necessario per il criptaggio."}},EVENT:{NODE_STARTED:"Suo nodo ES API <b>{{params[0]}}</b> è UP",NODE_BMA_DOWN:"Nodo<b>{{params[0]}}:{{params[1]}}</b> (utilizzato dal suo ES API) è <b>indisponibile</b>.",NODE_BMA_UP:"Nodo <b>{{params[0]}}:{{params[1]}}</b> è di nuovo attivo.",MEMBER_JOIN:"E diventato <b>membro/a</b> della WoT della moneta <b>{{params[0]}}</b>!",MEMBER_LEAVE:"Non <b>è più membro/a</b> della WoT della moneta <b>{{params[0]}}</b>!",MEMBER_EXCLUDE:"Non è <b>più membro/a</b> della WoT della moneta<b>{{params[0]}}</b>, a causa di certificazioni non rinnovate o soglia di certificazioni non raggiunta.",MEMBER_REVOKE:"Il suo conto è stato revocato. Da ora in poi non farà più parte della WoT. <b>{{params[0]}}</b>.",MEMBER_ACTIVE:"La sua presenza nella WoT <b>{{params[0]}}</b> è stata <b>rinnovata correttamente</b>.",TX_SENT:"Il suo pagamento <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> è stato eseguito.",TX_SENT_MULTI:"Il suo pagamento <b>{{params[1]}}</b> è stato eseguito.",TX_RECEIVED:"Ha ricevuto un pagamento da <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"Ha ricevuto un pagamento da <b>{{params[1]}}</b>.",CERT_SENT:"Sua <b>certificazione</b> a favore di <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> è stata eseguita.",CERT_RECEIVED:"Ha ricevuto <b>una certificazione</b> da parte di <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha scritto un commento sul suo riferimento: <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificato il suo commento sul suo riferimento: <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha risposto al suo commento sul riferimento: <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificato sua risposta sul suo commento a proposito del riferimento: <b>{{params[2]}}</b>"}},CONFIRM:{ES_USE_FALLBACK_NODE:"Nodo<b>{{old}}</b> irraggiungibile o indirizzo sbagliato.<br/><br/>Vuoi utilizzare temporaneamente il nodo di dati <b>{{new}}</b> ?"},ERROR:{ES_CONNECTION_ERROR:"Nodo di dati<b>{{server}}</b>  irraggiungibile o indirizzo sbagliato.<br/><br/>Cesium continuerà a funzionare <b>senza l'estensione Cesium+</b> (profili utenti, messaggi privati, mappe e grafici)<br/><br/>Verifica tua connessione o cambia nodo <a class=\"positive\" ng-click=\"doQuickFix('settings')\">impostazioni dell'estensione</a>.",ES_MAX_UPLOAD_BODY_SIZE:"Il volume di data da inviare supera il limite imposto dal server.<br/><br/>Suggeriamo di riprovare dopo aver eliminato delle foto, per esempio."}}),e.translations("nl-NL",{COMMON:{CATEGORY:"Categorie",CATEGORIES:"Categorieën",CATEGORY_SEARCH_HELP:"Zoeken",LAST_MODIFICATION_DATE:"Vernieuwd op ",SUBMIT_BY:"Ingediend door",BTN_PUBLISH:"Publiceren",BTN_PICTURE_DELETE:"Wissen",BTN_PICTURE_FAVORISE:"Default",BTN_ADD_PICTURE:"Afbeelding toevoegen",NOTIFICATIONS:{TITLE:"Notificaties",MARK_ALL_AS_READ:"Markeer alles als gelezen",NO_RESULT:"Geen berichten",SHOW_ALL:"Toon alles",LOAD_NOTIFICATIONS_FAILED:"Kan berichten niet laden"}},MENU:{REGISTRY:"Pagina's",USER_PROFILE:"Mijn profiel",MESSAGES:"Berichten"},ACCOUNT:{NEW:{ORGANIZATION_ACCOUNT:"Ondernemingsrekening",ORGANIZATION_ACCOUNT_HELP:"Als je een onderneming, vereniging etc. vertegenwoordigt.<br/>Deze rekening zal geen dividend créeren."},EVENT:{MEMBER_WITHOUT_PROFILE:'Vul <a ui-sref="app.edit_profile"je gebruikersprofiel</a> in om sneller een certificering te verkrijgen. Leden zullen een verfifieerbare identiteit eerder vertrouwen.'}},COMMENTS:{DIVIDER:"Commentaren",SHOW_MORE_COMMENTS:"Toon eerdere commentaren",COMMENT_HELP:"Jouw commentaar, vraag...",COMMENT_HELP_REPLY_TO:"Jouw antwoord...",BTN_SEND:"Verzenden",POPOVER_SHARE_TITLE:"Bericht #{{number}}",REPLY:"Antwoord",REPLY_TO:"Antwoorden op:",REPLY_TO_LINK:"In antwoord op ",REPLY_TO_DELETED_COMMENT:"In antwoord op een gewist bericht",REPLY_COUNT:"{{replyCount}} antwoorden",DELETED_COMMENT:"Bericht gewist"},MESSAGE:{REPLY_TITLE_PREFIX:"Re: ",FORWARD_TITLE_PREFIX:"Fw: ",BTN_REPLY:"Antwoord",BTN_COMPOSE:"Nieuw bericht",BTN_WRITE:"Schrijven",NO_MESSAGE_INBOX:"Geen bericht ontvangen",NO_MESSAGE_OUTBOX:"Geen bericht verzonden",NOTIFICATIONS:{TITLE:"Berichten",MESSAGE_RECEIVED:"Je hebt een <b>bericht ontvangen</b><br/>van"},LIST:{INBOX:"Inbox",OUTBOX:"Verzonden",TITLE:"Privé",POPOVER_ACTIONS:{TITLE:"Opties",DELETE_ALL:"Alle berichten wissen"}},COMPOSE:{TITLE:"Nieuw bericht",TITLE_REPLY:"Antwoord",SUB_TITLE:"Nieuw bericht",TO:"Aan",OBJECT:"Onderwerp",OBJECT_HELP:"Onderwerp",ENCRYPTED_HELP:"Please note this message will by encrypt before sending zodat alleen de ontvanger het kan lezen en zeker kan zijn dat jij de auteur bent.",MESSAGE:"Bericht",MESSAGE_HELP:"Berichtinhoud",CONTENT_CONFIRMATION:"Geen berichtinhoud.<br/><br/>Weet je zeker dat je dit bericht wil verzenden?"},VIEW:{TITLE:"Bericht",SENDER:"Verzonden door",RECIPIENT:"Verzonden aan",NO_CONTENT:"Leeg bericht"},CONFIRM:{REMOVE:"Weet je zeker dat je <b>dit bericht wil wissen</b>?<br/><br/>Dit kan niet ongedaan gemaakt worden.",REMOVE_ALL:"Weet je zeker dat je <b>alle berichten wil wissen</b>?<br/><br/>Dit kan niet ongedaan gemaakt worden.",MARK_ALL_AS_READ:"Weet je zeker dat je <b>alle berichten als gelezen wil markeren</b>?"},INFO:{MESSAGE_REMOVED:"Bericht succesvol gewist",All_MESSAGE_REMOVED:"Berichten succesvol gewist",MESSAGE_SENT:"Bericht verzonden"},ERROR:{SEND_MSG_FAILED:"Fout tijdens verzending.",LOAD_MESSAGES_FAILED:"Kan berichten niet laden.",LOAD_MESSAGE_FAILED:"Kan bericht niet laden.",MESSAGE_NOT_READABLE:"Kan bericht niet lezen.",USER_NOT_RECIPIENT:"Je bent niet de geadresseerde van dit bericht: het kan niet gelezen worden.",NOT_AUTHENTICATED_MESSAGE:"De authenticiteit van het bericht is onduidelijk of de inhoud is gecorrumpeerd.",REMOVE_MESSAGE_FAILED:"Kan bericht niet wissen.",MESSAGE_CONTENT_TOO_LONG:"Waarde te lang (max {{maxLength}} characters).",MARK_AS_READ_FAILED:"Kan bericht niet als gelezen markeren.",LOAD_NOTIFICATIONS_FAILED:"Kan niet alle berichtnotificaties laden.",REMOVE_All_MESSAGES_FAILED:"Kan niet alle berichten wissen.",MARK_ALL_AS_READ_FAILED:"Kan berichten niet als gelezen markeren."}},REGISTRY:{CATEGORY:"Hoofdactiviteit",GENERAL_DIVIDER:"Basisinformatie",LOCATION_DIVIDER:"Adres",SOCIAL_NETWORKS_DIVIDER:"Sociale media en website",TECHNICAL_DIVIDER:"Technische informatie",BTN_NEW:"Toevoegen",SEARCH:{TITLE:"Bedrijfsregister",TITLE_SMALL_DEVICE:"Bedrijfsregister",SEARCH_HELP:"Wie, Wat: kapper, Lili's restaurant, ...",BTN_ADD:"Nieuw",BTN_OPTIONS:"Geavanceerd zoeken",TYPE:"Soort organisatie",LOCATION:"Locatie",LOCATION_HELP:"Plaats",LAST_RECORDS:"Nieuwste referenties:",RESULTS:"Resultaten:"},VIEW:{TITLE:"Register",CATEGORY:"Hoofdactiviteit:",LOCATION:"Adres:",MENU_TITLE:"Opties",POPOVER_SHARE_TITLE:"{{title}}",REMOVE_CONFIRMATION:"Weet je zeker dat je deze referentie wil verwijderen?<br/><br/>Dit kan niet ongedaan worden gemaakt."},TYPE:{TITLE:"Nieuwe referentie",SELECT_TYPE:"Soort organizatie:",ENUM:{SHOP:"Locale winkel",COMPANY:"Onderneming",ASSOCIATION:"Stichting",INSTITUTION:"Instituut"}},EDIT:{TITLE:"Bewerk",TITLE_NEW:"Nieuwe referentie",RECORD_TYPE:"Soort organizatie",RECORD_TITLE:"Naam",RECORD_TITLE_HELP:"Naam",RECORD_DESCRIPTION:"Beschrijving",RECORD_DESCRIPTION_HELP:"Omschrijf activiteit",RECORD_ADDRESS:"Straat",RECORD_ADDRESS_HELP:"Straat, gebouw...",RECORD_CITY:"Plaats",RECORD_CITY_HELP:"Plaats",RECORD_SOCIAL_NETWORKS:"Sociale media en website",RECORD_PUBKEY:"Publieke sleutel",RECORD_PUBKEY_HELP:"Publieke sleutel om betalingen te ontvangen"},ERROR:{LOAD_CATEGORY_FAILED:"Laden hoofdactiveiten mislukt",LOAD_RECORD_FAILED:"Laden datasheet mislukt",LOOKUP_RECORDS_FAILED:"Opzoeken datasheets is mislukt.",REMOVE_RECORD_FAILED:"Verwijderen datasheet mislukt",SAVE_RECORD_FAILED:"Opslaan datasheet mislukt",RECORD_NOT_EXISTS:"Datasheet niet gevonden"},INFO:{RECORD_REMOVED:"Datasheet succesvol verwijderd"}},PROFILE:{UID:"Pseudoniem",TITLE:"Naam",TITLE_HELP:"Naam",DESCRIPTION:"Over mij",DESCRIPTION_HELP:"Over mij...",ADDRESS:"Adres",ADDRESS_HELP:"Adres (optioneel)",CITY:"Plaats",CITY_HELP:"Plaats (optioneel)",SOCIAL_HELP:"http://...",GENERAL_DIVIDER:"Algemene informatie",LOCATION_DIVIDER:"Localisatie",SOCIAL_NETWORKS_DIVIDER:"Sociale media en website",TECHNICAL_DIVIDER:"Technische informatie",ERROR:{LOAD_PROFILE_FAILED:"Kon gebruikersprofiel niet laden.",SAVE_PROFILE_FAILED:"Opslaan profiel mislukt",INVALID_SOCIAL_NETWORK_FORMAT:"Ongeldig formaat: vul een geldig internetadres in.<br/><br/>Voorbeelden:<ul><li>- Een Facebookpagina (https://www.facebook.com/user)</li><li>- Een webpagina (http://www.domain.com)</li><li>- Een emailadres (joe@dalton.com)</li></ul>",IMAGE_RESIZE_FAILED:"Fout tijdens afbeelding schalen"},INFO:{PROFILE_SAVED:"Profiel opgeslagen"},HELP:{WARNING_PUBLIC_DATA:"Let op, de informatie die hier is vastgelegd <b>is publiek</b>: zichtbaar ook voor <b>niet ingelogde gebruikers</b>."}},ES_SETTINGS:{PLUGIN_NAME:"Cesium+",ENABLE_TOGGLE:"Uitbreiding inschakelen?",ENABLE_MESSAGE_TOGGLE:"Berichten inschakelen?",ENABLE_SETTINGS_TOGGLE:"Globale opslag voor instellingen inschakelen?",PEER:"Adres dataknooppunt",POPUP_PEER:{TITLE:"Dataknoop",HELP:"Stel het te gebruiken adres in:",PEER_HELP:"server.domein.com:poort"},NOTIFICATIONS:{DIVIDER:"Notificaties",HELP_TEXT:"Schakel het type notificatie dat je wil ontvangen in:",ENABLE_TX_SENT:"Bericht bij validatie van <b>verzonden betalingen</b>?",ENABLE_TX_RECEIVED:"Bericht bij validatie van <b>ontvangen betalingen</b>?",ENABLE_CERT_SENT:"Bericht bij validatie van <b>verzonden certificaties</b>?",ENABLE_CERT_RECEIVED:"Bericht bij validatie van <b>ontvangen certificaties</b>?"},CONFIRM:{ASK_ENABLE_TITLE:"Optionele functies",ASK_ENABLE:'Cesium+ is <b>uitgeschakeld</b> waardoor deze functies niet beschikbaar zijn: <ul><li>&nbsp;&nbsp;<b><i class="icon ion-person"></i> Gebruikersprofielen</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-android-notifcaitions"></i> Notificaties</b>;<li>&nbsp;&nbsp;<b><i class="icon ion-email"></i> Privéberichten</b>.</ul><br/><br/>Wil je deze functies <b>inschakelen</b>?'}},EVENT:{NODE_STARTED:"Je knoop ES API <b>{{params[0]}}</b> is UP",NODE_BMA_DOWN:"Knooppunt <b>{{params[0]}}:{{params[1]}}</b> (gebruikt door je ES API) is <b>onbereikbaar</b>.",NODE_BMA_UP:"Knooppunt <b>{{p0}}:{{params[1]}}</b> is weer bereikbaar.",MEMBER_JOIN:"Je bent nu <b>lid</b> van valuta <b>{{params[0]}}</b>!",MEMBER_LEAVE:"Je bent <b>geen lid meer</b> van valuta <b>{{params[0]}}</b>!",MEMBER_ACTIVE:"Je lidmaatschap bij <b>{{params[0]}}</b> is met <b>succes verlengd</b>.",TX_SENT:"Je <b>betaling</b> aan <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> is uitgevoerd.",TX_SENT_MULTI:"Je <b>betaling</b> aan <b>{{params[1]}}</b> is uitgevoerd.",TX_RECEIVED:"Je hebt een <b>betaling ontvangen</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",TX_RECEIVED_MULTI:"Je hebt een <b>betaling ontvangen</b> van <b>{{params[1]}}</b>.",CERT_SENT:"Je <b>certificatie</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> is uitgevoerd.",CERT_RECEIVED:"Je hebt een <b>certificatie ontvangen</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",PAGE:{NEW_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft gereageerd op jouw referentie: <b>{{params[2]}}</b>",UPDATE_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft zijn/aar reactie op jouw referentie bewerkt: <b>{{params[2]}}</b>",NEW_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> hheeft gereageerd op jouw commentaar op referentie: <b>{{params[2]}}</b>",UPDATE_REPLY_COMMENT:"<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft zijn/haar reactie op jouw commentaar bewerkt, op referentie: <b>{{params[2]}}</b>"}},CONFIRM:{ES_USE_FALLBACK_NODE:"Knooppunt <b>{{old}}</b> onbereikbaar of ongeldig adres.<br/><br/>Tijdelijk knooppunt <b>{{new}}</b> gebruiken?"},ERROR:{ES_CONNECTION_ERROR:'Knooppunt <b>{{server}}</b> onbereikbaar of ongeldig adres.<br/><br/>Cesium zal verder weken, <b>zonder de Cesium+ uitbreiding</b> (gebruikersprofielens, privéberichten, kaarten en grafieken).<br/><br/>Controleer je internetverbinding, of verander je knooppunt in <a class="positive" ng-click="doQuickFix(\'settings\')">instellingen</a>.',ES_MAX_UPLOAD_BODY_SIZE:"De hoveelheid te verzenden gegevens is overschrijdt de serverlimiet.<br/><br/>Probeer het nogmaals na, bijvoorbeeld, het wissen foto's."}}),e.translations("en-GB",{NETWORK:{VIEW:{BTN_GRAPH:"Statistics"}},GRAPH:{COMMON:{LINEAR_SCALE:"Linear scale",LOGARITHMIC_SCALE:"Logarithmic scale",BTN_SHOW_STATS:"See statistics",BTN_SHOW_DETAILED_STATS:"Detailed statistics",RANGE_DURATION_DIVIDER:"Step unit:",RANGE_DURATION:{HOUR:"Group by <b>hour</b>",DAY:"Group by <b>day</b>",MONTH:"Group by <b>month</b>"}},ACCOUNT:{TITLE:"Statistics",BTN_SHOW_STATS:"View account Statistics",BALANCE_DIVIDER:"Account status",BALANCE_TITLE:"Evolution of the account {{pubkey|formatPubkey}}",TX_RECEIVED_LABEL:"Receipts",TX_SENT_LABEL:"Spending",UD_LABEL:"UD",BALANCE_LABEL:"Balance",INPUT_CHART_TITLE:"Sum of incoming flows, per transmitter:",OUTPUT_CHART_TITLE:"Sum of outgoing flows, per recipient:"},BLOCKCHAIN:{TITLE:"Statistics",BLOCKS_ISSUERS_DIVIDER:"Written blocks by members",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} members</b> calculated <b>{{blockCount|formatInteger}} blocks</b>",BLOCKS_ISSUERS_TITLE:"Number of blocks calculated per member",BLOCKS_ISSUERS_LABEL:"Number of blocks",TX_DIVIDER:"Analysis of transactions",TX_AMOUNT_TITLE:"Transaction volume",TX_AMOUNT_PUBKEY_TITLE:"Volume of transactions calculated by {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Exchange volume",TX_COUNT_TITLE:"Number of written transactions",TX_COUNT_LABEL:"Number of transactions",TX_AVG_BY_BLOCK:"Average per block"},CURRENCY:{MONETARY_MASS_TITLE:"Evolution of the monetary mass",MONETARY_MASS_LABEL:"Monetary mass",MONETARY_MASS_SHARE_LABEL:"Average per member",UD_TITLE:"Evolution of the universal dividend",MEMBERS_COUNT_TITLE:"Evolution of the number of members",MEMBERS_COUNT_LABEL:"Number of members"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Computed blocks count",BLOCK_COUNT:"{{count}} blocks",NO_BLOCK:"No block"}},DOC_STATS:{TITLE:"Data storage statistics (Cesium+)",USER:{TITLE:"Number of documents linked to an account",USER_PROFILE:"User profiles",USER_SETTINGS:"Saved settings"},USER_DELTA:{TITLE:"Delta / Number of documents linked to an account",USER_PROFILE:"User profiles",USER_SETTINGS:"Saved settings"},MESSAGE:{TITLE:"Number of documents related to the communication",MESSAGE_INBOX:"Messages in inbox",MESSAGE_OUTBOX:"Messages in outbox",INVITATION_CERTIFICATION:"Invitations to certify"},SOCIAL:{TITLE:"Number of page or group",PAGE_COMMENT:"Comments",PAGE_RECORD:"Pages",GROUP_RECORD:"Groups"},OTHER:{TITLE:"Other documents",HISTORY_DELETE:"Deletion of documents"}}}}),e.translations("en",{NETWORK:{VIEW:{BTN_GRAPH:"Statistics"}},GRAPH:{COMMON:{LINEAR_SCALE:"Linear scale",LOGARITHMIC_SCALE:"Logarithmic scale",BTN_SHOW_STATS:"See statistics",BTN_SHOW_DETAILED_STATS:"Detailed statistics",RANGE_DURATION_DIVIDER:"Step unit:",RANGE_DURATION:{HOUR:"Group by <b>hour</b>",DAY:"Group by <b>day</b>",MONTH:"Group by <b>month</b>"}},ACCOUNT:{TITLE:"Statistics",BTN_SHOW_STATS:"View account Statistics",BALANCE_DIVIDER:"Account status",BALANCE_TITLE:"Evolution of the account {{pubkey|formatPubkey}}",TX_RECEIVED_LABEL:"Receipts",TX_SENT_LABEL:"Spending",UD_LABEL:"UD",BALANCE_LABEL:"Balance",INPUT_CHART_TITLE:"Sum of incoming flows, per transmitter:",OUTPUT_CHART_TITLE:"Sum of outgoing flows, per recipient:"},BLOCKCHAIN:{TITLE:"Statistics",BLOCKS_ISSUERS_DIVIDER:"Written blocks by members",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} members</b> calculated <b>{{blockCount|formatInteger}} blocks</b>",BLOCKS_ISSUERS_TITLE:"Number of blocks calculated per member",BLOCKS_ISSUERS_LABEL:"Number of blocks",TX_DIVIDER:"Analysis of transactions",TX_AMOUNT_TITLE:"Transaction volume",TX_AMOUNT_PUBKEY_TITLE:"Volume of transactions calculated by {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Exchange volume",TX_COUNT_TITLE:"Number of written transactions",TX_COUNT_LABEL:"Number of transactions",TX_AVG_BY_BLOCK:"Average per block"},CURRENCY:{MONETARY_MASS_TITLE:"Evolution of the monetary mass",MONETARY_MASS_LABEL:"Monetary mass",MONETARY_MASS_SHARE_LABEL:"Average per member",UD_TITLE:"Evolution of the universal dividend",MEMBERS_COUNT_TITLE:"Evolution of the number of members",MEMBERS_COUNT_LABEL:"Number of members"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Computed blocks count",BLOCK_COUNT:"{{count}} blocks",NO_BLOCK:"No block"}},DOC_STATS:{TITLE:"Data storage statistics (Cesium+)",USER:{TITLE:"Number of documents linked to an account",USER_PROFILE:"User profiles",USER_SETTINGS:"Saved settings"},USER_DELTA:{TITLE:"Delta / Number of documents linked to an account",USER_PROFILE:"User profiles",USER_SETTINGS:"Saved settings"},MESSAGE:{TITLE:"Number of documents related to the communication",MESSAGE_INBOX:"Messages in inbox",MESSAGE_OUTBOX:"Messages in outbox",INVITATION_CERTIFICATION:"Invitations to certify"},SOCIAL:{TITLE:"Number of page or group",PAGE_COMMENT:"Comments",PAGE_RECORD:"Pages",GROUP_RECORD:"Groups"},OTHER:{TITLE:"Other documents",HISTORY_DELETE:"Deletion of documents"}}}}),e.translations("eo-EO",{NETWORK:{VIEW:{BTN_GRAPH:"Statistikoj"}},GRAPH:{COMMON:{LINEAR_SCALE:"Lineara skalo",LOGARITHMIC_SCALE:"Logaritma skalo",BTN_SHOW_STATS:"Vidi la statistikojn",BTN_SHOW_DETAILED_STATS:"Detalaj statistikoj",RANGE_DURATION_DIVIDER:"Tempo-unuo:",RANGE_DURATION:{HOUR:"Horo",DAY:"Tago",MONTH:"Monato"}},ACCOUNT:{TITLE:"Statistikoj",BTN_SHOW_STATS:"Vidi la statistikojn de la konto",BALANCE_DIVIDER:"Stato de la konto",BALANCE_TITLE:"Evoluo de la konto {{pubkey|formatPubkey}}",TX_RECEIVED_LABEL:"Enspezoj",TX_SENT_LABEL:"Elspezoj",TX_ACCUMULATION_LABEL:"Bilanco de la spezoj",UD_LABEL:"UD",UD_ACCUMULATION_LABEL:"Bilanco de la UD",BALANCE_LABEL:"Saldo",WOT_DIVIDER:"Reto de fido",CERTIFICATION_TITLE:"Nombro de atestaĵoj - {{pubkey|formatPubkey}}",RECEIVED_CERT_LABEL:"Tuto pri la ricevitaj",RECEIVED_CERT_DELTA_LABEL:"Vario pri la ricevitaj",GIVEN_CERT_LABEL:"Tuto pri la senditaj",GIVEN_CERT_DELTA_LABEL:"Vario pri la senditaj",INPUT_CHART_TITLE:"Sumo de la enirantaj fluoj, por ĉiu sendinto:",OUTPUT_CHART_TITLE:"Sumo de la elirantaj fluoj, por ĉiu ricevinto:"},BLOCKCHAIN:{TITLE:"Statistikoj",BLOCKS_ISSUERS_DIVIDER:"Analizo de la kalkul-distribuo",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} membroj</b> kalkulis <b>{{blockCount|formatInteger}} blokojn</b>",BLOCKS_ISSUERS_TITLE:"Nombro de blokoj kalkulitaj por membro",BLOCKS_ISSUERS_LABEL:"Nombro de blokoj",TX_DIVIDER:"Analizo de la spezoj",TX_AMOUNT_TITLE:"Kvanto de la spezoj",TX_AMOUNT_PUBKEY_TITLE:"Kvanto de spezoj kalkulitaj de {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Kvanto interŝanĝita",TX_COUNT_TITLE:"Nombro de spezoj skribitaj",TX_COUNT_LABEL:"Nombro de spezoj",TX_AVG_BY_BLOCK:"Meza nombro de spezoj / bloko"},CURRENCY:{MONETARY_MASS_TITLE:"Evoluo de la mona maso",MONETARY_MASS_LABEL:"Mona maso",MONETARY_MASS_SHARE_LABEL:"Mezumo por membro",UD_TITLE:"Evoluo de la universala dividendo",MEMBERS_COUNT_TITLE:"Evoluo de la nombro de membroj",MEMBERS_COUNT_LABEL:"Nombro de membroj"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Nombro de blokoj kalkulitaj",BLOCK_COUNT:"{{count}} blokoj",NO_BLOCK:"Neniu bloko"}},DOC_STATS:{TITLE:"Statistikoj pri stokado",USER:{TITLE:"Nombro de dokumentoj ligitaj al konto",USER_PROFILE:"Uzanto-profiloj",USER_SETTINGS:"Parametroj konservitaj"},USER_DELTA:{TITLE:"Variado de la nombro de dokumentoj ligitaj al konto",USER_PROFILE:"Uzanto-profiloj",USER_SETTINGS:"Parametroj konservitaj"},MESSAGE:{TITLE:"Nombro de dokumentoj ligitaj al komunikado",MESSAGE_INBOX:"Mesaĝoj en ricevujo",MESSAGE_OUTBOX:"Senditaj mesaĝoj konservitaj",INVITATION_CERTIFICATION:"Invitoj atestotaj"},SOCIAL:{TITLE:"Nombro de paĝoj aŭ grupoj",PAGE_COMMENT:"Komentoj",PAGE_RECORD:"Paĝoj",GROUP_RECORD:"Grupoj"},OTHER:{TITLE:"Aliaj dokumentoj",HISTORY_DELETE:"Forigoj de dokumentoj"}},SYNCHRO:{TITLE:"Statistikoj pri sinkronigoj",COUNT:{TITLE:"Kvanto sinkronigita",INSERTS:"Enmetoj",UPDATES:"Ĝisdatigoj",DELETES:"Forigoj"},PEER:{TITLE:"Nodoj informpetitaj",ES_USER_API:"Nodoj pri datenoj de uzantoj",ES_SUBSCRIPTION_API:"Nodoj pri retaj servoj"},PERFORMANCE:{TITLE:"Efikecoj pri efektiviĝo",DURATION:"Tempo por efektiviĝo (ms)"}}}}),e.translations("es-ES",{NETWORK:{VIEW:{BTN_GRAPH:"Estadística"}},GRAPH:{COMMON:{LINEAR_SCALE:"Escala lineal",LOGARITHMIC_SCALE:"Escala logarítmica",BTN_SHOW_STATS:"Ver estadísticas",BTN_SHOW_DETAILED_STATS:"Estadísticas detalladas",RANGE_DURATION_DIVIDER:"Unidad de paso:",RANGE_DURATION:{HOUR:"Grupo por <b>hora</b>",DAY:"Grupo por <b>día</b>",MONTH:"Grupo por <b>mes</b>"}},ACCOUNT:{INPUT_CHART_TITLE:"Suma del flujo entrante, por el transmisor:",OUTPUT_CHART_TITLE:"Suma de las salidas por destino:"},BLOCKCHAIN:{TITLE:"Estadística",BLOCKS_ISSUERS_DIVIDER:"Bloques escritos por los miembros",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} members</b> has computed <b>{{blockCount|formatInteger}} blocks</b>",BLOCKS_ISSUERS_TITLE:"Número de bloques miembro calculado",BLOCKS_ISSUERS_LABEL:"Número de bloques",TX_DIVIDER:"Análisis de transacciones",TX_AMOUNT_TITLE:"El volumen de operaciones",TX_AMOUNT_PUBKEY_TITLE:"El volumen de operaciones calculado por {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Volumen negociado",TX_COUNT_TITLE:"Número de transacciones escritas",TX_COUNT_LABEL:"Número de transacciones",TX_AVG_BY_BLOCK:"Promedio por bloque"},CURRENCY:{MONETARY_MASS_TITLE:"Evolución de la masa monetaria",MONETARY_MASS_LABEL:"Masa monetaria",MONETARY_MASS_SHARE_LABEL:"Promedio miembro",UD_TITLE:"Evolución del dividendo universales",MEMBERS_COUNT_TITLE:"Evolución del número de miembros",MEMBERS_COUNT_LABEL:"Número de miembros"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Número de bloques calculados",BLOCK_COUNT:"{{count}} bloques",NO_BLOCK:"Ningún bloque"}}}}),e.translations("fr-FR",{NETWORK:{VIEW:{BTN_GRAPH:"Statistiques"}},GRAPH:{COMMON:{LINEAR_SCALE:"Echelle linéaire",LOGARITHMIC_SCALE:"Echelle logarithmique",BTN_SHOW_STATS:"Voir les statistiques",BTN_SHOW_DETAILED_STATS:"Statistiques détaillées",RANGE_DURATION_DIVIDER:"Unité de temps :",RANGE_DURATION:{HOUR:"Heure",DAY:"Jour",MONTH:"Mois"}},ACCOUNT:{TITLE:"Statistiques",BTN_SHOW_STATS:"Voir les statistiques du compte",BALANCE_DIVIDER:"Situation du compte",BALANCE_TITLE:"Evolution du compte {{pubkey|formatPubkey}}",TX_RECEIVED_LABEL:"Recettes",TX_SENT_LABEL:"Dépenses",TX_ACCUMULATION_LABEL:"Bilan des transactions",UD_LABEL:"DU",UD_ACCUMULATION_LABEL:"Bilan des DU",BALANCE_LABEL:"Solde",WOT_DIVIDER:"Toile de confiance",CERTIFICATION_TITLE:"Nombre de certifications - {{pubkey|formatPubkey}}",RECEIVED_CERT_LABEL:"Total reçues",RECEIVED_CERT_DELTA_LABEL:"Variation reçues",GIVEN_CERT_LABEL:"Total envoyées",GIVEN_CERT_DELTA_LABEL:"Variation envoyées",INPUT_CHART_TITLE:"Somme des flux entrants, par émetteur :",OUTPUT_CHART_TITLE:"Somme des flux sortants, par destinaire :"},BLOCKCHAIN:{TITLE:"Statistiques",BLOCKS_ISSUERS_DIVIDER:"Analyse de la répartition du calcul",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} membres</b> ont calculé <b>{{blockCount|formatInteger}} blocs</b>",BLOCKS_ISSUERS_TITLE:"Nombre de blocs calculés par membre",BLOCKS_ISSUERS_LABEL:"Nombre de blocs",TX_DIVIDER:"Analyse des transactions",TX_AMOUNT_TITLE:"Volume des transactions",TX_AMOUNT_PUBKEY_TITLE:"Volume des transactions calculées par {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Volume échangé",TX_COUNT_TITLE:"Nombre de transactions écrites",TX_COUNT_LABEL:"Nombre de transactions",TX_AVG_BY_BLOCK:"Nombre moyen de transactions / bloc"},CURRENCY:{MONETARY_MASS_TITLE:"Evolution de la masse monétaire",MONETARY_MASS_LABEL:"Masse monétaire",MONETARY_MASS_SHARE_LABEL:"Moyenne par membre",UD_TITLE:"Evolution du dividende universel",MEMBERS_COUNT_TITLE:"Evolution du nombre de membres",MEMBERS_COUNT_LABEL:"Nombre de membres"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Nombre de blocs calculés",BLOCK_COUNT:"{{count}} blocs",NO_BLOCK:"Aucun bloc"}},DOC_STATS:{TITLE:"Statistiques de stockage",USER:{TITLE:"Nombre de documents liés à un compte",USER_PROFILE:"Profils utilisateur",USER_SETTINGS:"Paramètres sauvegardés"},USER_DELTA:{TITLE:"Variation du nombre de documents liés à un compte",USER_PROFILE:"Profils utilisateur",USER_SETTINGS:"Paramètres sauvegardés"},MESSAGE:{TITLE:"Nombre de documents liés à la communication",MESSAGE_INBOX:"Messages en boîte de réception",MESSAGE_OUTBOX:"Messages envoyés sauvegardés",INVITATION_CERTIFICATION:"Invitations à certifier"},SOCIAL:{TITLE:"Nombre de pages ou groupes",PAGE_COMMENT:"Commentaires",PAGE_RECORD:"Pages",GROUP_RECORD:"Groupes"},OTHER:{TITLE:"Autres documents",HISTORY_DELETE:"Suppressions de documents"}},SYNCHRO:{TITLE:"Statistiques de synchronisations",COUNT:{TITLE:"Volume synchronisé",INSERTS:"Insertions",UPDATES:"Mises à jour",DELETES:"Suppressions"},PEER:{TITLE:"Noeuds requêtés",ES_USER_API:"Noeuds données utilisateurs",ES_SUBSCRIPTION_API:"Noeuds services en ligne"},PERFORMANCE:{TITLE:"Performances d'exécution",DURATION:"Temps d'exécution (ms)"}}}}),e.translations("it-IT",{NETWORK:{VIEW:{BTN_GRAPH:"Statistiche"}},GRAPH:{COMMON:{LINEAR_SCALE:"Scala lineare",LOGARITHMIC_SCALE:"Scala logaritmica",BTN_SHOW_STATS:"Vedere le statistiche",BTN_SHOW_DETAILED_STATS:"Statistiche dettagliate",RANGE_DURATION_DIVIDER:"Unità di tempo :",RANGE_DURATION:{HOUR:"Ora",DAY:"Giorno",MONTH:"Mese"}},ACCOUNT:{TITLE:"Statistiche",BTN_SHOW_STATS:"Visualizzare le statistiche del conto",BALANCE_DIVIDER:"Situazione del conto",BALANCE_TITLE:"Evoluzione del conto {{pubkey|formatPubkey}}",TX_RECEIVED_LABEL:"Incassi",TX_SENT_LABEL:"Spese",TX_ACCUMULATION_LABEL:"Bilancio delle transazioni",UD_LABEL:"DU",UD_ACCUMULATION_LABEL:"Bilancio dei DU",BALANCE_LABEL:"Saldo",WOT_DIVIDER:"Tela di fiducia",CERTIFICATION_TITLE:"Numero di certificazioni - {{pubkey|formatPubkey}}",RECEIVED_CERT_LABEL:"Totale ricevute",RECEIVED_CERT_DELTA_LABEL:"Variazione ricevute",GIVEN_CERT_LABEL:"Totale inviate",GIVEN_CERT_DELTA_LABEL:"Variazione inviate",INPUT_CHART_TITLE:"Somma dei flussi in entrata, par emittente :",OUTPUT_CHART_TITLE:"Somma dei flussi in uscita, per destinatario :"},BLOCKCHAIN:{TITLE:"Statistiche",BLOCKS_ISSUERS_DIVIDER:"Analisi della ripartizione del calcolo",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} membri</b> hanno calcolato <b>{{blockCount|formatInteger}} blocchi</b>",BLOCKS_ISSUERS_TITLE:"Numero di blocchi calcolati a membro",BLOCKS_ISSUERS_LABEL:"Numero di blocchi",TX_DIVIDER:"Analisi delle transazioni",TX_AMOUNT_TITLE:"Volume delle transazioni",TX_AMOUNT_PUBKEY_TITLE:"Volume delle transazioni calcolato da {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Volume scambiato",TX_COUNT_TITLE:"Numero di transazioni scritte",TX_COUNT_LABEL:"Numero di transazioni",TX_AVG_BY_BLOCK:"Numero medio di transazioni / blocco"},CURRENCY:{MONETARY_MASS_TITLE:"Evoluzione della massa monetaria",MONETARY_MASS_LABEL:"Massa monetaria",MONETARY_MASS_SHARE_LABEL:"Media a membro",UD_TITLE:"Evoluzione del Dividendo Universale",MEMBERS_COUNT_TITLE:"Evoluzione del numero di membri",MEMBERS_COUNT_LABEL:"Numero di membri"},PEER:{VIEW:{BLOCK_COUNT_LABEL:"Numero di blocchi calcolati",BLOCK_COUNT:"{{count}} blocchi",NO_BLOCK:"Nessun blocco"}},DOC_STATS:{TITLE:"Statistiche di stoccaggio",USER:{TITLE:"Numero di documenti legati ad un conto",USER_PROFILE:"Profili dell'utente",USER_SETTINGS:"Impostazioni salvate"},MESSAGE:{TITLE:"Numero di documenti legati alla conversazione",MESSAGE_INBOX:"Messaggi in arrivo",MESSAGE_OUTBOX:"Messaggi inviati salvati",INVITATION_CERTIFICATION:"Invitazioni da certificare"},SOCIAL:{TITLE:"Numero di pagine o gruppi",PAGE_COMMENT:"Commenti",PAGE_RECORD:"Pagine",GROUP_RECORD:"Gruppi"},OTHER:{TITLE:"Altri documenti",HISTORY_DELETE:"Cronologia eliminazione documenti"}},SYNCHRO:{TITLE:"Statistiche di sincronizzazioni",COUNT:{TITLE:"Volume sincronizzato",INSERTS:"Inserimenti",UPDATES:"Aggiornamenti",DELETES:"Eliminazioni"},PEER:{TITLE:"Nodi interrogati",ES_USER_API:"Nodi dati utenti",ES_SUBSCRIPTION_API:"Noeuds servizi online"},PERFORMANCE:{TITLE:"Prestazioni (performance) di esecuzione",DURATION:"Tempo di esecuzione (ms)"}}}}),e.translations("nl-NL",{NETWORK:{VIEW:{BTN_GRAPH:"Statistieken"}},GRAPH:{COMMON:{LINEAR_SCALE:"Lineaire schaal",LOGARITHMIC_SCALE:"Logaritmische schaal",BTN_SHOW_STATS:"Zie statistieken",BTN_SHOW_DETAILED_STATS:"Gedetailleerde statistieken",RANGE_DURATION_DIVIDER:"Stap eenheid:",RANGE_DURATION:{HOUR:"Groep per <b>uur</b>",DAY:"Groep per <b>dag</b>",MONTH:"Groep per <b>maand</b>"}},ACCOUNT:{INPUT_CHART_TITLE:"Som van de binnenkomende stroom, door de zender:",OUTPUT_CHART_TITLE:"Som van de uitstroom per bestemming:"},BLOCKCHAIN:{TITLE:"Statistieken",BLOCKS_ISSUERS_DIVIDER:"Schriftelijke blokken door leden",BLOCKS_ISSUERS_HELP:"<b>{{issuerCount|formatInteger}} leden</b> berekend <b>{{blockCount|formatInteger}} blokken</b>",BLOCKS_ISSUERS_TITLE:"Aantal blokken berekend per lid",BLOCKS_ISSUERS_LABEL:"Aantal blokken",TX_DIVIDER:"Analyse van transacties",TX_AMOUNT_TITLE:"Trading volume",TX_AMOUNT_PUBKEY_TITLE:"Trading volume dat wordt berekend door {{issuer | formatPubkey}}",TX_AMOUNT_LABEL:"Verhandeld volume",TX_COUNT_TITLE:"Aantal schriftelijke transacties",TX_COUNT_LABEL:"Aantal transacties",TX_AVG_BY_BLOCK:"Gemiddeld aantal transacties / blok"},CURRENCY:{MONETARY_MASS_TITLE:"Evolutie van de monetaire massa",MONETARY_MASS_LABEL:"Monetaire massa",MONETARY_MASS_SHARE_LABEL:"Gemiddelde leden",UD_TITLE:"Ontwikkeling van de universele dividend",MEMBERS_COUNT_TITLE:"Evolutie van het aantal leden",MEMBERS_COUNT_LABEL:"Aantal leden"}}}),e.translations("fr-FR",{RML9:{BTN_EXPORT:"Télécharger",BTN_OPEN:"Ouvrir la page RML9",BTN_SWOW_TX:"Voir les transactions",FILE_NAME:"relevé du compte {{pubkey|formatPubkey}} au {{currentTime|formatDateForFile}}.csv",HEADERS:{TIME:"Date",AMOUNT:"Montant",COMMENT:"Commentaire"},VIEW:{TITLE:"RML9",DIVIDER:"Dernières transactions :",BALANCE:"Solde du compte"},CHART:{INPUT_CHART_TITLE:"Somme des flux entrants, par émetteur :",OUTPUT_CHART_TITLE:"Somme des flux sortants, par destinaire :"},SETTINGS:{ENABLE_TOGGLE:"Activer le plugin RML9 ?"}}}),e.translations("en-GB",{MAP:{COMMON:{SEARCH_DOTS:"Search...",BTN_LOCALIZE_ME:"Localize me"},NETWORK:{LOOKUP:{BTN_MAP:"Peers map",BTN_MAP_HELP:"Open peers map"},VIEW:{TITLE:"Peers map",LAYER:{MEMBER:"Member peers",MIRROR:"Mirror peers",OFFLINE:"Offline peers"}}},WOT:{LOOKUP:{BTN_MAP:"Map",BTN_MAP_HELP:"Open members map"},VIEW:{TITLE:"Members map",LAYER:{MEMBER:'<i class="icon ion-person positive"></i> Members',PENDING:'<i class="icon ion-clock energized"></i> Pending registrations',WALLET:'<i class="icon ion-card gray"></i> Simple wallets'}},ERROR:{LOAD_POSITION_FAILED:"Can not retrieve the positions to display."}},REGISTRY:{LOOKUP:{BTN_MAP:"Map",BTN_MAP_HELP:"Open the map of the pages"},VIEW:{TITLE:"Map of pages",LAYER:{SHOP:'<i class="icon ion-page-shop positive"></i> Local shops',COMPANY:'<i class="icon ion-page-company positive"></i> Companies',ASSOCIATION:'<i class="icon ion-page-association energized"></i> Associations',INSTITUTION:'<i class="icon ion-page-institution gray"></i> Institutions'}}},PROFILE:{MARKER_HELP:"<b>Drag and drop</b> this marker to <b>update<br/>your position</b>, or use the buttons<br/>on top of the map."},ERROR:{LOCALIZE_ME_FAILED:"Unable to retrieve your current position"},SETTINGS:{MAP_DIVIDER:"Maps",ENABLE_GOOGLE_API:"Enable Google API services?",ENABLE_GOOGLE_API_HELP:"In the <b>members map</b>, allows you to display accounts with an address but without geolocation.",GOOGLE_API_KEY:"Google API key",BTN_GOOGLE_API:"Getting a key",BTN_GOOGLE_API_WARNING:"requires a Google account",GOOGLE_API_KEY_PLACEHOLDER:"eg: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"},HELP:{TIP:{WOT:"This map displays <b>profiles with a position</b>, whether they are member accounts or not.<br/><br/>Only profiles with the option &quot;appear on the map&quot; has been activated.",WOT_BTN_LAYERS:"<b>Filter the displayed data</b>: members, pending registrations, simple portfolios, etc.",WOT_BTN_SEARCH:"You can <b>search</b> by name, public key, or member pseudonym."}}}}),e.translations("en",{MAP:{COMMON:{SEARCH_DOTS:"Search...",BTN_LOCALIZE_ME:"Localize me"},NETWORK:{LOOKUP:{BTN_MAP:"Peers map",BTN_MAP_HELP:"Open peers map"},VIEW:{TITLE:"Peers map",LAYER:{MEMBER:"Member peers",MIRROR:"Mirror peers",OFFLINE:"Offline peers"}}},WOT:{LOOKUP:{BTN_MAP:"Map",BTN_MAP_HELP:"Open members map"},VIEW:{TITLE:"Members map",LAYER:{MEMBER:'<i class="icon ion-person positive"></i> Members',PENDING:'<i class="icon ion-clock energized"></i> Pending registrations',WALLET:'<i class="icon ion-card gray"></i> Simple wallets'}},ERROR:{LOAD_POSITION_FAILED:"Can not retrieve the positions to display."}},REGISTRY:{LOOKUP:{BTN_MAP:"Map",BTN_MAP_HELP:"Open the map of the pages"},VIEW:{TITLE:"Map of pages",LAYER:{SHOP:'<i class="icon ion-page-shop positive"></i> Local shops',COMPANY:'<i class="icon ion-page-company positive"></i> Companies',ASSOCIATION:'<i class="icon ion-page-association energized"></i> Associations',INSTITUTION:'<i class="icon ion-page-institution gray"></i> Institutions'}}},PROFILE:{MARKER_HELP:"<b>Drag and drop</b> this marker to <b>update<br/>your position</b>, or use the buttons<br/>on top of the map."},ERROR:{LOCALIZE_ME_FAILED:"Unable to retrieve your current position"},SETTINGS:{MAP_DIVIDER:"Maps",ENABLE_GOOGLE_API:"Enable Google API services?",ENABLE_GOOGLE_API_HELP:"In the <b>members map</b>, allows you to display accounts with an address but without geolocation.",GOOGLE_API_KEY:"Google API key",BTN_GOOGLE_API:"Getting a key",BTN_GOOGLE_API_WARNING:"requires a Google account",GOOGLE_API_KEY_PLACEHOLDER:"eg: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"},HELP:{TIP:{WOT:"This map displays <b>profiles with a position</b>, whether they are member accounts or not.<br/><br/>Only profiles with the option &quot;appear on the map&quot; has been activated.",WOT_BTN_LAYERS:"<b>Filter the displayed data</b>: members, pending registrations, simple portfolios, etc.",WOT_BTN_SEARCH:"You can <b>search</b> by name, public key, or member pseudonym."}}}}),e.translations("eo-EO",{MAP:{COMMON:{SEARCH_DOTS:"Traserĉi...",BTN_LOCALIZE_ME:"Lokalizi min"},NETWORK:{LOOKUP:{BTN_MAP:"Mapo",BTN_MAP_HELP:"Malfermi la mapon pri nodoj"},VIEW:{TITLE:"Mapo pri nodoj",LAYER:{MEMBER:"Membro-nodoj",MIRROR:"Spegul-nodoj",OFFLINE:"Nekonektitaj nodoj"}}},WOT:{LOOKUP:{BTN_MAP:"Mapo",BTN_MAP_HELP:"Malfermi la mapon pri membroj"},VIEW:{TITLE:"Mapo pri membroj",LAYER:{MEMBER:'<i class="icon ion-person positive"></i> Membroj',PENDING:'<i class="icon ion-clock energized"></i> Aliĝoj atendantaj',WALLET:'<i class="icon ion-card gray"></i> Simplaj monujoj'}},ERROR:{LOAD_POSITION_FAILED:"Neeblas ricevi la lokojn afiŝotajn."}},REGISTRY:{LOOKUP:{BTN_MAP:"Mapo",BTN_MAP_HELP:"Malfermi la mapon pri paĝoj"},VIEW:{TITLE:"Mapo pri paĝoj",LAYER:{SHOP:'<i class="icon ion-page-shop positive"></i> Lokaj komercoj',COMPANY:'<i class="icon ion-page-company positive"></i> Entreprenoj',ASSOCIATION:'<i class="icon ion-page-association energized"></i> Asocioj',INSTITUTION:'<i class="icon ion-page-institution gray"></i> Institucioj'}}},PROFILE:{MARKER_HELP:"<b>Ŝovu-demetu</b> tiun ĉi markilon por <b>aktualigi<br/> vian lokon</b> sur la mapo, aŭ uzu la serĉo-butonon<br/>super la mapo."},ERROR:{LOCALIZE_ME_FAILED:"Neeblas ricevi vian nunan lokon"},SETTINGS:{MAP_DIVIDER:"Mapoj",ENABLE_GOOGLE_API:"Aktivigi la Google-API-servojn?",ENABLE_GOOGLE_API_HELP:"Ebligas afiŝi sur la <b>mapo pri membroj</b> kontojn kun adreso sed sen iu GPS-lokalizo.",GOOGLE_API_KEY:"Google-API-ŝlosilo",BTN_GOOGLE_API:"Ekhavi ŝlosilon",BTN_GOOGLE_API_WARNING:"Necesigas havi Google-konton",GOOGLE_API_KEY_PLACEHOLDER:"Ekzemple: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"},HELP:{TIP:{WOT:"Tiu ĉi mapo afiŝas <b>la profilojn kun loko</b>, ĉu ili rilatas al membro-kontoj aŭ ne.<br/><br/>Nur videblas la profiloj, kies kromaĵo &quot;aperi sur la mapo&quot; estis aktivigita.",WOT_BTN_LAYERS:"<b>Filtru ĉi tie la afiŝitajn datenojn</b>: membroj, aliĝoj atendantaj, simplaj monujoj, ktp.",WOT_BTN_SEARCH:"Vi povas <b>efektivigi serĉadon</b> laŭ nomo, publika ŝlosilo aŭ membro-pseŭdonimo."}}}}),e.translations("fr-FR",{MAP:{COMMON:{SEARCH_DOTS:"Rechercher...",BTN_LOCALIZE_ME:"Me localiser"},NETWORK:{LOOKUP:{BTN_MAP:"Carte",BTN_MAP_HELP:"Ouvrir la carte des noeuds"},VIEW:{TITLE:"Carte des noeuds",LAYER:{MEMBER:"Nœuds membre",MIRROR:"Nœuds miroir",OFFLINE:"Nœuds hors ligne"}}},WOT:{LOOKUP:{BTN_MAP:"Carte",BTN_MAP_HELP:"Ouvrir la carte des membres"},VIEW:{TITLE:"Carte des membres",LAYER:{MEMBER:'<i class="icon ion-person positive"></i> Membres',PENDING:'<i class="icon ion-clock energized"></i> Inscriptions en attente',WALLET:'<i class="icon ion-card gray"></i> Simples portefeuilles'}},ERROR:{LOAD_POSITION_FAILED:"Impossible de récupérer les positions à afficher."}},REGISTRY:{LOOKUP:{BTN_MAP:"Carte",BTN_MAP_HELP:"Ouvrir la carte des pages"},VIEW:{TITLE:"Carte des pages",LAYER:{SHOP:'<i class="icon ion-page-shop positive"></i> Commerces locaux',COMPANY:'<i class="icon ion-page-company positive"></i> Entreprises',ASSOCIATION:'<i class="icon ion-page-association energized"></i> Associations',INSTITUTION:'<i class="icon ion-page-institution gray"></i> Institutions'}}},PROFILE:{MARKER_HELP:"<b>Glissez-déposez</b> ce marqueur pour <b>mettre<br/>à jour votre position</b> sur la carte, ou utilisez le bouton<br/>de recherche au-dessus de la carte."},ERROR:{LOCALIZE_ME_FAILED:"Impossible de récupérer votre position actuelle"},SETTINGS:{MAP_DIVIDER:"Cartes",ENABLE_GOOGLE_API:"Activer les services Google API ?",ENABLE_GOOGLE_API_HELP:"Permet l'affichage dans la <b>carte des membres</b> des comptes ayant une adresse mais aucun positionnement GPS.",GOOGLE_API_KEY:"Clé d'API Google",BTN_GOOGLE_API:"Obtenir une clé",BTN_GOOGLE_API_WARNING:"Nécessite d'avoir un compte Google",GOOGLE_API_KEY_PLACEHOLDER:"Exemple : AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"},HELP:{TIP:{WOT:"Cette carte affiche <b>les profils ayant une position</b>, qu'ils correspondent à des comptes membre ou non.<br/><br/>Seuls sont visibles les profils dont l'option &quot;apparaître sur la carte&quot; a été activée.",WOT_BTN_LAYERS:"<b>Filtrez ici les données affichées</b> : membres, inscriptions en attente, simples portefeuilles, etc.",WOT_BTN_SEARCH:"Vous pouvez <b>effectuer une recherche</b> par nom, clef publique ou pseudonyme de membre."}}}}),e.translations("it-IT",{MAP:{COMMON:{SEARCH_DOTS:"Ricerca...",BTN_LOCALIZE_ME:"Trovami"},NETWORK:{LOOKUP:{BTN_MAP:"Mappa dei peers",BTN_MAP_HELP:"Aprire mappa dei peers"},VIEW:{TITLE:"Mappa dei peers",LAYER:{MEMBER:"Peers membri",MIRROR:"Peers specchi",OFFLINE:"Peers offline"}}},WOT:{LOOKUP:{BTN_MAP:"Mappa dei membri",BTN_MAP_HELP:"Aprire mappa dei membri"},VIEW:{TITLE:"Mappa membri",LAYER:{MEMBER:'<i class="icon ion-person positive"></i> Membri',PENDING:'<i class="icon ion-clock energized"></i> Registrazione pendenti',WALLET:'<i class="icon ion-card gray"></i> Portafogli osservatori'}},ERROR:{LOAD_POSITION_FAILED:"Errore nel caricamento delle posizioni."}},REGISTRY:{LOOKUP:{BTN_MAP:"Mappa",BTN_MAP_HELP:"Aprire la mappa delle pagine pro"},VIEW:{TITLE:"Mappa delle pagine pro",LAYER:{SHOP:'<i class="icon ion-page-shop positive"></i> Negozi locali',COMPANY:'<i class="icon ion-page-company positive"></i> Aziende',ASSOCIATION:'<i class="icon ion-page-association energized"></i> Associazioni',INSTITUTION:'<i class="icon ion-page-institution gray"></i> Instituti'}}},PROFILE:{MARKER_HELP:"<b>Drag and drop</b> questo indicatore per <b>aggiornare<br/>tua posizione</b>, o usa i bottoni <br/>sopra la mappa."},ERROR:{LOCALIZE_ME_FAILED:"Impossible trovare tua posizione attuale"},SETTINGS:{MAP_DIVIDER:"Mappe",ENABLE_GOOGLE_API:"Abilitare i servizi Google API ?",ENABLE_GOOGLE_API_HELP:"Sulla <b>mappa dei membri</b>, ti permette di visualizzare i conti con un indirizzo ma senza geolocalizzazione.",GOOGLE_API_KEY:"Chiave Google API",BTN_GOOGLE_API:"Ottenere una chiave",BTN_GOOGLE_API_WARNING:"necessita un conto Google",GOOGLE_API_KEY_PLACEHOLDER:"per es. : AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"},HELP:{TIP:{WOT:"Questa mappa mostra <b>profili che hanno fornito una posizione</b>, che siano conti membri o no.<br/><br/>Solo i profili che hanno attivato l'opzione &quot;apparire sulla mappa&quot; sono stati attivati.",WOT_BTN_LAYERS:"<b>Filtrare i dati visibili</b>: membri, registrazioni pendenti, portafogli osservatori, etc.",WOT_BTN_SEARCH:"Puoi <b>cercare</b> per nome, chiave pubblica, o pseudonimo del membro."}}}})}]),angular.module("cesium.plugins.templates",[]).run(["$templateCache",function(e){e.put("plugins/es/templates/menu_extend.html",'<div ng-if=":state:enable && extensionPoint === \'menu-user\'" class="visible-xs visible-sm"><a menu-close="" class="item item-icon-left" active-link="active" ng-if="login && walletData.isMember" active-link-path-prefix="#/app/invitations" ui-sref="app.view_invitations"><i class="icon ion-person-stalker"></i> <span translate="">MENU.INVITATIONS</span> <span class="badge badge-positive" ng-if="walletData.invitations.unreadCount">{{walletData.invitations.unreadCount}}</span> </a><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/user/message" ng-class="{\'item-menu-disable\': !login}" ui-sref="app.user_message.tab_inbox"><i class="icon ion-email"></i> <span translate="">MENU.MESSAGES</span> <span class="badge badge-positive" ng-if="walletData.messages.unreadCount">{{walletData.messages.unreadCount}}</span> </a><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/notifications" ng-class="{\'item-menu-disable\': !login}" ui-sref="app.view_notifications"><i class="icon ion-android-notifications"></i> <span translate="">MENU.NOTIFICATIONS</span> <span class="badge badge-positive" ng-if="walletData.notifications.unreadCount">{{walletData.notifications.unreadCount}}</span></a></div>'),e.put("plugins/rml9/templates/01-button.html",'\x3c!-- Button that call a function of the controller --\x3e\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ng-click="onButtonClick()"\n        title="{{\'RML9.BTN_OPEN\' | translate}}">\n</button>\n\n\x3c!-- Button: Open a view, using `ui-sref` attribute\n<button class="button button-balanced button-small-padding icon ion-plus-circled"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_OPEN\' | translate}}">\n</button> --\x3e\n\n'),e.put("plugins/rml9/templates/02-view.html",'<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      \x3c!-- the pubkey --\x3e\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      \x3c!-- a text divider--\x3e\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      \x3c!-- iterate on each TX --\x3e\n      <div class="item" ng-repeat="item in items">\n        <h3>{{item.time|formatDate}}</h3>\n        <h4>{{item.pubkey|formatPubkey}}</h4>\n        <div class="badge">{{item.amount|formatAmount}}</div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/rml9/templates/03-button.html",'\x3c!-- Button: Open a view, using `ui-sref` attribute --\x3e\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n'),e.put("plugins/rml9/templates/03-view_with_button.html",'<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      \x3c!-- buttons bar --\x3e\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      \x3c!-- the pubkey --\x3e\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      \x3c!-- the balance --\x3e\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      \x3c!-- a text divider--\x3e\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      \x3c!-- iterate on each TX --\x3e\n      <div class="item item-text-wrap" ng-repeat="item in items">\n\n        <h3>\n          {{item.time|formatDate}}\n          <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n        </h3>\n\n        <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n        <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n        <div class="badge"\n             ng-class="{\'badge-balanced\': item.amount > 0}">\n          {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/rml9/templates/04-view_chart.html",'<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      \x3c!-- buttons bar --\x3e\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      \x3c!-- the pubkey --\x3e\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      \x3c!-- the balance --\x3e\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      \x3c!-- a text divider--\x3e\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n\n      <div class="row">\n        <div class="col col-75">\n          \x3c!-- iterate on each TX --\x3e\n          <div class="item item-text-wrap" ng-repeat="item in items">\n\n            <h3>\n              {{item.time|formatDate}}\n              <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n            </h3>\n\n            <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n            <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n            <div class="badge"\n                 ng-class="{\'badge-balanced\': item.amount > 0}">\n              {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n            </div>\n          </div>\n        </div>\n\n        <div class="col col-25">\n\n          \x3c!-- [NEW] TX input chart --\x3e\n          <p class="gray" translate>RML9.CHART.INPUT_CHART_TITLE</p>\n          <canvas id="chart-received-pie" class="chart-pie"\n                  chart-data="inputChart.data"\n                  chart-labels="inputChart.labels"\n                  chart-colors="inputChart.colors">\n          </canvas>\n\n          \x3c!-- [NEW] TX input chart --\x3e\n          <p class="gray" translate>RML9.CHART.OUTPUT_CHART_TITLE</p>\n          <canvas id="chart-sent-pie" class="chart-pie"\n                  chart-data="outputChart.data"\n                  chart-labels="outputChart.labels"\n                  chart-colors="outputChart.colors">\n          </canvas>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/rml9/templates/06-button.html",'\x3c!-- [NEW] Display only if plugin is enable --\x3e\n\n  \x3c!-- Button: call a method from the state controller --\x3e\n  <button ng-if="enable" class="button button-balanced button-small-padding icon ion-android-archive"\n          ng-click="onButtonClick()"\n          title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n  </button>\n\n\n'),e.put("plugins/rml9/templates/06-settings_item.html",'\n<div class="item item-toggle dark">\n  <div class="input-label" translate>RML9.SETTINGS.ENABLE_TOGGLE</div>\n  <label class="toggle toggle-royal">\n    <input type="checkbox" ng-model="formData.plugins.rml9.enable" >\n    <div class="track">\n      <div class="handle"></div>\n    </div>\n  </label>\n</div>\n'),e.put("plugins/rml9/templates/07-button.html",'\x3c!-- Button: Open a view, using `ui-sref` attribute --\x3e\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n'),e.put("plugins/rml9/templates/07-view.html",'<leaflet id="map-geojson" center="map.center" geojson="map.geojson"></leaflet>\n'),e.put("plugins/rml9/templates/final-button.html",'\x3c!-- Button: Open a view, using `ui-sref` attribute --\x3e\n<button ng-if class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n'),e.put("plugins/rml9/templates/final-view.html",'<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      \x3c!-- buttons bar --\x3e\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      \x3c!-- the pubkey --\x3e\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      \x3c!-- the balance --\x3e\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      \x3c!-- a text divider--\x3e\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      \x3c!-- iterate on each TX --\x3e\n      <div class="row">\n        <div class="col col-75">\n          <div class="item item-text-wrap" ng-repeat="item in items">\n\n            <h3>\n              {{item.time|formatDate}}\n              <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n            </h3>\n\n            <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n            <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n            <div class="badge"\n                 ng-class="{\'badge-balanced\': item.amount > 0}">\n              {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n            </div>\n          </div>\n\n        </div>\n\n        <div class="col col-25">\n\n          \x3c!-- [NEW] TX input chart --\x3e\n          <p class="gray" translate>RML9.CHART.INPUT_CHART_TITLE</p>\n          <canvas id="chart-received-pie" class="chart-pie"\n                  chart-data="inputChart.data"\n                  chart-labels="inputChart.labels">\n          </canvas>\n\n          \x3c!-- [NEW] TX input chart --\x3e\n          <p class="gray" translate>RML9.CHART.OUTPUT_CHART_TITLE</p>\n          <canvas id="chart-sent-pie" class="chart-pie"\n                  chart-data="outputChart.data"\n                  chart-labels="outputChart.labels">\n          </canvas>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/es/templates/blockchain/items_blocks.html",'<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-if ng-if=":rebind:!smallscreen"><ng-repeat ng-repeat="block in :rebind:search.results track by block.number" ng-include="!block.empty ? \'templates/blockchain/item_block_lg.html\' : \'templates/blockchain/item_block_empty_lg.html\'"></ng-repeat></ng-if><ng-if ng-if=":rebind:smallscreen"><ng-repeat ng-repeat="block in :rebind:search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ng-if>'),e.put("plugins/es/templates/blockchain/lookup.html",'<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-navicon visible-xs visible-sm" ng-click="toggleCompactMode()"><b class="icon-secondary" ng-class="{\'ion-arrow-down-b\': !compactMode, \'ion-arrow-up-b\': compactMode}" style="top: -12px; left: 11px; font-size: 10px"></b> <b class="icon-secondary" ng-class="{\'ion-arrow-up-b\': !compactMode,\'ion-arrow-down-b\': compactMode}" style="top: 12px; left: 11px; font-size: 10px"></b></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/blockchain/lookup_form.html\'"></ng-include></ion-content></ion-view>'),e.put("plugins/es/templates/blockchain/lookup_form.html",'<div class="lookupForm"><div class="item no-padding"><div class="button button-small button-text button-stable button-icon-event padding no-padding-right ink" ng-repeat="filter in search.filters" ng-if="filter"><span ng-bind-html="\'BLOCKCHAIN.LOOKUP.TX_SEARCH_FILTER.\'+filter.type|translate:filter"></span> <i class="icon ion-close" ng-click="itemRemove($index)"></i></div><label class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'BLOCKCHAIN.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="helptip-blockchain-search-text"></a></div></label></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.type==\'last\'" translate="">BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4><h4 ng-if="search.type==\'text\'">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }} </small><small class="gray" ng-if=":rebind:expertMode && search.filters && search.filters.length">- <a ng-click="toggleShowQuery()" ng-if="!showQuery">{{\'DOCUMENT.LOOKUP.SHOW_QUERY\'|translate }} <i class="icon ion-arrow-down-b gray"></i> </a><a ng-click="toggleShowQuery()" ng-if="showQuery">{{\'DOCUMENT.LOOKUP.HIDE_QUERY\'|translate }} <i class="icon ion-arrow-up-b gray"></i></a></small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="item no-border no-padding" ng-if=":rebind:search.filters && search.filters.length && expertMode"><small class="no-padding no-margin" ng-if="showQuery"><span class="gray text-wrap dark">{{:rebind:search.query}}</span></small></div><ion-list class="list list-blocks" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/blockchain/items_blocks.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>'),e.put("plugins/es/templates/blockchain/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>BLOCKCHAIN.LOOKUP.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a ng-if="enableFilter" class="item item-icon-left item-icon-right ink" ng-click="doSearchLast()"><i class="icon ion-clock"></i> {{\'BLOCKCHAIN.LOOKUP.BTN_LAST\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'last\'"></i></a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/currency/tab_blocks_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'nav-buttons\'"><button class="button button-icon button-clear icon ion-android-search visible-xs visible-sm" ui-sref="app.blockchain_search"></button></ng-if>'),e.put("plugins/es/templates/common/edit_pictures.html",'<div class="gallery" ng-controller="ESPicturesEditCtrl as ctrl"><div ng-repeat="picture in pictures" class="item card card-gallery stable-bg" ng-class="{\'in done\': picture.isnew}"><div><h2 ng-if="picture.title">{{picture.title}}</h2><img ng-src="{{picture.src}}"></div><div class="item done in tabs tabs-secondary tabs-icon-left"><a class="tab-item stable-bg assertive" ng-click="removePicture($index)" title="{{\'COMMON.BTN_PICTURE_DELETE\' | translate}}"><i class="icon ion-trash-a"></i>{{\'COMMON.BTN_PICTURE_DELETE\'|translate}}</a> <a class="tab-item stable-bg dark" ng-click="rotatePicture($index)" title="{{\'COMMON.BTN_PICTURE_ROTATE\' | translate}}"><i class="icon ion-forward"></i>{{\'COMMON.BTN_PICTURE_ROTATE\'|translate}}</a> <a class="tab-item stable-bg" ng-click="favoritePicture($index)" ng-class="{\'gray\': $index !== 0, \'positive\': $index === 0}" title="{{\'COMMON.BTN_PICTURE_FAVORISE\' | translate}}"><i class="icon ion-star"></i>{{\'COMMON.BTN_PICTURE_FAVORISE\'|translate}}</a></div></div><div class="item card card-gallery card-gallery-new text-center padding ink" ng-click="selectNewPicture(\'#pictureFile\')"><i class="ion-image stable" style="font-size:150px"></i> <b class="ion-plus gray" style="font-size:80px; position:absolute; top:25px; right: 5px"></b><p translate>COMMON.BTN_ADD_PICTURE</p></div><input type="file" id="pictureFile" accept="image/*" onchange="angular.element(this).scope().fileChanged(event)" style="visibility:hidden; position:absolute"></div>'),e.put("plugins/es/templates/common/edit_position.html",'<div class="item item-divider" translate>LOCATION.LOCATION_DIVIDER</div><ion-item class="item-input item-floating-label item-button-right"><span class="input-label">{{\'LOCATION.ADDRESS\' | translate}}</span><textarea placeholder="{{\'LOCATION.ADDRESS_HELP\' | translate}}" ng-model="formData.address" ng-model-options="{ debounce: 350 }" rows="4" cols="10">\n              </textarea></ion-item><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.geoPoint.$invalid}"><span class="input-label" translate>LOCATION.CITY</span> <input type="text" placeholder="{{\'LOCATION.CITY_HELP\'|translate}}" ng-model="formData.city" ng-model-options="{ updateOn: \'blur\' }" required-if="formData.address" ng-change="onCityChanged()"></div><input type="hidden" name="geoPoint" ng-model="formData.geoPoint" required-if="formPosition.enable" geo-point><div class="form-errors" ng-show="form.$submitted && form.city.$error" ng-messages="form.city.$error"><div class="form-error" ng-message="required"><span translate="LOCATION.ERROR.CITY_REQUIRED_IF_STREET"></span></div></div><div class="form-errors" ng-show="form.$submitted && form.geoPoint.$error" ng-messages="form.geoPoint.$error"><div class="form-error" ng-message="required"><span translate="LOCATION.ERROR.REQUIRED_FOR_LOCATION" ng-if="!formData.city"></span> <span translate="LOCATION.ERROR.INVALID_FOR_LOCATION" ng-if="formData.city"></span></div><div class="form-error" ng-message="geoPoint"><span translate="LOCATION.ERROR.REQUIRED_FOR_LOCATION" ng-if="!formData.city"></span> <span translate="LOCATION.ERROR.INVALID_FOR_LOCATION" ng-if="formData.city"></span></div></div><div class="item row item-text-wrap no-padding"><div class="col no-padding"><ion-checkbox ng-model="formPosition.enable" ng-change="onUseGeopointChanged()" class="item item-border-large done in"><div class="item-content"><span translate>LOCATION.USE_GEO_POINT</span><h4 class="gray" ng-if="formPosition.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner>{{\'LOCATION.LOADING_LOCATION\'|translate}}</h4></div></ion-checkbox></div><div class="col col-10 no-padding" style="min-width: 60px"><div class="row text-center"><a class="button button-stable button-small-padding" title="{{\'LOCATION.BTN_GEOLOC_ADDRESS\'|translate}}" ng-disabled="!formPosition.enable" ng-click="openSearchLocationModal()"><i class="icon ion-home" style="left: 15px"></i> <b class="icon-secondary ion-search" style="top: -9px; left:32px; font-size: 18px"></b></a></div></div></div><cs-extension-point name="after-position"></cs-extension-point>'),e.put("plugins/es/templates/common/edit_socials.html",'<div class="list no-padding {{::motion.ionListClass}}"><div class="item item-divider"><span translate="">PROFILE.SOCIAL_NETWORKS_DIVIDER</span> <a class="badge button button-text button-small button-small-padding" ng-class="{\'button-text-positive\': socialData.reorder}" ng-if="formData.socials && formData.socials.length &gt; 1" ng-click="socialData.reorder=!socialData.reorder"><span translate="">PROFILE.BTN_REORDER</span></a></div></div><ion-list show-reorder="socialData.reorder"><ion-item class="item-icon-left item-social-edit done in" type="no-padding item-text-wrap" ng-if="formData.socials && formData.socials.length" ng-repeat="social in formData.socials | filter:filterFn track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\', \'ion-iphone\': social.type == \'phone\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}} <i class="ion-locked" ng-if="social.recipient"></i></p><h2><span>{{social.url}}</span></h2><ion-option-button class="button-assertive" ng-if="!social.recipient" ng-click="formData.socials.splice($index, 1); dirty = true;">{{\'COMMON.BTN_DELETE\'|translate}}</ion-option-button><ion-option-button class="button-info" ng-if="!social.recipient" ng-click="editSocialNetwork($index)">{{\'COMMON.BTN_EDIT\'|translate}}</ion-option-button><ion-reorder-button class="ion-drag" on-reorder="reorderSocialNetwork(social, $fromIndex, $toIndex)"></ion-reorder-button></ion-item></ion-list><ion-list class="no-padding"><div class="item item-complex item-input-inset"><label class="item-input-wrapper"><input type="text" style="width:100%" placeholder="{{\'PROFILE.SOCIAL_HELP\'|translate}}" id="socialUrl" on-return="addSocialNetwork($event);" ng-model="socialData.url"></label><button class="button button-small hidden-xs" type="button" ng-click="addSocialNetwork($event)" translate="">COMMON.BTN_ADD</button> <button class="button button-small button-icon icon ion-android-add visible-xs" type="button" ng-click="addSocialNetwork($event)"></button></div></ion-list>'),e.put("plugins/es/templates/common/item_comment.html",'<ng-init ng-init="level = level + 1"><a name="{{::comment.id|formatHash}}"></a><ion-item id="comment-{{::comment.id|formatHash}}" class="card card-comment card-avatar stable-900-bg item-text-wrap no-padding" ng-class="::{\'in done\': comment.isnew}"><div class="card-header padding-left" ng-if="comment.parent && !hideParent"><h5 class="gray underline"><ng-if ng-if="!comment.parent.issuer">{{\'COMMENTS.REPLY_TO_DELETED_COMMENT\'|translate}}</ng-if><ng-if ng-if="comment.parent.issuer"><a ng-click="toggleExpandedParent(comment, $index)">{{\'COMMENTS.REPLY_TO_LINK\'|translate}}<ng-if ng-if="::comment.parent.uid">{{::comment.parent.name||comment.parent.uid}}</ng-if><ng-if ng-if="::!comment.parent.uid"><i class="ion-key"></i> {{::comment.parent.name|| (comment.parent.issuer|formatPubkey) }}</ng-if></a><i ng-class="{\'ion-arrow-down-b\': !comment.expandedParent[$index], \'ion-arrow-up-b\': comment.expandedParent[$index]}"></i></ng-if></h5><div class="padding-left" ng-if="comment.expandedParent[$index]"><div class="card card-avatar card-avatar-small stable-bg item-text-wrap no-padding in done"><ng-include ng-init="comment = comment.parent" src="\'plugins/es/templates/common/item_comment_content.html\'"></ng-include></div></div></div><ng-include src="::\'plugins/es/templates/common/item_comment_content.html\'"></ng-include><div class="card-footer gray"><small class="underline"><a ng-click="share($event, comment, $index)">{{comment.creationTime | formatFromNow}}</a><ng-if ng-if="comment.replyCount">| <a class="dark" ng-click="toggleExpandedReplies(comment, $index)">{{\'COMMENTS.REPLY_COUNT\'|translate:comment}}</a> <i ng-class="{\'ion-arrow-down-b\': !comment.showReplies, \'ion-arrow-up-b\': comment.showReplies}"></i></ng-if></small><div class="pull-right"><a class="ion-android-share-alt" ng-click="share($event, comment)"></a> <a class="ion-edit" ng-if="isUserPubkey(comment.issuer)" ng-click="edit(comment)"></a> <a class="ion-trash-a" ng-if="isUserPubkey(comment.issuer)" ng-click="remove(comment, $index)"></a> <a class="ion-reply" ng-click="reply(comment)">{{::\'COMMENTS.REPLY\'|translate}}</a></div></div></ion-item><div ng-if="comment.expandedReplies[$index]" class="padding-left card-avatar-small expanded" ng-init="hideParent=true"><ng-include ng-repeat="comment in comment.replies track by comment.id" src="\'plugins/es/templates/common/item_comment.html\'"></ng-include></div></ng-init>'),e.put("plugins/es/templates/common/item_comment_content.html",'<div class="item item-avatar done in"><span class="avatar" ng-if="::!comment.avatar" ng-class="::{\'avatar-member\': comment.uid, \'avatar-wallet\': !comment.uid}"></span> <span class="avatar" ng-if="::comment.avatar" style="background-image: url({{::comment.avatar.src}})"></span> <a class="pull-left" ui-sref="app.wot_identity({pubkey:comment.issuer, uid: comment.uid})"><span class="positive" ng-if="::comment.uid">{{::comment.name||comment.uid}} </span><span ng-if="::!comment.uid" class="gray"><i class="icon ion-key gray"></i> {{::comment.name || (comment.issuer|formatPubkey)}} </span></a>&nbsp; <span trust-as-html="comment.html"></span></div>'),e.put("plugins/es/templates/common/item_location_search.html",'<div class="item no-padding"><div class="item-input"><i class="icon ion-location placeholder-icon"></i> <input type="text" placeholder="{{(options.location.help||\'LOCATION.SEARCH_HELP\')|translate}}" ng-model-options="{ debounce: 350 }" ng-model="search.location" ng-keydown="onKeydown($event)" ng-change="onLocationChanged()" ng-blur="hideDropdown()"></div></div><ul class="item no-padding list dropdown-list" ng-if="locations" scroll="true"><div ng-if="!locations.length" class="item padding assertive"><span translate>COMMON.SEARCH_NO_RESULT</span></div><a ng-repeat="res in locations" class="item item-border-large item-text-wrap ink done in {{res.selected && \'active\' || \'\'}}" ng-class="::{\'item-divider\': !res.address, \'item-icon-left\': res.address}" ng-click="::res.address ? selectLocation(res) : false"><h4 class="text-italic" ng-if="::!res.address" ng-bind-html="res.name"></h4><ng-if ng-if="::res.address"><i class="icon ion-location"></i><h3 ng-if="res.address.road">{{::res.address.road}}</h3><h3><span ng-if="res.address.postcode">{{::res.address.postcode}}</span> {{::res.address.city||res.address.village}} <span class="gray">| {{::res.address.country}}</span></h3><h5 class="gray">{{\'LOCATION.MODAL.POSITION\'|translate:res }}</h5></ng-if></a></ul>'),e.put("plugins/es/templates/common/modal_category.html",'<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title">{{ (ctrl.title || \'COMMON.CATEGORIES\') | translate}}</h1></ion-header-bar><ion-content class="categoryModal"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list"><label class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" placeholder="{{\'COMMON.CATEGORY_SEARCH_HELP\'|translate}}" ng-model="ctrl.searchText" ng-model-options="{ debounce: 350 }" ng-change="ctrl.doSearch()"></label><div ng-repeat="cat in categories" class="item item-category item-text-wrap" ng-class="{\'item-divider\': !cat.parent}" ng-click="cat.parent ? closeModal(cat) : false"><h2 ng-bind-html="cat.name"></h2></div></div></ion-content></ion-modal-view>'),e.put("plugins/es/templates/common/modal_edit_avatar.html",'<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs visible-sm" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>PROFILE.MODAL_AVATAR.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-click="doCrop()" ng-disabled="formData.imageCropStep == 1" ng-if="formData.imageCropStep <= 2"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-click="closeModal(formData.result)" ng-if="formData.imageCropStep == 3"><i class="icon ion-android-done"></i></button></ion-header-bar><ion-content class="modal-avatar padding"><div ng-show="formData.imageCropStep == 1"><p translate>PROFILE.MODAL_AVATAR.SELECT_FILE_HELP</p><div class="item card text-center padding ink" ng-click="openFileSelector()"><i class="ion-image stable" style="font-size:150px"></i> <b class="ion-plus gray" style="position:relative; font-size:80px; top:-51px; right: 19px"></b><p translate>PROFILE.MODAL_AVATAR.BTN_SELECT_FILE</p></div><input type="file" name="fileInput" accept="image/*" id="fileInput" onchange="angular.element(this).scope().fileChanged(event)" style="visibility:hidden; position:absolute"></div><div ng-show="formData.imageCropStep == 2"><p translate>PROFILE.MODAL_AVATAR.RESIZE_HELP</p><div class="item card text-center padding ink"><image-crop data-height="200" data-width="200" data-shape="circle" data-step="formData.imageCropStep" src="formData.imgSrc" data-result="formData.result" data-result-blob="formData.resultBlob" crop="formData.initCrop" padding="150" max-size="1024"></image-crop></div></div><div ng-show="formData.imageCropStep == 3"><p translate>PROFILE.MODAL_AVATAR.RESULT_HELP</p><div class="item card padding hero" style="height: 110px"><div class="content"><img class="avatar" ng-src="{{formData.result}}" style="height: 88px; width: 88px"></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doCrop()" translate ng-disabled="formData.imageCropStep == 1" ng-if="formData.imageCropStep <= 2">COMMON.BTN_NEXT</button> <button class="button button-positive ink" ng-click="closeModal(formData.result)" translate ng-if="formData.imageCropStep == 3">COMMON.BTN_CONTINUE</button></div></ion-content></ion-modal-view>'),e.put("plugins/es/templates/common/modal_location.html",'<ion-modal-view class="modal-full-height modal-search-location"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button><h1 class="title" translate="">LOCATION.MODAL.TITLE</h1></ion-header-bar><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'LOCATION.MODAL.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()"></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left" ng-if="!search.loading && search.results"><h4 translate="">COMMON.RESULTS_LIST</h4></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div ng-if="!search.loading && search.results && (!search.results.length || !search.results[0].address)" class="assertive padding"><span translate="">COMMON.SEARCH_NO_RESULT</span></div><ion-list ng-if="!search.loading" class="padding-top {{::motion.ionListClass}}"><div ng-repeat="res in search.results" class="item item-border-large item-text-wrap ink" ng-class="::{\'item-divider\': !res.address, \'item-icon-left item-icon-right\': res.address}" ng-click="res.address ? closeModal(res) : false"><h4 class="text-italic" ng-if="::!res.address" ng-bind-html="res.name"></h4><ng-if ng-if="::res.address"><i class="icon ion-location"></i><h2 ng-if="res.address.road">{{::res.address.road}}</h2><h3><span ng-if="res.address.postcode">{{::res.address.postcode}}</span> {{::res.address.city||res.address.village}} <span class="gray">| {{::res.address.country}}</span></h3><h5 class="gray">{{\'LOCATION.MODAL.POSITION\'|translate:res }}</h5><i class="icon ion-ios-arrow-right"></i></ng-if></div></ion-list></ion-content><ion-footer-bar class="stable-bg padding-left padding-right block" ng-if="license"><div class="pull-right copyright"><span class="dark">© </span><a class="positive" href="{{license.url}}" target="_blank">{{license.name}}</a></div></ion-footer-bar></ion-modal-view>'),e.put("plugins/es/templates/common/popover_profile_extend.html",'<button ng-if=":state:enable && auth" class="button button-positive button-small ink" ng-click="showEditUserProfile()">{{\'PROFILE.BTN_EDIT\' | translate}}</button>'),e.put("plugins/es/templates/common/popup_report_abuse.html",'<form name="abuseForm" ng-submit=""><div class="list" ng-init="setAbuseForm(abuseForm)"><label class="item item-input" ng-class="{\'item-input-error\': abuseForm.$submitted && abuseForm.comment.$invalid}"><textarea class="padding" style="background-color: transparent" name="comment" type="text" placeholder="{{\'COMMON.REPORT_ABUSE.REASON_HELP\' | translate}}" rows="3" ng-model="abuseData.comment" ng-minlength="8" required></textarea></label><div class="form-errors" ng-if="abuseForm.$submitted && abuseForm.comment.$error" ng-messages="abuseForm.comment.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-toggle item-text-wrap dark"><div class="input-label" translate>COMMON.REPORT_ABUSE.ASK_DELETE</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="abuseData.delete"><div class="track"><div class="handle"></div></div></label></div></div></form>'),e.put("plugins/es/templates/common/view_comments.html",'<form class="comments" ng-controller="ESCommentsCtrl" ng-submit="save()"><div class="item item-divider"><i class="icon ion-chatboxes"></i> <span translate="">COMMENTS.DIVIDER</span> <span class="gray" ng-if="comments.total">({{comments.total}})</span></div><span class="item item-more-comments" ng-if="comments.hasMore"><small><a ng-click="showMore()" translate="">COMMENTS.SHOW_MORE_COMMENTS</a></small></span><div class="padding-right"><ng-repeat ng-repeat="comment in comments.result track by comment.id" ng-include="::\'plugins/es/templates/common/item_comment.html\'"></ng-repeat></div><div class="visible-xs visible-sm" style="margin-bottom"><div class="block"><div class="item item-input-inset done in" ng-if="formData.parent"><div class="padding text-right pull-left" translate="">COMMENTS.REPLY_TO</div><br><div class="padding-left expanded"><div class="card card-comment stable-900-bg item-text-wrap no-padding in done"><ng-include ng-if="::formData.parent.message" ng-init="comment = formData.parent" src="\'plugins/es/templates/common/item_comment_content.html\'"></ng-include><span ng-if="::!formData.parent.message" translate="">COMMENTS.DELETED_COMMENT</span><div class="card-footer text-right gray"><div class="pull-right"><a class="ion-close" ng-click="removeParentLink()">{{::\'COMMON.BTN_CANCEL\'|translate}}</a></div></div></div></div></div><div class="item item-input-inset"><div class="item-input-wrapper"><input type="text" id="comment-form-input" style="width: 100%" placeholder="{{\'COMMENTS.COMMENT_HELP\'|translate}}" on-return="save();" ng-model="formData.message"> <button type="submit" class="button button-small button-small-padding button-icon button-dark button-icon gray"><i class="icon ion-android-send"></i></button></div></div></div></div></form>'),e.put("plugins/es/templates/common/view_likes.html",'<div class="likes"><ng-if ng-if="likeData.likes && likeData.likes.total"><span ng-class="{\'gray\': !likeData.likes.wasHitCount, \'positive\': likeData.likes.wasHitCount}"><a title="{{\'COMMON.LIKES_TEXT\'|translate: likeData.likes }}" ng-click="!canEdit && toggleLike($event, {kind: \'like\'})">{{likeData.likes.total}} <i class="icon ion-heart"></i></a></span></ng-if><ng-if ng-if="likeData.abuses && likeData.abuses.total"><span class="gray" ng-if="likeData.likes && likeData.likes.total">&nbsp;|&nbsp;</span> <a ng-class="{\'assertive\': likeData.abuses.wasHitCount}" ng-click="!canEdit && reportAbuse($event)" title="{{\'COMMON.ABUSES_TEXT\'|translate: likeData.abuses }}">{{likeData.abuses.total}} <i class="icon ion-android-warning"></i></a></ng-if></div>'),e.put("plugins/es/templates/common/view_pictures.html",'<div class="item gallery done in" ng-if="pictures && pictures.length>0"><div ng-repeat="picture in pictures" class="item card card-gallery"><div class="ink"><h2 ng-if="picture.title">{{::picture.title}}</h2><img ng-src="{{picture.src}}"></div></div></div>'),e.put("plugins/es/templates/document/item_document.html",'<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-click="selectDocument($event, doc)"><i class="icon ion-document stable" ng-if=":rebind:!doc.avatar"></i> <i class="avatar" ng-if=":rebind:doc.avatar" style="background-image: url(\'{{:rebind:doc.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h3 class="dark"><i class="ion-locked" ng-if=":rebind:doc.nonce"></i> {{:rebind:doc.time|formatDate}}</h3><h4 class="gray">{{:rebind:\'DOCUMENT.HASH\'|translate}} {{:rebind:doc.hash|formatHash}}</h4></div><div class="col"><h3><a ui-sref="app.wot_identity({pubkey: doc.pubkey, uid: doc.uid})"><span class="gray"><i class="ion-key"></i> {{:rebind:doc.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:doc.uid"><i class="ion-person"></i> {{:rebind:doc.name||doc.uid}}</span></a></h3></div><div class="col"><a ng-if=":rebind:login && doc.pubkey==walletData.pubkey" ng-click="remove($index)" class="gray pull-right" title="{{\'DOCUMENT.LOOKUP.BTN_REMOVE\'|translate}}"><i class="ion-trash-a"></i></a><h3 ng-if=":rebind:doc.recipient"><a ui-sref="app.wot_identity({pubkey: doc.recipient.pubkey, uid: doc.recipient.uid})"><span class="gray"><i class="ion-key"></i> {{:rebind:doc.recipient.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:doc.recipient.uid"><i class="ion-person"></i> {{:rebind:doc.recipient.name||doc.recipient.uid}}</span></a></h3><h4 class="gray" ng-if=":rebind:doc.read_signature"><i class="ion-checkmark"></i> <span translate>DOCUMENT.LOOKUP.READ</span></h4></div></div></ion-item>'),e.put("plugins/es/templates/document/item_document_comment.html",'<ion-item id="doc-{{::doc.id}}" class="item item-document item-document-comment item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'compacted\': compactMode}" ng-click="selectDocument($event, doc)"><i ng-show=":rebind:!compactMode" ng-if=":rebind:!doc.avatar" class="icon ion-ios-chatbubble-outline stable"></i> <i ng-show=":rebind:!compactMode" ng-if=":rebind:doc.avatar" class="avatar" style="background-image: url(\'{{:rebind:doc.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h4><i class="ion-ios-chatbubble-outline dark"></i> <span class="gray" ng-if=":rebind:doc.name"><i class="ion-person" ng-show=":rebind:!compactMode"></i> {{:rebind:doc.name}}: </span><span class="dark"><i class="ion-quote" ng-if=":rebind:!compactMode"></i> {{:rebind:doc.message|truncText:50}}</span></h4><h4 class="gray"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</h4></div><div class="col"><h3><a ui-sref="app.wot_identity({pubkey: doc.pubkey, uid: doc.name})"></a></h3></div><div class="col" ng-if=":rebind:!compactMode"></div></div></ion-item>'),e.put("plugins/es/templates/document/item_document_page.html",'<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'positive-100-bg\': doc.updated}" ng-click="selectDocument($event, doc)"><i ng-if=":rebind:doc.thumbnail" class="avatar" style="background-image: url({{:rebind:doc.thumbnail.src}})"></i> <i ng-if=":rebind:!doc.thumbnail" class="avatar icon dark cion-registry-{{doc.docType}}"></i><div class="row no-padding"><div class="col"><h3 ng-if="doc.title">{{:rebind:doc.title}}</h3><h4><span class="dark" ng-if=":rebind:doc.picturesCount > 1"><i class="ion-camera"></i> {{:rebind:doc.picturesCount}} </span><span class="dark" ng-if=":rebind:doc.city"><i class="ion-location"></i> {{:rebind:doc.city}} </span><span class="gray" ng-if=":rebind:doc.name"><i class="ion-person"></i> {{:rebind:doc.name}}</span></h4></div><div class="col col-33"><small class="gray pull-right"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</small></div></div></ion-item>'),e.put("plugins/es/templates/document/item_document_profile.html",'<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'compacted\': compactMode}" ng-click="selectDocument($event, doc)"><i ng-show=":rebind:!compactMode" ng-if=":rebind:doc.avatar" class="avatar" style="background-image: url({{:rebind:doc.avatar.src}})"></i> <i ng-show=":rebind:!compactMode" ng-if=":rebind:!doc.avatar" class="icon ion-person stable"></i><div class="row no-padding"><div class="col"><h4 ng-if=":rebind:doc.title"><i class="ion-person gray"></i> <span class="dark">{{:rebind:doc.title}} </span><span class="gray">{{:rebind:\'DOCUMENT.LOOKUP.HAS_CREATE_OR_UPDATE_PROFILE\' |translate}}</span></h4><h4><span class="dark" ng-if=":rebind:doc.city"><i class="ion-location"></i> {{:rebind:doc.city}} </span><span class="gray"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</span></h4></div><div class="col" ng-if=":rebind:!compactMode"><a ng-if=":rebind:login && doc.pubkey==walletData.pubkey" ng-click="remove($event, $index)" class="gray pull-right" title="{{\'DOCUMENT.LOOKUP.BTN_REMOVE\'|translate}}"><i class="ion-trash-a"></i></a></div></div></ion-item>'),e.put("plugins/es/templates/document/items_documents.html",'<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-repeat ng-repeat="doc in :rebind:search.results track by doc.id" ng-switch="" on="doc.type"><div ng-switch-when="comment"><ng-include src="::\'plugins/es/templates/document/item_document_comment.html\'"></ng-include></div><div ng-switch-when="profile"><ng-include src="::\'plugins/es/templates/document/item_document_profile.html\'"></ng-include></div><div ng-switch-when="record"><ng-include ng-if="doc.index === \'page\'" src="::\'plugins/es/templates/document/item_document_page.html\'"></ng-include><ng-include ng-if="doc.index !== \'page\'" src="::\'plugins/es/templates/document/item_document.html\'"></ng-include></div><div ng-switch-default=""><ng-include src="::\'plugins/es/templates/document/item_document.html\'"></ng-include></div></ng-repeat>'),e.put("plugins/es/templates/document/list_documents.html",'<ion-list class="list" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/document/items_documents.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("plugins/es/templates/document/lookup.html",'<ion-view><ion-nav-title><span translate>DOCUMENT.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/document/lookup_form.html\'"></ng-include></ion-content></ion-view>'),e.put("plugins/es/templates/document/lookup_form.html",'<div class="lookupForm"><div class="item no-padding"><label class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'DOCUMENT.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="{{helptipPrefix}}-search-text"></a></div></label></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.last" translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS</h4><h4 ng-if="!search.last">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }} </small><small class="gray" ng-if=":rebind:expertMode && search.filters && search.filters.length">- <a ng-click="toggleShowQuery()" ng-if="!showQuery"><span translate="">DOCUMENT.LOOKUP.SHOW_QUERY</span> <i class="icon ion-arrow-down-b gray"></i> </a><a ng-click="toggleShowQuery()" ng-if="showQuery"><span translate="">DOCUMENT.LOOKUP.HIDE_QUERY</span> <i class="icon ion-arrow-up-b gray"></i></a></small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="item no-border no-padding" ng-if=":rebind:search.filters && search.filters.length && expertMode"><small class="no-padding no-margin" ng-if="showQuery"><span class="gray text-wrap dark">{{:rebind:search.query}}</span></small></div><ion-list class="list" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/document/items_documents.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>'),e.put("plugins/es/templates/document/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>DOCUMENT.LOOKUP.POPOVER_ACTIONS.TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-class="{\'gray\': !search.total}" ng-click="removeAll()"><i class="icon ion-trash-a"></i> {{\'DOCUMENT.LOOKUP.POPOVER_ACTIONS.REMOVE_ALL\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/group/edit_group.html",'<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs" ng-if="id" ng-bind-html="formData.title"></span> <span class="visible-xs" ng-if="!loading && !id" translate="">GROUP.EDIT.TITLE_NEW</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-class="{\'ion-android-send\':!id, \'ion-android-done\': id}" ng-click="save()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding"><div class="col"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><form name="recordForm" novalidate="" ng-submit="save()"><div class="list" ng-class="motion.ionListClass" ng-init="setForm(recordForm)"><div class="item hidden-xs"><h1 ng-if="id" ng-bind-html="formData.title"></h1><h1 ng-if="!id" translate="">GROUP.EDIT.TITLE_NEW</h1><h2 class="balanced" ng-if="!id"><i class="icon ion-android-people"></i> <i class="icon ion-android-lock" ng-if="formData.type==\'managed\'"></i> {{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</h2></div><div class="item" ng-if="id"><h4 class="gray"><i class="icon ion-calendar"></i> {{\'COMMON.LAST_MODIFICATION_DATE\'|translate}}&nbsp;{{formData.time | formatDate}}</h4><div class="badge badge-balanced badge-editable" ng-click="showRecordTypeModal()">{{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</div></div><ng-include src="::\'plugins/es/templates/common/edit_pictures.html\'"></ng-include><div class="item item-divider" translate="">GROUP.GENERAL_DIVIDER</div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label" translate="">GROUP.EDIT.RECORD_TITLE</span> <input type="text" placeholder="{{\'GROUP.EDIT.RECORD_TITLE_HELP\'|translate}}" name="title" id="group-record-title" ng-model="formData.title" ng-minlength="3" ng-required="true"></div><div class="form-errors" ng-if="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-input item-floating-label"><span class="input-label" translate="">GROUP.EDIT.RECORD_DESCRIPTION</span><textarea placeholder="{{\'GROUP.EDIT.RECORD_DESCRIPTION_HELP\'|translate}}" ng-model="formData.description" rows="8" cols="10">\n                </textarea></div><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include></div></form></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/group/item_group.html",'<a name="group-{{:rebind:group.hash}}"></a><div id="group-{{:rebind:group.hash}}" class="item item-icon-right item-avatar {{::ionItemClass}} ink" ng-click="select(group)"><i class="item-image avatar" style="background-image: url({{::group.avatar.src}})" ng-if="group.avatar"></i> <i class="item-image icon ion-android-people" ng-if="!group.avatar"></i> <i class="item-image icon-secondary ion-android-lock" ng-if="!group.avatar" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i><h2 ng-bind-html=":rebind:group.title"></h2><h4 class="gray pull-right"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: group }}</h4><h4 class="dark pull-left" ng-if=":rebind:group.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:group.membersCount}}</span></h4><i class="icon ion-ios-arrow-right"></i></div>'),e.put("plugins/es/templates/group/items_groups.html",'<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-repeat ng-repeat="group in :rebind:search.results" ng-include="::\'plugins/es/templates/group/item_group.html\'"></ng-repeat>'),e.put("plugins/es/templates/group/list.html",'<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="notification in search.results" class="item-border-large item-text-wrap ink item-avatar" ng-class="{\'unread\': !notification.read}" ng-click="select(notification)"><i ng-if="!notification.avatar" class="item-image icon {{::notification.avatarIcon}}"></i> <i ng-if="notification.avatar" class="item-image avatar" style="background-image: url({{::notification.avatar.src}})"></i><h3 trust-as-html="notification.message | translate:notification"></h3><h4><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.time|formatFromNow}}</span> <span class="gray">| {{notification.time|formatDate}}</span></h4></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("plugins/es/templates/group/lookup.html",'<ion-view class="view-group"><ion-nav-title><span translate>GROUP.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/group/lookup_form.html\'"></ng-include></ion-content></ion-view>'),e.put("plugins/es/templates/group/lookup_form.html",'<div class="lookupForm"><label class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'GROUP.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="helptip-group-search-text"></a></div></label><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.type==\'open\'" translate="">GROUP.LOOKUP.OPEN_RESULTS_LIST</h4><h4 ng-if="search.type==\'last\'" translate="">GROUP.LOOKUP.LAST_RESULTS_LIST</h4><h4 ng-if="search.type==\'managed\'" translate="">GROUP.LOOKUP.MANAGED_RESULTS_LIST</h4><h4 ng-if="search.type==\'text\'">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }}</small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="list {{::motion.ionListClass}}" ng-if="!$scope.search.loading"><ng-include src="::\'plugins/es/templates/group/items_groups.html\'"></ng-include></div><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>'),e.put("plugins/es/templates/group/lookup_item.html",'<i class="item-image avatar" style="background-image: url({{::item.avatar.src}})" ng-if="item.avatar"></i> <i class="item-image icon ion-android-people" ng-if="!item.avatar"></i> <i class="item-image icon-secondary ion-android-lock" ng-if="!item.avatar" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i><h2 ng-bind-html=":rebind:item.title"></h2><h4 class="gray pull-right"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: item }}</h4><h4 class="dark pull-left" ng-if=":rebind:item.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:item.membersCount}}</span></h4>'),e.put("plugins/es/templates/group/modal_record_type.html",'<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>GROUP.TYPE.TITLE</h1></ion-header-bar><ion-content class="lookupForm padding"><h3 translate>GROUP.TYPE.SELECT_TYPE</h3><div class="list"><div class="item item-complex card stable-bg item-icon-left ink" ng-click="closeModal(\'open\')"><div class="item-content item-text-wrap"><i class="item-image icon ion-android-people dark"></i><h2 translate>GROUP.TYPE.OPEN_GROUP</h2><h4 class="gray" translate>GROUP.TYPE.OPEN_GROUP_HELP</h4></div></div><div class="item item-complex card stable-bg item-icon-left ink" ng-click="closeModal(\'managed\')"><div class="item-content item-text-wrap"><i class="item-image icon ion-android-people dark"></i> <i class="icon-secondary ion-android-lock dark" style="left: 10px; top: -8px"></i><h2 translate>GROUP.TYPE.MANAGED_GROUP</h2><h4 class="gray" translate>GROUP.TYPE.MANAGED_GROUP_HELP</h4></div></div></div></ion-content></ion-modal-view>'),e.put("plugins/es/templates/group/view_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>GROUP.VIEW.MENU_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}}</a></div></ion-content></ion-popover-view>'),
-e.put("plugins/es/templates/group/view_record.html",'<ion-view left-buttons="leftButtons"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-bar button-icon button-clear visible-xs visible-sm" ng-click="edit()" ng-if="canEdit"><i class="icon ion-android-create"></i></button> <button class="button button-bar button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><div class="positive-900-bg hero"><div class="content" ng-if="!loading"><i class="avatar cion-registry-{{formData.type}}" ng-if="!formData.avatar"></i> <i class="avatar" style="background-image: url({{::formData.avatar.src}})" ng-if="formData.avatar"></i><h3 ng-bind-html="formData.title"></h3><h4>&nbsp;</h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><div class="row no-padding-xs no-padding-sm"><div class="col list item-text-wrap no-padding-xs no-padding-sm" ng-class="::motion.ionListClass"><div class="item"><h2 class="gray"><a ng-if="formData.city" ui-sref="app.groups({location:formData.city})"><i class="icon ion-location"></i> <span ng-bind-html="formData.city"></span> </a><span ng-if="formData.city && formData.type">&nbsp;|&nbsp;</span> <a ng-if="formData.type" ui-sref="app.groups({type:formData.type})"><i class="icon ion-flag"></i> {{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</a></h2><h4><i class="icon ion-clock" ng-if="formData.time"></i> <span translate="">COMMON.SUBMIT_BY</span> <a ng-class="{\'positive\': issuer.uid, \'gray\': !issuer.uid}" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"><ng-if ng-if="issuer.uid"><i class="icon ion-person"></i> {{::issuer.name||issuer.uid}}</ng-if><span ng-if="!issuer.uid"><i class="icon ion-key"></i> {{issuer.pubkey|formatPubkey}} </span></a><span>{{formData.time|formatFromNow}}<h4 class="gray hidden-xs">| {{formData.time | formatDate}}</h4></span></h4></div><a id="group-share-anchor-{{id}}"></a><ion-item><h2><span trust-as-html="formData.description"></span></h2></ion-item><ion-item><h4 ng-if="formData.address"><span class="gray" translate="">REGISTRY.VIEW.LOCATION</span> <a class="positive" target="_blank" href="https://www.google.fr/maps/?q={{formData.address}},%20{{formData.city}}"><span ng-bind-html="formData.address"></span> <span ng-if="formData.city">- </span><span ng-bind-html="formData.city"></span></a></h4></ion-item><ng-if ng-if="formData.socials && formData.socials.length>0"><ion-item class="item-icon-left" type="no-padding item-text-wrap" ng-repeat="social in formData.socials track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}}</p><h2><a href="{{social.url}}" ng-if="social.type != \'email\'" target="_blank">{{social.url}}</a> <a href="mailto:{{social.url}}" ng-if="social.type == \'email\'">{{social.url}}</a></h2></ion-item></ng-if><div class="lazy-load"><ng-include src="::\'plugins/es/templates/common/view_pictures.html\'"></ng-include><span class="item item-divider" ng-if="formData.pubkey"><span translate="">REGISTRY.TECHNICAL_DIVIDER</span></span><div class="item item-icon-left item-text-wrap ink" ng-if="formData.pubkey" copy-on-click="{{::formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">REGISTRY.EDIT.RECORD_PUBKEY</span><h4 class="dark">{{::formData.pubkey}}</h4></div><ng-include src="::\'plugins/es/templates/common/view_comments.html\'"></ng-include></div></div></div></ion-content><button class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm" ng-if="formData.pubkey && !isUserPubkey(formData.pubkey)" ng-click="showTransferModal({pubkey: formData.pubkey, uid: formData.title})"></button></ion-view>'),e.put("plugins/es/templates/invitation/list_invitation.html",'<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="invitation in search.results" class="item-border-large item-text-wrap item-avatar"><i ng-if="::!invitation.avatar" class="item-image icon {{::invitation.avatarIcon}}"></i> <i ng-if="::invitation.avatar" class="item-image avatar" style="background-image: url({{::invitation.avatar.src}})"></i><h3 trust-as-html="invitation.message | translate:invitation"></h3><h3 class="dark text-italic" ng-if="invitation.comment"><i class="icon ion-quote"></i> <span ng-bind-html="invitation.comment"></span></h3><h4><i class="icon {{::invitation.icon}}"></i> <span class="dark" ng-if="::invitation.issuer" trust-as-html="\'INVITATION.SUGGESTED_BY\' | translate:invitation"></span> <span class="dark">{{::invitation.time|formatFromNow}}</span> <span class="gray">| {{::invitation.time|formatDate}}</span></h4><div class="block text-right"><button class="button button-positive button-small button-small-padding" ng-click="accept(invitation)" ng-if="::invitation.state" translate>{{::(invitation.okText||\'COMMON.BTN_SHOW\') |translate}}</button> <button class="button button-stable button-small button-small-padding" ng-click="delete($index)" translate>INVITATION.BTN_DELETE</button></div></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("plugins/es/templates/invitation/modal_new_invitation.html",'<ion-modal-view id="transfer" class="modal-invitation modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>INVITATION.NEW.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-header-bar><ion-content scroll="true"><ng-include src="::\'plugins/es/templates/invitation/new_invitation_form.html\'"></ng-include></ion-content></ion-modal-view>'),e.put("plugins/es/templates/invitation/new_invitation_form.html",'<form name="invitationForm" novalidate="" ng-submit="doSend()"><div class="list" ng-init="setForm(invitationForm)"><a class="item item-icon-right gray ink" ng-class="{\'disable-pointer-events\': recipients.length, \'item-input-error\': form.$submitted && !recipients.length}" ng-click="showSelectRecipientModal($event)"><span class="gray" translate="">INVITATION.NEW.RECIPIENTS</span> <span class="item-note"><span class="hidden-xs" ng-if="!recipients.length" translate="">INVITATION.NEW.RECIPIENTS_HELP</span><ng-repeat ng-repeat="identity in recipients track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><ng-bind-html ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></ng-bind-html><b class="enable-pointer-events ion-close" ng-click="removeRecipient($index, $event)">&nbsp;&nbsp;</b></ng-repeat></span><i class="gray icon enable-pointer-events ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !recipients.length"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><a class="item item-icon-right gray ink" ng-class="{\'disable-pointer-events\': suggestions.length, \'item-input-error\': form.$submitted && !suggestions.length}" ng-click="showSelectSuggestionModal($event)"><span class="gray enable-pointer-events" translate="">INVITATION.NEW.SUGGESTION_IDENTITIES</span> <span class="item-note"><span class="hidden-xs" ng-if="!suggestions.length" translate="">INVITATION.NEW.SUGGESTION_IDENTITIES_HELP</span><ng-repeat ng-repeat="identity in suggestions track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><ng-bind-html ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></ng-bind-html><b class="enable-pointer-events ion-close" ng-click="removeSuggestion($index, $event)">&nbsp;&nbsp;</b></ng-repeat></span><i class="gray icon enable-pointer-events ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !suggestions.length"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-content item-toggle dark visible-xs visible-sm"><span class="input-label gray">{{\'TRANSFER.BTN_ADD_COMMENT\' | translate}}</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useComment"><div class="track"><div class="handle"></div></div></label></div><label class="item item-input item-floating-label visible-xs visible-sm" ng-if="formData.useComment" ng-class="{\'item-input-error\': form.$submitted && form.comment.$invalid}"><span class="input-label">{{\'TRANSFER.COMMENT\' | translate}}</span><textarea placeholder="{{\'TRANSFER.COMMENT_HELP\' | translate}}" name="comment" ng-model="formData.comment" ng-maxlength="255">\n        </textarea></label><div class="form-errors" ng-show="form.$submitted && form.comment.$error" ng-messages="form.comment.$error"><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" tabindex="-1" ng-click="cancel()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button button-positive ink" tabindex="8" type="submit" translate="">TRANSFER.BTN_SEND</button></div></form>'),e.put("plugins/es/templates/invitation/popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-class="{\'gray\': !search.results.length, \'assertive\': search.results.length}" ng-click="deleteAll()"><i class="icon ion-trash-a"></i> <span translate>INVITATION.BTN_DELETE_ALL</span></a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/invitation/popover_invitation.html",""),e.put("plugins/es/templates/invitation/view_invitations.html",'<ion-view left-buttons="leftButtons" class="view-invitation"><ion-nav-title>{{\'INVITATION.LIST.TITLE\' | translate}}</ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding gray" ng-if="!search.loading && !search.results.length" translate="">INVITATION.NO_RESULT</div><ng-include src="::\'plugins/es/templates/invitation/list_invitation.html\'"></ng-include></div></div></ion-content><button id="fab-new-invitation" class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm spin" ng-click="showNewInvitationModal()"></button></ion-view>'),e.put("plugins/es/templates/join/modal_join_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'select-account-type\'"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-class="{ activated: accountTypeMember != null && !accountTypeMember }" ng-click="selectAccountType(\'organization\')"><div class="item-content item-text-wrap"><i class="item-image icon dark cion-registry-association"></i><h2 translate>ACCOUNT.NEW.ORGANIZATION_ACCOUNT</h2><h4 class="gray" translate>ACCOUNT.NEW.ORGANIZATION_ACCOUNT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'last-slide\'"><ion-slide-page><ion-content class="has-header" scroll="false"><p>TOTO</p></ion-content></ion-slide-page></ng-if>'),e.put("plugins/es/templates/message/compose.html",'<ion-view left-buttons="leftButtons" id="composeMessage"><ion-nav-title><span class="visible-xs visible-sm" nf-if="!isReply" translate="">MESSAGE.COMPOSE.TITLE</span> <span class="visible-xs visible-sm" nf-if="isReply" translate="">MESSAGE.COMPOSE.TITLE_REPLY</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row"><div class="col"><ng-include src="::\'plugins/es/templates/message/compose_form.html\'"></ng-include></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/message/compose_form.html",'<form name="messageForm" novalidate="" ng-submit="doSend()"><div class="list no-margin" ng-init="setForm(messageForm)"><a class="item item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" ng-click="showWotLookupModal()"><span class="gray" translate>MESSAGE.COMPOSE.TO</span> <span class="badge badge-royal" ng-if="destUid"><i class="ion-person"></i> {{destName||destUid}}</span>&nbsp; <span class="badge badge-stable" ng-if="!destUid && destPub">{{destName}} <span ng-if="!destName"><i class="ion-key"></i>{{destPub | formatPubkey}}</span> </span>&nbsp; <i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !formData.destPub"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ion-item class="item-text-wrap ink" ng-class="{\'item-icon-right\': enableSelectWallet}" ng-click="showSelectWalletModal()"><span class="gray" translate>TRANSFER.FROM</span> <span class="badge badge-balanced animate-fade-in animate-show-hide" ng-show="!loading"><ion-spinner icon="android" ng-if="!walletData.pubkey"></ion-spinner><span ng-if="walletData.pubkey && !walletData.isMember"><i class="ion-key"></i> {{walletData.pubkey| formatPubkey}}&nbsp;&nbsp; </span><span ng-if="walletData.isMember"><i class="ion-person"></i> {{walletData.name||walletData.uid}} </span></span><i class="gray icon ion-ios-arrow-right" ng-if="enableSelectWallet"></i></ion-item><div class="item item-input" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><input type="text" autocomplete="off" placeholder="{{\'MESSAGE.COMPOSE.OBJECT_HELP\' | translate}}" name="title" ng-model="formData.title" ng-maxlength="256" required> <span class="badge item-note" ng-if="isReply">({{\'MESSAGE.COMPOSE.OBJECT\' | translate}})</span></div><div class="form-errors" ng-show="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="maxlength"><span translate="MESSAGE.ERROR.MESSAGE_CONTENT_TOO_LONG" translate-values="{maxLength: 256}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.content.$invalid}"><span class="input-label">{{\'MESSAGE.COMPOSE.MESSAGE\' | translate}}</span><textarea placeholder="{{\'MESSAGE.COMPOSE.MESSAGE_HELP\' | translate}}" autocomplete="off" name="content" ng-model="formData.content" rows="8" ng-maxlength="5000">\n        </textarea></div><div class="form-errors" ng-show="form.$submitted && form.content.$error" ng-messages="form.content.$error"><div class="form-error" ng-message="maxlength"><span translate="MESSAGE.ERROR.MESSAGE_CONTENT_TOO_LONG" translate-values="{maxLength: 5000}"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="cancel()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" type="submit" ng-disabled="sending" translate>TRANSFER.BTN_SEND</button></div><div class="list no-margin"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate>MESSAGE.COMPOSE.ENCRYPTED_HELP</h4></div></div></form>'),e.put("plugins/es/templates/message/list.html",'<div class="padding gray" ng-if="!search.loading && !search.results.length"><span ng-if="search.type==\'last\'">{{ (\'MESSAGE.NO_MESSAGE_\' + type) | upper | translate }}</span> <span ng-if="search.type==\'text\'" translate="">COMMON.SEARCH_NO_RESULT</span></div><ion-list class="{{::motion.ionListClass}}" can-swipe="$root.device.enable"><ion-item class="item item-border-large item-avatar item-icon-right ink" ng-repeat="msg in :rebind:search.results track by msg.id" ng-click="select(msg, $event)"><i ng-if="::!msg.avatar" class="item-image icon" ng-class="{\'ion-person\': msg.uid, \'ion-email\': !msg.uid}"></i> <i ng-if="::msg.avatar" class="item-image avatar" style="background-image: url({{::msg.avatar.src}})"></i><h4 class="pull-right visible-xs visible-sm dark"><i class="ion-clock"></i> {{::msg.time|formatFromNow}}</h4><h3><a class="positive" ng-if="::msg.name||msg.uid" ui-sref="app.wot_identity({pubkey:msg.issuer, uid:msg.name||msg.uid})"><i class="ion-person"></i> {{::msg.name||msg.uid}} </a><a class="gray" ng-if="::!msg.name && !msg.uid" ui-sref="app.wot_identity({pubkey:msg.issuer})"><i class="ion-key"></i> {{::msg.issuer|formatPubkey}}</a></h3><h2 ng-class="{\'unread\': !msg.read}" ng-bind-html="::msg.title"></h2><p ng-bind-html="::msg.summary||msg.content"></p><i class="icon ion-ios-arrow-right"></i><ion-option-button class="button-stable" ng-click="showReplyModal($index)" translate="">MESSAGE.BTN_REPLY</ion-option-button><ion-option-button class="button-assertive" ng-click="delete($index)" translate="">COMMON.BTN_DELETE</ion-option-button></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" icon="ion-loading-c" on-infinite="showMore()" distance="10%"></ion-infinite-scroll>'),e.put("plugins/es/templates/message/lookup.html",'<ion-view left-buttons="leftButtons" class="view-messages"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'MESSAGE.LIST.INBOX\'|translate}}" icon="ion-archive" ui-sref="app.user_message.tab_inbox"><ion-nav-view name="tab_inbox"></ion-nav-view></ion-tab><ion-tab title="{{\'MESSAGE.LIST.OUTBOX\'|translate}}" icon="ion-paper-airplane" ui-sref="app.user_message.tab_outbox"><ion-nav-view name="tab_outbox"></ion-nav-view></ion-tab></ion-tabs></ion-view>'),e.put("plugins/es/templates/message/lookup_by_id.html",'<ion-view left-buttons="leftButtons" class="view-messages"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'MESSAGE.LIST.INBOX\'|translate}}" icon="ion-archive" ui-sref="app.user_messages_by_id.tab_inbox"><ion-nav-view name="tab_inbox"></ion-nav-view></ion-tab><ion-tab title="{{\'MESSAGE.LIST.OUTBOX\'|translate}}" icon="ion-paper-airplane" ui-sref="app.user_messages_by_id.tab_outbox"><ion-nav-view name="tab_outbox"></ion-nav-view></ion-tab></ion-tabs></ion-view>'),e.put("plugins/es/templates/message/lookup_lg.html",'<ion-view left-buttons="leftButtons" class="view-messages"><ion-nav-title><span translate="">MESSAGE.LIST.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-click="showActionsPopover($event)"><i class="icon ion-android-more-vertical"></i></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh(true, $event)"></ion-refresher><div class="item no-padding"><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'MESSAGE.LIST.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearch()" select-on-click=""><div class="helptip-anchor-center"><a id="helptip-message-search-text"></a></div></div></div><div class="padding-top hidden-xs" style="display: block; height: 60px"><div class="pull-left" ng-if="!search.loading"><ng-if ng-if="search.type==\'last\'"><h4>{{ (\'MESSAGE.LIST.LAST_\' + type) | upper | translate}}</h4></ng-if><ng-if ng-if="search.type==\'text\'"><h4 translate="">COMMON.RESULTS_LIST</h4></ng-if></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'plugins/es/templates/message/list.html\'"></ng-include></ion-content><button id="fab-add-message-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-compose visible-xs visible-sm spin" ng-click="showNewMessageModal()"></button></ion-view>'),e.put("plugins/es/templates/message/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>MESSAGE.LIST.POPOVER_ACTIONS.TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-class="{\'gray\': (type != \'inbox\' && !messages.length)}" ng-click="markAllAsRead()"><i class="icon ion-android-checkmark-circle"></i> {{\'COMMON.NOTIFICATIONS.MARK_ALL_AS_READ\' | translate}} </a><a class="item item-icon-left assertive ink" ng-class="{\'gray\': !messages.length}" ng-click="deleteAll()"><i class="icon ion-trash-a"></i> {{\'MESSAGE.LIST.POPOVER_ACTIONS.DELETE_ALL\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/message/modal_compose.html",'<ion-modal-view id="composeMessage" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" ng-if="!isReply" translate>MESSAGE.COMPOSE.TITLE</h1><h1 class="title" ng-if="isReply" translate>MESSAGE.COMPOSE.TITLE_REPLY</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-header-bar><ion-content scroll="true"><ng-include src="::\'plugins/es/templates/message/compose_form.html\'"></ng-include></ion-content></ion-modal-view>'),e.put("plugins/es/templates/message/popover_message.html",""),e.put("plugins/es/templates/message/view_message.html",'<ion-view left-buttons="leftButtons" class="view-message"><ion-nav-title><span translate="">MESSAGE.VIEW.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding"><div class="col no-padding"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list animate-fade-slide-in item-text-wrap"><div class="item item-avatar" ng-class="{\'item-avatar\': formData.avatar}"><i ng-if="!formData.avatar" class="item-image" ng-class="{\'ion-person\': formData.uid, \'ion-email\': !formData.uid}"></i> <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}})"></i><h4>{{type == \'inbox\' ? \'MESSAGE.VIEW.SENDER\': \'MESSAGE.VIEW.RECIPIENT\'|translate}} <a class="positive" ui-sref="app.wot_identity({pubkey: (type == \'inbox\') ? formData.issuer : formData.recipient, uid: formData.name||formData.uid})"><span ng-if="formData.uid"><i class="ion-person"></i> {{formData.name||formData.uid}} </span><span ng-if="!formData.uid" class="gray"><i class="ion-key gray"></i> {{formData.name||(formData.issuer|formatPubkey)}}</span></a></h4><h5 class="gray visible-xs visible-sm"><i class="ion-clock"></i> {{formData.time | formatDate}}</h5></div><ion-item class="visible-xs visible-sm"><h1 class="title" ng-bind-html="formData.title"></h1></ion-item><ion-item><p ng-bind-html="formData.html"></p><div class="padding gray" ng-if="!formData.content" translate="">MESSAGE.VIEW.NO_CONTENT</div></ion-item></div></div></div></ion-content><button id="fab-view-message-reply" class="button button-fab button-fab-bottom-right button-calm icon ion-reply visible-xs visible-sm spin" ng-click="showReplyModal()"></button></ion-view>'),e.put("plugins/es/templates/message/view_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'MESSAGE.VIEW.DELETE\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/network/item_content_peer.html",'<i class="icon ion-android-desktop" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" ng-if=":rebind:!peer.avatar"></i> <b class="icon-secondary ion-person" ng-if=":rebind:!peer.avatar" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" style="left: 26px; top: -3px"></b> <i class="avatar" ng-if=":rebind:peer.avatar" style="background-image: url(\'{{:rebind:peer.avatar.src}}\')"></i> <b class="icon-secondary assertive ion-close-circled" ng-if=":rebind:!peer.online" style="left: 37px; top: -10px"></b><div class="row no-padding"><div class="col no-padding"><h3 class="dark">{{:rebind:peer.dns || peer.server}}</h3><h4><span class="gray" ng-if=":rebind:!peer.name"><i class="ion-key"></i> {{:rebind:peer.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:peer.name"><i class="ion-person"></i> {{:rebind:peer.name}} </span><span class="gray">{{:rebind:peer.dns && (\' | \' + peer.server) + (peer.ep.path||\'\') }}</span></h4></div><div class="col col-20 no-padding text-center" ng-if="::!expertMode && search.type != \'offline\'"><div style="min-width: 50px; padding-top: 5px" ng-if=":rebind:peer.docCount.emailSubscription!==undefined"><span ng-if=":rebind:peer.hasEndpoint(\'ES_SUBSCRIPTION_API\')" title="{{\'ES_PEER.EMAIL_SUBSCRIPTION_COUNT\'|translate: peer.docCount }}"><i class="ion-email"></i> {{:rebind:peer.docCount.emailSubscription || \'?\'}}</span></div></div><div class="col col-20 no-padding text-center" ng-if="::expertMode && search.type != \'offline\'"></div><div class="col col-20 no-padding text-center" id="{{$index === 0 ? helptipPrefix + \'-peer-0-block\' : \'\'}}"><span class="badge badge-stable">{{:rebind:peer.docCount.record !== undefined ? (peer.docCount.record|formatInteger) : \'?\'}} <span ng-if=":rebind:!expertMode && peer.docCount.record!==undefined">{{::\'ES_PEER.DOCUMENTS\'|translate|lowercase }} </span></span><span class="badge badge-secondary" ng-class=":rebind:{\'balanced\': peer.hasMainConsensusBlock, \'energized\': peer.hasConsensusBlock, \'ng-hide\': !peer.currentNumber }" ng-if="::expertMode">{{:rebind:\'BLOCKCHAIN.VIEW.TITLE\'|translate: {number:peer.currentNumber} }}</span></div></div>'),e.put("plugins/es/templates/network/items_peers.html",'<div ng-class="::motion.ionListClass" class="no-padding"><div class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-if="::isHttps && expertMode"><small><i class="icon ion-alert-circled"></i> {{::\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></div><div ng-repeat="peer in :rebind:search.results track by peer.id" class="item item-peer item-icon-left ink" ng-class="::ionItemClass" id="{{helptipPrefix}}-peer-{{$index}}" ng-click="selectPeer(peer)" ng-include="::\'plugins/es/templates/network/item_content_peer.html\'"></div></div>'),e.put("plugins/es/templates/network/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>PEER.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'member\')"><i class="icon ion-person"></i> {{\'PEER.MEMBERS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'member\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'mirror\')"><i class="icon ion-radio-waves"></i> {{\'PEER.MIRRORS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'mirror\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'offline\')"><i class="icon ion-eye-disabled"></i> {{\'PEER.OFFLINE\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'offline\'"></i></a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/network/modal_network.html",'<ion-modal-view id="nodes" class="modal-full-height" cache-view="false"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>PEER.PEER_LIST</h1><div class="buttons buttons-right header-item"><span class="secondary"><button class="button button-clear icon ion-loop button-clear" ng-click="refresh()"></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></span></div></ion-header-bar><ion-content><div class="list"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="!enableFilter || !search.type">{{\'PEER.ALL_PEERS\' | translate}} <span ng-if="!search.loading">({{search.results.length}})</span></h4></div><div class="pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner>&nbsp;</div></div><ng-include src="::\'plugins/es/templates/network/items_peers.html\'"></ng-include></div></ion-content></ion-modal-view>'),e.put("plugins/es/templates/network/popover_endpoints.html",'<ion-popover-view class="popover-endpoints popover-light" style="height: {{(titleKey?30:0)+((!items || items.length &lt;= 1) ? 55 : 3+items.length*52)}}px"><ion-header-bar class="bar bar-header stable-bg" ng-if="titleKey"><div class="title">{{titleKey | translate:titleValues }}</div></ion-header-bar><ion-content scroll="false"><div class="list" ng-class="{\'has-header\': titleKey}"><div class="item item-text-wrap" ng-repeat="item in items"><div class="item-label" ng-if="item.label">{{item.label | translate}}</div><div id="endpoint_{{$index}}" class="badge item-note dark">{{item.value}}</div></div></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/network/popover_network.html",""),e.put("plugins/es/templates/network/popover_peer_info.html",""),e.put("plugins/es/templates/network/view_es_network.html",'<ion-view><ion-nav-title><span translate="">MENU.NETWORK</span>&nbsp; <span translate="">ES_SETTINGS.PLUGIN_NAME</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refresh()"></button></ion-nav-buttons><ion-content scroll="true" ng-init="enableFilter=true; ionItemClass=\'item-border-large\';"><div class="row responsive-sm responsive-md responsive-lg"><div class="col list col-border-right"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && !search.online" translate="">PEER.OFFLINE_PEERS</span> <span ng-if="!enableFilter || search.online" translate="">PEER.ALL_PEERS</span> <span ng-if="search.results.length">({{search.results.length}})</span><ion-spinner ng-if="search.loading" class="icon ion-spinner-small" icon="android"></ion-spinner></h4></div><div class="pull-right"><div class="pull-right" ng-if="enableFilter"><cs-extension-point name="filter-buttons"></cs-extension-point></div></div></div><div id="helptip-network-peers" style="display: block"></div><ng-include src="::\'plugins/es/templates/network/items_peers.html\'"></ng-include></div><div class="col col-33" ng-controller="ESLastDocumentsCtrl"><div class="padding padding-xs" style="display: block"><h4 translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS_DOTS</h4></div><ng-include src="::\'plugins/es/templates/document/list_documents.html\'"></ng-include></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/network/view_es_peer.html",'<ion-view><ion-nav-title><span translate="">PEER.VIEW.TITLE</span>&nbsp; <span translate="">ES_SETTINGS.PLUGIN_NAME</span></ion-nav-title><ion-content><div class="row no-padding"><div class="col list"><ion-item><h1><span translate="">PEER.VIEW.TITLE</span> <span class="gray">{{node.host}}</span></h1><h2 class="gray"><i class="gray icon ion-android-globe"></i> {{node.ep.dns || node.server}} <span class="gray" ng-if="!loading && node.useSsl"><i class="gray ion-locked"></i> <small>SSL</small> </span><span class="gray" ng-if="!loading && node.useTor"><i class="gray ion-bma-tor-api"></i></span></h2><h3><span class="dark"><i class="icon ion-android-desktop"></i> {{\'PEER.VIEW.OWNER\'|translate}} </span><a class="positive" ng-if="node.name" ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.name})"><i class="ion-person"></i> {{node.name}} </a><span ng-if="!loading && !node.name"><a class="gray" ui-sref="app.wot_identity({pubkey: node.pubkey})"><i class="ion-key"></i> {{node.pubkey|formatPubkey}}</a></span></h3><h3><a ng-click="openRawPeering($event)"><i class="icon ion-share"></i> {{\'PEER.VIEW.SHOW_RAW_PEERING\'|translate}} </a><span class="gray" ng-if="!isReachable">| </span><a ng-if="!isReachable" ng-click="openRawCurrentBlock($event)"><i class="icon ion-share"></i> <span translate="">PEER.VIEW.SHOW_RAW_CURRENT_BLOCK</span></a></h3></ion-item><div class="item item-divider" translate="">PEER.VIEW.GENERAL_DIVIDER</div><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{node.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 class="dark text-left">{{node.pubkey}}</h4></ion-item><ion-item class="item item-icon-left item-text-wrap ink" ng-if="isReachable"><i class="icon ion-cube"></i> <span translate="">BLOCKCHAIN.VIEW.TITLE_CURRENT</span><div class="badge badge-calm" ng-if="!loading">{{current.number|formatInteger}}</div></ion-item><ion-item class="item item-icon-left item-text-wrap" ng-if="isReachable"><i class="icon ion-document"></i> <span translate="">ES_PEER.DOCUMENT_COUNT</span><div class="badge badge-stable" ng-if="!loading">{{node.docCount|formatInteger}}</div></ion-item><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.document_search(options.document)"><i class="icon ion-document" style="font-size: 25px"></i> <i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px"></i> <span translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS</span> <i class="gray icon ion-ios-arrow-right"></i></a><cs-extension-point name="general"></cs-extension-point><div class="item item-divider" ng-hide="loading || !isReachable" translate="">PEER.VIEW.KNOWN_PEERS</div><ion-item class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-show="!loading && !isReachable"><small><i class="icon ion-alert-circled"></i> {{\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></ion-item><div class="item center" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div class="list no-padding {{::motion.ionListClass}}" ng-if="isReachable"><div ng-repeat="peer in :rebind:peers track by peer.id" class="item item-peer item-icon-left ink" ng-class="::ionItemClass" ng-click="selectPeer(peer)" ng-include="::\'plugins/es/templates/network/item_content_peer.html\'"></div></div></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/network/view_network_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'network-buttons\'"></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'blockchain-buttons\'"><a class="button button-text button-small ink" ui-sref="app.blockchain_search"><i class="icon ion-android-search"></i> <span>{{\'COMMON.BTN_SEARCH\'|translate}}</span></a></ng-if>'),e.put("plugins/es/templates/notification/list_notification.html",'<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="notification in search.results track by notification.id" class="item-border-large item-text-wrap ink item-avatar" ng-class="{\'unread\': !notification.read}" ng-click="select($event, notification)"><i ng-if="!notification.avatar" class="item-image icon {{::notification.avatarIcon}}"></i> <i ng-if="notification.avatar" class="item-image avatar" style="background-image: url({{::notification.avatar.src}})"></i><h3 trust-as-html="notification.message | translate:(notification.messageParams||notification)"></h3><h4 ng-if="!notification.medianTime"><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.time|formatFromNow}}</span> <span class="gray">| {{notification.time|formatDate}}</span></h4><h4 ng-if="notification.medianTime"><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.medianTime|medianFromNow}}</span> <span class="gray">| {{notification.medianTime|medianDate}}</span></h4></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>'),e.put("plugins/es/templates/notification/popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-disabled="!search.results.length" ng-click="markAllAsRead()"><i class="icon ion-android-checkmark-circle"></i> {{\'COMMON.NOTIFICATIONS.MARK_ALL_AS_READ\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/notification/popover_notification.html",""),e.put("plugins/es/templates/notification/view_notifications.html",'<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'COMMON.NOTIFICATIONS.TITLE\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh(true)"></ion-refresher><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding gray" ng-if="!search.loading && !search.results.length" translate="">COMMON.NOTIFICATIONS.NO_RESULT</div><ng-include src="::\'plugins/es/templates/notification/list_notification.html\'"></ng-include></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/settings/plugin_settings.html",'<ion-view left-buttons="leftButtons" class="settings"><ion-nav-title translate="">ES_SETTINGS.PLUGIN_NAME</ion-nav-title><ion-content scroll="true"><div class="item item-toggle dark"><div class="input-label" translate="">ES_SETTINGS.ENABLE_TOGGLE</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.STORAGE_DIVIDER</span><div class="item item-toggle item-text-wrap dark"><div class="input-label" ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.ENABLE_REMOTE_STORAGE</div><h4 class="gray text-wrap" ng-bind-html="\'ES_SETTINGS.ENABLE_REMOTE_STORAGE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useRemoteStorage" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.NETWORK_SETTINGS</span><ion-item class="ink item-icon-right item-text-wrap visible-xs visible-sm" ng-click="formData.enable && changeEsNode()" ng-disabled="!formData.enable"><div class="input-label" ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.PEER</div><ng-if ng-if="isFallbackNode"><h4 class="gray text-wrap assertive"><b class="ion-alert-circled"></b> <span ng-bind-html="\'SETTINGS.PEER_CHANGED_TEMPORARY\' | translate "></span></h4><div class="badge badge-assertive">{{server}}</div></ng-if><div class="badge" ng-class="{\'badge-balanced\': formData.enable, \'badge-stable\': !formData.enable}" ng-if="!isFallbackNode">{{server}}</div><i class="icon ion-ios-arrow-right"></i></ion-item><span class="item item-divider" translate="">ES_SETTINGS.NOTIFICATIONS.DIVIDER</span><span class="item gray item-text-wrap" translate="">ES_SETTINGS.NOTIFICATIONS.HELP_TEXT</span><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_TX_SENT</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.txSent" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_TX_RECEIVED</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.txReceived" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></label></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_CERT_SENT</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.certSent" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_CERT_RECEIVED</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.certReceived" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><cs-extension-point name="common"></cs-extension-point></ion-content></ion-view>'),e.put("plugins/es/templates/settings/settings_extend.html",'<div class="item item-text-wrap item-icon-right ink" ui-sref="app.es_settings"><div class="input-label ng-binding" translate>ES_SETTINGS.PLUGIN_NAME</div><h4 class="gray" translate>ES_SETTINGS.PLUGIN_NAME_HELP</h4><i class="icon ion-ios-arrow-right"></i></div>'),e.put("plugins/es/templates/registry/edit_record.html",'<ion-view left-buttons="leftButtons" class="view-page"><ion-nav-title><span class="visible-xs" ng-if="id" ng-bind-html="formData.title"></span> <span class="visible-xs" ng-if="!loading && !id" translate="">REGISTRY.EDIT.TITLE_NEW</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-class="{\'ion-android-send\':!id, \'ion-android-done\': id}" ng-click="save()"></button></ion-nav-buttons><ion-content scroll="true"><div class="hero"><div class="content"><i class="avatar" ng-class="avatarClass" ng-style="avatarStyle"><button class="button button-positive button-large button-clear flat icon ion-camera visible-xs visible-sm" style="display: inline-block" ng-click="showAvatarModal()"></button> <button ng-if="avatar.src" class="button button-positive button-large button-clear flat visible-xs visible-sm" style="display: inline-block; left: 85px; bottom:15px" ng-click="rotateAvatar()"><i class="icon-secondary ion-image" style="left: 24px; top: 3px; font-size: 24px"></i> <i class="icon-secondary ion-forward" style="left: 26px; top: -13px"></i></button></i><h3 class="dark"><span ng-if="!loading && formData.title">{{formData.title}}</span> <span ng-if="!loading && !id && !formData.title" translate="">REGISTRY.EDIT.TITLE_NEW</span></h3><h4 class="dark"><ion-spinner ng-if="loading" icon="android"></ion-spinner></h4></div></div><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><form name="recordForm" novalidate="" ng-submit="save()"><div class="list {{::motion.ionListClass}}" ng-init="setForm(recordForm)"><div class="item" ng-if="id"><h4 class="gray"><i class="icon ion-calendar"></i> {{\'COMMON.LAST_MODIFICATION_DATE\'|translate}}&nbsp;{{formData.time | formatDate}}</h4><div class="badge badge-balanced badge-editable" ng-click="showRecordTypeModal()">{{\'REGISTRY.TYPE.ENUM.\'+formData.type|upper|translate}}</div></div><ng-include src="::\'plugins/es/templates/common/edit_pictures.html\'"></ng-include><div class="item item-divider" translate="">REGISTRY.GENERAL_DIVIDER</div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_TITLE</span> <input type="text" placeholder="{{\'REGISTRY.EDIT.RECORD_TITLE_HELP\'|translate}}" name="title" id="registry-record-title" ng-model="formData.title" ng-minlength="3" ng-required="true"></div><div class="form-errors" ng-if="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-input item-floating-label"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_DESCRIPTION</span><textarea placeholder="{{\'REGISTRY.EDIT.RECORD_DESCRIPTION_HELP\'|translate}}" ng-model="formData.description" rows="8" cols="10">\n                </textarea></div><div class="item item-icon-right ink" ng-if="loading || formData.type===\'company\' || formData.type===\'shop\'" ng-class="{\'item-input-error\': form.$submitted && !formData.category.id, \'done in\': !loading}" ng-click="showCategoryModal()"><span translate="">REGISTRY.CATEGORY</span> <span class="badge badge-royal">{{formData.category.name | formatCategory}}</span>&nbsp; <i class="gray icon ion-ios-arrow-right"></i></div><input type="hidden" name="category" ng-model="formData.category.id" required-if="formData.type==\'company\' || formData.type==\'shop\'"><div class="form-errors" ng-if="form.$submitted && form.category.$error" ng-messages="form.category.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ng-include src="::\'plugins/es/templates/common/edit_position.html\'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include><div class="item item-divider" translate="">REGISTRY.TECHNICAL_DIVIDER</div><div class="item item-input item-floating-label"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_PUBKEY</span> <input type="text" placeholder="{{\'REGISTRY.EDIT.RECORD_PUBKEY_HELP\'|translate}}" ng-model="formData.pubkey"></div></div></form></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/registry/lookup_form.html",'<form ng-submit="doSearch()"><div class="item no-padding"><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'REGISTRY.SEARCH.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearchText()" select-on-click=""></div></div><ng-include src="::\'plugins/es/templates/common/item_location_search.html\'" ng-if="entered && options.location.show && (!search.geoPoint || smallscreen)" ng-controller="ESSearchPositionItemCtrl"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_form_options.html\'"></ng-include></form><div class="padding-top padding-xs padding-sm" style="display: block; height: 60px"><div class="pull-left ng-hide" ng-show="!search.loading && search.results"><ng-if ng-if="search.lastRecords"><h4 translate="">REGISTRY.SEARCH.LAST_RECORDS</h4><small class="gray no-padding" ng-if="search.total"><span ng-if="search.geoPoint && search.total">{{\'REGISTRY.SEARCH.LAST_RECORD_COUNT_LOCATION\'|translate:{count: search.total, location: search.location} }}</span> <span ng-if="!search.geoPoint && search.total">{{\'REGISTRY.SEARCH.LAST_RECORD_COUNT\'|translate:{count: search.total} }}</span></small></ng-if><ng-if ng-if="!search.lastRecords"><h4 translate="">COMMON.RESULTS_LIST</h4><small class="gray no-padding" ng-if="search.total"><span ng-if="search.geoPoint && search.total">{{\'REGISTRY.SEARCH.RESULT_COUNT_LOCATION\'|translate:{count: search.total, location: search.location} }}</span> <span ng-if="!search.geoPoint && search.total">{{\'REGISTRY.SEARCH.RESULT_COUNT\'|translate:{count: search.total} }}</span></small></ng-if></div></div><div class="center" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding assertive" ng-if="!search.loading && search.results.length===0" translate="">COMMON.SEARCH_NO_RESULT</div>'),e.put("plugins/es/templates/registry/lookup_form_options.html",'<div class="item item-icon-left item-input item-select stable-bg" ng-if="search.advanced && options.location.show"><i class="icon ion-arrow-resize gray"></i> <span class="input-label item-icon-left-padding" translate="">LOCATION.DISTANCE</span><label><select ng-model="search.geoDistance" class="col-border-left" ng-options="i as (geoDistanceLabels[i].labelKey | translate:geoDistanceLabels[i].labelParams ) for i in geoDistances track by i"></select></label></div>'),e.put("plugins/es/templates/registry/lookup_lg.html",'<ion-view left-buttons="leftButtons"><ion-nav-title>{{\'REGISTRY.SEARCH.TITLE\' | translate}}</ion-nav-title><ion-content class="lookupForm padding no-padding-xs no-padding-sm"><ng-include src="::\'plugins/es/templates/wot/lookup_lg_extend.html\'" ng-init="enable= true; showNewPageButton=true;"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_form.html\'"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_list_lg.html\'"></ng-include></ion-content><button id="fab-add-registry-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg spin" ng-click="showNewPageModal()"></button></ion-view>'),e.put("plugins/es/templates/registry/lookup_list.html",'<ion-list class="{{::motion.ionListClass}}" ng-if="!search.loading && search.results"><div class="item item-avatar item-icon-right item-border-large ink" ng-repeat="item in search.results" ui-sref="app.view_page({id: item.id, title: item.urlTitle})"><i ng-if="::!item.avatar" class="item-image icon cion-page-{{::item.type}}"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html="::item.title"></h2><h4><span class="dark" ng-if="::item.city"><b class="ion-location"></b> <span ng-bind-html="::item.city"></span> </span><span class="gray" ng-if="::item.distance">({{::item.distance|formatDecimal}} {{::geoUnit}})</span></h4><h4 class="gray" ng-if="::item.time && search.lastRecords"><i class="ion-clock"></i> {{::item.time | formatFromNow}}</h4><h4 class="gray" ng-if="!search.lastRecords"><i class="cion-page-{{::item.type}}"></i> <span ng-if="item.category">{{::item.category.name}}</span> <span ng-if="!item.category">{{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</span></h4><i class="icon ion-ios-arrow-right"></i></div></ion-list>'),e.put("plugins/es/templates/registry/lookup_list_lg.html",'<div class="list {{::motion.ionListClass}}" ng-if="!search.loading && search.results && search.results.length > 0"><a ng-repeat="item in search.results" class="item item-record item-border-large ink padding-xs" ui-sref="app.view_page({id: item.id, title: item.urlTitle})"><div class="row row-record"><div class="col item-text-wrap item-avatar-left-padding" ng-class="::{\'item-avatar\': item.avatar || item.type}"><i class="item-image icon cion-page-{{::item.type}}" ng-if="::!item.avatar"></i> <i class="item-image avatar" style="background-image: url({{::item.avatar.src}})" ng-if="::item.avatar"></i><h2 ng-bind-html="::item.title"></h2><h4><span class="dark" ng-if="::item.city"><b class="ion-location"></b> <span ng-bind-html="::item.city"></span> </span><span class="gray" ng-if="::item.distance">({{::item.distance|formatDecimal}} {{::geoUnit}})</span></h4><h4><span class="gray" ng-if="::item.time && search.lastRecords"><b class="ion-clock"></b> {{::item.time | formatFromNow}} </span><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4><span ng-if="::item.picturesCount > 1" class="badge badge-balanced badge-picture-count">{{::item.picturesCount}}&nbsp;<i class="icon ion-camera"></i></span></div><div class="col hidden-xs"><h4 class="text-wrap"><span class="visible-sm"><b class="ion-flag"></b><ng-if ng-if="::item.category">{{::item.category.name|truncText:50}}</ng-if><ng-if ng-if="::!item.category">{{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</ng-if></span><span class="gray text-italic" ng-if="::item.description"><b class="ion-quote"></b> <span ng-bind-html="::item.description|truncText:500" ng-if="::item.description"></span></span></h4></div></div></a></div><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="10%"></ion-infinite-scroll>'),e.put("plugins/es/templates/registry/lookup_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="showNewPageModal();"><i class="icon ion-plus"></i> <span translate>REGISTRY.BTN_NEW</span></a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/registry/lookup_popover_filters.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="doGetLastRecords()"><i class="icon ion-clock"></i> {{\'REGISTRY.SEARCH.BTN_LAST_RECORDS\' | translate}} </a><a class="item item-icon-left ink" ng-click="toggleAdvanced();"><i class="icon ion-android-checkbox-outline-blank" ng-show="!search.advanced"></i> <i class="icon ion-android-checkbox-outline" ng-show="search.advanced"></i> <span translate>REGISTRY.SEARCH.POPOVER_FILTERS.BTN_ADVANCED_SEARCH</span></a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/registry/modal_record_type.html",'<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>{{getParameters().title||\'REGISTRY.TYPE.TITLE\'|translate}}</h1></ion-header-bar><ion-content class="lookupForm"><div class="list padding"><h3 translate>REGISTRY.TYPE.SELECT_TYPE</h3><button class="button button-block button-stable icon-left cion-page-shop" ng-click="closeModal(\'shop\')" translate>REGISTRY.TYPE.ENUM.SHOP</button> <button class="button button-block button-stable icon-left cion-page-association" ng-click="closeModal(\'association\')" translate>REGISTRY.TYPE.ENUM.ASSOCIATION</button> <button class="button button-block button-stable icon-left cion-page-company" ng-click="closeModal(\'company\')" translate>REGISTRY.TYPE.ENUM.COMPANY</button> <button class="button button-block button-stable icon-left cion-page-institution" ng-click="closeModal(\'institution\')" translate>REGISTRY.TYPE.ENUM.INSTITUTION</button></div></ion-content></ion-modal-view>'),e.put("plugins/es/templates/registry/view_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>REGISTRY.VIEW.MENU_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left assertive ink visible-xs visible-sm" ng-if="canEdit" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'COMMON.BTN_DELETE\' | translate}}</a><ng-if ng-if="!canEdit && likeData.abuses"><button class="item item-icon-left ink" ng-disabled="!!likeData.abuses.wasHitCount" ng-class="{\'gray\': !!likeData.abuses.wasHitCount}" ng-click="hideActionsPopover() && reportAbuse($event)"><i class="icon ion-android-warning"></i> {{\'COMMON.BTN_REPORT_ABUSE_DOTS\' | translate}}</button></ng-if></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/registry/view_record.html",'<ion-view left-buttons="leftButtons" class="view-page"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-bar button-icon button-clear visible-xs visible-sm" ng-click="edit()" ng-if="canEdit"><i class="icon ion-android-create"></i></button> <button class="button button-bar button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="refresher-top-bg"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="load()"></ion-refresher><div class="hero"><div class="content" ng-if="!loading"><i class="avatar cion-page-{{formData.type}}" ng-if="!formData.avatar"></i> <i class="avatar" ng-style="{{avatarStyle}}" ng-if="formData.avatar"></i><h3><span class="dark" ng-bind-html="formData.title"></span></h3><h4 class="gray"><small ng-include="::\'plugins/es/templates/common/view_likes.html\'"></small></h4></div><h4 class="content dark" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><div class="visible-xs visible-sm"><button class="button button-fab button-fab-top-right button-stable" ng-click="toggleLike($event)"><i class="icon ion-heart" ng-class="{\'gray\': !likeData.likes.wasHitCount, \'calm\': likeData.likes.wasHitCount}"></i></button></div><div class="row no-padding-xs no-padding-sm"><div class="col list animate-fade-slide-in item-text-wrap no-padding-xs no-padding-sm"><div class="item"><h2 class="gray"><a ng-if="formData.city" ui-sref="app.wot_lookup.tab_registry({location:formData.city})"><i class="icon ion-location"></i> <span ng-bind-html="formData.city"></span> </a><span ng-if="formData.city && formData.type">&nbsp;|&nbsp;</span> <a ng-if="formData.type" ui-sref="app.wot_lookup.tab_registry({type:formData.type})"><i class="cion-page-{{formData.type}}"></i> {{\'REGISTRY.TYPE.ENUM.\'+formData.type|upper|translate}}</a></h2><h4><i class="icon ion-clock" ng-if="formData.time"></i> <span translate="">COMMON.SUBMIT_BY</span> <a ng-class="{\'positive\': issuer.uid, \'gray\': !issuer.uid}" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"><ng-if ng-if="issuer.uid"><i class="icon ion-person"></i> {{::issuer.name||issuer.uid}}</ng-if><span ng-if="!issuer.uid"><i class="icon ion-key"></i> {{issuer.pubkey|formatPubkey}} </span></a><span>{{formData.time|formatFromNow}}<h4 class="gray hidden-xs">| {{formData.time | formatDate}}</h4></span></h4></div><a id="registry-share-anchor-{{id}}"></a><div class="item"><h2 trust-as-html="formData.description"></h2></div><div class="item" ng-if="formData.category || formData.address"><h4 ng-if="formData.category"><span class="gray" translate="">REGISTRY.VIEW.CATEGORY</span> <a class="positive" ng-if="formData.category" ui-sref="app.wot_lookup.tab_registry({category:formData.category.id})"><span ng-bind-html="formData.category.name"></span></a></h4><h4 ng-if="formData.address"><span class="gray" translate="">REGISTRY.VIEW.LOCATION</span> <a class="positive" target="_system" href="https://www.openstreetmap.org/search?query={{formData.address}},%20{{formData.city}}"><span ng-bind-html="formData.address"></span> <span ng-if="formData.city">- </span><span ng-bind-html="formData.city"></span></a></h4></div><ng-if ng-if="formData.socials && formData.socials.length>0"><div class="item item-icon-left" type="no-padding item-text-wrap" ng-repeat="social in formData.socials track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}}</p><h2><a ng-click="openLink($event, social.url, social.type)">{{social.url}}</a></h2></div></ng-if><div class="item item-icon-left item-text-wrap ink" ng-if="formData.pubkey" copy-on-click="{{::formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">REGISTRY.EDIT.RECORD_PUBKEY</span><h4 class="dark">{{::formData.pubkey}}</h4></div><div class="lazy-load"><ng-include src="::\'plugins/es/templates/common/view_pictures.html\'"></ng-include><ng-include src="::\'plugins/es/templates/common/view_comments.html\'"></ng-include></div></div></div></ion-content><button class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm" ng-if="formData.pubkey && !isUserPubkey(formData.pubkey)" ng-click="showTransferModal({pubkey: formData.pubkey, uid: formData.title})"></button></ion-view>'),e.put("plugins/es/templates/registry/view_wallet_pages.html",'<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'REGISTRY.MY_PAGES\' | translate}}</ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate()"></ion-refresher><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!search.loading && !search.results.length" translate="">REGISTRY.NO_PAGE</div><ng-include src="::\'plugins/es/templates/registry/lookup_list.html\'"></ng-include></ion-content><button id="fab-wallet-add-registry-record" class="button button-fab button-fab-bottom-right button-assertive hidden-md hidden-lg spin" ng-click="showNewPageModal()"><i class="icon ion-plus"></i></button></ion-view>'),e.put("plugins/es/templates/subscription/edit_subscriptions.html",'<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'SUBSCRIPTION.EDIT.TITLE\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="load()"></ion-refresher><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!search.loading && !search.results.length" translate="">SUBSCRIPTION.NO_SUBSCRIPTION</div><div class="row no-padding"><div class="col list {{::motion.ionListClass}} item-border-large"><ng-repeat ng-repeat="subscriptions in search.results | filter: { type: \'email\' }" ng-include="\'plugins/es/templates/subscription/item_\' + subscriptions.type.toLowerCase() + \'_subscription.html\'">></ng-repeat></div></div></ion-content><button id="fab-add-subscription-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg spin" ng-click="addSubscription()"></button></ion-view>'),e.put("plugins/es/templates/subscription/item_email_subscription.html",'<div class="item item-avatar"><i class="item-image icon ion-email"></i><h3>{{\'SUBSCRIPTION.TYPE.ENUM.\' + subscriptions.type.toUpperCase() | translate}}</h3><h4 class="gray">{{\'SUBSCRIPTION.EDIT.PROVIDER\'|translate}} <a ui-sref="app.wot_identity({pubkey: subscriptions.recipient, uid: subscriptions.uid})"><span ng-class="{\'positive\': subscriptions.uid, \'dark\': !subscriptions.uid}" ng-if="subscriptions.name||subscriptions.uid"><i class="ion-person" ng-if="subscriptions.uid"></i> {{subscriptions.name||subscriptions.uid}} </span><span class="gray" ng-if="!subscriptions.uid"><i class="ion-key"></i> {{subscriptions.recipient | formatPubkey}}</span></a></h4><div class="item-note text-right"><span ng-repeat="item in subscriptions.items">{{item.content.email}} <a class="ion-trash-a gray padding-left" ng-click="deleteSubscription(item)"></a> <a class="ion-edit gray padding-left" ng-click="editSubscription(item)"></a><br></span></div></div>'),e.put("plugins/es/templates/subscription/modal_email.html",'<ion-modal-view id="composeMessage" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>SUBSCRIPTION.MODAL_EMAIL.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSubmit()"></button></ion-header-bar><ion-content scroll="true"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate>SUBSCRIPTION.MODAL_EMAIL.HELP</h4></div><form name="subscriptionForm" novalidate="" ng-submit="doSubmit()"><div class="list" ng-init="setForm(subscriptionForm)"><label class="item item-input" ng-class="{\'item-input-error\': form.$submitted && (form.email.$invalid || form.email.$error)}"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.EMAIL_LABEL</span> <input name="email" type="text" placeholder="{{\'SUBSCRIPTION.MODAL_EMAIL.EMAIL_HELP\' | translate}}" ng-model="formData.content.email" ng-minlength="3" required email></label><div class="form-errors" ng-if="form.$submitted && (form.email.$invalid || form.email.$error)" ng-messages="form.email.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div><div class="form-error" ng-message="email"><span translate="ERROR.FIELD_NOT_EMAIL"></span></div></div><label class="item item-input item-select" ng-class="{\'item-input-error\': form.$submitted && !formData.content.frequency}"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_LABEL</span><select name="frequency" ng-model="formData.content.frequency" style="height: 46px;margin-top: 1px"><option value="weekly" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_WEEKLY</option><option value="daily" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_DAILY</option></select></label><div class="form-errors" ng-if="form.$submitted && !formData.content.frequency"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><a class="item item-input item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.recipient}" ng-click="showNetworkLookup()" style="height: 67px"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.PROVIDER</span> <span class="badge animate-fade-in animate-show-hide ng-hide" ng-class="{\'badge-royal\': recipient.uid, \'badge-stable\': !recipient.uid}" ng-show="recipient && (recipient.name||recipient.uid)"><i class="ion-person" ng-if="recipient.uid"></i> {{recipient.name||recipient.uid}} </span><span class="badge badge-secondary animate-fade-in animate-show-hide ng-hide" ng-show="formData.recipient"><i class="ion-key"></i> {{formData.recipient | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !formData.recipient"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="cancel()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" type="submit">{{\'COMMON.BTN_ADD\' | translate}}</button></div></form></ion-content></ion-modal-view>'),e.put("plugins/es/templates/user/edit_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-click="removeProfile()"><i class="icon ion-trash-a"></i> {{\'PROFILE.BTN_DELETE\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/user/edit_profile.html",'<ion-view left-buttons="leftButtons"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear button-assertive ion-trash-a visible-xs visible-sm" ng-click="removeProfile()" ng-if="existing"></button> <button class="button button-icon button-clear ion-android-done visible-xs visible-sm" ng-click="submitAndSaveAndClose()"></button></ion-nav-buttons><ion-content scroll="true"><div class="positive-900-bg hero"><div class="content"><i class="avatar" ng-style="avatarStyle" ng-class="{\'avatar-wallet\': !loading && !avatar && walletData && !walletData.isMember, \'avatar-member\': !loading && !avatar && walletData.isMember}"><button class="button button-positive button-large button-clear flat icon ion-camera visible-xs visible-sm" style="display: inline-block" ng-click="showAvatarModal()"></button> <button ng-if="avatar.src" class="button button-positive button-large button-clear flat visible-xs visible-sm" style="display: inline-block; left: 85px; bottom:15px" ng-click="rotateAvatar()"><i class="icon-secondary ion-image" style="left: 24px; top: 3px; font-size: 24px"></i> <i class="icon-secondary ion-forward" style="left: 26px; top: -13px"></i></button></i><h3 class="light"><ng-if ng-if="!loading && !formData.title && walletData && walletData.isMember">{{walletData.uid}}</ng-if><ng-if ng-if="!loading && !formData.title && walletData && !walletData.isMember">{{::walletData.pubkey | formatPubkey}}</ng-if><ng-if ng-if="!loading && formData.title">{{formData.title}}</ng-if></h3><h4 class="light"><ion-spinner ng-if="loading" icon="android"></ion-spinner></h4></div></div><div class="row no-padding"><div class="col"><form name="profileForm" novalidate="" ng-submit="saveAndClose()"><div class="list item-text-wrap {{::motion.ionListClass}}" ng-init="setForm(profileForm)"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate="">PROFILE.HELP.WARNING_PUBLIC_DATA</h4></div><div class="item item-divider" translate="">PROFILE.GENERAL_DIVIDER</div><ion-item class="item-input item-floating-label item-button-right" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label">{{\'PROFILE.TITLE\' | translate}}</span> <input type="text" name="title" placeholder="{{\'PROFILE.TITLE_HELP\' | translate}}" id="profile-name" ng-model="formData.title" ng-model-options="{ debounce: 350 }" ng-maxlength="50" required></ion-item><div class="form-errors" ng-show="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG_WITH_LENGTH" translate-values="{maxLength: 50}"></span></div></div><ion-item class="item-input item-floating-label item-button-right"><span class="input-label" style="width: 100%">{{\'PROFILE.DESCRIPTION\' | translate}}</span><textarea placeholder="{{\'PROFILE.DESCRIPTION_HELP\' | translate}}" ng-model="formData.description" ng-model-options="{ debounce: 350 }" rows="4" cols="10">\n              </textarea></ion-item><ng-include src="::\'plugins/es/templates/common/edit_position.html\'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include></div><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include><div class="list item-text-wrap {{::motion.ionListClass}}"><div class="item item-divider" translate="">PROFILE.TECHNICAL_DIVIDER</div><ion-item class="item-icon-left" ng-if="walletData && walletData.uid"><span translate="">COMMON.UID</span> <span class="badge badge-stable">{{::walletData.uid}}</span></ion-item><ion-item class="item-icon-left item-icon-right item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click=""><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><p class="gray">{{walletData.pubkey}}</p></ion-item></div></form></div></div></ion-content></ion-view>'),e.put("plugins/es/templates/user/items_profile.html",'<div ng-if="!formData.profile" class="item gray" translate>PROFILE.NO_PROFILE_DEFINED</div><div class="item" ng-if="formData.profile && formData.name && showName"><span class="gray" translate>PROFILE.TITLE</span><h3>{{formData.name}}</h3></div><div class="item item-text-wrap" ng-if="formData.profile.descriptionHtml"><span class="gray" translate>PROFILE.DESCRIPTION</span><h3 trust-as-html="formData.profile.descriptionHtml"></h3></div><div class="item" ng-if="formData.profile && (formData.profile.address || formData.profile.city)" copy-on-click="{{formData.profile.address ? formData.profile.address + \'&#10;\' : \'\'}}{{formData.profile.city}}"><span class="gray" translate>LOCATION.LOCATION_DIVIDER</span><h3><span class="text-keep-lines" ng-if="formData.profile.address">{{formData.profile.address}}<br></span>{{formData.profile.city}}</h3></div><div class="item" ng-if="formData.profile && formData.profile.socials && formData.profile.socials.length" ng-controller="ESSocialsViewCtrl"><span class="gray" translate>PROFILE.SOCIAL_NETWORKS_DIVIDER</span><div class="list no-padding"><ion-item ng-repeat="social in formData.profile.socials | filter:filterFn track by social.url " id="social-{{::social.url|formatSlug}}" class="item-icon-left item-text-wrap no-padding-bottom ink" on-tap="openSocial($event, social)"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\', \'ion-iphone\': social.type == \'phone\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}} <i class="ion-locked" ng-if="social.recipient"></i></p><h4><a on-tap="openSocial($event, social)" href="{{::social.url}}" target="_blank">{{::social.url}}</a></h4></ion-item></div></div>'),e.put("plugins/es/templates/wallet/item_wallet_extend.html",'<h4 class="dark" ng-if=":state:enable && wallet.id!=\'default\'"><a ng-if="walletData.invitations.unreadCount"><i class="dark ion-person-stalker"></i> {{walletData.invitations.unreadCount}} </a><a ng-if="walletData.messages.unreadCount" ui-sref="app.user_messages_by_id.tab_inbox({id: wallet.id})"><i class="dark ion-email"></i> {{walletData.messages.unreadCount}} </a><a ng-if="walletData.notifications.unreadCount" ui-sref="app.view_notifications_by_id({id: wallet.id})"><i class="dark ion-android-notifications"></i> {{walletData.notifications.unreadCount}}</a></h4>'),e.put("plugins/es/templates/wallet/view_wallet_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'hero\'"><small class="light" style="display: inline-block" ng-include="::\'plugins/es/templates/common/view_likes.html\'" ng-init="canEdit=true"></small></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-general\'"><div class="item item-divider item-divider-top-border"><span>{{\'PROFILE.PROFILE_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showProfileHelp=!showProfileHelp" class="icon positive ion-ios-help-outline" title="{{\'PROFILE.PROFILE_DIVIDER_HELP\' | translate}}"></i> </span><a class="badge button button-text button-small button-small-padding" ng-if="isDefaultWallet" ui-sref="app.edit_profile"><i class="icon ion-edit"></i> <span ng-if="!formData.profile" translate>PROFILE.BTN_ADD</span> <span ng-if="formData.profile" translate>PROFILE.BTN_EDIT</span> </a><a class="badge button button-text button-small button-small-padding" ng-if="!isDefaultWallet" ui-sref="app.edit_profile_by_id({id: walletId})"><i class="icon ion-edit"></i> <span ng-if="!formData.profile" translate>PROFILE.BTN_ADD</span> <span ng-if="formData.profile" translate>PROFILE.BTN_EDIT</span></a></div><div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showProfileHelp"><small trust-as-html="\'PROFILE.PROFILE_DIVIDER_HELP\'|translate"></small></div><ng-include src="::\'plugins/es/templates/user/items_profile.html\'" ng-init="showName=true"></ng-include><div class="item item-divider item-divider-top-border"><span>{{\'SUBSCRIPTION.SUBSCRIPTION_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showSubscriptionHelp=!showSubscriptionHelp" class="icon positive ion-ios-help-outline" title="{{\'SUBSCRIPTION.SUBSCRIPTION_DIVIDER_HELP\' | translate}}"></i> <span><a class="badge button button-text button-small button-small-padding" ng-if="!formData.subscriptions.count && isDefaultWallet" ui-sref="app.edit_subscriptions"><i class="icon ion-edit"></i> <span translate>SUBSCRIPTION.BTN_ADD</span> </a><a class="badge button button-text button-small button-small-padding" ng-if="!formData.subscriptions.count && !isDefaultWallet" ui-sref="app.edit_subscriptions_by_id({id: walletId})"><i class="icon ion-edit"></i> <span translate>SUBSCRIPTION.BTN_ADD</span></a></span></span></div><div class="item item-text-wrap positive item-small-height" ng-show="showSubscriptionHelp"><small translate>SUBSCRIPTION.SUBSCRIPTION_DIVIDER_HELP</small></div><div ng-if="!formData.subscriptions.count" class="item gray" translate>SUBSCRIPTION.NO_SUBSCRIPTION</div><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.subscriptions.count && isDefaultWallet" ui-sref="app.edit_subscriptions"><i class="icon ion-gear-a"></i> <span translate>SUBSCRIPTION.SUBSCRIPTION_COUNT</span> <span class="badge badge-calm">{{formData.subscriptions.count}}</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.subscriptions.count && !isDefaultWallet" ui-sref="app.edit_subscriptions_by_id({id: walletId})"><i class="icon ion-gear-a"></i> <span translate>SUBSCRIPTION.SUBSCRIPTION_COUNT</span> <span class="badge badge-calm">{{formData.subscriptions.count}}</span> <i class="gray icon ion-ios-arrow-right"></i></a><div class="item item-divider item-divider-top-border"><span>{{\'REGISTRY.WALLET.PAGE_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showPagesHelp=!showPagesHelp" class="icon positive ion-ios-help-outline" title="{{\'REGISTRY.WALLET.PAGE_DIVIDER_HELP\' | translate}}"></i> <span><a class="badge button button-text button-small button-small-padding" ng-if="!formData.pages.count" ng-click="showNewPageModal($event)"><i class="icon ion-edit"></i> <span translate>REGISTRY.BTN_NEW</span></a></span></span></div><div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showPagesHelp"><small trust-as-html="\'REGISTRY.WALLET.PAGE_DIVIDER_HELP\'|translate"></small></div><div ng-if="!formData.pages.count" class="item gray" translate>REGISTRY.NO_PAGE</div><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.pages.count && isDefaultWallet" ui-sref="app.wallet_pages"><i class="icon ion-social-buffer"></i> <span translate>REGISTRY.MY_PAGES</span> <span class="badge badge-calm">{{formData.pages.count}}</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.pages.count && !isDefaultWallet" ui-sref="app.wallet_pages_by_id({id: walletId})"><i class="icon ion-social-buffer"></i> <span translate>REGISTRY.MY_PAGES</span> <span class="badge badge-calm">{{formData.pages.count}}</span> <i class="gray icon ion-ios-arrow-right"></i></a></ng-if>'),e.put("plugins/es/templates/wot/lookup_extend.html",'<ion-tab ng-if=":state:enable" title="{{\'MENU.REGISTRY\'|translate}}" icon="ion-social-buffer" ui-sref="app.wot_lookup.tab_registry"><ion-nav-view name="tab_registry"></ion-nav-view></ion-tab>'),e.put("plugins/es/templates/wot/lookup_item_group.html",'<i ng-if="::!item.avatar" class="item-image icon ion-android-people"></i> <i ng-if="::!item.avatar" class="item-image icon-secondary ion-android-lock" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html=":rebind:item.name"></h2><h4 class="gray"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: item }}</h4><h4 class="dark pull-left" ng-if=":rebind:item.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:item.membersCount}}</span></h4><h4 class="dark"><span class="dark" ng-if="::item.description"><i class="ion-quote"></i> {{::item.description|truncText}}</span></h4><h4 ng-if="::item.tags"><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>'),e.put("plugins/es/templates/wot/lookup_item_page.html",'<i ng-if="::!item.avatar" class="item-image icon cion-page-{{item.type}}"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html=":rebind:item.name"></h2><h4 class="gray"><span class="gray" ng-if="::item.city"><i class="ion-location"></i> {{::item.city|truncText}} </span><span ng-if="::item.city && item.type">|</span> <span ng-if="item.type"><i class="cion-page-{{item.type}}"></i> {{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</span></h4><h4 class="dark"><span class="dark" ng-if="::item.description"><i class="ion-quote"></i> {{::item.description|truncText}}</span></h4><h4 ng-if="::item.tags"><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>'),e.put("plugins/es/templates/wot/lookup_lg_extend.html",'<div class="buttons-tabs" ng-if=":state:enable"><div class="pull-right"><div class="button button-tab dark" title="{{\'REGISTRY.BTN_SHOW_WOT_HELP\' | translate}}" nav-transition="none" active-link="active" active-link-path-prefix="#/app/wot/lg" ui-sref="app.wot_lookup_lg"><i class="icon ion-person-stalker"></i> {{\'REGISTRY.BTN_SHOW_WOT\' | translate}}</div><a class="button button-tab ink dark" title="{{\'REGISTRY.BTN_SHOW_PAGES_HELP\' | translate}}" nav-transition="none" active-link="active" active-link-path-prefix="#/app/wot/page" ui-sref="app.registry_lookup_lg"><i class="icon ion-social-buffer"></i> {{\'REGISTRY.BTN_SHOW_PAGES\' | translate}}</a></div><div class="pull-right" ng-if="showNewPageButton">&nbsp;</div></div>'),e.put("plugins/es/templates/wot/popover_certification_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-if="canCertify" ng-click="certify()"><i class="icon ion-ribbon-b"></i> {{\'WOT.BTN_CERTIFY\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isUserPubkey(formData.pubkey) && formData.isMember" ng-click="askCertification()"><i class="icon-secondary ion-ribbon-b" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 35px; top: 0px"></b> {{\'WOT.BTN_ASK_CERTIFICATION\' | translate}} </a><a class="item item-icon-left ink" ng-if="isUserPubkey(formData.pubkey)" ng-click="showAskCertificationModal()"><i class="icon-secondary ion-ribbon-b" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 35px; top: 0px"></b> {{\'WOT.BTN_ASK_CERTIFICATIONS_DOTS\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isUserPubkey(formData.pubkey)" ng-click="showSuggestCertificationModal()"><i class="icon-secondary ion-person-stalker" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 37px; top: -4px"></b> {{\'WOT.BTN_SUGGEST_CERTIFICATIONS_DOTS\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/es/templates/wot/view_certifications_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'nav-buttons\'"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showCertificationActionsPopover($event)"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons\'"><button class="button button-stable button-small-padding icon ion-android-more-vertical" ng-click="showCertificationActionsPopover($event)" title="{{\'COMMON.POPOVER_ACTIONS_TITLE\' | translate}}"></button></ng-if>'),e.put("plugins/es/templates/wot/view_identity_extend.html",'<ng-if ng-if=":state:enable && extensionPoint === \'hero\'"><small class="light" style="display: inline-block" ng-include="::\'plugins/es/templates/common/view_likes.html\'"></small></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons-top-fab\'"><button id="fab-compose-{{:rebind:formData.pubkey}}" class="button button-fab button-fab-top-left button-fab-hero mini button-stable spin" style="left: 88px" ng-click="showNewMessageModal()"><i class="icon ion-compose"></i></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons\'"><button class="button button-stable button-small-padding icon ion-compose" ng-disabled="loading" ng-click="showNewMessageModal()" title="{{\'MESSAGE.BTN_WRITE\' | translate}}"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-buttons\'"><button class="button button-stable button-small-padding icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-general\'"><span class="item item-divider item-divider-top-border"><span>{{\'PROFILE.PROFILE_DIVIDER\' | translate}} <a style="font-size: 12pt; cursor: pointer" ng-click="showProfileHelp=!showProfileHelp" class="icon positive ion-ios-help-outline ink" title="{{\'PROFILE.PROFILE_DIVIDER_HELP\' | translate}}"></a></span></span><div class="item item-text-wrap positive item-small-height" ng-show="showProfileHelp"><small translate>PROFILE.PROFILE_DIVIDER_HELP</small></div><ng-include src="::\'plugins/es/templates/user/items_profile.html\'" ng-init="showName=false;"></ng-include></ng-if>'),e.put("plugins/es/templates/wot/view_popover_actions.html",'<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left assertive ink" ng-if="canDelete" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'COMMON.BTN_DELETE\' | translate}} </a><a class="item item-icon-left ink" ng-if="!canEdit && likeData.likes" ng-click="hideActionsPopover() && toggleLike($event)"><i class="icon" ng-class="{\'ion-heart-broken\': likeData.likes.wasHit, \'ion-heart\': !likeData.likes.wasHit}"></i> {{(likeData.likes.wasHit ? \'COMMON.BTN_LIKE_REMOVE\' : \'COMMON.BTN_LIKE\' )| translate}} </a><a class="item item-icon-left ink" ng-if="!canEdit && likeData.abuses" ng-disabled="!!likeData.abuses.wasHitCount" ng-class="{\'gray\': !!likeData.abuses.wasHitCount}" ng-click="hideActionsPopover() && reportAbuse($event)"><i class="icon ion-android-warning"></i> {{\'COMMON.BTN_REPORT_ABUSE_DOTS\' | translate}}</a></div></ion-content></ion-popover-view>'),e.put("plugins/graph/templates/account/graph_balance.html",'\n    \x3c!-- button bar --\x3e\n    <div class="button-bar-inline "\n         style="top: 33px; margin-top:-33px; position: relative;">\n      <button\n        class="button button-stable button-clear no-padding-xs pull-right"\n        ng-click="showActionsPopover($event)">\n        <i class="icon ion-navicon-round"></i>\n      </button>\n    </div>\n\n    <div class="padding-left padding-right">\n      <canvas id="account-balance" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n\n    <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n'),e.put("plugins/graph/templates/account/graph_certifications.html",'\n    <div class="padding-left padding-right">\n      <canvas id="account-certifications" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n'),e.put("plugins/graph/templates/account/graph_sum_tx.html",'<div class="row responsive-sm" ng-if="!loading">\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n  <div class="col text-center">\n\n    \x3c!-- TX input chart --\x3e\n    <p class="gray padding text-wrap"\n       ng-if="inputChart.data.length"\n       translate>GRAPH.ACCOUNT.INPUT_CHART_TITLE</p>\n    <canvas id="chart-received-pie" class="chart-pie"\n            chart-data="inputChart.data"\n            chart-labels="inputChart.labels"\n            chart-colors="inputChart.colors"\n            chart-click="onInputChartClick">\n    </canvas>\n\n  </div>\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n  <div class="col text-center">\n\n    \x3c!-- TX output chart --\x3e\n    <p class="gray padding text-wrap"\n       ng-if="outputChart.data.length"\n       translate>GRAPH.ACCOUNT.OUTPUT_CHART_TITLE</p>\n    <canvas id="chart-sent-pie" class="chart-pie"\n            chart-data="outputChart.data"\n            chart-labels="outputChart.labels"\n            chart-colors="outputChart.colors"\n            chart-click="onOutputChartClick">\n    </canvas>\n\n  </div>\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n</div>\n'),e.put("plugins/graph/templates/account/view_identity_tx_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n\n  <button class="button button-stable button-small-padding icon ion-stats-bars"\n          ui-sref="app.wot_identity_stats({pubkey: formData.pubkey})"\n          title="{{\'GRAPH.ACCOUNT.BTN_SHOW_STATS\' | translate}}">\n  </button>\n\n</ng-if>\n'),e.put("plugins/graph/templates/account/view_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.ACCOUNT.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n\n\n    <div class="list" >\n\n      \x3c!--  - - - - Balance - - - - --\x3e\n      <ng-controller ng-controller="GpAccountBalanceCtrl">\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item item-divider" ng-if="!loading" >\n          {{\'GRAPH.ACCOUNT.BALANCE_DIVIDER\'|translate}}\n          <ion-spinner ng-if="loadingRange" class="ion-spinner-small" icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/account/graph_balance.html\'"\n             ng-init="setSize(350, 1000)">\n        </div>\n      </ng-controller>\n\n    </div>\n\n    <div class="item no-padding-xs"\n         ng-include="::\'plugins/graph/templates/account/graph_sum_tx.html\'"\n         ng-controller="GpAccountSumTxCtrl">\n    </div>\n\n    \x3c!--  - - - - WOT - - - -\n    <div class="item item-divider" translate>\n      GRAPH.ACCOUNT.WOT_DIVIDER\n    </div>\n\n    <div class="item no-padding-xs"\n         ng-include="::\'plugins/graph/templates/account/graph_certifications.html\'"\n         ng-controller="GpAccountCertificationCtrl"\n         ng-init="setSize(350, 1000)">\n    </div>--\x3e\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/graph/templates/account/view_wallet_tx_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n\n  <button class="button button-stable button-small-padding icon ion-stats-bars"\n          ui-sref="app.wot_identity_stats({pubkey: formData.pubkey})"\n          title="{{\'GRAPH.ACCOUNT.BTN_SHOW_STATS\' | translate}}">\n  </button>\n\n</ng-if>\n'),e.put("plugins/graph/templates/blockchain/graph_block_issuers.html",'\n    <div class="row responsive-lg">\n\n      \x3c!-- bar --\x3e\n      <div class="col col-75">\n        <canvas id="bar" class="chart-bar"\n                height="{{height}}" width="{{width}}"\n                chart-data="data"\n                chart-labels="labels"\n                chart-colors="colors"\n                chart-options="barOptions"\n                chart-click="onChartClick">\n        </canvas>\n      </div>\n\n      \x3c!-- pie --\x3e\n      <div class="col col-25 padding-top">\n        <canvas id="blocksByIssuer-pie" class="chart-pie"\n                chart-data="data"\n                chart-labels="labels"\n                chart-colors="colors"\n                chart-click="onChartClick">\n        </canvas>\n\n        <div class="gray padding-top text-center">\n          <small ng-bind-html="\'GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_HELP\'| translate:{issuerCount: data.length, blockCount: blockCount }"></small>\n        </div>\n      </div>\n    </div>\n'),e.put("plugins/graph/templates/blockchain/graph_tx_count.html",'\n    \x3c!-- button bar --\x3e\n    <div class="button-bar-inline "\n         style="top: 33px; margin-top:-33px; position: relative;">\n      <button\n        class="button button-stable button-clear no-padding-xs pull-right"\n        ng-click="showActionsPopover($event)">\n        <i class="icon ion-navicon-round"></i>\n      </button>\n    </div>\n\n    <div class="padding-left padding-right">\n      <canvas id="tx-line" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n\n    <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n'),e.put("plugins/graph/templates/blockchain/view_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list" ng-if="!loading">\n\n\n      \x3c!-- TX count --\x3e\n      <ng-controller ng-controller="GpBlockchainTxCountCtrl">\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item item-divider" ng-if="!loading" >\n          {{\'GRAPH.BLOCKCHAIN.TX_DIVIDER\'|translate}}\n          <ion-spinner ng-if="loadingRange" class="ion-spinner-small" icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs no-padding-sm"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n             ng-init="setSize(350, 1000)">\n        </div>\n      </ng-controller>\n\n\n      \x3c!-- Blocks issuer --\x3e\n      <ng-controller ng-controller="GpBlockchainIssuersCtrl">\n\n        <div class="item item-divider" ng-if="!loading" translate>GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_DIVIDER</div>\n\n        <div class="item no-padding-xs no-padding-sm"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n             ng-init="setSize(300, 750)">\n        </div>\n\n      </ng-controller>\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/graph/templates/common/graph_range_bar.html",'\n  <div class="range range-positive no-padding-left no-padding-right">\n    <a\n      class="button button-stable button-clear no-padding pull-left"\n      ng-click="goPreviousRange($event)">\n      <i class="icon ion-chevron-left"></i>\n    </a>\n    <input type="range"\n           ng-model="formData.timePct"\n           name="timePct"\n           min="0" max="100"\n           value="{{formData.timePct}}"\n           ng-change="onRangeChanged();"\n           ng-model-options="{ debounce: 250 }">\n    <a\n      class="button button-stable button-clear no-padding pull-right"\n      ng-click="goNextRange($event)">\n      <i class="icon ion-chevron-right"></i>\n    </a>\n  </div>\n'),e.put("plugins/graph/templates/common/popover_range_actions.html",'<ion-popover-view class="has-header popover-graph-currency">\n  <ion-header-bar>\n    <h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1>\n  </ion-header-bar>\n  <ion-content scroll="false">\n    <div class="list item-text-wrap">\n\n      \x3c!-- scale --\x3e\n      <a class="item item-icon-left ink"\n         ng-click="toggleScale()">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.scale==\'logarithmic\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.LOGARITHMIC_SCALE\' | translate"></span>\n      </a>\n\n      \x3c!-- duration divider --\x3e\n      <div class="item item-divider">\n        {{\'GRAPH.COMMON.RANGE_DURATION_DIVIDER\'|translate}}\n      </div>\n\n      \x3c!-- duration: hour --\x3e\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'hour\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'hour\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.HOUR\' | translate"></span>\n      </a>\n\n      \x3c!-- duration: day --\x3e\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'day\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'day\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.DAY\' | translate"></span>\n      </a>\n\n      \x3c!-- duration: month --\x3e\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'month\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'month\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.MONTH\' | translate"></span>\n      </a>\n\n    </div>\n  </ion-content>\n</ion-popover-view>\n'),e.put("plugins/graph/templates/currency/graph_du.html",'\n  \x3c!-- graphs button bar --\x3e\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs no-padding-sm pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="monetaryMass-bar" class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-dataset-override="datasetOverride"\n          chart-options="options"\n          chart-click="showBlock">\n  </canvas>\n'),e.put("plugins/graph/templates/currency/graph_members_count.html",'  <canvas id="membersCount-bar" class="chart-line"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-options="options"\n          chart-dataset-override="datasetOverride"\n          chart-click="onChartClick">\n  </canvas>\n'),e.put("plugins/graph/templates/currency/graph_monetary_mass.html",'\n  \x3c!-- graphs button bar --\x3e\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="monetaryMass-bar"\n          class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-dataset-override="datasetOverride"\n          chart-options="options"\n          chart-click="onChartClick">\n  </canvas>\n'),e.put("plugins/graph/templates/currency/popover_monetary_mass_actions.html",'<ion-popover-view class="fit has-header">\n  <ion-header-bar>\n    <h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1>\n  </ion-header-bar>\n  <ion-content scroll="false">\n    <div class="list item-text-wrap">\n\n      <a class="item item-icon-left ink"\n         ng-click="toggleScale()">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.scale==\'logarithmic\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.LOGARITHMIC_SCALE\' | translate"></span>\n      </a>\n\n    </div>\n  </ion-content>\n</ion-popover-view>\n'),e.put("plugins/graph/templates/currency/tab_blocks_extend.html",'\x3c!-- buttons --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n  <div class="item item-divider">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_blocks_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n'),e.put("plugins/graph/templates/currency/view_currency_extend.html",'\n\x3c!-- section actual parameters --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'parameters-actual\'" >\n\n  <ng-if ng-if="!smallscreen">\n    <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n         ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n         ng-controller="GpCurrencyMonetaryMassCtrl"\n         ng-init="displayShareAxis=false;">\n    </div>\n    <div class="item buttons no-padding-top ">\n      <a class="pull-right button button-text button-small button-small-padding ink" ui-sref="app.currency_stats_lg">\n        <i class="icon ion-stats-bars"></i>\n        <span translate>GRAPH.COMMON.BTN_SHOW_DETAILED_STATS</span>\n      </a>\n    </div>\n  </ng-if>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_parameters_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n\x3c!-- section Wot --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'wot-actual\'" >\n\n  <ng-if ng-if="!smallscreen">\n    <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n         ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n         ng-controller="GpCurrencyMembersCountCtrl">\n    </div>\n    <div class="item buttons no-padding-top ">\n      <a class="pull-right button button-text button-small button-small-padding ink" ui-sref="app.currency_stats_lg">\n        <i class="icon ion-stats-bars"></i>\n        <span translate>GRAPH.COMMON.BTN_SHOW_DETAILED_STATS</span>\n      </a>\n    </div>\n  </ng-if>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_wot_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n\x3c!-- section Wot --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'network-actual\'" >\n\n  <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n       ng-if="!smallscreen"\n       ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n       ng-controller="GpBlockchainIssuersCtrl">\n  </div>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_network_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n'),e.put("plugins/graph/templates/currency/view_stats_lg.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n\n\n    <div class="list" >\n\n      \x3c!-- Monetary mass --\x3e\n      <ng-controller ng-controller="GpCurrencyMonetaryMassCtrl" >\n\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs" ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n             ng-init="setSize(250, 1000)">\n        </div>\n\n        <div ng-if="!loading"\n             class="item item-toggle dark no-border text-right">\n          <span class="" translate>COMMON.BTN_RELATIVE_UNIT</span>\n          <label class="toggle toggle-royal" id="helptip-currency-change-unit">\n            <input type="checkbox" ng-model="formData.useRelative">\n            <div class="track">\n              <div class="handle"></div>\n            </div>\n          </label>\n        </div>\n      </ng-controller>\n\n      \x3c!-- DU --\x3e\n      <ng-controller ng-controller="GpCurrencyDUCtrl" >\n        <div class="item no-padding-xs"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/currency/graph_du.html\'"\n             ng-init="setSize(250, 1000)">\n        </div>\n      </ng-controller>\n\n      \x3c!-- Member count  --\x3e\n      <ng-controller ng-controller="GpCurrencyMembersCountCtrl" >\n      <div class="item no-padding-xs"\n           ng-if="!loading"\n           ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/graph/templates/currency/view_wot_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n\n  <ion-content scroll="true" >\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <ng-include\n      ng-if="!loading"\n      src="\'plugins/graph/templates/currency/graph_members_count.html\'" ></ng-include>\n  </ion-content>\n  </ion-view>\n'),e.put("plugins/graph/templates/docstats/graph.html",'\n  \x3c!-- graphs button bar --\x3e\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs no-padding-sm pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="{{::chartIdPrefix}}{{chart.id}}"\n          class="chart-line"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="chart.data"\n          chart-labels="labels"\n          chart-dataset-override="chart.datasetOverride"\n          chart-options="chart.options"\n          chart-click="onChartClick">\n  </canvas>\n\n  <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n'),e.put("plugins/graph/templates/docstats/view_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.DOC_STATS.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n    <div class="list" >\n\n      \x3c!-- Doc stat --\x3e\n      <div class="center padding" ng-if="loading">\n        <ion-spinner icon="android"></ion-spinner>\n      </div>\n\n      <div class="item no-padding-xs no-padding-sm" ng-if="!loading"\n           ng-repeat="chart in charts"\n           ng-include="::\'plugins/graph/templates/docstats/graph.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/graph/templates/network/view_es_network_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'documents-buttons\'">\n  <a class="button button-text button-small ink"\n     ui-sref="app.doc_stats_lg" >\n    <i class="icon ion-stats-bars"></i>\n    <span>{{\'NETWORK.VIEW.BTN_GRAPH\'|translate}}</span>\n  </a>\n</ng-if>\n'),e.put("plugins/graph/templates/network/view_es_peer_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'general\'">\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n     ng-if="isReachable"\n     ui-sref="app.doc_stats_lg(node)">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.DOC_STATS.TITLE</span>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n     ng-if="isReachable"\n     ui-sref="app.doc_synchro_lg(node)">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.SYNCHRO.TITLE</span>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n</ng-if>\n\n'),e.put("plugins/graph/templates/network/view_network_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'blockchain-buttons\'">\n  <a class="button button-text button-small ink"\n     ui-sref="app.blockchain_stats" >\n    <i class="icon ion-stats-bars"></i>\n    <span>{{\'NETWORK.VIEW.BTN_GRAPH\'|translate}}</span>\n  </a>\n</ng-if>\n'),e.put("plugins/graph/templates/network/view_peer_extend.html",'\x3c!-- Buttons section --\x3e\n<ng-if ng-if=":state:enable && extensionPoint === \'general\'">\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n    ui-sref="app.view_peer_stats({pubkey: node.pubkey})">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.PEER.VIEW.BLOCK_COUNT_LABEL</span>\n    <span class="badge"\n          ng-if="!loading"\n          ng-class="{\'badge-stable\': blockCount > 0, \'badge-assertive\': !blockCount}">\n      {{!blockCount ? \'GRAPH.PEER.VIEW.NO_BLOCK\' : \'GRAPH.PEER.VIEW.BLOCK_COUNT\' | translate:{count: blockCount} }}\n    </span>\n    <ion-spinner class="badge" icon="android" ng-if="loading"></ion-spinner>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n</ng-if>\n\n'),e.put("plugins/graph/templates/network/view_peer_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list" ng-if="!loading">\n\n      \x3c!--  - - - - TX divider - - - - --\x3e\n      <div class="item item-divider hidden-xs hidden-sm" translate>\n        GRAPH.BLOCKCHAIN.TX_DIVIDER\n      </div>\n\n      <div class="item no-padding-xs"\n           ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n           ng-init="setSize(350, 1000)">\n      </div>\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/graph/templates/synchro/graph.html",'\n  \x3c!-- graphs button bar --\x3e\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="synchro-chart-{{chart.id}}"\n          class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="chart.data"\n          chart-labels="labels"\n          chart-dataset-override="chart.datasetOverride"\n          chart-options="chart.options">\n  </canvas>\n\n  <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n'),e.put("plugins/graph/templates/synchro/view_stats.html",'<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.SYNCHRO.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n    <div class="list" >\n\n      <div class="center padding" ng-if="loading">\n        <ion-spinner icon="android"></ion-spinner>\n      </div>\n\n      <div class="item no-padding-xs" ng-if="!loading"\n           ng-repeat="chart in charts"\n           ng-include="::\'plugins/graph/templates/synchro/graph.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n'),e.put("plugins/map/templates/common/edit_position_extend.html",'<div class="item no-padding hidden-xs hidden-sm {{ionItemClass}}" ng-if="formData.geoPoint && formData.geoPoint.lat && formData.geoPoint.lon">\n  <leaflet id="{{::mapId}}"\n           height="250px"\n           center="map.center"\n           markers="map.markers"\n           defaults="map.defaults">\n  </leaflet>\n</div>\n'),e.put("plugins/map/templates/network/item_search_tooltip.html","<a href=\"#\">\n  {{peer.dns || peer.server}}\n  <span class=\"{{peer.uid ? 'positive' : 'gray'}}\">\n    <i class=\"icon {{peer.uid ? 'ion-person' : 'ion-key'}}\"></i>\n    {{peer.uid ? (peer.name||peer.uid) : (peer.pubkey|formatPubkey) }}\n  </span>\n  <span class=\"gray\">{{peer.ipv4 ? (peer.ipv4 + ':' + peer.port) : ''}}</span>\n  <span class=\"{{peer.bma.useSsl  ? '' : 'ng-hide'}}\"><i class=\"ion-locked\"></i> <small>SSL</small></span>\n</a>\n"),e.put("plugins/map/templates/network/lookup_extend.html",'\x3c!-- FIXME issue #755 - https://git.duniter.org/clients/cesium-grp/cesium/issues/755\n<a ng-if="enable"\n   class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.NETWORK.LOOKUP.BTN_MAP_HELP\' | translate}}"\n        ui-sref="app.view_network_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.NETWORK.LOOKUP.BTN_MAP\' | translate}}\n</a>\n --\x3e\n'),e.put("plugins/map/templates/network/view_map.html",'<ion-view left-buttons="leftButtons" class="view-map-network">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.NETWORK.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             center="map.center"\n             markers="map.markers"\n             layers="map.layers">\n    </leaflet>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/map/templates/registry/item_search_tooltip.html","<a href=\"#\" class=\"{{type}}\">\n  <i class=\"{{'cion-page-' + type}}\"></i>\n  {{name != uid ? name +' ' : ''}}\n  <span class=\"gray\">\n    {{pubkey ? (pubkey|formatPubkey) : ''}}\n  </span>\n</a>\n"),e.put("plugins/map/templates/registry/lookup_lg_extend.html",'<a class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.REGISTRY.LOOKUP.BTN_MAP_HELP\' | translate}}"\n   ui-sref="app.view_registry_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.REGISTRY.LOOKUP.BTN_MAP\' | translate}}\n</a>\n'),e.put("plugins/map/templates/registry/popup_marker.html",'<div class="item no-border no-padding item-avatar "\n     ng-if="loadingMarker">\n\n  <i class="item-image icon ion-person"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top" >\n    <h2 class="stable-bg">\n      &nbsp;\n    </h2>\n    <h4 class="stable-bg col-75">\n      &nbsp;\n    </h4>\n    <h4 class="stable-bg col-50">\n      &nbsp;\n    </h4>\n  </div>\n</div>\n\n<a class="item no-border no-padding item-avatar ink animate-fade-in animate-show-hide ng-hide"\n     ng-show="!loadingMarker"\n     ui-sref="app.view_page({id: formData.id, title: formData.name})">\n  <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}}"></i>\n  <i ng-if="!formData.avatar" class="item-image icon cion-page-{{::formData.type}}"></i>\n  <div class="item-content item-avatar-left-padding padding-top">\n    <h2 class="dark">\n      {{::formData.name}}\n    </h2>\n    <h4 ng-if="::formData.category" class="gray" title="{{::formData.category.name}}">\n      <b class="ion-flag"></b> {{::formData.category.name}}\n    </h4>\n    <h4 ng-if="::formData.city" class="gray" title="{{::formData.city}}">\n      <b class="ion-location"></b> {{::formData.city}}\n    </h4>\n  </div>\n</a>\n\x3c!-- buttons --\x3e\n<div class="item no-border no-padding">\n  <div class="pull-left gray">\n    \x3c!-- show description --\x3e\n    <a class="animate-fade-in animate-show-hide gray ng-hide"\n       ng-class="{\'ion-arrow-down-b\': !showDescription, \'ion-arrow-up-b\': showDescription}"\n       ng-click="showDescription=!showDescription;"\n       title="{{\'PROFILE.DESCRIPTION\'|translate}}"\n       ng-show="!loadingMarker && formData.description">\n      &nbsp;\n    </a>\n  </div>\n</div>\n<div class="item no-border no-padding item-text-wrap hidden-xs ng-hide" ng-show="showDescription">\n  <small trust-as-html="::formData.description|truncText:500"></small>\n</div>\n'),e.put("plugins/map/templates/registry/view_map.html",'<ion-view left-buttons="leftButtons" class="view-map-registry">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.REGISTRY.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n    <button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="load()">\n    </button>\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <a id="helptip-map-registry" style="left: 150px; top: 50px; position: relative;"></a>\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             layers="map.layers"\n             markers="map.markers"\n             lf-center="map.center"\n             bounds="map.bounds">\n    </leaflet>\n  </ion-content>\n</ion-view>\n'),
-e.put("plugins/map/templates/settings/es_settings_extend.html",'\n\x3c!--<span class="item item-divider" translate>MAP.SETTINGS.MAP_DIVIDER</span>\n\n<label class="item item-toggle dark item-text-wrap">\n  <span translate>MAP.SETTINGS.ENABLE_GOOGLE_API</span>\n  <h4 class="gray" translate>MAP.SETTINGS.ENABLE_GOOGLE_API_HELP</h4>\n  <div class="toggle toggle-royal">\n    <input type="checkbox" ng-model="formData.enableGoogleApi">\n    <div class="track">\n      <div class="handle"></div>\n    </div>\n  </div>\n</label>\n\n<ion-item class="item-input"\n          ng-if="!$root.config.plugins.es.googleApiKey"\n          ng-class="{\'item-input-error\': formData.enableGoogleApi && !formData.googleApiKey}">\n  <div class="input-label col-33">\n    <span class="" ng-class="{\'gray\': !formData.enableGoogleApi}"translate>MAP.SETTINGS.GOOGLE_API_KEY</span>\n    <h4>\n      <a ng-click="openLink($event, \'https://console.developers.google.com/apis/credentials/key\')" translate>MAP.SETTINGS.BTN_GOOGLE_API</a>\n      <span class="gray"> ({{\'MAP.SETTINGS.BTN_GOOGLE_API_WARNING\'|translate}})</span>\n    </h4>\n  </div>\n  <input type="text"\n         placeholder="{{\'MAP.SETTINGS.GOOGLE_API_KEY_PLACEHOLDER\' | translate}}"\n         ng-model="formData.googleApiKey"\n         ng-if="formData.enableGoogleApi">\n</ion-item>\n<div class="form-errors"\n     ng-show="formData.enableGoogleApi && !formData.googleApiKey">\n  <div class="form-error">\n    <span translate="ERROR.FIELD_REQUIRED"></span>\n  </div>\n</div>--\x3e\n'),e.put("plugins/map/templates/wot/item_search_tooltip.html","<a href=\"#\" class=\"{{type}}\">\n  <i class=\"{{pending ? 'ion-clock': (type ? 'cion-page-' + type : '')}}\"></i>\n  {{name != uid ? name +' ' : ''}}\n  <span class=\"{{uid ? 'positive' : 'gray'}}\">\n    <i class=\"{{uid ? 'ion-person' : 'ion-key'}}\"></i>\n    {{uid ? uid : (pubkey|formatPubkey) }}\n  </span>\n</a>\n"),e.put("plugins/map/templates/wot/lookup_lg_extend.html",'<a ng-if="enable"\n   class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.WOT.LOOKUP.BTN_MAP_HELP\' | translate}}"\n   ui-sref="app.view_wot_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.WOT.LOOKUP.BTN_MAP\' | translate}}\n</a>\n'),e.put("plugins/map/templates/wot/popup_marker.html",'\n<div class="item no-border no-padding item-avatar "\n     ng-if="loadingMarker">\n\n  <i class="item-image icon ion-person"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top" >\n    <h2 class="stable-bg">\n      &nbsp;\n    </h2>\n    <h4 class="stable-bg col-75">\n      &nbsp;\n    </h4>\n    <h4 class="stable-bg col-50">\n      &nbsp;\n    </h4>\n  </div>\n</div>\n\n<a class="item no-border no-padding item-avatar ink animate-fade-in animate-show-hide ng-hide"\n   ng-show="!loadingMarker"\n   ui-sref="app.wot_identity({pubkey: formData.pubkey, uid: formData.uid})">\n\n  <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}})"></i>\n  <i ng-if="!formData.avatar && formData.uid" class="item-image icon ion-person"></i>\n  <i ng-if="!formData.avatar && !formData.uid" class="item-image icon ion-card"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top">\n    <h2 class="dark">\n      {{formData.name}}\n    </h2>\n    <h4>\n      <span ng-if="formData.uid" class="positive">\n        <b class="ion-person"></b>\n        {{formData.uid}}\n      </span>\n      <span class="gray" title="{{formData.pubkey}}"><b class="ion-key"></b> {{formData.pubkey|formatPubkey}}</span>\n      <span class="assertive" ng-if="!formData.isMember">\n        {{::\'WOT.NOT_MEMBER_PARENTHESIS\'|translate}}\n      </span>\n    </h4>\n    <h4 ng-if="formData.profile.city" class="gray" title="{{formData.profile.city}}">\n      <b class="ion-location"></b> {{formData.profile.city}}\n    </h4>\n  </div>\n</a>\n\x3c!-- buttons --\x3e\n<div class="item no-border no-padding">\n  <div class="pull-left gray">\n    \x3c!-- show description --\x3e\n    <a class="animate-fade-in animate-show-hide gray ng-hide"\n       ng-class="{\'ion-arrow-down-b\': !showDescription, \'ion-arrow-up-b\': showDescription}"\n       ng-click="showDescription=!showDescription;"\n       title="{{\'PROFILE.DESCRIPTION\'|translate}}"\n       ng-show="!loadingMarker && formData.profile.description">\n      &nbsp;\n    </a>\n  </div>\n  <div style="font-size: 18px;" class="pull-right gray">\n    \x3c!-- share --\x3e\n    <a class="icon ion-android-share-alt "\n       ng-click="showSharePopover($event)"\n       title="{{\'COMMON.BTN_SHARE\' | translate}}">&nbsp;</a>\n    \x3c!-- certify --\x3e\n    <a class="icon ion-ribbon-b"\n       ng-click="certify()"\n       title="{{\'WOT.BTN_CERTIFY\' | translate}}"\n       ng-hide="!canCertify">&nbsp;</a>\n    \x3c!-- compose message --\x3e\n    <a class="icon ion-compose"\n       ng-click="showNewMessageModal()"\n       title="{{\'MESSAGE.BTN_WRITE\' | translate}}">&nbsp;</a>\n    \x3c!-- transfer --\x3e\n    <a class="icon ion-card"\n       ng-click="showTransferModal({pubkey:formData.pubkey, uid: formData.name||formData.uid})"\n       title="{{\'COMMON.BTN_SEND_MONEY\' | translate}}">&nbsp;</a>\n\n  </div>\n</div>\n<div class="item no-border no-padding item-text-wrap hidden-xs ng-hide" ng-show="showDescription">\n  <small trust-as-html="formData.profile.description|truncText:500"></small>\n</div>\n'),e.put("plugins/map/templates/wot/view_map.html",'<ion-view left-buttons="leftButtons" class="view-map-wot">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.WOT.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n    <button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="load()">\n    </button>\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <a id="helptip-map-wot" style="left: 150px; top: 50px; position: relative;"></a>\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             layers="map.layers"\n             markers="map.markers"\n             lf-center="map.center"\n             bounds="map.bounds">\n    </leaflet>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/es/templates/message/tabs/tab_list.html",'<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'plugins/es/templates/message/list.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button ng-if="fabButtonNewMessageId" id="{{::fabButtonNewMessageId}}" class="button button-fab button-fab-bottom-right button-assertive spin has-footer" ng-click="showNewMessageModal()"><i class="icon ion-compose"></i></button></div></ion-view>'),e.put("plugins/es/templates/registry/tabs/tab_registry.html",'<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear" ng-click="showFiltersPopover($event)"><i class="icon ion-android-funnel"></i></button> <button class="button button-icon button-clear icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doSearch()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'plugins/es/templates/registry/lookup_form.html\'"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_list.html\'"></ng-include></ion-content></ion-view>'),e.put("plugins/graph/templates/currency/tabs/tab_blocks_stats.html",'<ion-view>\n  <ion-content>\n    <div\n       ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n       ng-controller="GpBlockchainTxCountCtrl"\n       ng-init="setSize(500,700,false)">\n      </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/graph/templates/currency/tabs/tab_network_stats.html",'<ion-view>\n  <ion-content>\n\n    <div class="list">\n      <div class="item"\n         ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n         ng-controller="GpBlockchainIssuersCtrl"\n           ng-init="setSize(500,700,true)">\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/graph/templates/currency/tabs/tab_parameters_stats.html",'<ion-view>\n  <ion-content>\n    <div class="list no-padding-xs no-padding-sm">\n\n      <ng-container ng-controller="GpCurrencyMonetaryMassCtrl">\n\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        \x3c!-- Monetary mass --\x3e\n        <div class="item"\n             ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n             ng-init="setSize(500,700,true)">\n        </div>\n      </ng-container>\n\n      \x3c!-- DU --\x3e\n      <ng-container ng-controller="GpCurrencyDUCtrl">\n        <div class="item"\n             ng-include="::\'plugins/graph/templates/currency/graph_du.html\'"\n             ng-init="setSize(500,700,true)">\n        </div>\n      </ng-container>\n    </div>\n  </ion-content>\n</ion-view>\n'),e.put("plugins/graph/templates/currency/tabs/tab_wot_stats.html",'<ion-view>\n  <ion-content>\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list no-padding">\n      <div class="item no-padding-top"\n           ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n           ng-init="setSize(600,700,false)">\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n')}]),angular.module("cesium.es.plugin",["cesium.es.services","cesium.es.app.controllers","cesium.es.common.controllers","cesium.es.settings.controllers","cesium.es.currency.controllers","cesium.es.wot.controllers","cesium.es.wallet.controllers","cesium.es.profile.controllers","cesium.es.message.controllers","cesium.es.notification.controllers","cesium.es.blockchain.controllers","cesium.es.network.controllers","cesium.es.registry.controllers","cesium.es.group.controllers","cesium.es.invitation.controllers","cesium.es.subscription.controllers","cesium.es.document.controllers","cesium.es.like.controllers"]),X.prototype.regexp={API_REGEXP:/^([A-Z_]+)(?:[ ]+([a-z_][a-z0-9-_.ğĞ]*))?(?:[ ]+([0-9.]+))?(?:[ ]+([0-9a-f:]+))?(?:[ ]+([0-9]+))(?:\/[^\/]+)?$/,LOCAL_IP_ADDRESS:/^127[.]0[.]0.|192[.]168[.]|10[.]0[.]0[.]|172[.]16[.]/},X.prototype.keyID=function(){var e=this.ep||this.getEP();return e.useBma?[this.pubkey||"Unknown",e.dns,e.ipv4,e.ipv6,e.port,e.useSsl,e.path].join("-"):[this.pubkey||"Unknown",e.ws2pid,e.path].join("-")},X.prototype.copyValues=function(e){var t=this;["version","currency","pub","endpoints","hash","status","block","signature"].forEach((function(n){e[n]=t[n]}))},X.prototype.copyValuesFrom=function(e){var t=this;["version","currency","pub","endpoints","block","signature"].forEach((function(n){t[n]=e[n]}))},X.prototype.json=function(){var e=this,t={};return["version","currency","endpoints","status","block","signature"].forEach((function(n){t[n]=e[n]})),t.raw=this.raw&&this.getRaw(),t.pubkey=this.pubkey,t},X.prototype.getEP=function(){if(this.ep)return this.ep;var e=null,t=this.regexp.API_REGEXP;return this.endpoints.forEach((function(n){var i=!e&&t.exec(n);i&&(e={api:i[1]||"",dns:i[2]||"",ipv4:i[3]||"",ipv6:i[4]||"",port:i[5]||80,path:i[6]||"",useSsl:443==i[5]})})),e||{}},X.prototype.getEndpoints=function(e){return e?("string"==typeof e&&(e=new RegExp("^"+e)),this.endpoints.reduce((function(t,n){return n.match(e)?t.concat(n):t}),[])):this.endpoints},X.prototype.hasEndpoint=function(e){var t=this.regexp[e]||new RegExp("^"+e),n=this.getEndpoints(t);return n&&n.length>0},X.prototype.hasEsEndpoint=function(){var e=this.getEsEndpoints();return e&&e.length>0},X.prototype.getEsEndpoints=function(){return this.getEndpoints(/^(ES_CORE_API|ES_USER_API|ES_SUBSCRIPTION_API|GCHANGE_API)/)},X.prototype.getDns=function(){var e=this.ep||this.getEP();return e.dns?e.dns:null},X.prototype.getIPv4=function(){var e=this.ep||this.getEP();return e.ipv4?e.ipv4:null},X.prototype.getIPv6=function(){var e=this.ep||this.getEP();return e.ipv6?e.ipv6:null},X.prototype.getPort=function(){var e=this.ep||this.getEP();return e.port?e.port:null},X.prototype.getHost=function(){var e=this.ep||this.getEP();return(443==e.port||e.useSsl)&&e.dns?e.dns:this.hasValid4(e)?e.ipv4:e.dns?e.dns:e.ipv6?"["+e.ipv6+"]":""},X.prototype.getURL=function(){var e=this.ep||this.getEP(),t=this.getHost();return(443==e.port||e.useSsl?"https":"http")+"://"+t+(e.port?":"+e.port:"")},X.prototype.getServer=function(){var e=this.ep||this.getEP(),t=this.getHost();return t+(t&&e.port?":"+e.port:"")},X.prototype.hasValid4=function(e){return!(!e.ipv4||e.ipv4.match(this.regexp.LOCAL_IP_ADDRESS))},X.prototype.isReachable=function(){return!!this.getServer()},X.prototype.isSsl=function(){return(this.ep||this.getEP()).useSsl},X.prototype.isTor=function(){return(this.ep||this.getEP()).useTor},X.prototype.isHttp=function(){return this.ep||this.getEP(),!bma.useTor},angular.module("cesium.es.services",["cesium.es.http.services","cesium.es.comment.services","cesium.es.social.services","cesium.es.settings.services","cesium.es.crypto.services","cesium.es.profile.services","cesium.es.notification.services","cesium.es.message.services","cesium.es.modal.services","cesium.es.blockchain.services","cesium.es.registry.services","cesium.es.group.services","cesium.es.wallet.services","cesium.es.invitation.services","cesium.es.subscription.services","cesium.es.wot.services","cesium.es.tx.services","cesium.es.geo.services","cesium.es.document.services","cesium.es.network.services","cesium.es.like.services"]),angular.module("cesium.es.comment.services",["ngResource","cesium.services","cesium.es.http.services","cesium.es.profile.services"]).factory("esComment",["$rootScope","$q","esHttp","csWallet","csWot",function(e,t,n,i,a){return{instance:function(o){var r={commons:["issuer","creationTime","time","message","reply_to"]},s={index:o,fields:{commons:r.commons},raw:{search:n.post("/"+o+"/comment/_search"),remove:n.record.remove(o,"comment"),wsChanges:n.ws("/ws/_changes"),add:new n.record.post("/"+o+"/comment",{creationTime:!0}),update:new n.record.post("/"+o+"/comment/:id/_update",{creationTime:!0})}};return s.raw.refreshTreeLinks=function(e){return s.raw.addTreeLinks(e,!0)},s.raw.addTreeLinks=function(e,i){(e=e||{}).result=e.result||[],e.mapById=e.mapById||{};var a={};if(_.forEach(_.values(e.mapById),(function(t){if(t.reply_to&&!t.parent){var n=e.mapById[t.reply_to];n||(n=new z(t.reply_to),a[n.id]=t.id,e.mapById[n.id]=n),i&&n.containsReply(t)||n.addReply(t)}})),!_.size(a)){var o=t.defer();return o.resolve(e),o.promise}var l={query:{terms:{_id:_.keys(a)}},sort:[{creationTime:{order:"desc"}},{time:{order:"desc"}}],from:0,size:1e3,_source:r.commons};return console.debug("[ES] [comment] Getting missing comments in tree"),s.raw.search(l).then((function(t){return t.hits.total?(_.forEach(t.hits.hits,(function(t){var i=e.mapById[t._id];i.copyFromJson(t._source),i.html=n.util.parseAsHtml(i.message),delete a[i.id]})),_.size(a)&&console.error("Comments has invalid [reply_to]: "+_.values(a).join(",")),s.raw.addTreeLinks(e)):(console.error("[ES] [comment] Comments has invalid [reply_to]: "+_.values(a).join(",")),e)}))},s.raw.loadDataByRecordId=function(e,t){(t=t||{}).from=t.from||0,t.size=t.size||20,t.loadAvatar=!angular.isDefined(t.loadAvatar)||t.loadAvatar,t.loadAvatarAllParent=!!angular.isDefined(t.loadAvatarAllParent)&&t.loadAvatar&&t.loadAvatarAllParent,t.size<0&&(t.size=1e3);var i={query:{term:{record:e}},sort:[{creationTime:{order:"desc"}},{time:{order:"desc"}}],from:t.from,size:t.size,_source:r.commons},o={total:0,mapById:{},result:[],pendings:{}};return s.raw.search(i).then((function(e){return e.hits.total?(o.total=e.hits.total,o.result=e.hits.hits.reduce((function(e,t){var i=new z(t._id,t._source);return i.html=n.util.parseAsHtml(i.message),o.mapById[i.id]=i,e.concat(i)}),o.result),s.raw.addTreeLinks(o)):o})).then((function(){if(t.loadAvatar)return t.loadAvatarAllParent?a.extendAll(_.values(o.mapById),"issuer"):a.extendAll(o.result,"issuer")})).then((function(){return o.result=o.result.sort((function(e,t){return e.creationTime-t.creationTime})),o}))},s.raw.createOnDeleteListener=function(e){return function(n){var a=_.findIndex(e.result,{id:n.id});if(-1!==a)return e.result.splice(a,1),delete e.mapById[n.id],(i.isUserPubkey(n.issuer)?i:i.children.getByPubkey(n.issuer))?s.raw.remove(n.id).catch((function(e){throw console.error(e),new Error("COMMENTS.ERROR.FAILED_REMOVE_COMMENT")})):t.reject("No wallet found corresponding to the comment issuer")}},s.raw.startListenChanges=function(t,r,l){(r=r||{}).result=r.result||[],r.mapById=r.mapById||{},r.pendings=r.pendings||{},l=l||e;var c=s.raw.createOnDeleteListener(r);_.forEach(r.result,(function(e){e.addOnRemoveListener(c)}));var u=Date.now();console.info("[ES] [comment] Starting websocket to listen comments on [{0}/record/{1}]".format(o,t.substr(0,8)));var d=n.websocket.changes(o+"/comment");return d.open().then((function(){console.debug("[ES] [comment] Websocket opened in {0} ms".format(Date.now()-u)),d.on((function(e){e&&l.$applyAsync((function(){var o=r.mapById[e._id];"DELETE"===e._operation?o&&o.remove():e._source&&e._source.record===t&&(o?(o.copyFromJson(e._source),o.html=n.util.parseAsHtml(o.message),s.raw.refreshTreeLinks(r)):r.pendings&&r.pendings[e._source.creationTime]||e._source.issuer==i.data.pubkey?console.debug("Skip comment received by WS (already in pending)"):((o=new z(e._id,e._source)).addOnRemoveListener(c),o.isnew=!0,o.html=n.util.parseAsHtml(o.message),r.mapById[e._id]=o,s.raw.refreshTreeLinks(r).then((function(){return a.extend(o,"issuer")})).then((function(){r.result.push(o)}))))}))}))}))},s.raw.save=function(e,t,a){(t=t||{}).result=t.result||[],t.mapById=t.mapById||{},t.pendings=t.pendings||{};var o,r=a.id,l={creationTime:r?a.creationTime||a.time:moment().utc().unix(),message:a.message,record:e,issuer:i.data.pubkey};return a.reply_to||a.parent?l.reply_to=a.reply_to||a.parent.id:l.reply_to=null,r?(o=t.mapById[r]).copy(a):((o=new z(null,l)).addOnRemoveListener(s.raw.createOnDeleteListener(t)),o.uid=i.data.uid,o.name=i.data.name,o.avatar=i.data.avatar,o.isnew=!0,a.parent&&a.parent.addReply(o),t.result.push(o)),o.html=n.util.parseAsHtml(o.message),r?s.raw.update(l,{id:r}).then((function(){return o})):(t.pendings=t.pendings||{},t.pendings[l.creationTime]=l,s.raw.add(l).then((function(e){return o.id=e,t.mapById[e]=o,delete t.pendings[l.creationTime],o})))},s.raw.stopListenChanges=function(e){console.debug("[ES] [comment] Stopping websocket on comments"),_.forEach(e.result,(function(e){e.cleanAllListeners()})),s.raw.wsChanges().close()},s.load=s.raw.loadDataByRecordId,s.save=s.raw.save,s.changes={start:s.raw.startListenChanges,stop:s.raw.stopListenChanges},s}}}]),angular.module("cesium.es.http.services",["ngResource","ngApi","cesium.services","cesium.config"]).factory("esHttp",["$q","$timeout","$rootScope","$state","$sce","$translate","$window","$filter","CryptoUtils","UIUtils","csHttp","csConfig","csSettings","csCache","BMA","csWallet","csPlatform","Api",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b,g,f){var T=!!("true"===d.httpsMode||!0===d.httpsMode||"force"===d.httpsMode||r.location&&"https:"===r.location.protocol);function h(i,a,r,h){var v,I,O=this,N={ES_USER_API:"ES_USER_API",ES_SUBSCRIPTION_API:"ES_SUBSCRIPTION_API",ES_USER_API_ENDPOINT:"ES_USER_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))",ANY_API_ENDPOINT:"([A-Z_]+)(?:[ ]+([a-z_][a-z0-9-_.ğĞ]*))?(?:[ ]+([0-9.]+))?(?:[ ]+([0-9a-f:]+))?(?:[ ]+([0-9]+))(?:\\/[^\\/]+)?",MAX_UPLOAD_BODY_SIZE:d.plugins&&d.plugins.es&&d.plugins.es.maxUploadBodySize||2097152},R={IMAGE_SRC:P("data:([A-Za-z//]+);base64,(.+)"),URL:k("(www\\.|https?://(www\\.)?)[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)"),HASH_TAG:k("(?:^|[\t\n\rs ])#([0-9_-\\wḡĞǦğàáâãäåçèéêëìíîïðòóôõöùúûüýÿ]+)"),USER_TAG:k("(?:^|[\t\n\rs ])@("+E.constants.regexp.USER_ID+")"),ES_USER_API_ENDPOINT:P(N.ES_USER_API_ENDPOINT),API_ENDPOINT:P(N.ANY_API_ENDPOINT)},A=0,S=s("truncUrl");function C(e,t,n){!e&&p.data&&(e=e||(p.data.plugins&&p.data.plugins.es?p.data.plugins.es.host:null),t=t||(e?p.data.plugins.es.port:null),n=angular.isDefined(n)?n:443==t||p.data.plugins.es.useSsl||T),O.alive=!1,O.host=e,O.port=t||(n||T?443:80),O.useSsl=angular.isDefined(n)?n:443==O.port||T,O.server=u.getServer(e,t)}function L(e){if(!(e=e||p.data).plugins||!e.plugins.es)return!1;var t=e.plugins.es.host,n=443==e.plugins.es.port||e.plugins.es.useSsl||T;return D(t,e.plugins.es.port||(n?443:80),n)}function D(e,t,n){return O.host===e&&O.port===t&&(angular.isUndefined(n)||n==O.useSsl)}function y(e){O.data.isFallback=e}function P(e){return new RegExp("^"+e+"$")}function k(e){return new RegExp(e)}function M(t,n){return n=n||e.defer(),O.data.isFallback&&O.started&&O.stop(),O.data.isFallback=!1,I=null,n.resolve(t),n.promise}function w(e,t){for(var n="@"===(t=t||"#")?R.USER_TAG:R.HASH_TAG,i=e&&n.exec(e),a=i&&[];i;){var o=i[1];_.contains(a,o)||a.push(o),i=(e=e.substr(i.index+i[1].length+1)).length>0&&n.exec(e)}return a}O.data={isFallback:!1},O.useCache=!!angular.isDefined(h)&&h,O.raw={getByPath:{},postByPath:{},wsByPath:{}},O.api=new f(this,"esHttp"),O.started=!1,O.init=C,C(i,a,r),O.closeWs=function(){O.raw&&(console.warn("[ES] [http] Closing all websockets..."),_.keys(O.raw.wsByPath||{}).forEach((function(e){O.raw.wsByPath[e].close()})),O.raw.wsByPath={})},O.cleanCache=function(){console.debug("[ES] [http] Cleaning cache {prefix: '{0}'}...".format("esHttp-")),m.clear("esHttp-"),O.raw.getByPath={},O.raw.postByPath={},O.raw.wsByPath={}},O.copy=function(e){return O.started&&O.stop(),O.init(e.host,e.port,e.useSsl||443==e.port),O.data.isTemporary=!1,O.start(!0)},O.date={now:u.date.now},O.byteCount=function(e){return e="string"==typeof e?e:JSON.stringify(e),encodeURI(e).split(/%(?:u[0-9A-F]{2})?[0-9A-F]{2}|./).length-1},O.getUrl=function(e){return u.getUrl(O.host,O.port,e,O.useSsl)},O.get=function(t,n){n=O.useCache&&n;var i=t+(n?"#"+n:""),a=function(o){if(!O.started)return O._startPromise||console.warn("[ES] [http] Trying to get [{0}] before start(). Waiting...".format(t)),O.ready().then((function(t){return t?a(o):e.reject("ERROR.ES_CONNECTION_ERROR")}));var r=O.raw.getByPath[i];return r||(r=n?u.getWithCache(O.host,O.port,t,O.useSsl,n,null,null,"esHttp-"):u.get(O.host,O.port,t,O.useSsl),O.raw.getByPath[i]=r),r(o)};return a},O.post=function(t){var n=function(i,a){if(!O.started)return O._startPromise||console.error("[ES] [http] Trying to post [{0}] before start()...".format(t)),O.ready().then((function(t){return t?n(i,a):e.reject("ERROR.ES_CONNECTION_ERROR")}));var o=O.raw.postByPath[t];return o||(o=u.post(O.host,O.port,t,O.useSsl),O.raw.postByPath[t]=o),o(i,a)};return n},O.ws=function(e){return function(){var t=O.raw.wsByPath[e];return t&&!t.isClosed()||((t=u.ws(O.host,O.port,e,O.useSsl)).onclose=function(){delete O.raw.wsByPath[e]},O.raw.wsByPath[e]=t),t}},O.wsChanges=function(e){var t=O.ws("/ws/_changes")();if(!e)return t;var n=t.open;return t.open=function(){return n.call(t).then((function(t){t?t.send(e):console.warn("Trying to access ws changes, but no sock anymore... already open ?")}))},t},O.isAlive=function(){return u.get(O.host,O.port,"/node/summary",O.useSsl)().then((function(e){var t=e&&e.duniter&&e.duniter.software||"unknown";return"cesium-plus-pod"===t||"duniter4j-elasticsearch"===t||(console.error("[ES] [http] Not a Cesium+ Pod, but a {0} node. Please check '/node/summary'".format(t)),!1)})).catch((function(){return!1}))},O.checkNodeAlive=function(e){if(e)return y(!L()),!0;if(angular.isUndefined(e))return O.isAlive().then(O.checkNodeAlive);var t=p.data.plugins&&p.data.plugins.es||{};I=I||{host:t.host,port:t.port};var n=t.fallbackNodes&&A<t.fallbackNodes.length&&t.fallbackNodes[A++];if(!n)return o("ERROR.ES_CONNECTION_ERROR",{server:O.server}).then(c.alert.info),!1;var i=u.getServer(n.host,n.port);return c.loading.hide(),o("CONFIRM.ES_USE_FALLBACK_NODE",{old:O.server,new:i}).then(c.alert.confirm).then((function(e){return!!e&&(O.cleanCache(),O.init(n.host,n.port,n.useSsl||443==n.port),O.isAlive().then(O.checkNodeAlive))}))},O.isStarted=function(){return O.started},O.ready=function(){return O.started?e.when(!0):O._startPromise||O.start()},O.start=function(t){return O._startPromise?O._startPromise:O.started?e.when(O.alive):(O._startPromise=g.ready().then((function(){t||O.init()})).then((function(){console.debug("[ES] [http] Starting on [{0}]{1}...".format(O.server,O.useSsl?" (SSL on)":""));var e=Date.now();return O.checkNodeAlive().then((function(t){return O.alive=t,t?(v=[p.api.data.on.reset(n,M,O)],console.debug("[ES] [http] Started in "+(Date.now()-e)+"ms"),O.api.node.raise.start(),O.started=!0,delete O._startPromise,A=0,!0):(console.error("[ES] [http] Could not start [{0}]: node unreachable".format(O.server)),O.started=!0,delete O._startPromise,A=0,!1)}))})),O._startPromise)},O.stop=function(){return O.started||O._startPromise?(console.debug("[ES] [http] Stopping..."),_.forEach(v,(function(e){e()})),v=[],y(!1),delete O._startPromise,O.alive?(O.closeWs(),O.cleanCache(),O.alive=!1,O.started=!1,O.api.node.raise.stop()):O.started=!1,e.when()):e.when()},O.restart=function(){return O.stop(),t(O.start,200)},O.image={},O.image.fromHit=function(e,t){if(e&&e._source){var n=e._source[t];if(n&&n._content_type&&n._content_type.startsWith("image/")){var i={};if(n._content)i.src="data:"+n._content_type+";base64,"+n._content;else{var a=n._content_type.substr(6),o=[e._index,e._type,e._id,"_image",t].join("/");o="/"+o+"."+a,i.src=O.getUrl(o)}return n._title&&(i.title=n._title),n._name&&(i.name=n._name),i}}},O.api.registerEvent("node","start"),O.api.registerEvent("node","stop");var U={getServer:u.getServer,node:{summary:O.get("/node/summary"),moderators:O.get("/node/moderators"),parseEndPoint:function(e){var t=R.API_ENDPOINT.exec(e);if(t)return{api:t[1]||"",dns:t[2]||"",ipv4:t[3]||"",ipv6:t[4]||"",port:t[5]||80,path:t[6]||"",useSsl:443==t[5]}},same:D,sameAsSettings:L,isFallback:function(){return O.data.isFallback}},version:{latest:function(){var e=O.raw.getLatestRelease;if(!e){var t=u.uri.parse(p.data.plugins.es.latestReleaseUrl),n=443==t.port||"https:"===t.protocol||T;e=u.getWithCache(t.host,t.port,"/"+t.pathname,n,m.constants.LONG),O.raw.getLatestRelease=e}return e().then((function(e){if(e)return e.name&&e.html_url?{version:e.name,url:e.html_url}:e.tag_name&&e.html_url?{version:e.tag_name.substring(1),url:e.html_url}:void 0})).catch((function(e){console.error("[BMA] Failed to get Duniter latest version",e)}))}},websocket:{changes:O.wsChanges,block:O.ws("/ws/block"),peer:O.ws("/ws/peer")},wot:{member:{uids:O.get("/wot/members")}},network:{peering:{self:O.get("/network/peering")},peers:O.get("/network/peers")},blockchain:{current:O.get("/blockchain/current?_source=number,hash,medianTime")},record:{post:function(t,n){n=n||{};var i=O.post(t);return function(t,a){var o=(a=a||{}).wallet||a.walletId&&b.children.get(a.walletId)||(!a.pubkey||b.isUserPubkey(a.pubkey))&&b||a.pubkey&&b.children.getByPubkey(a.pubkey),r=a.keypair||o&&o.data&&o.data.keypair;if(!r&&!o)throw new Error("Missing wallet or keypair, to sign record");delete a.wallet,delete a.walletId,delete a.keypair;var s=angular.copy(a);return s.pubkey=s.pubkey||o.data.pubkey,(o.isAuth()?e.when(o.data):o.auth({silent:!0,minData:!0})).then((function(){a.creationTime&&!t.creationTime&&(t.creationTime=moment().utc().unix());var e=moment().utc().unix();t.time=!t.time||t.time<e?e:t.time+1;var o=angular.copy(t);delete o.signature,delete o.hash,o.issuer=s.pubkey,o.version||(o.version=2),n.tagFields&&function(e,t){t=t||["title","description"],e.tags=t.reduce((function(t,n){var i=e[n],a=i&&w(i);return a?t.concat(a):t}),[])}(o,n.tagFields),n.ignoreFields&&_.forEach(n.ignoreFields,(function(e){angular.isDefined(o[e])&&delete o[e]}));var c=JSON.stringify(o);return l.util.hash(c).then((function(e){return l.sign(e,r).then((function(t){return c='{"hash":"{0}","signature":"{1}",'.format(e,t)+c.substring(1),i(c,s).then((function(e){return m.clear("esHttp-"),e})).catch((function(e){var t=O.byteCount(o);if(t>N.MAX_UPLOAD_BODY_SIZE)throw{message:"ERROR.ES_MAX_UPLOAD_BODY_SIZE",length:t};throw e}))}))}))}))}},remove:function(t,n){return function(i,a){var o=(a=a||{}).wallet||a.walletId&&b.children.get(a.walletId)||b;return(o.isAuth()?e.when(o.data):o.auth({silent:!0,minData:!0})).then((function(e){var a={version:2,index:t,type:n,id:i,issuer:e.pubkey,time:moment().utc().unix()},o=JSON.stringify(a);return l.util.hash(o).then((function(t){return l.sign(t,e.keypair).then((function(e){return o='{"hash":"{0}","signature":"{1}",'.format(t,e)+o.substring(1),O.post("/history/delete")(o).then((function(e){return e}))}))}))}))}},count:function(e,t,n){var i=O.get("/{0}/{1}/_search?size=0".format(e,t),n);return function(e){return i(e).then((function(e){return e&&e.hits&&e.hits.total}))}}},image:{fromAttachment:function(e){if(!e||!e._content_type||!e._content||0===e._content.length)return null;var t={src:"data:"+e._content_type+";base64,"+e._content};return e._title&&(t.title=e._title),e._name&&(t.name=e._name),t},toAttachment:function(e){if(!e||!e.src)return null;var t=R.IMAGE_SRC.exec(e.src);if(!t)return null;var n={_content_type:t[1],_content:t[2]};return e.title&&(n._title=e.title),e.name&&(n._name=e.name),n}},hit:{empty:function(){return{_id:null,_index:null,_type:null,_version:null,_source:{}}}},util:{parseTags:w,parseAsHtml:function(e,t){var n=e?function(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}(e.trim()):void 0;if(n){(t=t||{}).tagState=t.tagState||"app.wot_lookup.tab_search",t.uidState=t.uidState||"app.wot_identity_uid",!t.newLine&&angular.isDefined(t.newLine)||(n=n.replace(/\n/g,"<br>\n"));var i=function(e){for(var t=e&&R.URL.exec(e),n=t&&[];t;){var i=t[0];_.contains(n,i)||n.push(i),t=(e=e.substr(t.index+t[0].length+1))&&R.URL.exec(e)}return n}(n);_.forEach(i,(function(e){var t=e.startsWith("http://")||e.startsWith("https://")?e:"http://"+e,i='<a on-tap="openLink($event, \'{0}\')" href="{1}" target="_blank">{2}</a>'.format(t,t,S(e));n=n.replace(e,i)}));var a=w(n);_.forEach(a,(function(e){var i="<a ui-sref=\"{0}({hash: '{1}'})\">#{2}</a>".format(t.tagState,e,e);n=n.replace("#"+e,i)}));var o=w(n,"@");_.forEach(o,(function(e){var i="<a ui-sref=\"{0}({uid: '{1}'})\">@{2}</a>".format(t.uidState,e,e);n=n.replace("@"+e,i)}));var r=function(e,t,n){for(var i=k("(?:^|[\\r\\s])("+(t=t||"##")+"([^#></]+)<br>)"),a=e&&i.exec(e),o=a&&[],r=a&&[];a;){var s=a[1];_.contains(o,s)||(o.push(s),r.push({line:s,title:a[2]})),a=(e=e.substr(a.index+a[1].length+1)).length>0&&i.exec(e)}return r}(n,"#+[ ]*");_.forEach(r,(function(e){var t=e.line.lastIndexOf("#",5)+1;n=n.replace(e.line,"<h{0}>{1}</h{2}>".format(t,e.title,t))}))}return n},findObjectInTree:function e(t,n){if(t)return t[n]?t[n]:Array.isArray(t)?t.reduce((function(t,i){return t||e(i,n)}),!1):"object"==typeof t?_.reduce(_.keys(t),(function(i,a){return i||e(t[a],n)}),!1):void 0}},constants:N};U.constants.regexp=R,angular.merge(O,U)}T&&console.debug("[ES] [https] Enable SSL (forced by config or detected in URL)");var v=new h(void 0,void 0,void 0,!0);return v.instance=function(e,t,n,i){return new h(e,t,n,i)},v.lightInstance=function(e,t,n,i){function a(n,i){return u.get(e,t,n)(i).then((function(e){return e&&e.hits&&e.hits.total}))}return t=t||80,n=angular.isDefined(n)?n:443==+t,{host:e,port:t,useSsl:n,node:{summary:u.getWithCache(e,t,"/node/summary",n,u.cache.LONG,!1,i)},network:{peering:{self:u.get(e,t,"/network/peering",n,i)},peers:u.get(e,t,"/network/peers",n,i)},blockchain:{current:u.get(e,t,"/blockchain/current?_source=number,hash,medianTime",n,i)},record:{count:function(e,t){return a("/{0}/{1}/_search?size=0".format(e,t))}},subscription:{count:function(e){return a("/subscription/record/_search?size=0&q="+_.keys(e||{}).reduce((function(t,n){return(t&&t+" AND "||"")+n+":"+e[n]}),""))}}}},v}]),angular.module("cesium.es.settings.services",["cesium.services","cesium.es.http.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esSettings")}]).factory("esSettings",["$rootScope","$q","$timeout","Api","esHttp","csConfig","csSettings","CryptoUtils","Device","UIUtils","csWallet",function(e,t,n,i,a,o,r,s,l,c,u){var d,p,m={includes:["locale","showUDHistory","useRelative","useLocalStorage","useLocalStorageEncryption","expertMode","logoutIdle","blockValidityWindow"],excludes:["timeout","cacheTimeMs","version","build","minVersion","fallbackLanguage"],plugins:{es:{excludes:["enable","host","port","useSsl","fallbackNodes","enableGoogleApi","googleApiKey","document","maxUploadBodySize","defaultCountry"],notifications:{}}},wallet:{includes:["alertIfUnusedWallet"],excludes:["notificationReadTime"]},helptip:{excludes:["installDocUrl"]},notifications:{excludes:["time","warnCount","unreadCount"]}},E=angular.merge({plugins:{es:{askEnable:!1,useRemoteStorage:!0,latestReleaseUrl:"https://api.github.com/repos/duniter/cesium-plus-pod/releases/latest",notifications:{txSent:!0,txReceived:!0,certSent:!0,certReceived:!0,emitHtml5:!1},invitations:{readTime:!0},defaultCountry:void 0,enableGoogleApi:!1,googleApiKey:void 0,wot:{enableMixedSearch:!0},document:{index:"user,page,group",type:"profile,record,comment"},registry:{defaultSearch:{location:null,geoPoint:null}},geoDistance:"20km"}}},{plugins:{es:o.plugins&&o.plugins.es||{}}}),b=this,g=new i("esSettings"),f=!1,T=!1;function h(e,n){return n=n||t.defer(),angular.merge(e,E),T=!1,n.resolve(e),n.promise}function v(e,n){return n=n||t.defer(),e&&e.pubkey&&e.keypair&&e.keypair.signSk&&e.keypair.boxSk?(console.debug("[ES] [settings] Loading user settings..."),function(e,t){var n=Date.now();return b.get({id:e}).catch((function(e){if(e&&e.ucode&&404==e.ucode)return null;throw e})).then((function(e){if(e&&e._source){var i=e._source;if(i.time!==r.data.time){var a=s.util.decode_base58(i.nonce);return s.box.open(i.content,a,t.boxPk,t.boxSk).then((function(e){var t=JSON.parse(e||"{}");return t.time=i.time,console.debug("[ES] [settings] Loaded and decrypted in "+(Date.now()-n)+"ms"),t})).catch((function(e){return console.error("[ES] [settings] Could not load remote settings: "+(e&&e.message||"decryption error")),delete r.data.time,null}))}console.debug("[ES] [settings] Loaded in "+(Date.now()-n)+"ms, but already up to date")}}))}(e.pubkey,e.keypair).then((function(e){if(e)return angular.merge(r.data,e),d=e,console.debug("[ES] [settings] Applied"),O()})).then((function(){n.resolve(e)})).catch((function(e){n.reject(e)})),n.promise):(n.resolve(),n.promise)}function I(e){if(!f){var n=p&&p.length>0;!a.isStarted()||a.node.isFallback()||a.node.sameAsSettings(e)||(N(),a.stop()),R(),b.isEnable()&&u.isAuth()&&(n?function(e){var n=function e(t,n){var i={};return n.includes&&_.forEach(_.keys(n),(function(e){"includes"!=e&&"excludes"!=e&&n.includes.push(e)})),_.forEach(_.keys(t),(function(a){n.includes&&!_.contains(n.includes,a)||n.excludes&&_.contains(n.excludes,a)||(t[a]&&"object"==typeof t[a]&&n[a]&&"object"==typeof n[a]?i[a]=e(t[a],n[a]):i[a]=t[a])})),i}(e,m);if(d&&angular.equals(n,d))return t.when();if(!r.data.plugins.es.useRemoteStorage)return O();var i=moment().utc().unix();console.debug("[ES] [settings] Saving user settings remotely..."),t.all([u.getKeypair(),s.util.random_nonce()]).then((function(t){var a=t[0],o=t[1];if(a.boxPk&&a.boxSk){var r={issuer:u.data.pubkey,nonce:s.util.encode_base58(o),time:i},l=JSON.stringify(n);return s.box.pack(l,o,a.boxPk,a.boxSk).then((function(t){return r.content=t,angular.isUndefined(e.time)?b.add(r):b.update(r,{id:r.issuer}).catch((function(e){if(e&&404==e.ucode)return b.add(r);throw e}))})).then((function(){return!0}))}})).then((function(t){if(t)return e.time=i,d=n,console.debug("[ES] [settings] Saved user settings remotely in "+(moment().utc().unix()-i)+"ms"),O()})).catch((function(e){throw console.error(e),e}))}(e):v(u.data))}}function O(){return f?t.when():(f=!0,r.store().then((function(){f=!1})).catch((function(e){throw f=!1,e})))}function N(){_.forEach(p,(function(e){e()})),p=[]}function R(){var t=b.isEnable();return!t&&p&&p.length>0?(console.debug("[ES] [settings] Disable"),N(),a.stop().then((function(){g.state.raise.changed(t)}))):!t||p&&0!==p.length&&a.isStarted()?void 0:a.start().then((function(n){return n?(console.debug("[ES] [settings] Enable"),function(){p=[r.api.data.on.reset(e,h,this),u.api.data.on.auth(e,v,this)]}(),u.isAuth()?v(u.data).then((function(){g.state.raise.changed(t)})):void g.state.raise.changed(t)):(r.data.plugins.es.enable=!1,r.data.plugins.es.askEnable=!0,T=!0,g.state.raise.changed(!1),void console.error("[ES] [settings] Disable, has ES node could not be started"))}))}return b.api=g,b.get=a.get("/user/settings/:id"),b.add=a.record.post("/user/settings"),b.update=a.record.post("/user/settings/:id/_update"),b.isEnable=function(){return r.data.plugins&&r.data.plugins.es&&r.data.plugins.es.enable&&!!r.data.plugins.es.host},b.notifications={},b.notifications.isEmitHtml5Enable=function(){return!!(b.isEnable()&&r.data.plugins.es.notifications&&angular.isDefined(r.data.plugins.es.notifications.emitHtml5))&&r.data.plugins.es.notifications.emitHtml5},b.wot={},b.wot.isMixedSearchEnable=function(){return b.isEnable()&&(!angular.isDefined(r.data.plugins.es.wot&&r.data.plugins.es.wot.enableMixedSearch)||r.data.plugins.es.wot.enableMixedSearch)},g.registerEvent("state","changed"),r.ready().then((function(){return r.api.data.on.changed(e,I,this),a.api.node.on.stop(e,(function(){d=null}),this),R()})).then((function(){if(!T&&o.plugins&&o.plugins.es&&o.plugins.es.askEnable&&!b.isEnable()&&r.data.plugins.es.askEnable)return c.alert.confirm("ES_SETTINGS.CONFIRM.ASK_ENABLE","ES_SETTINGS.CONFIRM.ASK_ENABLE_TITLE",{cancelText:"COMMON.BTN_NO",okText:"COMMON.BTN_YES"}).then((function(e){return e&&(r.data.plugins.es.enable=!0),r.data.plugins.es.askEnable=!1,r.store()}))})),b}]),angular.module("cesium.es.registry.services",["ngResource","cesium.services","cesium.es.http.services","cesium.es.like.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esRegistry")}]).factory("esRegistry",["$rootScope","$q","csPlatform","csSettings","csWallet","csWot","esHttp","esComment","esLike","esGeo",function(e,t,n,i,a,o,r,s,l,c){var u,d={commons:["title","description","issuer","time","address","city","creationTime","avatar._content_type","picturesCount","type","category","socials","pubkey","geoPoint"]},p=this;function m(e){e.pages=null}function E(e,n){return n=n||t.defer(),e&&e.pubkey&&e.keypair?(console.debug("[ES] [registry] Loading pages count..."),p.raw.count({pubkey:e.pubkey}).then((function(t){e.pages=e.pages||{},e.pages.count=t&&t.hits&&t.hits.total,console.debug("[ES] [registry] Loaded pages count ("+e.pages.count+")"),n.resolve(e)})).catch((function(t){console.error("[ES] [registry] Error while counting page: "+(t.message?t.message:t)),n.resolve(e)})),n.promise):(n.resolve(),n.promise)}function b(){if(p.raw.categories&&p.raw.categories.length){var e=t.defer();return e.resolve(p.raw.categories),e.promise}return p.raw.category.all().then((function(e){if(0===e.hits.total)p.raw.categories=[];else{var t=e.hits.hits.reduce((function(e,t){var n=t._source;return n.id=t._id,e.concat(n)}),[]);_.forEach(t,(function(e){t[e.id]=e})),p.raw.categories=t}return p.raw.categories}))}function g(e,t){if(e){var n=e._source;return n.category&&n.category.id&&(n.category=t[n.category.id]),e.highlight&&(e.highlight.title&&(n.title=e.highlight.title[0]),e.highlight.description&&(n.description=e.highlight.description[0]),e.highlight.location&&(n.location=e.highlight.location[0]),e.highlight.tags&&(n.tags=e.highlight.tags.reduce((function(e,t){return e.concat(t.replace("<em>","").replace("</em>",""))}),[]))),n.avatar=r.image.fromHit(e,"avatar"),e._source.pictures&&e._source.pictures.reduce&&(n.pictures=e._source.pictures.reduce((function(e,t){return e.concat(r.image.fromAttachment(t.file))}),[])),n}}function f(){var t=r.alive;if(!t&&u&&u.length>0){if(console.debug("[ES] [subscription] Disable"),_.forEach(u,(function(e){e()})),u=[],a.isLogin())return m(a.data)}else if(t&&(!u||0===u.length)&&(console.debug("[ES] [subscription] Enable"),function(){u=[a.api.data.on.load(e,E,this),a.api.data.on.init(e,m,this),a.api.data.on.reset(e,m,this)]}(),a.isLogin()))return E(a.data)}return p.raw={count:r.get("/page/record/_search?size=0&q=issuer::pubkey"),searchText:r.get("/page/record/_search?q=:search"),search:r.post("/page/record/_search"),get:r.get("/page/record/:id"),getCommons:r.get("/page/record/:id?_source="+d.commons.join(",")),category:{get:r.get("/page/category/:id"),all:r.get("/page/category/_search?sort=order&from=0&size=1000&_source=name,parent")}},n.ready().then((function(){return r.api.node.on.start(e,f,this),r.api.node.on.stop(e,f,this),f()})),p.category={all:b,get:function(e){return p.raw.category.get(e).then((function(e){var t=e._source;return t.id=e._id,t}))}},p.record={search:function(e){return(e=e||{}).from=e.from||0,e.size=e.size||20,e._source=e._source||d.commons,e.highlight=e.highlight||{fields:{title:{},description:{}}},t.all([b(),p.raw.search(e)]).then((function(t){var n=t[0];if(!(t=t[1])||!t.hits||!t.hits.total)return{total:0,hits:[]};var i=r.util.findObjectInTree(e.query,"geo_distance"),a=i&&i.geoPoint,o=i&&i.distance&&i.distance.replace(new RegExp("[0-9 ]+","gm"),""),s=t.hits.hits.reduce((function(e,t){var i=g(t,n);return i.id=t._id,a&&i.geoPoint&&o&&(i.distance=c.point.distance(a.lat,a.lon,i.geoPoint.lat,i.geoPoint.lon,o)),e.concat(i)}),[]);return{total:t.hits.total,hits:s}}))},load:function(e,n){return(n=n||{}).raw=!!angular.isDefined(n.raw)&&n.raw,n.fecthPictures=angular.isDefined(n.fetchPictures)?n.fetchPictures:n.raw,t.all([b(),n.fecthPictures?p.raw.get({id:e}):p.raw.getCommons({id:e})]).then((function(e){var t=e[0],i=e[1],a=g(i,t);return n.raw||(a.description=r.util.parseAsHtml(a.description,{tagState:"app.wot_lookup.tab_registry"})),o.extend({pubkey:a.issuer}).then((function(e){return{id:i._id,issuer:e,record:a}}))}))},add:r.record.post("/page/record",{tagFields:["title","description"],creationTime:!0}),update:r.record.post("/page/record/:id/_update",{tagFields:["title","description"]}),remove:r.record.remove("page","record"),fields:{commons:d.commons},picture:{all:r.get("/page/record/:id?_source=pictures")},like:l.instance("page","record"),comment:s.instance("page")},p.currency={all:r.get("/currency/record/_search?_source=currencyName,peers.host,peers.port"),get:r.get("/currency/record/:id/_source")},p}]),angular.module("cesium.es.social.services",["cesium.es.crypto.services"]).factory("SocialUtils",["$filter","$q","CryptoUtils","BMA","csWallet","esCrypto","$timeout",function(e,t,n,i,a,o,r){function s(){var s={URI:"([a-zA−Z0-9]+)://[ a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",EMAIL:"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",PHONE:"[+]?[0-9. ]{9,15}",socials:{facebook:"https?://((fb.me)|((www.)?facebook.com))",twitter:"https?://(www.)?twitter.com",googleplus:"https?://plus.google.com(/u)?",youtube:"https?://(www.)?youtube.com",github:"https?://(www.)?github.com",tumblr:"https?://(www.)?tumblr.com",snapchat:"https?://(www.)?snapchat.com",linkedin:"https?://(www.)?linkedin.com",vimeo:"https?://(www.)?vimeo.com",instagram:"https?://(www.)?instagram.com",wordpress:"https?://([a-z]+)?wordpress.com",diaspora:"https?://(www.)?((diaspora[-a-z]+)|(framasphere)).org",duniter:"duniter://[a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",bitcoin:"bitcoin://[a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",curve25519:"curve25519://("+i.constants.regexp.PUBKEY+"):([a-zA-Z0-9]+)@([a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+)"}};function l(e){return new RegExp("^"+e+"$")}function c(e){var t;if(s.URI.test(e)){var n=s.URI.exec(e)[1],i=e;if("http"==n||"https"==n){var a=e.indexOf("/",n.length+3);a>0&&(i=e.substring(0,a))}_.keys(s.socials).forEach((function(e){if(s.socials[e].test(i))return t=e,!1})),t||(t="web")}else s.EMAIL.test(e)?t="email":s.PHONE.test(e)&&(t="phone");return t||console.warn("[ES] [social] Unable to detect type of social URL: "+e),t}function u(e){if((e=e?e.trim():e)&&e.length>0)return e.startsWith("www.")&&(e="http://"+e),{type:c(e),url:e}}function d(t){if(!t||!t.length)return[];var n={};return t.forEach((function(t){if("curve25519"==t.type?(delete t.issuer,t.valid&&angular.merge(t,u(t.url))):t=u(t.url),t){var i=e("formatSlug")(t.url);n[i]=t}})),_.values(n)}return s.URI=l(s.URI),s.EMAIL=l(s.EMAIL),s.PHONE=l(s.PHONE),_.keys(s.socials).forEach((function(e){s.socials[e]=l(s.socials[e])})),{get:u,reduce:d,createForEncryption:function(e,t){return{recipient:e,type:"curve25519",url:t}},open:function e(i,l,c){if(c=c||a.data.pubkey,!n.isLoaded())return console.debug("[socials] Waiting crypto lib loading..."),r((function(){return e(i,l,c)}),100);var u=_.filter(i||[],(function(e){var t=e.url&&"curve25519"==e.type&&s.socials.curve25519.exec(e.url);return!!t&&(e.recipient=t[1],e.nonce=t[2],e.url=t[3],e.issuer=l,e.valid=e.recipient===c,e.valid)}));return u.length?o.box.open(u,void 0,"issuer","url").then((function(){return d(i)})):t.when(d(i))},pack:function e(i){if(!n.isLoaded())return console.debug("[socials] Waiting crypto lib loading..."),r((function(){return e(i)}),100);var a=_.filter(i||[],(function(e){return"curve25519"==e.type&&e.url&&e.recipient}));return a.length?n.util.random_nonce().then((function(e){return t.all(a.reduce((function(t,n){return t.concat(o.box.pack(n,void 0,"recipient","url",e))}),[]))})).then((function(e){return e.reduce((function(e,t){return e.concat({type:"curve25519",url:"curve25519://{0}:{1}@{2}".format(t.recipient,t.nonce,t.url)})}),[])})):t.when(i)}}}var l=s();return l.instance=s,l}]),angular.module("cesium.es.crypto.services",["ngResource","cesium.services"]).factory("esCrypto",["$q","$rootScope","CryptoUtils",function(e,t,n){function i(t){if(!t)throw new Error("Missing keypair");return t.boxPk&&t.boxSk?e.when(t):e.all([n.box.keypair.skFromSignSk(t.signSk),n.box.keypair.pkFromSignPk(t.signPk)]).then((function(e){return{boxSk:e[0],boxPk:e[1]}}))}return{box:{getKeypair:i,pack:function(t,a,o,r,s){if(!t[o=o||"recipient"])return e.reject({message:"ES_WALLET.ERROR.RECIPIENT_IS_MANDATORY"});"string"==typeof(r=r||"content")&&(r=[r]),t=angular.copy(t);var l=n.util.decode_base58(t[o]);return e.all([i(a),n.box.keypair.pkFromSignPk(l),s?e.when(s):n.util.random_nonce()]).then((function(i){var a=i[0].boxSk,o=i[1],s=i[2];return e.all(r.reduce((function(e,i){return t[i]?e.concat(n.box.pack(t[i],s,o,a)):e}),[])).then((function(e){var i=0;return _.forEach(r,(function(n){t[n]?t[n]=e[i++]:t[n]=null})),t.nonce=n.util.encode_base58(s),t}))}))},open:function(t,a,o,r){o=o||"issuer","string"==typeof(r=r||"content")&&(r=[r]);var s=Date.now(),l={},c=[i(a)];return e.all(t.reduce((function(e,t){var i=t[o];if(!i)throw"Record has no "+o;return l[i]?res:e.concat(n.box.keypair.pkFromSignPk(n.util.decode_base58(i)).then((function(e){l[i]=e})))}),c)).then((function(i){var a=i[0];return e.all(t.reduce((function(e,t){var i=l[t[o]],s=n.util.decode_base58(t.nonce);return t.valid=!0,e.concat(r.reduce((function(e,o){return t[o]?e.concat(n.box.open(t[o],s,i,a.boxSk).then((function(e){t[o]=e})).catch((function(e){console.error(e),console.warn("[ES] [crypto] a record may have invalid cypher "+o),t.valid=!1}))):e}),[]))}),[]))})).then((function(){return console.debug("[ES] [crypto] All record decrypted in "+(Date.now()-s)+"ms"),t}))}}}}]),angular.module("cesium.es.profile.services",["cesium.services","cesium.es.http.services","cesium.es.like.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esProfile")}]).factory("esProfile",["$rootScope","$q","esHttp","SocialUtils","csWot","csWallet","csCache","csPlatform","esSettings","esLike",function(e,t,n,i,a,o,r,s,l,c){var u,d=this;function p(e,t){return((t=t||{}).raw?d.raw.getAll:d.raw.get)({id:e}).then((function(a){if(a&&a.found&&a._source){var r={name:a._source.title,source:a._source};return r.name&&r.name.length>30&&(r.name=r.name.substr(0,27)+"..."),r.avatar=n.image.fromHit(a,"avatar"),!t.raw&&r.source.description&&(r.descriptionHtml=n.util.parseAsHtml(r.source.description)),r.source.socials&&r.source.socials.length&&(r.source.socials=_.uniq(r.source.socials,!1,(function(e){return e.url}))),o.isLogin()?i.open(r.source.socials,e).then((function(){return r})):(r.source.socials=_.filter(r.source.socials,(function(e){return"curve25519"!==e.type})),r)}})).catch((function(e){if(e&&e.ucode&&404==e.ucode)return null;throw e}))}function m(e,t){return E(null,e,t)}function E(e,i,a,o){if(o=o||t.defer(),!(e||i&&i.length))return o.resolve(i),o.promise;var r;a=a||"pubkey";var s,c=(e=e?e.toLowerCase().trim():e)?n.util.parseTags(e):void 0,u={query:{},highlight:{fields:{title:{},tags:{}}},from:0,size:100,_source:["title","avatar._content_type"]},p=e&&l.wot.isMixedSearchEnable();if(p&&(u._source=u._source.concat(["description","city","creationTime","membersCount","type"]),console.debug("[ES] [profile] Mixed search: enable")),i.length>0){r={},_.forEach(i,(function(e){var t=e[a];if(t){var n=r[t];n?n.push(e):(n=[e],r[t]=n)}}));var m=_.keys(r);u.size=m.length<=u.size?u.size:m.length,e?(u.query.bool={should:[{terms:{"_id^4":m}},{match:{title:{query:e,boost:2}}},{prefix:{title:e}}]},c&&u.query.bool.should.push({terms:{tags:c}})):(delete u.highlight,u.query.constant_score={filter:{terms:{_id:m}}})}else{if(!e)return o.resolve(i),o.promise;u.query.bool={should:[{match:{title:{query:e,boost:2}}},{prefix:{title:e}}]},c&&u.query.bool.should.push({terms:{tags:c}})}return e&&p&&(u.indices_boost={user:100,page:1,group:.01}),(p?d.raw.mixedSearch:d.raw.search)(u).then((function(e){if((s=e.hits).total>0){var t,l={};_.forEach(s.hits,(function(e){var o="avatar";if("user"==e._index){if(!(t=r&&r[e._id])){var s={};s[a]=e._id,t=[s],i.push(s)}}else if("user"!=e._index){l[e._index]||(l[e._index]=!0,i.push({id:"divider-"+e._index,divider:!0,index:e._index}));var c={id:e._index+"-"+e._id,index:e._index,templateUrl:"plugins/es/templates/wot/lookup_item_{0}.html".format(e._index),state:"app.view_{0}".format(e._index),stateParams:{id:e._id,title:e._source.title},creationTime:e._source.creationTime,memberCount:e._source.memberCount,type:e._source.type};t=[c],i.push(c),o="avatar"}var u=n.image.fromHit(e,o);_.forEach(t,(function(t){t.avatar=u,function(e,t,i){e.avatar=e.avatar||n.image.fromHit(t,"avatar"),e.name=t._source.title,e.name&&e.name.length>30&&(e.name=e.name.substr(0,27)+"..."),e.description=t._source.description||e.description,e.city=t._source.city||e.city,t.highlight&&(t.highlight.title&&(e.name=t.highlight.title[0]),t.highlight.tags&&(e.tags=t.highlight.tags.reduce((function(e,t){return e.concat(t.replace("<em>","").replace("</em>",""))}),[])))}(t,e)}))})),_.keys(l).length&&i.splice(0,0,{id:"divider-identities",divider:!0,index:"profile"})}o.resolve(i)})).catch((function(e){e&&e.ucode&&404==e.ucode?o.resolve(i):o.reject(e)})),o.promise}function b(e,n){return n=n||t.defer(),e&&e.pubkey?(console.debug("[ES] [profile] Extending identity {{0}} ...".format(e.pubkey.substr(0,8))),t.all([p(e.pubkey).then((function(t){t?(e.name=t.name,e.avatar=t.avatar,e.profile=e.profile||{},angular.merge(e.profile,t.source,{descriptionHtml:t.descriptionHtml})):(e.name=null,e.avatar=null,e.profile=null),n.resolve(e)})),m((e.received_cert||[]).concat(e.received_cert_pending||[]).concat(e.given_cert||[]).concat(e.given_cert_pending||[]))]).catch((function(e){n.reject(e)})),n.promise):(n.resolve(),n.promise)}function g(){var t=n.alive;!t&&u&&u.length>0?(console.debug("[ES] [profile] Disable"),_.forEach(u,(function(e){e()})),u=[]):!t||u&&0!==u.length||(console.debug("[ES] [profile] Enable"),function(){u=[a.api.data.on.load(e,b,this),a.api.data.on.search(e,E,this)]}())}return d.raw={getFields:n.get("/user/profile/:id?&_source_exclude=avatar._content&_source=:fields"),get:n.get("/user/profile/:id?&_source_exclude=avatar._content",r.constants.MEDIUM),getAll:n.get("/user/profile/:id",r.constants.MEDIUM),search:n.post("/user/profile/_search",r.constants.MEDIUM),mixedSearch:n.post("/user,page,group/profile,record/_search",r.constants.MEDIUM),remove:n.record.remove("user","profile")},s.ready().then((function(){return n.api.node.on.start(e,g,this),n.api.node.on.stop(e,g,this),g()})),{getAvatarAndName:function(e){return d.raw.getFields({id:e,fields:"title,avatar._content_type"}).then((function(e){var t;return e&&e._source&&((t={name:e._source.title}).avatar=n.image.fromHit(e,"avatar")),t})).catch((function(e){if(e&&e.ucode&&404==e.ucode)return null;throw e}))},get:p,add:n.record.post("/user/profile",{tagFields:["title","description"],ignoreFields:["enableGeoPoint","descriptionHtml","moderator"]}),update:n.record.post("/user/profile/:id/_update",{tagFields:["title","description"],ignoreFields:["enableGeoPoint","descriptionHtml","moderator"]}),remove:function(e,t){return d.raw.remove(e,t).then((function(e){return r.clear("csWot-"),r.clear("csWot-"),e}))},avatar:n.get("/user/profile/:id?_source=avatar"),fillAvatars:m,like:c.instance("user","profile")}}]),angular.module("cesium.es.notification.services",["cesium.platform","cesium.es.http.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esNotification")}]).factory("esNotification",["$rootScope","$q","$timeout","$translate","$state","csHttp","csConfig","csSettings","esHttp","esSettings","csWallet","csWot","UIUtils","filterTranslations","BMA","CryptoUtils","csPlatform","Api",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b,g,f){var T,h,v={MESSAGE_CODES:["MESSAGE_RECEIVED"],INVITATION_CODES:["INVITATION_TO_CERTIFY"],DEFAULT_LOAD_SIZE:20},I={commons:["type","code","params","reference","recipient","time","hash","read_signature"]},O=this,N=new f(this,"esNotification");function R(e,t){(t=t||{}).codes=t.codes||{},t.codes.excludes=t.codes.excludes||v.EXCLUDED_CODES;var n={bool:{must:[{term:{recipient:e}}]}};if(t.codes&&t.codes.includes)n.bool.must.push({terms:{code:t.codes.includes}});else{var i=[];s.getByPath("plugins.es.notifications.txSent",!1)||i.push("TX_SENT"),s.getByPath("plugins.es.notifications.txReceived",!0)||i.push("TX_RECEIVED"),s.getByPath("plugins.es.notifications.certSent",!1)||i.push("CERT_SENT"),s.getByPath("plugins.es.notifications.certReceived",!0)||i.push("CERT_RECEIVED"),t.codes.excludes&&_.forEach(t.codes.excludes,(function(e){i.push(e)})),i.length&&(n.bool.must_not={terms:{code:i}})}return t.readTime&&n.bool.must.push({range:{time:{gt:t.readTime}}}),n}function A(e,n){if(!e)return t.reject("[ES] [notification] Unable to load - missing pubkey");var i={query:R(e,n)};return i.query.bool.must.push({missing:{field:"read_signature"}}),O.raw.postCount(i).then((function(e){return e.count}))}function S(e){var t=(e=e||{}).wallet||u;return new Promise((function(e){if(!t.data||!t.data.events||!t.data.events.length)return e([]);var n=o.date.now()-m.MEDIAN_TIME_OFFSET;e((t.data.events||[]).reduce((function(e,i){if("warn"!==i.type&&"error"!==i.type)return e;var a=new $({},(function(e){e.read||(e.read=!0,t.data.notifications&&t.data.notifications.warnCount>0&&t.data.notifications.warnCount--)}));return a.id=i.code,a.time=n,a.read=!1,a.state="app.view_wallet",a.avatarIcon="ion-alert-circled",a.icon="ion-alert-circled assertive",a.message=i.message,a.messageParams=i.messageParams,e.concat(a)}),[]))}))}function C(t){if(t&&u.isLogin())if(_.contains(v.INVITATION_CODES,t.code))N.event.raise.newInvitation(t);else{if(!_.contains(v.MESSAGE_CODES,t.code)){var n=new $(t,k);return n.id=t.id||n.id,d.extendAll([n]).then((function(){e.$$phase?L(n):e.$applyAsync((function(){L(n)}))})).then((function(){if(c.notifications.isEmitHtml5Enable())return y(n)}))}N.event.raise.newMessage(t)}}function L(e){return u.data.notifications=u.data.notifications||{},u.data.notifications.unreadCount++,N.data.raise.new(e),e}function D(e){return e?String(e).replace(/<[^>]*>/gm,"").replace(/&[^;]+;/gm,""):""}function y(n,o){t.all([i(o||"COMMON.NOTIFICATION.TITLE"),i(n.message,n)]).then((function(t){P(D(t[0]),{body:D(t[1]),icon:n.avatar&&n.avatar.src||"./img/logo.png",lang:i.use(),tag:n.id,onclick:function(){e.$applyAsync((function(){"function"==typeof n.markAsRead&&n.markAsRead(),n.state&&a.go(n.state,n.stateParams)}))}})}))}function P(e,t){if("Notification"in window)if("granted"===Notification.permission){var n=new Notification(e,t);n.onclick=t.onclick||n.onclick}else"denied"!==Notification.permission&&Notification.requestPermission((function(n){"granted"===n&&P(e,t)}))}function k(e){if(!e.read&&e.id)if(e.id){if(u.isAuth())return e.read=!0,u.getKeypair().then((function(t){return b.sign(e.hash,t).then((function(t){return O.raw.postReadById(t,{id:e.id})})).catch((function(e){console.error("[ES] [notification] Error while trying to mark event as read.",e)}))}))}else console.error("[ES] [notification] Could not mark as read: no 'id' found!",e)}function M(e){e.notifications=e.notifications||{},e.notifications.unreadCount=null,e.notifications.warnCount=null,e.notifications.time=null,h&&(console.debug("[ES] [notification] Closing websocket..."),h(),h=null)}function w(e,i){if(i=i||t.defer(),!e||!e.pubkey||!e.keypair)return n((function(){i.resolve(e)})),i.promise;var a=Date.now(),o=Math.trunc(a/1e3);if(e.notifications&&e.notifications.time&&o-e.notifications.time<30)return e.notifications.warnCount=B(e),console.debug("[ES] [notification] Skipping load (loaded "+(o-e.notifications.time)+"s ago)"),n((function(){i.resolve(e)})),i.promise;var r=u.isUserPubkey(e.pubkey);return console.debug("[ES] [notification] Loading count..."+e.pubkey.substr(0,8)),A(e.pubkey,{readTime:e.notifications&&e.notifications.time||0,excludeCodes:v.EXCLUDED_CODES}).then((function(t){e.notifications=e.notifications||{},e.notifications.unreadCount=t,e.notifications.warnCount=B(e),t>0&&c.notifications.isEmitHtml5Enable()&&r&&n((function(){y({message:"COMMON.NOTIFICATION.HAS_UNREAD",count:t,state:"app.view_notifications"},e.ui||e.name||e.pubkey&&e.pubkey.substr(0,8))}),500),console.debug("[ES] [notification] Loaded count ("+t+") in "+(Date.now()-a)+"ms"),i.resolve(e)})).catch((function(t){console.error("Error while counting notification: "+(t.message?t.message:t)),i.resolve(e)})),i.promise}function U(e,t){return w(e,t).then((function(){console.debug("[ES] [notification] Starting listen user event...");var t=O.raw.ws.getUserEvent();t.on(C,{pubkey:e.pubkey,locale:s.data.locale.id}).catch((function(e){console.error("[ES] [notification] Unable to listen user event",e),p.alert.error("ACCOUNT.ERROR.WS_CONNECTION_FAILED")})),h=function(){t.close()}}))}function B(e){return e.events?e.events.reduce((function(e,t){return"warn"==t.type?e+1:e}),0):0}function x(){var t=l.alive;if(!t&&T&&T.length>0)console.debug("[ES] [notification] Disable"),_.forEach(T,(function(e){e()})),T=[],u.isLogin()&&M(u.data);else if(t&&(!T||0===T.length)&&(console.debug("[ES] [notification] Enable"),function(){T=[u.api.data.on.login(e,U,this),u.api.data.on.load(e,w,this),u.api.data.on.init(e,M,this),u.api.data.on.reset(e,M,this)]}(),u.isLogin()))return U(u.data)}return v.EXCLUDED_CODES=v.MESSAGE_CODES.concat(v.INVITATION_CODES),O.raw={postCount:l.post("/user/event/_count"),postSearch:l.post("/user/event/_search"),postReadById:l.post("/user/event/:id/_read"),ws:{getUserEvent:l.ws("/ws/event/user/:pubkey/:locale"),getChanges:l.ws("/ws/_changes")}},N.registerEvent("data","new"),N.registerEvent("event","newInvitation"),N.registerEvent("event","newMessage"),g.ready().then((function(){return l.api.node.on.start(e,x,this),l.api.node.on.stop(e,x,this),x()})),O.load=function(e){if(!(e=e||{}).pubkey)return t.reject("[ES] [notification] Unable to load - missing options.pubkey");e.from=e.from||0,e.size=e.size||v.DEFAULT_LOAD_SIZE;var n={query:R(e.pubkey,e),sort:[{time:{order:"desc"}}],from:e.from,size:e.size,_source:I.commons};return t.all([S(e),O.raw.postSearch(n)]).then((function(e){var t=e[0]||[];if(!(e=e[1]).hits||!e.hits.total)return t;var n=e.hits.hits.reduce((function(e,t){var n=new $(t._source,k);return n.id=t._id,e.concat(n)}),t);return d.extendAll(n)}))},O.unreadCount=A,O.html5={emit:P},O.api=N,O.websocket={event:O.raw.ws.getUserEvent,change:O.raw.ws.getChanges},O.constants=v,O}]),angular.module("cesium.es.message.services",["ngResource","cesium.platform","cesium.es.http.services","cesium.es.wallet.services","cesium.es.notification.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esMessage")}]).factory("esMessage",["$q","$rootScope","$timeout","UIUtils","Api","CryptoUtils","csPlatform","csConfig","csSettings","esHttp","csWallet","esWallet","csWot","esNotification",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m){var E,b=10,g={commons:["issuer","recipient","title","content","time","nonce","read_signature"],notifications:["issuer","time","hash","read_signature"]},f={postSearch:c.post("/message/inbox/_search"),postSearchByType:c.post("/message/:type/_search"),getByTypeAndId:c.get("/message/:type/:id"),postReadById:c.post("/message/inbox/:id/_read")},T=new a(this,"esMessage");function h(e){e.messages=e.messages||{},e.messages.unreadCount=null,e.messages.time=null}function v(e){e.messages&&delete e.messages}function I(t,i){if(i=i||e.defer(),!t||!t.pubkey)return n((function(){i.resolve(t)})),i.promise;var a=Date.now(),o=Math.trunc(a/1e3);return t.messages&&t.messages.time&&o-t.messages.time<30?(console.debug("[ES] [message] Skipping load (loaded "+(o-t.messages.time)+"s ago)"),n((function(){i.resolve(t)})),i.promise):(console.debug("[ES] [message] Loading count..."),function(e){var t=(e=e||{}).wallet||e.walletId&&u.children.get(e.walletId)||u,n=e.pubkey||t&&t.data&&t.data.pubkey;if(!n)throw new Error("no pubkey or wallet found in options, and user not connected.");var i={query:{bool:{must:[{term:{recipient:n}},{missing:{field:"read_signature"}}]}}};return c.post("/message/inbox/_count")(i).then((function(e){return e.count}))}({pubkey:t.pubkey}).then((function(e){t.messages=t.messages||{},t.messages.unreadCount=e,t.messages.time=o,console.debug("[ES] [message] Loaded count ("+e+") in "+(Date.now()-a)+"ms"),i.resolve(t)})).catch((function(e){console.error("Error while counting messages: "+(e.message?e.message:e)),i.resolve(t)})),i.promise)}function O(e,t){console.debug("[ES] [message] detected new message (from notification service)");var n=new $(e);if(n.issuer=n.pubkey,delete n.pubkey,n.issuer){if(!(t=t||n.issuer&&u.isUserPubkey(n.issuer)&&u||n.issuer&&u.children.getByPubkey(n.issuer)))throw new Error("No wallet for pubkey: {0}".format(n.issuer.substring(0,6)));p.extend(n,"issuer").then((function(){t.data.messages=t.data.messages||{},t.data.messages.unreadCount++,T.data.raise.new(n)}))}}function N(e,t,n,i){return n=n||"/message/inbox",d.box.record.pack(e,t,i,["title","content"]).then((function(e){return c.record.post(n)(e,{pubkey:e.issuer,keypair:t})}))}function R(e,t){e=e||u.data.pubkey,(t=t||{}).type=t.type||"inbox",t.from=t.from||0,t.size=t.size||1e3,t._source=t._source||g.commons;var n={sort:{time:"desc"},from:t.from,size:t.size,_source:t._source};return"inbox"==t.type?n.query={bool:{filter:{term:{recipient:e}}}}:n.query={bool:{filter:{term:{issuer:e}}}},f.postSearchByType(n,{type:t.type}).then((function(e){if(!e||!e.hits||!e.hits.total)return[];var n=e.hits.hits.reduce((function(e,n){var i=n._source||{};return i.id=n._id,i.read="outbox"==t.type||!!i.read_signature,delete i.read_signature,e.concat(i)}),[]);return console.debug("[ES] [message] Loading {0} {1} messages".format(n.length,t.type)),n}))}function A(t,n,i){var a=Date.now(),r={},s=[d.box.getKeypair(n)];return e.all(t.reduce((function(e,t){return r[t.issuer]?res:e.concat(o.box.keypair.pkFromSignPk(o.util.decode_base58(t.issuer)).then((function(e){r[t.issuer]=e})))}),s)).then((function(n){var a=n[0];return e.all(t.reduce((function(e,t){var n=r[t.issuer],s=o.util.decode_base58(t.nonce);return t.valid=!0,e.concat(o.box.open(t.title,s,n,a.boxSk).then((function(e){t.title=e})).catch((function(e){console.error(e),console.warn("[ES] [message] may have invalid cypher title"),t.valid=!1})),o.box.open(t.content,s,n,a.boxSk).then((function(e){t.content=e,i?function(e){e.content&&(e.summary=e.content.replace(/(^|[\n\r]+)\s*>[^\n\r]*/g,"").trim(),e.summary.length>140&&(e.summary=e.summary.substr(0,137)+"..."))}(t):e&&(t.html=c.util.parseAsHtml(e))})).catch((function(e){console.error(e),console.warn("[ES] [message] may have invalid cypher content"),t.valid=!1})))}),[]))})).then((function(){return console.debug("[ES] [message] All messages decrypted in "+(Date.now()-a)+"ms"),t}))}function S(e){return _.sortBy(e,(function(e){return-1*(1e3*(e.titleMatch||0)+100*(e.contentMatch||0)+e.time/1e10)}))}function C(t){var n=s.developers||[{pubkey:"38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"}];t&&t.content&&n&&n.length&&(console.info("[ES] [message] Sending logs to developers..."),t.issuer=u.data.pubkey,t.title=t.title||"Sending log",t.time=moment().utc().unix(),u.getKeypair().then((function(i){return e.all(n.reduce((function(e,n){return n.pubkey?e.concat(N(angular.merge({recipient:n.pubkey},t),i)):e}),[]))})).then((function(e){console.info("[ES] [message] Logs sent to {0} developers".format(e.length))})))}function L(){var e=c.alive;!e&&E&&E.length>0?(console.debug("[ES] [message] Disable"),_.forEach(E,(function(e){e()})),E=[],u.isLogin()&&v(u.data)):!e||E&&0!==E.length||(console.debug("[ES] [message] Enable"),function(){E=[u.api.data.on.init(t,h,this),u.api.data.on.login(t,I,this),u.api.data.on.load(t,I,this),u.api.data.on.reset(t,v,this),m.api.event.on.newMessage(t,O,this),u.api.error.on.send(t,C,this)]}(),u.isLogin()&&I(u.data))}return T.registerEvent("data","new"),T.registerEvent("data","delete"),T.registerEvent("data","sent"),r.ready().then((function(){return c.api.node.on.start(t,L,this),c.api.node.on.stop(t,L,this),L()})),{api:T,search:f.postSearch,notifications:{load:function(t){(t=t||{}).from=t.from||0,t.size=t.size||b;var n=t.wallet||t.walletId&&u.children.get(t.walletId)||u;if(delete t.wallet,!n.isLogin())return e.when([]);var i={sort:{time:"desc"},query:{bool:{filter:{term:{recipient:n.data.pubkey}}}},from:t.from,size:t.size,_source:g.notifications};return f.postSearch(i).then((function(e){if(!e||!e.hits||!e.hits.total)return[];var t=e.hits.hits.reduce((function(e,t){var n=t._source;return n.id=t._id,n.read=!!n.read_signature,delete n.read_signature,e.concat(n)}),[]);return p.extendAll(t,"issuer")}))}},load:function e(t){(t=t||{}).type=t.type||"inbox",t._source=g.commons,t.summary=!angular.isDefined(t.summary)||t.summary,t.filter=angular.isDefined(t.filter)?t.filter:void 0,t.from=t.from||0;var n=t.wallet||t.walletId&&u.children.get(t.walletId)||u;delete t.wallet;var i=n.auth().then((function(e){return R(e.pubkey,t).then((function(n){return A(n,e.keypair,t.summary)}))})).then((function(e){var n="inbox"==t.type?"issuer":"recipient";return p.extendAll(e,n)})).then((function(i){if(i.length&&t.filter){var a=function(e,t){return t&&!t.trim().length?e:(e.forEach((function(e){e.content&&(e.summary=e.content.replace(/(^|[\n\r]+)\s*>[^\n\r]*/g,"").trim()||"")})),t.trim().split(" ").forEach((function(t){var n=new RegExp(t,"gi");e.forEach((function(e){var i=n.exec(e.title);if(i)for(e.title=e.title.replace(n,"<b>$&</b>"),e.titleMatch=(e.titleMatch||0)+1;(i=n.exec(e.title.substring(i.index+t.length)))&&!(e.titleMatch>=10);)e.titleMatch=e.titleMatch+1;else if(i=n.exec(e.summary)){for(i.index>140&&(e.summary="..."+e.summary.substring(i.index-20)),e.summary=e.summary.replace(n,"<b>$&</b>"),e.contentMatch=(e.contentMatch||0)+1;(i=n.exec(e.summary.substring(i.index+t.length)))&&!(e.contentMatch>=10);)e.contentMatch++;e.summary.length>140&&(e.summary=e.summary.substr(0,137)+"...")}}))})),e=_.filter(e,(function(e){return e.titleMatch||e.contentMatch})))}(i,t.filter);if(a.length<i.length)return(t=angular.copy(t)).from+=t.size,t.size=i.length-a.length,t.wallet=n,e(t).then((function(e){return a.concat(e)}))}return 0!==t.from||t.filter||(n.data.messages=n.data.messages||{},n.data.messages.count=i.length),i}));return 0===t.from&&t.filter&&i.then(S),i},get:function(e,t,n){return t=t||"inbox",(n=n||{}).summary=!!angular.isDefined(n.summary)&&n.summary,(n.wallet||n.walletId&&u.children.get(n.walletId)||u).auth().then((function(i){return f.getByTypeAndId({id:e,type:t}).then((function(e){if(e.found){var a=e._source;return a.id=e._id,a.read="outbox"==t||!!a.read_signature,delete a.read_signature,A([a],i.keypair,n.summary).then((function(){var e="inbox"==t?"issuer":"recipient";return p.extend(a,e)}))}}))}))},send:function(e,t){var n=(t=t||{}).wallet||t.walletId&&u.children.get(t.walletId)||u;return delete t.wallet,e.issuer=e.issuer||n.data.pubkey,n.getKeypair().then((function(t){return N(e,t).then((function(n){return l.data.plugins.es.message&&angular.isDefined(l.data.plugins.es.message.outbox)&&!l.data.plugins.es.message.outbox?n:N(e,t,"/message/outbox","issuer").catch((function(e){return console.error("Failed to store message to outbox: "+e),n}))})).then((function(e){return T.data.raise.sent(e),e}))}))},remove:function(e,t,n){t=t||"inbox";var i=n.wallet||n.walletId&&u.children.get(n.walletId)||u;return c.record.remove("message",t)(e,{wallet:i}).then((function(n){return"inbox"===t&&(i.data.messages=i.data.messages||{},i.data.messages.count=i.data.messages.count>0?i.data.messages.count-1:0),i.isDefault()&&T.data.raise.delete(e),n}))},removeAll:function(t,n){t=t||"inbox";var i=n&&n.walletId&&u.children.get(n.walletId)||u;return i.auth().then((function(n){return R(n.pubkey,{type:t,from:0,size:1e3,_source:!1}).then((function(n){if(n&&n.length){var a=_.pluck(n,"id");return e.all(n.reduce((function(e,n){return e.concat(c.record.remove("message",t)(n.id,{wallet:i}))}),[])).then((function(){return a}))}})).then((function(e){"inbox"===t&&(i.data.messages=i.data.messages||{},i.data.messages.count=0,i.data.messages.unreadCount=0),i.isDefault()&&_.forEach(e,T.data.raise.delete)}))}))},markAsRead:function(t,n){var i=(n=n||{}).wallet||n.walletId&&u.children.get(n.walletId)||u,a=n&&n.type||(i.isUserPubkey(t.recipient)?"inbox":"outbox");if(t.read){var r=e.defer();return r.resolve(),r.promise}return t.read=!0,i.getKeypair().then((function(e){return o.sign(t.hash,e)})).then((function(e){return f.postReadById(e,{id:t.id})})).then((function(){"inbox"===a&&(i.data.messages=i.data.messages||{},i.data.messages.unreadCount=i.data.messages.unreadCount?i.data.messages.unreadCount-1:0)}))},markAllAsRead:function(t){var n=(t=t||{}).wallet||t.walletId&&u.children.get(t.walletId)||u;return n.auth().then((function(t){return R(t.pubkey,{type:"inbox",from:0,size:1e3,_source:["hash","read_signature"]}).then((function(n){if(n&&n.length)return n=_.filter(n,{read:!1}),e.all(n.reduce((function(e,n){return e.concat(o.sign(n.hash,t.keypair).then((function(e){return f.postReadById(e,{id:n.id})})))}),[]))})).then((function(){n.data.messages=n.data.messages||{},n.data.messages.unreadCount=0}))}))},fields:{commons:g.commons}}}]),angular.module("cesium.es.modal.services",["cesium.modal.services","cesium.es.message.services"]).factory("esModals",["$state","ModalUtils","UIUtils","csWallet",function(e,t,n,i){function a(){if(i.data.notifications.unreadCount=0,i.data.notifications&&i.data.notifications.history.length){var e=i.data.notifications.history[0],t=e?e.time:0;csSettings.data.wallet=csSettings.data.wallet||{},t&&csSettings.data.wallet.notificationReadTime!=t&&(csSettings.data.wallet.notificationReadTime=t,csSettings.store())}}return{showMessageCompose:function(e){return t.show("plugins/es/templates/message/modal_compose.html","ESMessageComposeModalCtrl",e,{focusFirstInput:!0})},showNotifications:function(t,i){return n.popover.show(i,{templateUrl:"plugins/es/templates/common/popover_notification.html",scope:t,autoremove:!1,afterHidden:a}).then((function(t){t&&(t.onRead&&"function"==typeof t.onRead&&t.onRead(),t.state&&e.go(t.state,t.stateParams))}))},showNewInvitation:function(e){return i.auth({minData:!0}).then((function(i){return n.loading.hide(),i.isMember?t.show("plugins/es/templates/invitation/modal_new_invitation.html","ESNewInvitationModalCtrl",e):n.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION")}))},showNewPage:function(a){var o=a&&a.wallet||i;return o.auth({minData:!0}).then((function(){return n.loading.hide(),t.show("plugins/es/templates/registry/modal_record_type.html",void 0,{title:"REGISTRY.EDIT.TITLE_NEW"}).then((function(t){t&&e.go("app.registry_add_record",{type:t,wallet:o.id})}))}))},showNetworkLookup:function(e){return t.show("plugins/es/templates/network/modal_network.html","ESNetworkLookupModalCtrl",e,{focusFirstInput:!1})}}}]),angular.module("cesium.es.blockchain.services",["cesium.services","cesium.es.http.services"]).factory("esBlockchain",["$rootScope","$q","$timeout","BMA","csCache","esHttp",function(e,n,i,a,o,r){return s=a.constants.regexp.PUBKEY,40,"ES_CORE_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))",l={SEARCH_FILTER:{TX_PUBKEY:new RegExp("\\(transactions\\.issuers:("+s+") OR transactions\\.outputs:\\*("+s+")\\)([ ]+AND)?"),ISSUER:new RegExp("issuer:("+s+")([ ]+AND)?"),MEMBER_FLOWS:new RegExp("\\(_exists_:joiners OR _exists_:leavers OR _exists_:revoked OR _exists_:excluded\\)([ ]+AND)?"),EXISTING_TRANSACTION:new RegExp("_exists_:transactions([ ]+AND)?"),PERIOD:new RegExp("medianTime:>=?([0-9]+)[ ]+AND[ ]+medianTime:<=?([0-9]+)([ ]+AND)?")},LAST_AND:/[ ]+AND$/},c={MINIMAL:["number","hash","medianTime","issuer"],COMMONS:["number","hash","medianTime","issuer","currency","version","powMin","dividend","membersCount","identities","joiners","actives","leavers","revoked","excluded","certifications","transactions"]},(u={node:{},block:{},raw:{block:{search:r.post("/:currency/block/_search",o.constants.SHORT),searchText:r.get("/:currency/block/_search?q=:text"),get:r.get("/:currency/block/:number/_source",o.constants.SHORT)}},regexp:{ES_CORE_API_ENDPOINT:new RegExp("^ES_CORE_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))$")}}).regex=u.regexp,u.node.parseEndPoint=function(e){var t=u.regexp.ES_CORE_API_ENDPOINT.exec(e);if(t)return{dns:t[2]||"",ipv4:t[4]||"",ipv6:t[6]||"",port:t[8]||80}},u.raw.block.processSearchResult=function(e,n){(n=n||{}).excludeCurrent=!angular.isDefined(n.excludeCurrent)||n.excludeCurrent,n.fillAvatar=!angular.isDefined(n.fillAvatar)||n.fillAvatar,n.cleanData=!angular.isDefined(n.cleanData)||n.cleanData;var i=!1;return{hits:(e&&e.hits&&e.hits.hits||[]).reduce((function(e,a){if("current"==a._id&&n.excludeCurrent)return i=!0,e;if(!a._source)return e;var o=new t(a._source);return n.cleanData&&o.cleanData(),e.concat(o)}),[]),took:e.took,total:e&&e.hits&&e.hits.total?i?e.hits.total-1:e.hits.total:0}},u.block.search=function(e,t){var n=t?angular.copy(t):{};return delete n.excludeCurrent,delete n.fillAvatar,delete n.skipData,n.from=n.from||0,n.size=n.size||40,n._source=t._source||c.COMMONS,t._source&&"*"==t._source&&delete n._source,u.raw.block.search(n,{currency:e}).then((function(e){return u.raw.block.processSearchResult(e,t)}))},u.block.searchText=function(e,t,n){n&&angular.isUndefined(n.excludeCurrent)&&(n.excludeCurrent=!0);var i=n?angular.copy(n):{};return delete i.excludeCurrent,delete i.fillAvatar,delete i.skipData,i.from=i.from||0,i.size=i.size||40,i._source=n._source||c.COMMONS.join(","),n._source&&"*"==n._source&&delete i._source,i.currency=e,i.text=t||"",u.raw.block.searchText(i).then((function(e){return u.raw.block.processSearchResult(e,n)}))},u.block.parseSearchText=function(e,t){var n=e;return{filters:t=_.keys(l.SEARCH_FILTER).reduce((function(e,t){var i=l.SEARCH_FILTER[t].exec(n);if(i){var a=i[0];n=n.replace(a,"");var o={type:t,text:a=a.replace(l.LAST_AND,""),params:i};return e.concat(o)}return e}),t||[]),text:n.trim()}},u;var s,l,c,u}]),angular.module("cesium.es.group.services",["cesium.platform","cesium.es.http.services","cesium.es.profile.services","cesium.es.notification.services","cesium.es.comment.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esGroup")}]).factory("esGroup",["$q","$rootScope","csPlatform","BMA","csSettings","esHttp","CryptoUtils","csWot","csWallet","esNotification","esComment",function(e,t,n,i,a,o,r,s,l,c,u){var d,p=50,m={list:["issuer","title","description","type","creationTime","avatar._content_type"],commons:["issuer","title","description","creationTime","time","signature"],notifications:["issuer","time","hash","read_signature"]},E={_internal:{}};function b(e){e.groups=e.groups||{},e.groups.unreadCount=null}function g(e){e.groups&&delete e.groups}function f(t,n){return n=n||e.defer(),t&&t.pubkey?(c.unreadCount(t.pubkey,{codes:{includes:["GROUP_INVITATION"],excludes:[]}}).then((function(e){t.groups=t.groups||{},t.groups.unreadCount=e,console.debug("[ES] [group] Detecting "+e+" unread notifications"),n.resolve(t)})).catch((function(e){console.error("Error while counting group notifications: "+(e.message?e.message:e)),n.resolve(t)})),n.promise):(n.resolve(),n.promise)}function T(e,t){if(e){var n=e._source;return t&&e.highlight&&(e.highlight.title&&(n.title=e.highlight.title[0]),e.highlight.description&&(n.description=e.highlight.description[0]),e.highlight.location&&(n.location=e.highlight.location[0]),e.highlight.tags&&(data.tags=e.highlight.tags.reduce((function(e,t){return e.concat(t.replace("<em>","").replace("</em>",""))}),[]))),t&&(n.description=o.util.parseAsHtml(n.description)),n.avatar=o.image.fromHit(e,"avatar"),e._source.pictures&&e._source.pictures.reduce&&(n.pictures=e._source.pictures.reduce((function(e,t){return e.concat(o.image.fromAttachment(t.file))}),[])),n}}function h(e){return E._internal.search(e).then((function(e){if(!e||!e.hits||!e.hits.total)return[];var t=e.hits.hits.reduce((function(e,t){var n=T(t,!0);return n.id=t._id,n?e.concat(n):e}),[]);return console.debug("[ES] [group] Loading {0} groups".format(t.length)),t}))}function v(e){return h({sort:{time:"desc"},from:(e=e||{}).from||0,size:e.size||p,_source:e._source||m.list})}function I(){var e=o.alive;!e&&d&&d.length>0?(console.debug("[ES] [group] Disable"),_.forEach(d,(function(e){e()})),d=[],l.isLogin()&&g(l.data)):!e||d&&0!==d.length||(console.debug("[ES] [group] Enable"),function(){d=[l.api.data.on.login(t,f,this),l.api.data.on.init(t,b,this),l.api.data.on.reset(t,g,this)]}(),l.isLogin()&&f(l.data))}return E._internal.search=o.post("/group/record/_search"),E._internal.get=o.get("/group/record/:id"),E._internal.getCommons=o.get("/group/record/:id?_source="+m.commons.join(",")),n.ready().then((function(){return o.api.node.on.start(t,I,this),o.api.node.on.stop(t,I,this),I()})),{record:{last:v,search:function(e){var t=(e=e||{}).text&&e.text.trim();if(!t)return v(e);var n={from:e.from||0,size:e.size||p,highlight:{fields:{title:{},tags:{}}},_source:e._source||m.list},a=[],o=[];return i.regexp.PUBKEY.test(t)?(o.push({term:{issuer:t}}),o.push({term:{pubkey:t}})):(t=t.toLowerCase(),a.push({multi_match:{query:t,fields:["title","description"],type:"phrase_prefix"}}),a.push({match:{title:t}}),a.push({match:{description:t}})),n.query={bool:{}},a.length>0&&(n.query.bool.should=a),o.length>0&&(n.query.bool.filter=o),h(n)},load:function(e,t){return(t=t||{}).fecthPictures=!!angular.isDefined(t.fetchPictures)&&t.fetchPictures,t.html=!angular.isDefined(t.html)||t.html,(t.fecthPictures?E._internal.get({id:e}):E._internal.getCommons({id:e})).then((function(e){var n=T(e,t.html);return s.extend({pubkey:n.issuer}).then((function(t){return{id:e._id,issuer:t,record:n}}))}))},add:o.record.post("/group/record",{tagFields:["title","description"]}),update:o.record.post("/group/record/:id/_update",{tagFields:["title","description"]}),remove:o.record.remove("group","record"),fields:{commons:m.commons},picture:{all:o.get("/group/record/:id?_source=pictures")},comment:u.instance("group")}}}]),angular.module("cesium.es.invitation.services",["cesium.platform","cesium.es.http.services","cesium.es.wallet.services","cesium.es.notification.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esInvitation")}]).factory("esInvitation",["$rootScope","$q","$timeout","CryptoUtils","csPlatform","Api","esHttp","csWallet","esWallet","csWot","esNotification",function(e,t,n,i,a,o,r,s,l,c,u){var d,p=this,m={DEFAULT_LOAD_SIZE:20},E={commons:["issuer","time","hash","content","nonce","comment"]},b=new o(this,"esInvitation");function g(e){e.invitations=e.invitations||{},e.invitations.unreadCount=null,e.invitations.time=null}function f(e){e.invitations&&delete e.invitations}function T(e,i){if(i=i||t.defer(),!e||!e.pubkey)return n((function(){i.resolve(e)})),i.promise;var a=Date.now(),o=Math.trunc(a/1e3);return e.invitations&&e.invitations.time&&o-e.invitations.time<30?(console.debug("[ES] [invitation] Skipping load (loaded {0}s ago)".format(o-e.invitations.time)),n((function(){i.resolve(e)})),i.promise):(console.debug("[ES] [invitation] Loading count..."),function(e){if(!(e=e||(s.isLogin()?s.data.pubkey:e)))throw new Error("User not connected or no pubkey");var t={query:{bool:{must:[{term:{recipient:e}}]}}};return r.post("/invitation/certification/_count")(t).then((function(e){return e.count}))}(e.pubkey).then((function(t){e.invitations=e.invitations||{},e.invitations.unreadCount=t,e.invitations.time=o,console.debug("[ES] [invitation] Loaded count ("+t+") in "+(Date.now()-a)+"ms"),i.resolve(e)})).catch((function(t){console.error("Error while counting invitation: "+(t.message?t.message:t)),i.resolve(e)})),i.promise)}function h(e){if(s.data.invitations&&s.data.invitations.list){var n=_.where(s.data.invitations.list,{type:"certification",pubkey:e.pubkey});if(n&&n.length)return t.all(n.reduce((function(e,t){return e.concat(O(t))}),[]))}}function v(t){console.debug("[ES] [invitation] detected new invitation (from notification service)"),s.isAuth()?I(t.reference.id,t.reference.type).then((function(e){s.data.invitations=s.data.invitations||{},s.data.invitations.unreadCount++,s.data.invitations.list&&s.data.invitations.list.splice(0,0,e),b.data.raise.new(e)})):e.$applyAsync((function(){s.data.invitations=s.data.invitations||{},s.data.invitations.unreadCount++}))}function I(e,n){return n=n||"certification",t.all([l.box.getKeypair(),p.raw[n].get({id:e,fields:E.commons.join(",")})]).then((function(e){var t=e[0],n=e[1],i=n._source;return i.id=n._id,i.type=n._type,l.box.record.open([i],t,"issuer",["content","comment"])})).then((function(e){var t=e[0];if(t&&t.valid){var n=new q(t);return c.extendAll(n.issuer?[n,n.issuer]:[n],"pubkey").then((function(){return n}))}}))}function O(e,t){if(!e||!e.id)throw"Invalid invitation (empty or without id). Could not delete.";var n=e.type||"certification",i=t&&t.walletId&&s.children.get(t.walletId)||s;return p.raw[n].remove(e.id,{wallet:i}).then((function(){i.data.invitations.unreadCount=0,i.data.invitations&&i.data.invitations.list&&i.data.invitations.list.splice(i.data.invitations.list.indexOf(e),1)}))}function N(e,n,i){return e&&e.length?(n=n||"certification",t.all(e.reduce((function(e,t){return e.concat(p.raw[n].remove(t,i))}),[]))):t.when()}function R(){var t=r.alive;!t&&d&&d.length>0?(console.debug("[ES] [invitations] Disable"),_.forEach(d,(function(e){e()})),d=[],s.isLogin()&&f(s.data)):!t||d&&0!==d.length||(console.debug("[ES] [invitations] Enable"),function(){d=[s.api.data.on.init(e,g,this),s.api.data.on.login(e,T,this),s.api.data.on.load(e,T,this),s.api.data.on.reset(e,f,this),s.api.action.on.certify(e,h,this),u.api.event.on.newInvitation(e,v,this)]}(),s.isLogin()&&T(s.data))}return p.raw={certification:{get:r.get("/invitation/certification/:id?_source:fields"),add:r.record.post("/invitation/certification"),postSearch:r.post("/invitation/certification/_search"),remove:r.record.remove("invitation","certification"),getIds:r.get("/invitation/certification/_search?q=recipient::pubkey&_source=false&size=1000")}},b.registerEvent("data","new"),a.ready().then((function(){return r.api.node.on.start(e,R,this),r.api.node.on.stop(e,R,this),R()})),p.api=b,p.load=function(e,n){if(!s.isLogin())return t.when([]);(e=e||{}).from=e.from||0,e.size=e.size||m.DEFAULT_LOAD_SIZE;var i={sort:{time:"desc"},query:{bool:{filter:{term:{recipient:e.issuer||s.data.pubkey}}}},from:e.from,size:e.size,_source:E.commons};return e.readTime&&(query.bool.must=[{range:{time:{gt:e.readTime}}}]),p.raw.certification.postSearch(i).then((function(e){if(!e||!e.hits||!e.hits.total)return[];var t=e.hits.hits.reduce((function(e,t){var n=t._source;return n.id=t._id,n.type=t._type,n.read=!!n.read_signature,delete n.read_signature,e.concat(n)}),[]);return l.box.record.open(t,n,"issuer",["content","comment"])})).then((function(t){var n=[];return t=t.reduce((function(e,t){if(!t||!t.valid)return e;var i=new q(t);return n.push(i),i.issuer&&n.push(i.issuer),e.concat(i)}),[]),c.extendAll(n,"pubkey").then((function(){return s.data.invitations=s.data.invitations||{},s.data.invitations.list?(s.data.invitations.list.length&&s.data.invitations.list.splice(e.from,s.data.invitations.list.length-e.from),_.forEach(t,(function(e){s.data.invitations.list.push(e)}))):s.data.invitations.list=t,s.data.invitations.list}))}))},p.get=I,p.send=function(e,t){(t=t||{}).type=t.type||"certification";var n=t.keypair||t.wallet&&t.wallet.data.keypair;return l.box.record.pack(e,n,"recipient",["content","comment"]).then((function(e){return p.raw[t.type].add(e,t)}))},p.delete=O,p.deleteByIds=N,p.deleteAll=function(e,t){e=e||"certification";var n=Date.now();console.debug("[ES] [invitation] Deleting all {0} invitations...".format(e));var i=t&&t.pubkey&&s.children.getByPubkey(t.pubkey)||t&&t.walletId&&s.children.getByPubkey(t.walletId)||s,a=i.data.invitations&&i.data.invitations.count||0,o=i.data.invitations&&i.data.invitations.unreadCount||0;return p.raw[e].getIds({pubkey:i.data.pubkey}).then((function(t){if(t&&t.hits&&t.hits.total)return N(t.hits.hits.reduce((function(e,t){return e.concat(t._id)}),[]),e,{walletId:i.id}).then((function(){i.data.invitations=i.data.invitations||{},i.data.invitations.count>=a?i.data.invitations.count-=a||0:i.data.invitations.count=0,i.data.invitations.unreadCount>=o?i.data.invitations.unreadCount-=o||0:i.data.invitations.unreadCount=0,console.debug("[ES] [invitation] All {0} invitations deleted in {1}ms".format(e,Date.now()-n))}))}))},p.constants=m,p}]),angular.module("cesium.es.subscription.services",["cesium.platform","cesium.es.http.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esSubscription")}]).factory("esSubscription",["$rootScope","$q","$timeout","esHttp","$state","$sce","$sanitize","esSettings","CryptoUtils","UIUtils","csWallet","csWot","BMA","csPlatform","esWallet",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){var b,g=this;function f(e){e.subscriptions=null}function T(e,n){return n=n||t.defer(),e&&e.pubkey&&e.keypair?(console.debug("[ES] [subscription] Loading subscriptions count..."),g.raw.count({pubkey:e.pubkey}).then((function(t){e.subscriptions=e.subscriptions||{},e.subscriptions.count=t&&t.hits&&t.hits.total,console.debug("[ES] [subscription] Loaded count ("+e.subscriptions.count+")"),n.resolve(e)})).catch((function(t){console.error("[ES] [subscription] Error while counting subscription: "+(t.message?t.message:t)),n.resolve(e)})),n.promise):(n.resolve(),n.promise)}function h(){var t=i.alive;if(!t&&b&&b.length>0){if(console.debug("[ES] [subscription] Disable"),_.forEach(b,(function(e){e()})),b=[],u.isLogin())return f(u.data)}else if(t&&(!b||0===b.length)&&(console.debug("[ES] [subscription] Enable"),function(){b=[u.api.data.on.load(e,T,this),u.api.data.on.init(e,f,this),u.api.data.on.reset(e,f,this)]}(),u.isLogin()))return T(u.data)}return g.raw={getAll:i.get("/subscription/record/_search?_source_excludes=recipientContent&q=issuer::issuer"),count:i.get("/subscription/record/_search?size=0&q=issuer::pubkey"),add:i.record.post("/subscription/record"),update:i.record.post("/subscription/record/:id/_update"),category:{get:i.get("/subscription/category/:id"),all:i.get("/subscription/category/_search?sort=order&from=0&size=1000&_source=name,parent,key")}},m.ready().then((function(){return i.api.node.on.start(e,h,this),i.api.node.on.stop(e,h,this),h()})),g.record={load:function(e,t){return g.raw.getAll({issuer:e}).then((function(e){var n=e&&e.hits&&e.hits.total&&e.hits.hits.reduce((function(e,t){var n=t._source;return n.id=t._id,e.concat(n)}),[])||[];return E.box.record.open(n,t,"issuer","issuerContent").then((function(e){return _.forEach(e,(function(e){e.content=JSON.parse(e.issuerContent||"{}"),delete e.issuerContent,delete e.recipientContent})),e}))}))},add:function(e,n){if(!(e&&e.type&&e.content&&e.recipient))return t.reject("Missing arguments 'record' or 'record.type' or 'record.content' or 'record.recipient'");var i=n&&n.wallet||n&&n.walletId&&u.children.get(n.walletId)||u,a=i.data.pubkey,o=JSON.stringify(e.content);return l.util.random_nonce().then((function(n){return t.all([E.box.record.pack({issuer:a,issuerContent:o},i.data.keypair,"issuer","issuerContent",n),E.box.record.pack({recipient:e.recipient,recipientContent:o},i.data.keypair,"recipient","recipientContent",n)])})).then((function(t){var n=angular.merge(t[0],t[1]);return n.type=e.type,g.raw.add(n,{wallet:i}).then((function(t){return e.id=t,e}))}))},update:function(e,n){if(!e||!e.content||!e.recipient)return t.reject("Missing arguments 'record' or 'record.content', or 'record.recipient'");var i=n&&n.wallet||n&&n.walletId&&u.children.get(n.walletId)||u,a=i.data.pubkey,o=JSON.stringify(e.content);return l.util.random_nonce().then((function(n){return t.all([E.box.record.pack({issuer:a,issuerContent:o},i.data.keypair,"issuer","issuerContent",n),E.box.record.pack({recipient:e.recipient,recipientContent:o},i.data.keypair,"recipient","recipientContent",n)])})).then((function(t){var n=angular.merge(t[0],t[1]);return n.type=e.type,g.raw.update(n,{id:e.id,wallet:i}).then((function(){return e}))}))},remove:i.record.remove("subscription","record")},g.category={all:function(){if(g.raw.categories&&g.raw.categories.length){var e=t.defer();return e.resolve(g.raw.categories),e.promise}return g.raw.category.all().then((function(e){if(0===e.hits.total)g.raw.categories=[];else{var t=e.hits.hits.reduce((function(e,t){var n=t._source;return n.id=t._id,e.concat(n)}),[]);_.forEach(t,(function(e){t[e.id]=e})),g.raw.categories=t}return g.raw.categories}))},get:function(e){return g.raw.category.get(e).then((function(e){var t=e._source;return t.id=e._id,t}))}},g.constants={},g}]),angular.module("cesium.es.wallet.services",["ngResource","cesium.platform","cesium.es.http.services","cesium.es.crypto.services"]).factory("esWallet",["$q","$rootScope","$timeout","CryptoUtils","csPlatform","csWallet","csSettings","esCrypto","esProfile","esHttp",function(e,t,n,i,a,o,r,s,l,c){var u;function d(e){e.name=null,e.avatar=null,e.profile=null,e.moderator=null,o.events.cleanByContext("esWallet"),e.keypair&&(delete e.keypair.boxSk,delete e.keypair.boxPk)}function p(t,n){return n=n||e.defer(),s.box.getKeypair(t.keypair).then((function(e){t.keypair.boxSk=e.boxSk,t.keypair.boxPk=e.boxPk,console.debug("[ES] [wallet] Box keypair successfully computed"),n.resolve()})).catch(n.reject),n.promise}function m(e){(e=e||o.data).keypair&&(delete e.keypair.boxSk,delete e.keypair.boxPk)}function E(t,a){if(a=a||e.defer(),!t||!t.pubkey||!t.keypair)return a.resolve(),a.promise;if(!i.isLoaded())return console.debug("[ES] [wallet] Waiting crypto lib loading..."),n((function(){return E(t,a)}),50);console.debug("[ES] [wallet] Loading user avatar+name...");var o=Date.now(),s=[l.getAvatarAndName(t.pubkey).then((function(e){e?(t.name=e.name,t.avatarStyle=e.avatarStyle,t.avatar=e.avatar,console.debug("[ES] [wallet] Loaded user avatar+name in "+(Date.now()-o)+"ms")):console.debug("[ES] [wallet] No user avatar+name found"),a.resolve(t)}))];return r.data.expertMode&&s.push(c.node.moderators().then((function(e){t.moderator=_.contains(e&&e.moderators,t.pubkey)})).catch((function(e){console.error("[ES] [wallet] Cannot check is user is moderator: ",e&&e.message||e)}))),e.all(s).then((function(){a.resolve(t)})).catch(a.reject),a.promise}function b(t,n){n=n||e.defer(),o.events.cleanByContext("esWallet"),!t.name&&!t.requirements.revoked&&t.requirements.pendingMembership&&t.requirements.needCertificationCount>0&&o.events.add({type:"info",message:"ACCOUNT.EVENT.MEMBER_WITHOUT_PROFILE",context:"esWallet"}),console.debug("[ES] [wallet] Loading full user profile...");var i=Date.now();return l.get(t.pubkey).then((function(e){e&&(t.name=e.name,t.avatar=e.avatar,t.profile=t.profile||{},angular.merge(t.profile,e.source,{descriptionHtml:e.descriptionHtml}),console.debug("[ES] [wallet] Loaded full user profile in {0}ms".format(Date.now()-i))),n.resolve(t)})).catch(n.reject),n.promise}function g(t){if(!t&&!o.isAuth())throw new Error("Unable to get box keypair: user not authenticated !");return(t?e.when(t):o.getKeypair({silent:!0})).then((function(t){return t&&t.boxPk&&t.boxSk?e.when(t):s.box.getKeypair(t).then((function(e){return t.boxSk=e.boxSk,t.boxPk=e.boxPk,console.debug("[ES] [wallet] Box keypair successfully computed"),t}))}))}function f(){var e=c.alive;if(!e&&u&&u.length>0){if(console.debug("[ES] [wallet] Disable"),_.forEach(u,(function(e){e()})),u=[],o.isLogin())return d(o.data)}else if(e&&(!u||0===u.length)&&(console.debug("[ES] [wallet] Enable"),function(){u=[o.api.data.on.login(t,E,this),o.api.data.on.load(t,b,this),o.api.data.on.init(t,d,this),o.api.data.on.reset(t,d,this),o.api.data.on.unauth(t,m,this),o.api.data.on.auth(t,p,this)]}(),o.isLogin()))return E(o.data)}return a.ready().then((function(){return c.api.node.on.start(t,f,this),c.api.node.on.stop(t,f,this),f()})),this.box={getKeypair:g,record:{pack:function(e,t,n,i,a){return g(t).then((function(t){return s.box.pack(e,t,n,i,a)}))},open:function(e,t,n,i){return g(t).then((function(t){return s.box.open(e,t,n,i)}))}}},this}]),angular.module("cesium.es.wot.services",["ngResource","cesium.es.http.services"]).factory("esWot",["$rootScope","$q","esHttp","csCache",function(e,t,n,i){var a="esWot-",o=i.get(a+"memberships-",i.constants.MEDIUM),r={user:{event:n.post("/user/event/_search")}};function s(){console.debug("[ES] [wot] Cleaning cache {prefix: '{0}'}...".format(a)),i.clear(a)}return n.api.node.on.stop(e,s,this),{memberships:function(e,n){var i=!1!==(n=n||{}).cache?o.get(e):null;if(i)return t.when(i);var a={size:1e3,query:{bool:{filter:[{term:{recipient:e}},{terms:{code:["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"]}}]}},sort:[{time:{order:"asc"}}],_source:["code","time"]};return r.user.event(a).then((function(t){if(t.hits&&t.hits.total){var n,i=t.hits.hits.reduce((function(e,t){var i="MEMBER_JOIN"===t._source.code||"MEMBER_ACTIVE"===t._source.code;return i&&!n?n=t._source.time:!i&&n&&(e=e.concat({joinTime:n,leaveTime:t._source.time}),n=0),e}),[]);return n&&i.push({joinTime:n,leaveTime:moment().utc().unix()}),o.put(e,i),i}}))},cache:{clearAll:s}}}]),angular.module("cesium.es.tx.services",["ngResource","cesium.services","cesium.es.http.services","cesium.es.wot.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esTx")}]).factory("esTx",["$q","$rootScope","csPlatform","csCurrency","csTx","esHttp","esWot",function(e,t,n,i,a,o,r){var s,l={block:{search:o.post("/:currency/block/_search")}};function c(t,n){return n=n||e.defer(),(t=t||{}).pubkey||n.reject("Missing [pubkey] when calling [loadUDs] extension point"),e.all([i.get(),r.memberships(t.pubkey)]).then((function(n){var i=n[0]&&n[0].name,a=n[1];if(i&&a&&a.length)return-1!==t.fromTime&&(a=a.reduce((function(e,n){return n.leaveTime<t.fromTime?e:(n.joinTime=Math.max(n.joinTime,t.fromTime),e.concat(n))}),[])),e.all(a.reduce((function(e,n){var a={query:{filtered:{filter:{bool:{must:[{exists:{field:"dividend"}},{range:{medianTime:{from:n.joinTime+1,to:n.leaveTime}}}]}}}},size:t.size||1e4,from:t.from||0,sort:{medianTime:"desc"},_source:["medianTime","number","dividend","unitbase"]};return e.concat(l.block.search(a,{currency:i}))}),[]))})).then((function(e){if(e&&e.length)return e.reduce((function(e,t){return t.hits.total&&t.hits.hits.length?e.concat(t.hits.hits.reduce((function(e,t){var n,i,a=t._source;return e.concat({time:a.medianTime,amount:(n=a.dividend,i=a.unitbase,i<=0?n:n*Math.pow(10,i)),isUD:!0,block_number:a.number})}),[])):t}),[])})).then((function(e){n.resolve(e)})).catch((function(e){n.reject(e)})),n.promise}function u(){var e=o.alive;!e&&s&&s.length>0?(console.debug("[ES] [tx] Disable"),_.forEach(s,(function(e){e()})),s=[]):!e||s&&0!==s.length||(console.debug("[ES] [tx] Enable"),function(){s=[a.api.data.on.loadUDs(t,c,this)]}())}return n.ready().then((function(){return o.api.node.on.start(t,u,this),o.api.node.on.stop(t,u,this),u()})),{}}]),angular.module("cesium.es.geo.services",["cesium.services","cesium.es.http.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esGeo")}]).factory("esGeo",["$rootScope","$q","csConfig","csSettings","csHttp",function(e,t,n,i,a){var o=this;function r(e){return o.raw.google.search({address:e,key:o.raw.google.apiKey}).then((function(e){if(e&&e.results&&e.results.length)return e.results.reduce((function(e,t){return e.concat({display_name:t.address_components&&t.address_components.reduce((function(e,t){return t.long_name?e.concat(t.long_name):e}),[]).join(", "),lat:t.geometry&&t.geometry.location&&t.geometry.location.lat,lon:t.geometry&&t.geometry.location&&t.geometry.location.lng})}),[])}))}o.raw={osm:{search:a.get("nominatim.openstreetmap.org",443,"/search.php?format=json"),license:{name:"OpenStreetMap",url:"https://www.openstreetmap.org/copyright"}},google:{apiKey:void 0,search:a.get("maps.google.com",443,"/maps/api/geocode/json")},freegeoip:{search:a.get("freegeoip.net",443,"/json/:ip"),license:{name:"freegeoip",url:"https://freegeoip.net"}}},o.raw.google.apiKey=n.plugins&&n.plugins.es&&n.plugins.es.googleApiKey;var s=!!o.raw.google.apiKey;return i.ready().then((function(){function t(e){s||(o.raw.google.apiKey=e.plugins.es.googleApiKey),o.raw.google.enable=o.raw.google.apiKey&&e.plugins&&e.plugins.es&&e.plugins.es.enableGoogleApi}i.api.data.on.changed(e,t,this),t(i.data)})),{point:{current:function(){var e=t.defer();return navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){t&&t.coords?e.resolve({lat:t.coords.latitude,lon:t.coords.longitude}):console.error("[ES] [geo] navigator geolocation > Unknown format:",t)}),(function(t){e.reject(t)}),{timeout:5e3}):e.reject(),e.promise},searchByAddress:function(e){"string"==typeof e&&(e={q:e}),e.q&&(e.q=e.q.trim().replace(/\n/g,",").replace(/(?:^|[\t\n\r\s ])([A−Z09-]+)(?:$|[\t\n\r\s ])/g,"").replace(/,[ ,]+/g,", ")),e.addressdetails=1;var t=Date.now();return o.raw.osm.search(e).then((function(e){if(e)return e=e.reduce((function(e,t){return"waterway"!=t.class&&"railway"!=t.class&&t.address?(t.address.city=t.address.city||t.address.village||t.address.town||t.address.postcode,t.address.road=t.address.road||t.address.suburb||t.address.hamlet,t.address.postcode&&t.address.city==t.address.postcode&&delete t.address.postcode,t.address.city?e.concat({id:t.place_id,name:t.display_name,address:t.address,lat:t.lat,lon:t.lon,class:t.class,license:o.raw.osm.license}):e):e}),[]),console.debug("[ES] [geo] Found {0} address position(s)".format(e&&e.length||0,Date.now()-t),e),e.length?e:void 0})).catch((function(t){return n=t,i=e.q?e.q:(e.street?e.street+", ":"")+e.city+(e.country?", "+e.country:""),console.debug("[ES] [geo] Search position failed on [OSM]. Trying [google] service"),r(i).catch((function(e){throw console.debug("[ES] [geo] Search position failed on [google] service"),n||e}));var n,i}))},distance:function(e,t,n,i,a){var o=Math.PI*e/180,r=Math.PI*n/180,s=t-i,l=Math.PI*s/180,c=Math.sin(o)*Math.sin(r)+Math.cos(o)*Math.cos(r)*Math.cos(l);return c=60*(c=180*(c=Math.acos(c))/Math.PI)*1.1515,"km"==a?1.609344*c:"N"==a?.8684*c:c},ip:{search:function(e){return o.raw.freegeoip.search({ip:e}).then((function(e){return e?{lat:e.latitude,lng:e.longitude}:void 0}))},license:o.raw.freegeoip.license}},google:{isEnable:function(){return o.raw.google.enable&&o.raw.google.apiKey},searchByAddress:r}}}]),angular.module("cesium.es.document.services",["ngResource","cesium.platform","cesium.es.http.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.registerEagerLoadingService("esDocument")}]).factory("esDocument",["$q","$rootScope","$timeout","UIUtils","Api","CryptoUtils","csPlatform","csConfig","csSettings","csWot","csWallet","esHttp",function(e,t,n,i,a,o,r,s,l,c,u,d){var p=40,m={commons:["issuer","pubkey","hash","time","recipient","nonce","read_signature"],peer:["*"],movement:["*"]},E={search:d.post("/:index/:type/_search"),searchText:d.get("/:index/:type/_search?q=:text&_source=:source")};function b(e){if(!e||!e.index||!e.type)throw new Error("Missing mandatory options [index, type]");var t="desc";return"peer"===e.type?(e.sort&&!e.sort.time||(t=e.sort&&e.sort.time||t,e.sort={"stats.medianTime":{nested_path:"stats",order:t}}),e._source=m.peer,e.getTimeFunction=function(e){return e.time=e.stats&&e.stats.medianTime,e.time}):"movement"===e.type&&(e.sort&&!e.sort.time||(t=e.sort&&e.sort.time||t,e.sort={medianTime:t}),e._source=e._source||m.movement,e.getTimeFunction=function(e){return e.time=e.medianTime,e.time}),e}function g(e,t){t.issuerField=t.issuerField||"pubkey";var n=(e&&e.hits&&e.hits.hits||[]).reduce((function(e,n){var i=n._source||{};return i.docType=i.type,i.index=n._index,i.type=n._type,i.id=n._id,i.pubkey=i.issuer||t.issuerField&&i[t.issuerField]||i.pubkey,i.time=t.getTimeFunction&&t.getTimeFunction(i)||i.time,i.thumbnail=d.image.fromHit(n,"avatar")||d.image.fromHit(n,"thumbnail"),e.concat(i)}),[]),i=n.reduce((function(e,t){return t.recipient?(t.recipient={pubkey:t.recipient},e.concat(t.recipient)):e}),[]);return c.extendAll(n.concat(i)).then((function(){return{hits:n,took:e.took,total:e&&e.hits&&e.hits.total||0}}))}return{search:function(e){var t={from:(e=b(e)).from||0,size:e.size||p,sort:e.sort||{time:"desc"},_source:e._source||m.commons};return e.query&&(t.query=e.query),E.search(t,{index:e.index,type:e.type}).then((function(t){return g(t,e)}))},searchText:function(e,t){var n={text:e,index:(t=t||{}).index||"user",type:t.type||"profiles",from:t.from||0,size:t.size||p,sort:t.sort||"time:desc",source:t._source&&t._source.join(",")||m.commons.join(",")};console.debug("[ES] [wallet] [document] [{0}/{1}] Loading documents...".format(t.index,t.type));var i=Date.now();return E.searchText(n).then((function(e){return g(e,t)})).then((function(e){return console.debug("[ES] [document] [{0}/{1}] Loading {2} documents in {3}ms".format(t.index,t.type,e&&e.hits&&e.hits.length||0,Date.now()-i)),e}))},remove:function(t,n){return t&&t.index&&t.type&&t.id?d.record.remove(t.index,t.type)(t.id,n):e.reject("Could not remove document: missing mandatory fields")},removeAll:function(t,n){if(t&&t.length){var i=n&&n.walletId&&u.children.get(n.walletId)||u;return i.auth().then((function(){return e.all(t.reduce((function(e,t){return e.concat(d.record.remove(t.index,t.type)(t.id,{wallet:i}))}),[]))}))}},fields:{commons:m.commons},fromHit:function(e){return g({hits:{hits:[e]}},b({index:e._index,type:e._type})).then((function(e){return e.hits[0]}))}}}]),angular.module("cesium.es.network.services",["ngApi","cesium.es.http.services"]).factory("esNetwork",["$rootScope","$q","$interval","$timeout","$window","csSettings","csConfig","esHttp","Api","BMA",function(e,t,n,i,a,o,r,s,l,c){function u(e){var u,d="https:"===a.location.protocol,p=new l(this,"csNetwork-"+e),m={pod:null,listeners:[],loading:!0,peers:[],filter:{endpointFilter:null,online:!0,ssl:void 0,tor:void 0},sort:{type:null,asc:!0,compact:!0},groupBy:"pubkey",expertMode:!1,knownBlocks:[],mainBlock:null,searchingPeersOnNetwork:!1,timeout:r.timeout},E=function(e){return e&&[e.number,e.hash].join("-")},b=function(){m.pod=null,m.listeners=[],m.peers.splice(0),m.filter={endpointFilter:null,online:!0},m.sort={type:null,asc:!0},m.groupBy="pubkey",m.expertMode=!1,m.knownBlocks=[],m.mainBlock=null,m.loading=!0,m.searchingPeersOnNetwork=!1,m.timeout=r.timeout,m.document={index:o.data.plugins.es&&o.data.plugins.es.document&&o.data.plugins.es.document.index||"user",type:o.data.plugins.es&&o.data.plugins.es.document&&o.data.plugins.es.document.type||"profile"}},g=function(){m.peers=[],m.searchingPeersOnNetwork=!0,m.loading=!0,m.pod=m.pod||s;var e=[];return u&&n.cancel(u),u=n((function(){e.length?v(e):m.loading&&!m.searchingPeersOnNetwork&&(m.loading=!1,n.cancel(u),O(!0),console.debug("[network] Finish: {0} peers found.".format(m.peers.length)))}),1e3),t.when().then((function(){return m.filter.online?m.pod.network.peers().then((function(n){var i=[];if(_.forEach(n.peers,(function(t){"UP"===t.status&&i.push(f(t,e))})),i.length)return t.all(i)})).catch((function(e){console.error(e)})):m.pod.network.peers().then((function(n){var i=[];if(_.forEach(n.peers,(function(t){"UP"!==t.status&&i.push(f(t,e))})),i.length)return t.all(i)}))})).then((function(){m.searchingPeersOnNetwork=!1})).catch((function(e){console.error(e),m.searchingPeersOnNetwork=!1}))},f=function(e,n){n=n||m.newPeers;var i=T(e),a=!1,o=i.reduce((function(e,t){var i=_.findWhere(m.peers,{id:t.id}),o=i?i.buid:null,r=!!i&&i.online;return e.concat(h(t).then((function(e){if(i)if(!e||e.online!==m.filter.online&&"all"!==m.filter.online){var s=m.peers.indexOf(i);-1!==s&&(console.debug("[network] Peer [{0}] removed (cause: {1})".format(t.server,e?e.online?"UP":"DOWN":"filtered")),m.peers.splice(s,1),a=!0)}else e.buid!==o?(console.debug("[network] {0} endpoint [{1}] new current block".format(e.ep&&e.ep.api||"",e.server)),a=!0):r!==e.online?(console.debug("[network] {0} endpoint [{1}] is now {2}".format(e.ep&&e.ep.api||"",e.server,e.online?"UP":"DOWN")),a=!0):console.debug("[ES] [network] {0} endpoint [{1}] unchanged".format(e.ep&&e.ep.api||"",e.server));else!e||e.online!==m.filter.online&&"all"!==m.filter.online||(console.debug("[ES] [network] {0} endpoint [{1}] is {2}".format(e.ep&&e.ep.api||"",e.server,e.online?"UP":"DOWN")),n.push(e),a=!0)})))}),[]);return(1===o.length?o[0]:t.all(o)).then((function(){return a}))},T=function(e,t){if(!e)return[];var n=new X(e);if(!t){var i=n.getEndpoints();if(!i)return[];var a=i.reduce((function(e,t){var n=s.node.parseEndPoint(t);return n?e.concat(n):e}),[]);if(a.length>1)return a.reduce((function(t,n){return t.concat(T(e,n))}),[]);t=a[0]}return n.ep=t,n.server=n.getServer(),n.dns=n.getDns(),n.blockNumber=n.block&&n.block.replace(/-.+$/,""),n.id=n.keyID(),[n]},h=function(e){return function(e){return!(m.filter&&(m.filter.endpointFilter&&(e.ep&&e.ep.api&&e.ep.api!==m.filter.endpointFilter||!e.hasEndpoint(m.filter.endpointFilter))||!m.filter.online&&"UP"===e.status||angular.isDefined(m.filter.ssl)&&e.isSsl()!=m.filter.ssl||angular.isDefined(m.filter.tor)&&e.isTor()!=m.filter.tor))}(e)?m.filter.online&&(m.filter.online||"DOWN"!==e.status)&&e.getHost()?d&&!e.isSsl()?(e.online="UP"===e.status,e.buid=-1,delete e.version,t.when(e)):e.ep.useTor?(e.online="UP"==e.status,e.buid=-1,delete e.software,delete e.version,t.when(e)):(e.api=e.api||s.lightInstance(e.getHost(),e.getPort(),e.isSsl(),m.timeout),e.api.blockchain.current().then((function(t){return e.currentNumber=t.number,e.online=!0,e.buid=E(t),e.medianTime=t.medianTime,-1===m.knownBlocks.indexOf(e.buid)&&m.knownBlocks.push(e.buid),e})).catch((function(t){if(t&&t.ucode==c.errorCodes.NO_CURRENT_BLOCK)return e.online=!0,e.buid=E({number:0,hash:c.constants.ROOT_BLOCK_HASH}),e.difficulty=0,e;if(!e.secondTry){var n=e.ep||e.getEP();if(n.dns&&-1===e.server.indexOf(n.dns))return e.secondTry=!0,e.api=s.lightInstance(n.dns,e.getPort(),e.isSsl(),m.timeout),h(e)}return e.online=!1,e.currentNumber=null,e.buid=null,e})).then((function(e){return m.filter.online&&e&&e.online?(e.docCount={},t.all([m.expertMode?e.api.node.summary().then((function(t){e.software=t&&t.duniter&&t.duniter.software||void 0,e.version=t&&t.duniter&&t.duniter.version||"?"})).catch((function(){e.software=void 0,e.version="?"})):t.when(),e.api.record.count(m.document.index,m.document.type).then((function(t){e.docCount.record=t})).catch((function(){e.docCount.record=void 0})),e.api.subscription.count({recipient:e.pubkey,type:"email"}).then((function(t){e.docCount.emailSubscription=t})).catch((function(){e.docCount.emailSubscription=void 0}))])):e})).then((function(){return delete e.api,e}))):(e.online=!1,t.when(e)):t.when()},v=function(e,t){if((e=e||m.newPeers).length){var n=_.map(m.peers,(function(e){return e.id})),i=!1,a=0;_.forEach(e.splice(0),(function(e){n[e.id]||(m.peers.push(e),n[e.id]=e,i=!0,a++)})),i&&(console.debug("[network] Flushing {0} new peers...".format(a)),O(t))}},I=function(e,t,n){if(!e)return 0;var i=0;t>(e=e.toLowerCase()).length&&(t=e.length),i+=e.charCodeAt(0);for(var a=1;a<t;a++)i+=Math.pow(.001,a)*e.charCodeAt(a);return n?1e3-i:i},O=function(e){var t={};_.forEach(m.peers,(function(e){if(e.buid){var n=t[e.buid];n&&n.medianTime?!n.medianTime&&e.medianTime&&(n.medianTime=e.medianTime):(n={buid:e.buid,medianTime:e.medianTime,count:0},t[e.buid]=n),-1!==n.buid&&n.count++}})),_.forEach(_.values(t),(function(e){e.pct=100*e.count/m.peers.length}));var n,i=_.max(t,(function(e){return e.count}));_.forEach(m.peers,(function(e){e.hasMainConsensusBlock=e.buid==i.buid,e.hasConsensusBlock=e.buid&&!e.hasMainConsensusBlock&&t[e.buid].count>1,e.hasConsensusBlock&&(e.consensusBlockDelta=t[e.buid].medianTime-i.medianTime)})),m.peers=_.uniq(m.peers,!1,(function(e){return e.id})),m.peers=_.sortBy(m.peers,(function(e){var n=0;if(m.sort.type){var i=0;i+="name"==m.sort.type?I(e.name,10,m.sort.asc):0,i+="software"==m.sort.type?I(e.software,10,m.sort.asc):0,i+="api"==m.sort.type&&(e.hasEndpoint("ES_SUBSCRIPTION_API")&&(m.sort.asc?1:-1)||0)+(e.hasEndpoint("ES_USER_API")&&(m.sort.asc?.01:-.01)||0)+(e.isSsl()&&(m.sort.asc?.75:-.75)||0)||0,n+=1e10*(i+="doc_count"==m.sort.type&&e.docCount?m.sort.asc?1e9-e.docCount:e.docCount:0)}return n+=1e9*(e.online?1:0),n+=1e8*(e.hasMainConsensusBlock?1:0),n+=1e6*(e.hasConsensusBlock?t[e.buid].pct:0),m.expertMode?(n+=100*(e.difficulty?1e4-e.difficulty:0),n+=1*(e.uid?I(e.uid,2,!0):0)):(n+=100*(e.uid?I(e.uid,2,!0):0),n+=1*(e.uid?0:I(e.pubkey,2,!0))),-n})),m.groupBy&&m.peers.forEach((function(e){e.compacted=n&&e[m.groupBy]&&e[m.groupBy]===n[m.groupBy],n=e})),e&&i&&i.buid&&(!m.mainBlock||m.mainBlock.buid!==i.buid)&&(m.mainBlock=i,p.data.raise.mainBlockChanged(i)),p.data.raise.changed(m)},N=function(e,t){return t=t||{},s.ready().then((function(){R(),b(),m.pod=e||s,m.filter=t.filter?angular.merge(m.filter,t.filter):m.filter,m.sort=t.sort?angular.merge(m.sort,t.sort):m.sort,m.expertMode=angular.isDefined(t.expertMode)?t.expertMode:m.expertMode,m.timeout=angular.isDefined(t.timeout)?t.timeout:r.timeout,console.info("[ES] [network] Starting network from [{0}]".format(m.pod.server));var n=Date.now();return m.listeners=[m.pod.websocket.block().onListener((function(e){if(e&&!m.loading){var t=[e.number,e.hash].join("-");-1===m.knownBlocks.indexOf(t)&&(console.debug("[network] Receiving block: "+t.substring(0,20)),m.knownBlocks.push(t),1===m.knownBlocks.length||(m.loading=!0,i((function(){console.debug("[network] new block received by WS: will refresh peers"),g()}),2e3,!1)))}})),m.pod.websocket.peer().onListener((function(e){if(e&&!m.loading){var t=[];f(e,t).then((function(e){e&&(t.length>0?v(t,!0):(console.debug("[network] [ws] Peers updated received"),O(!0)))}))}}))],g().then((function(e){return console.debug("[ES] [network] Started in "+(Date.now()-n)+"ms"),e}))}))},R=function(){m.pod&&(console.info("[ES] [network-service] Stopping..."),_.forEach(m.listeners,(function(e){e()})),m.listeners=[],b())},A=function(e){return m.pod?N().then((function(){return t(e)})):t(e)};return p.registerEvent("data","changed"),p.registerEvent("data","mainBlockChanged"),p.registerEvent("data","rollback"),{id:e,data:m,start:N,close:R,hasPeers:function(){return m.peers&&m.peers.length>0},getPeers:function(){return m.peers},sort:function(e){e=e||{},m.filter=e.filter?angular.merge(m.filter,e.filter):m.filter,m.sort=e.sort?angular.merge(m.sort,e.sort):m.sort,O(!1)},getTrustedPeers:function(){return A((function(e,t){e(m.peers.reduce((function(e,t){return t.hasMainConsensusBlock&&t.uid?e.concat(t):e}),[]))}))},getKnownBlocks:function(){return m.knownBlocks},getMainBlockUid:function(){return A((function(e,t){e(m.mainBuid)}))},loadPeers:g,isBusy:function(){return m.loading},api:p}}var d=new u("default");return d.instance=function(e){return new u(e)},d}]),angular.module("cesium.es.like.services",["ngResource","cesium.services","cesium.es.http.services"]).factory("esLike",["$q","csWallet","esHttp",function(e,t,n){return{constants:{KINDS:["LIKE","ABUSE"]},instance:function(i,a){var o=this;function r(n,r){if((r=r||{}).kind=r.kind&&r.kind.toUpperCase()||"LIKE",!t.isLogin())return e.reject("Wallet must be login before sending record to ES node");var s={version:2,index:i,type:a,id:n,kind:r.kind};return r.comment&&(s.comment=r.comment),angular.isDefined(r.level)&&(s.level=r.level),o.raw.postRecord(s,r)}function s(e,t){if(!e)throw new Error("Missing 'id' argument");return o.raw.removeRecord(e,t)}return o.raw={getSearch:n.get("/like/record/_search?_source=false&q=:q"),searchBaseQueryString:"index:{0} AND type:{1} AND id:".format(i,a),postSearch:n.post("/like/record/_search"),postRecord:n.record.post("/{0}/{1}/:id/_like".format(i,a)),removeRecord:n.record.remove("like","record")},{index:i,type:a,toggle:function(n,i){(i=i||{}).kind=i.kind||"LIKE";var a=i.pubkey||i.wallet&&i.wallet.data.pubkey||t.isLogin()&&t.data.pubkey;return a?(i.wallet=i.wallet||t.getByPubkey(a),function(e,t){(t=t||{}).kind=t.kind||"LIKE";var n=o.raw.searchBaseQueryString+e;return t.kind&&(n+=" AND kind:"+t.kind.toUpperCase()),t.issuer&&(n+=" AND issuer:"+t.issuer),o.raw.getSearch({q:n}).then((function(e){return(e&&e.hits&&e.hits.hits||[]).map((function(e){return e._id}))}))}(n,{kind:i.kind,issuer:a}).then((function(t){return t&&t.length?e.all(_.map(t,(function(e){return s(e,i)}))).then((function(){return-1*t.length})):r(n,i).then((function(){return 1}))}))):e.reject("User not log in!")},add:r,remove:s,count:function(e,t){(t=t||{}).kind=t.kind||"LIKE";var n={query:{bool:{filter:[{term:{index:i}},{term:{type:a}},{term:{id:e}},{term:{kind:t.kind.toUpperCase()}}]}},size:0},r=t.issuer?[t.issuer]:t.issuers;return r&&r.length&&(n.query.bool.should={terms:{issuer:r}},n.size=r.length,n._source=["issuer"]),o.raw.postSearch(n).then((function(e){var t=e&&e.hits,n={total:t&&t.total||0,wasHitByPubkey:{},wasHitCount:0};return _.forEach(r,(function(e){var i=t?_.findIndex(t.hits||[],(function(t){return t._source.issuer===e})):-1;n.wasHitByPubkey[e]=-1!==i||!1,n.wasHitCount+=-1!==i?1:0})),n}))}}}}}]),Q.$inject=["$scope","UIUtils","$q","Device"],ee.$inject=["$scope","$focus","$filter","UIUtils","SocialUtils"],te.$inject=["$scope"],Z.$inject=["$scope","$filter","$state","$focus","$timeout","$anchorScroll","UIUtils"],J.$inject=["$scope","UIUtils","$timeout","parameters"],ne.$inject=["$scope"],ie.$inject=["$scope","csConfig","esGeo","ModalUtils"],ae.$inject=["$scope","$q","csConfig","esGeo","ModalUtils"],oe.$inject=["$scope","$timeout","ModalUtils","csConfig","esGeo"],re.$inject=["$scope","$q","$translate","esGeo","parameters"],angular.module("cesium.es.common.controllers",["ngResource","cesium.es.services"]).controller("ESPicturesEditCtrl",Q).controller("ESPicturesEditCtrl",Q).controller("ESSocialsEditCtrl",ee).controller("ESSocialsViewCtrl",te).controller("ESCommentsCtrl",Z).controller("ESCategoryModalCtrl",J).controller("ESAvatarModalCtrl",ne).controller("ESPositionEditCtrl",ie).controller("ESLookupPositionCtrl",ae).controller("ESSearchPositionItemCtrl",oe).controller("ESSearchPositionModalCtrl",re),se.$inject=["$scope","esSettings","PluginService"],le.$inject=["$scope","$state","$controller","UIUtils","csWallet"],ce.$inject=["$scope","$q","$state","esSettings","csWallet"],angular.module("cesium.es.app.controllers",["ngResource","cesium.es.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&(e.extendState("app",{points:{"nav-buttons-right":{templateUrl:"plugins/es/templates/menu_extend.html",controller:"ESMenuExtendCtrl"},"menu-user":{templateUrl:"plugins/es/templates/menu_extend.html",controller:"ESMenuExtendCtrl"}}}),e.extendState("app",{points:{"profile-popover-user":{templateUrl:"plugins/es/templates/common/popover_profile_extend.html",controller:"ESProfilePopoverExtendCtrl"}}}))}]).controller("ESExtensionCtrl",se).controller("ESMenuExtendCtrl",le).controller("ESProfilePopoverExtendCtrl",ce),ue.$inject=["$scope","$window","$q","$translate","$ionicPopup","UIUtils","Modals","csHttp","csConfig","csSettings","esHttp","esSettings","esModals"],angular.module("cesium.es.settings.controllers",["cesium.es.services"]).config(["PluginServiceProvider","$stateProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(e.extendState("app.settings",{points:{plugins:{templateUrl:"plugins/es/templates/settings/settings_extend.html",controller:"ESExtensionCtrl"}}}),t.state("app.es_settings",{url:"/settings/es",views:{menuContent:{templateUrl:"plugins/es/templates/settings/plugin_settings.html",controller:"ESPluginSettingsCtrl"}}}))}]).controller("ESPluginSettingsCtrl",ue),angular.module("cesium.es.currency.controllers",["ngResource","cesium.es.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.extendState("app.currency.tab_blocks",{points:{"nav-buttons":{templateUrl:"plugins/es/templates/currency/tab_blocks_extend.html",controller:"ESExtensionCtrl"}}})}]),de.$inject=["$scope","$controller","$state","csWallet","esModals"],pe.$inject=["$scope","$controller","UIUtils","esHttp","esProfile"],angular.module("cesium.es.wallet.controllers",["cesium.es.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.extendStates(["app.view_wallet","app.view_wallet_by_id"],{points:{hero:{templateUrl:"plugins/es/templates/wallet/view_wallet_extend.html",controller:"ESWalletLikesCtrl"},"after-general":{templateUrl:"plugins/es/templates/wallet/view_wallet_extend.html",controller:"ESWalletViewCtrl"}}}).extendState("app.view_wallets",{points:{"item-wallet":{templateUrl:"plugins/es/templates/wallet/item_wallet_extend.html",controller:"ESExtensionCtrl"}}})}]).controller("ESWalletViewCtrl",de).controller("ESWalletLikesCtrl",pe),me.$inject=["$scope","$controller","$state"],Ee.$inject=["$scope","$ionicPopover","$q","$controller","$timeout","UIUtils","Modals","csWallet","esHttp","esLike","esModals","esWallet","esProfile","esInvitation"],angular.module("cesium.es.wot.controllers",["cesium.es.services"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&t.extendState("app.wot_lookup",{points:{tabs:{templateUrl:"plugins/es/templates/wot/lookup_extend.html",controller:"ESExtensionCtrl"}}
-}).extendState("app.wot_lookup_lg",{points:{top:{templateUrl:"plugins/es/templates/wot/lookup_lg_extend.html",controller:"ESWotLookupExtendCtrl"}}}).extendStates(["app.wot_identity","app.wot_identity_uid"],{points:{hero:{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"},general:{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"},"after-general":{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"},buttons:{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"},"after-buttons":{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"},"buttons-top-fab":{templateUrl:"plugins/es/templates/wot/view_identity_extend.html",controller:"ESWotIdentityViewCtrl"}}}).extendStates(["app.wot_cert","app.wot_cert_lg","app.wallet_cert","app.wallet_cert_lg"],{points:{"nav-buttons":{templateUrl:"plugins/es/templates/wot/view_certifications_extend.html",controller:"ESWotIdentityViewCtrl"},buttons:{templateUrl:"plugins/es/templates/wot/view_certifications_extend.html",controller:"ESWotIdentityViewCtrl"}}})}]).controller("ESWotLookupExtendCtrl",me).controller("ESWotIdentityViewCtrl",Ee),be.$inject=["$scope","$focus","$timeout","$filter","$controller","$location","$translate","$ionicPopover","Device","UIUtils","ModalUtils","BMA","csSettings","csWallet","esModals","esRegistry","esHttp"],ge.$inject=["$scope","$controller","$timeout","UIUtils","esModals","csWallet"],fe.$inject=["$scope","$rootScope","$state","$q","$timeout","$ionicPopover","$ionicHistory","$translate","$controller","$anchorScroll","csConfig","csWallet","esRegistry","UIUtils","esHttp"],_e.$inject=["$scope","$timeout","$state","$q","$ionicHistory","$focus","$translate","$controller","Device","UIUtils","ModalUtils","csWallet","esHttp","esRegistry"],angular.module("cesium.es.registry.controllers",["cesium.es.services","cesium.es.common.controllers"]).config(["$stateProvider",function(e){e.state("app.wot_lookup.tab_registry",{url:"/page?q&type&hash&category&location&issuer&reload&lat&lon&d&last",views:{tab_registry:{templateUrl:"plugins/es/templates/registry/tabs/tab_registry.html",controller:"ESRegistryLookupCtrl"}},data:{large:"app.registry_lookup_lg",silentLocationChange:!0}}).state("app.registry_lookup_lg",{url:"/wot/page/lg?q&type&hash&category&location&issuer&reload&lat&lon&d&last",views:{menuContent:{templateUrl:"plugins/es/templates/registry/lookup_lg.html",controller:"ESRegistryLookupCtrl"}},data:{silentLocationChange:!0}}).state("app.wallet_pages",{url:"/account/pages?refresh",views:{menuContent:{templateUrl:"plugins/es/templates/registry/view_wallet_pages.html",controller:"ESWalletPagesCtrl"}},data:{login:!0,minData:!0,silentLocationChange:!0}}).state("app.wallet_pages_by_id",{url:"/wallets/:id/pages?refresh",views:{menuContent:{templateUrl:"plugins/es/templates/registry/view_wallet_pages.html",controller:"ESWalletPagesCtrl"}},data:{login:!0,minData:!0,silentLocationChange:!0}}).state("app.view_page",{url:"/page/view/:id/:title?refresh",views:{menuContent:{templateUrl:"plugins/es/templates/registry/view_record.html",controller:"ESRegistryRecordViewCtrl"}}}).state("app.view_page_anchor",{url:"/page/view/:id/:title/:anchor",views:{menuContent:{templateUrl:"plugins/es/templates/registry/view_record.html",controller:"ESRegistryRecordViewCtrl"}}}).state("app.registry_add_record",{cache:!1,url:"/page/add/:type?wallet",views:{menuContent:{templateUrl:"plugins/es/templates/registry/edit_record.html",controller:"ESRegistryRecordEditCtrl"}},data:{auth:!0,minData:!0}}).state("app.registry_edit_record",{cache:!1,url:"/page/edit/:id/:title?wallet",views:{menuContent:{templateUrl:"plugins/es/templates/registry/edit_record.html",controller:"ESRegistryRecordEditCtrl"}},data:{auth:!0,minData:!0}})}]).controller("ESRegistryLookupCtrl",be).controller("ESWalletPagesCtrl",ge).controller("ESRegistryRecordViewCtrl",fe).controller("ESRegistryRecordEditCtrl",_e),Te.$inject=["$scope","$q","$timeout","$state","$focus","$translate","$controller","$ionicHistory","$ionicPopover","UIUtils","csWallet","esHttp","esProfile","ModalUtils","Device"],angular.module("cesium.es.profile.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.edit_profile",{url:"/wallet/profile/edit",views:{menuContent:{templateUrl:"plugins/es/templates/user/edit_profile.html",controller:"ESViewEditProfileCtrl"}},cache:!1,data:{auth:!0}}).state("app.edit_profile_by_id",{url:"/wallets/:id/profile/edit",views:{menuContent:{templateUrl:"plugins/es/templates/user/edit_profile.html",controller:"ESViewEditProfileCtrl"}},cache:!1,data:{login:!0}})}]).controller("ESViewEditProfileCtrl",Te),he.$inject=["$scope","$state","$translate","$ionicHistory","$ionicPopover","$timeout","csWallet","esModals","UIUtils","esMessage"],ve.$inject=["$scope","$controller"],Ie.$inject=["$scope","$controller"],Oe.$inject=["$scope","$controller"],Ne.$inject=["$scope","Modals","UIUtils","csWallet","esHttp","esMessage","parameters"],Re.$inject=["$scope","$state","$timeout","$translate","$ionicHistory","$ionicPopover","UIUtils","esModals","esMessage","csWallet"],Ae.$inject=["$scope","UIUtils","$state","csWallet","esHttp","esMessage","esModals","$timeout"],angular.module("cesium.es.message.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.user_message",{url:"/user/message",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup.html"}}}).state("app.user_message.tab_inbox",{url:"/inbox",views:{tab_inbox:{controller:"ESMessageInboxListCtrl",templateUrl:"plugins/es/templates/message/tabs/tab_list.html"}},data:{auth:!0,minData:!0,large:"app.user_messages_lg_inbox"}}).state("app.user_message.tab_outbox",{url:"/outbox",views:{tab_outbox:{controller:"ESMessageOutboxListCtrl",templateUrl:"plugins/es/templates/message/tabs/tab_list.html"}},data:{auth:!0,minData:!0,large:"app.user_messages_lg_outbox"}}).state("app.user_messages_lg_inbox",{url:"/user/message/lg/inbox",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup_lg.html",controller:"ESMessageInboxListCtrl"}},data:{auth:!0,minData:!0}}).state("app.user_messages_by_id",{url:"/wallets/:id/message",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup_by_id.html"}}}).state("app.user_messages_by_id.tab_inbox",{url:"/inbox",views:{tab_inbox:{controller:"ESMessageInboxListCtrl",templateUrl:"plugins/es/templates/message/tabs/tab_list.html"}},data:{large:"app.user_messages_lg_inbox_by_id"}}).state("app.user_messages_by_id.tab_outbox",{url:"/outbox",views:{tab_outbox:{controller:"ESMessageOutboxListCtrl",templateUrl:"plugins/es/templates/message/tabs/tab_list.html"}},data:{large:"app.user_messages_lg_outbox_by_id"}}).state("app.user_messages_lg_inbox_by_id",{url:"/wallets/:id/message/lg/inbox",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup_lg.html",controller:"ESMessageInboxListCtrl"}}}).state("app.user_messages_lg_outbox",{url:"/user/message/lg/outbox",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup_lg.html",controller:"ESMessageOutboxListCtrl"}},data:{auth:!0,minData:!0}}).state("app.user_messages_lg_outbox_by_id",{url:"/wallets/:id/message/lg/outbox",views:{menuContent:{templateUrl:"plugins/es/templates/message/lookup_lg.html",controller:"ESMessageOutboxListCtrl"}}}).state("app.user_new_message",{cache:!1,url:"/user/message/new?pubkey&uid&title&content&isReply",views:{menuContent:{templateUrl:"plugins/es/templates/message/compose.html",controller:"ESMessageComposeCtrl"}}}).state("app.user_view_message",{cache:!1,url:"/user/message/view/:type/:messageId",views:{menuContent:{templateUrl:"plugins/es/templates/message/view_message.html",controller:"ESMessageViewCtrl"}},data:{auth:!0,minData:!0}}).state("app.user_view_message_by_id",{cache:!1,url:"/wallets/:id/message/view/:type/:messageId",views:{menuContent:{templateUrl:"plugins/es/templates/message/view_message.html",controller:"ESMessageViewCtrl"}}})}]).controller("ESMessageAbstractListCtrl",he).controller("ESMessageInboxListCtrl",ve).controller("ESMessageOutboxListCtrl",Ie).controller("ESMessageComposeCtrl",Oe).controller("ESMessageComposeModalCtrl",Ne).controller("ESMessageViewCtrl",Re).controller("PopoverMessageCtrl",Ae),Se.$inject=["$scope","$ionicPopover","$state","$timeout","UIUtils","esHttp","csWallet","esNotification"],Ce.$inject=["$scope","$timeout","$controller","$state","UIUtils","csWallet"],angular.module("cesium.es.notification.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.view_notifications",{url:"/notifications",views:{menuContent:{templateUrl:"plugins/es/templates/notification/view_notifications.html",controller:"NotificationsCtrl"}},data:{login:!0}}).state("app.view_notifications_by_id",{url:"/wallets/:id/notifications",views:{menuContent:{templateUrl:"plugins/es/templates/notification/view_notifications.html",controller:"NotificationsCtrl"}},data:{login:!0}})}]).controller("NotificationsCtrl",Se).controller("PopoverNotificationsCtrl",Ce),Le.$inject=["$scope","$controller","$ionicPopover","$location","UIUtils","esBlockchain"],angular.module("cesium.es.blockchain.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.lookup_blocks_currency",{url:"/currencies/:currency/blocks?q",views:{menuContent:{templateUrl:"plugins/es/templates/blockchain/lookup.html",controller:"ESBlockLookupCtrl"}}}).state("app.blockchain_search",{url:"/blockchain/search?q&type",views:{menuContent:{templateUrl:"plugins/es/templates/blockchain/lookup.html",controller:"ESBlockLookupCtrl"}},data:{silentLocationChange:!0}})}]).controller("ESBlockLookupCtrl",Le),De.$inject=["$scope","$state","$location","$ionicPopover","$window","$translate","esHttp","UIUtils","csConfig","csSettings","csCurrency","esNetwork","csWot"],ye.$inject=["$scope","$controller","parameters"],Me.$inject=["$scope","$q","$window","$state","UIUtils","csWot","esHttp","csHttp","csSettings"],Pe.$inject=["$scope","$controller"],ke.$inject=["$scope","$q","csSettings","csCurrency","csHttp","esHttp"],angular.module("cesium.es.network.controllers",["cesium.es.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.extendState("app.network",{points:{"network-buttons":{templateUrl:"plugins/es/templates/network/view_network_extend.html",controller:"ESExtensionCtrl"},"blockchain-buttons":{templateUrl:"plugins/es/templates/network/view_network_extend.html",controller:"ESExtensionCtrl"}}})}]).config(["$stateProvider",function(e){e.state("app.es_network",{url:"/network/data?online&expert",cache:!1,views:{menuContent:{templateUrl:"plugins/es/templates/network/view_es_network.html",controller:"ESNetworkLookupCtrl"}},data:{silentLocationChange:!0}}).state("app.view_es_peer",{url:"/network/data/peer/:server?ssl&tor",cache:!1,views:{menuContent:{templateUrl:"plugins/es/templates/network/view_es_peer.html",controller:"ESPeerViewCtrl"}},data:{preferHttp:!0}})}]).controller("ESNetworkLookupCtrl",De).controller("ESNetworkLookupModalCtrl",ye).controller("ESPeerViewCtrl",Me).controller("ESNetworkLookupPopoverCtrl",Pe).controller("ESPeerInfoPopoverCtrl",ke),we.$inject=["$scope","UIUtils","$state","csWallet","esGroup","ModalUtils"],Ue.$inject=["$scope","$state","$ionicPopover","$ionicHistory","$translate","UIUtils","csConfig","esGroup","csWallet"],Be.$inject=["$scope","esGroup","UIUtils","$state","$q","Device","$ionicHistory","ModalUtils","$focus","esHttp"],angular.module("cesium.es.group.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.groups",{url:"/group?type&location",views:{menuContent:{templateUrl:"plugins/es/templates/group/lookup.html",controller:"ESGroupListCtrl"}}}).state("app.add_group",{url:"/group/add/:type",views:{menuContent:{templateUrl:"plugins/es/templates/group/edit_group.html",controller:"ESGroupEditCtrl"}}}).state("app.edit_group",{url:"/group/edit/:id",views:{menuContent:{templateUrl:"plugins/es/templates/group/edit_group.html",controller:"ESGroupEditCtrl"}}}).state("app.view_group",{url:"/group/view/:id",views:{menuContent:{templateUrl:"plugins/es/templates/group/view_record.html",controller:"ESGroupViewCtrl"}}})}]).controller("ESGroupListCtrl",we).controller("ESGroupViewCtrl",Ue).controller("ESGroupEditCtrl",Be),xe.$inject=["$scope","$q","$ionicPopover","$state","$timeout","UIUtils","csWallet","esHttp","esModals","esNotification","esInvitation"],Fe.$inject=["$scope","$controller","csWallet"],He.$inject=["$scope","$q","Modals","UIUtils","csWallet","esHttp","esWallet","esInvitation","parameters"],angular.module("cesium.es.invitation.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.view_invitations",{url:"/invitations?id",views:{menuContent:{templateUrl:"plugins/es/templates/invitation/view_invitations.html",controller:"InvitationsCtrl"}},data:{auth:!0}}).state("app.view_invitations_by_id",{url:"/wallets/:id/invitations",views:{menuContent:{templateUrl:"plugins/es/templates/invitation/view_invitations.html",controller:"InvitationsCtrl"}},data:{login:!0}})}]).controller("InvitationsCtrl",xe).controller("PopoverInvitationCtrl",Fe).controller("ESNewInvitationModalCtrl",He),We.$inject=["$scope","$q","$ionicHistory","csWot","csWallet","UIUtils","ModalUtils","esSubscription"],Ve.$inject=["$scope","Modals","csSettings","esHttp","csWot","esModals","parameters"],angular.module("cesium.es.subscription.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.edit_subscriptions",{cache:!1,url:"/wallet/subscriptions",views:{menuContent:{templateUrl:"plugins/es/templates/subscription/edit_subscriptions.html",controller:"ViewSubscriptionsCtrl"}},data:{auth:!0,minData:!0}}).state("app.edit_subscriptions_by_id",{cache:!1,url:"/wallets/:id/subscriptions",views:{menuContent:{templateUrl:"plugins/es/templates/subscription/edit_subscriptions.html",controller:"ViewSubscriptionsCtrl"}},data:{login:!0,minData:!0}})}]).controller("ViewSubscriptionsCtrl",We).controller("ModalEmailSubscriptionsCtrl",Ve),Ge.$inject=["$scope","$ionicPopover","$location","$timeout","csSettings","csWallet","UIUtils","esHttp","esDocument"],Ye.$inject=["$scope","$controller","$timeout","$state","$filter"],angular.module("cesium.es.document.controllers",["cesium.es.services"]).config(["$stateProvider",function(e){e.state("app.document_search",{url:"/data/search/:index/:type?q",views:{menuContent:{templateUrl:"plugins/es/templates/document/lookup.html",controller:"ESDocumentLookupCtrl"}},data:{silentLocationChange:!0}})}]).controller("ESDocumentLookupCtrl",Ge).controller("ESLastDocumentsCtrl",Ye),je.$inject=["$scope","$q","$timeout","$translate","$ionicPopup","UIUtils","Modals","csWallet","esHttp","esLike"],angular.module("cesium.es.like.controllers",["ngResource","cesium.es.services"]).controller("ESLikesCtrl",je),angular.module("cesium.graph.plugin",["cesium.graph.services","cesium.graph.common.controllers","cesium.graph.blockchain.controllers","cesium.graph.network.controllers","cesium.graph.currency.controllers","cesium.graph.account.controllers","cesium.graph.docstats.controllers","cesium.graph.synchro.controllers"]),angular.module("cesium.graph.services",["cesium.graph.color.services","cesium.graph.data.services"]),angular.module("cesium.graph.data.services",["cesium.wot.services","cesium.es.http.services","cesium.es.wot.services"]).factory("gpData",["$rootScope","$q","$timeout","csHttp","esHttp","BMA","csWot","csCache","esWot",function(e,t,n,i,a,o,r,s,l){var c=s.get("gpData-currency-",s.constants.SHORT),u={node:{},wot:{},blockchain:{},docstat:{},synchro:{execution:{}},raw:{block:{search:a.post("/:currency/block/_search")},blockstat:{search:a.post("/:currency/blockstat/_search")},movement:{search:a.post("/:currency/movement/_search")},user:{event:a.post("/user/event/_search?pretty")},docstat:{search:a.post("/document/stats/_search")},synchro:{search:a.post("/:currency/synchro/_search")}},regex:{}};function d(e,t){return t<=0?e:e*Math.pow(10,t)}function p(e,t,n,a){return t=t||80,n=angular.isDefined(n)?n:443==t,{docstat:{search:i.post(e,t,"/document/stats/_search",n,a)},synchro:{search:i.post(e,t,"/:currency/synchro/_search",n,a)}}}function m(e){return(e=e||{}).maxRangeSize=e.maxRangeSize||30,e.defaultTotalRangeCount=e.defaultTotalRangeCount||2*e.maxRangeSize,e.rangeDuration=e.rangeDuration||"day",e.endTime=e.endTime||moment().utc().add(1,e.rangeDuration).unix(),e.startTime=e.startTime||moment.unix(e.endTime).utc().subtract(e.defaultTotalRangeCount,e.rangeDuration).unix(),e.firstBlockTime&&e.startTime<e.firstBlockTime&&(e.startTime=e.firstBlockTime),e}return u.blockchain.countByIssuer=function(e){return u.raw.block.search({size:0,aggs:{blocksByIssuer:{terms:{field:"issuer",size:0}}}},{currency:e}).then((function(e){var t=e.aggregations;if(t.blocksByIssuer&&t.blocksByIssuer.buckets&&t.blocksByIssuer.buckets.length){var n={blockCount:e.hits.total};return n.data=(t.blocksByIssuer.buckets||[]).reduce((function(e,t){return e.concat(t.doc_count)}),[]),n.issuers=(t.blocksByIssuer.buckets||[]).reduce((function(e,t){return e.concat({pubkey:t.key})}),[]),r.extendAll(n.issuers).then((function(){return n.labels=n.issuers.reduce((function(e,t){return e.concat(t.name||t.uid||t.pubkey.substr(0,8))}),[]),n}))}}))},u.blockchain.withDividend=function(e,n){n=n||{};var i=!angular.isDefined(n.withCache)||n.withCache,a=[e,JSON.stringify(n)].join("-");if(i){var r=c.get(a);if(r){if(!r.blocks){var s=t.defer();return r.then((function(e){return s.resolve(e),e})),s.promise}return console.debug("[graph] monetaryMass for ["+e+"] found in cache"),t.when(r)}}var l={query:{filtered:{filter:{bool:{must:[{exists:{field:"dividend"}}]}}}},size:n.size||1e4,from:n.from||0,_source:["medianTime","number","dividend","monetaryMass","membersCount","unitbase"],sort:{medianTime:"asc"}},p=t.all([n.withCurrent?o.blockchain.current().catch((function(e){if(!e||e.ucode!=o.errorCodes.NO_CURRENT_BLOCK)throw e})):t.when(),u.raw.block.search(l,{currency:e})]).then((function(e){var t=e[0];if((e=e[1]).hits.total&&e.hits.hits.length){var n={};if(n.blocks=e.hits.hits.reduce((function(e,t){var n=t._source;return n.dividend=d(n.dividend,n.unitbase),delete n.unitbase,e.concat(n)}),[]),t){var i=n.blocks.length&&t.medianTime-n.blocks[n.blocks.length-1].medianTime;i&&i>=3600&&(t.dividend=d(t.dividend,t.unitbase),delete t.unitbase,n.blocks.push(t))}return n.times=n.blocks.reduce((function(e,t){return e.concat(t.medianTime)}),[]),c.put(a,n),n}}));return c.put(a,p),p},u.blockchain.txCount=function(e,n){n=m(n);for(var i=[],a=moment.unix(n.startTime).utc().startOf(n.rangeDuration),o=moment.unix(n.endTime).utc().startOf(n.rangeDuration),r=[];a.isBefore(o);)if(r.push({from:a.unix(),to:a.add(1,n.rangeDuration).unix()}),r.length===n.maxRangeSize||!a.isBefore(o)){var s={size:0,aggs:{tx:{range:{field:"medianTime",ranges:r},aggs:{txCount:{stats:{field:"txCount"}},txAmount:{stats:{field:"txAmount"}}}}}};n.issuer&&(s.query={bool:{filter:{term:{issuer:n.issuer}}}}),r=[],10===i.length?(console.error("Too many parallel jobs!"),a=moment.unix(n.endTime).utc()):i.push(u.raw.blockstat.search(s,{currency:e}).then((function(e){var t=e.aggregations;if(t.tx&&t.tx.buckets&&t.tx.buckets.length)return(t.tx.buckets||[]).reduce((function(e,t){return e.concat({from:t.from,to:t.to,count:t.txCount.sum||0,amount:t.txAmount.sum||0,avgByBlock:Math.round(100*t.txCount.avg)/100,maxByBlock:t.txCount.max})}),[])})))}return t.all(i).then((function(e){return e=e.reduce((function(e,t){return t&&t.length?e.concat(t):e}),[]),e=_.sortBy(e,"from"),{count:_.pluck(e,"count"),avgByBlock:_.pluck(e,"avgByBlock"),maxByBlock:_.pluck(e,"maxByBlock"),amount:e.reduce((function(e,t){return e.concat(t.amount/100)}),[]),times:_.pluck(e,"from")}}))},u.node.blockCount=function(e,t){var n={size:0,query:{bool:{filter:{term:{issuer:t}}}}};return u.raw.block.search(n,{currency:e}).then((function(e){return e.hits.total}))},u.raw.movement.getByRange=function(e,t,n){if(!t)throw new Error("Missing 'pubkey' argument!");var i={size:0,query:{bool:{should:[{term:{recipient:t}},{term:{issuer:t}}]}},aggs:{tx:{range:{field:"medianTime",ranges:n},aggs:{received:{filter:{term:{recipient:t}},aggs:{received_stats:{stats:{field:"amount"}}}},sent:{filter:{term:{issuer:t}},aggs:{sent_stats:{stats:{field:"amount"}}}}}}}};return u.raw.movement.search(i,{currency:e}).then((function(e){var t=e.aggregations;if(t.tx&&t.tx.buckets&&t.tx.buckets.length)return(t.tx.buckets||[]).reduce((function(e,t){var n=t.sent.sent_stats,i=t.received.received_stats;return e.concat({from:t.from,to:t.to,sent:n.sum?-n.sum/100:0,received:i.sum?i.sum/100:0})}),[])}))},u.raw.movement.getUds=function(e,t,n){var i={size:0,query:{bool:{should:[{exists:{field:"dividend"}}]}},aggs:{ud:{range:{field:"medianTime",ranges:t},aggs:{ud_stats:{stats:{field:"dividend"}},unitbase_stats:{stats:{field:"unitbase"}}}}}};return u.raw.block.search(i,{currency:e}).then((function(e){var t=e.aggregations;if(t.ud&&t.ud.buckets&&t.ud.buckets.length)return(t.ud.buckets||[]).reduce((function(e,t){return e[n[t.from]]=d(t.ud_stats.sum,t.unitbase_stats.min)/100,e}),{})}))},u.blockchain.movement=function(e,n){(n=m(n)).withUD=!angular.isDefined(n.withUD)||n.withUD;var i=[];if(n.withUD&&!n.memberships)return l.memberships(n.pubkey).then((function(t){return n.memberships=t||[],u.blockchain.movement(e,n)}));var a=moment.unix(n.startTime).utc().startOf(n.rangeDuration),o=moment.unix(n.endTime).utc().startOf(n.rangeDuration),r=[],s=[],c={},d=angular.copy(n.memberships).reverse(),p=d.pop();function E(e){if(r.push(e),p&&p.joinTime<e.to){var t={from:Math.max(p.joinTime,e.from),to:Math.min(p.leaveTime,e.to)};for(s.push(t),c[t.from]=e.from;p&&p.leaveTime&&p.leaveTime<e.to;)p=d.pop()}}for(E({from:0,to:a.unix()});a.isBefore(o);)E({from:a.unix(),to:a.add(1,n.rangeDuration).unix()}),(!i.length&&r.length==n.maxRangeSize+1||i.length&&r.length==n.maxRangeSize||!a.isBefore(o))&&(s.length?i.push(t.all([u.raw.movement.getUds(e,s,c),u.raw.movement.getByRange(e,n.pubkey,r)]).then((function(e){var t=e[0];return(e=e[1]).forEach((function(e){e.ud=t[e.from]||0})),e}))):i.push(u.raw.movement.getByRange(e,n.pubkey,r).then((function(e){return e.forEach((function(e){e.ud=0})),e}))),r=[]);return t.all(i).then((function(e){if((e=e.reduce((function(e,t){return t&&t.length?e.concat(t):e}),[])).length){var t=(e=_.sortBy(e,"from")).splice(0,1)[0],n=t.received+t.sent+t.ud;return{times:_.pluck(e,"from"),ud:_.pluck(e,"ud"),sent:_.pluck(e,"sent"),received:_.pluck(e,"received"),balance:e.reduce((function(e,t){return n+=t.received+t.sent+t.ud,e.concat(n)}),[])}}}))},u.wot.certifications=function(e){return e=m(e),r.load(e.pubkey).then((function(t){if(t){var n={};_.forEach(t.given_cert||[],(function(t){var i=moment.unix(t.time).utc().startOf(e.rangeDuration).unix();n[i]=n[i]||{time:i,given:0,received:0},n[i].given++})),_.forEach(t.received_cert||[],(function(t){var i=moment.unix(t.time).utc().startOf(e.rangeDuration).unix();n[i]=n[i]||{time:i,given:0,received:0},n[i].received++})),n=_.sortBy(_.values(n),"time");var i={times:_.pluck(n,"time"),deltaGiven:_.pluck(n,"given"),deltaReceived:_.pluck(n,"received")},a=0;return i.given=i.deltaGiven.reduce((function(e,t){return a+=t,e.concat(a)}),[]),a=0,i.received=i.deltaReceived.reduce((function(e,t){return a+=t,e.concat(a)}),[]),i}}))},u.wot.memberships=function(e){var t={size:1e3,query:{bool:{filter:[{term:{recipient:(e=e||{}).pubkey}},{terms:{code:["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"]}}]}},sort:[{time:{order:"asc"}}],_source:["code","time"]};return u.raw.user.event(t).then((function(e){if(e.hits&&e.hits.total){var t,n=e.hits.hits.reduce((function(e,n){var i="MEMBER_JOIN"==n._source.code||"MEMBER_ACTIVE"==n._source.code;return i&&!t?t=n._source.time:!i&&t&&(e=e.concat({joinTime:t,leaveTime:n._source.time}),t=0),e}),[]);return t&&n.push({joinTime:t,leaveTime:moment().utc().unix()}),n}}))},u.docstat.get=function(e){e=m(e);var n=u.raw.docstat.search;if(e.server){var i=e.server.split(":");n=p(i[0],i[1]||80,e.useSsl).docstat.search}for(var a=[],o=moment.unix(e.startTime).utc().startOf(e.rangeDuration),r=moment.unix(e.endTime).utc().startOf(e.rangeDuration),s=[],l=function(e){var t=e.aggregations;return(t.range&&t.range.buckets||[]).reduce((function(e,t){var n={from:t.from,to:t.to};return _.forEach(t.index&&t.index.buckets||[],(function(e){var t=e.key;_.forEach(e.type&&e.type.buckets||[],(function(e){var i=t+"_"+e.key;n[i]=e.max.value,d[i]||(d[i]=!0)}))})),e.concat(n)}),[])};o.isBefore(r);)if(s.push({from:o.unix(),to:o.add(1,e.rangeDuration).unix()}),s.length===e.maxRangeSize||!o.isBefore(r)){var c={size:0,aggs:{range:{range:{field:"time",ranges:s},aggs:{index:{terms:{field:"index",size:0},aggs:{type:{terms:{field:"type",size:0},aggs:{max:{max:{field:"count"}}}}}}}}}};s=[];var d={},E={request_cache:!angular.isDefined(e.cache)||e.cache};10===a.length?(console.error("Too many parallel jobs!"),o=moment.unix(e.endTime).utc()):a.push(n(c,E).then(l))}return t.all(a).then((function(e){return e=e.reduce((function(e,t){return t&&t.length?e.concat(t):e}),[]),e=_.sortBy(e,"from"),_.keys(d).reduce((function(t,n){return t[n]=_.pluck(e,n),t}),{times:_.pluck(e,"from")})}))},u.synchro.execution.get=function(e){e=m(e);var n=u.raw.synchro.search;if(e.server){var i=e.server.split(":");n=p(i[0],i[1]||80,e.useSsl).synchro.search}for(var a=[],o=moment.unix(e.startTime).utc().startOf(e.rangeDuration),r=moment.unix(e.endTime).utc().startOf(e.rangeDuration),s=[],l=function(e){var t=e.aggregations;return(t.range&&t.range.buckets||[]).reduce((function(e,t){var n={from:t.from,to:t.to,inserts:t.result.inserts.value,updates:t.result.inserts.value,deletes:t.result.deletes.value,duration:t.duration.value};return _.forEach(t.api&&t.api.buckets||[],(function(e){n[e.key]=e.peer_count&&e.peer_count.value||0,d[e.key]||(d[e.key]=!0)})),e.concat(n)}),[])};o.isBefore(r);)if(s.push({from:o.unix(),to:o.add(1,e.rangeDuration).unix()}),s.length===e.maxRangeSize||!o.isBefore(r)){var c={size:0,aggs:{range:{range:{field:"time",ranges:s},aggs:{api:{terms:{field:"api",size:0},aggs:{peer_count:{cardinality:{field:"peer"}}}},duration:{sum:{field:"executionTime"}},result:{nested:{path:"result"},aggs:{inserts:{sum:{field:"result.inserts"}},updates:{sum:{field:"result.updates"}},deletes:{sum:{field:"result.deletes"}}}}}}}};s=[];var d={};10===a.length?(console.error("Too many parallel jobs!"),o=moment.unix(e.endTime).utc()):a.push(n(c,{currency:e.currency}).then(l))}return t.all(a).then((function(e){e=e.reduce((function(e,t){return t&&t.length?e.concat(t):e}),[]),e=_.sortBy(e,"from");var t={times:_.pluck(e,"from"),inserts:_.pluck(e,"inserts"),updates:_.pluck(e,"updates"),deletes:_.pluck(e,"deletes"),duration:_.pluck(e,"duration")};return _.keys(d).forEach((function(n){t[n]=_.pluck(e,n)})),t}))},a.api.node.on.stop(e,(function(){console.debug("[graph] Cleaning cache {prefix: '{0}'}...".format("gpData-")),s.clear("gpData-")}),this),u}]),angular.module("cesium.graph.color.services",[]).factory("gpColor",(function(){var e={css2Rgb:{white:[255,255,255],assertive:[239,71,58],calm:[17,193,243],positive:[56,126,245],balanced:[51,205,95],energized:[255,201,0],royal:[136,106,234],gray:[150,150,150],stable:[248,248,248]}},t={scale:{}};return t.scale.custom=function(e,t,n,i){function a(e){switch(e){case 0:return 0;case 1:return-1;case 2:return 0;case 3:return 1}}t=t>0&&t||.55;for(var o=Math.round(e/2.5),r=n&&3==n.length?angular.copy(n):[255,0,0],s=i&&3==i.length?angular.copy(i):[0,2,3],l=n?[Math.round(255/o),Math.round(255/o),Math.round(255/o)]:[Math.round((r[0]-50)/o),Math.round((255-r[1])/o),Math.round((255-r[2])/o)],c=[a(s[0]),a(s[1]),a(s[2])],u=[0,0,0],d=[],p=0;p<e;p++){for(var m=0;m<3;m++)r[m]+=c[m]*l[m],u[m]++,((r[m]<=0||r[m]>=255)&&0!==c[m]||0===c[m]&&u[m]==o)&&(r[m]<=0?r[m]=0:r[m]>=255&&(r[m]=255),s[m]=(s[m]+1)%4,c[m]=a(s[m]),u[m]=0);d.push("rgba("+r[0]+","+r[1]+","+r[2]+","+t+")")}return d},t.scale.default=function(){return t.scale.custom(25)},t.scale.fix=function(e,n){return Array.apply(null,Array(e||25)).map(String.prototype.valueOf,n||t.rgba.calm(.5))},t.rgba=_.mapObject(e.css2Rgb,(function(e){var t="rgba("+e.join(",")+",";return function(n){return!n||n<0?"rgb("+e.join(",")+")":t+n+")"}})),t.rgba.translucent=function(){return"rgb(0,0,0,0)"},t.constants=e,t})),Ke.$inject=["$scope","$filter","$ionicPopover","$ionicHistory","$state","csSettings","csCurrency","esHttp","UIUtils"],angular.module("cesium.graph.common.controllers",["cesium.services"]).controller("GpCurrencyAbstractCtrl",Ke),$e.$inject=["$scope","$controller","$q","$state","$filter","$translate","gpData","gpColor"],ze.$inject=["$scope","$controller","$q","$state","$translate","gpColor","gpData"],angular.module("cesium.graph.blockchain.controllers",["chart.js","cesium.services","cesium.graph.services"]).config(["$stateProvider",function(e){e.state("app.blockchain_stats",{url:"/blockchain/stats?currency&stepUnit&t&hide&scale",views:{menuContent:{templateUrl:"plugins/graph/templates/blockchain/view_stats.html"}}}).state("app.currency_blockchain_stats",{url:"/:currency/blockchain/stats",views:{menuContent:{templateUrl:"plugins/graph/templates/blockchain/view_stats.html"}}})}]).controller("GpBlockchainTxCountCtrl",$e).controller("GpBlockchainIssuersCtrl",ze),qe.$inject=["$scope","$timeout","PluginService","esSettings","csCurrency","gpData"],angular.module("cesium.graph.network.controllers",["chart.js","cesium.graph.services"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(t.extendState("app.network",{points:{"blockchain-buttons":{templateUrl:"plugins/graph/templates/network/view_network_extend.html",controller:"ESExtensionCtrl"}}}).extendState("app.view_peer",{points:{general:{templateUrl:"plugins/graph/templates/network/view_peer_extend.html",controller:"GpPeerViewExtendCtrl"}}}).extendState("app.es_network",{points:{"documents-buttons":{templateUrl:"plugins/graph/templates/network/view_es_network_extend.html",controller:"ESExtensionCtrl"}}}).extendState("app.view_es_peer",{points:{general:{templateUrl:"plugins/graph/templates/network/view_es_peer_extend.html",controller:"ESExtensionCtrl"}}}),e.state("app.view_peer_stats",{url:"/network/peer/:pubkey/stats",views:{menuContent:{templateUrl:"plugins/graph/templates/network/view_peer_stats.html",controller:"GpBlockchainTxCountCtrl"}}}))}]).controller("GpPeerViewExtendCtrl",qe),Xe.$inject=["$scope","PluginService","UIUtils","esSettings"],Qe.$inject=["$scope","$controller","$q","$state","$translate","UIUtils","gpColor","gpData","$filter","csSettings"],Je.$inject=["$scope","$q","$controller","$translate","gpColor","gpData","$filter","UIUtils"],Ze.$inject=["$scope","$controller","$q","$state","$translate","gpColor","gpData","$filter"],angular.module("cesium.graph.currency.controllers",["chart.js","cesium.graph.services","cesium.graph.common.controllers"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){e.state("app.currency.tab_parameters_stats",{url:"/parameters/stats",views:{"tab-parameters":{templateUrl:"plugins/graph/templates/currency/tabs/tab_parameters_stats.html"}}}).state("app.currency.tab_wot_stats",{url:"/community/stats",views:{"tab-wot":{templateUrl:"plugins/graph/templates/currency/tabs/tab_wot_stats.html",controller:"GpCurrencyMembersCountCtrl"}}}).state("app.currency.tab_network_stats",{url:"/network/stats",views:{"tab-network":{templateUrl:"plugins/graph/templates/currency/tabs/tab_network_stats.html"}}}).state("app.currency.tab_blocks_stats",{url:"/blocks/stats",views:{"tab-blocks":{templateUrl:"plugins/graph/templates/currency/tabs/tab_blocks_stats.html"}}}).state("app.currency_stats_lg",{url:"/currency/stats/lg?hide&scale",views:{menuContent:{templateUrl:"plugins/graph/templates/currency/view_stats_lg.html"}}}),n.plugins&&n.plugins.es&&t.extendStates(["app.currency_name","app.currency","app.currency_name_lg","app.currency_lg"],{points:{"parameters-actual":{templateUrl:"plugins/graph/templates/currency/view_currency_extend.html",controller:"GpCurrencyViewExtendCtrl"},"wot-actual":{templateUrl:"plugins/graph/templates/currency/view_currency_extend.html",controller:"GpCurrencyViewExtendCtrl"},"network-actual":{templateUrl:"plugins/graph/templates/currency/view_currency_extend.html",controller:"GpCurrencyViewExtendCtrl"}}}).extendStates(["app.currency.tab_blocks"],{points:{buttons:{templateUrl:"plugins/graph/templates/currency/tab_blocks_extend.html",controller:"GpCurrencyViewExtendCtrl"}}})}]).controller("GpCurrencyViewExtendCtrl",Xe).controller("GpCurrencyMonetaryMassCtrl",Qe).controller("GpCurrencyDUCtrl",Je).controller("GpCurrencyMembersCountCtrl",Ze),et.$inject=["$scope","$controller","$q","$state","$filter","$translate","csWot","gpData","gpColor","csWallet"],tt.$inject=["$scope","$controller","$filter","$state","csTx","gpColor"],nt.$inject=["$scope","$controller","$q","$state","$filter","$translate","gpData","gpColor","csWallet"],angular.module("cesium.graph.account.controllers",["chart.js","cesium.graph.services"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(t.extendState("app.view_wallet_tx",{points:{buttons:{templateUrl:"plugins/graph/templates/account/view_wallet_tx_extend.html",controller:"ESExtensionCtrl"}}}).extendState("app.view_wallet_tx_by_id",{points:{buttons:{templateUrl:"plugins/graph/templates/account/view_wallet_tx_extend.html",controller:"ESExtensionCtrl"}}}).extendStates(["app.wot_identity_tx_uid","app.wot_identity_tx_uid_lg"],{points:{buttons:{templateUrl:"plugins/graph/templates/account/view_identity_tx_extend.html",controller:"ESExtensionCtrl"}}}),e.state("app.view_wallet_stats",{url:"/wallet/stats?t&stepUnit&hide&scale",views:{menuContent:{templateUrl:"plugins/graph/templates/account/view_stats.html"}},data:{auth:!0}}).state("app.view_wallet_stats_by_id",{url:"/wallets/:id/stats?t&stepUnit&hide&scale",views:{menuContent:{templateUrl:"plugins/graph/templates/account/view_stats.html"}},data:{auth:!0}}).state("app.wot_identity_stats",{url:"/wot/:pubkey/stats?t&stepUnit&hide&scale",views:{menuContent:{templateUrl:"plugins/graph/templates/account/view_stats.html"}}}))}]).controller("GpAccountBalanceCtrl",et).controller("GpAccountSumTxCtrl",tt).controller("GpAccountCertificationCtrl",nt),it.$inject=["$scope","$state","$controller","$q","$translate","gpColor","gpData","$filter"],angular.module("cesium.graph.docstats.controllers",["chart.js","cesium.graph.services","cesium.graph.common.controllers"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){e.state("app.doc_stats_lg",{url:"/network/data/stats/:server?stepUnit&t&hide&scale&useSsl&useTor",views:{menuContent:{templateUrl:"plugins/graph/templates/docstats/view_stats.html",controller:"GpDocStatsCtrl"}}}).state("app.doc_stats_lg_old",{url:"/data/stats?stepUnit&t&hide&scale&useSsl&useTor",views:{menuContent:{templateUrl:"plugins/graph/templates/docstats/view_stats.html",controller:"GpDocStatsCtrl"}}}),n.plugins&&n.plugins.es}]).controller("GpDocStatsCtrl",it),at.$inject=["$scope","$controller","$q","$translate","gpColor","gpData","$filter"],angular.module("cesium.graph.synchro.controllers",["chart.js","cesium.graph.services","cesium.graph.common.controllers"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){e.state("app.doc_synchro_lg",{url:"/network/data/synchro/:server?stepUnit&t&hide&scale&useSsl&useTor",views:{menuContent:{templateUrl:"plugins/graph/templates/synchro/view_stats.html",controller:"GpSynchroCtrl"}}}).state("app.doc_synchro_lg_old",{url:"/data/synchro?stepUnit&t&hide&scale&useSsl&useTor",views:{menuContent:{templateUrl:"plugins/graph/templates/synchro/view_stats.html",controller:"GpSynchroCtrl"}}}),n.plugins&&n.plugins.es}]).controller("GpSynchroCtrl",at),angular.module("cesium.map.plugin",["ui-leaflet","cesium.map.services","cesium.map.common.controllers","cesium.map.wot.controllers","cesium.map.registry.controllers","cesium.map.network.controllers","cesium.map.user.controllers","cesium.map.settings.controllers","cesium.map.help.controllers"]).config((function(){L.AwesomeMarkers.Icon.prototype.options.prefix="ion"})),angular.module("cesium.map.services",["cesium.map.wot.services","cesium.map.registry.services","cesium.map.utils.services"]),angular.module("cesium.map.wot.services",["cesium.services"]).factory("mapWot",["$q","csHttp","esHttp","esSettings","csWot","BMA","esGeo",function(e,t,n,i,a,o,r){var s=this,l=1e3,c={min:["title","geoPoint"],profile:["title","geoPoint","avatar._content_type","address","city"]};function u(e){var t={bool:{}};if((e=e||{}).searchAddress?t.bool.should=[{exists:{field:"geoPoint"}},{exists:{field:"city"}}]:t.bool.must=[{exists:{field:"geoPoint"}}],e.bounds&&e.bounds.northEast&&e.bounds.southWest){var n={geoPoint:{top_left:{lat:Math.max(Math.min(e.bounds.northEast.lat,90),-90),lon:Math.max(Math.min(e.bounds.southWest.lng,180),-180)},bottom_right:{lat:Math.max(Math.min(e.bounds.southWest.lat,90),-90),lon:Math.max(Math.min(e.bounds.northEast.lng,180),-180)}}};console.debug("[map] [wot] Filtering on bounds: ",e.bounds),t.bool.must=t.bool.must||[],t.bool.must.push({geo_bounding_box:n})}return t}function d(t,i,a,o){var s=new RegExp("[,]"),l=[],c=o.hits.hits.reduce((function(e,o){var r=o._id,c=i[r],u=c&&{uid:c}||a[r]||{};if(u.pubkey=r,u.index=o._index,u.city=o._source.city,u.address=o._source.address,u.geoPoint=o._source.geoPoint,u.geoPoint&&u.geoPoint.lat&&u.geoPoint.lon)u.geoPoint.lat&&"string"==typeof u.geoPoint.lat&&(u.geoPoint.lat=parseFloat(u.geoPoint.lat.replace(s,"."))),u.geoPoint.lon&&"string"==typeof u.geoPoint.lon&&(u.geoPoint.lon=parseFloat(u.geoPoint.lon.replace(s,".")));else{if(!t.searchAddress||!u.city)return e;u.searchAddress=u.city&&(o._source.address?o._source.address+", ":"")+u.city,l.push(u)}return u.avatar=n.image.fromHit(o,"avatar"),u.name=o._source.title,u.name&&u.name.length>30&&(u.name=u.name.substr(0,27)+"..."),u.description=o._source.description&&n.util.parseAsHtml(o._source.description),u.geoPoint?e.concat(u):e}),[]);if(l.length){var u=Date.now();console.debug("[map] [wot] Search positions of {0} addresses...".format(l.length));var d=0;return e.all(l.reduce((function(e,t){return t.city?e.concat(r.google.searchByAddress(t.searchAddress).then((function(e){e&&e.length&&(t.geoPoint=e[0],t.city==t.searchAddress&&(t.geoPoint.lon+=Math.random()/1e3,t.geoPoint.lat+=Math.random()/1e3),delete t.searchAddress,c.push(t),d++)})).catch((function(){}))):e}),[])).then((function(){return console.debug("[map] [wot] Resolved {0}/{1} addresses in {2}ms".format(d,l.length,Date.now()-u)),c}))}return e.when(c)}return s.raw={profile:{search:n.post("/user/profile/_search"),mixedSearch:n.post("/user,page,group/profile,record/_search")}},{load:function(t){(t=t||{}).from=t.from||0,t.size=t.size||l,t.searchAddress=r.google.isEnable()&&(!angular.isDefined(t.searchAddress)||t.searchAddress),t.fields=t.fields||{},t.fields.description=!!angular.isDefined(t.fields.description)&&t.fields.description;var n={query:u(t),from:0,size:t.size,_source:t.fields.description?c.profile.concat("description"):c.profile},i=s.raw.profile.search;return e.all([i(n),o.wot.member.uids(),o.wot.member.pending().then((function(e){return e.memberships&&e.memberships.length?e.memberships:[]}))]).then((function(a){var o=a[1],r=a[2];if(!(a=a[0]).hits||!a.hits.total)return[];r=r.reduce((function(e,t){if("IN"==t.membership&&!o[t.pubkey]){var n={uid:t.uid,pubkey:t.pubkey,block:t.blockNumber,blockHash:t.blockHash,pending:!0},i=e[t.pubkey];if(i&&n.block>i.block)return e;e[n.pubkey]=n}return e}),{});var s=[d(t,o,r,a)];for(n.from+=n.size;n.from<a.hits.total;)s.push(i(angular.copy(n)).then((function(e){return e.hits&&e.hits.hits.length?d(t,o,r,e):[]}))),n.from+=n.size;return e.all(s).then((function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}))}))}}}]),angular.module("cesium.map.registry.services",["cesium.services"]).factory("mapRegistry",["$q","csHttp","esHttp","esSettings","csWot","BMA","esGeo",function(e,t,n,i,a,o,r){var s=this,l=1e3,c={record:["title","geoPoint","avatar._content_type","address","city","type","pubkey","issuer","category"]};function u(e){var t={bool:{}};return(e=e||{}).searchAddress?t.bool.should=[{exists:{field:"geoPoint"}},{exists:{field:"city"}}]:t.bool.must=[{exists:{field:"geoPoint"}}],e.bounds&&e.bounds.northEast&&e.bounds.southWest&&(t.bool.should=t.bool.should||{},t.bool.should.geo_bounding_box={geoPoint:{top_left:{lat:Math.max(Math.min(e.bounds.northEast.lat,90),-90),lon:Math.max(Math.min(e.bounds.southWest.lng,180),-180)},bottom_right:{lat:Math.max(Math.min(e.bounds.southWest.lat,90),-90),lon:Math.max(Math.min(e.bounds.northEast.lng,180),-180)}}}),t}function d(t,i){var a=new RegExp("[,]"),o=[],s=i.hits.hits.reduce((function(e,i){var r=i._source.issuer,s={};if(s.issuer=r,s.pubkey=i._source.pubkey||s.issuer,s.id=i._id,s.index=i._index,s.type=i._source.type,s.category=i._source.category,s.category&&delete s.category.parent,s.city=i._source.city,s.address=i._source.address,s.geoPoint=i._source.geoPoint,s.geoPoint&&s.geoPoint.lat&&s.geoPoint.lon)s.geoPoint.lat&&"string"==typeof s.geoPoint.lat&&(s.geoPoint.lat=parseFloat(s.geoPoint.lat.replace(a,"."))),s.geoPoint.lon&&"string"==typeof s.geoPoint.lon&&(s.geoPoint.lon=parseFloat(s.geoPoint.lon.replace(a,".")));else{if(!t.searchAddress||!s.city)return e;s.searchAddress=s.city&&(i._source.address?i._source.address+", ":"")+s.city,o.push(s)}return s.avatar=n.image.fromHit(i,"avatar"),s.name=i._source.title,s.name&&s.name.length>30&&(s.name=s.name.substr(0,27)+"..."),s.description=i._source.description&&n.util.parseAsHtml(i._source.description),s.geoPoint?e.concat(s):e}),[]);if(o.length){var l=Date.now();console.debug("[map] [registry] Search positions of {0} addresses...".format(o.length));var c=0;return e.all(o.reduce((function(e,t){return t.city?e.concat(r.google.searchByAddress(t.searchAddress).then((function(e){e&&e.length&&(t.geoPoint=e[0],t.city==t.searchAddress&&(t.geoPoint.lon+=Math.random()/1e3,t.geoPoint.lat+=Math.random()/1e3),delete t.searchAddress,s.push(t),c++)})).catch((function(){}))):e}),[])).then((function(){return console.debug("[map] [registry] Resolved {0}/{1} addresses in {2}ms".format(c,o.length,Date.now()-l)),s}))}return e.when(s)}return s.raw={profile:{search:n.post("/page/record/_search"),mixedSearch:n.post("/user,page,group/profile,record/_search")}},{load:function(t){(t=t||{}).from=t.from||0,t.size=t.size||l,t.searchAddress=r.google.isEnable()&&(!angular.isDefined(t.searchAddress)||t.searchAddress),t.fields=t.fields||{},t.fields.description=!angular.isDefined(t.fields.description)||t.fields.description;var n={query:u(t),from:0,size:t.size,_source:t.fields.description?c.record.concat("description"):c.record},i=s.raw.profile.search,a=function(n){return n.hits&&n.hits.hits.length?d(t,n):e.when([])};return i(n).then((function(o){if(!o.hits||!o.hits.total)return[];var r=[d(t,o)];for(n.from+=n.size;n.from<o.hits.total;)r.push(i(angular.copy(n)).then(a)),n.from+=n.size;return e.all(r).then((function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}))}))}}}]),angular.module("cesium.map.utils.services",["cesium.services","ui-leaflet"]).factory("MapUtils",["$timeout","$q","$translate","$window","leafletData","csConfig","csSettings","esGeo","UIUtils","leafletHelpers",function(e,t,n,i,a,o,r,s,l,c){var u=o.plugins&&o.plugins.es&&o.plugins.es.googleApiKey,d={locations:{FRANCE:{lat:46.5588603,lng:4.229736328124999,zoom:6}},LOCALIZE_ZOOM:15},p={cache:{}};function m(e,t){return c.isSameCenterOnMap(e,t)}function E(e,t){if(!e||!t)throw"Illegal arguments";if(e._container)e._container.id=t;else{var n=e.onAdd;e.onAdd=function(e){var i=n.call(this,e);return i.id=t,i}}}return d.DEFAULT_CENTER=r.data&&r.data.plugins&&r.data.plugins.map&&r.data.plugins.map.center||d.locations.FRANCE,{map:function(e){var t;return(e=angular.merge({center:angular.copy(d.DEFAULT_CENTER),cache:!1,defaults:{scrollWheelZoom:!0,tileLayerOptions:{attribution:'© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}},layers:{baselayers:{osm:{name:"OpenStreetMap",type:"xyz",url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",layerOptions:{subdomains:["a","b","c"],attribution:'&copy; <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',continuousWorld:!0}},google:{name:"Google map",type:"xyz",url:"https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key="+u,layerOptions:{subdomains:["mt0","mt1","mt2","mt3"],attribution:'&copy; <a target="_blank"  href="https://www.google.com/intl/fr_fr/help/terms_maps.html">Google</a>',continuousWorld:!0}}}},controls:{custom:[]}},e||{})).cache&&p.cache[e.cache]&&(console.debug("[map] Restoring map from cache :",p.cache[e.cache]),e=angular.merge(e,p.cache[e.cache])),e.layers.overlays&&(t=_.keys(e.layers.overlays).reduce((function(t,n){return t.concat(e.layers.overlays[n].name)}),[]),n(t).then((function(t){_.keys(e.layers.overlays||{}).forEach((function(n){e.layers.overlays[n].name=t[e.layers.overlays[n].name]}))}))),e},updateCenter:function(n,i){return m(i,n)?t.when():e((function(){n.invalidateSize(),n._resetView(i,i.zoom,!0)}),300)},center:{get:function(e){var t;if(e&&(e.lat&&((t={}).lat=parseFloat(e.lat)),(e.lng||e.lon)&&((t=t||{}).lng=parseFloat(e.lng||e.lon)),e.zoom&&((t=t||{}).zoom=parseFloat(e.zoom)),t))return c.isValidCenter(t)||(t=angular.merge({},d.DEFAULT_CENTER,t)),t},isSame:m,isDefault:function(e){var t=d.DEFAULT_CENTER;return!(!e.lat||!e.lng||t.lat.toFixed(4)!==e.lat.toFixed(4)||t.lng.toFixed(4)!==e.lng.toFixed(4)||t.zoom!==e.zoom)}},control:{search:function(e){(e=e||{}).initial=!!angular.isDefined(e.initial)&&e.initial,e.marker=!!angular.isDefined(e.marker)&&e.marker,e.propertyName=angular.isDefined(e.propertyName)?e.propertyName:"title",e.position=angular.isDefined(e.position)?e.position:"topleft",e.zoom=angular.isDefined(e.zoom)?e.zoom:d.LOCALIZE_ZOOM,e.markerLocation=!angular.isDefined(e.markerLocation)||e.markerLocation;var t=n(["MAP.COMMON.SEARCH_DOTS","COMMON.SEARCH_NO_RESULT"]);return{addTo:function(n){t.then((function(t){var i=L.control.search(angular.merge(e,{textPlaceholder:t["MAP.COMMON.SEARCH_DOTS"],textErr:t["COMMON.SEARCH_NO_RESULT"]}));e.id&&E(i,e.id),i.addTo(n)}))}}},localizeMe:function(e){return e=e||{},L.easyButton({position:"topleft",type:"replace",leafletClasses:!0,states:[{stateName:"locate-me",onClick:function(e,t){s.point.current().then((function(e){t.setView({lat:e.lat,lng:e.lon},d.LOCALIZE_ZOOM)})).catch((function(e){console.error(e),l.alert.error("MAP.ERROR.LOCALIZE_ME_FAILED")}))},title:e.title,icon:"icon ion-android-locate"}]})},setId:E},cache:{bind:function(e,t,n){if(n=n||{},!t||!n.layers||!e)throw"Illegal arguments";if(n.cache){if(n.layers.overlays){var o=_.keys(n.layers.overlays);p.cache[n.cache]||(p.cache[n.cache]={center:n.center,bounds:n.bounds,layers:angular.copy(n.layers)}),a.getMap(t).then((function(){_(i.document.querySelectorAll("#{0} .leaflet-control-layers-overlays input[type=checkbox]".format(t))).forEach((function(e,t){var i=o[t],a=n.layers.overlays[i].visible;e.addEventListener("change",(function(e){a=!a,p.cache[n.cache].layers.overlays[i].visible=a}))}))}))}e.$on("$ionicView.leave",(function(){p.cache[n.cache].center=n.center,p.cache[n.cache].bounds=n.bounds}))}}},constants:d}}]),ot.$inject=["$scope","$timeout","$q","MapUtils","$translate"],angular.module("cesium.map.common.controllers",["cesium.services","cesium.map.services"]).controller("MapEditPositionAbstractCtrl",ot),rt.$inject=["$scope","$filter","$templateCache","$interpolate","$timeout","$location","$translate","$q","$controller","ionicReady","leafletData","UIUtils","csSettings","csWallet","MapUtils","mapWot"],angular.module("cesium.map.wot.controllers",["cesium.services","cesium.map.services","cesium.map.help.controllers"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(t.extendState("app.wot_lookup.tab_search",{points:{"nav-buttons":{template:'<button class="button button-icon button-clear" ui-sref="app.view_wot_map"><i class="icon ion-ios-location"></i></button>'}}}).extendState("app.wot_lookup_lg",{points:{"filter-buttons":{templateUrl:"plugins/map/templates/wot/lookup_lg_extend.html",controller:"ESExtensionCtrl"}}}),e.state("app.view_wot_map",{url:"/wot/map?c&center",views:{menuContent:{templateUrl:"plugins/map/templates/wot/view_map.html",controller:"MapWotViewCtrl"}},data:{silentLocationChange:!0}}))}]).controller("MapWotViewCtrl",rt),st.$inject=["$scope","$filter","$templateCache","$interpolate","$timeout","$location","$translate","$q","ionicReady","leafletData","UIUtils","csSettings","csWallet","MapUtils","mapRegistry"],lt.$inject=["$scope","$controller"],angular.module("cesium.map.registry.controllers",["cesium.services","cesium.map.services","cesium.map.help.controllers","cesium.map.common.controllers"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(t.extendState("app.wot_lookup.tab_registry",{points:{"nav-buttons":{template:'<button class="button button-icon button-clear" ui-sref="app.view_registry_map"><i class="icon ion-ios-location"></i></button>'}}}).extendState("app.registry_lookup_lg",{points:{"filter-buttons":{templateUrl:"plugins/map/templates/registry/lookup_lg_extend.html"}}}).extendState("app.registry_edit_record",{points:{"after-position":{templateUrl:"plugins/map/templates/common/edit_position_extend.html",controller:"MapPageEditCtrl"}}}),e.state("app.view_registry_map",{url:"/wot/pagemap?c&center",views:{menuContent:{templateUrl:"plugins/map/templates/registry/view_map.html",controller:"MapRegistryViewCtrl"}},data:{silentLocationChange:!0}}))}]).controller("MapRegistryViewCtrl",st).controller("MapPageEditCtrl",lt),angular.module("cesium.map.network.controllers",["cesium.services","cesium.map.services"]).config(["$stateProvider","PluginServiceProvider","csConfig",function(e,t,n){n.plugins&&n.plugins.es&&(t.extendState("app.network",{points:{"filter-buttons":{templateUrl:"plugins/map/templates/network/lookup_extend.html",controller:"ESExtensionCtrl"}}}),e.state("app.view_network_map",{url:"/network/map?c",views:{menuContent:{templateUrl:"plugins/map/templates/network/view_map.html",controller:"MapNetworkViewCtrl"}},data:{silentLocationChange:!0}}))}]).controller("MapNetworkViewCtrl",["$scope","$controller","$q","$interpolate","$translate","$filter","$templateCache","$timeout","$location","esGeo","UIUtils","csNetwork","MapUtils","leafletData",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m){angular.extend(this,t("NetworkLookupCtrl",{$scope:e}));var E,b,g=o("formatPubkey"),f={member:{type:"awesomeMarker",icon:"person",markerColor:"green",iconColor:"white"},mirror:{type:"awesomeMarker",icon:"radio-waves",markerColor:"green",iconColor:"white"},offline:{type:"awesomeMarker",icon:"ion-close-circled",markerColor:"red",iconColor:"white"}},T={},h=0;E='<div class="item item-peer item-icon-left no-border" ng-click="selectPeer(peer)">',E+=r.get("templates/network/item_content_peer.html"),E=(E+="</div>").replace(/[:]rebind[:]|[:][:]/g,""),e.loading=!0,e.mapId="map-network-"+e.$id,e.helptipPrefix="helptip-"+e.mapId,e.map=p.map({cache:"map-network",layers:{overlays:{member:{type:"featureGroup",name:"MAP.NETWORK.VIEW.LAYER.MEMBER",visible:!0},mirror:{type:"featureGroup",name:"MAP.NETWORK.VIEW.LAYER.MIRROR",visible:!0},offline:{type:"featureGroup",name:"MAP.NETWORK.VIEW.LAYER.OFFLINE",visible:!1}}},bounds:{},loading:!0,markers:{}});var v=e.enter;e.enter=function(t,n){if(!e.loading)return e.updateLocationHref(),v(t,n);if(n.stateParams&&n.stateParams.c){var i=n.stateParams.c.split(":");e.map.center.lat=parseFloat(i[0]),e.map.center.lng=parseFloat(i[1]),e.map.center.zoom=parseInt(i[2])}e.$watch("map.center",(function(){if(!e.map.loading)return s((function(){e.updateLocationHref()}),300)}),!0),e.loadMap().then((function(e){return e.fire("dataloading"),v(t,n)}))},e.$on("$ionicView.enter",e.enter);var I=e.computeOptions;e.computeOptions=function(){var e=I();return e.filter.online="all",e},e.loadMap=function(){return m.getMap(e.mapId).then((function(t){if(!e.map.loading)return t;L.Control.loading({position:"topright",separate:!0}).addTo(t),b=L.layerGroup({visible:!1});var n=i(r.get("plugins/map/templates/network/item_search_tooltip.html"));p.control.search({layer:b,propertyName:"title",buildTip:function(e,t){return n(t.layer.options)},moveToLocation:function(e,t,n){this.options.zoom?this._map.setView(e,this.options.zoom):this._map.panTo(e);var i=e.layer&&e.layer.options&&e.layer.options.popupMarkerId;i&&s((function(){var e=_.find(n._layers,(function(e){return e.options&&e.options.id===i}));e&&e.openPopup()}),400)},firstTipSubmit:!0,tooltipLimit:50}).addTo(t);var a=function(e){return e.options&&e.options.icon.options.markerColor},o=L.markerClusterGroup({disableClusteringAtZoom:p.constants.LOCALIZE_ZOOM,maxClusterRadius:65,showCoverageOnHover:!1,iconCreateFunction:function(e){var t=_.countBy(e.getAllChildMarkers(),a),n=t.green?"green":t.lightgreen?"lightgreen":t.lightgray?"lightgray":"red",i=e.getChildCount(),o="marker-cluster "+n+" marker-cluster-";return o+=i<10?"small":i<100?"medium":"large",L.divIcon({html:"<div><span>"+i+"</span></div>",className:o,iconSize:new L.Point(40,40)})}});return t.eachLayer((function(e){e.addLayer&&angular.extend(e,L.featureGroup.subGroup(o))})),c.point.ip.license&&(o.getAttribution=function(){return'<a target="_blank" href="{0}">{1}</a>'.format(c.point.ip.license.url,c.point.ip.license.name)}),o.addTo(t),e.map.loading=!1,t}))},e.updateView=function(t){console.debug("[map] [peers] Updating UI"),e.search.loading=!e.networkStarted||d.isBusy();var n=angular.copy(T);_.forEach(t.peers||[],(function(t){if(!t.isTor()){var i=T[t.id];if(i&&e.map.markers[i])return e.updateMarker(e.map.markers[i],t),void delete n[t.id];var a=t.bma,o=t.hasValid4(a)?a.ipv4:a.dns||a.ipv6;c.point.ip.search(o).then((function(n){i=""+h++;var o=e.updateMarker({position:n,getMessageScope:function(){var n=e.$new();return n.peer=t,n},draggable:!1,focus:!1,message:E,id:i},t);e.map.markers[i]=o,T[t.id]=i;var r,s=(t.dns||t.server)+(t.uid?" | "+(t.name||t.uid):"")+" | "+g(t.pubkey);a.ipv4&&!(t.dns||t.server).startsWith(a.ipv4)&&(r=a.ipv4,s+=" | "+a.ipv4),b.addLayer(new L.Marker({lat:n.lat,lng:n.lng},{opacity:0,icon:L.divIcon({className:"ng-hide",iconSize:L.point(0,0)}),title:s,peer:angular.extend({ipv4:r},t),popupMarkerId:i}))})).catch((function(e){console.debug("No position found for address ["+o+"]",e)}))}})),_.forEach(_.keys(n),(function(e){delete T[e]})),_.forEach(_.values(n),(function(t){delete e.map.markers[t]})),e.search.loading||m.getMap(e.mapId).then((function(t){e.loading=!1,t.fire("dataload")}))},e.updateMarker=function(e,t){return e.layer=t.online?t.uid?"member":"mirror":"offline",e.icon=angular.copy(f[e.layer]),e.opacity=(t.online,1),e.title=t.dns||t.server,t.online&&!t.hasMainConsensusBlock&&(e.icon.markerColor=t.hasConsensusBlock?"lightgreen":"lightgray",e.opacity=t.hasConsensusBlock?.9:.8),e.lng||(e.lng=e.position.lng+Math.random()/1e3,e.lat=e.position.lat+Math.random()/1e3),e},e.updateLocationHref=function(t){(l.search()||{}).c&&p.center.isDefault(e.map.center)||(t=t||"{0}:{1}:{2}".format(e.map.center.lat.toFixed(4),e.map.center.lng.toFixed(4),e.map.center.zoom),l.search({c:t}).replace())},e.$on("centerUrlHash",(function(t,n){if(!e.loading)return s((function(){e.updateLocationHref(n)}),300)})),e.showHelpTip=function(){}}]),ct.$inject=["$scope","$controller"],angular.module("cesium.map.user.controllers",["cesium.services","cesium.map.services","cesium.map.common.controllers"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.extendState("app.edit_profile",{points:{"after-position":{templateUrl:"plugins/map/templates/common/edit_position_extend.html",controller:"MapProfileEditCtrl"}}}).extendState("app.edit_profile_by_id",{points:{"after-position":{templateUrl:"plugins/map/templates/common/edit_position_extend.html",controller:"MapProfileEditCtrl"}}})}]).controller("MapProfileEditCtrl",ct),angular.module("cesium.map.settings.controllers",["cesium.services"]).config(["PluginServiceProvider","csConfig",function(e,t){t.plugins&&t.plugins.es&&e.extendState("app.es_settings",{points:{common:{templateUrl:"plugins/map/templates/settings/es_settings_extend.html"}}})}]),ut.$inject=["$scope","$controller"],angular.module("cesium.map.help.controllers",["cesium.services"]).controller("MapHelpTipCtrl",ut),angular.module("cesium",["ionic","ionic-material","ngMessages","ngSanitize","pascalprecht.translate","ngApi","angular-cache","angular.screenmatch","angular.bind.notifier","ImageCropper","ion-digit-keyboard","FBAngular","ngCordova","cesium.plugins","cesium.filters","cesium.config","cesium.platform","cesium.controllers","cesium.templates","cesium.translations","cesium.components","cesium.directives"]).config(["$urlRouterProvider",function(e){e.deferIntercept()}]).run(["$rootScope","$translate","$state","$window","$urlRouter","ionicReady","Device","UIUtils","$ionicConfig","PluginService","csPlatform","csWallet",function(e,t,n,i,a,o,r,s,l,c,u,d){u.disableChangeState();var p=!1;e.$on("$stateChangeStart",(function(t,i,a,o){if(!t.defaultPrevented&&i.data&&!e.tour&&!t.currentScope.tour){if(!p){var r,l=a.wallet&&"default"!=a.wallet?d.children.get(a.wallet):d;return a.wallet&&!l&&console.warn("[app] Unable to find the children wallet: "+a.wallet),i.data.auth&&!l.isAuth()?(t.preventDefault(),r=i.data.minData?{minData:!0}:void 0,p=!0,d.auth(r).then((function(){return p=!1,n.go(i.name,a)})).catch((function(e){if(p=!1,"CANCELLED"===e&&!n.current.name)return n.go("app.home")}))):i.data.login&&!d.isLogin()?(t.preventDefault(),r=i.data.minData?{minData:!0}:void 0,p=!0,d.login(r).then((function(){return p=!1,n.go(i.name,a)})).catch((function(e){if(p=!1,"CANCELLED"===e&&!n.current.name)return n.go("app.home")}))):!i.data.login&&!i.data.auth||(r=i.data.minData?{minData:!0}:void 0,l.isDataLoaded(r))?void 0:(t.preventDefault(),r&&r.minData||s.loading.show(),l.loadData(r).then((function(){return p=!1,n.go(i.name,a)})))}t.preventDefault()}})),d.api.data.on.unauth(e,(function(){n.current&&n.current.data&&n.current.data.auth&&n.go("app.home")})),e.$on("$locationChangeSuccess",(function(e,t,i){n.current.data&&!0===n.current.data.silentLocationChange&&i&&i.split("?")[0]===t.split("?")[0]&&e.preventDefault()})),a.listen(),c.start(),o().then((function(){ionic.Platform.isIOS()&&window.StatusBar&&StatusBar.styleLightContent()}))}]),window.ionic.Platform.ready((function(){angular.bootstrap(document,["cesium"])})),angular.module("cesium.components",[]).component("csBadgeCertification",{bindings:{requirements:"=",parameters:"<",csId:"@"},templateUrl:"templates/common/badge_certification_count.html"}).component("csBadgeGivenCertification",{bindings:{identity:"=",parameters:"<",csId:"@"},templateUrl:"templates/common/badge_given_certification_count.html"}).component("csSortIcon",{bindings:{asc:"=",sort:"=",toggle:"<"},template:'<i class="ion-chevron-up" ng-class="{gray: !$ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative; left: 5px; top:-5px; font-size: 9px;"></i><i class="ion-chevron-down" ng-class="{gray : $ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative; left: -2.6px; top: 3px; font-size: 9px;"></i>'}),angular.module("cesium.directives",[]).directive("compareTo",(function(){return{require:"?ngModel",link:function(e,t,n,i){i&&n.compareTo&&(i.$validators.compareTo=function(t){return t==e.$eval(n.compareTo)},e.$watch(n.compareTo,(function(){i.$validate()})))}}})).directive("differentTo",(function(){return{require:"?ngModel",link:function(e,t,n,i){i&&n.differentTo&&(i.$validators.differentTo=function(t){return t!=e.$eval(n.differentTo)},e.$watch(n.differentTo,(function(){i.$validate()})))}}})).directive("numberFloat",(function(){var e=new RegExp("^[0-9]+([.,][0-9]+)?$");return{require:"?ngModel",link:function(t,n,i,a){a&&(a.$validators.numberFloat=function(t){return a.$isEmpty(t)||e.test(t)})}}})).directive("numberInt",(function(){var e=new RegExp("^[0-9]+$");return{require:"ngModel",link:function(t,n,i,a){a&&(a.$validators.numberInt=function(t){return a.$isEmpty(t)||e.test(t)})}}})).directive("email",(function(){var e=new RegExp("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$");return{require:"ngModel",link:function(t,n,i,a){a&&(a.$validators.email=function(t){return a.$isEmpty(t)||e.test(t)})}}})).directive("requiredIf",(function(){return{require:"?ngModel",link:function(e,t,n,i){i&&n.requiredIf&&(i.$validators.required=function(t){return!e.$eval(n.requiredIf)||!i.$isEmpty(t)},e.$watch(n.requiredIf,(function(){i.$validate()})))}}})).directive("geoPoint",(function(){return{require:"?ngModel",link:function(e,t,n,i){i&&(i.$validators.geoPoint=function(e){return i.$isEmpty(e)||angular.isDefined(e.lat)&&angular.isDefined(e.lon)||angular.isUndefined(e.lat)&&angular.isUndefined(e.lon)})}}})).directive("copyOnClick",["$window","Device","UIUtils",function(e,t,n){return{restrict:"A",link:function(e,i,a){var o=function(i){var o=a.copyOnClick;if(o&&t.clipboard.enable)t.clipboard.copy(o).then((function(){n.toast.show("INFO.COPY_TO_CLIPBOARD_DONE")})).catch(n.onError("ERROR.COPY_CLIPBOARD"));else if(o){var r=o&&o.indexOf("\n")>=0?o.split("\n").length:1;n.popover.show(i,{scope:e,templateUrl:"templates/common/popover_copy.html",bindings:{value:a.copyOnClick,rows:r},autoselect:".popover-copy "+(r<=1?"input":"textarea")})}};i.bind("click",o),i.bind("hold",o)}}}]).directive("selectOnClick",["$window",function(e){return{restrict:"A",link:function(t,n,i){n.bind("click",(function(){e.getSelection&&!e.getSelection().toString()&&this.value&&this.setSelectionRange(0,this.value.length)}))}}}]).directive("activeLink",["$location",function(e){return{restrict:"A",link:function(t,n,i,a){var o,r=i.activeLink;i.activeLinkPathPrefix?(o=i.activeLinkPathPrefix.substring(1),t.location=e,t.$watch("location.path()",(function(e){e&&0===e.indexOf(o)?n.addClass(r):n.removeClass(r)}))):i.href&&(o=i.href.substring(1),t.location=e,t.$watch("location.path()",(function(e){e&&e==o?n.addClass(r):n.removeClass(r)})))}}}]).directive("input",["$timeout",function(e){return{restrict:"E",scope:{returnClose:"=",onReturn:"&",onFocus:"&",onBlur:"&"},link:function(t,n,i){n.bind("focus",(function(n){t.onFocus&&e((function(){t.onFocus()}))})),n.bind("blur",(function(n){t.onBlur&&e((function(){t.onBlur()}))})),n.bind("keydown",(function(i){13==i.which&&(t.returnClose&&n[0].blur(),t.onReturn&&e((function(){t.onReturn()})))}))}}}]).directive("trustAsHtml",["$sce","$compile","$parse",function(e,t,n){return{restrict:"A",compile:function(i,a){var o=n(a.trustAsHtml),r=n(a.trustAsHtml,(function(e){return(e||"").toString()}));return t.$$addBindingClass(i),function(n,i,a){t.$$addBindingInfo(i,a.trustAsHtml),n.$watch(r,(function(){i.html(e.getTrustedHtml(e.trustAsHtml(o(n)))||""),t(i.contents())(n)}))}}}}]).directive("modalClose",["$ionicHistory","$timeout",function(e,t){return{restrict:"AC",link:function(n,i){i.bind("click",(function(){n.closeModal&&(e.nextViewOptions({historyRoot:!0,disableAnimate:!0,expire:300}),t((function(){e.nextViewOptions({historyRoot:!1,disableAnimate:!1})}),300),n.closeModal())}))}}}]).directive("csExtensionPoint",["$state","$compile","$controller","$templateCache","PluginService",function(e,t,n,i,a){return{restrict:"E",compile:function(e,t){if(angular.isDefined(t.name)){var n=a.extensions.points.getActivesByName(t.name);n.length>0&&(e.html(""),_.forEach(n,(function(t){e.append(function(e){var t=e.templateUrl?i.get(e.templateUrl):e.template;return t?(e.controller&&(t='<ng-controller ng-controller="'+e.controller+'">'+t+"</div>"),t):(console.error("[plugin] Could not found template for extension :"+(e.templateUrl?e.templateUrl:e.template)),"")}(t))})))}return{pre:function(e,t,n){a.extensions.points.current.set(n.name)},post:function(){a.extensions.points.current.set()}}},scope:{content:"="}}}]).directive("onReadFile",["$parse",function(e){return{restrict:"A",scope:!1,link:function(t,n,i){var a=e(i.onReadFile);n.on("change",(function(e){var n=new FileReader,i={name:this.files[0].name,size:this.files[0].size,type:this.files[0].type};n.onload=function(e){t.$applyAsync((function(){a(t,{file:{fileContent:e.target.result,fileData:i}})}))},n.readAsText((e.srcElement||e.target).files[0])}))}}}]).directive("dropZone",["$parse",function(e){return{restrict:"A",scope:!1,link:function(t,n,i){var a=e(i.dropZone);n.bind("dragover",(function(e){e.stopPropagation(),e.preventDefault()})),n.bind("dragenter",(function(e){e.stopPropagation(),e.preventDefault()})),n.bind("dragleave",(function(e){e.stopPropagation(),e.preventDefault()})),n.bind("drop",(function(e){e.stopPropagation(),e.preventDefault();var n={name:e.dataTransfer.files[0].name,size:e.dataTransfer.files[0].size,type:e.dataTransfer.files[0].type},i=new FileReader;i.onload=function(e){t.$apply((function(){a(t,{file:{fileContent:e.target.result,fileData:n}})}))},i.readAsText(e.dataTransfer.files[0])}))}}}]).directive("fileSelect",["$parse",function(e){"use strict";return{restrict:"A",scope:!1,template:'<input type="file" style="display: none;" /><ng-transclude></ng-transclude>',transclude:!0,link:function(t,n,i){var a=e(i.fileSelect),o=n.children("input[file]");i.accept&&(o[0].accept=i.accept),o.on("change",(function(e){var n=new FileReader,i={name:this.files[0].name,size:this.files[0].size,type:this.files[0].type};n.onload=function(e){t.$applyAsync((function(){a(t,{file:{fileContent:e.target.result,fileData:i}})}))},n.readAsText((e.srcElement||e.target).files[0])})),n.on("click",(function(){o[0].click()}))}}}]).directive("windowExitUnauth",["$window","csSettings","csWallet",function(e,t,n){return{restrict:"AE",link:function(i,a){(e.attachEvent||e.addEventListener)(e.attachEvent?"onunload":"unload",(function(e){if(t.data&&t.data.keepAuthIdle!=t.constants.KEEP_AUTH_IDLE_SESSION)return n.unauth()}))}}}]),angular.module("cesium.filters",["cesium.config","cesium.platform","pascalprecht.translate","cesium.translations"]).factory("filterTranslations",["$rootScope","$q","csPlatform","csSettings","csCurrency","$translate","$timeout",function(e,t,n,i,a,o,r){var s,l=!1,c=this;function u(){return console.debug("[filter] Loading translations for locale [{0}]".format(o.use())),o(["COMMON.DATE_PATTERN","COMMON.DATE_SHORT_PATTERN","COMMON.UD","COMMON.DAYS"]).then((function(e){c.DATE_PATTERN=e["COMMON.DATE_PATTERN"],"COMMON.DATE_PATTERN"===c.DATE_PATTERN&&(c.DATE_PATTERN="YYYY-MM-DD HH:mm"),c.DATE_SHORT_PATTERN=e["COMMON.DATE_SHORT_PATTERN"],"COMMON.DATE_SHORT_PATTERN"===c.DATE_SHORT_PATTERN&&(c.DATE_SHORT_PATTERN="YYYY-MM-DD"),c.DATE_MONTH_YEAR_PATTERN=e["COMMON.DATE_MONTH_YEAR_PATTERN"],"COMMON.DATE_MONTH_YEAR_PATTERN"===c.DATE_MONTH_YEAR_PATTERN&&(c.DATE_MONTH_YEAR_PATTERN="MMM YY"),c.DAYS=e["COMMON.DAYS"],"COMMON.DAYS"===c.DAYS&&(c.DAYS="days"),c.UD=e["COMMON.UD"],"COMMON.UD"===c.UD&&(c.UD="UD")}))}function d(){console.debug("[filter] Computing constants from currency parameters"),c.MEDIAN_TIME_OFFSET=a.data.medianTimeOffset||c.MEDIAN_TIME_OFFSET}return c.MEDIAN_TIME_OFFSET=3600,c.ready=function(){return l?t.when():s||c.start()},c.start=function(){return s=n.ready().then(u).then((function(){d(),l=!0,i.api.locale.on.changed(e,u,this),a.api.data.on.ready(e,d,this)}))},r((function(){c.start()})),c}]).filter("formatInteger",(function(){return function(e){return e?e<1e7?numeral(e).format("0,0"):numeral(e).format("0,0.000 a"):"0"}})).filter("formatAmount",["csConfig","csSettings","csCurrency","$filter",function(e,t,n,i){var a="0,0.0"+Array(e.decimalCount||4).join("0"),o=i("currencySymbol"),r=a+"0",s=1/Math.pow(10,(e.decimalCount||4)+1);return function(e,i){if(void 0!==e)return(i&&angular.isDefined(i.useRelative)?i.useRelative:t.data.useRelative)?function(e,t){var i=t&&t.currentUD?t.currentUD:n.data.currentUD;if(i){var a=e/i;return a=Math.abs(e)<s&&0!==e?"~ 0":numeral(a).format(r),t&&t.currency?a+" "+o(t.currency,!0):a}console.warn("formatAmount: currentUD not defined")}(e,i):function(e,t){var n=numeral(e/100).format(e<-1e9||e>1e9?"0,0.000 a":a);return t&&t.currency?n+" "+o(t.currency,!1):n}(e,i)}}]).filter("formatAmountNoHtml",["csConfig","csSettings","csCurrency","$filter",function(e,t,n,i){var a=1/Math.pow(10,e.decimalCount||4),o="0,0.0"+Array(e.decimalCount||4).join("0"),r=i("currencySymbolNoHtml");return function(e,i){if(void 0!==e)return(i&&angular.isDefined(i.useRelative)?i.useRelative:t.data.useRelative)?function(e,t){var i=t&&t.currentUD?t.currentUD:n.data.currentUD;if(i){var s=e/i;return s=Math.abs(s)<a&&0!==e?"~ 0":numeral(s).format(o),t&&t.currency?s+" "+r(t.currency,!0):s}console.warn("formatAmount: currentUD not defined")}(e,i):function(e,t){var n=numeral(e/100).format(e>-1e9&&e<1e9?"0,0.00":"0,0.000 a");return t&&t.currency?n+" "+r(t.currency,!1):n}(e,i)}}]).filter("currencySymbol",["filterTranslations","$filter","csSettings",function(e,t,n){return function(i,a){return i?(angular.isDefined(a)?a:n.data.useRelative)?e.UD+"<sub>"+t("abbreviate")(i)+"</sub>":t("abbreviate")(i):""}}]).filter("currencySymbolNoHtml",["filterTranslations","$filter","csSettings",function(e,t,n){return function(i,a){return i?(angular.isDefined(a)?a:n.data.useRelative)?e.UD+" "+t("abbreviate")(i):t("abbreviate")(i):""}}]).filter("formatDecimal",["csConfig","csCurrency",function(e,t){var n=1/Math.pow(10,e.decimalCount||4),i="0,0.0"+Array(e.decimalCount||4).join("0");return function(e){return void 0===e?"0":e===1/0||e===-1/0?(console.warn("formatDecimal: division by zero ? (is currentUD defined ?) = "+t.data.currentUD),"error"):Math.abs(e)<n?"~ 0":numeral(e).format(i)}}]).filter("formatNumeral",(function(){return function(e,t){return void 0===e?"0":Math.abs(e)<1e-4?"~ 0":numeral(e).format(t)}})).filter("formatDate",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)).local().format(e.DATE_PATTERN||"YYYY-MM-DD HH:mm"):""}}]).filter("formatDateShort",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)).local().format(e.DATE_SHORT_PATTERN||"YYYY-MM-DD"):""}}]).filter("formatDateMonth",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)).local().format(e.DATE_MONTH_YEAR_PATTERN||"MMM YY"):""}}]).filter("formatDateForFile",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)).local().format(e.DATE_FILE_PATTERN||"YYYY-MM-DD"):""}}]).filter("formatTime",(function(){return function(e){return e?moment.unix(parseInt(e)).local().format("HH:mm"):""}})).filter("formatFromNow",(function(){return function(e){return e?moment.unix(parseInt(e)).fromNow():""}})).filter("formatFromNowAndDate",["filterTranslations",function(e){return function(t,n){var i=t&&moment.unix(parseInt(t));return i&&i.fromNow()+(n&&n.separator||" | ")+i.local().format(e.DATE_PATTERN||"YYYY-MM-DD HH:mm")||""}}]).filter("formatDurationTo",(function(){return function(e){return e?moment.unix(moment().utc().unix()+parseInt(e)).fromNow():""}})).filter("formatDuration",(function(){return function(e){return e?moment(0).from(moment.unix(parseInt(e)),!0):""}})).filter("formatDurationTime",["filterTranslations",function(e){return function(t){if(!t)return"";var n=t&&t<0?"-":"+";t=Math.abs(t);var i=Math.trunc(t/3600/24),a=Math.trunc(t/3600-24*i),o=Math.trunc(t/60-24*i*60-60*a);return i>0?n+i+" "+e.DAYS+" "+a+"h "+o+"m":a>0?n+a+"h "+o+"m":n+o+"m"}}]).filter("formatDurationMs",(function(){return function(e){return e?e<1e3?e+"ms":e/1e3+"s":""}})).filter("formatPeriod",(function(){return function(e){return e?moment(0).from(moment.unix(parseInt(e)),!0).split(" ").slice(-1)[0]:null}})).filter("formatFromNowShort",(function(){return function(e){return e?moment.unix(parseInt(e)+offset).fromNow(!0):""}})).filter("medianDate",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET).local().format(e.DATE_PATTERN||"YYYY-MM-DD HH:mm"):""}}]).filter("medianDateShort",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET).local().format(e.DATE_SHORT_PATTERN||"YYYY-MM-DD"):""}}]).filter("medianTime",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET).local().format("HH:mm"):""}}]).filter("medianFromNow",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET).fromNow():""}}]).filter("medianFromNowShort",["filterTranslations",function(e){return function(t){return t?moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET).fromNow(!0):""}}]).filter("medianFromNowAndDate",["filterTranslations",function(e){return function(t,n){var i=t&&moment.unix(parseInt(t)+e.MEDIAN_TIME_OFFSET);return i&&i.fromNow()+(n&&n.separator||" | ")+i.local().format(e.DATE_PATTERN||"YYYY-MM-DD HH:mm")||""}}]).filter("capitalize",(function(){return function(e){return e?(e=e.toLowerCase()).length>1?e.substring(0,1).toUpperCase()+e.substring(1):e:""}})).filter("abbreviate",(function(){var e={};return function(t){var n=t||"";if(e[n])return e[n];if(n.length>3){for(var i="",a=["-","_"," "],o=0;o<n.length;o++){var r=n[o];0===o?i="g"===r||"G"===r?"Ğ":r:o>0&&-1!=a.indexOf(n[o-1])&&(i+=r)}n=i.toUpperCase()}else"G"===(n=n.toUpperCase()).charAt(0)&&(n="Ğ"+(n.length>1?n.substr(1):""));return e[t]=n,n}})).filter("upper",(function(){return function(e){return e?e.toUpperCase():""}})).filter("formatPubkey",(function(){return function(e){return e?e.substr(0,8):""}})).filter("formatHash",(function(){return function(e){return e?e.substr(0,4)+e.substr(e.length-4):""}})).filter("formatCategory",(function(){return function(e){return e&&e.length>28?e.substr(0,25)+"...":e}})).filter("formatSlug",(function(){return function(e){return e?encodeURIComponent(e.toLowerCase().replace(/<[^>]+>/g,"").replace(/[^\w ]+/g,"").replace(/ +/g,"-")):""}})).filter("formatEncodeURI",(function(){return function(e){return e?encodeURIComponent(e):""}})).filter("truncText",(function(){return function(e,t){return t=t||500,!e||e.length<=t?e:e.substr(0,t)+"..."}})).filter("truncUrl",(function(){return function(e,t){t=t||25;var n=e.startsWith("http://")?7:e.startsWith("https://")?8:0;return n=e.startsWith("www.",n)?n+4:n,!e||e.length-n<=t?e.substr(n):e.substr(n,t)+"..."}})).filter("trustAsHtml",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]),angular.module("cesium.platform",["ngIdle","cesium.config","cesium.services"]).config(["$translateProvider","csConfig",function(e,t){e.uniformLanguageTag("bcp47").determinePreferredLanguage().useSanitizeValueStrategy(null).fallbackLanguage([t.fallbackLanguage?t.fallbackLanguage:"en"]).useLoaderCache(!0)}]).config(["$httpProvider","csConfig",function(e,t){e.defaults.timeout=t.timeout?t.timeout:3e5,e.defaults.useXDomain=!0,delete e.defaults.headers.common["X-Requested-With"],e.useApplyAsync(!0)}]).config(["$compileProvider","csConfig",function(e,t){e.debugInfoEnabled(!0===t.debug),e.imgSrcSanitizationWhitelist(/^\s*(filesystem:resource|resource|moz-extension|chrome-extension|file):/)}]).config(["$animateProvider",function(e){e.classNameFilter(/\banimate-/)}]).config(["CacheFactoryProvider","csConfig",function(e,t){angular.extend(e.defaults,{recycleFreq:6e4,storagePrefix:"caches.",capacity:100,maxAge:t.cacheTimeMs||6e4,storageMode:"memory"})}]).config(["screenmatchConfigProvider",function(e){e.config.rules="bootstrap"}]).config(["$ionicConfigProvider",function(e){var t=ionic.Platform.isIOS();e.scrolling.jsScrolling(t),e.views.maxCache(5)}]).config(["IdleProvider","csConfig",function(e,t){e.idle(t.logoutIdle||600),e.timeout(t.logoutTimeout||15)}]).factory("$exceptionHandler",["$log",function(e){return function(t,n){n?e.error(t,n):e.error(t)}}]).factory("csPlatform",["ionicReady","$rootScope","$q","$state","$translate","$timeout","UIUtils","BMA","Device","csHttp","csConfig","csCache","csSettings","csCurrency","csWallet",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E){var b,g,f,T,h=0,v=!1;function I(){if(!T){var e=t.$on("$stateChangeStart",(function(e,t,n,a){e.defaultPrevented||"app.home"===t.name||"app.settings"===t.name||(e.preventDefault(),g?g.then((function(){i.go(t.name,n)})):r.loading.hide())}));T=e}}function O(){T&&T(),T=null}function N(e){if(e)return!0;b=b||p.data.node;var t=p.data.fallbackNodes&&h<p.data.fallbackNodes.length&&p.data.fallbackNodes[h++];if(!t)throw"ERROR.CHECK_NETWORK_CONNECTION";var n=t.host+(t.port||80==t.port||443==t.port?"":":"+t.port);return s.node.same(t)?(console.debug("[platform] Skipping fallback node [{0}]: same as actual node".format(n)),N()):c.get(t.host,t.port,"/node/summary",443==t.port||s.node.forceUseSsl)().catch((function(e){console.error("[platform] Could not reach fallback node [{0}]: skipping".format(n))})).then((function(e){if(!e)return N();var i={old:s.server,new:n};return i.old===i.new&&(s.port!=t.port?i.new+=":"+t.port:0!=s.useSsl||!t.useSsl&&443!=t.port||(i.new+=" (SSL)")),a("CONFIRM.USE_FALLBACK_NODE",i).then((function(e){return r.alert.confirm(e)})).then((function(e){if(e)return p.data.node=t,p.data.node.temporary=!0,c.cache.clear(),s.copy(t).then(N)}))}))}function R(){return console.debug("[platform] restarting csPlatform"),S().then((function(){return o(A,200)}))}function A(){return I(),g=e().then(n.all([l.ready(),p.ready()])).then((function(){return s.ready().then(N)})).then(m.ready).then(E.ready).then((function(){O(),function(){f=[s.api.node.on.restart(t,R,this)]}(),g=null,v=!0})).catch((function(e){throw g=null,v=!1,i.current.name!==t.errorState&&i.go(t.errorState,{error:"peer"}),e}))}function S(){return v?(_.forEach(f,(function(e){e()})),f=[],E.stop(),m.stop(),s.stop(),o((function(){O(),v=!1,g=null}),500)):n.when()}return{disableChangeState:I,isStarted:function(){return v},ready:function(){return v?n.when():g||A()},restart:R,start:A,stop:S,version:{latest:function(){var e=p.data.latestReleaseUrl&&c.uri.parse(p.data.latestReleaseUrl);return e?c.getWithCache(e.host,"https:"===e.protocol?443:e.port,"/"+e.pathname,void 0,d.constants.LONG)().then((function(e){if(e&&e.name&&e.tag_name&&e.html_url)return{version:e.name,url:e.html_url,isNewer:c.version.compare(u.version,e.name)<0}})).catch((function(e){console.error("[platform] Failed to get Cesium latest version",e)})):n.when()}}}}]).run(["$rootScope","$state","$window","$urlRouter","ionicReady","$ionicPlatform","$ionicHistory","Device","UIUtils","$ionicConfig","PluginService","csPlatform","csWallet","csSettings","csConfig","csCurrency",function(e,t,n,i,a,o,r,s,l,c,u,d,p,m,E,b){e.config=E,e.settings=m.data,e.currency=b.data,e.device=s,e.errorState="app.home",e.smallscreen=l.screen.isSmall();var g=n.location.href.indexOf("#");e.rootPath=-1!==g?n.location.href.substr(0,g):n.location.href,console.debug("[app] Root path is ["+e.rootPath+"]"),a().then((function(){return s.keyboard.enable&&(s.keyboard.hideKeyboardAccessoryBar(!0),ionic.Platform.isIOS()&&s.keyboard.disableScroll(!0)),"a"!==ionic.Platform.grade.toLowerCase()&&(console.info("[app] Disabling UI effects, because plateform's grade is ["+ionic.Platform.grade+"]"),l.setEffects(!1)),window.StatusBar&&console.debug("[app] Status bar plugin enable"),d.version.latest().then((function(t){t&&t.isNewer?(console.info("[app] New release detected [{0}]".format(t.version)),e.newRelease=t):console.info("[app] Current version [{0}] is the latest release".format(E.version))})),o.registerBackButtonAction((function(e){return r.backView()?r.goBack():(e.preventDefault(),l.alert.confirm("CONFIRM.EXIT_APP").then((function(e){e&&ionic.Platform.exitApp()})))}),100),d.ready()}))}]),"function"!=typeof String.prototype.startsWith&&(console.debug("Adding String.prototype.startsWith() -> was missing on this platform"),String.prototype.startsWith=function(e,t){return 0===this.indexOf(e,t)}),"function"!=typeof String.prototype.trim){console.debug("Adding String.prototype.trim() -> was missing on this platform");var dt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(dt,"")}}Math&&"function"!=typeof Math.trunc&&(console.debug("Adding Math.trunc() -> was missing on this platform"),Math.trunc=function(e){return(e-.5).toFixed()}),"function"!=typeof String.prototype.format&&(console.debug("Adding String.prototype.format() -> was missing on this platform"),String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))});
\ No newline at end of file
+
+angular.module('cesium.settings.services', ['ngApi', 'cesium.config'])
+
+.factory('csSettings', ['$rootScope', '$q', '$window', 'Api', 'localStorage', '$translate', 'csConfig', function($rootScope, $q, $window, Api, localStorage, $translate, csConfig) {
+  'ngInject';
+
+  // Define app locales
+  var locales = [
+    {id:'en',    label:'English', flag: 'us'},
+    {id:'en-GB', label:'English (UK)', flag: 'gb'},
+    {id:'eo-EO', label:'Esperanto', flag: 'eo'},
+    {id:'fr-FR', label:'Français', flag: 'fr'},
+    {id:'nl-NL', label:'Nederlands', flag: 'nl'},
+    {id:'es-ES', label:'Spanish', flag: 'es'},
+    {id:'it-IT', label:'Italiano', flag: 'it'}
+  ];
+  var fallbackLocale = csConfig.fallbackLanguage ? fixLocale(csConfig.fallbackLanguage) : 'en';
+
+  // Convert browser locale to app locale (fix #140)
+  function fixLocale (locale) {
+    if (!locale) return fallbackLocale;
+
+    // exists in app locales: use it
+    if (_.findWhere(locales, {id: locale})) return locale;
+
+    // not exists: reiterate with the root (e.g. 'fr-XX' -> 'fr')
+    var localeParts = locale.split('-');
+    if (localeParts.length > 1) {
+      return fixLocale(localeParts[0]);
+    }
+
+    // If another locale exists with the same root: use it
+    var similarLocale = _.find(locales, function(l) {
+      return String.prototype.startsWith.call(l.id, locale);
+    });
+    if (similarLocale) return similarLocale.id;
+
+    return fallbackLocale;
+  }
+
+  // Convert browser locale to app locale (fix #140)
+  function fixLocaleWithLog (locale) {
+    var fixedLocale = fixLocale(locale);
+    if (locale !== fixedLocale) {
+      console.debug('[settings] Fix locale [{0}] -> [{1}]'.format(locale, fixedLocale));
+    }
+    return fixedLocale;
+  }
+
+  var
+  constants = {
+    STORAGE_KEY: 'settings', // for version >= v1.1.0
+    KEEP_AUTH_IDLE_SESSION: 9999
+  },
+  // Settings that user cannot change himself (only config can override this values)
+  fixedSettings = {
+    timeout : 4000,
+    cacheTimeMs: 60000, /*1 min*/
+    timeWarningExpireMembership: 2592000 * 2 /*=2 mois*/,
+    timeWarningExpire: 2592000 * 3 /*=3 mois*/,
+    minVersion: '1.1.0',
+    newIssueUrl: "https://git.duniter.org/clients/cesium-grp/cesium/issues/new",
+    userForumUrl: "https://forum.monnaie-libre.fr",
+    latestReleaseUrl: "https://api.github.com/repos/duniter/cesium/releases/latest",
+    duniterLatestReleaseUrl: "https://api.github.com/repos/duniter/duniter/releases/latest",
+    httpsMode: false
+  },
+  defaultSettings = angular.merge({
+    useRelative: false,
+    useLocalStorage: !!$window.localStorage, // override to false if no device
+    useLocalStorageEncryption: false,
+    persistCache: false, // disable by default (waiting resolution of issue #885)
+    walletHistoryTimeSecond: 30 * 24 * 60 * 60 /*30 days*/,
+    walletHistorySliceSecond: 5 * 24 * 60 * 60 /*download using 5 days slice*/,
+    walletHistoryAutoRefresh: true, // override to false if device
+    rememberMe: true,
+    keepAuthIdle: 10 * 60,
+    showUDHistory: true,
+    expertMode: false,
+    decimalCount: 4,
+    uiEffects: true,
+    blockValidityWindow: 6,
+    helptip: {
+      enable: true,
+      installDocUrl: "https://duniter.org/en/wiki/duniter/install/",
+      currency: 0,
+      network: 0,
+      wotLookup: 0,
+      wot: 0,
+      wotCerts: 0,
+      wallet: 0,
+      walletCerts: 0,
+      wallets: 0,
+      header: 0,
+      settings: 0
+    },
+    currency: {
+      allRules: false,
+      allWotRules: false
+    },
+    wallet: {
+      showPubkey: true,
+      alertIfUnusedWallet: true
+    },
+    locale: {
+      id: fixLocaleWithLog(csConfig.defaultLanguage || $translate.use()) // use config locale if set, or browser default
+    },
+    license: {
+      "en": "license/license_g1-en",
+      "fr-FR": "license/license_g1-fr-FR",
+      "es-ES": "license/license_g1-es-ES"
+    }
+  },
+    fixedSettings,
+    csConfig),
+
+  data = {},
+  previousData,
+  started = false,
+  startPromise,
+  api = new Api(this, "csSettings");
+
+  // removeIf(no-device)
+  // set defaults for device
+  defaultSettings.walletHistoryAutoRefresh = false;
+  // endRemoveIf(no-device)
+
+  var
+  reset = function() {
+    _.keys(data).forEach(function(key){
+      delete data[key];
+    });
+
+    applyData(defaultSettings);
+
+    return api.data.raisePromise.reset(data)
+      .then(store);
+  },
+
+  getByPath = function(path, defaultValue) {
+    var obj = data;
+    _.each(path.split('.'), function(key) {
+      obj = obj[key];
+      if (angular.isUndefined(obj)) {
+        obj = defaultValue;
+        return; // stop
+      }
+    });
+
+    return obj;
+  },
+
+  emitChangedEvent = function() {
+    var hasChanged = angular.isUndefined(previousData) || !angular.equals(previousData, data);
+    if (hasChanged) {
+      previousData = angular.copy(data);
+      return api.data.raise.changed(data);
+    }
+  },
+
+  store = function() {
+    if (!started) {
+      console.debug('[setting] Waiting start finished...');
+      return (startPromise || start()).then(store);
+    }
+
+    var promise;
+    if (data.useLocalStorage) {
+      // When node is temporary (fallback node): keep previous node address - issue #476
+      if (data.node.temporary === true) {
+        promise = localStorage.getObject(constants.STORAGE_KEY)
+          .then(function(previousSettings) {
+            var savedData = angular.copy(data);
+            savedData.node = previousSettings && previousSettings.node || {};
+            delete savedData.temporary; // never store temporary flag
+            return localStorage.setObject(constants.STORAGE_KEY, savedData);
+          });
+      }
+      else {
+        promise = localStorage.setObject(constants.STORAGE_KEY, data);
+      }
+    }
+    else {
+      promise  = localStorage.setObject(constants.STORAGE_KEY, null);
+    }
+
+    return promise
+      .then(function() {
+        if (data.useLocalStorage) {
+          console.debug('[setting] Saved locally');
+        }
+
+        // Emit event on store
+        return api.data.raisePromise.store(data);
+      })
+
+      // Emit event on store
+      .then(emitChangedEvent);
+  },
+
+  /**
+   * Apply new settings (can be partial)
+   * @param newData
+   */
+  applyData = function(newData) {
+    if (!newData) return; // skip empty
+
+    var localeChanged = false;
+    if (newData.locale && newData.locale.id) {
+      // Fix previously stored locale (could use bad format)
+      var localeId = fixLocale(newData.locale.id);
+      newData.locale = _.findWhere(locales, {id: localeId});
+      localeChanged = !data.locale || newData.locale.id !== data.locale.id || newData.locale.id !== $translate.use();
+    }
+
+    // Force some fixed settings, before merging
+    _.keys(fixedSettings).forEach(function(key) {
+      newData[key] = defaultSettings[key]; // This will apply fixed value (override by config.js file)
+    });
+
+    // Apply new settings
+    angular.merge(data, newData);
+
+    // Delete temporary properties, if false
+    if (newData && newData.node && !newData.node.temporary || !data.node.temporary) delete data.node.temporary;
+
+    // Apply the new locale (only if need)
+    // will produce an event cached by onLocaleChange();
+    if (localeChanged) {
+      $translate.use(data.locale.id);
+    }
+
+  },
+
+  restore = function() {
+    var now = Date.now();
+
+    return localStorage.getObject(constants.STORAGE_KEY)
+        .then(function(storedData) {
+          // No settings stored
+          if (!storedData) {
+            console.debug("[settings] No settings in local storage. Using defaults.");
+            applyData(defaultSettings);
+            emitChangedEvent();
+            return;
+          }
+
+          // Apply stored data
+          applyData(storedData);
+
+          console.debug('[settings] Loaded from local storage in '+(Date.now()-now)+'ms');
+          emitChangedEvent();
+        });
+  },
+
+  getLicenseUrl = function() {
+    var locale = data.locale && data.locale.id || csConfig.defaultLanguage || 'en';
+    return (csConfig.license) ?
+      (csConfig.license[locale] ? csConfig.license[locale] : defaultSettings.license[csConfig.defaultLanguage || 'en'] || csConfig.license) : undefined;
+  },
+
+  getFeedUrl = function() {
+    var locale = data.locale && data.locale.id || csConfig.defaultLanguage || 'en';
+    return (csConfig.feed && csConfig.feed.jsonFeed) ?
+      (csConfig.feed.jsonFeed[locale] ? csConfig.feed.jsonFeed[locale] : defaultSettings.feed.jsonFeed[csConfig.defaultLanguage || 'en'] || csConfig.feed) : undefined;
+  },
+
+  // Detect locale successful changes, then apply to vendor libs
+  onLocaleChange = function() {
+    var locale = $translate.use();
+    console.debug('[settings] Locale ['+locale+']');
+
+    // config moment lib
+    try {
+      moment.locale(locale.toLowerCase());
+    }
+    catch(err) {
+      try {
+        moment.locale(locale.substr(0,2));
+      }
+      catch(err) {
+        moment.locale('en-gb');
+        console.warn('[settings] Unknown local for moment lib. Using default [en]');
+      }
+    }
+
+    // config numeral lib
+    try {
+      numeral.language(locale.toLowerCase());
+    }
+    catch(err) {
+      try {
+        numeral.language(locale.substring(0, 2));
+      }
+      catch(err) {
+        numeral.language('en-gb');
+        console.warn('[settings] Unknown local for numeral lib. Using default [en]');
+      }
+    }
+
+    // Emit event
+    api.locale.raise.changed(locale);
+  },
+
+  isStarted = function() {
+    return started;
+  },
+
+  ready = function() {
+    if (started) return $q.when();
+    return startPromise || start();
+  },
+
+  start = function() {
+    console.debug('[settings] Starting...');
+
+    startPromise = localStorage.ready()
+
+      // Restore
+      .then(restore)
+
+      // Emit ready event
+      .then(function() {
+        console.debug('[settings] Started');
+        started = true;
+        startPromise = null;
+        // Emit event (used by plugins)
+        api.data.raise.ready(data);
+      });
+
+    return startPromise;
+  };
+
+  $rootScope.$on('$translateChangeSuccess', onLocaleChange);
+
+  api.registerEvent('data', 'reset');
+  api.registerEvent('data', 'changed');
+  api.registerEvent('data', 'store');
+  api.registerEvent('data', 'ready');
+  api.registerEvent('locale', 'changed');
+
+  // Apply default settings. This is required on some browser (web or mobile - see #361)
+  applyData(defaultSettings);
+
+  // Default action
+  //start();
+
+  return {
+    isStarted: isStarted,
+    ready: ready,
+    start: start,
+    data: data,
+    apply: applyData,
+    getByPath: getByPath,
+    reset: reset,
+    store: store,
+    restore: restore,
+    getLicenseUrl: getLicenseUrl,
+    getFeedUrl: getFeedUrl,
+    defaultSettings: defaultSettings,
+    // api extension
+    api: api,
+    locales: locales,
+    constants: constants
+  };
+}]);
+
+
+angular.module('cesium.network.services', ['ngApi', 'cesium.currency.services', 'cesium.http.services'])
+
+.factory('csNetwork', ['$rootScope', '$q', '$interval', '$timeout', '$window', 'csConfig', 'BMA', 'csHttp', 'csCurrency', 'Api', function($rootScope, $q, $interval, $timeout, $window, csConfig, BMA, csHttp, csCurrency, Api) {
+  'ngInject';
+
+   var
+    interval,
+    constants = {
+      UNKNOWN_BUID: -1,
+      MAX_BLOCK_OFFSET: 1000
+    },
+    isHttpsMode = $window.location.protocol === 'https:',
+    api = new Api(this, "csNetwork"),
+
+    data = {
+      bma: null,
+      listeners: [],
+      loading: true,
+      peers: [],
+      filter: {
+        member: true,
+        mirror: true,
+        endpoint: null,
+        online: false,
+        bma: false,
+        ssl: undefined,
+        tor: undefined
+      },
+      sort:{
+        type: null,
+        asc: true,
+        compact: true
+      },
+      groupBy: 'pubkey',
+      expertMode: false,
+      knownBlocks: [],
+      mainBlock: null,
+      minOnlineBlockNumber: 0,
+      uidsByPubkeys: null,
+      searchingPeersOnNetwork: false,
+      difficulties: null,
+      ws2pHeads: null,
+      timeout: csConfig.timeout
+    },
+
+    // Return the block uid
+    buid = function(block) {
+      return block && [block.number, block.hash].join('-');
+    },
+
+    resetData = function() {
+      data.bma = null;
+      data.listeners = [];
+      data.peers.splice(0);
+      data.filter = {
+        member: true,
+        mirror: true,
+        endpoint: null,
+        online: true,
+        bma: false,
+        ssl: undefined,
+        tor: undefined
+      };
+      data.sort = {
+        type: null,
+        asc: true
+      };
+      data.groupBy = 'pubkey';
+      data.expertMode = false;
+      data.memberPeersCount = 0;
+      data.knownBlocks = [];
+      data.mainBlock = null;
+      data.minOnlineBlockNumber = 0;
+      data.uidsByPubkeys = {};
+      data.loading = true;
+      data.searchingPeersOnNetwork = false;
+      data.difficulties = null;
+      data.ws2pHeads = null;
+      data.timeout = csConfig.timeout;
+    },
+
+    hasPeers = function() {
+      return data.peers && data.peers.length > 0;
+    },
+
+    getPeers = function() {
+      return data.peers;
+    },
+
+    isBusy = function() {
+      return data.loading;
+    },
+
+    getKnownBlocks = function() {
+      return data.knownBlocks;
+    },
+
+    // Load WS2P heads
+    loadW2spHeads = function() {
+      return data.bma.network.ws2p.heads()
+        .then(function (res) {
+          data.ws2pHeads = res.heads ? res.heads.reduce(function (res, hit) {
+            if (hit.message && hit.sig) {
+              try {
+                var head = new Ws2pMessage(hit.message);
+                res[[head.pubkey, head.ws2pid].join('-')] = head;
+              }
+              catch(err) {
+                // just log, then ignore
+                console.error('[network] Ignoring WS2P head.', err && err.message || err);
+              }
+            }
+            return res;
+          }, {}) : {};
+        })
+        .catch(function(err) {
+          // When too many request, retry in 3s
+          if (err && err.ucode == BMA.errorCodes.HTTP_LIMITATION) {
+            return $timeout(function() {
+              return loadW2spHeads();
+            }, 3000);
+          }
+          console.error(err); // can occur on duniter v1.6
+          data.ws2pHeads = {};
+        });
+    },
+
+    // Load personal difficulties
+    loadDifficulties = function() {
+      return data.bma.blockchain.stats.difficulties()
+        .then(function (res) {
+          data.difficulties = res.levels ? res.levels.reduce(function (res, hit) {
+            if (hit.uid && hit.level) res[hit.uid] = hit.level;
+            return res;
+          }, {}) : {};
+        })
+        .catch(function(err) {
+          // When too many request, retry in 3s
+          if (err && err.ucode == BMA.errorCodes.HTTP_LIMITATION) {
+            return $timeout(function() {
+              return loadDifficulties();
+            }, 3000);
+          }
+          console.error(err);
+          data.difficulties = {};
+        });
+    },
+
+    loadPeers = function() {
+      data.peers = [];
+      data.searchingPeersOnNetwork = true;
+      data.loading = true;
+      data.bma = data.bma || BMA;
+      var newPeers = [];
+
+      if (interval) {
+        $interval.cancel(interval);
+      }
+
+      interval = $interval(function() {
+        // not same job instance
+        if (newPeers.length) {
+          flushNewPeersAndSort(newPeers);
+        }
+        else if (data.loading && !data.searchingPeersOnNetwork) {
+          data.loading = false;
+          $interval.cancel(interval);
+          // The peer lookup end, we can make a clean final report
+          sortPeers(true/*update main buid*/);
+
+          console.debug('[network] Finish: {0} peers found.'.format(data.peers.length));
+        }
+      }, 1000);
+
+      var initJobs = [
+        // Load uids
+        data.bma.wot.member.uids()
+          .then(function(uids) {
+            data.uidsByPubkeys = uids;
+          })
+          .catch(function(err) {
+            console.error(err);
+            data.uidsByPubkeys = {};
+          }),
+
+        // Load WS2P heads
+        loadW2spHeads()
+      ];
+
+      // Get difficulties (expert mode only)
+      if (data.expertMode) {
+        initJobs.push(loadDifficulties());
+      }
+
+      return $q.all(initJobs)
+        .then(function() {
+          return data.bma && data.bma.network.peers();
+        })
+        .then(function(res){
+          if (!res || !res.peers || !res.peers.length) return;
+
+          // If filter online peers
+          if (data.filter.online) {
+            var jobs = [];
+            _.forEach(res.peers, function(json) {
+              // Exclude, if not UP or on a too old block
+              if (json.status !== 'UP') return;
+              json.blockNumber = json.block && parseInt(json.block.split('-')[0]);
+              if (json.blockNumber && json.blockNumber < data.minOnlineBlockNumber) {
+                console.debug("[network] Exclude a too old peer document, on pubkey {0}".format(json.pubkey.substring(0,6)));
+                return;
+              }
+
+              jobs.push(addOrRefreshPeerFromJson(json, newPeers));
+
+              // Mark WS2P
+              _.forEach(json.endpoints||[], function(ep) {
+                if (ep.startsWith('WS2P')) {
+                  var key = json.pubkey + '-' + ep.split(' ')[1];
+                  if (data.ws2pHeads[key]) {
+                    data.ws2pHeads[key].hasEndpoint = true;
+                  }
+                }
+              });
+            });
+
+            // Add private WS2P endpoints
+            var privateWs2pHeads = _.values(data.ws2pHeads);
+            if (privateWs2pHeads && privateWs2pHeads.length) {
+              var privateEPCount = 0;
+              //console.debug("[http] Found WS2P endpoints without endpoint:", data.ws2pHeads);
+              _.forEach(privateWs2pHeads, function(head) {
+
+                if (!head.hasEndPoint) {
+                  var currentNumber = head.buid && parseInt(head.buid.split('-')[0]);
+                  // Exclude if on a too old block
+                  if (currentNumber && currentNumber < data.minOnlineBlockNumber) {
+                    console.debug("[network] Exclude a too old WS2P message, on pubkey {0}".format(head.pubkey.substring(0,6)));
+                    return;
+                  }
+
+                  var peer = new Peer({
+                    buid: head.buid,
+                    currentNumber: currentNumber,
+                    pubkey: head.pubkey,
+                    version: head.version,
+                    powPrefix: head.powPrefix,
+                    online: true,
+                    uid: data.uidsByPubkeys[head.pubkey],
+                    bma: {
+                      useWs2p: true,
+                      private: true,
+                      ws2pid: head.ws2pid
+                    },
+                    endpoints: [
+                      // fake endpoint
+                      'WS2P ' + head.ws2pid
+                    ]
+                  });
+                  peer.id = peer.keyID();
+                  if (peer.uid && data.expertMode && data.difficulties) {
+                    peer.difficulty = data.difficulties[peer.uid];
+                  }
+                  if (applyPeerFilter(peer)) {
+                    newPeers.push(peer);
+                    privateEPCount++;
+                  }
+                }
+              });
+
+              if (privateEPCount) {
+                console.debug("[http] Found {0} WS2P endpoints without endpoint (private ?)".format(privateEPCount));
+              }
+            }
+
+            if (jobs.length) return $q.all(jobs);
+          }
+
+          // If filter offline peers
+          else {
+            return $q.all(_(res && res.peers || []).reduce(function(res, json) {
+              return res.concat(addOrRefreshPeerFromJson(json, newPeers));
+            }, []));
+          }
+        })
+        .then(function(){
+          data.searchingPeersOnNetwork = false;
+        })
+        .catch(function(err){
+          console.error(err);
+          data.searchingPeersOnNetwork = false;
+        });
+    },
+
+    /**
+     * Apply filter on a peer. (peer uid should have been filled BEFORE)
+     */
+    applyPeerFilter = function(peer) {
+      // no filter
+      if (!data.filter) return true;
+
+      // Filter member and mirror
+      if ((data.filter.member && !data.filter.mirror && !peer.uid) ||
+          (data.filter.mirror && !data.filter.member && peer.uid)) {
+        return false;
+      }
+
+      // Filter on endpoint
+      if (data.filter.endpoint && !peer.hasEndpoint(data.filter.endpoint)) {
+        return false;
+      }
+
+      // Filter on status
+      if ((data.filter.online && peer.status !== 'UP' && peer.oldBlock) || (!data.filter.online && peer.status === 'UP' && !peer.oldBlock)) {
+        return false;
+      }
+
+      // Filter on bma
+      if (angular.isDefined(data.filter.bma) && peer.isBma() != data.filter.bma) {
+        return false;
+      }
+
+      // Filter on ws2p
+      if (angular.isDefined(data.filter.ws2p) && peer.isWs2p() != data.filter.ws2p) {
+        return false;
+      }
+
+      // Filter on ssl
+      if (angular.isDefined(data.filter.ssl) && peer.isSsl() != data.filter.ssl) {
+        return false;
+      }
+
+      // Filter on tor
+      if (angular.isDefined(data.filter.tor) && peer.isTor() != data.filter.tor) {
+        return false;
+      }
+
+      return true;
+    },
+
+    addOrRefreshPeerFromJson = function(json, list) {
+      list = list || data.newPeers;
+
+      // Analyze the peer document, and exclude using the online filter
+      json.blockNumber = json.block && parseInt(json.block.split('-')[0]);
+      json.oldBlock = (json.status === 'UP' && json.blockNumber && json.blockNumber < data.minOnlineBlockNumber);
+
+      var peers = createPeerEntities(json);
+      var hasUpdates = false;
+
+      var jobs = peers.reduce(function(jobs, peer) {
+          var existingPeer = _.findWhere(data.peers, {id: peer.id});
+          var existingMainBuid = existingPeer ? existingPeer.buid : null;
+          var existingOnline = existingPeer ? existingPeer.online : false;
+
+          return jobs.concat(
+            refreshPeer(peer)
+              .then(function (refreshedPeer) {
+                if (existingPeer) {
+                  // remove existing peers, when reject or offline
+                  if (!refreshedPeer || (refreshedPeer.online !== data.filter.online && data.filter.online !== 'all')) {
+                    var existingIndex = data.peers.indexOf(existingPeer);
+                    if (existingIndex !== -1) {
+                      console.debug('[network] Peer [{0}] removed (cause: {1})'.format(peer.server, !refreshedPeer ? 'filtered' : (refreshedPeer.online ? 'UP' : 'DOWN')));
+                      data.peers.splice(existingIndex, 1);
+                      hasUpdates = true;
+                    }
+                  }
+                  else if (refreshedPeer.buid !== existingMainBuid){
+                    console.debug('[network] {0} endpoint [{1}] new current block'.format(
+                      refreshedPeer.bma && (refreshedPeer.bma.useBma ? 'BMA' : 'WS2P') || 'null',
+                      refreshedPeer.server));
+                    hasUpdates = true;
+                  }
+                  else if (existingOnline !== refreshedPeer.online){
+                    console.debug('[network] {0} endpoint [{1}] is now {2}'.format(
+                      refreshedPeer.bma && (refreshedPeer.bma.useBma ? 'BMA' : 'WS2P') || 'null',
+                      refreshedPeer.server,
+                      refreshedPeer.online ? 'UP' : 'DOWN'));
+                    hasUpdates = true;
+                  }
+                  else {
+                    console.debug("[network] {0} endpoint [{1}] unchanged".format(
+                      refreshedPeer.bma && (refreshedPeer.bma.useBma ? 'BMA' : 'WS2P') || 'null',
+                      refreshedPeer.server));
+                  }
+                }
+                else if (refreshedPeer && (refreshedPeer.online === data.filter.online || data.filter.online === 'all')) {
+                  console.debug("[network] {0} endpoint [{1}] is {2}".format(
+                    refreshedPeer.bma && (refreshedPeer.bma.useBma ? 'BMA' : 'WS2P') || 'null',
+                    refreshedPeer.server,
+                    refreshedPeer.online ? 'UP' : 'DOWN'
+                  ));
+                  list.push(refreshedPeer);
+                  hasUpdates = true;
+                }
+              })
+         );
+      }, []);
+      return (jobs.length === 1 ? jobs[0] : $q.all(jobs))
+        .then(function() {
+          return hasUpdates;
+        });
+    },
+
+    createPeerEntities = function(json, ep) {
+      if (!json) return [];
+      var peer = new Peer(json);
+
+      // Read bma endpoints
+      if (!ep) {
+        var endpointsAsString = peer.getEndpoints();
+        if (!endpointsAsString) return []; // no BMA
+
+        var endpoints = endpointsAsString.reduce(function (res, epStr) {
+          var ep = BMA.node.parseEndPoint(epStr);
+          return ep ? res.concat(ep) : res;
+        }, []);
+
+        // recursive call, on each endpoint
+        if (endpoints.length > 1) {
+          return endpoints.reduce(function (res, ep) {
+            return res.concat(createPeerEntities(json, ep));
+          }, []);
+        }
+        else {
+          // if only one endpoint: use it and continue
+          ep = endpoints[0];
+        }
+      }
+      peer.bma = ep;
+      peer.server = peer.getServer();
+      peer.dns = peer.getDns();
+      peer.buid = peer.buid || peer.block;
+      peer.blockNumber = peer.buid && parseInt(peer.buid.split('-')[0]);
+      peer.uid = peer.pubkey && data.uidsByPubkeys[peer.pubkey];
+      peer.id = peer.keyID();
+      return [peer];
+    },
+
+    refreshPeer = function(peer) {
+
+      // Apply filter
+      if (!applyPeerFilter(peer)) return $q.when();
+
+      if (!data.filter.online || (!data.filter.online && peer.status === 'DOWN') || !peer.getHost() /*fix #537*/) {
+        peer.online = false;
+        return $q.when(peer);
+      }
+
+      if (peer.bma.useWs2p && data.ws2pHeads) {
+        var ws2pHeadKey = [peer.pubkey, peer.bma.ws2pid].join('-');
+        var head = data.ws2pHeads[ws2pHeadKey];
+        delete data.ws2pHeads[ws2pHeadKey];
+        if (head) {
+          peer.buid = head.buid;
+          peer.currentNumber=head.buid && parseInt(head.buid.split('-')[0]);
+          peer.version = head.version;
+          peer.powPrefix = head.powPrefix;
+        }
+        peer.online = !!peer.buid;
+
+        if (peer.uid && data.expertMode && data.difficulties) {
+          peer.difficulty = data.difficulties[peer.uid];
+        }
+
+        return $q.when(peer);
+      }
+
+      // Cesium running in SSL: Do not try to access not SSL node,
+      if (!peer.bma.useWs2p && isHttpsMode && !peer.bma.useSsl) {
+        peer.online = (peer.status === 'UP');
+        peer.buid = constants.UNKNOWN_BUID;
+        delete peer.version;
+
+        if (peer.uid && data.expertMode && data.difficulties) {
+          peer.difficulty = data.difficulties[peer.uid];
+        }
+
+        return $q.when(peer);
+      }
+
+      // Do not try to access TOR or WS2P endpoints
+      if (peer.bma.useTor || peer.bma.useWs2p) {
+        peer.online = (peer.status === 'UP');
+        peer.buid = constants.UNKNOWN_BUID;
+        delete peer.version;
+
+        if (peer.uid && data.expertMode && data.difficulties) {
+          peer.difficulty = data.difficulties[peer.uid];
+        }
+        return $q.when(peer);
+      }
+
+      peer.api = peer.api ||  BMA.lightInstance(peer.getHost(), peer.getPort(), peer.isSsl(), data.timeout);
+
+      // Get current block
+      return peer.api.blockchain.current(false/*no cache*/)
+        .then(function(block) {
+          peer.currentNumber = block.number;
+          peer.online = true;
+          peer.buid = buid(block);
+          peer.medianTime = block.medianTime;
+          if (data.knownBlocks.indexOf(peer.buid) === -1) {
+            data.knownBlocks.push(peer.buid);
+          }
+          return peer;
+        })
+        .catch(function(err) {
+          // Special case for currency init (root block not exists): use fixed values
+          if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+            peer.online = true;
+            peer.buid = buid({number:0, hash: BMA.constants.ROOT_BLOCK_HASH});
+            peer.difficulty  = 0;
+            return peer;
+          }
+          if (!peer.secondTry) {
+            var bma = peer.bma || peer.getBMA();
+            if (bma.dns && peer.server.indexOf(bma.dns) === -1) {
+              // try again, using DNS instead of IPv4 / IPV6
+              peer.secondTry = true;
+              peer.api = BMA.lightInstance(bma.dns, bma.port, bma.useSsl);
+              return refreshPeer(peer); // recursive call
+            }
+          }
+
+          peer.buid = null;
+          peer.blockNumber = null;
+          peer.currentNumber = null;
+          peer.online=false;
+          peer.uid = data.uidsByPubkeys[peer.pubkey];
+          return peer;
+        })
+        .then(function(peer) {
+          // Exit if offline, or not expert mode or too small device
+          if (!data.filter.online || !peer || !peer.online || !data.expertMode) return peer;
+          var jobs = [];
+
+          // Get hardship (only for a member peer)
+          if (peer.uid) {
+            jobs.push(peer.api.blockchain.stats.hardship({pubkey: peer.pubkey})
+              .then(function (res) {
+                peer.difficulty = res ? res.level : null;
+              })
+              .catch(function() {
+                peer.difficulty = null; // continue
+              }));
+          }
+
+          // Get Version
+          jobs.push(peer.api.node.summary()
+            .then(function(res){
+              peer.software = res && res.duniter && res.duniter.software || undefined;
+              peer.version = res && res.duniter && res.duniter.version || '?';
+            })
+            .catch(function() {
+              peer.software = undefined;
+              peer.version = '?'; // continue
+            }));
+
+          return $q.all(jobs)
+            .then(function(){
+              return peer;
+            });
+        });
+    },
+
+    flushNewPeersAndSort = function(newPeers, updateMainBuid) {
+      newPeers = newPeers || data.newPeers;
+      if (!newPeers.length) return;
+      var ids = _.map(data.peers, function(peer){
+        return peer.id;
+      });
+      var hasUpdates = false;
+      var newPeersAdded = 0;
+      _.forEach(newPeers.splice(0), function(peer) {
+        if (!ids[peer.id]) {
+          data.peers.push(peer);
+          ids[peer.id] = peer;
+          hasUpdates = true;
+          newPeersAdded++;
+        }
+      });
+      if (hasUpdates) {
+        console.debug('[network] Flushing {0} new peers...'.format(newPeersAdded));
+        sortPeers(updateMainBuid);
+      }
+    },
+
+    computeScoreAlphaValue = function(value, nbChars, asc) {
+      if (!value) return 0;
+      var score = 0;
+      value = value.toLowerCase();
+      if (nbChars > value.length) {
+        nbChars = value.length;
+      }
+      score += value.charCodeAt(0);
+      for (var i=1; i < nbChars; i++) {
+        score += Math.pow(0.001, i) * value.charCodeAt(i);
+      }
+      return asc ? (1000 - score) : score;
+    },
+
+    sortPeers = function(updateMainBuid) {
+      // Construct a map of buid, with peer count and medianTime
+      var buids = {};
+      data.memberPeersCount = 0;
+      _.forEach(data.peers, function(peer){
+        if (peer.buid) {
+          var buid = buids[peer.buid];
+          if (!buid || !buid.medianTime) {
+            buid = {
+              buid: peer.buid,
+              medianTime: peer.medianTime,
+              count: 0
+            };
+            buids[peer.buid] = buid;
+          }
+          // If not already done, try to fill medianTime (need to compute consensusBlockDelta)
+          else if (!buid.medianTime && peer.medianTime) {
+            buid.medianTime = peer.medianTime;
+          }
+          if (buid.buid !== constants.UNKNOWN_BUID) {
+            buid.count++;
+          }
+        }
+        data.memberPeersCount += peer.uid ? 1 : 0;
+      });
+      var mainBlock = data.mainBlock;
+      if (data.filter.online) {
+        // Compute pct of use, per buid
+        _.forEach(_.values(buids), function(buid) {
+          buid.pct = buid.count * 100 / data.peers.length;
+        });
+        mainBlock = _.max(buids, function(obj) {
+          return obj.count;
+        });
+        _.forEach(data.peers, function(peer){
+          peer.hasMainConsensusBlock = peer.buid === mainBlock.buid;
+          peer.hasConsensusBlock = peer.buid && !peer.hasMainConsensusBlock && buids[peer.buid].count > 1;
+          if (peer.hasConsensusBlock) {
+            peer.consensusBlockDelta = buids[peer.buid].medianTime - mainBlock.medianTime;
+          }
+        });
+      }
+      data.peers = _.uniq(data.peers, false, function(peer) {
+        return peer.id;
+      });
+      data.peers = _.sortBy(data.peers, function(peer) {
+        var score = 0;
+        if (data.sort.type) {
+          score += (data.sort.type === 'uid' ? computeScoreAlphaValue(peer.uid||peer.pubkey, 3, data.sort.asc) : 0);
+          score += (data.sort.type === 'api') &&
+            ((peer.isWs2p() && (data.sort.asc ? 1 : -1) || 0) +
+            (peer.hasEndpoint('ES_USER_API') && (data.sort.asc ? 0.01 : -0.01) || 0) +
+            (peer.isSsl() && (data.sort.asc ? 0.75 : -0.75) || 0)) || 0;
+          score += (data.sort.type === 'difficulty' ? (peer.difficulty ? (data.sort.asc ? (10000-peer.difficulty) : peer.difficulty): 0) : 0);
+          score += (data.sort.type === 'current_block' ? (peer.currentNumber ? (data.sort.asc ? (1000000000 - peer.currentNumber) : peer.currentNumber) : 0) : 0);
+        }
+        score =  (10000000000 * score);
+        score += (1000000000 * (peer.online ? 1 : 0));
+        score += (100000000  * (peer.hasMainConsensusBlock ? 1 : 0));
+        score += (1000000    * (peer.hasConsensusBlock ? buids[peer.buid].pct : 0));
+        if (data.expertMode) {
+          score += (100     * (peer.difficulty ? (10000-peer.difficulty) : 0));
+          score += (1       * (peer.uid ? computeScoreAlphaValue(peer.uid, 2, true) : 0));
+        }
+        else {
+          score += (100     * (peer.uid ? computeScoreAlphaValue(peer.uid, 2, true) : 0));
+          score += (1       * (!peer.uid ? computeScoreAlphaValue(peer.pubkey, 2, true) : 0));
+        }
+        score += (peer.isBma() ? (peer.isSsl() ? 0.01 : 0.001) :0); // If many endpoints: BMAS first, then BMA
+        return -score;
+      });
+
+      if (data.groupBy) {
+        var previousPeer;
+        data.peers.forEach(function(peer) {
+          peer.compacted = (previousPeer && peer[data.groupBy] && peer[data.groupBy] === previousPeer[data.groupBy]);
+          previousPeer = peer;
+        });
+      }
+
+      // Raise event on new main block
+      if (updateMainBuid && mainBlock && mainBlock.buid && (!data.mainBlock || data.mainBlock.buid !== mainBlock.buid)) {
+        data.mainBlock = mainBlock;
+        api.data.raise.mainBlockChanged(mainBlock);
+      }
+
+      // Raise event when changed
+      api.data.raise.changed(data); // raise event
+    },
+
+    removeListeners = function() {
+      _.forEach(data.listeners, function(remove){
+        remove();
+      });
+      data.listeners = [];
+    },
+
+    addListeners = function() {
+      data.listeners = [
+
+        // Listen for new block
+        data.bma.websocket.block().onListener(function(block) {
+          if (!block || data.loading) return;
+          var buid = [block.number, block.hash].join('-');
+          if (data.knownBlocks.indexOf(buid) === -1) {
+            console.debug('[network] Receiving block: ' + buid.substring(0, 20));
+            data.knownBlocks.push(buid);
+            // If first block: do NOT refresh peers (will be done in start() method)
+            var skipRefreshPeers = data.knownBlocks.length === 1;
+            if (!skipRefreshPeers) {
+              data.loading = true;
+              // We wait 2s when a new block is received, just to wait for network propagation
+              $timeout(function() {
+                console.debug('[network] new block received by WS: will refresh peers');
+                loadPeers();
+              }, 2000, false /*invokeApply*/);
+            }
+          }
+        }),
+
+        // Listen for new peer
+        data.bma.websocket.peer().onListener(function(json) {
+          if (!json || data.loading) return;
+          var newPeers = [];
+          addOrRefreshPeerFromJson(json, newPeers)
+            .then(function(hasUpdates) {
+              if (!hasUpdates) return;
+              if (newPeers.length>0) {
+                flushNewPeersAndSort(newPeers, true);
+              }
+              else {
+                console.debug('[network] [ws] Peers updated received');
+                sortPeers(true);
+              }
+            });
+        })
+      ];
+    },
+
+    sort = function(options) {
+      options = options || {};
+      data.filter = options.filter ? angular.merge(data.filter, options.filter) : data.filter;
+      data.sort = options.sort ? angular.merge(data.sort, options.sort) : data.sort;
+      sortPeers(false);
+    },
+
+    start = function(bma, options) {
+      options = options || {};
+      return BMA.ready()
+        .then(function() {
+          close();
+
+          data.bma = bma || BMA;
+          data.filter = options.filter ? angular.merge(data.filter, options.filter) : data.filter;
+          data.sort = options.sort ? angular.merge(data.sort, options.sort) : data.sort;
+          data.expertMode = angular.isDefined(options.expertMode) ? options.expertMode : data.expertMode;
+          data.timeout = angular.isDefined(options.timeout) ? options.timeout : csConfig.timeout;
+
+          // Init a min block number
+          data.minOnlineBlockNumber = data.mainBlock && data.mainBlock.buid && (parseInt(data.mainBlock.buid.split('-')[0]) - constants.MAX_BLOCK_OFFSET) || undefined;
+          if (data.minOnlineBlockNumber === undefined) {
+            return csCurrency.blockchain.current(true/*use cache*/)
+              .then(function(current) {
+                data.minOnlineBlockNumber = current.number - constants.MAX_BLOCK_OFFSET;
+              });
+          }
+        })
+        .then(function() {
+          console.info('[network] Starting network from [{0}]'.format(bma.server));
+          var now = Date.now();
+
+          addListeners();
+
+          return loadPeers()
+            .then(function(peers){
+              console.debug('[network] Started in '+(Date.now() - now)+'ms');
+              return peers;
+            });
+        });
+    },
+
+    close = function() {
+      if (data.bma) {
+        console.info('[network-service] Stopping...');
+        removeListeners();
+        resetData();
+      }
+    },
+
+    isStarted = function() {
+      return !data.bma;
+    },
+
+    $q_started = function(callback) {
+      if (!isStarted()) { // start first
+        return start()
+          .then(function() {
+            return $q(callback);
+          });
+      }
+      else {
+        return $q(callback);
+      }
+    },
+
+    getMainBlockUid = function() {
+      return $q_started(function(resolve, reject){
+        resolve (data.mainBuid);
+      });
+    },
+
+    // Get peers on the main consensus blocks
+    getTrustedPeers = function() {
+      return $q_started(function(resolve, reject){
+        resolve(data.peers.reduce(function(res, peer){
+          return (peer.hasMainConsensusBlock && peer.uid) ? res.concat(peer) : res;
+        }, []));
+      });
+    }
+    ;
+
+  // Register extension points
+  api.registerEvent('data', 'changed');
+  api.registerEvent('data', 'mainBlockChanged');
+  api.registerEvent('data', 'rollback');
+
+  return {
+    data: data,
+    start: start,
+    close: close,
+    hasPeers: hasPeers,
+    getPeers: getPeers,
+    sort: sort,
+    getTrustedPeers: getTrustedPeers,
+    getKnownBlocks: getKnownBlocks,
+    getMainBlockUid: getMainBlockUid,
+    loadPeers: loadPeers,
+    isBusy: isBusy,
+    // api extension
+    api: api
+  };
+}]);
+
+//var Base58, Base64, scrypt_module_factory = null, nacl_factory = null;
+
+angular.module('cesium.crypto.services', ['cesium.utils.services'])
+
+  .factory('CryptoUtils', ['$q', '$timeout', 'ionicReady', function($q, $timeout, ionicReady) {
+    'ngInject';
+
+    /**
+     * CryptoAbstract, abstract class with useful methods
+     * @type {number}
+     */
+    function CryptoAbstractService() {
+      this.loaded = false;
+      var that = this;
+
+      this.copy = function(source) {
+        _.forEach(_.keys(source), function(key) {
+          that[key] = source[key];
+        });
+      };
+
+      this.isLoaded = function() {
+        return this.loaded;
+      };
+
+      this.util = this.util || {};
+
+      /**
+       * Converts an array buffer to a string
+       *
+       * @private
+       * @param {ArrayBuffer} buf The buffer to convert
+       * @param {Function} callback The function to call when conversion is complete
+       */
+      this.util.array_to_string = function(buf, callback) {
+        var bb = new Blob([new Uint8Array(buf)]);
+        var f = new FileReader();
+        f.onload = function(e) {
+          callback(e.target.result);
+        };
+        f.readAsText(bb);
+      };
+    }
+
+    CryptoAbstractService.prototype.constants = {
+      crypto_sign_BYTES: 64,
+      crypto_secretbox_NONCEBYTES: 24,
+      crypto_box_MACBYTES: 16,
+      SEED_LENGTH: 32, // Length of the key
+      SCRYPT_PARAMS:{
+        SIMPLE: {
+          N: 2048,
+          r: 8,
+          p: 1,
+          memory: -1 // default
+        },
+        DEFAULT: {
+          N: 4096,
+          r: 16,
+          p: 1,
+          memory: -1 // default
+        },
+        // removeIf(no-device)
+        SECURE: {
+          N: 16384,
+          r: 32,
+          p: 2,
+          memory: 33554432
+        },
+        HARDEST: {
+          N: 65536,
+          r: 32,
+          p: 4,
+          memory: 134217728
+        },
+        EXTREME: {
+          N: 262144,
+          r: 64,
+          p: 8,
+          memory: 536870912
+        }
+        // endRemoveIf(no-device)
+      }
+    };
+
+    CryptoAbstractService.prototype.async_load_base58 = function(on_ready) {
+      var that = this;
+      if (Base58 !== null){return on_ready(Base58);}
+      else {$timeout(function(){that.async_load_base58(on_ready);}, 100);}
+    };
+
+    CryptoAbstractService.prototype.async_load_scrypt = function(on_ready, options) {
+      var that = this;
+      if (scrypt_module_factory !== null){scrypt_module_factory(on_ready, options);}
+      else {$timeout(function(){that.async_load_scrypt(on_ready, options);}, 100);}
+    };
+
+    CryptoAbstractService.prototype.async_load_nacl_js = function(on_ready, options) {
+      var that = this;
+      if (nacl_factory !== null) {nacl_factory.instantiate(on_ready, options);}
+      else {$timeout(function(){that.async_load_nacl_js(on_ready, options);}, 100);}
+    };
+
+    CryptoAbstractService.prototype.async_load_base64 = function(on_ready) {
+      var that = this;
+      if (Base64 !== null) {on_ready(Base64);}
+      else {$timeout(function(){that.async_load_base64(on_ready);}, 100);}
+    };
+
+    CryptoAbstractService.prototype.async_load_sha256 = function(on_ready) {
+      var that = this;
+      if (sha256 !== null){return on_ready(sha256);}
+      else {$timeout(function(){that.async_load_sha256(on_ready);}, 100);}
+    };
+
+    CryptoAbstractService.prototype.seed_from_signSk = function(signSk) {
+      var seed = new Uint8Array(this.constants.SEED_LENGTH);
+      for (var i = 0; i < seed.length; i++) seed[i] = signSk[i];
+      return seed;
+    };
+
+    // Web crypto API - see https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API
+    var crypto =  window.crypto || window.msCrypto || window.Crypto;
+    if (crypto && crypto.getRandomValues) {
+      CryptoAbstractService.prototype.crypto = crypto;
+      CryptoAbstractService.prototype.util = {};
+      CryptoAbstractService.prototype.util.random_nonce = function() {
+        var nonce = new Uint8Array(crypto_secretbox_NONCEBYTES);
+        this.crypto.getRandomValues(nonce);
+        return $q.when(nonce);
+      };
+    }
+
+    function FullJSServiceFactory() {
+      this.id = 'FullJS';
+
+      // libraries handlers
+      this.scrypt = null;
+      this.nacl = null;
+      this.base58 = null;
+      this.base64 = null;
+      var that = this;
+
+      this.util = this.util || {};
+      this.util.decode_utf8 = function (s) {
+        var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
+        for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
+        return b;
+      };
+      this.util.encode_utf8 = function (s) {
+        return that.nacl.encode_utf8(s);
+      };
+      this.util.encode_base58 = function (a) { // TODO : move to abstract factory
+        return that.base58.encode(a);
+      };
+      this.util.decode_base58 = function (a) { // TODO : move to abstract factory
+        var i;
+        var d = that.base58.decode(a);
+        var b = new Uint8Array(d.length);
+        for (i = 0; i < d.length; i++) b[i] = d[i];
+        return b;
+      };
+      this.util.decode_base64 = function (a) {
+        return that.base64.decode(a);
+      };
+      this.util.encode_base64 = function (b) {
+        return that.base64.encode(b);
+      };
+
+      this.util.hash_sha256 = function (message) {
+        return $q(function (resolve) {
+          var msg = that.util.decode_utf8(message);
+          var hash = that.nacl.to_hex(that.nacl.crypto_hash_sha256(msg));
+          resolve(hash.toUpperCase());
+        });
+      };
+      this.util.random_nonce = function () {
+        if (that.crypto && that.crypto.getRandomValues) {
+          var nonce = new Uint8Array(that.constants.crypto_secretbox_NONCEBYTES);
+          that.crypto.getRandomValues(nonce);
+          return $q.when(nonce);
+        }
+        else {
+          return $q.when(that.nacl.crypto_box_random_nonce());
+        }
+      };
+      this.util.crypto_hash_sha256 = function(msg_int8) {
+        return that.nacl.crypto_hash_sha256(msg_int8);
+      };
+      this.util.crypto_scrypt = function(password, salt, N, r, p, seedLength) {
+
+        return $q(function(resolve, reject) {
+          try {
+            var seed = that.scrypt.crypto_scrypt(
+              password,
+              salt,
+              N,
+              r,
+              p,
+              seedLength);
+            resolve(seed);
+          }
+          catch(err) {
+            reject(err);
+          }
+        });
+      };
+
+      /**
+       * Compute the box key pair, from a sign key pair
+       */
+      this.box_keypair_from_sign = function (signKeyPair) {
+        if (signKeyPair.boxSk && signKeyPair.boxPk) return $q.when(signKeyPair);
+        return $q(function (resolve, reject) {
+          try {
+            // TODO: waiting for a new version of js-nacl, with missing functions expose
+            //resolve(that.nacl.crypto_box_keypair_from_sign_sk(signKeyPair.signSk);
+
+            resolve(crypto_box_keypair_from_sign_sk(signKeyPair.signSk));
+          }
+          catch(err) {
+            reject(err);
+          }
+        });
+      };
+
+      /**
+       * Compute the box public key, from a sign public key
+       */
+      this.box_pk_from_sign = function (signPk) {
+        return $q(function(resolve, reject) {
+          try {
+            // TODO: waiting for a new version of js-nacl, with missing functions expose
+            //resolve(that.nacl.crypto_box_pk_from_sign_pk(signPk));
+
+            resolve(crypto_box_pk_from_sign_pk(signPk));
+          }
+          catch(err) {
+            reject(err);
+          }
+        });
+      };
+
+      this.box_sk_from_sign = function (signSk) {
+        return $q(function(resolve, reject) {
+          try {
+            // TODO: waiting for a new version of js-nacl, with missing functions expose
+            //resolve(that.nacl.crypto_box_sk_from_sign_sk(signSk));
+            resolve(crypto_box_sk_from_sign_sk(signSk));
+          }
+          catch(err) {
+            reject(err);
+          }
+        });
+      };
+
+      /**
+       * Encrypt a message, from a key pair
+       */
+      this.box = function(message, nonce, recipientPk, senderSk) {
+        return $q(function (resolve, reject) {
+          if (!message) {
+            resolve(message);
+            return;
+          }
+          var messageBin = that.nacl.encode_utf8(message);
+          if (typeof recipientPk === "string") {
+            recipientPk = that.util.decode_base58(recipientPk);
+          }
+
+          try {
+            var ciphertextBin = that.nacl.crypto_box(messageBin, nonce, recipientPk, senderSk);
+            var ciphertext = that.util.encode_base64(ciphertextBin);
+            resolve(ciphertext);
+          }
+          catch (err) {
+            reject(err);
+          }
+        });
+      };
+
+      /**
+       * Decrypt a message, from a key pair
+       */
+      this.box_open = function (cypherText, nonce, senderPk, recipientSk) {
+        return $q(function (resolve, reject) {
+          if (!cypherText) {
+            resolve(cypherText);
+            return;
+          }
+
+          var ciphertextBin = that.util.decode_base64(cypherText);
+          if (typeof senderPk === "string") {
+            senderPk = that.util.decode_base58(senderPk);
+          }
+
+          try {
+            var message = that.nacl.crypto_box_open(ciphertextBin, nonce, senderPk, recipientSk);
+            resolve(that.nacl.decode_utf8(message));
+          }
+          catch (err) {
+            reject(err);
+          }
+
+        });
+      };
+
+      /**
+       * Create key pairs (sign and box), from salt+password (Scrypt auth)
+       */
+      this.scryptKeypair = function(salt, password, scryptParams) {
+        return that.util.crypto_scrypt(
+          that.util.encode_utf8(password),
+          that.util.encode_utf8(salt),
+          scryptParams && scryptParams.N || that.constants.SCRYPT_PARAMS.DEFAULT.N,
+          scryptParams && scryptParams.r || that.constants.SCRYPT_PARAMS.DEFAULT.r,
+          scryptParams && scryptParams.p || that.constants.SCRYPT_PARAMS.DEFAULT.p,
+          that.constants.SEED_LENGTH)
+          .then(function(seed){
+            var signKeypair = that.nacl.crypto_sign_seed_keypair(seed);
+            var boxKeypair = that.nacl.crypto_box_seed_keypair(seed);
+            return {
+              signPk: signKeypair.signPk,
+              signSk: signKeypair.signSk,
+              boxPk: boxKeypair.boxPk,
+              boxSk: boxKeypair.boxSk
+            };
+          });
+      };
+
+      /**
+       * Create key pairs from a seed
+       */
+      this.seedKeypair = function(seed) {
+        return $q(function(resolve, reject) {
+          var signKeypair = that.nacl.crypto_sign_seed_keypair(seed);
+          var boxKeypair = that.nacl.crypto_box_seed_keypair(seed);
+          resolve({
+            signPk: signKeypair.signPk,
+            signSk: signKeypair.signSk,
+            boxPk: boxKeypair.boxPk,
+            boxSk: boxKeypair.boxSk
+          });
+        });
+      };
+
+      /**
+       * Get sign pk from salt+password (scrypt auth)
+       */
+      this.scryptSignPk = function(salt, password, scryptParams) {
+        return $q(function(resolve, reject) {
+          try {
+            var seed = that.scrypt.crypto_scrypt(
+              that.util.encode_utf8(password),
+              that.util.encode_utf8(salt),
+              scryptParams && scryptParams.N || that.constants.SCRYPT_PARAMS.DEFAULT.N,
+              scryptParams && scryptParams.r || that.constants.SCRYPT_PARAMS.DEFAULT.r,
+              scryptParams && scryptParams.p || that.constants.SCRYPT_PARAMS.DEFAULT.p,
+              that.constants.SEED_LENGTH);
+            var signKeypair = that.nacl.crypto_sign_seed_keypair(seed);
+            resolve(signKeypair.signPk);
+          }
+          catch(err) {
+            reject(err);
+          }
+        });
+      };
+
+      /**
+       * Verify a signature of a message, for a pubkey
+       */
+      this.verify = function (message, signature, pubkey) {
+        return $q(function(resolve, reject) {
+          var msg = that.util.decode_utf8(message);
+          var sig = that.util.decode_base64(signature);
+          var pub = that.util.decode_base58(pubkey);
+          var sm = new Uint8Array(that.constants.crypto_sign_BYTES + msg.length);
+          var i;
+          for (i = 0; i < that.constants.crypto_sign_BYTES; i++) sm[i] = sig[i];
+          for (i = 0; i < msg.length; i++) sm[i+that.constants.crypto_sign_BYTES] = msg[i];
+
+          // Call to verification lib...
+          var verified = that.nacl.crypto_sign_open(sm, pub) !== null;
+          resolve(verified);
+        });
+      };
+
+      /**
+       * Sign a message, from a key pair
+       */
+      this.sign = function(message, keypair) {
+        return $q(function(resolve, reject) {
+          var m = that.util.decode_utf8(message);
+          var sk = keypair.signSk;
+          var signedMsg = that.nacl.crypto_sign(m, sk);
+          var sig = new Uint8Array(that.constants.crypto_sign_BYTES);
+          for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
+          var signature = that.base64.encode(sig);
+          resolve(signature);
+        });
+      };
+
+      this.load = function() {
+        var deferred = $q.defer();
+        var naclOptions = {};
+        var scryptOptions = {};
+        if (ionic.Platform.grade.toLowerCase()!='a') {
+          console.info('Reduce NaCl memory to 16mb,  because plateform grade is not [a] but [{0}]'.format(ionic.Platform.grade));
+          naclOptions.requested_total_memory = 16 * 1048576; // 16 Mo
+        }
+        var loadedLib = 0;
+        var checkAllLibLoaded = function() {
+          loadedLib++;
+          if (loadedLib === 4) {
+            that.loaded = true;
+            deferred.resolve();
+          }
+        };
+        this.async_load_nacl_js(function(lib) {
+          that.nacl = lib;
+          checkAllLibLoaded();
+        }, naclOptions);
+        this.async_load_scrypt(function(lib) {
+          that.scrypt = lib;
+          that.scrypt.requested_total_memory = scryptOptions.requested_total_memory;
+          checkAllLibLoaded();
+        }, scryptOptions);
+        this.async_load_base58(function(lib) {
+          that.base58 = lib;
+          checkAllLibLoaded();
+        });
+        that.async_load_base64(function(lib) {
+          that.base64 = lib;
+          checkAllLibLoaded();
+        });
+        return deferred.promise;
+      };
+
+      // Shortcuts
+      this.util.hash = that.util.hash_sha256;
+      this.box = {
+        keypair: {
+          fromSignKeypair: that.box_keypair_from_sign,
+          skFromSignSk: that.box_sk_from_sign,
+          pkFromSignPk: that.box_pk_from_sign
+        },
+        pack: that.box,
+        open: that.box_open
+      };
+
+      /*--
+        start WORKAROUND - Publish missing functions (see PR js-nacl: https://github.com/tonyg/js-nacl/pull/54)
+      -- */
+
+      function crypto_box_keypair_from_sign_sk(sk) {
+        var ska = check_injectBytes("crypto_box_keypair_from_sign_sk", "sk", sk,
+          that.nacl.nacl_raw._crypto_sign_secretkeybytes());
+        var skb = new Target(that.nacl.nacl_raw._crypto_box_secretkeybytes());
+        check("_crypto_sign_ed25519_sk_to_curve25519",
+          that.nacl.nacl_raw._crypto_sign_ed25519_sk_to_curve25519(skb.address, ska));
+        FREE(ska);
+        return that.nacl.crypto_box_keypair_from_raw_sk(skb.extractBytes());
+      }
+
+      function crypto_box_pk_from_sign_pk(pk) {
+        var pka = check_injectBytes("crypto_box_pk_from_sign_pk", "pk", pk,
+          that.nacl.nacl_raw._crypto_sign_publickeybytes());
+        var pkb = new Target(that.nacl.nacl_raw._crypto_box_publickeybytes());
+        check("_crypto_sign_ed25519_pk_to_curve25519",
+          that.nacl.nacl_raw._crypto_sign_ed25519_pk_to_curve25519(pkb.address, pka));
+        FREE(pka);
+        return pkb.extractBytes();
+      }
+
+      function crypto_box_sk_from_sign_sk(sk) {
+        var ska = check_injectBytes("crypto_box_sk_from_sign_sk", "sk", sk,
+          that.nacl.nacl_raw._crypto_sign_secretkeybytes());
+        var skb = new Target(that.nacl.nacl_raw._crypto_box_secretkeybytes());
+        check("_crypto_sign_ed25519_sk_to_curve25519",
+          that.nacl.nacl_raw._crypto_sign_ed25519_sk_to_curve25519(skb.address, ska));
+        FREE(ska);
+        return skb.extractBytes();
+      }
+
+      function check_length(function_name, what, thing, expected_length) {
+        if (thing.length !== expected_length) {
+          throw {message: "nacl." + function_name + " expected " +
+              expected_length + "-byte " + what + " but got length " + thing.length};
+        }
+      }
+
+      function check(function_name, result) {
+        if (result !== 0) {
+          throw {message: "nacl_raw." + function_name + " signalled an error"};
+        }
+      }
+
+      function check_injectBytes(function_name, what, thing, expected_length, leftPadding) {
+        check_length(function_name, what, thing, expected_length);
+        return injectBytes(thing, leftPadding);
+      }
+
+      function injectBytes(bs, leftPadding) {
+        var p = leftPadding || 0;
+        var address = MALLOC(bs.length + p);
+        that.nacl.nacl_raw.HEAPU8.set(bs, address + p);
+        for (var i = address; i < address + p; i++) {
+          that.nacl.nacl_raw.HEAPU8[i] = 0;
+        }
+        return address;
+      }
+
+      function MALLOC(nbytes) {
+        var result = that.nacl.nacl_raw._malloc(nbytes);
+        if (result === 0) {
+          throw {message: "malloc() failed", nbytes: nbytes};
+        }
+        return result;
+      }
+
+      function FREE(pointer) {
+        that.nacl.nacl_raw._free(pointer);
+      }
+
+      function free_all(addresses) {
+        for (var i = 0; i < addresses.length; i++) {
+          FREE(addresses[i]);
+        }
+      }
+
+      function extractBytes(address, length) {
+        var result = new Uint8Array(length);
+        result.set(that.nacl.nacl_raw.HEAPU8.subarray(address, address + length));
+        return result;
+      }
+
+      function Target(length) {
+        this.length = length;
+        this.address = MALLOC(length);
+      }
+
+      Target.prototype.extractBytes = function (offset) {
+        var result = extractBytes(this.address + (offset || 0), this.length - (offset || 0));
+        FREE(this.address);
+        this.address = null;
+        return result;
+      };
+
+      /*--
+        end of WORKAROUND
+      -- */
+
+    }
+    FullJSServiceFactory.prototype = new CryptoAbstractService();
+
+
+    /* -----------------------------------------------------------------------------------------------------------------
+     * Service that use Cordova MiniSodium plugin
+     * ----------------------------------------------------------------------------------------------------------------*/
+
+    /***
+     * Factory for crypto, using Cordova plugin
+     */
+    function CordovaServiceFactory() {
+
+      this.id = 'MiniSodium';
+
+      // libraries handlers
+      this.nacl = null; // the cordova plugin
+      this.base58= null;
+      this.sha256= null;
+      var that = this;
+
+      // functions
+      this.util = this.util || {};
+      this.util.decode_utf8 = function(s) {
+        return that.nacl.to_string(s);
+      };
+      this.util.encode_utf8 = function(s) {
+        return that.nacl.from_string(s);
+      };
+      this.util.encode_base58 = function(a) {
+        return that.base58.encode(a);
+      };
+      this.util.decode_base58 = function(a) {
+        var i;
+        var d = that.base58.decode(a);
+        var b = new Uint8Array(d.length);
+        for (i = 0; i < d.length; i++) b[i] = d[i];
+        return b;
+      };
+      this.util.decode_base64 = function (a) {
+        return that.nacl.from_base64(a);
+      };
+      this.util.encode_base64 = function (b) {
+        return that.nacl.to_base64(b);
+      };
+      this.util.hash_sha256 = function(message) {
+        return $q.when(that.sha256(message).toUpperCase());
+      };
+      this.util.random_nonce = function() {
+        var nonce = new Uint8Array(that.constants.crypto_secretbox_NONCEBYTES);
+        that.crypto.getRandomValues(nonce);
+        return $q.when(nonce);
+      };
+      this.util.crypto_hash_sha256 = function (message) {
+        return that.nacl.from_hex(that.sha256(message));
+      };
+
+      this.util.crypto_scrypt = function(password, salt, N, r, p, seedLength) {
+        var deferred = $q.defer();
+        that.nacl.crypto_pwhash_scryptsalsa208sha256_ll(
+          password,
+          salt,
+          N,
+          r,
+          p,
+          seedLength,
+          function (err, seed) {
+            if (err) { deferred.reject(err); return;}
+            deferred.resolve(seed);
+          }
+        );
+        return deferred.promise;
+      };
+
+      /**
+       * Create key pairs (sign and box), from salt+password (Scrypt), using cordova
+       */
+      this.scryptKeypair = function(salt, password, scryptParams) {
+        var deferred = $q.defer();
+
+        that.nacl.crypto_pwhash_scryptsalsa208sha256_ll(
+          that.nacl.from_string(password),
+          that.nacl.from_string(salt),
+          scryptParams && scryptParams.N || that.constants.SCRYPT_PARAMS.DEFAULT.N,
+          scryptParams && scryptParams.r || that.constants.SCRYPT_PARAMS.DEFAULT.r,
+          scryptParams && scryptParams.p || that.constants.SCRYPT_PARAMS.DEFAULT.p,
+          that.constants.SEED_LENGTH,
+          function (err, seed) {
+            if (err) { deferred.reject(err); return;}
+
+            that.nacl.crypto_sign_seed_keypair(seed, function (err, signKeypair) {
+              if (err) { deferred.reject(err); return;}
+              var result = {
+                signPk: signKeypair.pk,
+                signSk: signKeypair.sk
+              };
+              that.box_keypair_from_sign(result)
+                .then(function(boxKeypair) {
+                  result.boxPk = boxKeypair.pk;
+                  result.boxSk = boxKeypair.sk;
+                  deferred.resolve(result);
+                })
+                .catch(function(err) {
+                  deferred.reject(err);
+                });
+            });
+
+          }
+        );
+
+        return deferred.promise;
+      };
+
+      /**
+       * Create key pairs from a seed
+       */
+      this.seedKeypair = function(seed) {
+        var deferred = $q.defer();
+
+        that.nacl.crypto_sign_seed_keypair(seed, function (err, signKeypair) {
+          if (err) { deferred.reject(err); return;}
+          deferred.resolve({
+            signPk: signKeypair.pk,
+            signSk: signKeypair.sk
+          });
+        });
+        return deferred.promise;
+      };
+
+
+      /**
+       * Get sign PK from salt+password (Scrypt), using cordova
+       */
+      this.scryptSignPk = function(salt, password, scryptParams) {
+        var deferred = $q.defer();
+
+        that.nacl.crypto_pwhash_scryptsalsa208sha256_ll(
+          that.nacl.from_string(password),
+          that.nacl.from_string(salt),
+          scryptParams && scryptParams.N || that.constants.SCRYPT_PARAMS.DEFAULT.N,
+          scryptParams && scryptParams.r || that.constants.SCRYPT_PARAMS.DEFAULT.r,
+          scryptParams && scryptParams.p || that.constants.SCRYPT_PARAMS.DEFAULT.p,
+          that.constants.SEED_LENGTH,
+          function (err, seed) {
+            if (err) { deferred.reject(err); return;}
+
+            that.nacl.crypto_sign_seed_keypair(seed, function (err, signKeypair) {
+              if (err) { deferred.reject(err); return;}
+              deferred.resolve(signKeypair.pk);
+            });
+
+          }
+        );
+
+        return deferred.promise;
+      };
+
+      /**
+       * Verify a signature of a message, for a pubkey
+       */
+      this.verify = function (message, signature, pubkey) {
+        var deferred = $q.defer();
+        that.nacl.crypto_sign_verify_detached(
+          that.nacl.from_base64(signature),
+          that.nacl.from_string(message),
+          that.nacl.from_base64(pubkey),
+          function(err, verified) {
+            if (err) { deferred.reject(err); return;}
+            deferred.resolve(verified);
+          });
+        return deferred.promise;
+      };
+
+      /**
+       * Sign a message, from a key pair
+       */
+      this.sign = function(message, keypair) {
+        var deferred = $q.defer();
+
+        that.nacl.crypto_sign(
+          that.nacl.from_string(message), // message
+          keypair.signSk, // sk
+          function(err, signedMsg) {
+            if (err) { deferred.reject(err); return;}
+            var sig;
+            if (signedMsg.length > that.constants.crypto_sign_BYTES) {
+              sig = new Uint8Array(that.constants.crypto_sign_BYTES);
+              for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
+            }
+            else {
+              sig = signedMsg;
+            }
+            var signature = that.nacl.to_base64(sig);
+            deferred.resolve(signature);
+          });
+
+        return deferred.promise;
+      };
+
+      /**
+       * Compute the box key pair, from a sign key pair
+       */
+      this.box_keypair_from_sign = function(signKeyPair) {
+        if (signKeyPair.boxSk && signKeyPair.boxPk) return $q.when(signKeyPair);
+        var deferred = $q.defer();
+        var result = {};
+        that.nacl.crypto_sign_ed25519_pk_to_curve25519(signKeyPair.signPk, function(err, boxPk) {
+          if (err) { deferred.reject(err); return;}
+          result.boxPk = boxPk;
+          if (result.boxSk) deferred.resolve(result);
+        });
+        that.nacl.crypto_sign_ed25519_sk_to_curve25519(signKeyPair.signSk, function(err, boxSk) {
+          if (err) { deferred.reject(err); return;}
+          result.boxSk = boxSk;
+          if (result.boxPk) deferred.resolve(result);
+        });
+
+        return deferred.promise;
+      };
+
+      /**
+       * Compute the box public key, from a sign public key
+       */
+      this.box_pk_from_sign = function(signPk) {
+        var deferred = $q.defer();
+        that.nacl.crypto_sign_ed25519_pk_to_curve25519(signPk, function(err, boxPk) {
+          if (err) { deferred.reject(err); return;}
+          deferred.resolve(boxPk);
+        });
+        return deferred.promise;
+      };
+
+      /**
+       * Compute the box secret key, from a sign secret key
+       */
+      this.box_sk_from_sign = function(signSk) {
+        var deferred = $q.defer();
+        that.nacl.crypto_sign_ed25519_sk_to_curve25519(signSk, function(err, boxSk) {
+          if (err) { deferred.reject(err); return;}
+          deferred.resolve(boxSk);
+        });
+        return deferred.promise;
+      };
+
+      /**
+       * Encrypt a message, from a key pair
+       */
+      this.box = function(message, nonce, recipientPk, senderSk) {
+        if (!message) {
+          return $q.reject('No message');
+        }
+        var deferred = $q.defer();
+
+        var messageBin = that.nacl.from_string(message);
+        if (typeof recipientPk === "string") {
+          recipientPk = that.util.decode_base58(recipientPk);
+        }
+
+        that.nacl.crypto_box_easy(messageBin, nonce, recipientPk, senderSk, function(err, ciphertextBin) {
+          if (err) { deferred.reject(err); return;}
+          var ciphertext = that.util.encode_base64(ciphertextBin);
+          //console.debug('Encrypted message: ' + ciphertext);
+          deferred.resolve(ciphertext);
+        });
+        return deferred.promise;
+      };
+
+      /**
+       * Decrypt a message, from a key pair
+       */
+      this.box_open = function(cypherText, nonce, senderPk, recipientSk) {
+        if (!cypherText) {
+          return $q.reject('No cypherText');
+        }
+        var deferred = $q.defer();
+
+        var ciphertextBin = that.nacl.from_base64(cypherText);
+        if (typeof senderPk === "string") {
+          senderPk = that.util.decode_base58(senderPk);
+        }
+
+        // Avoid crash if content has not the minimal length - Fix #346
+        if (ciphertextBin.length < that.constants.crypto_box_MACBYTES) {
+          deferred.reject('Invalid cypher content length');
+          return;
+        }
+
+        that.nacl.crypto_box_open_easy(ciphertextBin, nonce, senderPk, recipientSk, function(err, message) {
+          if (err) { deferred.reject(err); return;}
+          that.util.array_to_string(message, function(result) {
+            //console.debug('Decrypted text: ' + result);
+            deferred.resolve(result);
+          });
+        });
+
+        return deferred.promise;
+      };
+
+      this.load = function() {
+        var deferred = $q.defer();
+        if (!window.plugins || !window.plugins.MiniSodium) {
+          deferred.reject("Cordova plugin 'MiniSodium' not found. Please load Full JS implementation instead.");
+        }
+        else {
+          that.nacl = window.plugins.MiniSodium;
+
+          var loadedLib = 0;
+          var checkAllLibLoaded = function() {
+            loadedLib++;
+            if (loadedLib == 2) {
+              that.loaded = true;
+              deferred.resolve();
+            }
+          };
+          that.async_load_base58(function(lib) {
+            that.base58 = lib;
+            checkAllLibLoaded();
+          });
+          that.async_load_sha256(function(lib) {
+            that.sha256 = lib;
+            checkAllLibLoaded();
+          });
+        }
+
+        return deferred.promise;
+      };
+
+      // Shortcuts
+      this.util.hash = that.util.hash_sha256;
+      this.box = {
+        keypair: {
+          fromSignKeypair: that.box_keypair_from_sign,
+          skFromSignSk: that.box_sk_from_sign,
+          pkFromSignPk: that.box_pk_from_sign
+        },
+        pack: that.box,
+        open: that.box_open
+      };
+    }
+    CordovaServiceFactory.prototype = new CryptoAbstractService();
+
+    /* -----------------------------------------------------------------------------------------------------------------
+     * Create service instance
+     * ----------------------------------------------------------------------------------------------------------------*/
+
+
+    var service = new CryptoAbstractService();
+
+    var isDevice = true;
+    //console.debug("[crypto] Created CryptotUtils service. device=" + isDevice);
+
+    ionicReady().then(function() {
+      console.debug('[crypto] Starting...');
+      var now = Date.now();
+
+      var serviceImpl;
+
+      // Use Cordova plugin implementation, when exists
+      if (isDevice && window.plugins && window.plugins.MiniSodium && crypto && crypto.getRandomValues) {
+        console.debug('[crypto] Loading \'MiniSodium\' implementation...');
+        serviceImpl = new CordovaServiceFactory();
+      }
+      else {
+        console.debug('[crypto] Loading \'FullJS\' implementation...');
+        serviceImpl = new FullJSServiceFactory();
+      }
+
+      // Load (async lib)
+      serviceImpl.load()
+        .catch(function(err) {
+          console.error(err);
+          throw err;
+        })
+        .then(function() {
+          service.copy(serviceImpl);
+          console.debug('[crypto] Loaded \'{0}\' implementation in {1}ms'.format(service.id, Date.now() - now));
+        });
+
+    });
+
+    return service;
+  }])
+
+
+  /* -----------------------------
+     Crypto advanced service for Cesium
+   */
+
+  .factory('csCrypto', ['$q', '$rootScope', '$timeout', 'CryptoUtils', 'UIUtils', 'Modals', function($q, $rootScope, $timeout, CryptoUtils, UIUtils, Modals) {
+    'ngInject';
+
+    function test(regexpContent) {
+      return new RegExp(regexpContent);
+    }
+
+    function xor(a, b) {
+      var length = Math.max(a.length, b.length);
+      var buffer = new Uint8Array(length);
+      for (var i = 0; i < length; ++i) {
+        buffer[i] = a[i] ^ b[i];
+      }
+      return buffer;
+    }
+
+    function concat_Uint8Array( buffer1, buffer2 ) {
+      var tmp = new Uint8Array( buffer1.byteLength + buffer2.byteLength );
+      tmp.set( new Uint8Array( buffer1 ), 0 );
+      tmp.set( new Uint8Array( buffer2 ), buffer1.byteLength );
+      return tmp;
+    }
+
+    var constants = {
+      WIF: {
+        DATA_LENGTH: 35
+      },
+      EWIF: {
+        SALT_LENGTH: 4,
+        DERIVED_HALF_LENGTH: 16,
+        DATA_LENGTH: 39,
+        SCRYPT_PARAMS: {
+          N: 16384,
+          r: 8,
+          p: 8
+        }
+      },
+      REGEXP: {
+        PUBKEY: '[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}',
+        SECKEY: '[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{86,88}',
+        FILE: {
+        TYPE_LINE: '^Type: ([a-zA-Z0-9]+)\n',
+          VERSION: 'Version: ([0-9]+)\n',
+          PUB: '[Pp]ub: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})\n',
+          SEC: '[Ss]ec: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{86,88})(\n|$)',
+          DATA: '[Dd]ata: ([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)(\n|$)'
+        }
+      }
+    },
+    regexp = {
+      FILE: {
+        TYPE_LINE: test(constants.REGEXP.FILE.TYPE_LINE),
+        VERSION: test(constants.REGEXP.FILE.VERSION),
+        PUB: test(constants.REGEXP.FILE.PUB),
+        SEC: test(constants.REGEXP.FILE.SEC),
+        DATA: test(constants.REGEXP.FILE.DATA)
+      }
+    },
+    errorCodes = {
+      BAD_PASSWORD: 3001,
+      BAD_CHECKSUM: 3002
+    };
+
+    /* -- keyfile -- */
+
+    function readKeyFile(file, options) {
+
+      if (file && file.content) {
+        return parseKeyFileContent(file.content, options);
+      }
+
+      return $q(function(resolve, reject) {
+        if (!file) {
+          return reject('Argument [file] is missing');
+        }
+
+        //console.debug('[crypto] [keypair] reading file: ', file);
+        var reader = new FileReader();
+        reader.onload = function (event) {
+          parseKeyFileContent(event.target.result, options)
+            .then(resolve)
+            .catch(reject);
+        };
+        reader.readAsText(file, 'utf8');
+      });
+    }
+
+    function parseKeyFileContent(content, options) {
+
+      if (!content) return $q.reject('Argument [content] is missing');
+
+      options = options || {};
+      options.withSecret = angular.isDefined(options.withSecret) ? options.withSecret : false;
+      options.defaultType = options.defaultType || 'PubSec';
+
+      var matches;
+
+      var typeMatch = regexp.FILE.TYPE_LINE.exec(content);
+
+      // If no Type field: add default type
+      var type = typeMatch && typeMatch[1];
+      if (!type && options.defaultType) {
+        return parseKeyFileContent('Type: {0}\n{1}'.format(options.defaultType, content), options);
+      }
+
+      // Type: PubSec
+      if (type == 'PubSec') {
+
+        // Read Pub field
+        matches = regexp.FILE.PUB.exec(content);
+        if (!matches) return $q.reject('Missing [pub] field in file, or invalid public key value');
+        var signKeypair = {
+          signPk: CryptoUtils.base58.decode(matches[1])
+        };
+        if (!options.withSecret) return $q.resolve(signKeypair);
+
+        // Read Sec field
+        matches= regexp.FILE.SEC.exec(content);
+        if (!matches) return $q.reject('Missing [sec] field in file, or invalid secret key value');
+        signKeypair.signSk = CryptoUtils.base58.decode(matches[1]);
+        return $q.resolve(signKeypair);
+      }
+
+      // Type: WIF or EWIF
+      else if (type == 'WIF' || type == 'EWIF') {
+        matches = regexp.FILE.DATA.exec(content);
+        if (!matches) {
+          return $q.reject('Missing [Data] field in file. This is required for WIF or EWIF format');
+        }
+
+        return parseWIF_or_EWIF(matches[1], {
+          type: type,
+          password: options.password
+        })
+          .then(function(signKeypair) {
+            return signKeypair && !options.withSecret ? {signPk: signKeypair.signPk} : signKeypair;
+          });
+      }
+
+      // Type: unknown
+      if (options.defaultType) {
+        return $q.reject('Bad file format: missing Type field');
+      }
+      else {
+        return $q.reject('Bad file format, unknown type [' + type + ']');
+      }
+    }
+
+
+    /**
+     *
+     * @param data_base58
+     * @param options
+     * @returns {*}
+     */
+    function parseWIF_or_EWIF(data_base58, options) {
+      options = options || {};
+
+      var data_int8 = data_base58 && CryptoUtils.base58.decode(data_base58);
+      if (!data_int8 || data_int8.length != constants.EWIF.DATA_LENGTH && data_int8.length != constants.WIF.DATA_LENGTH) {
+        return $q.reject('Invalid WIF or EWIF format (invalid bytes count).');
+      }
+
+      // Detect the type from the first byte
+      options.type = options.type || (data_int8[0] == 1 && 'WIF') || (data_int8[0] == 2 && 'EWIF');
+
+      // Type: WIF
+      if (options.type == 'WIF') {
+        return parseWIF_v1(data_base58);
+      }
+
+      // Type: EWIF
+      if (options.type == 'EWIF') {
+
+        // If not set, resolve password using the given callback
+        if (typeof options.password == "function") {
+          //console.debug("[crypto] [EWIF] Executing 'options.password()' to resolve the password...");
+          options.password = options.password();
+          if (!options.password) {
+            return $q.reject({message: "Invalid callback result for 'options.password()': must return a promise or a string."});
+          }
+        }
+
+        // If password is a promise, get the result then read data
+        if (typeof options.password === "object" && options.password.then) {
+          return options.password.then(function(password) {
+            if (!password) throw 'CANCELLED';
+            return parseEWIF_v1(data_base58, password);
+          });
+        }
+
+        // If password is a valid string, read data
+        if (typeof options.password == "string") {
+          return parseEWIF_v1(data_base58, options.password);
+        }
+
+        return $q.reject({message: 'Invalid EWIF options.password. Waiting a callback function, a promise or a string.'});
+      }
+
+      // Unknown type
+      return $q.reject({message: 'Invalid WIF or EWIF format: unknown first byte identifier.'});
+    }
+
+
+    function parseWIF_v1(wif_base58) {
+      var wif_int8 = CryptoUtils.util.decode_base58(wif_base58);
+
+      // Check identifier byte = 0x01
+      if (wif_int8[0] != 1) {
+        return $q.reject({message: 'Invalid WIF v1 format: expected [0x01] as first byte'});
+      }
+
+      // Check length
+      if (wif_int8.length != constants.WIF.DATA_LENGTH) {
+        return $q.reject({message: 'Invalid WIF v1 format: Data must be a '+constants.WIF.DATA_LENGTH+' bytes array, encoded in base 58.'});
+      }
+
+      var wif_int8_no_checksum = wif_int8.slice(0, -2),
+        seed = wif_int8.slice(1, -2),
+        checksum =  wif_int8.slice(-2);
+
+      // Compute expected checksum
+      var expectedChecksum = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(wif_int8_no_checksum)).slice(0,2);
+      if (CryptoUtils.util.encode_base58(checksum) != CryptoUtils.util.encode_base58(expectedChecksum)) {
+        $q.reject({message: 'Invalid WIF format: bad checksum'});
+      }
+
+      // Generate keypair from seed
+      return CryptoUtils.seedKeypair(seed);
+    }
+
+    function parseEWIF_v1(ewif_base58, password) {
+      var ewif_int8 = CryptoUtils.util.decode_base58(ewif_base58);
+
+      // Check identifier byte = 0x02
+      if (ewif_int8[0] != 2) {
+        return $q.reject({message: 'Invalid EWIF v1 format: Expected [0x02] as first byte'});
+      }
+
+      // Check length
+      if (ewif_int8.length != constants.EWIF.DATA_LENGTH) {
+        return $q.reject({message: 'Invalid EWIF v1 format: Expected {0} bytes, encoded in base 58.'.format(constants.EWIF.DATA_LENGTH)});
+      }
+
+      var ewif_int8_no_checksum = ewif_int8.slice(0,-2);
+      var checksum = ewif_int8.slice(-2);
+      var salt = ewif_int8.slice(1,5);
+      var encryptedhalf1 = ewif_int8.slice(5,21);
+      var encryptedhalf2 = ewif_int8.slice(21,37);
+
+      // Retrieve the scrypt_seed
+      return CryptoUtils.util.crypto_scrypt(
+        CryptoUtils.util.encode_utf8(password),
+        salt,
+        constants.EWIF.SCRYPT_PARAMS.N,
+        constants.EWIF.SCRYPT_PARAMS.r,
+        constants.EWIF.SCRYPT_PARAMS.p,
+        64)
+
+      // Compute the final seed
+        .then(function(scrypt_seed) {
+
+          var derivedhalf1 = scrypt_seed.slice(0, 32);
+          var derivedhalf2 = scrypt_seed.slice(32, 64);
+
+          //AES
+          var aesEcb = new aesjs.ModeOfOperation.ecb(derivedhalf2);
+          var decryptedhalf1 = aesEcb.decrypt(encryptedhalf1);
+          var decryptedhalf2 = aesEcb.decrypt(encryptedhalf2);
+
+          decryptedhalf1 = new Uint8Array(decryptedhalf1);
+          decryptedhalf2 = new Uint8Array(decryptedhalf2);
+
+          //xor
+          var seed1 = xor(decryptedhalf1, derivedhalf1.slice(0, 16));
+          var seed2 = xor(decryptedhalf2, derivedhalf1.slice(16, 32));
+          var seed = concat_Uint8Array(seed1, seed2);
+
+          return seed;
+        })
+
+        // Get the keypair, from the seed
+        .then(CryptoUtils.seedKeypair)
+
+        // Do some controls
+        .then(function(keypair) {
+
+          // Check salt
+          var expectedSalt = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(keypair.signPk)).slice(0,4);
+          if(CryptoUtils.util.encode_base58(salt) !== CryptoUtils.util.encode_base58(expectedSalt)) {
+            throw {ucode: errorCodes.BAD_PASSWORD, message: 'ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD'};
+          }
+
+          // Check checksum
+          var expectedChecksum = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(ewif_int8_no_checksum)).slice(0,2);
+          if (CryptoUtils.util.encode_base58(checksum) != CryptoUtils.util.encode_base58(expectedChecksum)) {
+            throw {ucode: errorCodes.BAD_CHECKSUM, message: 'ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_CHECKSUM'};
+          }
+
+          return keypair;
+        });
+    }
+
+
+    function wif_v1_from_keypair(keypair) {
+
+      var seed = CryptoUtils.seed_from_signSk(keypair.signSk);
+      if (!seed || seed.byteLength !== CryptoUtils.constants.SEED_LENGTH)
+        throw "Bad see format. Expected {0} bytes".format(CryptoUtils.constants.SEED_LENGTH);
+
+      var fi = new Uint8Array(1);
+      fi[0] = 0x01;
+      var seed_fi = concat_Uint8Array(fi, seed);
+
+      // checksum
+      var checksum = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(seed_fi)).slice(0,2);
+
+      var wif_int8 = concat_Uint8Array(seed_fi, checksum);
+      return $q.when(CryptoUtils.util.encode_base58(wif_int8));
+    }
+
+    function ewif_v1_from_keypair(keypair, password) {
+
+      var seed = CryptoUtils.seed_from_signSk(keypair.signSk);
+      if (!seed || seed.byteLength !== CryptoUtils.constants.SEED_LENGTH)
+        return $q.reject({message: "Bad see format. Expected {0} bytes".format(CryptoUtils.constants.SEED_LENGTH)});
+
+      // salt
+      var salt = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(keypair.signPk)).slice(0,4);
+
+      // scrypt_seed
+      return CryptoUtils.util.crypto_scrypt(
+        CryptoUtils.util.encode_utf8(password),
+        salt,
+        constants.EWIF.SCRYPT_PARAMS.N,
+        constants.EWIF.SCRYPT_PARAMS.r,
+        constants.EWIF.SCRYPT_PARAMS.p,
+        64)
+        .then(function(scrypt_seed) {
+          var derivedhalf1 = scrypt_seed.slice(0,32);
+          var derivedhalf2 = scrypt_seed.slice(32,64);
+
+          //XOR & AES
+          var seed1_xor_derivedhalf1_1 = xor(seed.slice(0,16), derivedhalf1.slice(0,16));
+          var seed2_xor_derivedhalf1_2 = xor(seed.slice(16,32), derivedhalf1.slice(16,32));
+
+          var aesEcb = new aesjs.ModeOfOperation.ecb(derivedhalf2);
+          var encryptedhalf1 = aesEcb.encrypt(seed1_xor_derivedhalf1_1);
+          var encryptedhalf2 = aesEcb.encrypt(seed2_xor_derivedhalf1_2);
+
+          encryptedhalf1 = new Uint8Array(encryptedhalf1);
+          encryptedhalf2 = new Uint8Array(encryptedhalf2);
+
+          // concatenate ewif
+          var ewif_int8 = new Uint8Array(1);
+          ewif_int8[0] = 0x02;
+          ewif_int8 = concat_Uint8Array(ewif_int8,salt);
+          ewif_int8 = concat_Uint8Array(ewif_int8,encryptedhalf1);
+          ewif_int8 = concat_Uint8Array(ewif_int8,encryptedhalf2);
+
+          var checksum = CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(ewif_int8)).slice(0,2);
+          ewif_int8 = concat_Uint8Array(ewif_int8,checksum);
+
+          return CryptoUtils.util.encode_base58(ewif_int8);
+        });
+    }
+
+    function generateKeyFileContent(keypair, options) {
+      options = options || {};
+      options.type = options.type || "PubSec";
+
+      switch(options.type) {
+
+        // PubSec
+        case "PubSec" :
+          return $q.resolve(
+            "Type: PubSec\n" +
+            "Version: 1\n" +
+            "pub: " + CryptoUtils.base58.encode(keypair.signPk) + "\n" +
+            "sec: " + CryptoUtils.base58.encode(keypair.signSk) + "\n");
+
+        // WIF - v1
+        case "WIF" :
+          return wif_v1_from_keypair(keypair)
+            .then(function(data) {
+              return "Type: WIF\n" +
+                "Version: 1\n" +
+                "Data: " + data + "\n";
+            });
+
+        // EWIF - v1
+        case "EWIF" :
+
+          if (!options.password) return $q.reject({message: 'Missing EWIF options.password.'});
+
+          // If not set, resolve password using the given callback
+          if (options.password && typeof options.password == "function") {
+            console.debug("[crypto] [EWIF] Executing 'options.password()' to resolve the password...");
+            options.password = options.password();
+            if (!options.password) {
+              return $q.reject({message: "Invalid callback result for 'options.password()': must return a promise or a string."});
+            }
+          }
+
+          // If password is a promise, get the result then read data
+          if (options.password && typeof options.password == "object" && options.password.then) {
+            return options.password.then(function(password) {
+              if (!password) throw 'CANCELLED';
+              // Recursive call, with the string password in options
+              return generateKeyFileContent(keypair, angular.merge({}, options, {password: password}));
+            });
+          }
+
+          // If password is a valid string, read data
+          if (options.password && typeof options.password == "string") {
+            return ewif_v1_from_keypair(keypair, options.password)
+              .then(function(data) {
+                return "Type: EWIF\n" +
+                  "Version: 1\n" +
+                  "Data: " + data + "\n";
+              });
+          }
+
+          return $q.reject({message: 'Invalid EWIF options.password. Waiting a callback function, a promise or a string.'});
+
+        default:
+          return $q.reject({message: "Unknown keyfile format: " + options.type});
+      }
+    }
+
+
+
+    /* -- usefull methods -- */
+
+    function pkChecksum(pubkey) {
+      var signPk_int8 = CryptoUtils.util.decode_base58(pubkey);
+      return CryptoUtils.util.encode_base58(CryptoUtils.util.crypto_hash_sha256(CryptoUtils.util.crypto_hash_sha256(signPk_int8))).substring(0,3);
+    }
+
+    /* -- box (pack/unpack a record) -- */
+
+    function getBoxKeypair(keypair) {
+      if (!keypair) {
+        throw new Error('Missing keypair');
+      }
+      if (keypair.boxPk && keypair.boxSk) {
+        return $q.when(keypair);
+      }
+
+      return $q.all([
+        CryptoUtils.box.keypair.skFromSignSk(keypair.signSk),
+        CryptoUtils.box.keypair.pkFromSignPk(keypair.signPk)
+      ])
+        .then(function(res) {
+          return {
+            boxSk: res[0],
+            boxPk: res[1]
+          };
+        });
+    }
+
+    function packRecordFields(record, keypair, recipientFieldName, cypherFieldNames, nonce) {
+
+      recipientFieldName = recipientFieldName || 'recipient';
+      if (!record[recipientFieldName]) {
+        return $q.reject({message:'ES_WALLET.ERROR.RECIPIENT_IS_MANDATORY'});
+      }
+
+      cypherFieldNames = cypherFieldNames || 'content';
+      if (typeof cypherFieldNames == 'string') {
+        cypherFieldNames = [cypherFieldNames];
+      }
+
+      // Work on a copy, to keep the original record (as it could be use again - fix #382)
+      record = angular.copy(record);
+
+      // Get recipient
+      var recipientPk = CryptoUtils.util.decode_base58(record[recipientFieldName]);
+
+      return $q.all([
+        getBoxKeypair(keypair),
+        CryptoUtils.box.keypair.pkFromSignPk(recipientPk),
+        nonce ? $q.when(nonce) : CryptoUtils.util.random_nonce()
+      ])
+        .then(function(res) {
+          //var senderSk = res[0];
+          var boxKeypair = res[0];
+          var senderSk = boxKeypair.boxSk;
+          var boxRecipientPk = res[1];
+          var nonce = res[2];
+
+          return $q.all(
+            cypherFieldNames.reduce(function(res, fieldName) {
+              if (!record[fieldName]) return res; // skip undefined fields
+              return res.concat(
+                CryptoUtils.box.pack(record[fieldName], nonce, boxRecipientPk, senderSk)
+              );
+            }, []))
+
+            .then(function(cypherTexts){
+              // Replace field values with cypher texts
+              var i = 0;
+              _.forEach(cypherFieldNames, function(cypherFieldName) {
+                if (!record[cypherFieldName]) {
+                  // Force undefined fields to be present in object
+                  // This is better for ES storage, that always works on lazy update mode
+                  record[cypherFieldName] = null;
+                }
+                else {
+                  record[cypherFieldName] = cypherTexts[i++];
+                }
+              });
+
+              // Set nonce
+              record.nonce = CryptoUtils.util.encode_base58(nonce);
+
+              return record;
+            });
+        });
+    }
+
+    function openRecordFields(records, keypair, issuerFieldName, cypherFieldNames) {
+
+      issuerFieldName = issuerFieldName || 'issuer';
+      cypherFieldNames = cypherFieldNames || 'content';
+      if (typeof cypherFieldNames == 'string') {
+        cypherFieldNames = [cypherFieldNames];
+      }
+
+      var now = Date.now();
+      var issuerBoxPks = {}; // a map used as cache
+
+      var jobs = [getBoxKeypair(keypair)];
+      return $q.all(records.reduce(function(jobs, message) {
+        var issuer = message[issuerFieldName];
+        if (!issuer) {throw 'Record has no ' + issuerFieldName;}
+        if (issuerBoxPks[issuer]) return res;
+        return jobs.concat(
+          CryptoUtils.box.keypair.pkFromSignPk(CryptoUtils.util.decode_base58(issuer))
+            .then(function(issuerBoxPk) {
+              issuerBoxPks[issuer] = issuerBoxPk; // fill box pk cache
+            }));
+      }, jobs))
+        .then(function(res){
+          var boxKeypair = res[0];
+          return $q.all(records.reduce(function(jobs, record) {
+            var issuerBoxPk = issuerBoxPks[record[issuerFieldName]];
+            var nonce = CryptoUtils.util.decode_base58(record.nonce);
+            record.valid = true;
+
+            return jobs.concat(
+              cypherFieldNames.reduce(function(res, cypherFieldName) {
+                if (!record[cypherFieldName]) return res;
+                return res.concat(CryptoUtils.box.open(record[cypherFieldName], nonce, issuerBoxPk, boxKeypair.boxSk)
+                  .then(function(text) {
+                    record[cypherFieldName] = text;
+                  })
+                  .catch(function(err){
+                    console.error(err);
+                    console.warn('[ES] [crypto] a record may have invalid cypher ' + cypherFieldName);
+                    record.valid = false;
+                  }));
+              }, []));
+          }, []));
+        })
+        .then(function() {
+          console.debug('[ES] [crypto] All record decrypted in ' + (Date.now() - now) + 'ms');
+          return records;
+        });
+
+    }
+
+    function parseKeyFileData(data, options){
+      options = options || {};
+      options.withSecret = angular.isDefined(options.withSecret) ? options.withSecret : true;
+      options.silent = angular.isDefined(options.withSecret) ? options.silent : false;
+      options.password = function() {
+        return UIUtils.loading.hide(100)
+          .then(function() {
+            return Modals.showPassword({
+              title: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE',
+              subTitle: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP',
+              error: options.error,
+              scope: options.scope
+            });
+          })
+          .then(function(password) {
+            // Timeout is need to force popup to be hide
+            return $timeout(function() {
+              if (password) UIUtils.loading.show();
+              return password;
+            }, 150);
+          });
+      };
+
+      if (!options.silent) {
+        UIUtils.loading.show();
+      }
+
+      return parseWIF_or_EWIF(data, options)
+        .then(function(res){
+          return res;
+        })
+        .catch(function(err) {
+          if (err && err === 'CANCELLED') return;
+          if (err && err.ucode == errorCodes.BAD_PASSWORD) {
+            // recursive call
+            return parseKeyFileData(data, {withSecret: options.withSecret, error: 'ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD'});
+          }
+          console.error("[crypto] Unable to parse as WIF or EWIF format: " + (err && err.message || err));
+          throw err; // rethrow
+        });
+    }
+
+    // exports
+    return {
+      errorCodes: errorCodes,
+      constants: constants,
+      // copy CryptoUtils
+      util: angular.extend({
+          pkChecksum: pkChecksum
+        }, CryptoUtils.util),
+      keyfile: {
+        read: readKeyFile,
+        parseData: parseKeyFileData,
+        generateContent: generateKeyFileContent
+      },
+      box: {
+        getKeypair: getBoxKeypair,
+        pack: packRecordFields,
+        open: openRecordFields
+      }
+    };
+  }])
+;
+
+// var qrcode;
+
+angular.module('cesium.utils.services', [])
+
+// Replace the '$ionicPlatform.ready()', to enable multiple calls
+// See http://stealthcode.co/multiple-calls-to-ionicplatform-ready/
+.factory('ionicReady', ['$ionicPlatform', function($ionicPlatform) {
+  'ngInject';
+
+  var readyPromise;
+
+  return function () {
+    if (!readyPromise) {
+      readyPromise = $ionicPlatform.ready();
+    }
+    return readyPromise;
+  };
+}])
+
+.factory('UIUtils', ['$ionicLoading', '$ionicPopup', '$ionicConfig', '$ionicHistory', '$translate', '$q', 'ionicMaterialInk', 'ionicMaterialMotion', '$window', '$timeout', 'Fullscreen', '$cordovaToast', '$ionicPopover', '$state', '$rootScope', 'screenmatch', function($ionicLoading, $ionicPopup, $ionicConfig, $ionicHistory, $translate, $q,
+                             ionicMaterialInk, ionicMaterialMotion, $window, $timeout, Fullscreen,
+                             // removeIf(no-device)
+                             $cordovaToast,
+                             // endRemoveIf(no-device)
+                             $ionicPopover, $state, $rootScope, screenmatch) {
+  'ngInject';
+
+
+  var
+    loadingTextCache=null,
+    CONST = {
+      MAX_HEIGHT: 480,
+      MAX_WIDTH: 640,
+      THUMB_MAX_HEIGHT: 200,
+      THUMB_MAX_WIDTH: 200
+    },
+    data = {
+      smallscreen: screenmatch.bind('xs, sm', $rootScope)
+    },
+    exports,
+    raw = {}
+    ;
+
+  function alertError(err, subtitle) {
+    if (!err) {
+      return $q.when();
+    }
+
+    return $q(function(resolve) {
+      $translate([err, subtitle, 'ERROR.POPUP_TITLE', 'ERROR.UNKNOWN_ERROR', 'COMMON.BTN_OK'])
+        .then(function (translations) {
+          var message = err.message || translations[err];
+          return $ionicPopup.show({
+            template: '<p>' + (message || translations['ERROR.UNKNOWN_ERROR']) + '</p>',
+            title: translations['ERROR.POPUP_TITLE'],
+            subTitle: translations[subtitle],
+            buttons: [
+              {
+                text: '<b>'+translations['COMMON.BTN_OK']+'</b>',
+                type: 'button-assertive',
+                onTap: function(e) {
+                  resolve(e);
+                }
+              }
+            ]
+          });
+        });
+    });
+  }
+
+  function alertInfo(message, subtitle) {
+    return $q(function(resolve) {
+      $translate([message, subtitle, 'INFO.POPUP_TITLE', 'COMMON.BTN_OK'])
+        .then(function (translations) {
+          $ionicPopup.show({
+            template: '<p>' + translations[message] + '</p>',
+            title: translations['INFO.POPUP_TITLE'],
+            subTitle: translations[subtitle],
+            buttons: [
+              {
+                text: translations['COMMON.BTN_OK'],
+                type: 'button-positive',
+                onTap: function(e) {
+                  resolve(e);
+                }
+              }
+            ]
+          });
+        });
+    });
+  }
+
+  function alertNotImplemented() {
+    return alertInfo('INFO.FEATURES_NOT_IMPLEMENTED');
+  }
+
+  function askConfirm(message, title, options) {
+    title = title || 'CONFIRM.POPUP_TITLE';
+
+    options = options || {};
+    options.cssClass = options.cssClass || 'confirm';
+    options.okText = options.okText || 'COMMON.BTN_OK';
+    options.cancelText = options.cancelText || 'COMMON.BTN_CANCEL';
+
+    return $translate([message, title, options.cancelText, options.okText])
+      .then(function (translations) {
+        return $ionicPopup.confirm({
+          template: translations[message],
+          cssClass: options.cssClass,
+          title: translations[title],
+          cancelText: translations[options.cancelText],
+          cancelType: options.cancelType,
+          okText: translations[options.okText],
+          okType: options.okType
+        });
+      });
+  }
+
+  function hideLoading(timeout){
+    if (timeout) {
+      return $timeout(function(){
+        return $ionicLoading.hide();
+      }, timeout);
+    }
+    else {
+      return $ionicLoading.hide();
+    }
+  }
+
+  function showLoading(options) {
+    if (!loadingTextCache) {
+      return $translate('COMMON.LOADING')
+        .then(function(translation){
+          loadingTextCache = translation;
+          return showLoading(options);
+        });
+    }
+    options = options || {};
+    options.template = options.template||loadingTextCache;
+
+    return $ionicLoading.show(options);
+  }
+
+  function updateLoading(options) {
+    return $ionicLoading._getLoader().then(function(loader) {
+      if (!loader || !loader.isShown) return;
+      // Translate template (if exists)
+      if (options && options.template) {
+        return $translate(options && options.template)
+          .then(function(template) {
+            options.template = template;
+            return loader;
+          });
+      }
+    })
+      .then(function(loader) {
+        if (loader && loader.isShown) return showLoading(options);
+      });
+  }
+
+  function showToast(message, duration, position) {
+    duration = duration || 'short';
+    position = position || 'bottom';
+
+    return $translate([message])
+      .then(function(translations){
+
+        // removeIf(no-device)
+        // Use the Cordova Toast plugin
+        if (!!window.cordova) {
+          $cordovaToast.show(translations[message], duration, position);
+          return;
+        }
+        // endRemoveIf(no-device)
+
+        });
+  }
+
+  function onError(msg, reject/*optional*/) {
+    return function(err) {
+      var fullMsg = msg;
+      var subtitle;
+      if (!!err && !!err.message) {
+        fullMsg = err.message;
+        subtitle = msg;
+      }
+      else if (!msg){
+        fullMsg = err;
+      }
+      // If reject has been given, use it
+      if (!!reject) {
+        reject(fullMsg);
+      }
+      // If just a user cancellation: silent
+      else if (fullMsg == 'CANCELLED') {
+        return hideLoading(10); // timeout, to avoid bug on transfer (when error on reference)
+      }
+
+      // Otherwise, log to console and display error
+      else {
+        hideLoading(10); // timeout, to avoid bug on transfer (when error on reference)
+        return alertError(fullMsg, subtitle);
+      }
+    };
+  }
+
+  function isSmallScreen() {
+    return data.smallscreen.active;
+  }
+
+  function selectElementText(el) {
+    if (el.value || el.type == "text" || el.type == "textarea") {
+      // Source: http://stackoverflow.com/questions/14995884/select-text-on-input-focus
+      if ($window.getSelection && !$window.getSelection().toString()) {
+        el.setSelectionRange(0, el.value.length);
+      }
+    }
+    else {
+      if (el.childNodes && el.childNodes.length > 0) {
+        selectElementText(el.childNodes[0]);
+      }
+      else {
+        // See http://www.javascriptkit.com/javatutors/copytoclipboard.shtml
+        var range = $window.document.createRange(); // create new range object
+        range.selectNodeContents(el); // set range to encompass desired element text
+        var selection = $window.getSelection(); // get Selection object from currently user selected text
+        selection.removeAllRanges(); // unselect any user selected text (if any)
+        selection.addRange(range); // add range to Selection object to select it
+      }
+    }
+  }
+
+  function getSelectionText(){
+    var selectedText = "";
+    if (window.getSelection){ // all modern browsers and IE9+
+      selectedText = $window.getSelection().toString();
+    }
+    return selectedText;
+  }
+
+  function imageOnLoadResize(resolve, reject, thumbnail) {
+    return function(event) {
+      var width = event.target.width,
+        height = event.target.height,
+        maxWidth = (thumbnail ? CONST.THUMB_MAX_WIDTH : CONST.MAX_WIDTH),
+        maxHeight = (thumbnail ? CONST.THUMB_MAX_HEIGHT : CONST.MAX_HEIGHT)
+        ;
+
+      var canvas = document.createElement("canvas");
+      var ctx;
+
+      // Thumbnail: resize and crop (to the expected size)
+      if (thumbnail) {
+
+        // landscape
+        if (width > height) {
+          width *= maxHeight / height;
+          height = maxHeight;
+        }
+
+        // portrait
+        else {
+          height *= maxWidth / width;
+          width = maxWidth;
+        }
+        canvas.width = maxWidth;
+        canvas.height = maxHeight;
+        ctx = canvas.getContext("2d");
+        var xoffset = Math.trunc((maxWidth - width) / 2 + 0.5);
+        var yoffset = Math.trunc((maxHeight - height) / 2 + 0.5);
+        ctx.drawImage(event.target,
+          xoffset, // x1
+          yoffset, // y1
+          maxWidth + -2 * xoffset, // x2
+          maxHeight + -2 * yoffset // y2
+        );
+      }
+
+      // Resize, but keep the full image
+      else {
+
+        // landscape
+        if (width > height) {
+          if (width > maxWidth) {
+            height *= maxWidth / width;
+            width = maxWidth;
+          }
+        }
+
+        // portrait
+        else {
+          if (height > maxHeight) {
+            width *= maxHeight / height;
+            height = maxHeight;
+          }
+        }
+
+        canvas.width = width;
+        canvas.height = height;
+        ctx = canvas.getContext("2d");
+
+        // Resize the whole image
+        ctx.drawImage(event.target, 0, 0,  canvas.width, canvas.height);
+      }
+
+      var dataurl = canvas.toDataURL();
+
+      canvas.remove();
+
+      resolve(dataurl);
+    };
+  }
+
+  function resizeImageFromFile(file, thumbnail) {
+    var img = document.createElement("img");
+    return $q(function(resolve, reject) {
+
+      if (file) {
+        var reader = new FileReader();
+        reader.onload = function(event){
+          img.onload = imageOnLoadResize(resolve, reject, thumbnail);
+          img.src = event.target.result;
+        };
+        reader.readAsDataURL(file);
+      }
+      else {
+        reject('no file to resize');
+      }
+    })
+    .then(function(dataurl) {
+      img.remove();
+      return dataurl;
+    })
+    ;
+  }
+
+  function resizeImageFromSrc(imageSrc, thumbnail) {
+    var img = document.createElement("img");
+    return $q(function(resolve, reject) {
+        img.onload = imageOnLoadResize(resolve, reject, thumbnail);
+        img.src = imageSrc;
+      })
+      .then(function(data){
+        img.remove();
+        return data;
+      });
+  }
+
+  function imageOnLoadRotate(resolve, reject) {
+    var deg = Math.PI / 180;
+    var angle = 90 * deg;
+    return function(event) {
+      var width = event.target.width;
+      var height = event.target.height;
+      var maxWidth = CONST.MAX_WIDTH;
+      var maxHeight = CONST.MAX_HEIGHT;
+
+      if (width > height) {
+        if (width > maxWidth) {
+          height *= maxWidth / width;
+          width = maxWidth;
+        }
+      } else {
+        if (height > maxHeight) {
+          width *= maxHeight / height;
+          height = maxHeight;
+        }
+      }
+
+      var canvas = document.createElement("canvas");
+      canvas.width = height;
+      canvas.height = width;
+
+      var ctx = canvas.getContext("2d");
+      ctx.rotate(angle);
+      ctx.drawImage(event.target, 0, (-1) * canvas.width);
+
+      var dataurl = canvas.toDataURL();
+
+      canvas.remove();
+
+      resolve(dataurl);
+    };
+  }
+
+  function rotateFromSrc(imageSrc, angle) {
+    var img = document.createElement("img");
+    return $q(function(resolve, reject) {
+        img.onload = imageOnLoadRotate(resolve, reject, angle);
+        img.src = imageSrc;
+      })
+      .then(function(data){
+        img.remove();
+        return data;
+      });
+  }
+
+  function showPopover(event, options) {
+
+    var deferred = $q.defer();
+
+    options = options || {};
+    options.templateUrl = options.templateUrl ? options.templateUrl : 'templates/common/popover_copy.html';
+    options.scope = options.scope || $rootScope;
+    options.scope.popovers = options.scope.popovers || {};
+    options.autoselect = options.autoselect || false;
+    options.autoremove = angular.isDefined(options.autoremove) ? options.autoremove : true;
+    options.backdropClickToClose = angular.isDefined(options.backdropClickToClose) ? options.backdropClickToClose : true;
+    options.focusFirstInput = angular.isDefined(options.focusFirstInput) ? options.focusFirstInput : false;
+
+    var _show = function(popover) {
+      popover = popover || options.scope.popovers[options.templateUrl];
+      popover.isResolved=false;
+      popover.deferred=deferred;
+      popover.options=options;
+      // Fill the popover scope
+      if (options.bindings) {
+        angular.merge(popover.scope, options.bindings);
+      }
+      $timeout(function() { // This is need for Firefox
+        popover.show(event)
+          .then(function() {
+            var element;
+            // Auto select text
+            if (options.autoselect) {
+              element = document.querySelectorAll(options.autoselect)[0];
+              if (element) {
+                if ($window.getSelection && !$window.getSelection().toString()) {
+                  element.setSelectionRange(0, element.value.length);
+                  element.focus();
+                }
+                else {
+                  element.focus();
+                }
+              }
+            }
+            else {
+              // Auto focus on a element
+              if (options.autofocus) {
+                element = document.querySelectorAll(options.autofocus)[0];
+                if (element) element.focus();
+              }
+            }
+
+            popover.scope.$parent.$emit('popover.shown');
+
+            // Callback 'afterShow'
+            if (options.afterShow) options.afterShow(popover);
+          });
+      });
+    };
+
+    var _cleanup = function(popover) {
+      popover = popover || options.scope.popovers[options.templateUrl];
+      if (popover) {
+        delete options.scope.popovers[options.templateUrl];
+        // Remove the popover
+        popover.remove()
+        // Workaround for issue #244
+        // See also https://github.com/driftyco/ionic-v1/issues/71
+        // and https://github.com/driftyco/ionic/issues/9069
+          .then(function() {
+            var bodyEl = angular.element($window.document.querySelectorAll('body')[0]);
+            bodyEl.removeClass('popover-open');
+          });
+      }
+    };
+
+    var popover = options.scope.popovers[options.templateUrl];
+    if (!popover) {
+
+      $ionicPopover.fromTemplateUrl(options.templateUrl, {
+        scope: options.scope,
+        backdropClickToClose: options.backdropClickToClose
+      })
+        .then(function (popover) {
+          popover.isResolved = false;
+
+          popover.scope.closePopover = function(result) {
+            var autoremove = popover.options && popover.options.autoremove;
+            if (popover.options) delete popover.options.autoremove; // remove to avoid to trigger 'popover.hidden'
+            popover.hide()
+              .then(function() {
+                if (autoremove) {
+                  return _cleanup(popover);
+                }
+              })
+              .then(function() {
+                if (popover.deferred) {
+                  popover.deferred.resolve(result);
+                }
+                delete popover.deferred;
+                delete popover.options;
+              });
+          };
+
+          // Execute action on hidden popover
+          popover.scope.$on('popover.hidden', function() {
+            if (popover.options && popover.options.afterHidden) {
+              popover.options.afterHidden();
+            }
+            if (popover.options && popover.options.autoremove) {
+              _cleanup(popover);
+            }
+          });
+
+          // Cleanup the popover when hidden
+          options.scope.$on('$remove', function() {
+            if (popover.deferred) {
+              popover.deferred.resolve();
+            }
+            _cleanup();
+          });
+
+          options.scope.popovers[options.templateUrl] = popover;
+          _show(popover);
+        });
+    }
+    else {
+      _show(popover);
+    }
+
+    return deferred.promise;
+  }
+
+  function showCopyPopover(event, value) {
+    var rows = value && value.indexOf('\n') >= 0 ? value.split('\n').length : 1;
+    return showPopover(event, {
+      templateUrl: 'templates/common/popover_copy.html',
+      bindings: {
+        value: value,
+        rows: rows
+      },
+      autoselect: '.popover-copy ' + (rows <= 1 ? 'input' : 'textarea')
+    });
+  }
+
+  function showSharePopover(event, options) {
+    options = options || {};
+    options.templateUrl = options.templateUrl ? options.templateUrl : 'templates/common/popover_share.html';
+    options.autoselect = options.autoselect || '.popover-share input';
+    options.bindings = options.bindings || {};
+    options.bindings.value = options.bindings.value || options.bindings.url ||
+      $state.href($state.current, $state.params, {absolute: true});
+    options.bindings.postUrl = options.bindings.postUrl || options.bindings.value;
+    options.bindings.postMessage = options.bindings.postMessage || '';
+    options.bindings.titleKey = options.bindings.titleKey || 'COMMON.POPOVER_SHARE.TITLE';
+    return showPopover(event, options);
+  }
+
+  function showHelptip(id, options) {
+    var element = (typeof id == 'string') && id ? $window.document.getElementById(id) : id;
+    if (!id && !element && options.selector) {
+      element = $window.document.querySelector(options.selector);
+    }
+
+    options = options || {};
+    var deferred = options.deferred || $q.defer();
+
+    if(element && !options.timeout) {
+      if (options.preAction) {
+        element[options.preAction]();
+      }
+      options.templateUrl = options.templateUrl ? options.templateUrl : 'templates/common/popover_helptip.html';
+      options.autofocus = options.autofocus || '#helptip-btn-ok';
+      options.bindings = options.bindings || {};
+      options.bindings.icon = options.bindings.icon || {};
+      options.bindings.icon.position = options.bindings.icon.position || false;
+      options.bindings.icon.glyph = options.bindings.icon.glyph ||
+        (options.bindings.icon.position && options.bindings.icon.position.startsWith('bottom-') ? 'ion-arrow-down-c' :'ion-arrow-up-c');
+      options.bindings.icon.class = options.bindings.icon.class || 'calm icon ' + options.bindings.icon.glyph;
+      options.bindings.tour = angular.isDefined(options.bindings.tour) ? options.bindings.tour : false;
+      showPopover(element, options)
+        .then(function(result){
+          if (options.postAction) {
+            element[options.postAction]();
+          }
+          deferred.resolve(result);
+        })
+        .catch(function(err){
+          if (options.postAction) {
+            element[options.postAction]();
+          }
+          deferred.reject(err);
+        });
+    }
+    else {
+
+      // Do timeout if ask
+      if (options.timeout) {
+        var timeout = options.timeout;
+        options.retryTimeout = options.retryTimeout || timeout;
+        delete options.timeout;
+        options.deferred = deferred;
+        $timeout(function () {
+          showHelptip(id, options);
+        }, timeout);
+      }
+
+      // No element: reject
+      else if (angular.isDefined(options.retry) && !options.retry) {
+
+        if (options.onError === 'continue') {
+          $timeout(function () {
+            deferred.resolve(true);
+          });
+        }
+        else {
+          $timeout(function () {
+            deferred.reject("[helptip] element now found: " + id);
+          });
+        }
+      }
+
+      // Retry until element appears
+      else {
+        options.retry = angular.isUndefined(options.retry) ? 2 : (options.retry-1);
+        options.deferred = deferred;
+        $timeout(function() {
+          showHelptip(id, options);
+        }, options.timeout || options.retryTimeout || 100);
+      }
+    }
+
+    return deferred.promise;
+  }
+
+  function showFab(id, timeout) {
+    if (!timeout) {
+      timeout = 900;
+    }
+    $timeout(function () {
+      // Could not use 'getElementById', because it return only once element,
+      // but many fabs can have the same id (many view could be loaded at the same time)
+      var fabs = document.getElementsByClassName('button-fab');
+      _.forEach(fabs, function(fab){
+        if (fab.id == id) {
+          fab.classList.toggle('on', true);
+        }
+      });
+    }, timeout);
+  }
+
+  function hideFab(id, timeout) {
+    if (!timeout) {
+      timeout = 10;
+    }
+    $timeout(function () {
+      // Could not use 'getElementById', because it return only once element,
+      // but many fabs can have the same id (many view could be loaded at the same time)
+      var fabs = document.getElementsByClassName('button-fab');
+      _.forEach(fabs, function(fab){
+        if (fab.id == id) {
+          fab.classList.toggle('on', false);
+        }
+      });
+    }, timeout);
+  }
+
+  function motionDelegate(delegate, ionListClass) {
+    var motionTimeout = isSmallScreen() ? 100 : 10;
+    var defaultSelector = '.list.{0} .item, .list .{0} .item'.format(ionListClass, ionListClass);
+    return {
+      ionListClass: ionListClass,
+      show: function(options) {
+        options = options || {};
+        options.selector = options.selector || defaultSelector;
+        options.ink = angular.isDefined(options.ink) ? options.ink : true;
+        options.startVelocity = options.startVelocity || (isSmallScreen() ? 1100 : 3000);
+        return $timeout(function(){
+
+          // Display ink effect (no selector need)
+          if (options.ink) exports.ink();
+
+          // Display the delegated motion effect
+          delegate(options);
+        }, options.timeout || motionTimeout);
+      }
+    };
+  }
+
+  function setEffects(enable) {
+    if (exports.motion.enable === enable) return; // same
+    console.debug('[UI] [effects] ' + (enable ? 'Enable' : 'Disable'));
+
+    exports.motion.enable = enable;
+    if (enable) {
+      $ionicConfig.views.transition('platform');
+      angular.merge(exports.motion, raw.motion);
+    }
+    else {
+      $ionicConfig.views.transition('none');
+      var nothing = {
+        class: undefined,
+        show: function(){}
+      };
+      angular.merge(exports.motion, {
+        enable : false,
+        default: nothing,
+        fadeSlideIn: nothing,
+        fadeSlideInRight: nothing,
+        panInLeft: nothing,
+        pushDown: nothing,
+        ripple: nothing,
+        slideUp: nothing,
+        fadeIn: nothing,
+        toggleOn: toggleOn,
+        toggleOff: toggleOff
+      });
+      $rootScope.motion = nothing;
+    }
+    $ionicHistory.clearCache();
+  }
+
+  raw.motion = {
+    enable: true,
+    default: motionDelegate(ionicMaterialMotion.ripple, 'animate-ripple'),
+    blinds: motionDelegate(ionicMaterialMotion.blinds, 'animate-blinds'),
+    fadeSlideIn: motionDelegate(ionicMaterialMotion.fadeSlideIn, 'animate-fade-slide-in'),
+    fadeSlideInRight: motionDelegate(ionicMaterialMotion.fadeSlideInRight, 'animate-fade-slide-in-right'),
+    panInLeft: motionDelegate(ionicMaterialMotion.panInLeft, 'animate-pan-in-left'),
+    pushDown: motionDelegate(ionicMaterialMotion.pushDown, 'push-down'),
+    ripple: motionDelegate(ionicMaterialMotion.ripple, 'animate-ripple'),
+    slideUp: motionDelegate(ionicMaterialMotion.slideUp, 'slide-up'),
+    fadeIn: motionDelegate(function(options) {
+      toggleOn(options);
+    }, 'fade-in'),
+    toggleOn: toggleOn,
+    toggleOff: toggleOff
+  };
+
+  function createQRCodeObj(text, typeNumber,
+                        errorCorrectionLevel, mode, mb) {
+
+    mb = mb || 'default'; // default | SJIS | UTF-8
+    qrcode.stringToBytes = qrcode.stringToBytesFuncs[mb];
+
+    var qr = qrcode(typeNumber || 4, errorCorrectionLevel || 'M');
+    qr.addData(text, mode);
+    qr.make();
+
+    return qr;
+  }
+
+  /**
+   * Create a QRCode as an <svg> tag
+   * @param text
+   * @param typeNumber
+   * @param errorCorrectionLevel
+   * @param mode
+   * @param mb multibyte ? value: 'default' | 'SJIS' | 'UTF-8'
+   * @returns {string}
+   */
+  function getSvgQRCode(text, typeNumber,
+                        errorCorrectionLevel, mode, mb) {
+
+    var qr = createQRCodeObj(text, typeNumber, errorCorrectionLevel, mode, mb);
+    return qr.createSvgTag();
+  }
+
+  /**
+   * Create a QRCode as an <img> tag
+   * @param text
+   * @param typeNumber
+   * @param errorCorrectionLevel
+   * @param mode
+   * @param mb multibyte ? value: 'default' | 'SJIS' | 'UTF-8'
+   * @returns {string}
+   */
+  function getImgQRCode(text, typeNumber,
+                           errorCorrectionLevel, mode, mb) {
+
+    var qr = createQRCodeObj(text, typeNumber, errorCorrectionLevel, mode, mb);
+    return qr.createImgTag();
+  }
+
+  function toggleOn(options, timeout) {
+    // We have a single option, so it may be passed as a string or property
+    if (typeof options === 'string') {
+      options = {
+        selector: options
+      };
+    }
+
+    // Fail early & silently log
+    var isInvalidSelector = typeof options.selector === 'undefined' || options.selector === '';
+
+    if (isInvalidSelector) {
+      console.error('invalid toggleOn selector');
+      return false;
+    }
+
+    $timeout(function () {
+      var elements = document.querySelectorAll(options.selector);
+      if (elements) _.forEach(elements, function(element){
+        element.classList.toggle('on', true);
+      });
+    }, timeout || 100);
+  }
+
+  function toggleOff(options, timeout) {
+    // We have a single option, so it may be passed as a string or property
+    if (typeof options === 'string') {
+      options = {
+        selector: options
+      };
+    }
+
+    // Fail early & silently log
+    var isInvalidSelector = typeof options.selector === 'undefined' || options.selector === '';
+
+    if (isInvalidSelector) {
+      console.error('invalid toggleOff selector');
+      return false;
+    }
+
+    $timeout(function () {
+      var elements = document.querySelectorAll(options.selector);
+      if (elements) _.forEach(elements, function(element){
+        element.classList.toggle('on', false);
+      });
+    }, timeout || 900);
+  }
+
+  exports = {
+    alert: {
+      error: alertError,
+      info: alertInfo,
+      confirm: askConfirm,
+      notImplemented: alertNotImplemented
+    },
+    loading: {
+      show: showLoading,
+      hide: hideLoading,
+      update: updateLoading
+    },
+    toast: {
+      show: showToast
+    },
+    onError: onError,
+    screen: {
+      isSmall: isSmallScreen,
+      fullscreen: Fullscreen
+    },
+    ink: ionicMaterialInk.displayEffect,
+    motion: raw.motion,
+    setEffects: setEffects,
+    qrcode: {
+      svg: getSvgQRCode,
+      img: getImgQRCode
+    },
+    fab: {
+      show: showFab,
+      hide: hideFab
+    },
+    popover: {
+      show: showPopover,
+      copy: showCopyPopover,
+      share: showSharePopover,
+      helptip: showHelptip
+    },
+    selection: {
+      select: selectElementText,
+      get: getSelectionText
+    },
+    image: {
+      resizeFile: resizeImageFromFile,
+      resizeSrc: resizeImageFromSrc,
+      rotateSrc: rotateFromSrc
+    },
+    raw: raw
+  };
+
+  return exports;
+}])
+
+
+// See http://plnkr.co/edit/vJQXtsZiX4EJ6Uvw9xtG?p=preview
+.factory('$focus', ['$timeout', '$window', function($timeout, $window) {
+  'ngInject';
+
+  return function(id) {
+    // timeout makes sure that it is invoked after any other event has been triggered.
+    // e.g. click events that need to run before the focus or
+    // inputs elements that are in a disabled state but are enabled when those events
+    // are triggered.
+    $timeout(function() {
+      var element = $window.document.getElementById(id);
+      if(element)
+        element.focus();
+    });
+  };
+}])
+
+;
+
+angular.module('cesium.cache.services', ['angular-cache'])
+
+.factory('csCache', ['$rootScope', '$http', '$window', 'csSettings', 'CacheFactory', function($rootScope, $http, $window, csSettings, CacheFactory) {
+  'ngInject';
+
+  var
+    constants = {
+      VERY_LONG: 54000000, /*15 days*/
+      LONG: 1 * 60  * 60 * 1000 /*1 hour*/,
+      MEDIUM: 5  * 60 * 1000 /*5 min*/,
+      SHORT: csSettings.defaultSettings.cacheTimeMs // around 1min
+    },
+    storageMode = getSettingsStorageMode(),
+    cacheNames = []
+  ;
+
+  function getSettingsStorageMode(settings) {
+    settings = settings || csSettings.data;
+    return settings && settings.useLocalStorage && settings.persistCache && $window.localStorage ? 'localStorage' : 'memory';
+  }
+
+  function getCacheOptions(options) {
+    options = options || {};
+    options.storageMode = getSettingsStorageMode();
+    options.deleteOnExpire = (options.storageMode === 'localStorage' || options.onExpire) ? 'aggressive' : 'passive';
+    options.cacheFlushInterval = options.deleteOnExpire === 'passive' ?
+      (60 * 60 * 1000) : // If passive mode, remove all items every hour
+      null;
+    return options;
+  }
+
+  function getOrCreateCache(prefix, maxAge, onExpire){
+    prefix = prefix || '';
+    maxAge = maxAge || constants.SHORT;
+    var cacheName = prefix + ((maxAge / 1000) + 's');
+
+    // If onExpire fn, generate a new cache key
+    var cache;
+    if (onExpire && typeof onExpire == 'function') {
+      var counter = 1;
+      while (CacheFactory.get(cacheName + counter)) {
+        counter++;
+      }
+      cacheName = cacheName + counter;
+    }
+    else {
+      cache = CacheFactory.get(cacheName);
+    }
+
+    // Add to cache names map
+    if (!cacheNames[cacheName]) cacheNames[cacheName] = true;
+
+    // Already exists: use it
+    if (cache) return cache;
+
+    // Not exists yet: create a new cache
+    var options = getCacheOptions({
+      maxAge: maxAge,
+      onExpire: onExpire || null
+    });
+    console.debug("[cache] Creating cache {{0}} with {storageMode: {1}}...".format(cacheName, options.storageMode));
+    return CacheFactory.createCache(cacheName, options);
+  }
+
+  function clearAllCaches() {
+    console.debug("[cache] Cleaning all caches...");
+    _.forEach(_.keys(cacheNames), function(cacheName) {
+      var cache = CacheFactory.get(cacheName);
+      if (cache) {
+        cache.removeAll();
+      }
+    });
+  }
+
+  function clearFromPrefix(cachePrefix) {
+    _.forEach(_.keys(cacheNames), function(cacheName) {
+      if (cacheName.startsWith(cachePrefix)) {
+        var cache = CacheFactory.get(cacheName);
+        if (cache) {
+          cache.removeAll();
+        }
+      }
+    });
+  }
+
+  function onSettingsChanged(settings) {
+    var newStorageMode = getSettingsStorageMode(settings)
+    var hasChanged = (newStorageMode !== storageMode);
+    if (hasChanged) {
+      storageMode = newStorageMode;
+      console.debug("[cache] Updating caches with {storageMode: {0}}".format(storageMode));
+      _.forEach(_.keys(cacheNames), function(cacheName) {
+        var cache = CacheFactory.get(cacheName);
+        if (cache) {
+          cache.setOptions(getCacheOptions(), true);
+        }
+      });
+    }
+  }
+
+  function addListeners() {
+    listeners = [
+      // Listen if node changed
+      csSettings.api.data.on.changed($rootScope, onSettingsChanged, this)
+    ];
+  }
+
+  addListeners();
+
+  return {
+    get: getOrCreateCache,
+    clear: clearFromPrefix,
+    clearAll: clearAllCaches,
+    constants: constants
+  };
+}])
+;
+
+angular.module('cesium.modal.services', ['cesium.utils.services'])
+
+// Useful for modal with no controller
+.controller('EmptyModalCtrl', function () {
+  'ngInject';
+
+})
+
+.controller('AboutModalCtrl', ['$scope', 'UIUtils', 'csHttp', function ($scope, UIUtils, csHttp) {
+  'ngInject';
+
+  $scope.openLink = function(event, uri, options) {
+    options = options || {};
+
+    // If unable to open, just copy value
+    options.onError = function() {
+      return UIUtils.popover.copy(event, uri);
+    };
+
+    return csHttp.uri.open(uri, options);
+  };
+}])
+
+.factory('ModalUtils', ['$ionicModal', '$rootScope', '$q', '$injector', '$controller', '$timeout', 'Device', function($ionicModal, $rootScope, $q, $injector, $controller, $timeout, Device) {
+  'ngInject';
+
+
+  function _evalController(ctrlName) {
+    var result = {
+        isControllerAs: false,
+        controllerName: '',
+        propName: ''
+    };
+    var fragments = (ctrlName || '').trim().split(/\s+/);
+    result.isControllerAs = fragments.length === 3 && (fragments[1] || '').toLowerCase() === 'as';
+    if (result.isControllerAs) {
+        result.controllerName = fragments[0];
+        result.propName = fragments[2];
+    } else {
+        result.controllerName = ctrlName;
+    }
+
+    return result;
+  }
+
+  function DefaultModalController($scope, deferred, parameters) {
+
+    $scope.deferred = deferred || $q.defer();
+    $scope.resolved = false;
+
+    $scope.openModal = function () {
+      return $scope.modal.show();
+    };
+
+    $scope.hideModal = function () {
+      return $scope.modal.hide();
+    };
+
+    $scope.closeModal = function (result) {
+      $scope.resolved = true;
+
+      // removeIf(no-device)
+      if (Device.enable) Device.keyboard.close();
+      // endRemoveIf(no-device)
+
+      return $scope.modal.remove()
+        .then(function() {
+          // Workaround modal-open not removed
+          document.body.classList.remove('modal-open');
+          $scope.deferred.resolve(result);
+          return result;
+        });
+    };
+
+
+    // Useful method for modal with forms
+    $scope.setForm = function (form, propName) {
+      if (propName) {
+        $scope[propName] = form;
+      }
+      else {
+        $scope.form = form;
+      }
+    };
+
+    // Useful method for modal to get input parameters
+    $scope.getParameters = function () {
+      return parameters;
+    };
+
+    $scope.$on('modal.hidden', function () {
+      // If not resolved yet: send result
+      // (after animation out)
+      if (!$scope.resolved) {
+        $scope.resolved = true;
+
+        $timeout(function() {
+          $scope.deferred.resolve();
+          return $scope.modal.remove().then(function() {
+            // Workaround modal-open not removed
+            document.body.classList.remove('modal-open');
+          });
+        }, ($scope.modal.hideDelay || 320) + 20);
+      }
+    });
+  }
+
+  function show(templateUrl, controller, parameters, options) {
+    var deferred = $q.defer();
+
+    options = options ? options : {} ;
+    options.animation = options.animation || 'slide-in-up';
+
+    var focusFirstInput = false;
+    options.focusFirstInput = focusFirstInput;
+
+    // If modal has a controller
+    if (controller) {
+      // If a controller defined, always use a new scope
+      options.scope = options.scope ? options.scope.$new() : $rootScope.$new();
+      DefaultModalController.call({}, options.scope, deferred, parameters);
+
+      // Invoke the controller on this new scope
+      var locals = { '$scope': options.scope, 'parameters': parameters };
+      var ctrlEval = _evalController(controller);
+      var ctrlInstance = $controller(controller, locals);
+      if (ctrlEval.isControllerAs) {
+        ctrlInstance.openModal = options.scope.openModal;
+        ctrlInstance.closeModal = options.scope.closeModal;
+      }
+    }
+
+    $ionicModal.fromTemplateUrl(templateUrl, options)
+      .then(function (modal) {
+          if (controller) {
+            // Set modal into the controller's scope
+            modal.scope.$parent.modal = modal;
+          }
+          else {
+            var scope = modal.scope;
+            // Define default scope functions
+            DefaultModalController.call({}, scope, deferred, parameters);
+            // Set modal
+            scope.modal = modal;
+          }
+
+          // Show the modal
+          return modal.show();
+        },
+        function (err) {
+          deferred.reject(err);
+        });
+
+    return deferred.promise;
+  }
+
+  return {
+    show: show
+  };
+}])
+
+.factory('Modals', ['$rootScope', '$translate', '$ionicPopup', '$timeout', 'ModalUtils', 'UIUtils', function($rootScope, $translate, $ionicPopup, $timeout, ModalUtils, UIUtils) {
+  'ngInject';
+
+  function showTransfer(parameters) {
+    var useDigitKeyboard = UIUtils.screen.isSmall();
+    return ModalUtils.show('templates/wallet/modal_transfer.html','TransferModalCtrl',
+      parameters, {
+        focusFirstInput: !useDigitKeyboard
+      });
+  }
+
+  function showLogin(parameters) {
+    return ModalUtils.show('templates/login/modal_login.html','LoginModalCtrl',
+      parameters, {focusFirstInput: true, backdropClickToClose: false});
+  }
+
+  function showWotLookup(parameters) {
+    return ModalUtils.show('templates/wot/modal_lookup.html','WotLookupModalCtrl',
+      parameters || {}, {focusFirstInput: true});
+  }
+
+  function showNetworkLookup(parameters) {
+    return ModalUtils.show('templates/network/modal_network.html', 'NetworkLookupModalCtrl',
+      parameters, {focusFirstInput: true});
+  }
+
+  function showAbout(parameters) {
+    return ModalUtils.show('templates/modal_about.html','AboutModalCtrl',
+      parameters);
+  }
+
+  function showAccountSecurity(parameters) {
+    return ModalUtils.show('templates/wallet/modal_security.html', 'WalletSecurityModalCtrl',
+      parameters);
+  }
+
+  function showJoin(parameters) {
+    return ModalUtils.show('templates/join/modal_choose_account_type.html','JoinChooseAccountTypeModalCtrl',
+      parameters)
+      .then(function(res){
+        if (!res) return;
+        return (res.accountType == 'member') ?
+          showJoinMember(res) :
+          showJoinWallet(res);
+      });
+  }
+
+  function showJoinMember(parameters) {
+    return ModalUtils.show('templates/join/modal_join_member.html','JoinModalCtrl',
+      parameters);
+  }
+
+  function showJoinWallet(parameters) {
+    return ModalUtils.show('templates/join/modal_join_wallet.html','JoinModalCtrl',
+      parameters);
+  }
+
+  function showHelp(parameters) {
+    return ModalUtils.show('templates/help/modal_help.html','HelpModalCtrl',
+      parameters);
+  }
+
+  function showLicense(parameters) {
+    return ModalUtils.show('templates/currency/modal_license.html','CurrencyLicenseModalCtrl',
+      parameters);
+  }
+
+  function showSelectPubkeyIdentity(parameters) {
+    return ModalUtils.show('templates/wot/modal_select_pubkey_identity.html', 'WotSelectPubkeyIdentityModalCtrl',
+      parameters);
+  }
+
+  function showSelectWallet(parameters) {
+    return ModalUtils.show('templates/wallet/list/modal_wallets.html','WalletSelectModalCtrl',
+      parameters);
+  }
+
+  function showPassword(options) {
+    options = options || {};
+    options.title = options.title || 'COMMON.SET_PASSWORD_TITLE';
+    options.subTitle = options.subTitle || 'COMMON.SET_PASSWORD_SUBTITLE';
+    var scope = options.scope ? options.scope.$new() : $rootScope.$new();
+    scope.formData = {password: undefined};
+    scope.setForm = function(form) {
+      scope.form=form;
+    };
+    scope.submit = function(e) {
+      scope.form.$submitted=true;
+      if (e && e.preventDefault) e.preventDefault();
+      if(scope.form.$valid && scope.formData.password) {
+        options.popup.close(scope.formData.password);
+      }
+    };
+
+    scope.error = options.error || undefined;
+
+    // Choose password popup
+    return $translate([options.title, options.subTitle, 'COMMON.BTN_OK', 'COMMON.BTN_CANCEL'])
+      .then(function (translations) {
+        options.popup = $ionicPopup.show({
+          templateUrl: 'templates/common/popup_password.html',
+          title: translations[options.title],
+          subTitle: translations[options.subTitle],
+          scope: scope,
+          buttons: [
+            { text: translations['COMMON.BTN_CANCEL'] },
+            { text: translations['COMMON.BTN_OK'],
+              type: 'button-positive',
+              onTap: scope.submit
+            }
+          ]
+        });
+        return options.popup;
+      });
+
+  }
+
+  return {
+    showTransfer: showTransfer,
+    showLogin: showLogin,
+    showWotLookup: showWotLookup,
+    showNetworkLookup: showNetworkLookup,
+    showAbout: showAbout,
+    showJoin: showJoin,
+    showJoinMember: showJoinMember,
+    showJoinWallet: showJoinWallet,
+    showHelp: showHelp,
+    showAccountSecurity: showAccountSecurity,
+    showLicense: showLicense,
+    showSelectPubkeyIdentity: showSelectPubkeyIdentity,
+    showSelectWallet: showSelectWallet,
+    showPassword: showPassword
+  };
+
+}])
+
+.factory('csPopovers', ['$rootScope', '$translate', '$ionicPopup', '$timeout', 'UIUtils', '$controller', function($rootScope, $translate, $ionicPopup, $timeout, UIUtils, $controller) {
+    'ngInject';
+
+    function showSelectWallet(event, options) {
+      options = options || {};
+
+      var parameters = options.parameters || {};
+      delete options.parameters;
+
+      var scope = options.scope && options.scope.$new() || $rootScope.$new(true);
+      options.scope = scope;
+      options.templateUrl = 'templates/wallet/list/popover_wallets.html';
+      options.autoremove = true;
+
+      // Initialize the popover controller, with parameters
+      angular.extend(this, $controller('WalletSelectPopoverCtrl', {$scope: options.scope, parameters: parameters}));
+
+      var afterShowSaved = options.afterShow;
+      options.afterShow = function(popover) {
+
+        // Add a missing method, to close the popover
+        scope.closePopover = function(res) {
+          popover.scope.closePopover(res);
+        };
+
+        // Execute default afterShow fn, if any
+        if (afterShowSaved) afterShowSaved(popover);
+      };
+      // Show the popover
+      return UIUtils.popover.show(event, options)
+        .then(function(res) {
+          // Then destroy the scope
+          scope.$destroy();
+          return res;
+        });
+    }
+
+    return {
+      showSelectWallet: showSelectWallet
+    };
+
+  }]);
+
+angular.module('cesium.http.services', ['cesium.cache.services'])
+
+.factory('csHttp', ['$http', '$q', '$timeout', '$window', 'csSettings', 'csCache', 'Device', function($http, $q, $timeout, $window, csSettings, csCache, Device) {
+  'ngInject';
+
+  var timeout = csSettings.data.timeout;
+
+  var
+    sockets = [],
+    defaultCachePrefix = 'csHttp-',
+    allCachePrefixes = {};
+  ;
+
+  if (!timeout) {
+    timeout=4000; // default
+  }
+
+  function getServer(host, port) {
+    // Remove port if 80 or 443
+    return  !host ? null : (host + (port && port != 80 && port != 443 ? ':' + port : ''));
+  }
+
+  function getUrl(host, port, path, useSsl) {
+    var protocol = (port == 443 || useSsl) ? 'https' : 'http';
+    return  protocol + '://' + getServer(host, port) + (path ? path : '');
+  }
+
+  function getWsUrl(host, port, path, useSsl) {
+    var protocol = (port == 443 || useSsl) ? 'wss' : 'ws';
+    return  protocol + '://' + getServer(host, port) + (path ? path : '');
+  }
+
+  function processError(reject, data, url, status) {
+    if (data && data.message) {
+      reject(data);
+    }
+    else {
+      if (status == 403) {
+        reject({ucode: 403, message: 'Resource is forbidden' + (url ? ' ('+url+')' : '')});
+      }
+      else if (status == 404) {
+        reject({ucode: 404, message: 'Resource not found' + (url ? ' ('+url+')' : '')});
+      }
+      else if (url) {
+        console.error('[http] Get HTTP error {status: ' + status + '} on [' + url + ']');
+        reject('Error while requesting [' + url + ']');
+      }
+      else {
+        reject('Unknown error from node');
+      }
+    }
+  }
+
+  function prepare(url, params, config, callback) {
+    var pkeys = [], queryParams = {}, newUri = url;
+    if (typeof params === 'object') {
+      pkeys = _.keys(params);
+    }
+
+    _.forEach(pkeys, function(pkey){
+      var prevURI = newUri;
+      newUri = newUri.replace(':' + pkey, params[pkey]);
+      if (prevURI === newUri) {
+        queryParams[pkey] = params[pkey];
+      }
+    });
+    config.params = queryParams;
+    return callback(newUri, config);
+  }
+
+  function getResource(host, port, path, useSsl, forcedTimeout) {
+    // Make sure host is defined - fix #537
+    if (!host) {
+      return $q.reject('[http] invalid URL from host: ' + host);
+    }
+    var url = getUrl(host, port, path, useSsl);
+    return function(params) {
+      return $q(function(resolve, reject) {
+        var config = {
+          timeout: forcedTimeout || timeout,
+          responseType: 'json'
+        };
+
+        prepare(url, params, config, function(url, config) {
+            $http.get(url, config)
+            .success(function(data, status, headers, config) {
+              resolve(data);
+            })
+            .error(function(data, status, headers, config) {
+              processError(reject, data, url, status);
+            });
+        });
+      });
+    };
+  }
+
+  function getResourceWithCache(host, port, path, useSsl, maxAge, autoRefresh, forcedTimeout, cachePrefix) {
+    var url = getUrl(host, port, path, useSsl);
+    cachePrefix = cachePrefix || defaultCachePrefix;
+    maxAge = maxAge || csCache.constants.LONG;
+    allCachePrefixes[cachePrefix] = true;
+
+    //console.debug('[http] will cache ['+url+'] ' + maxAge + 'ms' + (autoRefresh ? ' with auto-refresh' : ''));
+
+    return function(params) {
+      return $q(function(resolve, reject) {
+        var config = {
+          timeout: forcedTimeout || timeout,
+          responseType: 'json'
+        };
+        if (autoRefresh) { // redo the request if need
+          config.cache = csCache.get(cachePrefix, maxAge, function (key, value, done) {
+              console.debug('[http] Refreshing cache for {{0}} '.format(key));
+              $http.get(key, config)
+                .success(function (data) {
+                  config.cache.put(key, data);
+                  if (done) done(key, data);
+              });
+            });
+        }
+        else {
+          config.cache = csCache.get(cachePrefix, maxAge);
+        }
+
+        prepare(url, params, config, function(url, config) {
+          $http.get(url, config)
+            .success(function(data) {
+              resolve(data);
+            })
+            .error(function(data, status) {
+              processError(reject, data, url, status);
+            });
+        });
+      });
+    };
+  }
+
+  function postResource(host, port, path, useSsl, forcedTimeout) {
+    var url = getUrl(host, port, path, useSsl);
+    return function(data, params) {
+      return $q(function(resolve, reject) {
+        var config = {
+          timeout: forcedTimeout || timeout,
+          headers : {'Content-Type' : 'application/json;charset=UTF-8'}
+        };
+
+        prepare(url, params, config, function(url, config) {
+            $http.post(url, data, config)
+            .success(function(data) {
+              resolve(data);
+            })
+            .error(function(data, status) {
+              processError(reject, data, url, status);
+            });
+        });
+      });
+    };
+  }
+
+  function ws(host, port, path, useSsl, timeout) {
+    if (!path) {
+      console.error('calling csHttp.ws without path argument');
+      throw 'calling csHttp.ws without path argument';
+    }
+    var uri = getWsUrl(host, port, path, useSsl);
+    timeout = timeout || csSettings.data.timeout;
+
+    function _waitOpen(self) {
+      if (!self.delegate) {
+        throw new Error('Websocket {0} was closed!'.format(uri));
+      }
+      if (self.delegate.readyState == 1) {
+        return $q.when(self.delegate);
+      }
+      if (self.delegate.readyState == 3) {
+        return $q.reject('Unable to connect to websocket ['+self.delegate.url+']');
+      }
+
+      if (self.waitDuration >= timeout) {
+        self.waitRetryDelay = self.waitRetryDelay && Math.min(self.waitRetryDelay + 2000, 30000) || 2000; // add 2 seconds, until 30s)
+        console.debug("[http] Will retry websocket [{0}] in {1}s...".format(self.path, Math.round(self.waitRetryDelay/1000)));
+      }
+      else if (Math.round(self.waitDuration / 1000) % 10 === 0){
+        console.debug('[http] Waiting websocket ['+self.path+']...');
+      }
+
+      return $timeout(function(){
+        self.waitDuration += self.waitRetryDelay;
+        return _waitOpen(self);
+      }, self.waitRetryDelay);
+    }
+
+    function _open(self, callback, params) {
+      if (!self.delegate) {
+        self.path = path;
+        self.callbacks = [];
+        self.waitDuration = 0;
+        self.waitRetryDelay = 200;
+
+        prepare(uri, params, {}, function(uri) {
+          self.delegate = new WebSocket(uri);
+          self.delegate.onerror = function(e) {
+            self.delegate.readyState=3;
+          };
+          self.delegate.onmessage = function(e) {
+            var obj = JSON.parse(e.data);
+            _.forEach(self.callbacks, function(callback) {
+              callback(obj);
+            });
+          };
+          self.delegate.onopen = function(e) {
+            console.debug('[http] Listening on websocket ['+self.path+']...');
+            sockets.push(self);
+            self.delegate.openTime = Date.now();
+          };
+          self.delegate.onclose = function(closeEvent) {
+
+            // Remove from sockets arrays
+            var index = _.findIndex(sockets, function(socket){return socket.path === self.path;});
+            if (index >= 0) {
+              sockets.splice(index,1);
+            }
+
+            // If close event comes from Cesium
+            if (self.delegate.closing) {
+              self.delegate = null;
+            }
+
+            // If unexpected close event, reopen the socket (fix #535)
+            else {
+              if (self.delegate.openTime) {
+                console.debug('[http] Unexpected close of websocket [{0}] (open {1} ms ago): re-opening...', path, (Date.now() - self.delegate.openTime));
+
+                // Force new connection
+                self.delegate = null;
+
+                // Loop, but without the already registered callback
+                _open(self, null, params);
+              }
+              else if (closeEvent) {
+                console.debug('[http] Unexpected close of websocket [{0}]: error code: '.format(path), closeEvent && closeEvent.code || closeEvent);
+
+                // Force new connection
+                self.delegate = null;
+
+                // Loop, but without the already registered callback
+                _open(self, null, params);
+              }
+            }
+          };
+        });
+      }
+
+      if (callback) self.callbacks.push(callback);
+      return _waitOpen(self);
+    }
+
+    function _close(self) {
+      if (self.delegate) {
+        self.delegate.closing = true;
+        console.debug('[http] Closing websocket ['+self.path+']...');
+        self.delegate.close();
+        self.callbacks = [];
+        if (self.onclose) self.onclose();
+      }
+    }
+
+    function _remove(self, callback) {
+      self.callbacks = _.reject(self.callbacks, function(item) {
+        return item === callback;
+      });
+      if (!self.callbacks.length) {
+        _close(self);
+      }
+    }
+
+    return {
+      open: function(params) {
+        return _open(this, null, params);
+      },
+      on: function(callback, params) {
+        return _open(this, callback, params);
+      },
+      onListener: function(callback, params) {
+        var self = this;
+        _open(self, callback, params);
+        return function() {
+          _remove(self, callback);
+        };
+      },
+      send: function(data) {
+        var self = this;
+        return _waitOpen(self)
+          .then(function(){
+            if (self.delegate) self.delegate.send(data);
+          });
+      },
+      close: function() {
+        var self = this;
+        _close(self);
+      },
+      isClosed: function() {
+        var self = this;
+        return !self.delegate || self.delegate.closing;
+      }
+    };
+  }
+
+  function closeAllWs() {
+    if (sockets.length > 0) {
+      console.debug('[http] Closing all websocket...');
+      _.forEach(sockets, function(sock) {
+        sock.close();
+      });
+      sockets = []; // Reset socks list
+    }
+  }
+
+  // See doc : https://gist.github.com/jlong/2428561
+  function parseUri(uri) {
+    var protocol;
+    if (uri.startsWith('duniter://')) {
+      protocol = 'duniter';
+      uri = uri.replace('duniter://', 'http://');
+    }
+
+    var parser = document.createElement('a');
+    parser.href = uri;
+
+    var pathname = parser.pathname;
+    if (pathname && pathname.startsWith('/')) {
+      pathname = pathname.substring(1);
+    }
+
+    var result = {
+      protocol: protocol ? protocol : parser.protocol,
+      hostname: parser.hostname,
+      host: parser.host,
+      port: parser.port,
+      username: parser.username,
+      password: parser.password,
+      pathname: pathname,
+      search: parser.search,
+      hash: parser.hash
+    };
+    parser.remove();
+    return result;
+  }
+
+  /**
+   * Open a URI (url, email, phone, ...)
+   * @param event
+   * @param link
+   * @param type
+   */
+  function openUri(uri, options) {
+    options = options || {};
+
+    if (!uri.startsWith('http://') && !uri.startsWith('https://')) {
+      var parts = parseUri(uri);
+
+      if (!parts.protocol && options.type) {
+        parts.protocol = (options.type == 'email')  ? 'mailto:' :
+          ((options.type == 'phone') ? 'tel:' : '');
+        uri = parts.protocol + uri;
+      }
+
+      // On desktop, open into external tool
+      if (parts.protocol == 'mailto:'  && Device.isDesktop()) {
+        try {
+          nw.Shell.openExternal(uri);
+          return;
+        }
+        catch(err) {
+          console.error("[http] Failed not open 'mailto:' URI into external tool.");
+        }
+      }
+
+      // Check if device is enable, on special tel: or mailto: protocole
+      var validProtocol = (parts.protocol == 'mailto:' || parts.protocol == 'tel:') && Device.enable;
+      if (!validProtocol) {
+        if (options.onError && typeof options.onError == 'function') {
+          options.onError(uri);
+        }
+        return;
+      }
+    }
+
+    // Note: If device enable, then target=_system will use InAppBrowser cordova plugin
+    var openTarget = (options.target || (Device.enable ? '_system' : '_blank'));
+
+    // If desktop, try to open into external browser
+    if (openTarget === '_blank' || openTarget === '_system'  && Device.isDesktop()) {
+      try {
+        nw.Shell.openExternal(uri);
+        return;
+      }
+      catch(err) {
+        console.error("[http] Failed not open URI into external browser.");
+      }
+    }
+
+    // If desktop, should always open in new window (no tabs)
+    var openOptions;
+    if (openTarget === '_blank' && Device.isDesktop()) {
+
+      if (nw && nw.Shell) {
+        nw.Shell.openExternal(uri);
+        return false;
+      }
+      // Override default options
+      openOptions= "location=1,titlebar=1,status=1,menubar=1,toolbar=1,resizable=1,scrollbars=1";
+      // Add width/height
+      if ($window.screen && $window.screen.width && $window.screen.height) {
+        openOptions += ",width={0},height={1}".format(Math.trunc($window.screen.width/2), Math.trunc($window.screen.height/2));
+      }
+    }
+
+    var win = $window.open(uri,
+      openTarget,
+      openOptions);
+
+    // Center the opened window
+    if (openOptions && $window.screen && $window.screen.width && $window.screen.height) {
+      win.moveTo($window.screen.width/2/2, $window.screen.height/2/2);
+      win.focus();
+    }
+
+  }
+
+  // Get time in second (UTC)
+  function getDateNow() {
+    return moment().utc().unix();
+  }
+
+  function isPositiveInteger(x) {
+    // http://stackoverflow.com/a/1019526/11236
+    return /^\d+$/.test(x);
+  }
+
+  /**
+   * Compare two software version numbers (e.g. 1.7.1)
+   * Returns:
+   *
+   *  0 if they're identical
+   *  negative if v1 < v2
+   *  positive if v1 > v2
+   *  Nan if they in the wrong format
+   *
+   *  E.g.:
+   *
+   *  assert(version_number_compare("1.7.1", "1.6.10") > 0);
+   *  assert(version_number_compare("1.7.1", "1.7.10") < 0);
+   *
+   *  "Unit tests": http://jsfiddle.net/ripper234/Xv9WL/28/
+   *
+   *  Taken from http://stackoverflow.com/a/6832721/11236
+   */
+  function compareVersionNumbers(v1, v2){
+    var v1parts = v1.split('.');
+    var v2parts = v2.split('.');
+
+    // First, validate both numbers are true version numbers
+    function validateParts(parts) {
+      for (var i = 0; i < parts.length; ++i) {
+        if (!isPositiveInteger(parts[i])) {
+          return false;
+        }
+        parts[i] = parseInt(parts[i]);
+      }
+      return true;
+    }
+    if (!validateParts(v1parts) || !validateParts(v2parts)) {
+      return NaN;
+    }
+
+    for (var i = 0; i < v1parts.length; ++i) {
+      if (v2parts.length === i) {
+        return 1;
+      }
+
+      if (v1parts[i] === v2parts[i]) {
+        continue;
+      }
+      if (v1parts[i] > v2parts[i]) {
+        return 1;
+      }
+      return -1;
+    }
+
+    if (v1parts.length != v2parts.length) {
+      return -1;
+    }
+
+    return 0;
+  }
+
+  function isVersionCompatible(minVersion, actualVersion) {
+    console.debug('[http] Checking actual version [{0}] is compatible with min expected version [{1}]'.format(actualVersion, minVersion));
+    return compareVersionNumbers(minVersion, actualVersion) <= 0;
+  }
+
+  function clearCache(cachePrefix) {
+    cachePrefix = cachePrefix || defaultCachePrefix;
+    console.debug("[http] Cleaning cache {prefix: '{0}'}...".format(cachePrefix));
+    csCache.clear(cachePrefix);
+  }
+
+  function clearAllCache() {
+    console.debug('[http] Cleaning all caches...');
+    _.keys(allCachePrefixes).forEach(function(cachePrefix) {
+      csCache.clear(cachePrefix);
+    });
+  }
+
+  return {
+    get: getResource,
+    getWithCache: getResourceWithCache,
+    post: postResource,
+    ws: ws,
+    closeAllWs: closeAllWs,
+    getUrl : getUrl,
+    getServer: getServer,
+    uri: {
+      parse: parseUri,
+      open: openUri
+    },
+    date: {
+      now: getDateNow
+    },
+    version: {
+      compare: compareVersionNumbers,
+      isCompatible: isVersionCompatible
+    },
+    cache:  angular.merge({
+      clear: clearCache,
+      clearAll: clearAllCache
+    }, csCache.constants)
+  };
+}])
+;
+
+angular.module('cesium.storage.services', [ 'cesium.config'])
+
+
+  .factory('sessionStorage', ['$window', '$q', function($window, $q) {
+    'ngInject';
+
+    var
+      exports = {
+        storage: $window.sessionStorage || {}
+      };
+
+    exports.put = function(key, value) {
+      exports.storage[key] = value;
+      return $q.when();
+    };
+
+    exports.get = function(key, defaultValue) {
+      return $q.when(exports.storage[key] || defaultValue);
+    };
+
+    exports.setObject = function(key, value) {
+      exports.storage[key] = JSON.stringify(value);
+      return $q.when();
+    };
+
+    exports.getObject = function(key) {
+      return $q.when(JSON.parse(exports.storage[key] || 'null'));
+    };
+
+    return exports;
+  }])
+
+  .factory('localStorage', ['$window', '$q', '$log', 'sessionStorage', function($window, $q, $log, sessionStorage) {
+    'ngInject';
+
+    var
+      appName = "Cesium",
+      started = false,
+      startPromise,
+      isDevice = true, // default for device (override later)
+      exports = {
+        standard: {
+          storage: null
+        },
+        secure: {
+          storage: null
+        }
+      };
+
+    /* -- Use standard browser implementation -- */
+
+    exports.standard.put = function(key, value) {
+      if (angular.isDefined(value) && value != null) {
+        exports.standard.storage[key] = value;
+      }
+      else {
+        exports.standard.storage.removeItem(key);
+      }
+      return $q.when();
+    };
+
+    exports.standard.remove = function(key, value) {
+      exports.standard.storage.removeItem(key);
+      return $q.when();
+    };
+
+    exports.standard.get = function(key, defaultValue) {
+      return $q.when(exports.standard.storage[key] || defaultValue);
+    };
+
+    exports.standard.setObject = function(key, value) {
+      exports.standard.storage[key] = JSON.stringify(value);
+      return $q.when();
+    };
+
+    exports.standard.getObject = function(key) {
+      return $q.when(JSON.parse(exports.standard.storage[key] || 'null'));
+    };
+
+    /* -- Use secure storage (using a cordova plugin) -- */
+
+    // Set a value to the secure storage (or remove if value is not defined)
+    exports.secure.put = function(key, value) {
+      return $q(function(resolve, reject) {
+        if (value !== undefined && value !== null) {
+          exports.secure.storage.set(
+            function (key) {
+              resolve();
+            },
+            function (err) {
+              $log.error(err);
+              reject(err);
+            },
+            key, value);
+        }
+        // Remove
+        else {
+          exports.secure.storage.remove(
+            function () {
+              resolve();
+            },
+            function (err) {
+              $log.error(err);
+              resolve(); // Error = not found
+            },
+            key);
+        }
+      });
+    };
+
+    // Get a value from the secure storage
+    exports.secure.get = function(key, defaultValue) {
+      return $q(function(resolve, reject) {
+        exports.secure.storage.get(
+          function (value) {
+            if (!value && defaultValue) {
+              resolve(defaultValue);
+            }
+            else {
+              resolve(value);
+            }
+          },
+          function (err) {
+            $log.error(err);
+            resolve(); // Error = not found
+          },
+          key);
+      });
+    };
+
+    // Set a object to the secure storage
+    exports.secure.setObject = function(key, value) {
+      $log.debug("[storage] Setting object into secure storage, using key=" + key);
+      return $q(function(resolve, reject){
+        exports.secure.storage.set(
+          resolve,
+          reject,
+          key,
+          value ? JSON.stringify(value) : undefined);
+      });
+    };
+
+    // Get a object from the secure storage
+    exports.secure.getObject = function(key) {
+      $log.debug("[storage] Getting object from secure storage, using key=" + key);
+      return $q(function(resolve, reject){
+        exports.secure.storage.get(
+          function(value) {resolve(JSON.parse(value||'null'));},
+          function(err) {
+            $log.error(err);
+            resolve(); // Error = not found
+          },
+          key);
+      });
+    };
+
+    function initStandardStorage() {
+      // use local browser storage
+      if ($window.localStorage) {
+        console.debug('[storage] Starting {local} storage...');
+        exports.standard.storage = $window.localStorage;
+        // Set standard storage as default
+        _.forEach(_.keys(exports.standard), function(key) {
+          exports[key] = exports.standard[key];
+        });
+      }
+
+      // Fallback to session storage (localStorage could have been disabled on some browser)
+      else {
+        console.debug('[storage] Starting {session} storage...');
+        // Set standard storage as default
+        _.forEach(_.keys(sessionStorage), function(key) {
+          exports[key] = sessionStorage[key];
+        });
+      }
+      return $q.when();
+    }
+
+    function initSecureStorage() {
+      console.debug('[storage] Starting {secure} storage...');
+      // Set secure storage as default
+      _.forEach(_.keys(exports.secure), function(key) {
+        exports[key] = exports.secure[key];
+      });
+
+      var deferred = $q.defer();
+
+      // No secure storage plugin: fall back to standard storage
+      if (!cordova.plugins || !cordova.plugins.SecureStorage) {
+        initStandardStorage();
+        deferred.resolve();
+      }
+      else {
+
+        exports.secure.storage = new cordova.plugins.SecureStorage(
+          function () {
+            deferred.resolve();
+          },
+          function (err) {
+            console.error('[storage] Could not use secure storage. Will use standard.', err);
+            initStandardStorage();
+            deferred.resolve();
+          },
+          appName);
+      }
+      return deferred.promise;
+    }
+
+    exports.isStarted = function() {
+      return started;
+    };
+
+    exports.ready = function() {
+      if (started) return $q.when();
+      return startPromise || start();
+    };
+
+    function start() {
+      if (startPromise) return startPromise;
+
+      var now = Date.now();
+
+      // Use Cordova secure storage plugin
+      if (isDevice) {
+        startPromise = initSecureStorage();
+      }
+
+      // Use default browser local storage
+      else {
+        startPromise = initStandardStorage();
+      }
+
+      return startPromise
+        .then(function() {
+          console.debug('[storage] Started in ' + (Date.now() - now) + 'ms');
+          started = true;
+          startPromise = null;
+        });
+    }
+
+    // default action
+    start();
+
+    return exports;
+  }])
+
+
+;
+
+var App;
+
+angular.module('cesium.device.services', ['cesium.utils.services', 'cesium.settings.services'])
+
+  .factory('Device', ['$rootScope', '$translate', '$ionicPopup', '$q', '$cordovaClipboard', '$cordovaBarcodeScanner', '$cordovaCamera', 'ionicReady', function($rootScope, $translate, $ionicPopup, $q,
+      // removeIf(no-device)
+      $cordovaClipboard, $cordovaBarcodeScanner, $cordovaCamera,
+      // endRemoveIf(no-device)
+      ionicReady) {
+      'ngInject';
+
+      var
+        CONST = {
+          MAX_HEIGHT: 400,
+          MAX_WIDTH: 400
+        },
+        exports = {
+          // workaround to quickly no is device or not (even before the ready() event)
+          enable: true
+        },
+        cache = {},
+        started = false,
+        startPromise;
+
+      function getPicture(options) {
+        if (!exports.camera.enable) {
+          return $q.reject("Camera not enable. Please call 'ionicReady()' once before use (e.g in app.js).");
+        }
+
+        // Options is the sourceType by default
+        if (options && (typeof options === "string")) {
+          options = {
+            sourceType: options
+          };
+        }
+        options = options || {};
+
+        // Make sure a source type has been given (if not, ask user)
+        if (angular.isUndefined(options.sourceType)) {
+          return $translate(['SYSTEM.PICTURE_CHOOSE_TYPE', 'SYSTEM.BTN_PICTURE_GALLERY', 'SYSTEM.BTN_PICTURE_CAMERA'])
+            .then(function(translations){
+              return $ionicPopup.show({
+                title: translations['SYSTEM.PICTURE_CHOOSE_TYPE'],
+                buttons: [
+                  {
+                    text: translations['SYSTEM.BTN_PICTURE_GALLERY'],
+                    type: 'button',
+                    onTap: function(e) {
+                      return navigator.camera.PictureSourceType.PHOTOLIBRARY;
+                    }
+                  },
+                  {
+                    text: translations['SYSTEM.BTN_PICTURE_CAMERA'],
+                    type: 'button button-positive',
+                    onTap: function(e) {
+                      return navigator.camera.PictureSourceType.CAMERA;
+                    }
+                  }
+                ]
+              })
+              .then(function(sourceType){
+                console.info('[camera] User select sourceType:' + sourceType);
+                options.sourceType = sourceType;
+                return exports.camera.getPicture(options);
+              });
+            });
+        }
+
+        options.quality = options.quality || 50;
+        options.destinationType = options.destinationType || navigator.camera.DestinationType.DATA_URL;
+        options.encodingType = options.encodingType || navigator.camera.EncodingType.PNG;
+        options.targetWidth = options.targetWidth || CONST.MAX_WIDTH;
+        options.targetHeight = options.targetHeight || CONST.MAX_HEIGHT;
+        return $cordovaCamera.getPicture(options);
+      }
+
+      function scan(n) {
+        if (!exports.enable) {
+          return $q.reject("Barcode scanner not enable. Please call 'ionicReady()' once before use (e.g in app.js).");
+        }
+        var deferred = $q.defer();
+        cordova.plugins.barcodeScanner.scan(
+          function(result) {
+            if (!result.cancelled) {
+              console.debug('[device] barcode scanner scan: ' + result.text);
+              deferred.resolve(result.text); // make sure to convert into String
+            }
+            else {
+              console.debug('[device] barcode scanner scan: CANCELLED');
+              deferred.resolve();
+            }
+          },
+          function(err) {
+            console.error('[device] Error while using barcode scanner: ' + err);
+            deferred.reject(err);
+          },
+          n);
+        return deferred.promise;
+      }
+
+      function copy(text, callback) {
+        if (!exports.enable) {
+          return $q.reject('Device disabled');
+        }
+        var deferred = $q.defer();
+        $cordovaClipboard
+          .copy(text)
+          .then(function () {
+            // success
+            if (callback) {
+              callback();
+            }
+            deferred.resolve();
+          }, function () {
+            // error
+            deferred.reject({message: 'ERROR.COPY_CLIPBOARD'});
+          });
+        return deferred.promise;
+      }
+
+      exports.clipboard = {copy: copy};
+      exports.camera = {
+          getPicture : getPicture,
+          scan: function(n){
+            console.warn('Deprecated use of Device.camera.scan(). Use Device.barcode.scan() instead');
+            return scan(n);
+          }
+        };
+      exports.barcode = {
+        enable : false,
+        scan: scan
+      };
+      exports.keyboard = {
+        enable: false,
+        close: function() {
+          if (!exports.keyboard.enable) return;
+          cordova.plugins.Keyboard.close();
+        }
+      };
+
+      // Numerical keyboard - fix #30
+      exports.keyboard.digit = {
+        settings: {
+          bindModel: function(modelScope, modelPath, settings) {
+            settings = settings || {};
+            modelScope = modelScope || $rootScope;
+            var getModelValue = function() {
+              return (modelPath||'').split('.').reduce(function(res, path) {
+                return res ? res[path] : undefined;
+              }, modelScope);
+            };
+            var setModelValue = function(value) {
+              var paths = (modelPath||'').split('.');
+              var property = paths.length && paths[paths.length-1];
+              paths.reduce(function(res, path) {
+                if (path == property) {
+                  res[property] = value;
+                  return;
+                }
+                return res[path];
+              }, modelScope);
+            };
+
+            settings.animation = settings.animation || 'pop';
+            settings.action = settings.action || function(number) {
+                setModelValue((getModelValue() ||'') + number);
+              };
+            if (settings.decimal) {
+              settings.decimalSeparator = settings.decimalSeparator || '.';
+              settings.leftButton = {
+                html: '<span>.</span>',
+                action: function () {
+                  var text = getModelValue() || '';
+                  // only one '.' allowed
+                  if (text.indexOf(settings.decimalSeparator) >= 0) return;
+                  // Auto add zero when started with '.'
+                  if (!text.trim().length) {
+                    text = '0';
+                  }
+                  setModelValue(text + settings.decimalSeparator);
+                }
+              };
+            }
+            settings.rightButton = settings.rightButton || {
+                html: '<i class="icon ion-backspace-outline"></i>',
+                action: function() {
+                  var text = getModelValue();
+                  if (text && text.length) {
+                    text = text.slice(0, -1);
+                    setModelValue(text);
+                  }
+                }
+              };
+            return settings;
+          }
+        }
+      };
+
+      exports.isIOS = function() {
+        return !!navigator.userAgent.match(/iPhone | iPad | iPod/i) || ionic.Platform.isIOS();
+      };
+
+      exports.isOSX = function() {
+        return !!navigator.userAgent.match(/Macintosh/i) || ionic.Platform.is("osx");
+      };
+
+      exports.isDesktop = function() {
+        if (!angular.isDefined(cache.isDesktop)) {
+          try {
+            // Should have NodeJs and NW
+            cache.isDesktop = !exports.enable && !!process && !!nw && !!nw.App;
+          } catch (err) {
+            cache.isDesktop = false;
+          }
+        }
+        return cache.isDesktop;
+      };
+
+      exports.isWeb = function() {
+        return !exports.enable && !exports.isDesktop();
+      };
+
+      exports.ready = function() {
+        if (started) return $q.when();
+        return startPromise || exports.start();
+      };
+
+      exports.start = function() {
+
+        startPromise = ionicReady()
+          .then(function(){
+
+            exports.enable = window.cordova && cordova && cordova.plugins;
+
+            if (exports.enable){
+              exports.camera.enable = !!navigator.camera;
+              exports.keyboard.enable = cordova && cordova.plugins && !!cordova.plugins.Keyboard;
+              exports.barcode.enable = cordova && cordova.plugins && !!cordova.plugins.barcodeScanner && !exports.isOSX();
+              exports.clipboard.enable = cordova && cordova.plugins && !!cordova.plugins.clipboard;
+
+              if (exports.keyboard.enable) {
+                angular.extend(exports.keyboard, cordova.plugins.Keyboard);
+              }
+
+              console.debug('[device] Ionic platform ready, with [camera: {0}] [barcode scanner: {1}] [keyboard: {2}] [clipboard: {3}]'
+                .format(exports.camera.enable, exports.barcode.enable, exports.keyboard.enable, exports.clipboard.enable));
+
+              if (cordova.InAppBrowser) {
+                console.debug('[device] Enabling InAppBrowser');
+              }
+            }
+            else {
+              console.debug('[device] Ionic platform ready - no device detected.');
+            }
+
+            started = true;
+            startPromise = null;
+          });
+
+        return startPromise;
+      };
+
+      return exports;
+    }])
+
+  ;
+
+
+angular.module('cesium.currency.services', ['ngApi', 'cesium.bma.services'])
+
+.factory('csCurrency', ['$rootScope', '$q', '$timeout', 'BMA', 'Api', 'csSettings', function($rootScope, $q, $timeout, BMA, Api, csSettings) {
+  'ngInject';
+
+  var
+    constants = {
+      // Avoid to many call on well known currencies
+      WELL_KNOWN_CURRENCIES: {
+        g1: {
+          firstBlockTime: 1488987127,
+          medianTimeOffset: 3600
+        }
+      }
+    },
+
+    data = {},
+    started = false,
+    startPromise,
+    listeners,
+    api = new Api(this, "csCurrency");
+
+  function powBase(amount, base) {
+    return base <= 0 ? amount : amount * Math.pow(10, base);
+  }
+
+  function resetData() {
+    data.name = null;
+    data.parameters = null;
+    data.firstBlockTime = null;
+    data.membersCount = null;
+    data.cache = {};
+    data.node = BMA;
+    data.currentUD = null;
+    data.medianTimeOffset = 0;
+    started = false;
+    startPromise = undefined;
+    api.data.raise.reset(data);
+  }
+
+  function loadData() {
+
+    // Load currency from default node
+    return $q.all([
+
+      // get parameters
+      loadParameters()
+        .then(function(parameters) {
+          // load first block info
+          return loadFirstBlock(parameters.currency);
+        }),
+
+      // get current UD
+      loadCurrentUD(),
+
+      // call extensions
+      api.data.raisePromise.load(data)
+    ])
+    .catch(function(err) {
+      resetData();
+      throw err;
+    });
+  }
+
+  function loadParameters() {
+    return BMA.blockchain.parameters()
+      .then(function(res){
+        data.name = res.currency;
+        data.parameters = res;
+        data.medianTimeOffset = res.avgGenTime * res.medianTimeBlocks / 2;
+        return res;
+      });
+  }
+
+  function loadFirstBlock(currencyName) {
+    // Well known currencies
+    if (constants.WELL_KNOWN_CURRENCIES[currencyName]){
+      angular.merge(data, constants.WELL_KNOWN_CURRENCIES[currencyName]);
+      return $q.when();
+    }
+
+    return BMA.blockchain.block({block:0})
+      .then(function(json) {
+        // Need by graph plugin
+        data.firstBlockTime = json.medianTime;
+      })
+      .catch(function(err) {
+        // Special case, when currency not started yet
+        if (err && err.ucode === BMA.errorCodes.BLOCK_NOT_FOUND) {
+          data.firstBlockTime = 0;
+          data.initPhase = true;
+          console.warn('[currency] Blockchain not launched: Enable init phase mode');
+          return;
+        }
+        throw err;
+      });
+  }
+
+  function loadCurrentUD() {
+    return BMA.blockchain.stats.ud()
+      .then(function(res) {
+        // Special case for currency init
+        if (!res.result.blocks.length) {
+          data.currentUD = data.parameters ? data.parameters.ud0 : -1;
+          return data.currentUD ;
+        }
+        return _safeLoadCurrentUD(res, res.result.blocks.length - 1);
+      })
+      .catch(function(err) {
+        data.currentUD = null;
+        throw err;
+      });
+  }
+
+  /**
+   * Load the last UD, with a workaround if last block with UD is not found in the node
+   * @param res
+   * @param blockIndex
+   * @returns {*}
+   * @private
+   */
+  function _safeLoadCurrentUD(res, blockIndex) {
+    // Special case for currency init
+    if (!res.result.blocks.length || blockIndex < 0) {
+      data.currentUD = data.parameters ? data.parameters.ud0 : -1;
+      return data.currentUD ;
+    }
+    else {
+      var lastBlockWithUD = res.result.blocks[blockIndex];
+      return BMA.blockchain.block({ block: lastBlockWithUD })
+        .then(function(block){
+          data.currentUD = powBase(block.dividend, block.unitbase);
+          return data.currentUD;
+        })
+        .catch(function(err) {
+          console.error("[currency] Unable to load last block with UD, with number {0}".format(lastBlockWithUD));
+          if (blockIndex > 0) {
+            console.error("[currency] Retrying to load UD from a previous block...");
+            return _safeLoadCurrentUD(res, blockIndex-1);
+          }
+          data.currentUD = null;
+          throw err;
+        });
+    }
+  }
+
+  function getData() {
+
+    if (started) { // load only once
+      return $q.when(data);
+    }
+
+    // Previous load not finished: return the existing promise - fix #452
+    return startPromise || start();
+  }
+
+  function getDataField(field) {
+    return function() {
+      if (started) { // load only once
+        return $q.when(data[field]);
+      }
+
+      // Previous load not finished: return the existing promise - fix #452
+      return startPromise || start() // load only once
+          .then(function(){
+            return data[field];
+          });
+    };
+  }
+
+  function onBlock(json) {
+    var block = new Block(json);
+    block.cleanData(); // Remove unused content (arrays...) and keep items count
+
+    //console.debug('[currency] Received new block', block);
+    console.debug('[currency] Received new block {' + block.number + '-' + block.hash + '}');
+
+    data.currentBlock = block;
+    data.currentBlock.receivedAt = moment().utc().unix();
+
+    data.medianTime = block.medianTime;
+    data.membersCount = block.membersCount;
+
+    // Update UD
+    if (block.dividend) {
+      data.currentUD = block.dividend;
+    }
+
+    // Dispatch to extensions
+    api.data.raise.newBlock(block);
+  }
+
+  function addListeners() {
+    listeners = [
+      // Listen if node changed
+      BMA.api.node.on.restart($rootScope, restart, this),
+      // open web socket on block
+      BMA.websocket.block().onListener(onBlock)
+    ];
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function ready() {
+    if (started) return $q.when(data);
+    return startPromise || start();
+  }
+
+  function stop() {
+    console.debug('[currency] Stopping...');
+    removeListeners();
+    resetData();
+  }
+
+  function restart() {
+    stop();
+    return $timeout(start, 200);
+  }
+
+  function start() {
+    console.debug('[currency] Starting...');
+    var now = Date.now();
+
+    startPromise = BMA.ready()
+
+      // Load data
+      .then(loadData)
+
+      // Emit ready event
+      .then(function() {
+        addListeners();
+
+        console.debug('[currency] Started in ' + (Date.now() - now) + 'ms');
+
+        started = true;
+        startPromise = null;
+
+        // Emit event (used by plugins)
+        api.data.raise.ready(data);
+      })
+      .then(function(){
+        return data;
+      });
+
+    return startPromise;
+  }
+
+  var currentBlockField = getDataField('currentBlock');
+
+  function getCurrent(cache) {
+    // Get field (and make sure service is started)
+    return currentBlockField()
+
+      .then(function(currentBlock) {
+
+        var now = moment().utc().unix();
+
+        if (cache) {
+          if (currentBlock && currentBlock.receivedAt && (now - currentBlock.receivedAt) < 60/*1min*/) {
+            //console.debug('[currency] Use current block #'+ currentBlock.number +' from cache (age='+ (now - currentBlock.receivedAt) + 's)');
+            return currentBlock;
+          }
+
+          if (!currentBlock) {
+            // Should never occur, if websocket /ws/block works !
+            console.warn('[currency] No current block in cache: get it from network. Websocket [/ws/block] may not be started ?');
+          }
+        }
+
+        return BMA.blockchain.current(false)
+          .catch(function(err){
+            // Special case for currency init (root block not exists): use fixed values
+            if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+              return {number: 0, hash: BMA.constants.ROOT_BLOCK_HASH, medianTime: now};
+            }
+            throw err;
+          })
+          .then(function(current) {
+            data.currentBlock = current;
+            data.currentBlock.receivedAt = now;
+            return current;
+          });
+      });
+  }
+
+  function getLastValidBlock() {
+    if (csSettings.data.blockValidityWindow <= 0) {
+      return getCurrent(true);
+    }
+
+    return getCurrent(true)
+      .then(function(current) {
+        var number = current.number - csSettings.data.blockValidityWindow;
+        return (number > 0) ? BMA.blockchain.block({block: number}) : current;
+      });
+  }
+
+  // Get time in second (UTC - medianTimeOffset)
+  function getDateNow() {
+    return moment().utc().unix() - (data.medianTimeOffset || constants.WELL_KNOWN_CURRENCIES.g1.medianTimeOffset);
+  }
+
+  // TODO register new block event, to get new UD value
+
+  // Register extension points
+  api.registerEvent('data', 'ready');
+  api.registerEvent('data', 'load');
+  api.registerEvent('data', 'reset');
+  api.registerEvent('data', 'newBlock');
+
+  // init data
+  resetData();
+
+  // Default action
+  //start();
+
+  return {
+    ready: ready,
+    start: start,
+    stop: stop,
+    data: data,
+    get: getData,
+    name: getDataField('name'),
+    parameters: getDataField('parameters'),
+    currentUD: getDataField('currentUD'),
+    medianTimeOffset: getDataField('medianTimeOffset'),
+    blockchain: {
+      current: getCurrent,
+      lastValid: getLastValidBlock
+    },
+    date: {
+      now: getDateNow
+    },
+    // api extension
+    api: api,
+    // deprecated methods
+    default: function() {
+      console.warn('[currency] \'csCurrency.default()\' has been DEPRECATED - Please use \'csCurrency.get()\' instead.');
+      return getData();
+    }
+  };
+}]);
+
+//var Base58, Base64, scrypt_module_factory = null, nacl_factory = null;
+
+angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.settings.services'])
+
+.factory('BMA', ['$q', '$window', '$rootScope', '$timeout', 'csCrypto', 'Api', 'Device', 'UIUtils', 'csConfig', 'csSettings', 'csCache', 'csHttp', function($q, $window, $rootScope, $timeout, csCrypto, Api, Device, UIUtils, csConfig, csSettings, csCache, csHttp) {
+  'ngInject';
+
+  function BMA(host, port, useSsl, useCache) {
+
+    var
+      id = (!host ? 'default' : '{0}:{1}'.format(host, (port || (useSsl ? '443' : '80')))), // Unique id of this instance
+      cachePrefix = "BMA-",
+      pubkey = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}",
+      // TX output conditions
+      SIG = "SIG\\((" + pubkey + ")\\)",
+      XHX = 'XHX\\(([A-F0-9]{1,64})\\)',
+      CSV = 'CSV\\(([0-9]{1,8})\\)',
+      CLTV = 'CLTV\\(([0-9]{1,10})\\)',
+      OUTPUT_FUNCTION = SIG+'|'+XHX+'|'+CSV+'|'+CLTV,
+      OUTPUT_OPERATOR = '(&&)|(\\|\\|)',
+      OUTPUT_FUNCTIONS = OUTPUT_FUNCTION+'([ ]*' + OUTPUT_OPERATOR + '[ ]*' + OUTPUT_FUNCTION +')*',
+      OUTPUT_OBJ = 'OBJ\\(([0-9]+)\\)',
+      OUTPUT_OBJ_OPERATOR = OUTPUT_OBJ + '[ ]*' + OUTPUT_OPERATOR + '[ ]*' + OUTPUT_OBJ,
+      REGEX_ENDPOINT_PARAMS = "( ([a-z_][a-z0-9-_.ÄŸÄž]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))( (.+))?",
+      api = {
+        BMA: 'BASIC_MERKLED_API',
+        BMAS: 'BMAS',
+        WS2P: 'WS2P',
+        BMATOR: 'BMATOR',
+        WS2PTOR: 'WS2PTOR'
+      },
+      regexp = {
+        USER_ID: "[0-9a-zA-Z-_]+",
+        CURRENCY: "[0-9a-zA-Z-_]+",
+        PUBKEY: pubkey,
+        PUBKEY_WITH_CHECKSUM: "(" + pubkey +"):([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{3})",
+        COMMENT: "[ a-zA-Z0-9-_:/;*\\[\\]()?!^\\+=@&~#{}|\\\\<>%.]*",
+        INVALID_COMMENT_CHARS: "[^ a-zA-Z0-9-_:/;*\\[\\]()?!^\\+=@&~#{}|\\\\<>%.]*",
+        // duniter://[uid]:[pubkey]@[host]:[port]
+        URI_WITH_AT: "duniter://(?:([A-Za-z0-9_-]+):)?("+pubkey+"@([a-zA-Z0-9-.]+.[ a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+)",
+        URI_WITH_PATH: "duniter://([a-zA-Z0-9-.]+.[a-zA-Z0-9-_:.]+)/("+pubkey+")(?:/([A-Za-z0-9_-]+))?",
+        BMA_ENDPOINT: api.BMA + REGEX_ENDPOINT_PARAMS,
+        BMAS_ENDPOINT: api.BMAS + REGEX_ENDPOINT_PARAMS,
+        WS2P_ENDPOINT: api.WS2P + " ([a-f0-9]{8})"+ REGEX_ENDPOINT_PARAMS,
+        BMATOR_ENDPOINT: api.BMATOR + " ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?",
+        WS2PTOR_ENDPOINT: api.WS2PTOR + " ([a-f0-9]{8}) ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?(?: (.+))?"
+      },
+      errorCodes = {
+        REVOCATION_ALREADY_REGISTERED: 1002,
+        HTTP_LIMITATION: 1006,
+        IDENTITY_SANDBOX_FULL: 1007,
+        NO_MATCHING_IDENTITY: 2001,
+        UID_ALREADY_USED: 2003,
+        NO_MATCHING_MEMBER: 2004,
+        NO_IDTY_MATCHING_PUB_OR_UID: 2021,
+        WRONG_SIGNATURE_MEMBERSHIP: 2006,
+        MEMBERSHIP_ALREADY_SEND: 2007,
+        NO_CURRENT_BLOCK: 2010,
+        BLOCK_NOT_FOUND: 2011,
+        SOURCE_ALREADY_CONSUMED: 2015,
+        TX_INPUTS_OUTPUTS_NOT_EQUAL: 2024,
+        TX_OUTPUT_SUM_NOT_EQUALS_PREV_DELTAS: 2025,
+        TX_ALREADY_PROCESSED: 2030
+      },
+      constants = {
+        PROTOCOL_VERSION: 10,
+        ROOT_BLOCK_HASH: 'E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855',
+        LIMIT_REQUEST_COUNT: 5, // simultaneous async request to a Duniter node
+        LIMIT_REQUEST_DELAY: 1000, // time (in ms) to wait between to call of a rest request
+        regexp: regexp,
+        api: api
+      },
+      listeners,
+      that = this;
+
+    that.raw = {
+      getByPath: {},
+      postByPath: {},
+      wsByPath: {}
+    };
+    that.api = new Api(this, 'BMA-' + id);
+    that.started = false;
+    that.init = init;
+
+    // Allow to force SSL connection with port different from 443
+    that.forceUseSsl = (csConfig.httpsMode === 'true' || csConfig.httpsMode === true || csConfig.httpsMode === 'force') ||
+    ($window.location && $window.location.protocol === 'https:') ? true : false;
+    if (that.forceUseSsl) {
+      console.debug('[BMA] Enable SSL (forced by config or detected in URL)');
+    }
+
+    if (host)  init(host, port, useSsl);
+    that.useCache = angular.isDefined(useCache) ? useCache : true; // need here because used in get() function
+
+    function init(host, port, useSsl) {
+      if (that.started) that.stop();
+      that.alive = false;
+
+      // Use settings as default, if exists
+      if (csSettings.data && csSettings.data.node) {
+        host = host || csSettings.data.node.host;
+        port = port || csSettings.data.node.port;
+
+        useSsl = angular.isDefined(useSsl) ? useSsl : (port == 443 || csSettings.data.node.useSsl || that.forceUseSsl);
+      }
+
+      if (!host) {
+        return; // could not init yet
+      }
+      that.host = host;
+      that.port = port || 80;
+      that.useSsl = angular.isDefined(useSsl) ? useSsl : (that.port == 443 || that.forceUseSsl);
+      that.server = csHttp.getServer(host, port);
+      that.url = csHttp.getUrl(host, port, ''/*path*/, useSsl);
+    }
+
+    function exact(regexpContent) {
+      return new RegExp("^" + regexpContent + "$");
+    }
+
+    function test(regexpContent) {
+      return new RegExp(regexpContent);
+    }
+
+    function closeWs() {
+      if (!that.raw) return;
+
+      console.warn('[BMA] Closing all websockets...');
+      _.keys(that.raw.wsByPath||{}).forEach(function(key) {
+        var sock = that.raw.wsByPath[key];
+        sock.close();
+      });
+      that.raw.wsByPath = {};
+    }
+
+   function cleanCache() {
+     console.debug("[BMA] Cleaning cache {prefix: '{0}'}...".format(cachePrefix));
+     csCache.clear(cachePrefix);
+
+     // Clean raw requests by path cache
+     that.raw.getByPath = {};
+     that.raw.postByPath = {};
+     that.raw.wsByPath = {};
+   }
+
+   function get(path, cacheTime) {
+
+      cacheTime = that.useCache && cacheTime || 0 /* no cache*/ ;
+      var requestKey = path + (cacheTime ? ('#'+cacheTime) : '');
+
+      var getRequestFn = function(params) {
+
+        if (!that.started) {
+          if (!that._startPromise) {
+            console.warn('[BMA] Trying to get [{0}] before start(). Waiting...'.format(path));
+          }
+          return that.ready().then(function() {
+            return getRequestFn(params);
+          });
+        }
+
+        var request = that.raw.getByPath[requestKey];
+        if (!request) {
+          if (cacheTime) {
+            request = csHttp.getWithCache(that.host, that.port, path, that.useSsl, cacheTime, null, null, cachePrefix);
+          }
+          else {
+            request = csHttp.get(that.host, that.port, path, that.useSsl);
+          }
+          that.raw.getByPath[requestKey] = request;
+        }
+        var execCount = 1;
+        return request(params)
+          .catch(function(err){
+            // If node return too many requests error
+            if (err && err.ucode === exports.errorCodes.HTTP_LIMITATION) {
+              // If max number of retry not reach
+              if (execCount <= exports.constants.LIMIT_REQUEST_COUNT) {
+                if (execCount === 1) {
+                  console.warn("[BMA] Too many HTTP requests: Will wait then retry...");
+                  // Update the loading message (if exists)
+                  UIUtils.loading.update({template: "COMMON.LOADING_WAIT"});
+                }
+                // Wait 1s then retry
+                return $timeout(function() {
+                  execCount++;
+                  return request(params);
+                }, exports.constants.LIMIT_REQUEST_DELAY);
+              }
+            }
+            throw err;
+          });
+      };
+
+      return getRequestFn;
+    }
+
+    function post(path) {
+      var postRequest = function(obj, params) {
+        if (!that.started) {
+          if (!that._startPromise) {
+            console.error('[BMA] Trying to post [{0}] before start()...'.format(path));
+          }
+          return that.ready().then(function() {
+            return postRequest(obj, params);
+          });
+        }
+
+        var request = that.raw.postByPath[path];
+        if (!request) {
+          request =  csHttp.post(that.host, that.port, path, that.useSsl);
+          that.raw.postByPath[path] = request;
+        }
+        return request(obj, params);
+      };
+
+      return postRequest;
+    }
+
+    function ws(path) {
+      return function() {
+        var sock = that.raw.wsByPath[path];
+        if (!sock || sock.isClosed()) {
+          sock =  csHttp.ws(that.host, that.port, path, that.useSsl);
+
+          // When close, remove from cache
+          sock.onclose = function() {
+            delete that.raw.wsByPath[path];
+          };
+
+          that.raw.wsByPath[path] = sock;
+        }
+        return sock;
+      };
+    }
+
+    that.isAlive = function(node) {
+      node = node || that;
+      // WARN:
+      //  - Cannot use previous get() function, because
+      //    node can be !=that, or not be started yet
+      //  - Do NOT use cache here
+      return csHttp.get(node.host, node.port, '/node/summary', node.useSsl)()
+        .then(function(json) {
+          var software = json && json.duniter && json.duniter.software;
+          var isCompatible = true;
+
+          // Check duniter min version
+          if (software === 'duniter' && json.duniter.version) {
+            isCompatible = csHttp.version.isCompatible(csSettings.data.minVersion, json.duniter.version);
+          }
+          // TODO: check version of other software (DURS, Juniter, etc.)
+          else {
+            console.debug('[BMA] Unknown node software [{0} v{1}]: could not check compatibility.'.format(software || '?', json.duniter.version || '?'));
+          }
+          if (!isCompatible) {
+            console.error('[BMA] Incompatible node [{0} v{1}]: expected at least v{2}'.format(software, json.duniter.version, csSettings.data.minVersion));
+          }
+          return isCompatible;
+        })
+        .catch(function() {
+          return false;
+        });
+    };
+
+    function isSameNode(node2) {
+      node2 = node2 || {};
+      node2.useSsl = angular.isDefined(node2.useSsl) ? node2.useSsl : (node2.port && node2.port == 443);
+      // Same host
+      return that.host === node2.host &&
+          // Same port
+          ((!that.port && !node2.port2) || (that.port == node2.port2||80)) &&
+          // Same useSsl
+          (that.useSsl === node2.useSsl);
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function addListeners() {
+      listeners = [
+        // Listen if node changed
+        csSettings.api.data.on.changed($rootScope, onSettingsChanged, this)
+      ];
+    }
+
+    function onSettingsChanged(settings) {
+      // Wait 1s (because settings controller can have restart the service), then copy the settings node
+      $timeout(function() {
+        exports.copy(settings.node);
+      }, 1000);
+    }
+
+    that.isStarted = function() {
+      return that.started;
+    };
+
+    that.ready = function() {
+      if (that.started) return $q.when(true);
+      return that._startPromise || that.start();
+    };
+
+    that.start = function() {
+      if (that._startPromise) return that._startPromise;
+      if (that.started) return $q.when(that.alive);
+
+      if (!that.host) {
+        return csSettings.ready()
+          .then(function() {
+            that.init();
+
+            // Always enable cache
+            that.useCache = true;
+
+            return that.start(); // recursive call
+          });
+      }
+
+      console.debug("[BMA] Starting {0} {ssl: {1})...".format(that.server, that.useSsl));
+
+      var now = Date.now();
+
+      that._startPromise = $q.all([
+          csSettings.ready,
+          that.isAlive()
+        ])
+        .then(function(res) {
+          that.alive = res[1];
+          if (!that.alive) {
+            console.error("[BMA] Could not start {0} : unreachable".format(that.server));
+            that.started = true;
+            delete that._startPromise;
+            return false;
+          }
+
+          // Add listeners
+          if (!listeners || !listeners.length) {
+            addListeners();
+          }
+          console.debug('[BMA] Started in '+(Date.now()-now)+'ms');
+
+          that.api.node.raise.start();
+          that.started = true;
+          delete that._startPromise;
+          return true;
+        });
+      return that._startPromise;
+    };
+
+    that.stop = function() {
+      if (!that.started && !that._startPromise) return $q.when(); // Skip multiple call
+
+      console.debug('[BMA] Stopping...');
+
+      removeListeners();
+      delete that._startPromise;
+
+      if (that.alive) {
+        closeWs();
+        cleanCache();
+        that.alive = false;
+        that.started = false;
+        that.api.node.raise.stop();
+      }
+      else {
+        that.started = false;
+      }
+      return $q.when();
+    };
+
+    that.restart = function() {
+      that.stop();
+      return $timeout(that.start, 200)
+        .then(function(alive) {
+          if (alive) {
+            that.api.node.raise.restart();
+          }
+          return alive;
+        });
+    };
+
+    that.api.registerEvent('node', 'start');
+    that.api.registerEvent('node', 'stop');
+    that.api.registerEvent('node', 'restart');
+
+    var exports = {
+      errorCodes: errorCodes,
+      constants: constants,
+      regexp: {
+        USER_ID: exact(regexp.USER_ID),
+        COMMENT: exact(regexp.COMMENT),
+        PUBKEY: exact(regexp.PUBKEY),
+        PUBKEY_WITH_CHECKSUM: exact(regexp.PUBKEY_WITH_CHECKSUM),
+        CURRENCY: exact(regexp.CURRENCY),
+        URI: exact(regexp.URI),
+        BMA_ENDPOINT: exact(regexp.BMA_ENDPOINT),
+        BMAS_ENDPOINT: exact(regexp.BMAS_ENDPOINT),
+        WS2P_ENDPOINT: exact(regexp.WS2P_ENDPOINT),
+        BMATOR_ENDPOINT: exact(regexp.BMATOR_ENDPOINT),
+        WS2PTOR_ENDPOINT: exact(regexp.WS2PTOR_ENDPOINT),
+        // TX output conditions
+        TX_OUTPUT_SIG: exact(SIG),
+        TX_OUTPUT_FUNCTION: test(OUTPUT_FUNCTION),
+        TX_OUTPUT_OBJ_OPERATOR_AND: test(OUTPUT_OBJ + '([ ]*&&[ ]*(' + OUTPUT_OBJ + '))+'),
+        TX_OUTPUT_OBJ_OPERATOR_OR: test(OUTPUT_OBJ + '([ ]*\\|\\|[ ]*(' + OUTPUT_OBJ + '))+'),
+        TX_OUTPUT_OBJ: test(OUTPUT_OBJ),
+        TX_OUTPUT_OBJ_OPERATOR: test(OUTPUT_OBJ_OPERATOR),
+        TX_OUTPUT_OBJ_PARENTHESIS: test('\\(('+OUTPUT_OBJ+')\\)'),
+        TX_OUTPUT_FUNCTIONS: test(OUTPUT_FUNCTIONS)
+      },
+      node: {
+        summary: get('/node/summary', csCache.constants.LONG),
+        same: isSameNode,
+        forceUseSsl: that.forceUseSsl
+      },
+      network: {
+        peering: {
+          self: get('/network/peering'),
+          peers: get('/network/peering/peers')
+        },
+        peers: get('/network/peers'),
+        ws2p: {
+          info: get('/network/ws2p/info'),
+          heads: get('/network/ws2p/heads')
+        }
+      },
+      wot: {
+        lookup: get('/wot/lookup/:search'),
+        certifiedBy: get('/wot/certified-by/:pubkey', csCache.constants.SHORT),
+        certifiersOf: get('/wot/certifiers-of/:pubkey', csCache.constants.SHORT),
+        member: {
+          all: get('/wot/members', csCache.constants.LONG),
+          pending: get('/wot/pending', csCache.constants.SHORT)
+        },
+        requirements: function(params, cache) {
+          // No cache by default
+          if (cache !== true) return exports.raw.wot.requirements(params);
+          return exports.raw.wot.requirementsWithCache(params);
+        },
+        add: post('/wot/add'),
+        certify: post('/wot/certify'),
+        revoke: post('/wot/revoke')
+      },
+      blockchain: {
+        parameters: get('/blockchain/parameters', csCache.constants.VERY_LONG),
+        block: get('/blockchain/block/:block', csCache.constants.SHORT),
+        blocksSlice: get('/blockchain/blocks/:count/:from'),
+        current: function(cache) {
+          // No cache by default
+          return (cache !== true) ? exports.raw.blockchain.current() : exports.raw.blockchain.currentWithCache();
+        },
+        membership: post('/blockchain/membership'),
+        stats: {
+          ud: get('/blockchain/with/ud', csCache.constants.MEDIUM),
+          tx: get('/blockchain/with/tx'),
+          newcomers: get('/blockchain/with/newcomers', csCache.constants.MEDIUM),
+          hardship: get('/blockchain/hardship/:pubkey'),
+          difficulties: get('/blockchain/difficulties')
+        }
+      },
+      tx: {
+        sources: get('/tx/sources/:pubkey', csCache.constants.SHORT),
+        process: post('/tx/process'),
+        history: {
+          all: function(params) {
+            return exports.raw.tx.history.all(params)
+              .then(function(res) {
+                res.history = res.history || {};
+                // Clean sending and pendings, because already returned by tx/history/:pubkey/pending
+                res.history.sending = [];
+                res.history.pendings = [];
+                return res;
+              });
+          },
+          times: function(params, cache) {
+            // No cache by default
+            return ((cache !== true) ? exports.raw.tx.history.times(params) : exports.raw.tx.history.timesWithCache(params))
+              .then(function(res) {
+                res.history = res.history || {};
+                // Clean sending and pendings, because already returned by tx/history/:pubkey/pending
+                res.history.sending = [];
+                res.history.pendings = [];
+                return res;
+              });
+          },
+          blocks: get('/tx/history/:pubkey/blocks/:from/:to', csCache.constants.LONG),
+          pending: get('/tx/history/:pubkey/pending')
+        }
+      },
+      ud: {
+        history: get('/ud/history/:pubkey')
+      },
+      uri: {},
+      version: {},
+      raw: {
+        blockchain: {
+          currentWithCache: get('/blockchain/current', csCache.constants.SHORT),
+          current: get('/blockchain/current')
+        },
+        wot: {
+          requirementsWithCache: get('/wot/requirements/:pubkey', csCache.constants.LONG),
+          requirements: get('/wot/requirements/:pubkey')
+        },
+        tx: {
+          history: {
+            timesWithCache: get('/tx/history/:pubkey/times/:from/:to', csCache.constants.LONG),
+            times: get('/tx/history/:pubkey/times/:from/:to'),
+            all: get('/tx/history/:pubkey')
+          }
+        },
+      }
+    };
+
+    exports.tx.parseUnlockCondition = function(unlockCondition) {
+
+      //console.debug('[BMA] Parsing unlock condition: {0}.'.format(unlockCondition));
+      var convertedOutput = unlockCondition;
+      var treeItems = [];
+      var treeItem;
+      var treeItemId;
+      var childrenContent;
+      var childrenMatches;
+      var functions = {};
+
+      // Parse functions, then replace with an 'OBJ()' generic function, used to build a object tree
+      var matches = exports.regexp.TX_OUTPUT_FUNCTION.exec(convertedOutput);
+      while(matches) {
+        treeItem = {};
+        treeItemId = 'OBJ(' + treeItems.length + ')';
+        treeItem.type = convertedOutput.substr(matches.index, matches[0].indexOf('('));
+        treeItem.value = matches[1] || matches[2] || matches[3] || matches[4]; // get value from regexp OUTPUT_FUNCTION
+        treeItems.push(treeItem);
+
+        functions[treeItem.type] = functions[treeItem.type]++ || 1;
+
+        convertedOutput = convertedOutput.replace(matches[0], treeItemId);
+        matches = exports.regexp.TX_OUTPUT_FUNCTION.exec(convertedOutput);
+      }
+
+      var loop = true;
+      while(loop) {
+        // Parse AND operators
+        matches = exports.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(convertedOutput);
+        loop = !!matches;
+        while (matches) {
+          treeItem = {};
+          treeItemId = 'OBJ(' + treeItems.length + ')';
+          treeItem.type = 'AND';
+          treeItem.children = [];
+          treeItems.push(treeItem);
+
+          childrenContent = matches[0];
+          childrenMatches = exports.regexp.TX_OUTPUT_OBJ.exec(childrenContent);
+          while(childrenMatches) {
+
+            treeItem.children.push(treeItems[childrenMatches[1]]);
+            childrenContent = childrenContent.replace(childrenMatches[0], '');
+            childrenMatches = exports.regexp.TX_OUTPUT_OBJ.exec(childrenContent);
+          }
+
+          convertedOutput = convertedOutput.replace(matches[0], treeItemId);
+          matches = exports.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(childrenContent);
+        }
+
+        // Parse OR operators
+
+        matches = exports.regexp.TX_OUTPUT_OBJ_OPERATOR_OR.exec(convertedOutput);
+        loop = loop || !!matches;
+        while (matches) {
+          treeItem = {};
+          treeItemId = 'OBJ(' + treeItems.length + ')';
+          treeItem.type = 'OR';
+          treeItem.children = [];
+          treeItems.push(treeItem);
+
+          childrenContent = matches[0];
+          childrenMatches = exports.regexp.TX_OUTPUT_OBJ.exec(childrenContent);
+          while(childrenMatches) {
+            treeItem.children.push(treeItems[childrenMatches[1]]);
+            childrenContent = childrenContent.replace(childrenMatches[0], '');
+            childrenMatches = exports.regexp.TX_OUTPUT_OBJ.exec(childrenContent);
+          }
+
+          convertedOutput = convertedOutput.replace(matches[0], treeItemId);
+          matches = exports.regexp.TX_OUTPUT_OBJ_OPERATOR_AND.exec(convertedOutput);
+        }
+
+        // Remove parenthesis
+        matches = exports.regexp.TX_OUTPUT_OBJ_PARENTHESIS.exec(convertedOutput);
+        loop = loop || !!matches;
+        while (matches) {
+          convertedOutput = convertedOutput.replace(matches[0], matches[1]);
+          matches = exports.regexp.TX_OUTPUT_OBJ_PARENTHESIS.exec(convertedOutput);
+        }
+      }
+
+      functions = _.keys(functions);
+      if (functions.length === 0) {
+        console.error('[BMA] Unparseable unlock condition: ', output);
+        return;
+      }
+      console.debug('[BMA] Unlock conditions successfully parsed:', treeItem);
+      return {
+        unlockFunctions: functions,
+        unlockTree: treeItem
+      };
+    };
+
+    exports.node.parseEndPoint = function(endpoint, epPrefix) {
+      // Try BMA
+      var matches = exports.regexp.BMA_ENDPOINT.exec(endpoint);
+      if (matches) {
+        return {
+          "dns": matches[2] || '',
+          "ipv4": matches[4] || '',
+          "ipv6": matches[6] || '',
+          "port": matches[8] || 80,
+          "useSsl": matches[8] && matches[8] == 443,
+          "path": matches[10],
+          "useBma": true
+        };
+      }
+      // Try BMAS
+      matches = exports.regexp.BMAS_ENDPOINT.exec(endpoint);
+      if (matches) {
+        return {
+          "dns": matches[2] || '',
+          "ipv4": matches[4] || '',
+          "ipv6": matches[6] || '',
+          "port": matches[8] || 80,
+          "useSsl": true,
+          "path": matches[10],
+          "useBma": true
+        };
+      }
+      // Try BMATOR
+      matches = exports.regexp.BMATOR_ENDPOINT.exec(endpoint);
+      if (matches) {
+        return {
+          "dns": matches[1] || '',
+          "port": matches[2] || 80,
+          "useSsl": false,
+          "useTor": true,
+          "useBma": true
+        };
+      }
+      // Try WS2P
+      matches = exports.regexp.WS2P_ENDPOINT.exec(endpoint);
+      if (matches) {
+        return {
+          "ws2pid": matches[1] || '',
+          "dns": matches[3] || '',
+          "ipv4": matches[5] || '',
+          "ipv6": matches[7] || '',
+          "port": matches[9] || 80,
+          "useSsl": matches[9] && matches[9] == 443,
+          "path": matches[11] || '',
+          "useWs2p": true
+        };
+      }
+      // Try WS2PTOR
+      matches = exports.regexp.WS2PTOR_ENDPOINT.exec(endpoint);
+      if (matches) {
+        return {
+          "ws2pid": matches[1] || '',
+          "dns": matches[2] || '',
+          "port": matches[3] || 80,
+          "path": matches[4] || '',
+          "useSsl": false,
+          "useTor": true,
+          "useWs2p": true
+        };
+      }
+
+      // Use generic match
+      if (epPrefix) {
+        matches = exact(epPrefix + REGEX_ENDPOINT_PARAMS).exec(endpoint);
+        if (matches) {
+          return {
+            "dns": matches[2] || '',
+            "ipv4": matches[4] || '',
+            "ipv6": matches[6] || '',
+            "port": matches[8] || 80,
+            "useSsl": matches[8] && matches[8] == 443,
+            "path": matches[10],
+            "useBma": false
+          };
+        }
+      }
+
+    };
+
+    exports.copy = function(otherNode) {
+
+      var server = csHttp.getUrl(otherNode.host, otherNode.port, ''/*path*/, otherNode.useSsl);
+      var hasChanged = (server !== that.url);
+      if (hasChanged) {
+        var wasStarted = that.started;
+        if (wasStarted) that.stop();
+        that.init(otherNode.host, otherNode.port, otherNode.useSsl, that.useCache/*keep original value*/);
+        if (wasStarted) {
+          return $timeout(function () {
+            return that.start()
+              .then(function (alive) {
+                if (alive) {
+                  that.api.node.raise.restart();
+                }
+                return alive;
+              });
+          }, 200); // Wait stop finished
+        }
+      }
+    };
+
+    exports.wot.member.uids = function() {
+      return exports.wot.member.all()
+        .then(function(res){
+          return res.results.reduce(function(res, member){
+            res[member.pubkey] = member.uid;
+            return res;
+          }, {});
+        });
+    };
+
+    exports.wot.member.get = function(pubkey) {
+      return exports.wot.member.uids()
+        .then(function(memberUidsByPubkey){
+          var uid = memberUidsByPubkey[pubkey];
+          return {
+              pubkey: pubkey,
+              uid: (uid ? uid : null)
+            };
+        });
+    };
+
+    exports.wot.member.getByUid = function(uid) {
+      return exports.wot.member.all()
+        .then(function(res){
+          return _.findWhere(res.results, {uid: uid});
+        });
+    };
+
+    /**
+     * Return all expected blocks
+     * @param blockNumbers a rray of block number
+    */
+    exports.blockchain.blocks = function(blockNumbers){
+      return exports.raw.getHttpRecursive(exports.blockchain.block, 'block', blockNumbers);
+    };
+
+    /**
+     * Return all expected blocks
+     * @param blockNumbers a rray of block number
+     */
+    exports.network.peering.peersByLeaves = function(leaves){
+      return exports.raw.getHttpRecursive(exports.network.peering.peers, 'leaf', leaves, 0, 10);
+    };
+
+    exports.raw.getHttpRecursive = function(httpGetRequest, paramName, paramValues, offset, size) {
+      offset = angular.isDefined(offset) ? offset : 0;
+      size = size || exports.constants.LIMIT_REQUEST_COUNT;
+      return $q(function(resolve, reject) {
+        var result = [];
+        var jobs = [];
+        _.each(paramValues.slice(offset, offset+size), function(paramValue) {
+          var requestParams = {};
+          requestParams[paramName] = paramValue;
+          jobs.push(
+            httpGetRequest(requestParams)
+              .then(function(res){
+                if (!res) return;
+                result.push(res);
+              })
+          );
+        });
+
+        $q.all(jobs)
+          .then(function() {
+            if (offset < paramValues.length - 1) {
+              $timeout(function() {
+                exports.raw.getHttpRecursive(httpGetRequest, paramName, paramValues, offset+size, size)
+                  .then(function(res) {
+                    if (!res || !res.length) {
+                      resolve(result);
+                      return;
+                    }
+
+                    resolve(result.concat(res));
+                  })
+                  .catch(function(err) {
+                    reject(err);
+                  });
+              }, exports.constants.LIMIT_REQUEST_DELAY);
+            }
+            else {
+              resolve(result);
+            }
+          })
+          .catch(function(err){
+            if (err && err.ucode === exports.errorCodes.HTTP_LIMITATION) {
+              resolve(result);
+            }
+            else {
+              reject(err);
+            }
+          });
+      });
+    };
+
+    exports.raw.getHttpWithRetryIfLimitation = function(exec) {
+      return exec()
+        .catch(function(err){
+          // When too many request, retry in 3s
+          if (err && err.ucode == exports.errorCodes.HTTP_LIMITATION) {
+            return $timeout(function() {
+              // retry
+              return exports.raw.getHttpWithRetryIfLimitation(exec);
+            }, exports.constants.LIMIT_REQUEST_DELAY);
+          }
+        });
+    };
+
+    exports.blockchain.lastUd = function() {
+      return exports.blockchain.stats.ud()
+        .then(function(res) {
+          if (!res.result.blocks || !res.result.blocks.length) {
+            return null;
+          }
+          var lastBlockWithUD = res.result.blocks[res.result.blocks.length - 1];
+          return exports.blockchain.block({block: lastBlockWithUD})
+            .then(function(block){
+              return (block.unitbase > 0) ? block.dividend * Math.pow(10, block.unitbase) : block.dividend;
+            });
+        });
+    };
+
+    exports.uri.parse = function(uri) {
+      return $q(function(resolve, reject) {
+        var pubkey;
+
+        // If pubkey: not need to parse
+        if (exact(regexp.PUBKEY).test(uri)) {
+          resolve({
+            pubkey: uri
+          });
+        }
+        // If pubkey+checksum
+        else if (exact(regexp.PUBKEY_WITH_CHECKSUM).test(uri)) {
+          console.debug("[BMA.parse] Detecting a pubkey with checksum: " + uri);
+          var matches = exports.regexp.PUBKEY_WITH_CHECKSUM.exec(uri);
+          pubkey = matches[1];
+          var checksum = matches[2];
+          console.debug("[BMA.parse] Detecting a pubkey {"+pubkey+"} with checksum {" + checksum + "}");
+          var expectedChecksum = csCrypto.util.pkChecksum(pubkey);
+          console.debug("[BMA.parse] Expecting checksum for pubkey is {" + expectedChecksum + "}");
+          if (checksum != expectedChecksum) {
+            reject( {message: 'ERROR.PUBKEY_INVALID_CHECKSUM'});
+          }
+          else {
+            resolve({
+              pubkey: pubkey
+            });
+          }
+        }
+        else if(uri.startsWith('duniter://')) {
+          var parser = csHttp.uri.parse(uri),
+            uid,
+            currency = parser.host.indexOf('.') === -1 ? parser.host : null,
+            host = parser.host.indexOf('.') !== -1 ? parser.host : null;
+          if (parser.username) {
+            if (parser.password) {
+              uid = parser.username;
+              pubkey = parser.password;
+            }
+            else {
+              pubkey = parser.username;
+            }
+          }
+          if (parser.pathname) {
+            var paths = parser.pathname.split('/');
+            var pathCount = !paths ? 0 : paths.length;
+            var index = 0;
+            if (!currency && pathCount > index) {
+              currency = paths[index++];
+            }
+            if (!pubkey && pathCount > index) {
+              pubkey = paths[index++];
+            }
+            if (!uid && pathCount > index) {
+              uid = paths[index++];
+            }
+            if (pathCount > index) {
+              reject( {message: 'Bad Duniter URI format. Invalid path (incomplete or redundant): '+ parser.pathname}); return;
+            }
+          }
+
+          if (!currency){
+            if (host) {
+              csHttp.get(host + '/blockchain/parameters')()
+              .then(function(parameters){
+                resolve({
+                  uid: uid,
+                  pubkey: pubkey,
+                  host: host,
+                  currency: parameters.currency
+                });
+              })
+              .catch(function(err) {
+                console.error(err);
+                reject({message: 'Could not get node parameter. Currency could not be retrieve'});
+              });
+            }
+            else {
+              reject({message: 'Bad Duniter URI format. Missing currency name (or node address).'}); return;
+            }
+          }
+          else {
+            if (!host) {
+              resolve({
+                uid: uid,
+                pubkey: pubkey,
+                currency: currency
+              });
+            }
+
+            // Check if currency are the same (between node and uri)
+            return csHttp.get(host + '/blockchain/parameters')()
+              .then(function(parameters){
+                if (parameters.currency !== currency) {
+                  reject( {message: "Node's currency ["+parameters.currency+"] does not matched URI's currency ["+currency+"]."}); return;
+                }
+                resolve({
+                  uid: uid,
+                  pubkey: pubkey,
+                  host: host,
+                  currency: currency
+                });
+              })
+              .catch(function(err) {
+                console.error(err);
+                reject({message: 'Could not get node parameter. Currency could not be retrieve'});
+              });
+          }
+        }
+        else {
+          console.debug("[BMA.parse] Could not parse URI: " + uri);
+          reject({message: 'ERROR.UNKNOWN_URI_FORMAT'});
+        }
+      })
+
+      // Check values against regex
+      .then(function(result) {
+        if (!result) return;
+        if (result.pubkey && !(exact(regexp.PUBKEY).test(result.pubkey))) {
+          throw {message: "Invalid pubkey format [" + result.pubkey + "]"};
+        }
+        if (result.uid && !(exact(regexp.USER_ID).test(result.uid))) {
+          throw {message: "Invalid uid format [" + result.uid + "]"};
+        }
+        if (result.currency && !(exact(regexp.CURRENCY).test(result.currency))) {
+          throw {message: "Invalid currency format ["+result.currency+"]"};
+        }
+        return result;
+      });
+    };
+
+    // Define get latest release (or fake function is no URL defined)
+    var duniterLatestReleaseUrl = csSettings.data.duniterLatestReleaseUrl && csHttp.uri.parse(csSettings.data.duniterLatestReleaseUrl);
+    exports.raw.getLatestRelease = duniterLatestReleaseUrl ?
+      csHttp.getWithCache(duniterLatestReleaseUrl.host,
+        duniterLatestReleaseUrl.port,
+        "/" + duniterLatestReleaseUrl.pathname,
+        /*useSsl*/ (+(duniterLatestReleaseUrl.port) === 443 || duniterLatestReleaseUrl.protocol === 'https:' || that.forceUseSsl),
+        csCache.constants.LONG
+      ) :
+      // No URL define: use a fake function
+      function() {
+        return $q.when();
+      };
+
+    exports.version.latest = function() {
+      return exports.raw.getLatestRelease()
+        .then(function (json) {
+          if (!json) return;
+          if (json.name && json.html_url) {
+            return {
+              version: json.name,
+              url: json.html_url
+            };
+          }
+          if (json.tag_name && json.html_url) {
+            return {
+              version: json.tag_name.substring(1),
+              url: json.html_url
+            };
+          }
+        })
+        .catch(function(err) {
+          // silent (just log it)
+          console.error('[BMA] Failed to get Duniter latest version', err);
+        });
+    };
+
+    exports.websocket = {
+        block: ws('/ws/block'),
+        peer: ws('/ws/peer'),
+        close : closeWs
+      };
+
+    angular.merge(that, exports);
+  }
+
+  var service = new BMA();
+
+  service.instance = function(host, port, useSsl, useCache) {
+    useCache = angular.isDefined(useCache) ? useCache : false; // No cache by default
+    return new BMA(host, port, useSsl, useCache);
+  };
+
+  service.lightInstance = function(host, port, useSsl, timeout) {
+    port = port || 80;
+    useSsl = angular.isDefined(useSsl) ? useSsl : (port == 443);
+    return {
+      host: host,
+      port: port,
+      useSsl: useSsl,
+      url: csHttp.getUrl(host, port, ''/*no path*/, useSsl),
+      node: {
+        summary: csHttp.getWithCache(host, port, '/node/summary', useSsl, csCache.constants.MEDIUM, false/*autoRefresh*/, timeout)
+      },
+      network: {
+        peering: {
+          self: csHttp.get(host, port, '/network/peering', useSsl, timeout)
+        },
+        peers: csHttp.get(host, port, '/network/peers', useSsl, timeout)
+      },
+      blockchain: {
+        current: csHttp.get(host, port, '/blockchain/current', useSsl, timeout),
+        stats: {
+          hardship: csHttp.get(host, port, '/blockchain/hardship/:pubkey', useSsl, timeout)
+        }
+      }
+    };
+  };
+
+  // default action
+  //service.start();
+
+  return service;
+}])
+
+;
+
+
+angular.module('cesium.wot.services', ['ngApi', 'cesium.bma.services', 'cesium.crypto.services', 'cesium.utils.services',
+  'cesium.settings.services'])
+
+.factory('csWot', ['$rootScope', '$q', '$timeout', 'BMA', 'Api', 'CacheFactory', 'UIUtils', 'csConfig', 'csCurrency', 'csSettings', 'csCache', function($rootScope, $q, $timeout, BMA, Api, CacheFactory, UIUtils, csConfig, csCurrency, csSettings, csCache) {
+  'ngInject';
+
+
+  var
+    api = new Api(this, "csWot"),
+    cachePrefix = 'csWot-',
+    identityCache = csCache.get(cachePrefix + 'idty-', csCache.constants.MEDIUM),
+    requirementsCache = csCache.get(cachePrefix + 'requirements-', csCache.constants.MEDIUM),
+
+    // Add id, and remove duplicated id
+    _addUniqueIds = function(idties) {
+      var idtyKeys = {};
+      return idties.reduce(function(res, idty) {
+        idty.id = idty.id || idty.uid + '-' + idty.pubkey;
+        if (!idtyKeys[idty.id]) {
+          idtyKeys[idty.id] = true;
+          return res.concat(idty);
+        }
+        return res;
+      }, []);
+    },
+
+    _sortAndSliceIdentities = function(idties, offset, size) {
+      offset = offset || 0;
+
+      // Add unique ids
+      idties = _addUniqueIds(idties);
+
+      // Sort by block and
+      idties = _.sortBy(idties, function(idty){
+        var score = 1;
+        score += (1000000 * (idty.block));
+        score += (10      * (900 - idty.uid.toLowerCase().charCodeAt(0)));
+        return -score;
+      });
+      if (angular.isDefined(size) && idties.length > size) {
+        idties = idties.slice(offset, offset+size); // limit if more than expected size
+      }
+
+
+      return idties;
+    },
+
+    _sortCertifications = function(certifications) {
+      certifications = _.sortBy(certifications, function(cert){
+        var score = 1;
+        score += (1000000000000 * (cert.expiresIn ? cert.expiresIn : 0));
+        score += (10000000      * (cert.isMember ? 1 : 0));
+        score += (10            * (cert.block ? cert.block : 0));
+        return -score;
+      });
+      return certifications;
+    },
+
+    _resetRequirements = function(data) {
+      data.requirements = {
+        loaded: false,
+        meta: {},
+        hasSelf: false,
+        needSelf: true,
+        needMembership: true,
+        canMembershipOut: false,
+        needRenew: false,
+        pendingMembership: false,
+        isMember: false,
+        wasMember: false,
+        certificationCount: 0,
+        needCertifications: false,
+        needCertificationCount: 0,
+        willNeedCertificationCount: 0,
+        alternatives: undefined
+      };
+      data.blockUid = null;
+      data.isMember = false;
+      data.sigDate = null;
+      data.hasSelf = false;
+    },
+
+    _fillRequirements = function(requirements, currencyParameters) {
+      // Add useful custom fields
+      requirements.hasSelf = !!requirements.meta.timestamp;
+      requirements.needSelf = !requirements.hasSelf || requirements.meta.invalid;
+      requirements.wasMember = angular.isDefined(requirements.wasMember) ? requirements.wasMember : false; // Compat with Duniter 0.9
+      requirements.needMembership = (!requirements.revoked && requirements.membershipExpiresIn <= 0 && requirements.membershipPendingExpiresIn <= 0 && !requirements.wasMember);
+      requirements.needRenew = (!requirements.needMembership && !requirements.revoked &&
+        requirements.membershipExpiresIn <= csSettings.data.timeWarningExpireMembership &&
+        requirements.membershipPendingExpiresIn <= 0) ||
+        (requirements.wasMember && !requirements.revoked && requirements.membershipExpiresIn === 0 &&
+        requirements.membershipPendingExpiresIn === 0);
+      requirements.canMembershipOut = (!requirements.revoked && requirements.membershipExpiresIn > 0);
+      requirements.pendingMembership = (!requirements.revoked && requirements.membershipExpiresIn <= 0 && requirements.membershipPendingExpiresIn > 0);
+      requirements.isMember = (!requirements.revoked && requirements.membershipExpiresIn > 0);
+      requirements.blockUid = requirements.meta.timestamp;
+      // Force certification count to 0, is not a member yet - fix #269
+      requirements.certificationCount = ((requirements.isMember || (requirements.wasMember && !requirements.expired)) && requirements.certifications) ? requirements.certifications.length : 0;
+      requirements.willExpireCertificationCount = requirements.certifications ? requirements.certifications.reduce(function(count, cert){
+        return count + (cert.expiresIn <= csSettings.data.timeWarningExpire ? 1 : 0);
+      }, 0) : 0;
+      requirements.willExpire = requirements.willExpireCertificationCount > 0;
+      requirements.pendingRevocation = !requirements.revoked && !!requirements.revocation_sig;
+      //requirements.outdistanced = requirements.outdistanced; // outdistanced is always present in requirement - see #777
+
+      // Fix pending certifications count - Fix #624
+      if (!requirements.isMember && !requirements.wasMember) {
+        var certifiers = _.union(
+          _.pluck(requirements.pendingCerts || [], 'from'),
+          _.pluck(requirements.certifications || [], 'from')
+        );
+        requirements.pendingCertificationCount = _.size(certifiers);
+      }
+      else {
+        requirements.pendingCertificationCount = angular.isDefined(requirements.pendingCerts) ? requirements.pendingCerts.length : 0 ;
+      }
+
+      // Compute
+      requirements.needCertificationCount = (!requirements.needSelf && (requirements.certificationCount < currencyParameters.sigQty)) ?
+        (currencyParameters.sigQty - requirements.certificationCount) : 0;
+      requirements.willNeedCertificationCount = (!requirements.needMembership && !requirements.needCertificationCount &&
+      (requirements.certificationCount - requirements.willExpireCertificationCount) < currencyParameters.sigQty) ?
+        (currencyParameters.sigQty - requirements.certificationCount + requirements.willExpireCertificationCount) : 0;
+
+      // Mark as loaded - need by csWallet.isDataLoaded()
+      requirements.loaded = true;
+
+
+      return requirements;
+    },
+
+    _fillIdentitiesMeta = function(identities) {
+      if (!identities) return $q.when(identities);
+
+      var blocks = [];
+      _.forEach(identities, function(identity) {
+        var blockUid = identity.meta.timestamp.split('-', 2);
+        identity.meta.number = parseInt(blockUid[0]);
+        identity.meta.hash = blockUid[1];
+        identity.meta.sig = identity.meta.sig || identity.sig;
+        delete identity.sig;
+        blocks.push(identity.meta.number);
+      });
+
+      // Get identities blocks, to fill self and revocation time
+      return BMA.blockchain.blocks(_.uniq(blocks))
+        .then(function(blocks) {
+          _.forEach(identities, function(identity) {
+            var block = _.findWhere(blocks, {number: identity.meta.number});
+            identity.meta.time = block && block.medianTime;
+
+            // Check if self has been done on a valid block
+            if (block && identity.meta.number !== 0 && identity.meta.hash !== block.hash) {
+              identity.meta.invalid = true;
+            }
+          });
+
+          return identities;
+        })
+        .catch(function(err){
+          // Special case for currency init (root block not exists): use now
+          if (err && err.ucode == BMA.errorCodes.BLOCK_NOT_FOUND) {
+            _.forEach(identities, function(identity) {
+              if (identity.number === 0) {
+                identity.meta.time = moment().utc().unix();
+              }
+            });
+            return identities;
+          }
+          else {
+            throw err;
+          }
+        });
+    },
+
+    loadRequirements = function(inputData, withCache) {
+      if (!inputData || (!inputData.pubkey && !inputData.uid)) return $q.when(inputData);
+
+      var cacheKey =  inputData.pubkey||inputData.uid;
+      var data = (withCache !== false) ? requirementsCache.get(cacheKey) : null;
+      if (data) {
+        console.debug("[wot] Requirements " + cacheKey + " found in cache");
+        // Update data with cache
+        angular.merge(inputData, data);
+        return $q.when(data);
+      }
+      data = {pubkey: inputData.pubkey, uid: inputData.uid};
+
+      // Alert user, when request is too long (> 2s)
+      $timeout(function() {
+        if (!data.requirements || !data.requirements.loaded) UIUtils.loading.update({template: "COMMON.LOADING_WAIT"});
+      }, 2000);
+
+      var now = Date.now();
+      return $q.all([
+        // Get currency
+        csCurrency.get(),
+
+        // Get requirements
+        BMA.wot.requirements({pubkey: data.pubkey||data.uid}, false/*no cache*/)
+          .then(function(res) {
+            return _fillIdentitiesMeta(res && res.identities);
+          })
+      ])
+        .then(function(res){
+          var currency = res[0];
+          var identities = res[1];
+
+          if (!identities || !identities.length) return;
+
+          // Sort to select the best identity
+          if (identities.length > 1) {
+            // Select the best identity, by sorting using this order
+            //  - same wallet uid
+            //  - is member
+            //  - has a pending membership
+            //  - is not expired (in sandbox)
+            //  - is not outdistanced
+            //  - if has certifications
+            //      max(count(certification)
+            //    else
+            //      max(membershipPendingExpiresIn) = must recent membership
+            identities = _.sortBy(identities, function(idty) {
+              var score = 0;
+              score += (1000000000000* ((data.uid && idty.uid === data.uid) ? 1 : 0));
+              score += (100000000000 * (!idty.meta.invalid ? 1 : 0));
+              score += (10000000000  * ((data.blockUid && idty.meta.timestamp && idty.meta.timestamp === data.blockUid) ? 1 : 0));
+              score += (1000000000   * (idty.membershipExpiresIn > 0 ? 1 : 0));
+              score += (100000000    * (idty.membershipPendingExpiresIn > 0 ? 1 : 0));
+              score += (10000000     * (!idty.expired ? 1 : 0));
+              score += (1000000      * (!idty.outdistanced ? 1 : 0));
+              score += (100000       * (idty.wasMember ? 1 : 0));
+              var certCount = !idty.expired && idty.certifications ? idty.certifications.length : 0;
+              score += (1            * (certCount ? certCount : 0));
+              score += (1            * (!certCount && idty.membershipPendingExpiresIn > 0 ? idty.membershipPendingExpiresIn/1000 : 0));
+              return -score;
+            });
+            console.debug('[wot] Found {0} identities (in requirements). Will selected the best one'.format(identities.length));
+          }
+
+          // Select the first identity
+          data.requirements = _fillRequirements(identities[0], currency.parameters);
+
+          // Copy some useful properties into data
+          data.pubkey = data.requirements.pubkey;
+          data.uid = data.requirements.uid;
+          data.isMember =  data.requirements.isMember;
+          data.blockUid =  data.requirements.meta &&  data.requirements.meta.timestamp;
+          data.hasSelf =  data.requirements.hasSelf;
+          data.sigDate =  data.requirements.meta && data.requirements.meta.time;
+
+          // Prepare alternatives identities if any
+          if (!data.requirements.isMember && !data.requirements.wasMember && identities.length > 1) {
+            data.requirements.alternatives = identities.splice(1);
+            _.forEach(data.requirements.alternatives, function(requirements) {
+              _fillRequirements(requirements, currency.parameters);
+            });
+          }
+
+          /// Save to cache
+          requirementsCache.put(cacheKey, data);
+
+          angular.merge(inputData, data); // Update the input data
+
+          console.debug("[wot] Requirements for '{0}' loaded in {1}ms".format((data.pubkey && data.pubkey.substring(0,8))||data.uid, Date.now() - now));
+
+          return inputData;
+        })
+        .catch(function(err) {
+          data.requirements = {loaded: true}; // Mark has loaded - need by the previous $timeout
+          _resetRequirements(inputData);
+          // If not a member: continue
+          if (!!err &&
+              (err.ucode == BMA.errorCodes.NO_MATCHING_MEMBER ||
+               err.ucode == BMA.errorCodes.NO_IDTY_MATCHING_PUB_OR_UID)) {
+            inputData.requirements.loaded = true;
+            return inputData;
+          }
+          throw err;
+        });
+    },
+
+    loadIdentityByLookup = function(pubkey, uid) {
+      var data = {
+        pubkey: pubkey,
+        uid: uid,
+        hasSelf: false
+      };
+      return BMA.wot.lookup({ search: pubkey||uid })
+        .then(function(res){
+          var identities = res.results.reduce(function(idties, res) {
+            return idties.concat(res.uids.reduce(function(uids, idty) {
+              var blockUid = idty.meta.timestamp.split('-', 2);
+              var blockNumber = parseInt(blockUid[0]);
+              return uids.concat({
+                uid: idty.uid,
+                pubkey: res.pubkey,
+                meta: {
+                  timestamp: idty.meta.timestamp,
+                  number: blockNumber,
+                  hash: blockUid[1],
+                  sig: idty.self
+                },
+                revoked: idty.revoked,
+                revoked_on: idty.revoked_on
+              });
+            }, []));
+          }, []);
+
+          // Fill identities meta (self)
+          return _fillIdentitiesMeta(identities)
+            .then(function(identities) {
+              return {
+                identities: identities,
+                results: res.results
+              };
+            });
+        })
+        .then(function(res){
+          var identities = res.identities;
+
+          // Sort identities if need
+          if (identities.length > 1) {
+            // Select the best identity, by sorting using this order
+            //  - valid block
+            //  - same given uid
+            //  - not revoked
+            //  - max(block_number)
+            res.identities = _.sortBy(identities, function(idty) {
+              var score = 0;
+              score += (100000000000 * ((data.uid && idty.uid === data.uid) ? 1 : 0));
+              score += (10000000000  * (!idty.meta.invalid ? 1 : 0));
+              score += (1000000000  * ((data.blockUid && idty.meta.timestamp && idty.meta.timestamp === data.blockUid) ? 1 : 0));
+              score += (100000000   * (!idty.revoked ? 1 : 0));
+              score += (1            * (idty.meta.number ? idty.meta.number : 0) / 1000);
+              return -score;
+            });
+            console.debug('[wot] Found {0} identities (in lookup). Will selected the best one'.format(identities.length));
+          }
+
+          // Prepare alternatives identities
+          _.forEach(identities, function(idty) {
+            idty.hasSelf = !!(idty.uid && idty.meta.timestamp && idty.meta.sig);
+          });
+
+          // Select the first identity
+          data.requirements = identities[0];
+
+          // Copy some useful properties into data
+          data.pubkey = data.requirements.pubkey;
+          data.uid = data.requirements.uid;
+          data.blockUid = data.requirements.meta && data.requirements.meta.timestamp;
+          data.hasSelf = data.requirements.hasSelf;
+          data.sigDate =  data.requirements.meta && data.requirements.meta.time;
+
+          if (identities.length > 1) {
+            data.requirements.alternatives = identities.splice(1);
+          }
+
+          // Store additional data (e.g. certs)
+          data.lookup = {};
+
+          // Store received certifications (can be usefull later)
+          var certPubkeys = {};
+          data.lookup.certifications = (res.results || []).reduce(function(certsMap, res) {
+            return res.uids.reduce(function(certsMap, idty) {
+              var idtyFullKey = idty.uid + '-' + (idty.meta ? idty.meta.timestamp : '');
+              certsMap[idtyFullKey] = (idty.others||[]).reduce(function(certs, cert) {
+                var certFullKey = idtyFullKey + '-' + cert.pubkey;
+                var result = {
+                  pubkey: cert.pubkey,
+                  uid: cert.uids[0],
+                  cert_time:  {
+                    block: (cert.meta && cert.meta.block_number)  ? cert.meta.block_number : 0,
+                    block_hash: (cert.meta && cert.meta.block_hash)  ? cert.meta.block_hash : null
+                  },
+                  isMember: cert.isMember,
+                  wasMember: cert.wasMember,
+                };
+                if (!certPubkeys[certFullKey]) {
+                  certPubkeys[certFullKey] = result;
+                }
+                else { // if duplicated cert: keep the most recent
+                  if (result.cert_time.block > certPubkeys[certFullKey].cert_time.block) {
+                    certPubkeys[certFullKey] = result;
+                    certs.splice(_.findIndex(certs, {pubkey: cert.pubkey}), 1, result);
+                    return certs;
+                  }
+                  else {
+                    return certs; // skip this cert
+                  }
+                }
+                return certs.concat(result);
+              }, []);
+              return certsMap;
+            }, certsMap);
+          }, {});
+
+          // Store given certifications
+          certPubkeys = {};
+          data.lookup.givenCertifications = (res.results || []).reduce(function(certs, res) {
+            return (res.signed || []).reduce(function(certs, cert) {
+              var result = {
+                pubkey: cert.pubkey,
+                uid: cert.uid,
+                cert_time:  {
+                  block: (cert.cert_time && cert.cert_time.block)  ? cert.cert_time.block : 0,
+                  block_hash: (cert.cert_time && cert.cert_time.block_hash)  ? cert.cert_time.block_hash : null
+                },
+                sigDate: cert.meta ? cert.meta.timestamp : null,
+                isMember: cert.isMember,
+                wasMember: cert.wasMember
+              };
+              if (!certPubkeys[cert.pubkey]) {
+                certPubkeys[cert.pubkey] = result;
+              }
+              else { // if duplicated cert: keep the most recent
+                if (result.block > certPubkeys[cert.pubkey].block) {
+                  certPubkeys[cert.pubkey] = result;
+                  // TODO: Replace the existing one ? May be not, to be able to see renewal
+                  // (see issue #806)
+                  //  If yes (need to replace), check this code works:
+                  //certs.splice(_.findIndex(certs, {pubkey: cert.pubkey}), 1, result);
+                  //return certs;
+                }
+                else {
+                  return certs; // skip this cert
+                }
+              }
+              return certs.concat(result);
+            }, certs);
+          }, []);
+
+          return data;
+        })
+        .catch(function(err) {
+          if (!!err && err.ucode == BMA.errorCodes.NO_MATCHING_IDENTITY) { // Identity not found (if no self)
+            _resetRequirements(data);
+            return data;
+          }
+          else {
+            throw err;
+          }
+        });
+    },
+
+    loadCertifications = function(getFunction, pubkey, lookupCertifications, parameters, medianTime, certifiersOf) {
+
+      function _certId(pubkey, block) {
+        return pubkey + '-' + block;
+      }
+
+      // TODO : remove this later (when all node will use duniter v0.50+)
+      var lookupHasCertTime = true; // Will be set ti FALSE before Duniter v0.50
+      var lookupCerticationsByCertId = lookupCertifications ? lookupCertifications.reduce(function(res, cert){
+        var certId = _certId(cert.pubkey, cert.cert_time ? cert.cert_time.block : cert.sigDate);
+        if (!cert.cert_time) lookupHasCertTime = false;
+        res[certId] = cert;
+        return res;
+      }, {}) : {};
+
+      var isMember = true;
+
+      return getFunction({ pubkey: pubkey })
+        .then(function(res) {
+          return (res && res.certifications || []).reduce(function (res, cert) {
+            // Rappel :
+            //   cert.sigDate = blockstamp de l'identité
+            //   cert.cert_time.block : block au moment de la certification
+            //   cert.written.number : block où la certification est écrite
+
+            var pending = !cert.written;
+            var certTime = cert.cert_time ? cert.cert_time.medianTime : null;
+            var expiresIn = (!certTime) ? 0 : (pending ?
+              (certTime + parameters.sigWindow - medianTime) :
+              (certTime + parameters.sigValidity - medianTime));
+            expiresIn = (expiresIn < 0) ? 0 : expiresIn;
+            // Remove from lookup certs
+            var certId = _certId(cert.pubkey, lookupHasCertTime && cert.cert_time ? cert.cert_time.block : cert.sigDate);
+            delete lookupCerticationsByCertId[certId];
+
+            // Add to result list
+            return res.concat({
+              pubkey: cert.pubkey,
+              uid: cert.uid,
+              time: certTime,
+              isMember: cert.isMember,
+              wasMember: cert.wasMember,
+              expiresIn: expiresIn,
+              willExpire: (expiresIn && expiresIn <= csSettings.data.timeWarningExpire),
+              pending: pending,
+              block: (cert.written !== null) ? cert.written.number :
+                (cert.cert_time ? cert.cert_time.block : null),
+              valid: (expiresIn > 0)
+            });
+          }, []);
+        })
+        .catch(function(err) {
+          if (!!err && err.ucode == BMA.errorCodes.NO_MATCHING_MEMBER) { // member not found
+            isMember = false;
+            return []; // continue (append pendings cert if exists in lookup)
+          }
+          /*FIXME: workaround for Duniter issue #1309 */
+          else if (!!err && err.ucode == 1002) {
+            console.warn("[wallet-service] Detecting Duniter issue #1309 ! Applying workaround... ");
+            isMember = false;
+            return []; // not found
+          }
+          else {
+            throw err;
+          }
+        })
+
+        // Add pending certs (found in lookup - see loadIdentityByLookup())
+        .then(function(certifications) {
+          var pendingCertifications = _.values(lookupCerticationsByCertId);
+          if (!pendingCertifications.length) return certifications; // No more pending continue
+
+          // Special case for initPhase - issue #
+          if (csCurrency.data.initPhase) {
+            return pendingCertifications.reduce(function(res, cert) {
+              return res.concat({
+                pubkey: cert.pubkey,
+                uid: cert.uid,
+                isMember: cert.isMember,
+                wasMember: cert.wasMember,
+                time: null,
+                expiresIn: parameters.sigWindow,
+                willExpire: false,
+                pending: true,
+                block: 0,
+                valid: true
+              });
+            }, certifications);
+          }
+
+          var pendingCertByBlocks = pendingCertifications.reduce(function(res, cert){
+            var block = lookupHasCertTime && cert.cert_time ? cert.cert_time.block :
+              (cert.sigDate ? cert.sigDate.split('-')[0] : null);
+            if (angular.isDefined(block)) {
+              if (!res[block]) {
+                res[block] = [cert];
+              }
+              else {
+                res[block].push(cert);
+              }
+            }
+            return res;
+          }, {});
+
+          // Set time to pending cert, from blocks
+          return BMA.blockchain.blocks(_.keys(pendingCertByBlocks)).then(function(blocks){
+            certifications = blocks.reduce(function(res, block){
+              return res.concat(pendingCertByBlocks[block.number].reduce(function(res, cert) {
+                var certTime = block.medianTime;
+                var expiresIn = Math.max(0, certTime + parameters.sigWindow - medianTime);
+                var validBuid = (!cert.cert_time || !cert.cert_time.block_hash || cert.cert_time.block_hash == block.hash);
+                if (!validBuid) {
+                  console.debug("[wot] Invalid cert {0}: block hash changed".format(cert.pubkey.substring(0,8)));
+                }
+                var valid = (expiresIn > 0) && (!certifiersOf || cert.isMember) && validBuid;
+                return res.concat({
+                  pubkey: cert.pubkey,
+                  uid: cert.uid,
+                  isMember: cert.isMember,
+                  wasMember: cert.wasMember,
+                  time: certTime,
+                  expiresIn: expiresIn,
+                  willExpire: (expiresIn && expiresIn <= csSettings.data.timeWarningExpire),
+                  pending: true,
+                  block: lookupHasCertTime && cert.cert_time ? cert.cert_time.block :
+                  (cert.sigDate ? cert.sigDate.split('-')[0] : null),
+                  valid: valid
+                });
+              }, []));
+            }, certifications);
+            return certifications;
+          });
+        })
+
+        // Sort and return result
+        .then(function(certifications) {
+
+          // Remove pending cert duplicated with a written & valid cert
+          var writtenCertByPubkey = certifications.reduce(function(res, cert) {
+            if (!cert.pending && cert.valid && cert.expiresIn >= parameters.sigWindow) {
+              res[cert.pubkey] = true;
+            }
+            return res;
+          }, {});
+
+          // Final sort
+          certifications = _sortCertifications(certifications);
+
+          // Split into valid/pending/error
+          var pendingCertifications = [];
+          var errorCertifications = [];
+          var validCertifications = certifications.reduce(function(res, cert) {
+            if (cert.pending) {
+              if (cert.valid && !writtenCertByPubkey[cert.pubkey]) {
+                pendingCertifications.push(cert);
+              }
+              else if (!cert.valid && !writtenCertByPubkey[cert.pubkey]){
+                errorCertifications.push(cert);
+              }
+              return res;
+            }
+            return res.concat(cert);
+          }, []);
+
+          return {
+            valid: validCertifications,
+            pending: pendingCertifications,
+            error: errorCertifications
+          };
+        })
+        ;
+    },
+
+    // Add events on given account
+    addEvents = function(data) {
+
+      if (data.requirements.revoked) {
+        delete data.requirements.meta.invalid;
+        if (data.requirements.revoked_on) {
+          addEvent(data, {type: 'error', message: 'ERROR.IDENTITY_REVOKED_WITH_TIME', messageParams: {revocationTime: data.requirements.revoked_on}});
+          console.debug("[wot] Identity [{0}] has been revoked on {1}".format(data.uid, data.requirements.revoked_on));
+        }
+        else {
+          addEvent(data, {type: 'error', message: 'ERROR.IDENTITY_REVOKED'});
+          console.debug("[wot] Identity [{0}] has been revoked".format(data.uid));
+        }
+      }
+      else if (data.requirements.pendingRevocation) {
+        delete data.requirements.meta.invalid;
+        addEvent(data, {type:'error', message: 'ERROR.IDENTITY_PENDING_REVOCATION'});
+        console.debug("[wot] Identity [{0}] has pending revocation".format(data.uid));
+      }
+      else if (data.requirements.meta && data.requirements.meta.invalid) {
+        if (!data.isMember) {
+          addEvent(data, {type: 'error', message: 'ERROR.IDENTITY_INVALID_BLOCK_HASH'});
+          console.debug("[wot] Invalid membership for uid {0}: block hash changed".format(data.uid));
+        }
+      }
+      else if (data.requirements.expired) {
+        addEvent(data, {type: 'error', message: 'ERROR.IDENTITY_EXPIRED'});
+        console.debug("[wot] Identity {0} expired (in sandbox)".format(data.uid));
+      }
+      else if (data.requirements.willNeedCertificationCount > 0) {
+        addEvent(data, {type: 'error', message: 'INFO.IDENTITY_WILL_MISSING_CERTIFICATIONS', messageParams: data.requirements});
+        console.debug("[wot] Identity {0} will need {1} certification(s)".format(data.uid, data.requirements.willNeedCertificationCount));
+      }
+      else if (!data.requirements.needSelf && data.requirements.needMembership) {
+        addEvent(data, {type: 'error', message: 'INFO.IDENTITY_NEED_MEMBERSHIP'});
+        console.debug("[wot] Identity {0} has a self but no membership".format(data.uid));
+      }
+      if (!data.isMember && data.requirements.alternatives) {
+        addEvent(data, {type: 'info', message: 'INFO.HAS_ALTERNATIVE_IDENTITIES'});
+      }
+    },
+
+    loadData = function(pubkey, uid, options) {
+
+      options = options || {};
+      var data;
+
+      if (!pubkey && uid && !options.force) {
+        return BMA.wot.member.getByUid(uid)
+          .then(function(member) {
+            if (member) return loadData(member.pubkey, member.uid, options); // recursive call, with a pubkey
+            //throw {message: 'NOT_A_MEMBER'};
+            var options = angular.copy(options || {});
+            options.force = true;
+            return loadData(pubkey, uid, options); // Loop with force=true
+          });
+      }
+
+      // Check cached data
+      if (pubkey) {
+        data = (options.cache !== false) ? identityCache.get(pubkey) : null;
+        if (data && (!uid || data.uid === uid) && (!options.blockUid || data.blockUid === options.blockUid)) {
+          console.debug("[wot] Identity {{0}} found in cache".format(pubkey.substring(0, 8)));
+          return $q.when(data);
+        }
+        console.debug("[wot] Loading identity {{0}}...".format(pubkey.substring(0, 8)));
+        data = {
+          pubkey: pubkey,
+          uid: uid
+        };
+      }
+      else {
+        console.debug("[wot] Loading identity from uid {{0}}...".format(uid));
+        data = {
+          uid: uid
+        };
+      }
+      if (options.blockUid) {
+        data.blockUid = options.blockUid;
+      }
+
+      var now = Date.now();
+      var parameters;
+      var medianTime;
+
+      return $q.all([
+
+          // Get parameters
+          csCurrency.parameters()
+            .then(function(res) {
+              parameters = res;
+            }),
+
+          // Get current time
+          csCurrency.blockchain.current(true)
+            .then(function(current) {
+              medianTime = current.medianTime;
+            })
+            .catch(function(err){
+              // Special case for currency init (root block not exists): use now
+              if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+                medianTime = moment.utc().unix();
+              }
+              else {
+                throw err;
+              }
+            }),
+
+          // Get requirements
+          loadRequirements(data, options.cache !== false),
+
+          // Get identity using lookup
+          loadIdentityByLookup(pubkey, uid)
+
+        ])
+        .then(function(res) {
+          var dataByLookup = res[3];
+
+          // If no requirements found: copy from lookup data
+          if (!data.requirements.uid) {
+            console.debug("[wot] No requirements found: using data from lookup");
+            angular.merge(data, dataByLookup);
+            delete data.lookup; // not need
+            return;
+          }
+
+          var idtyFullKey = data.requirements.uid + '-' + data.requirements.meta.timestamp;
+
+          return $q.all([
+            // Get received certifications
+            loadCertifications(BMA.wot.certifiersOf, data.pubkey, dataByLookup.lookup ? dataByLookup.lookup.certifications[idtyFullKey] : null, parameters, medianTime, true /*certifiersOf*/)
+              .then(function (res) {
+                data.received_cert = res.valid;
+                data.received_cert_pending = res.pending;
+                data.received_cert_error = res.error;
+              }),
+
+            // Get given certifications
+            loadCertifications(BMA.wot.certifiedBy, data.pubkey, dataByLookup.lookup ? dataByLookup.lookup.givenCertifications : null, parameters, medianTime, false/*certifiersOf*/)
+              .then(function (res) {
+                data.given_cert = res.valid;
+                data.given_cert_pending = res.pending;
+                data.given_cert_error = res.error;
+              })
+          ]);
+        })
+        .then(function() {
+
+          // Add compute some additional requirements (that required all data like certifications)
+          data.requirements.pendingCertificationCount = data.received_cert_pending ? data.received_cert_pending.length : data.requirements.pendingCertificationCount;
+          // Use /wot/lookup.revoked when requirements not filled
+          data.requirements.revoked = angular.isDefined(data.requirements.revoked) ? data.requirements.revoked : data.revoked;
+
+          // Add account events
+          addEvents(data);
+
+          // API extension
+          return api.data.raisePromise.load(data)
+            .catch(function(err) {
+              console.debug('Error while loading identity data, on extension point.');
+              console.error(err);
+            });
+        })
+        .then(function() {
+          if (!data.pubkey) return undefined; // not found
+          identityCache.put(data.pubkey, data); // add to cache
+          console.debug('[wot] Identity '+ data.pubkey.substring(0, 8) +' loaded in '+ (Date.now()-now) +'ms');
+          return data;
+        });
+    },
+
+    search = function(text, options) {
+      if (!text || text.trim() !== text) {
+        return $q.when(undefined);
+      }
+
+      // Remove first special characters (to avoid request error)
+      var safeText = text.replace(/(^|\s)#\w+/g, ''); // remove tags
+      safeText = safeText.replace(/[^a-zA-Z0-9_-\s]+/g, '');
+      safeText = safeText.replace(/\s+/g, ' ').trim();
+
+      options = options || {};
+      options.addUniqueId = angular.isDefined(options.addUniqueId) ? options.addUniqueId : true;
+      options.allowExtension = angular.isDefined(options.allowExtension) ? options.allowExtension : true;
+      options.excludeRevoked = angular.isDefined(options.excludeRevoked) ? options.excludeRevoked : false;
+
+      var promise;
+      if (!safeText) {
+        promise = $q.when([]);
+      }
+      else {
+        promise = $q.all(
+          safeText.split(' ').reduce(function(res, text) {
+            console.debug('[wot] Will search on: \'' + text + '\'');
+            return res.concat(BMA.wot.lookup({ search: text }));
+          }, [])
+        ).then(function(res){
+            return res.reduce(function(idties, res) {
+              return idties.concat(res.results.reduce(function(idties, res) {
+                return idties.concat(res.uids.reduce(function(uids, idty) {
+                  var blocUid = idty.meta.timestamp.split('-', 2);
+                  var revoked = !idty.revoked && idty.revocation_sig;
+                  if (!options.excludeRevoked || !revoked) {
+                    return uids.concat({
+                      uid: idty.uid,
+                      pubkey: res.pubkey,
+                      number: blocUid[0],
+                      hash: blocUid[1],
+                      revoked: revoked
+                    });
+                  }
+                  return uids;
+                }, []));
+              }, []));
+            }, []);
+          })
+          .catch(function(err) {
+            if (err && err.ucode == BMA.errorCodes.NO_MATCHING_IDENTITY) {
+              return [];
+            }
+            else {
+              throw err;
+            }
+          });
+      }
+
+      return promise
+        .then(function(idties) {
+          if (!options.allowExtension) {
+            // Add unique id (if enable)
+            return options.addUniqueId ? _addUniqueIds(idties) : idties;
+          }
+          var lookupResultCount = idties.length;
+          // call extension point
+          return api.data.raisePromise.search(text, idties, 'pubkey')
+            .then(function() {
+
+              // Make sure to add uid to new results - fix #488
+              if (idties.length > lookupResultCount) {
+                var idtiesWithoutUid = _.filter(idties, function(idty) {
+                  return !idty.uid && idty.pubkey;
+                });
+                if (idtiesWithoutUid.length) {
+                  return BMA.wot.member.uids()
+                    .then(function(uids) {
+                      _.forEach(idties, function(idty) {
+                        if (!idty.uid && idty.pubkey) {
+                          idty.uid = uids[idty.pubkey];
+                        }
+                      });
+                    });
+                }
+              }
+            })
+            .then(function() {
+              // Add unique id (if enable)
+              return options.addUniqueId ? _addUniqueIds(idties) : idties;
+            });
+        });
+    },
+
+    getNewcomers = function(offset, size) {
+      offset = offset || 0;
+      size = size || 20;
+      var total;
+      return $q.all([
+          csCurrency.blockchain.current(true)
+            .then(function(block) {
+              total = block.membersCount || 0;
+            }),
+          BMA.blockchain.stats.newcomers()
+        ])
+        .then(function(res) {
+          res = res[1];
+          if (!res || !res.result || !res.result.blocks || !res.result.blocks.length) return null; // no result
+          var blocks = _.sortBy(res.result.blocks, function (n) {
+            return -n;
+          });
+          return getNewcomersRecursive(blocks, 0, 5, offset+size);
+        })
+        .then(function(idties){
+          if (!idties || !idties.length) {
+            return null;
+          }
+          idties = _sortAndSliceIdentities(idties, offset, size);
+
+          // Extension point
+          return extendAll(idties, 'pubkey', true/*skipAddUid*/);
+        })
+        .then(function(idties) {
+          return {
+            hits: idties,
+            total: total
+          };
+        });
+    },
+
+
+    getNewcomersRecursive = function(blocks, offset, size, maxResultSize) {
+      return $q(function(resolve, reject) {
+        var result = [];
+        var jobs = [];
+        _.each(blocks.slice(offset, offset+size), function(number) {
+          jobs.push(
+            BMA.blockchain.block({block: number})
+              .then(function(block){
+                if (!block || !block.joiners) return;
+                _.each(block.joiners, function(joiner){
+                  var parts = joiner.split(':');
+                  var idtyKey = parts[parts.length-1]/*uid*/ + '-' + parts[0]/*pubkey*/;
+                  result.push({
+                    id: idtyKey,
+                    uid: parts[parts.length-1],
+                    pubkey:parts[0],
+                    memberDate: block.medianTime,
+                    block: block.number
+                  });
+                });
+              })
+          );
+        });
+
+        $q.all(jobs)
+          .then(function() {
+            if (result.length < maxResultSize && offset < blocks.length - 1) {
+              $timeout(function() {
+                getNewcomersRecursive(blocks, offset+size, size, maxResultSize - result.length)
+                  .then(function(res) {
+                    resolve(result.concat(res));
+                  })
+                  .catch(function(err) {
+                    reject(err);
+                  });
+              }, 1000);
+            }
+            else {
+              resolve(result);
+            }
+          })
+          .catch(function(err){
+            if (err && err.ucode === BMA.errorCodes.HTTP_LIMITATION) {
+              resolve(result);
+            }
+            else {
+              reject(err);
+            }
+          });
+      });
+    },
+
+    getPending = function(offset, size) {
+      offset = offset || 0;
+      size = size || 20;
+      var now = Date.now();
+      return $q.all([
+        BMA.wot.member.uids(),
+        BMA.wot.member.pending()
+          .then(function(res) {
+            return (res.memberships && res.memberships.length) ? res.memberships : undefined;
+          })
+        ])
+        .then(function(res) {
+          var uids = res[0];
+          var memberships = res[1];
+          if (!memberships) return;
+
+          var idtiesByBlock = {};
+          var idtiesByPubkey = {};
+          _.forEach(memberships, function(ms){
+            if (ms.membership == 'IN' && !uids[ms.pubkey]) {
+              var idty = {
+                uid: ms.uid,
+                pubkey: ms.pubkey,
+                block: ms.blockNumber,
+                blockHash: ms.blockHash
+              };
+              var otherIdtySamePubkey = idtiesByPubkey[ms.pubkey];
+              if (otherIdtySamePubkey && idty.block > otherIdtySamePubkey.block) {
+                return; // skip
+              }
+              idtiesByPubkey[idty.pubkey] = idty;
+              if (!idtiesByBlock[idty.block]) {
+                idtiesByBlock[idty.block] = [idty];
+              }
+              else {
+                idtiesByBlock[idty.block].push(idty);
+              }
+
+              // Remove previous idty from map
+              if (otherIdtySamePubkey) {
+                idtiesByBlock[otherIdtySamePubkey.block] = idtiesByBlock[otherIdtySamePubkey.block].reduce(function(res, aidty){
+                  if (aidty.pubkey == otherIdtySamePubkey.pubkey) return res; // if match idty to remove, to NOT add
+                  return (res||[]).concat(aidty);
+                }, null);
+                if (idtiesByBlock[otherIdtySamePubkey.block] === null) {
+                  delete idtiesByBlock[otherIdtySamePubkey.block];
+                }
+              }
+            }
+          });
+
+          var idties = _.values(idtiesByPubkey);
+          var total = idties.length; // get total BEFORE slice
+
+          idties = _sortAndSliceIdentities(idties, offset, size);
+          var blocks = idties.reduce(function(res, aidty) {
+            return res.concat(aidty.block);
+          }, []);
+
+          return  $q.all([
+            // Get time from blocks
+            BMA.blockchain.blocks(_.uniq(blocks))
+            .then(function(blocks) {
+
+              _.forEach(blocks, function(block){
+                _.forEach(idtiesByBlock[block.number], function(idty) {
+                  idty.sigDate = block.medianTime;
+                  if (block.number !== 0 && idty.blockHash !== block.hash) {
+                    addEvent(idty, {type:'error', message: 'ERROR.WOT_PENDING_INVALID_BLOCK_HASH'});
+                    console.debug("Invalid membership for uid={0}: block hash changed".format(idty.uid));
+                  }
+                });
+              });
+            }),
+
+            // Extension point
+            extendAll(idties, 'pubkey', true/*skipAddUid*/)
+          ])
+          .then(function() {
+            console.debug("[ES] [wot] Loaded {0}/{1} pending identities in {2} ms".format(idties && idties.length || 0, total, Date.now() - now));
+            return {
+              hits: idties,
+              total: total
+            };
+          });
+        });
+    },
+
+    getAll = function() {
+      var letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','u','v','w','x','y','z'];
+      return getAllRecursive(letters, 0, BMA.constants.LIMIT_REQUEST_COUNT)
+        .then(function(idties) {
+          return extendAll(idties, 'pubkey', true/*skipAddUid*/);
+        })
+        .then(_addUniqueIds)
+        .then(function() {
+          return {
+            hits: idties,
+            total: idties.length
+          };
+        });
+    },
+
+    getAllRecursive = function(letters, offset, size) {
+      return $q(function(resolve, reject) {
+        var result = [];
+        var pubkeys = {};
+        var jobs = [];
+        _.each(letters.slice(offset, offset+size), function(letter) {
+          jobs.push(
+            search(letter, {
+              addUniqueId: false, // will be done in parent method
+              allowExtension: false // extension point will be called in parent method
+            })
+          .then(function(idties){
+              if (!idties || !idties.length) return;
+              result = idties.reduce(function(res, idty) {
+                if (!pubkeys[idty.pubkey]) {
+                  pubkeys[idty.pubkey] = true;
+                  return res.concat(idty);
+                }
+                return res;
+              }, result);
+            })
+          );
+        });
+
+        $q.all(jobs)
+          .then(function() {
+            if (offset < letters.length - 1) {
+              $timeout(function() {
+                getAllRecursive(letters, offset+size, size)
+                  .then(function(idties) {
+                    if (!idties || !idties.length) {
+                      resolve(result);
+                      return;
+                    }
+                    resolve(idties.reduce(function(res, idty) {
+                      if (!pubkeys[idty.pubkey]) {
+                        pubkeys[idty.pubkey] = true;
+                        return res.concat(idty);
+                      }
+                      return res;
+                    }, result));
+                  })
+                  .catch(function(err) {
+                    reject(err);
+                  });
+              }, BMA.constants.LIMIT_REQUEST_DELAY);
+            }
+            else {
+              resolve(result);
+            }
+          })
+          .catch(function(err){
+            if (err && err.ucode === BMA.errorCodes.HTTP_LIMITATION) {
+              resolve(result);
+            }
+            else {
+              reject(err);
+            }
+          });
+      });
+    },
+
+    extend = function(idty, pubkeyAttributeName, skipAddUid) {
+      return extendAll([idty], pubkeyAttributeName, skipAddUid)
+        .then(function(res) {
+          return res[0];
+        });
+    },
+
+    extendAll = function(idties, pubkeyAttributeName, skipAddUid) {
+
+      pubkeyAttributeName = pubkeyAttributeName || 'pubkey';
+
+      var jobs = [];
+      if (!skipAddUid) jobs.push(BMA.wot.member.uids());
+
+      jobs.push(api.data.raisePromise.search(null, idties, pubkeyAttributeName)
+        .catch(function(err) {
+          console.debug('Error while search identities, on extension point.');
+          console.error(err);
+        }));
+
+      return $q.all(jobs)
+      .then(function(res) {
+        if (!skipAddUid) {
+          var uidsByPubkey = res[0];
+          // Set uid (on every data)
+          _.forEach(idties, function(data) {
+            if (!data.uid && data[pubkeyAttributeName]) {
+              data.uid = uidsByPubkey[data[pubkeyAttributeName]];
+              // Remove name if redundant with uid
+              if (data.uid && data.uid == data.name) {
+                delete data.name;
+              }
+            }
+          });
+        }
+
+        return idties;
+      });
+    },
+
+    addEvent = function(data, event) {
+      event = event || {};
+      event.type = event.type || 'info';
+      event.message = event.message || '';
+      event.messageParams = event.messageParams || {};
+      data.events = data.events || [];
+      data.events.push(event);
+    },
+
+    cleanCache = function() {
+      console.debug("[wot] Cleaning cache...");
+      csCache.clear(cachePrefix);
+    }
+  ;
+
+  // Register extension points
+  api.registerEvent('data', 'load');
+  api.registerEvent('data', 'search');
+
+  // Listen if node changed
+  BMA.api.node.on.stop($rootScope, cleanCache, this);
+
+  return {
+    load: loadData,
+    loadRequirements: loadRequirements,
+    search: search,
+    newcomers: getNewcomers,
+    pending: getPending,
+    all: getAll,
+    extend: extend,
+    extendAll: extendAll,
+    // api extension
+    api: api
+  };
+}]);
+
+
+angular.module('cesium.tx.services', ['ngApi', 'cesium.bma.services',
+  'cesium.settings.services', 'cesium.wot.services' ])
+
+.factory('csTx', ['$q', '$timeout', '$filter', '$translate', 'FileSaver', 'UIUtils', 'BMA', 'Api', 'csConfig', 'csSettings', 'csWot', 'csCurrency', function($q, $timeout, $filter, $translate, FileSaver, UIUtils, BMA, Api,
+                          csConfig, csSettings, csWot, csCurrency) {
+  'ngInject';
+
+  var
+    api = new Api(this, "csTx");
+
+  function reduceTxAndPush(pubkey, txArray, result, processedTxMap, allowPendings) {
+    if (!txArray || !txArray.length) return; // Skip if empty
+
+    _.forEach(txArray, function(tx) {
+      if (tx.block_number !== null || allowPendings) {
+        var walletIsIssuer = false;
+        var otherIssuers = tx.issuers.reduce(function(res, issuer) {
+          walletIsIssuer = walletIsIssuer || (issuer === pubkey);
+          return (issuer !== pubkey) ? res.concat(issuer) : res;
+        }, []);
+        var otherRecipients = [],
+          outputBase,
+          sources = [],
+          lockedOutputs;
+
+        var amount = tx.outputs.reduce(function(sum, output, noffset) {
+          // FIXME duniter v1.4.13
+          var outputArray = (typeof output === 'string') ? output.split(':',3) : [output.amount,output.base,output.conditions];
+          outputBase = parseInt(outputArray[1]);
+          var outputAmount = powBase(parseInt(outputArray[0]), outputBase);
+          var outputCondition = outputArray[2];
+          var sigMatches =  BMA.regexp.TX_OUTPUT_SIG.exec(outputCondition);
+
+          // Simple unlock condition
+          if (sigMatches) {
+            var outputPubkey = sigMatches[1];
+            if (outputPubkey === pubkey) { // output is for the wallet
+              if (!walletIsIssuer) {
+                return sum + outputAmount;
+              }
+              // If pending: use output as new sources
+              else if (tx.block_number === null) {
+                sources.push({
+                  amount: parseInt(outputArray[0]),
+                  base: outputBase,
+                  type: 'T',
+                  identifier: tx.hash,
+                  noffset: noffset,
+                  consumed: false,
+                  conditions: outputCondition
+                });
+              }
+            }
+
+            // The output is for someone else
+            else {
+              // Add into recipients list(if not a issuer)
+              if (outputPubkey !== '' && !_.contains(otherIssuers, outputPubkey)) {
+                otherRecipients.push(outputPubkey);
+              }
+              if (walletIsIssuer) {
+                // TODO: should be fix, when TX has multiple issuers (need a repartition)
+                return sum - outputAmount;
+              }
+            }
+
+          }
+
+          // Complex unlock condition, on the issuer pubkey
+          else if (outputCondition.indexOf('SIG('+pubkey+')') !== -1) {
+            var lockedOutput = BMA.tx.parseUnlockCondition(outputCondition);
+            if (lockedOutput) {
+              // Add a source
+              sources.push(angular.merge({
+                amount: parseInt(outputArray[0]),
+                base: outputBase,
+                type: 'T',
+                identifier: tx.hash,
+                noffset: noffset,
+                conditions: outputCondition,
+                consumed: false
+              }, lockedOutput));
+              lockedOutput.amount = outputAmount;
+              lockedOutputs = lockedOutputs || [];
+              lockedOutputs.push(lockedOutput);
+              console.debug('[tx] has locked output:', lockedOutput);
+
+              return sum + outputAmount;
+            }
+          }
+          return sum;
+        }, 0);
+
+        var txPubkeys = amount > 0 ? otherIssuers : otherRecipients;
+        var time = tx.time || tx.blockstampTime;
+
+        // Avoid duplicated tx, or tx to him self
+        var txKey = (amount !== 0) && amount + ':' + tx.hash + ':' + time;
+        if (txKey && !processedTxMap[txKey]) {
+          processedTxMap[txKey] = true; // Mark as processed
+          var newTx = {
+            time: time,
+            amount: amount,
+            pubkey: txPubkeys.length === 1 ? txPubkeys[0] : undefined,
+            pubkeys: txPubkeys.length > 1 ? txPubkeys : undefined,
+            comment: tx.comment,
+            isUD: false,
+            hash: tx.hash,
+            locktime: tx.locktime,
+            block_number: tx.block_number
+          };
+
+            // If pending: store sources and inputs for a later use - see method processTransactionsAndSources()
+          if (walletIsIssuer && tx.block_number === null) {
+            newTx.inputs = tx.inputs;
+            newTx.sources = sources;
+          }
+          if (lockedOutputs) {
+            newTx.lockedOutputs = lockedOutputs;
+          }
+          result.push(newTx);
+        }
+      }
+    });
+  }
+
+
+  function loadTx(pubkey, fromTime) {
+    return $q(function(resolve, reject) {
+
+      var nowInSec = moment().utc().unix();
+      fromTime = fromTime || (nowInSec - csSettings.data.walletHistoryTimeSecond);
+      var tx = {
+        pendings: [],
+        validating: [],
+        history: [],
+        errors: []
+      };
+
+      var processedTxMap = {};
+
+      var jobs = [
+        // get current block
+        csCurrency.blockchain.current(true),
+
+        // get pending tx
+        BMA.tx.history.pending({pubkey: pubkey})
+          .then(function (res) {
+            reduceTxAndPush(pubkey, res.history.sending, tx.pendings, processedTxMap, true /*allow pendings*/);
+            reduceTxAndPush(pubkey, res.history.pending, tx.pendings, processedTxMap, true /*allow pendings*/);
+          })
+      ];
+
+      // get TX history since
+      if (fromTime !== 'pending') {
+        var reduceTxFn = function (res) {
+          reduceTxAndPush(pubkey, res.history.sent, tx.history, processedTxMap, false);
+          reduceTxAndPush(pubkey, res.history.received, tx.history, processedTxMap, false);
+        };
+
+        // get TX from a given time
+        if (fromTime > 0) {
+          // Use slice, to be able to cache requests result
+          var sliceTime = csSettings.data.walletHistorySliceSecond;
+          fromTime = fromTime - (fromTime % sliceTime);
+          for(var i = fromTime; i - sliceTime < nowInSec; i += sliceTime)  {
+            jobs.push(BMA.tx.history.times({pubkey: pubkey, from: i, to: i+sliceTime-1}, true /*with cache*/)
+              .then(reduceTxFn)
+            );
+          }
+
+          // Last slide: no cache
+          jobs.push(BMA.tx.history.times({pubkey: pubkey, from: nowInSec - (nowInSec % sliceTime), to: nowInSec+999999999}, false/*no cache*/)
+            .then(reduceTxFn));
+        }
+
+        // get all TX
+        else {
+          jobs.push(BMA.tx.history.all({pubkey: pubkey})
+            .then(reduceTxFn)
+          );
+        }
+
+        // get UD history
+        if (csSettings.data.showUDHistory && fromTime > 0) {
+          /*jobs.push(
+            BMA.ud.history({pubkey: pubkey})
+              .then(function(res){
+                udHistory = !res.history || !res.history.history ? [] :
+                  _.forEach(res.history.history, function(ud){
+                    if (ud.time < fromTime) return res; // skip to old UD
+                    var amount = powBase(ud.amount, ud.base);
+                    udHistory.push({
+                      time: ud.time,
+                      amount: amount,
+                      isUD: true,
+                      block_number: ud.block_number
+                    });
+                  });
+              }));*/
+          // API extension
+          jobs.push(
+            api.data.raisePromise.loadUDs({
+              pubkey: pubkey,
+              fromTime: fromTime
+            })
+              .then(function(res) {
+                if (!res || !res.length) return;
+                _.forEach(res, function(hits) {
+                  tx.history.push(hits);
+                });
+              })
+
+              .catch(function(err) {
+                console.debug('Error while loading UDs history, on extension point.');
+                console.error(err);
+              })
+          );
+        }
+      }
+
+      // Execute jobs
+      $q.all(jobs)
+        .then(function(res){
+          var current = res[0];
+
+          // sort by time desc
+          tx.history.sort(function(tx1, tx2) {
+            return (tx2.time - tx1.time);
+          });
+          var firstValidatedTxIndex = tx.history.findIndex(function(tx){
+            return (tx.block_number <= current.number - csSettings.data.blockValidityWindow);
+          });
+          // remove validating from history
+          tx.validating = firstValidatedTxIndex > 0 ? tx.history.splice(0, firstValidatedTxIndex) : [];
+
+          tx.fromTime = fromTime !== 'pending' && fromTime || undefined;
+          tx.toTime = tx.history.length ? tx.history[0].time /*=max(tx.time)*/: tx.fromTime;
+
+          resolve(tx);
+        })
+        .catch(reject);
+    });
+  }
+
+  function powBase(amount, base) {
+    return base <= 0 ? amount : amount * Math.pow(10, base);
+  }
+
+  function addSource(src, sources, sourcesIndexByKey) {
+    var srcKey = src.type+':'+src.identifier+':'+src.noffset;
+    if (angular.isUndefined(sourcesIndexByKey[srcKey])) {
+      sources.push(src);
+      sourcesIndexByKey[srcKey] = sources.length - 1;
+    }
+  }
+
+  function addSources(result, sources) {
+    _(sources).forEach(function(src) {
+      addSource(src, result.sources, result.sourcesIndexByKey);
+    });
+  }
+
+  function loadSourcesAndBalance(pubkey) {
+    return BMA.tx.sources({pubkey: pubkey})
+      .then(function(res){
+        var data = {
+          sources: [],
+          sourcesIndexByKey: [],
+          balance: 0
+        };
+        if (res.sources && res.sources.length) {
+          _.forEach(res.sources, function(src) {
+            src.consumed = false;
+            data.balance += powBase(src.amount, src.base);
+          });
+          addSources(data, res.sources);
+        }
+        return data;
+      })
+      .catch(function(err) {
+        console.warn("[tx] Error while getting sources...", err);
+        throw err;
+      });
+  }
+
+  function loadData(pubkey, fromTime) {
+    var now = Date.now();
+
+    var data;
+
+    // Alert user, when request is too long (> 2s)
+    $timeout(function() {
+      if (!data) UIUtils.loading.update({template: "COMMON.LOADING_WAIT"});
+    }, 2000);
+
+    return $q.all([
+
+      // Load Sources
+      loadSourcesAndBalance(pubkey),
+
+      // Load Tx
+      loadTx(pubkey, fromTime)
+    ])
+
+      .then(function(res) {
+        // Copy sources and balance
+        data = res[0];
+        data.tx = res[1];
+
+        var txPendings = [];
+        var txErrors = [];
+        var balanceFromSource = data.balance;
+        var balanceWithPending = data.balance;
+
+        function _processPendingTx(tx) {
+          var consumedSources = [];
+          var valid = true;
+          if (tx.amount > 0) { // do not check sources from received TX
+            valid = false;
+            // TODO get sources from the issuer ?
+          }
+          else {
+            _.find(tx.inputs, function(input) {
+              var inputKey = input.split(':').slice(2).join(':');
+              var srcIndex = data.sourcesIndexByKey[inputKey];
+              if (angular.isDefined(srcIndex)) {
+                consumedSources.push(data.sources[srcIndex]);
+              }
+              else {
+                valid = false;
+                return true; // break
+              }
+            });
+            if (tx.sources) { // add source output
+              addSources(data, tx.sources);
+            }
+            delete tx.sources;
+            delete tx.inputs;
+          }
+          if (valid) {
+            balanceWithPending += tx.amount; // update balance
+            txPendings.push(tx);
+            _.forEach(consumedSources, function(src) {
+              src.consumed=true;
+            });
+          }
+          else {
+            txErrors.push(tx);
+          }
+        }
+
+        var txs = data.tx.pendings;
+        var retry = true;
+        while(txs && txs.length) {
+          // process TX pendings
+          _.forEach(txs, _processPendingTx);
+
+          // Retry once (TX could be chained and processed in a wrong order)
+          if (txErrors.length > 0 && txPendings.length > 0 && retry) {
+            txs = txErrors;
+            txErrors = [];
+            retry = false;
+          }
+          else {
+            txs = null;
+          }
+        }
+
+        data.tx = data.tx || {};
+        data.tx.pendings = txPendings.sort(function(tx1, tx2) {
+          return (tx2.time - tx1.time);
+        });
+        data.tx.errors = txErrors.sort(function(tx1, tx2) {
+          return (tx2.time - tx1.time);
+        });
+        // Negative balance not allow (use only source's balance) - fix #769
+        data.balance = (balanceWithPending < 0) ? balanceFromSource : balanceWithPending;
+
+        // Will add uid (+ plugin will add name, avatar, etc. if enable)
+        var allTx = (data.tx.history || []).concat(data.tx.validating||[], data.tx.pendings||[], data.tx.errors||[]);
+        return csWot.extendAll(allTx, 'pubkey')
+          .then(function() {
+            console.debug('[tx] TX and sources loaded in '+ (Date.now()-now) +'ms');
+            return data;
+          });
+      })
+      .catch(function(err) {
+        console.warn("[tx] Error while getting sources and tx...", err);
+        throw err;
+      });
+  }
+
+  function loadSources(pubkey) {
+    console.debug("[tx] Loading sources for " + pubkey.substring(0,8));
+    return loadData(pubkey, 'pending');
+  }
+
+  // Download TX history file
+  function downloadHistoryFile(pubkey, options) {
+
+    options = options || {};
+    options.fromTime = options.fromTime || -1;
+
+    console.debug("[tx] Exporting TX history for pubkey [{0}]".format(pubkey.substr(0,8)));
+
+    return $q.all([
+      $translate(['ACCOUNT.HEADERS.TIME',
+        'COMMON.UID',
+        'COMMON.PUBKEY',
+        'COMMON.UNIVERSAL_DIVIDEND',
+        'ACCOUNT.HEADERS.AMOUNT',
+        'ACCOUNT.HEADERS.COMMENT']),
+      csCurrency.blockchain.current(true/*withCache*/),
+      loadData(pubkey, options.fromTime)
+    ])
+      .then(function(result){
+        var translations = result[0];
+        var currentBlock = result[1];
+        var currentTime = (currentBlock && currentBlock.medianTime) || moment().utc().unix();
+        var currency = currentBlock && currentBlock.currency;
+
+        var data = result[2];
+
+        // no TX
+        if (!data || !data.tx || !data.tx.history) {
+          return UIUtils.toast.show('INFO.EMPTY_TX_HISTORY');
+        }
+
+        return $translate('ACCOUNT.FILE_NAME', {currency: currency, pubkey: pubkey, currentTime : currentTime})
+          .then(function(filename){
+
+            var formatDecimal = $filter('formatDecimal');
+            var medianDate = $filter('medianDate');
+            var formatSymbol = $filter('currencySymbolNoHtml');
+
+            var headers = [
+              translations['ACCOUNT.HEADERS.TIME'],
+              translations['COMMON.UID'],
+              translations['COMMON.PUBKEY'],
+              translations['ACCOUNT.HEADERS.AMOUNT'] + ' (' + formatSymbol(currency) + ')',
+              translations['ACCOUNT.HEADERS.COMMENT']
+            ];
+            var content = data.tx.history.concat(data.tx.validating).reduce(function(res, tx){
+              return res.concat([
+                medianDate(tx.time),
+                tx.uid,
+                tx.pubkey,
+                formatDecimal(tx.amount/100),
+                '"' + (tx.isUD ? translations['COMMON.UNIVERSAL_DIVIDEND'] : tx.comment) + '"'
+              ].join(';') + '\n');
+            }, [headers.join(';') + '\n']);
+
+            var file = new Blob(content, {type: 'text/plain; charset=utf-8'});
+            FileSaver.saveAs(file, filename);
+          });
+      });
+  }
+
+  // Register extension points
+  api.registerEvent('data', 'loadUDs');
+
+  return {
+    load: loadData,
+    loadSources: loadSources,
+    downloadHistoryFile: downloadHistoryFile,
+    // api extension
+    api: api
+  };
+}]);
+
+
+angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.services', 'cesium.crypto.services', 'cesium.utils.services',
+  'cesium.settings.services'])
+
+
+.factory('csWallet', ['$q', '$rootScope', '$timeout', '$translate', '$filter', '$ionicHistory', 'UIUtils', 'Api', 'Idle', 'localStorage', 'sessionStorage', 'Modals', 'CryptoUtils', 'csCrypto', 'BMA', 'csConfig', 'csSettings', 'FileSaver', 'Blob', 'csWot', 'csTx', 'csCurrency', function($q, $rootScope, $timeout, $translate, $filter, $ionicHistory, UIUtils,
+                              Api, Idle, localStorage, sessionStorage, Modals,
+                              CryptoUtils, csCrypto, BMA, csConfig, csSettings, FileSaver, Blob, csWot, csTx, csCurrency) {
+  'ngInject';
+
+  var defaultBMA = BMA;
+  var service;
+
+  function CsWallet(id, BMA) {
+
+    BMA = BMA || defaultBMA;
+    var
+    exports,
+    constants = {
+      STORAGE_PUBKEY: 'pubkey',
+      STORAGE_UID: 'uid',
+      STORAGE_DATA_PREFIX: 'data-',
+      STORAGE_SECKEY: 'seckey',
+      /* Need for compat with old currencies (test_net and sou) */
+      TX_VERSION:   BMA.constants.PROTOCOL_VERSION,
+      IDTY_VERSION: BMA.constants.PROTOCOL_VERSION,
+      MS_VERSION:   BMA.constants.PROTOCOL_VERSION,
+      CERT_VERSION: BMA.constants.PROTOCOL_VERSION,
+      REVOKE_VERSION: BMA.constants.PROTOCOL_VERSION,
+      TX_MAX_INPUTS_COUNT: 40 // Allow to get a TX with less than 100 rows (=max row count in Duniter protocol)
+    },
+    data = {},
+    settings,
+    listeners,
+    started,
+    startPromise,
+    loadPromise,
+    enableAuthIdle = false,
+    api = new Api(this, 'csWallet-' + id),
+
+    resetData = function(init) {
+      data.loaded = false;
+      data.pubkey= null;
+      data.qrcode=null;
+
+      data.uid = null;
+      data.localName = null;
+      data.isNew = null;
+      data.sourcesIndexByKey = null;
+      data.medianTime = null;
+      data.requirements = {};
+      data.blockUid = null;
+      data.sigDate = null;
+      data.sigStock = null;
+      data.isMember = false;
+      data.events = [];
+
+      // children's wallets
+      data.children = [];
+
+      // Encrypted (need auth() to be encrypted)
+      data.encryptedData = null;
+
+      resetKeypair();
+      resetTxAndSources();
+
+      started = false;
+      startPromise = undefined;
+
+      if (init) {
+        api.data.raise.init(data);
+      }
+      else {
+        if (isDefault() && settings && !settings.useLocalStorage) {
+          csSettings.reset();
+        }
+        api.data.raise.reset(data);
+      }
+    },
+
+    resetKeypair = function(){
+      data.keypair = {
+        signSk: null,
+        signPk: null
+      };
+    },
+
+    resetSources = function(){
+      // reset sources data
+      data.sources = undefined;
+      data.sourcesIndexByKey = undefined;
+      data.balance = 0;
+    },
+
+    resetTx = function(){
+      // reset TX data
+      data.tx = data.tx || {};
+      data.tx.history = [];
+      data.tx.pendings = [];
+      data.tx.validating = [];
+      data.tx.errors = [];
+      delete data.tx.fromTime;
+      delete data.tx.toTime;
+    },
+
+    resetTxAndSources = function(){
+      // reset sources data
+      resetSources();
+      // reset TX data
+      resetTx();
+    },
+
+    isDefault = function(){
+      return id === 'default';
+    },
+
+    hasEncryptedData = function(){
+      return data.encryptedData && data.encryptedData.nonce && data.encryptedData.content;
+    },
+
+    addSource = function(src, sources, sourcesIndexByKey) {
+      var srcKey = src.type+':'+src.identifier+':'+src.noffset;
+      if (angular.isUndefined(sourcesIndexByKey[srcKey])) {
+        if (!src.conditions) {
+          console.warn("Trying to add a source without output condition !", src);
+        }
+        sources.push(src);
+        sourcesIndexByKey[srcKey] = sources.length - 1;
+      }
+    },
+
+    addSources = function(sources) {
+      data.sources = data.sources || [];
+      data.sourcesIndexByKey = data.sourcesIndexByKey || {};
+      _(sources).forEach(function(src) {
+        addSource(src, data.sources, data.sourcesIndexByKey);
+      });
+    },
+
+    // Show login modal
+    login = function(options) {
+      if (!started) {
+        return (startPromise || start())
+          .then(function () {
+            return login(options); // loop
+          });
+      }
+
+      var needLogin = !isLogin();
+      var needAuth = options && ((options.auth && !isAuth()) || options.forceAuth);
+
+      // user already login
+      if (!needLogin && !needAuth) {
+        if (!isDataLoaded(options)) {
+          return loadData(options);
+        }
+        return $q.when(data);
+      }
+      var keepAuth = csSettings.data.keepAuthIdle > 0;
+
+      var authData;
+      return (options && options.authData ? $q.when(options.authData) : Modals.showLogin(options))
+        .then(function(res){
+          if (!res || !res.pubkey ||
+             (!needLogin && res.pubkey !== data.pubkey) ||
+             (needAuth && (!res.keypair || !res.keypair.signPk || !res.keypair.signSk))) {
+            throw 'CANCELLED';
+          } // invalid data
+
+          authData = res;
+          data.pubkey = authData.pubkey;
+          data.uid = authData.uid || data.uid;
+          data.isNew = options && angular.isDefined(options.isNew) ? options.isNew : data.isNew;
+          if (keepAuth) {
+            data.keypair = authData.keypair || {
+                signSk: null,
+                signPk: null
+              };
+          }
+
+          if (needLogin) {
+            // extend API to check login validity
+            return api.data.raisePromise.loginCheck(data)
+              .catch(function (err) {
+                resetData(); // Reset data if not valid, then exit process
+                throw err;
+              })
+              // Call extend api
+              .then(function() {
+                if (needLogin) {
+                  return api.data.raisePromise.login(data)
+                    .catch(function(err) {
+                      console.warn('Error during extension call [wallet.api.data.on.login]', err);
+                      // continue
+                    });
+                }
+              });
+          }
+        })
+
+        .then(function() {
+          // Read data from pubkey (when first login)
+          if (needLogin) {
+            return restoreData();
+          }
+          // Or the was login but now auth: just try to decrypt data
+          else if (needAuth) {
+            return openEncryptedData();
+          }
+        })
+
+        .then(function() {
+          if (needLogin) {
+
+            // store wallet
+            store();
+          }
+
+          // Send auth event (if need)
+          if (needAuth || isAuth()) {
+            // Check if need to start/stop auth idle
+            checkAuthIdle(true);
+
+            return api.data.raisePromise.auth(keepAuth ? data : authData);
+          }
+        })
+        .then(function() {
+          // Load data if need
+          // If user just login, force data full load (even if min data asked)
+          // because the user can wait (after the login modal)
+          var loadOptions = !needLogin && options && options.minData ? {minData: true} : undefined/*=load all*/;
+          if (!isDataLoaded(loadOptions)) {
+            return loadData(loadOptions);
+          }
+        })
+        .then(function() {
+          if (options && options.silent) {
+            UIUtils.loading.hide(10);
+          }
+          else {
+            UIUtils.loading.hide(1000);
+          }
+
+          return keepAuth ? data : angular.merge({}, data, authData);
+        })
+        .catch(function(err) {
+          if (err === 'RETRY' && (!options || !options.authData)) {
+            return $timeout(function(){
+              return login(options);
+            }, 300);
+          }
+          throw err;
+        });
+    },
+
+    logout = function() {
+      var wasAuth = isAuth();
+
+      return $q(function(resolve, reject) {
+
+        var pubkey = data.pubkey;
+        resetData(); // will reset keypair
+        resetStore(pubkey); // reset store
+
+        // Send logout event
+        api.data.raise.logout();
+
+        if (wasAuth) {
+          api.data.raise.unauth();
+        }
+
+        checkAuthIdle(false);
+
+        $ionicHistory.clearCache();
+
+        resolve();
+      });
+    },
+
+    isLogin = function() {
+      return !!data.pubkey;
+    },
+
+    auth = function(options) {
+      if (!started) {
+        return (startPromise || start())
+          .then(function () {
+            return auth(options); // loop
+          });
+      }
+
+      if (isAuth() && (!options || !options.forceAuth)) {
+        return $q.when(data);
+      }
+
+      options = options || {};
+      options.expectedPubkey = isLogin() && data.pubkey;
+      options.auth = true;
+      return login(options);
+    },
+
+    unauth = function() {
+      return $q(function(resolve, reject) {
+
+        resetKeypair();
+        store();
+
+        // Send unauth event
+        api.data.raise.unauth();
+
+        checkAuthIdle(false);
+
+        $ionicHistory.clearCache();
+
+        resolve();
+      });
+    },
+
+    isAuth = function() {
+      return data.pubkey && data.keypair && data.keypair.signSk && true;
+    },
+
+    getKeypair = function(options) {
+      if (!started) {
+        return (startPromise || start())
+          .then(function () {
+            return getKeypair(options); // loop
+          });
+      }
+
+      if (isAuth()) {
+        return $q.when(data.keypair);
+      }
+      options = options || {};
+      options.silent = angular.isDefined(options.silent) ? options.silent : true;
+      return auth(options)
+        .then(function() {
+          return data.keypair;
+        });
+    },
+
+    hasSelf = function() {
+      return !!data.pubkey && !data.requirements.needSelf;
+    },
+
+    isDataLoaded = function(options) {
+      if (options) {
+        if (options.minData && !options.sources) return data.loaded && true;
+        if (options.requirements && !data.requirements.loaded) return false;
+        if (options.tx && options.tx.enable && (!data.tx.fromTime || data.tx.fromTime === 'pending')) return false;
+        if (options.sigStock && !data.sigStock) return false;
+      }
+      return data.loaded && data.sources && true;
+    },
+
+    isNeverUsed = function() {
+      if (!data.loaded) return undefined; // undefined if not full loaded
+      return !data.pubkey || !(
+         // Check registration
+         data.isMember ||
+         data.requirements.pendingMembership ||
+         data.requirements.revoked ||
+         !data.requirements.needSelf ||
+         data.requirements.wasMember ||
+
+         // Check sources
+        (data.sources && data.sources.length > 0) ||
+
+         // Check TX history
+         data.tx.history.length > 0 ||
+         data.tx.validating.length > 0 ||
+         data.tx.pendings.length > 0 ||
+
+         // Check extended data (name+avatar)
+         !!data.localName ||
+         !!data.name ||
+         !!data.avatar
+        );
+    },
+
+    isNew = function() {return !!data.isNew;},
+
+    // If connected and same pubkey
+    isUserPubkey = function(pubkey) {
+      return isLogin() && data.pubkey === pubkey;
+    },
+
+    // store pubkey and uid
+    store = function(pubkey) {
+      pubkey = pubkey && typeof pubkey == 'string' ? pubkey : data.pubkey;
+      if (settings && settings.useLocalStorage) {
+
+        if (isLogin() && settings.rememberMe) {
+
+          var now = Date.now();
+          console.debug("[wallet] Storing...");
+
+          var jobs = [];
+
+          // Use session storage for secret key - fix #372
+          if (settings.keepAuthIdle == csSettings.constants.KEEP_AUTH_IDLE_SESSION && isAuth()) {
+            jobs.push(sessionStorage.put(constants.STORAGE_SECKEY, CryptoUtils.util.encode_base58(data.keypair.signSk)));
+          }
+          else {
+            jobs.push(sessionStorage.put(constants.STORAGE_SECKEY, null));
+          }
+
+          // Use local storage for pubkey
+          jobs.push(localStorage.put(constants.STORAGE_PUBKEY, data.pubkey));
+
+          // Use local storage for uid - fix #625
+          if (data.uid) {
+            jobs.push(localStorage.put(constants.STORAGE_UID, data.uid));
+          }
+          else {
+            jobs.push(localStorage.put(constants.STORAGE_UID, null));
+          }
+
+          return $q.all(jobs)
+            .then(function() {
+              console.debug("[wallet] Stored in "+ (Date.now() - now) +"ms");
+            });
+        }
+        else {
+          // Resetting local storage
+          return $q.all([
+            sessionStorage.put(constants.STORAGE_SECKEY, null),
+            localStorage.put(constants.STORAGE_PUBKEY, null),
+            localStorage.put(constants.STORAGE_UID, null),
+            // Clean data (only in the session storage - keep local)
+            pubkey ? sessionStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when()
+          ]);
+        }
+      }
+      else {
+        return $q.all([
+          sessionStorage.put(constants.STORAGE_SECKEY, null),
+          localStorage.put(constants.STORAGE_PUBKEY, null),
+          localStorage.put(constants.STORAGE_UID, null),
+          // Clean data
+          pubkey ? sessionStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when(),
+          pubkey ? localStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when()
+        ]);
+      }
+    },
+
+    // reset data store for this pubkey
+    resetStore = function(pubkey) {
+
+      console.debug("[wallet] Resetting stored pubkey (and uid) in local storage...");
+
+      sessionStorage.put(constants.STORAGE_SECKEY, null);
+      localStorage.put(constants.STORAGE_PUBKEY, null);
+      localStorage.put(constants.STORAGE_UID, null);
+
+      if (settings && settings.useLocalStorage) {
+        // Clean data (only in the session storage - keep local)
+        return pubkey ? sessionStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when();
+      }
+      else {
+        console.debug("[wallet] Resetting stored data in local storage...");
+        return $q.all([
+          pubkey ? sessionStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when(),
+          pubkey ? localStorage.put(constants.STORAGE_DATA_PREFIX + pubkey, null) : $q.when()
+        ]);
+      }
+    },
+
+    // store children wallet, notifications read Time, ...
+    storeData = function() {
+      if (!isLogin()) throw {message:'ERROR.NEED_LOGIN_FIRST'};
+
+      var useEncryption = settings && settings.useLocalStorageEncryption;
+      var storageKey = constants.STORAGE_DATA_PREFIX + data.pubkey;
+
+      var content; // Init only if used
+      var secureContent; // Init only if used
+
+      // Add time
+      if (data.notifications && data.notifications.time) {
+        content = content || {};
+        content.notifications = {
+          time: data.notifications.time
+        };
+      }
+      if (data.invitations && data.invitations.time) {
+        content = content || {};
+        content.invitations = {
+          time: data.invitations.time
+        };
+      }
+
+      // Add children wallets
+      if (data.children && data.children.length) {
+        // remember children count - need when data still encrypted, by method getChildrenCount()
+        content = content || {};
+        content.childrenCount = data.children.length;
+
+        secureContent = secureContent || {}; // Init th secured content
+        // Add children wallet
+        secureContent.children = _.map(data.children, function(wallet) {
+          return {
+            pubkey: wallet.data.pubkey,
+            uid: wallet.data.uid,
+            localName: wallet.data.localName
+          };
+        });
+      }
+      var contentStr = (content || secureContent) && JSON.stringify(angular.merge({}, content||{}, secureContent||{}));
+
+      // Not encryption (or nothing to secure content): store without encryption
+      if (!useEncryption || !secureContent) {
+        return $q.all([
+          sessionStorage.put(storageKey, null), // clear session storage (not used if no encryption)
+          localStorage.put(storageKey, contentStr || null)
+        ]);
+      }
+
+      // Encryption is enable, but user not auth: use the session storage
+      // (and keep the local storage value)
+      if (!isAuth()) {
+        return sessionStorage.put(storageKey, contentStr||null);
+      }
+
+      return $q.all([
+        // Get a unique nonce
+        CryptoUtils.util.random_nonce(),
+        // Get box keypair
+        CryptoUtils.box.keypair.fromSignKeypair(data.keypair),
+        // Put also (without encryption) in the session storage
+        sessionStorage.put(storageKey, contentStr || null)
+      ])
+      .then(function(res) {
+        var nonce = res[0];
+        var keypair = res[1];
+
+        return CryptoUtils.box.pack(JSON.stringify(secureContent), nonce, keypair.boxPk, keypair.boxSk)
+          .then(function(cypherContent) {
+            content = angular.merge(content||{}, {
+              encryptedData: {
+                nonce: CryptoUtils.util.encode_base58(nonce),
+                content: cypherContent
+              }
+            });
+            //console.debug("[wallet] Storing with encryption: ", content);
+            return localStorage.put(storageKey, JSON.stringify(content));
+          });
+      });
+    },
+
+    restore = function() {
+      return  $q.all([
+          sessionStorage.get(constants.STORAGE_SECKEY),
+          localStorage.get(constants.STORAGE_PUBKEY),
+          localStorage.get(constants.STORAGE_UID)
+        ])
+        .then(function(res) {
+          var seckey = res[0];
+          var pubkey = res[1];
+          var uid = res[2];
+          if (!pubkey || pubkey == 'null') return;
+
+          console.debug('[wallet] Restore {' + pubkey.substring(0, 8) + '} from local storage');
+
+          var keypair;
+          if (seckey && seckey.length && seckey != 'null') {
+            try {
+              keypair = {
+                signPk: CryptoUtils.util.decode_base58(pubkey),
+                signSk: CryptoUtils.util.decode_base58(seckey)
+              };
+            }
+            catch (err) {
+              console.warn('[wallet] Secret key restoration failed: ', err);
+              keypair = undefined;
+            }
+          }
+
+          data.pubkey = pubkey;
+          data.uid = uid && uid != 'null' ? uid : undefined;
+          data.keypair = keypair || {signPk: undefined, signSk: undefined};
+
+          // Get pubkey's data
+          return restoreData();
+        })
+
+        .then(function() {
+          // Successful restored: raise API events
+          if (isAuth()) {
+            return $q.all([
+              api.data.raisePromise.login(data),
+              checkAuthIdle(true),
+              api.data.raisePromise.auth(data)
+            ])
+              .catch(function(err) {
+                console.warn('Error during extension call [wallet.api.data.on.auth]', err);
+                // continue
+              });
+          }
+          else if (isLogin()) {
+            return api.data.raisePromise.login(data)
+              .catch(function(err) {
+                console.warn('Error during extension call [wallet.api.data.on.login]', err);
+                // continue
+              });
+          }
+        })
+
+        .then(function(){
+          return data;
+        });
+    },
+
+    restoreData = function() {
+      if (!isLogin()) throw {message:'ERROR.NEED_LOGIN_FIRST'};
+      if (isNew()) return $q.when(data); // Skip restore
+      // Get pubkey's data
+      return $q.all([
+        sessionStorage.getObject(constants.STORAGE_DATA_PREFIX + data.pubkey),
+        localStorage.getObject(constants.STORAGE_DATA_PREFIX + data.pubkey)
+      ])
+      // Apply data, first from the session storage, then from local storage
+      .then(function (res) {
+        var sessionStorageData = res[0];
+        var localStorageData = res[1];
+        if (sessionStorageData && sessionStorageData.children && sessionStorageData.children.length === localStorageData.childrenCount) {
+          return applyRestoredData(sessionStorageData)
+            .catch(function(err) {
+              console.error("[wallet] Failed to restore from the session storage ! Retrying from the local storage...", err);
+              // Retry using another storage
+              return applyRestoredData(localStorageData);
+            });
+        }
+        return applyRestoredData(localStorageData);
+      });
+    },
+
+    applyRestoredData = function(content) {
+      if (!content) return $q.when(); // skip
+
+      // Apply children
+      if (content.children) {
+        var oldChildrenCount = data.childrenCount;
+        var oldChildren = removeAllChildrenWallets({
+          stop: false, /*do not stop wallet*/
+          store: false/*skip store*/
+        });
+
+        try {
+          var pubkeys = {};
+          _.forEach(content.children, function(child) {
+            if (!pubkeys[child.pubkey]) { // make sure wallet is unique by pubkey
+              pubkeys[child.pubkey] = true;
+              var wallet = newChildInstance();
+              wallet.data.pubkey = child.pubkey;
+              wallet.data.localName = child.localName;
+              wallet.data.uid = child.uid;
+              addChildWallet(wallet, {store: false/*skip store*/});
+            }
+          });
+          delete content.children;
+          // childrenCount not need anymore
+          delete data.childrenCount;
+        }
+        catch(err) {
+          console.error("[wallet] Failed to restore children wallet.", err);
+          // Restore removed values
+          data.childrenCount = oldChildrenCount;
+          data.children = oldChildren;
+          return $q.reject({message:'ERROR.RESTORE_WALLET_LIST_FAILED'});
+        }
+
+        // Restoration succeed: stop old children
+        _.forEach(oldChildren||[], function(child) {
+          child.stop();
+        });
+      }
+
+      // make sure to remove pubkey before copy
+      delete content.pubkey;
+      delete content.uid;
+
+      // Copy to data
+      angular.merge(data, content);
+
+      // If auth: open encrypted data
+      if (hasEncryptedData() && isAuth()) {
+        return openEncryptedData({store: false})
+          .then(function(){
+            return data; // Important: return the data
+          });
+      }
+
+      return $q.when(data); // Important: return the data
+    },
+
+    getData = function() {
+      return data;
+    },
+
+    loadRequirements = function(withCache, secondTry) {
+      // Clean existing events
+      cleanEventsByContext('requirements');
+
+      // Get requirements
+      return csWot.loadRequirements(data, withCache)
+        .catch(function(err) {
+          // Retry once (can be a timeout, because Duniter node are long to response)
+          if (!secondTry) {
+            console.error("[wallet] Unable to load requirements: Will retrying... ", err);
+            UIUtils.loading.update({template: "COMMON.LOADING_WAIT"});
+            return loadRequirements(withCache, true);
+          }
+          throw err;
+        });
+    },
+
+    loadTxAndSources = function(fromTime) {
+      return csTx.load(data.pubkey, fromTime)
+        .then(function(res){
+          resetTxAndSources();
+          angular.merge(data, res);
+        })
+        .catch(function(err) {
+          resetTxAndSources();
+          throw err;
+        });
+    },
+
+    loadSources = function() {
+      return csTx.loadSources(data.pubkey)
+        .then(function(res){
+          resetSources();
+          angular.merge(data, res);
+        })
+        .catch(function(err) {
+          resetSources();
+          throw err;
+        });
+    },
+
+    /**
+     * Add user events (generate events from requirements)
+     */
+    addEvents = function() {
+      if (data.requirements.revoked) {
+        delete data.requirements.meta.invalid;
+        addEvent({type:'info', message: 'ERROR.WALLET_REVOKED', context: 'requirements'});
+      }
+      else if (data.requirements.pendingRevocation) {
+        delete data.requirements.meta.invalid;
+        addEvent({type:'pending', message: 'INFO.REVOCATION_SENT_WAITING_PROCESS', context: 'requirements'});
+      }
+
+      // If not revoked
+      else {
+        if (!data.isMember && data.requirements.meta && data.requirements.meta.invalid) {
+          addEvent({type: 'error', message: 'ERROR.WALLET_INVALID_BLOCK_HASH', context: 'requirements'});
+          console.debug("Invalid membership for uid={0}: block hash changed".format(data.uid));
+        }
+        // Check if self expired
+        else if (!data.isMember && data.requirements.expired) {
+          addEvent({type: 'error', message: 'ERROR.WALLET_IDENTITY_EXPIRED', context: 'requirements'});
+          console.debug("Identity expired for uid={0}.".format(data.uid));
+        }
+        // Pending membership
+        else if (data.requirements.pendingMembership) {
+          addEvent({type:'pending', message: 'ACCOUNT.WAITING_MEMBERSHIP', context: 'requirements'});
+
+          // Add a warning when out distanced
+          // (only if has enough certification - fix #808)
+          if (!data.requirements.needCertificationCount && data.requirements.outdistanced) {
+            addEvent({type:'warn', message: 'ACCOUNT.OUT_DISTANCED', context: 'requirements'});
+          }
+        }
+        // If user has send a SELF, ask for membership - fix #625
+        else if (!data.requirements.needSelf && data.requirements.needMembership){
+          addEvent({type:'warn', message: 'ACCOUNT.NO_WAITING_MEMBERSHIP', context: 'requirements'});
+        }
+
+        if (data.requirements.needRenew) {
+          // Still a member: WILL need renew
+          if (data.isMember && data.requirements.membershipExpiresIn > 0) {
+            addEvent({type:'warn', message: 'ACCOUNT.WILL_NEED_RENEW_MEMBERSHIP', messageParams: data.requirements, context: 'requirements'});
+          }
+          // Fix #649: Not a member anymore, even if membership NOT expired, because membersjip cancelled for lack of certifications
+          else if (!data.isMember && data.requirements.membershipExpiresIn > 0 && data.requirements.needCertificationCount > 0) {
+            addEvent({type:'warn', message: 'ACCOUNT.NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED', messageParams: data.requirements, context: 'requirements'});
+          }
+          // Not a member anymore
+          else {
+            addEvent({type:'warn', message: 'ACCOUNT.NEED_RENEW_MEMBERSHIP', messageParams: data.requirements, context: 'requirements'});
+          }
+        }
+        else
+        {
+          if (data.requirements.needCertificationCount > 0) {
+            addEvent({type:'info', message: 'ACCOUNT.WAITING_CERTIFICATIONS', messageParams: data.requirements, context: 'requirements'});
+            // Add a help message, if user has never been a member
+            if (!data.requirements.wasMember) {
+              addEvent({
+                type: 'help',
+                message: 'ACCOUNT.WAITING_CERTIFICATIONS_HELP',
+                messageParams: data.requirements,
+                context: 'requirements'
+              });
+            }
+          }
+          if (data.requirements.willNeedCertificationCount > 0) {
+            addEvent({type:'warn', message: 'ACCOUNT.WILL_MISSING_CERTIFICATIONS', messageParams: data.requirements, context: 'requirements'});
+          }
+          if (data.requirements.wasMember && data.requirements.needMembership) {
+            addEvent({type:'warn', message: 'ACCOUNT.NEED_RENEW_MEMBERSHIP', messageParams: data.requirements, context: 'requirements'});
+          }
+          // Add a warning when out distanced - fix #777
+          if (!data.requirements.needCertificationCount && !data.requirements.willNeedCertificationCount && data.requirements.outdistanced) {
+            addEvent({type:'warn', message: 'ACCOUNT.OUT_DISTANCED', context: 'requirements'});
+          }
+        }
+      }
+    },
+
+    loadSigStock = function() {
+      // Get certified by, then count written certification
+      return BMA.wot.certifiedBy({pubkey: data.pubkey})
+        .then(function(res){
+          data.sigStock = !res.certifications ? 0 : res.certifications.reduce(function(res, cert) {
+            return cert.written === null ? res : res+1;
+          }, 0);
+        })
+        .catch(function(err) {
+          if (!!err && err.ucode == BMA.errorCodes.NO_MATCHING_MEMBER) {
+            data.sigStock = 0;
+          }
+          /*FIXME: workaround for Duniter issue #1309 */
+          else if (!!err && err.ucode == 1002) {
+            console.warn("[wallet-service] Detecting Duniter issue #1309 ! Applying workaround... ");
+            data.sigStock = 0;
+          }
+          else {
+            throw err;
+          }
+        });
+    },
+
+    loadQrCode = function(){
+      if (!data.pubkey || data.qrcode) return $q.when(data.qrcode);
+      console.debug("[wallet] Creating SVG QRCode...");
+      return $timeout(function() {
+        data.qrcode = UIUtils.qrcode.svg(data.pubkey);
+        return data.qrcode;
+      });
+    },
+
+    loadData = function(options) {
+
+      var alertIfUnusedWallet = !csCurrency.data.initPhase && (!csSettings.data.wallet || csSettings.data.wallet.alertIfUnusedWallet) &&
+        !data.loaded && (!options || !options.minData || !options.silent);
+
+      // Make sure to load once at a time
+      if (loadPromise) {
+        return loadPromise.then(function() {
+          return isDataLoaded(options) ? data : refreshData(options);
+        });
+      }
+
+      if (options && options.minData) {
+        loadPromise = loadMinData(options);
+      }
+      else if (options || data.loaded) {
+        loadPromise = refreshData(options);
+      }
+      else  {
+        loadPromise = loadFullData();
+      }
+
+      return $q.all([
+        loadPromise,
+
+        // Create the QR code
+        loadQrCode()
+      ])
+        // Warn if wallet has been never used - see #167
+        .then(function() {
+          var unused = isNeverUsed();
+          var showAlert = alertIfUnusedWallet && !isNew() && unused === true;
+          if (!showAlert) return true;
+          return UIUtils.loading.hide()
+            .then(function() {
+              return UIUtils.alert.confirm('CONFIRM.LOGIN_UNUSED_WALLET', 'CONFIRM.LOGIN_UNUSED_WALLET_TITLE', {
+                cancelText: 'COMMON.BTN_CONTINUE',
+                okText: 'COMMON.BTN_RETRY'
+              });
+            })
+            .then(function(retry) {
+              if (retry) {
+                return logout().then(function() {
+                  throw 'RETRY';
+                });
+              }
+              else {
+                // Remembering to not ask for confirmation
+                if (csSettings.data.wallet.alertIfUnusedWallet) {
+                  csSettings.data.wallet.alertIfUnusedWallet = false;
+                  csSettings.store();
+                }
+              }
+              return true;
+            });
+        })
+
+        // Return wallet data
+        .then(function(confirm) {
+          loadPromise = null;
+          if (confirm) {
+            return data;
+          }
+          else { // cancel
+
+            throw 'CANCELLED';
+          }
+        });
+    },
+
+    loadFullData = function(fromTime) {
+      data.loaded = false;
+
+      var now = Date.now();
+      console.debug("[wallet] Loading {{0}} full data...".format(data.pubkey.substr(0,8)));
+
+      return $q.all([
+
+          // Get requirements
+          loadRequirements(true)
+            .then(function(data) {
+              if (data.requirements && (data.requirements.isMember || data.requirements.wasMember)) {
+                // Load sigStock
+                return loadSigStock();
+              }
+              else {
+                data.sigStock = 0;
+              }
+            }),
+
+          // Get TX and sources (only pending by default)
+          loadTxAndSources(fromTime || 'pending')
+        ])
+        .then(function() {
+
+          // Load wallet events
+          addEvents();
+
+          // API extension
+          return api.data.raisePromise.load(data)
+            .catch(function(err) {
+              console.error('[wallet] Error during load API extension point. Try to continue',err);
+            });
+        })
+        .then(function() {
+          data.loaded = true;
+          console.debug("[wallet] Loaded {{0}} full data in {1}ms".format(data.pubkey.substr(0,8), Date.now() - now));
+
+          // Make sure to hide loading, because sometimes it stay - should fix freeze screen
+          UIUtils.loading.hide(1000);
+          return data;
+        })
+        .catch(function(err) {
+          data.loaded = false;
+          throw err;
+        });
+    },
+
+    loadMinData = function(options) {
+      options = options || {};
+      options.requirements = angular.isDefined(options.requirements) ? options.requirements :
+        (!data.requirements.loaded || angular.isUndefined(data.requirements.needSelf));
+      if (!options.requirements) {
+        return $q.when(data);
+      }
+
+      return refreshData(options)
+        .then(function(data) {
+          data.loaded = true;
+          return data;
+        });
+    },
+
+    refreshData = function(options) {
+      options = options || {
+        requirements: true,
+        sources: true,
+        tx: {
+          enable: true,
+          fromTime: data.tx && data.tx.fromTime !== 'pending' ? data.tx.fromTime : undefined // keep previous time
+        },
+        sigStock: true,
+        api: true
+      };
+
+      // Force some load (requirements) if not already loaded
+      options.requirements = angular.isDefined(options.requirements) ? options.requirements : !data.requirements.loaded;
+
+      // Force sources when TX enable
+      if (angular.isUndefined(options.sources) && options.tx && options.tx.enable) {
+        options.sources = true;
+      }
+
+      var jobs = [];
+
+      var now = Date.now();
+      console.debug("[wallet] {0} {{1}} data, with options: ".format(!data.loaded ? 'Loading' : 'Refreshing', data.pubkey.substr(0,8)), options);
+
+      // Get requirements
+      if (options.requirements) {
+        // Reset events
+        cleanEventsByContext('requirements');
+
+        jobs.push(
+          loadRequirements(true)
+
+            // Add wallet events
+            .then(addEvents)
+        );
+      }
+
+      if (options.sources && (!options.tx || options.tx.enable)) {
+        // Get TX and sources
+        jobs.push(loadTxAndSources(options.tx ? options.tx.fromTime: undefined));
+      }
+
+      else if (options.sources && (options.tx && !options.tx.enable)) {
+        // Get sources and only pending TX (and NOT the TX history)
+        jobs.push(loadTxAndSources('pending'));
+      }
+
+      // Load sigStock
+      if (options.sigStock) jobs.push(loadSigStock());
+
+      return (jobs.length ? $q.all(jobs) : $q.when())
+        .then(function() {
+          // Skip api
+          if (angular.isDefined(options.api) && !options.api) return data;
+
+          // API extension (after all other jobs)
+          return api.data.raisePromise.load(data)
+            .then(function(){
+
+              console.debug("[wallet] {0} {{1}} data in {2}ms".format(!data.loaded ? 'Loaded' : 'Refreshed', data.pubkey.substr(0,8), Date.now() - now));
+
+              // Compute if full loaded
+              if (!data.loaded) {
+                data.loaded = data.requirements.loaded && data.sources && true;
+              }
+
+              return data;
+            });
+        })
+        .catch(function(err) {
+          console.error("[wallet] Error while {0} data: ".format(!data.loaded ? 'Loading' : 'Refreshing'), err);
+          data.loaded = data.requirements.loaded && data.sources && true;
+          throw err;
+        });
+    },
+
+    setSelf = function(uid, blockUid){
+      // Skip if same self
+      if (data.uid == uid && (!blockUid || data.blockUid == blockUid)) return $q.when();
+
+      // Data not loaded
+      if (!data.loaded) {
+        return !loadPromise ?
+          // If no pending load: ok
+          $q.when() :
+          // If a load is running: force a reload
+          loadPromise.then(function() {
+            return setSelf(uid, blockUid); // loop
+          });
+      }
+
+      data.uid = uid;
+      data.blockUid = blockUid;
+
+      // Refresh requirements
+      return refreshData({requirements: true, sigStock: true})
+        .then(function() {
+          // Store (to remember the new uid)
+          return store({skipData: true});
+        });
+    },
+
+    isBase = function(amount, base) {
+      if (!base) return true; // no base
+      if (amount < Math.pow(10, base)) return false; // too small
+      var rest = '00000000' + amount;
+      var lastDigits = parseInt(rest.substring(rest.length-base));
+      return lastDigits === 0; // no rest
+    },
+
+    truncBase = function(amount, base) {
+      var pow = Math.pow(10, base); // = min value in this base
+      if (amount < pow) return 0;
+      return Math.trunc(amount / pow ) * pow;
+    },
+
+    truncBaseOrMinBase = function(amount, base) {
+      var pow = Math.pow(10, base);
+      if (amount < pow) return pow; //
+      return Math.trunc(amount / pow ) * pow;
+    },
+
+    powBase = function(amount, base) {
+      return base <= 0 ? amount : amount * Math.pow(10, base);
+    },
+
+    getInputs = function(amount, outputBase, filterBase) {
+      if (angular.isUndefined(filterBase)) {
+        filterBase = outputBase;
+      }
+      var sourcesAmount = 0;
+      var sources = [];
+      var minBase = filterBase;
+      var maxBase = filterBase;
+      _.find(data.sources || [], function(source) {
+        if (!source.consumed && source.base === filterBase &&
+          // Filter on simple SIG output condition - fix #845
+          BMA.regexp.TX_OUTPUT_SIG.exec(source.conditions)
+        ) {
+          sourcesAmount += powBase(source.amount, source.base);
+          sources.push(source);
+        }
+        // Stop if enough sources
+        return (sourcesAmount >= amount);
+      });
+
+      // IF not enough sources, get add inputs from lower base (recursively)
+      if (sourcesAmount < amount && filterBase > 0) {
+        filterBase -= 1;
+        var missingAmount = amount - sourcesAmount;
+        var lowerInputs = getInputs(missingAmount, outputBase, filterBase);
+
+        // Add lower base inputs to result
+        if (lowerInputs.amount > 0) {
+          minBase = lowerInputs.minBase;
+          sourcesAmount += lowerInputs.amount;
+          [].push.apply(sources, lowerInputs.sources);
+        }
+      }
+
+      return {
+        minBase: minBase,
+        maxBase: maxBase,
+        amount: sourcesAmount,
+        sources: sources
+      };
+    },
+
+    /**
+    * Send a new transaction
+    */
+    transfer = function(destPub, amount, comments, useRelative, restPub, block) {
+      return $q.all([
+          getKeypair(),
+          csCurrency.get(),
+          block && $q.when(block) || csCurrency.blockchain.current(true)
+        ])
+        .then(function(res) {
+          var keypair = res[0];
+          var currency = res[1];
+          block = res[2];
+          if (!BMA.regexp.PUBKEY.test(destPub)){
+            throw {message:'ERROR.INVALID_PUBKEY'};
+          }
+          if (!BMA.regexp.COMMENT.test(comments)){
+            throw {message:'ERROR.INVALID_COMMENT'};
+          }
+          if (!isLogin()){
+            throw {message:'ERROR.NEED_LOGIN_FIRST'};
+          }
+          if (destPub === data.pubkey){
+            throw {message:'ERROR.SAME_TX_RECIPIENT'};
+          }
+          if (!amount) {
+            throw {message:'ERROR.AMOUNT_REQUIRED'};
+          }
+          if (amount <= 0) {
+            throw {message:'ERROR.AMOUNT_NEGATIVE'};
+          }
+          amount = Math.floor(amount); // remove decimals
+
+          var inputs = {
+            amount: 0,
+            minBase: block.unitbase,
+            maxBase: block.unitbase + 1,
+            sources : []
+          };
+
+          var logs = [];
+          logs.push("[wallet] amount=" + amount);
+
+          // Get inputs, starting to use current base sources
+          var amountBase = 0;
+          while (inputs.amount < amount && amountBase <= block.unitbase) {
+            inputs = getInputs(amount, block.unitbase);
+
+            if (inputs.amount < amount) {
+              // try to reduce amount (replace last digits to zero)
+              amountBase++;
+              if (amountBase <= block.unitbase) {
+                amount = truncBase(amount, amountBase);
+                logs.push("[wallet] inputs not found. Retrying with amount =" + amount + " be compatible with amountBase=" + amountBase);
+              }
+            }
+          }
+
+          if (inputs.amount < amount) {
+            if (data.balance < amount) {
+              throw {message:'ERROR.NOT_ENOUGH_CREDIT'};
+            }
+            else if (inputs.amount === 0) {
+              throw {message:'ERROR.ALL_SOURCES_USED'};
+            }
+            else {
+              return $translate('COMMON.UD')
+                .then(function(UD) {
+                  var params;
+                  if(useRelative) {
+                    params = {
+                      amount: ($filter('formatDecimal')(inputs.amount / currency.currentUD)),
+                      unit: UD,
+                      subUnit: $filter('abbreviate')(currency.name)
+                    };
+                  }
+                  else {
+                    params = {
+                      amount: ($filter('formatDecimal')(inputs.amount/100)),
+                      unit: $filter('abbreviate')(currency.name),
+                      subUnit: ''
+                    };
+                  }
+                  return $translate('ERROR.NOT_ENOUGH_SOURCES', params)
+                    .then(function(message) {
+                      throw {message: message};
+                    });
+                });
+            }
+          }
+          // Avoid to get outputs on lower base
+          if (amountBase < inputs.minBase && !isBase(amount, inputs.minBase)) {
+            amount = truncBaseOrMinBase(amount, inputs.minBase);
+            console.debug("[wallet] Amount has been truncate to " + amount);
+            logs.push("[wallet] Amount has been truncate to " + amount);
+          }
+          else if (amountBase > 0) {
+            console.debug("[wallet] Amount has been truncate to " + amount);
+            logs.push("[wallet] Will use amount truncated to " + amount + " (amountBase="+amountBase+")");
+          }
+
+          // Send tx
+          return createAndSendTx(currency, block, keypair, destPub, amount, inputs, comments, restPub||data.pubkey, logs)
+            .then(function(res) {
+              data.balance -= res.amount;
+              if (data.balance < 0) data.balance = 0; // fix #712
+              _.forEach(inputs.sources, function(source) {
+                source.consumed=true;
+              });
+
+              // Add new sources
+              if (res && res.sources.length) {
+                console.debug("[wallet-service] New sources to be add after the TX: ", res.sources);
+                addSources(res.sources);
+              }
+
+              // Add TX to pendings
+              var pendingTx = {
+                time: csCurrency.date.now(),
+                amount: -amount,
+                pubkey: destPub,
+                comment: comments,
+                isUD: false,
+                hash: res.hash,
+                locktime: 0,
+                block_number: null
+              };
+              return csWot.extendAll([pendingTx], 'pubkey')
+                .then(function() {
+                  data.tx.pendings.unshift(pendingTx);
+
+                  // API extension
+                  api.data.raise.balanceChanged(data);
+                  api.data.raise.newTx(data);
+
+                  // Return TX hash (if chained TXs, return the last tx hash) - required by Cesium-API
+                  return {
+                    hash: res.hash
+                  };
+                });
+            })
+            .catch(function(err) {
+
+              // Source already consumed: whould refresh wallet sources
+              if (err && err.ucode === BMA.errorCodes.SOURCE_ALREADY_CONSUMED) {
+                console.debug('[wallet] TX rejected by node with error [{0}]. Reloading sources then retry...'.format(err.message||'Source already consumed'));
+                return $timeout(loadTxAndSources, 500)
+                  .then(function() {
+                    return transfer(destPub, amount, comments, useRelative, restPub, block);
+                  });
+              }
+
+              // Error in generated TX - issue #524
+              else if (err && err.ucode === BMA.errorCodes.TX_INPUTS_OUTPUTS_NOT_EQUAL) {
+                // Ask user to send log to developers
+                var esEnable = csSettings.data.plugins && csSettings.data.plugins.es && csSettings.data.plugins.es.enable;
+                if (esEnable) {
+                  UIUtils.loading.hide();
+                  return UIUtils.alert.confirm('CONFIRM.ISSUE_524_SEND_LOG', 'ERROR.POPUP_TITLE', {
+                    cssClass: 'warning',
+                    okText: 'COMMON.BTN_OK',
+                    cancelText: 'COMMON.BTN_NO'
+                  })
+                  .then(function(confirm) {
+                    if (confirm) {
+                      api.error.raise.send({
+                        title: 'Issue #524 logs',
+                        content: 'App version: ' +csConfig.version+'\n'+
+                        'App build: ' +csConfig.build+'\n'+
+                        'Logs:\n\n' + logs.join('\n')
+                      });
+                      return $timeout(function() {
+                        throw {message: 'ERROR.ISSUE_524_TX_FAILED'};
+                      }, 1500);
+                    }
+                    throw {message: 'ERROR.SEND_TX_FAILED'};
+                  });
+                }
+              }
+              throw err;
+            });
+        });
+    },
+
+    /**
+     * Send a WIF wallet
+     */
+    transferAll = function(destPub, amount, comments, useRelative, restPub) {
+      if (!isLogin()) return $q.reject({message:'ERROR.NEED_LOGIN_FIRST'});
+
+      if (!restPub || destPub == restPub) {
+        return $q.reject({message: "Could not have same pubkey for 'destPub' and 'restPub'"});
+      }
+
+      return csCurrency.blockchain.lastValid()
+        .then(function(block) {
+          console.debug("[wallet] Using last valid block as TX reference (to avoid network fork): ", block);
+
+          return transfer(destPub, amount, comments, useRelative, restPub, block)
+            .then(function() {
+              // If more money: transfer all to restPub
+              if (data.balance > 0 && restPub) {
+                console.debug("[wallet] Wallet has some more money: transfering fund to [{0}]".format(restPub.substring(0,8)));
+                return transfer(restPub, data.balance, undefined/*comments*/, false/*useRelative*/, restPub, block);
+              }
+            });
+
+        });
+
+    },
+
+    /**
+     * Create TX doc and send it
+     * @param block the current block
+     * @param destPub
+     * @param amount
+     * @param inputs
+     * @param comments
+     * @return the hash of the sent TX
+     */
+    createAndSendTx = function(currency, block, keypair, destPub, amount, inputs, comments, restPub, logs) {
+
+      // Make sure a TX in compact mode has no more than 100 lines (fix #118)
+      // (If more than 100 lines, send to TX to himself first, then its result as sources for the final TX)
+      if (inputs.sources.length > constants.TX_MAX_INPUTS_COUNT) {
+        console.debug("[Wallet] TX has to many sources. Will chain TX...");
+
+        // Compute a slice of sources
+        var firstSlice = {
+          minBase: block.unitbase,
+          maxBase: 0,
+          amount: 0,
+          sources: inputs.sources.slice(0, constants.TX_MAX_INPUTS_COUNT) /* end index is excluded, so array length=TX_MAX_INPUTS_COUNT - issue #524 */
+        };
+        _.forEach(firstSlice.sources, function(source) {
+          if (source.base < firstSlice.minBase) firstSlice.minBase = source.base;
+          if (source.base > firstSlice.maxBase) firstSlice.maxBase = source.base;
+          firstSlice.amount += powBase(source.amount, source.base);
+        });
+
+        // Send inputs first slice
+        return createAndSendTx(currency, block, keypair, data.pubkey/*to himself*/,  firstSlice.amount, firstSlice, undefined/*comment not need*/, data.pubkey/*rest to himself*/, logs)
+          .then(function(res) {
+            _.forEach(firstSlice.sources, function(source) {
+              source.consumed=true;
+            });
+            addSources(res.sources);
+
+            var secondSlice = {
+              minBase: block.unitbase,
+              maxBase: 0,
+              amount: 0,
+              sources: inputs.sources.slice(constants.TX_MAX_INPUTS_COUNT).concat(res.sources)
+            };
+            _.forEach(secondSlice.sources, function(source) {
+              if (source.base < secondSlice.minBase) secondSlice.minBase = source.base;
+              if (source.base > secondSlice.maxBase) secondSlice.maxBase = source.base;
+              secondSlice.amount += powBase(source.amount, source.base);
+            });
+
+            // Send inputs second slice (recursive call)
+            return createAndSendTx(currency, block, keypair, destPub, amount, secondSlice, comments, restPub, logs);
+          });
+      }
+
+      var tx = 'Version: '+ constants.TX_VERSION +'\n' +
+        'Type: Transaction\n' +
+        'Currency: ' + currency.name + '\n' +
+        'Blockstamp: ' + block.number + '-' + block.hash + '\n' +
+        'Locktime: 0\n' + // no lock
+        'Issuers:\n' +
+        data.pubkey + '\n' +
+        'Inputs:\n';
+
+      _.forEach(inputs.sources, function(source) {
+        // if D : AMOUNT:BASE:D:PUBLIC_KEY:BLOCK_ID
+        // if T : AMOUNT:BASE:T:T_HASH:T_INDEX
+        tx += [source.amount, source.base, source.type, source.identifier,source.noffset].join(':')+"\n";
+      });
+
+      tx += 'Unlocks:\n';
+      for (i=0; i<inputs.sources.length; i++) {
+        // INPUT_INDEX:UNLOCK_CONDITION
+        tx += i + ':SIG(0)\n';
+      }
+
+      tx += 'Outputs:\n';
+      // AMOUNT:BASE:CONDITIONS
+      var rest = amount;
+      var outputBase = inputs.maxBase;
+      var outputAmount;
+      var outputOffset = 0;
+      var newSources = [];
+      // Outputs to receiver (if not himself)
+      if (destPub !== data.pubkey) {
+        while(rest > 0) {
+          outputAmount = truncBase(rest, outputBase);
+          rest -= outputAmount;
+          if (outputAmount > 0) {
+            outputAmount = outputBase === 0 ? outputAmount : outputAmount / Math.pow(10, outputBase);
+            tx += outputAmount + ':' + outputBase + ':SIG(' + destPub + ')\n';
+            outputOffset++;
+          }
+          outputBase--;
+        }
+        rest = inputs.amount - amount;
+        outputBase = inputs.maxBase;
+      }
+      // Outputs to restPub
+      while(rest > 0) {
+        outputAmount = truncBase(rest, outputBase);
+        rest -= outputAmount;
+        if (outputAmount > 0) {
+          outputAmount = outputBase === 0 ? outputAmount : outputAmount / Math.pow(10, outputBase);
+          tx += outputAmount +':'+outputBase+':SIG('+restPub+')\n';
+          // If rest to himself: add new sources
+          if (data.pubkey === restPub) {
+            newSources.push({
+              type: 'T',
+              noffset: outputOffset,
+              amount: outputAmount,
+              base: outputBase,
+              conditions: 'SIG('+restPub+')',
+              consumed: false
+            });
+          }
+          outputOffset++;
+        }
+        outputBase--;
+      }
+
+      tx += "Comment: "+ (comments||"") + "\n";
+
+      // Append to logs (need to resolve issue #524)
+      if (logs) {
+        if (destPub == data.pubkey) {
+          logs.push('[wallet] Creating new TX, using inputs:\n - minBase: '+inputs.minBase+'\n - maxBase: '+inputs.maxBase);
+        }
+        else {
+          logs.push('[wallet] Creating new TX, using inputs:\n - minBase: '+inputs.minBase+'\n - maxBase: '+inputs.maxBase + '\n - sources (=TX inputs):');
+        }
+        _.forEach(inputs.sources, function(source) {
+          logs.push([source.amount, source.base, source.type, source.identifier,source.noffset].join(':'));
+        });
+        logs.push("\n[wallet] generated TX document (without signature) :\n------ START ------\n" + tx + "------ END ------\n");
+      }
+
+      return CryptoUtils.sign(tx, keypair)
+        .then(function(signature) {
+          var signedTx = tx + signature + "\n";
+          return BMA.tx.process({transaction: signedTx})
+            .catch(function(err) {
+              if (err && err.ucode === BMA.errorCodes.TX_ALREADY_PROCESSED) {
+                // continue
+                return;
+              }
+              throw err;
+            })
+            .then(function() {
+              return CryptoUtils.util.hash(signedTx);
+            })
+            .then(function(txHash) {
+              _.forEach(newSources, function(output) {
+                output.identifier= txHash;
+                output.consumed = false;
+                output.pending = true;
+              });
+              return {
+                amount: (data.pubkey === destPub) ? 0 : ((data.pubkey === restPub) ? amount : inputs.amount),
+                tx: signedTx,
+                hash: txHash,
+                sources: newSources
+              };
+            });
+        });
+    },
+
+    getIdentityDocument = function(currency, keypair, uid, blockUid) {
+      uid = uid || data.uid;
+      blockUid = blockUid || data.blockUid;
+      if (!uid || !blockUid) {
+        throw {message: 'ERROR.WALLET_HAS_NO_SELF'};
+      }
+      if (data.requirements.expired) {
+        throw {message: 'ERROR.WALLET_IDENTITY_EXPIRED'};
+      }
+
+      var identity = 'Version: '+ constants.IDTY_VERSION +'\n' +
+        'Type: Identity\n' +
+        'Currency: ' + currency.name + '\n' +
+        'Issuer: ' + data.pubkey + '\n' +
+        'UniqueID: ' + uid + '\n' +
+        'Timestamp: ' + blockUid + '\n';
+      return CryptoUtils.sign(identity, keypair)
+        .then(function(signature) {
+          identity += signature + '\n';
+          console.debug('Has generate an identity document:\n----\n' + identity + '----');
+          return identity;
+        });
+    },
+
+    /**
+    * Send self identity
+    */
+    self = function(uid, needToLoadRequirements) {
+        if (!BMA.regexp.USER_ID.test(uid)){
+          return $q.reject({message: 'ERROR.INVALID_USER_ID'});
+        }
+        var block;
+        return $q.all([
+          getKeypair(),
+          csCurrency.get(),
+          csCurrency.blockchain.lastValid()
+        ])
+        // Create identity document
+        .then(function(res) {
+          var keypair = res[0];
+          var currency = res[1];
+          block = res[2];
+          return getIdentityDocument(currency, keypair, uid, block.number + '-' + block.hash);
+        })
+
+        // Send to node
+        .then(function (identity) {
+          return BMA.wot.add({identity: identity});
+        })
+
+        .then(function () {
+          if (!!needToLoadRequirements) {
+            // Refresh membership data (if need)
+            return loadRequirements(false/*no cache*/)
+
+              // Add wallet events
+              .then(addEvents);
+          }
+          else {
+            data.uid = uid;
+            data.blockUid = block.number + '-' + block.hash;
+          }
+        })
+        .catch(function (err) {
+          if (err && err.ucode === BMA.errorCodes.IDENTITY_SANDBOX_FULL) {
+            throw {ucode: BMA.errorCodes.IDENTITY_SANDBOX_FULL, message: 'ERROR.IDENTITY_SANDBOX_FULL'};
+          }
+          throw err;
+        });
+    },
+
+   /**
+    * Send membership (in or out)
+    */
+    membership = function(sideIn) {
+      return function() {
+        var membership;
+
+        return $q.all([
+            getKeypair(),
+            csCurrency.blockchain.lastValid()
+          ])
+          .then(function(res) {
+            var keypair = res[0];
+            var block = res[1];
+            // Create membership to sign
+            membership = 'Version: '+ constants.MS_VERSION +'\n' +
+              'Type: Membership\n' +
+              'Currency: ' + block.currency + '\n' +
+              'Issuer: ' + data.pubkey + '\n' +
+              'Block: ' + block.number + '-' + block.hash + '\n' +
+              'Membership: ' + (!!sideIn ? "IN" : "OUT" ) + '\n' +
+              'UserID: ' + data.uid + '\n' +
+              'CertTS: ' + data.blockUid + '\n';
+
+            return CryptoUtils.sign(membership, keypair);
+          })
+          .then(function(signature) {
+            var signedMembership = membership + signature + '\n';
+            // Send signed membership
+            return BMA.blockchain.membership({membership: signedMembership});
+          })
+          .then(function() {
+            return $timeout(function() {
+              return loadRequirements(false /*no cache*/);
+            }, 1000); // waiting for node to process membership doc
+          })
+
+          // Add wallet events
+          .then(addEvents);
+      };
+    },
+
+    /**
+    * Send identity certification
+    */
+    certify = function(uid, pubkey, timestamp, signature, isMember, wasMember) {
+      return $q.all([
+          getKeypair(),
+          csCurrency.get(),
+          csCurrency.blockchain.lastValid()
+        ])
+        .then(function(res) {
+          var keypair = res[0];
+          var currency = res[1];
+          var block = res[2];
+
+          // Check if member account
+          if (!data.isMember && !csConfig.initPhase) {
+            throw {message:'ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION'};
+          }
+
+          // Create the self part to sign
+          var cert = 'Version: '+ constants.CERT_VERSION +'\n' +
+            'Type: Certification\n' +
+            'Currency: ' + currency.name + '\n' +
+            'Issuer: ' + data.pubkey + '\n' +
+            'IdtyIssuer: ' + pubkey + '\n' +
+            'IdtyUniqueID: ' + uid + '\n' +
+            'IdtyTimestamp: ' + timestamp + '\n' +
+            'IdtySignature: ' + signature + '\n' +
+            'CertTimestamp: ' + block.number + '-' + block.hash + '\n';
+
+          return CryptoUtils.sign(cert, keypair)
+            .then(function(signature) {
+              var signedCert = cert + signature + '\n';
+              return BMA.wot.certify({cert: signedCert});
+            })
+            .then(function() {
+              var cert = {
+                pubkey: pubkey,
+                uid: uid,
+                time: block.medianTime,
+                isMember: isMember,
+                wasMember: wasMember,
+                expiresIn: currency.parameters.sigWindow,
+                pending: true,
+                block: block.number,
+                valid: true
+              };
+
+              // Notify extension
+              api.action.raise.certify(cert);
+
+              return cert;
+            });
+        });
+    },
+
+    addEvent = function(event, insertAtFirst) {
+      event = event || {};
+      event.type = event.type || 'info';
+      event.message = event.message || '';
+      event.messageParams = event.messageParams || {};
+      event.context = event.context || 'undefined';
+      if (event.message.trim().length) {
+        if (!insertAtFirst) {
+          data.events.push(event);
+        }
+        else {
+          data.events.splice(0, 0, event);
+        }
+      }
+      else {
+        console.debug('Event without message. Skipping this event');
+      }
+    },
+
+    getkeypairSaveId = function(record) {
+        var nbCharSalt = Math.round(record.answer.length / 2);
+        var salt = record.answer.substr(0, nbCharSalt);
+        var pwd = record.answer.substr(nbCharSalt);
+        return CryptoUtils.scryptKeypair(salt, pwd)
+          .then(function (keypair) {
+            record.pubkey = CryptoUtils.util.encode_base58(keypair.signPk);
+            record.keypair = keypair;
+            return record;
+          });
+      },
+
+    getCryptedId = function(record){
+      return getkeypairSaveId(record)
+        .then(CryptoUtils.util.random_nonce)
+        .then(function(nonce) {
+          record.nonce = CryptoUtils.util.encode_base58(nonce);
+          return $q.all([
+            CryptoUtils.box.pack(record.salt, nonce, record.keypair.boxPk, record.keypair.boxSk),
+            CryptoUtils.box.pack(record.pwd, nonce, record.keypair.boxPk, record.keypair.boxSk)
+          ]);
+        })
+        .then(function (res) {
+          record.salt = res[0];
+          record.pwd = res[1];
+          return record;
+        });
+    },
+
+    recoverId = function(recover) {
+      if (!recover || !recover.cypherNonce || !recover.cypherSalt || !recover.cypherPwd) {
+        throw {message:'ERROR.INVALID_FILE_FORMAT'};
+      }
+      var nonce = CryptoUtils.util.decode_base58(recover.cypherNonce);
+      return getkeypairSaveId(recover)
+        .then(function (recover) {
+          return CryptoUtils.box.open(recover.cypherSalt, nonce, recover.keypair.boxPk, recover.keypair.boxSk);
+        })
+        .then(function (salt) {
+          recover.salt = salt;
+          return CryptoUtils.box.open(recover.cypherPwd, nonce, recover.keypair.boxPk, recover.keypair.boxSk);
+        })
+        .then(function (pwd) {
+          recover.pwd = pwd;
+          return recover;
+        })
+        .catch(function(err){
+          console.warn('Incorrect answers: unable to recover identifiers', err);
+          throw new Error('Incorrect answers: unable to recover identifiers');
+        });
+    },
+
+    getSaveIDDocument = function(record) {
+      var saveId = 'Version: 10 \n' +
+        'Type: SaveID\n' +
+        'Questions: ' + '\n' + record.questions +
+        'Issuer: ' + data.pubkey + '\n' +
+        'Crypted-Nonce: '+ record.nonce + '\n'+
+        'Crypted-Pubkey: '+ record.pubkey +'\n' +
+        'Crypted-Salt: '+ record.salt  + '\n' +
+        'Crypted-Pwd: '+ record.pwd + '\n';
+
+      // Sign SaveId document
+      return CryptoUtils.sign(saveId, data.keypair)
+
+        .then(function(signature) {
+          saveId += signature + '\n';
+          console.debug('Has generate an SaveID document:\n----\n' + saveId + '----');
+          return saveId;
+        });
+
+    },
+
+    downloadSaveId = function(record){
+      return getSaveIDDocument(record)
+        .then(function(saveId) {
+          var saveIdFile = new Blob([saveId], {type: 'text/plain; charset=utf-8'});
+          FileSaver.saveAs(saveIdFile, '{0}-recover_ID.txt'.format(data.pubkey.substring(0,8)));
+        });
+    },
+
+    downloadKeyFile = function(format){
+      if (!isAuth()) return $q.reject('user not authenticated');
+
+      return $q.all([
+          csCurrency.get(),
+          csCrypto.keyfile.generateContent(data.keypair,
+            {
+              type: format,
+              password: function() {
+                UIUtils.loading.hide();
+                return Modals.showPassword({
+                    title: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE',
+                    subTitle: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP'
+                  })
+                  .then(function(password) {
+                    return UIUtils.loading.show(10)
+                      .then(function(){
+                        return password;
+                    });
+                  });
+              }
+          })
+        ])
+        .then(function(res) {
+          var currency = res[0];
+          var document = res[1];
+          return $translate('ACCOUNT.SECURITY.KEYFILE_FILENAME', {
+              currency: currency.name,
+              pubkey: data.pubkey,
+              format: format,
+            })
+            .then(function(filename){
+              var file = new Blob([document], {type: 'text/plain; charset=utf-8'});
+              FileSaver.saveAs(file, filename);
+            });
+        });
+
+    },
+
+    getRevocationDocument = function() {
+      return $q.all([
+          getKeypair(),
+          csCurrency.get()
+        ])
+
+        .then(function(res) {
+          var keypair = res[0];
+          var currency = res[1];
+          // get the Identity document
+          return getIdentityDocument(currency, keypair)
+
+            // Create membership document (unsigned)
+            .then(function(identity){
+              var identityLines = identity.trim().split('\n');
+              var idtySignature = identityLines[identityLines.length-1];
+
+              var revocation = 'Version: '+ constants.REVOKE_VERSION +'\n' +
+                'Type: Revocation\n' +
+                'Currency: ' + currency.name + '\n' +
+                'Issuer: ' + data.pubkey + '\n' +
+                'IdtyUniqueID: ' + data.uid + '\n' +
+                'IdtyTimestamp: ' + data.blockUid + '\n' +
+                'IdtySignature: ' + idtySignature + '\n';
+
+
+              // Sign revocation document
+              return CryptoUtils.sign(revocation, keypair)
+
+              // Add revocation to document
+                .then(function(signature) {
+                  revocation += signature + '\n';
+                  console.debug('Has generate an revocation document:\n----\n' + revocation + '----');
+                  return revocation;
+                });
+            });
+        });
+    },
+
+    /**
+     * Send a revocation
+     */
+    revoke = function() {
+
+      // Clear old events
+      cleanEventsByContext('revocation');
+
+      // Get revocation document
+      return getRevocationDocument()
+        // Send revocation document
+        .then(function(revocation) {
+          return BMA.wot.revoke({revocation: revocation});
+        })
+
+        // Reload requirements
+        .then(function() {
+
+          return $timeout(function() {
+            return loadRequirements(false/*no cache*/);
+          }, 1000); // waiting for node to process membership doc
+        })
+
+        // Add wallet events
+        .then(addEvents)
+
+        .catch(function(err) {
+          if (err && err.ucode == BMA.errorCodes.REVOCATION_ALREADY_REGISTERED) {
+            // Already registered by node: just add an event
+            addEvent({type:'pending', message: 'INFO.REVOCATION_SENT_WAITING_PROCESS', context: 'requirements'}, true);
+          }
+          else {
+            throw err;
+          }
+        })
+        ;
+    },
+
+    revokeWithFile = function(revocation){
+      return $q.all([
+          BMA.wot.revoke({revocation: revocation})
+        ])
+        // Reload requirements
+        .then(function(res) {
+          if (isLogin()) {
+            return $timeout(function () {
+              return loadRequirements(false/*no cache*/);
+            }, 1000) // waiting for node to process membership doc
+
+             // Add wallet events
+            .then(addEvents)
+
+            .catch(function (err) {
+              if (err && err.ucode == BMA.errorCodes.REVOCATION_ALREADY_REGISTERED) {
+                // Already registered by node: just add an event
+                addEvent({type: 'pending', message: 'INFO.REVOCATION_SENT_WAITING_PROCESS', context: 'requirements'}, true);
+              }
+              else {
+                throw err;
+              }
+            });
+          }
+          else {
+            addEvent({type: 'pending', message: 'INFO.REVOCATION_SENT_WAITING_PROCESS', context: 'requirements'}, true);
+          }
+        });
+
+    },
+
+    downloadRevocation = function(){
+      return $q.all([
+          csCurrency.get(),
+          getRevocationDocument()
+        ])
+        .then(function(res) {
+          var currency = res[0];
+          var revocation = res[1];
+          var revocationFile = new Blob([revocation], {type: 'text/plain; charset=utf-8'});
+          return $translate('ACCOUNT.SECURITY.REVOCATION_FILENAME', {
+            uid: data.uid,
+            currency: currency.name,
+            pubkey: data.pubkey
+          })
+          .then(function (fileName) {
+            FileSaver.saveAs(revocationFile, fileName);
+          });
+        });
+    },
+
+    cleanEventsByContext = function(context){
+      data.events = data.events.reduce(function(res, event) {
+        if (event.context && event.context == context) return res;
+        return res.concat(event);
+      },[]);
+    },
+
+    /* -- children wallets -- */
+
+    setParentWallet = function(parentWallet) {
+      listeners = listeners || [];
+      var listener;
+      _.forEach(['load', 'reset'], function(method) {
+        listener = api.data.on[method]($rootScope, function(data, deferred) {
+          deferred = deferred || $q.defer();
+          parentWallet.api.data.raisePromise[method](data)
+            .then(deferred.resolve)
+            .catch(deferred.reject);
+          return deferred.promise;
+        }, this);
+        listeners.push(listener);
+      });
+
+      // Unauth when parent wallet unauth
+      listener = parentWallet.api.data.on.unauth($rootScope, function() {
+        if (isAuth()) unauth();
+      }, this);
+      listeners.push(listener);
+    },
+
+    createNewChildWallet = function(options) {
+      var wallet = newChildInstance();
+      addChildWallet(wallet, options);
+      return wallet;
+    },
+
+    addChildWallet = function(wallet, options) {
+      // Link to parent
+      wallet.children.setParent(exports); // = link to self wallet
+
+      data.children = data.children || [];
+      data.children.push(wallet);
+
+      // Store (store children locally)
+      if (!options || angular.isUndefined(options.store) || options.store) {
+        return storeData();
+      }
+      return $q.when();
+    },
+
+    removeAllChildrenWallets = function(options) {
+
+      // stop/unauth all existing wallets
+      if (!options || options.stop) {
+        _.forEach(data.children || [], function(wallet){
+          wallet.stop();
+        });
+      }
+      var removedChildren = data.children.splice(0, data.children.length);
+
+      // Store (store children locally)
+      if (!options || angular.isUndefined(options.store) || options.store) {
+        return storeData();
+      }
+      return removedChildren;
+
+    },
+
+    removeChildWalletById = function(id, options) {
+      data.children = data.children || [];
+      var childIndex = _.findIndex(data.children, function(child) {return child.id === id;});
+      if (childIndex === -1) {
+        console.warn('[wallet] Unable to remove child wallet {'+id+'} (not found)');
+        return;
+      }
+      // Remove the wallet, and return it
+      var wallet = data.children.splice(childIndex, 1)[0];
+
+      // Force to stop without calling api
+      wallet.stop();
+
+      // Store (store children locally)
+      if (!options || angular.isUndefined(options.store) || options.store) {
+        return storeData();
+      }
+    },
+
+    getChildWalletById = function(id) {
+      return (id !== 'default') && _.find(data.children|| [], function(child) {return child.id === +id;}) || undefined;
+    },
+
+    getChildWalletByPubkey = function(pubkey) {
+      return _.find(data.children|| [], function(child) {return child.isUserPubkey(pubkey);});
+    },
+
+    hasChildrenWithPubkey = function(pubkey) {
+      return !!getChildWalletByPubkey(pubkey);
+    },
+
+    getChildrenWalletCount =  function() {
+      return angular.isDefined(data.childrenCount) ? data.childrenCount : (data.children && data.children.length || 0);
+    },
+
+    newChildInstance =  function() {
+      // Return max(id) + 1
+      var walletId = (data.children || []).reduce(function(res, wallet) {
+          return Math.max(res, wallet.id);
+        }, 0) + 1;
+      return service.instance(walletId, BMA);
+    },
+
+    getAllChildrenWallet = function() {
+      return openEncryptedData()
+        .then(function() {
+          return data.children;
+        });
+    },
+
+    getAllPubkeys = function() {
+      if (!data.pubkey) throw new Error('User not login!');
+      return (data.children || []).reduce(function(res, wallet) {
+        return wallet.data.pubkey ? res.concat(wallet.data.pubkey) : res;
+      }, [data.pubkey])
+    }
+
+    getByPubkey = function(pubkey) {
+      if (!pubkey) throw new Error("Missing 'pubkey' argument !");
+      if (!data.pubkey) throw new Error('User not login!');
+      if (data.pubkey === pubkey) return exports; // main wallet
+      return getChildWalletByPubkey(pubkey);
+    }
+
+    downloadChildrenWalletFile = function() {
+      return $q.all([
+        getAllChildrenWallet(),
+        csCurrency.get()
+      ])
+        .then(function(res) {
+          var children = res[0];
+          var currency = res[1];
+          var content = (children||[]).reduce(function(res, wallet) {
+            return res + [wallet.data.pubkey, wallet.data.uid, wallet.data.localName||wallet.data.name].join('\t') + '\n';
+          }, '');
+          var file = new Blob([content], {type: 'text/plain; charset=utf-8'});
+          return $translate('ACCOUNT.WALLET_LIST.EXPORT_FILENAME', {
+              pubkey: data.pubkey,
+              currency: currency.name,
+            })
+            .then(function (fileName) {
+              FileSaver.saveAs(file, fileName);
+            });
+        });
+    },
+
+    /* -- END children wallets -- */
+
+    openEncryptedData = function(options) {
+      if (!hasEncryptedData()) return $q.when();
+      if (!isAuth()) return auth().then(openEncryptedData); // Force auth if need
+
+      // Open encrypted data
+      return CryptoUtils.box.keypair.fromSignKeypair(data.keypair)
+        .then(function(keypair) {
+          var nonce = CryptoUtils.util.decode_base58(data.encryptedData.nonce);
+          return CryptoUtils.box.open(data.encryptedData.content, nonce, keypair.boxPk, keypair.boxSk);
+        })
+        // Then apply
+        .then(function(content) {
+          data.encryptedData = null; // reset encrypted data
+          var promise = applyRestoredData(JSON.parse(content));
+
+          // Store (store data into session storage)
+          if (!options || angular.isUndefined(options.store) || options.store) {
+            promise.then(function() {
+              return storeData();
+            });
+          }
+
+          return promise;
+        })
+        ;
+    },
+
+    /**
+    * De-serialize from JSON string
+    */
+    fromJson = function(json, failIfInvalid) {
+      failIfInvalid = angular.isUndefined(failIfInvalid) ? true : failIfInvalid;
+      return $q(function(resolve, reject) {
+        var obj;
+        try {
+          obj = JSON.parse(json || '{}');
+        }
+        catch(err) { /* invalid JSON : continue*/}
+
+        // FIXME #379
+        /*if (obj && obj.pubkey) {
+          resolve({
+            pubkey: obj.pubkey
+          });
+        }
+        else */
+        if (obj && obj.keypair && obj.keypair.signPk && obj.keypair.signSk) {
+          var keypair = {};
+          var i;
+
+          // sign Pk : Convert to Uint8Array type
+          var signPk = new Uint8Array(32);
+          for (i = 0; i < 32; i++) signPk[i] = obj.keypair.signPk[i];
+          keypair.signPk = signPk;
+
+          var signSk = new Uint8Array(64);
+          for (i = 0; i < 64; i++) signSk[i] = obj.keypair.signSk[i];
+          keypair.signSk = signSk;
+
+          // box Pk : Convert to Uint8Array type
+          if (obj.version && obj.keypair.boxPk) {
+            var boxPk = new Uint8Array(32);
+            for (i = 0; i < 32; i++) boxPk[i] = obj.keypair.boxPk[i];
+            keypair.boxPk = boxPk;
+          }
+
+          if (obj.version && obj.keypair.boxSk) {
+            var boxSk = new Uint8Array(32);
+            for (i = 0; i < 64; i++) boxSk[i] = obj.keypair.boxSk[i];
+            keypair.boxSk = boxSk;
+          }
+
+          resolve({
+            pubkey: obj.pubkey,
+            keypair: keypair,
+            tx: obj.tx
+          });
+        }
+        else if (failIfInvalid) {
+          reject('Not a valid Wallet.data object');
+        }
+        else {
+          resolve();
+        }
+      });
+    },
+
+    checkAuthIdle = function(isAuthResult) {
+      isAuthResult = angular.isDefined(isAuthResult) ? isAuthResult : isAuth();
+      var newEnableAuthIdle = isAuthResult && settings && settings.keepAuthIdle > 0 && settings.keepAuthIdle != csSettings.constants.KEEP_AUTH_IDLE_SESSION;
+      var changed = (enableAuthIdle != newEnableAuthIdle);
+
+      // need start/top watching
+      if (changed) {
+        // start idle
+        if (newEnableAuthIdle) {
+          console.debug("[wallet] Start idle (delay: {0}s)".format(settings.keepAuthIdle));
+          Idle.setIdle(settings.keepAuthIdle);
+          Idle.watch();
+        }
+        // stop idle, if was enable
+        else if (enableAuthIdle){
+          console.debug("[wallet] Stop idle");
+          Idle.unwatch();
+        }
+        enableAuthIdle = newEnableAuthIdle;
+      }
+
+      // if idle time changed: apply it
+      else if (newEnableAuthIdle && Idle.getIdle() !== settings.keepAuthIdle) {
+        console.debug("[idle] Updating auth idle (delay: {0}s)".format(settings.keepAuthIdle));
+        Idle.setIdle(settings.keepAuthIdle);
+      }
+
+      // Make sure to store seckey, in the session storage for secret key -fix #372
+      var storeSecKey = isAuthResult && settings && settings.keepAuthIdle == csSettings.constants.KEEP_AUTH_IDLE_SESSION && true;
+      if (storeSecKey) {
+        sessionStorage.put(constants.STORAGE_SECKEY, CryptoUtils.util.encode_base58(data.keypair.signSk));
+      }
+      // Make sure to clean previous seckey, if exists in session storage
+      else if (changed) {
+        sessionStorage.put(constants.STORAGE_SECKEY, null);
+      }
+    };
+
+    function getWalletSettings(settings) {
+      return settings && {
+        useLocalStorage: settings.useLocalStorage,
+        useLocalStorageEncryption: settings.useLocalStorageEncryption,
+        rememberMe: settings.rememberMe,
+        keepAuthIdle: settings.keepAuthIdle
+      };
+    }
+
+    function onSettingsChanged(allSettings) {
+      var newSettings = getWalletSettings(allSettings);
+      var hasChanged = !angular.equals(settings, newSettings);
+      if (!hasChanged || !settings) return; // skip
+
+      var useEncryptionChanged = !angular.equals(settings.useLocalStorageEncryption, newSettings.useLocalStorageEncryption);
+      var useStorageChanged = !angular.equals(settings.useLocalStorage, newSettings.useLocalStorage) || useEncryptionChanged;
+      var keepAuthIdleChanged = !angular.equals(settings.keepAuthIdle, newSettings.keepAuthIdle);
+
+      settings = newSettings;
+
+      if (keepAuthIdleChanged) {
+        checkAuthIdle();
+      }
+
+      // Local storage option changed
+      if (useStorageChanged) {
+
+        // If disabled, then reset the store
+        if (!settings.useLocalStorage) {
+          resetStore(data.pubkey);
+        }
+        // If storage enable
+        else {
+          // Store login data
+          return store()
+            .then(function() {
+
+              // Encryption enable: auth before saving data
+              if (data.childrenCount > 0 && useEncryptionChanged && settings.useLocalStorageEncryption) {
+                return auth({minData: true, silent: true})
+                  .catch(function(err){
+                    // user not auth: revert encryption to false
+                    if (err === 'CANCELLED') {
+                      csSettings.apply({useLocalStorageEncryption: false});
+                      return csSettings.store();
+                    }
+                    else {
+                      throw err;
+                    }
+                  });
+              }
+            })
+
+            // Store other data (children wallet, ...)
+            .then(storeData);
+        }
+      }
+    }
+
+    function addListeners() {
+      listeners = [
+        // Listen if settings changed
+        csSettings.api.data.on.changed($rootScope, onSettingsChanged, this),
+        // Listen if node changed
+        BMA.api.node.on.restart($rootScope, restart, this)
+      ];
+
+      $rootScope.$on('IdleStart', unauth);
+    }
+
+    function addListener(listener) {
+      listeners = listeners || [];
+      listeners.push(listener);
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function ready() {
+      if (started) return $q.when();
+      return startPromise || start();
+    }
+
+    function stop() {
+      console.debug('[wallet] Stopping...');
+      removeListeners();
+      resetData();
+    }
+
+    function restart() {
+      stop();
+      return $timeout(start, 200);
+    }
+
+    function start(options) {
+      options = options || {};
+      // By default, restore if the service is the default object
+      options.restore =  angular.isDefined(options.restore) ? options.restore : (id === 'default');
+
+      console.debug('[wallet] Starting...');
+      var now = Date.now();
+
+      startPromise = $q.all([
+          csSettings.ready()
+            .then(function() {
+              settings = getWalletSettings(csSettings.data);
+            }),
+          csCurrency.ready(),
+          BMA.ready()
+        ]);
+
+      // Restore
+      if (options.restore) startPromise = startPromise.then(restore);
+
+      // Emit ready event
+      startPromise.then(function() {
+          addListeners();
+
+          console.debug('[wallet] Started in ' + (Date.now() - now) + 'ms');
+
+          started = true;
+          startPromise = null;
+        })
+        .then(function(){
+          return data;
+        });
+
+      return startPromise;
+    }
+
+    // Register extension points
+    api.registerEvent('data', 'init');
+    api.registerEvent('data', 'loginCheck'); // allow to stop the login process
+    api.registerEvent('data', 'login'); // executed after login check (cannot stop the login process)
+    api.registerEvent('data', 'auth');
+    api.registerEvent('data', 'unauth');
+    api.registerEvent('data', 'load');
+    api.registerEvent('data', 'logout');
+    api.registerEvent('data', 'reset');
+    api.registerEvent('data', 'store');
+
+    api.registerEvent('error', 'send');
+
+    // Data changed : balance changed, new TX
+    api.registerEvent('data', 'balanceChanged');
+    api.registerEvent('data', 'newTx');
+
+    api.registerEvent('action', 'certify');
+
+
+    // init data
+    resetData(true);
+
+    // Override default store/restore function,  when not the 'default' wallet
+    if (id !== "default") {
+      //start = $q.when;
+      //started = true;
+      store = $q.when;
+      restore = $q.when;
+      restoreData = $q.when;
+      //checkAuthIdle = function(){};
+    }
+
+    exports = {
+      id: id,
+      data: data,
+      ready: ready,
+      start: start,
+      stop: stop,
+      // auth
+      login: login,
+      logout: logout,
+      auth: auth,
+      unauth: unauth,
+      isLogin: isLogin,
+      isAuth: isAuth,
+      getKeypair: getKeypair,
+      hasSelf: hasSelf,
+      setSelf: setSelf,
+      isMember: function() {
+        return data.isMember;
+      },
+      isDataLoaded : isDataLoaded,
+      isDefault: isDefault,
+      isNeverUsed: isNeverUsed,
+      isNew: isNew,
+      isUserPubkey: isUserPubkey,
+      getData: getData,
+      loadData: loadData,
+      refreshData: refreshData,
+      loadQrCode: loadQrCode,
+      // internal
+      internal: {
+        addListener: addListener,
+        removeListeners: removeListeners
+      },
+      // local storage
+      store: store,
+      storeData: storeData, // store children wallet, readTime, etc.
+      // operations
+      transfer: transfer,
+      transferAll: transferAll,
+      self: self,
+      revoke: revoke,
+      revokeWithFile: revokeWithFile,
+      certify: certify,
+      downloadSaveId: downloadSaveId,
+      getCryptedId: getCryptedId,
+      recoverId: recoverId,
+      downloadRevocation: downloadRevocation,
+      downloadKeyFile: downloadKeyFile,
+      pubkeys: getAllPubkeys,
+      getByPubkey: getByPubkey,
+      membership: {
+        inside: membership(true),
+        out: membership(false)
+      },
+      events: {
+        add: addEvent,
+        cleanByContext: cleanEventsByContext
+      },
+      children: {
+        create: createNewChildWallet,
+        add: addChildWallet,
+        remove: removeChildWalletById,
+        get: getChildWalletById,
+        getByPubkey: getChildWalletByPubkey,
+        all: getAllChildrenWallet,
+        setParent: setParentWallet,
+        count: getChildrenWalletCount,
+        hasPubkey: hasChildrenWithPubkey,
+        instance: newChildInstance,
+        downloadFile: downloadChildrenWalletFile
+      },
+      api: api
+    };
+    return exports;
+  }
+
+  service = CsWallet('default', BMA);
+  service.instance = CsWallet;
+
+  return service;
+}]);
+
+angular.module('cesium.help.services', [])
+
+.constant('csHelpConstants', {
+  wallet: {
+    stepCount: 4
+  }
+})
+
+.factory('csHelp', ['$rootScope', 'csSettings', 'UIUtils', 'csHelpConstants', '$controller', function($rootScope, csSettings, UIUtils, csHelpConstants, $controller) {
+  'ngInject';
+
+
+  function createHelptipScope(isTour, helpController) {
+    if (!isTour && ($rootScope.tour || !csSettings.data.helptip.enable || UIUtils.screen.isSmall())) {
+      return; // avoid other helptip to be launched (e.g. csWallet)
+    }
+    // Create a new scope for the tour controller
+    var helptipScope = $rootScope.$new();
+    $controller(helpController||'HelpTipCtrl', { '$scope': helptipScope});
+    return helptipScope;
+  }
+
+  function startWalletHelpTip(index, isTour) {
+    index = angular.isDefined(index) ? index : csSettings.data.helptip.wallet;
+    isTour = angular.isDefined(isTour) ? isTour : false;
+
+    if (index < 0 || index >= csHelpConstants.wallet.stepCount) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = createHelptipScope(isTour);
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    helptipScope.tour = isTour;
+
+    return helptipScope.startWalletTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        if (!isTour) {
+          csSettings.data.helptip.wallet = endIndex;
+          csSettings.store();
+        }
+      });
+  }
+
+  return {
+    wallet: {
+      tour: function() {
+        return startWalletHelpTip(0, true);
+      },
+      helptip: startWalletHelpTip
+    }
+  };
+
+}]);
+
+
+
+angular.module('cesium.plugin.services', [])
+
+.provider('PluginService', function PluginServiceProvider() {
+  'ngInject';
+
+  var eagerLoadingServices = [];
+
+  var extensionByStates = {};
+
+  this.registerEagerLoadingService = function(serviceName) {
+    eagerLoadingServices.push(serviceName);
+    return this;
+  };
+
+  this.extendState = function(stateName, extension) {
+    if (angular.isDefined(stateName) && angular.isDefined(extension)) {
+      if (!extensionByStates[stateName]) {
+        extensionByStates[stateName] = [];
+      }
+      extensionByStates[stateName].push(extension);
+    }
+    return this;
+  };
+
+  this.extendStates = function(stateNames, extension) {
+    var that = this;
+    stateNames.forEach(function(stateName) {
+      that.extendState(stateName, extension);
+    });
+    return this;
+  };
+
+  this.$get = ['$injector', '$state', function($injector, $state) {
+
+    var currentExtensionPointName;
+
+    function start() {
+      if (eagerLoadingServices.length>0) {
+        _.forEach(eagerLoadingServices, function(name) {
+          $injector.get(name);
+        });
+      }
+    }
+
+    function getActiveExtensionPointsByName(extensionPointName) {
+      var extensions = _.keys(extensionByStates).reduce(function(res, stateName){
+        return $state.includes(stateName) ? res.concat(extensionByStates[stateName]) : res;
+      }, []);
+      return extensions.reduce(function(res, extension){
+        return extension.points && extension.points[extensionPointName] ? res.concat(extension.points[extensionPointName]) : res;
+      }, []);
+    }
+
+    function setCurrentExtensionPointName(extensionPointName) {
+      currentExtensionPointName  = extensionPointName;
+    }
+
+    function getCurrentExtensionPointName() {
+      return currentExtensionPointName;
+    }
+
+    return {
+      start: start,
+      extensions: {
+        points: {
+          getActivesByName: getActiveExtensionPointsByName,
+          current: {
+            get: getCurrentExtensionPointName,
+            set: setCurrentExtensionPointName
+          }
+        }
+      }
+    };
+  }];
+})
+;
+
+angular.module('cesium.services', [
+  'cesium.settings.services',
+  'cesium.http.services',
+  'cesium.network.services',
+  'cesium.bma.services',
+  'cesium.crypto.services',
+  'cesium.utils.services',
+  'cesium.modal.services',
+  'cesium.storage.services',
+  'cesium.device.services',
+  'cesium.currency.services',
+  'cesium.wot.services',
+  'cesium.tx.services',
+  'cesium.wallet.services',
+  'cesium.help.services',
+  'cesium.plugin.services'
+  ])
+;
+
+
+
+function Peer(json) {
+
+  var that = this;
+
+  Object.keys(json).forEach(function (key) {
+    that[key] = json[key];
+  });
+
+  that.endpoints = that.endpoints || [];
+}
+
+
+Peer.prototype.regexp = {
+  BMA: /^BASIC_MERKLED_API[ ]?/,
+  BMAS: /^BMAS[ ]?/,
+  WS2P: /^WS2P[ ]?/,
+  BMA_REGEXP: /^BASIC_MERKLED_API([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))$/,
+  BMAS_REGEXP: /^BMAS([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))$/,
+  WS2P_REGEXP: /^WS2P[ ]+([a-z0-9]+)([ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?([ ]+([0-9.]+))?([ ]+([0-9a-f:]+))?([ ]+([0-9]+))([ ]+([a-z0-9/.&#!]+))?$/,
+  LOCAL_IP_ADDRESS: /^127[.]0[.]0.|192[.]168[.]|10[.]0[.]0[.]|172[.]16[.]/
+};
+Peer.prototype.regex = Peer.prototype.regexp; // for backward compat
+
+Peer.prototype.keyID = function () {
+  var bma = this.bma || this.getBMA();
+  if (bma.useBma) {
+    return [this.pubkey || "Unknown", bma.dns, bma.ipv4, bma.ipv6, bma.port, bma.useSsl, bma.path].join('-');
+  }
+  return [this.pubkey || "Unknown", bma.ws2pid, bma.path].join('-');
+};
+
+Peer.prototype.copyValues = function(to) {
+  var obj = this;
+  ["version", "currency", "pub", "endpoints", "hash", "status", "block", "signature"].forEach(function (key) {
+    to[key] = obj[key];
+  });
+};
+
+Peer.prototype.copyValuesFrom = function(from) {
+  var obj = this;
+  ["version", "currency", "pub", "endpoints", "block", "signature"].forEach(function (key) {
+    obj[key] = from[key];
+  });
+};
+
+Peer.prototype.json = function() {
+  var obj = this;
+  var json = {};
+  ["version", "currency", "endpoints", "status", "block", "signature"].forEach(function (key) {
+    json[key] = obj[key];
+  });
+  json.raw = this.raw && this.getRaw();
+  json.pubkey = this.pubkey;
+  return json;
+};
+
+Peer.prototype.getBMA = function() {
+  if (this.bma) return this.bma;
+  var bma = null;
+  var bmaRegex = this.regexp.BMA_REGEXP;
+  var bmasRegex = this.regexp.BMAS_REGEXP;
+  this.endpoints.forEach(function(ep){
+    var matches = !bma && bmaRegex.exec(ep);
+    if (matches) {
+      bma = {
+        "dns": matches[2] || '',
+        "ipv4": matches[4] || '',
+        "ipv6": matches[6] || '',
+        "port": matches[8] || 80,
+        "useSsl": matches[8] == 443,
+        "useBma": true
+      };
+    }
+    matches = !bma && bmasRegex.exec(ep);
+    if (matches) {
+      bma = {
+        "dns": matches[2] || '',
+        "ipv4": matches[4] || '',
+        "ipv6": matches[6] || '',
+        "port": matches[8] || 80,
+        "useSsl": true,
+        "useBma": true
+      };
+    }
+  });
+  return bma || {};
+};
+
+Peer.prototype.getEndpoints = function(regex) {
+  if (!regex) return this.endpoints;
+    return this.endpoints.reduce(function(res, ep){
+      return ep.match(regex) ?  res.concat(ep) : res;
+    }, []);
+};
+
+Peer.prototype.hasEndpoint = function(endpoint){
+  //console.debug('testing if hasEndpoint:' + endpoint);
+  var regExp = this.regexp[endpoint] || new RegExp('^' + endpoint);
+  var endpoints = this.getEndpoints(regExp);
+  if (!endpoints.length) return false;
+  else return true;
+};
+
+Peer.prototype.getDns = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.dns ? bma.dns : null;
+};
+
+Peer.prototype.getIPv4 = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.ipv4 ? bma.ipv4 : null;
+};
+
+Peer.prototype.getIPv6 = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.ipv6 ? bma.ipv6 : null;
+};
+
+Peer.prototype.getPort = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.port ? bma.port : null;
+};
+
+Peer.prototype.getHost = function(getHost) {
+  bma = getHost || this.bma || this.getBMA();
+  return ((bma.port == 443 || bma.useSsl) && bma.dns) ? bma.dns :
+    (this.hasValid4(bma) ? bma.ipv4 :
+        (bma.dns ? bma.dns :
+          (bma.ipv6 ? '[' + bma.ipv6 + ']' :'')));
+};
+
+Peer.prototype.getURL = function(bma) {
+  bma = bma || this.bma || this.getBMA();
+  var host = this.getHost(bma);
+  var protocol = (bma.port == 443 || bma.useSsl) ? 'https' : 'http';
+  return protocol + '://' + host + (bma.port ? (':' + bma.port) : '');
+};
+
+Peer.prototype.getServer = function(bma) {
+  bma = bma || this.bma || this.getBMA();
+  var host = this.getHost(bma);
+  return host + (host && bma.port ? (':' + bma.port) : '');
+};
+
+Peer.prototype.hasValid4 = function(bma) {
+  return bma.ipv4 &&
+    /* exclude private address - see https://fr.wikipedia.org/wiki/Adresse_IP */
+    !bma.ipv4.match(this.regexp.LOCAL_IP_ADDRESS) ?
+    true : false;
+};
+
+Peer.prototype.isReachable = function () {
+  return !!this.getServer();
+};
+
+Peer.prototype.isSsl = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.useSsl;
+};
+
+Peer.prototype.isTor = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.useTor;
+};
+
+Peer.prototype.isWs2p = function() {
+  var bma = this.bma || this.getBMA();
+  return bma.useWs2p;
+};
+
+Peer.prototype.isBma = function() {
+  var bma = this.bma || this.getBMA();
+  return !bma.useWs2p && !bma.useTor;
+};
+
+Peer.prototype.hasBma = function() {
+  return this.hasEndpoint('(BASIC_MERKLE_API|BMAS|BMATOR)');
+};
+
+/**
+ * Created by blavenie on 01/02/17.
+ */
+function Block(json, attributes) {
+  "use strict";
+
+  var that = this;
+
+  // Copy default fields
+  if (!attributes || !attributes.length) {
+    ["currency", "issuer", "medianTime", "number", "version", "powMin", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions", "unitbase"]
+      .forEach(function (key) {
+      that[key] = json[key];
+    });
+  }
+  // or just given
+  else {
+    _.forEach(attributes, function (key) {
+      that[key] = json[key];
+    });
+
+  }
+
+  that.identitiesCount = that.identities ? that.identities.length : 0;
+  that.joinersCount = that.joiners ? that.joiners.length : 0;
+  that.activesCount = that.actives ? that.actives.length : 0;
+  that.leaversCount = that.leavers ? that.leavers.length : 0;
+  that.revokedCount = that.revoked ? that.revoked.length : 0;
+  that.excludedCount = that.excluded ? that.excluded.length : 0;
+  that.certificationsCount = that.certifications ? that.certifications.length : 0;
+  that.transactionsCount = that.transactions ? that.transactions.length : 0;
+
+  that.empty = that.isEmpty();
+
+  that.id = [that.number, that.hash].join('-');
+}
+
+Block.prototype.isEmpty = function(){
+  "use strict";
+  return !this.transactionsCount &&
+    !this.certificationsCount &&
+    !this.joinersCount &&
+    !this.dividend &&
+    !this.activesCount &&
+    !this.identitiesCount &&
+    !this.leaversCount &&
+    !this.excludedCount &&
+    !this.revokedCount;
+};
+
+Block.prototype.parseData = function() {
+  this.identities = this.parseArrayValues(this.identities, ['pubkey', 'signature', 'buid', 'uid']);
+  this.joiners = this.parseArrayValues(this.joiners, ['pubkey', 'signature', 'mBuid', 'iBuid', 'uid']);
+  this.actives = this.parseArrayValues(this.actives, ['pubkey', 'signature', 'mBuid', 'iBuid', 'uid']);
+  this.leavers = this.parseArrayValues(this.leavers, ['pubkey', 'signature', 'mBuid', 'iBuid', 'uid']);
+  this.revoked = this.parseArrayValues(this.revoked, ['pubkey', 'signature']);
+  this.excluded = this.parseArrayValues(this.excluded, ['pubkey']);
+
+  // certifications
+  this.certifications = this.parseArrayValues(this.certifications, ['from', 'to', 'block', 'signature']);
+  //this.certifications = _.groupBy(this.certifications, 'to');
+
+  // TX
+  this.transactions = this.parseTransactions(this.transactions);
+
+  delete this.raw; // not need
+};
+
+Block.prototype.cleanData = function() {
+  delete this.identities;
+  delete this.joiners;
+  delete this.actives;
+  delete this.leavers;
+  delete this.revoked;
+  delete this.excluded;
+  delete this.certifications;
+  delete this.transactions;
+
+  delete this.raw; // not need
+};
+
+Block.prototype.parseArrayValues = function(array, itemObjProperties){
+  if (!array || !array.length) return [];
+  return array.reduce(function(res, raw) {
+    var parts = raw.split(':');
+    if (parts.length != itemObjProperties.length) {
+      console.debug('[block] Bad format for \'{0}\': [{1}]. Expected {1} parts. Skipping'.format(arrayProperty, raw, itemObjProperties.length));
+      return res;
+    }
+    var obj = {};
+    for (var i=0; i<itemObjProperties.length; i++) {
+      obj[itemObjProperties[i]] = parts[i];
+    }
+    return res.concat(obj);
+  }, []);
+};
+
+function exact(regexpContent) {
+  return new RegExp("^" + regexpContent + "$");
+}
+
+Block.prototype.regexp = {
+  TX_OUTPUT_SIG: exact("SIG\\(([0-9a-zA-Z]{43,44})\\)")
+};
+
+Block.prototype.parseTransactions = function(transactions) {
+  if (!transactions || !transactions.length) return [];
+  return transactions.reduce(function (res, tx) {
+    var obj = {
+      issuers: tx.issuers,
+      time: tx.time
+    };
+
+    obj.outputs = tx.outputs.reduce(function(res, output) {
+      var parts = output.split(':');
+      if (parts.length != 3) {
+        console.debug('[block] Bad format a \'transactions\': [{0}]. Expected 3 parts. Skipping'.format(output));
+        return res;
+      }
+
+      var amount = parts[0];
+      var unitbase = parts[1];
+      var unlockCondition = parts[2];
+
+      var matches =  Block.prototype.regexp.TX_OUTPUT_SIG.exec(parts[2]);
+
+      // Simple expression SIG(x)
+      if (matches) {
+        var pubkey = matches[1];
+        if (!tx.issuers || tx.issuers.indexOf(pubkey) != -1) return res;
+        return res.concat({
+          amount: unitbase <= 0 ? amount : amount * Math.pow(10, unitbase),
+          unitbase: unitbase,
+          pubkey: pubkey
+        });
+      }
+
+      // Parse complex unlock condition
+      else {
+        //console.debug('[block] [TX] Detecting unlock condition: {0}.'.format(output));
+        return res.concat({
+          amount: unitbase <= 0 ? amount : amount * Math.pow(10, unitbase),
+          unitbase: unitbase,
+          unlockCondition: unlockCondition
+        });
+      }
+    }, []);
+
+    // Special cas for TX to himself
+    if (!obj.error && !obj.outputs.length) {
+      obj.toHimself = true;
+    }
+
+    return res.concat(obj);
+  }, []);
+};
+
+
+
+function Ws2pMessage(message) {
+
+  var that = this;
+
+  var parts = message.split(':');
+  if (parts.length < 3 || !parts[0].startsWith('WS2P')) {
+    throw Error('Invalid format: ' + message);
+  }
+  // Head message
+  if (parts[1] == 'HEAD') {
+    if (parts.length < 4) {
+      throw Error('Invalid format: ' + message);
+    }
+    // Duniter version < 1.6.9
+    if (parts.length == 4) {
+      that.pubkey = parts[2];
+      that.buid = parts[3];
+    }
+    else {
+      var version = parts[2];
+      if (version >= 1) {
+        var prefix = parts[0];
+
+        // Private/public options
+        if (prefix.length > 4) {
+          var matches = this.regexp.WS2P_PREFIX.exec(prefix);
+          if (!matches) {
+            throw Error('Invalid format: ' + message);
+          }
+
+          // Private options
+          var privateOptions = matches[1];
+          if (privateOptions) {
+            that.private = {
+              useTor: privateOptions.startsWith('T')
+            };
+            var mode = privateOptions.substring(1);
+            if (mode == 'A') {
+              that.private.mode = 'all';
+            }
+            else if (mode == 'M') {
+              that.private.mode = 'mixed';
+            }
+            else if (mode == 'S') {
+              that.private.mode = 'strict';
+            }
+          }
+
+          // Public options
+          var publicOptions = matches[2];
+          if (publicOptions) {
+            that.public = {
+              useTor: publicOptions.startsWith('T'),
+              mode: 'all'
+            };
+          }
+
+          // For DEBUG only:
+          /*
+          console.log('[http] private {0}, public {1}'.format(
+           (that.private && (that.private.useTor ? 'TOR ' : '' ) + (that.private.mode || 'false')) || 'false',
+            that.public && ((that.public.useTor ? 'TOR ' : '' ) + (that.public.mode || 'false')) || 'false'
+          ), prefix);*/
+        }
+
+        that.pubkey=parts[3];
+        that.buid=parts[4];
+        that.ws2pid=parts[5];
+        that.software=parts[6];
+        that.version=parts[7];
+        that.powPrefix=parts[8];
+      }
+    }
+  }
+
+}
+
+
+Ws2pMessage.prototype.regexp = {
+  WS2P_PREFIX: /^WS2P(?:O([CT][SAM]))?(?:I([CT]))?$/,
+};
+
+
+
+
+  AppController.$inject = ['$scope', '$rootScope', '$state', '$ionicSideMenuDelegate', '$q', '$timeout', '$ionicHistory', '$controller', '$window', 'csPlatform', 'csSettings', 'CryptoUtils', 'csCrypto', 'UIUtils', 'BMA', 'csWallet', 'Device', 'Modals', 'csConfig', 'csHttp'];
+HomeController.$inject = ['$scope', '$state', '$timeout', '$ionicHistory', '$translate', '$http', 'UIUtils', 'csConfig', 'csCache', 'csPlatform', 'csCurrency', 'csSettings'];
+PluginExtensionPointController.$inject = ['$scope', 'PluginService'];angular.module('cesium.app.controllers', ['cesium.platform', 'cesium.services'])
+
+  .config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app', {
+        url: "/app",
+        abstract: true,
+        templateUrl: "templates/menu.html",
+        controller: 'AppCtrl',
+        data: {
+          large: false
+        }
+      })
+
+      .state('app.home', {
+        url: "/home?error",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/home/home.html",
+            controller: 'HomeCtrl'
+          }
+        }
+      })
+
+      .state('app.lock', {
+        cache: false,
+        url: "/lock",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/common/view_passcode.html",
+            controller: 'PassCodeCtrl'
+          }
+        }
+      })
+    ;
+
+    // if none of the above states are matched, use this as the fallback
+    $urlRouterProvider.otherwise('/app/home');
+
+  }])
+
+  .controller('AppCtrl', AppController)
+
+  .controller('HomeCtrl', HomeController)
+
+  .controller('PluginExtensionPointCtrl', PluginExtensionPointController)
+
+;
+
+/**
+ * Useful controller that could be reuse in plugin, using $scope.extensionPoint for condition rendered in templates
+ */
+function PluginExtensionPointController($scope, PluginService) {
+  'ngInject';
+  $scope.extensionPoint = PluginService.extensions.points.current.get();
+}
+
+/**
+ * Abstract controller (inherited by other controllers)
+ */
+function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $timeout,
+                       $ionicHistory, $controller, $window, csPlatform, csSettings, CryptoUtils, csCrypto,
+                       UIUtils, BMA, csWallet, Device, Modals, csConfig, csHttp
+) {
+  'ngInject';
+
+  $scope.walletData  = csWallet.data;
+  $scope.search = {};
+  $scope.login = csWallet.isLogin();
+  $scope.auth = csWallet.isAuth();
+  $scope.motion = UIUtils.motion.default;
+  $scope.fullscreen = UIUtils.screen.fullscreen.isEnabled();
+
+  $scope.showHome = function() {
+    $ionicHistory.nextViewOptions({
+      historyRoot: true
+    });
+    return $state.go('app.home')
+      .then(UIUtils.loading.hide);
+  };
+
+  // removeIf(no-device)
+  ////////////////////////////////////////
+  // Device only methods
+  // (code removed when NO device)
+  ////////////////////////////////////////
+
+  $scope.scanQrCodeAndGo = function() {
+
+    if (!Device.barcode.enable) return;
+
+    // Run scan cordova plugin, on device
+    return Device.barcode.scan()
+      .then(function(data) {
+        if (!data) return;
+
+        // Try to parse as an URI
+        return BMA.uri.parse(data)
+          .then(function(res){
+            if (!res || !res.pubkey) throw {message: 'ERROR.SCAN_UNKNOWN_FORMAT'};
+            // If pubkey: open the identity
+            return $state.go('app.wot_identity', {
+              pubkey: res.pubkey,
+              node: res.host ? res.host: null}
+            );
+          })
+
+          // Not an URI: try WIF or EWIF format
+          .catch(function(err) {
+            console.debug("[app] Scan data is not an URI (get error: " + (err && err.message || err) + "). Trying to decode as a WIF or EWIF format...");
+
+            // Try to read as WIF format
+            return csCrypto.keyfile.parseData(data)
+              .then(function(keypair) {
+                if (!keypair || !keypair.signPk || !keypair.signSk) throw err; // rethrow the first error (e.g. Bad URI)
+
+                var pubkey = CryptoUtils.base58.encode(keypair.signPk);
+                console.debug("[app] Detected WIF/EWIF format. Will login to wallet {" + pubkey.substring(0, 8) + "}");
+
+                // Create a new wallet (if default wallet is already used)
+                var wallet = !csWallet.isLogin() ? csWallet : csWallet.children.create({store: false});
+
+                // Login using keypair
+                return wallet.login({
+                  silent: true,
+                  forceAuth: true,
+                  minData: false,
+                  authData: {
+                    pubkey: pubkey,
+                    keypair: keypair
+                  }
+                })
+                  .then(function () {
+
+                    // Open transfer all wallet
+                    $ionicHistory.nextViewOptions({
+                      historyRoot: true
+                    });
+                    return $state.go('app.new_transfer', {
+                      all: true, // transfer all sources
+                      wallet: !wallet.isDefault() ? wallet.id : undefined
+                    });
+                  });
+              })
+              // Unknown format (nor URI, nor WIF/EWIF)
+              .catch(UIUtils.onError('ERROR.SCAN_UNKNOWN_FORMAT'));
+          });
+      })
+      .catch(UIUtils.onError('ERROR.SCAN_FAILED'));
+  };
+
+  ////////////////////////////////////////
+  // End of device only methods
+  ////////////////////////////////////////
+  // endRemoveIf(no-device)
+
+  ////////////////////////////////////////
+  // Show Help tour
+  ////////////////////////////////////////
+
+  $scope.createHelptipScope = function(isTour) {
+    if (!isTour && ($rootScope.tour || !$rootScope.settings.helptip.enable || UIUtils.screen.isSmall())) {
+      return; // avoid other helptip to be launched (e.g. csWallet)
+    }
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.$new();
+    $controller('HelpTipCtrl', { '$scope': helptipScope});
+    return helptipScope;
+  };
+
+  $scope.startHelpTour = function(event, skipClearCache) {
+    if (event && event.defaultPrevented) return false; // Event stopped;
+
+    $rootScope.tour = true; // to avoid other helptip to be launched (e.g. csWallet)
+
+    // Clear cache history
+    if (!skipClearCache) {
+      $ionicHistory.clearHistory();
+      return $ionicHistory.clearCache()
+        .then(function() {
+          $scope.startHelpTour(null, true/*continue*/);
+        });
+    }
+
+    var helptipScope = $scope.createHelptipScope(true/*is tour*/);
+    return helptipScope.startHelpTour()
+      .then(function() {
+        helptipScope.$destroy();
+        delete $rootScope.tour;
+      })
+      .catch(function(err){
+        delete $rootScope.tour;
+      });
+  };
+
+  $scope.disableHelpTour = function(event) {
+    if (event) {
+      event.preventDefault();
+      event.stopPropagation();
+    }
+
+    if (csSettings.data.helptip && csSettings.data.helptip.enable) {
+      $rootScope.settings.helptip.enable = false;
+      csSettings.store();
+    }
+
+  };
+
+  ////////////////////////////////////////
+  // Login & wallet
+  ////////////////////////////////////////
+
+  $scope.isLogin = function() {
+    return $scope.login;
+  };
+
+  // Load wallet data (after login)
+  $scope.loadWalletData = function(options) {
+
+    console.warn("[app-controller] DEPRECATED  - Please use csWallet.load() instead of $scope.loadWalletData()", new Error());
+
+    options = options || {};
+    var wallet = options.wallet || csWallet;
+    return wallet.loadData(options)
+
+      .then(function(walletData) {
+        // cancel login
+        if (!walletData) throw 'CANCELLED';
+        return walletData;
+      });
+  };
+
+  // Login and load wallet
+  $scope.loadWallet = function(options) {
+
+    console.warn("[app-controller] DEPRECATED  - Please use csWallet.loginOrLoad() instead of $scope.loadWallet()", new Error());
+
+    // Make sure the platform is ready
+    if (!csPlatform.isStarted()) {
+      return csPlatform.ready().then(function(){
+        return $scope.loadWallet(options);
+      });
+    }
+
+    options = options || {};
+
+    var wallet = options.wallet || csWallet;
+
+    // If need auth
+    if (options.auth && !wallet.isAuth()) {
+      return wallet.auth(options)
+        .then(function (walletData) {
+          if (walletData) return walletData;
+          // failed to auth
+          throw 'CANCELLED';
+        });
+    }
+
+    // If need login
+    else if (!wallet.isLogin()) {
+      return wallet.login(options)
+        .then(function (walletData) {
+          if (walletData) return walletData;
+          // failed to login
+          throw 'CANCELLED';
+        });
+    }
+
+    // Already login or auth
+    else if (!wallet.isDataLoaded(options)) {
+      return $scope.loadWalletData(options);
+    }
+    else {
+      return $q.when(wallet.data);
+    }
+  };
+
+  // Login and go to a state (or wallet if not)
+  $scope.loginAndGo = function(state, options) {
+    $scope.closeProfilePopover();
+    options = options || {};
+    var wallet = options.wallet || csWallet;
+    delete options.wallet;
+
+    state = state || 'app.view_wallet';
+
+    if (!wallet.isLogin()) {
+
+      // Make sure to protect login modal, if HTTPS enable - fix #340
+      if (csConfig.httpsMode && $window.location && $window.location.protocol !== 'https:') {
+        var href = $window.location.href;
+        var hashIndex = href.indexOf('#');
+        var rootPath = (hashIndex != -1) ? href.substr(0, hashIndex) : href;
+        rootPath = 'https' + rootPath.substr(4);
+        href = rootPath + $state.href(state);
+        if (csConfig.httpsModeDebug) {
+          // Debug mode: just log, then continue
+          console.debug('[httpsMode] --- Should redirect to: ' + href);
+        }
+        else {
+          $window.location.href = href;
+          return;
+        }
+      }
+
+      return wallet.login(options)
+        .then(function(){
+          return $state.go(state, options);
+        })
+        .then(UIUtils.loading.hide);
+    }
+    else {
+      return $state.go(state, options);
+    }
+  };
+
+  // Logout
+  $scope.logout = function(options) {
+    options = options || {};
+    var wallet = options.wallet || csWallet;
+    if (!options.force && $scope.profilePopover) {
+      // Make the popover if really closed, to avoid UI refresh on popover buttons
+      return $scope.profilePopover.hide()
+        .then(function(){
+          options.force = true;
+          return $scope.logout(options);
+        });
+    }
+    if (options.askConfirm) {
+      return UIUtils.alert.confirm('CONFIRM.LOGOUT')
+        .then(function(confirm) {
+          if (confirm) {
+            options.askConfirm=false;
+            return $scope.logout(options);
+          }
+        });
+    }
+
+    UIUtils.loading.show();
+    return wallet.logout()
+      .then(function() {
+        // Close left menu if open
+        if ($ionicSideMenuDelegate.isOpenLeft()) {
+          $ionicSideMenuDelegate.toggleLeft();
+        }
+
+        // If default wallet: clear navigation history, then go back to home
+        if (wallet.isDefault()) {
+          $ionicHistory.clearHistory();
+
+          return $ionicHistory.clearCache()
+            .then(function() {
+              return $scope.showHome();
+            });
+        }
+        else {
+          UIUtils.loading.hide(10);
+        }
+      })
+      .catch(UIUtils.onError('ERROR.LOGOUT'));
+  };
+  // Do authentification
+  $scope.doAuth = function(options) {
+    var wallet = options && options.wallet || csWallet;
+    return wallet.auth()
+      .then(UIUtils.loading.hide);
+  };
+
+  // If connected and same pubkey
+  $scope.isUserPubkey = function(pubkey) {
+    return csWallet.isUserPubkey(pubkey);
+  };
+
+  // add listener on wallet event
+  csWallet.api.data.on.login($scope, function(data, deferred) {
+    $scope.login = true;
+    return deferred ? deferred.resolve() : $q.when();
+  });
+  csWallet.api.data.on.logout($scope, function() {
+    $scope.login = false;
+  });
+  csWallet.api.data.on.auth($scope, function(data, deferred) {
+    $scope.auth = true;
+    return deferred ? deferred.resolve() : $q.when();
+  });
+  csWallet.api.data.on.unauth($scope, function() {
+    $scope.auth = false;
+  });
+
+  ////////////////////////////////////////
+  // Useful modals
+  ////////////////////////////////////////
+
+  // Open transfer modal
+  $scope.showTransferModal = function(parameters) {
+    return Modals.showTransfer(parameters);
+  };
+
+  $scope.showAboutModal = function() {
+    return Modals.showAbout();
+  };
+
+  $scope.showJoinModal = function() {
+    $scope.closeProfilePopover();
+    return Modals.showJoin();
+  };
+
+  $scope.showSettings = function() {
+    $scope.closeProfilePopover();
+    return $state.go('app.settings');
+  };
+
+  $scope.showHelpModal = function(parameters) {
+    return Modals.showHelp(parameters);
+  };
+
+  ////////////////////////////////////////
+  // Useful popovers
+  ////////////////////////////////////////
+
+  $scope.showProfilePopover = function(event) {
+    return UIUtils.popover.show(event, {
+      templateUrl :'templates/common/popover_profile.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.profilePopover = popover;
+        $timeout(function() {
+          UIUtils.ink({selector: '#profile-popover .ink, #profile-popover .ink-dark'});
+        }, 100);
+      }
+    });
+  };
+
+  $scope.closeProfilePopover = function() {
+    if ($scope.profilePopover && $scope.profilePopover.isShown()) {
+      $timeout(function(){$scope.profilePopover.hide();});
+    }
+  };
+
+  // Change peer info
+  $scope.showPeerInfoPopover = function(event) {
+    return UIUtils.popover.show(event, {
+      templateUrl: 'templates/network/popover_peer_info.html',
+      autoremove: true,
+      scope: $scope.$new(true)
+    });
+  };
+
+  ////////////////////////////////////////
+  // Link management
+  ////////////////////////////////////////
+
+  $scope.openLink = function($event, uri, options) {
+    $event.stopPropagation();
+    $event.preventDefault();
+
+    // Read URL like '@UID' (Used by home page, in feed's author url)
+    if (uri && uri.startsWith('@')) {
+      var uid = uri.substr(1);
+      if (BMA.regexp.USER_ID.test(uid)) {
+        $state.go('app.wot_identity_uid', {uid: uid});
+        return false;
+      }
+    }
+
+    options = options || {};
+
+    // If unable to open, just copy value
+    options.onError = function() {
+      return UIUtils.popover.copy($event, uri);
+    };
+
+    csHttp.uri.open(uri, options);
+
+    return false;
+  };
+
+  ////////////////////////////////////////
+  // Layout Methods
+  ////////////////////////////////////////
+  $scope.showFab = function(id, timeout) {
+    UIUtils.motion.toggleOn({selector: '#'+id + '.button-fab'}, timeout);
+  };
+
+  $scope.hideFab = function(id, timeout) {
+    UIUtils.motion.toggleOff({selector: '#'+id + '.button-fab'}, timeout);
+  };
+
+  // Could be override by subclass
+  $scope.doMotion = function(options) {
+    return $scope.motion.show(options);
+  };
+
+
+  ////////////////////////////////////////
+  // Fullscreen mode
+  ////////////////////////////////////////
+
+  $scope.askFullscreen = function() {
+    var skip = $scope.fullscreen || !UIUtils.screen.isSmall() || !Device.isWeb();
+    if (skip) return;
+
+    return UIUtils.alert.confirm('CONFIRM.FULLSCREEN', null, {
+      cancelText: 'COMMON.BTN_NO',
+      okText: 'COMMON.BTN_YES'
+    })
+      .then(function(confirm) {
+        if (!confirm) return;
+        $scope.toggleFullscreen();
+      });
+  };
+
+  $scope.toggleFullscreen = function() {
+    $scope.fullscreen = !UIUtils.screen.fullscreen.isEnabled();
+    UIUtils.screen.fullscreen.toggleAll();
+  };
+
+  }
+
+
+function HomeController($scope, $state, $timeout, $ionicHistory, $translate, $http, UIUtils,
+                        csConfig, csCache, csPlatform, csCurrency, csSettings) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.locales = angular.copy(csSettings.locales);
+  $scope.smallscreen = UIUtils.screen.isSmall();
+
+  $scope.enter = function(e, state) {
+    if (ionic.Platform.isIOS()) {
+      if(window.StatusBar) {
+        // needed to fix Xcode 9 / iOS 11 issue with blank space at bottom of webview
+        // https://github.com/meteor/meteor/issues/9041
+        StatusBar.overlaysWebView(false);
+        StatusBar.overlaysWebView(true);
+      }
+    }
+
+    if (state && state.stateParams && state.stateParams.error) { // Error query parameter
+      $scope.error = state.stateParams.error;
+      $scope.node = csCurrency.data.node;
+      $scope.loading = false;
+      $ionicHistory.nextViewOptions({
+        disableAnimate: true,
+        disableBack: true,
+        historyRoot: true
+      });
+      $state.go('app.home', {error: undefined}, {
+        reload: false,
+        inherit: true,
+        notify: false});
+    }
+    else {
+      // Wait platform to be ready
+      csPlatform.ready()
+        .then(function() {
+          $scope.loading = false;
+          $scope.loadFeeds();
+        })
+        .catch(function(err) {
+          $scope.node =  csCurrency.data.node;
+          $scope.loading = false;
+          $scope.error = err;
+        });
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.reload = function() {
+    $scope.loading = true;
+    delete $scope.error;
+
+    $timeout($scope.enter, 200);
+  };
+
+  $scope.loadFeeds = function() {
+    var feedUrl = csSettings.getFeedUrl();
+    if (!feedUrl || typeof feedUrl !== 'string') return; // Skip
+
+    var maxContentLength = (csConfig.feed && csConfig.feed.maxContentLength) || 650;
+
+    var now = Date.now();
+    console.debug("[home] Loading feeds from {0}...".format(feedUrl));
+
+    $http.get(feedUrl, {responseType: 'json', cache: csCache.get(null, csCache.constants.LONG)})
+      .success(function(feed) {
+        console.debug('[home] Feeds loaded in {0}ms'.format(Date.now()-now));
+        if (!feed || !feed.items || !feed.items.length) return // skip if empty
+
+        feed.items = feed.items.reduce(function(res, item) {
+          if (!item || (!item.title && !item.content_text && !item.content_html)) return res; // Skip
+
+          // Convert UTC time
+          if (item.date_published) {
+            item.time = moment.utc(item.date_published).unix();
+          }
+          // Convert content to HTML
+          if (item.content_html) {
+            item.content = item.content_html;
+          }
+          else {
+            item.content = (item.content_text||'').replace(/\n/g, '<br/>');
+          }
+
+          // Trunc content, if need
+          if (maxContentLength !== -1 && item.content && item.content.length > maxContentLength) {
+            var endIndex = Math.max(item.content.lastIndexOf(" ", maxContentLength), item.content.lastIndexOf("<", maxContentLength));
+            item.content = item.content.substr(0, endIndex) + ' (...)';
+            item.truncated = true;
+          }
+
+          // If author is missing, copy the main author
+          item.author = item.author || feed.author;
+
+          return res.concat(item);
+        }, []);
+
+        $scope.feed = feed;
+      })
+      .error(function(data, status) {
+        console.error('[home] Failed to load feeds.');
+        $scope.feed = null;
+      });
+  }
+
+  /**
+   * Catch click for quick fix
+   * @param event
+   */
+  $scope.doQuickFix = function(action) {
+    if (action === 'settings') {
+      $ionicHistory.nextViewOptions({
+        historyRoot: true
+      });
+      $state.go('app.settings');
+    }
+  };
+
+  $scope.changeLanguage = function(langKey) {
+    $translate.use(langKey);
+    $scope.hideLocalesPopover();
+    csSettings.data.locale = _.findWhere($scope.locales, {id: langKey});
+    csSettings.store();
+    $scope.loadFeeds();
+  };
+
+  /* -- show/hide locales popup -- */
+
+  $scope.showLocalesPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/common/popover_locales.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.localesPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideLocalesPopover = function() {
+    if ($scope.localesPopover) {
+      $scope.localesPopover.hide();
+      $scope.localesPopover = null;
+    }
+  };
+
+  // For DEV ONLY
+  /*$timeout(function() {
+   $scope.loginAndGo();
+   }, 500);*/
+}
+
+
+JoinController.$inject = ['$scope', '$timeout', '$controller', 'Modals', 'csWallet'];
+JoinChooseAccountTypeModalController.$inject = ['$scope', '$state', 'Modals', 'UIUtils', 'csCurrency'];
+JoinModalController.$inject = ['$scope', '$state', '$interval', '$q', '$timeout', 'Device', 'UIUtils', 'CryptoUtils', 'csSettings', 'Modals', 'csWallet', 'BMA', 'parameters'];angular.module('cesium.join.controllers', ['cesium.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+      .state('app.join', {
+        url: "/join",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/home/home.html",
+            controller: 'JoinCtrl'
+          }
+        }
+      })
+    ;
+  }])
+
+  .controller('JoinCtrl', JoinController)
+
+  .controller('JoinChooseAccountTypeModalCtrl', JoinChooseAccountTypeModalController)
+
+  .controller('JoinModalCtrl', JoinModalController)
+;
+
+function JoinController($scope, $timeout, $controller, Modals, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('HomeCtrl', {$scope: $scope}));
+
+  $scope.showJoinModal = function() {
+    if ($scope.loading) return $timeout($scope.showJoinModal, 500); // recursive call
+
+    if (!csWallet.isLogin() && !$scope.error) {
+      return $timeout(Modals.showJoin, 300);
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.showJoinModal);
+
+}
+
+function JoinChooseAccountTypeModalController($scope, $state, Modals, UIUtils, csCurrency) {
+  'ngInject';
+
+  $scope.formData = {};
+  $scope.slides = {
+    slider: null,
+    options: {
+      loop: false,
+      effect: 'slide',
+      speed: 500
+    }
+  };
+  $scope.loading = true;
+
+  $scope.load = function() {
+    if ($scope.loading) {
+      return csCurrency.get()
+        .then(function (currency) {
+          if (!currency) return;
+          $scope.currency = currency;
+          $scope.formData.currency = currency.name;
+          $scope.loading = false;
+        })
+        .catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED'));
+    }
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  $scope.$on("$ionicSlides.sliderInitialized", function(event, data){
+    // Disable swipe
+    data.slider.lockSwipes();
+  });
+
+  $scope.slidePrev = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slidePrev();
+    $scope.slides.slider.lockSwipes();
+  };
+
+  $scope.slideNext = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slideNext();
+    $scope.slides.slider.lockSwipes();
+  };
+
+  $scope.selectAccountTypeAndClose = function(type) {
+    $scope.formData.accountType = type;
+    $scope.closeModal($scope.formData);
+  };
+
+  /**
+   * Catch click for quick fix
+   * @param fix
+   */
+  $scope.doQuickFix = function(event) {
+    if (event == 'settings') {
+      $scope.closeModal();
+      $state.go('app.settings');
+    }
+  };
+
+  $scope.showHelpModal = function(helpAnchor) {
+    Modals.showHelp({anchor: helpAnchor});
+  };
+
+  // TODO DEV only
+  //$timeout(function() {
+   //$scope.selectCurrency('g1');
+   //$scope.selectAccountTypeAndClose('member');
+   //}, 400);
+}
+
+
+function JoinModalController($scope, $state, $interval, $q, $timeout, Device, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) {
+  'ngInject';
+
+  $scope.formData = {
+    pseudo: parameters.uid || '',
+    pubkey: parameters.pubkey || undefined
+  };
+  $scope.slides = {
+    slider: null,
+    options: {
+      loop: false,
+      effect: 'slide',
+      speed: 500,
+      pager: false,
+      showPager: false
+    }
+  };
+  $scope.slideBehavior = {};
+  $scope.loading = true;
+
+  $scope.isLicenseRead = Device.isIOS(); // always enable the button, on IOS  fix #554
+  $scope.showUsername = false;
+  $scope.showPassword = false;
+  $scope.formData.computing=false;
+  $scope.smallscreen = UIUtils.screen.isSmall();
+  $scope.userIdPattern = BMA.constants.regexp.USER_ID;
+  $scope.accountAvailable = !!parameters.pubkey;
+
+  // Read input parameters
+  $scope.currency = parameters.currency;
+  $scope.accountType = parameters.accountType || 'member';
+
+  var wallet;
+
+  $scope.load = function() {
+    if ($scope.loading) {
+
+      // Get the wallet
+      wallet = (parameters.walletId && csWallet.children.get(parameters.walletId)) ||
+        (parameters.pubkey && csWallet.children.getByPubkey(parameters.pubkey)) ||
+        ((!parameters.pubkey || csWallet.isUserPubkey(parameters.pubkey)) && csWallet);
+      if (!wallet) throw new Error("Cannot found the corresponding wallet, from parameters.pubkey or parameters.walletId");
+
+      console.debug("[join] Starting join modal on wallet {0}".format(wallet.id));
+
+      if ($scope.accountType === 'member') {
+        $scope.licenseFileUrl = csSettings.getLicenseUrl();
+        if ($scope.licenseFileUrl) {
+          // Use HTML in iframe, when original file is markdown (fix #538)
+          if ( $scope.licenseFileUrl.substring($scope.licenseFileUrl.length - 3) != '.txt') {
+            $scope.licenseFileUrl = $scope.licenseFileUrl + '.html';
+          }
+          if (!$scope.isLicenseRead) {
+            //$scope.startListenLicenseBottom();
+
+            // Make sure to enable the next button when error occured - Fix issue #592
+            $timeout(function() {
+              if (!$scope.isLicenseRead) {
+                $scope.isLicenseRead = true;
+              }
+            }, 5000);
+          }
+        }
+      }
+
+      $scope.slideBehavior = $scope.computeSlideBehavior();
+      $scope.loading = false;
+    }
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  $scope.$on("$ionicSlides.sliderInitialized", function(event, data){
+    // Disable swipe
+    data.slider.lockSwipes();
+  });
+
+  $scope.slidePrev = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slidePrev();
+    $scope.slides.slider.lockSwipes();
+  };
+
+  $scope.slideNext = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slideNext();
+    $scope.slides.slider.lockSwipes();
+  };
+
+  $scope.showAccountPubkey = function() {
+    if (parameters.pubkey && parameters.pseudo === $scope.formData.pseudo) {
+      $scope.formData.pubkey = parameters.pubkey;
+      $scope.formData.computing = false;
+      return;
+    }
+
+    $scope.formData.computing=true;
+
+    CryptoUtils.scryptKeypair($scope.formData.username, $scope.formData.password)
+      .then(function(keypair) {
+        $scope.formData.pubkey = CryptoUtils.util.encode_base58(keypair.signPk);
+        return $scope.checkAccountAvailable();
+      })
+      .then(function() {
+        return $timeout(function(){
+          $scope.formData.computing=false;
+        }, 400);
+      })
+      .catch(function(err) {
+        $scope.formData.pubkey = undefined;
+        $scope.formData.computing=false;
+        UIUtils.onError('ERROR.CRYPTO_UNKNOWN_ERROR')(err);
+      });
+  };
+
+  $scope.formDataChanged = function() {
+    $scope.formData.computing=false;
+    $scope.formData.pubkey=null;
+  };
+
+  $scope.getCurrentFormName = function() {
+    var index = $scope.slides.slider.activeIndex;
+    if($scope.accountType === 'member') {
+      index += ($scope.licenseFileUrl ? 0 : 1); // skip index 0, when no license file
+      index += (parameters.pubkey && index >= 2 ? 2 : 0); // skip salt+pass, if already a pubkey
+      if (index === 0) return "licenseForm";
+      if (index === 1) return "pseudoForm";
+      if (index === 2) return "saltForm";
+      if (index === 3) return "passwordForm";
+      if (index === 4) return "confirmForm";
+    }
+    else {
+      if (index === 0) return "saltForm";
+      if (index === 1) return "passwordForm";
+      if (index === 2) return "confirmForm";
+    }
+  };
+
+  $scope.computeSlideBehavior = function() {
+    var formName = $scope.getCurrentFormName();
+
+    var behavior;
+    if (formName === "licenseForm") {
+      behavior = {
+        hasPreviousButton: false,
+        hasNextButton: false,
+        hasAcceptButton: true
+      };
+    }
+    else if (formName === "pseudoForm") {
+      behavior = {
+        helpAnchor: 'join-pseudo',
+        hasPreviousButton: $scope.licenseFileUrl && true,
+        hasNextButton: true,
+        focus: 'pseudo'
+      };
+    }
+    else if (formName === "saltForm") {
+      behavior = {
+        helpAnchor: 'join-salt',
+        hasPreviousButton: $scope.accountType === 'member',
+        hasNextButton: true,
+        focus: 'salt'
+      };
+    }
+    else if (formName === "passwordForm") {
+      behavior = {
+        helpAnchor: 'join-password',
+        hasPreviousButton: true,
+        hasNextButton: true,
+        focus: 'password'
+      };
+    }
+    else if (formName === "confirmForm") {
+      behavior = {
+        hasPreviousButton: true,
+        hasNextButton: false,
+        hasSendButton: true,
+        helpAnchor: 'join-pubkey'
+      };
+    }
+    else {
+      behavior = {
+        hasPreviousButton: false,
+        hasNextButton: true
+      };
+    }
+
+    return behavior;
+  };
+
+
+  $scope.doNext = function() {
+    var formName = $scope.getCurrentFormName();
+    if (formName && $scope[formName]){
+      $scope[formName].$submitted=true;
+      if(!$scope[formName].$valid) {
+        return;
+      }
+      if (formName === "pseudoForm" && $scope.uiAlreadyUsed) {
+        return;
+      }
+      if (formName === "passwordForm") {
+        $scope.showAccountPubkey();
+      }
+    }
+
+    $scope.slideNext();
+
+    $scope.slideBehavior = $scope.computeSlideBehavior();
+  };
+
+  $scope.doPrev = function() {
+    $scope.slidePrev();
+    $scope.slideBehavior = $scope.computeSlideBehavior();
+  };
+
+  $scope.doNewAccount = function(confirm) {
+
+    if (!confirm) {
+
+      var messageKey = ($scope.accountType === 'member') ? 'ACCOUNT.NEW.CONFIRMATION_MEMBER_ACCOUNT' :
+        'ACCOUNT.NEW.CONFIRMATION_WALLET_ACCOUNT';
+
+      return UIUtils.alert.confirm(messageKey, undefined,
+        {
+          cssClass: 'warning',
+          okText: $scope.accountType == 'member' ? 'COMMON.BTN_SEND' : 'COMMON.BTN_CONTINUE',
+          okType: 'button-assertive'
+        })
+        .then(function(confirm) {
+          if (confirm) {
+            $scope.doNewAccount(true);
+          }
+        });
+    }
+
+    var onErrorLogout = function(message) {
+      return function(err) {
+        if (parameter.uid) {
+          wallet.unauth()
+            .then(function(){
+              UIUtils.onError(message)(err);
+            });
+        }
+        else {
+          wallet.logout()
+            .then(function(){
+              UIUtils.onError(message)(err);
+            });
+        }
+        throw new Error('CANCELLED');
+      };
+    };
+
+    UIUtils.loading.show();
+
+    return wallet.login({
+        auth: true,
+        isNew: true,
+        method: 'SCRYPT_DEFAULT',
+        expectedPubkey: $scope.formData.pubkey,
+        showMethods: false
+      })
+      .then(function() {
+        if ($scope.accountType === "member") {
+          $scope.closeModal();
+          csSettings.data.wallet = csSettings.data.wallet || {};
+          csSettings.data.wallet.alertIfUnusedWallet = false; // do not alert if empty
+
+          var needSelf = angular.isUndefined(parameters.uid) || angular.isUndefined(parameters.blockUid) ||
+            (parameters.uid.toUpperCase() !== $scope.formData.pseudo.toUpperCase());
+          if (!needSelf) {
+            wallet.setSelf(parameters.uid, parameters.blockUid);
+          }
+
+          // Self promise (if need)
+          var selfPromise = needSelf ?
+            wallet.self($scope.formData.pseudo, false/*do NOT load membership here*/)
+              .catch(onErrorLogout('ERROR.SEND_IDENTITY_FAILED')) :
+            $q.when();
+
+          return selfPromise
+            .then(function() {
+              // Send membership IN
+              return wallet.membership.inside()
+                .catch(function(err) {
+                  if (err && err.ucode != BMA.errorCodes.MEMBERSHIP_ALREADY_SEND) return;
+                  onErrorLogout('ERROR.SEND_MEMBERSHIP_IN_FAILED')(err);
+                });
+            })
+            .then(function() {
+
+              $scope.closeModal();
+
+              // Redirect to wallet
+              if (wallet.isDefault()) {
+                return $state.go('app.view_wallet');
+              } else {
+                return $state.go('app.view_wallet_by_id', {id: wallet.id});
+              }
+            })
+            .then(function() {
+              // Wait 2s (for wallet load)
+              // then ask to download revocation file
+              return $timeout(function() {
+                // Hide the loading indicator, if wallet already loaded
+                if (wallet.isDataLoaded({requirements: true})) {
+                  UIUtils.loading.hide();
+                }
+                return $scope.downloadRevocationRegistration();
+              },
+              2000);
+            });
+        }
+        else{
+          $scope.closeModal();
+
+          // Redirect to wallet
+          if (wallet.isDefault()) {
+            $state.go('app.view_wallet');
+          }
+          else {
+            $state.go('app.view_wallet_by_id', {id: wallet.id});
+          }
+
+        }
+      })
+      .catch(function(err) {
+        UIUtils.loading.hide();
+        if (err === 'CANCELLED') return;
+        if (err && err.ucode != BMA.errorCodes.MEMBERSHIP_ALREADY_SEND) {
+          console.error("[wallet] Node: already membership", err);
+          return; // OK
+        }
+        else {
+          UIUtils.alert.error('ERROR.UNKNOWN_ERROR');
+        }
+      });
+  };
+
+  $scope.downloadRevocationRegistration = function() {
+    return UIUtils.alert.confirm('DOWNLOAD.POPUP_REVOKE_MESSAGE', 'DOWNLOAD.POPUP_TITLE', {
+        cssClass: 'warning',
+        okText: 'COMMON.BTN_DOWNLOAD',
+        okType: 'button-assertive',
+        cancelText: 'COMMON.BTN_LATER'
+      })
+    .then(function(confirm) {
+      if (!confirm) return;
+      return wallet.downloadRevocation();
+    });
+  };
+
+  $scope.showHelpModal = function(helpAnchor) {
+    Modals.showHelp({anchor: helpAnchor});
+  };
+
+  $scope.startListenLicenseBottom = function(){
+    var iframeEl = angular.element(document.querySelector('.modal #iframe-license'));
+    iframeEl = iframeEl && iframeEl.length ? iframeEl[0] : undefined;
+    if (!iframeEl || !iframeEl.contentWindow) {
+      console.debug('[join] Waiting license frame to be load...');
+      return $timeout($scope.startListenLicenseBottom, 1000);
+    }
+
+    $scope.licenseBottomInterval = $interval(function(){
+      var yPos = iframeEl.contentWindow.document.body.scrollTop;
+      var scrollHeight = iframeEl.contentWindow.document.body.scrollHeight;
+      var clientHeight = iframeEl.contentWindow.document.body.clientHeight;
+      var isBottom = (scrollHeight - clientHeight === yPos);
+      if(isBottom){
+        $scope.isLicenseRead = true;
+        $scope.stopListenLicenseBottom();
+      }
+    }, 1000);
+  };
+
+  $scope.stopListenLicenseBottom = function() {
+    if ($scope.licenseBottomInterval) {
+      $interval.cancel($scope.licenseBottomInterval);
+      delete $scope.licenseBottomInterval;
+    }
+  };
+  $scope.$on('modal.hidden', $scope.stopListenLicenseBottom);
+
+  $scope.checkUid = function(){
+    if (!$scope.formData.pseudo || $scope.formData.pseudo.length < 3) {
+      $scope.formData.computing=false;
+      delete $scope.uiAlreadyUsed;
+      return;
+    }
+
+    var uid = $scope.formData.pseudo.toUpperCase();
+    $scope.formData.computing=true;
+
+    // Same has given uid + self block: skip control
+    if (parameters.uid && uid === parameters.uid.toUpperCase()) {
+      $scope.formData.computing=false;
+      $scope.uiAlreadyUsed = false;
+      return;
+    }
+    else {
+      // search on uid
+      BMA.wot.lookup({ search: uid })
+        .then(function(res) {
+          $scope.uiAlreadyUsed = (res.results || []).some(function(pub){
+              return (pub.uids || []).some(function(idty) {
+                  return (idty.uid.toUpperCase() === uid); // same Uid
+                });
+            });
+          $scope.formData.computing=false;
+        })
+        .catch(function(err){
+          console.error(err);
+          $scope.formData.computing=false;
+          $scope.uiAlreadyUsed = false;
+        });
+    }
+  };
+  $scope.$watch('formData.pseudo', $scope.checkUid, true);
+
+  $scope.checkAccountAvailable = function() {
+    if (parameters.pubkey) {
+      $scope.accountAvailable = true;
+      return;
+    }
+
+    delete $scope.accountAvailable;
+    // Search for tx source, from pubkey
+    return BMA.tx.sources({ pubkey:  $scope.formData.pubkey })
+      .then(function(res) {
+        $scope.accountAvailable = !res || !res.sources.length;
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.accountAvailable = false;
+      });
+  };
+
+  $scope.identifierRecovery = function() {
+    // Go back
+    $scope.slides.slider.unlockSwipes();
+    for (var i = 0; i < 2; i++) {
+      $scope.slides.slider.slidePrev();
+    }
+    $scope.slides.slider.lockSwipes();
+    // Recompute behavior
+    $scope.slideBehavior = $scope.computeSlideBehavior();
+  };
+
+  // TODO: remove auto add account when done
+  /*$timeout(function() {
+    //$scope.selectCurrency('g1');
+    //$scope.selectAccountType('member');
+    $scope.formData.username="azertypoi";
+    $scope.formData.confirmUsername=$scope.formData.username;
+    $scope.formData.password="azertypoi";
+    $scope.formData.confirmPassword=$scope.formData.password;
+    $scope.formData.pseudo="azertypoi";
+    //$scope.doNext();
+    //$scope.doNext();
+  }, 400);*/
+}
+
+
+
+LoginController.$inject = ['$scope', '$timeout', '$controller', 'csWallet'];
+LoginModalController.$inject = ['$scope', '$timeout', '$q', '$ionicPopover', '$window', 'CryptoUtils', 'csCrypto', 'ionicReady', 'UIUtils', 'BMA', 'Modals', 'csSettings', 'Device', 'parameters'];
+AuthController.$inject = ['$scope', '$controller'];
+angular.module('cesium.login.controllers', ['cesium.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+      .state('app.login', {
+        url: "/login",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/home/home.html",
+            controller: 'LoginCtrl'
+          }
+        }
+      })
+    ;
+  }])
+
+  .controller('LoginCtrl', LoginController)
+
+  .controller('LoginModalCtrl', LoginModalController)
+
+  .controller('AuthCtrl', AuthController)
+
+;
+
+
+function LoginController($scope, $timeout, $controller, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('HomeCtrl', {$scope: $scope}));
+
+  $scope.showLoginModal = function() {
+    if ($scope.loading) return $timeout($scope.showLoginModal, 500); // recursive call
+
+    if (!csWallet.isLogin() && !$scope.error) {
+      return $timeout(csWallet.login, 300);
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.showLoginModal);
+
+}
+
+function LoginModalController($scope, $timeout, $q, $ionicPopover, $window, CryptoUtils, csCrypto, ionicReady,
+                              UIUtils, BMA, Modals, csSettings, Device, parameters) {
+  'ngInject';
+
+  parameters = parameters || {};
+
+  $scope.computing = false;
+  $scope.pubkey = null;
+  $scope.formData = {};
+  $scope.showPubkey = false;
+  $scope.showComputePubkeyButton = false;
+  $scope.autoComputePubkey = false;
+  $scope.pubkeyPattern = '^(:?{0}|{1})$'.format(BMA.constants.regexp.PUBKEY, BMA.constants.regexp.PUBKEY_WITH_CHECKSUM);
+
+  $scope.isAuth = parameters.auth;
+  $scope.okText = parameters.okText;
+  $scope.title = parameters.title || ($scope.isAuth ? 'AUTH.TITLE' : 'LOGIN.TITLE');
+  $scope.showMethods = angular.isDefined(parameters.showMethods) ? parameters.showMethods : true;
+  $scope.showNewAccountLink = angular.isDefined(parameters.showNewAccountLink) ? parameters.showNewAccountLink : true;
+  $scope.expectedPubkey = parameters.expectedPubkey;
+  $scope.expectedUid = parameters.uid;
+
+  $scope.scryptParamsValues = _.keys(CryptoUtils.constants.SCRYPT_PARAMS)
+    .reduce(function(res, key) {
+      return res.concat({id: key, label: 'LOGIN.SCRYPT.' + key, params: CryptoUtils.constants.SCRYPT_PARAMS[key]});
+    }, [{id: 'USER', label: 'LOGIN.SCRYPT.USER', params: {}}]);
+
+  // modal init
+  $scope.init = function() {
+
+    ionicReady().then(function(){
+      // Should auto-compute pubkey ?
+      $scope.autoComputePubkey = ionic.Platform.grade.toLowerCase()==='a' &&
+        !UIUtils.screen.isSmall();
+    });
+
+    // Init remember me
+    $scope.formData.rememberMe = csSettings.data.rememberMe;
+
+    // Init keep auth, from idle time
+    $scope.formData.keepAuthIdle = csSettings.data.keepAuthIdle;
+    $scope.formData.keepAuth = ($scope.formData.keepAuthIdle == csSettings.constants.KEEP_AUTH_IDLE_SESSION);
+
+    // Init method
+    var method = parameters.method || csSettings.data.login && csSettings.data.login.method || 'SCRYPT_DEFAULT';
+    var params = csSettings.data.login && csSettings.data.login.params;
+    // used default method, when PUBKEY + auth, or SCAN, or if ask for 'default'
+    if (($scope.isAuth && method === 'PUBKEY') || (method === 'SCAN') || (method === 'default')) {
+      method = 'SCRYPT_DEFAULT';
+    }
+    $scope.changeMethod(method, params);
+  };
+
+  // modal enter
+  $scope.enter = function() {
+    UIUtils.loading.hide();
+    // Ink effect
+    UIUtils.ink({selector: '.modal-login .ink'});
+  };
+  $scope.$on('modal.shown', $scope.enter);
+
+  // modal leave
+  $scope.leave = function() {
+    $scope.formData = {};
+    $scope.computing = false;
+    $scope.pubkey = null;
+    $scope.methods = [];
+  };
+  $scope.$on('modal.hide', $scope.leave);
+
+  // Login form submit
+  $scope.doLogin = function(skipForm) {
+    var method = $scope.formData.method;
+
+    if(!$scope.form.$valid && method !== 'SCAN') return;
+
+    // removeIf(no-device)
+    Device.keyboard.close();
+    // endRemoveIf(no-device)
+
+    var keepAuthIdle = $scope.formData.keepAuthIdle;
+    var promise;
+
+    // Scrypt
+    if (method === 'SCRYPT_DEFAULT' || method === 'SCRYPT_ADVANCED') {
+      if (!$scope.formData.username || !$scope.formData.password) return;
+      var scryptPrams = $scope.formData.scrypt && $scope.formData.scrypt.params;
+      UIUtils.loading.show();
+      promise = CryptoUtils.scryptKeypair($scope.formData.username, $scope.formData.password, scryptPrams)
+        .then(function(keypair) {
+          if (!keypair) return UIUtils.loading.hide(10);
+          var pubkey = CryptoUtils.util.encode_base58(keypair.signPk);
+          // Check pubkey
+          if (parameters.expectedPubkey && parameters.expectedPubkey != pubkey) {
+            $scope.pubkey = pubkey;
+            $scope.showPubkey = true;
+            $scope.pubkeyError = true;
+            return UIUtils.loading.hide(10);
+          }
+
+          $scope.pubkeyError = false;
+
+          return {
+            pubkey: pubkey,
+            keypair: keypair,
+            params: ($scope.formData.scrypt && $scope.formData.scrypt.id != 'SCRYPT_DEFAULT') ? scryptPrams : undefined
+          };
+        })
+        .catch(UIUtils.onError('ERROR.CRYPTO_UNKNOWN_ERROR'));
+    }
+
+    // File
+    else if (method === 'FILE') {
+      if (!$scope.formData.file || !$scope.formData.file.valid || !$scope.formData.file.pubkey) return;
+
+      // If checkbox keep auth checked: set idle time to session
+      keepAuthIdle = ($scope.formData.keepAuth && csSettings.constants.KEEP_AUTH_IDLE_SESSION) || keepAuthIdle;
+
+      promise =
+        UIUtils.loading.show()
+        .then(function() {
+          return $scope.readKeyFile($scope.formData.file, {
+            withSecret: ($scope.isAuth || $scope.formData.keepAuth)
+          });
+        })
+        .then(function(keypair) {
+          if (!keypair) return UIUtils.loading.hide(10);
+          var pubkey = CryptoUtils.util.encode_base58(keypair.signPk);
+
+          // Check pubkey
+          if (parameters.expectedPubkey && parameters.expectedPubkey != pubkey) {
+            $scope.formData.file.valid = false;
+            return UIUtils.loading.hide(10);
+          }
+
+          $scope.pubkeyError = false;
+
+          return {
+            pubkey: pubkey,
+            keypair: keypair
+          };
+        })
+        .catch(UIUtils.onError('ERROR.AUTH_FILE_ERROR'));
+    }
+
+    // Pubkey
+    else if (method === 'PUBKEY') {
+      var pubkey = $scope.formData.pubkey && $scope.formData.pubkey.trim();
+      var uid = $scope.formData.uid && $scope.formData.uid.trim() || undefined;
+      if (!pubkey) return;
+      var matches = BMA.regexp.PUBKEY.exec(pubkey);
+      // valid pubkey: use it
+      if (matches) {
+        promise = UIUtils.loading.show()
+          .then(function() {
+            return {
+              pubkey: pubkey,
+              uid : uid
+            };
+          });
+      }
+
+      // Check checksum
+      else {
+
+        matches = BMA.regexp.PUBKEY_WITH_CHECKSUM.exec(pubkey);
+        if (matches) {
+
+          pubkey = matches[1];
+          var checksum = matches[2];
+          var expectedChecksum = csCrypto.util.pkChecksum(pubkey);
+          if (checksum != expectedChecksum) {
+            $scope.form.pubkey.$error = {checksum: true};
+          }
+          else {
+            promise = UIUtils.loading.show()
+              .then(function() {
+                return {
+                  pubkey: pubkey,
+                  uid : uid
+                };
+              });
+          }
+        }
+        // Not a pubkey: launch search on
+        else {
+          return $scope.showWotLookupModal(pubkey);
+        }
+      }
+    }
+
+    // Scan QR code
+    else if (method === 'SCAN') {
+      var valid = $scope.formData.pubkey && (!$scope.isAuth || !!$scope.formData.keypair);
+      if (!valid) return;
+
+      promise = UIUtils.loading.show()
+        .then(function() {
+          return {
+            pubkey: $scope.formData.pubkey,
+            keypair: $scope.formData.keypair
+          };
+        });
+    }
+
+    if (!promise) {
+      console.warn('[login] unknown method: ', method);
+      return;
+    }
+
+    return promise.then(function(res) {
+      if (!res) return;
+
+      // Update settings (if need)
+      var rememberMeChanged = !angular.equals(csSettings.data.rememberMe, $scope.formData.rememberMe);
+      var keepAuthIdleChanged = !angular.equals(csSettings.data.keepAuthIdle, keepAuthIdle);
+      var methodChanged = !angular.equals(csSettings.data.login && csSettings.data.login.method, method);
+      var paramsChanged = !angular.equals(csSettings.data.login && csSettings.data.login.params, res.params);
+      if (rememberMeChanged || keepAuthIdleChanged || methodChanged || paramsChanged) {
+        csSettings.data.rememberMe = $scope.formData.rememberMe;
+        csSettings.data.keepAuthIdle = keepAuthIdle;
+        csSettings.data.useLocalStorage = csSettings.data.rememberMe ? true : csSettings.data.useLocalStorage;
+        csSettings.data.login = csSettings.data.login || {};
+        csSettings.data.login.method = method;
+        csSettings.data.login.params = res.params;
+        $timeout(csSettings.store, 500);
+      }
+
+      if (parameters.success) {
+        parameters.success($scope.formData);
+      }
+
+      // hide loading
+      if (parameters.silent) {
+        UIUtils.loading.hide();
+      }
+
+      // Return result then close
+      return $scope.closeModal(res);
+    });
+  };
+
+  $scope.onScryptFormChanged = function() {
+    if ($scope.computing) return; // avoid multiple call
+    $scope.pubkey = null;
+    $scope.pubkeyError = false;
+    $scope.showPubkey = !!$scope.formData.username && !!$scope.formData.password;
+    if ($scope.autoComputePubkey && $scope.showPubkey) {
+      $scope.computePubkey();
+      $scope.showComputePubkeyButton = false;
+    }
+    else {
+      $scope.showComputePubkeyButton = !$scope.autoComputePubkey && $scope.showPubkey;
+    }
+  };
+  $scope.$watch('formData.username + formData.password', $scope.onScryptFormChanged, true);
+
+  $scope.computePubkey = function() {
+    $scope.showComputePubkeyButton = false;
+    $scope.computing = true;
+    $scope.pubkey = null;
+    return $timeout(function() {
+      var salt = $scope.formData.username;
+      var pwd = $scope.formData.password;
+      var scryptPrams = $scope.formData.scrypt && $scope.formData.scrypt.params;
+      return CryptoUtils.scryptSignPk(salt, pwd, scryptPrams)
+        .then(function (signPk) {
+
+          // If model has changed before the response, then retry
+          if (salt !== $scope.formData.username || pwd !== $scope.formData.password) {
+            return $scope.computePubkey();
+          }
+
+          $scope.pubkey = CryptoUtils.util.encode_base58(signPk);
+          if ($scope.expectedPubkey && $scope.expectedPubkey != $scope.pubkey) {
+            $scope.pubkeyError = true;
+          }
+
+          $scope.computing = false;
+        }
+      )
+      .catch(function (err) {
+        UIUtils.onError('ERROR.CRYPTO_UNKNOWN_ERROR')(err);
+        $scope.computing = false;
+        $scope.autoComputePubkey = false; // Avoid a infinite loop (computePubkey -> onScryptFormChanged -> computePubkey)
+        $scope.onScryptFormChanged();
+      });
+    }, 100);
+  };
+
+  $scope.showJoinModal = function() {
+    $scope.closeModal();
+    $timeout(function() {
+      Modals.showJoin();
+    }, 300);
+  };
+
+  $scope.showAccountSecurityModal = function() {
+    $scope.closeModal();
+    $timeout(function() {
+      Modals.showAccountSecurity();
+    }, 300);
+  };
+
+  $scope.showHelpModal = function(parameters) {
+    return Modals.showHelp(parameters);
+  };
+
+  $scope.doScan = function() {
+    if ($scope.computing) return;
+
+    $scope.computing = true;
+    $scope.formData.pubkey = null;
+    $scope.formData.keypair = null;
+
+    // Run scan cordova plugin, on device
+    return Device.barcode.scan()
+      .then(function(data) {
+        if (!data) return;
+
+        // Skip simple parsing, if auth if need
+        if ($scope.isAuth) return $q.when(data);
+
+        // Try to parse as an URI
+        return BMA.uri.parse(data)
+          .then(function (res) {
+            if (!res || !res.pubkey) throw {message: 'ERROR.SCAN_UNKNOWN_FORMAT'};
+            // If simple pubkey
+            return res;
+          })
+          .catch(function(err) {
+            console.debug('[login] Error while parsing as URI: ' + (err && err.message || err));
+            return data;
+          });
+      })
+      .then(function(data) {
+        if (!data) return;
+        // Parse success: continue
+        if (data && data.pubkey) return data;
+
+        // Try to read as WIF format
+        return csCrypto.keyfile.parseData(data, {silent: true})
+          .then(function(keypair) {
+            if (!keypair || !keypair.signPk || !keypair.signSk) throw {message: 'ERROR.SCAN_UNKNOWN_FORMAT'}; // rethrow an error
+
+            var pubkey = CryptoUtils.base58.encode(keypair.signPk);
+
+            // Login using keypair
+            return {
+              pubkey: pubkey,
+              keypair: keypair
+            };
+          })
+          // Unknown format (nor URI, nor WIF/EWIF)
+          .catch(UIUtils.onError('ERROR.SCAN_UNKNOWN_FORMAT'));
+      })
+      .then(function(res) {
+        if (!res || !res.pubkey) return; // no data
+
+        $scope.pubkeyError = $scope.expectedPubkey && $scope.expectedPubkey != res.pubkey;
+        $scope.formData.pubkey = res.pubkey;
+        $scope.formData.keypair = res.keypair;
+      })
+      .then(function() {
+        $scope.computing = false;
+        UIUtils.loading.hide(10);
+      })
+      .catch(function(err) {
+        $scope.computing = false;
+        UIUtils.onError('ERROR.SCAN_FAILED')(err);
+      });
+  };
+
+  $scope.changeMethod = function(method, params){
+    $scope.hideMethodsPopover();
+
+    if (!method || method == $scope.formData.method) return; // same method
+
+    console.debug("[login] method is: " + method);
+    $scope.formData.method = method;
+    $scope.formData.uid = null;
+
+    if ($scope.form) {
+      // hide form's fields errors on the form
+      delete $scope.form.$submitted;
+    }
+
+    // Scrypt (advanced or not)
+    if (method == 'SCRYPT_DEFAULT' || method == 'SCRYPT_ADVANCED') {
+      $scope.pubkey = null;
+
+
+      // Search scrypt object
+      var scrypt;
+      if (params) {
+        scrypt = _.find($scope.scryptParamsValues, function(item){
+            return item.params && angular.equals(item.params, params);
+          });
+        if (!scrypt) {
+          scrypt = _.findWhere($scope.scryptParamsValues, {id: 'USER'}) || {};
+          scrypt.params = params;
+        }
+      }
+      else {
+        scrypt = _.findWhere($scope.scryptParamsValues, {id: 'DEFAULT'});
+      }
+      $scope.changeScrypt(scrypt);
+
+      $scope.autoComputePubkey = $scope.autoComputePubkey && (method == 'SCRYPT_DEFAULT');
+    }
+    else if (method == 'SCAN') {
+      return $scope.doScan();
+    }
+    else {
+      $scope.formData.username = null;
+      $scope.formData.password = null;
+      $scope.formData.pubkey = null;
+      $scope.pubkey = null;
+      $scope.computing = false;
+    }
+  };
+
+  $scope.changeScrypt = function(scrypt) {
+    // Protect params against changes
+    $scope.formData.scrypt = angular.copy(scrypt||{});
+    $scope.onScryptFormChanged();
+  };
+
+  $scope.readKeyFile = function(file, options) {
+    options = options || {};
+
+    options.password = options.password || $scope.formData.file.password || function() {
+      $scope.formData.file.password = undefined;
+      return Modals.showPassword({
+            title: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.TITLE',
+            subTitle: 'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.HELP',
+            error: options.error,
+            scope: $scope
+          })
+          .then(function (password) {
+            // Remember password (for validation)
+            $scope.formData.file.password = password;
+            // Timeout is need to force popup to be hide
+            return $timeout(function() {
+              return password;
+            }, 150);
+          });
+      };
+
+    return csCrypto.keyfile.read($scope.formData.file, options)
+      .catch(function(err) {
+        $scope.formData.file.password = undefined;
+        if (err === 'CANCELLED') {
+          UIUtils.loading.hide(10);
+        }
+        if (err && err.ucode == csCrypto.errorCodes.BAD_PASSWORD) {
+          // Recursive call
+          return $scope.readKeyFile($scope.formData.file, {withSecret: options.withSecret, error: 'ACCOUNT.SECURITY.KEYFILE.ERROR.BAD_PASSWORD'});
+        }
+        throw err;
+      });
+  };
+
+  $scope.onFileChanged = function(file) {
+    if (!file || !file.fileData) {
+      $scope.validatingFile = false;
+      return; // Skip
+    }
+    $scope.formData.file = {
+      name: file.fileData.name,
+      size: file.fileData.size,
+      content: file.fileContent
+    };
+    $scope.validatingFile = true;
+    $timeout(function() {
+      console.debug("[login] key file changed: ", $scope.formData.file);
+      $scope.validatingFile = true;
+
+      return $scope.readKeyFile($scope.formData.file, {withSecret: false, password: $scope.formData.file.password})
+        .then(function(keypair) {
+          if (!keypair || !keypair.signPk) {
+            $scope.formData.file.valid = false;
+            $scope.formData.file.pubkey = undefined;
+          }
+          else {
+            $scope.formData.file.pubkey = CryptoUtils.util.encode_base58(keypair.signPk);
+            $scope.formData.file.valid = !$scope.expectedPubkey || $scope.expectedPubkey == $scope.formData.file.pubkey;
+            $scope.validatingFile = false;
+          }
+
+        })
+        .catch(function(err) {
+          if (err && err === 'CANCELLED') {
+            $scope.removeKeyFile();
+            return;
+          }
+          $scope.validatingFile = false;
+          $scope.formData.file.valid = false;
+          $scope.formData.file.pubkey = undefined;
+          UIUtils.onError('ERROR.AUTH_FILE_ERROR')(err);
+        });
+    });
+  };
+
+  $scope.removeKeyFile = function() {
+    $scope.formData.file = undefined;
+  };
+
+  /* -- modals -- */
+
+  $scope.showWotLookupModal = function(searchText) {
+    return Modals.showWotLookup({q: searchText})
+      .then(function(res){
+        if (res && res.pubkey) {
+          $scope.formData.pubkey = res.pubkey;
+          $scope.formData.uid = res.uid || undefined;
+          return $timeout($scope.doLogin, 300);
+        }
+      });
+  };
+
+  /* -- popover -- */
+  $scope.showMethodsPopover = function(event) {
+    if (event.defaultPrevented) return;
+    UIUtils.popover.show(event, {
+      templateUrl :'templates/login/popover_methods.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.methodsPopover = popover;
+        UIUtils.ink({selector: '.popover-login-methods .item'});
+      }
+    });
+  };
+
+  $scope.hideMethodsPopover = function() {
+    if ($scope.methodsPopover) {
+      $scope.methodsPopover.hide();
+      $scope.methodsPopover = null;
+    }
+  };
+
+  // Default action
+  $scope.init();
+
+
+  // TODO : for DEV only
+  /*$timeout(function() {
+    $scope.formData = {
+      username: 'benoit.lavenier@e-is.pro',
+      password: ''
+    };
+    //$scope.form = {$valid:true};
+  }, 900);*/
+}
+
+
+function AuthController($scope, $controller){
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('LoginModalCtrl', {$scope: $scope, parameters: {auth: true}}));
+
+  $scope.setForm = function(form) {
+    $scope.form = form;
+  };
+
+}
+
+
+HelpController.$inject = ['$scope', '$state', '$timeout', '$anchorScroll', 'csSettings'];
+HelpModalController.$inject = ['$scope', '$timeout', '$anchorScroll', 'csSettings', 'parameters'];
+HelpTipController.$inject = ['$scope', '$state', '$window', '$ionicSideMenuDelegate', '$timeout', '$q', '$anchorScroll', 'UIUtils', 'csConfig', 'csSettings', 'csCurrency', 'csHelpConstants', 'Device', 'csWallet'];
+HelpTourController.$inject = ['$scope'];
+angular.module('cesium.help.controllers', ['cesium.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+
+      .state('app.help_tour', {
+        url: "/tour",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/home/home.html",
+            controller: 'HelpTourCtrl'
+          }
+        }
+      })
+
+      .state('app.help', {
+        url: "/help?anchor",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/help/view_help.html",
+            controller: 'HelpCtrl'
+          }
+        }
+      })
+
+      .state('app.help_anchor', {
+        url: "/help/:anchor",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/help/view_help.html",
+            controller: 'HelpCtrl'
+          }
+        }
+      })
+
+    ;
+
+
+  }])
+
+  .controller('HelpCtrl', HelpController)
+
+  .controller('HelpModalCtrl', HelpModalController)
+
+  .controller('HelpTipCtrl', HelpTipController)
+
+  .controller('HelpTourCtrl', HelpTourController)
+
+
+;
+
+
+function HelpController($scope, $state, $timeout, $anchorScroll, csSettings) {
+  'ngInject';
+
+  $scope.$on('$ionicView.enter', function(e) {
+    $scope.locale = csSettings.data.locale.id;
+    if ($state.stateParams && $state.stateParams.anchor) {
+      $scope.anchor = $state.stateParams.anchor;
+      $timeout(function () {
+        $anchorScroll($state.stateParams.anchor);
+      }, 100);
+    }
+  });
+}
+
+function HelpModalController($scope, $timeout, $anchorScroll, csSettings, parameters) {
+  'ngInject';
+
+  $scope.itemsClass = {};
+  $scope.locale = csSettings.data.locale.id;
+
+  parameters = parameters || {};
+  if (parameters && typeof parameters == "string") {
+    parameters = {anchor: parameters};
+  }
+
+  if (parameters.anchor) {
+
+    $timeout(function() {
+      $anchorScroll(parameters.anchor);
+    }, 100);
+
+    // Change CSS classes
+    $scope.itemsClass = {};
+    $scope.itemsClass[parameters.anchor] = 'selected';
+    $scope.listClass = 'selection';
+  }
+
+}
+
+
+/* ----------------------------
+*  Help Tip
+* ---------------------------- */
+function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $timeout, $q, $anchorScroll,
+                           UIUtils, csConfig, csSettings, csCurrency, csHelpConstants, Device, csWallet) {
+
+  $scope.tour = false; // Is a tour or a helptip ?
+  $scope.continue = true;
+
+  $scope.executeStep = function(partName, steps, index) {
+    index = angular.isDefined(index) ? index : 0;
+
+    if (index >= steps.length) {
+      return $q.when(true); // end
+    }
+
+    var step = steps[index];
+    if (typeof step !== 'function') {
+      throw new Error('[helptip] Invalid step at index {0} of \'{1}\' tour: step must be a function'.format(index, partName));
+    }
+    var promise = step();
+    if (typeof promise === 'boolean') {
+      promise = $q.when(promise);
+    }
+    return promise
+      .then(function(next) {
+        if (angular.isUndefined(next)) {
+          $scope.continue = false;
+          return index; // keep same index (no button press: popover just closed)
+        }
+        if (!next || index === steps.length - 1) {
+          return next ? -1 : index+1; // last step OK, so mark has finished
+        }
+        return $scope.executeStep(partName, steps, index+1);
+      })
+      .catch(function(err) {
+        if (err && err.message === 'transition prevented') {
+          console.error('ERROR: in help tour [{0}], in step [{1}] -> use large if exists, to prevent [transition prevented] error'.format(partName, index));
+        }
+        else {
+          console.error('ERROR: in help tour  [{0}], in step [{1}] : {2}'.format(partName, index, err));
+        }
+        $scope.continue = false;
+        return index;
+      });
+  };
+
+  $scope.showHelpTip = function(id, options) {
+    options = options || {};
+    options.bindings = options.bindings || {};
+    options.bindings.value =options.bindings.value || '';
+    options.bindings.hasNext = angular.isDefined(options.bindings.hasNext) ? options.bindings.hasNext : true;
+    options.timeout = options.timeout || (Device.enable ? 900 : 500);
+    options.autoremove = true; // avoid memory leak
+    options.bindings.tour = $scope.tour;
+    options.backdropClickToClose = !$scope.tour;
+    return UIUtils.popover.helptip(id, options);
+  };
+
+  $scope.showHelpModal = function(helpAnchor) {
+    Modals.showHelp({anchor: helpAnchor});
+  };
+
+  $scope.startHelpTour = function() {
+    $scope.tour = true;
+    $scope.continue = true;
+
+    // Wallet (if NOT login)
+    return $scope.startWalletNoLoginTour(0, true)
+
+      // Wallet (if login)
+      .then(function(next){
+        if (!next) return false;
+        if (!csWallet.isLogin()) return true; // not login: continue
+        return $scope.startWalletTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex) return false;
+            csSettings.data.helptip.wallet=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Wallet certifications
+      .then(function(next){
+        if (!next) return false;
+        if (!csWallet.isLogin()) return true; // not login: continue
+        return $scope.startWalletCertTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex) return false;
+            csSettings.data.helptip.walletCerts=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // My operations (if login)
+      .then(function(next){
+        if (!next) return false;
+        if (!csWallet.isLogin()) return true; // not login: continue
+        return $scope.startTxTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex) return false;
+            csSettings.data.helptip.tx=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // My wallets (if login)
+      .then(function(next){
+        if (!next) return false;
+        if (!csWallet.isLogin()) return true; // not login: continue
+        return $scope.startWalletsTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex) return false;
+            csSettings.data.helptip.wallets=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Header tour
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startHeaderTour(0, true);
+      })
+
+      // Settings tour
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startSettingsTour(0, true);
+      })
+
+      // Wot lookup tour
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startWotLookupTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex || $scope.cancelled) return false;
+            csSettings.data.helptip.wotLookup=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Wot identity
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startWotTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex || $scope.cancelled) return false;
+            csSettings.data.helptip.wot=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Identity certifications
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startWotCertTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex) return false;
+            csSettings.data.helptip.wotCerts=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Currency tour
+      .then(function(next){
+        if (!next) return false;
+
+        return $scope.startCurrencyTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex || $scope.cancelled) return false;
+            csSettings.data.helptip.currency=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+      // Network tour
+      .then(function(next){
+        if (!next) return false;
+        return $scope.startNetworkTour(0, true)
+          .then(function(endIndex){
+            if (!endIndex || $scope.cancelled) return false;
+            csSettings.data.helptip.network=endIndex;
+            csSettings.store();
+            return $scope.continue;
+          });
+      })
+
+
+      // Finish tour
+      .then(function(next){
+        if (!next) return false;
+        return $scope.finishTour();
+      });
+  };
+
+  /**
+   * Features tour on currency
+   * @returns {*}
+   */
+  $scope.startCurrencyTour = function(startIndex, hasNext) {
+
+    var showWotTabIfNeed  = function() {
+      if ($state.is('app.currency.tab_parameters')) {
+        $state.go('app.currency.tab_wot');
+      }
+    };
+
+    var contentParams;
+
+    var steps = [
+
+      function(){
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-currency', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_CURRENCY',
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left'
+            }
+          }
+        });
+      },
+
+      function () {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+        return $state.go(UIUtils.screen.isSmall() ? 'app.currency' : 'app.currency_lg')
+          .then(function () {
+            return $scope.showHelpTip('helptip-currency-mass-member', {
+              bindings: {
+                content: 'HELP.TIP.CURRENCY_MASS',
+                icon: {
+                  position: 'center'
+                }
+              }
+            });
+          });
+      },
+
+      function () {
+        if (!csSettings.data.useRelative) return true; //skip but continue
+        return $scope.showHelpTip('helptip-currency-mass-member-unit', {
+          bindings: {
+            content: 'HELP.TIP.CURRENCY_UNIT_RELATIVE',
+            contentParams: contentParams,
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'right' : 'center'
+            }
+          }
+        });
+      },
+
+      // function () {
+      //   if (!csSettings.data.useRelative) return true; //skip but continue
+      //   $anchorScroll('helptip-currency-change-unit');
+      //   return $scope.showHelpTip('helptip-currency-change-unit', {
+      //     bindings: {
+      //       content: 'HELP.TIP.CURRENCY_CHANGE_UNIT',
+      //       contentParams: contentParams,
+      //       icon: {
+      //         position: UIUtils.screen.isSmall() ? 'right' : undefined
+      //       }
+      //     }
+      //   });
+      // },
+      //
+      // function () {
+      //   if (csSettings.data.useRelative) return true; //skip but continue
+      //   $anchorScroll('helptip-currency-change-unit');
+      //   return $scope.showHelpTip('helptip-currency-change-unit', {
+      //     bindings: {
+      //       content: 'HELP.TIP.CURRENCY_CHANGE_UNIT_TO_RELATIVE',
+      //       contentParams: contentParams,
+      //       icon: {
+      //         position: UIUtils.screen.isSmall() ? 'right' : undefined
+      //       }
+      //     }
+      //   });
+      // },
+
+      function () {
+        $anchorScroll('helptip-currency-rules-anchor');
+        return $scope.showHelpTip('helptip-currency-rules', {
+          bindings: {
+            content: 'HELP.TIP.CURRENCY_RULES',
+            icon: {
+              position: 'center',
+              glyph: 'ion-information-circled'
+            }
+          }
+        });
+      },
+
+      function () {
+        showWotTabIfNeed();
+        $anchorScroll('helptip-currency-newcomers-anchor');
+        return $scope.showHelpTip('helptip-currency-newcomers', {
+          bindings: {
+            content: 'HELP.TIP.CURRENCY_WOT',
+            icon: {
+              position: 'center'
+            },
+            hasNext: hasNext
+          },
+          timeout: 1200, // need for Firefox
+          retry: 2
+        });
+      }
+    ];
+
+    // Get currency parameters, with currentUD
+    return csCurrency.get().then(function(currency) {
+      contentParams = currency.parameters;
+      // Launch steps
+      return $scope.executeStep('currency', steps, startIndex);
+    });
+  };
+
+  /**
+   * Features tour on network
+   * @returns {*}
+   */
+  $scope.startNetworkTour = function(startIndex, hasNext) {
+
+    var showNetworkTabIfNeed  = function() {
+      if ($state.is('app.currency')) {
+        // Select the second tabs
+        $timeout(function () {
+          var tabs = $window.document.querySelectorAll('ion-tabs .tabs a');
+          if (tabs && tabs.length == 3) {
+            angular.element(tabs[2]).triggerHandler('click');
+          }
+        }, 100);
+      }
+    };
+
+    var contentParams;
+
+    var steps = [
+
+      function(){
+        if (UIUtils.screen.isSmall()) return true; // skip but continue
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-network', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_NETWORK',
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left'
+            }
+          }
+        });
+      },
+
+      function () {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+        return $state.go(UIUtils.screen.isSmall() ? 'app.currency.tab_network' : 'app.network')
+          .then(function () {
+            showNetworkTabIfNeed();
+            return $scope.showHelpTip('helptip-network-peers', {
+              bindings: {
+                content: 'HELP.TIP.NETWORK_BLOCKCHAIN',
+                icon: {
+                  position: 'center',
+                  glyph: 'ion-information-circled'
+                }
+              },
+              timeout: 1200 // need for Firefox
+            });
+          });
+      },
+
+      function() {
+        showNetworkTabIfNeed();
+        return $scope.showHelpTip('helptip-network-peer-0', {
+          bindings: {
+            content: 'HELP.TIP.NETWORK_PEERS',
+            icon: {
+              position: UIUtils.screen.isSmall() ? undefined : 'center'
+            }
+          },
+          timeout: 1000,
+          retry: 20
+        });
+      },
+
+
+      function() {
+        showNetworkTabIfNeed();
+        return $scope.showHelpTip('helptip-network-peer-0-block', {
+          bindings: {
+            content: 'HELP.TIP.NETWORK_PEERS_BLOCK_NUMBER',
+            icon: {
+              position: UIUtils.screen.isSmall() ? undefined : 'center'
+            }
+          }
+        });
+      },
+
+      function() {
+        showNetworkTabIfNeed();
+        var locale = csSettings.data.locale.id;
+        return $scope.showHelpTip('helptip-network-peers', {
+          bindings: {
+            content: 'HELP.TIP.NETWORK_PEERS_PARTICIPATE',
+            contentParams: {
+              installDocUrl: (csConfig.helptip && csConfig.helptip.installDocUrl) ?
+                (csConfig.helptip.installDocUrl[locale] ? csConfig.helptip.installDocUrl[locale] : csConfig.helptip.installDocUrl) :
+                'http://duniter.org'
+            },
+            icon: {
+              position: 'center',
+              glyph: 'ion-information-circled'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    // Get currency parameters, with currentUD
+    return csCurrency.parameters().then(function(parameters) {
+      contentParams = parameters;
+      // Launch steps
+      return $scope.executeStep('network', steps, startIndex);
+    });
+  };
+
+  /**
+   * Features tour on WOT lookup
+   * @returns {*}
+   */
+  $scope.startWotLookupTour = function(startIndex, hasNext) {
+
+    var steps = [
+      function() {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-wot', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_WOT',
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left'
+            }
+          },
+          onError: 'continue'
+        });
+      },
+
+      function() {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+        return $state.go(UIUtils.screen.isSmall() ? 'app.wot_lookup.tab_search' : 'app.wot_lookup_lg')
+          .then(function(){
+            return $scope.showHelpTip('helptip-wot-search-text', {
+              bindings: {
+                content: UIUtils.screen.isSmall() ? 'HELP.TIP.WOT_SEARCH_TEXT_XS' : 'HELP.TIP.WOT_SEARCH_TEXT',
+                icon: {
+                  position: 'center'
+                }
+              }
+            });
+          });
+      },
+
+      function() {
+        return $scope.showHelpTip('helptip-wot-search-result-0', {
+          bindings: {
+            content: 'HELP.TIP.WOT_SEARCH_RESULT',
+            icon: {
+              position: 'center'
+            }
+          },
+          timeout: 700,
+          retry: 15
+        });
+      },
+
+      function() {
+        var element = $window.document.getElementById('helptip-wot-search-result-0');
+        if (!element) return true;
+        $timeout(function() {
+          angular.element(element).triggerHandler('click');
+        });
+        return $scope.showHelpTip('helptip-wot-view-certifications', {
+          bindings: {
+            content: 'HELP.TIP.WOT_VIEW_CERTIFICATIONS',
+            hasNext: hasNext
+          },
+          timeout: 2500
+        });
+      }
+    ];
+
+    // Launch steps
+    return $scope.executeStep('wotLookup', steps, startIndex);
+  };
+
+  /**
+   * Features tour on WOT identity
+   * @returns {*}
+   */
+  $scope.startWotTour = function(startIndex, hasNext) {
+    var contentParams;
+
+    var steps = [
+      function() {
+        return $scope.showHelpTip('helptip-wot-view-certifications', {
+          bindings: {
+            content: 'HELP.TIP.WOT_VIEW_CERTIFICATIONS_COUNT',
+            contentParams: contentParams,
+            icon: {
+              position: 'center',
+              glyph: 'ion-information-circled'
+            }
+          }
+        });
+      },
+
+      function() {
+        return $scope.showHelpTip('helptip-wot-view-certifications-count', {
+          bindings: {
+            content: 'HELP.TIP.WOT_VIEW_CERTIFICATIONS_CLICK',
+            icon: {
+              position: 'center'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    // Get currency parameters, with currentUD
+    return csCurrency.get().then(function(currency) {
+      contentParams = currency.parameters;
+      contentParams.currentUD = currency.currentUD;
+      // Launch steps
+      return $scope.executeStep('wot', steps, startIndex);
+    });
+  };
+
+  /**
+   * Features tour on wot certifications
+   * @returns {*}
+   */
+  $scope.startWotCertTour = function(startIndex, hasNext) {
+    var steps = [
+
+      function() {
+        // If on identity: click on certifications
+        if ($state.is('app.wot_identity')) {
+          var element = $window.document.getElementById('helptip-wot-view-certifications');
+          if (!element) return true;
+          $timeout(function() {
+            angular.element(element).triggerHandler('click');
+          });
+        }
+        return $scope.showHelpTip(UIUtils.screen.isSmall() ? 'fab-certify': 'helptip-certs-certify', {
+          bindings: {
+            content: 'HELP.TIP.WOT_VIEW_CERTIFY',
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'bottom-right' : 'center'
+            }
+          },
+          timeout: UIUtils.screen.isSmall() ? 2000 : 1000,
+          retry: 10
+        });
+      },
+
+      function() {
+        return $scope.showHelpTip(UIUtils.screen.isSmall() ? 'fab-certify': 'helptip-certs-certify', {
+          bindings: {
+            content: 'HELP.TIP.CERTIFY_RULES',
+            icon: {
+              position: 'center',
+              glyph: 'ion-alert-circled'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    return $scope.executeStep('certs', steps, startIndex);
+  };
+
+  /**
+   * Features tour on wallet (if not login)
+   * @returns {*}
+   */
+  $scope.startWalletNoLoginTour = function(startIndex, hasNext) {
+    if (csWallet.isLogin()) return $q.when(true); // skip if login
+
+    var steps = [
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-account', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_ACCOUNT',
+            icon: {
+              position: 'left'
+            },
+            hasNext: hasNext
+          }
+        });
+      },
+
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-tx', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_TX',
+            icon: {
+              position: 'left'
+            },
+            hasNext: hasNext
+          }
+        });
+      },
+
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-wallets', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_WALLETS',
+            icon: {
+              position: 'left'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    return $scope.executeStep('wallet-no-login', steps, startIndex);
+  };
+
+  /**
+   * Features tour on wallet screens
+   * @returns {*}
+   */
+  $scope.startWalletTour = function(startIndex, hasNext) {
+    if (!csWallet.isLogin()) return $q.when(true); // skip if not login
+
+    var hasCertificationsItem = csWallet.data.isMember||(csWallet.data.requirements && csWallet.data.requirements.pendingMembership);
+    var contentParams;
+
+    var steps = [
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-account', {
+          bindings: {
+            content: csWallet.data.isMember ? 'HELP.TIP.MENU_BTN_ACCOUNT_MEMBER' : 'HELP.TIP.MENU_BTN_ACCOUNT',
+            icon: {
+              position: 'left'
+            }
+          }
+        });
+      },
+
+      function () {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+
+        // Go to wallet
+        return $state.go('app.view_wallet')
+          .then(function () {
+            return $scope.showHelpTip(UIUtils.screen.isSmall() ? 'helptip-wallet-options-xs' : 'helptip-wallet-options', {
+              bindings: {
+                content: 'HELP.TIP.WALLET_OPTIONS',
+                icon: {
+                  position: UIUtils.screen.isSmall() ? 'right' : 'center'
+                }
+              },
+              timeout: UIUtils.screen.isSmall() ? 2000 : 1000,
+              retry: 10
+            });
+          });
+      },
+
+      // Wallet pubkey
+      function () {
+        $anchorScroll('helptip-wallet-pubkey');
+        return $scope.showHelpTip('helptip-wallet-pubkey', {
+          bindings: {
+            content: 'HELP.TIP.WALLET_PUBKEY',
+            icon: {
+              position: 'center'
+            },
+            hasNext: !hasCertificationsItem && hasNext
+          },
+          timeout: UIUtils.screen.isSmall() ? 2000 : 500,
+          retry: 10
+        });
+      },
+
+      function () {
+        if (!hasCertificationsItem) return hasNext;
+        $anchorScroll('helptip-wallet-certifications');
+        return $scope.showHelpTip('helptip-wallet-certifications', {
+          bindings: {
+            content: UIUtils.screen.isSmall() ? 'HELP.TIP.WALLET_RECEIVED_CERTIFICATIONS': 'HELP.TIP.WALLET_CERTIFICATIONS',
+            icon: {
+              position: 'center'
+            },
+            hasNext: hasNext
+          },
+          timeout: 500,
+          onError: 'continue' // if simple wallet: no certification item, so continue
+        });
+      }
+    ];
+
+    // Check that constants are well configured
+    if (steps.length != csHelpConstants.wallet.stepCount) {
+      console.error("[help] Invalid value of 'csHelpConstants.wallet.stepCount'. Please update to {0}".format(steps.length));
+    }
+
+    // Get currency parameters, with currentUD
+    return csCurrency.get()
+      .then(function(currency) {
+        contentParams = currency.parameters;
+        contentParams.currentUD = currency.currentUD;
+        // Launch steps
+        return $scope.executeStep('wallet', steps, startIndex);
+      });
+  };
+
+  /**
+   * Features tour on wallet certifications
+   * @returns {*}
+   */
+  $scope.startWalletCertTour = function(startIndex, hasNext) {
+    if (!csWallet.isLogin()) return $q.when(true);
+
+    var contentParams;
+    var skipAll = false;
+
+    var steps = [
+
+      function() {
+        // If on wallet : click on certifications
+        if ($state.is('app.view_wallet')) {
+          var element = $window.document.getElementById('helptip-wallet-certifications');
+          if (!element) {
+            skipAll = true;
+            return true;
+          }
+          $timeout(function() {
+            angular.element(element).triggerHandler('click');
+          });
+        }
+        if (!UIUtils.screen.isSmall()) return true; // skip this helptip if not in tabs mode
+        return $scope.showHelpTip('helptip-received-certs', {
+          bindings: {
+            content: 'HELP.TIP.WALLET_RECEIVED_CERTS'
+          }
+        });
+      },
+
+      function() {
+        if (skipAll || !UIUtils.screen.isSmall()) return true;
+        return $state.go('app.view_wallet') // go back to wallet (small device only)
+          .then(function() {
+            return $scope.showHelpTip('helptip-wallet-given-certifications', {
+              bindings: {
+                content: 'HELP.TIP.WALLET_GIVEN_CERTIFICATIONS',
+                icon: {
+                  position: 'center'
+                }
+              },
+              timeout: 500
+            });
+        });
+      },
+
+      function() {
+        if (skipAll) return true;
+
+        // Click on given cert link (small device only)
+        if ($state.is('app.view_wallet')) {
+          var element = $window.document.getElementById('helptip-wallet-given-certifications');
+          if (!element) {
+            skipAll = true;
+            return true;
+          }
+          $timeout(function() {
+            angular.element(element).triggerHandler('click');
+          }, 500);
+        }
+        return $scope.showHelpTip(UIUtils.screen.isSmall() ? 'fab-select-certify': 'helptip-certs-select-certify', {
+          bindings: {
+            content: 'HELP.TIP.WALLET_CERTIFY',
+            icon: {
+              position: UIUtils.screen.isSmall() ? 'bottom-right' : 'center'
+            }
+          },
+          timeout: UIUtils.screen.isSmall() ? 2000 : 500,
+          retry: 10
+        });
+      },
+
+      function() {
+        if ($scope.tour || skipAll) return hasNext; // skip Rules if features tour (already display)
+        return $scope.showHelpTip('helptip-certs-stock', {
+          bindings: {
+            content: 'HELP.TIP.CERTIFY_RULES',
+            icon: {
+              position: 'center',
+              glyph: 'ion-alert-circled'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+
+      /* FIXME : how to select the left tab ?
+      ,function() {
+        return $scope.showHelpTip('helptip-certs-stock', {
+          bindings: {
+            content: 'HELP.TIP.WALLET_CERT_STOCK',
+            contentParams: contentParams,
+            icon: {
+              position: 'center'
+            },
+            hasNext: hasNext
+          }
+        });
+      }*/
+    ];
+
+    return csCurrency.parameters().then(function(parameters) {
+      contentParams = parameters;
+      return $scope.executeStep('certs', steps, startIndex);
+    });
+  };
+
+  /**
+   * Features tour on TX screen
+   * @returns {*}
+   */
+  $scope.startTxTour = function(startIndex, hasNext) {
+    if (!csWallet.isLogin()) return $q.when(true); // skip if not login
+
+    var contentParams;
+
+    var steps = [
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-tx', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_TX',
+            icon: {
+              position: 'left'
+            }
+          }
+        });
+      },
+
+      function () {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+
+        // Go to wallet
+        return $state.go('app.view_wallet_tx')
+          .then(function () {
+            return $scope.showHelpTip('helptip-wallet-balance', {
+              bindings: {
+                content: csSettings.data.useRelative ? 'HELP.TIP.WALLET_BALANCE_RELATIVE' : 'HELP.TIP.WALLET_BALANCE',
+                contentParams: contentParams,
+                icon: {
+                  position: 'center'
+                }
+              },
+              retry: 20 // 10 * 500 = 5s max
+            });
+          });
+      },
+
+      function () {
+        return $scope.showHelpTip('helptip-wallet-balance', {
+          bindings: {
+            content: 'HELP.TIP.WALLET_BALANCE_CHANGE_UNIT',
+            contentParams: contentParams,
+            icon: {
+              position: 'center',
+              glyph: 'ion-information-circled'
+            }
+          }
+        });
+      }
+    ];
+
+    // Get currency parameters, with currentUD
+    return csCurrency.get()
+      .then(function(currency) {
+        contentParams = currency.parameters;
+        contentParams.currentUD = currency.currentUD;
+        // Launch steps
+        return $scope.executeStep('tx', steps, startIndex);
+      });
+  };
+
+  /**
+   * Features tour on My wallets
+   * @returns {*}
+   */
+  $scope.startWalletsTour = function(startIndex, hasNext) {
+
+    var steps = [
+      function () {
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-wallets', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_WALLETS',
+            icon: {
+              position: 'left'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    return $scope.executeStep('my-wallets', steps, startIndex);
+  };
+
+  /**
+   * header tour
+   * @returns {*}
+   */
+  $scope.startHeaderTour = function(startIndex, hasNext) {
+    if (UIUtils.screen.isSmall()) return $q.when(true);
+
+    function _getProfilBtnElement() {
+      var elements = $window.document.querySelectorAll('#helptip-header-bar-btn-profile');
+      if (!elements || !elements.length) return null;
+      return _.find(elements, function(el) {return el.offsetWidth > 0;});
+    }
+
+    var steps = [
+      function () {
+
+        if (UIUtils.screen.isSmall()) return true; // skip for small screen
+        var element = _getProfilBtnElement();
+        if (!element) return true;
+
+        // If home; add offset because of locales button
+        var iconStyle =  $state.is('app.home') ? 'margin-right: 60px' : undefined;
+
+        return $scope.showHelpTip(element, {
+          bindings: {
+            content: 'HELP.TIP.HEADER_BAR_BTN_PROFILE',
+            icon: {
+              position: 'right',
+              style: iconStyle
+            }
+          }
+        });
+      },
+
+      function () {
+        // small screens
+        if (UIUtils.screen.isSmall()) {
+          $ionicSideMenuDelegate.toggleLeft(true);
+          return $scope.showHelpTip('helptip-menu-btn-settings', {
+            bindings: {
+              content: 'HELP.TIP.MENU_BTN_SETTINGS',
+              icon: {
+                position: 'left'
+              },
+              hasNext: hasNext
+            },
+            timeout: 1000
+          });
+        }
+        // wide screens
+        else {
+          var element = _getProfilBtnElement();
+          if (!element) return true;
+          $timeout(function() {
+            angular.element(element).triggerHandler('click');
+          });
+          return $scope.showHelpTip('helptip-popover-profile-btn-settings', {
+            bindings: {
+              content: 'HELP.TIP.MENU_BTN_SETTINGS',
+              icon: {
+                position: 'center'
+              },
+              hasNext: hasNext
+            },
+            timeout: 1000
+          })
+            .then(function(res) {
+              // close profile popover
+              $scope.closeProfilePopover();
+              return res;
+            });
+        }
+      }
+    ];
+
+    return $scope.executeStep('header', steps, startIndex);
+  };
+
+  /**
+   * Settings tour
+   * @returns {*}
+   */
+  $scope.startSettingsTour = function(startIndex, hasNext) {
+    var contentParams;
+    var steps = [
+
+      function () {
+        if (!UIUtils.screen.isSmall()) return true;
+        $ionicSideMenuDelegate.toggleLeft(true);
+        return $scope.showHelpTip('helptip-menu-btn-settings', {
+          bindings: {
+            content: 'HELP.TIP.MENU_BTN_SETTINGS',
+            icon: {
+              position: 'left'
+            }
+          },
+          timeout: 1000
+        });
+      },
+
+      function () {
+        if ($ionicSideMenuDelegate.isOpen()) {
+          $ionicSideMenuDelegate.toggleLeft(false);
+        }
+
+        // Go to settings
+        return $state.go('app.settings')
+          .then(function () {
+            return $scope.showHelpTip('helptip-settings-btn-unit-relative', {
+              bindings: {
+                content: 'HELP.TIP.SETTINGS_CHANGE_UNIT',
+                contentParams: contentParams,
+                icon: UIUtils.screen.isSmall() ? {
+                  position: 'right',
+                  style: 'margin-right: 60px'
+                } : {position: 'center'},
+                hasNext: hasNext
+              },
+              timeout: 1000
+            });
+          });
+      }
+    ];
+
+    return csCurrency.parameters()
+      .then(function(parameters) {
+        contentParams = parameters;
+        return $scope.executeStep('settings', steps, startIndex);
+      });
+  };
+
+
+  /**
+   * Finish the features tour (last step)
+   * @returns {*}
+   */
+  $scope.finishTour = function() {
+    if ($ionicSideMenuDelegate.isOpen()) {
+      $ionicSideMenuDelegate.toggleLeft(false);
+    }
+
+    // If login: redirect to wallet
+    if (csWallet.isLogin()) {
+      return $state.go('app.view_wallet')
+        .then(function(){
+          return $scope.showHelpTip('helptip-wallet-pubkey', {
+            bindings: {
+              content: 'HELP.TIP.END_LOGIN',
+              hasNext: false
+            },
+            timeout: 1200
+          });
+        });
+    }
+
+    // If not login: redirect to home
+    else {
+      var contentParams;
+      return $q.all([
+        $scope.showHome(),
+
+        csCurrency.parameters()
+          .then(function(parameters) {
+            contentParams = parameters;
+          })
+        ])
+        .then(function(){
+          return $scope.showHelpTip('helptip-home-logo', {
+           bindings: {
+             content: 'HELP.TIP.END_NOT_LOGIN',
+             contentParams: contentParams,
+             hasNext: false
+           }
+          });
+        });
+    }
+  };
+}
+
+/* ----------------------------
+ *  Help tour (auto start from home page)
+ * ---------------------------- */
+function HelpTourController($scope) {
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    $scope.startHelpTour();
+  });
+
+}
+
+
+WalletController.$inject = ['$scope', '$rootScope', '$q', '$ionicPopup', '$timeout', '$state', '$translate', '$ionicPopover', '$location', 'UIUtils', 'ModalUtils', 'Modals', 'csPopovers', 'BMA', 'csConfig', 'csSettings', 'csWallet', 'csHelp'];
+WalletTxController.$inject = ['$scope', '$ionicPopover', '$state', '$timeout', '$location', 'UIUtils', 'Modals', 'csPopovers', 'BMA', 'csHttp', 'csSettings', 'csCurrency', 'csWallet', 'csTx'];
+WalletTxErrorController.$inject = ['$scope', 'UIUtils', 'csSettings', 'csWallet'];
+WalletSecurityModalController.$inject = ['$scope', 'UIUtils', 'csWallet', '$translate', 'parameters'];angular.module('cesium.wallet.controllers', ['cesium.services', 'cesium.currency.controllers'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+    $stateProvider
+
+
+      .state('app.view_wallet', {
+        url: "/account?refresh",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet.html",
+            controller: 'WalletCtrl'
+          }
+        },
+        data: {
+          login: true,
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.view_wallet_tx', {
+        url: "/history/account?refresh",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet_tx.html",
+            controller: 'WalletTxCtrl'
+          }
+        },
+        data: {
+          login: true,
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.view_wallet_tx_errors', {
+        url: "/history/account/errors",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet_tx_error.html",
+            controller: 'WalletTxErrorCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+    ;
+  }])
+
+  .controller('WalletCtrl', WalletController)
+
+  .controller('WalletTxCtrl', WalletTxController)
+
+  .controller('WalletTxErrorCtrl', WalletTxErrorController)
+
+  .controller('WalletSecurityModalCtrl', WalletSecurityModalController)
+;
+
+function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state, $translate, $ionicPopover, $location,
+                          UIUtils, ModalUtils, Modals, csPopovers, BMA, csConfig, csSettings, csWallet, csHelp) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.settings = csSettings.data;
+  $scope.qrcodeId = 'qrcode-wallet-' + $scope.$id;
+  $scope.toggleQRCode = false;
+  $scope.likeData = {
+    likes: {},
+    abuses: {}
+  };
+
+  var wallet;
+
+  $scope.enter = function(e, state) {
+    $scope.loading = $scope.loading || (state.stateParams && state.stateParams.refresh);
+    $scope.enableSelectWallet = csWallet.children.count() > 0;
+    if ($scope.loading) { // load once
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      $scope.isDefaultWallet = wallet.isDefault();
+      $scope.walletId = wallet.id;
+
+      $scope.cleanLocationHref(state);
+
+      return $scope.load();
+    }
+    else {
+      // update view (to refresh avatar + plugin data, such as profile, subscriptions...)
+      UIUtils.loading.hide(10);
+      $timeout($scope.updateView, 300);
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function() {
+    if (!wallet) return;
+
+    return wallet.login()
+      .then(function(walletData) {
+        $scope.formData = walletData;
+        $scope.loading=false; // very important, to avoid TX to be display before wallet.currentUd is loaded
+        $scope.updateView();
+        $scope.addListeners();
+
+        $scope.showQRCode();
+        if (wallet.isDefault()) $scope.showHelpTip();
+
+        UIUtils.loading.hide(10); // loading could have be open (e.g. new account)
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') {
+          $scope.showHome();
+          return;
+        }
+        UIUtils.onError('ERROR.LOAD_WALLET_DATA_ERROR')(err);
+      });
+  };
+
+  $scope.updateView = function() {
+    $scope.motion.show({selector: '#wallet .item'});
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+  };
+
+
+  $scope.setRegisterForm = function(registerForm) {
+    $scope.registerForm = registerForm;
+  };
+
+  // Clean controller data when logout
+  $scope.onWalletLogout = function() {
+    // clean QRcode
+    $scope.hideQRCode();
+    $scope.removeListeners();
+    delete $scope.formData;
+    wallet = null;
+    $scope.loading = true;
+  };
+
+  $scope.addListeners = function() {
+    $scope.listeners = [
+      // Reset the view on logout
+      wallet.api.data.on.logout($scope, $scope.onWalletLogout),
+
+      // Listen new events (can appears from security wizard also)
+      $scope.$watchCollection('formData.events', function(newEvents, oldEvents) {
+        if (!oldEvents || $scope.loading || angular.equals(newEvents, oldEvents)) return;
+        $scope.updateView();
+      })
+    ];
+  };
+
+  $scope.removeListeners = function() {
+    _.forEach($scope.listeners, function(remove){
+      remove();
+    });
+    $scope.listeners = [];
+  };
+
+  // Ask uid
+  $scope.showUidPopup = function() {
+    return $q(function(resolve, reject) {
+      $translate(['ACCOUNT.NEW.TITLE', 'ACCOUNT.POPUP_REGISTER.TITLE', 'ACCOUNT.POPUP_REGISTER.HELP', 'COMMON.BTN_OK', 'COMMON.BTN_CANCEL'])
+        .then(function (translations) {
+          $scope.formData.newUid = (!!$scope.formData.uid ? ''+$scope.formData.uid : '');
+
+          // Choose UID popup
+          $ionicPopup.show({
+            templateUrl: 'templates/wallet/popup_register.html',
+            title: translations['ACCOUNT.POPUP_REGISTER.TITLE'],
+            subTitle: translations['ACCOUNT.POPUP_REGISTER.HELP'],
+            scope: $scope,
+            buttons: [
+              { text: translations['COMMON.BTN_CANCEL'] },
+              {
+                text: translations['COMMON.BTN_OK'],
+                type: 'button-positive',
+                onTap: function(e) {
+                  $scope.registerForm.$submitted=true;
+                  if(!$scope.registerForm.$valid || !$scope.formData.newUid) {
+                    //don't allow the user to close unless he enters a uid
+                    e.preventDefault();
+                  } else {
+                    return $scope.formData.newUid;
+                  }
+                }
+              }
+            ]
+          })
+          .then(function(uid) {
+            if (!uid) { // user cancel
+              delete $scope.formData.uid;
+              UIUtils.loading.hide();
+              reject('CANCELLED');
+              return;
+            }
+            resolve(uid);
+          });
+        });
+      });
+  };
+
+  // Send self identity
+  $scope.self = function() {
+    $scope.hideActionsPopover();
+
+    return $scope.showUidPopup()
+    .then(function(uid) {
+      if (!uid) return;
+
+      UIUtils.loading.show();
+
+      return wallet.self(uid)
+      .then(function() {
+        $scope.updateView();
+        UIUtils.loading.hide();
+      })
+      .catch(function(err){
+         UIUtils.onError('ERROR.SEND_IDENTITY_FAILED')(err)
+         .then(function() {
+           $scope.self(); // loop
+         });
+      });
+    });
+  };
+
+  $scope.doMembershipIn = function(retryCount) {
+    return wallet.membership.inside()
+      .then(function() {
+        $scope.updateView();
+        UIUtils.loading.hide();
+      })
+      .catch(function(err) {
+        if (err === 'CANCELLED') throw err;
+        if (err && err.ucode != BMA.errorCodes.MEMBERSHIP_ALREADY_SEND) {
+          console.error("[wallet] Node: already membership", err);
+          UIUtils.loading.hide();
+          return; // OK
+        }
+        if (!retryCount || retryCount <= 2) {
+          return $timeout(function() {
+            return $scope.doMembershipIn((retryCount||0) + 1);
+          }, 1000);
+        }
+        throw err;
+      });
+  };
+
+
+  // Send membership IN
+  $scope.membershipIn = function(keepSelf) {
+    $scope.hideActionsPopover();
+
+    if (wallet.isMember()) {
+      return UIUtils.alert.info("INFO.NOT_NEED_MEMBERSHIP");
+    }
+
+    var uid = angular.isDefined($scope.formData.blockUid) && $scope.formData.uid || undefined;
+
+    // Approve the license
+    return Modals.showJoinMember({
+      uid : uid,
+      blockUid: uid && $scope.formData.blockUid,
+      pubkey: $scope.formData.pubkey
+    })
+    .catch(function(err) {
+      if (err === 'CANCELLED') return;
+      if (!wallet.data.uid) {
+        UIUtils.onError('ERROR.SEND_IDENTITY_FAILED')(err);
+      }
+      else {
+        UIUtils.onError('ERROR.SEND_MEMBERSHIP_IN_FAILED')(err);
+      }
+    });
+  };
+
+  // Send membership OUT
+  $scope.membershipOut = function(confirm, confirmAgain) {
+    $scope.hideActionsPopover();
+
+    // Ask user confirmation
+    if (!confirm) {
+      return UIUtils.alert.confirm('CONFIRM.MEMBERSHIP_OUT', 'CONFIRM.POPUP_WARNING_TITLE', {
+        cssClass: 'warning',
+        okText: 'COMMON.BTN_YES',
+        okType: 'button-assertive'
+      })
+      .then(function(confirm) {
+        if (confirm) $scope.membershipOut(true); // loop with confirmation
+      });
+    }
+
+    if (!confirmAgain) {
+      return UIUtils.alert.confirm("CONFIRM.MEMBERSHIP_OUT_2", 'CONFIRM.POPUP_TITLE', {
+        cssClass: 'warning',
+        okText: 'COMMON.BTN_YES',
+        okType: 'button-assertive'
+      })
+      .then(function (confirm) {
+        if (confirm) $scope.membershipOut(true, true); // loop with all confirmations
+      });
+    }
+
+    UIUtils.loading.show();
+    return wallet.membership.out()
+      .then(function() {
+        UIUtils.loading.hide();
+        UIUtils.toast.show('INFO.MEMBERSHIP_OUT_SENT');
+    })
+    .catch(UIUtils.onError('ERROR.SEND_MEMBERSHIP_OUT_FAILED'));
+  };
+
+  // Updating wallet data
+  $scope.doUpdate = function(silent) {
+    console.debug('[wallet] Refreshing data...');
+    return (silent ?
+        wallet.refreshData() :
+        UIUtils.loading.show()
+          .then(wallet.refreshData)
+          .then(UIUtils.loading.hide)
+      )
+      .then($scope.updateView)
+      .catch(UIUtils.onError('ERROR.REFRESH_WALLET_DATA'));
+  };
+
+  /**
+   * Renew membership
+   */
+  $scope.renewMembership = function(confirm) {
+
+    // Make sure user is (or was) a member
+    if (!wallet.isMember() && !$scope.formData.requirements.wasMember) {
+      return UIUtils.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION");
+    }
+
+    // If renew is not need, ask confirmation
+    if (!confirm && !$scope.formData.requirements.needRenew) {
+      return $translate("CONFIRM.NOT_NEED_RENEW_MEMBERSHIP", {membershipExpiresIn: $scope.formData.requirements.membershipExpiresIn})
+        .then(function(message) {
+          return UIUtils.alert.confirm(message);
+        })
+        .then(function(confirm) {
+          if (confirm) {
+            // loop with confirm
+            return $scope.renewMembership(true);
+          }
+        });
+    }
+
+    return wallet.auth({minData: true}) // Ask user to auth, before confirmation - fix #508
+      .then(function() {
+        UIUtils.loading.hide();
+        return UIUtils.alert.confirm("CONFIRM.RENEW_MEMBERSHIP");
+      })
+      .then(function(confirm) {
+        if (confirm) {
+          UIUtils.loading.show();
+          return $scope.doMembershipIn();
+        }
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') return;
+        UIUtils.loading.hide();
+        UIUtils.alert.error(err);
+      });
+  };
+
+
+  /**
+   * Fix identity (e.g. when identity expired)
+   */
+  $scope.fixIdentity = function() {
+    if (!$scope.formData.uid) return;
+
+    return $q.all([
+      wallet.auth(),
+      $translate('CONFIRM.FIX_IDENTITY', {uid: $scope.formData.uid})
+    ])
+      .then(function(res) {
+        return UIUtils.alert.confirm(res[1]);
+      })
+      .then(function(confirm) {
+        if (!confirm) return;
+        UIUtils.loading.show();
+        // Reset self data
+        $scope.formData.blockUid = null;
+        // Reset membership data
+        $scope.formData.sigDate = null;
+        return wallet.self($scope.formData.uid);
+      })
+      .then($scope.doMembershipIn)
+      .catch(function(err){
+        if (err === 'CANCELLED') return;
+        UIUtils.loading.hide();
+        UIUtils.alert.error(err);
+      });
+  };
+
+  /**
+   * Fix membership, when existing MS reference an invalid block
+   */
+  $scope.fixMembership = function() {
+    if (!$scope.formData.uid) return;
+
+    if (wallet.isMember()) {
+      return UIUtils.alert.info("INFO.NOT_NEED_MEMBERSHIP");
+    }
+
+    $scope.hideActionsPopover();
+
+    return wallet.auth({silent: true})
+      .then(function() {
+        UIUtils.alert.confirm("CONFIRM.FIX_MEMBERSHIP");
+      })
+      .then(function(confirm) {
+        if (!confirm) return;
+        UIUtils.loading.show();
+        // Reset self data
+        $scope.formData.blockUid = null;
+        // Reset membership data
+        $scope.formData.sigDate = null;
+        return wallet.self($scope.formData.uid, false/*do NOT load membership here*/);
+      })
+      .then($scope.doMembershipIn)
+      .catch(function(err){
+        if (err === 'CANCELLED') return;
+        UIUtils.loading.hide();
+        UIUtils.alert.error(err);
+      });
+  };
+
+  /**
+   * Catch click for quick fix
+   * @param fix
+   */
+  $scope.doQuickFix = function(event) {
+    if (event === 'renew') {
+      $scope.renewMembership();
+    }
+    else if (event === 'membership') {
+      $scope.membershipIn(true/*keep self*/);
+    }
+    else if (event === 'fixMembership') {
+      $scope.fixMembership(false);
+    }
+    else if (event === 'fixIdentity') {
+      $scope.fixIdentity();
+    }
+  };
+
+  /* -- UI actions -- */
+
+  var inheritedLogout = $scope.logout;
+  $scope.logout = function(options) {
+    if ($scope.isDefaultWallet) {
+      return inheritedLogout(options);
+    }
+  };
+
+  $scope.startWalletTour = function() {
+    $scope.hideActionsPopover();
+    return csHelp.wallet.tour();
+  };
+
+  $scope.showHelpTip = function() {
+    return csHelp.wallet.helptip();
+  };
+
+  $scope.showQRCode = function(timeout) {
+    if (!wallet || !$scope.qrcodeId) return; // Skip
+
+    // Get the DIV element
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId + ' .content'));
+    if (!element) {
+      console.error("[wallet-controller] Cannot found div #{0} for the QRCode. Skipping.".format($scope.qrcodeId));
+      return;
+    }
+
+    wallet.loadQrCode()
+      .then(function(svg) {
+        element.html(svg);
+        UIUtils.motion.toggleOn({selector: '#'+$scope.qrcodeId}, timeout || 1100);
+      });
+  };
+
+  $scope.hideQRCode = function() {
+    if (!$scope.qrcodeId) return;
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId));
+    if (element) {
+      UIUtils.motion.toggleOff({selector: '#'+$scope.qrcodeId});
+    }
+  };
+
+  $scope.showCertifications = function() {
+    // Warn: do not use a simple link here (a ng-click is mandatory for help tour)
+    if ($scope.isDefaultWallet) {
+      $state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert' : 'app.wallet_cert_lg', {
+        type: 'received'
+      });
+    }
+    else {
+      $state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert_by_id' : 'app.wallet_cert_lg_by_id', {
+        id: $scope.walletId,
+        type: 'received'
+      });
+    }
+  };
+
+  $scope.showGivenCertifications = function() {
+    // Warn: do not use a simple link here (a ng-click is mandatory for help tour)
+    if ($scope.isDefaultWallet) {
+      $state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert' : 'app.wallet_cert_lg', {
+        type: 'given'
+      });
+    }
+    else {
+      $state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert_by_id' : 'app.wallet_cert_lg_by_id', {
+        id: $scope.walletId,
+        type: 'given'
+      });
+    }
+  };
+
+  $scope.showTxHistory = function() {
+    $state.go($scope.isDefaultWallet ? 'app.view_wallet_tx' : 'app.view_wallet_tx_by_id', {
+      id: $scope.walletId
+    });
+  };
+
+  $scope.showLicenseModal = function() {
+    return ModalUtils.show('templates/currency/modal_license.html','CurrencyLicenseModalCtrl');
+  };
+
+  /* -- modals -- */
+
+  // Transfer
+  $scope.showTransferModal = function() {
+    var hasCredit = (!!$scope.formData.balance && $scope.formData.balance > 0);
+    if (!hasCredit && !csWallet.children.count()) {
+      UIUtils.alert.info('INFO.NOT_ENOUGH_CREDIT');
+      return;
+    }
+    return Modals.showTransfer({wallet: wallet.id})
+      .then(function(done){
+        if (done) {
+          UIUtils.toast.show('INFO.TRANSFER_SENT');
+          $scope.$broadcast('$$rebind::balance'); // force rebind balance
+          $scope.motion.show({selector: '.item-pending'});
+        }
+      });
+  };
+
+  $scope.showSecurityModal = function(){
+    $scope.hideActionsPopover();
+    return Modals.showAccountSecurity({wallet: wallet})
+      .then(function(res) {
+        if (!res) return;
+
+        if (res === 'self') {
+          return $scope.self();
+        }
+        else if (res === 'membershipIn') {
+          return $scope.membershipIn();
+        }
+      });
+  };
+
+  $scope.showSelectIdentitiesModal = function(){
+    $scope.hideActionsPopover();
+
+    return Modals.showSelectPubkeyIdentity({
+        identities: [$scope.formData.requirements].concat($scope.formData.requirements.alternatives)
+      })
+      .then(function(idty) {
+        if (!idty || !idty.uid) return;
+
+        $scope.loading = true;
+
+        // Set self (= uid + blockUid)
+        return wallet.setSelf(idty.uid, idty.blockUid)
+          .then(function() {
+            $scope.loading=false;
+            $scope.updateView();
+            UIUtils.loading.hide();
+          });
+      });
+  };
+
+  $scope.showSelectWalletModal = function() {
+    if (!csWallet.children.count()) return;
+
+    return Modals.showSelectWallet({
+      parameters: {
+        showDefault: true,
+        showBalance: false,
+        excludedWalletId: $scope.walletId
+      }
+    })
+      .then(function(newWallet) {
+        if (!newWallet || wallet && newWallet.id === wallet.id) return;
+        $scope.removeListeners();
+        $scope.loading = true;
+        wallet = newWallet;
+        console.debug("[transfer] Using wallet {" + wallet.id + "}");
+        $scope.formData = {};
+        return $scope.load();
+      });
+  };
+
+  /* -- popovers -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/wallet/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  $scope.showSharePopover = function(event) {
+    $scope.hideActionsPopover();
+
+    var title = $scope.formData.name || $scope.formData.uid || $scope.formData.pubkey;
+    // Use shareBasePath (fix #530) or rootPath (fix #390)
+    var url = (csConfig.shareBaseUrl || $rootScope.rootPath) + $state.href('app.wot_identity', {pubkey: $scope.formData.pubkey, uid: $scope.formData.uid});
+
+    // Override default position, is small screen - fix #545
+    if (UIUtils.screen.isSmall()) {
+      event = angular.element(document.querySelector('#wallet-share-anchor')) || event;
+    }
+
+    UIUtils.popover.share(event, {
+      bindings: {
+        url: url,
+        titleKey: 'WOT.VIEW.POPOVER_SHARE_TITLE',
+        titleValues: {title: title},
+        postMessage: title
+      }
+    });
+  };
+
+  $scope.showSelectWalletPopover = function(event) {
+
+    return csPopovers.showSelectWallet(event, {
+      parameters: {
+        excludedWalletId: $scope.walletId
+      }})
+      .then(function(newWallet) {
+        if (!newWallet || newWallet.id === $scope.walletId) return; // nothing changed
+        if (newWallet.isDefault()) {
+          return $state.go('app.view_wallet');
+        }
+        return $state.go('app.view_wallet_by_id', {id: newWallet.id});
+      });
+  };
+
+  // remove '?refresh' from the location URI
+  $scope.cleanLocationHref = function(state) {
+    if (state && state.stateParams && state.stateParams.refresh) {
+      $timeout(function() {
+        var stateParams = angular.copy(state.stateParams);
+        delete stateParams.refresh;
+        delete stateParams.id;
+        $location.search(stateParams).replace();
+      }, 300);
+    }
+  };
+}
+
+
+function WalletTxController($scope, $ionicPopover, $state, $timeout, $location,
+                            UIUtils, Modals, csPopovers, BMA, csHttp, csSettings, csCurrency, csWallet, csTx) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.settings = csSettings.data;
+  $scope.listeners = [];
+  $scope.qrcodeId = 'qrcode-wallet-tx-' + $scope.$id;
+
+  var wallet;
+
+  $scope.enter = function(e, state) {
+    $scope.loading = $scope.loading || (state.stateParams && state.stateParams.refresh);
+    $scope.enableSelectWallet = csWallet.children.count() > 0;
+    if ($scope.loading) {
+
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      $scope.walletId = wallet.id;
+
+      $scope.cleanLocationHref(state);
+
+      return $scope.load();
+    }
+    else {
+      $scope.addListeners();
+      // Make sure to display new pending (e.g. sending using another screen button)
+      $timeout($scope.updateView, 300);
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.leave = function() {
+    $scope.removeListeners();
+  };
+  $scope.$on('$ionicView.leave', $scope.leave);
+
+  $scope.load = function() {
+    if (!wallet) return $q.reject('Missing wallet');
+
+    var hasMinData = wallet.isDataLoaded({minData: true});
+    var options = {
+      requirements: !hasMinData, // load requirements (=minData) once
+      minData: !hasMinData,
+      sources: true,
+      tx: {
+        enable: true
+      }
+    };
+
+    return wallet.login(options)
+      .then(function(walletData) {
+        $scope.formData = walletData;
+        $scope.loading = false; // very important, to avoid TX to be display before wallet.currentUd is loaded
+        $scope.updateView();
+        $scope.addListeners();
+
+        $scope.showFab('fab-transfer');
+        $scope.showQRCode();
+        if (wallet.isDefault()) $scope.showHelpTip();
+
+        return UIUtils.loading.hide(10); // loading could have be open (e.g. during login phase)
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') {
+          $scope.showHome();
+          return;
+        }
+        console.error(err);
+        UIUtils.onError('ERROR.LOAD_WALLET_DATA_ERROR')(err);
+      });
+  };
+
+  // remove '?refresh' from the location URI
+  $scope.cleanLocationHref = function(state) {
+    if (state && state.stateParams && state.stateParams.refresh) {
+      $timeout(function() {
+        var stateParams = angular.copy(state.stateParams);
+        delete stateParams.refresh;
+        delete stateParams.id;
+        $location.search(stateParams).replace();
+      }, 300);
+    }
+  };
+
+  // Update view
+  $scope.updateView = function() {
+    if (!$scope.formData || $scope.loading) return;
+    $scope.$broadcast('$$rebind::balance'); // force rebind balance
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+    $scope.motion.show({selector: '.view-wallet-tx .item', ink: false});
+  };
+
+  $scope.downloadHistoryFile = function(options) {
+    options = options || {};
+    options.fromTime = options.fromTime || -1; // default: full history
+    var pubkey = $scope.formData.pubkey;
+    csTx.downloadHistoryFile(pubkey, options);
+  };
+
+  // Updating wallet data
+  $scope.doUpdate = function(silent) {
+    console.debug('[wallet] TX history reloading...');
+    var fromTime = $scope.formData &&  $scope.formData.tx && $scope.formData.tx.fromTime || undefined;
+    var options = {
+      sources: true,
+      tx:  {
+        enable: true,
+        fromTime: fromTime
+      },
+      api: false
+    };
+    return (silent ?
+        // If silent: just refresh
+        wallet.refreshData(options) :
+        // If not silent: show/hide loading indicator
+        UIUtils.loading.show()
+          .then(function() {
+            return wallet.refreshData(options);
+          })
+          .then(UIUtils.loading.hide)
+      )
+      .then($scope.updateView)
+      .catch(UIUtils.onError('ERROR.REFRESH_WALLET_DATA'));
+  };
+
+  $scope.showQRCode = function(timeout) {
+    if (!wallet || !$scope.qrcodeId) return; // Skip
+
+    // Get the DIV element
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId + ' .content'));
+    if (!element) {
+      console.error("[wallet-controller] Cannot found div #{0} for the QRCode. Skipping.".format($scope.qrcodeId));
+      return;
+    }
+
+    wallet.loadQrCode()
+      .then(function(svg) {
+        element.html(svg);
+        UIUtils.motion.toggleOn({selector: '#'+$scope.qrcodeId}, timeout || 1100);
+      });
+  };
+
+  $scope.hideQRCode = function() {
+    if (!$scope.qrcodeId) return;
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId));
+    if (element) {
+      UIUtils.motion.toggleOff({selector: '#'+$scope.qrcodeId});
+    }
+  };
+
+  /* -- add listeners -- */
+
+  $scope.addListeners = function() {
+    $scope.listeners = [
+      // Reload if wallet balanced changed
+      wallet.api.data.on.balanceChanged($scope, $scope.updateView),
+      // Reload if useRelative changed
+      $scope.$watch('settings.useRelative', $scope.updateView, true),
+      // Reload if showUDHistory changed
+      $scope.$watch('settings.showUDHistory', function(newVal, oldVal) {
+        if (!$scope.formData || $scope.loading || (newVal === oldVal)) return;
+        $scope.doUpdate();
+      }, true)
+    ];
+
+    // Listening new block (if auto refresh enable)
+    if ($scope.settings.walletHistoryAutoRefresh) {
+      $scope.listeners.push(
+        csCurrency.api.data.on.newBlock($scope, function(block) {
+          if ($scope.loading) return;
+          console.debug("[wallet] Received new block. Will reload history.");
+          $timeout(function() {
+            $scope.doUpdate(true);
+          }, 500/*waiting for block propagation*/);
+        })
+      );
+    }
+  };
+
+  $scope.removeListeners = function() {
+    _.forEach($scope.listeners, function(remove){
+      remove();
+    });
+    $scope.listeners = [];
+  };
+
+  /* -- popup / UI -- */
+
+  // Transfer
+  $scope.showTransferModal = function() {
+    var hasCredit = (!!$scope.formData.balance && $scope.formData.balance > 0);
+    if (!hasCredit && !csWallet.children.count()) {
+      UIUtils.alert.info('INFO.NOT_ENOUGH_CREDIT');
+      return;
+    }
+    return Modals.showTransfer({wallet: wallet.id})
+      .then(function(done){
+        if (done) {
+          UIUtils.toast.show('INFO.TRANSFER_SENT');
+          $scope.$broadcast('$$rebind::balance'); // force rebind balance
+          $scope.motion.show({selector: '.item-pending'});
+        }
+      });
+  };
+
+  $scope.showHelpTip = function(index, isTour) {
+    // TODO
+  };
+
+  $scope.showTxErrors = function(event) {
+    if (wallet.isDefault()) {
+      return $scope.goState('app.view_wallet_tx_errors');
+    }
+    return $scope.goState('app.view_wallet_tx_errors_by_id', {id: wallet.id});
+  };
+
+  $scope.showMoreTx = function(fromTime) {
+
+    fromTime = fromTime ||
+      ($scope.formData.tx.fromTime - csSettings.data.walletHistoryTimeSecond) ||
+      (csHttp.date.now() - 2 * csSettings.data.walletHistoryTimeSecond);
+
+    UIUtils.loading.show();
+    return wallet.refreshData({tx: {enable: true, fromTime: fromTime}})
+      .then(function() {
+        $scope.updateView();
+        UIUtils.loading.hide();
+      })
+      .catch(function(err) {
+        // If http rest limitation: wait then retry
+        if (err.ucode == BMA.errorCodes.HTTP_LIMITATION) {
+          $timeout(function() {
+            return $scope.showMoreTx(fromTime);
+          }, 2000);
+        }
+        else {
+          UIUtils.onError('ERROR.REFRESH_WALLET_DATA')(err);
+        }
+      });
+  };
+
+  $scope.showSelectWalletModal = function() {
+    if (!csWallet.children.count()) return;
+
+    return Modals.showSelectWallet({
+      parameters: {
+        showDefault: true,
+        showBalance: false,
+        excludedWalletId: $scope.walletId
+      }
+    })
+    .then(function(newWallet) {
+      if (!newWallet || wallet && newWallet.id === wallet.id) return;
+      $scope.removeListeners();
+      $scope.loading = true;
+      wallet = newWallet;
+      console.debug("[transfer] Using wallet {" + wallet.id + "}");
+      $scope.formData = {};
+      return $scope.load();
+    });
+  };
+
+  /* -- popover -- */
+
+  var paddingIndent = 10;
+
+  $scope.toUnlockUIArray = function(unlockTreeItem, leftPadding, operator) {
+    leftPadding = leftPadding || 0;
+
+    // If operator (AND, OR)
+    if (unlockTreeItem.children && (unlockTreeItem.type == 'AND' || unlockTreeItem.type == 'OR')) {
+      return unlockTreeItem.children.reduce(function(res, child, index){
+        if (child.children && index > 0) {
+          // Add space between expression block
+          res = res.concat({
+            style: {
+              'padding-left': leftPadding + 'px',
+              'padding-top': '10px',
+              'padding-bottom': '10px'
+            },
+            operator: unlockTreeItem.type
+          });
+
+          return res.concat($scope.toUnlockUIArray(child, leftPadding + paddingIndent));
+        }
+        return res.concat($scope.toUnlockUIArray(child, leftPadding + paddingIndent, index && unlockTreeItem.type));
+      }, []);
+    }
+
+    return {
+      style: {
+        'padding-left': leftPadding + 'px'
+      },
+      operator: operator,
+      type: unlockTreeItem.type,
+      value: unlockTreeItem.value
+    };
+  };
+
+  $scope.showLockedOutputsPopover = function(tx, event) {
+    if (!tx.lockedOutputs) return;
+
+    // Convert condition into UI array
+    $scope.popoverData = $scope.popoverData || {};
+    $scope.popoverData.lockedOuputs = tx.lockedOutputs.reduce(function(res, lockedOutput){
+      return res.concat({
+        amount: lockedOutput.amount,
+        unlockFunctions: lockedOutput.unlockFunctions,
+        unlockConditions: $scope.toUnlockUIArray(lockedOutput.unlockTree)
+      });
+    }, []);
+
+    // Open popover
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/wallet/tx_locked_outputs_popover.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideLockedOutputsPopover = function() {
+    if ($scope.lockedOutputsPopover) {
+      $scope.lockedOutputsPopover.hide();
+      if ($scope.popoverData) {
+        delete $scope.popoverData.unlockConditions;
+      }
+      $scope.lockedOutputsPopover = null;
+    }
+  };
+
+  $scope.showSelectWalletPopover = function(event) {
+    return csPopovers.showSelectWallet(event, {
+      scope: $scope
+    })
+      .then(function(newWallet) {
+        if (!newWallet || newWallet.id === wallet.id) return;
+        if (newWallet.isDefault()) {
+          return $scope.goState('app.view_wallet_tx');
+        }
+        return $scope.goState('app.view_wallet_tx_by_id', {id: newWallet.id});
+      });
+  };
+
+  $scope.goState = function(stateName, stateParams) {
+    $scope.hideLockedOutputsPopover();
+    return $state.go(stateName, stateParams);
+  };
+}
+
+function WalletTxErrorController($scope, UIUtils, csSettings, csWallet) {
+  'ngInject';
+
+  var wallet;
+  $scope.settings = csSettings.data;
+  $scope.loading = true;
+  $scope.formData = {};
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+
+    wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+    if (!wallet) {
+      UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+      return $scope.showHome();
+    }
+
+    return $scope.load();
+  });
+
+  $scope.load = function() {
+    if (!wallet) return;
+
+    return wallet.login()
+      .then(function(walletData) {
+        $scope.formData = walletData;
+        $scope.loading = false;
+        $scope.doMotion();
+        //$scope.showFab('fab-redo-transfer');
+        UIUtils.loading.hide();
+      });
+  };
+
+  // Updating wallet data
+  $scope.doUpdate = function(silent) {
+
+    $scope.loading = true;
+    return (silent ?
+        wallet.refreshData() :
+        UIUtils.loading.show()
+          .then(csWallet.refreshData)
+          .then(UIUtils.loading.hide)
+      )
+      .then(function() {
+        $scope.doMotion();
+        $scope.loading = false;
+      })
+      .catch(function(err) {
+        UIUtils.onError('ERROR.REFRESH_WALLET_DATA')(err);
+        $scope.loading = false;
+      });
+  };
+
+  $scope.filterReceivedTx = function(tx){
+    return tx.amount && tx.amount > 0;
+  };
+
+  $scope.filterSentTx = function(tx){
+    return tx.amount && tx.amount < 0;
+  };
+
+  $scope.hasReceivedTx = function(){
+    return $scope.formData.tx && _($scope.formData.tx.errors || []).find($scope.filterReceivedTx) && true;
+  };
+
+  $scope.hasSentTx = function(){
+    return $scope.formData.tx && _($scope.formData.tx.errors || []).find($scope.filterSentTx) && true;
+  };
+
+}
+
+function WalletSecurityModalController($scope, UIUtils, csWallet, $translate, parameters){
+
+  var wallet = parameters && parameters.wallet || csWallet;
+
+  $scope.slides = {
+    slider: null,
+    options: {
+      loop: false,
+      effect: 'slide',
+      speed: 500
+    }
+  };
+  $scope.isLastSlide = false;
+  $scope.smallscreen = UIUtils.screen.isSmall();
+
+  $scope.recover = {};
+  $scope.isValidFile = false;
+
+
+  $scope.login = wallet.isLogin();
+  $scope.hasSelf = wallet.hasSelf();
+  $scope.needSelf = $scope.login && wallet.data.requirements.needSelf;
+  $scope.canRevoke = $scope.login && $scope.hasSelf && !wallet.data.requirements.revoked;
+  $scope.needMembership = $scope.login && wallet.data.requirements.needMembership;
+  $scope.option = $scope.login ? 'saveID' : 'recoverID';
+
+  $scope.formData = {
+    addQuestion: '',
+    level: '4',
+    questions : []
+  };
+  var questions = [];
+  for (var i = 1; i<20; i++) {
+    questions.push('ACCOUNT.SECURITY.QUESTION_' + i.toString());
+  }
+  $translate(questions)
+    .then(function(translations){
+      _.each(translations, function(translation){
+        $scope.formData.questions.push({value: translation , checked: false});
+      });
+    });
+
+
+  $scope.slidePrev = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slidePrev();
+    $scope.slides.slider.lockSwipes();
+    $scope.isLastSlide = false;
+
+  };
+
+  $scope.slideNext = function() {
+    $scope.slides.slider.unlockSwipes();
+    $scope.slides.slider.slideNext();
+    $scope.slides.slider.lockSwipes();
+    $scope.isLastSlide = ($scope.slides.slider.activeIndex === 3 && ($scope.option == "saveID" || $scope.option == "recoverID")) || ($scope.slides.slider.activeIndex === 2 && $scope.option == "revocation");
+  };
+
+
+  $scope.doNext = function(formName) {
+    if (!formName) {
+      switch ($scope.slides.slider.activeIndex) {
+        case 1:
+          switch ($scope.option) {
+            case "saveID":
+              formName = "questionsForm";
+              break;
+            case "recoverID":
+              if ($scope.isValidFile) {
+                $scope.slideNext();
+                $scope.hasContent = false;
+                $scope.fileData = '';
+
+              }
+              else {
+                UIUtils.alert.error("ERROR.NOT_VALID_SAVE_ID_FILE", "ERROR.LOAD_FILE_FAILED");
+              }
+              break;
+          }
+          break;
+
+        case 2:
+          switch ($scope.option) {
+            case "recoverID":
+              formName = "recoverForm";
+              break;
+            case "saveID":
+              formName = "answersForm";
+              break;
+          }
+      }
+    }
+
+    if (formName) {
+      $scope[formName].$submitted = true;
+      if (!$scope[formName].$valid) {
+        return;
+      }
+      switch (formName) {
+        case "recoverForm":
+          $scope.recoverId();
+          break;
+        case "answersForm":
+          $scope.downloadSaveIDFile();
+          break;
+        default:
+          $scope.slideNext();
+      }
+    }
+  };
+
+  $scope.selectOption = function(option){
+    $scope.option = option;
+    $scope.slideNext();
+  };
+
+  $scope.restore = function(){
+    if ($scope.slides.slider.activeIndex === 1 && $scope.option === 'saveID') {
+      $scope.formData = {
+        addQuestion: '',
+        level: '4',
+        questions: []
+      };
+      $translate(questions)
+        .then(function (translations) {
+          _.each(translations, function (translation) {
+            $scope.formData.questions.push({value: translation, checked: false});
+          });
+        });
+    }
+
+    else if ($scope.slides.slider.activeIndex === 2 && $scope.option === 'saveID') {
+      _.each($scope.formData.questions, function(question){
+        question.answer = undefined;
+      });
+    }
+
+    else if ($scope.slides.slider.activeIndex === 1 && $scope.option === 'recoverID'){
+      $scope.hasContent = false;
+      $scope.recover = {};
+      $scope.fileData =  '';
+      $scope.isValidFile = false;
+    }
+
+    else if ($scope.slides.slider.activeIndex === 2 && $scope.option === 'recoverID'){
+      _.each($scope.recover.questions, function(element){
+        element.answer = undefined;
+      });
+    }
+
+    else if ($scope.slides.slider.activeIndex === 2 && $scope.option === 'revocation'){
+      $scope.isValidFile = false;
+      $scope.hasContent = false;
+      $scope.revocation = undefined;
+    }
+  };
+
+  /**
+   * Set the file content
+   */
+  $scope.onFileChanged = function(file) {
+    $scope.hasContent = angular.isDefined(file) && file !== '';
+    $scope.fileData = file.fileData ? file.fileData : '';
+    $scope.isValidFile = $scope.fileData !== '' && $scope.fileData.type === 'text/plain';
+
+    if ($scope.isValidFile && $scope.option === 'recoverID') {
+      $scope.content = file.fileContent.split('\n');
+      var indexOfQuestions = _.indexOf($scope.content, 'Questions: ');
+      var LastIndexQuestions = -1;
+      _.each($scope.content, function (element, index) {
+        if (/^Issuer:/.test(element)) {
+          LastIndexQuestions = index;
+        }
+        else if (/^Crypted-Nonce:/.test(element)) {
+          $scope.recover.cypherNonce = element.split(' ')[1];
+        }
+        else if (/^Crypted-Pubkey:/.test(element)) {
+          $scope.recover.cypherPubkey = element.split(' ')[1];
+        }
+        else if (/^Crypted-Salt:/.test(element)) {
+          $scope.recover.cypherSalt = element.split(' ')[1];
+        }
+        else if (/^Crypted-Pwd:/.test(element)) {
+          $scope.recover.cypherPwd = element.split(' ')[1];
+        }
+      });
+      $scope.recover.questions = [];
+      for (var i = indexOfQuestions + 1; i < LastIndexQuestions; i++) {
+        $scope.recover.questions.push({value: $scope.content[i]});
+      }
+    }
+    else if ($scope.isValidFile && $scope.option === "revocation"){
+      $scope.revocation = file.fileContent;
+    }
+  };
+
+  $scope.recoverId = function(){
+    if(!$scope.recoverForm.$valid){
+      return;
+    }
+
+    $scope.recover.answer = '';
+    _.each($scope.recover.questions, function(element){
+      $scope.recover.answer += element.answer;
+    });
+
+    return wallet.recoverId($scope.recover)
+      .then(function (recover){
+        if (angular.isDefined(recover)) {
+          $scope.recover = recover;
+          $scope.slideNext();
+        }
+        else {
+          UIUtils.alert.error('ERROR.RECOVER_ID_FAILED');
+        }
+      })
+      .catch(UIUtils.onError('ERROR.RECOVER_ID_FAILED'));
+
+  };
+
+  /**
+   * Save Id
+   */
+  $scope.addQuestion = function(){
+    if ($scope.formData.addQuestion !== '') {
+      $scope.formData.questions.push({value: $scope.formData.addQuestion, checked: true});
+      $scope.formData.addQuestion = '';
+    }
+  };
+
+  $scope.downloadSaveIDFile = function(){
+    // Force user re-auth
+    var loginData;
+    return wallet.auth({
+        forceAuth: true,
+        expectedPubkey: $scope.pubkey,
+        silent: true,
+        success: function(values) {
+          loginData = values;
+        }
+      })
+      .catch(function(err) {
+        if (err && err === 'CANCELLED') return;
+        UIUtils.alert.error('ERROR.SALT_OR_PASSWORD_NOT_CONFIRMED', 'ERROR.LOGIN_FAILED');
+        return;
+      })
+      .then(function(res) {
+        if (!res) return;
+        var file = {
+          file: _.filter($scope.formData.questions, function (question) {
+            return question.checked;
+          })
+        };
+        var record = {
+          salt: loginData.username,
+          pwd: loginData.password,
+          questions: '',
+          answer: ''
+        };
+        _.each(file.file, function (question) {
+          record.questions += question.value + '\n';
+          record.answer += question.answer;
+        });
+
+        return wallet.getCryptedId(record)
+          .then(function(record){
+            wallet.downloadSaveId(record);
+            $scope.closeModal();
+          });
+      })
+      ;
+  };
+
+  $scope.isRequired = function(){
+    var questionChecked = _.filter($scope.formData.questions, function(question) {
+      return question.checked;
+    });
+    return questionChecked.length < $scope.formData.level;
+  };
+
+  $scope.revokeWithFile = function(){
+    if ($scope.isValidFile) {
+        $scope.revokeIdentity();
+      }
+      else {
+        UIUtils.alert.error("ERROR.NOT_VALID_REVOCATION_FILE", "ERROR.LOAD_FILE_FAILED");
+      }
+  };
+
+  /**
+   * Download revocation file
+   */
+  $scope.downloadRevokeFile = function () {
+    // Force re-authentication
+    return wallet.auth({forceAuth: true})
+
+      // Download file
+      .then(function() {
+        return wallet.downloadRevocation();
+      })
+
+      .then(function() {
+        UIUtils.loading.hide();
+      })
+
+      .catch(function(err){
+        if (err && err === 'CANCELLED') return;
+        UIUtils.onError('ERROR.DOWNLOAD_REVOCATION_FAILED')(err);
+      })
+      ;
+
+  };
+
+  /**
+   * Revoke wallet identity
+   */
+  $scope.revokeWalletIdentity = function () {
+    if (!$scope.hasSelf) {
+      return UIUtils.alert.error("ERROR.ONLY_SELF_CAN_EXECUTE_THIS_ACTION");
+    }
+
+    // Make sure user re-auth
+    return wallet.auth({forceAuth: true})
+      .then(function(confirm) {
+        UIUtils.loading.hide();
+        if (!confirm) return;
+        return $scope.revokeIdentity();
+      })
+      .catch(function (err) {
+        if (err === 'CANCELLED') return;
+        UIUtils.onError('ERROR.REVOCATION_FAILED')(err);
+      });
+  };
+
+  /**
+   * Revoke identity
+   */
+  $scope.revokeIdentity = function (confirm) {
+
+    // Make sure user re-auth + confirm
+    if (!confirm) {
+        return UIUtils.alert.confirm("CONFIRM.REVOKE_IDENTITY", 'CONFIRM.POPUP_WARNING_TITLE', {
+          cssClass: 'warning',
+          okText: 'COMMON.BTN_YES',
+          okType: 'button-assertive'
+        })
+        .then(function (confirm) {
+          if (!confirm) return;
+          return UIUtils.alert.confirm("CONFIRM.REVOKE_IDENTITY_2", 'CONFIRM.POPUP_TITLE', {
+            cssClass: 'warning',
+            okText: 'COMMON.BTN_YES',
+            okType: 'button-assertive'
+          });
+        })
+        .then(function (confirm) {
+          if (confirm) $scope.revokeIdentity(true, true); // loop with confirmation
+        });
+    }
+
+    return UIUtils.loading.show()
+      .then(function () {
+        if (!$scope.revocation){
+          return wallet.revoke();
+        }
+        else {
+          return wallet.revokeWithFile($scope.revocation);
+        }
+      })
+      .then(function () {
+        UIUtils.toast.show("INFO.REVOCATION_SENT");
+        $scope.closeModal();
+        return UIUtils.loading.hide();
+      })
+      .catch(function(err) {
+        if ($scope.revocation){
+          $scope.isValidFile = false;
+          $scope.revocationError = err && err.message || err || 'ERROR.REVOCATION_FAILED';
+          UIUtils.loading.hide(10);
+        }
+        else {
+          UIUtils.onError('ERROR.REVOCATION_FAILED')(err);
+        }
+      });
+  };
+
+
+  /**
+   * Ask self (= send identity)
+   */
+  $scope.self = function () {
+    return $scope.closeModal('self');
+  };
+
+  /**
+   * Ask membership in
+   */
+  $scope.membershipIn = function () {
+    return $scope.closeModal('membershipIn');
+  };
+
+  /**
+   * Generate keyfile
+   */
+  $scope.downloadKeyFile = function (format) {
+    // Force re-authentication
+    return wallet.auth({forceAuth: true})
+
+    // Download file
+      .then(function() {
+        return wallet.downloadKeyFile(format);
+      })
+
+      .then(function() {
+        UIUtils.loading.hide();
+        return $scope.closeModal();
+      })
+
+      .catch(function(err){
+        if (err && err === 'CANCELLED') {
+          UIUtils.loading.hide();
+          return;
+        }
+        UIUtils.onError('ERROR.DOWNLOAD_KEYFILE_FAILED')(err);
+      })
+      ;
+  };
+}
+
+
+WalletListAbstractController.$inject = ['$scope', '$q', '$timeout', 'UIUtils', 'filterTranslations', 'csSettings', 'csCurrency', 'csWallet'];
+WalletListViewController.$inject = ['$scope', '$controller', '$state', '$timeout', '$q', '$translate', '$ionicPopover', '$ionicPopup', 'ModalUtils', 'UIUtils', 'Modals', 'csCurrency', 'csSettings', 'csWallet'];
+WalletSelectModalController.$inject = ['$scope', '$controller', 'parameters'];
+WalletListImportModalController.$inject = ['$scope', '$timeout', 'BMA', 'csWallet'];
+WalletSelectPopoverController.$inject = ['$scope', '$controller', 'UIUtils', 'parameters'];angular.module('cesium.wallets.controllers', ['cesium.services', 'cesium.currency.controllers'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+    $stateProvider
+
+      .state('app.view_wallets', {
+        url: "/wallets",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/list/view_wallets.html",
+            controller: 'WalletListViewCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+
+      .state('app.view_wallet_by_id', {
+        url: "/wallets/:id?refresh",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet.html",
+            controller: 'WalletCtrl'
+          }
+        },
+        data: {
+          login: true,
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.view_wallet_tx_by_id', {
+        url: "/history/wallets/:id?refresh",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet_tx.html",
+            controller: 'WalletTxCtrl'
+          }
+        },
+        data: {
+          login: true,
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.view_wallet_tx_errors_by_id', {
+        url: "/history/wallets/:id/errors",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/view_wallet_tx_error.html",
+            controller: 'WalletTxErrorCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+    ;
+  }])
+  .controller('WalletListAbstractCtrl', WalletListAbstractController)
+
+  .controller('WalletListViewCtrl', WalletListViewController)
+
+  .controller('WalletSelectModalCtrl', WalletSelectModalController)
+
+  .controller('WalletListImportModalCtrl', WalletListImportModalController)
+
+  .controller('WalletSelectPopoverCtrl', WalletSelectPopoverController)
+;
+
+
+function WalletListAbstractController($scope, $q, $timeout, UIUtils, filterTranslations, csSettings, csCurrency, csWallet) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.wallets = null;
+  $scope.formData = {
+    useRelative: csSettings.data.useRelative,
+    showDefault: true,
+    showBalance: false,
+    balance: undefined,
+    updatingWalletId: undefined,
+    stopped: false,
+    minData: true
+  };
+  $scope.motion = null; // no animation
+
+  $scope.setParameters = function(parameters) {
+    parameters = parameters || {};
+
+    $scope.formData.useRelative = angular.isDefined(parameters.useRelative) ? parameters.useRelative : $scope.formData.useRelative;
+    $scope.formData.showBalance = angular.isDefined(parameters.showBalance) ? parameters.showBalance : $scope.formData.showBalance;
+    $scope.formData.minData = angular.isDefined(parameters.minData) ? parameters.minData : $scope.formData.minData;
+    $scope.formData.excludedWalletId = parameters.excludedWalletId;
+    $scope.formData.showDefault = (angular.isDefined(parameters.showDefault) ? parameters.showDefault : $scope.formData.showDefault) &&
+       ($scope.formData.excludedWalletId !== 'default');
+
+  };
+
+  $scope.load = function(options) {
+
+    options = options || {};
+    $scope.loading = (options.silent !== false);
+    $scope.formData.balance = undefined;
+    $scope.formData.updatingWalletId = undefined;
+    $scope.formData.stopped = false;
+
+    // Load currency, and filter translations (need by 'formatAmount' filter)
+    var jobs = [];
+
+    jobs.push(csCurrency.name()
+      .then(function(currency) {
+        $scope.currency = currency;
+        return filterTranslations.ready();
+      }));
+
+    // Get children wallets
+    $scope.defaultWallet = $scope.formData.showDefault ? csWallet : undefined;
+    if (!$scope.wallets) {
+      jobs.push(
+        csWallet.children.all()
+          .then(function(children) {
+            $scope.wallets=children;
+            UIUtils.loading.hide();
+          })
+      );
+    }
+
+    // Prepare load options
+    var walletLoadOptions = {
+      silent: true,
+      minData: $scope.formData.minData,
+      sources: $scope.formData.showBalance,
+      tx: {
+        enable: false
+      },
+      api: true
+    };
+    var hasLoadError = false;
+    var loadCounter = 0;
+    var now = Date.now();
+    var balance = 0;
+    return (jobs.length ? $q.all(jobs) : $q.when())
+      // Load wallet data (apply a timeout between each wallet)
+      .then(function() {
+        var wallets = $scope.formData.showDefault ? [csWallet].concat($scope.wallets) : $scope.wallets;
+        if (!wallets.length) return;
+        console.debug("[wallets] Loading {0} wallets...".format(wallets.length));
+        return wallets.reduce(function(res, wallet) {
+            var skip= !options.refresh && wallet.isDataLoaded(walletLoadOptions);
+            if (skip) {
+              console.debug("[wallets] Wallet #{0} already loaded. Skipping".format(wallet.id));
+              return res.then(function(){
+                balance += wallet.data.balance;
+                $scope.updateWalletView(wallet.id);
+              });
+            }
+            loadCounter++;
+            return res.then(function() {
+              if ($scope.formData.stopped) return; // skip if stopped
+              // Loading next wallet, after waiting some time
+                $scope.formData.updatingWalletId = wallet.id;
+                var loadPromise;
+                if (options.refresh && wallet.data.loaded) {
+                  var refreshOptions = angular.merge({
+                    // Refresh requirements if member account
+                    requirements: (!wallet.data.requirements.loaded || wallet.data.requirements.isMember || wallet.data.requirements.wasMember || wallet.data.requirements.pendingMembership)
+                  }, walletLoadOptions);
+                  loadPromise = wallet.refreshData(refreshOptions);
+                }
+                else {
+                  loadPromise = wallet.loadData(walletLoadOptions);
+                }
+
+                loadPromise.then(function(walletData) {
+                  balance += walletData.balance;
+                  $scope.updateWalletView(wallet.id);
+                })
+                .catch(function(err) {
+                  console.error("[wallets] Error while loading data of wallet #{0}".format(wallet.id), err);
+                  hasLoadError = true;
+                });
+                return loadPromise;
+            });
+          }, $q.when());
+      })
+      .then(function() {
+        if (hasLoadError) {
+          return UIUtils.alert.error('ERROR.LOAD_WALLET_LIST_FAILED')
+            .then(function() {
+              $scope.resetData();
+              $scope.cancel();
+            });
+        }
+        // Stop
+        if ($scope.formData.stopped) return;
+        if (loadCounter) {
+          console.debug("[wallets] Loaded data of {0} wallet(s) in {1}ms".format(loadCounter, (Date.now() - now)));
+        }
+        $scope.formData.balance = balance;
+        $scope.formData.updatingWalletId = undefined;
+        $scope.loading = false;
+        UIUtils.loading.hide();
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.resetData();
+        if (err && err === 'CANCELLED') {
+          $scope.cancel();
+          throw err;
+        }
+        return UIUtils.onError('ERROR.LOAD_WALLET_LIST_FAILED')(err);
+      });
+  };
+
+  $scope.filterFn = function(parameters) {
+    return function(wallet) {
+      return !parameters || wallet.id !== parameters.excludedWalletId;
+    };
+  };
+
+
+  // Clean controller data
+  $scope.resetData = function() {
+    console.debug("[wallets] Cleaning wallet list");
+    $scope.wallets = null;
+    $scope.loading = true;
+    $scope.entered = false;
+    $scope.formData.balance = undefined;
+    $scope.formData.updatingWalletId = undefined;
+  };
+
+  $scope.updateView = function(walletId) {
+    if (!$scope.wallets || !$scope.wallets.length) return;
+
+    var selectorSuffix = walletId && (' #wallet-' + walletId) || '';
+
+    if ($scope.motion) {
+      $scope.motion.show({selector: '.list .item.item-wallet' + selectorSuffix, ink: true});
+    }
+    else {
+      UIUtils.ink({selector: '.list .item.item-wallet' + selectorSuffix});
+    }
+  };
+
+  $scope.updateWalletView = function(walletId) {
+    if ($scope.motion) {
+      $scope.motion.show({selector: '.list #wallet-' + walletId, ink: true});
+    }
+    else {
+      UIUtils.ink({selector: '.list #wallet-' + walletId});
+    }
+  };
+
+  $scope.doUpdate = function(silent) {
+    if ($scope.loading || !$scope.wallets || !$scope.wallets.length || $scope.formData.updatingWalletId) return $q.when();
+
+    $scope.selectPrevented = true;
+    $timeout(function() {
+      $scope.selectPrevented = false;
+    }, 1000);
+
+    return $scope.load({silent: silent, refresh: true})
+      .then(function() {
+        $scope.loading = false;
+        $scope.selectPrevented = false;
+        if (silent) {
+          $scope.$broadcast('$$rebind::rebind'); // force rebind
+        }
+        $scope.updateView();
+      });
+  };
+
+  $scope.addNewWallet = function(wallet) {
+
+    if (!wallet) return $q.reject("Missing 'wallet' argument");
+
+    // Make sure auth on the main wallet
+    if (csSettings.data.useLocalStorageEncryption && !csWallet.isAuth()) {
+      return csWallet.auth({minData: true})
+        .then(function() {
+          return $scope.addNewWallet(wallet); // loop
+        })
+        .catch(function(err) {
+          if (err === 'CANCELLED') {
+            return UIUtils.loading.hide();
+          }
+          UIUtils.onError('ERROR.ADD_SECONDARY_WALLET_FAILED')(err);
+        });
+    }
+
+    // Call API extension on child wallet
+    return csWallet.api.data.raisePromise.load(wallet.data)
+      // continue, when plugins extension failed (just log in console)
+      .catch(console.error)
+      .then(function() {
+        $scope.addListenersOnWallet(wallet);
+        csWallet.children.add(wallet);
+      });
+  };
+
+  /* -- modals -- */
+
+  $scope.showNewWalletModal = function() {
+
+    var wallet = csWallet.children.instance();
+    return wallet.login({
+      showNewAccountLink: false,
+      title: 'ACCOUNT.WALLET_LIST.BTN_NEW',
+      okText: 'COMMON.BTN_ADD',
+      // Load data options :
+      minData: true,
+      sources: true,
+      api: false,
+      success: UIUtils.loading.show,
+      method: 'PUBKEY' // Default method - fix #767
+    })
+      .then(function(walletData) {
+        if (!walletData || !walletData.pubkey) { // User cancelled
+          UIUtils.loading.hide(100);
+          return;
+        }
+
+        // Avoid to add main wallet again
+        if (csWallet.isUserPubkey(walletData.pubkey)) {
+          UIUtils.loading.hide();
+          UIUtils.alert.error('ERROR.COULD_NOT_ADD_MAIN_WALLET');
+          return;
+        }
+
+        // Avoid to add exists wallet again
+        if (csWallet.children.hasPubkey(walletData.pubkey)) {
+          UIUtils.loading.hide();
+          UIUtils.alert.error('ERROR.COULD_NOT_ADD_EXISTING_WALLET');
+          return;
+        }
+
+        console.debug("[wallet] Adding secondary wallet {{0}}".format(walletData.pubkey.substring(0,8)));
+
+        // Add the child wallet
+        return $scope.addNewWallet(wallet)
+          .then(function() {
+            UIUtils.loading.hide();
+            $scope.updateView();
+          });
+      })
+      .catch(function(err) {
+        if (err === 'CANCELLED') {
+          // Silent
+          UIUtils.loading.hide();
+        }
+      });
+  };
+
+  /* -- Method to override by subclasses-- */
+
+  $scope.addListenersOnWallet = function(wallet) {
+    // Can be override by subclass
+  };
+
+  $scope.cancel = function() {
+    console.warn("cancel() must be implement by subclass");
+  };
+
+  $scope.select = function(event, wallet) {
+    console.warn("select() must be implement by subclass");
+  };
+}
+
+function WalletSelectModalController($scope, $controller, parameters) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WalletListAbstractCtrl', {$scope: $scope}));
+
+  $scope.$on('modal.shown', function() {
+    $scope.setParameters(parameters);
+    $scope.load();
+  });
+
+  $scope.cancel = function() {
+    $scope.closeModal();
+  };
+
+  $scope.select = function(event, wallet) {
+    if (event.isDefaultPrevented() || !wallet || $scope.selectPrevented) return;
+    $scope.closeModal(wallet);
+  };
+
+  // Default actions
+  if (parameters) {
+    $scope.setParameters(parameters);
+  }
+}
+
+function WalletListViewController($scope, $controller, $state, $timeout, $q, $translate, $ionicPopover, $ionicPopup,
+                              ModalUtils, UIUtils, Modals, csCurrency, csSettings, csWallet){
+  'ngInject';
+
+  $scope.settings = csSettings.data;
+  $scope.listeners = [];
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WalletListAbstractCtrl', {$scope: $scope, parameters: {}}));
+
+  // Override defaults
+  $scope.formData.name = undefined;
+  $scope.motion = UIUtils.motion.default;
+  $scope.entered = false;
+
+  $scope.enter = function(e, state) {
+    // First enter
+    if (!$scope.entered) {
+      $scope.entered = true;
+      $scope.setParameters({
+        showDefault: true,
+        showBalance: true,
+        minData: false
+      });
+
+      return $scope.load()
+        .then(function() {
+          UIUtils.loading.hide();
+          if (!$scope.wallets) return; // user cancel, or error
+          $scope.addListeners();
+          $scope.showFab('fab-add-wallet');
+        });
+    }
+    // If already enter
+    else {
+      // Re-add listeners
+      $scope.addListeners();
+      if ($scope.formData.stopped) {
+        $scope.loading = false;
+        $scope.formData.stopped = false;
+        $scope.formData.updatingWalletId = undefined;
+        $scope.updateView();
+      }
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.leave = function() {
+    $scope.formData.stopped = true;
+    $scope.formData.updatingWalletId = undefined;
+    $scope.loading = false;
+    $scope.removeListeners();
+  };
+  $scope.$on('$ionicView.leave', $scope.leave);
+
+  $scope.cancel = function() {
+    $scope.showHome();
+  };
+
+  $scope.select = function(event, wallet) {
+    if (event.isDefaultPrevented() || !wallet || $scope.selectPrevented) return;
+    if (wallet.isDefault()) {
+      $state.go('app.view_wallet');
+    }
+    else {
+      $state.go('app.view_wallet_by_id', {id: wallet.id});
+    }
+    event.preventDefault();
+  };
+
+  $scope.editWallet = function(event, wallet) {
+
+    event.preventDefault();
+
+    return $scope.showEditPopup(wallet)
+      .then(function(newName) {
+        if (!newName) return;
+
+        // Auth (if encryption is need)
+        return (csSettings.data.useLocalStorageEncryption ? csWallet.auth({minData: true}) : $q.when())
+
+          // Save changes
+          .then(function() {
+            wallet.data.localName = newName;
+            csWallet.storeData();
+            UIUtils.loading.hide();
+            $scope.updateView();
+          })
+          .catch(function(err) {
+            if (err === 'CANCELLED') {
+              return UIUtils.loading.hide();
+            }
+            UIUtils.onError('ERROR.SAVE_WALLET_LIST_FAILED')(err);
+          });
+      });
+  };
+
+  $scope.downloadAsFile = function() {
+    if (!$scope.wallets) return; // user cancel
+    return csWallet.children.downloadFile();
+  };
+
+
+
+  $scope.selectAndRemoveWallet = function() {
+    $scope.hideActionsPopover();
+    return Modals.showSelectWallet({
+      wallets: $scope.wallets,
+      showDefault: false
+    })
+      .then(function(wallet) {
+        if (!wallet || !wallet.id) return;
+
+        // Auth (if encryption is need))
+        return (csSettings.data.useLocalStorageEncryption ? csWallet.auth({minData: true}) : $q.when())
+
+          // Remove the wallet
+          .then(function() {
+            csWallet.children.remove(wallet.id);
+            UIUtils.loading.hide();
+            $scope.updateView();
+          })
+          .catch(function(err) {
+            if (err === 'CANCELLED') {
+              return UIUtils.loading.hide();
+            }
+            UIUtils.onError('ERROR.ADD_SECONDARY_WALLET_FAILED')(err);
+          });
+      });
+  };
+
+  $scope.showImportFileModal = function() {
+    $scope.hideActionsPopover();
+
+    var loginAndAddWallet = function(authData) {
+      if (!authData || !authData.pubkey) return $q.reject('Invalid authentication data');
+      console.debug("[wallet] Adding secondary wallet {"+authData.pubkey.substring(0,8)+"}");
+      var wallet = csWallet.children.instance();
+      return wallet.login({
+        authData: authData,
+        // Load data options :
+        minData: true,
+        sources: true,
+        api: false,
+        success: UIUtils.loading.show
+      })
+        .then(function(walletData) {
+          walletData.localName = authData.localName;
+          return $scope.addNewWallet(wallet);
+        });
+    };
+
+    return ModalUtils.show(
+      'templates/wallet/list/modal_import_file.html',
+      'WalletListImportModalCtrl'
+    )
+      .then(function(items){
+        if (!items || !items.length) return; // User cancel
+
+        UIUtils.loading.show();
+
+        // Auth (if encryption is need)
+        return (csSettings.data.useLocalStorageEncryption ? csWallet.auth({minData: true}) : $q.when())
+          .then(function() {
+            // Add wallet one after one
+            return items.reduce(function(promise, authData){
+              return promise.then(function() {
+                return loginAndAddWallet(authData);
+              });
+            }, $q.when());
+          })
+          .then(function() {
+            UIUtils.loading.hide();
+            $scope.updateView();
+          })
+          .catch(function(err) {
+            if (err === 'CANCELLED') {
+              return UIUtils.loading.hide();
+            }
+            UIUtils.onError('ERROR.ADD_SECONDARY_WALLET_FAILED')(err);
+          });
+      });
+  };
+
+  /* -- popups -- */
+
+  $scope.setEditForm = function(editForm) {
+    $scope.editForm = editForm;
+  };
+
+  $scope.showEditPopup = function(wallet) {
+    return $q(function(resolve, reject) {
+      $translate(['ACCOUNT.WALLET_LIST.EDIT_POPOVER.TITLE', 'ACCOUNT.WALLET_LIST.EDIT_POPOVER.HELP', 'COMMON.BTN_OK', 'COMMON.BTN_CANCEL'])
+        .then(function (translations) {
+          $scope.formData.name = wallet.data.localName || wallet.data.name || wallet.data.uid || (wallet.data.pubkey && wallet.data.pubkey.substring(0, 8)) || '';
+
+          // Choose UID popup
+          $ionicPopup.show({
+            templateUrl: 'templates/wallet/list/popup_edit_name.html',
+            title: translations['ACCOUNT.WALLET_LIST.EDIT_POPOVER.TITLE'],
+            subTitle: translations['ACCOUNT.WALLET_LIST.EDIT_POPOVER.HELP'],
+            scope: $scope,
+            buttons: [
+              { text: translations['COMMON.BTN_CANCEL'] },
+              {
+                text: translations['COMMON.BTN_OK'],
+                type: 'button-positive',
+                onTap: function(e) {
+                  $scope.editForm.$submitted=true;
+                  if(!$scope.editForm.$valid || !$scope.formData.name) {
+                    //don't allow the user to close unless he enters a name
+                    e.preventDefault();
+                  } else {
+                    return $scope.formData.name;
+                  }
+                }
+              }
+            ]
+          })
+            .then(function(name) {
+              if (!name) { // user cancel
+                delete $scope.formData.name;
+                UIUtils.loading.hide();
+                return;
+              }
+              resolve(name);
+            });
+        });
+    });
+  };
+
+  /* -- popovers -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/wallet/list/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- listeners -- */
+
+  // Clean controller data when logout
+  $scope.onWalletLogout = function() {
+    $scope.resetData();
+    $scope.removeListeners();
+  };
+
+  $scope.addListeners = function() {
+
+    // First remove lod listeners, if any
+    $scope.removeListeners();
+
+    $scope.listeners = [
+      csWallet.api.data.on.logout($scope, $scope.onWalletLogout)
+    ];
+
+    // Auto-update on new block
+    if (csSettings.data.walletHistoryAutoRefresh) {
+      $scope.listeners.push(
+        csCurrency.api.data.on.newBlock($scope, function (block) {
+          if ($scope.loading) return;
+          console.debug("[wallet-list] Received new block. Will reload list.");
+          $timeout(function () {
+            $scope.doUpdate(true);
+          }, 300/*waiting for node cache propagation*/);
+        }));
+    }
+
+    // Listen auth events on each wallet
+    _.forEach($scope.wallets||[], $scope.addListenersOnWallet);
+  };
+
+  $scope.addListenersOnWallet = function(wallet) {
+    if (!wallet) return;
+    $scope.listeners.push(wallet.api.data.on.unauth($scope, $scope.updateView));
+    $scope.listeners.push(wallet.api.data.on.auth($scope, function (data, deferred) {
+      $timeout($scope.updateView);
+      return deferred ? deferred.resolve() : $q.when();
+    }));
+  };
+
+  $scope.removeListeners = function() {
+    _.forEach($scope.listeners, function(remove){
+      remove();
+    });
+    $scope.listeners = [];
+  };
+
+  var inheritedUpdateView = $scope.updateView;
+  $scope.updateView = function() {
+    inheritedUpdateView();
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+  };
+
+  var inheritedUpdateWalletView = $scope.updateWalletView;
+  $scope.updateWalletView = function(walletId) {
+    inheritedUpdateWalletView(walletId);
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+  };
+
+  // Detect changes in settings useRelative
+  $scope.$watch('settings.useRelative', function(newVal, oldVal) {
+    if (!$scope.formData || $scope.loading || (newVal === oldVal)) return;
+    $scope.formData.useRelative = csSettings.data.useRelative;
+    $scope.updateView();
+  }, true);
+}
+
+
+function WalletSelectPopoverController($scope, $controller, UIUtils, parameters) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WalletListAbstractCtrl', {$scope: $scope}));
+
+  // Disable list motion
+  $scope.motion = null;
+
+  $scope.$on('popover.shown', function() {
+    if ($scope.loading) {
+      $scope.setParameters(parameters);
+      $scope.load();
+    }
+  });
+
+  $scope.updateView = function() {
+    if (!$scope.wallets || !$scope.wallets.length) return;
+
+    UIUtils.ink({selector: '.popover-wallets .list .item'});
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+  };
+
+  $scope.select = function(event, wallet) {
+    if (event.isDefaultPrevented() || !wallet || $scope.selectPrevented) return; // no selection
+    $scope.closePopover(wallet);
+  };
+
+}
+
+function WalletListImportModalController($scope, $timeout, BMA, csWallet) {
+  'ngInject';
+
+  $scope.hasContent = false;
+  $scope.content = null;
+  $scope.fileData =  '';
+  $scope.isValidFile = false;
+  $scope.validatingFile = false;
+
+  $scope.onFileChanged = function(file) {
+    console.log(file);
+    $scope.validatingFile = true;
+
+    $scope.hasContent = angular.isDefined(file) && file !== '';
+    $scope.fileData = file.fileData ? file.fileData : '';
+    var isValidFile = $scope.fileData !== '' &&
+      ($scope.fileData.type == 'text/csv' || $scope.fileData.type == 'text/plain' || 'application/vnd.ms-excel' /*fix issue #810*/);
+
+    // Bad file type: invalid file
+    if (!isValidFile) {
+      console.error("[wallet] Import failed. Invalid file type: " + $scope.fileData.type);
+      $scope.isValidFile = false;
+      $scope.validatingFile = false;
+      return;
+    }
+
+    // Parse file
+    console.debug("[wallet] Parsing file to import...");
+    var rows = file.fileContent.split('\n');
+    $scope.content = rows.reduce(function(res, row) {
+      // Skip empty row
+      if (!row || !row.trim().length) return res;
+
+      // Split
+      var cols = row.split('\t', 3) || undefined;
+
+      // Invalid column count: mark file as invalid
+      if (cols && cols.length != 3) {
+        console.debug("[wallet] Import: skip invalid row: " + row);
+        isValidFile = false;
+        return res;
+      }
+
+      var item = {
+        pubkey: cols[0],
+        uid: cols[1],
+        localName: cols[2]
+      };
+
+      // Check pubkey validity
+      if (!BMA.regexp.PUBKEY.test(item.pubkey)) {
+        console.debug("[wallet] Invalid pubkey, found in this row: ", row);
+        isValidFile = false;
+        return res;
+      }
+
+      // Ignore if same as current wallet
+      if (csWallet.isUserPubkey(item.pubkey)) {
+        console.debug("[wallet] Pubkey equals to main wallet. Skip this row: ", row);
+        return res;
+      }
+
+      // Ignore if already in children wallet
+      if (csWallet.children.hasPubkey(item.pubkey)) {
+        console.debug("[wallet] Pubkey already in wallet list. Skip this row", row);
+        return res;
+      }
+
+      // OK: add it to result
+      return res.concat(item);
+    }, []);
+
+    $scope.isValidFile = isValidFile;
+
+    $timeout(function() {
+      $scope.validatingFile = false;
+    }, 250); // need to have a loading effect
+  };
+
+  $scope.removeFile = function() {
+    $scope.hasContent = false;
+    $scope.content = null;
+    $scope.fileData =  '';
+    $scope.isValidFile = false;
+    $scope.validatingFile = false;
+  };
+}
+
+
+WotLookupController.$inject = ['$scope', '$state', '$q', '$timeout', '$focus', '$location', '$ionicPopover', '$ionicHistory', 'UIUtils', 'csConfig', 'csCurrency', 'csSettings', 'Device', 'BMA', 'csWallet', 'csWot'];
+  WotLookupModalController.$inject = ['$scope', '$controller', '$focus', 'csWallet', 'parameters'];
+WotIdentityAbstractController.$inject = ['$scope', '$rootScope', '$state', '$translate', '$ionicHistory', '$q', 'UIUtils', 'Modals', 'csConfig', 'csSettings', 'csCurrency', 'csWot', 'csWallet'];
+WotIdentityViewController.$inject = ['$scope', '$rootScope', '$controller', '$timeout', '$state', 'UIUtils', 'Modals', 'csWallet'];
+WotIdentityTxViewController.$inject = ['$scope', '$timeout', '$q', 'BMA', 'csSettings', 'csWot', 'csTx', 'UIUtils'];
+WotCertificationsViewController.$inject = ['$scope', '$rootScope', '$controller', 'csSettings', 'csWallet', 'UIUtils'];
+WotSelectPubkeyIdentityModalController.$inject = ['$scope', '$q', 'csWot', 'parameters'];angular.module('cesium.wot.controllers', ['cesium.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+    $stateProvider
+
+      .state('app.wot_lookup', {
+        url: "/wot",
+        abstract: true,
+        enableBack: false, // Workaround need for navigation outside tabs (enableBack is forced to 'true' in ViewXXXCtrl)
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/lookup.html"
+          }
+        }
+      })
+
+      .state('app.wot_lookup.tab_search', {
+        url: "/search?q&type&hash",
+        views: {
+          'tab': {
+            templateUrl: "templates/wot/tabs/tab_lookup.html",
+            controller: 'WotLookupCtrl'
+          }
+        },
+        data: {
+          silentLocationChange: true,
+          large: 'app.wot_lookup_lg'
+        }
+      })
+
+      .state('app.wot_lookup_lg', {
+        url: "/wot/lg?q&type&hash",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/lookup_lg.html",
+            controller: 'WotLookupCtrl'
+          }
+        },
+        data: {
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.wot_identity', {
+        url: "/wot/:pubkey/:uid?action&block",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_identity.html",
+            controller: 'WotIdentityViewCtrl'
+          }
+        }
+      })
+
+      .state('app.wot_identity_uid', {
+        url: "/lookup/:uid?action",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_identity.html",
+            controller: 'WotIdentityViewCtrl'
+          }
+        }
+      })
+
+      .state('app.wot_identity_tx_uid', {
+        url: "/wot/tx/:pubkey/:uid?action",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_identity_tx.html",
+            controller: 'WotIdentityTxViewCtrl'
+          }
+        }
+      })
+
+      .state('app.wot_cert', {
+        url: "/wot/:pubkey/:uid/:type?block",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        },
+        data: {
+          large: 'app.wot_cert_lg'
+        }
+      })
+
+      .state('app.wot_cert_lg', {
+        url: "/wot/cert/lg/:pubkey/:uid?block",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        }
+      })
+
+      // wallet cert
+      .state('app.wallet_cert', {
+        url: "/account/cert/:type",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        },
+        data: {
+          large: 'app.wallet_cert_lg'
+        }
+      })
+
+      .state('app.wallet_cert_lg', {
+        url: "/account/cert/lg",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        }
+      })
+
+      // wallet cert
+      .state('app.wallet_cert_by_id', {
+        url: "/wallets/:id/cert/:type",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        },
+        data: {
+          large: 'app.wallet_cert_lg_by_id'
+        }
+      })
+
+      .state('app.wallet_cert_lg_by_id', {
+        url: "/wallets/:id/cert/lg",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wot/view_certifications.html",
+            controller: 'WotCertificationsViewCtrl'
+          }
+        }
+      })
+      ;
+  }])
+
+  .controller('WotLookupCtrl', WotLookupController)
+
+  .controller('WotLookupModalCtrl', WotLookupModalController)
+
+  .controller('WotIdentityAbstractCtrl', WotIdentityAbstractController)
+
+  .controller('WotIdentityViewCtrl', WotIdentityViewController)
+
+  .controller('WotIdentityTxViewCtrl', WotIdentityTxViewController)
+
+  .controller('WotCertificationsViewCtrl', WotCertificationsViewController)
+
+  .controller('WotSelectPubkeyIdentityModalCtrl', WotSelectPubkeyIdentityModalController)
+
+;
+
+function WotLookupController($scope, $state, $q, $timeout, $focus, $location, $ionicPopover, $ionicHistory,
+                             UIUtils, csConfig, csCurrency, csSettings, Device, BMA, csWallet, csWot) {
+  'ngInject';
+
+  var defaultSearchLimit = 10;
+
+  $scope.search = {
+    text: '',
+    loading: true,
+    type: null,
+    results: []
+  };
+  $scope.entered = false;
+  $scope.wotSearchTextId = 'wotSearchText';
+  $scope.enableFilter = true;
+  $scope.enableWallets = false;
+  $scope.allowMultiple = false;
+  $scope.selection = [];
+  $scope.showResultLabel = true;
+  $scope.parameters = {}; // override in the modal controller
+
+  $scope.enter = function(e, state) {
+    if (!$scope.entered) {
+      var params = angular.merge({}, $scope.parameters, state && state.stateParams);
+      if (params && params.q) { // Query parameter
+        $scope.search.text = params.q;
+        $timeout(function() {
+          $scope.doSearch();
+        }, 100);
+      }
+      else if (params && params.hash) { // hash tag parameter
+        $scope.search.text = '#' + params.hash;
+        $timeout(function() {
+          $scope.doSearch();
+        }, 100);
+      }
+      else {
+        $timeout(function() {
+          // Init phase
+          if (csCurrency.data.initPhase && !params.type) {
+            $scope.doGetPending(0, undefined, true/*skipLocationUpdate*/);
+          }
+          // get new comers
+          else if (params.type == 'newcomers' || (!csConfig.initPhase && !params.type)) {
+            $scope.doGetNewcomers(0, undefined, true/*skipLocationUpdate*/);
+          }
+          else if (params.type == 'pending') {
+            $scope.doGetPending(0, undefined, true/*skipLocationUpdate*/);
+          }
+          else if (params.type == 'wallets') {
+            $scope.doGetWallets(0, undefined, true/*skipLocationUpdate*/);
+          }
+
+        }, 100);
+      }
+      $scope.entered = true;
+
+      $timeout(UIUtils.ink, 100);
+
+      $scope.showHelpTip();
+    }
+    else {
+
+      $scope.updateLocationHref();
+      if ($scope.search.results && $scope.search.results.length) {
+        $scope.motion.show({selector: '.lookupForm .list .item', ink: true});
+      }
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.resetWotSearch = function() {
+    $scope.search = {
+      text: null,
+      loading: false,
+      type: 'newcomers',
+      results: []
+    };
+  };
+
+  $scope.updateLocationHref = function() {
+    };
+
+  $scope.doSearchText = function() {
+
+    $scope.doSearch();
+    $scope.updateLocationHref();
+
+    // removeIf(no-device)
+    Device.keyboard.close();
+    // endRemoveIf(no-device)
+  };
+
+  $scope.doSearch = function() {
+    var text = $scope.search.text.trim();
+    if ((UIUtils.screen.isSmall() && text.length < 3) || !text.length) {
+      $scope.search.results = undefined;
+      $scope.search.type = 'none';
+      $scope.search.total = undefined;
+      return $q.when();
+    }
+
+    $scope.search.loading = true;
+    $scope.search.type = 'text';
+    return csWot.search(text)
+      .then(function(idties){
+        if ($scope.search.type != 'text') return; // could have change
+        if ($scope.search.text.trim() !== text) return; // search text has changed before received response
+
+        if ((!idties || !idties.length) && (BMA.regexp.PUBKEY.test(text) || BMA.regexp.PUBKEY_WITH_CHECKSUM.test(text))) {
+          return BMA.uri.parse(text)
+            .then(function(data) {
+              $scope.doDisplayResult([data]);
+            });
+        }
+        else {
+          $scope.doDisplayResult(idties);
+
+          // count, skipping divider
+          var countBy = _.countBy(idties, function(hit) {
+            return hit.divider && 'divider' || 'results';
+          });
+          $scope.search.total = countBy && countBy.results || 0;
+        }
+      })
+      .catch(UIUtils.onError('ERROR.WOT_LOOKUP_FAILED'));
+  };
+
+  $scope.doGetNewcomers = function(offset, size, skipLocationUpdate) {
+    offset = offset || 0;
+    size = size || defaultSearchLimit;
+    if (size < defaultSearchLimit) size = defaultSearchLimit;
+
+    $scope.hideActionsPopover();
+    $scope.search.loading = (offset === 0);
+    $scope.search.type = 'newcomers';
+
+    // Update location href
+    if (!offset && !skipLocationUpdate) {
+      $scope.updateLocationHref();
+    }
+
+    return  csWot.newcomers(offset, size)
+      .then(function(res){
+        if ($scope.search.type !== 'newcomers') return false; // could have change
+        $scope.doDisplayResult(res && res.hits, offset, size, res && res.total);
+        return true;
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        $scope.search.results = (offset > 0) ? $scope.search.results : [];
+        $scope.search.hasMore = false;
+        $scope.search.total = undefined;
+        UIUtils.onError('ERROR.LOAD_NEWCOMERS_FAILED')(err);
+      });
+  };
+
+  $scope.doGetPending = function(offset, size, skipLocationUpdate) {
+    offset = offset || 0;
+    size = size || defaultSearchLimit;
+    if (size < defaultSearchLimit) size = defaultSearchLimit;
+
+    $scope.hideActionsPopover();
+    $scope.search.loading = (offset === 0);
+    $scope.search.type = 'pending';
+
+    var searchFunction =  csCurrency.data.initPhase ?
+      csWot.all :
+      csWot.pending;
+
+    // Update location href
+    if (!offset && !skipLocationUpdate) {
+      $scope.updateLocationHref();
+    }
+
+    return searchFunction(offset, size)
+      .then(function(res){
+        if ($scope.search.type != 'pending') return false; // could have change
+        $scope.doDisplayResult(res && res.hits, offset, size, res && res.total);
+        // Always disable "more" on initphase
+        $scope.search.hasMore = !csCurrency.data.initPhase && $scope.search.hasMore;
+        return true;
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        $scope.search.results = (offset > 0) ? $scope.search.results : [];
+        $scope.search.total = undefined;
+        $scope.search.hasMore = false;
+        UIUtils.onError('ERROR.LOAD_PENDING_FAILED')(err);
+      });
+  };
+
+  $scope.doGetWallets = function(offset, size, skipLocationUpdate) {
+    offset = offset || 0;
+    size = size || defaultSearchLimit;
+    if (size < defaultSearchLimit) size = defaultSearchLimit;
+
+    $scope.hideActionsPopover();
+    $scope.search.loading = (offset === 0);
+    $scope.search.type = 'wallets';
+
+    // Update location href
+    if (!offset && !skipLocationUpdate) {
+      $scope.updateLocationHref();
+    }
+
+    return csWallet.children.all()
+      .then(function(children) {
+        if (!children || $scope.search.type != 'wallets') return false; // could have change
+        var res = [csWallet].concat(children).reduce(function(res, wallet, index) {
+          var item = {
+            id: index,
+            pubkey: wallet.data.pubkey,
+            uid: wallet.data.uid,
+            name: wallet.data.localName || wallet.data.name,
+            avatar: wallet.data.avatar
+          };
+          return res.concat(item);
+        }, []);
+
+        $scope.doDisplayResult(res, offset, size, res.length);
+        $scope.search.hasMore = false;
+        return true;
+      });
+
+
+  };
+
+  $scope.showMore = function() {
+    var offset = $scope.search.results ? $scope.search.results.length : 0;
+
+    $scope.search.loadingMore = true;
+    var searchFunction = ($scope.search.type == 'newcomers') ?
+      $scope.doGetNewcomers :
+      $scope.doGetPending;
+
+    return searchFunction(offset)
+      .then(function(ok) {
+        if (ok) {
+          $scope.search.loadingMore = false;
+          $scope.$broadcast('scroll.infiniteScrollComplete');
+        }
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.search.loadingMore = false;
+        $scope.search.hasMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.select = function(item) {
+    var state = item.state;
+
+    //  Identity
+    if (!state && item.pubkey) {
+      // identity = self -> open the user wallet
+      state = csWallet.isUserPubkey(item.pubkey) ? 'app.view_wallet' : 'app.wot_identity';
+    }
+
+    if (state) {
+      // Need to have a back button outside tabs
+      $ionicHistory.nextViewOptions({
+        historyRoot: false,
+        disableAnimate: false,
+        expire: 300
+      });
+
+      $state.go(state, item.stateParams||item);
+    }
+  };
+
+  $scope.next = function() {
+    // This method should be override by sub controller (e.g. modal controller)
+    console.warn('Selected identities (should be override):', $scope.selection);
+  };
+
+  $scope.toggleCheck = function(index, e) {
+    var identity = $scope.search.results[index];
+    if (identity.checked) {
+      $scope.addToSelection(identity);
+    }
+    else {
+      $scope.removeSelection(identity, e);
+    }
+  };
+
+  $scope.toggleSelect = function(identity){
+    identity.selected = !identity.selected;
+  };
+
+  $scope.addToSelection = function(identity) {
+
+    var copyIdty = angular.copy(identity);
+    if (copyIdty.name) {
+      copyIdty.name = copyIdty.name.replace('<em>', '').replace('</em>', ''); // remove highlight
+    }
+
+    $scope.selection.push(copyIdty);
+  };
+
+  $scope.removeSelection = function(identity, e) {
+
+    // Remove from selection array
+    var identityInSelection = _.findWhere($scope.selection, {id: identity.id});
+    if (identityInSelection) {
+      $scope.selection.splice($scope.selection.indexOf(identityInSelection), 1);
+    }
+
+    // Uncheck in result array, if exists
+    if (!$scope.search.loading) {
+      var existIdtyInResult = _.findWhere($scope.search.results, {id: identity.id});
+      if (existIdtyInResult && existIdtyInResult.checked) {
+        existIdtyInResult.checked = false;
+      }
+    }
+    //e.preventDefault();
+  };
+
+  $scope.scanQrCode = function(){
+    if (!Device.barcode.enable) {
+      return;
+    }
+    Device.barcode.scan()
+    .then(function(result) {
+      if (!result) {
+        return;
+      }
+      BMA.uri.parse(result)
+      .then(function(obj){
+        if (obj.pubkey) {
+          $scope.search.text = obj.pubkey;
+        }
+        else if (result.uid) {
+          $scope.search.text = obj.uid;
+        }
+        else {
+          $scope.search.text = result;
+        }
+        $scope.doSearch();
+      });
+    })
+    .catch(UIUtils.onError('ERROR.SCAN_FAILED'));
+  };
+
+  // Show help tip (show only not already shown)
+  $scope.showHelpTip = function(index) {
+    if (!$scope.isLogin()) return;
+    index = angular.isDefined(index) ? index : csSettings.data.helptip.wotLookup;
+    if (index < 0) return;
+    if (index === 0) index = 1; // skip first step
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope();
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    return helptipScope.startWotLookupTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        csSettings.data.helptip.wotLookup = endIndex;
+        csSettings.store();
+      });
+  };
+
+  $scope.doDisplayResult = function(res, offset, size, total) {
+    res = res || [];
+
+    // pre-check result if already in selection
+    if ($scope.allowMultiple && res.length && $scope.selection.length) {
+      _.forEach($scope.selection, function(identity) {
+        var identityInRes = _.findWhere(res, {id: identity.id});
+        if (identityInRes) {
+          identityInRes.checked = true;
+        }
+      });
+    }
+
+    if (!offset) {
+      $scope.search.results = res || [];
+    }
+    else {
+        $scope.search.results = $scope.search.results.concat(res);
+    }
+    $scope.search.total = angular.isDefined(total) ? total : undefined;
+    $scope.search.loading = false;
+    $scope.search.hasMore = $scope.search.results.length >= offset + size;
+
+    $scope.smallscreen = UIUtils.screen.isSmall();
+
+    if (!$scope.search.results.length) return;
+
+    // Motion
+    if (res.length > 0 && $scope.motion) {
+      $scope.motion.show({selector: '.lookupForm .list .item', ink: true});
+    }
+  };
+
+  /* -- show/hide popup -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/wot/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+}
+
+function WotLookupModalController($scope, $controller, $focus, csWallet, parameters){
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WotLookupCtrl', {$scope: $scope}));
+
+  parameters = parameters || {};
+  $scope.search.loading = false;
+  $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : false;
+  $scope.enableWallets = angular.isDefined(parameters.enableWallets) ? (csWallet.isLogin() && csWallet.children.count() && parameters.enableWallets) : false;
+  $scope.allowMultiple = angular.isDefined(parameters.allowMultiple) ? parameters.allowMultiple : false;
+  $scope.parameters = parameters;
+  $scope.showResultLabel = false;
+
+  $scope.wotSearchTextId = 'wotSearchTextModal';
+
+  if ($scope.allowMultiple && parameters.selection) {
+    $scope.selection = parameters.selection;
+  }
+
+  var superEnter = $scope.enter;
+  $scope.enter = function(e) {
+    if ($scope.parameters && $scope.parameters.q) {
+      $scope.search.text=$scope.parameters.q;
+      if ($scope.parameters.q.trim().length > 2) {
+        superEnter(e); // call enter, that launch the search
+      }
+    }
+  };
+  $scope.$on('modal.shown', $scope.enter);
+
+  $scope.cancel = function(){
+    $scope.closeModal();
+  };
+
+  $scope.select = function(identity){
+    $scope.closeModal({
+      pubkey: identity.pubkey,
+      uid: identity.uid,
+      name: identity.name && identity.name.replace(/<\/?em>/ig, '')
+    });
+  };
+
+  $scope.next = function() {
+    $scope.closeModal($scope.selection);
+  };
+
+  $scope.updateLocationHref = function() {
+    // Do NOT change location href
+  };
+
+  $scope.showHelpTip = function() {
+    // silent
+  };
+
+  }
+
+/**
+ * Abtract controller that load identity, that expose some useful methods in $scope, like 'certify()'
+ * @param $scope
+ * @param $state
+ * @param $timeout
+ * @param UIUtils
+ * @param Modals
+ * @param csConfig
+ * @param csWot
+ * @param csWallet
+ * @constructor
+ */
+function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $ionicHistory, $q,
+                                       UIUtils, Modals, csConfig, csSettings, csCurrency, csWot, csWallet) {
+  'ngInject';
+
+  $scope.formData = {
+    hasSelf: true
+  };
+  $scope.disableCertifyButton = true;
+  $scope.loading = true;
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.load = function(pubkey, uid, options) {
+    return csWot.load(pubkey, uid, options)
+      .then(function(identity){
+        if (!identity) return UIUtils.onError('ERROR.IDENTITY_NOT_FOUND')().then($scope.showHome);
+        $scope.formData = identity;
+        var isLogin = csWallet.isLogin();
+        $scope.revoked = identity.requirements && (identity.requirements.revoked || identity.requirements.pendingRevocation);
+        $scope.canCertify = identity.hasSelf && !$scope.revoked && (!isLogin || !csWallet.isUserPubkey(pubkey) || csWallet.children.count() > 0);
+        $scope.canSelectAndCertify = identity.hasSelf && (csWallet.isUserPubkey(pubkey) || csWallet.children.hasPubkey(pubkey));
+        var cert = isLogin && _.find((identity.received_cert||[]).concat(identity.received_cert_pending||[]), function (cert) {
+          return cert.pubkey === csWallet.data.pubkey && cert.valid && cert.expiresIn > csSettings.data.timeWarningExpire;
+        });
+        $scope.alreadyCertified = (!$scope.canCertify || !isLogin || csWallet.children.count() > 0) ? false : !!cert;
+        $scope.disableCertifyButton = $scope.alreadyCertified || $scope.revoked;
+        $scope.loading = false;
+      })
+      .catch(function(err) {
+        $scope.loading = false;
+        UIUtils.onError('ERROR.LOAD_IDENTITY_FAILED')(err);
+      });
+  };
+
+
+  $scope.doUpdate = function(silent) {
+    if (!silent) {
+      $scope.loading = true;
+      UIUtils.loading.show();
+    }
+    var options = {
+      cache: false, // No cache
+      blockUid: $scope.formData.blockUid || undefined
+    };
+    return $scope.load($scope.formData.pubkey, $scope.formData.uid, options)
+      .then(UIUtils.loading.hide);
+  };
+
+  // Certify the current identity
+  $scope.certify = function() {
+
+    // Select wallet, if many
+    return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+      .then(function(wallet) {
+        if (!wallet) return; // user cancelled
+
+        // Need user auth - fix #513
+        return wallet.auth({minData: true})
+          .then(function(walletData) {
+            UIUtils.loading.hide();
+
+            if (!csCurrency.data.initPhase && !walletData.isMember) {
+              UIUtils.alert.error(walletData.requirements.needSelf ?
+                'ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY' : 'ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF');
+              return;
+            }
+
+            if (!csCurrency.data.initPhase && !$scope.formData.hasSelf) {
+              UIUtils.alert.error('ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF');
+              return;
+            }
+
+            // Check identity not expired
+            if ($scope.formData.requirements.expired) {
+              UIUtils.alert.error('ERROR.IDENTITY_EXPIRED');
+              return;
+            }
+
+            // Check not already certified
+            var previousCert = _.find($scope.formData.received_cert, function(cert) {
+              return cert.pubkey === wallet.data.pubkey && cert.valid && cert.expiresIn > csSettings.data.timeWarningExpire;
+            });
+            if (previousCert) {
+              $translate('ERROR.IDENTITY_ALREADY_CERTIFY', previousCert)
+                .then(function(message) {
+                  UIUtils.alert.error(message, 'ERROR.UNABLE_TO_CERTIFY_TITLE');
+                });
+              return;
+            }
+
+            // Check no pending certification
+            previousCert = _.findWhere($scope.formData.received_cert_pending, { pubkey: wallet.data.pubkey, valid: true});
+            if (previousCert) {
+              $translate('ERROR.IDENTITY_ALREADY_CERTIFY_PENDING', previousCert)
+                .then(function(message) {
+                  UIUtils.alert.error(message, 'ERROR.UNABLE_TO_CERTIFY_TITLE');
+                });
+              return;
+            }
+
+            UIUtils.alert.confirm('CONFIRM.CERTIFY_RULES', 'CONFIRM.POPUP_SECURITY_WARNING_TITLE', {
+              cssClass: 'warning',
+              okText: 'WOT.BTN_YES_CERTIFY',
+              okType: 'button-assertive'
+            })
+              .then(function(confirm){
+                if (!confirm) {
+                  return;
+                }
+                UIUtils.loading.show();
+                wallet.certify($scope.formData.uid,
+                  $scope.formData.pubkey,
+                  $scope.formData.blockUid || ($scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.timestamp),
+                  $scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.sig,
+                  $scope.formData.isMember,
+                  $scope.formData.wasMember)
+                  .then(function(cert) {
+                    UIUtils.loading.hide();
+                    if (cert) {
+                      $scope.prepareNewCert(wallet, cert);
+                      $scope.alreadyCertified = true;
+                      UIUtils.toast.show('INFO.CERTIFICATION_DONE');
+                      $scope.formData.received_cert_pending.unshift(cert);
+                      $scope.formData.requirements.pendingCertificationCount++;
+                      $scope.doMotion();
+                    }
+                  })
+                  .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED'));
+              });
+          })
+          .catch(function(err) {
+            if (err === 'CANCELLED') return;
+            UIUtils.onError('ERROR.LOGIN_FAILED')(err);
+          });
+      });
+  };
+
+  // Select an identity and certify
+  $scope.selectAndCertify = function() {
+
+    // Select wallet, if many
+    return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+      .then(function(wallet) {
+        // Need user auth - fix #513
+        return wallet.auth({minData: true})
+          .then(function (walletData) {
+            if (!csCurrency.data.initPhase && !walletData.isMember) {
+              UIUtils.alert.error(walletData.requirements.needSelf || walletData.requirements.needMembership ?
+                'ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY' : 'ERROR.NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF');
+              return;
+            }
+            UIUtils.loading.hide();
+            // Open Wot lookup modal
+            return Modals.showWotLookup();
+          })
+          .then(function (idty) {
+            if (!idty || !idty.pubkey) {
+              return; // cancelled
+            }
+            if (!idty.uid) { // not a member
+              UIUtils.alert.error('ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF');
+              return;
+            }
+
+            UIUtils.loading.show();
+
+            var options = {cache: false, blockUid: idty.blockUid};
+
+            // load selected identity
+            return csWot.load(idty.pubkey, idty.uid, options);
+          })
+
+          .then(function (identity) {
+            if (!identity) return; // cancelled
+            UIUtils.loading.hide();
+            if (!identity || !identity.hasSelf) {
+              UIUtils.alert.error('ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF');
+              return;
+            }
+
+            // Check identity not expired
+            if (identity.requirements.expired) {
+              UIUtils.alert.error('ERROR.IDENTITY_EXPIRED');
+              return;
+            }
+
+            // Check not already certified
+            var previousCert = _.findWhere(identity.received_cert, {pubkey: wallet.data.pubkey, valid: true});
+            if (previousCert) {
+              $translate('ERROR.IDENTITY_ALREADY_CERTIFY', previousCert)
+                .then(function (message) {
+                  UIUtils.alert.error(message, 'ERROR.UNABLE_TO_CERTIFY_TITLE');
+                });
+              return;
+            }
+
+            // Check not pending certification
+            previousCert = _.findWhere(identity.received_cert_pending, {pubkey: wallet.data.pubkey, valid: true});
+            if (previousCert) {
+              $translate('ERROR.IDENTITY_ALREADY_CERTIFY_PENDING', previousCert)
+                .then(function (message) {
+                  UIUtils.alert.error(message, 'ERROR.UNABLE_TO_CERTIFY_TITLE');
+                });
+              return;
+            }
+
+            // Ask confirmation
+            $translate('CONFIRM.CERTIFY_RULES_TITLE_UID', {uid: identity.uid})
+              .then(function (confirmTitle) {
+                return UIUtils.alert.confirm('CONFIRM.CERTIFY_RULES', confirmTitle);
+              })
+              .then(function (confirm) {
+                if (!confirm) {
+                  return;
+                }
+                UIUtils.loading.show();
+
+                // Send certification
+                wallet.certify(identity.uid,
+                  identity.pubkey,
+                  identity.blockUid || (identity.requirements && identity.requirements.meta && identity.requirements.meta.timestamp),
+                  identity.requirements && identity.requirements.meta && identity.requirements.meta.sig,
+                  identity.isMember,
+                  identity.wasMember)
+                  .then(function (cert) {
+                    UIUtils.loading.hide();
+                    if (!cert) return;
+                    return csWot.extendAll([cert], 'pubkey')
+                      .then(function () {
+                        UIUtils.toast.show('INFO.CERTIFICATION_DONE');
+                        $scope.formData.given_cert_pending.unshift(cert);
+                        $scope.doMotion();
+                      });
+                  })
+                  .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED'));
+              });
+          })
+          .catch(function (err) {
+            if (err === 'CANCELLED') return;
+            UIUtils.onError('ERROR.LOAD_IDENTITY_FAILED')(err);
+          });
+      });
+  };
+
+  // Add wallet's data to a new cert
+  $scope.prepareNewCert = function(wallet, cert) {
+    cert.uid = wallet.data.uid;
+    cert.pubkey = wallet.data.pubkey;
+    cert.isMember = wallet.data.isMember;
+    cert.avatar = wallet.data.avatar;
+    cert.name = wallet.data.name;
+  };
+
+  $scope.removeActionParamInLocationHref = function(state) {
+    if (!state || !state.stateParams || !state.stateParams.action) return;
+
+    var stateParams = angular.copy(state.stateParams);
+
+    // Reset action param
+    stateParams.action = null;
+
+    // Update location href
+    $ionicHistory.nextViewOptions({
+      disableAnimate: true,
+      disableBack: false,
+      historyRoot: false
+    });
+    $state.go(state.stateName, stateParams,
+      {
+        reload: false,
+        inherit: true,
+        notify: false
+      });
+  };
+
+  $scope.doAction = function(action, options) {
+    if (action == 'certify') {
+      return $scope.certify();
+    }
+    if (action == 'transfer') {
+      $scope.showTransferModal(options);
+    }
+  };
+
+  /* -- open screens -- */
+
+  $scope.showCertifications = function() {
+    var block = $scope.formData.requirements && $scope.formData.requirements.alternatives && $scope.formData.blockUid || undefined;
+    // Warn: do not use a simple link here (a ng-click is mandatory for help tour)
+    if (UIUtils.screen.isSmall() ) {
+      $state.go('app.wot_cert', {
+        pubkey: $scope.formData.pubkey,
+        uid: $scope.formData.uid,
+        type: 'received',
+        block: block
+      });
+    }
+    else {
+      $state.go('app.wot_cert_lg', {
+        pubkey: $scope.formData.pubkey,
+        uid: $scope.formData.uid,
+        block: block
+      });
+    }
+  };
+
+  $scope.showGivenCertifications = function() {
+    var block = $scope.formData.requirements && $scope.formData.requirements.alternatives && $scope.formData.blockUid || undefined;
+    // Warn: do not use a simple link here (a ng-click is mandatory for help tour)
+    if (UIUtils.screen.isSmall() ) {
+      $state.go('app.wot_cert', {
+        pubkey: $scope.formData.pubkey,
+        uid: $scope.formData.uid,
+        type: 'given',
+        block: block
+      });
+    }
+    else {
+      $state.go('app.wot_cert_lg', {
+        pubkey: $scope.formData.pubkey,
+        uid: $scope.formData.uid,
+        block: block
+      });
+    }
+  };
+
+  $scope.showSharePopover = function(event) {
+    var title = $scope.formData.name || $scope.formData.uid || $scope.formData.pubkey;
+    // Use shareBasePath (fix #530) or rootPath (fix #390)
+    var url = (csConfig.shareBaseUrl || $rootScope.rootPath) + $state.href('app.wot_identity', {pubkey: $scope.formData.pubkey, uid: $scope.formData.uid});
+    // Override default position, is small screen - fix #545
+    if (UIUtils.screen.isSmall()) {
+      event = angular.element(document.querySelector('#wot-share-anchor-'+$scope.formData.pubkey)) || event;
+    }
+    UIUtils.popover.share(event, {
+      bindings: {
+        url: url,
+        titleKey: 'WOT.VIEW.POPOVER_SHARE_TITLE',
+        titleValues: {title: title},
+        postMessage: title
+      }
+    });
+  };
+}
+
+/**
+ * Identity view controller - should extend WotIdentityAbstractCtrl
+ */
+function WotIdentityViewController($scope, $rootScope, $controller, $timeout, $state, UIUtils, Modals, csWallet) {
+  'ngInject';
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WotIdentityAbstractCtrl', {$scope: $scope}));
+
+  $scope.motion = UIUtils.motion.fadeSlideInRight;
+  $scope.qrcodeId = 'qrcode-wot-' + $scope.$id;
+
+  // Init likes here, to be able to use in extension
+  $scope.options = $scope.options || {};
+  $scope.options.like = {
+    kinds: ['LIKE', 'ABUSE'],
+    index: 'user',
+    type: 'profile'
+  };
+  $scope.likeData = {
+    likes: {},
+    abuses: {}
+  };
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+
+    var onLoadSuccess = function() {
+      $scope.doMotion();
+      if (state.stateParams && state.stateParams.action) {
+        $timeout(function() {
+          $scope.doAction(state.stateParams.action.trim());
+        }, 100);
+
+        $scope.removeActionParamInLocationHref(state);
+
+        // Need by like controller
+        $scope.likeData.id = $scope.formData.pubkey;
+      }
+
+      $scope.showQRCode();
+    };
+    var options = {
+      cache: true,
+      blockUid: state.stateParams && state.stateParams.block || undefined
+    };
+
+    if (state.stateParams &&
+      state.stateParams.pubkey &&
+      state.stateParams.pubkey.trim().length > 0) {
+      if ($scope.loading) { // load once
+
+        return $scope.load(state.stateParams.pubkey.trim(), state.stateParams.uid, options)
+          .then(onLoadSuccess)
+          .catch(UIUtils.onError("ERROR.LOAD_IDENTITY_FAILED"));
+      }
+    }
+
+    else if (state.stateParams &&
+      state.stateParams.uid &&
+      state.stateParams.uid.trim().length > 0) {
+      if ($scope.loading) { // load once
+        return $scope.load(null, state.stateParams.uid, options)
+          .then(onLoadSuccess);
+      }
+    }
+
+    // Redirect to home
+    else {
+      $scope.showHome();
+    }
+
+  });
+
+  $scope.doMotion = function() {
+    $scope.motion.show({selector: '.view-identity .list .item'});
+
+    // Transfer button
+    $scope.showFab('fab-transfer');
+
+    // Certify button
+    if (($scope.canCertify && !$scope.alreadyCertified) || $rootScope.tour) {
+      $scope.showFab('fab-certify-' + $scope.formData.uid);
+    }
+
+    $scope.$broadcast('$csExtension.motion');
+  };
+
+  $scope.doQuickFix = function(event) {
+    if (event === 'showSelectIdentities') {
+      return $scope.showSelectIdentities();
+    }
+  };
+
+  $scope.showSelectIdentities = function() {
+    if (!$scope.formData.requirements || !$scope.formData.requirements.alternatives) return;
+
+    return Modals.showSelectPubkeyIdentity({
+      identities: [$scope.formData.requirements].concat($scope.formData.requirements.alternatives)
+    })
+    .then(function(res) {
+      if (!res || !res.pubkey) return; // Skip if cancelled
+      // open the identity
+      return $state.go('app.wot_identity', {
+        pubkey: res.pubkey,
+        uid: res.uid,
+        block: res.meta && res.meta.timestamp || res.blockUid
+      });
+    });
+  };
+
+  $scope.showQRCode = function(timeout) {
+    if (!$scope.qrcodeId || !$scope.formData.pubkey) return; // Skip
+
+    // Get the DIV element
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId + ' .content'));
+    if (!element) {
+      console.error("[wot-controller] Cannot found div #{0} for the QRCode. Skipping.".format($scope.qrcodeId));
+      return;
+    }
+
+    console.debug("[wot-controller] Generating QR code for identity...");
+    $timeout(function() {
+      var svg = UIUtils.qrcode.svg($scope.formData.pubkey);
+      element.html(svg);
+      UIUtils.motion.toggleOn({selector: '#'+$scope.qrcodeId}, timeout || 1100);
+    });
+  };
+
+  $scope.hideQRCode = function() {
+    if (!$scope.qrcodeId) return;
+    var element = angular.element(document.querySelector('#' + $scope.qrcodeId));
+    if (element) {
+      UIUtils.motion.toggleOff({selector: '#'+$scope.qrcodeId});
+    }
+  };
+}
+
+/**
+ * Identity tx view controller
+ */
+function WotIdentityTxViewController($scope, $timeout, $q, BMA, csSettings, csWot, csTx, UIUtils) {
+  'ngInject';
+
+  $scope.formData= {};
+  $scope.loading = true;
+  $scope.motion = UIUtils.motion.fadeSlideInRight;
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if ($scope.loading) {
+      $scope.pubkey = state.stateParams.pubkey;
+      $scope.uid = state.stateParams.uid;
+      $scope.load();
+    }
+    else {
+      // update view
+      $scope.updateView();
+    }
+  });
+
+  // Load data
+  $scope.load = function(fromTime) {
+    return $q.all([
+        csWot.extend({pubkey: $scope.pubkey}),
+        csTx.load($scope.pubkey, fromTime)
+      ])
+      .then(function(res) {
+        $scope.formData = angular.merge(res[0], res[1]);
+        $scope.loading = false;
+        $scope.updateView();
+      });
+  };
+
+  // Updating data
+  $scope.doUpdate = function(silent) {
+    console.debug('[wot] TX history reloading...');
+    $scope.formData = {};
+    return (silent ?
+        $scope.load() :
+        UIUtils.loading.show()
+          .then($scope.load)
+          .then(UIUtils.loading.hide)
+      )
+      .then($scope.updateView)
+      .catch(UIUtils.onError('ERROR.IDENTITY_TX_FAILED'));
+  };
+
+  // Update view
+  $scope.updateView = function() {
+    $scope.$broadcast('$$rebind::balance'); // force rebind balance
+    $scope.$broadcast('$$rebind::rebind'); // force rebind
+    $scope.motion.show();
+  };
+
+  $scope.downloadHistoryFile = function(options) {
+    options = options || {};
+    options.fromTime = options.fromTime || -1; // default: full history
+    csTx.downloadHistoryFile($scope.pubkey, options);
+  };
+
+  $scope.showMoreTx = function(fromTime) {
+
+    fromTime = fromTime ||
+      ($scope.formData.tx.fromTime - csSettings.data.walletHistoryTimeSecond) ||
+      (moment().utc().unix() - 2 * csSettings.data.walletHistoryTimeSecond);
+
+    UIUtils.loading.show();
+    return csTx.load($scope.pubkey, fromTime)
+      .then(function(res) {
+        angular.merge($scope.formData, res);
+        $scope.updateView();
+        UIUtils.loading.hide();
+      })
+      .catch(function(err) {
+        // If http rest limitation: wait then retry
+        if (err.ucode == BMA.errorCodes.HTTP_LIMITATION) {
+          $timeout(function() {
+            return $scope.showMoreTx(fromTime);
+          }, 2000);
+        }
+        else {
+          UIUtils.onError('ERROR.IDENTITY_TX_FAILED')(err);
+        }
+      });
+  };
+
+}
+
+
+/**
+ * Certifications controller - extend WotIdentityAbstractCtrl
+ */
+function WotCertificationsViewController($scope, $rootScope, $controller, csSettings, csWallet, UIUtils) {
+  'ngInject';
+
+  var wallet;
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('WotIdentityAbstractCtrl', {$scope: $scope}));
+
+  // Values overwritten in tab controller (for small screen)
+  $scope.motions = {
+    receivedCertifications: angular.copy(UIUtils.motion.fadeSlideIn),
+    givenCertifications: angular.copy(UIUtils.motion.fadeSlideInRight),
+    avatar: angular.copy(UIUtils.motion.fadeIn),
+  };
+  $scope.motions.receivedCertifications.enable = true;
+  $scope.motions.givenCertifications.enable = true;
+  $scope.motions.avatar.enable = true;
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if (state.stateParams && state.stateParams.type) {
+      $scope.motions.receivedCertifications.enable = (state.stateParams.type != 'given');
+      $scope.motions.givenCertifications.enable = (state.stateParams.type == 'given');
+      $scope.motions.avatar.enable = false;
+    }
+
+    // First load
+    if ($scope.loading) {
+      var options = {
+        cache: true,
+        blockUid: state.stateParams && state.stateParams.block || undefined
+      };
+
+      if (state.stateParams &&
+        state.stateParams.pubkey &&
+        state.stateParams.pubkey.trim().length > 0) {
+
+        return $scope.load(state.stateParams.pubkey.trim(), state.stateParams.uid, options)
+          .then(function () {
+            $scope.doMotion();
+            $scope.showHelpTip();
+          });
+      }
+
+      else {
+        wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+        if (!wallet) {
+          UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+          return $scope.showHome();
+        }
+        if (!wallet.isLogin()) {
+          return $scope.showHome();
+        }
+        return $scope.load(wallet.data.pubkey, wallet.data.uid, options)
+          .then(function () {
+            $scope.doMotion();
+            $scope.showHelpTip();
+          });
+      }
+    }
+
+    else {
+      $scope.doMotion();
+    }
+  });
+
+  $scope.$on('$ionicView.leave', function() {
+    $scope.loading = true;
+  });
+
+  // Updating data
+  $scope.doUpdate = function() {
+    var options = {
+      cache: false, // No cache
+      blockUid: $scope.formData.blockUid || undefined
+    };
+    return $scope.load($scope.formData.pubkey, $scope.formData.uid, options)
+      .then(function() {
+        $scope.doMotion();
+        $scope.showHelpTip();
+      });
+  };
+
+  $scope.doMotion = function(skipItems) {
+
+    // Motions received certifications part
+    $scope.doMotionReceivedCertifications(0, skipItems);
+
+    // Motion on avatar part
+    if ($scope.motions.avatar.enable) {
+      $scope.motions.avatar.show({selector: '.col-avatar .' + $scope.motions.avatar.ionListClass});
+    }
+
+    // Motion on given certification part
+    $scope.doMotionGivenCertifications($scope.motions.receivedCertifications.enable ? 100 : 10, skipItems);
+  };
+
+  // Effects on received certifcations
+  $scope.doMotionReceivedCertifications = function(timeout, skipItems) {
+    if ($scope.motions.receivedCertifications.enable) {
+      if (!skipItems) {
+        $scope.motions.receivedCertifications.show({selector: '.list.certifications .item', timeout: timeout});
+      }
+
+      // Fab button
+      if (($scope.canCertify && !$scope.alreadyCertified) || $rootScope.tour) {
+        $scope.showFab('fab-certify', timeout);
+      }
+    }
+    // If not enable, make sure to hide fab button
+    else {
+      // Hide fab button
+      if ($scope.canCertify || $rootScope.tour) {
+        $scope.hideFab('fab-certify', 0);
+      }
+    }
+  };
+
+  // Effects on given certifcations
+  $scope.doMotionGivenCertifications = function(timeout, skipItems) {
+
+    if ($scope.motions.givenCertifications.enable) {
+      if (!skipItems) {
+        $scope.motions.givenCertifications.show({selector: '.list.given-certifications .item', timeout: timeout});
+      }
+      // Fab button
+      if ($scope.canSelectAndCertify || $rootScope.tour) {
+        $scope.showFab('fab-select-certify');
+      }
+    }
+
+    // If not enable, make sure to hide fab button
+    else {
+      // Hide fab button
+      if ($scope.canSelectAndCertify || $rootScope.tour) {
+        $scope.hideFab('fab-select-certify', 0);
+      }
+    }
+  };
+
+  // Show help tip
+  $scope.showHelpTip = function() {
+    if (!$scope.isLogin()) return;
+    if (!csSettings.data.helptip.enable) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope();
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    var isWallet = csWallet.isUserPubkey($scope.formData.pubkey);
+    var index = isWallet ? csSettings.data.helptip.walletCerts : csSettings.data.helptip.wotCerts;
+    if (index < 0) return;
+
+    var startFunc = isWallet ?
+      helptipScope.startWalletCertTour(index, false) :
+      helptipScope.startWotCertTour(index, false);
+
+    return startFunc.then(function(endIndex) {
+      helptipScope.$destroy();
+      if (isWallet) {
+        csSettings.data.helptip.walletCerts = endIndex;
+      }
+      else {
+        csSettings.data.helptip.wotCerts = endIndex;
+      }
+      csSettings.store();
+    });
+  };
+}
+
+
+/**
+ * Select identities from a pubkey (useful when many self on the same pubkey)
+ * @param $scope
+ * @param $q
+ * @param csWot
+ * @param parameters
+ * @constructor
+ */
+function WotSelectPubkeyIdentityModalController($scope, $q, csWot, parameters) {
+
+  $scope.loading = true;
+
+  $scope.load = function() {
+    // If list of identities given by parameters: use it
+    if (parameters && parameters.identities) {
+      $scope.identities = parameters.identities;
+      $scope.pubkey = $scope.identities[0].pubkey;
+      $scope.loading = false;
+      return $q.when();
+    }
+
+    // Or load from pubkey
+    $scope.pubkey = parameters && parameters.pubkey;
+    if (!pubkey) {
+      return $q.reject('Missing parameters: [pubkey] or [identities]');
+    }
+
+    return csWot.loadRequirements({pubkey: pubkey, uid: uid})
+      .then(function(data) {
+        if (data && data.requirements) {
+          $scope.identities = data.requirements;
+          if (data.requirements.alternatives) {
+            $scope.identities = [data.requirements].concat(data.requirements.alternatives);
+          }
+          else {
+            $scope.identities = [data.requirements];
+          }
+        }
+        $scope.loading = false;
+      });
+  };
+  $scope.$on('modal.shown', $scope.load);
+}
+
+
+NetworkLookupController.$inject = ['$scope', '$state', '$location', '$ionicPopover', '$window', '$translate', 'BMA', 'UIUtils', 'csConfig', 'csSettings', 'csCurrency', 'csNetwork', 'csWot'];
+PeerViewController.$inject = ['$scope', '$q', '$window', '$state', 'UIUtils', 'csWot', 'BMA'];
+NetworkLookupModalController.$inject = ['$scope', '$controller', 'parameters'];
+NetworkLookupPopoverController.$inject = ['$scope', '$controller'];
+PeerInfoPopoverController.$inject = ['$scope', '$q', 'csSettings', 'csCurrency', 'csHttp', 'BMA'];
+angular.module('cesium.network.controllers', ['cesium.services'])
+
+.config(['$stateProvider', function($stateProvider) {
+  'ngInject';
+
+  $stateProvider
+
+    .state('app.network', {
+      url: "/network?type&expert",
+      cache: false, // fix #766
+      views: {
+        'menuContent': {
+          templateUrl: "templates/network/view_network.html",
+          controller: 'NetworkLookupCtrl'
+        }
+      },
+      data: {
+        silentLocationChange: true
+      }
+    })
+
+    .state('app.view_peer', {
+      url: "/network/peer/:server?ssl&tor",
+      cache: false,
+      views: {
+        'menuContent': {
+          templateUrl: "templates/network/view_peer.html",
+          controller: 'PeerViewCtrl'
+        }
+      },
+      data: {
+        preferHttp: true // avoid HTTPS if config has httpsMode=clever
+      }
+    });
+}])
+
+.controller('NetworkLookupCtrl', NetworkLookupController)
+
+.controller('PeerViewCtrl', PeerViewController)
+
+.controller('NetworkLookupModalCtrl', NetworkLookupModalController)
+
+.controller('NetworkLookupPopoverCtrl', NetworkLookupPopoverController)
+
+.controller('PeerInfoPopoverCtrl', PeerInfoPopoverController)
+
+;
+
+function NetworkLookupController($scope,  $state, $location, $ionicPopover, $window, $translate,
+                                 BMA, UIUtils, csConfig, csSettings, csCurrency, csNetwork, csWot) {
+  'ngInject';
+
+  $scope.networkStarted = false;
+  $scope.ionItemClass = '';
+  $scope.expertMode = csSettings.data.expertMode && !UIUtils.screen.isSmall();
+  $scope.isHttps = ($window.location.protocol === 'https:');
+  $scope.search = {
+    text: '',
+    loading: true,
+    type: undefined,
+    results: [],
+    endpoint: null,
+    bma: undefined,
+    ssl: undefined,
+    ws2p: undefined,
+    sort : undefined,
+    asc: true
+  };
+  $scope.compactMode = true;
+  $scope.listeners = [];
+  $scope.helptipPrefix = 'helptip-network';
+  $scope.enableLocationHref = true; // can be overrided by sub-controller (e.g. popup)
+
+  $scope.removeListeners = function() {
+    if ($scope.listeners.length) {
+      console.debug("[network] Closing listeners");
+      _.forEach($scope.listeners, function(remove){
+        remove();
+      });
+      $scope.listeners = [];
+    }
+  };
+
+  /**
+   * Enter in view
+   */
+  $scope.enter = function(e, state) {
+    if ($scope.networkStarted) return;
+    $scope.networkStarted = true;
+    $scope.search.loading = true;
+    csCurrency.get()
+      .then(function (currency) {
+        if (currency) {
+          var isDefaultNode = BMA.node.same(currency.node);
+          $scope.node = isDefaultNode ? BMA :
+            BMA.instance(currency.node.host, currency.node.port);
+          if (state && state.stateParams) {
+            if (state.stateParams.type && ['mirror', 'member', 'offline'].indexOf(state.stateParams.type) != -1) {
+              $scope.search.type = state.stateParams.type;
+            }
+            if (state.stateParams.expert) {
+              $scope.expertMode = (state.stateParams.expert == 'true');
+            }
+          }
+          $scope.load();
+        }
+      })
+      .catch(function(err) {
+        UIUtils.onError('ERROR.GET_CURRENCY_FAILED')(err);
+        $scope.networkStarted = false;
+      });
+  };
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+  /**
+   * Leave the view
+   */
+  $scope.leave = function() {
+    // Close node, if not the default BMA
+    if ($scope.node !== BMA) {
+      $scope.node.close();
+    }
+    if (!$scope.networkStarted) return;
+    $scope.removeListeners();
+    csNetwork.close();
+    $scope.networkStarted = false;
+    $scope.search.loading = true;
+  };
+  $scope.$on('$ionicView.beforeLeave', $scope.leave);
+  $scope.$on('$ionicParentView.beforeLeave', $scope.leave);
+  $scope.$on('$destroy', $scope.leave);
+
+
+  $scope.computeOptions = function() {
+    var options = {
+      filter: {
+        member: (!$scope.search.type || $scope.search.type === 'member'),
+        mirror: (!$scope.search.type || $scope.search.type === 'mirror'),
+        endpoint : (angular.isDefined($scope.search.endpoint) ? $scope.search.endpoint : null),
+        bma : $scope.search.bma,
+        ssl : $scope.search.ssl,
+        ws2p : $scope.search.ws2p,
+        online: !($scope.search.type && $scope.search.type === 'offline')
+      },
+      sort: {
+        type : $scope.search.sort,
+        asc : $scope.search.asc
+      },
+      expertMode: $scope.expertMode,
+      // larger timeout when on expert mode
+      timeout: csConfig.timeout && ($scope.expertMode ? (csConfig.timeout / 10) : (csConfig.timeout / 100))
+    };
+    return options;
+  };
+
+  $scope.load = function() {
+
+    if ($scope.search.loading){
+      // Start network scan
+      csNetwork.start($scope.node, $scope.computeOptions());
+
+      // Catch event on new peers
+      $scope.refreshing = false;
+      $scope.listeners.push(
+        csNetwork.api.data.on.changed($scope, function(data){
+          if (!$scope.refreshing) {
+            $scope.refreshing = true;
+            csWot.extendAll(data.peers)
+              .then(function() {
+                // Avoid to refresh if view has been leaving
+                if ($scope.networkStarted) {
+                  $scope.updateView(data);
+                }
+                $scope.refreshing = false;
+              });
+          }
+        }));
+    }
+
+    // Show help tip
+    $scope.showHelpTip();
+  };
+
+  $scope.updateView = function(data) {
+    console.debug("[peers] Updating UI");
+    $scope.$broadcast('$$rebind::rebind'); // force data binding
+    $scope.search.results = data.peers;
+    $scope.search.memberPeersCount = data.memberPeersCount;
+    // Always tru if network not started (e.g. after leave+renter the view)
+    $scope.search.loading = !$scope.networkStarted || csNetwork.isBusy();
+    if (!$scope.loading) {
+      $scope.$broadcast('$$rebind::rebind'); // force data binding
+    }
+    if ($scope.motion && $scope.search.results && $scope.search.results.length > 0) {
+      $scope.motion.show({selector: '.item-peer'});
+    }
+  };
+
+  $scope.refresh = function() {
+    // Network
+    $scope.search.loading = true;
+    csNetwork.loadPeers();
+  };
+
+  $scope.sort = function() {
+    $scope.search.loading = true;
+    $scope.refreshing = true;
+    csNetwork.sort($scope.computeOptions());
+    $scope.updateView(csNetwork.data);
+  };
+
+  $scope.toggleSearchType = function(type){
+    $scope.hideActionsPopover();
+    if ($scope.search.type === type || type === 'none') {
+      $scope.search.type = undefined;
+    }
+    else {
+      $scope.search.type = type;
+    }
+    csNetwork.close();
+    $scope.search.loading = true;
+    $scope.load();
+
+    // Update location href
+    if ($scope.enableLocationHref) {
+      $location.search({type: $scope.search.type}).replace();
+    }
+  };
+
+  $scope.toggleSearchEndpoint = function(endpoint){
+    $scope.hideActionsPopover();
+    if ($scope.search.endpoint === endpoint || endpoint === null) {
+      $scope.search.endpoint = null;
+    }
+    else {
+      $scope.search.endpoint = endpoint;
+    }
+    $scope.sort();
+  };
+
+  $scope.toggleSort = function(sort){
+    if ($scope.search.sort === sort && !$scope.search.asc) {
+      $scope.search.asc = undefined;
+      $scope.search.sort = undefined;
+    }
+    else {
+      $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true;
+      $scope.search.sort = sort;
+    }
+    $scope.sort();
+  };
+
+  $scope.toggleCompactMode = function() {
+    $scope.compactMode = !$scope.compactMode;
+    $scope.$broadcast('$$rebind::rebind'); // force data binding
+  };
+
+  $scope.selectPeer = function(peer) {
+    if (peer.compacted && $scope.compactMode) {
+      $scope.toggleCompactMode();
+      return;
+    }
+
+    // Skip offline or not a BMA peer
+    if (!peer.online || !peer.hasBma()) return;
+
+    var stateParams = {server: peer.getServer()};
+    if (peer.isSsl()) {
+      stateParams.ssl = true;
+    }
+    if (peer.isTor()) {
+      stateParams.tor = true;
+    }
+    $state.go('app.view_peer', stateParams);
+  };
+
+  $scope.$on('csView.action.refresh', function(event, context) {
+    if (context === 'peers') {
+      $scope.refresh();
+    }
+  });
+
+  $scope.$on('csView.action.showActionsPopover', function(event, clickEvent) {
+    $scope.showActionsPopover(clickEvent);
+  });
+
+  /* -- popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/network/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  $scope.showEndpointsPopover = function($event, peer, endpointName) {
+    $event.preventDefault();
+    $event.stopPropagation();
+
+    var endpoints = peer.getEndpoints(endpointName);
+    endpoints = (endpoints||[]).reduce(function(res, ep) {
+        var bma = BMA.node.parseEndPoint(ep) || BMA.node.parseEndPoint(ep, endpointName);
+        return res.concat({
+          label: 'NETWORK.VIEW.NODE_ADDRESS',
+          value: peer.getServer(bma) + (bma && bma.path||'')
+        });
+      }, []);
+    if (!endpoints.length) return;
+
+    // Call extension points
+    UIUtils.popover.show($event, {
+      templateUrl: 'templates/network/popover_endpoints.html',
+      bindings: {
+        titleKey: 'NETWORK.VIEW.ENDPOINTS.' + endpointName,
+        items: endpoints
+      }
+    });
+  };
+
+  $scope.showWs2pPopover = function($event, peer) {
+    $event.stopPropagation();
+
+    return $translate('NETWORK.VIEW.PRIVATE_ACCESS')
+      .then(function(privateAccessMessage) {
+        UIUtils.popover.show($event, {
+          templateUrl: 'templates/network/popover_endpoints.html',
+          bindings: {
+            titleKey: 'NETWORK.VIEW.ENDPOINTS.WS2P',
+            valueKey: 'NETWORK.VIEW.NODE_ADDRESS',
+            items: [
+              {
+                label: 'NETWORK.VIEW.NODE_ADDRESS',
+                value: !peer.bma.private ? (peer.getServer() + (peer.bma.path||'')) : privateAccessMessage
+              },
+              {
+                label: 'NETWORK.VIEW.WS2PID',
+                value: peer.bma.ws2pid
+              },
+              {
+                label: 'NETWORK.VIEW.POW_PREFIX',
+                value: peer.powPrefix
+              }]
+            }
+          });
+      });
+  };
+
+
+
+  /* -- help tip -- */
+
+  // Show help tip
+  $scope.showHelpTip = function(index, isTour) {
+    index = angular.isDefined(index) ? index : csSettings.data.helptip.network;
+    isTour = angular.isDefined(isTour) ? isTour : false;
+    if (index < 0) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope();
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+    helptipScope.tour = isTour;
+
+    return helptipScope.startNetworkTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        if (!isTour) {
+          csSettings.data.helptip.network = endIndex;
+          csSettings.store();
+        }
+      });
+  };
+}
+
+
+function NetworkLookupModalController($scope, $controller, parameters) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('NetworkLookupCtrl', {$scope: $scope}));
+
+  // Read parameters
+  parameters = parameters || {};
+  $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : true;
+  $scope.search.type = angular.isDefined(parameters.type) ? parameters.type : $scope.search.type;
+  $scope.search.endpoint = angular.isDefined(parameters.endpoint) ? parameters.endpoint : $scope.search.endpoint;
+  $scope.search.bma = angular.isDefined(parameters.bma) ? parameters.bma : $scope.search.bma;
+  $scope.search.ssl = angular.isDefined(parameters.ssl) ? parameters.ssl : $scope.search.ssl;
+  $scope.search.ws2p = angular.isDefined(parameters.ws2p) ? parameters.ws2p : $scope.search.ws2p;
+  $scope.expertMode = angular.isDefined(parameters.expertMode) ? parameters.expertMode : $scope.expertMode;
+  $scope.ionItemClass = parameters.ionItemClass || 'item-border-large';
+  $scope.enableLocationHref = false;
+  $scope.helptipPrefix = '';
+
+  $scope.selectPeer = function(peer) {
+    $scope.closeModal(peer);
+  };
+
+  $scope.$on('modal.hidden', function(){
+    $scope.leave();
+  });
+
+  // Disable this unsed method - called by load()
+  $scope.showHelpTip = function() {};
+
+  // Enter the modal
+  $scope.enter();
+}
+
+
+function NetworkLookupPopoverController($scope, $controller) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('NetworkLookupCtrl', {$scope: $scope}));
+
+  // Read parameters
+  var parameters = parameters || {};
+  $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : true;
+  $scope.search.type = angular.isDefined(parameters.type) ? parameters.type : $scope.search.type;
+  $scope.search.endpoint = angular.isDefined(parameters.endpoint) ? parameters.endpoint : $scope.search.endpoint;
+  $scope.expertMode = angular.isDefined(parameters.expertMode) ? parameters.expertMode : $scope.expertMode;
+  $scope.ionItemClass = parameters.ionItemClass || 'item-border-large';
+  $scope.helptipPrefix = '';
+
+  $scope.selectPeer = function(peer) {
+    $scope.closePopover(peer);
+  };
+
+  $scope.$on('popover.hidden', function(){
+    $scope.leave();
+  });
+
+  // Disable this unsed method - called by load()
+  $scope.showHelpTip = function() {};
+
+  // Enter the popover
+  $scope.enter();
+}
+
+function PeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, BMA) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.formData = {};
+
+  $scope.load = function() {
+
+    console.debug("[peer-popover] Loading peer info...");
+    $scope.loading = true;
+    $scope.formData = {};
+
+    return $q.all([
+      // get current block
+      csCurrency.blockchain.current()
+        .then(function(block) {
+          $scope.formData.number = block.number;
+          $scope.formData.medianTime = block.medianTime;
+          $scope.formData.powMin = block.powMin;
+          $scope.formData.useSsl = BMA.useSsl;
+        })
+        .catch(function() {
+          delete $scope.formData.number;
+          delete $scope.formData.medianTime;
+          delete $scope.formData.powMin;
+          delete $scope.formData.useSsl;
+          // continue
+        }),
+
+      // Get node current version
+      BMA.node.summary()
+        .then(function(res){
+          $scope.formData.version = res && res.duniter && res.duniter.version;
+          $scope.formData.software = res && res.duniter && res.duniter.software;
+        })
+        .catch(function() {
+          delete $scope.formData.version;
+          delete $scope.formData.software;
+          // continue
+        }),
+
+      // Get latest version
+      BMA.version.latest()
+        .then(function(latestRelease){
+          $scope.formData.latestRelease = latestRelease;
+        })
+        .catch(function() {
+          delete $scope.formData.latestRelease;
+          // continue
+        })
+      ])
+      .then(function() {
+        // Compare, to check if newer
+        if ($scope.formData.latestRelease && $scope.formData.software == 'duniter') {
+          var compare = csHttp.version.compare($scope.formData.version, $scope.formData.latestRelease.version);
+          $scope.formData.isPreRelease = compare > 0;
+          $scope.formData.hasNewRelease = compare < 0;
+        }
+        else {
+          $scope.formData.isPreRelease = false;
+          $scope.formData.hasNewRelease = false;
+        }
+        $scope.loading = false;
+        $scope.$broadcast('$$rebind::rebind'); // force data binding
+      });
+  };
+
+  // Update UI on new block
+  csCurrency.api.data.on.newBlock($scope, function(block) {
+    if ($scope.loading) return;
+    console.debug("[peer info] Received new block. Reload content");
+    $scope.load();
+  });
+
+  // Update UI on settings changed
+  csSettings.api.data.on.changed($scope, function(data) {
+    if ($scope.loading) return;
+    console.debug("[peer info] Peer settings changed. Reload content");
+    $scope.load();
+  });
+
+  // Load data when enter
+  $scope.load();
+}
+
+function PeerViewController($scope, $q, $window, $state, UIUtils, csWot, BMA) {
+  'ngInject';
+
+  $scope.node = {};
+  $scope.loading = true;
+  $scope.isHttps = ($window.location.protocol === 'https:');
+  $scope.isReachable = true;
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    var isDefaultNode = !state.stateParams || !state.stateParams.server;
+    var server = state.stateParams && state.stateParams.server || BMA.server;
+    var useSsl = state.stateParams && state.stateParams.ssl == "true" || (isDefaultNode ? BMA.useSsl : false);
+    var useTor = state.stateParams.tor == "true" || (isDefaultNode ? BMA.useTor : false);
+
+    return $scope.load(server, useSsl, useTor)
+      .then(function() {
+        return $scope.$broadcast('$csExtension.enter', e, state);
+      })
+      .then(function(){
+        $scope.loading = false;
+      })
+      .catch(function() {
+        $scope.loading = false;
+      });
+  });
+
+  $scope.load = function(server, useSsl, useTor) {
+    var node = {
+      server: server,
+      host: server,
+      useSsl: useSsl,
+      useTor: useTor
+    };
+    var serverParts = server.split(':');
+    if (serverParts.length === 2) {
+      node.host = serverParts[0];
+      node.port = serverParts[1];
+    }
+
+    angular.merge($scope.node,
+      useTor ?
+        // For TOR, use a web2tor to access the endpoint
+        BMA.lightInstance(node.host + ".to", 443, true/*ssl*/, 60000 /*long timeout*/) :
+        BMA.lightInstance(node.host, node.port, node.useSsl),
+      node);
+
+    $scope.isReachable = !$scope.isHttps || useSsl;
+    if (!$scope.isReachable) {
+      // Get node from the default BMA node
+      return BMA.network.peers()
+        .then(function(res) {
+          // find the current peer
+          var peers = (res && res.peers || []).reduce(function(res, json) {
+            var peer = new Peer(json);
+            return (peer.getEndpoints('BASIC_MERKLED_API') || []).reduce(function(res, ep) {
+              var bma = BMA.node.parseEndPoint(ep);
+              if((bma.dns === node.host || bma.ipv4 === node.host || bma.ipv6 === node.host) && (
+                bma.port == node.port)) {
+                peer.bma = bma;
+                return res.concat(peer);
+              }
+              return res;
+            }, res);
+          }, []);
+          var peer = peers.length && peers[0];
+
+          // Current node found
+          if (peer) {
+            $scope.node.pubkey = peer.pubkey;
+            $scope.node.currency = peer.currency;
+            return csWot.extend($scope.node);
+          }
+          else {
+            console.warn('Could not get peer from /network/peers');
+          }
+        });
+    }
+
+    return $q.all([
+
+      // Get node peer info
+      $scope.node.network.peering.self()
+        .then(function(json) {
+          $scope.node.pubkey = json.pubkey;
+          $scope.node.currency = json.currency;
+        })
+        .catch(function(err){
+          console.error(err && err.message || err);
+        }),
+
+      // Get known peers
+      $scope.node.network.peers()
+        .then(function(json) {
+          var peers = (json && json.peers || []).map(function (p) {
+            var peer = new Peer(p);
+            peer.online = p.status === 'UP';
+            peer.buid = peer.block;
+            peer.blockNumber = peer.buid && peer.buid.split('-')[0];
+            peer.dns = peer.getDns();
+            peer.id = peer.keyID();
+            peer.server = peer.getServer();
+            return peer;
+          });
+
+          // Extend (add uid+name+avatar)
+          return csWot.extendAll([$scope.node].concat(peers))
+            .then(function() {
+              // Final sort
+              $scope.peers = _.sortBy(peers, function(p) {
+                var score = 1;
+                score += 10000 * (p.online ? 1 : 0);
+                score += 1000  * (p.hasMainConsensusBlock ? 1 : 0);
+                score += 100   * (p.uid ? 1 : 0);
+                return -score;
+              });
+              $scope.motion.show({selector: '.item-peer'});
+            });
+        }),
+
+        // Get current block
+        $scope.node.blockchain.current()
+          .then(function(json) {
+            $scope.current = json;
+          })
+      ])
+      .catch(function(err) {
+        console.error(err && err.message || err);
+        UIUtils.onError(useTor ? "PEER.VIEW.ERROR.LOADING_TOR_NODE_ERROR" : "PEER.VIEW.ERROR.LOADING_NODE_ERROR")(err);
+        throw err;
+      });
+  };
+
+  $scope.selectPeer = function(peer) {
+    // Skipp offline or WS2P node
+    if (!peer.online || peer.isWs2p()) return;
+
+    var stateParams = {server: peer.getServer()};
+    if (peer.isSsl()) {
+      stateParams.ssl = true;
+    }
+    if (peer.isTor()) {
+      stateParams.tor = true;
+    }
+    $state.go('app.view_peer', stateParams);
+  };
+
+  /* -- manage link to raw document -- */
+
+  $scope.openRawPeering = function(event) {
+    return $scope.openLink(event, $scope.node.url + '/network/peering');
+  };
+
+  $scope.openRawCurrentBlock = function(event) {
+    return $scope.openLink(event, $scope.node.url + '/blockchain/current');
+  };
+}
+
+
+CurrencyViewController.$inject = ['$scope', '$q', '$timeout', '$ionicPopover', 'Modals', 'BMA', 'UIUtils', 'csSettings', 'csCurrency', 'csNetwork', 'ModalUtils'];
+CurrencyLicenseModalController.$inject = ['$scope', '$http', 'UIUtils', 'csSettings', 'FileSaver'];
+angular.module('cesium.currency.controllers', ['ngFileSaver', 'cesium.services'])
+
+.config(['$stateProvider', function($stateProvider) {
+  'ngInject';
+
+  $stateProvider
+
+    .state('app.currency', {
+      url: "/currency",
+      views: {
+        'menuContent': {
+          templateUrl: "templates/currency/view_currency.html",
+          controller: 'CurrencyViewCtrl'
+        }
+      },
+      data: {
+        large: 'app.currency_lg'
+      }
+    })
+
+    .state('app.currency.tab_parameters', {
+      url: "/parameters",
+      views: {
+        'tab-parameters': {
+          templateUrl: "templates/currency/tabs/tab_parameters.html"
+        }
+      }
+    })
+
+    .state('app.currency.tab_wot', {
+      url: "/community",
+      views: {
+        'tab-wot': {
+          templateUrl: "templates/currency/tabs/tab_wot.html"
+        }
+      }
+    })
+
+    .state('app.currency.tab_network', {
+      url: "/network",
+      views: {
+        'tab-network': {
+          templateUrl: "templates/currency/tabs/tab_network.html",
+          controller: 'NetworkLookupCtrl'
+        }
+      }
+    })
+
+    .state('app.currency.tab_blocks', {
+      url: "/blocks",
+      views: {
+        'tab-blocks': {
+          templateUrl: "templates/currency/tabs/tab_blocks.html",
+          controller: 'BlockLookupCtrl'
+        }
+      }
+    })
+
+    .state('app.currency_lg', {
+      url: "/currency/lg",
+      cache: false,
+      views: {
+        'menuContent': {
+          templateUrl: "templates/currency/view_currency_lg.html",
+          controller: 'CurrencyViewCtrl'
+        }
+      }
+    })
+  ;
+
+}])
+
+  .controller('CurrencyViewCtrl', CurrencyViewController)
+
+  .controller('CurrencyLicenseModalCtrl', CurrencyLicenseModalController)
+;
+
+function CurrencyViewController($scope, $q, $timeout, $ionicPopover, Modals, BMA, UIUtils, csSettings, csCurrency, csNetwork, ModalUtils) {
+  'ngInject';
+
+  $scope.formData = {
+    useRelative: false, // Override in enter()
+    currency: '',
+    M: 0,
+    MoverN: 0,
+    UD: 0,
+    cactual: 0,
+    c: 0,
+    dt: 0,
+    sigQty: 0,
+    sigStock: 0,
+    msWindow: 0,
+    msValidity: 0,
+    sigWindow: 0,
+    sigValidity: 0,
+    sigPeriod: 0,
+    medianTime : 0,
+    difficulty : 0,
+    Nprev: 0,
+    stepMax: 0,
+    sentries: 0,
+    xpercent: 0,
+    durationFromLastUD: 0,
+    blockUid: null,
+    dtReeval: 0,
+    udReevalTime0: 0,
+    allRules: angular.isDefined(csSettings.data.currency && csSettings.data.currency.allRules) ?
+      csSettings.data.currency.allRules :
+      csSettings.data.expertMode,
+    allWotRules: angular.isDefined(csSettings.data.currency && csSettings.data.currency.allWotRules) ?
+      csSettings.data.currency.allWotRules :
+      csSettings.data.expertMode,
+    licenseUrl: csSettings.getLicenseUrl()
+  };
+  $scope.loading = true;
+  $scope.screen = UIUtils.screen;
+
+  $scope.enter = function(e, state) {
+    if ($scope.loading) { // run only once (first enter)
+      $scope.formData.useRelative = csSettings.data.useRelative;
+      csCurrency.get()
+        .then($scope.load)
+        .then(function() {
+          // Show help tip, if login
+          if ($scope.isLogin()) {
+            $scope.showHelpTip();
+          }
+        })
+        .catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED'));
+
+      csNetwork.api.data.on.mainBlockChanged($scope, function(mainBlock) {
+        if ($scope.loading) return;
+        if ($scope.formData.blockUid !== mainBlock.buid) {
+          console.debug("[currency] Updating parameters UI (new main block detected)");
+          $timeout($scope.load, 1000 /*waiting propagation to requested node*/);
+        }
+      });
+    }
+    // Notify extensions
+    $scope.$broadcast('$csExtension.enter', state);
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function() {
+    // Load data from node
+    var data = {}, M, lastUDTime, now = Date.now();
+    return $q.all([
+
+      // Get the currency parameters
+      BMA.blockchain.parameters()
+        .then(function(json){
+          data.currency = json.currency;
+          data.c = json.c;
+          data.dt = json.dt;
+          data.sigQty = json.sigQty;
+          data.sigStock = json.sigStock;
+          data.msWindow = json.msWindow;
+          data.msValidity = json.msValidity;
+          data.sigWindow = json.sigWindow;
+          data.sigValidity = json.sigValidity;
+          data.sigPeriod = json.sigPeriod;
+          data.stepMax = json.stepMax;
+          data.xpercent = json.xpercent;
+          data.avgGenTime = json.avgGenTime;
+          data.dtReeval = json.dtReeval;
+          data.udTime0 = json.udTime0;
+          data.udReevalTime0 = json.udReevalTime0;
+
+          // Compat with Duniter < 1.0
+          if (!data.dtReeval) {
+            data.dtReeval = data.dt;
+          }
+        }),
+
+      // Get the current block information
+      csCurrency.blockchain.current()
+        .then(function(block){
+          M = block.monetaryMass;
+          data.N = block.membersCount;
+          data.medianTime  = block.medianTime;
+          data.difficulty  = block.powMin;
+          data.blockUid = [block.number, block.hash].join('-');
+        })
+        .catch(function(err){
+          // Special case for currency init (root block not exists): use fixed values
+          if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+            M = 0;
+            data.N = 0;
+            data.medianTime = moment().utc().unix();
+            data.difficulty  = 0;
+            data.blockUid = null;
+            return;
+          }
+          throw err;
+        }),
+
+      // Get the UD informations
+      BMA.blockchain.stats.ud()
+        .then(function(res){
+          if (res.result.blocks.length) {
+            var lastBlockWithUD = res.result.blocks[res.result.blocks.length - 1];
+            return BMA.blockchain.block({ block: lastBlockWithUD })
+              .then(function(block){
+                data.currentUD = (block.unitbase > 0) ? block.dividend * Math.pow(10, block.unitbase) : block.dividend;
+                lastUDTime = block.medianTime;
+                data.Nprev = block.membersCount;
+              });
+          }
+          // block #0
+          else {
+            lastUDTime=0;
+            data.Nprev=0;
+            return BMA.blockchain.parameters()
+              .then(function(json){
+                data.currentUD = json.ud0;
+              });
+          }
+        })
+    ])
+
+    // Process loaded data
+    .then(function(){
+      var Mprev = M - data.currentUD * data.Nprev; // remove fresh money
+      var MoverNprev = data.Nprev ? (Mprev / data.Nprev) : 0;
+      data.cactual = MoverNprev ? 100 * data.currentUD / MoverNprev : 0;
+      data.M = M;
+      data.MoverN = data.Nprev ? ((Mprev ? Mprev : M/*need at currency start only*/) / data.Nprev) : 0;
+      data.UD = data.currentUD;
+      data.durationFromLastUD = lastUDTime ? data.medianTime - lastUDTime : 0;
+      data.sentries = Math.ceil(Math.pow(data.N, 1/ data.stepMax));
+
+      // Apply to formData
+      angular.extend($scope.formData, data);
+
+      console.debug("[currency] Parameters loaded in " + (Date.now() - now) + 'ms' );
+      $scope.loading = false;
+      $scope.$broadcast('$$rebind::rebind'); // force bind of currency name
+
+      // Set Ink
+      UIUtils.ink();
+
+      return UIUtils.loading.hide();
+    })
+    .catch(function(err) {
+      $scope.loading = false;
+      UIUtils.onError('ERROR.LOAD_PEER_DATA_FAILED')(err);
+    });
+  };
+
+  $scope.refresh = function() {
+    if ($scope.loading) return;
+
+    $scope.loading= true;
+    UIUtils.loading.show();
+
+    // Load data
+    return $scope.load()
+      .then(function() {
+        // Notify extensions
+        $scope.$broadcast('csView.action.refresh', 'currency');
+      });
+  };
+
+  $scope.refreshPeers = function() {
+    $scope.$broadcast('csView.action.refresh', 'peers');
+    return $q.when(); // need by 'ion-refresher'
+  };
+
+  $scope.showExtendActionsPopover = function(event) {
+    $scope.$broadcast('csView.action.showActionsPopover', event);
+  };
+
+  $scope.onAllRulesChange = function() {
+    csSettings.data.currency = csSettings.data.currency || {};
+    if (csSettings.data.currency.allRules !== $scope.formData.allRules) {
+      csSettings.data.currency.allRules = $scope.formData.allRules;
+      csSettings.store();
+    }
+  };
+  $scope.$watch('formData.allRules', $scope.onAllRulesChange);
+
+  $scope.onAllWotRulesChange = function() {
+    csSettings.data.currency = csSettings.data.currency || {};
+    if (csSettings.data.currency.allWotRules !== $scope.formData.allWotRules) {
+      csSettings.data.currency.allWotRules = $scope.formData.allWotRules;
+      csSettings.store();
+    }
+  };
+  $scope.$watch('formData.allWotRules', $scope.onAllWotRulesChange);
+
+  /* -- help tip -- */
+
+
+  $scope.startCurrencyTour = function() {
+    $scope.hideActionsPopover();
+    return $scope.showHelpTip(0, true);
+  };
+
+  $scope.showHelpTip = function(index, isTour) {
+    index = angular.isDefined(index) ? index : csSettings.data.helptip.currency;
+    isTour = angular.isDefined(isTour) ? isTour : false;
+    if (index < 0) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope(isTour);
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+    helptipScope.tour = isTour;
+
+    return helptipScope.startCurrencyTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        csSettings.data.helptip.currency = endIndex;
+        csSettings.store();
+      });
+  };
+
+  /* -- modals -- */
+
+  $scope.showLicenseModal = function() {
+    return ModalUtils.show('templates/currency/modal_license.html','CurrencyLicenseModalCtrl');
+  };
+
+  $scope.showHelpModal = function(helpAnchor) {
+    Modals.showHelp({anchor: helpAnchor});
+  };
+
+  /* -- popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/currency/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+}
+
+
+function CurrencyLicenseModalController($scope, $http, UIUtils, csSettings, FileSaver) {
+  'ngInject';
+
+  $scope.loading = true;
+
+  $scope.load = function() {
+    if ($scope.loading) {
+      $scope.licenseUrl = csSettings.getLicenseUrl();
+      // Use HTML in iframe, when original file is markdown (fix #538)
+      if ($scope.licenseUrl && $scope.licenseUrl.substring($scope.licenseUrl.length - 3) != '.txt') {
+        $scope.licenseUrlHtml = $scope.licenseUrl + '.html';
+        $scope.licenseUrl = $scope.licenseUrl +'.txt';
+      }
+      $scope.loading = false;
+    }
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  $scope.downloadFile = function() {
+    if (!$scope.licenseUrl) return;
+    return $http.get($scope.licenseUrl)
+      .success(function(data){
+        var file = new Blob([data], {type: 'text/plain; charset=utf-8'});
+        FileSaver.saveAs(file, 'license.txt');
+      }).error(function(){
+        UIUtils.onError('ERROR.GET_LICENSE_FILE_FAILED')();
+      });
+
+  };
+}
+
+
+TransferController.$inject = ['$scope', '$controller', 'UIUtils'];
+TransferModalController.$inject = ['$scope', '$q', '$translate', '$timeout', '$filter', '$focus', 'Device', 'BMA', 'UIUtils', 'Modals', 'csWallet', 'csWot', 'csCurrency', 'csSettings', 'parameters'];angular.module('cesium.transfer.controllers', ['cesium.services', 'cesium.currency.controllers'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+    $stateProvider
+
+      .state('app.new_transfer', {
+        cache: false,
+        url: "/transfer?amount&udAmount&comment&restPub&all&wallet",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/new_transfer.html",
+            controller: 'TransferCtrl'
+          }
+        }
+      })
+
+      .state('app.new_transfer_pubkey_uid', {
+        cache: false,
+        url: "/transfer/:pubkey/:uid?amount&udAmount&comment&restPub&all&wallet",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/new_transfer.html",
+            controller: 'TransferCtrl'
+          }
+        }
+      })
+
+      .state('app.new_transfer_pubkey', {
+        cache: false,
+        url: "/transfer/:pubkey?amount&udAmount&comment&restPub&all&wallet",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/wallet/new_transfer.html",
+            controller: 'TransferCtrl'
+          }
+        }
+      })
+    ;
+  }])
+
+  .controller('TransferCtrl', TransferController)
+
+  .controller('TransferModalCtrl', TransferModalController)
+;
+
+function TransferController($scope, $controller, UIUtils) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('TransferModalCtrl', {$scope: $scope, parameters: {}}));
+
+  $scope.enter = function(e, state) {
+
+    // Apply state  parameters
+    if (state && state.stateParams) {
+      $scope.setParameters(state.stateParams);
+    }
+
+    // Load wallet
+    return $scope.load()
+      .then(UIUtils.loading.hide);
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.setForm = function(form) {
+    $scope.form = form;
+  };
+
+  // override modal close
+  $scope.closeModal = function() {
+    return $scope.showHome();
+  };
+}
+
+function TransferModalController($scope, $q, $translate, $timeout, $filter, $focus, Device, BMA, UIUtils, Modals,
+                                 csWallet, csWot, csCurrency, csSettings, parameters) {
+  'ngInject';
+
+  var
+    wallet,
+    minQuantitativeAmount = 0.01;
+
+  $scope.convertedBalance = 0;
+  $scope.formData = {
+    destPub: null,
+    amount: null,
+    comment: null,
+    useRelative: csSettings.data.useRelative,
+    useComment: false,
+    all: false,
+    restPub: null,
+    restAmount: null,
+    walletId: null
+  };
+  $scope.udAmount = null;
+  $scope.minAmount = minQuantitativeAmount;
+  $scope.commentPattern = BMA.regexp.COMMENT;
+  $scope.currency = csCurrency.data.name;
+  $scope.loading = true;
+  $scope.commentInputId = 'transferComment-' + $scope.$id;
+  $scope.enableSelectWallet = true;
+
+  // Define keyboard settings, to bind with model (If small screen AND mobile devices)
+  $scope.smallscreen = angular.isDefined($scope.smallscreen) ? $scope.smallscreen : UIUtils.screen.isSmall();
+  if ($scope.smallscreen || Device.enable) {
+    $scope.digitKeyboardSettings = $scope.digitKeyboardSettings || Device.keyboard.digit.settings.bindModel(
+        $scope,
+        'formData.amount',
+        {
+          decimal: true,
+          decimalSeparator: '.',
+          resizeContent:false
+        });
+    $scope.digitKeyboardVisible = false;
+  }
+
+  $scope.setParameters = function(parameters) {
+    if (!parameters) return;
+    if (parameters.pubkey) {
+      $scope.formData.destPub = parameters.pubkey;
+    }
+    if (parameters.uid) {
+      $scope.destUid = parameters.uid;
+      $scope.destPub = '';
+    }
+    else {
+      $scope.destUid = '';
+      $scope.destPub = parameters.pubkey;
+    }
+    if (parameters.amount) {
+      $scope.formData.amount = parameters.amount;
+      $scope.formData.useRelative=false;
+    }
+    else if (parameters.udAmount) {
+      $scope.formData.amount = parameters.udAmount;
+      $scope.formData.useRelative=true;
+    }
+    if (parameters.comment) {
+      $scope.formData.useComment=true;
+      $scope.formData.comment = parameters.comment;
+    }
+    if (parameters.restPub || parameters.all) {
+      $scope.restUid = '';
+      $scope.restPub = parameters.restPub;
+      $scope.formData.restPub = parameters.restPub;
+      $scope.formData.all = true;
+    }
+    else {
+      $scope.formData.all = false;
+    }
+    if (!parameters.wallet || parameters.wallet === "default") {
+      $scope.formData.walletId = csWallet.id;
+    }
+    else {
+      $scope.formData.walletId = parameters.wallet;
+    }
+  };
+  // Read default parameters
+  $scope.setParameters(parameters);
+
+  $scope.load = function() {
+    $scope.enableSelectWallet = csWallet.children.count() > 0;
+
+    wallet = $scope.enableSelectWallet && ($scope.formData.walletId ? csWallet.children.get($scope.formData.walletId) : csWallet) || csWallet;
+    if (!wallet.isDefault()) {
+      console.debug("[transfer] Using wallet {" + wallet.id + "}");
+    }
+    // Make to sure to load full wallet data (balance)
+    return wallet.login({sources: true, silent: true})
+      .then(function(data) {
+        if (!wallet || $scope.$$destroyed) return; // user have cancelled before end of load
+        $scope.walletData = data;
+        $scope.formData.walletId = wallet.id;
+        $scope.onUseRelativeChanged();
+        $scope.onAmountChanged();
+
+        $scope.$watch('walletData.balance', $scope.onAmountChanged, true);
+        $scope.$watch('formData.amount', $scope.onAmountChanged, true);
+
+        $scope.$watch('formData.useRelative', $scope.onUseRelativeChanged, true);
+        $scope.$watch('walletData.balance', $scope.onUseRelativeChanged, true);
+
+        UIUtils.ink({selector: '.modal-transfer .ink'});
+
+        if (!$scope.destPub || $scope.destUid) {
+          $scope.loading = false;
+        }
+        else {
+          // Fill the uid from the pubkey
+          return csWot.extend({pubkey: $scope.destPub})
+            .then(function(res) {
+              $scope.destUid = res && (res.name || res.uid);
+              if ($scope.destUid) {
+                $scope.destPub = '';
+              }
+              $scope.loading = false;
+            });
+        }
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') return $scope.cancel(); // close the modal
+        UIUtils.onError('ERROR.LOGIN_FAILED')(err);
+      });
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  $scope.cancel = function() {
+    $scope.closeModal();
+    wallet = null;
+  };
+
+  // When changing use relative UD
+  $scope.onUseRelativeChanged = function() {
+    $scope.currency = csCurrency.data.name;
+    if ($scope.formData.useRelative) {
+      $scope.convertedBalance = $scope.walletData.balance / csCurrency.data.currentUD;
+      $scope.minAmount = minQuantitativeAmount / (csCurrency.data.currentUD / 100);
+    } else {
+      $scope.convertedBalance = $scope.walletData.balance / 100;
+      $scope.minAmount = minQuantitativeAmount;
+    }
+    if ($scope.form && !$scope.loading) {
+      $scope.form.$setPristine(true);
+    }
+  };
+
+  $scope.onAmountChanged = function() {
+    if ($scope.sending) return; // skip if sending TX
+
+    var amount = $scope.formData.amount;
+    if (amount && typeof amount === "string") {
+      amount = parseFloat(amount.replace(new RegExp('[.,]'), '.'));
+    }
+
+    var valid = true;
+
+    // Avoid amount less than the minimal - fix #373
+    if (amount && amount < $scope.minAmount) {
+      valid = false;
+      $scope.form.amount.$error = $scope.form.amount.$error || {};
+      $scope.form.amount.$error.min = true;
+    }
+    else if ($scope.form.amount && $scope.form.amount.$error && $scope.form.amount.$error.min){
+      delete $scope.form.amount.$error.min;
+    }
+
+    // Avoid amount greater than the balance
+    if (amount && amount > $scope.convertedBalance){
+      $scope.form.$valid = false;
+      $scope.form.amount.$invalid = true;
+      $scope.form.amount.$error = $scope.form.amount.$error || {};
+      $scope.form.amount.$error = {max: true};
+    }
+    else if ($scope.form.amount && $scope.form.amount.$error && $scope.form.amount.$error.max){
+      delete $scope.form.amount.$error.max;
+    }
+
+    $scope.form.$valid = valid;
+    if ($scope.form.amount) $scope.form.amount.$invalid = !valid;
+
+    if (!valid || !$scope.formData.all || !amount) {
+      $scope.formData.restAmount = undefined;
+    }
+    else {
+      if ($scope.formData.useRelative) {
+        $scope.formData.restAmount = $scope.walletData.balance - amount * csCurrency.data.currentUD;
+        if ($scope.formData.restAmount < minQuantitativeAmount) {
+          $scope.formData.restAmount = 0;
+        }
+      } else {
+        $scope.formData.restAmount  = $scope.walletData.balance - amount * 100;
+      }
+    }
+  };
+
+  $scope.doTransfer = function() {
+    $scope.form.$submitted=true;
+
+    if(!$scope.form.$valid || !$scope.formData.destPub || !$scope.formData.amount) {
+      return;
+    }
+    var amount = $scope.formData.amount;
+    if (typeof amount === "string") {
+      amount = parseFloat(amount.replace(new RegExp('[.,]'), '.'));
+    }
+
+    // Avoid multiple call
+    if ($scope.sending) return;
+    $scope.sending = true;
+
+    var currentUD;
+    return $q.all([
+        // Make sure user is auth
+        wallet.auth({silent: true}),
+
+        // Get current UD
+        csCurrency.currentUD()
+          .then(function(res) {
+            currentUD = res;
+          }),
+
+        // Hide digit keyboard
+        $scope.hideDigitKeyboard(300)
+       ])
+      .then($scope.askTransferConfirm)
+      .then(function(confirm){
+        if (!confirm) {
+          $scope.sending = false;
+          return;
+        }
+
+        return UIUtils.loading.show()
+          .then(function(){
+            // convert amount
+            if ($scope.formData.useRelative) {
+              amount = currentUD * amount;
+            }
+            else {
+              amount = amount.toFixed(2) * 100; // remove 2 decimals on quantitative mode
+            }
+
+            // convert comment: trim, then null if empty
+            var comment = $scope.formData.comment && $scope.formData.comment.trim();
+            if (comment && !comment.length) {
+              comment = null;
+            }
+            var hasRest = $scope.formData.all  && $scope.formData.restAmount > 0;
+            if (hasRest) {
+              return wallet.transferAll($scope.formData.destPub, amount, comment, $scope.formData.useRelative, $scope.formData.restPub);
+            }
+            else {
+              return wallet.transfer($scope.formData.destPub, amount, comment, $scope.formData.useRelative);
+            }
+          })
+          .then(function() {
+            UIUtils.loading.hide();
+            return $scope.closeModal(true);
+          })
+          .then(function(res) {
+            $timeout(function() {
+              $scope.sending = false;
+              UIUtils.toast.show('INFO.TRANSFER_SENT');
+            }, 500);
+            return res;
+          });
+    })
+    .catch(function(err) {
+      $scope.sending = false;
+      // Wallet auth cancelled by user
+      if (err === 'CANCELLED') return;
+      UIUtils.onError('ERROR.SEND_TX_FAILED')(err);
+    });
+  };
+
+  $scope.askTransferConfirm = function() {
+    return $translate(['COMMON.UD', 'COMMON.EMPTY_PARENTHESIS'])
+      .then(function(translations) {
+        var hasRest = $scope.formData.all  && $scope.formData.restAmount > 0;
+        return $translate(hasRest ? 'CONFIRM.TRANSFER_ALL' : 'CONFIRM.TRANSFER', {
+          from: $scope.walletData.isMember ? $scope.walletData.uid : $filter('formatPubkey')($scope.walletData.pubkey),
+          to: $scope.destUid || $scope.destPub,
+          amount: $scope.formData.amount,
+          unit: $scope.formData.useRelative ? translations['COMMON.UD'] : $filter('abbreviate')($scope.currency),
+          comment: (!$scope.formData.comment || $scope.formData.comment.trim().length === 0) ? translations['COMMON.EMPTY_PARENTHESIS'] : $scope.formData.comment,
+          restAmount: hasRest && $filter('formatAmount')($scope.formData.restAmount, {useRelative: $scope.formData.useRelative}),
+          restTo: hasRest && ($scope.restUid || $scope.restPub)
+        });
+      })
+      .then(UIUtils.alert.confirm);
+  };
+
+  $scope.addComment = function() {
+    $scope.formData.useComment = true;
+    // Focus on comment field
+    };
+
+  /* -- modals -- */
+  $scope.showWotLookupModal = function(formDataField) {
+
+    formDataField = formDataField || 'destPub';
+
+    // Hide numerical keyboard
+    $scope.hideDigitKeyboard(0);
+
+    return Modals.showWotLookup({enableWallets: true})
+      .then(function(result){
+        if (result) {
+          if (formDataField === 'destPub') {
+            $scope.destUid = result.uid;
+            $scope.destPub = result.uid ? '' : result.pubkey;
+            $scope.formData.destPub = result.pubkey;
+          }
+          else if (formDataField === 'restPub') {
+            $scope.restUid = result.uid;
+            $scope.restPub = result.uid ? '' : result.pubkey;
+            $scope.formData.restPub = result.pubkey;
+          }
+        }
+      });
+  };
+
+  $scope.showSelectWalletModal = function() {
+    if (!$scope.enableSelectWallet) return;
+
+    return Modals.showSelectWallet({
+      useRelative: $scope.formData.useRelative,
+      showDefault: true,
+      showBalance: true
+    })
+      .then(function(newWallet) {
+        if (!newWallet || (wallet && wallet.id === newWallet.id)) return;
+        wallet = newWallet;
+        $scope.walletData = wallet.data;
+        console.debug("[transfer] Using wallet {" + wallet.id + "}");
+        $scope.onAmountChanged();
+      });
+  };
+
+  /* -- popover -- */
+
+  $scope.showUnitPopover = function($event) {
+    UIUtils.popover.show($event, {
+      templateUrl: 'templates/wallet/popover_unit.html',
+      scope: $scope
+    })
+    .then(function(useRelative) {
+      $scope.formData.useRelative = useRelative;
+    });
+  };
+
+  /* -- keyboard -- */
+  $scope.showDigitKeyboard = function() {
+    // No keyboard settings, or already visible: skip
+    if (!$scope.digitKeyboardSettings || $scope.digitKeyboardVisible) return;
+
+    // Device enable: hide OS keyboard
+    if (Device.enable) {
+
+      // Hide device keyboard
+      Device.keyboard.close();
+
+      // Open the digit keyboard (with a delay)
+      return $timeout(function() {
+        $scope.digitKeyboardVisible = true;
+      }, 200);
+    }
+
+    // Open the digit keyboard
+    $scope.digitKeyboardVisible = true;
+    return $q.when();
+  };
+
+  $scope.hideDigitKeyboard = function(timeout) {
+    if (!$scope.digitKeyboardVisible) return $q.when();
+    $scope.digitKeyboardVisible = false;
+    return $timeout(function() {}, timeout||200);
+  };
+}
+
+
+
+SettingsController.$inject = ['$scope', '$q', '$window', '$ionicHistory', '$ionicPopup', '$timeout', '$translate', '$ionicPopover', 'UIUtils', 'Modals', 'BMA', 'csHttp', 'csConfig', 'csCurrency', 'csSettings', 'csPlatform'];
+angular.module('cesium.settings.controllers', ['cesium.services', 'cesium.currency.controllers'])
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.settings', {
+        url: "/settings",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/settings/settings.html",
+            controller: 'SettingsCtrl'
+          }
+        }
+      })
+    ;
+  }])
+
+  .controller('SettingsCtrl', SettingsController)
+;
+
+function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $timeout, $translate, $ionicPopover,
+                            UIUtils, Modals, BMA, csHttp, csConfig, csCurrency, csSettings, csPlatform) {
+  'ngInject';
+
+  $scope.formData = angular.copy(csSettings.data);
+  $scope.popupData = {}; // need for the node popup
+  $scope.loading = true;
+  $scope.nodePopup = {};
+  $scope.bma = BMA;
+
+
+  $scope.keepAuthIdleLabels = {
+    /*0: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.NEVER'
+    },*/
+    10: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.SECONDS',
+      labelParams: {value: 10}
+    },
+    30: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.SECONDS',
+      labelParams: {value: 30}
+    },
+    60: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.MINUTE',
+      labelParams: {value: 1}
+    },
+    600: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.MINUTES',
+      labelParams: {value: 10}
+    },
+    3600: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.HOUR',
+      labelParams: {value: 1}
+    },
+    9999: {
+      labelKey: 'SETTINGS.KEEP_AUTH_OPTION.ALWAYS'
+    }
+  };
+  $scope.keepAuthIdles = _.keys($scope.keepAuthIdleLabels);
+
+  $scope.blockValidityWindowLabels = {
+    0: {
+      labelKey: 'SETTINGS.BLOCK_VALIDITY_OPTION.NONE'
+    },
+    6: {
+      labelKey: 'SETTINGS.BLOCK_VALIDITY_OPTION.N',
+      labelParams: {count: 6, time: undefined /*defined in enter*/}
+    },
+    12: {
+      labelKey: 'SETTINGS.BLOCK_VALIDITY_OPTION.N',
+      labelParams: {count: 12, time: undefined /*defined in enter*/}
+    },
+    24: {
+      labelKey: 'SETTINGS.BLOCK_VALIDITY_OPTION.N',
+      labelParams: {count: 24, time: undefined /*defined in enter*/}
+    }
+  };
+  $scope.blockValidityWindows = _.keys($scope.blockValidityWindowLabels);
+
+  $scope.$on('$ionicView.enter', function() {
+    $q.all([
+      csSettings.ready(),
+      csCurrency.parameters()
+        .catch(function(err) {
+          // Continue (will use default value)
+          // Make sure to continue even if node is down - Fix #788
+        })
+        .then(function(parameters) {
+          var avgGenTime = parameters && parameters.avgGenTime;
+          if (!avgGenTime || avgGenTime < 0) {
+            console.warn("[settings] Could not not currency parameters. Using default G1 'avgGenTime' (300s)");
+            avgGenTime = 300; /* = G1 value = 5min */
+          }
+          _.each($scope.blockValidityWindows, function(blockCount) {
+            if (blockCount > 0) {
+              $scope.blockValidityWindowLabels[blockCount].labelParams.time = avgGenTime * blockCount;
+            }
+          });
+        })
+    ])
+    .then($scope.load);
+  });
+
+  $scope.setPopupForm = function(popupForm) {
+    $scope.popupForm = popupForm;
+  };
+
+  $scope.load = function() {
+    $scope.loading = true; // to avoid the call of csWallet.store()
+
+    // Fill locales
+    $scope.locales = angular.copy(csSettings.locales);
+
+    // Apply settings
+    angular.merge($scope.formData, csSettings.data);
+
+    // Make sure to use full locale object (id+name)
+    $scope.formData.locale = (csSettings.data.locale && csSettings.data.locale.id && _.findWhere($scope.locales, {id: csSettings.data.locale.id})) ||
+      _.findWhere($scope.locales, {id: csSettings.defaultSettings.locale.id});
+
+
+    return $timeout(function() {
+      $scope.loading = false;
+      // Set Ink
+      UIUtils.ink({selector: '.item'});
+      $scope.showHelpTip();
+    }, 100);
+  };
+
+  $scope.reset = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+    }
+    $scope.pendingSaving = true;
+    csSettings.reset()
+      .then(csPlatform.restart)
+      .then(function() {
+        // reload
+        $scope.load();
+        $scope.pendingSaving = false;
+      });
+  };
+
+  $scope.changeLanguage = function(langKey) {
+    $translate.use(langKey);
+  };
+
+  // Change node
+  $scope.changeNode= function(node) {
+    var port = !!$scope.formData.node.port && $scope.formData.node.port != 80 && $scope.formData.node.port != 443 ? $scope.formData.node.port : undefined;
+    node = node || {
+        host: $scope.formData.node.host,
+        port: port,
+        useSsl: angular.isDefined($scope.formData.node.useSsl) ?
+          $scope.formData.node.useSsl :
+          ($scope.formData.node.port == 443)
+      };
+    $scope.showNodePopup(node)
+    .then(function(newNode) {
+      if (newNode.host === $scope.formData.node.host &&
+        newNode.port === $scope.formData.node.port &&
+        newNode.useSsl === $scope.formData.node.useSsl && !$scope.formData.node.temporary) {
+        return; // same node = nothing to do
+      }
+      UIUtils.loading.show();
+
+      BMA.isAlive(newNode)
+        .then(function(alive) {
+          if (!alive) {
+            UIUtils.loading.hide();
+            return UIUtils.alert.error('ERROR.INVALID_NODE_SUMMARY')
+              .then(function(){
+                $scope.changeNode(newNode); // loop
+              });
+          }
+          UIUtils.loading.hide();
+          angular.merge($scope.formData.node, newNode);
+          delete $scope.formData.node.temporary;
+          BMA.stop();
+          BMA.copy(newNode);
+          $scope.bma = BMA;
+
+          // Restart platform (or start if not already started)
+          csPlatform.restart();
+
+          // Reset history cache
+          return $ionicHistory.clearCache();
+        });
+    });
+  };
+
+  $scope.showNodeList = function() {
+    // Check if need a filter on SSL node
+    var forceUseSsl = (csConfig.httpsMode === 'true' || csConfig.httpsMode === true || csConfig.httpsMode === 'force') ||
+    ($window.location && $window.location.protocol === 'https:') ? true : false;
+
+    $ionicPopup._popupStack[0].responseDeferred.promise.close();
+    return Modals.showNetworkLookup({
+      enableFilter: true, // enable filter button
+      bma: true, // only BMA node
+      ssl: forceUseSsl ? true : undefined
+    })
+      .then(function (peer) {
+        if (peer) {
+          var bma = peer.getBMA();
+          return {
+            host: (bma.dns ? bma.dns :
+                   (peer.hasValid4(bma) ? bma.ipv4 : bma.ipv6)),
+            port: bma.port || 80,
+            useSsl: bma.useSsl || bma.port == 443
+          };
+        }
+      })
+      .then(function(newNode) {
+        $scope.changeNode(newNode);
+      });
+  };
+
+  // Show node popup
+  $scope.showNodePopup = function(node) {
+    return $q(function(resolve, reject) {
+      $scope.popupData.newNode = node.port ? [node.host, node.port].join(':') : node.host;
+      $scope.popupData.useSsl = node.useSsl;
+      if (!!$scope.popupForm) {
+        $scope.popupForm.$setPristine();
+      }
+      $translate(['SETTINGS.POPUP_PEER.TITLE', 'COMMON.BTN_OK', 'COMMON.BTN_CANCEL'])
+        .then(function (translations) {
+          // Choose UID popup
+          $ionicPopup.show({
+            templateUrl: 'templates/settings/popup_node.html',
+            title: translations['SETTINGS.POPUP_PEER.TITLE'],
+            scope: $scope,
+            buttons: [
+              { text: translations['COMMON.BTN_CANCEL'] },
+              {
+                text: translations['COMMON.BTN_OK'],
+                type: 'button-positive',
+                onTap: function(e) {
+                  $scope.popupForm.$submitted=true;
+                  if(!$scope.popupForm.$valid || !$scope.popupForm.newNode) {
+                    //don't allow the user to close unless he enters a node
+                    e.preventDefault();
+                  } else {
+                    return {
+                      server: $scope.popupData.newNode,
+                      useSsl: $scope.popupData.useSsl
+                    };
+                  }
+                }
+              }
+            ]
+          })
+          .then(function(res) {
+            if (!res) { // user cancel
+              UIUtils.loading.hide();
+              return;
+            }
+            var parts = res.server.split(':');
+            parts[1] = parts[1] ? parts[1] : 80;
+            resolve({
+              host: parts[0],
+              port: parts[1],
+              useSsl: res.useSsl
+            });
+          });
+        });
+      });
+    };
+
+  $scope.save = function() {
+    if ($scope.loading || $scope.pendingSaving) return $q.when();
+    if ($scope.saving) {
+      $scope.pendingSaving = true;
+      // Retry later
+      return $timeout(function() {
+        $scope.pendingSaving = false;
+        return $scope.save();
+      }, 500);
+    }
+    $scope.saving = true;
+
+    // Async - to avoid UI lock
+    return $timeout(function() {
+      // Make sure to format helptip
+      $scope.cleanupHelpTip();
+
+      // Applying
+      csSettings.apply($scope.formData);
+
+      // Store
+      return csSettings.store();
+
+    }, 100)
+    .then(function() {
+      //return $timeout(function() {
+        $scope.saving = false;
+      //}, 100);
+    });
+  };
+
+  $scope.onDataChanged = function(oldValue, newValue, scope) {
+    if ($scope.loading || $scope.pendingSaving) return $q.when();
+    if ($scope.saving) {
+      $scope.pendingSaving = true;
+      // Retry later
+      return $timeout(function() {
+        $scope.pendingSaving = false;
+        return $scope.onDataChanged(oldValue, newValue, scope);
+      }, 500);
+    }
+
+    // Changes from the current scope: save changes
+    if ((scope === $scope) && !angular.equals(oldValue, newValue)) {
+      $scope.save();
+    }
+  };
+  $scope.$watch('formData', $scope.onDataChanged, true);
+
+  // Detected changes from outside (e.g. enabling encryption on wallet can be rollback if user cancel auth)
+  csSettings.api.data.on.changed($scope, function(data) {
+    if ($scope.loading || $scope.saving || $scope.pendingSaving) return;
+
+    var updated = !angular.equals(data.useLocalStorageEncryption, $scope.formData.useLocalStorageEncryption);
+    if (updated) {
+      console.debug('[settings] Settings changed (outside the settings page). Reloading...');
+      $scope.load();
+    }
+  });
+
+  $scope.getServer = function() {
+    if (!$scope.formData.node || !$scope.formData.node.host) return '';
+    return csHttp.getServer($scope.formData.node.host, $scope.formData.node.port);
+  };
+
+  $scope.cleanupHelpTip = function() {
+    var helptipChanged = $scope.formData.helptip.enable !== csSettings.data.helptip.enable;
+    if (helptipChanged) {
+      var enable = $scope.formData.helptip.enable;
+      // Apply default values
+      $scope.formData.helptip = angular.merge({}, csSettings.defaultSettings.helptip);
+      // Then restore the enable flag
+      $scope.formData.helptip.enable = enable;
+    }
+  };
+
+  /* -- modals & popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/settings/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  $scope.startSettingsTour = function() {
+    $scope.hideActionsPopover();
+
+    return $scope.showHelpTip(0, true);
+  };
+
+  // Show help tip (show only not already shown)
+  $scope.showHelpTip = function(index, tour) {
+    if (!$scope.isLogin() && !tour) return;
+    index = angular.isDefined(index) ? index : csSettings.data.helptip.settings;
+    if (index < 0) return;
+    if (index === 0) index = 1; // skip first step
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope(tour);
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    return helptipScope.startSettingsTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        csSettings.data.helptip.settings = endIndex;
+        csSettings.store();
+      });
+  };
+}
+
+
+BlockLookupController.$inject = ['$scope', '$timeout', '$focus', '$filter', '$state', '$anchorScroll', 'UIUtils', 'BMA', 'csCurrency', 'csWot', 'csSettings'];
+BlockViewController.$inject = ['$scope', '$ionicPopover', '$state', 'UIUtils', 'BMA', 'csCurrency', 'csWot'];
+angular.module('cesium.blockchain.controllers', ['cesium.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.blockchain', {
+        url: "/blockchain",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/lookup.html",
+            controller: 'BlockLookupCtrl'
+          }
+        },
+        data: {
+          large: 'app.blockchain_lg'
+        }
+      })
+
+      .state('app.blockchain_lg', {
+        url: "/blockchain/lg",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/lookup_lg.html",
+            controller: 'BlockLookupCtrl'
+          }
+        }
+      })
+
+      .state('app.server_blockchain', {
+        url: "/network/peer/:server/blockchain?ssl&tor",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/lookup.html",
+            controller: 'BlockLookupCtrl'
+          }
+        },
+        data: {
+          large: 'app.server_blockchain_lg'
+        }
+      })
+
+      .state('app.server_blockchain_lg', {
+        url: "/network/peer/:server/blockchain/lg?ssl&tor",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/lookup_lg.html",
+            controller: 'BlockLookupCtrl'
+          }
+        }
+      })
+
+      .state('app.view_block', {
+        url: "/block/:number",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/view_block.html",
+            controller: 'BlockViewCtrl'
+          }
+        }
+      })
+
+      .state('app.view_block_hash', {
+        url: "/block/:number/:hash",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/view_block.html",
+            controller: 'BlockViewCtrl'
+          }
+        }
+      })
+
+      .state('app.view_server_block_hash', {
+        url: "/network/peer/:server/block/:number/:hash?ssl&tor",
+        views: {
+          'menuContent': {
+            templateUrl: "templates/blockchain/view_block.html",
+            controller: 'BlockViewCtrl'
+          }
+        }
+      });
+  }])
+
+  .controller('BlockLookupCtrl', BlockLookupController)
+
+  .controller('BlockViewCtrl', BlockViewController)
+
+;
+
+function BlockLookupController($scope, $timeout, $focus, $filter, $state, $anchorScroll, UIUtils, BMA, csCurrency, csWot, csSettings) {
+  'ngInject';
+
+  $scope.search = {
+    result: [],
+    total: 0,
+    loading: true,
+    loadingMore: false,
+    hasMore: false,
+    type: 'last'
+  };
+  $scope.node = {};
+  $scope.currency = false;
+  $scope.entered = false;
+  $scope.searchTextId = null;
+  $scope.ionItemClass = 'item-border-large';
+  $scope.defaultSizeLimit = UIUtils.screen.isSmall() ? 50 : 100;
+  $scope.helptipPrefix = 'helptip-network';
+  $scope.listeners = [];
+
+  /**
+   * Enter into the view
+   * @param e
+   * @param state
+   */
+  $scope.enter = function(e, state) {
+    if (!$scope.entered) {
+      if (state && state.stateParams && state.stateParams.q) { // Query parameter
+        $scope.search.text = state.stateParams.q;
+        if ($scope.search.text && $scope.search.text.trim().length) {
+          $scope.search.type='text';
+        }
+      }
+
+      // Load from server if need
+      if (state && state.stateParams && state.stateParams.server) {
+        var useSsl = state.stateParams.ssl == "true";
+        var useTor = state.stateParams.tor == "true";
+
+        var node = {
+          server: state.stateParams.server,
+          host: state.stateParams.server,
+          useSsl: useSsl,
+          useTor: useTor
+        };
+        var serverParts = state.stateParams.server.split(':');
+        if (serverParts.length === 2) {
+          node.host = serverParts[0];
+          node.port = serverParts[1];
+        }
+
+        if (BMA.node.same(node)) {
+          $scope.node = BMA;
+        }
+        else {
+          $scope.node = useTor ?
+              // For TOR, use a web2tor to access the endpoint
+              BMA.instance(node.host + ".to", 443, true/*ssl*/, 600000 /*long timeout*/) :
+              BMA.instance(node.host, node.port, node.useSsl);
+          return $scope.node.blockchain.parameters()
+            .then(function(json) {
+              $scope.currency = json.currency;
+              $scope.enter(); // back to enter()
+            });
+        }
+      }
+
+      // Load currency if need
+      if (!$scope.currency) {
+        return csCurrency.get()
+          .then(function(currency) {
+            $scope.currency = currency ? currency.name : null;
+            $scope.node = currency.node ? currency.node : BMA;
+
+            if (!$scope.currency) {
+              UIUtils.alert.error('ERROR.GET_CURRENCY_FAILED');
+              return;
+            }
+            $scope.enter(); // back to enter(), with no stateParams
+          })
+          .catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED'));
+      }
+
+      $scope.compactMode = angular.isDefined($scope.compactMode) ? $scope.compactMode : true;
+      $scope.expertMode = angular.isDefined($scope.expertMode) ? $scope.expertMode : !UIUtils.screen.isSmall() && csSettings.data.expertMode;
+
+      $scope.doSearch();
+
+      $scope.addListeners();
+
+      $scope.entered = true;
+
+      $scope.showHelpTip();
+    }
+    else {
+      $scope.addListeners();
+    }
+  };
+  //$scope.$on('$ionicView.enter', $scope.enter);
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+
+  /**
+   * Leave the view
+   * @param e
+   * @param state
+   */
+  $scope.leave = function() {
+    $scope.removeListeners();
+  };
+  //$scope.$on('$ionicView.leave', $scope.leave);
+  $scope.$on('$ionicParentView.leave', $scope.leave);
+  $scope.$on('$destroy', $scope.leave);
+
+  $scope.doSearchLast = function() {
+    $scope.search.type = 'last';
+    return $scope.doSearch();
+  };
+
+  $scope.doSearch = function(from) {
+    from = angular.isDefined(from) ? from : 0;
+
+    $scope.search.loading = (from === 0);
+    $scope.search.hasMore = false;
+
+    var promise;
+
+    // get blocks
+    if (from === 0) {
+      promise = $scope.node.blockchain.current(false)
+        .then(function(current) {
+          var size = current.number < $scope.defaultSizeLimit ? current.number : $scope.defaultSizeLimit;
+          return $scope.node.blockchain.blocksSlice({count: size, from: current.number-size})
+            .then(function(blocks) {
+              if (!!blocks) blocks.splice(0,0,current);
+              return blocks;
+            });
+        })
+        .catch(function(err) {
+          // Special case when block #0 not written yet
+          if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+            return [];
+          }
+          throw err;
+        });
+    }
+    else {
+      var oldestNumber = $scope.search.results[$scope.search.results.length-1].number;
+      var size = oldestNumber < $scope.defaultSizeLimit ? oldestNumber : $scope.defaultSizeLimit;
+      promise = $scope.node.blockchain.blocksSlice({count: size, from: oldestNumber-size});
+    }
+
+    // process blocks
+    return promise
+      .then(function(blocks) {
+        // If no result
+        if (!blocks || !blocks.length) {
+          $scope.doDisplayResult([], from, 0);
+          $scope.search.loading = false;
+          return;
+        }
+
+        // Transform to entities
+        blocks = blocks.reduce(function(res, json){
+          var block = new Block(json);
+          block.cleanData(); // release arrays content
+          return res.concat(block);
+        }, []);
+
+        // Order by number (desc)
+        blocks = _.sortBy(blocks, function(b) {
+          return -1 * b.number;
+        });
+
+        // Prepare then display results
+        var total = ((from===0) ? blocks[0].number: $scope.search.results[0].number) + 1;
+        return $scope.doPrepareResult(blocks, from)
+          .then(function() {
+            $scope.doDisplayResult(blocks, from, total);
+            $scope.search.loading = false;
+          });
+      })
+
+      .catch(function(err) {
+        UIUtils.onError('BLOCKCHAIN.ERROR.SEARCH_BLOCKS_FAILED')(err);
+        $scope.search.loading = false;
+      });
+  };
+
+  var formatDateShort = $filter('formatDateShort');
+
+  $scope.doPrepareResult = function(blocks, offset) {
+    offset = angular.isDefined(offset) ? offset : 0;
+
+    if ($scope.search.type=='last') {
+
+      var previousEmptyBlockDay;
+      if (offset > 0 && $scope.search.results.length) {
+        var lastBlock = $scope.search.results[$scope.search.results.length-1];
+        previousEmptyBlockDay = lastBlock.empty ? lastBlock.day : undefined;
+      }
+
+      _.forEach(blocks, function(block, index){
+        // If empty
+        if (block.empty) {
+          // compute the day
+          var blockDay = formatDateShort(block.medianTime);
+          var notFirstEmpty = (index !== 0) || (offset !== 0);
+          var previousNotEmptyOrSameDay = !previousEmptyBlockDay || (previousEmptyBlockDay == blockDay);
+          block.compacted = notFirstEmpty && previousNotEmptyOrSameDay;
+          previousEmptyBlockDay = blockDay;
+        }
+        else {
+          previousEmptyBlockDay = undefined;
+        }
+      });
+    }
+
+    return csWot.extendAll(blocks, 'issuer');
+  };
+
+  $scope.doDisplayResult = function(res, offset, total) {
+    if (!offset) {
+      $scope.search.results = res || [];
+    }
+    else {
+      $scope.search.results = $scope.search.results.concat(res);
+    }
+    $scope.search.hasMore = total && $scope.search.results.length < total;
+    $scope.search.total = total || $scope.search.total;
+
+    $scope.smallscreen = UIUtils.screen.isSmall();
+
+    $scope.$broadcast('$$rebind::rebind'); // notify binder
+
+    // Set Motion
+    if (res && res.length) {
+      $scope.motion.show({selector: '.list-blocks .item-block'});
+    }
+  };
+
+  $scope.showMore = function() {
+    var from = $scope.search.results ? $scope.search.results.length : 0;
+
+    $scope.search.loadingMore = true;
+
+    return $scope.doSearch(from)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.search.loadingMore = false;
+        $scope.search.hasMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.removeListeners = function() {
+    if ($scope.listeners.length) {
+      console.debug("[block] Closing listeners");
+      _.forEach($scope.listeners, function(remove){
+        remove();
+      });
+      $scope.listeners = [];
+    }
+  };
+
+  $scope.addListeners = function() {
+    if ($scope.listeners.length) return; // already started
+
+    console.debug("[block] Starting listeners");
+    if ($scope.node === BMA) {
+      $scope.listeners = [
+        csCurrency.api.data.on.newBlock($scope, $scope.onBlock)
+      ];
+    }
+    else {
+      $scope.listeners = [
+        $scope.node.websocket.block().onListener(function(json) {
+          // Skip if WS closed (after leave view - should never happen) or invalid json
+          if (!json) return;
+          var block = new Block(json);
+          block.cleanData(); // Remove unused content (arrays...)
+          $scope.onBlock(block);
+        })
+      ];
+    }
+  };
+
+  $scope.onBlock = function(block) {
+    // Skip if still loading or if filter/sort is not the default (not last blocks)
+    if ($scope.search.loading || $scope.search.type !== 'last' ||
+      ($scope.search.sort && $scope.search.sort !== 'desc')) return; // skip
+
+    // Make sure results is init
+    $scope.search.results = $scope.search.results || [];
+
+    if (!$scope.search.results.length) {
+      console.debug('[blockchain] new block #{0} received (by websocket)'.format(block.number));
+      // add it to result
+      $scope.search.total++;
+      $scope.search.results.push(block);
+
+      // Prepare the new block, then show it
+      $scope.doPrepareResult([block])
+        .then(function() {
+          return $scope.showBlock(block);
+        });
+    }
+    else {
+      // Find existing block, by number
+      var existingBlock = _.findWhere($scope.search.results, {number: block.number});
+
+      // replace existing block (fork could have replaced previous block)
+      if (existingBlock) {
+        if (existingBlock.hash !== block.hash) {
+          console.debug('[blockchain] block #{0} updated (by websocket)'.format(block.number));
+          // Replace existing content
+          angular.copy(block, existingBlock);
+          // Prepare the new block, then show it
+          $scope.doPrepareResult([block, $scope.search.results[1]])
+            .then(function() {
+              return $scope.showBlock(existingBlock);
+            });
+        }
+      }
+      else {
+        console.debug('[blockchain] new block #{0} received (by websocket)'.format(block.number));
+        // Insert at index 0
+        $scope.search.total++;
+        $scope.search.results.splice(0, 0, block);
+
+        // Prepare the new block, then show it
+        $scope.doPrepareResult([block, $scope.search.results[1]])
+          .then(function() {
+            return $scope.showBlock(block);
+          });
+      }
+    }
+  };
+
+  $scope.showBlock = function(block){
+    // Force rebind
+    $scope.$broadcast('$$rebind::rebind');
+    $scope.motion.show({selector: '#block-'+block.number});
+  };
+
+  $scope.selectBlock = function(block) {
+    if (block.compacted && $scope.compactMode) {
+      $scope.toggleCompactMode();
+      $timeout(function(){
+        $anchorScroll('block-' + block.number);
+      }, 900);
+    }
+    else if (BMA.node.same($scope.node)) {
+      $state.go('app.view_block_hash', {number: block.number, hash: block.hash});
+    }
+    else {
+      $state.go('app.view_server_block_hash', {server: $scope.node.server, ssl: $scope.node.useSsl, number: block.number, hash: block.hash});
+    }
+  };
+
+  $scope.toggleCompactMode = function() {
+    $scope.compactMode = !$scope.compactMode;
+    $scope.doDisplayResult($scope.search.results, 0, $scope.search.total/*keep previous total*/);
+
+    // Workaround to re-initialized the <ion-infinite-loop>
+    if (!$scope.search.hasMore && $scope.search.results.length && $scope.search.type == 'last') {
+      var lastBlock = $scope.search.results[$scope.search.results.length-1];
+      if (lastBlock && lastBlock.number > 0) {
+        $timeout(function() {
+          $scope.search.hasMore = true;
+        }, 500);
+      }
+    }
+  };
+
+  $scope.toggleSort = function(sort){
+    if ($scope.search.sort === sort && !$scope.search.asc) {
+      $scope.search.asc = undefined;
+      $scope.search.sort = undefined;
+    }
+    else {
+      $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true;
+      $scope.search.sort = sort;
+    }
+    $scope.doSearch();
+  };
+
+  $scope.showHelpTip = function() {
+    // TODO
+  };
+}
+
+
+function BlockViewController($scope, $ionicPopover, $state, UIUtils, BMA, csCurrency, csWot) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.formData = {};
+  $scope.compactMode = true; // TODO change to true
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  /**
+   * Enter on view
+   */
+  $scope.enter = function(e, state) {
+    if (!$scope.loading) return; // call once
+
+    if (state) {
+      $scope.number = state.stateParams && angular.isDefined(state.stateParams.number) ? state.stateParams.number : 'current';
+      $scope.hash = state.stateParams && state.stateParams.hash ? state.stateParams.hash : undefined;
+
+      // Load from server if need
+      if (state.stateParams && state.stateParams.server) {
+        var useSsl = state.stateParams.ssl == "true";
+        var useTor = state.stateParams.tor == "true";
+
+        var node = {
+          server: state.stateParams.server,
+          host: state.stateParams.server,
+          useSsl: useSsl,
+          useTor: useTor
+        };
+        var serverParts = state.stateParams.server.split(':');
+        if (serverParts.length == 2) {
+          node.host = serverParts[0];
+          node.port = serverParts[1];
+        }
+
+        if (BMA.node.same(node)) {
+          $scope.node = BMA;
+        }
+        else {
+          $scope.node = useTor ?
+            // For TOR, use a web2tor to access the endpoint
+            BMA.instance(node.host + ".to", 443, true/*ssl*/, 600000 /*long timeout*/) :
+            BMA.instance(node.host, node.port, node.useSsl);
+          return $scope.node.blockchain.parameters()
+            .then(function (json) {
+              $scope.currency = json.currency;
+              $scope.enter(); // back to enter(), with no stateParams
+            });
+        }
+      }
+    }
+
+    if (!$scope.currency || !$scope.node) {
+      csCurrency.get()
+        .then(function (currency) {
+          if (currency) {
+            $scope.currency = currency.name;
+            $scope.node = currency.node;
+            $scope.load();
+          }
+        })
+        .catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED'));
+    }
+    else {
+      $scope.load();
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  /**
+   * Leave the view
+   */
+  $scope.leave = function() {
+    //console.debug("Leaving view peer...");
+  };
+  $scope.$on('$ionicParentView.beforeLeave', $scope.leave);
+
+  $scope.load = function() {
+    if (!$scope.number) return;
+
+    var promise = $scope.number == 'current' ?
+      $scope.node.blockchain.current() :
+      $scope.node.blockchain.block({block: $scope.number});
+
+    return  promise
+      .then(function(json) {
+        var block = new Block(json);
+        block.parseData();
+        if (!block || !angular.isDefined(block.number) || !block.hash) {
+          $scope.loading = false;
+          UIUtils.alert.error('ERROR.GET_BLOCK_FAILED');
+          return;
+        }
+        if ($scope.hash && block.hash != $scope.hash) {
+          $scope.loading = false;
+          UIUtils.alert.error('ERROR.INVALID_BLOCK_HASH');
+          return;
+        }
+
+        var users = [];
+        if (block.joiners.length) {
+          users = users.concat(block.joiners);
+        }
+        if (block.certifications.length) {
+          users = block.certifications.reduce(function(res, cert) {
+            cert.to = {
+              pubkey: cert.to
+            };
+            cert.from = {
+              pubkey: cert.from
+            };
+            return res.concat(cert.to , cert.from);
+          }, users);
+          block.certifications = _.groupBy(block.certifications, function(cert) {
+            return cert.to.pubkey;
+          });
+        }
+        if (block.transactions.length) {
+          users = block.transactions.reduce(function(res, tx) {
+            tx.issuers = tx.issuers.reduce(function(res, issuer) {
+              return res.concat({pubkey: issuer});
+            }, []);
+
+            // Parse unlockConditions
+            _.forEach(tx.outputs||[], function(output) {
+              if (output.unlockCondition) {
+                angular.merge(output, BMA.tx.parseUnlockCondition(output.unlockCondition));
+              }
+            });
+
+            return res.concat(tx.issuers.concat(tx.outputs||[]));
+          }, users);
+        }
+
+        var issuer = {pubkey: block.issuer};
+        users.push(issuer);
+        return csWot.extendAll(users)
+          .then(function() {
+            $scope.updateView({block: block, issuer: issuer});
+          });
+      })
+      .catch(function(err) {
+        $scope.loading = false;
+        UIUtils.onError('ERROR.GET_BLOCK_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function(data) {
+    $scope.formData = data.block;
+    //angular.copy(data.block, $scope.formData);
+    $scope.issuer = data.issuer;
+    $scope.loading = false;
+  };
+
+  $scope.toggleCompactMode = function() {
+    $scope.compactMode = !$scope.compactMode;
+  };
+
+  /* -- popover -- */
+
+  var paddingIndent = 10;
+
+  $scope.toUnlockUIArray = function(unlockTreeItem, leftPadding, operator) {
+    leftPadding = leftPadding || paddingIndent;
+
+    // If operator (AND, OR)
+    if (unlockTreeItem.children && (unlockTreeItem.type == 'AND' || unlockTreeItem.type == 'OR')) {
+      return unlockTreeItem.children.reduce(function(res, child, index){
+        if (child.children && index > 0) {
+          // Add space between expression block
+          res = res.concat({
+            style: {
+              'padding-left': leftPadding + 'px',
+              'padding-top': '10px',
+              'padding-bottom': '10px'
+            },
+            operator: unlockTreeItem.type
+          });
+
+          return res.concat($scope.toUnlockUIArray(child, leftPadding + paddingIndent));
+        }
+        return res.concat($scope.toUnlockUIArray(child, leftPadding + paddingIndent, index && unlockTreeItem.type));
+      }, []);
+    }
+
+    return {
+      style: {
+        'padding-left': leftPadding + 'px'
+      },
+      operator: operator,
+      type: unlockTreeItem.type,
+      value: unlockTreeItem.value
+    };
+  };
+
+  $scope.showUnlockConditionPopover = function(output, event) {
+    if (!output.unlockTree) return;
+
+    // Convert condition into UI array
+    $scope.popoverData = $scope.popoverData || {};
+    $scope.popoverData.unlockConditions = $scope.toUnlockUIArray(output.unlockTree);
+
+    // Open popover
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/blockchain/unlock_condition_popover.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.unlockConditionPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideUnlockConditionsPopover = function() {
+    if ($scope.unlockConditionPopover) {
+      $scope.unlockConditionPopover.hide();
+      $scope.unlockConditionPopover = null;
+    }
+  };
+
+  $scope.goState = function(stateName, stateParams) {
+    $scope.hideUnlockConditionsPopover();
+    $state.go(stateName, stateParams);
+  };
+
+  /* -- manage link to raw document -- */
+
+  $scope.openRawBlock = function(event) {
+    return $scope.openLink(event, $scope.node.url + '/blockchain/block/' + $scope.formData.number);
+  };
+
+  /* -- help tip -- */
+
+  // Show help tip
+  $scope.showHelpTip = function(index) {
+    // No helptip here (done in network controller)
+  };
+}
+
+
+
+angular.module('cesium.controllers', [
+    'cesium.app.controllers',
+    'cesium.join.controllers',
+    'cesium.login.controllers',
+    'cesium.help.controllers',
+    'cesium.wallet.controllers',
+    'cesium.wallets.controllers',
+    'cesium.currency.controllers',
+    'cesium.wot.controllers',
+    'cesium.transfer.controllers',
+    'cesium.settings.controllers',
+    'cesium.network.controllers',
+    'cesium.blockchain.controllers'
+  ])
+;
+
+angular.module('cesium.templates', []).run(['$templateCache', function($templateCache) {$templateCache.put('templates/menu.html','<ion-side-menus enable-menu-with-back-views="true" bind-notifier="{locale: $root.settings.locale.id, peer: $root.currency.node.url}"><ion-side-menu-content><ion-nav-bar class="bar-dark" title-align="left"><ion-nav-back-button class="no-text"></ion-nav-back-button><ion-nav-buttons side="left"><button class="button button-clear visible-nomenu" menu-toggle="left"><i class="icon ion-navicon"></i></button></ion-nav-buttons><ion-nav-buttons side="right"><cs-extension-point name="nav-buttons-right"></cs-extension-point></ion-nav-buttons></ion-nav-bar><ion-nav-view name="menuContent"></ion-nav-view></ion-side-menu-content><ion-side-menu id="menu" side="left" expose-aside-when="large" enable-menu-with-back-views="false" width="225"><ion-header-bar class="bar-title"><div class="visible-sm visible-xs hero"><div class="content"><i class="avatar avatar-member hero-icon" ng-if="!walletData.avatar" ng-class="{\'royal-bg\': login, \'stable-bg\': !login}" ng-click="!login ? showHome() : loginAndGo()" menu-close=""></i> <a class="avatar hero-icon" ng-if="walletData.avatar" style="background-image: url(\'{{walletData.avatar.src}}\')" ui-sref="app.view_wallet" menu-close=""></a><h4 ng-if="login"><a class="light" ui-sref="app.view_wallet" menu-close="">{{walletData.name||walletData.uid}} <span ng-if="!walletData.name && !walletData.uid"><i class="icon ion-key"></i>&nbsp;{{walletData.pubkey|formatPubkey}}</span></a></h4><h4 ng-if="!login"><a class="light" ui-sref="app.login" menu-close="">{{\'COMMON.BTN_LOGIN\'|translate}} <i class="ion-arrow-right-b"></i></a></h4><cs-extension-point name="menu-profile-user"></cs-extension-point></div></div></ion-header-bar><ion-content scroll="false" class="scroll-content ionic-scroll" ng-class="{\'overflow-scroll\': smallscreen, \'scroll-content-false\': !smallscreen}"><ion-list class="list" ng-class="{\'scroll\': smallscreen}"><ion-item menu-close="" class="item item-actions item-button-right visible-xs visible-sm" ng-if="login" ng-class="::{\'item-button-left\': $root.device.barcode.enable}"><button class="button button-positive ink-dark" ng-click="showTransferModal()"><i class="icon ion-paper-airplane"></i></button> <button class="button button-stable ink" ng-if="$root.device.barcode.enable" ng-click="scanQrCodeAndGo()"><i class="icon ion-qr-scanner"></i></button></ion-item><ion-item menu-close="" class="item-icon-left hidden-xs" ui-sref="app.home" active-link="active"><i class="icon ion-home"></i> {{:locale:\'MENU.HOME\'|translate}}</ion-item><ion-item menu-close="" class="item-icon-left visible-xs" ui-sref="app.home" active-link="active"><i class="icon ion-home"></i> {{:locale:\'MENU.HOME\'|translate}}</ion-item><div class="item item-divider"></div><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/account" ui-sref="app.view_wallet" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-person"></i> {{:locale:\'MENU.ACCOUNT\'|translate}} </a><a id="helptip-menu-btn-account"></a> <a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/history" ui-sref="app.view_wallet_tx" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-clock" style="top: calc(100%/4); left: 25px; font-size: 10pt; display: block"></i> <b class="icon-secondary ion-card" style="top: calc(100%/2.5); left: 19px; font-size: 17pt; background-color: whitesmoke; width:17px; height: 14px"></b> {{:locale:\'MENU.TRANSACTIONS\'|translate}} </a><a id="helptip-menu-btn-tx"></a> <a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/wallets" ui-sref="app.view_wallets" ng-class="{\'item-menu-disable\': !login}"><i class="icon ion-card" style="top: calc(100%/5); left: 22px; font-size: 16pt; display: block"></i> <i class="icon-secondary ion-card" style="top: 20px; left: 19px; font-size: 16pt; background-color: whitesmoke; width:17px; height: 14px"></i> {{:locale:\'MENU.WALLETS\'|translate}} </a><a id="helptip-menu-btn-wallets"></a><div class="item item-divider visible-xs visible-sm"></div><cs-extension-point name="menu-user"></cs-extension-point><div class="item-spacer"></div><div class="item item-divider"></div><a menu-close="" class="item item-icon-left" id="helptip-menu-btn-wot" active-link="active" active-link-path-prefix="#/app/wot" ui-sref="app.wot_lookup.tab_search"><i class="icon ion-person-stalker"></i> {{:locale:\'MENU.WOT\'|translate}}</a><cs-extension-point name="menu-main"></cs-extension-point><a menu-close="" class="item item-icon-left" id="helptip-menu-btn-currency" active-link="active" active-link-path-prefix="#/app/currency" ui-sref="app.currency"><i class="icon ion-ios-world-outline"></i> {{:locale:\'MENU.CURRENCY\'|translate}}</a><cs-extension-point name="menu-discover"></cs-extension-point><div class="item item-divider visible-xs visible-sm"></div><a menu-close="" class="item item-icon-left visible-xs visible-sm" active-link="active" active-link-path-prefix="#/app/settings" ui-sref="app.settings"><i class="icon ion-android-settings"></i> {{:locale:\'MENU.SETTINGS\'|translate}} </a><a id="helptip-menu-btn-settings"></a><div class="item item-divider visible-xs visible-sm margin-top" ng-if="login"></div><a menu-close="" ng-if="login" class="item item-icon-left visible-xs visible-sm" ng-click="logout({askConfirm: true})"><i class="icon ion-log-out assertive"></i> <span class="assertive" translate="">{{:locale:\'COMMON.BTN_LOGOUT\'|translate}}</span></a></ion-list></ion-content></ion-side-menu></ion-side-menus>');
+$templateCache.put('templates/modal_about.html','<ion-modal-view class="about"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CLOSE</button><h1 class="title" translate>ABOUT.TITLE</h1></ion-header-bar><ion-content class="text-center" scroll="true"><div class="list item-wrap-text"><ion-item class="item-icon-left item-text-wrap"><span>{{\'COMMON.APP_NAME\'|translate}}&nbsp;<b>{{\'COMMON.APP_VERSION\'|translate:$root.config}}</b> - <a ng-click="openLink($event, \'http://cesium.app\')">www.cesium.app</a></span> <i ng-if="$root.newRelease" class="assertive ion-alert-circled"></i><h3 ng-if="$root.config.build" class="gray">{{\'COMMON.APP_BUILD\'|translate:$root.config}}</h3><span translate>ABOUT.LICENSE</span></ion-item><ion-item class="item-icon-left" ng-if="$root.newRelease"><i class="item-image icon ion-alert-circled assertive"></i> <span ng-if="!$root.device.isWeb()" ng-bind-html="\'ABOUT.PLEASE_UPDATE\' | translate:$root.newRelease "></span> <span ng-if="$root.device.isWeb()" ng-bind-html="\'ABOUT.LATEST_RELEASE\' | translate:$root.newRelease "></span><h3 ng-if="!$root.device.enable"><a ng-click="openLink($event, $root.newRelease.url)" translate>{{::$root.newRelease.url}}</a></h3></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="item-image icon ion-android-laptop"></i> <span translate>ABOUT.OFFICIAL_WEB_SITE</span><h3><a ng-click="openLink($event, \'https://www.cesium.app\')">https://www.cesium.app</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-chatbubbles"></i> {{\'ABOUT.FORUM\' | translate}}<h3><a ng-click="openLink($event, $root.settings.userForumUrl)">{{::$root.settings.userForumUrl}}</a></h3></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="item-image icon ion-bug"></i> <span translate>ABOUT.PLEASE_REPORT_ISSUE</span><h3><a ng-click="openLink($event, $root.settings.newIssueUrl)" translate>ABOUT.REPORT_ISSUE</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-network"></i> {{\'ABOUT.CODE\' | translate}}<h3><a ng-click="openLink($event, \'https://git.duniter.org/clients/cesium-grp/cesium\')">https://git.duniter.org/clients/cesium-grp/cesium</a></h3></ion-item><ion-item class="item-icon-left"><i class="item-image icon ion-person-stalker"></i> {{\'ABOUT.DEVELOPERS\' | translate}}<h3><a href="https://github.com/blavenie" target="_system">Benoit Lavenier</a>, <a href="https://github.com/bpresles" target="_system">bpresles</a>, <a href="https://github.com/c-geek" target="_system">cgeek</a>, <a href="https://github.com/devingfx" target="_system">DiG</a>, <a href="https://git.duniter.org/ji_emme" target="_system">Ji_emme</a></h3></ion-item><div class="padding hidden-xs text-center"><button class="button button-stable icon-left ink" type="submit" ng-click="closeModal()" ui-sref="app.help"><i class="icon ion-ios-help-outline"></i> {{\'HOME.BTN_HELP\' | translate}}</button> <button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></div></ion-content></ion-modal-view>');
+$templateCache.put('templates/api/doc.html','<h2 class="padding" translate="">API.DOC.TRANSFER.TITLE</h2><div class="list padding no-padding-xs no-padding-top"><div class="item item-divider no-border"><p translate="">API.DOC.DESCRIPTION_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.TRANSFER.DESCRIPTION</p></div><div class="item item-divider no-border"><p translate="">API.DOC.URL_DIVIDER</p></div><div class="item item-text-wrap"><p class="gray text-right">{{$root.rootPath}}#/v1/payment/:pubkey?amount=<span class="text-italic" translate="">API.DOC.TRANSFER.PARAM_AMOUNT</span></p></div><div class="item item-divider no-border"><p translate="">API.DOC.PARAMETERS_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.AVAILABLE_PARAMETERS</p><div class="row"><div class="col col-20 text-italic">pubkey</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_PUBKEY_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">amount</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_AMOUNT_HELP</div></div><div class="row"><div class="col col-20 text-italic">comment</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_COMMENT_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">name</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_NAME_HELP</div></div><div class="row"><div class="col col-20 text-italic">preferred_node</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_PREFERRED_NODE_HELP</div></div><div class="row stable-bg"><div class="col col-20 text-italic dark">redirect_url</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_REDIRECT_URL_HELP</div></div><div class="row"><div class="col col-20 text-italic">cancel_url</div><div class="col gray" translate="">API.DOC.TRANSFER.PARAM_CANCEL_URL_HELP</div></div></div><div class="item item-divider no-border"><p translate="">API.DOC.DEMO_DIVIDER</p></div><div class="item item-button-right item-text-wrap padding-bottom"><p class="item-icon-right-padding" translate="">API.DOC.DEMO_HELP</p><span class="badge" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></span><a ng-if="!loading" href="{{transferDemoUrl}}" class="button button-raised button-positive icon ion-play"></a></div><div class="item item-text-wrap" ng-if="result.type === \'payment\' && !result.cancelled"><h2 class="text-right balanced" translate="">API.DOC.DEMO_SUCCEED</h2><h4 class="gray" translate="">API.DOC.DEMO_RESULT</h4><p class="balanced-100-bg padding dark text-keep-lines">{{result.content}}</p><h4 class="gray"><span translate="">API.DOC.DEMO_RESULT_PEER</span> <b>{{result.node}}</b></h4></div><div class="item item-text-wrap" ng-if="result.type === \'payment\' && result.cancelled"><h2 class="text-right assertive" translate="">API.DOC.DEMO_CANCELLED</h2></div><div class="item item-divider no-border"><p translate="">API.DOC.INTEGRATE_DIVIDER</p></div><div class="item item-text-wrap"><p translate="">API.DOC.TRANSFER.EXAMPLES_HELP</p><div class="row responsive-sm"><div class="col col-20 text-italic"><span translate="">API.DOC.TRANSFER.EXAMPLE_BUTTON</span></div><div class="col gray no-border"><p><i class="icon ion-code"></i> <span translate="">API.DOC.INTEGRATE_CODE</span></p><div class="item item-input"><textarea class="gray" select-on-click="" rows="5" ng-model="transferButton.html" ng-model-options="{ debounce: 650 }"></textarea></div><p class="padding-top"><i class="icon ion-eye"></i> <span translate="">API.DOC.INTEGRATE_RESULT</span></p><div class="padding-left" bind-notifier="{ notifierKey:watchedExpression }"><ng-bind-html ng-bind-html="transferButton.html|trustAsHtml"></ng-bind-html></div></div></div><div class="row responsive-sm"><div class="col gray no-border"><p class="padding-top"><a class="positive" ng-click="transferButton.showParameters=!transferButton.showParameters"><i class="icon ion-wrench"></i> <span translate="">API.DOC.INTEGRATE_PARAMETERS</span> <i class="icon" ng-class="{\'ion-arrow-down-b\': !transferButton.showParameters, \'ion-arrow-up-b\': transferButton.showParameters}"></i></a></p><div ng-if="transferButton.showParameters" class="padding-left"><form id="transferForm" class="stable-bg padding"><p class="padding-top"><i class="icon ion-key"></i> {{\'API.DOC.TRANSFER.PARAM_PUBKEY\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.pubkey" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_PUBKEY_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-pricetag"></i> {{\'API.DOC.TRANSFER.PARAM_AMOUNT\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.amount" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_AMOUNT_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-flag"></i> {{\'API.DOC.TRANSFER.PARAM_COMMENT\' | translate}} :</p><label class="item item-input"><input type="text" autocomplete="off" ng-model="transferData.comment" placeholder="{{\'API.DOC.TRANSFER.PARAM_COMMENT\'|translate}}"></label><p class="padding-top"><i class="icon ion-ios-world-outline"></i> {{\'API.DOC.TRANSFER.PARAM_NAME\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.name" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_NAME\'|translate}}"></label><p class="padding-top"><i class="icon ion-key"></i> {{\'API.DOC.TRANSFER.PARAM_PREFERRED_NODE\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.preferred_node" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_PREFERRED_NODE_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-arrow-return-left"></i> {{\'API.DOC.TRANSFER.PARAM_REDIRECT_URL\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.redirect_url" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_REDIRECT_URL\'|translate}}"></label><p class="padding-top"><i class="icon ion-backspace"></i> {{\'API.DOC.TRANSFER.PARAM_CANCEL_URL\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferData.cancel_url" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.PARAM_CANCEL_URL\'|translate}}"></label><p class="padding-top"><a class="positive" ng-click="transferButton.style.enable=!transferButton.style.enable"><i class="icon" ng-class="{\'ion-android-checkbox-outline\': transferButton.style.enable, \'ion-android-checkbox-outline-blank\': !transferButton.style.enable}"></i> <span translate="">API.DOC.TRANSFER.EXAMPLE_BUTTON_DEFAULT_STYLE</span></a></p><div ng-if="transferButton.style.enable"><p class="padding-top"><i class="icon ion-image"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_ICON\' | translate}} :</p><label class="item item-input item-select"><select class="stable-bg dark" ng-model="transferButton.style.icon" style="width: 100%; max-width: 100%" ng-options="l as (l.label | translate) for l in transferButton.icons track by l.filename"></select></label><p class="padding-top"><i class="icon ion-quote"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_HELP\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.text" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-paintbucket"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_BG_COLOR\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.bgColor" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_BG_COLOR_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-paintbrush"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_FONT_COLOR\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.fontColor" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_FONT_COLOR_HELP\'|translate}}"></label><p class="padding-top"><i class="icon ion-ios-crop-strong"></i> {{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_WIDTH\' | translate}} :</p><label class="item item-input"><input type="text" ng-model="transferButton.style.width" ng-model-options="{ debounce: 650 }" placeholder="{{\'API.DOC.TRANSFER.EXAMPLE_BUTTON_TEXT_WIDTH_HELP\'|translate}}"></label></div></form></div></div></div></div></div>');
+$templateCache.put('templates/api/home.html','<ion-view class="circle-bg-dark"><ion-nav-title><span class="title visible-xs visible-sm" translate="">API.HOME.TITLE</span></ion-nav-title><ion-nav-buttons side="right"></ion-nav-buttons><ion-content class="no-padding-xs no-padding-sm positive-900-bg"><br class="hidden-xs"><div class="light text-center"><h4 class="hidden-xs" translate="">API.HOME.MESSAGE</h4><h4 class="visible-xs padding" translate="">API.HOME.MESSAGE_SHORT</h4></div><br class="hidden-xs"><div class="row no-padding-xs"><div class="col"><div class="light-bg no-padding"><ng-include src="::\'templates/api/doc.html\'"></ng-include></div></div></div><p class="visible-xs visible-sm light padding-top text-center">{{\'COMMON.APP_NAME\'|translate}} API - <a href="#" ng-click="showAboutModal($event)">v{{$root.config.version}}</a></p></ion-content></ion-view>');
+$templateCache.put('templates/api/menu.html','<ion-nav-bar class="bar-dark" title-align="left"><ion-nav-back-button class="no-text"></ion-nav-back-button><ion-nav-buttons side="left"></ion-nav-buttons><ion-nav-buttons side="right"></ion-nav-buttons></ion-nav-bar><ion-nav-view name="menuContent"></ion-nav-view>');
+$templateCache.put('templates/api/popover_locales.html','<ion-popover-view class="fit popover-locales" style="height: {{locales.length*48}}px"><ion-content scroll="false"><div class="list item-text-wrap block"><a ng-repeat="l in locales track by l.id" class="item item-icon-left ink" ng-click="changeLanguage(l.id)"><i class="item-image avatar" style="background-image: url(../img/flag-{{l.flag}}.png)"></i> {{l.label | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/api/transfer.html','<ion-view class="circle-bg-dark"><ion-nav-buttons side="left"><button class="button button-clear visible-xs" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button></ion-nav-buttons><ion-nav-title><span class="title visible-xs" translate="">API.TRANSFER.TITLE_SHORT</span></ion-nav-title><ion-nav-buttons side="right"><button class="button button-positive button-icon button-clear icon ion-android-send visible-xs" ng-click="doLogin()"></button></ion-nav-buttons><ion-content class="no-padding-xs positive-900-bg"><br class="hidden-xs"><div class="row no-padding-xs"><div class="col no-padding-xs"><div class="light-bg"><h2 class="padding-top text-center hidden-xs" translate="">API.TRANSFER.TITLE</h2><div class="no-padding energized-100-bg" ng-if="demo"><div class="item item-icon-left item-text-wrap no-border"><i class="icon ion-information-circled positive"></i><p translate="">API.TRANSFER.DEMO.HELP</p></div></div><ng-include src="::\'templates/login/form_login.html\'"></ng-include></div><br class="hidden-xs"><br class="hidden-xs"><div class="list padding no-padding-xs light-bg"><div class="item"><p translate="">API.TRANSFER.SUMMARY</p></div><div class="item item-icon-left-padding item-tx no-border" ng-if="!transferData.amounts" style="min-height: 56px"><h2 translate="">API.TRANSFER.AMOUNT</h2><ion-spinner class="badge item-note" icon="android" ng-show="loading"></ion-spinner><div class="badge badge-calm ng-hide" ng-show="!loading" ng-bind-html="transferData.amount|formatAmount:{useRelative: false, currency: currency.name}"></div><div class="badge badge-secondary ng-hide" ng-show="!loading" ng-bind-html="transferData.amount|formatAmount:{useRelative: true, currency: currency.name, currentUD: currency.currentUD}"></div></div><label ng-if="transferData.amounts" style="min-height: 58px" class="item item-icon-left-padding item-input item-select item-tx no-border" ng-class="{ \'item-input-error\': form.$submitted && !transferData.amount}"><div class="input-label"><span translate="">API.TRANSFER.AMOUNT</span></div><select ng-model="transferData.amount" required="true" ng-options="(amount |formatAmount:{useRelative: false, currency: currency.name}) for amount in transferData.amounts"></select><span class="badge badge-secondary ng-hide" ng-show="transferData.amount" ng-bind-html="transferData.amount|formatAmount:{useRelative: true, currency: currency.name, currentUD: currency.currentUD}"></span></label><div class="form-errors" ng-if="form.$submitted && !transferData.amount"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-icon-left-padding"><h2 translate="">API.TRANSFER.NAME</h2><div class="badge item-note">{{transferData.name}}</div></div><div class="item item-icon-left-padding item-text-wrap"><h2 translate="">API.TRANSFER.PUBKEY</h2><div class="badge"><span class="hidden-xs"><br class="visible-sm visible-md"><i class="icon ion-key"></i>{{transferData.pubkey}}</span> <span class="visible-xs" copy-on-click="{{transferData.pubkey}}"><br class="visible-xs"><i class="icon ion-key"></i> {{transferData.pubkey|formatPubkey}}</span></div></div><div class="item item-icon-left-padding"><h2 translate="">API.TRANSFER.COMMENT</h2><div class="badge item-note"><span class="hidden-xs"><br class="visible-sm visible-md">{{::transferData.comment}}</span> <span class="visible-xs" copy-on-click="{{transferData.comment}}"><br>{{::transferData.comment}}</span></div></div><div class="item item-icon-left-padding" ng-hide="error"><h2 translate="">API.TRANSFER.NODE</h2><div class="badge item-note" ng-if="!loading"><br class="visible-sm visible-md"><i class="icon ion-locked" ng-if="node.useSsl"></i>&nbsp;{{node.server}}</div></div><div class="center padding animate-fade-in animate-show-hide ng-hide" ng-show="!loading && error"><div class="card card-item padding"><p class="item-content item-text-wrap"><i class="icon ion-android-alert assertive"></i> <span class="dark" trust-as-html="\'API.COMMON.CONNECTION_ERROR\'|translate:node"></span></p><button type="button" class="button button-positive icon icon-left ion-refresh ink" ng-click="start()">{{\'COMMON.BTN_REFRESH\'|translate}}</button></div></div><div class="padding-bottom visible-xs">&nbsp;</div></div></div></div><p class="visible-xs visible-sm light padding-top text-center">{{\'COMMON.APP_NAME\'|translate}} - <a href="#" ng-click="showAboutModal($event)">v{{$root.config.version}}</a></p></ion-content></ion-view>');
+$templateCache.put('templates/blockchain/item_block.html','<a name="block-{{::block.number}}"></a><ion-item id="block-{{::block.number}}" class="item item-icon-left item-block {{::ionItemClass}}" ng-class=":rebind:{\'ink\': !block.empty||!block.compacted, \'item-block-empty\': block.empty, \'compacted\': block.compacted && compactMode}" ng-click="selectBlock(block)"><i class="icon ion-cube stable" ng-if="(!block.empty && !block.avatar)"></i> <i class="avatar" ng-if="!block.empty && block.avatar" style="background-image: url(\'{{block.avatar.src}}\')"></i><div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"><div class="col" style="min-width: 110px; max-width: 130px"><h4 ng-class=":rebind:{\'gray\': block.compacted, \'dark\': !block.compacted}"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h4><h4 ng-if=":rebind:!block.empty"><ng-if ng-if=":rebind:block.joinersCount||(block.excludedCount-block.revokedCount)"><i class="dark ion-person"></i> <span class="dark" ng-if=":rebind:block.joinersCount">+{{:rebind:block.joinersCount}}</span> <span class="dark" ng-if=":rebind:block.excludedCount">-{{:rebind:block.excludedCount-block.revokedCount}}</span></ng-if><span class="dark" ng-if=":rebind:block.revokedCount" class="assertive"><i class="ion-minus-circled"></i> {{:rebind:block.revokedCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.activesCount" class="gray"><i class="gray ion-refresh"></i> {{:rebind:block.activesCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.certificationsCount"><i class="ion-ribbon-a"></i> {{:rebind:block.certificationsCount}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.dividend" class="gray"><i class="gray ion-arrow-up-c"></i> {{\'COMMON.UD\'|translate}}&nbsp;&nbsp;</span> <span class="dark" ng-if=":rebind:block.transactionsCount"><i class="ion-card">{{:rebind:block.transactionsCount}}</i></span></h4></div><div class="col positive hidden-md"><h4><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</h4></div><div class="col col-20"><span class="badge" ng-class=":rebind:{\'badge-balanced\': !$index , \'badge-calm\': $index && !block.compacted && !block.empty}">{{::block.number|formatInteger}}</span></div></div></ion-item>');
+$templateCache.put('templates/blockchain/item_block_empty_lg.html','<a name="block-{{::block.number}}"></a><div id="block-{{::block.number}}" class="item item-block item-icon-left item-block-empty" ng-class=":rebind:{\'compacted\': block.compacted && compactMode}" ng-click="selectBlock(block)"><div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"><div class="col"><h3 class="gray"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h3></div><div class="col"><h3><span class="gray" ng-if=":rebind:expertMode"><i class="ion-key"></i> {{:rebind:block.issuer|formatPubkey}} </span><span class="positive"><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</span></h3></div><div class="col col-20"></div><div class="col col-20"><span class="badge" ng-class="{\'badge-balanced\': !$index && search.type==\'last\'}">{{block.number|formatInteger}}</span></div></div></div>');
+$templateCache.put('templates/blockchain/item_block_lg.html','<ion-item id="block-{{::block.number}}" class="item item-block item-icon-left ink {{::ionItemClass}}" ng-class="{{::ionItemClass}}" ng-click="selectBlock(block)"><i class="icon ion-cube stable" ng-if=":rebind:!block.avatar"></i> <i class="avatar" ng-if=":rebind:!block.empty && block.avatar" style="background-image: url(\'{{:rebind:block.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h3 class="dark"><i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}}</h3><h4 class="gray">{{:rebind:\'BLOCKCHAIN.HASH\'|translate}} {{:rebind:block.hash|formatHash}}</h4></div><div class="col"><h3><span class="gray" ng-if=":rebind:expertMode"><i class="ion-key"></i> {{:rebind:block.issuer|formatPubkey}} </span><span class="positive"><i class="ion-person"></i> {{:rebind:block.name||block.uid}}</span></h3></div><div class="col col-20"><small><ng-if ng-if=":rebind:block.joinersCount||(block.excludedCount-block.revokedCount)"><i class="ion-person"></i> <span ng-if=":rebind:block.joinersCount">+{{:rebind:block.joinersCount}}</span> <span ng-if=":rebind:block.excludedCount">-{{:rebind:block.excludedCount-block.revokedCount}}</span> &nbsp;&nbsp;</ng-if><span ng-if=":rebind:block.revokedCount" class="assertive"><i class="ion-minus-circled"></i> -{{:rebind:block.revokedCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.activesCount"><i class="ion-refresh"></i> {{:rebind:block.activesCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.certificationsCount"><i class="ion-ribbon-a"></i> {{:rebind:block.certificationsCount}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.dividend"><i class="gray ion-arrow-up-c"></i> {{:rebind:\'COMMON.UD\'|translate}}&nbsp;&nbsp;</span> <span ng-if=":rebind:block.transactionsCount"><i class="ion-card">{{:rebind:block.transactionsCount}}</i>&nbsp;&nbsp;</span></small></div><div class="col col-20"><span class="badge" ng-class="{\'badge-balanced\': !$index && search.type==\'last\', \'badge-calm\': ($index  || search.type!=\'last\')&& !block.compacted && !block.empty}">{{:rebind:block.number}}</span></div></div></ion-item>');
+$templateCache.put('templates/blockchain/items_blocks.html','<div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="animate-ripple padding padding-xs"><div class="padding gray" ng-if="!search.loading && !search.results.length" translate>BLOCKCHAIN.LOOKUP.NO_BLOCK</div><ng-repeat ng-repeat="block in search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" icon="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('templates/blockchain/link_identity.html','<a ui-sref="app.wot_identity({pubkey: identity.pubkey, uid: identity.uid})"><span class="positive" ng-if="identity.uid"><i class="icon ion-person"></i> {{::identity.uid}}&nbsp;</span> <span class="gray" ng-class="{\'hidden-xs hidden-sm\': identity.uid}"><i class="icon ion-key"></i>&nbsp;{{::identity.pubkey|formatPubkey}}</span></a>');
+$templateCache.put('templates/blockchain/list_blocks.html','<div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="padding padding-xs list-blocks {{::motion.ionListClass}}"><div class="padding gray" ng-if="!search.loading && !search.results.length" translate>BLOCKCHAIN.LOOKUP.NO_BLOCK</div><ng-repeat ng-repeat="block in search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('templates/blockchain/list_blocks_lg.html','<div class="padding padding-xs" style="display: block; height: 100px"><h4 translate>BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4><div class="pull-right"><a class="button button-text button-small ink" ng-class="{\'button-text-positive\': compactMode, \'button-text-stable\': !compactMode}" ng-click="toggleCompactMode()"><i class="icon ion-navicon"></i> <b class="ion-arrow-down-b" style="position: absolute; top: -2px; left: 4px; font-size: 8px"></b> <b class="ion-arrow-up-b" style="position: absolute; top: 10px; left: 4px; font-size: 8px"></b> <span>{{:locale:\'BLOCKCHAIN.LOOKUP.BTN_COMPACT\'|translate}}</span></a></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ion-list class="padding padding-xs list-blocks {{::motion.ionListClass}}"><div class="padding gray" ng-if="!search.loading && !search.results.length">{{:locale:\'BLOCKCHAIN.LOOKUP.NO_BLOCK\'|translate}}</div><ng-repeat ng-repeat="block in search.results track by block.id" ng-include="!block.empty ? \'templates/blockchain/item_block_lg.html\' : \'templates/blockchain/item_block_empty_lg.html\'"></ng-repeat></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('templates/blockchain/lookup.html','<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-content class="padding no-padding-xs" scroll="true"><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/blockchain/lookup_lg.html','<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'templates/blockchain/list_blocks_lg.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/blockchain/unlock_condition_popover.html','<ion-popover-view class="fit"><ion-header-bar><h1 class="title" translate>BLOCKCHAIN.VIEW.TX_OUTPUT_UNLOCK_CONDITIONS</h1></ion-header-bar><ion-content scroll="true"><div class="row" ng-repeat="condition in popoverData.unlockConditions track by $index" ng-style="::condition.style"><span class="gray" ng-if="::condition.operator">{{::\'BLOCKCHAIN.VIEW.TX_OUTPUT_OPERATOR.\'+condition.operator|translate}}&nbsp;</span><div ng-if="::condition.type==\'SIG\'"><i class="icon ion-key dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.SIG\' | translate"></span> <a ng-click="goState(\'app.wot_identity\', {pubkey:condition.value})" style="text-decoration: none" class="positive">{{condition.value|formatPubkey}}</a></div><div ng-if="::condition.type==\'XHX\'"><i class="icon ion-lock-combination dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.XHX\' | translate"></span> <a copy-on-click="{{::condition.value}}" class="positive">{{::condition.value|formatPubkey}}...</a></div><div ng-if="condition.type==\'CSV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CSV\' | translate"></span> {{::condition.value|formatDuration}}</div><div ng-if="condition.type==\'CLTV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CLTV\' | translate"></span> {{::condition.value|medianDate}}</div></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/blockchain/view_block.html','<ion-view><ion-nav-title><span class="title visible-xs visible-sm" ng-if="number==\'current\'">{{\'BLOCKCHAIN.VIEW.TITLE_CURRENT\'|translate}}</span> <span class="title visible-xs visible-sm" ng-if="number!=\'current\'">{{\'BLOCKCHAIN.VIEW.TITLE\'|translate:formData}}</span></ion-nav-title><ion-content class="no-padding-xs no-padding-sm" scroll="true"><div class="row no-padding"><div class="col no-padding"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list item-text-wrap no-padding-xs" ng-if="!loading"><div class="item item-text-wrap"><h3><span class="dark"><i class="icon ion-clock"></i> {{formData.medianTime | medianFromNowAndDate}}</span></h3><h3><span class="dark"><i class="icon ion-lock-combination"></i> {{\'BLOCKCHAIN.VIEW.COMPUTED_BY\'|translate}} </span><a class="positive" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.uid})"><i class="icon ion-person positive"></i> {{issuer.name||issuer.uid}} <span class="gray" ng-if="issuer.name">({{issuer.uid}})</span></a></h3><h3><a ng-click="openRawBlock($event)"><i class="icon ion-share"></i> {{\'BLOCKCHAIN.VIEW.SHOW_RAW\'|translate}}</a></h3></div><span class="item item-divider">{{\'BLOCKCHAIN.VIEW.TECHNICAL_DIVIDER\' | translate}}</span><ion-item class="item-icon-left item-text-wrap" ng-if="!compactMode || $root.settings.expertMode"><i class="icon ion-gear-b"></i> {{\'BLOCKCHAIN.VIEW.VERSION\'|translate}} <span class="badge badge-stable">{{::formData.version}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="!compactMode || $root.settings.expertMode" copy-on-click="{{::formData.powMin}}"><i class="icon ion-lock-combination"></i> {{\'BLOCKCHAIN.VIEW.POW_MIN\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.POW_MIN_HELP\'|translate}}</h4><span class="badge badge-stable">{{::formData.powMin}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" copy-on-click="{{::formData.hash}}"><i class="icon ion-pound"></i> {{\'BLOCKCHAIN.VIEW.HASH\'|translate}}<h5 class="visible-xs visible-sm dark">{{::formData.hash}}</h5></ion-item><span class="item item-divider">{{\'BLOCKCHAIN.VIEW.DATA_DIVIDER\' | translate}}</span><ion-item ng-if="compactMode && formData.empty" class="item-icon-left item-text-wrap">{{\'BLOCKCHAIN.VIEW.EMPTY\'|translate}}</ion-item><ion-item ng-if="!compactMode || formData.dividend" class="item-icon-left item-text-wrap" copy-on-click="{{::formData.dividend/100}}"><i class="icon ion-arrow-up-c"></i><div class="col col-60">{{\'COMMON.UNIVERSAL_DIVIDEND\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.UNIVERSAL_DIVIDEND_HELP\'|translate: {membersCount: formData.membersCount} }}</h4></div><span class="badge badge-balanced" ng-if="formData.dividend">+1 <span ng-bind-html="formData.currency|currencySymbol: {useRelative: true} "></span> / {{\'COMMON.MEMBER\'|translate|lowercase}} </span><span class="badge badge-stable" ng-if="!formData.dividend">0</span> <span class="badge badge-secondary" ng-if="formData.dividend">+ {{formData.dividend| formatAmount: {currency: formData.currency, useRelative: false} }} / {{\'COMMON.MEMBER\'|translate|lowercase}}</span></ion-item><ng-if ng-if="!compactMode || formData.identitiesCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-clock" style="position: absolute; top: 16px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.IDENTITIES_COUNT\'|translate}} <span class="badge badge-balanced" ng-if="formData.identitiesCount">+{{::formData.identitiesCount}}</span> <span class="badge badge-stable" ng-if="!formData.identitiesCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.identitiesCount"><ion-item ng-repeat="identity in ::formData.identities" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.joinersCount"><ion-item class="item-icon-left"><i class="icon ion-person-add"></i> {{\'BLOCKCHAIN.VIEW.JOINERS_COUNT\'|translate}} <span class="badge badge-balanced" ng-if="formData.joinersCount">+{{::formData.joinersCount}}</span> <span class="badge badge-stable" ng-if="!formData.joinersCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.joinersCount"><ion-item ng-repeat="identity in ::formData.joiners" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.activesCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-refresh" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.ACTIVES_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.ACTIVES_COUNT_HELP\'|translate}}</h4><span class="badge badge-balanced" ng-if="formData.activesCount">{{::formData.activesCount}}</span> <span class="badge badge-stable" ng-if="!formData.activesCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.activesCount"><ion-item ng-repeat="identity in ::formData.actives" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || (formData.excludedCount-formData.revokedCount)"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-close dark" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.EXCLUDED_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.EXCLUDED_COUNT_HELP\'|translate}}</h4><span class="badge badge-assertive" ng-if="formData.excludedCount-formData.revokedCount">-{{::formData.excludedCount-formData.revokedCount}}</span> <span class="badge badge-stable" ng-if="!(formData.excludedCount-formData.revokedCount)">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.excludedCount"><ion-item ng-repeat="identity in ::formData.excluded" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.leaversCount"><ion-item class="item-icon-left" ng-if="!compactMode || formData.leaversCount"><i class="icon ion-person"></i> <b class="ion-minus" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.LEAVERS_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.LEAVERS_COUNT_HELP\'|translate}}</h4><span class="badge badge-assertive" ng-if="formData.leaversCount">-{{::formData.leaversCount}}</span> <span class="badge badge-stable" ng-if="!formData.leaversCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.leaversCount"><ion-item ng-repeat="identity in ::formData.leavers" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.revokedCount"><ion-item class="item-icon-left"><i class="icon ion-person"></i> <b class="ion-minus-circled assertive" style="position: absolute; top: 25px; left: 39px; font-size: 12px"></b> {{\'BLOCKCHAIN.VIEW.REVOKED_COUNT\'|translate}}<h4 class="gray">{{\'BLOCKCHAIN.VIEW.REVOKED_COUNT_HELP\'|translate}}</h4><span class="badge badge-balanced" ng-if="formData.revokedCount">-{{::formData.revokedCount}}</span> <span class="badge badge-stable" ng-if="!formData.revokedCount">0</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.revokedCount"><ion-item ng-repeat="identity in ::formData.revoked" class="item-border-large item-small-height" ng-include="::\'templates/blockchain/link_identity.html\'"></ion-item></div></ng-if><ng-if ng-if="!compactMode || formData.certificationsCount"><ion-item class="item-icon-left"><i class="icon ion-ribbon-a"></i> {{\'BLOCKCHAIN.VIEW.CERT_COUNT\'|translate}} <span class="badge badge-stable" ng-class="{\'badge-positive\':formData.certificationsCount}">{{::formData.certificationsCount}}</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding no-padding-xs" ng-if="formData.certificationsCount"><div ng-repeat="(key, certs) in formData.certifications" class="item item-border-large item-small-height"><div class="row no-padding"><div class="col col-center no-padding"><ng-repeat ng-repeat="cert in certs"><ng-include src="::\'templates/blockchain/link_identity.html\'" onload="identity=cert.from"></ng-include><br></ng-repeat></div><div class="col col-10 col-center gray text-center no-padding"><h2><i class="icon ion-arrow-right-a"></i></h2></div><div class="col col-40 col-center no-padding" ng-include="::\'templates/blockchain/link_identity.html\'" onload="identity=certs[0].to"></div></div></div></div></ng-if><ng-if ng-if="!compactMode || formData.transactionsCount"><ion-item class="item-icon-left"><i class="icon ion-card"></i> {{\'BLOCKCHAIN.VIEW.TX_COUNT\'|translate}} <span class="badge badge-stable" ng-class="{\'badge-positive\':formData.transactionsCount}">{{::formData.transactionsCount}}</span></ion-item><div class="padding-bottom item-icon-left-padding item-icon-right-padding no-padding-xs" ng-if="formData.transactionsCount"><div ng-repeat="tx in ::formData.transactions" class="item item-small-height item-border-large"><div class="row no-padding" style="padding-top: 3px"><div class="col col-40 col-center no-padding list no-margin"><div ng-repeat="identity in ::tx.issuers" class="item no-padding item-small-height"><ng-include src="\'templates/blockchain/link_identity.html\'"></ng-include></div></div><div class="col col-10 col-center gray text-center no-padding"><h2><i class="icon ion-arrow-right-a"></i></h2></div><div class="col no-padding padding-right no-padding-xs col-text-wrap list no-margin"><span class="gray" ng-if="tx.toHimself" translate="">BLOCKCHAIN.VIEW.TX_TO_HIMSELF</span><div ng-repeat="output in ::tx.outputs" class="item no-padding item-small-height"><ng-include ng-if="::output.pubkey" src="\'templates/blockchain/link_identity.html\'" onload="identity=output"></ng-include><span ng-if="::!output.pubkey && output.unlockFunctions"><i class="icon ion-locked"></i> (<a ng-click="showUnlockConditionPopover(output, $event)"> <i ng-repeat="unlockFunction in ::output.unlockFunctions" ng-class="::{\'ion-key\': (unlockFunction==\'SIG\'), \'ion-clock\': (unlockFunction==\'CSV\' || unlockFunction==\'CLTV\'), \'ion-lock-combination\': (unlockFunction==\'XHX\') }" class="icon"></i> </a>) </span><span class="badge badge-balanced" ng-bind-html="::output.amount | formatAmount:{currency: formData.currency, useRelative: false} "></span></div></div></div></div></div></ng-if></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/common/badge_certification_count.html','<span ng-attr-id="{{$ctrl.csId}}" class="badge badge-balanced" ng-class="{\'badge-energized\': $ctrl.requirements.willNeedCertificationCount || ($ctrl.requirements.needCertificationCount + $ctrl.requirements.pendingCertificationCount >= $ctrl.parameters.sigQty),\n               \'badge-assertive\': ($ctrl.requirements.needCertificationCount + $ctrl.requirements.pendingCertificationCount < $ctrl.parameters.sigQty)}"><span ng-if="$ctrl.requirements.certificationCount || !$ctrl.requirements.pendingCertificationCount"><i ng-if="!$ctrl.requirements.needCertificationCount" class="ion-android-done"></i> {{$ctrl.requirements.certificationCount}} <i ng-if="$ctrl.requirements.willNeedCertificationCount" class="ion-android-warning"></i> </span><span ng-if="$ctrl.requirements.pendingCertificationCount"><ng-if ng-if="$ctrl.requirements.certificationCount">+</ng-if><i class="ion-clock"></i> {{$ctrl.requirements.pendingCertificationCount}}</span></span>');
+$templateCache.put('templates/common/badge_given_certification_count.html','<div ng-attr-id="{{$ctrl.csId}}" class="badge badge-calm" ng-class="{\'badge-assertive\': $ctrl.identity.given_cert.length >= $ctrl.parameters.sigStock}"><span><i ng-if="$ctrl.identity.given_cert.length" class="ion-android-done"></i> {{$ctrl.identity.given_cert.length}} </span><span ng-if="$ctrl.identity.given_cert_pending.length">(<ng-if ng-if="$ctrl.identity.given_cert.length">+</ng-if><i class="ion-clock"></i> {{$ctrl.identity.given_cert_pending.length}}) </span><small>/ {{$ctrl.parameters.sigStock}}</small></div>');
+$templateCache.put('templates/common/form_error_messages.html','<div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div>');
+$templateCache.put('templates/common/popover_copy.html','<ion-popover-view class="popover-copy" style="height: {{(!rows || rows &lt;= 1) ? 50 : rows*22}}px"><ion-content scroll="false"><div class="list"><div class="item item-input"><input type="text" autocomplete="off" ng-if="!rows || rows &lt;= 1" ng-model="value"><textarea ng-if="rows && rows > 1" ng-model="value" rows="{{rows}}" cols="10">\n      </textarea></div></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/common/popover_helptip.html','<ion-popover-view class="popover-helptip"><ion-content scroll="false" class="list"><p><i ng-if="icon.position && !icon.position.startsWith(\'bottom-\')" class="{{icon.class}} icon-{{icon.position}} hidden-xs" style="{{icon.style}}"></i><a ng-click="closePopover()" class="pull-right button-close" ng-class="{\'pull-left\': icon.position === \'right\', \'pull-right\': icon.position !== \'right\'}"><i class="ion-close"></i> </a><span>&nbsp;</span></p><p class="padding light"><ng-bind-html ng-bind-html="content | translate:contentParams"></ng-bind-html><ng-bind-html ng-bind-html="trustContent"></ng-bind-html></p><div class="text-center" ng-if="!tour"><button class="button button-small button-stable" ng-if="!hasNext" ng-click="closePopover(true)" translate>COMMON.BTN_UNDERSTOOD</button> <button class="button button-small button-stable" id="helptip-btn-ok" ng-if="hasNext" ng-click="closePopover(false)" translate>COMMON.BTN_UNDERSTOOD</button> <button id="helptip-btn-ok" class="button button-small button-positive icon-right ink" ng-if="hasNext" ng-click="closePopover(true)"><i class="icon ion-chevron-right"></i></button></div><div class="text-center" ng-if="tour"><button class="button button-small button-positive" id="helptip-btn-ok" ng-if="!hasNext" ng-click="closePopover(false)" translate>COMMON.BTN_CLOSE</button> <button id="helptip-btn-ok" class="button button-small button-positive icon-right ink" ng-if="hasNext" ng-click="closePopover(true)">{{\'COMMON.BTN_CONTINUE\'|translate}} <i class="icon ion-chevron-right"></i></button></div><p><i ng-if="icon.position && icon.position.startsWith(\'bottom-\')" class="{{icon.class}} icon-{{icon.position}} hidden-xs"></i></p></ion-content></ion-popover-view>');
+$templateCache.put('templates/common/popover_locales.html','<ion-popover-view class="fit popover-locales" style="height: {{locales.length*48}}px"><ion-content scroll="false"><div class="list item-text-wrap block"><a ng-repeat="l in locales track by l.id" class="item item-icon-left ink" ng-click="changeLanguage(l.id)"><i class="item-image avatar" style="background-image: url(./img/flag-{{l.flag}}.png)"></i> {{l.label | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/common/popover_profile.html','');
+$templateCache.put('templates/common/popover_share.html','<ion-popover-view class="popover-share"><ion-content scroll="false"><div class="bar bar-header"><h1 class="title">{{titleKey|translate:titleValues}}</h1><span class="gray pull-right">{{time|formatDate}}</span></div><div class="list no-margin no-padding has-header has-footer block"><div class="item item-input"><input type="text" autocomplete="off" ng-model="value"></div></div><div class="bar bar-footer"><div class="button-bar"><a class="button button-icon positive icon ion-social-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{postUrl|formatEncodeURI}}&amp;title={{postMessage|formatEncodeURI}}" onclick="window.open(this.href, \'facebook-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_FACEBOOK\'|translate}}"></a> <a class="button button-icon positive icon ion-social-twitter" href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&amp;text={{postMessage|formatEncodeURI}}" onclick="window.open(this.href, \'twitter-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_TWITTER\'|translate}}"></a> <a class="button button-icon positive icon ion-social-googleplus" href="https://plus.google.com/share?url={{postUrl|formatEncodeURI}}" onclick="window.open(this.href, \'google-plus-share\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=296,width=580\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_GOOGLEPLUS\'|translate}}"></a> <a class="button button-icon positive icon ion-social-diaspora" href="https://sharetodiaspora.github.io/?title={{postMessage|formatEncodeURI}}&amp;url={{postUrl|formatEncodeURI}}" onclick="window.open(this.href, \'diaspora-share\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296\');return false;" title="{{\'COMMON.POPOVER_SHARE.SHARE_ON_DIASPORA\'|translate}}"></a> <a class="button-close" title="{{\'COMMON.BTN_CLOSE\'|translate}}" ng-click="closePopover()"><i class="icon ion-close"></i></a></div></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/common/popup_password.html','<form name="pwdForm" ng-submit="submit($event)"><div class="list" ng-init="setForm(pwdForm)"><label class="item item-input" ng-class="{\'item-input-error\': pwdForm.$submitted && pwdForm.password.$invalid}"><input name="password" type="password" placeholder="{{\'ACCOUNT.SECURITY.KEYFILE.PASSWORD_POPUP.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-minlength="1" required></label><div class="form-errors" ng-if="pwdForm.$submitted && pwdForm.pseudo.$error" ng-messages="pwdForm.password.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="form-errors" ng-if="error"><div class="form-error">{{error|translate}}</div></div></div></form>');
+$templateCache.put('templates/common/qrcode.html','<a ng-attr-id="{{ qrcodeId }}" ng-show="!loading" class="qrcode fade-in pull-right" ng-class="{\'active\': toggleQRCode}" ng-click="toggleQRCode = !toggleQRCode"><div class="content"></div><div class="footer item item-icon-left item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click="{{:rebind:formData.pubkey}}" ng-click="$event.stopPropagation()"><i class="icon ion-key"></i> <span>{{:locale:\'COMMON.PUBKEY\'|translate}}</span><h4 id="pubkey" class="dark">{{:rebind:formData.pubkey}}</h4></div></a>');
+$templateCache.put('templates/common/view_passcode.html','<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm" translate>COMMON.PASSCODE.TITLE</span></ion-nav-title><ion-content scroll="false"></ion-content></ion-view>');
+$templateCache.put('templates/currency/items_network.html','<ion-item id="helptip-network-blockchain" class="item-icon-left item-text-wrap"><i class="icon ion-clock"></i> <span class="col col-60" translate="">CURRENCY.VIEW.MEDIAN_TIME</span> <span class="badge badge-stable">{{formData.medianTime | medianDate}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-lock-combination"></i> <span class="col col-75" translate="">CURRENCY.VIEW.POW_MIN</span> <span class="badge badge-stable">{{formData.difficulty | formatInteger}}</span></ion-item><cs-extension-point name="network-actual"></cs-extension-point><div class="item item-divider"><span translate="">CURRENCY.VIEW.NETWORK_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-clock" style="position: absolute; font-size: 20px; left: 16px; margin-top: 11px"></i> <b class="icon-secondary ion-lock-combination" style="left: 14px; margin-top: -4px"></b> <b class="icon-secondary ion-arrow-right-c" style="font-size: 12px; left: 28px; margin-top: -4px"></b> <b class="icon-secondary ion-lock-combination" style="left: 38px; margin-top: -4px"></b> <span class="col col-75" translate="">CURRENCY.VIEW.AVG_GEN_TIME</span> <span class="badge badge-stable">{{formData.avgGenTime | formatDuration}}</span></ion-item><div id="helptip-network-peers" class="item item-divider"><div class="pull-left"><span ng-if="search.type==\'member\'" translate="">PEER.MEMBERS</span> <span ng-if="search.type==\'mirror\'" translate="">PEER.MIRRORS</span> <span ng-if="search.type==\'offline\'" translate="">PEER.OFFLINE</span> <span ng-if="!search.type" translate="">PEER.PEERS</span> <span ng-if="!search.loading">({{search.results.length}})</span></div><div class="buttons pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner></div></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include>');
+$templateCache.put('templates/currency/items_parameters.html','<div bind-notifier="{ rebind:formData.useRelative }"><ion-item class="item-icon-left item-text-wrap visible-xs visible-sm"><i class="icon ion-android-bookmark"></i> <span translate>CURRENCY.VIEW.CURRENCY_NAME</span><div class="item-note dark" ng-if="!loading">{{formData.currency}} (<span ng-bind-html=":rebind:formData.currency | currencySymbol:formData.useRelative"></span>)</div></ion-item><ion-item id="helptip-currency-mass-member" class="item-icon-left item-text-wrap"><i class="icon ion-pie-graph"></i><div class="col col-60"><span translate>CURRENCY.VIEW.SHARE</span> <span class="gray">(M<sub>t</sub>/N<sub>t</sub>)</span></div><span id="helptip-currency-mass-member-unit" ng-if="!loading" class="badge badge-calm" ng-bind-html=":rebind:formData.MoverN | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-record"></i><div class="col col-60"><span translate>CURRENCY.VIEW.MASS</span> <span class="gray">(M<sub>t</sub>)</span></div><span class="badge badge-energized" ng-if="!loading" ng-bind-html=":rebind:formData.M | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span></ion-item><cs-extension-point name="parameters-actual"></cs-extension-point><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-60"><span translate>CURRENCY.VIEW.C_ACTUAL</span> <span class="gray">(c<sub>{{\'CURRENCY.VIEW.CURRENT\'|translate}}</sub>)</span></div><span class="badge badge-stable">{{formData.cactual | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dt | formatPeriod}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-load-c"></i><div class="col col-60"><span translate>CURRENCY.VIEW.UD</span> <span class="gray">({{\'COMMON.UD\'|translate}}<sub>t</sub>)</span></div><div class="badge badge-royal" ng-if="!loading"><span ng-if="formData.useRelative">1<ng-bind-html ng-bind-html=":rebind:formData.currency| currencySymbol:true"></ng-bind-html></span><span ng-if="!formData.useRelative" ng-bind-html=":rebind:formData.currentUD | formatAmount:{currency: formData.currency, useRelative: formData.useRelative, currentUD: formData.currentUD}"></span> &nbsp;/&nbsp;{{formData.dt | formatPeriod}}</div></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>COMMON.BTN_RELATIVE_UNIT</div><label class="toggle toggle-royal" id="helptip-currency-change-unit"><input type="checkbox" ng-model="formData.useRelative"><div class="track"><div class="handle"></div></div></label></div><a name="helptip-currency-rules-anchor"></a><div class="item item-divider" id="helptip-currency-rules"><span translate>CURRENCY.VIEW.MONEY_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-60"><span translate>CURRENCY.VIEW.C_RULE</span> <span class="gray">(c)</span></div><span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{formData.c*100 | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dt | formatPeriod}}</span><span class="badge badge-stable" ng-if="!loading && formData.udReevalTime0">{{formData.c*100 | formatNumeral: \'0,0.00\'}} %&nbsp;/&nbsp;{{formData.dtReeval | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0 && formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.DT_REEVAL</span> <span class="gray">(dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading" translate="CURRENCY.VIEW.DT_REEVAL_VALUE" translate-values="formData"></span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0 && formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.UD_REEVAL_TIME0</span> <span class="gray">(t0<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading">{{formData.udReevalTime0|medianDate}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allRules"><i class="icon ion-load-c"></i> <b class="ion-calculator icon-secondary" style="font-size: 18px; left: 36px; top: -12px"></b><div class="col col-60"><span translate>CURRENCY.VIEW.UD_RULE</span> <span class="gray" ng-if="formData.udReevalTime0">- {{\'COMMON.UD\'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)</span></div><span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{\'COMMON.UD\'|translate}}<sub>t-1</sub> + c<sup>2</sup> * M<sub>t-1</sub>/N<sub>t-1</sub></span><span class="item-note dark" ng-if="!loading && formData.udReevalTime0">{{\'COMMON.UD\'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub> - dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>)+ c<sup>2</sup> * (M/N)(t<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub> - dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub>) / dt<sub>{{\'CURRENCY.VIEW.REEVAL_SYMBOL\'|translate}}</sub></span></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>CURRENCY.VIEW.DISPLAY_ALL_RULES</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.allRules"><div class="track"><div class="handle"></div></div></label></div></div>');
+$templateCache.put('templates/currency/items_wot.html','<div bind-notifier="{ rebind:formData.useRelative }"><a name="helptip-currency-newcomers-anchor"></a><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person-stalker"></i><div class="col col-60"><span translate>CURRENCY.VIEW.MEMBERS</span> <span class="gray">(N<sub>{{\'CURRENCY.VIEW.CURRENT\'|translate}}</sub>)</span></div><span class="badge badge-calm" ng-if="!loading">{{formData.N | formatInteger}}</span></ion-item><ion-item id="helptip-currency-newcomers" class="item-icon-left item-text-wrap"><i class="icon ion-arrow-graph-up-right"></i><div class="col col-75"><span translate="CURRENCY.VIEW.MEMBERS_VARIATION" translate-values="{duration: formData.durationFromLastUD}"></span> <span class="gray">(&#916;N)</span></div><div class="badge" ng-if="!loading" ng-class="{\'badge-balanced\': (formData.N>formData.Nprev), \'badge-stable\': (formData.N==formData.Nprev) ,\'badge-assertive\': (formData.Nprev>formData.N)}">{{formData.N > formData.Nprev ? \'+\' : \'\'}}{{formData.N - formData.Nprev}}</div></ion-item><cs-extension-point name="wot-actual"></cs-extension-point><div class="item item-divider"><span translate>CURRENCY.VIEW.WOT_RULES_DIVIDER</span></div><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-ribbon-b"></i> <span class="col col-75" translate>CURRENCY.VIEW.SIG_QTY_RULE</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.sigQty}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.MS_WINDOW</span> <span class="badge badge-assertive" ng-if="!loading">{{formData.msWindow | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap"><i class="icon ion-person"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.MS_VALIDITY</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.msValidity | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-clock icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.SIG_WINDOW</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigWindow | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 33px; top: -12px"></b> <span class="col col-60" translate>CURRENCY.VIEW.SIG_VALIDITY</span> <span class="badge badge-balanced" ng-if="!loading">{{formData.sigValidity | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-a"></i> <span class="col col-75" translate>CURRENCY.VIEW.SIG_STOCK</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigStock}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-clock" style="position: absolute; font-size: 20px; left: 16px"></i> <b class="ion-ribbon-a icon-secondary" style="left: 16px; top: -15px"></b> <b class="ion-arrow-right-c icon-secondary" style="left: 28px; top: -15px"></b> <b class="ion-ribbon-a icon-secondary" style="left: 40px; top: -15px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SIG_PERIOD</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sigPeriod | formatDuration}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-steam"></i> <b class="ion-person icon-secondary" style="left: 38px; top: -17px"></b><div class="col col-75"><span ng-bind-html="\'CURRENCY.VIEW.STEP_MAX\'|translate"></span> <span class="gray">(stepMax)</span></div><span class="badge badge-assertive" ng-if="!loading">{{formData.stepMax}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SENTRIES</span> <span class="badge badge-stable" ng-if="!loading">{{formData.sentries}}</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-ribbon-b"></i> <b class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span class="col col-75" translate>CURRENCY.VIEW.SENTRIES_FORMULA</span> <span class="item-note dark" ng-if="!loading">{{\'CURRENCY.VIEW.MATH_CEILING\'| translate}}( N<sub>t</sub><sup>^ (1 / stepMax)</sup>)</span></ion-item><ion-item class="item-icon-left item-text-wrap" ng-if="formData.allWotRules"><i class="icon ion-pull-request"></i> <span class="col col-75" translate>CURRENCY.VIEW.XPERCENT</span> <span class="badge badge-stable" ng-if="!loading">{{formData.xpercent*100| formatNumeral: \'0,0\'}} %</span></ion-item><div class="item item-toggle dark"><div class="item-label text-right gray" translate>CURRENCY.VIEW.DISPLAY_ALL_RULES</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.allWotRules"><div class="track"><div class="handle"></div></div></label></div></div>');
+$templateCache.put('templates/currency/lookup.html','<ion-view view-title="{{\'CURRENCY.SELECT.TITLE\' | translate}}"><ion-content class="padding no-padding-xs no-padding-sm"><h4 class="content double-padding-x" translate>CURRENCY.SELECT.CURRENCIES</h4><ng-include src="::\'templates/currency/lookup_form.html\'"></ion-content></ion-view>');
+$templateCache.put('templates/currency/lookup_form.html','<ion-list><div class="item center" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div ng-repeat="currency in search.results" ng-class="{ selected: selectedCurrency == currency }"><a class="item card card-item stable-bg padding ink" ng-click="selectCurrency(currency)" ng-class="{ selected: selectedCurrency && selectedCurrency.name == currency.name }"><h2>{{currency.name}}</h2><h4 class="gray">{{currency.peer.server}}</h4><span class="badge badge-royal">{{\'CURRENCY.SELECT.MEMBERS_COUNT\'|translate:currency}}</span></a></div></ion-list>');
+$templateCache.put('templates/currency/modal_license.html','<ion-modal-view class="modal-full-height modal-license"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>CURRENCY.LICENSE.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-header-bar><ion-content scroll="false" style="bottom: 0px"><p ng-if="!licenseUrl && !loading">translate>CURRENCY.LICENSE.NO_LICENSE_FILE</p><iframe ng-if="licenseUrl && !loading" class="padding-left padding-right no-padding-xs iframe-license" id="iframe-license" ng-src="{{licenseUrlHtml||licenseUrl}}"></iframe><div class="padding hidden-xs text-center"><button class="button button-stable ink" ng-click="downloadFile()">{{\'CURRENCY.LICENSE.BTN_DOWNLOAD\' | translate}}</button> <button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></ion-content></ion-modal-view>');
+$templateCache.put('templates/currency/popover_actions.html','<ion-popover-view class="fit has-header popover-wallet-actions"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/currency/view_currency.html','<ion-view left-buttons="leftButtons" cache-view="false"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'CURRENCY.VIEW.TAB_CURRENCY\'|translate}}" icon="ion-stats-bars" ui-sref="app.currency.tab_parameters"><ion-nav-view name="tab-parameters"></ion-nav-view></ion-tab><ion-tab title="{{\'CURRENCY.VIEW.TAB_WOT\'|translate}}" icon="ion-person-stalker" ui-sref="app.currency.tab_wot"><ion-nav-view name="tab-wot"></ion-nav-view></ion-tab><ion-tab id="helptip-currency-tab-peers" title="{{\'CURRENCY.VIEW.TAB_NETWORK\'|translate}}" icon="ion-cloud" ui-sref="app.currency.tab_network"><ion-nav-view name="tab-network"></ion-nav-view></ion-tab><ion-tab title="{{\'CURRENCY.VIEW.TAB_BLOCKS\'|translate}}" icon="ion-lock-combination" ui-sref="app.currency.tab_blocks"><ion-nav-view name="tab-blocks"></ion-nav-view></ion-tab></ion-tabs></ion-view>');
+$templateCache.put('templates/currency/view_currency_lg.html','<ion-view left-buttons="leftButtons" cache-view="false"><ion-nav-title bind-notifier="{ rebind:formData.useRelative }"><span ng-if="!loading">{{\'CURRENCY.VIEW.TITLE\' | translate}} {{formData.currency|abbreviate}}</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refreshPeers()"></button><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><div class="item item-text-wrap no-border no-padding pull-left"><div class="item-icon-left card padding stable-900-bg"><ion-spinner class="icon" icon="android" ng-if="loading"></ion-spinner><i class="icon ion-help-circled calm" ng-if="!loading"></i><div class="item-icon-left-padding" style="min-height: 26px"><span ng-if="!loading" trust-as-html="\'CURRENCY.VIEW.CURRENCY_SHORT_DESCRIPTION\'|translate:formData"></span></div></div></div><div class="row responsive-sm"><div class="col list"><div class="item item-divider"><span translate="">CURRENCY.VIEW.MONEY_DIVIDER</span></div><ng-include src="::\'templates/currency/items_parameters.html\'"></ng-include></div><div class="col list"><div class="item item-divider"><span translate="">CURRENCY.VIEW.WOT_DIVIDER</span></div><ng-include src="::\'templates/currency/items_wot.html\'"></ng-include></div></div></ion-content></ion-view>');
+$templateCache.put('templates/help/help.html','<a name="join"></a><h2 translate>HELP.JOIN.SECTION</h2><a name="join-salt"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-salt\']"><div class="col col-20" translate>LOGIN.SALT</div><div class="col" translate>HELP.JOIN.SALT</div></div><a name="join-password"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-password\']"><div class="col col-20" translate>LOGIN.PASSWORD</div><div class="col" translate>HELP.JOIN.PASSWORD</div></div><a name="join-pseudo"></a><div class="row responsive-sm" ng-class="itemsClass[\'join-pseudo\']"><div class="col col-20" translate>ACCOUNT.NEW.PSEUDO</div><div class="col" translate>HELP.JOIN.PSEUDO</div></div><a name="login"></a><h2 translate>HELP.LOGIN.SECTION</h2><a name="login-pubkey"></a><div class="row responsive-sm" ng-class="itemsClass[\'login-pubkey\']"><div class="col col-20" translate>HELP.LOGIN.PUBKEY</div><div class="col" translate>HELP.LOGIN.PUBKEY_DEF</div></div><a name="login-method"></a><div class="row responsive-sm" ng-class="itemsClass[\'login-method\']"><div class="col col-20" translate>HELP.LOGIN.METHOD</div><div class="col" translate>HELP.LOGIN.METHOD_DEF</div></div><a name="glossary"></a><h2 translate>HELP.GLOSSARY.SECTION</h2><a name="pubkey"></a><div class="row responsive-sm" ng-class="itemsClass.pubkey"><div class="col col-20" translate>COMMON.PUBKEY</div><div class="col" translate>HELP.GLOSSARY.PUBKEY_DEF</div></div><a name="blockchain"></a><div class="row responsive-sm" ng-class="itemsClass.blockchain"><div class="col col-20" translate>HELP.GLOSSARY.BLOCKCHAIN</div><div class="col" translate>HELP.GLOSSARY.BLOCKCHAIN_DEF</div></div><a name="universal_dividend"></a> <a name="ud"></a><div class="row responsive-sm" ng-class="itemsClass.ud"><div class="col col-20" translate>COMMON.UNIVERSAL_DIVIDEND</div><div class="col" translate>HELP.GLOSSARY.UNIVERSAL_DIVIDEND_DEF</div></div><a name="member"></a><div class="row responsive-sm" ng-class="itemsClass.member"><div class="col col-20" translate>HELP.GLOSSARY.MEMBER</div><div class="col" translate>HELP.GLOSSARY.MEMBER_DEF</div></div><a name="wot"></a><div class="row responsive-sm" ng-class="itemsClass.wot"><div class="col col-20" translate>HELP.GLOSSARY.WOT</div><div class="col" translate>HELP.GLOSSARY.WOT_DEF</div></div><a name="currency_rules"></a><div class="row responsive-sm" ng-class="itemsClass.currency_rules"><div class="col col-20" translate>HELP.GLOSSARY.CURRENCY_RULES</div><div class="col" translate>HELP.GLOSSARY.CURRENCY_RULES_DEF</div></div><a name="distance_rule"></a><div class="row responsive-sm" ng-class="itemsClass.distance_rule"><div class="col col-20" translate>HELP.GLOSSARY.DISTANCE_RULE</div><div class="col" translate>HELP.GLOSSARY.DISTANCE_RULE_DEF</div></div>');
+$templateCache.put('templates/help/modal_help.html','<ion-modal-view class="modal-full-height modal-help"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CLOSE</button><h1 class="title" translate>HELP.TITLE</h1></ion-header-bar><ion-content scroll="true" class="padding no-padding-xs"><div ng-class="listClass"><ng-include src="::\'templates/help/help.html\'"></ng-include></div><div class="padding hidden-xs text-center"><button class="button button-positive ink" type="submit" ng-click="closeModal()">{{\'COMMON.BTN_CLOSE\' | translate}}</button></div></ion-content></ion-modal-view>');
+$templateCache.put('templates/help/view_help.html','<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm" translate="">HELP.TITLE</span></ion-nav-title><ion-content scroll="true" class="padding"><ng-include src="::\'templates/help/help.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/home/home.html','<ion-view id="home"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"></ion-nav-buttons><ion-content class="positive-900-bg circle-bg-dark"><div class="row padding-horizontal no-padding-xxs responsive-lg"><div class="col text-center no-padding-xs main-container"><div id="helptip-home-logo" class="logo"></div><h4><span class="hidden-xs" translate="">HOME.WELCOME</span> <b ng-show="!loading" translate-values=":currency:{currency: $root.currency.name}" translate="">HOME.MESSAGE</b></h4><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding animate-fade-in animate-show-hide ng-hide" ng-show="!loading && error"><div class="card card-item padding"><p class="item-content item-text-wrap"><span class="dark" trust-as-html="\'HOME.CONNECTION_ERROR\'|translate:node"></span></p><button type="button" class="button button-positive icon icon-left ion-refresh ink" ng-click="reload()">{{\'COMMON.BTN_REFRESH\'|translate}}</button></div></div><div class="center animate-show-hide ng-hide" ng-show="!loading && !error"><button type="button" class="button button-block button-stable button-raised icon-left icon ion-easel ink-dark hidden-xs" ng-show="login" ng-click="startHelpTour($event)">{{\'COMMON.BTN_HELP_TOUR\'|translate}}</button> <button type="button" class="button button-block button-positive button-raised ink-dark" ng-click="showJoinModal()" ng-if="!login" translate="">LOGIN.CREATE_FREE_ACCOUNT</button> <button type="button" class="item button button-block button-raised icon icon-left ion-person ink-dark" ng-class="{\'button-stable\': smallscreen, \'button-positive\': !smallscreen}" ui-sref="app.view_wallet" ng-show="login" translate="">MENU.ACCOUNT</button> <button type="button" class="item button button-block button-stable button-raised icon icon-left ion-card ink-dark visible-xs" ui-sref="app.view_wallet_tx" ng-if="login"><b class="icon-secondary ion-clock" style="left: 52px; top: -2px; font-size: 10pt; display: block"></b> {{\'MENU.TRANSACTIONS\'|translate}}</button> <button type="button" class="item button button-block button-positive button-raised icon icon-left ion-paper-airplane ink-dark visible-xs" ng-click="showTransferModal()" ng-if="login" translate="">COMMON.BTN_SEND_MONEY</button><br class="visible-xs visible-sm"><div class="text-center no-padding" ng-show="!login"><br class="visible-xs visible-sm">{{\'LOGIN.HAVE_ACCOUNT_QUESTION\'|translate}} <b></b></div><div class="text-center no-padding" ng-show="login"><br class="visible-xs visible-sm"><span ng-bind-html="\'HOME.NOT_YOUR_ACCOUNT_QUESTION\'|translate:{pubkey: walletData.pubkey}"></span><br><b><a class="assertive" ng-click="logout({askConfirm: true})" translate="">HOME.BTN_CHANGE_ACCOUNT</a></b></div><button type="button" class="button button-block button-stable button-raised ink visible-xs visible-sm" ui-sref="app.view_wallet" ng-if="!login" translate="">COMMON.BTN_LOGIN</button><div class="text-center no-padding visible-xs stable"><br>{{\'COMMON.APP_VERSION\'|translate:{version: config.version} }} | <a href="#" ng-click="showAboutModal()" translate="">HOME.BTN_ABOUT</a></div></div></div><div class="col no-padding" ng-class="{\'col-30\': !feed, \'col-10\': feed}">&nbsp;</div><div class="col col-30 no-padding" ng-if="feed"><div class="feed padding-horizontal no-padding-xs padding-top"><h3 class="padding-left"><i class="icon ion-speakerphone"></i> {{feed.title}} <small><a ng-click="openLink($event, feed.home_page_url)" class="gray"><span translate="">HOME.SHOW_ALL_FEED</span> <i class="icon ion-chevron-right"></i></a></small></h3><div class="animate-show-hide ng-hide" ng-show="feed"><div ng-repeat="item in feed.items" class="card padding no-margin-xs"><div class="header"><i ng-if="item.author.avatar" class="avatar" style="background-image: url({{item.author.avatar}})"></i> <a ng-class="{\'avatar-left-padding\': item.author.avatar}" class="author" ng-click="item.author.url && openLink($event, item.author.url)">{{item.author.name}} </a><a ng-if="item.time" title="{{item.time|formatDate}}" ng-click="openLink($event, item.url)" class="item-note"><small><i class="icon ion-clock"></i>&nbsp;{{item.time|formatFromNow}}</small></a></div><h2 class="title feed-title"><a ng-click="openLink($event, item.url)">{{item.title}}</a></h2><div ng-if="item.content" class="content feed-content" trust-as-html="item.content"></div><h4 class="card-footer feed-footer text-right positive-100"><a ng-click="openLink($event, item.url)"><span ng-if="item.truncated" translate="">HOME.READ_MORE</span> <span ng-if="!item.truncated" translate="">COMMON.BTN_SHOW</span> <i class="icon ion-chevron-right"></i></a></h4></div></div></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/join/modal_choose_account_type.html','<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slides.slider.activeIndex"></button><h1 class="title" translate="">ACCOUNT.NEW.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slides.slider.activeIndex === 0" ng-click="slideNext()"><span translate="">COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header padding"><div class="center padding" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div ng-if="!loading"><p ng-bind-html="\'ACCOUNT.NEW.INTRO_WARNING_TIME\'|translate:currency"></p><div class="row responsive-sm"><div class="col"><div class="item card item-icon-left padding item-text-wrap stable-bg"><i class="icon ion-android-warning assertive"></i><p class="item-content item-icon-left-padding"><span class="dark" translate="">ACCOUNT.NEW.INTRO_WARNING_SECURITY</span><br><small translate="">ACCOUNT.NEW.INTRO_WARNING_SECURITY_HELP</small></p></div></div><div class="col"><div class="item card item-icon-left padding item-text-wrap stable-bg"><i class="icon ion-information-circled positive"></i><p class="item-content item-icon-left-padding"><span class="dark" trust-as-html="\'ACCOUNT.NEW.REGISTRATION_NODE\'|translate:currency.node"></span><br><small trust-as-html="\'ACCOUNT.NEW.REGISTRATION_NODE_HELP\'|translate:currency.node"></small></p></div></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button button-positive icon-right ion-chevron-right ink" ng-click="slideNext()" ng-disabled="loading" type="button" translate="">COMMON.BTN_START</button></div></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header padding"><p translate="">ACCOUNT.NEW.SELECT_ACCOUNT_TYPE</p><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectAccountTypeAndClose(\'member\')"><div class="item-content item-text-wrap"><i class="item-image icon dark ion-person"></i><h2 translate="">ACCOUNT.NEW.MEMBER_ACCOUNT</h2><h4 class="gray" ng-bind-html="\'ACCOUNT.NEW.MEMBER_ACCOUNT_HELP\'|translate:currency"></h4><i class="icon dark ion-ios-arrow-right"></i></div></div><cs-extension-point name="select-account-type"></cs-extension-point><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectAccountTypeAndClose(\'wallet\')"><div class="item-content item-text-wrap"><i class="item-image icon dark ion-card"></i><h2 translate="">ACCOUNT.NEW.WALLET_ACCOUNT</h2><h4 class="gray" translate="">ACCOUNT.NEW.WALLET_ACCOUNT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button></div></ion-content></ion-slide-page></ion-slides></ion-modal-view>');
+$templateCache.put('templates/join/modal_join_member.html','<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="doPrev()" ng-if="slides.slider.activeIndex && slideBehavior.hasPreviousButton"></button> <button class="button button-icon button-clear icon ion-ios-help-outline visible-xs" ng-if="slideBehavior.helpAnchor" ng-click="showHelpModal(slideBehavior.helpAnchor)"></button><h1 class="title" translate>ACCOUNT.NEW.MEMBER_ACCOUNT_TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasNextButton" ng-click="doNext()"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-class="{\'button-text-stable\': !isLicenseRead}" ng-if="slideBehavior.hasAcceptButton" ng-click="isLicenseRead ? doNext() : undefined"><span translate>ACCOUNT.NEW.BTN_ACCEPT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasSendButton" ng-click="doNewAccount()"><i class="icon ion-android-send"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page ng-if="licenseFileUrl"><ion-content class="has-header" scroll="false"><div class="padding" translate>ACCOUNT.NEW.INFO_LICENSE</div><div class="center padding" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><iframe ng-if="!loading" class="padding-left padding-right no-padding-xs iframe-license" id="iframe-license" ng-src="{{licenseFileUrl}}"></iframe><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doNext(\'licenceForm\')" ng-disabled="!isLicenseRead" type="button" translate>ACCOUNT.NEW.BTN_ACCEPT_LICENSE</button></div></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="true"><form name="pseudoForm" novalidate="" ng-submit="doNext(\'pseudoForm\')"><div class="item item-text-wrap text-center padding"><a class="pull-right icon-help hidden-xs" ng-click="showHelpModal(\'join-pseudo\')"></a> <span translate>ACCOUNT.NEW.PSEUDO_WARNING</span></div><div class="list" ng-init="setForm(pseudoForm, \'pseudoForm\')"><div class="item item-input" ng-class="{\'item-input-error\': (pseudoForm.$submitted && pseudoForm.pseudo.$invalid) || (uiAlreadyUsed && formData.pseudo)}"><span class="input-label" translate>ACCOUNT.NEW.PSEUDO</span> <input id="pseudo" name="pseudo" type="text" placeholder="{{\'ACCOUNT.NEW.PSEUDO_HELP\' | translate}}" ng-model="formData.pseudo" autocomplete="off" ng-minlength="3" ng-maxlength="100" ng-pattern="userIdPattern" ng-model-options="{ debounce: 250 }" required></div><div class="form-errors" ng-show="pseudoForm.$submitted && pseudoForm.pseudo.$error" ng-messages="pseudoForm.pseudo.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 3}"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG_WITH_LENGTH" translate-values="{maxLength: 100}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.INVALID_USER_ID"></span></div></div><div class="text-right" style="min-height: 18px"><div class="form-error gray" ng-if="formData.computing && formData.pseudo"><ion-spinner class="icon ion-spinner-small" icon="android" ng-if="formData.computing && formData.pseudo"></ion-spinner><span translate>ACCOUNT.NEW.CHECKING_PSEUDO</span></div><ng-if ng-if="!formData.computing && formData.pseudo"><div class="form-error balanced" ng-if="!uiAlreadyUsed "><i class="icon ion-checkmark balanced"></i> <span translate>ACCOUNT.NEW.PSEUDO_AVAILABLE</span></div><div class="form-error" ng-if="uiAlreadyUsed"><i class="icon ion-close-circled assertive"></i> <span translate>ACCOUNT.NEW.PSEUDO_NOT_AVAILABLE</span></div></ng-if></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" ng-disabled="uiAlreadyUsed" translate>COMMON.BTN_NEXT</button></div></div></form></ion-content></ion-slide-page><ion-slide-page ng-if="!formData.pubkey"><ion-content class="has-header" scroll="true"><form name="saltForm" novalidate="" ng-submit="doNext(\'saltForm\')"><div class="list" ng-init="setForm(saltForm, \'saltForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-salt\')"></a> <span translate>ACCOUNT.NEW.SALT_WARNING</span></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.username.$invalid}"><span class="input-label" translate>LOGIN.SALT</span> <input ng-if="!showUsername" name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" autocomplete="off" ng-minlength="8" different-to="formData.pseudo" required> <input ng-if="showUsername" name="username" type="text" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" autocomplete="off" ng-minlength="8" different-to="formData.pseudo" required></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.username.$error" ng-messages="saltForm.username.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="differentTo"><span translate="ERROR.EQUALS_TO_PSEUDO"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.confirmSalt.$invalid}"><span class="input-label pull-right" translate>ACCOUNT.NEW.SALT_CONFIRM</span> <input ng-if="!showUsername" name="confirmUsername" type="password" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" autocomplete="off" compare-to="formData.username"> <input ng-if="showUsername" name="confirmUsername" type="text" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" autocomplete="off" compare-to="formData.username"></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.confirmUsername.$error" ng-messages="saltForm.confirmUsername.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.SALT_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showUsername"><div class="track"><div class="handle"></div></div></label></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content></ion-slide-page><ion-slide-page ng-if="!formData.pubkey"><ion-content class="has-header" scroll="true"><form name="passwordForm" novalidate="" ng-submit="doNext(\'passwordForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-password\')"></a> <span translate>ACCOUNT.NEW.PASSWORD_WARNING</span></div><div class="list" ng-init="setForm(passwordForm, \'passwordForm\')"><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.password.$invalid}"><span class="input-label" translate>LOGIN.PASSWORD</span> <input ng-if="!showPassword" name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" autocomplete="off" ng-change="formDataChanged()" ng-minlength="8" different-to="formData.username" required> <input ng-if="showPassword" name="text" type="text" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" autocomplete="off" ng-change="formDataChanged()" ng-minlength="8" different-to="formData.username" required></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.password.$error" ng-messages="passwordForm.password.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="differentTo"><span translate="ERROR.EQUALS_TO_SALT"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.confirmPassword.$invalid}"><span class="input-label" translate>ACCOUNT.NEW.PASSWORD_CONFIRM</span> <input ng-if="!showPassword" name="confirmPassword" type="password" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" autocomplete="off" compare-to="formData.password"> <input ng-if="showPassword" name="confirmPassword" type="text" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" autocomplete="off" compare-to="formData.password"></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.confirmPassword.$error" ng-messages="passwordForm.confirmPassword.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.PASSWORD_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showPassword"><div class="track"><div class="handle"></div></div></label></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" ng-click="getRevocationDocument()" translate>COMMON.BTN_NEXT</button></div><div class="padding hidden-xs"></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="true"><div class="center padding" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><ng-if ng-if="!formData.computing"><div class="animate-fade-in animate-show-hide ng-hide" ng-show="accountAvailable"><div class="padding text-center" translate>ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION</div><div class="list"><ion-item class="item text-center item-text-wrap"><h3 class="gray" translate>LOGIN.ASSOCIATED_PUBKEY</h3><h3 class="dark bold">{{formData.pubkey}}</h3></ion-item></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-click="doNewAccount()" translate>COMMON.BTN_SEND <i class="icon ion-android-send"></i></button></div></div><div class="animate-fade-in animate-show-hide ng-hide" ng-show="!accountAvailable"><ion-item class="item-icon-left item-text-wrap text-center"><i class="icon ion-minus-circled assertive"></i> <span id="modal-license" trust-as-html="\'ERROR.EXISTING_ACCOUNT\'|translate"></span></ion-item><div class="list"><ion-item class="item item-text-wrap item-border"><div class="padding text-center"><span class="gray text-no-wrap">{{formData.pubkey}}</span></div></ion-item><div class="padding text-center"><span translate>ERROR.EXISTING_ACCOUNT_REQUEST</span></div></div><div class="padding hidden-xs text-left"><button class="button button-assertive icon-left ion-chevron-left ink" ng-click="identifierRecovery()" translate>COMMON.BTN_MODIFY</button></div></div></ng-if></ion-content></ion-slide-page></ion-slides></ion-modal-view>');
+$templateCache.put('templates/join/modal_join_wallet.html','<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slideBehavior.hasPreviousButton"></button> <button class="button button-icon button-clear icon ion-ios-help-outline visible-xs" ng-if="slideBehavior.helpAnchor" ng-click="showHelpModal(slideBehavior.helpAnchor)"></button><h1 class="title" translate>ACCOUNT.NEW.WALLET_ACCOUNT_TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasNextButton" ng-click="doNext()"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-if="slideBehavior.hasSendButton" ng-click="doNewAccount()"><i class="icon ion-android-send"></i></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header" scroll="false"><form name="saltForm" novalidate="" ng-submit="doNext(\'saltForm\')"><div class="list" ng-init="setForm(saltForm, \'saltForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-salt\')"></a> <span translate>ACCOUNT.NEW.SALT_WARNING</span></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.username.$invalid}"><span class="input-label" translate>LOGIN.SALT</span> <input ng-if="!showUsername" name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" ng-minlength="8" required> <input ng-if="showUsername" name="username" type="text" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" ng-change="formDataChanged()" ng-model="formData.username" ng-minlength="8" required></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.username.$error" ng-messages="saltForm.username.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': saltForm.$submitted && saltForm.confirmSalt.$invalid}"><span class="input-label pull-right" translate>ACCOUNT.NEW.SALT_CONFIRM</span> <input ng-if="!showUsername" name="confirmUsername" type="password" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" compare-to="formData.username"> <input ng-if="showUsername" name="confirmUsername" type="text" placeholder="{{\'ACCOUNT.NEW.SALT_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmUsername" compare-to="formData.username"></div><div class="form-errors" ng-show="saltForm.$submitted && saltForm.confirmUsername.$error" ng-messages="saltForm.confirmUsername.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.SALT_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showUsername"><div class="track"><div class="handle"></div></div></label></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="false"><form name="passwordForm" novalidate="" ng-submit="doNext(\'passwordForm\')"><div class="item item-text-wrap text-center padding hidden-xs"><a class="pull-right icon-help" ng-click="showHelpModal(\'join-password\')"></a> <span translate>ACCOUNT.NEW.PASSWORD_WARNING</span></div><div class="list" ng-init="setForm(passwordForm, \'passwordForm\')"><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.password.$invalid}"><span class="input-label" translate>LOGIN.PASSWORD</span> <input ng-if="!showPassword" name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-change="formDataChanged()" ng-minlength="8" required> <input ng-if="showPassword" name="text" type="text" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" ng-model="formData.password" ng-change="formDataChanged()" ng-minlength="8" required></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.password.$error" ng-messages="passwordForm.password.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT_WITH_LENGTH" translate-values="{minLength: 8}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input" ng-class="{ \'item-input-error\': passwordForm.$submitted && passwordForm.confirmPassword.$invalid}"><span class="input-label" translate>ACCOUNT.NEW.PASSWORD_CONFIRM</span> <input ng-if="!showPassword" name="confirmPassword" type="password" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" compare-to="formData.password"> <input ng-if="showPassword" name="confirmPassword" type="text" placeholder="{{\'ACCOUNT.NEW.PASSWORD_CONFIRM_HELP\' | translate}}" ng-model="formData.confirmPassword" compare-to="formData.password"></div><div class="form-errors" ng-show="passwordForm.$submitted && passwordForm.confirmPassword.$error" ng-messages="passwordForm.confirmPassword.$error"><div class="form-error" ng-message="compareTo"><span translate="ERROR.PASSWORD_NOT_CONFIRMED"></span></div></div><div class="item item-toggle dark"><span translate>COMMON.SHOW_VALUES</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="showPassword"><div class="track"><div class="handle"></div></div></label></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT</button></div><div class="padding hidden-xs"></div></form></ion-content></ion-slide-page><ion-slide-page><ion-content class="has-header" scroll="false"><div class="padding center" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><div ng-if="accountAvailable && !formData.computing"><div class="padding text-center" translate>ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION</div><div class="list"><ion-item class="item item-text-wrap item-border"><div class="dark pull-right padding-right" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><span class="input-label" translate>COMMON.PUBKEY</span> <span class="gray text-no-wrap" ng-if="formData.computing" translate>ACCOUNT.NEW.COMPUTING_PUBKEY </span><span class="gray text-no-wrap" ng-if="formData.pubkey">{{formData.pubkey}}</span></ion-item></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-click="doNewAccount()" translate>COMMON.BTN_CREATE</button></div></div><div ng-if="!accountAvailable && !formData.computing"><ion-item class="item-icon-left item-text-wrap text-center"><i class="icon ion-android-close active"></i> <span id="modal-license" translate>ERROR.EXISTING_ACCOUNT</span></ion-item><div class="list"><ion-item class="item item-text-wrap item-border"><div class="dark pull-right padding-right" ng-if="formData.computing"><ion-spinner icon="android"></ion-spinner></div><span class="gray text-no-wrap" ng-if="formData.computing" translate>ACCOUNT.NEW.COMPUTING_PUBKEY</span><div class="padding text-center"><span class="gray text-no-wrap" ng-if="formData.pubkey">{{formData.pubkey}}</span></div></ion-item><div class="padding text-center"><span translate>ERROR.EXISTING_ACCOUNT_REQUEST</span></div></div><div class="padding hidden-xs text-left"><button class="button button-assertive icon-left ion-chevron-left ink" ng-click="identifierRecovery()" translate>COMMON.BTN_MODIFY</button></div></div></ion-content></ion-slide-page></ion-slides></ion-modal-view>');
+$templateCache.put('templates/login/form_file_import.html','<div class="item"><p class="item-text-wrap" translate>LOGIN.FILE_FORM_HELP</p></div><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i> <span class="positive" translate>LOGIN.FILE.HELP</span></div><div drop-zone="onFileChanged(file)"><div ng-if="!formData.file" file-select="onFileChanged(file)" accept=".dunikey,.yml"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div class="item item-icon-left item-icon-right stable-bg" ng-if="formData.file"><i class="icon ion-document-text dark"></i><div class="item-content row"><div class="col"><h2>{{formData.file.name}}</h2><h4 class="dark" ng-if="formData.file.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{formData.file.lastModified/1000|formatDate}}</h4><h5 class="dark"><span class="gray" translate>COMMON.FILE.SIZE</span> {{formData.file.size|formatInteger}} Ko</h5></div><div class="col"><h3><span class="gray" translate>COMMON.PUBKEY</span></h3><h3 ng-if="validatingFile" translate>COMMON.FILE.VALIDATING</h3><h3 ng-if="!validatingFile"><span class="dark animate-show-hide ng-hide" ng-show="formData.file.pubkey">{{formData.file.pubkey}}</span> <span class="assertive animate-show-hide ng-hide" ng-show="!formData.file.valid"><br><i class="ion-close-circled assertive"></i> {{formData.file.pubkey ? \'ERROR.AUTH_INVALID_PUBKEY\' : \'ERROR.AUTH_INVALID_FILE\' |translate}}</span></h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="removeKeyFile()"></a></div></div><ion-checkbox ng-model="formData.keepAuth" class="item ink item-text-wrap"><div class="item-content dark" translate>LOGIN.MEMORIZE_AUTH_FILE</div></ion-checkbox>');
+$templateCache.put('templates/login/form_login.html','<form name="loginForm" novalidate="" ng-submit="doLogin()" autocomplete="off"><div class="list padding no-padding-xs" ng-init="setForm(loginForm)" ng-switch on="formData.method"><div class="item hidden-xs no-padding" ng-if="showMethods"><div class="pull-right"><a class="button button-text button-small-padding icon-right ink" ng-click="showMethodsPopover($event)"><i class="icon ion-wrench"></i> {{\'LOGIN.BTN_METHODS\'| translate}} </a>&nbsp; <a class="button button-icon positive button-small-padding icon ion-ios-help-outline" style="right: 8px" ng-click="showHelpModal(\'login-method\')"></a></div></div><div class="item item-text-wrap" ng-if="::isAuth"><p ng-if="::expectedPubkey" ng-bind-html="::expectedUid ? \'AUTH.EXPECTED_UID_HELP\' : \'AUTH.EXPECTED_PUBKEY_HELP\' |translate: {uid: expectedUid, pubkey: expectedPubkey}"></p><p ng-if="::!expectedPubkey" ng-bind-html="::\'AUTH.GENERAL_HELP\'|translate"></p></div><div ng-switch-when="SCRYPT_DEFAULT"><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include></div><div ng-switch-when="SCRYPT_ADVANCED"><ng-include src="::\'templates/login/form_scrypt_advanced.html\'"></ng-include></div><div ng-switch-when="PUBKEY"><ng-include src="::\'templates/login/form_pubkey.html\'"></ng-include></div><div ng-switch-when="FILE"><ng-include src="::\'templates/login/form_file_import.html\'"></ng-include></div><div ng-switch-when="SCAN"><ng-include src="::\'templates/login/form_scan.html\'"></ng-include></div><div ng-switch-default><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-class="{\'button-assertive\': isAuth, \'button-positive\': !isAuth}" type="submit">{{okText || (isAuth ? \'AUTH.BTN_AUTH\' : \'COMMON.BTN_LOGIN\') | translate}}</button></div><div class="text-center no-padding visible-xs"><button type="button" class="button button-small icon-right ink" ng-click="showMethodsPopover($event)"><i class="icon ion-loop"></i> <span translate>LOGIN.BTN_METHODS_DOTS</span></button><br><br></div><ng-if ng-if="!isAuth && showNewAccountLink"><div class="text-center no-padding">{{\'LOGIN.NO_ACCOUNT_QUESTION\'|translate}}<br class="visible-xs"><a ng-click="showJoinModal()" translate>LOGIN.CREATE_ACCOUNT</a></div><br class="visible-xs"><div class="text-center no-padding"><a ng-click="showAccountSecurityModal()" translate>LOGIN.FORGOTTEN_ID</a></div></ng-if></form>');
+$templateCache.put('templates/login/form_pubkey.html','<div class="item"><p class="item-text-wrap" translate>LOGIN.PUBKEY_FORM_HELP</p></div><div class="item item-input item-button-right" ng-class="{ \'item-input-error\': form.$submitted && form.pubkey.$invalid}"><span class="input-label hidden-xs" translate>COMMON.PUBKEY</span> <input name="pubkey" type="text" placeholder="{{\'LOGIN.PUBKEY_HELP\' | translate}}" autocomplete="off" ng-model="formData.pubkey" ng-model-options="{ debounce: 650 }" required> <a class="button button-stable icon ion-android-search ink" ng-click="showWotLookupModal(form.pubkey.$viewValue)"></a></div><div class="form-errors" ng-show="form.$submitted && form.pubkey.$error" ng-messages="form.pubkey.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="checksum"><span translate="ERROR.INVALID_PUBKEY_CHECKSUM"></span></div></div>');
+$templateCache.put('templates/login/form_scan.html','<div class="item"><p class="item-text-wrap" ng-bind-html="::isAuth ? \'AUTH.SCAN_FORM_HELP\' : \'LOGIN.SCAN_FORM_HELP\' |translate"></p></div><div class="item item-icon-right item-text-wrap item-input" ng-class="{ \'item-input-error\': pubkeyError}"><span class="input-label" translate>COMMON.PUBKEY</span><div class="item-content text-wrap"><span class="gray animate-show-hide" ng-show="!computing && formData.pubkey">{{formData.pubkey}}</span><ion-spinner class="ion-spinner-small" icon="android" ng-if="computing"></ion-spinner><input type="hidden" ng-model="formData.pubkey" required></div><a class="button button-icon positive button-small-padding icon ion-qr-scanner animate-show-hide" ng-show="!computing && (!expectedPubkey || pubkeyError)" ng-click="doScan()"></a> <span class="button button-icon balanced button-small-padding icon ion-checkmark animate-show-hide" ng-if="expectedPubkey" ng-show="!computing && !pubkeyError"></span></div><div class="form-errors" ng-if="expectedPubkey"><div class="form-error" ng-show="pubkeyError"><span trust-as-html="::\'ERROR.AUTH_INVALID_PUBKEY\'|translate:{pubkey: expectedPubkey}"></span></div></div>');
+$templateCache.put('templates/login/form_scrypt.html','<div class="item item-text-wrap" ng-if="!isAuth"><p ng-bind-html="\'LOGIN.SCRYPT_FORM_HELP\'|translate"></p></div><input type="password" name="fake-password" autocomplete="off" style="visibility:hidden; position:absolute"><label class="item item-input" ng-class="{ \'item-input-error\': form.$submitted && form.username.$invalid}"><span class="input-label hidden-xs" translate>LOGIN.SALT</span> <input name="username" type="password" placeholder="{{\'LOGIN.SALT_HELP\' | translate}}" autocomplete="off" ng-model="formData.username" ng-model-options="{ debounce: 650 }" class="highlight-light" required></label><div class="form-errors" ng-show="form.$submitted && form.username.$error" ng-messages="form.username.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><label class="item item-input" ng-class="{ \'item-input-error\': form.$submitted && form.password.$invalid}"><span class="input-label hidden-xs" translate>LOGIN.PASSWORD</span> <input name="password" type="password" placeholder="{{\'LOGIN.PASSWORD_HELP\' | translate}}" autocomplete="off" ng-model="formData.password" ng-model-options="{ debounce: 650 }" select-on-click required></label><div class="form-errors" ng-show="form.$submitted && form.password.$error" ng-messages="form.password.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-icon-right item-text-wrap" ng-class="{ \'item-input-error\': pubkeyError, \'item-input\': showPubkey}"><span class="input-label hidden-xs animate-show-hide ng-hide" ng-show="showPubkey" translate>COMMON.PUBKEY</span><div class="item-content text-wrap"><a class="positive ink animate-show-hide ng-hide" ng-show="showComputePubkeyButton && !pubkey" ng-click="computePubkey()"><i class="ion-eye"></i> {{\'COMMON.BTN_SHOW_PUBKEY\' | translate}} </a><span class="gray animate-show-hide" ng-show="!computing && pubkey">{{pubkey}}</span><ion-spinner class="ion-spinner-small" icon="android" ng-if="computing"></ion-spinner></div><a class="button button-icon positive button-small-padding icon ion-ios-help-outline animate-show-hide" ng-click="showHelpModal(\'login-pubkey\')" ng-if="!expectedPubkey" ng-show="showPubkey"></a> <span class="button button-icon balanced button-small-padding icon ion-checkmark animate-show-hide" ng-if="expectedPubkey" ng-show="showPubkey && !showComputePubkeyButton && !computing && !pubkeyError"></span></div><div class="form-errors" ng-if="expectedPubkey"><div class="form-error" ng-show="pubkeyError"><span trust-as-html="::\'ERROR.AUTH_INVALID_PUBKEY\'|translate:{pubkey: expectedPubkey}"></span></div></div>');
+$templateCache.put('templates/login/form_scrypt_advanced.html','<div class="row responsive-md responsive-sm padding-left"><div class="col col-33 no-padding"><label class="item item-input item-select"><select ng-model="formData.scrypt" style="max-width: 100%" ng-change="changeScrypt(formData.scrypt)" ng-options="l as (l.label | translate) for l in scryptParamsValues track by l.id"></select></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.N</span> <input class="no-padding-right" type="number" placeholder="N" autocomplete="off" ng-model="formData.scrypt.params.N" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.r</span> <input class="no-padding-right" type="number" placeholder="r" ng-model="formData.scrypt.params.r" autocomplete="off" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div><div class="col no-padding"><label class="item item-input"><span class="input-label" translate>LOGIN.SCRYPT.p</span> <input class="no-padding-right" type="number" placeholder="p" autocomplete="off" ng-model="formData.scrypt.params.p" ng-model-options="{ debounce: 650 }" ng-change="onScryptFormChanged()" required></label></div></div><p class="energized-100-bg padding dark"><i class="icon ion-android-warning"></i> <span translate>INFO.FEATURES_NOT_IMPLEMENTED</span></p><ng-include src="::\'templates/login/form_scrypt.html\'"></ng-include>');
+$templateCache.put('templates/login/item_remember_me.html','<ion-checkbox ng-model="formData.rememberMe" ng-if="!isAuth" class="item ink item-text-wrap"><div class="item-content dark" translate>SETTINGS.REMEMBER_ME</div></ion-checkbox>');
+$templateCache.put('templates/login/modal_login.html','<ion-modal-view class="modal-full-height modal-login"><ion-header-bar class="" ng-class="{\'bar-positive\': !isAuth, \'bar-assertive\': isAuth}"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" ng-bind-html="title | translate"></h1><div class="buttons buttons-right"><div class="secondary-buttons"><button class="button button-icon button-clear icon ion-android-done visible-xs" ng-class="{\'button-positive\': !isAuth}" style="color: #fff" ng-click="doLogin()"></button></div></div></ion-header-bar><ion-content scroll="true"><ng-include src="::\'templates/login/form_login.html\'"></ng-include></ion-content></ion-modal-view>');
+$templateCache.put('templates/login/popover_methods.html','<ion-popover-view class="fit has-header popover-login-methods" ng-class="{\'auth\': isAuth}"><ion-header-bar><h1 class="title" translate="">LOGIN.METHOD_POPOVER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="changeMethod(\'SCRYPT_DEFAULT\')"><i class="icon ion-shuffle" style="font-size: 22px"></i> {{\'LOGIN.METHOD.SCRYPT_DEFAULT\' | translate}} </a><a class="item item-icon-left ink" ng-click="changeMethod(\'SCRYPT_ADVANCED\')"><i class="icon ion-shuffle" style="font-size: 22px"></i> <i class="icon-secondary ion-plus" style="font-size: 13px; left: 40px; margin-top: -4px"></i> {{\'LOGIN.METHOD.SCRYPT_ADVANCED\' | translate}} </a><a class="item item-icon-left ink hidden-xs" ng-click="changeMethod(\'FILE\')"><i class="icon ion-document-text"></i> {{\'LOGIN.METHOD.FILE\' | translate}} </a><a class="item item-icon-left ink" ng-if="$root.device.barcode.enable" ng-click="changeMethod(\'SCAN\')"><i class="icon ion-qr-scanner"></i> {{\'LOGIN.METHOD.SCAN\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isAuth" ng-click="changeMethod(\'PUBKEY\')"><i class="icon ion-key"></i> {{\'LOGIN.METHOD.PUBKEY\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/network/item_content_peer.html','<i class="icon ion-android-desktop" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" ng-if=":rebind:!peer.avatar"></i> <b class="icon-secondary ion-person" ng-if=":rebind:!peer.avatar" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" style="left: 26px; top: -3px"></b> <i class="avatar" ng-if="::peer.avatar" style="background-image: url(\'{{::peer.avatar.src}}\')"></i> <b class="icon-secondary assertive ion-close-circled" ng-if=":rebind:!peer.online" style="left: 37px; top: -10px"></b><div class="row no-padding"><div class="col no-padding"><h3 class="dark" ng-if=":rebind:!peer.bma.private">{{:rebind:peer.dns || peer.server}}</h3><h4 class="gray" ng-if=":rebind:peer.bma.private"><i class="ion-flash"></i> {{:locale:\'NETWORK.VIEW.PRIVATE_ACCESS\'|translate}}</h4><h4><span class="gray" ng-if=":rebind:!peer.uid"><i class="ion-key"></i> {{:rebind:peer.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:peer.uid"><i class="ion-person"></i> {{:rebind:peer.name || peer.uid}} </span><span class="gray" ng-if=":rebind:!compactMode">{{:rebind:peer.dns && (\' | \' + peer.server) + (peer.bma.path||\'\') }}</span></h4></div><div class="col col-20 no-padding text-center" ng-if="::expertMode && search.type != \'offline\'"></div><div class="col col-20 no-padding text-center"><span id="{{$index === 0 ? helptipPrefix + \'-peer-0-block\' : \'\'}}" class="badge" ng-class=":rebind:{\'badge-balanced\': peer.hasMainConsensusBlock, \'badge-energized\': peer.hasConsensusBlock, \'ng-hide\': !peer.currentNumber && !peer.blockNumber }">{{:locale:!expertMode ? (\'COMMON.BLOCK\'|translate) : \'\' }} {{:rebind:(peer.currentNumber || peer.blockNumber) | formatInteger}}</span> <span class="badge badge-secondary" ng-if=":rebind:peer.consensusBlockDelta && expertMode"><i class="ion-clock"></i>&nbsp; {{:rebind:peer.consensusBlockDelta|formatDurationTime}}</span></div></div>');
+$templateCache.put('templates/network/items_peers.html','<div class="no-padding {{::motion.ionListClass}}"><div class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-if="::isHttps && expertMode"><small><i class="icon ion-alert-circled"></i> {{:locale:\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></div><div ng-repeat="peer in search.results track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-class=":rebind:{\'compacted\': peer.compacted && compactMode}" id="{{::helptipPrefix}}-peer-{{::$index}}" ng-click="selectPeer(peer)" ng-include="::\'templates/network/item_content_peer.html\'"></div></div>');
+$templateCache.put('templates/network/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>PEER.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'member\')"><i class="icon ion-person"></i> {{\'PEER.MEMBERS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'member\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'mirror\')"><i class="icon ion-radio-waves"></i> {{\'PEER.MIRRORS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'mirror\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'offline\')"><i class="icon ion-eye-disabled"></i> {{\'PEER.OFFLINE\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'offline\'"></i></a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/network/modal_network.html','<ion-modal-view id="nodes" class="modal-full-height" cache-view="false"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button><h1 class="title" translate="">PEER.PEER_LIST</h1><div class="buttons buttons-right header-item"><span class="secondary"><button class="button button-clear icon ion-loop button-clear" ng-click="refresh()"></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></span></div></ion-header-bar><ion-content><div class="list"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && search.type==\'member\'" translate="">PEER.MEMBER_PEERS</span> <span ng-if="enableFilter && search.type==\'mirror\'" translate="">PEER.MIRROR_PEERS</span> <span ng-if="!enableFilter || !search.type" translate="">PEER.ALL_PEERS</span> <span ng-if="!search.loading">({{search.results.length}})</span></h4></div><div class="pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner>&nbsp;<div class="pull-right">&nbsp;</div></div></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include></div></ion-content></ion-modal-view>');
+$templateCache.put('templates/network/popover_endpoints.html','<ion-popover-view class="popover-endpoints popover-light" style="height: {{(titleKey?30:0)+((!items || items.length &lt;= 1) ? 55 : 3+items.length*52)}}px"><ion-header-bar class="bar bar-header stable-bg" ng-if="titleKey"><div class="title">{{titleKey | translate:titleValues }}</div></ion-header-bar><ion-content scroll="false"><div class="list" ng-class="{\'has-header\': titleKey}"><div class="item item-text-wrap" ng-repeat="item in items"><div class="item-label" ng-if="item.label">{{item.label | translate}}</div><div id="endpoint_{{$index}}" class="badge item-note dark">{{item.value}}</div></div></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/network/popover_network.html','');
+$templateCache.put('templates/network/popover_peer_info.html','');
+$templateCache.put('templates/network/view_network.html','<ion-view><ion-nav-title><span translate="">MENU.NETWORK</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refresh()"></button></ion-nav-buttons><ion-content scroll="true" ng-init="enableFilter=true; ionItemClass=\'item-border-large\';"><div class="row responsive-sm responsive-md responsive-lg"><div class="col list col-border-right"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && search.type==\'member\'" translate="">PEER.MEMBER_PEERS</span> <span ng-if="enableFilter && search.type==\'mirror\'" translate="">PEER.MIRROR_PEERS</span> <span ng-if="enableFilter && search.type==\'offline\'" translate="">PEER.OFFLINE_PEERS</span> <span ng-if="!enableFilter || !search.type" translate="">PEER.ALL_PEERS</span> <span ng-if="search.results.length">({{search.results.length}})</span><ion-spinner ng-if="search.loading" class="icon ion-spinner-small" icon="android"></ion-spinner></h4></div><div class="pull-right"><div class="pull-right" ng-if="enableFilter">&nbsp;<cs-extension-point name="network-buttons"></cs-extension-point></div></div></div><div id="helptip-network-blockchain" style="display: block"></div><div id="helptip-network-peers" style="display: block"></div><ng-include src="::\'templates/network/items_peers.html\'"></ng-include></div><div class="col col-33" ng-controller="BlockLookupCtrl"><div class="padding padding-xs" style="display: block; height: 100px"><h4 translate="">BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4></div><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></div></div></ion-content></ion-view>');
+$templateCache.put('templates/network/view_peer.html','<ion-view><ion-nav-title><span translate="">PEER.VIEW.TITLE</span></ion-nav-title><ion-content><div class="row no-padding"><div class="col list"><ion-item><h1><span translate="">PEER.VIEW.TITLE</span> <span class="gray">{{node.host}}</span></h1><h2 class="gray"><i class="gray icon ion-android-globe"></i> {{node.bma.dns || node.server}} <span class="gray" ng-if="!loading && node.useSsl"><i class="gray ion-locked"></i> <small>SSL</small> </span><span class="gray" ng-if="!loading && node.useTor"><i class="gray ion-bma-tor-api"></i> </span><span class="assertive" ng-if="!loading && !node.uid">({{\'PEER.MIRROR\'|translate}})</span></h2><h3><span class="dark"><i class="icon ion-android-desktop"></i> {{\'PEER.VIEW.OWNER\'|translate}} </span><a class="positive" ng-if="node.uid" ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.uid})"><i class="ion-person"></i> {{node.name || node.uid}} <span class="gray" ng-if="node.name">({{node.uid}}) </span></a><span ng-if="!loading && !node.uid"><a class="gray" ui-sref="app.wot_identity({pubkey: node.pubkey})"><i class="ion-key"></i> {{node.pubkey|formatPubkey}} <span class="gray" ng-if="node.name">({{node.name}})</span></a></span></h3><h3><a ng-click="openRawPeering($event)"><i class="icon ion-share"></i> {{\'PEER.VIEW.SHOW_RAW_PEERING\'|translate}} </a><span class="gray" ng-if="!isReachable">| </span><a ng-if="!isReachable" ng-click="openRawCurrentBlock($event)"><i class="icon ion-share"></i> <span translate="">PEER.VIEW.SHOW_RAW_CURRENT_BLOCK</span></a></h3></ion-item><div class="item item-divider" translate="">PEER.VIEW.GENERAL_DIVIDER</div><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{node.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 class="dark text-left">{{node.pubkey}}</h4></ion-item><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.view_server_block_hash({server: node.server, ssl: node.useSsl, tor: node.useTor, number: current.number, hash: current.hash})"><i class="icon ion-cube"></i> <span translate="">BLOCKCHAIN.VIEW.TITLE_CURRENT</span><div class="badge badge-calm" ng-if="!loading">{{current.number|formatInteger}}</div><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.server_blockchain({server: node.server, ssl: node.useSsl, tor: node.useTor})"><i class="icon ion-cube" style="font-size: 25px"></i> <i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px"></i> <span translate="">PEER.VIEW.LAST_BLOCKS</span> <i class="gray icon ion-ios-arrow-right"></i></a><cs-extension-point name="general"></cs-extension-point><div class="item item-divider" ng-hide="loading || !isReachable" translate="">PEER.VIEW.KNOWN_PEERS</div><ion-item class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-show="!loading && !isReachable"><small><i class="icon ion-alert-circled"></i> {{\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></ion-item><div class="item center" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div class="list no-padding {{::motion.ionListClass}}" ng-if="isReachable"><div ng-repeat="peer in :rebind:peers track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-click="selectPeer(peer)" ng-include="::\'templates/network/item_content_peer.html\'"></div></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/settings/popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="reset()"><i class="icon ion-refresh"></i> {{\'SETTINGS.BTN_RESET\' | translate}} </a><a class="item item-icon-left ink" ng-click="startSettingsTour()"><i class="icon ion-easel"></i> {{\'COMMON.BTN_HELP_TOUR_SCREEN\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/settings/popup_node.html','<form name="popupForm" ng-submit=""><div class="list no-padding" ng-init="setPopupForm(popupForm)"><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': popupForm.$submitted && popupForm.newNode.$invalid}"><span class="input-label" ng-bind-html="\'SETTINGS.POPUP_PEER.HOST\'|translate"></span> <input name="newNode" type="text" placeholder="{{\'SETTINGS.POPUP_PEER.HOST_HELP\' | translate}}" ng-model="popupData.newNode" ng-minlength="3" required></div><div class="form-errors" ng-if="popupForm.$submitted && popupForm.newNode.$error" ng-messages="popupForm.newNode.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-toggle"><span class="input-label">{{\'SETTINGS.POPUP_PEER.USE_SSL\' | translate}}</span><h4><small class="gray" ng-bind-html="\'SETTINGS.POPUP_PEER.USE_SSL_HELP\' | translate"></small></h4><label class="toggle toggle-royal no-padding-right"><input type="checkbox" ng-model="popupData.useSsl"><div class="track"><div class="handle"></div></div></label></div><a class="button button-positive button-clear positive button-outline button-full button-small-padding icon-left ink no-padding" ng-click="showNodeList()"><i class="icon ion-search"></i> {{\'SETTINGS.POPUP_PEER.BTN_SHOW_LIST\' | translate}}</a></div><button type="submit" class="hide"></button></form>');
+$templateCache.put('templates/settings/settings.html','<ion-view left-buttons="leftButtons" cache-view="false" class="settings"><ion-nav-title translate="">SETTINGS.TITLE</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><div class="row no-padding responsive-sm responsive-md responsive-lg"><div class="col col-50 list item-border-large padding-left padding-right no-padding-xs no-padding-sm" style="margin-bottom: 2px"><span class="item item-divider" translate="">SETTINGS.DISPLAY_DIVIDER</span><label class="item item-input item-select"><div class="input-label" translate="">COMMON.LANGUAGE</div><select ng-model="formData.locale" ng-change="changeLanguage(formData.locale.id)" ng-options="l as l.label for l in locales track by l.id"></select></label><div class="item item-toggle dark"><div class="input-label">{{\'COMMON.BTN_RELATIVE_UNIT\' | translate}}</div><label class="toggle toggle-royal" id="helptip-settings-btn-unit-relative"><input type="checkbox" ng-model="formData.useRelative"><div class="track"><div class="handle"></div></div></label></div><div class="item item-toggle dark item-text-wrap"><div class="input-label" ng-bind-html="\'SETTINGS.ENABLE_HELPTIP\' | translate"></div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.helptip.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.STORAGE_DIVIDER</span><div class="item item-text-wrap item-toggle dark"><div class="input-label">{{\'SETTINGS.USE_LOCAL_STORAGE\' | translate}}</div><h4 class="gray" ng-bind-html="\'SETTINGS.USE_LOCAL_STORAGE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useLocalStorage"><div class="track"><div class="handle"></div></div></label></div><div class="item item-text-wrap item-toggle dark"><div class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}" ng-bind-html="\'SETTINGS.PERSIST_CACHE\' | translate"></div><h4 class="gray" ng-bind-html="\'SETTINGS.PERSIST_CACHE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.persistCache" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><cs-extension-point name="common"></cs-extension-point><span class="item item-divider">{{\'SETTINGS.AUTHENTICATION_SETTINGS\' | translate}}</span><div class="item item-toggle item-text-wrap"><div class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}">{{\'SETTINGS.REMEMBER_ME\' | translate}}</div><h4 class="gray text-wrap" ng-bind-html="\'SETTINGS.REMEMBER_ME_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.rememberMe" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><label class="item item-input item-select item-text-wrap"><div class="input-label hidden-xs"><span class="hidden-xs" translate="">SETTINGS.KEEP_AUTH</span><h4 class="gray text-wrap hidden-xs" ng-bind-html="\'SETTINGS.KEEP_AUTH_HELP\' | translate"></h4></div><span class="visible-xs" translate="">SETTINGS.KEEP_AUTH_SHORT</span><select ng-model="formData.keepAuthIdle" ng-options="i as (keepAuthIdleLabels[i].labelKey | translate:keepAuthIdleLabels[i].labelParams ) for i in keepAuthIdles track by i"></select></label></div><div class="col col-50 list item-border-large padding-left padding-right no-padding-xs no-padding-sm no-margin-xs no-margin-sm"><span class="item item-divider">{{\'SETTINGS.WALLETS_SETTINGS\' | translate}}</span><div class="item item-toggle item-text-wrap dark"><span class="input-label" ng-class="{\'gray\': !formData.useLocalStorage}" translate="">SETTINGS.USE_WALLETS_ENCRYPTION</span><h4 class="gray text-wrap" ng-bind-html="\'SETTINGS.USE_WALLETS_ENCRYPTION_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useLocalStorageEncryption" ng-if="formData.useLocalStorage"> <input type="checkbox" ng-model="formData.useLocalStorage" ng-if="!formData.useLocalStorage" disabled="disabled"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.HISTORY_SETTINGS</span><div class="item item-toggle item-text-wrap dark"><div class="input-label" translate="">SETTINGS.DISPLAY_UD_HISTORY</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.showUDHistory"><div class="track"><div class="handle"></div></div></label></div><cs-extension-point name="history"></cs-extension-point><span class="item item-divider" translate="">SETTINGS.NETWORK_SETTINGS</span><ion-item class="ink item-icon-right visible-xs visible-sm" ng-click="changeNode()"><div class="input-label hidden-xs" translate="">SETTINGS.PEER</div><div class="input-label visible-xs" translate="">SETTINGS.PEER_SHORT</div><ng-if ng-if="formData.node.temporary"><h4 class="gray text-wrap assertive"><b class="ion-alert-circled"></b> <span ng-bind-html="\'SETTINGS.PEER_CHANGED_TEMPORARY\' | translate "></span></h4><div class="badge badge-assertive">{{bma.server}}</div></ng-if><div class="badge badge-balanced" ng-if="!formData.node.temporary">{{bma.server}}</div><i class="icon ion-ios-arrow-right"></i></ion-item><label class="item item-input item-select item-text-wrap"><div class="input-label hidden-xs"><span translate="">SETTINGS.BLOCK_VALIDITY_WINDOW</span><h4 class="gray text-wrap hidden-xs" ng-bind-html="\'SETTINGS.BLOCK_VALIDITY_WINDOW_HELP\' | translate"></h4></div><div class="input-label visible-xs" translate="">SETTINGS.BLOCK_VALIDITY_WINDOW_SHORT</div><select ng-model="formData.blockValidityWindow" ng-options="i as (blockValidityWindowLabels[i].labelKey | translate:blockValidityWindowLabels[i].labelParams ) for i in blockValidityWindows track by i"></select></label><cs-extension-point name="network"></cs-extension-point><span class="item item-divider" ng-if="$root.config.plugins" translate="">SETTINGS.PLUGINS_SETTINGS</span><cs-extension-point name="plugins"></cs-extension-point></div></div></ion-content></ion-view>');
+$templateCache.put('templates/wallet/item_tx.html','<i class="icon item-image" ng-if="::!tx.avatar" ng-class="::{\'ion-person dark\': tx.uid, \'ion-card dark\': !tx.uid}"></i> <i class="avatar" ng-if="::tx.avatar" style="background-image: url({{::tx.avatar.src}})"></i><div class="row no-padding"><div class="col col-pubkey no-padding"><a class="" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::tx.uid">{{::tx.name||tx.uid}} </a><a class="gray" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::!tx.uid && tx.pubkey"><i class="ion-key gray"></i> {{::tx.pubkey | formatPubkey}} <span ng-if="::tx.name">- {{::tx.name | truncText:40}}</span></a><p ng-if="::tx.pubkeys" class="pubkeys"><a class="gray" ng-repeat="pubkey in ::tx.pubkeys.slice(0, 4)" ui-sref="app.wot_identity({pubkey:pubkey})"><i class="ion-key gray"></i>&nbsp;{{::pubkey | formatPubkey}} </a><span ng-if="::tx.pubkeys.length &gt; 4">...</span></p><p class="dark visible-xs comment text-italic" ng-if="::tx.comment" title="{{::tx.comment}}"><i class="ion-ios-chatbubble-outline"></i> {{::tx.comment}}<br></p><h4><a ng-if="::!pending" class="gray underline" ui-sref="app.view_block({number: tx.block_number})">{{::tx.time | medianFromNowAndDate: false}} </a><span ng-if="::pending" class="gray">{{::tx.time | medianFromNowAndDate: false}}</span></h4></div><div class="col col-50 col-comment no-padding padding-left hidden-xs" ng-if="::tx.comment"><p class="vertical-center gray text-italic" data-toggle="tooltip" title="{{::tx.comment}}">{{::tx.comment}}</p></div><div class="col col-10 no-padding"><span ng-if="::!tx.lockedOutputs" class="badge item-note" ng-class="{\'badge-calm\': tx.amount > 0, \'badge-white\': tx.amount <= 0}"><span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span> </span><a ng-if=":rebind:tx.lockedOutputs" class="badge item-note" ng-class="{\'badge-calm\': tx.amount > 0}" ng-click="showLockedOutputsPopover(tx, $event)"><b class="ion-locked"></b> <span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span></a><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":rebind:tx.amount| formatAmount:{useRelative: !$root.settings.useRelative, currency:$root.currency.name}"></span>)</div></div></div>');
+$templateCache.put('templates/wallet/item_ud.html','<i class="icon item-image ion-arrow-up-c energized"></i><div class="row no-padding"><div class="col no-padding"><span class="energized" translate>COMMON.UNIVERSAL_DIVIDEND</span><h4><a class="gray underline" ui-sref="app.view_block({number: tx.block_number})">{{::tx.time | medianFromNowAndDate}}</a></h4></div><div class="col col-10 no-padding"><span class="badge item-note badge-energized"><span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span></span><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":rebind:tx.amount| formatAmount:{useRelative: !$root.settings.useRelative, currency:$root.currency.name}"></span>)</div></div></div>');
+$templateCache.put('templates/wallet/modal_security.html','<ion-modal-view class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-if="!slides.slider.activeIndex" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button> <button class="button button-icon button-clear icon ion-ios-arrow-back buttons header-item" ng-click="slidePrev()" ng-if="slides.slider.activeIndex"></button><h1 class="title hidden-xs" translate="">ACCOUNT.SECURITY.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-if="!isLastSlide && slides.slider.activeIndex > 0" ng-click="doNext()"><span translate="">COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-positive button-icon button-clear icon ion-android-done visible-xs" ng-click="doNext()" ng-if="isLastSlide && option === \'saveID\'"></button></ion-header-bar><ion-slides options="slides.options" slider="slides.slider"><ion-slide-page><ion-content class="has-header padding"><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectOption(\'recoverID\')" ng-if="!login"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-ios-undo icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.RECOVER_ID</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.RECOVER_ID_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="selectOption(\'revocation\')" ng-if="!login"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-close icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.REVOCATION_WITH_FILE</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.REVOCATION_WITH_FILE_DESCRIPTION</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink hidden-xs" ng-click="selectOption(\'saveID\')" ng-if="login && !$root.device.enable"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-person"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b> <b class="ion-locked icon-secondary dark" style="top: 0px; left: 40px; font-size: 8px"></b><h2 translate="">ACCOUNT.SECURITY.SAVE_ID</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.SAVE_ID_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink hidden-xs" ng-click="selectOption(\'generateKeyfile\')" ng-if="login && !$root.device.enable"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-key icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.GENERATE_KEYFILE</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.GENERATE_KEYFILE_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="self()" ng-if="needSelf"><div class="item-content item-text-wrap"><i class="item-image icon ion-person dark"></i> <b class="ion-flag icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.SEND_IDENTITY</h2><h4 class="gray" ng-bind-html="::\'ACCOUNT.SECURITY.SEND_IDENTITY_HELP\' | translate"></h4></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="membershipIn()" ng-if="needMembership"><div class="item-content item-text-wrap"><i class="item-image icon ion-person dark"></i> <b class="ion-plus icon-secondary dark" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.MEMBERSHIP_IN</h2><h4 class="gray" ng-bind-html="::\'ACCOUNT.SECURITY.MEMBERSHIP_IN_HELP\' | translate"></h4></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="revokeWalletIdentity()" ng-if="canRevoke"><div class="item-content item-text-wrap"><i class="item-image icon ion-person assertive-900"></i> <b class="ion-close icon-secondary assertive-900" style="top: -8px; left: 39px; font-size: 12px"></b><h2 translate="">ACCOUNT.SECURITY.REVOCATION_WALLET</h2><h4 class="gray" translate="">ACCOUNT.SECURITY.REVOCATION_WALLET_HELP</h4></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate="">COMMON.BTN_CANCEL</button></div></ion-content></ion-slide-page><ion-slide-page ng-if="option == \'revocation\'"><ng-include src="::\'templates/wallet/slides/slides_revocation_file.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'saveID\'"><ng-include src="::\'templates/wallet/slides/slides_saveID_1.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'saveID\'"><ng-include src="::\'templates/wallet/slides/slides_saveID_2.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_1.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_2.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="option == \'recoverID\'"><ng-include src="::\'templates/wallet/slides/slides_recoverID_3.html\'"></ng-include></ion-slide-page><ion-slide-page ng-if="login && option == \'generateKeyfile\'"><ng-include src="::\'templates/wallet/slides/slides_generate_keyfile.html\'"></ng-include></ion-slide-page></ion-slides></ion-modal-view>');
+$templateCache.put('templates/wallet/modal_transfer.html','<ion-modal-view id="transfer" class="modal-full-height modal-transfer"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>TRANSFER.MODAL.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-header-bar><ion-content><ng-include src="::\'templates/wallet/transfer_form.html\'"></ng-include></ion-content><ion-digit-keyboard settings="digitKeyboardSettings" ng-if="digitKeyboardVisible"></ion-digit-keyboard></ion-modal-view>');
+$templateCache.put('templates/wallet/new_transfer.html','<ion-view left-buttons="leftButtons" id="transfer"><ion-nav-title><span class="visible-xs visible-sm" translate="">TRANSFER.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doTransfer()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding-xs"><div class="col no-padding-xs"><ng-include src="::\'templates/wallet/transfer_form.html\'"></ng-include></div></div></ion-content><ion-digit-keyboard settings="digitKeyboardSettings" ng-if="digitKeyboardVisible"></ion-digit-keyboard></ion-view>');
+$templateCache.put('templates/wallet/popover_actions.html','<ion-popover-view class="fit has-header popover-wallet-actions"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left ink" ng-if="walletData.requirements.alternatives" ng-click="showSelectIdentitiesModal()"><i class="icon ion-person"></i> <b class="icon-secondary ion-loop" style="margin-top: 4px; left: 15px"></b> {{\'ACCOUNT.BTN_SELECT_ALTERNATIVES_IDENTITIES\' | translate}} </a><a class="item item-icon-left ink visible-xs visible-sm" ng-if="!walletData.requirements.needSelf && walletData.requirements.needRenew" ng-click="renewMembership()"><i class="icon ion-loop"></i> {{\'ACCOUNT.BTN_MEMBERSHIP_RENEW_DOTS\' | translate}} </a><a class="item item-icon-left assertive ink" ng-if="walletData.requirements.canMembershipOut" ng-click="membershipOut()"><i class="icon ion-log-out"></i> {{\'ACCOUNT.BTN_MEMBERSHIP_OUT_DOTS\' | translate}} </a><a class="item item-icon-left ink" ng-click="showSecurityModal()"><i class="icon ion-locked"></i> <span ng-bind-html="\'ACCOUNT.BTN_SECURITY_DOTS\' | translate"></span></a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/wallet/popover_unit.html','<ion-popover-view class="popover-unit"><ion-content scroll="false"><div class="list"><a class="item item-icon-left" ng-class="{ \'selected\': !formData.useRelative}" ng-click="closePopover(false)"><i class="icon" ng-class="{ \'ion-ios-checkmark-empty\': !formData.useRelative}"></i> <i ng-bind-html="$root.currency.name | currencySymbol:false"></i> </a><a class="item item-icon-left" ng-class="{ \'selected\': formData.useRelative}" ng-click="closePopover(true)"><i class="icon" ng-class="{ \'ion-ios-checkmark-empty\': formData.useRelative}"></i> <i ng-bind-html="$root.currency.name | currencySymbol:true"></i></a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/wallet/popup_register.html','<form name="registerForm" ng-submit=""><div class="list" ng-init="setRegisterForm(registerForm)"><label class="item item-input" ng-class="{\'item-input-error\': registerForm.$submitted && registerForm.pseudo.$invalid}"><input name="pseudo" type="text" placeholder="{{\'ACCOUNT.NEW.PSEUDO_HELP\' | translate}}" ng-model="formData.newUid" ng-minlength="3" required></label><div class="form-errors" ng-if="registerForm.$submitted && registerForm.pseudo.$error" ng-messages="registerForm.pseudo.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div></div></form>');
+$templateCache.put('templates/wallet/transfer_form.html','<form name="transferForm" novalidate="" ng-submit="doTransfer()"><div class="list no-padding-xs" ng-init="setForm(transferForm)"><ion-item class="item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" tabindex="1" ng-click="showWotLookupModal()"><span class="gray" translate="">TRANSFER.TO</span> <span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="destUid"><i class="ion-person"></i> {{destUid}} </span>&nbsp; <span class="badge badge-royal" ng-show="!destUid && formData.destPub"><i class="ion-key"></i> {{formData.destPub | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></ion-item><div class="form-errors" ng-if="form.$submitted && !formData.destPub"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ion-item class="item-text-wrap ink" ng-class="{\'item-icon-right\': enableSelectWallet}" tabindex="2" ng-click="showSelectWalletModal()"><span class="gray" translate="">TRANSFER.FROM</span> <span class="badge animate-fade-in animate-show-hide ng-hide" ng-show="!loading" ng-class="{\'badge-assertive\': (convertedBalance <= 0 || form.amount.$error.max), \'badge-balanced\': (convertedBalance > 0 && (!form.amount.$error.max)) }"><ion-spinner icon="android" ng-show="!walletData.pubkey"></ion-spinner><span ng-if="walletData.pubkey && !walletData.isMember"><i class="ion-key"></i> {{walletData.pubkey| formatPubkey}}&nbsp;&nbsp; </span><span ng-if="walletData.isMember"><i class="ion-person"></i> {{walletData.name||walletData.uid}}&nbsp;&nbsp; </span><span ng-bind-html="walletData.balance|formatAmount:{useRelative: formData.useRelative, currency:currency}"></span> </span><i class="gray icon ion-ios-arrow-right" ng-if="enableSelectWallet"></i></ion-item><ion-item class="item-input item-floating-label item-button-right" ng-class="{\'item-input-error\': form.$submitted && form.amount.$invalid}"><div class="input-label"><span translate="">TRANSFER.AMOUNT</span> (<span ng-bind-html="$root.currency.name | currencySymbol:formData.useRelative"></span>)</div><input type="text" tabindex="-1" autocomplete="off" class="hidden-no-device" name="amount" placeholder="{{::\'TRANSFER.AMOUNT_HELP\' | translate}}" ng-model="formData.amount" required number-float=""><div class="block hidden-no-device" style="position:absolute; opacity:0; z-index:100; top: 0; left: 0; height: 100%; width: 100%" tabindex="4" ng-click="showDigitKeyboard()"></div><a class="button button-clear button-stable dark ink" tabindex="-1" style="z-index:110; padding: 0px 16px" ng-click="showUnitPopover($event)"><span ng-bind-html="$root.currency.name | currencySymbol:formData.useRelative"></span> &nbsp;<b class="ion-arrow-down-b" style="font-size: 12pt"></b></a></ion-item><div class="form-errors" ng-show="form.$submitted && form.amount.$error" ng-messages="form.amount.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="numberFloat"><span translate="ERROR.FIELD_NOT_NUMBER"></span></div><div class="form-error" ng-message="numberInt"><span translate="ERROR.FIELD_NOT_INT"></span></div><div class="form-error" ng-message="min"><span translate="ERROR.FIELD_MIN" translate-values="{min: minAmount}"></span></div><div class="form-error" ng-message="max"><span translate="ERROR.NOT_ENOUGH_CREDIT"></span></div></div><a class="item item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" ng-click="showWotLookupModal(\'restPub\')" tabindex="5" ng-if="formData.all && formData.restAmount"><span class="gray"><i translate="">TRANSFER.REST</i><ng-if ng-if="formData.restAmount">(<i ng-bind-html="formData.restAmount|formatAmount:{useRelative: formData.useRelative, currency:currency}"></i>)</ng-if><i translate="">TRANSFER.REST_TO</i> </span><span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="restUid"><i class="ion-person"></i> {{restUid}} </span>&nbsp; <span class="badge badge-royal" ng-show="!restUid && formData.restPub"><i class="ion-key"></i> {{formData.restPub | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && formData.all && !formData.restPub && formData.restAmount &gt; 0"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="pull-right visible-xs visible-sm" ng-if="!formData.useComment"><a class="button button-text button-small ink" tabindex="-1" ng-click="addComment()"><i class="icon ion-plus"></i> <span translate="">TRANSFER.BTN_ADD_COMMENT</span></a></div><label class="item item-input item-floating-label visible-xs visible-sm" ng-if="formData.useComment" ng-class="{\'item-input-error\': form.$submitted && form.comment.$invalid}"><span class="input-label">{{\'TRANSFER.COMMENT\' | translate}}</span> <input type="text" placeholder="{{\'TRANSFER.COMMENT_HELP\' | translate}}" id="{{commentInputId}}" tabindex="7" name="comment" autocomplete="off" ng-model="formData.comment" ng-model-options="{ debounce: 650 }" ng-maxlength="255" ng-pattern="commentPattern" ng-focus="hideDigitKeyboard()"></label><div class="form-errors" ng-show="form.comment.$error" ng-messages="form.comment.$error"><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div></div><div class="item item-icon-left item-text-wrap item-no-border visible-xs visible-sm" ng-if="formData.useComment"><i class="icon ion-android-alert positive"></i><h4 class="positive" translate="">TRANSFER.WARN_COMMENT_IS_PUBLIC</h4></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" tabindex="-1" ng-click="cancel()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button ink" tabindex="8" ng-class="{\'button-assertive\': formData.all, \'button-positive\': !formData.all}" type="submit" translate="">TRANSFER.BTN_SEND</button></div></form>');
+$templateCache.put('templates/wallet/tx_locked_outputs_popover.html','<ion-popover-view class="fit popover-locked-outputs"><ion-header-bar><h1 class="title" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.TITLE</h1></ion-header-bar><ion-content scroll="true"><div ng-if="popoverData.lockedOuputs.length == 1" class="item item-text-wrap no-border"><h4 class="positive" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.DESCRIPTION</h4></div><div ng-if="popoverData.lockedOuputs.length > 1" class="item item-text-wrap no-border"><h4 class="positive" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.DESCRIPTION_MANY</h4></div><div ng-repeat="output in popoverData.lockedOuputs track by $index" class="item"><h2 class="gray" ng-if="popoverData.lockedOuputs.length > 1" translate>ACCOUNT.LOCKED_OUTPUTS_POPOVER.LOCKED_AMOUNT</h2><div ng-if="popoverData.lockedOuputs.length > 1" class="badge item-note" ng-class="{\'badge-balanced\': output.amount > 0}"><i class="icon ion-locked"></i> <span ng-bind-html="::output.amount| formatAmount"></span> <span ng-bind-html="::unit"></span></div><div ng-repeat="condition in output.unlockConditions track by $index" class="row" ng-class="::{\'padding-top\': !$index && popoverData.lockedOuputs.length > 1}" ng-style="::condition.style"><span class="gray" ng-if="::condition.operator">{{::\'BLOCKCHAIN.VIEW.TX_OUTPUT_OPERATOR.\'+condition.operator|translate}}&nbsp;</span><div ng-if="::condition.type==\'SIG\'"><i class="icon ion-key dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.SIG\' | translate"></span> <a ng-click="goState(\'app.wot_identity\', {pubkey:condition.value})" style="text-decoration: none" class="positive">{{condition.value|formatPubkey}}</a></div><div ng-if="::condition.type==\'XHX\'"><i class="icon ion-lock-combination dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.XHX\' | translate"></span> <a copy-on-click="{{::condition.value}}" class="positive">{{::condition.value|formatPubkey}}...</a></div><div ng-if="condition.type==\'CSV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CSV\' | translate"></span> {{::condition.value|formatDuration}}</div><div ng-if="condition.type==\'CLTV\'"><i class="icon ion-clock dark"></i> <span class="dark" ng-bind-html="::\'BLOCKCHAIN.VIEW.TX_OUTPUT_FUNCTION.CLTV\' | translate"></span> {{::condition.value|medianDate}}</div></div></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/wallet/view_wallet.html','<ion-view left-buttons="leftButtons" class="view-wallet" id="wallet"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" id="helptip-wallet-options-xs" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="refresher-positive-900-bg" bind-notifier="{ rebind:settings.useRelative, locale:$root.settings.locale.id}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="positive-900-bg hero" style="max-width: 100%; display: block"><div class="content" ng-if="!loading" style="max-width: 100%"><i class="avatar" ng-if=":rebind:!formData.avatar" ng-class=":rebind:{\'avatar-wallet\': !formData.isMember, \'avatar-member\': formData.isMember}"></i> <i class="avatar" ng-if=":rebind:formData.avatar" style="background-image: url({{:rebind:formData.avatar.src}})"></i><h3 class="light" ng-if=":rebind:!enableSelectWallet"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span></h3><h3 class="light" ng-if=":rebind:enableSelectWallet"><a class="visible-xs visible-sm" style="color: lightgray" title="{{:locale:\'ACCOUNT.SELECT_WALLET_MODAL.TITLE\'|translate}}" ng-click="showSelectWalletModal($event)"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span> <small><i class="ion-arrow-down-b"></i></small></a></h3><h4><span class="assertive" ng-if=":rebind:(formData.name || formData.uid) && !formData.isMember" translate="">WOT.NOT_MEMBER_PARENTHESIS</span><cs-extension-point name="hero"></cs-extension-point></h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><a id="wallet-share-anchor"></a><div class="visible-xs visible-sm padding text-center" ng-if="!loading && formData.requirements.needRenew"><button class="button button-raised icon-left button-stable button-small-padding ink" ng-click="renewMembership()"><i class="icon ion-loop assertive"></i> <span class="assertive">{{:locale:\'ACCOUNT.BTN_MEMBERSHIP_RENEW\' | translate}}</span></button></div><div class="row no-padding"><div class="col"><div class="list {{::motion.ionListClass}}" ng-hide="loading"><span class="item item-divider" translate="">WOT.GENERAL_DIVIDER</span><div id="helptip-wallet-pubkey" class="item item-icon-left item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click="{{:rebind:formData.pubkey}}"><i class="icon ion-key"></i> <span>{{:locale:\'COMMON.PUBKEY\'|translate}}</span><h4 id="pubkey" class="dark">{{:rebind:formData.pubkey}}</h4></div><ion-item class="item-icon-left" ng-if=":rebind:formData.sigDate||formData.uid"><i class="icon ion-calendar"></i> <span translate="">COMMON.UID</span><h5 class="dark" ng-if=":rebind:formData.sigDate"><span translate="">WOT.REGISTERED_SINCE</span> {{:rebind:formData.sigDate | medianDate}}</h5><span class="badge badge-stable">{{:rebind:formData.uid}}</span></ion-item><a id="helptip-wallet-certifications" class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="formData.isMember||formData.requirements.pendingMembership||!formData.requirements.needSelf" ng-click="showCertifications()"><i class="icon ion-ribbon-b"></i> <b ng-if="formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> {{:locale:\'ACCOUNT.CERTIFICATION_COUNT\'|translate}}<cs-badge-certification requirements="formData.requirements" parameters="::currency.parameters"></cs-badge-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a id="helptip-wallet-given-certifications" class="item item-icon-left item-text-wrap item-icon-right ink visible-xs visible-sm" ng-if="formData.isMember" ng-click="showGivenCertifications()"><i class="icon ion-ribbon-a"></i> <span translate="">WOT.GIVEN_CERTIFICATIONS.SENT</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="showTxHistory()"><i class="icon ion-card"></i> <span translate="">WOT.ACCOUNT_OPERATIONS</span> <i class="gray icon ion-ios-arrow-right"></i> </a><span class="item item-divider" ng-if="formData.events.length">{{:locale:\'ACCOUNT.EVENTS\' | translate}}</span><div class="item item-text-wrap item-icon-left item-wallet-event" ng-repeat="event in formData.events"><i class="icon" ng-class="{\'ion-information-circled royal\': event.type==\'info\',\'ion-alert-circled assertive\': event.type==\'warn\'||event.type==\'error\',\'assertive\': event.type==\'error\',\'ion-clock\': event.type==\'pending\'}"></i> <span trust-as-html="event.message | translate:event.messageParams"></span></div><cs-extension-point name="general"></cs-extension-point><cs-extension-point name="after-general"></cs-extension-point></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/wallet/view_wallet_tx.html','<ion-view left-buttons="leftButtons" class="view-wallet-tx"><ion-nav-title><span class="visible-xs visible-sm" translate="">MENU.TRANSACTIONS</span></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content scroll="true" class="refresher-positive-900-bg" bind-notifier="{ rebind:settings.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="positive-900-bg hero"><div class="content" ng-if="!loading"><h1 class="light"><span ng-bind-html=":balance:rebind:formData.balance | formatAmount:{currency: $root.currency.name}"></span></h1><h4><ng-if ng-if="!loading && $root.settings.expertMode" style="font-style: italic">(<span ng-bind-html=":balance:rebind:formData.balance | formatAmount:{useRelative:!$root.settings.useRelative, currency: $root.currency.name}"></span>)</ng-if><ng-if ng-if=":rebind:!enableSelectWallet" style="color: lightgray"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span></ng-if><ng-if ng-if=":rebind:enableSelectWallet"><a class="visible-xs visible-sm" style="color: lightgray" title="{{:locale:\'ACCOUNT.SELECT_WALLET_MODAL.TITLE\'|translate}}" ng-click="showSelectWalletModal($event)"><span ng-if=":rebind:formData.name">{{:rebind:formData.name}}</span> <span ng-if=":rebind:!formData.name && formData.uid">{{:rebind:formData.uid}}</span> <span ng-if=":rebind:!formData.name && !formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</span> <small><i class="ion-arrow-down-b"></i></small></a></ng-if></h4><div class="helptip-anchor-center"><a id="helptip-wallet-balance">&nbsp;</a></div></div><h2 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h2></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><div class="row no-padding"><div class="col"><div class="list {{::motion.ionListClass}}"><a class="item item-icon-left item-icon-right ink" ng-if="formData.tx.errors && formData.tx.errors.length" ng-click="showTxErrors()"><i class="icon ion-alert-circled"></i> {{:locale:\'ACCOUNT.ERROR_TX\'|translate}}<div class="badge badge-assertive">{{formData.tx.errors.length}}</div><i class="gray icon ion-ios-arrow-right"></i></a><ng-if ng-if="formData.tx.pendings.length"><span class="item item-pending item-divider"><b class="ion-clock"></b> {{:locale:\'ACCOUNT.PENDING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.pendings" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><ng-if ng-if="formData.tx.validating.length"><span class="item item-pending item-divider"><b class="icon ion-checkmark" style="font-size: 12px"></b> <b class="icon-secondary ion-help" style="font-size: 12px; top: 2px; left: 11px"></b> {{:locale:\'ACCOUNT.VALIDATING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.validating" ng-init="validating=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><span class="item item-divider" ng-if="!loading"><b class="icon ion-checkmark"></b> {{:locale:\'ACCOUNT.LAST_TX\'|translate}} <a id="helptip-wallet-tx" style="position: relative; bottom: 0; right: 0px">&nbsp;</a> </span><span class="item padding" ng-if="!loading && !formData.tx.history.length"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div ng-repeat="tx in formData.tx.history" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? \'templates/wallet/item_tx.html\' : \'templates/wallet/item_ud.html\'"></div><div class="item item-text-wrap text-center" ng-if="formData.tx.fromTime > 0"><p><a ng-click="showMoreTx()">{{:locale:\'ACCOUNT.SHOW_MORE_TX\'|translate}}</a> <span class="gray" translate="ACCOUNT.TX_FROM_DATE" translate-values="{fromTime: formData.tx.fromTime}"></span> <span class="gray">|</span> <a ng-click="showMoreTx(-1)" translate="">ACCOUNT.SHOW_ALL_TX</a></p></div></div></div></div></ion-content><button id="fab-transfer" ng-show="!loading" class="button button-fab button-fab-bottom-right button-energized-900 hidden-md hidden-lg drop ng-hide" ng-click="showTransferModal()"><i class="icon ion-android-send"></i></button></ion-view>');
+$templateCache.put('templates/wallet/view_wallet_tx_error.html','<ion-view left-buttons="leftButtons" class="view-wallet-tx-error"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content scroll="true" class="refresher-top-bg" bind-notifier="{ rebind:settings.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="row no-padding"><div class="col list {{::motion.ionListClass}}"><div class="item item-divider"><span><b class="ion-clock"></b> {{:locale:\'ACCOUNT.PENDING_TX_RECEIVED\'|translate}}</span><div class="badge item-note"><span ng-if="!$root.settings.useRelative">({{$root.currency.name | abbreviate}})</span> <span ng-if="$root.settings.useRelative">({{\'COMMON.UD\' | translate}}<sub>{{$root.currency.name | abbreviate}}</sub>)</span></div></div><span class="item padding" ng-if="!loading && !hasReceivedTx()"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterReceivedTx" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div><div class="item item-divider"><span><b class="ion-close-circled"></b> {{:locale:\'ACCOUNT.ERROR_TX_SENT\'|translate}}</span><div class="badge item-note"><span ng-if="!$root.settings.useRelative">({{$root.currency.name | abbreviate}})</span> <span ng-if="$root.settings.useRelative">({{\'COMMON.UD\' | translate}}<sub>{{$root.currency.name | abbreviate}}</sub>)</span></div></div><span class="item padding" ng-if="!loading && !hasSentTx()"><span class="gray">{{:locale:\'ACCOUNT.NO_TX\'|translate}}</span></span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterSentTx" ng-init="error=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/wot/item_certification.html','<i class="item-image" ng-if="!cert.avatar" ng-class="{\'ion-card\': !cert.isMember, \'ion-person\': cert.isMember}"></i> <i class="item-image avatar" ng-if="cert.avatar" style="background-image: url({{::cert.avatar.src}})"></i> <span ng-if="cert.isMember"><h3><i class="icon ion-clock" ng-if="cert.pending"></i> <span class="positive">{{::cert.name||cert.uid}}</span></h3><h4 class="gray"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}} <span class="gray">| {{::cert.time|medianDate}}</span> <span class="gray" ng-if="$root.settings.expertMode">| {{::cert.pending ? \'WOT.SIGNED_ON_BLOCK\' : \'WOT.WRITTEN_ON_BLOCK\' | translate:cert}}</span></h4></span><span ng-if="!cert.isMember"><h3><i class="icon ion-clock" ng-if="cert.pending"></i> <span ng-if="cert.uid" class="dark">{{::cert.name||cert.uid}} </span><span ng-if="!cert.uid" class="gray"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}}</span></h3><h5 class="assertive">{{::\'WOT.NOT_MEMBER_PARENTHESIS\'|translate}}</h5><h4 class="gray"><span ng-if="cert.uid"><i class="ion-key"></i> {{::cert.pubkey | formatPubkey}} </span><span class="gray">| {{::cert.time|medianDate}}</span> <span class="gray" ng-if="$root.settings.expertMode">| {{::cert.pending ? \'WOT.SIGNED_ON_BLOCK\' : \'WOT.WRITTEN_ON_BLOCK\' | translate:cert}}</span></h4></span><div class="badge badge-stable" ng-class="{\'badge-energized\': cert.willExpire}" ng-if="cert.expiresIn">{{::cert.expiresIn | formatDurationTo}}</div><div class="badge badge-assertive" ng-if="!cert.expiresIn">{{::\'WOT.EXPIRED\' | translate}}</div>');
+$templateCache.put('templates/wot/item_content_identity.html','<i ng-if="::!item.avatar" class="item-image icon ion-person"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2><ng-if ng-if="::item.name||item.uid" ng-bind-html="::item.name||item.uid"></ng-if><ng-if ng-if="::!item.name && !item.uid">{{::item.pubkey|formatPubkey}}</ng-if></h2><h4 class="gray" ng-class="{\'pull-right\': !smallscreen}" ng-if="::item.sigDate"><i class="ion-clock"></i> {{::\'WOT.LOOKUP.REGISTERED\' | translate:item }}</h4><h4 class="gray" ng-class="{\'pull-right\': !smallscreen}" ng-if="item.memberDate"><i class="ion-clock"></i> {{::\'WOT.LOOKUP.MEMBER_FROM\' | translate:item}}</h4><h4 class="gray"><span class="positive" ng-if="::item.name && item.uid"><i class="ion-person"></i> {{::item.uid}}&nbsp; </span><b class="ion-key"></b> {{::item.pubkey | formatPubkey}} <span ng-if="::(!item.uid && !item.revoked)" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span> <span ng-if="::item.revoked" class="assertive" translate>WOT.IDENTITY_REVOKED_PARENTHESIS</span></h4><h4 ng-if="::item.events||item.tags"><span ng-repeat="event in ::item.events" class="assertive"><i class="ion-alert-circled" ng-if="::!item.valid"></i> <span ng-bind-html="::event.message|translate:event.messageParams"></span> </span><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>');
+$templateCache.put('templates/wot/items_given_certifications.html','<div class="list given-certifications" ng-class="::motions.givenCertifications.ionListClass"><span class="item item-divider hidden-xs"><span translate>WOT.GIVEN_CERTIFICATIONS.SUMMARY</span></span><div id="helptip-certs-stock" class="item item-icon-left item-text-wrap ink"><i class="icon ion-ribbon-a"></i> <span translate>WOT.GIVEN_CERTIFICATIONS.SENT</span><cs-badge-given-certification identity="formData" parameters="$root.currency.parameters"></cs-badge-given-certification></div><div class="item item-icon-left item-text-wrap ink" ng-if="formData.given_cert_error.length"><i class="icon ion-alert-circled"></i> <span translate>WOT.GIVEN_CERTIFICATIONS.ERROR</span> <span class="badge badge-assertive">{{formData.given_cert_error.length}}</span></div><span class="item item-divider" ng-if="formData.given_cert_pending.length"><span translate>WOT.GIVEN_CERTIFICATIONS.PENDING_LIST</span><div class="badge item-note" style="text-align: right !important" translate>WOT.NOT_WRITTEN_EXPIRE_IN</div></span><a class="item item-avatar ink" ng-repeat="cert in formData.given_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a><span class="item item-divider"><span translate>WOT.GIVEN_CERTIFICATIONS.LIST</span><div class="badge item-note" translate>WOT.EXPIRE_IN</div></span><span class="item gray" ng-if="!formData.given_cert.length" translate>WOT.NO_GIVEN_CERTIFICATION </span><a class="item item-avatar ink" ng-repeat="cert in formData.given_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a></div>');
+$templateCache.put('templates/wot/items_received_certifications.html','<div class="list certifications" ng-class="::motions.receivedCertifications.ionListClass"><span class="item item-divider hidden-xs"><span translate>WOT.CERTIFICATIONS.SUMMARY</span></span><div id="helptip-received-certs" class="item item-icon-left item-text-wrap ink"><i class="icon ion-ribbon-b"></i> <b ng-if="formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span translate>WOT.CERTIFICATIONS.RECEIVED</span><h4 class="gray" ng-if="formData.requirements.isSentry" translate>WOT.CERTIFICATIONS.SENTRY_MEMBER</h4><cs-badge-certification cs-id="helptip-wot-view-certifications-count" requirements="formData.requirements" parameters="$root.currency.parameters"></cs-badge-certification></div><div class="item item-icon-left item-text-wrap ink" ng-if="formData.received_cert_error.length"><i class="icon ion-alert-circled"></i> <span translate>WOT.CERTIFICATIONS.ERROR</span> <span class="badge badge-assertive">{{formData.received_cert_error.length}}</span></div><span class="item item-divider" ng-if="formData.received_cert_pending.length"><span translate>WOT.CERTIFICATIONS.PENDING_LIST</span><div class="badge item-note" style="text-align: right !important" translate>WOT.NOT_WRITTEN_EXPIRE_IN</div></span><a class="item item-avatar ink" ng-repeat="cert in formData.received_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a><span class="item item-divider"><span translate>WOT.CERTIFICATIONS.LIST</span><div class="badge item-note" translate>WOT.EXPIRE_IN</div></span><span class="item gray" ng-if="!formData.received_cert.length" translate>WOT.NO_CERTIFICATION</span> <a class="item item-avatar ink" ng-repeat="cert in formData.received_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" ng-include="::\'templates/wot/item_certification.html\'"></a></div>');
+$templateCache.put('templates/wot/lookup.html','<ion-view left-buttons="leftButtons"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'WOT.LOOKUP.TITLE\'|translate}}" icon="ion-person-stalker" ui-sref="app.wot_lookup.tab_search"><ion-nav-view name="tab"></ion-nav-view></ion-tab><cs-extension-point name="tabs"></cs-extension-point></ion-tabs></ion-view>');
+$templateCache.put('templates/wot/lookup_form.html','<div class="lookupForm"><div class="item no-padding"><div class="double-padding-x padding-top-xs item-text-wrap" ng-if="::allowMultiple" style="height: 36px"><div class="gray padding-top" ng-if="!selection.length && parameters.help">{{::parameters.help|translate}}</div><div ng-repeat="identity in selection track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><span ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></span> <i class="icon ion-close" ng-click="removeSelection(identity, $event)">&nbsp;&nbsp;</i></div></div><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'WOT.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearchText()" select-on-click=""><div class="helptip-anchor-center"><a id="helptip-wot-search-text"></a></div></div></div><div class="padding-top padding-xs padding-sm" style="display: block; height: 60px" ng-class="::{\'hidden-xs hidden-sm\': !showResultLabel}"><div class="pull-left" ng-if="!search.loading && showResultLabel"><ng-if ng-if="search.type==\'newcomers\'"><h4 translate="">WOT.LOOKUP.NEWCOMERS</h4><small class="gray no-padding" ng-if="search.total">{{\'WOT.LOOKUP.NEWCOMERS_COUNT\'|translate:{count: search.total} }}</small></ng-if><ng-if ng-if="search.type==\'pending\'"><h4 translate="">WOT.LOOKUP.PENDING</h4><small class="gray no-padding" ng-if="search.total">{{\'WOT.LOOKUP.PENDING_COUNT\'|translate:{count: search.total} }}</small></ng-if><h4 ng-if="search.type==\'text\'"><span translate="">COMMON.RESULTS_LIST</span> <small class="gray" ng-if="search.total">({{search.total}})</small></h4></div></div><div class="text-center padding-top" ng-if="search.loading"><p class="gray" ng-if="::$root.currency.initPhase" translate="">WOT.SEARCH_INIT_PHASE_WARNING</p><ion-spinner icon="android"></ion-spinner></div><ng-if ng-if="!search.loading"><div class="assertive padding" ng-if="!search.results.length"><span ng-if="search.type==\'text\'" translate="">COMMON.SEARCH_NO_RESULT</span> <span ng-if="search.type==\'pending\'" translate="">WOT.LOOKUP.NO_PENDING</span> <span ng-if="search.type==\'newcomers\'" translate="">WOT.LOOKUP.NO_NEWCOMERS</span></div><ion-list ng-if="::!allowMultiple && $root.device.enable" class="{{::motion.ionListClass}}" can-swipe="true"><ng-repeat ng-repeat="item in search.results track by item.id"><div ng-if="::item.divider" class="item item-divider" id="helptip-wot-search-result-{{$index}}">{{::(\'WOT.SEARCH.DIVIDER_\' + item.index)|upper|translate}}</div><ion-item ng-if="::!item.divider" id="helptip-wot-search-result-{{$index}}" class="item item-border-large item-avatar item-icon-right ink" ng-click="::select(item)"><ng-include src="item.templateUrl || \'templates/wot/item_content_identity.html\'"></ng-include><i class="icon ion-ios-arrow-right"></i><ion-option-button class="button-positive" ng-click="showTransferModal({pubkey: item.pubkey, uid: item.name ||item.uid})" translate="">COMMON.BTN_SEND_MONEY_SHORT</ion-option-button></ion-item></ng-repeat></ion-list><div ng-if="::allowMultiple" class="list {{::motion.ionListClass}}"><ion-checkbox ng-repeat="item in search.results track by item.id" ng-model="item.checked" class="item item-border-large item-avatar ink" ng-click="toggleCheck($index, $event)"><ng-include src="::\'templates/wot/item_content_identity.html\'"></ng-include></ion-checkbox></div><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="20%"></ion-infinite-scroll></ng-if></div>');
+$templateCache.put('templates/wot/lookup_lg.html','<ion-view><ion-nav-title>{{\'MENU.WOT\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-qr-scanner hidden-no-device" ng-if="$root.device.barcode.enable" ng-click="scanQrCode()"></button> <button class="button button-icon button-clear visible-xs visible-sm" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content class="padding no-padding-x no-padding-sm" scroll="true"><cs-extension-point name="top"></cs-extension-point><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/wot/lookup_popover_actions.html','<ion-popover-view class="fit has-header visible-sm visible-xs"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-if="enableWallets" ng-click="doGetWallets()"><i class="icon ion-card"></i> {{\'MENU.WALLETS\' | translate}} </a><a class="item item-icon-left ink" ng-click="doGetNewcomers()"><i class="icon ion-person"></i> {{\'WOT.LOOKUP.BTN_NEWCOMERS\' | translate}} </a><a class="item item-icon-left ink" ng-click="doGetPending()"><i class="icon ion-clock"></i> {{\'WOT.LOOKUP.BTN_PENDING\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/wot/modal_lookup.html','<ion-modal-view id="wotLookup" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title hidden-xs">{{::parameters.title?parameters.title:\'WOT.MODAL.TITLE\'|translate}}</h1><button class="button button-clear icon-right visible-xs ink" ng-if="allowMultiple && selection.length" ng-click="closeModal(selection)">{{::parameters.okText||\'COMMON.BTN_NEXT\' | translate}} <i ng-if="::!parameters.okText||parameters.okIcon" class="icon {{::parameters.okIcon||\'ion-ios-arrow-right\'}}"></i></button></ion-header-bar><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="visible-xs visible-sm text-right stable-bg stable"><button class="button button-icon button-small-padding dark hidden-no-device ink" ng-if="$root.device.barcode.enable" ng-click="scanQrCode()"><i class="icon ion-qr-scanner"></i></button> <button class="button button-icon button-small-padding dark ink" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></div><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-modal-view>');
+$templateCache.put('templates/wot/modal_select_pubkey_identity.html','<ion-modal-view id="transfer" class="modal-full-height modal-transfer"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.SELECT_IDENTITY_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true"><div class="padding"><p trust-as-html="\'ACCOUNT.SELECT_IDENTITY_MODAL.HELP\'|translate:{pubkey: pubkey}"></p></div><ion-list><ion-item class="item-avatar item-icon-right" ng-repeat="item in identities" ng-click="closeModal(item)"><i class="item-image icon ion-person"></i><h2>{{item.uid}}</h2><h4 class="gray"><b class="ion-key"></b> {{::item.pubkey | formatPubkey}} <span ng-if="::!item.revoked && !item.pendingRevocation && !item.isMember" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span> <span ng-if="::item.revoked || item.pendingRevocation" class="assertive bold" translate>WOT.IDENTITY_REVOKED_PARENTHESIS</span> <span ng-if="::item.meta.invalid" class="assertive" translate>ERROR.WOT_PENDING_INVALID_BLOCK_HASH</span></h4><h4 class="dark" ng-if="::item.meta.time"><i class="ion-calendar"></i> <span translate>WOT.REGISTERED_SINCE</span> {{::item.meta.time|medianDate}}</h4><ng-if ng-if="::!item.revoked && !item.pendingRevocation && (item.certificationCount || item.pendingCertificationCount)"><cs-badge-certification requirements="item" parameters="$root.currency.parameters"></cs-badge-certification><div class="gray badge badge-secondary hidden-xs"><span translate>ACCOUNT.CERTIFICATION_COUNT</span></div></ng-if><i class="icon ion-ios-arrow-right"></i></ion-item></ion-list></ion-content></ion-modal-view>');
+$templateCache.put('templates/wot/view_certifications.html','<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs visible-sm">{{::formData.name||formData.uid}}</span></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content class="certifications certifications-lg"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate()"></ion-refresher><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="row responsive-sm responsive-md responsive-lg"><div class="col no-padding" ng-if="motions.receivedCertifications.enable"><ng-include src="::\'templates/wot/items_received_certifications.html\'"></ng-include></div><div class="col no-padding" ng-if="motions.givenCertifications.enable"><ng-include src="::\'templates/wot/items_given_certifications.html\'"></ng-include></div></div></ion-content><div class="visible-xs visible-sm"><button id="fab-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canCertify && !alreadyCertified" ng-click="certify()"><i class="icon ion-ribbon-b"></i></button> <button id="fab-select-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canSelectAndCertify" ng-click="selectAndCertify()"><i class="icon ion-plus"></i></button></div></ion-view>');
+$templateCache.put('templates/wot/view_identity.html','<ion-view left-buttons="leftButtons" class="view-identity"><ion-nav-title></ion-nav-title><ion-content scroll="true" ng-class="{\'member\': !loading && formData.isMember}"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="hero"><div class="content" ng-if="!loading"><i class="avatar" ng-if=":rebind:!formData.avatar" ng-class="{\'avatar-wallet\': !formData.isMember, \'avatar-member\': formData.isMember}"></i> <i class="avatar" ng-if=":rebind:formData.avatar" style="background-image: url({{::formData.avatar.src}})"></i><ng-if ng-if=":rebind:formData.name"><h3 class="light">{{::formData.name}}</h3></ng-if><ng-if ng-if=":rebind:!formData.name"><h3 class="light" ng-if=":rebind:formData.uid">{{:rebind:formData.uid}}</h3><h3 class="light" ng-if=":rebind:!formData.uid"><i class="ion-key"></i> {{:rebind:formData.pubkey | formatPubkey}}</h3></ng-if><h4><ng-if class="assertive" ng-if=":rebind:(formData.name || formData.uid) && !formData.isMember && revoked" translate="">WOT.IDENTITY_REVOKED_PARENTHESIS</ng-if><ng-if class="assertive" ng-if=":rebind:(formData.name || formData.uid) && formData.isMember && revoked" translate="">WOT.MEMBER_PENDING_REVOCATION_PARENTHESIS</ng-if><cs-extension-point name="hero"></cs-extension-point></h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><ng-include src="::\'templates/common/qrcode.html\'"></ng-include><a id="wot-share-anchor-{{::formData.pubkey}}"></a><div class="visible-xs visible-sm"><button id="fab-certify-{{:rebind:formData.uid}}" class="button button-fab button-fab-top-left button-fab-hero button-calm spin" ng-if=":rebind:(canCertify && !alreadyCertified)" ng-click="certify()"><i class="icon ion-ribbon-b"></i></button><cs-extension-point name="buttons-top-fab"></cs-extension-point></div><div class="row no-padding"><div class="col list {{::motion.ionListClass}}" bind-notifier="{ rebind:loading}"><span class="item item-divider" translate="">WOT.GENERAL_DIVIDER</span><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{:rebind:formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 id="pubkey" class="dark text-left">{{:rebind:formData.pubkey}}</h4></ion-item><div class="item item-icon-left item-text-wrap" ng-if=":rebind:!formData.hasSelf"><i class="icon ion-ios-help-outline positive"></i> <span translate="">WOT.NOT_MEMBER_ACCOUNT</span><h4 class="gray" translate="">WOT.NOT_MEMBER_ACCOUNT_HELP</h4></div><ion-item class="item-icon-left" ng-if=":rebind:formData.sigDate||formData.uid"><i class="icon ion-calendar"></i> <span translate="">COMMON.UID</span><h5 class="dark" ng-if=":rebind:formData.sigDate "><span translate="">WOT.REGISTERED_SINCE</span> {{:rebind:formData.sigDate|medianDate}}</h5><span class="badge badge-energized">{{:rebind:formData.uid}}</span></ion-item><a id="helptip-wot-view-certifications" class="item item-icon-left item-text-wrap item-icon-right ink" ng-if=":rebind:formData.hasSelf" ng-click="showCertifications()"><i class="icon ion-ribbon-b"></i> <b ng-if=":rebind:formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px"></b> <span translate="">ACCOUNT.CERTIFICATION_COUNT</span><cs-badge-certification cs-id="helptip-wot-view-certifications-count" requirements="formData.requirements" parameters="{sigQty: formData.sigQty}"></cs-badge-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink visible-xs visible-sm" ng-if=":rebind:formData.hasSelf && formData.isMember" ng-click="showGivenCertifications()"><i class="icon ion-ribbon-a"></i> <span translate="">WOT.GIVEN_CERTIFICATIONS.SENT</span><cs-badge-given-certification identity="formData" parameters="$root.currency.parameters"></cs-badge-given-certification><i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-icon-right ink" ng-if="!loading" ui-sref="app.wot_identity_tx_uid({uid:formData.uid,pubkey:formData.pubkey})"><i class="icon ion-card"></i> <span translate="">WOT.ACCOUNT_OPERATIONS</span> <i class="gray icon ion-ios-arrow-right"></i></a><div class="item item-text-wrap item-icon-left item-wallet-event" ng-class="{\'assertive\': event.type==\'error\'}" ng-repeat="event in :rebind:formData.events"><i class="icon" ng-class="{\'ion-information-circled royal\': event.type==\'info\',\'ion-alert-circled\': event.type==\'warn\'||event.type==\'error\',\'assertive\': event.type==\'error\',\'ion-clock\': event.type==\'pending\'}"></i> <span trust-as-html="event.message | translate:event.messageParams"></span></div><cs-extension-point name="general"></cs-extension-point><cs-extension-point name="after-general"></cs-extension-point></div></div></ion-content><div class="visible-xs visible-sm" ng-hide="loading"><button id="fab-transfer" class="button button-fab button-fab-bottom-right button-assertive drop" ng-click="showTransferModal({pubkey:formData.pubkey, uid: formData.uid})"><i class="icon ion-android-send"></i></button></div></ion-view>');
+$templateCache.put('templates/wot/view_identity_tx.html','<ion-view left-buttons="leftButtons" class="view-identity-tx"><ion-nav-title><span class="visible-xs visible-sm" ng-if="!loading"><span ng-if="formData.name || formData.uid">{{formData.name || formData.uid}} </span><span ng-if="!formData.name && !formData.uid"><i class="ion-key"></i> {{formData.pubkey|formatPubkey}}</span></span></ion-nav-title><ion-content scroll="true"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true)"></ion-refresher><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list {{motion.ionListClass}}" ng-if="!loading"><div class="row"><div class="col"><div class="item item-tx item-divider">{{:locale:\'ACCOUNT.BALANCE_ACCOUNT\'|translate}}<div class="badge item-note" ng-class=":balance:{\'badge-assertive\': formData.balance <= 0, \'badge-balanced\': formData.balance > 0 }" ng-bind-html=":balance:formData.balance|formatAmount:{currency: $root.currency.name}"></div><div class="badge badge-secondary" ng-if="$root.settings.expertMode">(<span ng-bind-html=":balance:formData.balance| formatAmount: {useRelative: !$root.settings.useRelative, currency: $root.currency.name} "></span>)</div></div><div class="item item-icon-left" ng-if="formData.tx.errors.length"><i class="icon ion-alert-circled"></i> {{:locale:\'ACCOUNT.ERROR_TX\'|translate}}<div class="badge badge-assertive">{{formData.tx.errors.length}}</div></div><ng-if ng-if="formData.tx.pendings.length"><span class="item item-pending item-divider"><i class="ion-clock"></i> {{:locale:\'ACCOUNT.PENDING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.pendings" ng-init="pending=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><ng-if ng-if="formData.tx.validating.length"><span class="item item-pending item-divider">{{:locale:\'ACCOUNT.VALIDATING_TX\'|translate}}</span><div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.validating" ng-init="validating=true;" ng-include="::\'templates/wallet/item_tx.html\'"></div></ng-if><span class="item item-divider" ng-if="!loading">{{:locale:\'ACCOUNT.LAST_TX\'|translate}} <a id="helptip-wallet-tx" style="position: relative; bottom: 0; right: 0px">&nbsp;</a></span><div ng-repeat="tx in formData.tx.history" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? \'templates/wallet/item_tx.html\' : \'templates/wallet/item_ud.html\'"></div><div class="item item-text-wrap text-center" ng-if="formData.tx.fromTime > 0"><p><a ng-click="showMoreTx()">{{:locale:\'ACCOUNT.SHOW_MORE_TX\'|translate}}</a> <span class="gray" translate="ACCOUNT.TX_FROM_DATE" translate-values="{fromTime: formData.tx.fromTime}"></span> <span class="gray">|</span> <a ng-click="showMoreTx(-1)" translate="">ACCOUNT.SHOW_ALL_TX</a></p></div></div></div></div></ion-content></ion-view>');
+$templateCache.put('templates/currency/tabs/tab_blocks.html','<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-navicon visible-xs visible-sm" ng-click="toggleCompactMode()"><b class="icon-secondary" ng-class="{\'ion-arrow-down-b\': !compactMode, \'ion-arrow-up-b\': compactMode}" style="top: -12px; left: 11px; font-size: 10px"></b> <b class="icon-secondary" ng-class="{\'ion-arrow-up-b\': !compactMode,\'ion-arrow-down-b\': compactMode}" style="top: 12px; left: 11px; font-size: 10px"></b></button><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><div class="item item-divider"><span translate>BLOCKCHAIN.LOOKUP.LAST_BLOCKS</span></div><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'templates/blockchain/list_blocks.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/currency/tabs/tab_network.html','<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear" ng-click="showExtendActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refreshPeers()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_network.html\'"></ng-include></div></ion-content></ion-view>');
+$templateCache.put('templates/currency/tabs/tab_parameters.html','<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_parameters.html\'"></ng-include></div></ion-content></ion-view>');
+$templateCache.put('templates/currency/tabs/tab_wot.html','<ion-view><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><div class="list"><ng-include src="::\'templates/currency/items_wot.html\'"></ng-include></div></ion-content></ion-view>');
+$templateCache.put('templates/wallet/list/item_wallet.html','<div class="item item-avatar item-icon-right item-border-large item-wallet ink" id="wallet-{{::wallet.id}}" ng-click="select($event, wallet)" ng-init="walletData=wallet.data;"><i ng-if=":rebind:!walletData.avatar" class="item-image icon" ng-class=":rebind:{\'ion-card\': !walletData.isMember, \'ion-person\': walletData.isMember}"></i> <i ng-if=":rebind:walletData.avatar" class="item-image avatar" style="background-image: url({{::walletData.avatar.src}})"></i><div class="badge badge-button badge-avatar badge-assertive ion-locked" ng-hide=":rebind:wallet.isAuth()"></div><h2><span class="text-editable" ng-click="editWallet($event, wallet)" title="{{\'ACCOUNT.WALLET_LIST.BTN_RENAME\'|translate}}"><ng-if ng-if=":rebind:walletData.localName||walletData.name||walletData.uid" ng-bind-html="::walletData.localName||walletData.name||walletData.uid"></ng-if><ng-if ng-if=":rebind:!walletData.localName && !walletData.name && !walletData.uid">{{::walletData.pubkey|formatPubkey}}</ng-if></span></h2><h4 class="gray"><span class="positive" ng-if="::walletData.name && walletData.uid"><i class="ion-person"></i> {{::walletData.uid}}&nbsp; </span><b class="ion-key"></b> {{::walletData.pubkey | formatPubkey}} <span ng-if="::!walletData.uid" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span></h4><cs-extension-point name="item-wallet"></cs-extension-point><span class="badge" ng-if=":rebind:formData.showBalance && walletData.sources" ng-class=":rebind:{\'badge-calm\': (walletData.balance > 0) }"><ion-spinner class="ion-spinner-small" ng-if="formData.updatingWalletId==wallet.id" icon="android"></ion-spinner><span ng-bind-html=":rebind:walletData.balance|formatAmount:{useRelative: formData.useRelative, currency: currency}"></span> </span><i class="icon ion-ios-arrow-right"></i></div>');
+$templateCache.put('templates/wallet/list/item_wallet_light.html','<div class="item item-avatar item-icon-right item-border item-wallet" ng-click="select($event, wallet)" ng-init="walletData=wallet.data;"><i ng-if="::!walletData.avatar" class="item-image icon" ng-class="::{\'ion-card\': !walletData.isMember, \'ion-person\': walletData.isMember}"></i> <i ng-if="::walletData.avatar" class="item-image avatar" style="background-image: url({{::walletData.avatar.src}})"></i><div class="badge badge-button badge-avatar badge-assertive ion-locked" ng-hide="::wallet.isAuth()"></div><h2><ng-if ng-if="::walletData.localName||walletData.name||walletData.uid">{{::walletData.localName||walletData.name||walletData.uid}}</ng-if><ng-if ng-if="::!walletData.localName && !walletData.name && !walletData.uid">{{::walletData.pubkey|formatPubkey}}</ng-if></h2><h4 class="gray"><span class="positive" ng-if="::walletData.name && walletData.uid"><i class="ion-person"></i> {{::walletData.uid}}&nbsp; </span><b class="ion-key"></b> {{::walletData.pubkey | formatPubkey}} <span ng-if="::!walletData.uid" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span></h4><div class="badge" ng-if="formData.showBalance" ng-class="{\'badge-calm\': (walletData.balance > 0) }"><span ng-bind-html="walletData.balance|formatAmount:{useRelative: formData.useRelative, currency: currency}"></span></div><i class="icon ion-ios-arrow-right"></i></div>');
+$templateCache.put('templates/wallet/list/modal_import_file.html','<ion-modal-view id="transfer" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.WALLET_LIST.IMPORT_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true" class="padding"><p translate>ACCOUNT.WALLET_LIST.IMPORT_MODAL.HELP</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".csv,.txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right stable-bg"><i class="icon ion-document-text gray"></i><div class="item-content row"><div class="col"><h2>{{fileData.name}}</h2><h4 ng-if="fileData.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{fileData.lastModified/1000|formatDate}}</h4><h5><span class="gray" translate>COMMON.FILE.SIZE</span> {{fileData.size|formatInteger}} Ko</h5></div><div class="col padding-left"><h3 ng-if="validatingFile" translate>COMMON.FILE.VALIDATING</h3><h3 ng-if="!validatingFile"><span class="dark animate-show-hide ng-hide" ng-show="isValidFile && content.length" ng-bind-html="\'ACCOUNT.WALLET_LIST.IMPORT_MODAL.WALLET_COUNT\'|translate:{count: content.length}"></span> <span class="assertive animate-show-hide ng-hide" ng-show="isValidFile && !content.length"><br><i class="ion-close-circled assertive"></i> {{\'ACCOUNT.WALLET_LIST.IMPORT_MODAL.NO_NEW_WALLET\' |translate}} </span><span class="assertive animate-show-hide ng-hide" ng-show="!isValidFile"><br><i class="ion-close-circled assertive"></i> {{\'ERROR.INVALID_FILE_FORMAT\' |translate}}</span></h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="removeFile()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" ng-disabled="loading || !content.length" ng-click="closeModal(content)" translate>COMMON.BTN_IMPORT</button></div></ion-content></ion-modal-view>');
+$templateCache.put('templates/wallet/list/modal_wallets.html','<ion-modal-view id="transfer" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>ACCOUNT.SELECT_WALLET_MODAL.TITLE</h1></ion-header-bar><ion-content scroll="true"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!loading && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list ng-if="!loading" class="{{::motion.ionListClass}}"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet.html\'"></ng-include><ng-repeat ng-repeat="wallet in wallets track by wallet.id" ng-include="::\'templates/wallet/list/item_wallet_light.html\'"></ng-repeat></ion-list></ion-content></ion-modal-view>');
+$templateCache.put('templates/wallet/list/popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate="">COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><button class="item item-icon-left ink" ng-class="{\'gray\': loading || !wallets.length, \'assertive\': !loading && wallets.length}" ng-disabled="loading || !wallets.length" ng-click="selectAndRemoveWallet()"><i class="icon ion-trash-a"></i> {{\'ACCOUNT.WALLET_LIST.BTN_DELETE\' | translate}}</button></div></ion-content></ion-popover-view>');
+$templateCache.put('templates/wallet/list/popover_wallets.html','<ion-popover-view class="fit popover-wallets popover-light"><ion-header-bar class="stable-bg block"><div class="title" translate>ACCOUNT.SELECT_WALLET_MODAL.TITLE</div><div class="pull-right"><a class="positive" ng-click="showNewWalletModal()" translate>ACCOUNT.WALLET_LIST.BTN_NEW</a></div></ion-header-bar><ion-content scroll="true"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!loading && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list ng-if="!loading"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet_light.html\'"></ng-include><ng-repeat ng-repeat="wallet in :rebind:wallets | filter:filterFn(formData) track by wallet.id" ng-include="::\'templates/wallet/list/item_wallet_light.html\'"></ng-repeat></ion-list></ion-content><ion-footer-bar class="stable-bg block"><div class="pull-right"><a class="positive" ui-sref="app.view_wallets" ng-click="closePopover()" translate>COMMON.NOTIFICATIONS.SHOW_ALL</a></div></ion-footer-bar></ion-popover-view>');
+$templateCache.put('templates/wallet/list/popup_edit_name.html','<form name="editForm" ng-submit=""><div class="list" ng-init="setEditForm(editForm)"><label class="item item-input" ng-class="{\'item-input-error\': editForm.$submitted && editForm.name.$invalid}"><input name="name" type="text" placeholder="{{\'ACCOUNT.WALLET_LIST.EDIT_POPOVER.NAME_HELP\' | translate}}" ng-model="formData.name" ng-minlength="3" required></label><div class="form-errors" ng-if="editForm.$submitted && editForm.name.$error" ng-messages="editForm.name.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div></div></form>');
+$templateCache.put('templates/wallet/list/view_wallets.html','<ion-view left-buttons="leftButtons" class="view-wallet-list"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="padding no-padding-xs no-padding-sm" bind-notifier="{ rebind:formData.useRelative, locale:settings.locale.id}"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate(true, $event)"></ion-refresher><div class="center padding gray" ng-if="!loading && wallets && !wallets.length && !defaultWallet">{{:locale:\'ACCOUNT.WALLET_LIST.NO_WALLET\'|translate}}</div><ion-list class="{{::motion.ionListClass}}"><ng-include ng-if="defaultWallet" ng-init="wallet = defaultWallet" src="\'templates/wallet/list/item_wallet.html\'"></ng-include><ng-include ng-repeat="wallet in wallets track by wallet.id" src="\'templates/wallet/list/item_wallet.html\'"></ng-include></ion-list><div class="center padding visible-xs visible-sm" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div></ion-content><button id="fab-add-wallet" class="button button-fab button-fab-bottom-right button-assertive hidden-md hidden-lg drop ng-hide" ng-show="!loading" ng-click="showNewWalletModal()"><i class="icon ion-plus"></i></button></ion-view>');
+$templateCache.put('templates/wallet/slides/slides_generate_keyfile.html','<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.GENERATE_KEYFILE</h3><div class="list"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'PubSec\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.PUBSEC_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.PUBSEC_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'WIF\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.WIF_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.WIF_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-click="downloadKeyFile(\'EWIF\')"><div class="item-content item-text-wrap"><i class="item-image dark icon ion-document-text"></i> <b class="ion-ios-redo icon-secondary dark" style="top: -8px; left: 42px; font-size: 12px"></b> <b class="ion-locked icon-secondary dark" style="top: 0px; left: 43px; font-size: 8px"></b><h2 translate>ACCOUNT.SECURITY.KEYFILE.EWIF_FORMAT</h2><h4 class="gray" translate>ACCOUNT.SECURITY.KEYFILE.EWIF_FORMAT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></div></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_recoverID_1.html','<ion-content class="has-header padding"><p translate>ACCOUNT.SECURITY.RECOVER_ID_SELECT_FILE</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right"><i class="icon ion-document-text dark"></i><div class="item-content row"><div class="col"><span>{{fileData.name}}</span><br><small>{{fileData.size}} Ko</small></div><div class="col-10"><b ng-class="{\'ion-close-circled assertive\': !isValidFile}" style="font-size: 28px; position: relative; top: 6px"></b></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="restore()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doNext()" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_recoverID_2.html','<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.RECOVER_ID</h3><form name="recoverForm" novalidate ng-submit="recoverId()"><div class="list" ng-init="setForm(recoverForm, \'recoverForm\')"><ng-repeat ng-repeat="question in recover.questions "><label class="item item-input {{smallscreen ? \'item-stacked-label\' : \'item-floating-label\'}}" ng-class="{\'item-input-error\': recoverForm.$submitted && recoverForm[\'question{{$index}}\'].$invalid}"><span class="input-label" style="{{smallscreen ? \'white-space: normal\' : \'\'}}">{{question.value }}</span> <input type="text" autocomplete="off" name="question{{$index}}" placeholder="{{smallscreen ? \'\' : question.value }}" ng-model="question.answer" required></label><div class="form-errors" ng-show="recoverForm.$submitted && recoverForm[\'question{{$index}}\'].$error" ng-messages="recoverForm[\'question{{$index}}\'].$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></ng-repeat><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_CLEAN</button> <button class="button button-calm icon-right ion-chevron-right ink" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></div></form></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_recoverID_3.html','<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.RECOVER_ID</h3><div class="item item-input"><span class="input-label">{{\'LOGIN.SALT\' | translate}} :</span> <span>{{recover.salt}}</span></div><div class="item item-input"><span class="input-label">{{\'LOGIN.PASSWORD\' | translate}} :</span> <span>{{recover.pwd}}</span></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CLOSE</button></div></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_revocation_file.html','<ion-content class="has-header padding"><p translate>ACCOUNT.SECURITY.REVOCATION_WITH_FILE_HELP</p><div drop-zone="onFileChanged(file)"><div ng-if="!hasContent" file-select="onFileChanged(file)" accept=".txt"><h2 class="gray" translate>COMMON.CHOOSE_FILE</h2></div><div ng-if="hasContent" class="item item-icon-left item-icon-right"><i class="icon ion-document-text dark"></i><div class="row"><div class="col"><h2>{{fileData.name}}</h2><h4 ng-if="fileData.lastModified"><span class="gray" translate>COMMON.FILE.DATE</span> {{fileData.lastModified/1000|formatDate}}</h4><h5><span class="gray" translate>COMMON.FILE.SIZE</span> {{fileData.size|formatInteger}} Ko</h5></div><div class="col padding-left"><h3 class="assertive animate-show-hide ng-hide" ng-show="!isValidFile"><br><i class="ion-close-circled assertive"></i> {{revocationError|translate}}</h3></div></div><a class="ion-close-round gray pull-right" style="font-size: 10px; position: absolute; top: 6px; right: 6px" ng-click="restore()"></a></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="revokeWithFile()" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_saveID_1.html','<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.SAVE_ID</h3><label class="item item-input item-select"><div class="input-label" translate>ACCOUNT.SECURITY.LEVEL</div><select ng-model="formData.level"><option value="2" ng-bind-html="\'ACCOUNT.SECURITY.LOW_LEVEL\' | translate"></option><option value="4" translate>ACCOUNT.SECURITY.MEDIUM_LEVEL</option><option value="6" translate>ACCOUNT.SECURITY.STRONG_LEVEL</option></select></label><div class="padding-top" translate="ACCOUNT.SECURITY.HELP_LEVEL" translate-values="{nb: {{formData.level}}}"></div><form name="questionsForm" novalidate ng-submit="doNext(\'questionsForm\')"><div class="list" ng-init="setForm(questionsForm, \'questionsForm\')"><ion-checkbox ng-repeat="question in formData.questions" ng-model="question.checked" ng-required="isRequired()"><span style="white-space: normal">{{question.value | translate}}</span></ion-checkbox><div class="item item-icon-right no-padding-top"><a class="dark"><i class="icon ion-android-add" ng-click="addQuestion()"></i></a><div class="list list-inset"><label class="item item-input"><input type="text" autocomplete="off" placeholder="{{\'ACCOUNT.SECURITY.ADD_QUESTION\' | translate}}" ng-model="formData.addQuestion"></label></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_RESET</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-disabled="questionsForm.$invalid" type="submit" translate>COMMON.BTN_NEXT <i class="icon ion-arrow-right-a"></i></button></div></form></ion-content>');
+$templateCache.put('templates/wallet/slides/slides_saveID_2.html','<ion-content class="has-header padding"><h3 translate>ACCOUNT.SECURITY.SAVE_ID</h3><form name="answersForm" novalidate ng-submit="doNext(\'answersForm\')"><div class="list" ng-init="setForm(answersForm, \'answersForm\')"><ng-repeat ng-repeat="question in formData.questions |filter:true:checked"><label class="item item-input item-text-wrap {{smallscreen ? \'item-stacked-label\' : \'item-floating-label\'}}" ng-class="{\'item-input-error\': answersForm.$submitted && answersForm[\'question{{$index}}\'].$invalid}"><span class="input-label" style="width: 100%; max-width: inherit">{{question.value | translate}}</span> <input type="text" autocomplete="off" name="question{{$index}}" placeholder="{{smallscreen ? \'\' : question.value | translate}}" ng-model="question.answer" required></label><div class="form-errors" ng-show="answersForm.$submitted && answersForm[\'question{{$index}}\'].$error" ng-messages="answersForm[\'question{{$index}}\'].$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></ng-repeat><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-clear button-dark" ng-click="restore()" type="button" translate>ACCOUNT.SECURITY.BTN_CLEAN</button> <button class="button button-positive ink" type="submit" translate>COMMON.BTN_CONTINUE <i class="icon ion-android-archive"></i></button></div></div></form></ion-content>');
+$templateCache.put('templates/wot/tabs/tab_given_certifications.html','<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop" ng-click="doUpdate()"></button></ion-nav-buttons><ion-content ng-init="motions.receivedCertifications=false; motions.avatar=false"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'templates/wot/items_given_certifications.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button id="fab-select-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-if="canSelectAndCertify || $root.tour" ng-click="selectAndCertify()"><i class="icon ion-plus"></i></button></div></ion-view>');
+$templateCache.put('templates/wot/tabs/tab_lookup.html','<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear" ng-click="showActionsPopover($event)"><i class="icon ion-android-funnel"></i></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doSearch()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'templates/wot/lookup_form.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('templates/wot/tabs/tab_received_certifications.html','<ion-view><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop" ng-click="doUpdate()"></button></ion-nav-buttons><ion-content ng-init="motions.givenCertifications=false; motions.avatar=false;"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'templates/wot/items_received_certifications.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button id="fab-certify" class="button button-fab button-fab-bottom-right button-energized-900 spin" ng-click="certify()" ng-if="(formData.hasSelf && canCertify && !alreadyCertified) || $root.tour"><i class="icon ion-ribbon-b"></i></button></div></ion-view>');}]);
+angular.module("cesium.translations", []).config(["$translateProvider", function($translateProvider) {
+$translateProvider.translations("en-GB", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "build {{build}}",
+    "PUBKEY": "Public key",
+    "MEMBER": "Member",
+    "BLOCK" : "Block",
+    "BTN_OK": "OK",
+    "BTN_YES": "Yes",
+    "BTN_NO": "No",
+    "BTN_SEND": "Send",
+    "BTN_SEND_MONEY": "Transfer money",
+    "BTN_SEND_MONEY_SHORT": "Transfer",
+    "BTN_SAVE": "Save",
+    "BTN_YES_SAVE": "Yes, Save",
+    "BTN_YES_CONTINUE": "Yes, Continue",
+    "BTN_SHOW": "Show",
+    "BTN_SHOW_PUBKEY": "Show key",
+    "BTN_RELATIVE_UNIT": "Display amounts in UD?",
+    "BTN_BACK": "Back",
+    "BTN_NEXT": "Next",
+    "BTN_IMPORT": "Import",
+    "BTN_CANCEL": "Cancel",
+    "BTN_CLOSE": "Close",
+    "BTN_LATER": "Later",
+    "BTN_LOGIN": "Sign In",
+    "BTN_LOGOUT": "Logout",
+    "BTN_ADD_ACCOUNT": "New Account",
+    "BTN_SHARE": "Share",
+    "BTN_EDIT": "Edit",
+    "BTN_DELETE": "Delete",
+    "BTN_ADD": "Add",
+    "BTN_SEARCH": "Search",
+    "BTN_REFRESH": "Refresh",
+    "BTN_RETRY": "Retry",
+    "BTN_START": "Start",
+    "BTN_CONTINUE": "Continue",
+    "BTN_CREATE": "Create",
+    "BTN_UNDERSTOOD": "I understand",
+    "BTN_OPTIONS": "Options",
+    "BTN_HELP_TOUR": "Features tour",
+    "BTN_HELP_TOUR_SCREEN": "Discover this screen",
+    "BTN_DOWNLOAD": "Download",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Download account statement",
+    "BTN_MODIFY": "Modify",
+    "CHOOSE_FILE": "Drag your file<br/>or click to select",
+    "DAYS": "days",
+    "NO_ACCOUNT_QUESTION": "Not a member yet? Register now!",
+    "SEARCH_NO_RESULT": "No result found",
+    "LOADING": "Loading...",
+    "LOADING_WAIT": "Loading...<br/><small>(Waiting for node availability)</small>",
+    "SEARCHING": "Searching...",
+    "FROM": "From",
+    "TO": "To",
+    "COPY": "Copy",
+    "LANGUAGE": "Language",
+    "UNIVERSAL_DIVIDEND": "Universal dividend",
+    "UD": "UD",
+    "DATE_PATTERN": "DD/MM/YYYY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "DD/MM/YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+    "EMPTY_PARENTHESIS": "(empty)",
+    "UID": "Pseudonym",
+    "ENABLE": "Enabled",
+    "DISABLE": "Disabled",
+    "RESULTS_LIST": "Results:",
+    "RESULTS_COUNT": "{{count}} results",
+    "EXECUTION_TIME": "executed in {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "Display values openly?",
+    "POPOVER_ACTIONS_TITLE": "Options",
+    "POPOVER_FILTER_TITLE": "Filters",
+    "SHOW_MORE": "Show more",
+    "SHOW_MORE_COUNT": "(current limit at {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Share",
+      "SHARE_ON_TWITTER": "Share on Twitter",
+      "SHARE_ON_FACEBOOK": "Share on Facebook",
+      "SHARE_ON_DIASPORA": "Share on Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Share on Google+"
+    },
+    "FILE": {
+      "DATE" : "Date:",
+      "TYPE" : "Type:",
+      "SIZE": "Size:",
+      "VALIDATING": "Validating..."
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Choose source:",
+    "BTN_PICTURE_GALLERY": "Gallery",
+    "BTN_PICTURE_CAMERA": "<b>Camera</b>"
+  },
+  "MENU": {
+    "HOME": "Home",
+    "WOT": "Registry",
+    "CURRENCY": "Currency",
+    "ACCOUNT": "My Account",
+    "WALLETS": "My wallets",
+    "SETTINGS": "Settings",
+    "NETWORK": "Network",
+    "TRANSACTIONS": "My transactions"
+  },
+  "ABOUT": {
+    "TITLE": "About",
+    "LICENSE": "<b>Free/libre software</b> (License GNU AGPLv3).",
+    "LATEST_RELEASE": "There is a <b>newer version</ b> of {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",
+    "PLEASE_UPDATE": "Please update {{'COMMON.APP_NAME' | translate}} (latest version: <b>v{{version}}</b>)",
+    "CODE": "Source code:",
+    "OFFICIAL_WEB_SITE": "Official web site:",
+    "DEVELOPERS": "Developers:",
+    "FORUM": "Forum:",
+    "PLEASE_REPORT_ISSUE": "Please report any issue to us!",
+    "REPORT_ISSUE": "Report an issue",
+    "BTN_OPEN_DEV_WINDOW": "Open the debug window"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Welcome to the Cesium Application!",
+    "MESSAGE": "Receive and send libre currency {{currency|abbreviate}}",
+    "BTN_CURRENCY": "Explore currency",
+    "BTN_ABOUT": "about",
+    "BTN_HELP": "Help",
+    "REPORT_ISSUE": "Report an issue",
+    "NOT_YOUR_ACCOUNT_QUESTION" : "You do not own the account <b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b>?",
+    "BTN_CHANGE_ACCOUNT": "Disconnect this account",
+    "CONNECTION_ERROR": "Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or change node <a class=\"positive\" ng-click=\"doQuickFix('settings')\">in the settings</a>.",
+    "SHOW_ALL_FEED": "Show all",
+    "READ_MORE": "Read more",
+    "FEED_SOURCE": "Source"
+  },
+  "SETTINGS": {
+    "TITLE": "Settings",
+    "DISPLAY_DIVIDER": "Display",
+    "STORAGE_DIVIDER": "Storage",
+    "NETWORK_SETTINGS": "Network",
+    "PEER": "Duniter peer address",
+    "PEER_SHORT": "Peer address",
+    "PEER_CHANGED_TEMPORARY": "Address used temporarily",
+    "PERSIST_CACHE": "Keep navigation data (experimental)",
+    "PERSIST_CACHE_HELP": "Allows faster navigation, locally retaining the data received, for use from one session to another.",
+    "USE_LOCAL_STORAGE": "Enable local storage",
+    "USE_LOCAL_STORAGE_HELP": "Allows you to save your settings",
+    "WALLETS_SETTINGS": "My wallets",
+    "USE_WALLETS_ENCRYPTION": "Secure the list",
+    "USE_WALLETS_ENCRYPTION_HELP": "Enables you to encrypt the list of your wallets. Authentication required to access it.",
+    "ENABLE_HELPTIP": "Enable contextual help tips",
+    "DISABLE_HELPTIP": "Disable contextual help tips",
+    "ENABLE_UI_EFFECTS": "Enable visual effects",
+    "HISTORY_SETTINGS": "Account operations",
+    "DISPLAY_UD_HISTORY": "Display produced dividends?",
+    "TX_HISTORY_AUTO_REFRESH": "Enable automatic refresh?",
+    "TX_HISTORY_AUTO_REFRESH_HELP": "Updates the list of operations to each new block.",
+    "AUTHENTICATION_SETTINGS": "Authentication",
+    "KEEP_AUTH": "Expiration of authentication",
+    "KEEP_AUTH_SHORT": "Expiration",
+    "KEEP_AUTH_HELP": "Define when authentication is cleared from memory.",
+    "KEEP_AUTH_OPTION": {
+      "NEVER": "After each operation",
+      "SECONDS": "After {{value}}s of inactivity",
+      "MINUTE": "After {{value}}min of inactivity",
+      "MINUTES": "After {{value}}min of inactivity",
+      "HOUR": "After {{value}}h of inactivity",
+      "ALWAYS": "At the end of the session"
+    },
+    "KEYRING_FILE": "Keyring file",
+    "KEYRING_FILE_HELP": "Allow auto-connect at startup, or to authenticate (only if \"Expiration of authentication\" is \"at the end of the session\"",
+    "REMEMBER_ME": "Remember me ?",
+    "REMEMBER_ME_HELP": "Allows to remain identified from one session to another, keeping the public key locally.",
+    "PLUGINS_SETTINGS": "Extensions",
+    "BTN_RESET": "Restore default values",
+    "EXPERT_MODE": "Enable expert mode",
+    "EXPERT_MODE_HELP": "Allow to see more details",
+    "BLOCK_VALIDITY_WINDOW": "Block uncertainty time",
+    "BLOCK_VALIDITY_WINDOW_SHORT": "Time of uncertainty",
+    "BLOCK_VALIDITY_WINDOW_HELP": "Time to wait before considering an information is validated",
+    "BLOCK_VALIDITY_OPTION": {
+      "NONE": "No delay",
+      "N": "{{time | formatDuration}} ({{count}} blocks)"
+    },
+    "POPUP_PEER": {
+      "TITLE" : "Duniter peer",
+      "HOST" : "Address",
+      "HOST_HELP": "Address: server:port",
+      "USE_SSL" : "Secured?",
+      "USE_SSL_HELP" : "(SSL Encryption)",
+      "BTN_SHOW_LIST" : "Peer's list"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Hash: {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Block #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Current block",
+      "TITLE": "Block #{{number|formatInteger}}",
+      "COMPUTED_BY": "Computed by",
+      "SHOW_RAW": "Show raw data",
+      "TECHNICAL_DIVIDER": "Technical informations",
+      "VERSION": "Format version",
+      "HASH": "Computed hash",
+      "UNIVERSAL_DIVIDEND_HELP": "Money co-produced by each of the {{membersCount}} members",
+      "EMPTY": "Aucune donnée dans ce bloc",
+      "POW_MIN": "Minimal difficulty",
+      "POW_MIN_HELP": "Difficulty imposed in calculating hash",
+      "DATA_DIVIDER": "Data",
+      "IDENTITIES_COUNT": "New identities",
+      "JOINERS_COUNT": "Joiners",
+      "ACTIVES_COUNT": "Renewals",
+      "ACTIVES_COUNT_HELP": "Members having renewed their membership",
+      "LEAVERS_COUNT": "Leavers",
+      "LEAVERS_COUNT_HELP": "Members that now refused certification",
+      "EXCLUDED_COUNT": "Excluded members",
+      "EXCLUDED_COUNT_HELP": "Old members, excluded because missing membreship renewal or certifications",
+      "REVOKED_COUNT": "Revoked identities",
+      "REVOKED_COUNT_HELP": "These accounts may no longer be member",
+      "TX_COUNT": "Transactions",
+      "CERT_COUNT": "Certifications",
+      "TX_TO_HIMSELF": "Change",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Unlock conditions",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "and",
+        "OR": "or"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>Sign</b> of the public key",
+        "XHX": "<b>Password</b>, including SHA256 =",
+        "CSV": "Blocked during",
+        "CLTV": "Bloqué until"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Blocks",
+      "NO_BLOCK": "No bloc",
+      "LAST_BLOCKS": "Last blocks:",
+      "BTN_COMPACT": "Compact"
+    }
+  },
+  "CURRENCY": {
+    "VIEW": {
+      "TITLE": "Currency",
+      "TAB_CURRENCY": "Currency",
+      "TAB_WOT": "Web of trust",
+      "TAB_NETWORK": "Network",
+      "TAB_BLOCKS": "Blocks",
+      "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.",
+      "NETWORK_RULES_DIVIDER": "Network rules",
+      "CURRENCY_NAME": "Currency name",
+      "MEMBERS": "Members count",
+      "MEMBERS_VARIATION": "Variation since {{duration|formatDuration}} (since last UD)",
+      "MONEY_DIVIDER": "Money",
+      "MASS": "Monetary mass",
+      "SHARE": "Money share",
+      "UD": "Universal Dividend",
+      "C_ACTUAL": "Current growth",
+      "MEDIAN_TIME": "Current blockchain time",
+      "POW_MIN": "Common difficulty",
+      "MONEY_RULES_DIVIDER": "Rules of currency",
+      "C_RULE": "Theoretical growth target",
+      "UD_RULE": "Universal dividend (formula)",
+      "DT_REEVAL": "Period between two re-evaluation of the UD",
+      "REEVAL_SYMBOL": "reeval",
+      "DT_REEVAL_VALUE": "Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+      "UD_REEVAL_TIME0": "Date of first reevaluation of the UD",
+      "SIG_QTY_RULE": "Required number of certifications to become a member",
+      "SIG_STOCK": "Maximum number of certifications sent by a member",
+      "SIG_PERIOD": "Minimum delay between 2 certifications sent by one and the same issuer.",
+      "SIG_WINDOW": "Maximum delay before a certification will be treated",
+      "SIG_VALIDITY": "Lifetime of a certification that has been treated",
+      "MS_WINDOW": "Maximum delay before a pending membership will be treated",
+      "MS_VALIDITY": "Lifetime of a membership that has been treated",
+      "STEP_MAX": "Maximum distance between a newcomer and each referring members.",
+      "WOT_RULES_DIVIDER": "Rules for web of trust",
+      "SENTRIES": "Required number of certifications (given <b>and</b> received) to become a referring member",
+      "SENTRIES_FORMULA": "Required number of certifications to become a referring member (formula)",
+      "XPERCENT":"Minimum percent of referring member to reach to match the distance rule",
+      "AVG_GEN_TIME": "The average time between 2 blocks",
+      "CURRENT": "current",
+      "MATH_CEILING": "CEILING",
+      "DISPLAY_ALL_RULES": "Display all rules?",
+      "BTN_SHOW_LICENSE": "Show license",
+      "WOT_DIVIDER": "Web of trust"
+    },
+    "LICENSE": {
+      "TITLE": "Currency license",
+      "BTN_DOWNLOAD": "Download file",
+      "NO_LICENSE_FILE": "License file not found."
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Blockchain time",
+      "LOADING_PEERS": "Loading peers...",
+      "NODE_ADDRESS": "Address:",
+      "SOFTWARE": "Software:",
+      "WARN_PRE_RELEASE": "Pre-release (latest stable: <b>{{version}}</b>)",
+      "WARN_NEW_RELEASE": "Version <b>{{version}}</b> available",
+      "WS2PID": "Identifier:",
+      "PRIVATE_ACCESS": "Private access",
+      "POW_PREFIX": "Proof of work prefix:",
+      "ENDPOINTS": {
+        "BMAS": "Secure endpoint (SSL)",
+        "BMATOR": "TOR endpoint",
+        "WS2P": "WS2P endpoint",
+        "ES_USER_API": "Cesium+ data node"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "Non-SSL nodes have a degraded display because Cesium works in HTTPS mode."
+    }
+  },
+  "PEER": {
+    "PEERS": "Peers",
+    "SIGNED_ON_BLOCK": "Signed on block",
+    "MIRROR": "mirror",
+    "MIRRORS": "Mirrors",
+    "MIRROR_PEERS": "Mirror peers",
+    "PEER_LIST" : "Peer's list",
+    "MEMBERS" : "Members",
+    "MEMBER_PEERS" : "Member peers",
+    "ALL_PEERS" : "All peers",
+    "DIFFICULTY" : "Difficulty",
+    "API" : "API",
+    "CURRENT_BLOCK" : "Block #",
+    "POPOVER_FILTER_TITLE": "Filter",
+    "OFFLINE": "Offline",
+    "OFFLINE_PEERS": "Offline peers",
+    "BTN_SHOW_PEER": "Show peer",
+    "VIEW": {
+      "TITLE": "Peer",
+      "OWNER": "Owned by ",
+      "SHOW_RAW_PEERING": "See peering document",
+      "SHOW_RAW_CURRENT_BLOCK": "See current block (raw format)",
+      "LAST_BLOCKS": "Last blocks",
+      "KNOWN_PEERS": "Known peers :",
+      "GENERAL_DIVIDER": "General information",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "Could not get peer data, using the TOR network.",
+        "LOADING_NODE_ERROR": "Could not get peer data"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Search (member or public key)",
+    "SEARCH_INIT_PHASE_WARNING": "During the pre-registration phase, the search for pending registrations <b>may be long</b>. Please wait ...",
+    "REGISTERED_SINCE": "Registered on",
+    "REGISTERED_SINCE_BLOCK": "Registered since block #",
+    "NO_CERTIFICATION": "No validated certification",
+    "NO_GIVEN_CERTIFICATION": "No given certification",
+    "NOT_MEMBER_PARENTHESIS": "(non-member)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(identity revoked)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(being revoked)",
+    "EXPIRE_IN": "Expires",
+    "NOT_WRITTEN_EXPIRE_IN": "Deadline<br/>treatment",
+    "EXPIRED": "Expired",
+    "PSEUDO": "Pseudonym",
+    "SIGNED_ON_BLOCK": "Emitted on block #{{block}}",
+    "WRITTEN_ON_BLOCK": "Written on block #{{block}}",
+    "GENERAL_DIVIDER": "General information",
+    "NOT_MEMBER_ACCOUNT": "Non-member account",
+    "NOT_MEMBER_ACCOUNT_HELP": "This is a simple wallet, with no pending membership application.",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "BTN_CERTIFY": "Certify",
+    "BTN_YES_CERTIFY": "Yes, certify",
+    "BTN_SELECT_AND_CERTIFY": "New certification",
+    "ACCOUNT_OPERATIONS": "Account operations",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identity {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Registry",
+      "NEWCOMERS": "New members:",
+      "NEWCOMERS_COUNT": "{{count}} members",
+      "PENDING": "Pending registrations:",
+      "PENDING_COUNT": "{{count}} pending registrations",
+      "REGISTERED": "Registered {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Member since {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Latest members",
+      "BTN_PENDING": "Pending registrations",
+      "SHOW_MORE": "Show more",
+      "SHOW_MORE_COUNT": "(current limit to {{limit}})",
+      "NO_PENDING": "No pending registrations.",
+      "NO_NEWCOMERS": "No members."
+    },
+    "CONTACTS": {
+      "TITLE": "Contacts"
+    },
+    "MODAL": {
+      "TITLE": "Search"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications",
+      "SUMMARY": "Received certifications",
+      "LIST": "Details of received certifications",
+      "PENDING_LIST": "Pending certifications",
+      "RECEIVED": "Received certifications",
+      "RECEIVED_BY": "Certifications received by {{uid}}",
+      "ERROR": "Received certifications in error",
+      "SENTRY_MEMBER": "Referring member"
+    },
+    "OPERATIONS": {
+      "TITLE": "{{uid}} - Operations"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications sent",
+      "SUMMARY": "Sent certifications",
+      "LIST": "Details of sent certifications",
+      "PENDING_LIST": "Pending certifications",
+      "SENT": "Sent certifications",
+      "SENT_BY": "Certifications sent by {{uid}}",
+      "ERROR": "Sent certifications with error"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-log-in\"></i> Login",
+    "SCRYPT_FORM_HELP": "Please enter your credentials. <br> Remember to check the public key for your account.",
+    "PUBKEY_FORM_HELP": "Please enter a public account key:",
+    "FILE_FORM_HELP": "Choose the keychain file to use:",
+    "SCAN_FORM_HELP": "Scan the QR code of a wallet.",
+    "SALT": "Secret identifier",
+    "SALT_HELP": "Secret identifier",
+    "SHOW_SALT": "Display secret identifier?",
+    "PASSWORD": "Password",
+    "PASSWORD_HELP": "Password",
+    "PUBKEY_HELP": "Public key or pseudonym",
+    "NO_ACCOUNT_QUESTION": "Don't have an account yet?",
+    "HAVE_ACCOUNT_QUESTION": "Already have an account ?",
+    "CREATE_ACCOUNT": "Create an account",
+    "CREATE_FREE_ACCOUNT": "Create a free account",
+    "FORGOTTEN_ID": "Forgot password?",
+    "ASSOCIATED_PUBKEY": "Public key :",
+    "BTN_METHODS": "Other methods",
+    "BTN_METHODS_DOTS": "Change method...",
+    "METHOD_POPOVER_TITLE": "Methods",
+    "MEMORIZE_AUTH_FILE": "Memorize this keychain during the navigation session",
+    "SCRYPT_PARAMETERS": "Paramètres (Scrypt) :",
+    "AUTO_LOGOUT": {
+      "TITLE": "Information",
+      "MESSAGE": "<i class=\"ion-android-time\"></i> You were <b>logout</ b> automatically, due to prolonged inactivity.",
+      "BTN_RELOGIN": "Sign In",
+      "IDLE_WARNING": "You will be logout... {{countdown}}"
+    },
+    "METHOD": {
+      "SCRYPT_DEFAULT": "Secret identifier and password",
+      "SCRYPT_ADVANCED": "Advanced salt",
+      "FILE": "Keychain file",
+      "PUBKEY": "Public key or pseudonym",
+      "SCAN": "Scan a QR code"
+    },
+    "SCRYPT": {
+      "SIMPLE": "Light salt",
+      "DEFAULT": "Standard salt",
+      "SECURE": "Secure salt",
+      "HARDEST": "Hardest salt",
+      "EXTREME": "Extreme salt",
+      "USER": "Personal value",
+      "N": "N (Loop):",
+      "r": "r (RAM):",
+      "p": "p (CPU):"
+    },
+    "FILE": {
+      "HELP": "Expected file format: <b>.dunikey</b> (type PubSec). Other formats are under development (EWIF, WIF)."
+    }
+  },
+  "AUTH": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> Authentication",
+    "BTN_AUTH": "Authenticate",
+    "GENERAL_HELP": "Please authenticate yourself:",
+    "EXPECTED_UID_HELP": "Please authenticate to the account <i class=\"ion-person\"></i> {{uid}}:",
+    "EXPECTED_PUBKEY_HELP": "Please authenticate to the wallet <i class=\"ion-key\"></i> {{pubkey|formatPubkey}}:",
+    "SCAN_FORM_HELP": "Scan the QR code of the <b>private key</b> of the wallet."
+  },
+  "ACCOUNT": {
+    "TITLE": "My Account",
+    "BALANCE": "Balance",
+    "LAST_TX": "Latest validated transactions",
+    "BALANCE_ACCOUNT": "Account balance",
+    "NO_TX": "No transaction",
+    "SHOW_MORE_TX": "Show more",
+    "SHOW_ALL_TX": "Show all",
+    "TX_FROM_DATE": "(current limit to {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Pending transactions",
+    "VALIDATING_TX": "Transactions being validated",
+    "ERROR_TX": "Transaction not executed",
+    "ERROR_TX_SENT": "Sent transactions",
+    "PENDING_TX_RECEIVED": "Transactions awaiting receipt",
+    "EVENTS": "Events",
+    "OUT_DISTANCED": "Your current certifications come from a group too isolated from the <a ng-click=\"showHelpModal('wot')\"> Web of Trust</a> (WoT): the <a ng-click=\"showHelpModal('distance_rule')\">maximum distance rule</a> is violated.<br/>You must obtain certifications from another area of the Web of Trust, or wait for it to tighten.",
+    "WAITING_MEMBERSHIP": "Membership application sent. Waiting validation.",
+    "WAITING_CERTIFICATIONS": "You need {{needCertificationCount}} certification(s) to become a member and produce the <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a>. Your account is however already operational, to receive and send payments.",
+    "WAITING_CERTIFICATIONS_HELP": "To get your certifications, only request members <b>who know you enough</b>, as required by <a ng-click=\"showLicenseModal()\">the currency license</a> that you have accepted.<br/>If you do not know enough members, let them know on <a ng-click=\"openLink($event, $root.settings.userForumUrl)\">the user forum</a>.",
+    "WILL_MISSING_CERTIFICATIONS": "You will <b>lack certifications</b> soon (at least {{willNeedCertificationCount}} more are needed)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Your membership <b>will expire {{membershipExpiresIn|formatDurationTo}}</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a> before then.",
+    "NEED_RENEW_MEMBERSHIP": "You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",
+    "NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED": "You are no longer a member because your membership <b>has been cancelled</b> for lack of certifications. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",
+    "NO_WAITING_MEMBERSHIP": "No membership application pending. If you'd like to <b>become a member</ b>, please <a ng-click=\"doQuickFix('membership')\">send the membership application</a>.",
+    "CERTIFICATION_COUNT": "Received certifications",
+    "CERTIFICATION_COUNT_SHORT": "Certifications",
+    "SIG_STOCK": "Stock of certifications to give",
+    "BTN_RECEIVE_MONEY": "Receive",
+    "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Switch to another identity...",
+    "BTN_FIX_MEMBERSHIP": "Resubmit membership request...",
+    "BTN_MEMBERSHIP_RENEW": "Renew membership",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Renew membership...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Revoke membership...",
+    "BTN_SECURITY_DOTS": "Sign-in and security...",
+    "BTN_SHOW_DETAILS": "Display technical data",
+    "LOCKED_OUTPUTS_POPOVER": {
+      "TITLE": "Locked amount",
+      "DESCRIPTION": "Here are the conditions for unlocking this amount:",
+      "DESCRIPTION_MANY": "This transaction consists of several parts, of which the unlock conditions are:",
+      "LOCKED_AMOUNT": "Conditions for the amount:"
+    },
+    "NEW": {
+      "TITLE": "Registration",
+      "INTRO_WARNING_TIME": "Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).",
+      "INTRO_WARNING_SECURITY": "Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.",
+      "INTRO_WARNING_SECURITY_HELP": "Up-to-date anti-virus, firewall enabled, session protected by password or pin code...",
+      "INTRO_HELP": "Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.",
+      "REGISTRATION_NODE": "Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.",
+      "REGISTRATION_NODE_HELP": "If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.",
+      "SELECT_ACCOUNT_TYPE": "Choose the type of account to create:",
+      "MEMBER_ACCOUNT": "Member account",
+      "MEMBER_ACCOUNT_TITLE": "Create a member account",
+      "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).",
+      "WALLET_ACCOUNT": "Simple wallet",
+      "WALLET_ACCOUNT_TITLE": "Create a wallet",
+      "WALLET_ACCOUNT_HELP": "If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.",
+      "SALT_WARNING": "Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!",
+      "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!",
+      "PSEUDO_WARNING": "Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>",
+      "PSEUDO": "Pseudonym",
+      "PSEUDO_HELP": "joe123",
+      "SALT_CONFIRM": "Confirm",
+      "SALT_CONFIRM_HELP": "Confirm the secret identifier",
+      "PASSWORD_CONFIRM": "Confirm",
+      "PASSWORD_CONFIRM_HELP": "Confirm the password",
+      "SLIDE_6_TITLE": "Confirmation:",
+      "COMPUTING_PUBKEY": "Computing...",
+      "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?",
+      "CHECKING_PSEUDO": "Checking...",
+      "PSEUDO_AVAILABLE": "This pseudonym is available",
+      "PSEUDO_NOT_AVAILABLE": "This pseudonym is not available",
+      "INFO_LICENSE": "To be able to adhere to the currency, we ask you to kindly read and accept this license.",
+      "BTN_ACCEPT": "I accept",
+      "BTN_ACCEPT_LICENSE": "I accept the license"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Enter a pseudonym",
+      "HELP": "A pseudonym is needed to let other members find you."
+    },
+    "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Identity selection",
+      "HELP": "Several <b>different identities</b> have been sent, for the public key <span class=\"gray\"> <i class=\"ion-key\"></i> {{pubkey | formatPubkey}}</span>.<br/>Please select the identity to use:"
+    },
+    "SELECT_WALLET_MODAL": {
+      "TITLE": "Wallet selection"
+    },
+    "WALLET_LIST": {
+      "TITLE": "My wallets",
+      "BTN_NEW": "Add a wallet",
+      "BTN_DOWNLOAD": "Download the list",
+      "BTN_IMPORT_FILE_DOTS": "Import from a file...",
+      "NO_WALLET": "No secondary wallet",
+      "BTN_DELETE": "Remove a secondary wallet...",
+      "BTN_RENAME": "Rename the wallet",
+      "EXPORT_FILENAME": "my_wallets-{{pubkey|formatPubkey}}-{{currency}}.csv",
+      "TOTAL_DOTS": "Total: ",
+      "EDIT_POPOVER": {
+        "TITLE": "Rename the wallet",
+        "HELP": "Fill in the new name",
+        "NAME_HELP": "Wallet name"
+      },
+      "IMPORT_MODAL": {
+        "TITLE": "Import secondary wallets",
+        "HELP": "To <b>import secodnary wallets</b>, please drag the file in the box below, or click in the box to search for a file.",
+        "WALLET_COUNT": "<b>{{count}}</b> new wallet{{count > 1 ? 's' : ''}}",
+        "NO_NEW_WALLET": "No new wallet"
+      }
+    },
+    "SECURITY":{
+      "ADD_QUESTION" : "Add custom question",
+      "BTN_CLEAN" : "Clean",
+      "BTN_RESET" : "Reset",
+      "DOWNLOAD_REVOKE": "Save a revocation file",
+      "DOWNLOAD_REVOKE_HELP" : "Having a revocation file is important, for example in case of loss of identifiers. It allows you to <b>get this account out of the Web Of Trust</b>, thus becoming a simple wallet.",
+      "GENERATE_KEYFILE": "Generate my keychain file ...",
+      "GENERATE_KEYFILE_HELP": "Generate a file allowing you to authenticate without entering your identifiers.<br/><b>Warning:</b> this file will contain your secret key; It is therefore very important to put it in a safe place!",
+      "KEYFILE_FILENAME": "keychain-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",
+      "MEMBERSHIP_IN": "Register as member...",
+      "MEMBERSHIP_IN_HELP": "Allows you to <b>transform </b> a simple wallet account <b>into a member account</b>, by sending a membership request. Useful only if you do not already have another member account.",
+      "SEND_IDENTITY": "Publish identity...",
+      "SEND_IDENTITY_HELP": "Allows you to associate a pseudonym to this account, but <b>without applying for membership</b> to become a member. This is not very useful because the validity of this pseudonym association is limited in time.",
+      "HELP_LEVEL": "Choose <strong> at least {{nb}} questions </strong> :",
+      "LEVEL": "Security level",
+      "LOW_LEVEL": "Low <span class=\"hidden-xs\">(2 questions minimum)</span>",
+      "MEDIUM_LEVEL": "Medium <span class=\"hidden-xs\">(4 questions minimum)</span>",
+      "QUESTION_1": "What was your best friend's name when you were a teen ?",
+      "QUESTION_2": "What was the name of your first pet ?",
+      "QUESTION_3": "What is the first meal you have learned to cook ?",
+      "QUESTION_4": "What is the first movie you saw in the cinema?",
+      "QUESTION_5": "Where did you go the first time you flew ?",
+      "QUESTION_6": "What was your favorite elementary school teacher's name  ?",
+      "QUESTION_7": "What would you consider the ideal job ?",
+      "QUESTION_8": "Which children's book do you prefer?",
+      "QUESTION_9": "What was the model of your first vehicle?",
+      "QUESTION_10": "What was your nickname when you were a child ?",
+      "QUESTION_11": "What was your favorite movie character or actor when you were a student ?",
+      "QUESTION_12": "What was your favorite singer or band when you were a student ?",
+      "QUESTION_13": "In which city did your parents meet ?",
+      "QUESTION_14": "What was the name of your first boss ?",
+      "QUESTION_15": "What is the name of the street where you grew up ?",
+      "QUESTION_16": "What is the name of the first beach where you go swim ?",
+      "QUESTION_17": "QWhat is the first album you bought ?",
+      "QUESTION_18": "What is the name of your favorite sport team ?",
+      "QUESTION_19": "What was your grand-father's job ?",
+      "RECOVER_ID": "Recover my password...",
+      "RECOVER_ID_HELP": "If you have a <b>backup file of your identifiers</b>, you can find them by answering your personal questions correctly.",
+      "RECOVER_ID_SELECT_FILE": "Select the <b>backup file of your identifiers</b> to use:",
+      "REVOCATION_WITH_FILE" : "Revoke my member account...",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "If you have <b>permanently lost your member account credentials (or if account security is compromised), you can use <b>the revocation file</b> of the account <b>to quit the Web Of Trust</b>.",
+      "REVOCATION_WITH_FILE_HELP": "To <b>permanently revoke</ b> a member account, please drag the revocation file in the box below, or click in the box to search for a file.",
+      "REVOCATION_WALLET": "Revoke this account immediately",
+      "REVOCATION_WALLET_HELP": "Requesting revocation of your identity causes <b>will revoke your membership</ b> (definitely for the associated pseudonym and public key). The account will no longer be able to produce a Universal Dividend.<br/>However, you can still use it as a simple wallet.",
+      "REVOCATION_FILENAME": "revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+      "SAVE_ID": "Save my credentials...",
+      "SAVE_ID_HELP": "Creating a backup file, to <b>retrieve your password</b> (and the secret identifier) <b> in case of forgetting</b>. The file is <b>secured</ b> (encrypted) using personal questions.",
+      "STRONG_LEVEL": "Strong <span class=\"hidden-xs \">(6 questions minimum)</span>",
+      "TITLE": "Account and security",
+      "KEYFILE": {
+        "PUBSEC_FORMAT": "PubSec format.",
+        "PUBSEC_FORMAT_HELP": "This file format is compatible in particular with Cesium and Gannonce. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",
+        "WIF_FORMAT": "Wallet Import Format (WIF)",
+        "WIF_FORMAT_HELP": "This format is used in particular by paper wallets. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",
+        "EWIF_FORMAT": "Encrypted Wallet Import Format (WIF)",
+        "EWIF_FORMAT_HELP": "This format is used in particular by paper wallets. However, <b>the keychain is encrypted</b> from a passphrase of your choice.",
+        "PASSWORD_POPUP": {
+          "TITLE": "Keychain file encrypted",
+          "HELP": "Please enter the passphrase:",
+          "PASSWORD_HELP": "Passphrase"
+        },
+        "ERROR": {
+          "BAD_PASSWORD": "Bad passphrase",
+          "BAD_CHECKSUM": "Bad checksum"
+        }
+      }
+    },
+    "FILE_NAME": "{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Date",
+      "AMOUNT": "Amount",
+      "COMMENT": "Comment"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Transfer",
+    "SUB_TITLE": "Transfer money",
+    "SUB_TITLE_ALL": "Empty the account",
+    "FROM": "From",
+    "TO": "To",
+    "AMOUNT": "Amount",
+    "AMOUNT_HELP": "Amount",
+    "COMMENT": "Comment",
+    "COMMENT_HELP": "Comment (optional)",
+    "BTN_SEND": "Send",
+    "BTN_ADD_COMMENT": "Add a comment",
+    "REST": "Rest of account",
+    "REST_TO": "to",
+    "WARN_COMMENT_IS_PUBLIC": "Please note that <b>comments are public</b> (not encrypted).",
+    "MODAL": {
+      "TITLE": "Transfer"
+    }
+  },
+  "ERROR": {
+    "UNKNOWN_URI_FORMAT": "Unknown URI format",
+    "PUBKEY_INVALID_CHECKSUM": "Invalid public key (bad checksum).",
+    "POPUP_TITLE": "Error",
+    "UNKNOWN_ERROR": "Unknown error",
+    "CRYPTO_UNKNOWN_ERROR": "Your browser is not compatible with cryptographic features.",
+    "DOWNLOAD_KEYFILE_FAILED": "Failed to generate the keychain file.",
+    "EQUALS_TO_PSEUDO": "Must be different from pseudonym",
+    "EQUALS_TO_SALT": "Must be different from secret identifier",
+    "FIELD_REQUIRED": "This field is required.",
+    "FIELD_TOO_SHORT": "This field value is too short.",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "Value is too short (min {{minLength]] characters).",
+    "FIELD_TOO_LONG": "Value is exceeding max length.",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Value is too long (max {{maxLength}} characters).",
+    "FIELD_MIN": "Minimum value: {{min}}",
+    "FIELD_MAX": "Maximal value: {{max}}",
+    "FIELD_ACCENT": "Commas and accent characters not allowed",
+    "FIELD_NOT_NUMBER": "Value is not a number",
+    "FIELD_NOT_INT": "Value is not an integer",
+    "FIELD_NOT_EMAIL": "Email adress not valid",
+    "PASSWORD_NOT_CONFIRMED": "Must match previous password.",
+    "SALT_NOT_CONFIRMED": "Must match previous identifier.",
+    "SEND_IDENTITY_FAILED": "Error while trying to register.",
+    "SEND_CERTIFICATION_FAILED": "Could not certify identity.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "You could not send certification, because your account is <b>not a member account</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "This account could not be certified. No registration found, or need to renew.",
+    "LOGIN_FAILED": "Error while sign in.",
+    "LOAD_IDENTITY_FAILED": "Could not load identity.",
+    "LOAD_REQUIREMENTS_FAILED": "Could not load identity requirements.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Error while sending registration as member.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Error while sending membership revocation.",
+    "REFRESH_WALLET_DATA": "Could not refresh wallet.",
+    "GET_CURRENCY_PARAMETER": "Could not get currency parameters.",
+    "GET_CURRENCY_FAILED": "Could not load currency. Please retry later.",
+    "SEND_TX_FAILED": "Could not send transaction.",
+    "ALL_SOURCES_USED": "Please wait the next block computation (All transaction sources has been used).",
+    "NOT_ENOUGH_SOURCES": "Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Error while creating your member account.",
+    "RESTORE_WALLET_DATA_ERROR": "Error while reloading settings from local storage",
+    "LOAD_WALLET_DATA_ERROR": "Error while loading wallet data.",
+    "COPY_CLIPBOARD_FAILED": "Could not copy to clipboard",
+    "TAKE_PICTURE_FAILED": "Could not get picture.",
+    "SCAN_FAILED": "Could not scan QR code.",
+    "SCAN_UNKNOWN_FORMAT": "Code not recognized.",
+    "WOT_LOOKUP_FAILED": "Search failed.",
+    "LOAD_PEER_DATA_FAILED": "Duniter peer not accessible. Please retry later.",
+    "NEED_LOGIN_FIRST": "Please sign in first.",
+    "AMOUNT_REQUIRED": "Amount is required.",
+    "AMOUNT_NEGATIVE": "Negative amount not allowed.",
+    "NOT_ENOUGH_CREDIT": "Not enough credit.",
+    "INVALID_NODE_SUMMARY": "Unreachable peer or invalid address",
+    "INVALID_USER_ID": "Field 'pseudonym' must not contains spaces or special characters.",
+    "INVALID_COMMENT": "Field 'reference' has a bad format.",
+    "INVALID_PUBKEY": "Public key has a bad format.",
+    "INVALID_PUBKEY_CHECKSUM": "Invalid checksum.",
+    "IDENTITY_REVOKED": "This identity <b>has been revoked</b>. It can no longer become a member.",
+    "IDENTITY_REVOKED_WITH_TIME": "This identity <b>has been revoked {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). It can no longer become a member.",
+    "IDENTITY_PENDING_REVOCATION": "The <b>revocation of this identity</b> has been requested and is awaiting processing. Certification is therefore disabled.",
+    "IDENTITY_INVALID_BLOCK_HASH": "This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",
+    "IDENTITY_EXPIRED": "This identity has expired: this person must re-apply <b>before</b> being certified.",
+    "IDENTITY_SANDBOX_FULL": "Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",
+    "IDENTITY_NOT_FOUND": "Identity not found",
+    "IDENTITY_TX_FAILED": "Error while getting identity's transactions",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Membership not valid.",
+    "WALLET_INVALID_BLOCK_HASH": "Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",
+    "WALLET_IDENTITY_EXPIRED": "The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",
+    "WALLET_REVOKED": "Your identity has been <b>revoked</b>: neither your pseudonym nor your public key will be used in the future for a member account.",
+    "WALLET_HAS_NO_SELF": "Your identity must first have been published, and not expired.",
+    "AUTH_REQUIRED": "Authentication required.",
+    "AUTH_INVALID_PUBKEY": "The public key does not match the connected account.",
+    "AUTH_INVALID_SCRYPT": "Invalid username or password.",
+    "AUTH_INVALID_FILE": "Invalid keychain file.",
+    "AUTH_FILE_ERROR": "Failed to open keychain file",
+    "IDENTITY_ALREADY_CERTIFY": "You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Unable to certify",
+    "LOAD_NEWCOMERS_FAILED": "Unable to load new members.",
+    "LOAD_PENDING_FAILED": "Unable to load pending registrations.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.",
+    "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member (or old member)</b> in order to perform this action.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.",
+    "GET_BLOCK_FAILED": "Error while getting block",
+    "INVALID_BLOCK_HASH": "Block not found (incorrect hash)",
+    "DOWNLOAD_REVOCATION_FAILED": "Error while downloading revocation file.",
+    "REVOCATION_FAILED": "Error while trying to revoke the identity.",
+    "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong secret identifier or password ",
+    "RECOVER_ID_FAILED": "Could not recover password",
+    "LOAD_FILE_FAILED" : "Unable to load file",
+    "NOT_VALID_REVOCATION_FILE": "Invalid revocation file (wrong file format)",
+    "NOT_VALID_SAVE_ID_FILE": "Invalid credentials backup file (wrong file format)",
+    "NOT_VALID_KEY_FILE": "Invalid keychain file (unrecognized format)",
+    "EXISTING_ACCOUNT": "Your identifiers correspond to an already existing account, whose <a ng-click=\"showHelpModal('pubkey')\">public key</a> is:",
+    "EXISTING_ACCOUNT_REQUEST": "Please modify your credentials so that they correspond to an unused account.",
+    "GET_LICENSE_FILE_FAILED": "Unable to get license file",
+    "CHECK_NETWORK_CONNECTION": "No peer appears to be accessible.<br/><br/>Please <b>check your Internet connection</b>.",
+    "ISSUE_524_TX_FAILED": "Failed to transfer.<br/><br/>A message has been sent to developers to help solve the problem.<b>Thank you for your help</b>.",
+    "ADD_SECONDARY_WALLET_FAILED": "Unable to add secondary wallet.",
+    "UPDATE_WALLET_LIST_FAILED": "Unable to refresh the list of wallets.",
+    "LOAD_WALLET_LIST_FAILED": "Unable to load the list of wallets.",
+    "SAVE_WALLET_LIST_FAILED": "Unable to save the list of wallets.",
+    "COULD_NOT_ADD_MAIN_WALLET": "This wallet <b>is the main account</b> with which you are connected. Unable to add it as a secondary wallet.",
+    "COULD_NOT_ADD_EXISTING_WALLET": "Wallet already existing in the list.",
+    "UNKNOWN_WALLET_ID": "Unknown secondary wallet.",
+    "RESTORE_WALLET_LIST_FAILED": "Unable to restore the list of wallets.",
+    "INVALID_FILE_FORMAT": "Invalid file format.",
+    "SAME_TX_RECIPIENT": "The recipient must be different from the issuer."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Information",
+    "CERTIFICATION_DONE": "Identity successfully signed",
+    "NOT_ENOUGH_CREDIT": "Not enough credit",
+    "TRANSFER_SENT": "Transfer request successfully sent",
+    "COPY_TO_CLIPBOARD_DONE": "Copy succeeded",
+    "MEMBERSHIP_OUT_SENT": "Membership revocation sent",
+    "NOT_NEED_MEMBERSHIP": "Already a member.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "This identity will soon lack certification (at least {{willNeedCertificationCount}}).",
+    "IDENTITY_NEED_MEMBERSHIP": "This identity did not send a membership request. She will have to if she wishes to become a member.",
+    "HAS_ALTERNATIVE_IDENTITIES": "There are <b>multiple identities</b> attached to this public key. <b>Before any certification</b>, please <a ng-click=\"doQuickFix('showSelectIdentities')\">check other identities</a> to choose the correct one, or contact the wallet owner.",
+    "REVOCATION_SENT": "Revocation sent successfully",
+    "REVOCATION_SENT_WAITING_PROCESS": "Revocation <b>has been sent successfully</b>. It is awaiting processing.",
+    "FEATURES_NOT_IMPLEMENTED": "This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)",
+    "EMPTY_TX_HISTORY": "No operations to export"
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Confirmation</b>",
+    "POPUP_WARNING_TITLE": "<b>Warning</b>",
+    "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Security warning</b>",
+    "CERTIFY_RULES_TITLE_UID": "Certify {{uid}}",
+    "CERTIFY_RULES": "<b class=\"assertive\">Don't certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?",
+    "FULLSCREEN": "View the application in full screen?",
+    "EXIT_APP": "Close the application ?",
+    "TRANSFER": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",
+    "TRANSFER_ALL": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",
+    "MEMBERSHIP_OUT": "This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",
+    "MEMBERSHIP_OUT_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>terminate your membership</b>?",
+    "LOGIN_UNUSED_WALLET_TITLE": "Typing error?",
+    "LOGIN_UNUSED_WALLET": "The account seems to be <b>inactive</b>.<br/><br/>It's probably a <b>typing error</b> when sign in. Please try again, checking that <b>public key is yours<b/>.",
+    "FIX_IDENTITY": "The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?",
+    "FIX_MEMBERSHIP": "Your application for membership will be sent.<br/></br/><b>Are you sure?</b>",
+    "MEMBERSHIP": "Your membership request will be sent. <br/></br/><b>Are you sure?</b>",
+    "RENEW_MEMBERSHIP": "Your membership will be renewed.<br/></br/><b>Are you sure?</b>",
+    "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?",
+    "REVOKE_IDENTITY_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?",
+    "SAVE_BEFORE_LEAVE": "Do you want to <b>save your changes</b> before leaving the page?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Changes not saved",
+    "LOGOUT": "Are you sure you want to logout?",
+    "USE_FALLBACK_NODE": "Peer <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the <b>{{new}}</b> node?",
+    "ISSUE_524_SEND_LOG": "The transaction was rejected because of a known problem (issue #524) but not reproduced.<br/><br/>To help developers correct this error, do you accept <b>the transmission of your logs</b> per message?<br/><small>(No confidential data is sent)</small>"
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Revocation file</b>",
+    "POPUP_REVOKE_MESSAGE": "To safeguard your account, please download the <b>account revocation document</b>. It will allow you to cancel your account (in case of account theft, ID, an incorrectly created account, etc.).<br/><br/><b>Please store it in a safe place.</b>"
+  },
+  "HELP": {
+    "TITLE": "Online help",
+    "JOIN": {
+      "SECTION": "Join",
+      "SALT": "The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.",
+      "PASSWORD": "The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",
+      "PSEUDO": "A pseudonym is used only when joining as <span class=\"text-italic\">member</span>. It is always associated with a wallet (by its <span class=\"text-italic\">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past)."
+    },
+    "LOGIN": {
+      "SECTION": "Log in",
+      "PUBKEY": "Account public key",
+      "PUBKEY_DEF": "The public key of the keychain is generated from the entered identifiers (any), but does not correspond to an account already used.<br/><b>Make sure your public key is the same as your account</b>. Otherwise, you will be logged into an account that is probably never used, as the risk of collision with an existing account is very small.<br/><a href=\"https://en.wikipedia.org/wiki/Elliptic_curve_cryptography\" target=\"_ system\">Learn more about cryptography</a> by public key.",
+      "METHOD": "Connection methods",
+      "METHOD_DEF": "Several options are available to connect to a portfolios: <br/> - The connection <b>with salt (simple or advanced)</b> mixes your password with the secret identifier, to limit the attempts of piracy<br/> - The connection <b>using public key</b> prevents you from entering your credentials, which you will be asked only when an operation need it.<br/> - The connection <b>using keychain file</b> will read the public and private keys of the account from a file without the need to enter credentials. Several file formats are possible."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glossary",
+      "PUBKEY_DEF": "A public key always identifies a wallet. It may identify a member. In Cesium it is calculated using the secret identifier and the password.",
+      "MEMBER": "Member",
+      "MEMBER_DEF": "A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class=\"text-italic\">currency parameters</span>.",
+      "CURRENCY_RULES": "Currency rules",
+      "CURRENCY_RULES_DEF": "The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class=\"text-italic\">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href=\"#/app/currency\">See current parameters</a>.",
+      "BLOCKCHAIN": "Blockchain",
+      "BLOCKCHAIN_DEF": "The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class=\"text-italic\">currency rules</span>.<br/><a href=\"http://en.duniter.org/presentation/\" target=\"_blank\">Read more about Duniter</a> and the working of its blockchain.",
+      "UNIVERSAL_DIVIDEND_DEF": "The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class=\"text-italic\">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">Read more about RTM</a> and open money.",
+      "WOT": "Web of Trust (WoT)",
+      "WOT_DEF": "The Web of Trust is made up of all the members of the currency, and the links of certification which connect them.",
+      "DISTANCE_RULE": "Distance rule",
+      "DISTANCE_RULE_DEF": "The rule of distance defines <b>a maximum distance to meet</b> between an applicant and a minimum number of referring member. This distance is calculated using the certification links."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",
+      "CURRENCY_WOT": "The <b>member count</b> shows the <b>community's weight and evolution</b>.",
+      "CURRENCY_MASS": "Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",
+      "CURRENCY_UNIT_RELATIVE": "The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",
+      "CURRENCY_CHANGE_UNIT": "The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",
+      "CURRENCY_RULES": "The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",
+      "MENU_BTN_NETWORK": "Menu <b>{{'MENU.NETWORK'|translate}}</b> allows discovery of <b>network's state<b>.",
+      "NETWORK_BLOCKCHAIN": "All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",
+      "NETWORK_PEERS": "The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "This <b>number</b> (in green) indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre). <a target=\"_new\" href=\"{{installDocUrl}}\" target=\"_system\">Read the installation manual &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Here you can consult your account status, transaction history and your certifications.",
+      "WALLET_CERTIFICATIONS": "Click here to reveiw the details of your certifications (given and received).",
+      "WALLET_RECEIVED_CERTIFICATIONS": "Click here to review the details of your <b>received certifications</b>.",
+      "WALLET_GIVEN_CERTIFICATIONS": "Click here to review the details of your <b>given certifications</b>.",
+      "WALLET_BALANCE": "Your account <b>balance</b> is shown here.",
+      "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",
+      "WALLET_BALANCE_CHANGE_UNIT": "You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",
+      "WALLET_PUBKEY": "This is your account public key. You can communicate it to a third party so that it more easily identifies your account.",
+      "WALLET_SEND": "Issue a payment in just a few clicks.",
+      "WALLET_SEND_NO_MONEY": "Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",
+      "WALLET_OPTIONS": "Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",
+      "WALLET_RECEIVED_CERTS": "This shows the list of persons that certified you.",
+      "WALLET_CERTIFY": "The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",
+      "WALLET_CERT_STOCK": "Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",
+      "MENU_BTN_WALLETS": "The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.",
+      "MENU_BTN_TX": "The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.",
+      "MENU_BTN_WOT": "The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",
+      "WOT_SEARCH_TEXT_XS": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",
+      "WOT_SEARCH_TEXT": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",
+      "WOT_SEARCH_RESULT": "Simply click a user row to view the details sheet.",
+      "WOT_VIEW_CERTIFICATIONS": "The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Click here to open <b>a list of all certifications</b> given to and by this identity.",
+      "WOT_VIEW_CERTIFY": "The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",
+      "CERTIFY_RULES": "<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",
+      "MENU_BTN_SETTINGS": "The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",
+      "HEADER_BAR_BTN_PROFILE": "Click here to access your <b>user profile</b>",
+      "SETTINGS_CHANGE_UNIT": "You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",
+      "END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",
+      "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below."
+    }
+  },
+  "API" :{
+    "COMMON": {
+      "LINK_DOC": "API documentation",
+      "LINK_DOC_HELP": "API documentation for developers",
+      "LINK_STANDARD_APP": "Standard version",
+      "LINK_STANDARD_APP_HELP": "Open standard version of {{'COMMON.APP_NAME'|translate}}",
+      "CONNECTION_ERROR": "Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or contact the web site administrator."
+    },
+    "HOME": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} API Documentation",
+      "MESSAGE": "Welcome to the {{'COMMON.APP_NAME'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
+      "MESSAGE_SHORT": "Connect your websites to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
+      "DOC_HEADER": "Available services:"
+    },
+    "TRANSFER": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} - Online payment",
+      "TITLE_SHORT": "Online payment",
+      "SUMMARY": "Order summary:",
+      "AMOUNT": "Amount:",
+      "AMOUNTS_HELP": "Please select the amount:",
+      "NAME": "Name:",
+      "PUBKEY": "Public key of the recipient:",
+      "COMMENT": "Order reference:",
+      "NODE": "Peer address:",
+      "DEMO": {
+        "SALT": "demo",
+        "PASSWORD": "demo",
+        "PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
+        "HELP": "<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
+        "BAD_CREDENTIALS": "Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
+      },
+      "INFO": {
+        "SUCCESS_REDIRECTING_WITH_NAME": "Payment sent.<br/>Redirect to <b>{{name}}</b>...",
+        "SUCCESS_REDIRECTING": "Payment sent.<br/>Redirect to the seller's website...",
+        "CANCEL_REDIRECTING_WITH_NAME": "Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",
+        "CANCEL_REDIRECTING": "Payment cancelled.<br/>Redirect to the seller's website..."
+      },
+      "ERROR": {
+        "TRANSFER_FAILED": "Payment failed"
+      }
+    },
+    "DOC": {
+      "DESCRIPTION_DIVIDER": "Description",
+      "URL_DIVIDER": "Calling address",
+      "PARAMETERS_DIVIDER": "Parameters",
+      "AVAILABLE_PARAMETERS": "Here is the list of al available parameters:",
+      "DEMO_DIVIDER": "Try it !",
+      "DEMO_HELP": "To test this service, click on this button. The result content will be display below.",
+      "DEMO_RESULT": "Result returned by call:",
+      "DEMO_RESULT_PEER": "Peer address used:",
+      "DEMO_SUCCEED": "<i class=\"icon ion-checkmark\"></i> Success!",
+      "DEMO_CANCELLED": "<i class=\"icon ion-close\"></i> Canceled by user",
+      "INTEGRATE_DIVIDER": "Website integration",
+      "INTEGRATE_CODE": "Code:",
+      "INTEGRATE_RESULT": "Result preview:",
+      "INTEGRATE_PARAMETERS": "Parameters",
+      "TRANSFER": {
+        "TITLE": "Payments",
+        "DESCRIPTION": "From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",
+        "PARAM_PUBKEY": "Recipient's public key",
+        "PARAM_PUBKEY_HELP": "Recipient's public key (required)",
+        "PARAM_AMOUNT": "Amount",
+        "PARAM_AMOUNT_HELP": "Transaction amount (required)",
+        "PARAM_COMMENT": "Reference (or comment)",
+        "PARAM_COMMENT_HELP": "Reference or comment. You will allow for example to identify the payment in the BlockChain.",
+        "PARAM_NAME": "Name (of recipient or website)",
+        "PARAM_NAME_HELP": "The name of your website. This can be a readable name (eg \"My online site\"), or a web address (eg \"www.MySite.com\").",
+        "PARAM_REDIRECT_URL": "URL redirection",
+        "PARAM_REDIRECT_URL_HELP": "URL redirection after sending payment, after the payment has been sent. Can contain the following strings, which will be replaced by the values of the transaction: \"{tx}\", \"{hash}\", \"{comment}\", \"{amount}\" and \"{pubkey}\".",
+        "PARAM_CANCEL_URL": "URL if cancelled",
+        "PARAM_CANCEL_URL_HELP": "URL in case of cancellation.  Can contain the following strings, which will be replaced: \"{comment}\", \"{amount}\" and \"{pubkey}\".",
+        "PARAM_PREFERRED_NODE": "Preferred Duniter peer",
+        "PARAM_PREFERRED_NODE_HELP": "Peer address (URL) to use preferably (\"g1.domain.com:443\" or \"https://g1.domain.com\")",
+        "EXAMPLES_HELP": "Examples of integration:",
+        "EXAMPLE_BUTTON": "HTML Button",
+        "EXAMPLE_BUTTON_DEFAULT_TEXT": "Pay in {{currency|abbreviate}}",
+        "EXAMPLE_BUTTON_DEFAULT_STYLE": "Custom style",
+        "EXAMPLE_BUTTON_TEXT_HELP": "Button text",
+        "EXAMPLE_BUTTON_BG_COLOR": "Background color",
+        "EXAMPLE_BUTTON_BG_COLOR_HELP": "eg: #fbc14c, yellow, lightgrey, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_FONT_COLOR": "Font color",
+        "EXAMPLE_BUTTON_FONT_COLOR_HELP": "eg: black, orange, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_TEXT_ICON": "Icon",
+        "EXAMPLE_BUTTON_TEXT_WIDTH": "Width",
+        "EXAMPLE_BUTTON_TEXT_WIDTH_HELP": "eg: 200px, 50%",
+        "EXAMPLE_BUTTON_ICON_NONE": "No icon",
+        "EXAMPLE_BUTTON_ICON_DUNITER": "Duniter logo",
+        "EXAMPLE_BUTTON_ICON_CESIUM": "Cesium logo",
+        "EXAMPLE_BUTTON_ICON_G1_COLOR": "Äž1 logo",
+        "EXAMPLE_BUTTON_ICON_G1_BLACK": "Äž1 logo (outline)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("en", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "build {{build}}",
+    "PUBKEY": "Public key",
+    "MEMBER": "Member",
+    "BLOCK" : "Block",
+    "BTN_OK": "OK",
+    "BTN_YES": "Yes",
+    "BTN_NO": "No",
+    "BTN_SEND": "Send",
+    "BTN_SEND_MONEY": "Transfer money",
+    "BTN_SEND_MONEY_SHORT": "Transfer",
+    "BTN_SAVE": "Save",
+    "BTN_YES_SAVE": "Yes, Save",
+    "BTN_YES_CONTINUE": "Yes, Continue",
+    "BTN_SHOW": "Show",
+    "BTN_SHOW_PUBKEY": "Show key",
+    "BTN_RELATIVE_UNIT": "Display amounts in UD?",
+    "BTN_BACK": "Back",
+    "BTN_NEXT": "Next",
+    "BTN_IMPORT": "Import",
+    "BTN_CANCEL": "Cancel",
+    "BTN_CLOSE": "Close",
+    "BTN_LATER": "Later",
+    "BTN_LOGIN": "Sign In",
+    "BTN_LOGOUT": "Logout",
+    "BTN_ADD_ACCOUNT": "New Account",
+    "BTN_SHARE": "Share",
+    "BTN_EDIT": "Edit",
+    "BTN_DELETE": "Delete",
+    "BTN_ADD": "Add",
+    "BTN_SEARCH": "Search",
+    "BTN_REFRESH": "Refresh",
+    "BTN_RETRY": "Retry",
+    "BTN_START": "Start",
+    "BTN_CONTINUE": "Continue",
+    "BTN_CREATE": "Create",
+    "BTN_UNDERSTOOD": "I understand",
+    "BTN_OPTIONS": "Options",
+    "BTN_HELP_TOUR": "Features tour",
+    "BTN_HELP_TOUR_SCREEN": "Discover this screen",
+    "BTN_DOWNLOAD": "Download",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Download account statement",
+    "BTN_MODIFY": "Modify",
+    "CHOOSE_FILE": "Drag your file<br/>or click to select",
+    "DAYS": "days",
+    "NO_ACCOUNT_QUESTION": "Not a member yet? Register now!",
+    "SEARCH_NO_RESULT": "No result found",
+    "LOADING": "Loading...",
+    "LOADING_WAIT": "Loading...<br/><small>(Waiting for node availability)</small>",
+    "SEARCHING": "Searching...",
+    "FROM": "From",
+    "TO": "To",
+    "COPY": "Copy",
+    "LANGUAGE": "Language",
+    "UNIVERSAL_DIVIDEND": "Universal dividend",
+    "UD": "UD",
+    "DATE_PATTERN": "MM/DD/YYYY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "MM/DD/YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+    "EMPTY_PARENTHESIS": "(empty)",
+    "UID": "Pseudonym",
+    "ENABLE": "Enabled",
+    "DISABLE": "Disabled",
+    "RESULTS_LIST": "Results:",
+    "RESULTS_COUNT": "{{count}} results",
+    "EXECUTION_TIME": "executed in {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "Display values openly?",
+    "POPOVER_ACTIONS_TITLE": "Options",
+    "POPOVER_FILTER_TITLE": "Filters",
+    "SHOW_MORE": "Show more",
+    "SHOW_MORE_COUNT": "(current limit at {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Share",
+      "SHARE_ON_TWITTER": "Share on Twitter",
+      "SHARE_ON_FACEBOOK": "Share on Facebook",
+      "SHARE_ON_DIASPORA": "Share on Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Share on Google+"
+    },
+    "FILE": {
+      "DATE" : "Date:",
+      "TYPE" : "Type:",
+      "SIZE": "Size:",
+      "VALIDATING": "Validating..."
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Choose source:",
+    "BTN_PICTURE_GALLERY": "Gallery",
+    "BTN_PICTURE_CAMERA": "<b>Camera</b>"
+  },
+  "MENU": {
+    "HOME": "Home",
+    "WOT": "Registry",
+    "CURRENCY": "Currency",
+    "ACCOUNT": "My Account",
+    "WALLETS": "My wallets",
+    "SETTINGS": "Settings",
+    "NETWORK": "Network",
+    "TRANSACTIONS": "My transactions"
+  },
+  "ABOUT": {
+    "TITLE": "About",
+    "LICENSE": "<b>Free/libre software</b> (License GNU AGPLv3).",
+    "LATEST_RELEASE": "There is a <b>newer version</ b> of {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",
+    "PLEASE_UPDATE": "Please update {{'COMMON.APP_NAME' | translate}} (latest version: <b>v{{version}}</b>)",
+    "CODE": "Source code:",
+    "OFFICIAL_WEB_SITE": "Official web site:",
+    "DEVELOPERS": "Developers:",
+    "FORUM": "Forum:",
+    "PLEASE_REPORT_ISSUE": "Please report any issue to us!",
+    "REPORT_ISSUE": "Report an issue",
+    "BTN_OPEN_DEV_WINDOW": "Open the debug window"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Welcome to the Cesium Application!",
+    "MESSAGE": "Receive and send libre currency {{currency|abbreviate}}",
+    "BTN_CURRENCY": "Explore currency",
+    "BTN_ABOUT": "about",
+    "BTN_HELP": "Help",
+    "REPORT_ISSUE": "Report an issue",
+    "NOT_YOUR_ACCOUNT_QUESTION" : "You do not own the account <b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b>?",
+    "BTN_CHANGE_ACCOUNT": "Disconnect this account",
+    "CONNECTION_ERROR": "Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or change node <a class=\"positive\" ng-click=\"doQuickFix('settings')\">in the settings</a>.",
+    "SHOW_ALL_FEED": "Show all",
+    "READ_MORE": "Read more",
+    "FEED_SOURCE": "Source"
+  },
+  "SETTINGS": {
+    "TITLE": "Settings",
+    "DISPLAY_DIVIDER": "Display",
+    "STORAGE_DIVIDER": "Storage",
+    "NETWORK_SETTINGS": "Network",
+    "PEER": "Duniter peer address",
+    "PEER_SHORT": "Peer address",
+    "PEER_CHANGED_TEMPORARY": "Address used temporarily",
+    "PERSIST_CACHE": "Keep navigation data (experimental)",
+    "PERSIST_CACHE_HELP": "Allows faster navigation, locally retaining the data received, for use from one session to another.",
+    "USE_LOCAL_STORAGE": "Enable local storage",
+    "USE_LOCAL_STORAGE_HELP": "Allows you to save your settings",
+    "WALLETS_SETTINGS": "My wallets",
+    "USE_WALLETS_ENCRYPTION": "Secure the list",
+    "USE_WALLETS_ENCRYPTION_HELP": "Enables you to encrypt the list of your wallets. Authentication required to access it.",
+    "ENABLE_HELPTIP": "Enable contextual help tips",
+    "DISABLE_HELPTIP": "Disable contextual help tips",
+    "ENABLE_UI_EFFECTS": "Enable visual effects",
+    "HISTORY_SETTINGS": "Account operations",
+    "DISPLAY_UD_HISTORY": "Display produced dividends?",
+    "TX_HISTORY_AUTO_REFRESH": "Enable automatic refresh?",
+    "TX_HISTORY_AUTO_REFRESH_HELP": "Updates the list of operations to each new block.",
+    "AUTHENTICATION_SETTINGS": "Authentication",
+    "KEEP_AUTH": "Expiration of authentication",
+    "KEEP_AUTH_SHORT": "Expiration",
+    "KEEP_AUTH_HELP": "Define when authentication is cleared from memory.",
+    "KEEP_AUTH_OPTION": {
+      "NEVER": "After each operation",
+      "SECONDS": "After {{value}}s of inactivity",
+      "MINUTE": "After {{value}}min of inactivity",
+      "MINUTES": "After {{value}}min of inactivity",
+      "HOUR": "After {{value}}h of inactivity",
+      "ALWAYS": "At the end of the session"
+    },
+    "KEYRING_FILE": "Keyring file",
+    "KEYRING_FILE_HELP": "Allow auto-connect at startup, or to authenticate (only if \"Expiration of authentication\" is \"at the end of the session\"",
+    "REMEMBER_ME": "Remember me ?",
+    "REMEMBER_ME_HELP": "Allows to remain identified from one session to another, keeping the public key locally.",
+    "PLUGINS_SETTINGS": "Extensions",
+    "BTN_RESET": "Restore default values",
+    "EXPERT_MODE": "Enable expert mode",
+    "EXPERT_MODE_HELP": "Allow to see more details",
+    "BLOCK_VALIDITY_WINDOW": "Block uncertainty time",
+    "BLOCK_VALIDITY_WINDOW_SHORT": "Time of uncertainty",
+    "BLOCK_VALIDITY_WINDOW_HELP": "Time to wait before considering an information is validated",
+    "BLOCK_VALIDITY_OPTION": {
+      "NONE": "No delay",
+      "N": "{{time | formatDuration}} ({{count}} blocks)"
+    },
+    "POPUP_PEER": {
+      "TITLE" : "Duniter peer",
+      "HOST" : "Address",
+      "HOST_HELP": "Address: server:port",
+      "USE_SSL" : "Secured?",
+      "USE_SSL_HELP" : "(SSL Encryption)",
+      "BTN_SHOW_LIST" : "Peer's list"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Hash: {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Block #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Current block",
+      "TITLE": "Block #{{number|formatInteger}}",
+      "COMPUTED_BY": "Computed by",
+      "SHOW_RAW": "Show raw data",
+      "TECHNICAL_DIVIDER": "Technical informations",
+      "VERSION": "Format version",
+      "HASH": "Computed hash",
+      "UNIVERSAL_DIVIDEND_HELP": "Money co-produced by each of the {{membersCount}} members",
+      "EMPTY": "Aucune donnée dans ce bloc",
+      "POW_MIN": "Minimal difficulty",
+      "POW_MIN_HELP": "Difficulty imposed in calculating hash",
+      "DATA_DIVIDER": "Data",
+      "IDENTITIES_COUNT": "New identities",
+      "JOINERS_COUNT": "Joiners",
+      "ACTIVES_COUNT": "Renewals",
+      "ACTIVES_COUNT_HELP": "Members having renewed their membership",
+      "LEAVERS_COUNT": "Leavers",
+      "LEAVERS_COUNT_HELP": "Members that now refused certification",
+      "EXCLUDED_COUNT": "Excluded members",
+      "EXCLUDED_COUNT_HELP": "Old members, excluded because missing membreship renewal or certifications",
+      "REVOKED_COUNT": "Revoked identities",
+      "REVOKED_COUNT_HELP": "These accounts may no longer be member",
+      "TX_COUNT": "Transactions",
+      "CERT_COUNT": "Certifications",
+      "TX_TO_HIMSELF": "Change",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Unlock conditions",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "and",
+        "OR": "or"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>Sign</b> of the public key",
+        "XHX": "<b>Password</b>, including SHA256 =",
+        "CSV": "Blocked during",
+        "CLTV": "Bloqué until"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Blocks",
+      "NO_BLOCK": "No bloc",
+      "LAST_BLOCKS": "Last blocks:",
+      "BTN_COMPACT": "Compact"
+    }
+  },
+  "CURRENCY": {
+    "VIEW": {
+      "TITLE": "Currency",
+      "TAB_CURRENCY": "Currency",
+      "TAB_WOT": "Web of trust",
+      "TAB_NETWORK": "Network",
+      "TAB_BLOCKS": "Blocks",
+      "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.",
+      "NETWORK_RULES_DIVIDER": "Network rules",
+      "CURRENCY_NAME": "Currency name",
+      "MEMBERS": "Members count",
+      "MEMBERS_VARIATION": "Variation since {{duration|formatDuration}} (since last UD)",
+      "MONEY_DIVIDER": "Money",
+      "MASS": "Monetary mass",
+      "SHARE": "Money share",
+      "UD": "Universal Dividend",
+      "C_ACTUAL": "Current growth",
+      "MEDIAN_TIME": "Current blockchain time",
+      "POW_MIN": "Common difficulty",
+      "MONEY_RULES_DIVIDER": "Rules of currency",
+      "C_RULE": "Theoretical growth target",
+      "UD_RULE": "Universal dividend (formula)",
+      "DT_REEVAL": "Period between two re-evaluation of the UD",
+      "REEVAL_SYMBOL": "reeval",
+      "DT_REEVAL_VALUE": "Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+      "UD_REEVAL_TIME0": "Date of first reevaluation of the UD",
+      "SIG_QTY_RULE": "Required number of certifications to become a member",
+      "SIG_STOCK": "Maximum number of certifications sent by a member",
+      "SIG_PERIOD": "Minimum delay between 2 certifications sent by one and the same issuer.",
+      "SIG_WINDOW": "Maximum delay before a certification will be treated",
+      "SIG_VALIDITY": "Lifetime of a certification that has been treated",
+      "MS_WINDOW": "Maximum delay before a pending membership will be treated",
+      "MS_VALIDITY": "Lifetime of a membership that has been treated",
+      "STEP_MAX": "Maximum distance between a newcomer and each referring members.",
+      "WOT_RULES_DIVIDER": "Rules for web of trust",
+      "SENTRIES": "Required number of certifications (given <b>and</b> received) to become a referring member",
+      "SENTRIES_FORMULA": "Required number of certifications to become a referring member (formula)",
+      "XPERCENT":"Minimum percent of referring member to reach to match the distance rule",
+      "AVG_GEN_TIME": "The average time between 2 blocks",
+      "CURRENT": "current",
+      "MATH_CEILING": "CEILING",
+      "DISPLAY_ALL_RULES": "Display all rules?",
+      "BTN_SHOW_LICENSE": "Show license",
+      "WOT_DIVIDER": "Web of trust"
+    },
+    "LICENSE": {
+      "TITLE": "Currency license",
+      "BTN_DOWNLOAD": "Download file",
+      "NO_LICENSE_FILE": "License file not found."
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Blockchain time",
+      "LOADING_PEERS": "Loading peers...",
+      "NODE_ADDRESS": "Address:",
+      "SOFTWARE": "Software:",
+      "WARN_PRE_RELEASE": "Pre-release (latest stable: <b>{{version}}</b>)",
+      "WARN_NEW_RELEASE": "Version <b>{{version}}</b> available",
+      "WS2PID": "Identifier:",
+      "PRIVATE_ACCESS": "Private access",
+      "POW_PREFIX": "Proof of work prefix:",
+      "ENDPOINTS": {
+        "BMAS": "Secure endpoint (SSL)",
+        "BMATOR": "TOR endpoint",
+        "WS2P": "WS2P endpoint",
+        "ES_USER_API": "Cesium+ data node"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "Non-SSL nodes have a degraded display because Cesium works in HTTPS mode."
+    }
+  },
+  "PEER": {
+    "PEERS": "Peers",
+    "SIGNED_ON_BLOCK": "Signed on block",
+    "MIRROR": "mirror",
+    "MIRRORS": "Mirrors",
+    "MIRROR_PEERS": "Mirror peers",
+    "PEER_LIST" : "Peer's list",
+    "MEMBERS" : "Members",
+    "MEMBER_PEERS" : "Member peers",
+    "ALL_PEERS" : "All peers",
+    "DIFFICULTY" : "Difficulty",
+    "API" : "API",
+    "CURRENT_BLOCK" : "Block #",
+    "POPOVER_FILTER_TITLE": "Filter",
+    "OFFLINE": "Offline",
+    "OFFLINE_PEERS": "Offline peers",
+    "BTN_SHOW_PEER": "Show peer",
+    "VIEW": {
+      "TITLE": "Peer",
+      "OWNER": "Owned by ",
+      "SHOW_RAW_PEERING": "See peering document",
+      "SHOW_RAW_CURRENT_BLOCK": "See current block (raw format)",
+      "LAST_BLOCKS": "Last blocks",
+      "KNOWN_PEERS": "Known peers :",
+      "GENERAL_DIVIDER": "General information",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "Could not get peer data, using the TOR network.",
+        "LOADING_NODE_ERROR": "Could not get peer data"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Search (member or public key)",
+    "SEARCH_INIT_PHASE_WARNING": "During the pre-registration phase, the search for pending registrations <b>may be long</b>. Please wait ...",
+    "REGISTERED_SINCE": "Registered on",
+    "REGISTERED_SINCE_BLOCK": "Registered since block #",
+    "NO_CERTIFICATION": "No validated certification",
+    "NO_GIVEN_CERTIFICATION": "No given certification",
+    "NOT_MEMBER_PARENTHESIS": "(non-member)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(identity revoked)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(being revoked)",
+    "EXPIRE_IN": "Expires",
+    "NOT_WRITTEN_EXPIRE_IN": "Deadline<br/>treatment",
+    "EXPIRED": "Expired",
+    "PSEUDO": "Pseudonym",
+    "SIGNED_ON_BLOCK": "Emitted on block #{{block}}",
+    "WRITTEN_ON_BLOCK": "Written on block #{{block}}",
+    "GENERAL_DIVIDER": "General information",
+    "NOT_MEMBER_ACCOUNT": "Non-member account",
+    "NOT_MEMBER_ACCOUNT_HELP": "This is a simple wallet, with no pending membership application.",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "BTN_CERTIFY": "Certify",
+    "BTN_YES_CERTIFY": "Yes, certify",
+    "BTN_SELECT_AND_CERTIFY": "New certification",
+    "ACCOUNT_OPERATIONS": "Account operations",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identity {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Registry",
+      "NEWCOMERS": "New members:",
+      "NEWCOMERS_COUNT": "{{count}} members",
+      "PENDING": "Pending registrations:",
+      "PENDING_COUNT": "{{count}} pending registrations",
+      "REGISTERED": "Registered {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Member since {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Latest members",
+      "BTN_PENDING": "Pending registrations",
+      "SHOW_MORE": "Show more",
+      "SHOW_MORE_COUNT": "(current limit to {{limit}})",
+      "NO_PENDING": "No pending registrations.",
+      "NO_NEWCOMERS": "No members."
+    },
+    "CONTACTS": {
+      "TITLE": "Contacts"
+    },
+    "MODAL": {
+      "TITLE": "Search"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications",
+      "SUMMARY": "Received certifications",
+      "LIST": "Details of received certifications",
+      "PENDING_LIST": "Pending certifications",
+      "RECEIVED": "Received certifications",
+      "RECEIVED_BY": "Certifications received by {{uid}}",
+      "ERROR": "Received certifications in error",
+      "SENTRY_MEMBER": "Referring member"
+    },
+    "OPERATIONS": {
+      "TITLE": "{{uid}} - Operations"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications sent",
+      "SUMMARY": "Sent certifications",
+      "LIST": "Details of sent certifications",
+      "PENDING_LIST": "Pending certifications",
+      "SENT": "Sent certifications",
+      "SENT_BY": "Certifications sent by {{uid}}",
+      "ERROR": "Sent certifications with error"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-log-in\"></i> Login",
+    "SCRYPT_FORM_HELP": "Please enter your credentials. <br> Remember to check the public key for your account.",
+    "PUBKEY_FORM_HELP": "Please enter a public account key:",
+    "FILE_FORM_HELP": "Choose the keychain file to use:",
+    "SCAN_FORM_HELP": "Scan the QR code of a wallet.",
+    "SALT": "Secret identifier",
+    "SALT_HELP": "Secret identifier",
+    "SHOW_SALT": "Display secret identifier?",
+    "PASSWORD": "Password",
+    "PASSWORD_HELP": "Password",
+    "PUBKEY_HELP": "Public key or pseudonym",
+    "NO_ACCOUNT_QUESTION": "Don't have an account yet?",
+    "HAVE_ACCOUNT_QUESTION": "Already have an account ?",
+    "CREATE_ACCOUNT": "Create an account",
+    "CREATE_FREE_ACCOUNT": "Create a free account",
+    "FORGOTTEN_ID": "Forgot password?",
+    "ASSOCIATED_PUBKEY": "Public key :",
+    "BTN_METHODS": "Other methods",
+    "BTN_METHODS_DOTS": "Change method...",
+    "METHOD_POPOVER_TITLE": "Methods",
+    "MEMORIZE_AUTH_FILE": "Memorize this keychain during the navigation session",
+    "SCRYPT_PARAMETERS": "Paramètres (Scrypt) :",
+    "AUTO_LOGOUT": {
+      "TITLE": "Information",
+      "MESSAGE": "<i class=\"ion-android-time\"></i> You were <b>logout</ b> automatically, due to prolonged inactivity.",
+      "BTN_RELOGIN": "Sign In",
+      "IDLE_WARNING": "You will be logout... {{countdown}}"
+    },
+    "METHOD": {
+      "SCRYPT_DEFAULT": "Secret identifier and password",
+      "SCRYPT_ADVANCED": "Advanced salt",
+      "FILE": "Keychain file",
+      "PUBKEY": "Public key or pseudonym",
+      "SCAN": "Scan a QR code"
+    },
+    "SCRYPT": {
+      "SIMPLE": "Light salt",
+      "DEFAULT": "Standard salt",
+      "SECURE": "Secure salt",
+      "HARDEST": "Hardest salt",
+      "EXTREME": "Extreme salt",
+      "USER": "Personal value",
+      "N": "N (Loop):",
+      "r": "r (RAM):",
+      "p": "p (CPU):"
+    },
+    "FILE": {
+      "HELP": "Expected file format: <b>.dunikey</b> (type PubSec). Other formats are under development (EWIF, WIF)."
+    }
+  },
+  "AUTH": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> Authentication",
+    "BTN_AUTH": "Authenticate",
+    "GENERAL_HELP": "Please authenticate yourself:",
+    "EXPECTED_UID_HELP": "Please authenticate to the account <i class=\"ion-person\"></i> {{uid}}:",
+    "EXPECTED_PUBKEY_HELP": "Please authenticate to the wallet <i class=\"ion-key\"></i> {{pubkey|formatPubkey}}:",
+    "SCAN_FORM_HELP": "Scan the QR code of the <b>private key</b> of the wallet."
+  },
+  "ACCOUNT": {
+    "TITLE": "My Account",
+    "BALANCE": "Balance",
+    "LAST_TX": "Latest validated transactions",
+    "BALANCE_ACCOUNT": "Account balance",
+    "NO_TX": "No transaction",
+    "SHOW_MORE_TX": "Show more",
+    "SHOW_ALL_TX": "Show all",
+    "TX_FROM_DATE": "(current limit to {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Pending transactions",
+    "VALIDATING_TX": "Transactions being validated",
+    "ERROR_TX": "Transaction not executed",
+    "ERROR_TX_SENT": "Sent transactions",
+    "PENDING_TX_RECEIVED": "Transactions awaiting receipt",
+    "EVENTS": "Events",
+    "OUT_DISTANCED": "Your current certifications come from a group too isolated from the <a ng-click=\"showHelpModal('wot')\"> Web of Trust</a> (WoT): the <a ng-click=\"showHelpModal('distance_rule')\">maximum distance rule</a> is violated.<br/>You must obtain certifications from another area of the Web of Trust, or wait for it to tighten.",
+    "WAITING_MEMBERSHIP": "Membership application sent. Waiting validation.",
+    "WAITING_CERTIFICATIONS": "You need {{needCertificationCount}} certification(s) to become a member and produce the <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a>. Your account is however already operational, to receive and send payments.",
+    "WAITING_CERTIFICATIONS_HELP": "To get your certifications, only request members <b>who know you enough</b>, as required by <a ng-click=\"showLicenseModal()\">the currency license</a> that you have accepted.<br/>If you do not know enough members, let them know on <a ng-click=\"openLink($event, $root.settings.userForumUrl)\">the user forum</a>.",
+    "WILL_MISSING_CERTIFICATIONS": "You will <b>lack certifications</b> soon (at least {{willNeedCertificationCount}} more are needed)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Your membership <b>will expire {{membershipExpiresIn|formatDurationTo}}</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a> before then.",
+    "NEED_RENEW_MEMBERSHIP": "You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",
+    "NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED": "You are no longer a member because your membership <b>has been canceled</b> for lack of certifications. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",
+    "NO_WAITING_MEMBERSHIP": "No membership application pending. If you'd like to <b>become a member</ b>, please <a ng-click=\"doQuickFix('membership')\">send the membership application</a>.",
+    "CERTIFICATION_COUNT": "Received certifications",
+    "CERTIFICATION_COUNT_SHORT": "Certifications",
+    "SIG_STOCK": "Stock of certifications to give",
+    "BTN_RECEIVE_MONEY": "Receive",
+    "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Switch to another identity...",
+    "BTN_FIX_MEMBERSHIP": "Resubmit membership request...",
+    "BTN_MEMBERSHIP_RENEW": "Renew membership",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Renew membership...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Revoke membership...",
+    "BTN_SECURITY_DOTS": "Sign-in and security...",
+    "BTN_SHOW_DETAILS": "Display technical data",
+    "LOCKED_OUTPUTS_POPOVER": {
+      "TITLE": "Locked amount",
+      "DESCRIPTION": "Here are the conditions for unlocking this amount:",
+      "DESCRIPTION_MANY": "This transaction consists of several parts, of which the unlock conditions are:",
+      "LOCKED_AMOUNT": "Conditions for the amount:"
+    },
+    "NEW": {
+      "TITLE": "Registration",
+      "INTRO_WARNING_TIME": "Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).",
+      "INTRO_WARNING_SECURITY": "Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.",
+      "INTRO_WARNING_SECURITY_HELP": "Up-to-date anti-virus, firewall enabled, session protected by password or pin code...",
+      "INTRO_HELP": "Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.",
+      "REGISTRATION_NODE": "Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.",
+      "REGISTRATION_NODE_HELP": "If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.",
+      "SELECT_ACCOUNT_TYPE": "Choose the type of account to create:",
+      "MEMBER_ACCOUNT": "Member account",
+      "MEMBER_ACCOUNT_TITLE": "Create a member account",
+      "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).",
+      "WALLET_ACCOUNT": "Simple wallet",
+      "WALLET_ACCOUNT_TITLE": "Create a wallet",
+      "WALLET_ACCOUNT_HELP": "If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.",
+      "SALT_WARNING": "Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!",
+      "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!",
+      "PSEUDO_WARNING": "Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>",
+      "PSEUDO": "Pseudonym",
+      "PSEUDO_HELP": "joe123",
+      "SALT_CONFIRM": "Confirm",
+      "SALT_CONFIRM_HELP": "Confirm the secret identifier",
+      "PASSWORD_CONFIRM": "Confirm",
+      "PASSWORD_CONFIRM_HELP": "Confirm the password",
+      "SLIDE_6_TITLE": "Confirmation:",
+      "COMPUTING_PUBKEY": "Computing...",
+      "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?",
+      "CHECKING_PSEUDO": "Checking...",
+      "PSEUDO_AVAILABLE": "This pseudonym is available",
+      "PSEUDO_NOT_AVAILABLE": "This pseudonym is not available",
+      "INFO_LICENSE": "To be able to adhere to the currency, we ask you to kindly read and accept this license.",
+      "BTN_ACCEPT": "I accept",
+      "BTN_ACCEPT_LICENSE": "I accept the license"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Enter a pseudonym",
+      "HELP": "A pseudonym is needed to let other members find you."
+    },
+    "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Identity selection",
+      "HELP": "Several <b>different identities</b> have been sent, for the public key <span class=\"gray\"> <i class=\"ion-key\"></i> {{pubkey | formatPubkey}}</span>.<br/>Please select the identity to use:"
+    },
+    "SELECT_WALLET_MODAL": {
+      "TITLE": "Wallet selection"
+    },
+    "WALLET_LIST": {
+      "TITLE": "My wallets",
+      "BTN_NEW": "Add a wallet",
+      "BTN_DOWNLOAD": "Download the list",
+      "BTN_IMPORT_FILE_DOTS": "Import from a file...",
+      "NO_WALLET": "No secondary wallet",
+      "BTN_DELETE": "Remove a secondary wallet...",
+      "BTN_RENAME": "Rename the wallet",
+      "EXPORT_FILENAME": "my_wallets-{{pubkey|formatPubkey}}-{{currency}}.csv",
+      "TOTAL_DOTS": "Total: ",
+      "EDIT_POPOVER": {
+        "TITLE": "Rename the wallet",
+        "HELP": "Fill in the new name",
+        "NAME_HELP": "Wallet name"
+      },
+      "IMPORT_MODAL": {
+        "TITLE": "Import secondary wallets",
+        "HELP": "To <b>import secodnary wallets</b>, please drag the file in the box below, or click in the box to search for a file.",
+        "WALLET_COUNT": "<b>{{count}}</b> new wallet{{count > 1 ? 's' : ''}}",
+        "NO_NEW_WALLET": "No new wallet"
+      }
+    },
+    "SECURITY":{
+      "ADD_QUESTION" : "Add custom question",
+      "BTN_CLEAN" : "Clean",
+      "BTN_RESET" : "Reset",
+      "DOWNLOAD_REVOKE": "Save a revocation file",
+      "DOWNLOAD_REVOKE_HELP" : "Having a revocation file is important, for example in case of loss of identifiers. It allows you to <b>get this account out of the Web Of Trust</b>, thus becoming a simple wallet.",
+      "GENERATE_KEYFILE": "Generate my keychain file ...",
+      "GENERATE_KEYFILE_HELP": "Generate a file allowing you to authenticate without entering your identifiers.<br/><b>Warning:</b> this file will contain your secret key; It is therefore very important to put it in a safe place!",
+      "KEYFILE_FILENAME": "keychain-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",
+      "MEMBERSHIP_IN": "Register as member...",
+      "MEMBERSHIP_IN_HELP": "Allows you to <b>transform </b> a simple wallet account <b>into a member account</b>, by sending a membership request. Useful only if you do not already have another member account.",
+      "SEND_IDENTITY": "Publish identity...",
+      "SEND_IDENTITY_HELP": "Allows you to associate a pseudonym to this account, but <b>without applying for membership</b> to become a member. This is not very useful because the validity of this pseudonym association is limited in time.",
+      "HELP_LEVEL": "Choose <strong> at least {{nb}} questions </strong> :",
+      "LEVEL": "Security level",
+      "LOW_LEVEL": "Low <span class=\"hidden-xs\">(2 questions minimum)</span>",
+      "MEDIUM_LEVEL": "Medium <span class=\"hidden-xs\">(4 questions minimum)</span>",
+      "QUESTION_1": "What was your best friend's name when you were a teen ?",
+      "QUESTION_2": "What was the name of your first pet ?",
+      "QUESTION_3": "What is the first meal you have learned to cook ?",
+      "QUESTION_4": "What is the first movie you saw in the cinema?",
+      "QUESTION_5": "Where did you go the first time you flew ?",
+      "QUESTION_6": "What was your favorite elementary school teacher's name  ?",
+      "QUESTION_7": "What would you consider the ideal job ?",
+      "QUESTION_8": "Which children's book do you prefer?",
+      "QUESTION_9": "What was the model of your first vehicle?",
+      "QUESTION_10": "What was your nickname when you were a child ?",
+      "QUESTION_11": "What was your favorite movie character or actor when you were a student ?",
+      "QUESTION_12": "What was your favorite singer or band when you were a student ?",
+      "QUESTION_13": "In which city did your parents meet ?",
+      "QUESTION_14": "What was the name of your first boss ?",
+      "QUESTION_15": "What is the name of the street where you grew up ?",
+      "QUESTION_16": "What is the name of the first beach where you go swim ?",
+      "QUESTION_17": "QWhat is the first album you bought ?",
+      "QUESTION_18": "What is the name of your favorite sport team ?",
+      "QUESTION_19": "What was your grand-father's job ?",
+      "RECOVER_ID": "Recover my password...",
+      "RECOVER_ID_HELP": "If you have a <b>backup file of your identifiers</b>, you can find them by answering your personal questions correctly.",
+      "RECOVER_ID_SELECT_FILE": "Select the <b>backup file of your identifiers</b> to use:",
+      "REVOCATION_WITH_FILE" : "Revoke my member account...",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "If you have <b>permanently lost your member account credentials (or if account security is compromised), you can use <b>the revocation file</b> of the account <b>to quit the Web Of Trust</b>.",
+      "REVOCATION_WITH_FILE_HELP": "To <b>permanently revoke</ b> a member account, please drag the revocation file in the box below, or click in the box to search for a file.",
+      "REVOCATION_WALLET": "Revoke this account immediately",
+      "REVOCATION_WALLET_HELP": "Requesting revocation of your identity causes <b>will revoke your membership</ b> (definitely for the associated pseudonym and public key). The account will no longer be able to produce a Universal Dividend.<br/>However, you can still use it as a simple wallet.",
+      "REVOCATION_FILENAME": "revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+      "SAVE_ID": "Save my credentials...",
+      "SAVE_ID_HELP": "Creating a backup file, to <b>retrieve your password</b> (and the secret identifier) <b> in case of forgetting</b>. The file is <b>secured</ b> (encrypted) using personal questions.",
+      "STRONG_LEVEL": "Strong <span class=\"hidden-xs \">(6 questions minimum)</span>",
+      "TITLE": "Account and security",
+      "KEYFILE": {
+        "PUBSEC_FORMAT": "PubSec format.",
+        "PUBSEC_FORMAT_HELP": "This file format is compatible in particular with Cesium and Gannonce. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",
+        "WIF_FORMAT": "Wallet Import Format (WIF)",
+        "WIF_FORMAT_HELP": "This format is used in particular by paper wallets. Your keychain is stored <b>without encryption</b>: anyone with a copy of this file will be able to empty your account.",
+        "EWIF_FORMAT": "Encrypted Wallet Import Format (WIF)",
+        "EWIF_FORMAT_HELP": "This format is used in particular by paper wallets. However, <b>the keychain is encrypted</b> from a passphrase of your choice.",
+        "PASSWORD_POPUP": {
+          "TITLE": "Keychain file encrypted",
+          "HELP": "Please enter the passphrase:",
+          "PASSWORD_HELP": "Passphrase"
+        },
+        "ERROR": {
+          "BAD_PASSWORD": "Bad passphrase",
+          "BAD_CHECKSUM": "Bad checksum"
+        }
+      }
+    },
+    "FILE_NAME": "{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Date",
+      "AMOUNT": "Amount",
+      "COMMENT": "Comment"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Transfer",
+    "SUB_TITLE": "Transfer money",
+    "SUB_TITLE_ALL": "Empty the account",
+    "FROM": "From",
+    "TO": "To",
+    "AMOUNT": "Amount",
+    "AMOUNT_HELP": "Amount",
+    "COMMENT": "Comment",
+    "COMMENT_HELP": "Comment (optional)",
+    "BTN_SEND": "Send",
+    "BTN_ADD_COMMENT": "Add a comment",
+    "REST": "Rest of account",
+    "REST_TO": "to",
+    "WARN_COMMENT_IS_PUBLIC": "Please note that <b>comments are public</b> (not encrypted).",
+    "MODAL": {
+      "TITLE": "Transfer"
+    }
+  },
+  "ERROR": {
+    "UNKNOWN_URI_FORMAT": "Unknown URI format",
+    "PUBKEY_INVALID_CHECKSUM": "Invalid public key (bad checksum).",
+    "POPUP_TITLE": "Error",
+    "UNKNOWN_ERROR": "Unknown error",
+    "CRYPTO_UNKNOWN_ERROR": "Your browser is not compatible with cryptographic features.",
+    "DOWNLOAD_KEYFILE_FAILED": "Failed to generate the keychain file.",
+    "EQUALS_TO_PSEUDO": "Must be different from pseudonym",
+    "EQUALS_TO_SALT": "Must be different from secret identifier",
+    "FIELD_REQUIRED": "This field is required.",
+    "FIELD_TOO_SHORT": "This field value is too short.",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "Value is too short (min {{minLength]] characters).",
+    "FIELD_TOO_LONG": "Value is exceeding max length.",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Value is too long (max {{maxLength}} characters).",
+    "FIELD_MIN": "Minimum value: {{min}}",
+    "FIELD_MAX": "Maximal value: {{max}}",
+    "FIELD_ACCENT": "Commas and accent characters not allowed",
+    "FIELD_NOT_NUMBER": "Value is not a number",
+    "FIELD_NOT_INT": "Value is not an integer",
+    "FIELD_NOT_EMAIL": "Email adress not valid",
+    "PASSWORD_NOT_CONFIRMED": "Must match previous password.",
+    "SALT_NOT_CONFIRMED": "Must match previous identifier.",
+    "SEND_IDENTITY_FAILED": "Error while trying to register.",
+    "SEND_CERTIFICATION_FAILED": "Could not certify identity.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "You could not send certification, because your account is <b>not a member account</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "This account could not be certified. No registration found, or need to renew.",
+    "LOGIN_FAILED": "Error while sign in.",
+    "LOAD_IDENTITY_FAILED": "Could not load identity.",
+    "LOAD_REQUIREMENTS_FAILED": "Could not load identity requirements.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Error while sending registration as member.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Error while sending membership revocation.",
+    "REFRESH_WALLET_DATA": "Could not refresh wallet.",
+    "GET_CURRENCY_PARAMETER": "Could not get currency parameters.",
+    "GET_CURRENCY_FAILED": "Could not load currency. Please retry later.",
+    "SEND_TX_FAILED": "Could not send transaction.",
+    "ALL_SOURCES_USED": "Please wait the next block computation (All transaction sources has been used).",
+    "NOT_ENOUGH_SOURCES": "Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Error while creating your member account.",
+    "RESTORE_WALLET_DATA_ERROR": "Error while reloading settings from local storage",
+    "LOAD_WALLET_DATA_ERROR": "Error while loading wallet data.",
+    "COPY_CLIPBOARD_FAILED": "Could not copy to clipboard",
+    "TAKE_PICTURE_FAILED": "Could not get picture.",
+    "SCAN_FAILED": "Could not scan QR code.",
+    "SCAN_UNKNOWN_FORMAT": "Code not recognized.",
+    "WOT_LOOKUP_FAILED": "Search failed.",
+    "LOAD_PEER_DATA_FAILED": "Duniter peer not accessible. Please retry later.",
+    "NEED_LOGIN_FIRST": "Please sign in first.",
+    "AMOUNT_REQUIRED": "Amount is required.",
+    "AMOUNT_NEGATIVE": "Negative amount not allowed.",
+    "NOT_ENOUGH_CREDIT": "Not enough credit.",
+    "INVALID_NODE_SUMMARY": "Unreachable peer or invalid address",
+    "INVALID_USER_ID": "Field 'pseudonym' must not contains spaces or special characters.",
+    "INVALID_COMMENT": "Field 'reference' has a bad format.",
+    "INVALID_PUBKEY": "Public key has a bad format.",
+    "INVALID_PUBKEY_CHECKSUM": "Invalid checksum.",
+    "IDENTITY_REVOKED": "This identity <b>has been revoked</b>. It can no longer become a member.",
+    "IDENTITY_REVOKED_WITH_TIME": "This identity <b>has been revoked {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). It can no longer become a member.",
+    "IDENTITY_PENDING_REVOCATION": "The <b>revocation of this identity</b> has been requested and is awaiting processing. Certification is therefore disabled.",
+    "IDENTITY_INVALID_BLOCK_HASH": "This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",
+    "IDENTITY_EXPIRED": "This identity has expired: this person must re-apply <b>before</b> being certified.",
+    "IDENTITY_SANDBOX_FULL": "Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",
+    "IDENTITY_NOT_FOUND": "Identity not found",
+    "IDENTITY_TX_FAILED": "Error while getting identity's transactions",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Membership not valid.",
+    "WALLET_INVALID_BLOCK_HASH": "Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",
+    "WALLET_IDENTITY_EXPIRED": "The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",
+    "WALLET_REVOKED": "Your identity has been <b>revoked</b>: neither your pseudonym nor your public key will be used in the future for a member account.",
+    "WALLET_HAS_NO_SELF": "Your identity must first have been published, and not expired.",
+    "AUTH_REQUIRED": "Authentication required.",
+    "AUTH_INVALID_PUBKEY": "The public key does not match the connected account.",
+    "AUTH_INVALID_SCRYPT": "Invalid username or password.",
+    "AUTH_INVALID_FILE": "Invalid keychain file.",
+    "AUTH_FILE_ERROR": "Failed to open keychain file",
+    "IDENTITY_ALREADY_CERTIFY": "You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Unable to certify",
+    "LOAD_NEWCOMERS_FAILED": "Unable to load new members.",
+    "LOAD_PENDING_FAILED": "Unable to load pending registrations.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.",
+    "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member (or old member)</b> in order to perform this action.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.",
+    "GET_BLOCK_FAILED": "Error while getting block",
+    "INVALID_BLOCK_HASH": "Block not found (incorrect hash)",
+    "DOWNLOAD_REVOCATION_FAILED": "Error while downloading revocation file.",
+    "REVOCATION_FAILED": "Error while trying to revoke the identity.",
+    "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong secret identifier or password ",
+    "RECOVER_ID_FAILED": "Could not recover password",
+    "LOAD_FILE_FAILED" : "Unable to load file",
+    "NOT_VALID_REVOCATION_FILE": "Invalid revocation file (wrong file format)",
+    "NOT_VALID_SAVE_ID_FILE": "Invalid credentials backup file (wrong file format)",
+    "NOT_VALID_KEY_FILE": "Invalid keychain file (unrecognized format)",
+    "EXISTING_ACCOUNT": "Your identifiers correspond to an already existing account, whose <a ng-click=\"showHelpModal('pubkey')\">public key</a> is:",
+    "EXISTING_ACCOUNT_REQUEST": "Please modify your credentials so that they correspond to an unused account.",
+    "GET_LICENSE_FILE_FAILED": "Unable to get license file",
+    "CHECK_NETWORK_CONNECTION": "No peer appears to be accessible.<br/><br/>Please <b>check your Internet connection</b>.",
+    "ISSUE_524_TX_FAILED": "Failed to transfer.<br/><br/>A message has been sent to developers to help solve the problem.<b>Thank you for your help</b>.",
+    "ADD_SECONDARY_WALLET_FAILED": "Unable to add secondary wallet.",
+    "UPDATE_WALLET_LIST_FAILED": "Unable to refresh the list of wallets.",
+    "LOAD_WALLET_LIST_FAILED": "Unable to load the list of wallets.",
+    "SAVE_WALLET_LIST_FAILED": "Unable to save the list of wallets.",
+    "COULD_NOT_ADD_MAIN_WALLET": "This wallet <b>is the main account</b> with which you are connected. Unable to add it as a secondary wallet.",
+    "COULD_NOT_ADD_EXISTING_WALLET": "Wallet already existing in the list.",
+    "UNKNOWN_WALLET_ID": "Unknown secondary wallet.",
+    "RESTORE_WALLET_LIST_FAILED": "Unable to restore the list of wallets.",
+    "INVALID_FILE_FORMAT": "Invalid file format.",
+    "SAME_TX_RECIPIENT": "The recipient must be different from the issuer."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Information",
+    "CERTIFICATION_DONE": "Identity successfully signed",
+    "NOT_ENOUGH_CREDIT": "Not enough credit",
+    "TRANSFER_SENT": "Transfer request successfully sent",
+    "COPY_TO_CLIPBOARD_DONE": "Copy succeeded",
+    "MEMBERSHIP_OUT_SENT": "Membership revocation sent",
+    "NOT_NEED_MEMBERSHIP": "Already a member.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "This identity will soon lack certification (at least {{willNeedCertificationCount}}).",
+    "IDENTITY_NEED_MEMBERSHIP": "This identity did not send a membership request. She will have to if she wishes to become a member.",
+    "HAS_ALTERNATIVE_IDENTITIES": "There are <b>multiple identities</b> attached to this public key. <b>Before any certification</b>, please <a ng-click=\"doQuickFix('showSelectIdentities')\">check other identities</a> to choose the correct one, or contact the wallet owner.",
+    "REVOCATION_SENT": "Revocation sent successfully",
+    "REVOCATION_SENT_WAITING_PROCESS": "Revocation <b>has been sent successfully</b>. It is awaiting processing.",
+    "FEATURES_NOT_IMPLEMENTED": "This features is not implemented yet.<br/><br/>Why not to contribute to get it faster? ;)",
+    "EMPTY_TX_HISTORY": "No operations to export"
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Confirmation</b>",
+    "POPUP_WARNING_TITLE": "<b>Warning</b>",
+    "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Security warning</b>",
+    "CERTIFY_RULES_TITLE_UID": "Certify {{uid}}",
+    "CERTIFY_RULES": "<b class=\"assertive\">Don't certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?",
+    "FULLSCREEN": "View the application in full screen?",
+    "EXIT_APP": "Close the application ?",
+    "TRANSFER": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",
+    "TRANSFER_ALL": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>",
+    "MEMBERSHIP_OUT": "This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",
+    "MEMBERSHIP_OUT_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>terminate your membership</b>?",
+    "LOGIN_UNUSED_WALLET_TITLE": "Typing error?",
+    "LOGIN_UNUSED_WALLET": "The account seems to be <b>inactive</b>.<br/><br/>It's probably a <b>typing error</b> when sign in. Please try again, checking that <b>public key is yours<b/>.",
+    "FIX_IDENTITY": "The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?",
+    "FIX_MEMBERSHIP": "Your application for membership will be sent.<br/></br/><b>Are you sure?</b>",
+    "MEMBERSHIP": "Your membership request will be sent. <br/></br/><b>Are you sure?</b>",
+    "RENEW_MEMBERSHIP": "Your membership will be renewed.<br/></br/><b>Are you sure?</b>",
+    "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?",
+    "REVOKE_IDENTITY_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?",
+    "SAVE_BEFORE_LEAVE": "Do you want to <b>save your changes</b> before leaving the page?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Changes not saved",
+    "LOGOUT": "Are you sure you want to logout?",
+    "USE_FALLBACK_NODE": "Peer <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the <b>{{new}}</b> node?",
+    "ISSUE_524_SEND_LOG": "The transaction was rejected because of a known problem (issue #524) but not reproduced.<br/><br/>To help developers correct this error, do you accept <b>the transmission of your logs</b> per message?<br/><small>(No confidential data is sent)</small>"
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Revocation file</b>",
+    "POPUP_REVOKE_MESSAGE": "To safeguard your account, please download the <b>account revocation document</b>. It will allow you to cancel your account (in case of account theft, ID, an incorrectly created account, etc.).<br/><br/><b>Please store it in a safe place.</b>"
+  },
+  "HELP": {
+    "TITLE": "Online help",
+    "JOIN": {
+      "SECTION": "Join",
+      "SALT": "The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.",
+      "PASSWORD": "The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",
+      "PSEUDO": "A pseudonym is used only when joining as <span class=\"text-italic\">member</span>. It is always associated with a wallet (by its <span class=\"text-italic\">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past)."
+    },
+    "LOGIN": {
+      "SECTION": "Log in",
+      "PUBKEY": "Account public key",
+      "PUBKEY_DEF": "The public key of the keychain is generated from the entered identifiers (any), but does not correspond to an account already used.<br/><b>Make sure your public key is the same as your account</b>. Otherwise, you will be logged into an account that is probably never used, as the risk of collision with an existing account is very small.<br/><a href=\"https://en.wikipedia.org/wiki/Elliptic_curve_cryptography\" target=\"_ system\">Learn more about cryptography</a> by public key.",
+      "METHOD": "Connection methods",
+      "METHOD_DEF": "Several options are available to connect to a portfolios: <br/> - The connection <b>with salt (simple or advanced)</b> mixes your password with the secret identifier, to limit the attempts of piracy<br/> - The connection <b>using public key</b> prevents you from entering your credentials, which you will be asked only when an operation need it.<br/> - The connection <b>using keychain file</b> will read the public and private keys of the account from a file without the need to enter credentials. Several file formats are possible."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glossary",
+      "PUBKEY_DEF": "A public key always identifies a wallet. It may identify a member. In Cesium it is calculated using the secret identifier and the password.",
+      "MEMBER": "Member",
+      "MEMBER_DEF": "A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class=\"text-italic\">currency parameters</span>.",
+      "CURRENCY_RULES": "Currency rules",
+      "CURRENCY_RULES_DEF": "The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class=\"text-italic\">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href=\"#/app/currency\">See current parameters</a>.",
+      "BLOCKCHAIN": "Blockchain",
+      "BLOCKCHAIN_DEF": "The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class=\"text-italic\">currency rules</span>.<br/><a href=\"http://en.duniter.org/presentation/\" target=\"_blank\">Read more about Duniter</a> and the working of its blockchain.",
+      "UNIVERSAL_DIVIDEND_DEF": "The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class=\"text-italic\">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">Read more about RTM</a> and open money.",
+      "WOT": "Web of Trust (WoT)",
+      "WOT_DEF": "The Web of Trust is made up of all the members of the currency, and the links of certification which connect them.",
+      "DISTANCE_RULE": "Distance rule",
+      "DISTANCE_RULE_DEF": "The rule of distance defines <b>a maximum distance to meet</b> between an applicant and a minimum number of referring member. This distance is calculated using the certification links."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",
+      "CURRENCY_WOT": "The <b>member count</b> shows the <b>community's weight and evolution</b>.",
+      "CURRENCY_MASS": "Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",
+      "CURRENCY_UNIT_RELATIVE": "The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",
+      "CURRENCY_CHANGE_UNIT": "The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "The option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",
+      "CURRENCY_RULES": "The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",
+      "MENU_BTN_NETWORK": "Menu <b>{{'MENU.NETWORK'|translate}}</b> allows discovery of <b>network's state<b>.",
+      "NETWORK_BLOCKCHAIN": "All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",
+      "NETWORK_PEERS": "The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "This <b>number</b> (in green) indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre). <a target=\"_new\" href=\"{{installDocUrl}}\" target=\"_system\">Read the installation manual &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Here you can consult your account status, transaction history and your certifications.",
+      "WALLET_CERTIFICATIONS": "Click here to reveiw the details of your certifications (given and received).",
+      "WALLET_RECEIVED_CERTIFICATIONS": "Click here to review the details of your <b>received certifications</b>.",
+      "WALLET_GIVEN_CERTIFICATIONS": "Click here to review the details of your <b>given certifications</b>.",
+      "WALLET_BALANCE": "Your account <b>balance</b> is shown here.",
+      "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",
+      "WALLET_BALANCE_CHANGE_UNIT": "You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",
+      "WALLET_PUBKEY": "This is your account public key. You can communicate it to a third party so that it more easily identifies your account.",
+      "WALLET_SEND": "Issue a payment in just a few clicks.",
+      "WALLET_SEND_NO_MONEY": "Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",
+      "WALLET_OPTIONS": "Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",
+      "WALLET_RECEIVED_CERTS": "This shows the list of persons that certified you.",
+      "WALLET_CERTIFY": "The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",
+      "WALLET_CERT_STOCK": "Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",
+      "MENU_BTN_WALLETS": "The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.",
+      "MENU_BTN_TX": "The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.",
+      "MENU_BTN_WOT": "The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",
+      "WOT_SEARCH_TEXT_XS": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",
+      "WOT_SEARCH_TEXT": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",
+      "WOT_SEARCH_RESULT": "Simply click a user row to view the details sheet.",
+      "WOT_VIEW_CERTIFICATIONS": "The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Click here to open <b>a list of all certifications</b> given to and by this identity.",
+      "WOT_VIEW_CERTIFY": "The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",
+      "CERTIFY_RULES": "<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",
+      "MENU_BTN_SETTINGS": "The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",
+      "HEADER_BAR_BTN_PROFILE": "Click here to access your <b>user profile</b>",
+      "SETTINGS_CHANGE_UNIT": "You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",
+      "END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",
+      "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below."
+    }
+  },
+  "API" :{
+    "COMMON": {
+      "LINK_DOC": "API documentation",
+      "LINK_DOC_HELP": "API documentation for developers",
+      "LINK_STANDARD_APP": "Standard version",
+      "LINK_STANDARD_APP_HELP": "Open standard version of {{'COMMON.APP_NAME'|translate}}",
+      "CONNECTION_ERROR": "Peer <b>{{server}}</b> unreachable or invalid address.<br/><br/>Check your Internet connection, or contact the web site administrator."
+    },
+    "HOME": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} API Documentation",
+      "MESSAGE": "Welcome to the {{'COMMON.APP_NAME'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
+      "MESSAGE_SHORT": "Connect your websites to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
+      "DOC_HEADER": "Available services:"
+    },
+    "TRANSFER": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} - Online payment",
+      "TITLE_SHORT": "Online payment",
+      "SUMMARY": "Order summary:",
+      "AMOUNT": "Amount:",
+      "AMOUNTS_HELP": "Please select the amount:",
+      "NAME": "Name:",
+      "PUBKEY": "Public key of the recipient:",
+      "COMMENT": "Order reference:",
+      "NODE": "Peer address:",
+      "DEMO": {
+        "SALT": "demo",
+        "PASSWORD": "demo",
+        "PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
+        "HELP": "<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
+        "BAD_CREDENTIALS": "Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
+      },
+      "INFO": {
+        "SUCCESS_REDIRECTING_WITH_NAME": "Payment sent.<br/>Redirect to <b>{{name}}</b>...",
+        "SUCCESS_REDIRECTING": "Payment sent.<br/>Redirect to the seller's website...",
+        "CANCEL_REDIRECTING_WITH_NAME": "Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",
+        "CANCEL_REDIRECTING": "Payment cancelled.<br/>Redirect to the seller's website..."
+      },
+      "ERROR": {
+        "TRANSFER_FAILED": "Payment failed"
+      }
+    },
+    "DOC": {
+      "DESCRIPTION_DIVIDER": "Description",
+      "URL_DIVIDER": "Calling address",
+      "PARAMETERS_DIVIDER": "Parameters",
+      "AVAILABLE_PARAMETERS": "Here is the list of al available parameters:",
+      "DEMO_DIVIDER": "Try it !",
+      "DEMO_HELP": "To test this service, click on this button. The result content will be display below.",
+      "DEMO_RESULT": "Result returned by call:",
+      "DEMO_RESULT_PEER": "Peer address used:",
+      "DEMO_SUCCEED": "<i class=\"icon ion-checkmark\"></i> Success!",
+      "DEMO_CANCELLED": "<i class=\"icon ion-close\"></i> Canceled by user",
+      "INTEGRATE_DIVIDER": "Website integration",
+      "INTEGRATE_CODE": "Code:",
+      "INTEGRATE_RESULT": "Result preview:",
+      "INTEGRATE_PARAMETERS": "Parameters",
+      "TRANSFER": {
+        "TITLE": "Payments",
+        "DESCRIPTION": "From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",
+        "PARAM_PUBKEY": "Recipient's public key",
+        "PARAM_PUBKEY_HELP": "Recipient's public key (required)",
+        "PARAM_AMOUNT": "Amount",
+        "PARAM_AMOUNT_HELP": "Transaction amount (required)",
+        "PARAM_COMMENT": "Reference (or comment)",
+        "PARAM_COMMENT_HELP": "Reference or comment. You will allow for example to identify the payment in the BlockChain.",
+        "PARAM_NAME": "Name (of recipient or website)",
+        "PARAM_NAME_HELP": "The name of your website. This can be a readable name (eg \"My online site\"), or a web address (eg \"www.MySite.com\").",
+        "PARAM_REDIRECT_URL": "URL redirection",
+        "PARAM_REDIRECT_URL_HELP": "URL redirection after sending payment, after the payment has been sent. Can contain the following strings, which will be replaced by the values of the transaction: \"{tx}\", \"{hash}\", \"{comment}\", \"{amount}\" and \"{pubkey}\".",
+        "PARAM_CANCEL_URL": "URL if cancelled",
+        "PARAM_CANCEL_URL_HELP": "URL in case of cancellation.  Can contain the following strings, which will be replaced: \"{comment}\", \"{amount}\" and \"{pubkey}\".",
+        "PARAM_PREFERRED_NODE": "Preferred Duniter peer",
+        "PARAM_PREFERRED_NODE_HELP": "Peer address (URL) to use preferably (\"g1.domain.com:443\" or \"https://g1.domain.com\")",
+        "EXAMPLES_HELP": "Examples of integration:",
+        "EXAMPLE_BUTTON": "HTML Button",
+        "EXAMPLE_BUTTON_DEFAULT_TEXT": "Pay in {{currency|abbreviate}}",
+        "EXAMPLE_BUTTON_DEFAULT_STYLE": "Custom style",
+        "EXAMPLE_BUTTON_TEXT_HELP": "Button text",
+        "EXAMPLE_BUTTON_BG_COLOR": "Background color",
+        "EXAMPLE_BUTTON_BG_COLOR_HELP": "eg: #fbc14c, yellow, lightgrey, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_FONT_COLOR": "Font color",
+        "EXAMPLE_BUTTON_FONT_COLOR_HELP": "eg: black, orange, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_TEXT_ICON": "Icon",
+        "EXAMPLE_BUTTON_TEXT_WIDTH": "Width",
+        "EXAMPLE_BUTTON_TEXT_WIDTH_HELP": "eg: 200px, 50%",
+        "EXAMPLE_BUTTON_ICON_NONE": "No icon",
+        "EXAMPLE_BUTTON_ICON_DUNITER": "Duniter logo",
+        "EXAMPLE_BUTTON_ICON_CESIUM": "Cesium logo",
+        "EXAMPLE_BUTTON_ICON_G1_COLOR": "Äž1 logo",
+        "EXAMPLE_BUTTON_ICON_G1_BLACK": "Äž1 logo (outline)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("eo-EO", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "date : {{build}}",
+    "PUBKEY": "Publika ŝlosilo",
+    "MEMBER": "Membro",
+    "BLOCK" : "Bloko",
+    "BTN_OK": "OK",
+    "BTN_YES": "Jes",
+    "BTN_NO": "Ne",
+    "BTN_SEND": "Sendi",
+    "BTN_SEND_MONEY": "Fari elspezon",
+    "BTN_SEND_MONEY_SHORT": "Elspezo",
+    "BTN_SAVE": "Konservi",
+    "BTN_YES_SAVE": "Jes, Konservi",
+    "BTN_YES_CONTINUE": "Jes, DaÅ­rigi",
+    "BTN_SHOW": "Vidi",
+    "BTN_SHOW_PUBKEY": "Afiŝi la publikan ŝlosilon",
+    "BTN_RELATIVE_UNIT": "Afiŝi la sumojn en UD?",
+    "BTN_BACK": "Reiro",
+    "BTN_NEXT": "Sekva",
+    "BTN_IMPORT": "Enporti",
+    "BTN_CANCEL": "Nuligi",
+    "BTN_CLOSE": "Fermi",
+    "BTN_LATER": "Poste",
+    "BTN_LOGIN": "Konektiĝi",
+    "BTN_LOGOUT": "Malkonektiĝo",
+    "BTN_ADD_ACCOUNT": "Nova konto",
+    "BTN_SHARE": "Diskonigi",
+    "BTN_EDIT": "Modifi",
+    "BTN_DELETE": "Forigi",
+    "BTN_ADD": "Aldoni",
+    "BTN_SEARCH": "Serĉi",
+    "BTN_REFRESH": "Aktualigi",
+    "BTN_RETRY": "Rekomenci",
+    "BTN_START": "Komenci",
+    "BTN_CONTINUE": "DaÅ­rigi",
+    "BTN_CREATE": "Krei",
+    "BTN_UNDERSTOOD": "Mi komprenis",
+    "BTN_OPTIONS": "Kromeblecoj",
+    "BTN_HELP_TOUR": "Gvidata vizito",
+    "BTN_HELP_TOUR_SCREEN": "Malkovri tiun ĉi paĝon",
+    "BTN_DOWNLOAD": "Elŝuti",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Elŝuti la konto-tabelon",
+    "BTN_MODIFY": "Modifi",
+    "CHOOSE_FILE": "Almetu vian dosieron <br/>aŭ klaku por elekti ĝin",
+    "DAYS": "tagoj",
+    "NO_ACCOUNT_QUESTION": "Ankoraŭ sen konto? Kreu ĝin senpage!",
+    "SEARCH_NO_RESULT": "Neniu rezulto trovita",
+    "LOADING": "Bonvolu pacienci...",
+    "LOADING_WAIT": "Bonvolu pacienci...<br/><small>(Atendado pri disponebleco de la nodo)</small>",
+    "SEARCHING": "Serĉanta...",
+    "FROM": "De",
+    "TO": "Al",
+    "COPY": "Kopii",
+    "LANGUAGE": "Lingvo",
+    "UNIVERSAL_DIVIDEND": "Universala dividendo",
+    "UD": "UD",
+    "DATE_PATTERN": "DD/MM/YY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "DD/MM/YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+    "EMPTY_PARENTHESIS": "(malplena)",
+    "UID": "PseÅ­donimo",
+    "ENABLE": "Aktiva",
+    "DISABLE": "Malaktiva",
+    "RESULTS_LIST": "Rezultoj",
+    "RESULTS_COUNT": "{{count}} rezultoj",
+    "EXECUTION_TIME": "Plenumita en {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "Afiŝi la signojn klare?",
+    "POPOVER_ACTIONS_TITLE": "Kromeblecoj",
+    "POPOVER_FILTER_TITLE": "Filtriloj",
+    "SHOW_MORE": "Afiŝi pli",
+    "SHOW_MORE_COUNT": "(nuna limo je {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Diskonigi",
+      "SHARE_ON_TWITTER": "Diskonigi ĉe Twitter",
+      "SHARE_ON_FACEBOOK": "Diskonigi ĉe Facebook",
+      "SHARE_ON_DIASPORA": "Diskonigi ĉe Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Diskonigi ĉe Google+"
+    },
+    "FILE": {
+      "DATE": "Dato:",
+      "TYPE": "Tipo:",
+      "SIZE": "Pezo:",
+      "VALIDATING": "Validiĝanta..."
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Elekti la fonton:",
+    "BTN_PICTURE_GALLERY": "Bildaro",
+    "BTN_PICTURE_CAMERA": "<b>Kamerao</b>"
+  },
+  "MENU": {
+    "HOME": "Hejmpaĝo",
+    "WOT": "Kontaro",
+    "CURRENCY": "Mono",
+    "ACCOUNT": "Mia konto",
+    "WALLETS": "Miaj monujoj",
+    "SETTINGS": "Parametroj",
+    "NETWORK": "Reto",
+    "TRANSACTIONS": "Miaj spezoj"
+  },
+  "ABOUT": {
+    "TITLE": "Prie",
+    "LICENSE": "Programo <b>libera</b> (Licenco GNU AGPLv3).",
+    "LATEST_RELEASE": "Ekzistas <b>pli freŝdata versio</b> de {{'COMMON.APP_NAME'|translate}} (<b>v{{version}}</b>)",
+    "PLEASE_UPDATE": "Bonvolu ĝisdatigi {{'COMMON.APP_NAME'|translate}} (lasta versio: <b>v{{version}}</b>)",
+    "CODE": "Fonto-kodo:",
+    "OFFICIAL_WEB_SITE": "Oficiala retejo:",
+    "DEVELOPERS": "Programita de:",
+    "FORUM": "Forumo:",
+    "PLEASE_REPORT_ISSUE": "Ne hezitu sciigi al ni la renkontitajn fuŝaĵojn",
+    "REPORT_ISSUE": "Sciigi problemon",
+    "BTN_OPEN_DEV_WINDOW": "Malfermi la fenestron pri malfuŝigado"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Bonvenon ĉe la programo Cesium!",
+    "MESSAGE": "Ricevu kaj sendu liberan monon {{currency|abbreviate}}",
+    "BTN_CURRENCY": "Esploru la monon {{name|abbreviate}}",
+    "BTN_ABOUT": "prie",
+    "BTN_HELP": "Reta helpo",
+    "REPORT_ISSUE": "fuŝaĵo",
+    "NOT_YOUR_ACCOUNT_QUESTION" : "Vi ne posedas la konton <b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b> ?",
+    "BTN_CHANGE_ACCOUNT": "Malkonektu tiun ĉi konton",
+    "CONNECTION_ERROR": "Nodo <b>{{server}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Kontrolu vian retkonekton, aŭ elektu alian nodon <a class=\"positive\" ng-click=\"doQuickFix('settings')\">ĉe la parametroj</a>."
+  },
+  "SETTINGS": {
+    "TITLE": "Parametroj",
+    "DISPLAY_DIVIDER": "Afiŝado",
+    "STORAGE_DIVIDER": "Stokado",
+    "NETWORK_SETTINGS": "Reto",
+    "PEER": "Adreso de la nodo Duniter",
+    "PEER_SHORT": "Adreso de la nodo",
+    "PEER_CHANGED_TEMPORARY": "Adreso provizore uzata",
+    "USE_LOCAL_STORAGE": "Aktivigi lokan stokadon",
+    "USE_LOCAL_STORAGE_HELP": "Ebligas konservi viajn parametrojn",
+    "WALLETS_SETTINGS": "Miaj monujoj",
+    "USE_WALLETS_ENCRYPTION": "Sekurigi la liston?",
+    "USE_WALLETS_ENCRYPTION_HELP": "Ebligas sekurigi la liston de viaj monujoj (per ĉifrado), postulante aŭtentigado por aliri ilin.",
+    "ENABLE_HELPTIP": "Aktivigi la rilatigajn help-vezikojn",
+    "ENABLE_UI_EFFECTS": "Aktivigi la vid-efikojn",
+    "HISTORY_SETTINGS": "Miaj spezoj",
+    "DISPLAY_UD_HISTORY": "Afiŝi la produktitajn dividendojn?",
+    "TX_HISTORY_AUTO_REFRESH": "Aktualigi aÅ­tomate",
+    "TX_HISTORY_AUTO_REFRESH_HELP": "Aktualigas la saldon kaj la spezojn aŭtomate, por ĉiu nova bloko de la reto.",
+    "AUTHENTICATION_SETTINGS": "AÅ­tentigado",
+    "KEEP_AUTH": "AÅ­tomata malaÅ­tentigado",
+    "KEEP_AUTH_SHORT": "MalaÅ­tentigado",
+    "KEEP_AUTH_HELP": "Difinas la momenton, kiam la aŭtentigado estas forviŝita de la memoro.",
+    "KEEP_AUTH_OPTION": {
+      "NEVER": "Post ĉiu ago",
+      "SECONDS": "Post {{value}}s de neatktiveco",
+      "MINUTE": "Post {{value}}min de neatktiveco",
+      "MINUTES": "Post {{value}}min de neatktiveco",
+      "HOUR": "Post {{value}}h de neatktiveco",
+      "ALWAYS": "Fine de la sesio"
+    },
+    "KEYRING_FILE": "Dosiero pri ŝlosilaro",
+    "KEYRING_FILE_HELP": "Ebligas <b>konektiĝi</b> aŭtomate por ĉiu ekuzo<br/>kaj eĉ <b>aŭtentiĝi</b> (nur se \"Finiĝo de la aŭtentiĝo\" estas agordita kiel \"fine de la sesio\").",
+    "REMEMBER_ME": "Memori min?",
+    "REMEMBER_ME_HELP": "Ebligas resti identigita de sesio al alia, loke konservante la publikan ŝlosilon.",
+    "PLUGINS_SETTINGS": "Krom-programoj",
+    "BTN_RESET": "Restarigi la originajn valorojn",
+    "EXPERT_MODE": "Aktivigi la spertan moduson",
+    "EXPERT_MODE_HELP": "Ebligas pli detalan afiŝadon.",
+    "BLOCK_VALIDITY_WINDOW": "Limtempo pri necerteco de la blokoj",
+    "BLOCK_VALIDITY_WINDOW_SHORT": "Limtempo pri necerteco",
+    "BLOCK_VALIDITY_WINDOW_HELP": "Limtempo antaÅ­ ol taksi, ke iu informo estas validigita",
+    "BLOCK_VALIDITY_OPTION": {
+      "NONE": "Neniu limtempo",
+      "N": "{{time | formatDuration}} ({{count}} blokoj)"
+    },
+    "POPUP_PEER": {
+      "TITLE": "Nodo Duniter",
+      "HOST": "Adreso",
+      "HOST_HELP": "Adreso: servilo: konektujo",
+      "USE_SSL": "Sekurigita?",
+      "USE_SSL_HELP": "(SSL-ĉifrado)",
+      "BTN_SHOW_LIST": "Listo de la nodoj"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Haketo: {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Bloko #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Nuna bloko",
+      "TITLE": "Bloko #{{number|formatInteger}}",
+      "COMPUTED_BY": "Kalkulita de la nodo de",
+      "SHOW_RAW": "Vidi la kompletan dosieron",
+      "TECHNICAL_DIVIDER": "Teknikaj informoj",
+      "VERSION": "Versio de la daten-strukturo",
+      "HASH": "Kalkulita haketo",
+      "UNIVERSAL_DIVIDEND_HELP": "Mono kunproduktita de ĉiu el la {{membersCount}} membroj",
+      "EMPTY": "Neniu dateno en tiu ĉi bloko",
+      "POW_MIN": "Minimuma malfacileco",
+      "POW_MIN_HELP": "Malfacileco trudita por la haket-kalkulo",
+      "DATA_DIVIDER": "Datenoj",
+      "IDENTITIES_COUNT": "Novaj identecoj",
+      "JOINERS_COUNT": "Novaj membroj",
+      "ACTIVES_COUNT": "Revalidigoj",
+      "ACTIVES_COUNT_HELP": "Membroj revalidigintaj sian membrecon",
+      "LEAVERS_COUNT": "Membroj elirintaj",
+      "LEAVERS_COUNT_HELP": "Membroj ne plu dezirantaj atestaĵon",
+      "EXCLUDED_COUNT": "Membroj eksigitaj",
+      "EXCLUDED_COUNT_HELP": "Malnovaj membroj eksigitaj pro nerevalidiĝo aŭ manko de atestaĵoj",
+      "REVOKED_COUNT": "Nuligitaj identecoj",
+      "REVOKED_COUNT_HELP": "Tiuj kontoj ne plu povos esti membroj",
+      "TX_COUNT": "Spezoj",
+      "CERT_COUNT": "Atestaĵoj",
+      "TX_TO_HIMSELF": "Operacio pri monŝanĝo",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Kondiĉoj por malblokado",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "kaj",
+        "OR": "aÅ­"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>Subskribo</b> de ",
+        "XHX": "<b>Pasvorto</b>, el kiu SHA256 =",
+        "CSV": "Blokita dum",
+        "CLTV": "Blokita ĝis"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Blokoj",
+      "NO_BLOCK": "Neniu bloko",
+      "LAST_BLOCKS": "Lastaj blokoj:",
+      "BTN_COMPACT": "Densigi"
+    }
+  },
+  "CURRENCY": {
+    "VIEW": {
+      "TITLE": "Mono",
+      "TAB_CURRENCY": "Mono",
+      "TAB_WOT": "Reto de fido",
+      "TAB_NETWORK": "Reto",
+      "TAB_BLOCKS": "Blokoj",
+      "CURRENCY_SHORT_DESCRIPTION": "{{currency|abbreviate}} estas <b>libera mono</b>, kiu ekis {{firstBlockTime|formatFromNow}}. Ĝi nombras nun <b>{{N}} membrojn</b>, kiuj produktas kaj ricevas <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a> (UD), ĉiun {{dt|formatPeriod}}n.",
+      "NETWORK_RULES_DIVIDER": "Reguloj de la reto",
+      "CURRENCY_NAME": "Nomo de la mono",
+      "MEMBERS": "Nombro de membroj",
+      "MEMBERS_VARIATION": "Variado depost la lasta UD",
+      "MONEY_DIVIDER": "Mono",
+      "MASS": "Mona maso",
+      "SHARE": "Maso por membro",
+      "UD": "Universala Dividendo",
+      "C_ACTUAL": "Nuna kreskado",
+      "MEDIAN_TIME": "Horo de la blokĉeno",
+      "POW_MIN": "Minimuma nivelo pri malfacileco de kalkulo",
+      "MONEY_RULES_DIVIDER": "Reguloj de la mono",
+      "C_RULE": "Teoria kreskado celata",
+      "UD_RULE": "Kalkulo de la universala dividendo",
+      "DT_REEVAL": "Periodo de revalorigo de la UD",
+      "REEVAL_SYMBOL": "reval",
+      "DT_REEVAL_VALUE": "Ĉiuj <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+      "UD_REEVAL_TIME0": "Dato de la unua revalorigo",
+      "SIG_QTY_RULE": "Nombro de necesaj atestaĵoj por fariĝi membro",
+      "SIG_STOCK": "Maksimuma nombro da senditaj atestaĵoj por membro",
+      "SIG_PERIOD": "Minimuma daŭro de atendado inter 2 sinsekvaj atestaĵoj senditaj de sama persono",
+      "SIG_WINDOW": "Limdaŭro por akcepti atestaĵon",
+      "SIG_VALIDITY": "Vivdaŭro de atestaĵo, kiu estis akceptita",
+      "MS_WINDOW": "Limdaŭro por akcepti aliĝ-peton kiel membron",
+      "MS_VALIDITY": "Vivdaŭro de aliĝo, kiu estis akceptita",
+      "STEP_MAX": "Maksimuma distanco, per la atestaĵoj, inter nova eniranto kaj la referencaj membroj",
+      "WOT_RULES_DIVIDER": "Reguloj de la reto de fido",
+      "SENTRIES": "Nombro de atestaĵoj (senditaj <b>kaj</b> ricevitaj) por fariĝi referenca membro",
+      "SENTRIES_FORMULA": "Nombro de atestaĵoj (senditaj <b>kaj</b> ricevitaj) por fariĝi referenca membro (formulo)",
+      "XPERCENT":"Minimuma procento da referencaj membroj atingenda por konformiĝi al la regulo pri distanco",
+      "AVG_GEN_TIME": "Meza daÅ­ro inter du blokoj",
+      "CURRENT": "nuna",
+      "MATH_CEILING": "PLAFONO",
+      "DISPLAY_ALL_RULES": "Afiŝi ĉiujn regulojn?",
+      "BTN_SHOW_LICENSE": "Vidi la licencon",
+      "WOT_DIVIDER": "Reto de fido"
+    },
+    "LICENSE": {
+      "TITLE": "Licenco de la mono",
+      "BTN_DOWNLOAD": "Elŝuti la dosieron",
+      "NO_LICENSE_FILE": "Dosiero pri licenco ne trovita."
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Horo de la blokĉeno",
+      "LOADING_PEERS": "Nodoj ŝarĝiĝantaj...",
+      "NODE_ADDRESS": "Adreso:",
+      "SOFTWARE": "Programo",
+      "WARN_PRE_RELEASE": "AntaÅ­-versio (lasta stabila versio: <b>{{version}}</b>)",
+      "WARN_NEW_RELEASE": "Versio <b>{{version}}</b> disponebla",
+      "WS2PID": "Identigilo:",
+      "PRIVATE_ACCESS": "Privata aliro",
+      "POW_PREFIX": "Prefikso pri labor-pruvo:",
+      "ENDPOINTS": {
+        "BMAS": "Sekurigita interfaco (SSL)",
+        "BMATOR": "Reta interfaco TOR",
+        "WS2P": "Interfaco WS2P",
+        "ES_USER_API": "Nodo de datenoj Cesium+"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "La nodoj ne-SSL estas mis-afiŝitaj, ĉar Cesium funkcias laŭ moduso HTTPS."
+    }
+  },
+  "PEER": {
+    "PEERS": "Nodoj",
+    "SIGNED_ON_BLOCK": "Skribita en la bloko",
+    "MIRROR": "spegulo",
+    "MIRRORS": "Speguloj",
+    "MIRROR_PEERS": "Spegul-nodoj",
+    "PEER_LIST" : "Listo de la nodoj",
+    "MEMBERS" : "Membroj",
+    "MEMBER_PEERS" : "Membro-nodoj",
+    "ALL_PEERS" : "Ĉiuj nodoj",
+    "DIFFICULTY" : "Malfacileco",
+    "API" : "API",
+    "CURRENT_BLOCK" : "Bloko #",
+    "POPOVER_FILTER_TITLE": "Filtrilo",
+    "OFFLINE": "Nekonektita",
+    "OFFLINE_PEERS": "Nekonektitaj nodoj",
+    "BTN_SHOW_PEER": "Vidi la nodon",
+    "VIEW": {
+      "TITLE": "Nodo",
+      "OWNER": "Apartenas al",
+      "SHOW_RAW_PEERING": "Vidi la samrangan dokumenton",
+      "SHOW_RAW_CURRENT_BLOCK": "Vidi la lastan blokon (kompleta strukturo)",
+      "LAST_BLOCKS": "Lastaj blokoj konataj",
+      "KNOWN_PEERS": "Konataj nodoj:",
+      "GENERAL_DIVIDER": "Äœeneralaj informoj",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "Neeblas ricevi la informojn de la nodo. La limdaÅ­ro de atendado estas transpasita.",
+        "LOADING_NODE_ERROR": "Neeblas ricevi la informojn de la nodo"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Traserĉado (pseŭdo aŭ publika ŝlosilo)",
+    "SEARCH_INIT_PHASE_WARNING": "Dum la periodo de antaŭ-aliĝo, la traserĉado de la atendantaj aliĝoj <b>povas esti longa</b>. Bonvolu pacienci...",
+    "REGISTERED_SINCE": "Enskribita la",
+    "REGISTERED_SINCE_BLOCK": "Enskribita en la bloko #",
+    "NO_CERTIFICATION": "Neniu atestaĵo validigita",
+    "NO_GIVEN_CERTIFICATION": "Neniu atestaĵo sendita",
+    "NOT_MEMBER_PARENTHESIS": "(ne membro)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(identeco nuligita)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(nuliĝanta)",
+    "EXPIRE_IN": "Finiĝo",
+    "NOT_WRITTEN_EXPIRE_IN": "Limdato<br/>de traktado",
+    "EXPIRED": "Finiĝinta",
+    "PSEUDO": "PseÅ­donimo",
+    "SIGNED_ON_BLOCK": "Sendita en la bloko #{{block}}",
+    "WRITTEN_ON_BLOCK": "Enskribita en la bloko #{{block}}",
+    "GENERAL_DIVIDER": "Äœeneralaj informoj",
+    "NOT_MEMBER_ACCOUNT": "Simpla konto (ne membro)",
+    "NOT_MEMBER_ACCOUNT_HELP": "Temas pri simpla monujo, sen aliĝ-peto atendanta.",
+    "TECHNICAL_DIVIDER": "Teknikaj informoj",
+    "BTN_CERTIFY": "Atesti",
+    "BTN_YES_CERTIFY": "Jes, atesti",
+    "BTN_SELECT_AND_CERTIFY": "Nova atestaĵo",
+    "ACCOUNT_OPERATIONS": "Spezoj en la konto",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identeco {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Reto de fido",
+      "NEWCOMERS": "Novaj membroj",
+      "NEWCOMERS_COUNT": "{{count}} membroj",
+      "PENDING": "Atendantaj enskribiĝoj",
+      "PENDING_COUNT": "{{count}} atendantaj enskribiĝoj",
+      "REGISTERED": "Enskribita {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Membro depost {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Novaj membroj",
+      "BTN_PENDING": "Atendantaj enskribiĝoj",
+      "SHOW_MORE": "Afiŝi pli",
+      "SHOW_MORE_COUNT": "(nuna limo je {{limit}})",
+      "NO_PENDING": "Neniu enskribiĝo atendanta.",
+      "NO_NEWCOMERS": "Neniu membro."
+    },
+    "CONTACTS": {
+      "TITLE": "Kontaktoj"
+    },
+    "MODAL": {
+      "TITLE": "Traserĉado"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Atestaĵoj",
+      "SUMMARY": "Ricevitaj atestaĵoj",
+      "LIST": "Detalo pri la ricevitaj atestaĵoj",
+      "PENDING_LIST": "Atestaĵoj atendantaj traktadon",
+      "RECEIVED": "Ricevitaj atestaĵoj",
+      "RECEIVED_BY": "Atestaĵoj ricevitaj de {{uid}}",
+      "ERROR": "Atestaĵoj erare ricevitaj",
+      "SENTRY_MEMBER": "Referenca membro"
+    },
+    "OPERATIONS": {
+      "TITLE": "{{uid}} - Spezoj"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Senditaj atestaĵoj",
+      "SUMMARY": "Senditaj atestaĵoj",
+      "LIST": "Detalo pri la senditaj atestaĵoj",
+      "PENDING_LIST": "Atestaĵoj atendantaj traktadon",
+      "SENT": "Senditaj atestaĵoj",
+      "SENT_BY": "Atestaĵoj senditaj de {{uid}}",
+      "ERROR": "Atestaĵoj erare senditaj"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-log-in\"></i> Konektiĝo",
+    "SCRYPT_FORM_HELP": "Bonvolu tajpi viajn identigilojn.<br>Pensu kontroli, ke la publika ŝlosilo estas tiu de via konto.",
+    "PUBKEY_FORM_HELP": "Bonvolu tajpi publikan ŝlosilon de konto:",
+    "FILE_FORM_HELP": "Elektu la ŝlosilaro-dosieron uzotan:",
+    "SCAN_FORM_HELP": "Skani la QR-kodon de monujo.",
+    "SALT": "Sekreta identigilo",
+    "SALT_HELP": "Sekreta identigilo",
+    "SHOW_SALT": "Afiŝi la sekretan identigilon?",
+    "PASSWORD": "Pasvorto",
+    "PASSWORD_HELP": "Pasvorto",
+    "PUBKEY_HELP": "Publika ŝlosilo aŭ pseŭdonimo",
+    "NO_ACCOUNT_QUESTION": "Vi ankoraÅ­ ne havas konton?",
+    "HAVE_ACCOUNT_QUESTION": "Vi jam havas konton?",
+    "CREATE_ACCOUNT": "Krei konton...",
+    "CREATE_FREE_ACCOUNT": "Krei konton senpage",
+    "FORGOTTEN_ID": "Pasvorto forgesita?",
+    "ASSOCIATED_PUBKEY": "Publika ŝlosilo de la ŝlosilaro:",
+    "BTN_METHODS": "Aliaj metodoj",
+    "BTN_METHODS_DOTS": "Ŝanĝi metodon...",
+    "METHOD_POPOVER_TITLE": "Metodoj",
+    "MEMORIZE_AUTH_FILE": "Memorigi tiun ŝlosilaron por la daŭro de la sesio de retumado",
+    "SCRYPT_PARAMETERS": "Parametroj (Skripto):",
+    "AUTO_LOGOUT": {
+      "TITLE": "Informo",
+      "MESSAGE": "<i class=\"ion-android-time\"></i> Vi estis <b>malkonektita</b> aÅ­tomate, pro tro longa senaktiveco.",
+      "BTN_RELOGIN": "Rekonektiĝi",
+      "IDLE_WARNING": "Vi estos malkonektita... {{countdown}}"
+    },
+    "METHOD": {
+      "SCRYPT_DEFAULT": "Sekreta identigilo kaj pasvorto",
+      "SCRYPT_ADVANCED": "Sperta salumado",
+      "FILE": "Dosiero pri ŝlosilaro",
+      "PUBKEY": "Publika ŝlosilo aŭ pseŭdonimo",
+      "SCAN": "Skani QR-kodon"
+    },
+    "SCRYPT": {
+      "SIMPLE": "Malpeza salumado",
+      "DEFAULT": "Kutima salumado",
+      "SECURE": "Sekura salumado",
+      "HARDEST": "Plej sekura salumado",
+      "EXTREME": "Ekstrema salumado",
+      "USER": "Personigita salumado",
+      "N": "N (Loop):",
+      "r": "r (RAM):",
+      "p": "p (CPU):"
+    },
+    "FILE": {
+      "HELP": "Atendita strukturo de dosiero: <b>.yml</b> aÅ­ <b>.dunikey</b> (tipo PubSec, WIF aÅ­ EWIF)."
+    }
+  },
+  "AUTH": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> AÅ­tentigado",
+    "BTN_AUTH": "Aŭtentiĝi",
+    "GENERAL_HELP": "Bonvolu aŭtentiĝi:",
+    "EXPECTED_UID_HELP": "Bonvolu aŭtentiĝi ĉe la konto <i class=\"ion-person\"></i> {{uid}} :",
+    "EXPECTED_PUBKEY_HELP": "Bonvolu aŭtentiĝi ĉe la monujo <br class=\"visible-xs\"/><i class=\"ion-key\"></i> {{pubkey|formatPubkey}} :",
+    "SCAN_FORM_HELP": "Skani la QR-kodon de la <b>privata ŝlosilo</b> de la monujo."
+  },
+  "ACCOUNT": {
+    "TITLE": "Mia konto",
+    "BALANCE": "Saldo",
+    "LAST_TX": "Lastaj spezoj validigitaj",
+    "BALANCE_ACCOUNT": "Konto-saldo",
+    "NO_TX": "Neniu spezo",
+    "SHOW_MORE_TX": "Afiŝi pli",
+    "SHOW_ALL_TX": "Afiŝi ĉion",
+    "TX_FROM_DATE": "(nuna limo je {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Spezoj atendantaj traktadon",
+    "VALIDATING_TX": "Spezoj traktitaj, ne validigitaj",
+    "ERROR_TX": "Spezoj ne realigitaj",
+    "ERROR_TX_SENT": "Spezoj malsukcesintaj",
+    "PENDING_TX_RECEIVED": "Spezoj atendantaj ricevon",
+    "EVENTS": "Okazaĵoj",
+    "OUT_DISTANCED": "Viaj nunaj atestaĵoj venas de tro izolita grupo de la <a ng-click=\"showHelpModal('wot')\">Reto de Fido</a> (RdF): al la <a ng-click=\"showHelpModal('distance_rule')\">regulo de maksimuma distanco</a> vi ne konformiĝas.<br/>Vi devas akiri atestaĵojn venantajn de aliaj lokoj de la RdF, aŭ atendi ke tiu ĉi densiĝos.",
+    "WAITING_MEMBERSHIP": "Aliĝo-peto sendita. Atendanta akcepton.",
+    "WAITING_CERTIFICATIONS": "Vi devas <b>akiri {{needCertificationCount}} atestaĵo(j)n</b> por fariĝi membro kaj produkti la <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a>. Via konto tamen estas jam funkcianta, por ricevi kaj efektivigi pagojn.",
+    "WAITING_CERTIFICATIONS_HELP": "Por akiri viajn atestaĵojn, petu nur membrojn <b>kiuj sufiĉe konas vin</b>, kiel postulas <a ng-click=\"showLicenseModal()\">la licenco de la mono</a>, kiun vi akceptis.<br/>Se vi ne konas sufiĉe da membroj, sciigu tion ĉe <a ng-click=\"openLink($event, $root.settings.userForumUrl)\">la forumo por uzantoj</a>.",
+    "WILL_MISSING_CERTIFICATIONS": "Baldaŭ <b>mankos al vi atestaĵoj</b> (almenaŭ {{willNeedCertificationCount}} estas necesaj)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Via aliĝo kiel membro <b>estas finiĝonta {{membershipExpiresIn|formatDurationTo}}</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a> ĝis tiam.",
+    "NEED_RENEW_MEMBERSHIP": "Vi ne plu estas membro de la mono, ĉar <b>via aliĝo finiĝis</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a>.",
+    "NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED": "Vi ne plu estas membro de la mono, <b>pro manko da atestaĵoj</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliĝon</a>.",
+    "NO_WAITING_MEMBERSHIP": "Neniu aliĝo-peto atendanta. Se vi deziras <b>fariĝi membro</b>, pensu <a ng-click=\"doQuickFix('membership')\">sendi la aliĝo-peton</a>.",
+    "CERTIFICATION_COUNT": "Ricevitaj atestaĵoj",
+    "CERTIFICATION_COUNT_SHORT": "Atestaĵoj",
+    "SIG_STOCK": "Senditaj atestaĵoj",
+    "BTN_RECEIVE_MONEY": "Enkasigi",
+    "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Aliri alian identecon...",
+    "BTN_FIX_MEMBERSHIP": "Resendi la aliĝo-peton...",
+    "BTN_MEMBERSHIP_RENEW": "Revalidigi la aliĝon",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Revalidigi la aliĝon...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Ĉesigi la aliĝon...",
+    "BTN_SECURITY_DOTS": "Konto kaj sekureco...",
+    "BTN_SHOW_DETAILS": "Afiŝi la teknikajn informojn",
+    "LOCKED_OUTPUTS_POPOVER": {
+      "TITLE": "Sumo blokita",
+      "DESCRIPTION": "Jen la kondiĉoj de malblokado de tiu sumo:",
+      "DESCRIPTION_MANY": "Tiu spezo entenas plurajn partojn, pri kiuj la kondiĉoj de malblokado estas:",
+      "LOCKED_AMOUNT": "Kondiĉoj por la sumo:"
+    },
+    "NEW": {
+      "TITLE": "Kreado de konto",
+      "INTRO_WARNING_TIME": "La kreado de konto ĉe {{name|capitalize}} estas tre simpla. Bonvolu tamen dediĉi sufiĉe da tempo por ĝuste efektivigi tiun proceduron (por ne forgesi la identigilojn, pasvortojn, ktp.).",
+      "INTRO_WARNING_SECURITY": "Kontrolu ke la aparatoj, kiujn vi nun uzas (komputilo, tabuleto, telefono), <b>estas sekurigitaj kaj fidindaj</b>.",
+      "INTRO_WARNING_SECURITY_HELP": "Senvirusigilo ĝisdata, fajroŝirmilo aktivigita, sesio protektita per pasvorto aŭ PIN-kodo, ktp.",
+      "INTRO_HELP": "Alklaku <b>{{'COMMON.BTN_START'|translate}}</b> por ekigi la kreadon de konto. Vi estos gvidata paŝon post paŝo.",
+      "REGISTRATION_NODE": "Via aliĝo estos registrita tra la nodo Duniter <b>{{server}}</b>, kiu dissendos ĝin poste al la cetero de la mon-reto.",
+      "REGISTRATION_NODE_HELP": "Se vi ne fidas tiun nodon, bonvolu ŝanĝi ĝin <a ng-click=\"doQuickFix('settings')\">en la parametroj</a> de Cesium.",
+      "SELECT_ACCOUNT_TYPE": "Elektu la tipon de konto kreota:",
+      "MEMBER_ACCOUNT": "Membro-konto",
+      "MEMBER_ACCOUNT_TITLE": "Kreado de membro-konto",
+      "MEMBER_ACCOUNT_HELP": "Se vi ankoraŭ ne enskribiĝis kiel individuo (nur unu konto eblas por unu individuo). Tia konto ebligas kunprodukti la monon, ricevante <b> universalan dividendon</b> ĉiun {{parameters.dt|formatPeriod}}n.",
+      "WALLET_ACCOUNT": "Simpla monujo",
+      "WALLET_ACCOUNT_TITLE": "Kreado de monujo",
+      "WALLET_ACCOUNT_HELP": "Por ĉiuj aliaj kazoj, ekzemple se vi bezonas plian konton.<br/>Neniu universala dividendo estos kreita per tia konto.",
+      "SALT_WARNING": "Elektu vian sekretan identigilon.<br/>Oni petos ĝin de vi ĉiufoje, kiam vi konektiĝos al tiu konto.<br/><br/><b>Bone memorigu ĝin</b>: kaze de perdo, neniu alia povos aliri vian konton!",
+      "PASSWORD_WARNING": "Elektu pasvorton.<br/>Oni petos ĝin de vi ĉiufoje, kiam vi konektiĝos al tiu konto.<br/><br/><b>Bone memorigu tiun pasvorton</b: kaze de perdo, neniu alia povos aliri vian konton!",
+      "PSEUDO_WARNING": "Elektu pseÅ­donimon.<br/>Äœi utilas al la aliaj membroj, por identigi vin pli facile.<div class='hidden-xs'><br/>Äœi <b>ne povos esti modifita</b>, sen rekrei konton.</div><br/><br/>Äœi entenu <b>nek spacon, nek diakritan literon (kun supersigno, ktp.)</b>.<div class='hidden-xs'><br/>Ekzemple: <span class='gray'>NataljaBelulino, JohanoStelaro, ktp.</span>",
+      "PSEUDO": "PseÅ­donimo",
+      "PSEUDO_HELP": "PseÅ­donimo",
+      "SALT_CONFIRM": "Konfirmo",
+      "SALT_CONFIRM_HELP": "Konfirmo de la sekreta identigilo",
+      "PASSWORD_CONFIRM": "Konfirmo",
+      "PASSWORD_CONFIRM_HELP": "Konfirmo de la pasvorto",
+      "SLIDE_6_TITLE": "Konfirmo:",
+      "COMPUTING_PUBKEY": "Kalkulanta...",
+      "LAST_SLIDE_CONGRATULATION": "Vi tajpis ĉiujn necesajn informojn: Gratulon!<br/>Vi nun povas <b>sendi la peton por kreado</b> de la konto.</b><br/><br/>Por informo, la publika ŝlosilo ĉi-sube identigos vian estontan konton.<br/>Ĝi povos estis sciigita al aliuloj por ricevi iliajn pagojn.<br/><b>Ne estas devige</b> noti ĝin nun, vi ankaŭ povos fari tion poste.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Averto:</b> la sekreta identigilo, la pasvorto kaj la pseŭdonimo ne plu povos esti modifitaj.<br/><br/><b>Certiĝu, ke vi ĉiam rememorigos ĝin!</b><br/><br/><b>Ĉu vi certas</b>, ke vi deziras sendi tiun ĉi aliĝo-peton?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Averto:</b> la sekreta identigilo kaj la pasvorto ne plu povos esti modifitaj.<br/><br/><b>Certiĝu, ke vi ĉiam rememorigos ĝin!</b><br/><br/><b>Ĉu vi certas</b>, ke vi deziras daŭrigi per tiuj ĉi identigiloj?",
+      "CHECKING_PSEUDO": "Kontrolo...",
+      "PSEUDO_AVAILABLE": "PseÅ­donimo disponebla",
+      "PSEUDO_NOT_AVAILABLE": "PseÅ­donimo ne disponebla",
+      "INFO_LICENSE": "AntaÅ­ ol krei membro-konton, <b>bonvolu legi kaj akcepti la licencon</b> pri uzado de la mono:",
+      "BTN_ACCEPT": "Mi akceptas",
+      "BTN_ACCEPT_LICENSE": "Mi akceptas la licencon"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Elektu pseÅ­donimon",
+      "HELP": "Pseŭdonimo estas deviga por fariĝi membro."
+    },
+    "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Elekto de la identeco",
+      "HELP": "Pluraj <b>malsamaj identecoj</b> estis senditaj, por la publika ŝlosilo <span class=\"gray\"><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</span>.<br/>Bonvolu elekti la dosierujon uzotan:"
+    },
+    "SELECT_WALLET_MODAL": {
+      "TITLE": "Elekto de la monujo"
+    },
+    "WALLET_LIST": {
+      "TITLE": "Miaj monujoj",
+      "BTN_NEW": "Aldoni monujon",
+      "BTN_DOWNLOAD": "Elŝuti la liston",
+      "BTN_IMPORT_FILE_DOTS": "Enporti el dosiero...",
+      "NO_WALLET": "Neniu kroma monujo",
+      "BTN_DELETE": "Forigi kroman monujon...",
+      "BTN_RENAME": "Renomi la monujon",
+      "EXPORT_FILENAME": "miaj_monujoj-{{pubkey|formatPubkey}}-{{currency}}.csv",
+      "TOTAL_DOTS": "Sumo: ",
+      "EDIT_POPOVER": {
+        "TITLE": "Renomi la monujon",
+        "HELP": "Sciigu la novan nomon",
+        "NAME_HELP": "Nomo de la monujo"
+      },
+      "IMPORT_MODAL": {
+        "TITLE": "Enporti monujojn",
+        "HELP": "Por <b>enporti monujojn</b>, bonvolu glitigi en la ĉi-suban zonon la dosieron pri la listo de monujoj, aŭ alklaki la zonon por serĉadi dosieron.",
+        "WALLET_COUNT": "<b>{{count}}</b> nova{{count > 1 ? 'j' : ''}} monujo{{count > 1 ? 'j' : ''}}",
+        "NO_NEW_WALLET": "Neniu nova monujo"
+      }
+    },
+    "SECURITY": {
+      "ADD_QUESTION": "Aldoni personigitan demandon",
+      "BTN_CLEAN": "Malplenigi",
+      "BTN_RESET": "Restartigi",
+      "DOWNLOAD_REVOKE": "Konservi mian dosieron pri nuligo",
+      "DOWNLOAD_REVOKE_HELP": "Disponi dosieron pri nuligo estas grave, ekzemple kaze de perdo de viaj identigiloj. Ĝi ebligas al vi <b>elirigi tiun konton el la reto de fido</b>, tiel ke ĝi refariĝu simpla monujo.",
+      "GENERATE_KEYFILE": "Krei mian dosieron pri ŝlosilaro...",
+      "GENERATE_KEYFILE_HELP": "Kreas dosieron, kiu ebligas al vi aŭtentiĝi sen tajpi viajn identigilojn.<br/><b>Atenton:</b> tiu dosiero entenos vian konto-ŝlosilaron (publikan kaj sekretan ŝlosilojn); do tre gravas meti ĝin en sekuran lokon!",
+      "KEYFILE_FILENAME": "ŝlosilaro-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",
+      "MEMBERSHIP_IN": "Transformi en membro-konton...",
+      "MEMBERSHIP_IN_HELP": "Ebligas <b>transformi</b> simplan monujo-konton <b>en membro-konton</b>, sendante aliĝo-peton. Utilas nur se vi ne havas jam alian membro-konton.",
+      "SEND_IDENTITY": "Publikigi sian identecon...",
+      "SEND_IDENTITY_HELP": "Ebligas kunligi pseŭdonimon kun tiu ĉi konto, sed <b>sen fari aliĝo-peton</b> por iĝi membro. Tiu kunligo kutime ne utilas, ĉar la valideco de tiu kunligo de pseŭdonimo estas limigita en la tempo.",
+      "HELP_LEVEL": "Por krei konserv-dosieron pri viaj identigiloj, elektu <strong> almenaÅ­ {{nb}} demandojn:</strong>",
+      "LEVEL": "Nivelo de sekureco",
+      "LOW_LEVEL": "Malforta <span class=\"hidden-xs\">(2 demandoj minimume)</span>",
+      "MEDIUM_LEVEL": "Meza <span class=\"hidden-xs\">(4 demandoj minimume)</span>",
+      "QUESTION_1": "Kiel nomiĝis via plej bona amik.in.o, kiam vi estis adoleskant.in.o?",
+      "QUESTION_2": "Kiel nomiĝis via unua hejm-besto?",
+      "QUESTION_3": "Kiun pladon vi unue lernis kuiradi?",
+      "QUESTION_4": "Kiun filmon vi unue spektis en kinejo?",
+      "QUESTION_5": "Kien vi iris la unuan fojon, kiam vi vojaĝis per aviadilo?",
+      "QUESTION_6": "Kiel nomiĝis via preferata instruist.i.no en bazlernejo?",
+      "QUESTION_7": "Kio estus laÅ­ vi la ideala profesio?",
+      "QUESTION_8": "Kiun libron por infanoj vi preferas?",
+      "QUESTION_9": "Kio estis la marko de via unua veturilo?",
+      "QUESTION_10": "Kio estis via kromnomo, kiam vi estis infano?",
+      "QUESTION_11": "Kiun rolant.in.on aÅ­ aktor.in.on vi preferis en kino, kiam vi estis student.in.o?",
+      "QUESTION_12": "Kiun kanzonist.ino.n aÅ­ muzikgrupon vi preferis, kiam vi estis student.in.o?",
+      "QUESTION_13": "En kiu urbo renkontiĝis viaj gepatroj?",
+      "QUESTION_14": "Kiel nomiĝis via unua ĉefo?",
+      "QUESTION_15": "Kiel nomiĝas la strato, kie vi kreskis?",
+      "QUESTION_16": "Kiel nomiĝas la marbordo, kie vi unuafoje baniĝis?",
+      "QUESTION_17": "Kiun muzik-albumon vi unuafoje aĉetis?",
+      "QUESTION_18": "Kiel nomiĝas via preferata sporto-teamo?",
+      "QUESTION_19": "Kio estis la profesio de via avo?",
+      "RECOVER_ID": "Retrovi mian pasvorton...",
+      "RECOVER_ID_HELP": "Se vi disponas <b>konserv-dosieron pri viaj identigiloj</b>, vi povas retrovi ilin respondante ĝuste viajn personajn demandojn.",
+      "REVOCATION_WITH_FILE": "Nuligi mian membro-konton...",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "Se vi <b>definitive perdis viajn identigilojn</b> pri via membro-konto (aŭ ke la sekureco de la konto estas endanĝerigita), vi povas uzi <b>la dosieron pri nuligo</b> de la konto por <b>trudi ties definitivan eliradon el la reto de fido</b>.",
+      "REVOCATION_WITH_FILE_HELP": "Por <b>definitive nuligi</b> membro-konton, bonvolu glitigi en la ĉi-suban zonon vian dosieron pri nuligo, aŭ alklaki la zonon por serĉadi dosieron.",
+      "REVOCATION_WALLET": "Nuligi tiun ĉi konton tuj",
+      "REVOCATION_WALLET_HELP": "Peti la nuligon de via identeco estigas la <b>eliradon el la reto de fido</b> (definitivan por la pseŭdonimo kaj la publika ŝlosilo kunligitaj). La konto ne plu povos produkti Universalan Dividendon.<br/>Vi tamen daŭre povos konektiĝi al ĝi, kiel al simpla monujo.",
+      "REVOCATION_FILENAME": "nuligo-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+      "SAVE_ID": "Konservi miajn identigilojn...",
+      "SAVE_ID_HELP": "Kreado de konserv-dosiero, por <b>retrovi vian pasvorton</b> (kaj la sekretan identigilon) <b>kaze de forgeso</b>. La dosiero estas <b>sekurigita</b> (ĉifrita) dank'al personaj demandoj.",
+      "STRONG_LEVEL": "Forta <span class=\"hidden-xs \">(6 demandoj minimume)</span>",
+      "TITLE": "Konto kaj sekureco",
+      "KEYFILE": {
+        "PUBSEC_FORMAT": "Strukturo PubSec.",
+        "PUBSEC_FORMAT_HELP": "Tiu strukturo stokas vian ŝlosilaron laŭ tre simpla maniero. Ĝi kongruas aparte kun Cesium, ğannonce kaj Duniter.<br/><b>Atenton:</b>La dosiero <b>ne estas ĉifrita</b> (la sekreta ŝlosilo klare aperas en ĝi); bonvolu do stoki ĝin en sekura loko!",
+        "WIF_FORMAT": "Strukturo WIF (Wallet Import Format) - v1",
+        "WIF_FORMAT_HELP": "Tiu strukturo stokas vian ŝlosilaron inkluzivante en ĝin kontrol-sumon por kontroli la sendifektecon de la dosiero. Ĝi kongruas aparte kun la paper-monujoj (Duniter paper wallet).<br/><b>Atenton:</b>La dosiero <b>ne estas ĉifrita</b> (la sekreta ŝlosilo klare aperas en ĝi); bonvolu do stoki ĝin en sekura loko!",
+        "EWIF_FORMAT": "Strukturo EWIF (Encrypted Wallet Import Format) - v1",
+        "EWIF_FORMAT_HELP": "Tiu strukturo stokas vian ŝlosilaron <b>laŭ ĉifrita maniero</b> dank'al sekreta frazo elektita de vi. Ĝi ankaŭ inkluzivas kontrol-sumon por kontroli la sendifektecon de la dosiero.<br/><b>Atenton:</b> Zorgu, ke vi ĉiam rememoru vian sekretan frazon!",
+		"PASSWORD_POPUP": {
+          "TITLE": "Ĉifrita dosiero pri ŝlosilaro",
+          "HELP": "Bonvolu indiki la la sekretan frazon:",
+          "PASSWORD_HELP": "Sekreta frazo"
+        },
+        "ERROR": {
+          "BAD_PASSWORD": "Sekreta frazo malĝusta",
+          "BAD_CHECKSUM": "Kontrol-sumo malĝusta"
+        }
+      }
+    },
+    "FILE_NAME": "{{currency}} - Konto-tabelo {{pubkey|formatPubkey}} je {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Dato",
+      "AMOUNT": "Sumo",
+      "COMMENT": "Komento"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Elspezo",
+    "SUB_TITLE": "Fari elspezon",
+    "SUB_TITLE_ALL": "Malplenigi la konton",
+    "FROM": "De",
+    "TO": "Al",
+    "AMOUNT": "Sumo",
+    "AMOUNT_HELP": "Sumo",
+    "COMMENT": "Komento",
+    "COMMENT_HELP": "Komento",
+    "BTN_SEND": "Sendi",
+    "BTN_ADD_COMMENT": "Aldoni komenton",
+    "REST": "Resto de la konto",
+    "REST_TO": "al",
+    "WARN_COMMENT_IS_PUBLIC": "Bonvolu noti, ke <b>la komentoj estas publikaj</b> (ne ĉifritaj).",
+    "MODAL": {
+      "TITLE": "Elspezo"
+    }
+  },
+  "ERROR": {
+    "UNKNOWN_URI_FORMAT": "URI-strukturo nekonata",
+    "PUBKEY_INVALID_CHECKSUM": "Publika ŝlosilo nevalida (bad checksum).",
+    "POPUP_TITLE": "Eraro",
+    "UNKNOWN_ERROR": "Eraro nekonata",
+    "CRYPTO_UNKNOWN_ERROR": "Via retumilo ŝajnas ne kongrua kun la kriptografiaj funkcioj.",
+    "DOWNLOAD_KEYFILE_FAILED": "Malsukceso por la kreado de la dosiero pri ŝlosilaro.",
+    "EQUALS_TO_PSEUDO": "Devas esti malsama ol la pseÅ­donimo",
+    "EQUALS_TO_SALT": "Devas esti malsama ol la sekreta identigilo",
+    "FIELD_REQUIRED": "Deviga kampo",
+    "FIELD_TOO_SHORT": "Signaro tro mallonga",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "Signaro tro mallonga ({{minLength}} signoj minimume)",
+    "FIELD_TOO_LONG": "Signaro tro longa",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Signaro tro longa ({{maxLength}} signoj maksimume)",
+    "FIELD_MIN": "Minimuma longeco: {{min}}",
+    "FIELD_MAX": "Maksimuma longeco: {{max}}",
+    "FIELD_ACCENT": "Diakritaj literoj kaj komoj ne permesataj",
+    "FIELD_NOT_NUMBER": "Nombra valoro atendata",
+    "FIELD_NOT_INT": "Entjera nombro atendata",
+    "FIELD_NOT_EMAIL": "Retadreso nevalida",
+    "PASSWORD_NOT_CONFIRMED": "Ne kongruas kun la pasvorto",
+    "SALT_NOT_CONFIRMED": "Ne kongruas kun la sekreta identigilo",
+    "SEND_IDENTITY_FAILED": "Aliĝo malsukcesa",
+    "SEND_CERTIFICATION_FAILED": "Atestado malsukcesa",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "Vi ne povas efektivigi atestadon, ĉar via konto <b>ne estas membro</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "Vi ne povas efektivigi atestadon, ĉar via konto ankoraŭ ne estas membro.<br/><br/>Ankoraŭ mankas al vi atestaĵoj, aŭ tiuj ĉi ankoraŭ ne estis validigitaj.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "Konto ne atestebla. Neniu aliĝo-peto estis farita, aŭ la aliĝo ne estis revalidigita.",
+    "LOGIN_FAILED": "Eraro dum konektiĝo.",
+    "LOAD_IDENTITY_FAILED": "Eraro por ŝarĝi la identecon.",
+    "LOAD_REQUIREMENTS_FAILED": "Eraro por ŝarĝi la antaŭ-necesaĵoj de la identeco.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Malsukceso pri la provado eniri la komunumon.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Malsukceso pri la ĉesigo de la aliĝo.",
+    "REFRESH_WALLET_DATA": "Malsukceso pri la ĝisdatigo de la monujo.",
+    "GET_CURRENCY_PARAMETER": "Malsukceso por ricevi la regulojn de la mono.",
+    "GET_CURRENCY_FAILED": "Ne eblis ŝarĝi la monon. Bonvolu reprovi pli poste.",
+    "SEND_TX_FAILED": "Elspezado malsukcesa.",
+    "ALL_SOURCES_USED": "Bonvolu atendi la kalkulon de la venonta bloko (ĉiuj viaj monfontoj estis uzitaj).",
+    "NOT_ENOUGH_SOURCES": "Ne sufiĉe da mono por sendi tiun ĉi sumon per ununura spezo.<br/>Maksimuma sumo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Malsukceso por krei la membro-konton.",
+    "RESTORE_WALLET_DATA_ERROR": "Malsukceso por reŝarĝi la parametrojn de la loka stokaĵo",
+    "LOAD_WALLET_DATA_ERROR": "Malsukceso por ŝarĝi la datenojn de la monujo.",
+    "COPY_CLIPBOARD_FAILED": "Ne eblis kopii la valoron.",
+    "TAKE_PICTURE_FAILED": "Malsukceso por ricevi la foton.",
+    "SCAN_FAILED": "Malsukceso por skani la QR-kodon.",
+    "SCAN_UNKNOWN_FORMAT": "Kodo nerekonata.",
+    "WOT_LOOKUP_FAILED": "Serĉado malsukcesa.",
+    "LOAD_PEER_DATA_FAILED": "Ne eblis legi la nodon Duniter. Bonvolu reprovi poste.",
+    "NEED_LOGIN_FIRST": "Bonvolu unue konektiĝi.",
+    "AMOUNT_REQUIRED": "La monsumo estas deviga.",
+    "AMOUNT_NEGATIVE": "Negativa sumo nepermesata.",
+    "NOT_ENOUGH_CREDIT": "Saldo nesufiĉa.",
+    "INVALID_NODE_SUMMARY": "Nodo neatingebla aÅ­ adreso nevalida.",
+    "INVALID_USER_ID": "La pseÅ­donimo devas enteni nek spacon nek signon specialan aÅ­ kun supersigno.",
+    "INVALID_COMMENT": "La kampo 'referenco' ne devas enteni literojn kun supersigno.",
+    "INVALID_PUBKEY": "La publika ŝlosilo ne havas la atenditan strukturon.",
+    "INVALID_PUBKEY_CHECKSUM": "Kontrol-sumo nevalida.",
+    "IDENTITY_REVOKED": "Tiu ĉi identeco <b>estis nuligita</b>. Ĝi ne plu povas fariĝi membro.",
+    "IDENTITY_REVOKED_WITH_TIME": "Tiu ĉi identeco <b>estis nuligita {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Ĝi ne plu povas fariĝi membro.",
+    "IDENTITY_PENDING_REVOCATION": "La <b>nuligo de tiu ĉi identeco</b> estis petita kaj atendas traktadon. La atestado estas do malaktivigita.",
+    "IDENTITY_INVALID_BLOCK_HASH": "Tiu ĉi aliĝo-peto ne plu validas (ĉar ĝi rilatas al bloko, kiun nuligis la nodoj de la reto): tiu persono devas refari sian aliĝo-peton <b>antaŭ ol</b> esti atestita.",
+    "IDENTITY_EXPIRED": "La publikigo de tiu ĉi identeco finiĝis: tiu persono devas fari novan aliĝo-peton <b>antaŭ ol</b> esti atestita.",
+    "IDENTITY_SANDBOX_FULL": "La nodo Duniter uzata de Cesium ne plu povas ricevi novajn identecojn, ĉar ĝia atendo-vico estas plena.<br/><br/>Bonvolu reprovi poste aŭ ŝanĝi la nodon (per la menuo <b>Parametroj</b>).",
+    "IDENTITY_NOT_FOUND": "Identeco ne trovita.",
+    "IDENTITY_TX_FAILED": "Malsukceso por ŝarĝi la spezojn.",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Aliĝo ne valida.",
+    "WALLET_INVALID_BLOCK_HASH": "Via aliĝo-peto ne plu validas (ĉar ĝi rilatas al bloko, kiun nuligis la nodoj de la reto).<br/>Vi devas <a ng-click=\"doQuickFix('fixMembership')\">sendi novan peton</a> por solvi tiun ĉi problemon.",
+    "WALLET_IDENTITY_EXPIRED": "La publikigo de <b>via identeco finiĝis</b>.<br/>Vi devas <a ng-click=\"doQuickFix('fixIdentity')\">publikigi denove vian identecon</a> por solvi tiun ĉi problemon.",
+    "WALLET_REVOKED": "Via identeco estis <b>nuligita</b>: nek via pseŭdonimo nek via publika ŝlosilo povos esti uzata en la estonteco por membro-konto.",
+    "WALLET_HAS_NO_SELF": "Via identeco devas unue esti publikigita, kaj ne esti finiĝinta.",
+    "AUTH_REQUIRED": "AÅ­tentigado necesa.",
+    "AUTH_INVALID_PUBKEY": "La atendata ŝlosilo estas <i class=\"ion-key\"></i> {{pubkey|formatPubkey}}...",
+    "AUTH_INVALID_SCRYPT": "Identigilo aÅ­ pasvorto nevalida.",
+    "AUTH_INVALID_FILE": "Dosiero pri ŝlosilaro nevalida.",
+    "AUTH_FILE_ERROR": "Malsukceso por malfermi la dosieron pri ŝlosilaro.",
+    "IDENTITY_ALREADY_CERTIFY": "Vi <b>jam atestis</b> tiun identecon.<br/><br/>Tiu atestado daŭre validas (finiĝo {{expiresIn|formatDurationTo}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "Vi <b>jam atestis</b> tiun identecon.<br/><br/>Tiu atestado atendas traktadon (limdato de traktado {{expiresIn|formatDurationTo}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Atestado neebla",
+    "LOAD_NEWCOMERS_FAILED": "Malsukceso por ŝarĝi la novajn membrojn.",
+    "LOAD_PENDING_FAILED": "Malsukceso por ŝarĝi la atendantajn aliĝojn.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vi devas <b>esti membro</b> por rajti efektivigi tiun ĉi agon.",
+    "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vi devas <b>esti membro (aŭ eksa membro)</b> por rajti efektivigi tiun ĉi agon.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Via identeco devas <b>jam esti publikigita</b>, por ke vi rajtu efektivigi tiun ĉi agon.",
+    "GET_BLOCK_FAILED": "Malsukceso por ricevi la blokon.",
+    "INVALID_BLOCK_HASH": "Bloko ne trovita (haketo malsama)",
+    "DOWNLOAD_REVOCATION_FAILED": "Malsukceso por elŝuti la dosieron pri nuligo.",
+    "REVOCATION_FAILED": "Malsukceso pri nuligo.",
+    "SALT_OR_PASSWORD_NOT_CONFIRMED": "Sekreta identigilo aŭ pasvorto malĝusta.",
+    "RECOVER_ID_FAILED": "Malsukceso por ricevi la identigilojn",
+    "LOAD_FILE_FAILED" : "Malsukceso por ŝarĝi la dosieron",
+    "NOT_VALID_REVOCATION_FILE": "Dosiero pri nuligo ne valida (malĝusta strukturo de dosiero)",
+    "NOT_VALID_SAVE_ID_FILE": "Dosiero pri konservado ne valida (malĝusta strukturo de dosiero)",
+    "NOT_VALID_KEY_FILE": "Dosiero pri ŝlosilaro ne valida (strukturo ne rekonata)",
+    "EXISTING_ACCOUNT": "Viaj identigiloj rilatas al jam ekzistanta konto, kies <a ng-click=\"showHelpModal('pubkey')\">publika ŝlosilo</a> estas:",
+    "EXISTING_ACCOUNT_REQUEST": "Bonvolu modifi viajn identigilojn, por ke ili rilatu al ne uzata konto.",
+    "GET_LICENSE_FILE_FAILED": "La ricevo de la dosiero pri licenco ne eblis.",
+    "CHECK_NETWORK_CONNECTION": "Neniu nodo ŝajnas atingebla.<br/><br/>Bonvolu <b>kontroli vian retkonekton</b>.",
+    "ISSUE_524_TX_FAILED": "Malsukcesa elspezo.<br/><br/>Mesaĝo estis sendita al la programistoj por faciligi la solvadon de la problemo. <b>Dankon pro via helpo</b>.",
+    "ADD_SECONDARY_WALLET_FAILED": "Malsukceso por aldoni kroman monujon.",
+    "UPDATE_WALLET_LIST_FAILED": "Malsukceso por ĝisdatigi la kromajn monujojn.",
+    "LOAD_WALLET_LIST_FAILED": "Malsukceso por ŝarĝi la kromajn monujojn.",
+    "SAVE_WALLET_LIST_FAILED": "Malsukceso por konservi la kromajn monujojn.",
+    "COULD_NOT_ADD_MAIN_WALLET": "Tiu ĉi monujo <b>rilatas al la ĉefa konto</b>, kun kiu vi estas konektita.<br/>Ne eblas aldoni ĝin kiel kroman monujon.",
+    "COULD_NOT_ADD_EXISTING_WALLET": "Monujo jam ekzistanta en la listo.",
+    "UNKNOWN_WALLET_ID": "Kroma monujo nekonata.",
+    "RESTORE_WALLET_LIST_FAILED": "Malsukceso por restarigi la kromajn monujojn.",
+    "INVALID_FILE_FORMAT": "Strukturo de dosiero nevalida."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Informo",
+    "CERTIFICATION_DONE": "Atestaĵo sendita",
+    "NOT_ENOUGH_CREDIT": "Saldo nesufiĉa",
+    "TRANSFER_SENT": "Elspezo sendita",
+    "COPY_TO_CLIPBOARD_DONE": "Kopiita en la memoreto",
+    "MEMBERSHIP_OUT_SENT": "Eksiĝo sendita",
+    "NOT_NEED_MEMBERSHIP": "Vi jam estas membro.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Al tiu ĉi identeco baldaŭ mankos atestaĵoj (almenaŭ {{willNeedCertificationCount}}).",
+    "IDENTITY_NEED_MEMBERSHIP": "Tiu ĉi identeco ne sendis aliĝo-peton. Tion ĝi devos fari, se ĝi deziras fariĝi membro.",
+    "HAS_ALTERNATIVE_IDENTITIES": "Ekzistas <b>pluraj identecoj</b> ligitaj kun tiu ĉi publika ŝlosilo. <b>Antaŭ ĉia atestado</b>, pensu <a ng-click=\"doQuickFix('showSelectIdentities')\">trarigardi la aliajn identecojn</a> por elekti la ĝustan, aŭ kontaktu la posedanton de la konto.",
+    "REVOCATION_SENT": "Nuligo sendita",
+    "REVOCATION_SENT_WAITING_PROCESS": "La <b>nuligo de tiu ĉi identeco</b> estis petita kaj atendas traktadon.",
+    "FEATURES_NOT_IMPLEMENTED": "Tiu ĉi funkciaro ankoraŭ estas programiĝanta.<br/>Kial ne <b>kontribui al Cesium</b>, por ekhavi ĝin pli rapide? ;)",
+    "EMPTY_TX_HISTORY": "Neniu spezo elportota"
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Konfirmo</b>",
+    "POPUP_WARNING_TITLE": "<b>Averto</b>",
+    "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Averto pri sekureco</b>",
+    "CERTIFY_RULES_TITLE_UID": "Atesti {{uid}}",
+    "CERTIFY_RULES": "<b class=\"assertive\">NE atestu</b> konton, se vi pensas ke:<br/><br/><ul><li>1.) ĝi ne rilatas al persono <b>fizika kaj vivanta</b>.<li>2.) ĝia posedanto <b>havas alian konton</b> jam atestitan.<li>3.) ĝia posedanto malobservas (vole aŭ ne) la regulon 1 aŭ 2 (ekzemple atestante falsajn kontojn aŭ duoblajn).</ul><br/><b>Ĉu vi certas,</b> ke vi tamen volas atesti tiun ĉi identecon?",
+    "FULLSCREEN": "Afiŝi la programon plen-ekrane?",
+    "EXIT_APP": "Fermi la programon?",
+    "TRANSFER": "<b>Resumo de la elspezo</b> :<br/><br/><ul><li> - De: {{from}}</li><li> - Al: <b>{{to}}</b></li><li> - Sumo: <b>{{amount}} {{unit}}</b></li><li> - Komento: <i>{{comment}}</i></li></ul><br/><b>Ĉu vi certas, ke vi volas efektivigi tiun ĉi elspezon?</b>",
+    "TRANSFER_ALL": "<b>Resumo de la elspezo</b>:<br/><br/><ul><li> - De : {{from}}</li><li> - Al : <b>{{to}}</b></li><li> - Sumo: <b>{{amount}} {{unit}}</b></li><li> - Komento: <i>{{comment}}</i></li><br/><li> - Resto: <b>{{restAmount}} {{unit}}</b> al <b>{{restTo}}</b></li></ul><br/><b>Ĉu vi certas, ke vi volas efektivigi tiun ĉi elspezon?</b>",
+    "MEMBERSHIP_OUT": "Tiu ĉi ago estas <b>neinversigebla</b>.<br/></br/>Ĉu vi certas, ke vi volas <b>nuligi vian membro-konton</b>?",
+    "MEMBERSHIP_OUT_2": "Tiu ĉi ago estas <b>neinversigebla</b> !<br/><br/>Ĉu vi vere certas, ke vi volas <b>nuligi vian aliĝon</b> kiel membron?",
+    "LOGIN_UNUSED_WALLET_TITLE": "Tajperaro?",
+    "LOGIN_UNUSED_WALLET": "La konektita konto ŝajnas <b>neaktiva</b>.<br/><br/>Temas probable pri <b>tajperaro</b> en viaj konekto-identigiloj. Bonvolu rekomenci, kontrolante ke <b>la publika ŝlosilo estas tiu de via konto</b>.",
+    "FIX_IDENTITY": "La pseŭdonimo <b>{{uid}}</b> estos denove publikigita, anstataŭigante la malnovan publikigon, kiu finiĝis.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",
+    "FIX_MEMBERSHIP": "Via aliĝo-peto kiel membro tuj estos resendita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",
+    "MEMBERSHIP": "Via aliĝo-peto kiel membro tuj estos sendita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",
+    "RENEW_MEMBERSHIP": "Via aliĝo kiel membro tuj estos revalidigita.<br/></br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",
+    "REVOKE_IDENTITY": "Vi estas <b>nuligonta definitive tiun ĉi identecon</b>.<br/><br/>La publika ŝlosilo kaj la ligita pseŭdonimo <b>neniam plu povos esti uzataj</b> (por membro-konto). <br/></br/><b>Ĉu vi certas</b>, ke vi volas definitive nuligi tiun ĉi konton?",
+    "REVOKE_IDENTITY_2": "Tiu ĉi ago estas <b>neinversigebla</b>!<br/><br/>Ĉu vi vere certas, ke vi volas <b>definitive nuligi</b> tiun ĉi konton?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Via aliĝo ne bezonas esti revalidigita (ĝi finiĝos nur post {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Ĉu vi certas</b>, ke vi volas revalidigi vian aliĝon?",
+    "SAVE_BEFORE_LEAVE": "Ĉu vi volas <b>konservi viajn modifojn</b> antaŭ ol eliri el la paĝo?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Modifoj ne registritaj",
+    "LOGOUT": "Ĉu vi certas, ke vi volas malkonektiĝi?",
+    "USE_FALLBACK_NODE": "Nodo <b>{{old}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Ĉu vi volas provizore uzi la nodon <b>{{new}}</b> ?",
+    "ISSUE_524_SEND_LOG": "La spezo estis forĵetita, pro konata anomalio (petslipo #524) sed <b>ne ripetita</b>.<br/><br/>Por helpi la programistojn korekti tiun eraron, <b>ĉu vi akceptas la sendadon de viaj protokolaj dosieroj</b> per mesaĝo?<br/><small>(neniu konfidenca dateno estas sendita)</small>."
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Dosiero pri nuligo</b>",
+    "POPUP_REVOKE_MESSAGE": "Por sekurigi vian konton, bonvolu elŝuti la <b>dokumenton pri konto-nuligo</b>. Ĝi ebligos al vi eventuale nuligi vian konton (kaze de konto-ŝtelo, ŝanĝo de identigilo, konto erare kreita, ktp.).<br/><br/><b>Bonvolu stoki ĝin en sekura loko.</b>"
+  },
+  "HELP": {
+    "TITLE": "Ret-helpo",
+    "JOIN": {
+      "SECTION": "Enskribiĝo",
+      "SALT": "La sekreta identigilo estas tre grava. Ĝi utilas por miksi la pasvorton, antaŭ ol ĝi servos por kalkuli la <span class=\"text-italic\">publikan ŝlosilon</span> de via konto (ties numeron) kaj la sekretan ŝlosilon por aliri ĝin.<br/><b>Zorgu pri ĝia bona memorigado</b>, ĉar neniu rimedo estas nuntempe planita por retrovi ĝin kaze de perdo.<br/>Krom tio, ĝi ne povas esti modifita sen devige krei novan konton.<br/><br/>Bona sekreta identigilo devas esti sufiĉe longa (kun almenaŭ 8 signoj) kaj kiel eble plej originala.",
+      "PASSWORD": "La pasvorto estas tre grava. Kun la sekreta identigilo, ĝi servas por kalkuli la numeron (la publikan ŝlosilon) de via konto, kaj la sekretan ŝlosilon por aliri ĝin.<br/><b>Zorgu pri ĝia bona memorigado</b>, ĉar neniu rimedo estas planita por retrovi ĝin kaze de perdo (krom se oni generas konserv-dosieron).<br/>Krom tio, ĝi ne povas esti modifita sen devige krei novan konton.<br/><br/>Bona pasvorto entenas (ideale) almenaŭ 8 signojn, inter kiuj estas almenaŭ unu majusklo kaj unu cifero.",
+      "PSEUDO": "La pseŭdonimo estas utila nur kaze de enskribiĝo kiel <span class=\"text-italic\">membro</span>. Ĝi ĉiam estas ligita kun monujo (tra ĝia <span class=\"text-italic\">publika ŝlosilo</span>).<br/>Ĝi estas publikigita en la reto, tiel ke la aliaj uzantoj povu identigi ĝin, atesti ĝin aŭ sendi monon al ĝia konto.<br/>Pseŭdonimo devas esti unika ene de la membroj (<u>nunaj</u> kaj eksaj)."
+    },
+    "LOGIN": {
+      "SECTION": "Konekto",
+      "PUBKEY": "Publika ŝlosilo de la ŝlosilaro",
+      "PUBKEY_DEF": "La publika ŝlosilo de la ŝlosilaro estas kreita per la tajpitaj identigiloj (iuj ajn), sen ke ili necese rilatu al konto jam uzata.<br/><b>Atente kontrolu, ke la publika ŝlosilo estas tiu de via konto</b>. Alikaze, vi estos konektita al konto probable neniam uzita, la risko de kolizio kun ekzistanta konto estante tre eta.<br/><a href=\"https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique\" target=\"_system\">Scii pli pri kriptografio</a> per publika ŝlosilo.",
+      "METHOD": "Konekto-metodoj",
+      "METHOD_DEF": "Pluraj eblecoj disponeblas por konekti vin al monujo:<br/> - La konekto <b>per salumado (simpla aŭ sperta)</b> miksas vian pasvorton dank'al la sekreta identigilo, por limigi la provojn de <a href=\"https://fr.wikipedia.org/wiki/Attaque_par_force_brute\" target=\"_system\">kodrompado per kruda forto</a> (ekzemple per konataj vortoj.<br/> - La konekto <b>per publika ŝlosilo</b> evitigas tajpi viajn identigilojn, kiuj estos petataj de vi, nur kiam venos la momento dum operacio ĉe la konto.<br/> - La konekto <b>per dosiero pri ŝlosilaro</b> legas la ŝlosilojn (publikan kaj privatan) de la konto, per dosiero, sen la bezono tajpi identigilojn. Pluraj strukturoj de dosiero eblas."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glosaro",
+      "PUBKEY_DEF": "Publika ŝlosilo identigas monujon, kiu povas identigi membron aŭ rilati al anonima monujo. Ĉe Cesium la publika ŝlosilo estas kalkulita (implicite) dank'al la sekreta identigilo kaj la pasvorto.<br/><a href=\"https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique\" target=\"_system\">Scii pli pri kriptografio</a> per publika ŝlosilo.",
+      "MEMBER": "Membro",
+      "MEMBER_DEF": "Membro estas homa persono fizika kaj vivanta, kiu deziras libere partopreni en la mona komunumo. Li/ŝi kunproduktas universalan dividendon, laŭ periodo kaj sumo tiel difinitaj kiel en la <span class=\"text-italic\">reguloj de la mono</span>",
+      "CURRENCY_RULES": "Reguloj de la mono",
+      "CURRENCY_RULES_DEF": "La reguloj de la mono estas difinitaj definitive. Ili fiksas la funkciadon de la mono: la kalkulon de la universala dividendo, la nombron de necesaj atestaĵoj por esti membro, la maksimuman nombron da atestaĵoj, kiujn povas doni unu membro, ktp. <a href=\"#/app/currency\">Vidi la nuntempajn regulojn</a>.<br/>La nemodifo de la reguloj tra la tempo eblas per uzado de <span class=\"text-italic\">Blokĉeno</span>, kiu entenas kaj plenumas tiujn regulojn, kaj konstante kontrolas ties ĝustan aplikadon.",
+      "BLOCKCHAIN": "Ĉeno de blokoj (<span class=\"text-italic\">Blokchain/Blokĉeno</span>)",
+      "BLOCKCHAIN_DEF": "La Blokĉeno estas malcentrigita sistemo, kiu, kaze de Duniter, servas por enteni kaj plenumi la <span class=\"text-italic\">regulojn de la mono</span>.<br/><a href=\"https://duniter.org/fr/comprendre/\" target=\"_system\">Scii pli pri Duniter</a> kaj la funkciado de ties blokĉeno.",
+      "UNIVERSAL_DIVIDEND_DEF": "La Universala Dividendo (UD) estas la kvanto de mono kunkreita de ĉiu membro, laŭ la periodo kaj kalkulo difinitaj en la <span class=\"text-italic\">reguloj de la mono</span>.<br/>Por ĉiu perioda dato, la membroj ricevas en sian konton la saman kvanton da nova mono.<br/><br/>La UD spertas regulan kreskon, por resti justa inter la membroj (nunaj kaj venontaj), kalkulitan depende de la meza vivespero, kiel estas demonstrite en la Teorio Relativa pri la Mono (TRM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">Scii pli pri la TRM</a> kaj la liberaj monoj.",
+      "WOT": "Reto de Fido (RdF)",
+      "WOT_DEF": "La Reto de Fido konsistas el la tuto de la membroj de la mono, kaj el la atesto-ligoj, kiuj kunligas ilin.",
+      "DISTANCE_RULE": "Regulo pri distanco",
+      "DISTANCE_RULE_DEF": "La regulo pri distanco de la Reto de Fido difinas <b>maksimuman distancon nepran</b> inter petanto kaj minimuma nombro da referencaj membroj (aŭ centraj membroj). Tiu distanco estas kalkulita uzante la ligojn inter atestaĵoj."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "La menuo <b>{{'MENU.CURRENCY'|translate}}</b> ebligas konsulti la <b>regulojn de la mono</b> kaj ties staton.",
+      "CURRENCY_WOT": "La <b>nombro de membroj</b> montras la gravecon de la komunumo kaj ebligas <b>sekvi ties evoluon</b>.",
+      "CURRENCY_MASS": "Sekvu ĉi tie la <b>ĉioman kvanton da mono</b> ekzistanta kaj ties <b>mezan distribuon</b> por membro.<br/><br/>Tio ĉi ebligas taksi la <b>gravecon de iu sumo</b>, kompare kun tio, kion <b>posedas la aliuloj</b> en sia konto (mezume).",
+      "CURRENCY_UNIT_RELATIVE": "La unuo uzata (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifas, ke la sumoj en {{currency|capitalize}} estis dividitaj per la <b> Universala Dividendo</b> (UD).<br/><br/><small>Tiu relativa unuo estas <b>trafa</b>, ĉar stabila malgraŭ la kvanto de mono, kiu kreskas seninterrompe.</small>",
+      "CURRENCY_CHANGE_UNIT": "La kromaĵo <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> ebligas <b>ŝanĝi la unuon</b>, por vidigi la sumojn <b>rekte en {{currency|capitalize}}</b> (prefere ol en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "La kromaĵo <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> ebligas <b>ŝanĝi la unuon</b>, por vidigi la sumojn en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, tio estas rilate al la Universala Dividendo (la sumo kunproduktita de ĉiu membro).",
+      "CURRENCY_RULES": "La <b>reguloj</b> de la mono fiksas ties funkciadon <b>ĝustan kaj antaŭvideblan</b>.<br/><br/>Vera DNA de la mono, ili igas sian monan kodon <b>legebla kaj travidebla</b>.",
+      "MENU_BTN_NETWORK": "La menuo <b>{{'MENU.NETWORK'|translate}}</b> ebligas konsulti la staton de la reto.",
+      "NETWORK_BLOCKCHAIN": "Ĉiuj operacioj pri la mono estas registritaj en granda konto-libro <b>publika kaj nefalsigebla</b>, ankaŭ nomata <b>blokĉeno</b> (<em>BlockChain</em> en la angla).",
+      "NETWORK_PEERS": "La <b>nodoj</b> videblaj ĉi tie rilatas al la <b>komputiloj, kiuj ĝisdatigas kaj kontrolas</b> la blokĉenon.<br/><br/>Ju pli estas nodoj, des pli la mono havas administradon <b>malcentrigitan</b> kaj fidindan.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "Tiu ĉi <b>numero</b> (verda) indikas la <b>lastan blokon validigitan</b> por tiu ĉi nodo (lasta paĝo skribita en la granda konto-libro).<br/><br/>La verda koloro indikas, ke tiu ĉi bloko estas validigita ankaŭ de <b>la plej multaj el la aliaj nodoj</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Ĉiu membro</b>, ekipita per komputilo kun interreto, <b>povas partopreni aldonante nodon</b>. Sufiĉas <b>instali la programon Duniter</b> (libera kaj senpaga). <a href=\"{{installDocUrl}}\" target=\"_system\">Vidi la gvidilon pri instalado &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "La menuo <b>{{'ACCOUNT.TITLE'|translate}}</b> ebligas aliri la administradon de via konto.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Konsultu ĉi tie la staton de via konto kaj la informojn pri viaj atestaĵoj.",
+      "WALLET_CERTIFICATIONS": "Alklaku ĉi tien por konsulti la detalon pri viaj atestaĵoj (ricevitaj kaj senditaj).",
+      "WALLET_RECEIVED_CERTIFICATIONS": "Alklaku ĉi tien por konsulti la detalon pri viaj <b>ricevitaj atestaĵoj</b>.",
+      "WALLET_GIVEN_CERTIFICATIONS": "Alklaku ĉi tien por konsulti la detalon pri viaj <b>senditaj atestaĵoj</b>.",
+      "WALLET_BALANCE": "La <b>saldo</b> de via konto afiŝiĝas tie ĉi.",
+      "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>La uzata unuo (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifas, ke la sumo en {{currency|capitalize}} estis dividita per la <b>Universala Dividendo</b> (UD) kunkreita de ĉiu membro.<br/><br/>Nuntempe 1 UD valoras {{currentUD|formatInteger}} {{currency|capitalize}}j.",
+      "WALLET_BALANCE_CHANGE_UNIT": "Vi povos <b>ŝanĝi la unuon</b> afiŝitan por la sumoj en la <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Ekzemple por vidigi la sumojn <b>rekte en {{currency|capitalize}}</b>, prefere ol en relativa unuo.",
+      "WALLET_PUBKEY": "Jen la publika ŝlosilo de via konto. Vi povas sciigi ĝin al aliulo, por ke li identigu pli simple vian konton.",
+      "WALLET_SEND": "Efektivigi pagon per kelkaj klakoj.",
+      "WALLET_SEND_NO_MONEY": "Efektivigi pagon per kelkaj klakoj.<br/>(Via saldo ankoraÅ­ ne permesas tion)",
+      "WALLET_OPTIONS": "Tiu ĉi butono ebligas aliri la <b>agojn pri aliĝo</b> kaj sekureco.<br/><br/>Ne forgesu okulumi al ĝi!",
+      "WALLET_RECEIVED_CERTS": "Afiŝiĝos ĉi tie la listo de la personoj, kiuj atestis vin.",
+      "WALLET_CERTIFY": "La butono <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> ebligas elekti identecon kaj atesti ĝin.<br/><br/>Nur uzantoj <b>jam membroj</b> povas atesti aliajn.",
+      "WALLET_CERT_STOCK": "Via stoko da atestaĵoj (senditaj) estas limigita je <b>{{sigStock}} atestaĵoj</b>.<br/><br/>Tiu stoko plu evoluas laŭ la tempo, samtempe kiam la atestaĵoj malvalidiĝas.",
+      "MENU_BTN_TX": "La menuo <b>{{'MENU.TRANSACTIONS'|translate}}</b> ebligas konsulti vian konton, la liston de viaj spezoj, kaj sendi pagon.",
+      "MENU_BTN_WOT": "La menuo <b>{{'MENU.WOT'|translate}}</b> ebligas traserĉi inter la <b>uzantoj</b> de la mono (membroj aŭ ne).",
+      "WOT_SEARCH_TEXT_XS": "Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de pseŭdonimo</b> (aŭ de publika ŝlosilo).<br/><br/>La serĉado ekos aŭtomate.",
+      "WOT_SEARCH_TEXT": "Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de de pseŭdonimo</b> (aŭ de publika ŝlosilo). <br/><br/>Premu poste sur la klavon <b>Enigi</b> por ekigi la serĉadon.",
+      "WOT_SEARCH_RESULT": "Vidigu la detalan slipon simple <b>alklakante</b> linion.",
+      "WOT_VIEW_CERTIFICATIONS": "La linio <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> montras kiom da membroj validigis tiun ĉi identecon.<br/><br/>Tiuj atestaĵoj pruvas, ke la konto apartenas al <b>persono homa kaj vivanta</b>, havanta <b>neniun alian membro-konton</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "Necesas almenaŭ <b>{{sigQty}} atestaĵoj</b> por fariĝi membro kaj ricevi la <b>Universalan Dividendon</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Alklaki ĉi tien ebligas malfermi <b>la liston de ĉiuj atestaĵoj</b> de la identeco (ricevitaj kaj senditaj).",
+      "WOT_VIEW_CERTIFY": "La butono <b>{{'WOT.BTN_CERTIFY'|translate}}</b> ebligas aldoni vian atestaĵon al tiu identeco.",
+      "CERTIFY_RULES": "<b>Atenton:</b> Atestu nur <b>personojn fizikajn vivantajn</b>, posedantajn neniun alian membro-konton.<br/><br/>La sekureco de la mono dependas de ĉies atentego!",
+      "MENU_BTN_SETTINGS": "La <b>{{'MENU.SETTINGS'|translate}}</b> ebligos al vi agordi la programon.",
+      "HEADER_BAR_BTN_PROFILE": "Alklaku ĉi tien por aliri vian <b>uzanto-profilon.</b>",
+      "SETTINGS_CHANGE_UNIT": "Vi povos <b>ŝanĝi la afiŝ-unuon</b> de la sumoj alklakante ĉi-supren.<br/><br/>- Malaktivigu la kromaĵon por afiŝi sumojn en {{currency|capitalize}}.<br/>- Aktivigu la kromaĵon por relativa afiŝado en {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (ĉiuj sumoj estos <b>dividitaj</b> per la Universala Dividendo aktuala).",
+      "END_LOGIN": "Tiu ĉi gvidata vizito <b>finiĝis</b>!<br/><br/>Bonan daŭrigon al vi, en la nova mondo de la<b>libera ekonomio</b>!",
+      "END_NOT_LOGIN": "Tiu ĉi gvidata vizito <b>finiĝis</b>!<br/><br/>Se vi deziras partopreni en la mono {{currency|capitalize}}, sufiĉos al vi alklaki <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> ĉi-sube."
+    }
+  },
+  "API" :{
+    "COMMON": {
+      "LINK_DOC": "Dokumentaro API",
+      "LINK_DOC_HELP": "Dokumentaro por la programistoj",
+      "LINK_STANDARD_APP": "Klasika versio",
+      "LINK_STANDARD_APP_HELP": "Malfermi la klasikan version de {{'COMMON.APP_NAME'|translate}}",
+      "CONNECTION_ERROR": "Nodo <b>{{server}}</b> neatingebla aÅ­ adreso nevalida.<br/><br/>Kontrolu vian interretan konekton, aÅ­ kontaktu la administranton de la retejo</a>."
+    },
+    "HOME": {
+      "TITLE": "Dokumentaro API {{'COMMON.APP_NAME'|translate}}",
+      "MESSAGE": "Bonvenon en la <b>dokumentaro de la API</b> {{'COMMON.APP_NAME'|translate}}.<br/>Konektu viajn retejojn al <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> tre simple!",
+      "MESSAGE_SHORT": "Konektu viajn retejojn al <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> tre simple!",
+      "DOC_HEADER": "Servoj disponeblaj:"
+    },
+    "TRANSFER": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} - Reta pago",
+      "TITLE_SHORT": "Reta pago",
+      "SUMMARY": "Resumo de la pago:",
+      "AMOUNT": "Sumo:",
+      "AMOUNTS_HELP": "Bonvolu elekti la sumon:",
+      "NAME": "Nomo:",
+      "PUBKEY": "Publika ŝlosilo de la ricevonto:",
+      "COMMENT": "Referenco de la spezo:",
+      "NODE": "Adreso de la nodo:",
+      "DEMO": {
+        "SALT": "demo",
+        "PASSWORD": "demo",
+        "PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
+        "HELP": "<b>Demonstra moduso</b>: Neniu pago reale estos sendita dum tiu simulado.<br/>Bonvolu uzi la identigilojn: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
+        "BAD_CREDENTIALS": "Kontrolu vian tajpaĵon.<br/>En demonstra moduso, la identigiloj estas: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
+      },
+      "INFO": {
+        "SUCCESS_REDIRECTING_WITH_NAME": "Pago sendita.<br/>Redirektiĝo al <b>{{name}}</b>...",
+        "SUCCESS_REDIRECTING": "Pago sendita.<br/>Redirektiĝo al la retejo de la vendanto...",
+        "CANCEL_REDIRECTING_WITH_NAME": "Pago nuligita.<br/>Redirektiĝo al <b>{{name}}</b>...",
+        "CANCEL_REDIRECTING": "Pago nuligita.<br/>Redirektiĝo al la retejo de la vendanto..."
+      },
+      "ERROR": {
+        "TRANSFER_FAILED": "Pago malsukcesa"
+      }
+    },
+    "DOC": {
+      "DESCRIPTION_DIVIDER": "Priskribo",
+      "URL_DIVIDER": "Adreso alvokita",
+      "PARAMETERS_DIVIDER": "Parametroj",
+      "AVAILABLE_PARAMETERS": "Jen la listo de la eblaj parametroj:",
+      "DEMO_DIVIDER": "Testi",
+      "DEMO_HELP": "Por testi tiun servon, alklaku la butonon ĉi-apude. La rezulto afiŝiĝos sube.",
+      "DEMO_RESULT": "Rezulto sendita de la alvoko:",
+      "DEMO_RESULT_PEER": "Adreso de la uzata nodo:",
+      "DEMO_SUCCEED": "<i class=\"icon ion-checkmark\"></i> Sukceso!",
+      "DEMO_CANCELLED": "<i class=\"icon ion-close\"></i> Nuligita de la uzanto",
+      "INTEGRATE_DIVIDER": "Integri",
+      "INTEGRATE_CODE": "Kodo:",
+      "INTEGRATE_RESULT": "AntaÅ­vidigo de la rezulto:",
+      "INTEGRATE_PARAMETERS": "Parametroj",
+      "TRANSFER": {
+        "TITLE": "Pagoj",
+        "DESCRIPTION": "De retejo (ekz.: ret-vendado) vi povas komisii la pagon en libera mono al Cesium API. Por tio, sufiĉas al vi ekigi la malfermon de paĝo ĉe la sekvanta adreso:",
+        "PARAM_PUBKEY": "Publika ŝlosilo de la ricevonto",
+        "PARAM_PUBKEY_HELP": "Publika ŝlosilo de la ricevonto (devige)",
+        "PARAM_AMOUNT": "Sumo",
+        "PARAM_AMOUNT_HELP": "Sumo de la spezo (devige). Pluraj valoroj permesataj, uzante apartigilon (punkto-komo, vertikala streko aÅ­ spaco).",
+        "PARAM_COMMENT": "Referenco (aÅ­ komento)",
+        "PARAM_COMMENT_HELP": "Referenco aŭ komento. Tio ekzemple ebligos al vi identigi la pagon en la blokĉeno.",
+        "PARAM_NAME": "Nomo (de la ricevonto aÅ­ de la retejo)",
+        "PARAM_NAME_HELP": "La nomo de la ricevonto, aÅ­ de la retejo alvokanta. Tio povas estis legebla nomo (\"Mia retejo\"), aÅ­ alie pseÅ­do-retadreso (\"MiaRetejo.com\").",
+        "PARAM_REDIRECT_URL": "Retadreso por redirektiĝo",
+        "PARAM_REDIRECT_URL_HELP": "Retadreso (URL) por redirektiĝo, alvokita kiam la pago estis sendita. Ĝi povas enteni la sekvantajn signojn, kiuj estos anstataŭigitaj per la valoroj de la spezo: \"{tx}\", \"{hash}\", \"{comment}\", \"{amount}\", \"{pubkey}\" kaj \"{node}\".",
+        "PARAM_CANCEL_URL": "Retadreso por nuligo",
+        "PARAM_CANCEL_URL_HELP": "Retadreso (URL) kaze de nuligo de la pago, fare de la uzanto. Äœi povas enteni la sekvantajn signojn, kiuj estos anstataÅ­igitaj lastmomente: \"{comment}\", \"{amount}\" kaj {pubkey}.",
+        "PARAM_PREFERRED_NODE": "Adreso de la preferata nodo",
+        "PARAM_PREFERRED_NODE_HELP": "Adreso (URL) de la nodo Duniter preferinde uzota (\"g1.domaine.com:443\" aÅ­ \"https://g1.domaine.com\").",
+        "EXAMPLES_HELP": "Jen ekzemploj pri integrado:",
+        "EXAMPLE_BUTTON": "Butono HTML",
+        "EXAMPLE_BUTTON_DEFAULT_TEXT": "Pagi en {{currency|currencySymbol}}",
+        "EXAMPLE_BUTTON_DEFAULT_STYLE": "Personigita stilo",
+        "EXAMPLE_BUTTON_TEXT_HELP": "Buton-teksto",
+        "EXAMPLE_BUTTON_BG_COLOR": "Fon-koloro",
+        "EXAMPLE_BUTTON_BG_COLOR_HELP": "Ekzemplo: #fbc14c, nigra, helgriza, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_FONT_COLOR": "Teksto-koloro",
+        "EXAMPLE_BUTTON_FONT_COLOR_HELP": "Ekzemplo: nigra, oranĝa, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_TEXT_ICON": "Ikono",
+        "EXAMPLE_BUTTON_TEXT_WIDTH": "Larĝeco",
+        "EXAMPLE_BUTTON_TEXT_WIDTH_HELP": "Ekzemplo: 200px, 50%",
+        "EXAMPLE_BUTTON_ICON_NONE": "Neniu",
+        "EXAMPLE_BUTTON_ICON_DUNITER": "Insigno Duniter",
+        "EXAMPLE_BUTTON_ICON_CESIUM": "Insigno Cesium",
+        "EXAMPLE_BUTTON_ICON_G1_COLOR": "Insigno Äž1",
+        "EXAMPLE_BUTTON_ICON_G1_BLACK": "Insigno Äž1 (nigra)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("es-ES", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "fecha: {{build}}",
+    "PUBKEY": "Llave pública",
+    "MEMBER": "Miembro",
+    "BLOCK": "Bloque",
+    "BTN_OK": "OK",
+    "BTN_YES": "Sí",
+    "BTN_NO": "No",
+    "BTN_SEND": "Enviar",
+    "BTN_SEND_MONEY": "Hacer una transferencia",
+    "BTN_SEND_MONEY_SHORT": "Transferencia",
+    "BTN_SAVE": "Guardar",
+    "BTN_YES_SAVE": "Sí, guardar",
+    "BTN_YES_CONTINUE": "Sí, continuar",
+    "BTN_SHOW": "Ver",
+    "BTN_SHOW_PUBKEY": "Ver la llave",
+    "BTN_RELATIVE_UNIT": "¿Mostrar las importes en DU?",
+    "BTN_BACK": "Anterior",
+    "BTN_NEXT": "Siguiente",
+    "BTN_IMPORT": "Importar",
+    "BTN_CANCEL": "Cancelar",
+    "BTN_CLOSE": "Cerrar",
+    "BTN_LATER": "Más tarde",
+    "BTN_LOGIN": "Connectarse",
+    "BTN_LOGOUT": "Desconexión",
+    "BTN_ADD_ACCOUNT": "Nueva cuenta",
+    "BTN_SHARE": "Compartir",
+    "BTN_EDIT": "Modificar",
+    "BTN_DELETE": "Suprimir",
+    "BTN_ADD": "Añadir",
+    "BTN_SEARCH": "Buscar",
+    "BTN_REFRESH": "Actualizar",
+    "BTN_RETRY": "Empezar de nuevo",
+    "BTN_START": "Empezar",
+    "BTN_CONTINUE": "Continuar",
+    "BTN_CREATE": "Crear",
+    "BTN_UNDERSTOOD": "Entendido",
+    "BTN_OPTIONS": "Opciones",
+    "BTN_HELP_TOUR": "Visita guiada",
+    "BTN_HELP_TOUR_SCREEN": "Descubrir esta pantalla",
+    "BTN_DOWNLOAD": "Descargar",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Descargar el estado de cuenta",
+    "BTN_MODIFY": "Modificar",
+    "CHOOSE_FILE": "Deposite archivo<br/>o clique para seleccionarlo",
+    "DAYS": "Días",
+    "NO_ACCOUNT_QUESTION": "¿Todavía no es miembro? ¡Crear una cuenta!",
+    "SEARCH_NO_RESULT": "Ningún resultado encontrado",
+    "LOADING": "Espere por favor...",
+    "LOADING_WAIT": "Espere por favor...<br/><small>(Esperando disponibilidad de nodo)</small>",
+    "SEARCHING": "Búsqueda en proceso...",
+    "FROM": "De",
+    "TO": "A",
+    "COPY": "Copiar",
+    "LANGUAGE": "Idioma",
+    "UNIVERSAL_DIVIDEND": "Dividendo universal",
+    "UD": "DU",
+    "DATE_PATTERN": "DD/MM/YYYY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "DD/MM/YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+    "EMPTY_PARENTHESIS": "(vacío)",
+    "UID": "Seudónimo",
+    "ENABLE": "Activado",
+    "DISABLE": "Desactivado",
+    "RESULTS_LIST": "Resultados:",
+    "RESULTS_COUNT": "{{count}} resultados",
+    "EXECUTION_TIME": "ejecutado en {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "¿Publicar los valores no codificados?",
+    "POPOVER_ACTIONS_TITLE": "Opciones",
+    "POPOVER_FILTER_TITLE": "Filtros",
+    "SHOW_MORE": "Mostrar más",
+    "SHOW_MORE_COUNT": "(límite actual {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Compartir",
+      "SHARE_ON_TWITTER": "Compartir en Twitter",
+      "SHARE_ON_FACEBOOK": "Compartir en Facebook",
+      "SHARE_ON_DIASPORA": "Compartir en Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Compartir en Google+"
+    },
+    "FILE": {
+      "DATE" : "Fecha:",
+      "TYPE" : "Tipo:",
+      "SIZE": "Tamaño:",
+      "VALIDATING": "Validación en progreso..."
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Elegir la fuente:",
+    "BTN_PICTURE_GALLERY": "Galería",
+    "BTN_PICTURE_CAMERA": "<b>Cámara</b>"
+  },
+  "MENU": {
+    "HOME": "Recepción",
+    "WOT": "Directorio",
+    "CURRENCY": "Moneda",
+    "ACCOUNT": "Mi cuenta",
+    "WALLETS": "Mis monederos",
+    "SETTINGS": "Configuraciones",
+    "NETWORK": "Red",
+    "TRANSACTIONS": "Mis operaciones"
+  },
+  "ABOUT": {
+    "TITLE": "A propósito ",
+    "LICENSE": "Aplicación <b>libre</b> (licencia GNU AGPLv3).",
+    "LATEST_RELEASE": "Hay una <b>versión más nueva</b> de {{'COMMON.APP_NAME' | translate}} (<b>v{{version}}</b>)",
+    "PLEASE_UPDATE": "Por favor actualice {{'COMMON.APP_NAME' | translate}} (última versión: <b>v{{version}}</b>)",
+    "CODE": "Código fuente:",
+    "DEVELOPERS": "Desarrollado por:",
+    "FORUM": "Foro:",
+    "PLEASE_REPORT_ISSUE": "No dude en informarnos de las anomalías encontradas",
+    "REPORT_ISSUE": "Reportar un problema"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Bienvenido(a) a la aplicación Cesium !",
+    "MESSAGE": "Seguir las cuentas de {{currency|abbreviate}} fácilmente",
+    "BTN_CURRENCY": "Explorar la moneda",
+    "BTN_ABOUT": "Acerca de:",
+    "BTN_HELP": "Ayuda en línea",
+    "REPORT_ISSUE": "anomalía",
+    "NOT_YOUR_ACCOUNT_QUESTION": "¿Usted no es dueño de la cuenta <<b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b>?",
+    "BTN_CHANGE_ACCOUNT": "Desconectar esta cuenta",
+    "CONNECTION_ERROR": "Nodo <b>{{servidor}}</b> inalcanzable o dirección inválida.<br/><br/>Compruebe su conexión a Internet, o nodo de conmutación <a class=\"positive\" ng-click=\"doQuickFix('settings')\">en la configuración</a>."
+  },
+  "SETTINGS": {
+    "TITLE": "Configuración",
+    "DISPLAY_DIVIDER": "Visualización",
+    "STORAGE_DIVIDER": "Almacenamiento",
+    "NETWORK_SETTINGS": "Red",
+    "PEER": "Dirección del nodo Duniter",
+    "PEER_CHANGED_TEMPORARY": "Dirección utilizada temporalmente",
+    "PERSIST_CACHE": "Mantener datos de navegación (experimental)",
+    "PERSIST_CACHE_HELP": "Permite una navegación más rápida, conservando localmente los datos recibidos, para usar de una sesión a otra.",
+    "USE_LOCAL_STORAGE": "Activar el almacenamiento local",
+    "USE_LOCAL_STORAGE_HELP": "Permitir el ahorro de almacenamiento local",
+    "WALLETS_SETTINGS": "Mis monederos",
+    "USE_WALLETS_ENCRYPTION": "¿Asegurar la lista?",
+    "ENABLE_HELPTIP": "Activar las ayudas contextuales",
+    "ENABLE_UI_EFFECTS": "Activar los efectos visuales",
+    "HISTORY_SETTINGS": "Operaciones de cuentas",
+    "DISPLAY_UD_HISTORY": "¿Publicar los dividendos producidos?",
+    "TX_HISTORY_AUTO_REFRESH": "Activar actualización automática?",
+    "TX_HISTORY_AUTO_REFRESH_HELP": "Actualice el saldo y las operaciones automáticamente, en cada nuevo bloque.",
+    "AUTHENTICATION_SETTINGS": "Autenticación",
+    "KEEP_AUTH": "Caducidad de la autenticación",
+    "KEEP_AUTH_SHORT": "Caducidad",
+    "KEEP_AUTH_HELP": "Definir cuándo limpiar la memoria de autenticación.",
+    "KEEP_AUTH_OPTION": {
+      "NEVER": "Después de cada operación",
+      "SECONDS": "Después de {{value}} segundos de inactividad",
+      "MINUTE": "Después de {{value}}min de inactividad",
+      "MINUTES": "Después de {{value}}mins de inactividad",
+      "HOUR": "Después de {{value}}h de inactividad",
+      "ALWAYS": "Al finalizar la sesión"
+    },
+    "KEYRING_FILE": "Archivo de llavero",
+    "REMEMBER_ME": "Recordarme",
+    "REMEMBER_ME_HELP": "Permite mantenerse siempre conectado (no recomendado), conservando localmente la llave pública.",
+    "PLUGINS_SETTINGS": "Extensiones",
+    "BTN_RESET": "Restaurar los valores por defecto" ,
+    "EXPERT_MODE": "Activar el modo experto",
+    "EXPERT_MODE_HELP": "Permite una visualización más detallada",
+    "POPUP_PEER": {
+      "TITLE": "Nodo Duniter",
+      "HOST": "Dirección",
+      "HOST_HELP": "Dirección: servidor:puerto",
+      "USE_SSL": "¿Segura?",
+      "USE_SSL_HELP": "(Cifrado SSL)",
+      "BTN_SHOW_LIST": "Lista de nodos"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Hash: {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Bloque #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Bloque corriente",
+      "TITLE": "Bloque #{{number|formatInteger}}",
+      "COMPUTED_BY": "Calculado por el nodo de",
+      "SHOW_RAW": "Ver el fichero en bruto",
+      "TECHNICAL_DIVIDER": "Informaciones técnicas",
+      "VERSION": "Versión del formato",
+      "HASH": "Hash calculado",
+      "UNIVERSAL_DIVIDEND_HELP": "Moneda co-producida por cada uno de los {{membersCount}} miembros",
+      "EMPTY": "Ningún dato en este bloque",
+      "POW_MIN": "Dificultad mínima",
+      "POW_MIN_HELP": "Dificultad impuesta por el cálculo del hash",
+      "DATA_DIVIDER": "Datos",
+      "IDENTITIES_COUNT": "Nuevas identidades",
+      "JOINERS_COUNT": "Nuevos miembros",
+      "ACTIVES_COUNT": "Renovaciones",
+      "ACTIVES_COUNT_HELP": "Miembros que han renovado sus adhesiones",
+      "LEAVERS_COUNT": "Miembros salientes",
+      "LEAVERS_COUNT_HELP": "Miembros salientes que ya no quieren estar certificados",
+      "EXCLUDED_COUNT": "Miembros excluidos",
+      "EXCLUDED_COUNT_HELP": "Antiguos miembros excluidos por no renovación o falta de certificaciones",
+      "REVOKED_COUNT": "Identidades revocadas",
+      "REVOKED_COUNT_HELP": "Estas cuentas no podrán ser miembros",
+      "TX_COUNT": "Transacciones",
+      "CERT_COUNT": "Certificaciones",
+      "TX_TO_HIMSELF": "Operación de cambio",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Condiciones de desbloqueo",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "y",
+        "OR": "o"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>Firma</b> de ",
+        "XHX": "<b>Contraseña</b>, cuyo SHA256 =",
+        "CSV": "Bloqueado durante",
+        "CLTV": "Bloqueado hasta"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Bloques",
+      "NO_BLOCK": "Ningún bloque",
+      "LAST_BLOCKS": "últimos bloques:",
+      "BTN_COMPACT": "Compactar"
+    }
+  },
+  "CURRENCY": {
+    "VIEW": {
+      "TITLE": "Moneda",
+      "TAB_CURRENCY": "Moneda",
+      "TAB_WOT": "Red de confianza",
+      "TAB_NETWORK": "Red",
+      "TAB_BLOCKS": "Bloques",
+      "CURRENCY_SHORT_DESCRIPTION": "{{currency|abbreviate}} es una <b>moneda libre</b>, originada el {{firstBlockTime|formatFromNow}}. Ella cuenta actualmente <b>{{N}} miembros</b>, que producen y recibir un <a ng-click=\"showHelpModal('ud')\">Dividendo universal</a> (DU), cada {{dt|formatPeriod}}.",
+      "NETWORK_RULES_DIVIDER": "Reglas de la red",
+      "CURRENCY_NAME": "Nombre de la moneda",
+      "MEMBERS": "Cantidad de miembros",
+      "MEMBERS_VARIATION": "variaciones del último DU",
+      "MONEY_DIVIDER": "Moneda",
+      "MASS": "Masa monetaria",
+      "SHARE": "Masa por miembro",
+      "UD": "Dividendo universal",
+      "C_ACTUAL": "Crecimiento actual",
+      "MEDIAN_TIME": "Hora de la blockchain",
+      "POW_MIN": "Nivel mínimo de dificultad de cálculo",
+      "MONEY_RULES_DIVIDER": "Reglas de la moneda",
+      "C_RULE": "Crecimiento teórico objetivo",
+      "UD_RULE": "Cálculo del dividendo universal",
+      "DT_REEVAL": "Periodo de revalorización del DU",
+      "REEVAL_SYMBOL": "reval",
+      "DT_REEVAL_VALUE": "Todos los <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+      "UD_REEVAL_TIME0": "Fecha de la primera revalorización",
+      "SIG_QTY_RULE": "Número de certificaciones requeridas para ser miembro",
+      "SIG_STOCK": "Número máximo de certificaciones emitidas por miembros",
+      "SIG_PERIOD": "Plazo mínimo de espera entre 2 certificaciones sucesivas emitidas por la misma persona",
+      "SIG_WINDOW": "Plazo límite para tomar en cuenta una certificación",
+      "SIG_VALIDITY": "Duración de una certificación que se ha tenido en cuenta.",
+      "MS_WINDOW": "Duración límite para toma en cuenta de una adhesión",
+      "MS_VALIDITY": "Duración de una certificación",
+      "STEP_MAX": "Distancia máxima entre un nuevo entrante y los miembros referentes",
+      "WOT_RULES_DIVIDER": "Reglas de la red de confianza",
+      "SENTRIES": "Cantidad de certificaciones necesarias para ser miembro referente",
+      "SENTRIES_FORMULA": "Cantidad de certificaciones necesarias para ser miembro referente (fórmula)",
+      "XPERCENT":"Porcentaje mínimo de miembros referentes necesario para respetar la regla de distancia",
+      "AVG_GEN_TIME": "Tiempo medio entre dos bloques",
+      "CURRENT": "actual",
+      "MATH_CEILING": "TECHO",
+      "DISPLAY_ALL_RULES": "¿Ver todas las reglas?",
+      "BTN_SHOW_LICENSE": "Ver la licencia",
+      "WOT_DIVIDER": "Red de confianza"
+    },
+    "LICENSE": {
+      "TITLE": "Licencia de la moneda",
+      "BTN_DOWNLOAD": "Descagar el fichero",
+      "NO_LICENSE_FILE": "Fichero de licencia no encontrado."
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Hora de la blockchain",
+      "LOADING_PEERS": "Cargando los nodos...",
+      "NODE_ADDRESS": "Dirección:",
+      "SOFTWARE": "Software:",
+      "WARN_PRE_RELEASE": "prelanzamiento (última versión estable: <b>{{version}}</b>)",
+      "WARN_NEW_RELEASE": "Versión <b>{{version}}</b> disponible",
+      "WS2PID": "ID:",
+      "PRIVATE_ACCESS": "Acceso privado",
+      "POW_PREFIX": "Prefijo de la prueba de trabajo:",
+      "ENDPOINTS": {
+        "BMAS": "Interfaz segura (SSL)",
+        "BMATOR": "Interfaz red TOR",
+        "WS2P": "Interfaz WS2P",
+        "ES_USER_API": "Nodo de datos Cesium+"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "La visualización de los nodos sin SSL está deteriorada porque Cesium funciona en modo HTTPS."
+    }
+  },
+  "PEER": {
+    "PEERS": "Nodos",
+    "SIGNED_ON_BLOCK": "Firmado sobre el bloque",
+    "MIRROR": "espejo",
+    "MIRRORS": "Espejo",
+    "MIRROR_PEERS": "Nodos espejo",
+    "PEER_LIST": "Lista de nodos",
+    "MEMBERS": "Miembro",
+    "MEMBER_PEERS": "Nodos miembro",
+    "ALL_PEERS": "Todos los nodos",
+    "DIFFICULTY": "Dificultad",
+    "API": "API",
+    "CURRENT_BLOCK": "Bloque #",
+    "POPOVER_FILTER_TITLE": "Filtro",
+    "OFFLINE": "Fuera de línea",
+    "OFFLINE_PEERS": "Nodos fuera de línea",
+    "BTN_SHOW_PEER": "Ver nodo",
+    "VIEW": {
+      "TITLE": "Nodo",
+      "OWNER": "Propiedad de",
+      "SHOW_RAW_PEERING": "Ver la mapa de red",
+      "SHOW_RAW_CURRENT_BLOCK": "Ver el último bloque (formato bruto)",
+      "LAST_BLOCKS": "Bloques recientes",
+      "KNOWN_PEERS": "Nodos conocidos:",
+      "GENERAL_DIVIDER": "Información general",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "No se pudo obtener la información del nodo usando la red TOR.",
+        "LOADING_NODE_ERROR": "No se pudo obtener la información del nodo"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Buscar (seudónimo o llave pública)",
+    "SEARCH_INIT_PHASE_WARNING": "Durante la etapa de preinscripción, el tiempo de búsqueda de las inscripciones en espera <b>puede ser largo</b>. Gracias por su paciencia...",
+    "REGISTERED_SINCE": "Registrado en",
+    "REGISTERED_SINCE_BLOCK": "Registrado en el bloque #",
+    "NO_CERTIFICATION": "Ninguna certificación validada",
+    "NO_GIVEN_CERTIFICATION": "Ninguna certificación emitida",
+    "NOT_MEMBER_PARENTHESIS": "(no miembro)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(identidad revocada)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(revocación en proceso)",
+    "EXPIRE_IN": "Expira el",
+    "NOT_WRITTEN_EXPIRE_IN": "Fecha límite<br/>de procesamiento",
+    "EXPIRED": "Expirado",
+    "PSEUDO": "Seudónimo",
+    "SIGNED_ON_BLOCK": "Emitida en el bloque #{{block}}",
+    "WRITTEN_ON_BLOCK": "Escrita en el bloque #{{block}}",
+    "GENERAL_DIVIDER": "Informaciones generales",
+    "NOT_MEMBER_ACCOUNT": "Cuenta no miembro",
+    "NOT_MEMBER_ACCOUNT_HELP": "Se trata de un simple monedero, sin solicitud de adhesión en espera.",
+    "TECHNICAL_DIVIDER": "Informaciones técnicas",
+    "BTN_CERTIFY": "Certificar",
+    "BTN_YES_CERTIFY": "Sí, certificar",
+    "BTN_SELECT_AND_CERTIFY": "Nueva certificación",
+    "ACCOUNT_OPERATIONS": "Operaciones de cuenta",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identidad {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Directorio",
+      "NEWCOMERS": "Nuevos miembros:",
+      "NEWCOMERS_COUNT": "{{count}} miembros",
+      "PENDING": "Inscripciones en espera:",
+      "PENDING_COUNT": "{{count}} inscripciones en espera",
+      "REGISTERED": "Inscrito {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Miembro desde {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Nuevos miembros",
+      "BTN_PENDING": "Inscripciones en espera",
+      "SHOW_MORE": "Mostrar más",
+      "SHOW_MORE_COUNT": "(límite actual a {{limit}})",
+      "NO_PENDING": "Ninguna inscripción en espera.",
+      "NO_NEWCOMERS": "Ningun miembro."
+    },
+    "CONTACTS": {
+      "TITLE": "Contactos"
+    },
+    "MODAL": {
+      "TITLE": "Buscar"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certificaciones",
+      "SUMMARY": "Certificaciones recibidas",
+      "LIST": "Detalle de las certificaciones recibidas",
+      "PENDING_LIST": "Certificaciones en espera de tratamiento",
+      "RECEIVED": "Certificaciones recibidas",
+      "RECEIVED_BY": "Certificaciones recibidas por {{uid}}",
+      "ERROR": "Certificaciones recibidas por error",
+      "SENTRY_MEMBER": "Miembro referente"
+    },
+    "OPERATIONS": {
+      "TITLE": "{{uid}} - Operaciones"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certificaciones emitidas",
+      "SUMMARY": "Certificaciones emitidas",
+      "LIST": "Detalle de las certificaciones emitidas",
+      "PENDING_LIST": "Certificaciones en espera a ser procesadas",
+      "SENT": "Certificaciones emitidas",
+      "SENT_BY": "Certificaciones emitidas por {{uid}}",
+      "ERROR": "Certificaciones emitidas por error"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> Conexión",
+    "SCRYPT_FORM_HELP": "Ingrese sus credenciales.<br>Recuerde verificar que la clave pública es su cuenta.",
+    "PUBKEY_FORM_HELP": "Por favor ingrese una clave de cuenta pública:",
+    "FILE_FORM_HELP": "Elija el archivo de llavero para usar:",
+    "SCAN_FORM_HELP": "Escanee el código QR de la monedero.",
+    "SALT": "Identificador secreto",
+    "SALT_HELP": "Identificador secreto",
+    "SHOW_SALT": "¿Visualizar el identificador secreto?",
+    "PASSWORD": "Frase secreta",
+    "PASSWORD_HELP": "Frase secreta",
+    "PUBKEY_HELP": "llave pública",
+    "NO_ACCOUNT_QUESTION": "¿Aún no tiene cuenta?",
+    "HAVE_ACCOUNT_QUESTION": "¿Ya tienes una cuenta?",
+    "CREATE_ACCOUNT": "Crear una cuenta",
+    "CREATE_FREE_ACCOUNT": "Crear una cuenta gratis",
+    "FORGOTTEN_ID": "¿Olvidó su frase secreta?",
+    "ASSOCIATED_PUBKEY": "Clave pública del llavero:",
+    "BTN_METHODS": "Otros métodos",
+    "BTN_METHODS_DOTS": "Método de cambio...",
+    "METHOD_POPOVER_TITLE": "Métodos",
+    "MEMORIZE_AUTH_FILE": "Recuerda este llavero al momento de la sesión de navegación",
+    "SCRYPT_PARAMETERS": "Configuraciones (Scrypt) :",
+    "AUTO_LOGOUT": {
+      "TITLE": "Información",
+      "MESSAGE": "<i class=\"ion-android-time\"></i> Se ha <b>desconectado</b> de forma automática, después de un periodo de inactividad prolongada.",
+      "BTN_RELOGIN": "Volver a conectarme",
+      "IDLE_WARNING": "Se desconectará en... {{countdown}}"
+    },
+    "METHOD": {
+      "SCRYPT_DEFAULT": "Identificación predeterminada",
+      "SCRYPT_ADVANCED": "Sallaje avanzado",
+      "FILE": "Archivo llavero",
+      "PUBKEY": "Solo clave pública",
+      "SCAN": "Escanear un código QR"
+    },
+    "SCRYPT": {
+      "SIMPLE": "Ligero",
+      "DEFAULT": "Predeterminado",
+      "SECURE": "Seguro",
+      "HARDEST": "El más seguro",
+      "EXTREME": "Extremo",
+      "USER": "Personalizado",
+      "N": "N (Loop):",
+      "r": "r (RAM):",
+      "p": "p (CPU):"
+    },
+    "FILE": {
+      "HELP": "Formato de archivo esperado: <b>.yml</b> o <b>.dunikey</b> (tipo PubSec, WIF o EWIF)."
+    }
+  },
+  "AUTH": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> AAutenticación",
+    "BTN_AUTH": "Autenticar",
+    "GENERAL_HELP": "Por favor, autentíquese:",
+    "EXPECTED_UID_HELP": "Por favor inicie sesión en la cuenta de <i class=\"ion-person\"></i> {{uid}}:",
+    "EXPECTED_PUBKEY_HELP": "Por favor, autentifíquese en la monedero <i class=\"ion-key\"></i> {{pubkey|formatPubkey}} :",
+    "SCAN_FORM_HELP": "Escanee el código QR de la <b>clave privada</b> de la monedero."
+  },
+  "ACCOUNT": {
+    "TITLE": "Mi cuenta",
+    "BALANCE": "Saldo",
+    "LAST_TX": "última validadas transacción",
+    "BALANCE_ACCOUNT": "Saldo de la cuenta",
+    "NO_TX": "Ninguna transacción",
+    "SHOW_MORE_TX": "Mostrar más",
+    "SHOW_ALL_TX": "Mostrar todo",
+    "TX_FROM_DATE": "(límite actual a {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Transacciones en proceso de se procesadas",
+    "VALIDATING_TX": "Transacciones validadas",
+    "ERROR_TX": "Transacciones no ejecutadas",
+    "ERROR_TX_SENT": "Transacciones ejecutadas fallidas",
+    "PENDING_TX_RECEIVED": "Tansacciones en espera de recepción",
+    "EVENTS": "Eventos",
+    "WAITING_MEMBERSHIP": "Solicitud de adhesión emitida. En espera de aceptación.",
+    "WAITING_CERTIFICATIONS": "Debe obtener {{needCertificationCount}} certificación(es) para ser miembro.",
+    "WILL_MISSING_CERTIFICATIONS": "Pronto le van a <b>faltar certificaciones</b> (al menos {{willNeedCertificationCount}} son necesarias)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Su adhesión como miembro <b>va a expirar {{membershipExpiresIn|formatDurationTo}}</b>. Piense en <a ng-click=\"doQuickFix('renew')\">renovar su adhesión</a> mientras tanto.",
+    "NEED_RENEW_MEMBERSHIP": "No es miembro porque su adhesión <b>ha expirado</b>. Piense en <a ng-click=\"doQuickFix('renew')\">renovar su adhesión</a>.",
+    "NO_WAITING_MEMBERSHIP": "No hay adhesión miembro en espera. Si desea <b>convertirse en miembro</b>, por favor <a ng-click=\"doQuickFix('membership')\">envíe su adhesión como miembro</a>.",
+    "CERTIFICATION_COUNT": "Certificaciones recibidas",
+    "CERTIFICATION_COUNT_SHORT": "Certificaciones",
+    "SIG_STOCK": "Certificaciones emitidas",
+    "BTN_RECEIVE_MONEY": "Recibir",
+    "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Cambiar a otra identidad...",
+    "BTN_FIX_MEMBERSHIP": "Volver a enviar la adhesión...",
+    "BTN_MEMBERSHIP_RENEW": "Renovar la adhesión",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Renovar la adhesión...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Cancelar la adhesión...",
+    "BTN_SECURITY_DOTS": "Cuenta y securidad...",
+    "BTN_SHOW_DETAILS": "Publicar la información técnica",
+    "LOCKED_OUTPUTS_POPOVER": {
+      "TITLE": "Importe bloqueado",
+      "DESCRIPTION": "Aquí están las condiciones para desbloquear este importe:",
+      "DESCRIPTION_MANY": "Esta transacción esta compuesta de varias partes, cuyas condiciones de desbloqueo son:",
+      "LOCKED_AMOUNT": "Condiciones del importe:"
+    },
+    "NEW": {
+      "TITLE": "Inscripción",
+      "INTRO_WARNING_TIME": "Crear una cuenta en {{name|capitalize}} es muy simple. Sin embargo, por favor tome el tiempo suficiente para dar correctamente este paso (no olvidar los identificadores, frase secreta, etc.).",
+      "INTRO_WARNING_SECURITY": "Asegúrece de que el equipo que utiliza actualmente (ordenador, tableta, teléfono) <b>es seguro y digno de confianza</b>.",
+      "INTRO_WARNING_SECURITY_HELP": "Actualizaciones de antivirus, firewall activado, sesión protegidos por contraseña o código PIN, etc.",
+      "INTRO_HELP": "Haga clic en <b>{{'COMMON.BTN_START'|translate}}</b> para iniciar la creación de la cuenta. Se le guiará paso a paso.",
+      "REGISTRATION_NODE": "Su registro será grabado a través del nodo Duniter <b>{{server}}</b>, que luego se transmitirá al resto del sistema de la moneda.",
+      "REGISTRATION_NODE_HELP": "Si usted no confía en este nodo, <a ng-click=\"doQuickFix('settings')\">cambie la configuración</a> de Cesium.",
+      "SELECT_ACCOUNT_TYPE": "Elegir el tipo de cuenta a crear:",
+      "MEMBER_ACCOUNT": "Cuenta miembro",
+      "MEMBER_ACCOUNT_TITLE": "Crear una cuenta miembro",
+      "MEMBER_ACCOUNT_HELP": "Si aún no está inscrito como un individuo (Solamente una cuenta posible por individuo).",
+      "WALLET_ACCOUNT": "Simple monedero",
+      "WALLET_ACCOUNT_TITLE": "Crear una cuenta simple",
+      "WALLET_ACCOUNT_HELP": "Monedero simple para todos los otros casos, por ejemplo si necesita una cuenta suplementaria.<br/>El Dividendo Universal no será producido para esta cuenta.",
+      "SALT_WARNING": "Elija su identificador secreto.<br/>Se solicitará cada vez que se conectará con esta cuenta.<br/><br/><b>Retenga bien este identificador secreto</b>.<br/>¡En caso de pérdida, nadie podrá acceder a su cuenta!",
+      "PASSWORD_WARNING": "Elija su frase secreta.<br/>Se solicitará cada vez que se conectará con esta cuenta.<br/><br/><b>Retenga bien esta frase secreta</b>.<br/>¡En caso de pérdida, nadie podrá acceder su cuenta!",
+      "PSEUDO_WARNING": "Elija un seudónimo.<br/>Sirve para que los otros miembros puedan encontrarlo más fácilmente.<br/><br/>No debe contener <b>ni espacios ni caracteres acentuados</b>.<div class='hidden-xs'><br/>Ejemplo: <span class='gray'>SophieDupond, MarcelChemin, etc.</span>",
+      "PSEUDO": "Seudónimo",
+      "PSEUDO_HELP": "Seudónimo",
+      "SALT_CONFIRM": "Confirmación",
+      "SALT_CONFIRM_HELP": "Confirmación del identificador secreto",
+      "PASSWORD_CONFIRM": "Confirmación",
+      "PASSWORD_CONFIRM_HELP": "Confirmación de la frase secreta",
+      "SLIDE_6_TITLE": "Confirmación:",
+      "COMPUTING_PUBKEY": "Cálculo en proceso...",
+      "LAST_SLIDE_CONGRATULATION": "<b>¡Bien!</b> Ha introducido todas los datos necesarias.<br/><b>Puede solicitar</b> la creación de su cuenta.</b><br/><br/>Para su información, la llave pública que se muestra más abajo identificará su futura cuenta.<br/>Esta podrá ser comunicada a terceros para recibir sus pagos.<br/>Sin embargo, <b>no es útil</b> anotarla aquí.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Advertencia:</b> el identificador secreto, la frase secreta y el seudónimo no podrán estar modificados.<br/><b>¡Asegúrese siempre de recordarlos!</b><br/><br/><b>¿Está usted seguro</b> de querer solicitar la inscripción?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Advertencia:</b> el identificador secreto y la frase secreta no podrán estar modificados.<br/><b>¡Asegúrese de recordarlos siempre!</b><br/><br/><b>¿Está usted seguro</b> de querer continuar con estos identificadores?",
+      "CHECKING_PSEUDO": "Comprobar de disponibilidad...",
+      "PSEUDO_AVAILABLE": "Este nombre está disponible",
+      "PSEUDO_NOT_AVAILABLE": "Este nombre de usuario no está disponible",
+      "INFO_LICENSE": "Para unirse a la moneda, le pedimos leer y aceptar esta licencia.",
+      "BTN_ACCEPT": "Acepto",
+      "BTN_ACCEPT_LICENSE": "Acepto la licencia"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Elija un seudónimo",
+      "HELP": "Un seudónimo es obligatorio para ser miembro."
+    },
+    "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Selección de identidad",
+      "HELP": "Se han enviado varias <b>identidades diferentes</b> para la clave pública <span class=\"gray\"><i class=\"ion-key\"></i>{{pubkey | formatPubkey}}</span>.<br/>Por favor, selecciona la carpeta para usar:"
+    },
+    "SELECT_WALLET_MODAL": {
+      "TITLE": "Selección de monedero"
+    },
+    "WALLET_LIST": {
+      "TITLE": "Mis monederos",
+      "BTN_NEW": "Añadir un monedero",
+      "BTN_DOWNLOAD": "Descargue la lista",
+      "BTN_IMPORT_FILE_DOTS": "Importar desde un archivo...",
+      "NO_WALLET": "Sin monedero secundaria",
+      "BTN_DELETE": "Eliminar una monedero secundaria...",
+      "BTN_RENAME": "Renombrar el monedero",
+      "EXPORT_FILENAME": "monederos-{{pubkey|formatPubkey}}-{{currency}}.csv",
+      "EDIT_POPOVER": {
+        "TITLE": "Renombrar el monedero",
+        "HELP": "Completa el nuevo nombre",
+        "NAME_HELP": "Nombre de la monedero"
+      }
+    },
+    "SECURITY": {
+      "ADD_QUESTION": "Añadir una pregunta personalizada",
+      "BTN_CLEAN": "Limpiar",
+      "BTN_RESET": "Reinicializar",
+      "DOWNLOAD_REVOKE": "Grabar un fichero de revocación",
+      "HELP_LEVEL": "Para generar un fichero de respaldo de sus identificadores, elija <strong> al menos {{nb}} preguntas:</strong>",
+      "LEVEL": "Nivel de seguridad",
+      "LOW_LEVEL": "Bajo <span class=\"hidden-xs\">(mínimo dos preguntas)</span>",
+      "MEDIUM_LEVEL": "Medio <span class=\"hidden-xs\">(mínimo cuatro preguntas)</span>",
+      "QUESTION_1": "¿Cómo se llamaba su mejor amigo de la adolescencia?",
+      "QUESTION_2": "¿Cómo se llamaba su primer animal de compañía?",
+      "QUESTION_3": "¿Cuál es el primer plato que aprendió a cocinar?",
+      "QUESTION_4": "¿Cuál es la primera película que vió en un cine?",
+      "QUESTION_5": "¿Cuál era el destino del primer avión que cogió?",
+      "QUESTION_6": "¿Cómo se llamaba su maestro favorito en la escuela primaria?",
+      "QUESTION_7": "¿Cuál sería para usted el mejor oficio?",
+      "QUESTION_8": "¿Cuál es su libro para niños preferido?",
+      "QUESTION_9": "¿Cuál fue el modelo de su primer vehículo?",
+      "QUESTION_10": "¿Cuál fue su sobrenombre cuando era niña(o)?",
+      "QUESTION_11": "¿Cuál fue su personaje o actor/actriz preferido/a cuando era estudiante?",
+      "QUESTION_12": "¿Cuál fue su cantante o grupo preferido/a cuando era estudiante?",
+      "QUESTION_13": "¿En qué ciudad sus padres se encontraron?",
+      "QUESTION_14": "¿Cómo se llamaba su primer jefe?",
+      "QUESTION_15": "¿Cómo se llama la calle donde creció?",
+      "QUESTION_16": "¿Cómo se llama la primera playa donde se bañó?",
+      "QUESTION_17": "¿Cuál es el primer álbum que compró?",
+      "QUESTION_18": "¿Cuál es el nombre de su equipo deportivo preferido?",
+      "QUESTION_19": "¿Cuál fue el oficio de su abuelo?",
+      "RECOVER_ID": "Recuperar sus identificadores",
+      "REVOCATION_WITH_FILE": "Revocar una identidad a partir de un fichero",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "Si ha perdido las credenciales de su cuenta de miembro de forma permanente (o la seguridad de la cuenta se ve comprometida), puede usar <b>el archivo de revocación de la cuenta</b> para forzar publicación final de la web de confianza.",
+      "REVOCATION_WITH_FILE_HELP": "Para <b>revocar permanentemente</b> una cuenta de miembro, arrastre el archivo de revocación en el cuadro siguiente o haga clic en el cuadro para buscar un archivo.",
+      "REVOCATION_FILENAME": "revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+      "REVOCATION_WALLET": "Revocar esta identidad",
+      "SAVE_ID": "Grabar sus identificadores",
+      "STRONG_LEVEL": "Alto <span class=\"hidden-xs \">(6 preguntas mínimo)</span>",
+      "TITLE": "Cuenta y seguridad"
+    },
+    "FILE_NAME": "{{currency}} - Estado de cuenta {{pubkey|formatPubkey}} a {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Fecha",
+      "AMOUNT": "Cantidad",
+      "COMMENT": "Comentario"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Transferencia",
+    "SUB_TITLE": "Hacer una transferencia",
+    "FROM": "De",
+    "TO": "A",
+    "AMOUNT": "Importe",
+    "AMOUNT_HELP": "Importe",
+    "COMMENT": "Comentario",
+    "COMMENT_HELP": "Comentario",
+    "BTN_SEND": "Enviar",
+    "BTN_ADD_COMMENT": "Añadir un comentario",
+    "REST": "Resto de cuenta",
+    "REST_TO": "a",
+    "WARN_COMMENT_IS_PUBLIC": "Tenga en cuenta que los <b>comentarios son públicos</b> (sin encriptar).",
+    "MODAL": {
+      "TITLE": "Transferencia"
+    }
+  },
+  "ERROR": {
+    "UNKNOWN_URI_FORMAT": "Formato URI desconocido",
+    "PUBKEY_INVALID_CHECKSUM": "Clave pública no válida (suma de comprobación incorrecta).",
+    "POPUP_TITLE": "Error",
+    "UNKNOWN_ERROR": "Error desconocido",
+    "CRYPTO_UNKNOWN_ERROR": "Su navegador parece incompatible con las funcionalidades de cryptografía.",
+    "DOWNLOAD_KEYFILE_FAILED": "Error al generar el archivo de llavero.",
+    "EQUALS_TO_PSEUDO": "Debe ser diferente del seudónimo.",
+    "EQUALS_TO_SALT": "Debe ser diferente del identificador secreto.",
+    "FIELD_REQUIRED": "Campo obligatorio.",
+    "FIELD_TOO_SHORT": "Valor demasiado corta.",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "Valor demasiado corta ({{minLength}} carácteres mín)",
+    "FIELD_TOO_LONG": "Valor demasiado largo",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Valor demasiado largo, ({{maxLength}} carácteres máx)",
+    "FIELD_MIN": "Valor mínimo: {{min}}",
+    "FIELD_MAX": "Valor máximo: {{max}}",
+    "FIELD_ACCENT": "Caracteres acentuados y comas no autorizados",
+    "FIELD_NOT_NUMBER": "Valor numérico esperado",
+    "FIELD_NOT_INT": "Valor entero esperado",
+    "FIELD_NOT_EMAIL": "Email no válido",
+    "PASSWORD_NOT_CONFIRMED": "No corresponde a la frase secreta.",
+    "SALT_NOT_CONFIRMED": "No corresponde al identificador secreto.",
+    "SEND_IDENTITY_FAILED": "Error de la inscripción.",
+    "SEND_CERTIFICATION_FAILED": "Error de la certificación.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "No se puede certificar, porque su cuenta no <b>es miembro</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "No se puede certificar, porque su cuenta ya no es miembro.<br/><br/>Todavía faltan certificaciones, o ahora no son validas.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "Cuenta no certificable. No se ha solicitado la adhesión, o no fue renovada.",
+    "LOGIN_FAILED": "Error durante la autentificación.",
+    "LOAD_IDENTITY_FAILED": "Error de carga de la identidad.",
+    "LOAD_REQUIREMENTS_FAILED": "Error de carga de las condiciones de la identidad.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Error en el intento de entrada en la comunidad.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Error en la interrupción de adhesión.",
+    "REFRESH_WALLET_DATA": "Error en la actualización del monedero.",
+    "GET_CURRENCY_PARAMETER": "Error en la recuperación de las reglas de moneda.",
+    "GET_CURRENCY_FAILED": "Carga de la moneda imposible. Por favor, intente más tarde.",
+    "SEND_TX_FAILED": "Error en la transferencia.",
+    "ALL_SOURCES_USED": "Por favor, espera el cálculo del bloque siguiente (Todas sus fuentes de moneda fueron utilizada).",
+    "NOT_ENOUGH_SOURCES": "No lo bastante cambio para mandar este importe en una sola transacción.<br/>Importe máximo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Error en la creación de la cuenta miembro.",
+    "RESTORE_WALLET_DATA_ERROR": "Error en la recarga de las configuración desde el almacenamiento local",
+    "LOAD_WALLET_DATA_ERROR": "Error en la carga de los datos del monedero.",
+    "COPY_CLIPBOARD_FAILED": "Copia de la valor imposible.",
+    "TAKE_PICTURE_FAILED": "Error en la recuperación de la foto.",
+    "SCAN_FAILED": "Error en el escán del Codigo QR",
+    "SCAN_UNKNOWN_FORMAT": "Codigo no reconocido.",
+    "WOT_LOOKUP_FAILED": "Error en la búsqueda",
+    "LOAD_PEER_DATA_FAILED": "Lectura del nodo Duniter imposible. Por favor, intente más tarde.",
+    "NEED_LOGIN_FIRST": "Por favor, conéctese en primer lugar.",
+    "AMOUNT_REQUIRED": "El importe es obligatorio.",
+    "AMOUNT_NEGATIVE": "Importe negativo no autorizado.",
+    "NOT_ENOUGH_CREDIT": "Crédito insuficiente.",
+    "INVALID_NODE_SUMMARY": "Nodo ilocalizable o dirección inválida.",
+    "INVALID_USER_ID": "El seudónimo no debe contener ni espacios ni caracteres especiales o acentuado.",
+    "INVALID_COMMENT": "El campo 'referencia’ no debe contener carácteres acentuados.",
+    "INVALID_PUBKEY": "La clave pública no tiene el formato esperado.",
+    "INVALID_PUBKEY_CHECKSUM": "Suma de comprobación inválida.",
+    "IDENTITY_REVOKED": "Esta identidad <b>fue revocada</b>. No puede estar miembro.",
+    "IDENTITY_REVOKED_WITH_TIME": "Esta identidad <b>fue revocada {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). No puede estar miembro.",
+    "IDENTITY_PENDING_REVOCATION": "La <b>revocación de esta identidad</b> fue solicitado y esta en espera de tratamiento. Por lo que, la certificación es desactivada.",
+    "IDENTITY_INVALID_BLOCK_HASH": "Esta solicitud de adhesión no es valida (porque denomina un bloque los nodos de la red han anulado): esta persona debe renovelar su solicitud de adhesión <b>antes que</b> estar certificada.",
+    "IDENTITY_EXPIRED": "La publicación de esta identidad ha caducada: esta persona debe realizar una nueva solicitud de adhesión <b>antes que</b> estar certificada.",
+    "IDENTITY_SANDBOX_FULL": "EL nodo Duniter utilizado por Cesium ya no puede recibir más nuevas identidades, porque la fila de espera es llena.<br/><br/>Por favor, intenta ulteriormente o cambia de nodo (vía el menú <b>Paramètres</b>).",
+    "IDENTITY_NOT_FOUND": "Identidad no encontrada",
+    "IDENTITY_TX_FAILED": "Las operaciones de carga fallidos",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Adhesión no validada.",
+    "WALLET_INVALID_BLOCK_HASH": "Su solicitud de adhesión ya no está validada (porque denomina un bloque los nodos de la red han anulado).<br/>Debe <a ng-click=\"doQuickFix('fixMembership')\">mandar una nueva solicitud</a> para resolver este problema.",
+    "WALLET_IDENTITY_EXPIRED": "La publicación de <b>su identidad ha caducada</b>.<br/>Debe <a ng-click=\"doQuickFix('fixIdentity')\">publicar une outra vez su identidad</a> para resolver este problema.",
+    "WALLET_REVOKED": "Su identidad fue <b>revocada</b>: ni su seudónimo ni su llave pública podrán estar utilizados en el futuro por una cuenta miembro.",
+    "WALLET_HAS_NO_SELF": "Su identidad debe en primer lugar haber estado publicado, y no estar caducada.",
+    "AUTH_REQUIRED": "Autenticación requerida.",
+    "AUTH_INVALID_PUBKEY": "La llave pública no se corresponde con la cuenta conectada",
+    "AUTH_INVALID_SCRYPT": "De usuario o contraseña no válidos.",
+    "AUTH_INVALID_FILE": "archivo de llave no válido.",
+    "AUTH_FILE_ERROR": "No se pudo abrir el archivo de llave",
+    "IDENTITY_ALREADY_CERTIFY": "Ha <b>ya certificado</b> esta identidad.<br/><br/>Esta certificación todavía es valida (expiration {{expiresIn|formatDurationTo}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "Ha <b>ya certificado</b> esta identidad.<br/><br/>Esta certificación está en espera de tratamiento (fecha límite de tratamiento {{expiresIn|formatDurationTo}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Certificación imposible",
+    "LOAD_NEWCOMERS_FAILED": "Error el la carga de los miembros nuevos.",
+    "LOAD_PENDING_FAILED": "Error el la carga de las inscripciones en espera.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Debe <b>estar miembro</b> para poder realizar esta acción.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Debe haber <b>publicado su identidad</b> para poder realizar esta acción.",
+    "GET_BLOCK_FAILED": "Error en la recuperación del bloque",
+    "INVALID_BLOCK_HASH": "Bloque no encontrado (hash diferente)",
+    "DOWNLOAD_REVOCATION_FAILED": "Debe seleccionar un fichero de texto",
+    "REVOCATION_FAILED": "Error en la revocación.",
+    "SALT_OR_PASSWORD_NOT_CONFIRMED": "Identificador secreto o contraseña incorrectos",
+    "RECOVER_ID_FAILED": "Error en la recuperación de los identificadores",
+    "LOAD_FILE_FAILED": "Error en la carga del fichero",
+    "NOT_VALID_REVOCATION_FILE": "Archivo de revocación no válido (formato de archivo erróneo)",
+    "NOT_VALID_SAVE_ID_FILE": "Archivo no válido (formato de archivo erróneo)",
+    "NOT_VALID_KEY_FILE": "Archivo no válido (formato de archivo erróneo)",
+    "EXISTING_ACCOUNT": "Su frase secreta corresponde a una cuenta existente, la <a ng-click=\"showHelpModal('pubkey')\">clave pública</a> es:",
+    "EXISTING_ACCOUNT_REQUEST": "Por favor, cambie su frase secreta para que coincida con una cuenta sin usar.",
+    "GET_LICENSE_FILE_FAILED": "Error al obtener el archivo de licencia",
+    "CHECK_NETWORK_CONNECTION": "Ningún nodo parece alcanzable.<br/><br/><b>Compruebe la conexión a Internet</b>.",
+    "INVALID_FILE_FORMAT": "Formato de archivo inválido.",
+    "SAME_TX_RECIPIENT": "El destinatario debe ser diferente del emisor."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Información",
+    "CERTIFICATION_DONE": "Certificación enviada",
+    "NOT_ENOUGH_CREDIT": "Crédito insuficiente",
+    "TRANSFER_SENT": "Transferencia enviada",
+    "COPY_TO_CLIPBOARD_DONE": "Copia realizada",
+    "MEMBERSHIP_OUT_SENT": "Anulación enviada",
+    "NOT_NEED_MEMBERSHIP": "Ya es miembro.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Esta identidad pronto va a necesitar certificaciones (al menos {{willNeedCertificationCount}}).",
+    "IDENTITY_NEED_MEMBERSHIP": "Esta identidad no envió una solicitud de membresía. Ella tendrá que hacerlo si desea hacerse miembro.",
+    "HAS_ALTERNATIVE_IDENTITIES": "Hay <b>identidades múltiples</b> adjuntas a esta clave pública. <b>Antes de cualquier certificación</b>, <a ng-click=\"doQuickFix('showSelectIdentities')\">verifique otras identidades</a> para elegir la correcta o comuníquese con el propietario de la cuenta.",
+    "REVOCATION_SENT": "Revocación enviada",
+    "REVOCATION_SENT_WAITING_PROCESS": "La <b>revocación de esta identidad</b> fue solicitada y está en espera de ser procesada.",
+    "FEATURES_NOT_IMPLEMENTED": "Esta funcionalidad todavía está en proceso de desarrollo.<br/><br/>¿Por qué no <b>contribuir a Cesium</b>, para obtenerla más rápido? ;)",
+    "EMPTY_TX_HISTORY": "Ninguna operación a exportar"
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Confirmación</b>",
+    "POPUP_WARNING_TITLE": "<b>Advertencia</b>",
+    "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Advertencia de seguridad</b>",
+    "CERTIFY_RULES_TITLE_UID": "Certificar {{uid}}", "CERTIFY_RULES": "<b class=\"assertive\">NO CERTIFICAR</b> una cuenta si piense que :<br/><br/><ul><li>1.) no corresponde a una persona <b>física y viviente</b>.<li>2.) su propietario <b>posee una otra cuenta</b> ya certificada.<li>3.) su propietario viola (voluntariamente o no) la regla 1 o 2 (por ejemplo certificando cuentas falsas o duplicadas).</ul><br/><b>¿Está usted seguro</b> sin embargo querer certificar esta identidad?",
+    "TRANSFER": "<b>Recapitulativo de la transferencia</b>:<br/><br/><ul><li> - De: {{from}}</li><li> - A: <b>{{to}}</b></li><li> - Importe: <b>{{amount}} {{unit}}</b></li><li> - Comentario: <i>{{comment}}</i></li></ul><br/><b>¿Está usted seguro de querer realizar esta transferencia?</b>",
+    "TRANSFER_ALL": "<b>Recapitulativo de la transferencia</b>:<br/><br/><ul><li> - De: {{from}}</li><li> - A: <b>{{to}}</b></li><li> - Importe: <b>{{amount}} {{unit}}</b></li><li> - Comentario: <i>{{comment}}</i></li><br/><li> - Resto: <b>{{restAmount}} {{unit}}</b> para <b>{{restTo}}</b></li></ul><br/><b>¿Está usted seguro de querer realizar esta transferencia?</b>",
+    "MEMBERSHIP_OUT": "Esta operación es <b>irreversible</b>.<br/></br/>¿Está usted seguro querer <b>anular su cuenta miembro</b>?",
+    "MEMBERSHIP_OUT_2": "¡Esta operación es <b>irreversible</b>!<br/><br/>¿Está usted seguro querer <b>anular su adhesión</b> como miembro?",
+    "LOGIN_UNUSED_WALLET_TITLE": "¿Error de introducción de datos?",
+    "LOGIN_UNUSED_WALLET": "Está usted conectado a une cuenta que parece <b>inactiva</b>.<br/><br/>Si esta cuenta no corresponde a la suya, se trata probablemente de un <b>error al introducir los datos</b> de sus identificadores de conexión.<br/></br/><b>¿Quiere usted sin embargo continuar con esta cuenta?</b>",
+    "FIX_IDENTITY": "El seudónimo <b>{{uid}}</b> va a ser publicado de nuevo, en reemplazo del antiguo que caducó.<br/></br/><b>¿Está usted seguro</b> de querer continuar?",
+    "FIX_MEMBERSHIP": "Su solicitud de adhesión como miembro va a ser enviada de nuevo.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",
+    "MEMBERSHIP": "Se enviará su solicitud de membresía como miembro.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",
+    "RENEW_MEMBERSHIP": "Su adhesión como miembro va a estar renovada.<br/></br/><b>¿Está usted seguro</b>de querer continuar?",
+    "REVOKE_IDENTITY": "Va a <b>revocar definitivamente esta identidad</b>.<br/><br/>La llave pública y el seudónimo asociados <b>jamás podrán ser utilizados</b> (para una cuenta miembro). <br/></br/><b>¿Está usted seguro</b> de querer revocar definitivamente esta cuenta?",
+    "REVOKE_IDENTITY_2": "¡Esta operación es <b>irreversible</b>!<br/><br/>¿Está usted seguro de querer <b>revocar definitivamente</b> esta cuenta?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Su adhesión no necesita ser renovada (solo va a caducar en {{membershipExpiresIn|formatDuration}}).<br/></br/><b>¿Está usted segura(o)</b> de querer renovar su adhesión?",
+    "SAVE_BEFORE_LEAVE": "¿Quiere usted <b>guardar sus cambios</b> antes dejar la página?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Cambios no registrados",
+    "LOGOUT": "¿Está usted segura(o) de querer desconectarse?",
+    "USE_FALLBACK_NODE": "Nodo <b>{{edad}}</ b> inalcanzable o no válido.<br/><br/>¿Desea utilizar temporalmente el nodo <b>{{nuevo}}</b>?"
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Revocación del archivo</b>",
+    "POPUP_REVOKE_MESSAGE": "Para proteger su cuenta, descargar el <b>documento de revocación de cuenta</b>. Si se necesita cancelar su cuenta (en caso de robo, cambio de identificador, una cuenta falsa creada, etc.).<br/><br/><b>Por favor, almacénelo en un lugar seguro.</b>"
+  },
+  "HELP": {
+    "TITLE": "Ayuda en línea",
+    "JOIN": {
+      "SECTION": "Inscripción",
+      "SALT": "El identificador secreto es muy importante. Sirve para mezclar la frase secreta, antes de calcular la <span class=\"text-italic\">llave pública</span> de su cuenta (su número) y la llave secreta para acceder a esta.<br/><b>Por favor, memorícelo muy bien</b> porque actualmente no existe ninguna manera para encontrarlo en caso de pérdida.<br/>Por otra parte, no puede ser modificado sin tener que crear una nueva cuenta.<br/><br/>Un buen identificador secreto debe ser suficientemente largo (al menos 8 carácteres) y lo más original posible.",
+      "PASSWORD": "La frase secreta es muy importante. Junto al identificador secreto, sirve a calcular el número (la llave pública) de su cuenta, y la llave secreta para acceder a ella.<br/><b>Por favor, memorícela muy bien</b> porque actualmente no existe ninguna manera para encontrarla en caso de pérdida (excepto el generar un fichero de respaldo).<br/>Por otra parte, no puede ser modificado sin deber creer una nueva cuenta.<br/><br/>Una buena frase secreta contiene (idealmente) al menos 8 carácteres, del que al menos una mayúscula y un número.",
+      "PSEUDO": "El seudónimo es solamente utilizado en caso de inscripción como <span class=\"text-italic\">miembro</span>. Siempre es asociado a un monedero (vía su <span class=\"text-italic\">llave pública</span>).<br/>El seudónimo se publica en la red para que los otros usuarios puedan identificarlo, certificarlo o enviar dinero a la cuenta.<br/>Un seudónimo debe ser único dentro de los miembros (<u>actuales</u> y antiguos)."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glosario",
+      "PUBKEY_DEF": "Una llave pública identifica un monedero. Puede identificar un miembro. En Cesium se calcula con el identificador y la frase secreta.",
+      "MEMBER": "Miembro",
+      "MEMBER_DEF": "Un miembro es una persona humana física y viviente, deseosa de participar libremente a la comunidad monetaria. Percibe un dividendo universal, dependiendo de un período y un importe definido en las <span class=\"text-italic\">reglas de la moneda</span>",
+      "CURRENCY_RULES": "Reglas de la moneda",
+      "CURRENCY_RULES_DEF": "Las reglas de la moneda son definidas una sola vez por todas. Establecen el funcionamiento de la moneda: el cálculo del dividendo universal, la cantidad de certificaciones necesarias para ser miembro, la cantidad máxima de certificaciones que un miembro puede emitir, etc. <a href=\"#/app/currency\">Ver las reglas actuales</a>.<br/> Una <span class=\"text-italic\">BlockChain</span> que soporta y ejecuta estas reglas, y verifica continuamente su buena aplicación, hace posible que ellas no se modifiquen en el tiempo.",
+      "BLOCKCHAIN": "Cadena de bloques (<span class=\"text-italic\">Blockchain</span>)",
+      "BLOCKCHAIN_DEF": "La BlockChain es un sistema descentralizado, que, para el caso de Duniter, sirve a mantener y ejecutar las <span class=\"text-italic\">reglas de la moneda</span>.<br/><a href=\"http://duniter.org\" target=\"_system\">Saber más a proposito de Duniter</a> y el funcionamiento de su blockchain.",
+      "UNIVERSAL_DIVIDEND_DEF": "El Dividendo Universal (DU) es la cantidad de moneda co-creada por cada miembro, dependiendo del periodo y del cálculo definidos en las <span class=\"text-italic\">reglas de la moneda</span>.<br/>En cada periodo, los miembros reciben en sus cuentas la misma cantidad de dinero.<br/><br/>El DU crece regularmente, para ser justo entre los miembros (actuales y futuros), calculado en función de la esperanza de vida media, como demostrado en la Théorie Relative de la Monnaie (TRM) = Teoría Relativa de la Moneda, aún no está traducida en español, contáctenos para contribuir a su traducción.<br/><a href=\"http://trm.creationmonetaire.info\">Saber más a propósito de la TRM</a> y las monedas libres."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "El menú <b>{{'MENU.CURRENCY'|translate}}</b> permite consultar las <b>reglas de la moneda</b> y su estado.",
+      "CURRENCY_WOT": "El <b>número de miembros</b> demuestra la importancia de la comunidad y permite <b>seguir su evolución</b>.",
+      "CURRENCY_MASS": "Siga aquí la <b>cantidad total de moneda</b> existente y su <b>distribución media</b> por miembro.<br/><br/>Esto permite juzgar la <b>importancia de un importe</b>, en relación con lo que <b>poseen los otros</b> en sus cuentas (como media).",
+      "CURRENCY_UNIT_RELATIVE": "La unidad utilizada (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa que los importes en {{currency|capitalize}} han sido divididos entre el valor del <b>Dividendo Universal</b> (DU).<br/><br/><small> Esta unidad relativa es <b>pertinente</b>, porque permanece estable, independiente de la cantidad de moneda que aumenta constantemente.</small>",
+      "CURRENCY_CHANGE_UNIT": "Este botón permite <b>cambiar la unidad</b>, para visualizar los importes <b>directamente en {{currency|capitalize}}</b> (en lugar de &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "Este botón permite <b>cambiar la unidad</b>, para visualizar los importes en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, es decir, relativo al Dividendo Universal (el monto co-producido por cada miembro).",
+      "CURRENCY_RULES": "Las <b>reglas</b> de la moneda fijan su funcionamiento <b>exacto y previsible</b>.<br/><br/>Es el propio ADN de la moneda, que hace que su código monetario sea <b>legible y transparente</b>.", "MENU_BTN_NETWORK": "El menú <b>{{'MENU.NETWORK'|translate}}</b> permite consultar el estado de la red.",
+      "NETWORK_BLOCKCHAIN": "Todas las operaciones de la moneda están registradas dentro de un grand libro de cuenta <b>público e infalsificable</b>, también llamado <b>cadena de bloques</b> (<em>BlockChain</em> en inglés).",
+      "NETWORK_PEERS": "Los <b>nodos</b> visibles aquí corresponden a los <b>ordenadores que actualizan y controlan</b> la cadena de bloques.<br/><br/>Entre más nodos estén conectados, la moneda tendrá una gestión más <b>descentralizada</b> y digna de confianza.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "Este <b>número</b> (en verde) indica el <b>último bloque validado</b> por este nodo (última pagina escrita dentro del grand libro de cuentas).<br/><br/>El color verde indica que este bloque ha sido también validado por <b>la mayoría de los otros nodos</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Cada miembro</b>, equipado de un ordenador conectador a Internet, <b>puede participar añadiendo un nodo</b>.  Necesita <b>instalar el programa Duniter</b> (libre y gratis). <a href=\"{{installDocUrl}}\" target=\"_system\">Ver el manual de uso &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "El menú <b>{{'ACCOUNT.TITLE'|translate}}</b> permite acceder a la gestión de su cuenta.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Consulte aquí el estado de su cuenta y la información sobre sus certificaciones.",
+      "WALLET_CERTIFICATIONS": "Haga clic aquí para consultar el detalle de sus certificaciones (recibidas y emitidas).",
+      "WALLET_RECEIVED_CERTIFICATIONS": "Haga clic aquí para consultar el detalle de sus <b>certificaciones recibidas</b>.",
+      "WALLET_GIVEN_CERTIFICATIONS": "Haga clic aquí para consultar el detalle de sus <b>certificaciones emitidas</b>.",
+      "WALLET_BALANCE": "El <b>saldo</b> de su cuenta se visualiza aquí.",
+      "WALLET_BALANCE_RELATIVE":
+      "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>La unidad utilizada (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa que el importe en {{currency|capitalize}} fue dividido entre el <b>Dividendo Universal</b> (DU) co-producido por cada miembro.<br/><br/>Actualmente un DU vale {{currentUD|formatInteger}} {{currency|capitalize}}s.",
+      "WALLET_BALANCE_CHANGE_UNIT": "Podrá <b>cambiar la unidad</b> de visualización de los importes en los <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Por ejemplo, para visualizar los importes <b>directamente en {{currency|capitalize}}</b>, en lugar de unidad relativa.",
+      "WALLET_PUBKEY": "Esta es la llave pública de su cuenta. Puede comunicarla a un tercero para que pueda identificar su cuenta de forma simple.",
+      "WALLET_SEND": "Realizar un pago en algunos clics",
+      "WALLET_SEND_NO_MONEY": "Realizar un pago en algunos clics.<br/>(Su saldo ya no lo permite)",
+      "WALLET_OPTIONS": "Este botón permite acceder a las <b>acciones de adhesión</b> y de seguridad.<br/><br/>¡No olvide echar un vistazo!",
+      "WALLET_RECEIVED_CERTS": "Se exhibirá aquí la lista de las personas que le han certificado.",
+      "WALLET_CERTIFY": "El botón <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permite seleccionar una identidad y certificarla.<br/><br/>Sólo usuarios <b>miembros</b> pueden certificar a otros.",
+      "WALLET_CERT_STOCK": "Su stock de certificaciones (emitidas) es limitado a <b>{{sigStock}} certificaciones</b>.<br/><br/>Este stock se renueva con el tiempo, a medida que las certificaciones caducan.",
+      "MENU_BTN_TX": "El menú <b>{{'MENU.TRANSACTIONS'|translate}}</b> permite consultar su saldo, el historial de sus transacciones y mandar un pago.",
+      "MENU_BTN_WOT": "El menú <b>{{'MENU.WOT'|translate}}</b> permite buscar <b>usuarios</b> de la moneda (miembro o no).",
+      "WOT_SEARCH_TEXT_XS": "Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública).<br/><br/>La búsqueda se iniciará automáticamente.",
+      "WOT_SEARCH_TEXT": "Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública). <br/><br/>Luego, pulsa en la tecla <b>Entrada</b> para iniciar la búsqueda.",
+      "WOT_SEARCH_RESULT": "Visualiza la ficha detallada simplemente <b>haciendo un clic</b> sobre una línea.",
+      "WOT_VIEW_CERTIFICATIONS": "La línea <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> muestra cuántos miembros han validado esta identidad.<br/><br/>Estas certificaciones atestiguan que la cuenta pertenece a <b>una persona humana viviente</b> y que no tenga <b>ninguna otra cuenta miembro</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "Necesita al menos <b>{{sigQty}} certificaciones</b> para ser miembro y recibir el <b>Dividendo Universal</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Un clic aquí permite abrir <b>la lista de todas las certificaciones</b> de la identidad (recibidas y emitidas).",
+      "WOT_VIEW_CERTIFY": "El botón <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permite añadir su certificación a esta identidad.",
+      "CERTIFY_RULES": "<b>Atención:</b> Certificar solamente <b>personas físicas vivas</b>, que no posean ninguna otra cuenta miembro.<br/><br/>¡La seguridad de la moneda depende de la vigilancia de cada uno!",
+      "MENU_BTN_SETTINGS": "Los <b>{{'MENU.SETTINGS'|translate}}</b> le permitirán configurar la aplicación.",
+      "HEADER_BAR_BTN_PROFILE": "Haga un clic aquí para acceder a su <b>perfil de usuario</b>",
+      "SETTINGS_CHANGE_UNIT": "Podrá <b>cambiar la unidad de visualización</b> de los importes haciendo un clic más arriba.<br/><br/>- Desactive la opción para visualizar los importes en {{currency|capitalize}}.<br/>- Active la opción para visualizar los importes relativos al {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (todos los importes serán <b>dividido</b> entre el Dividendo Universal actual).",
+      "END_LOGIN": "¡La visita guiada ha <b>terminado</b>!<br/><br/>¡Buena suerte en este nuevo mundo de la <b>economía libre</b> !",
+      "END_NOT_LOGIN": "¡La visita guiada ha <b>terminado</b>!<br/><br/>Si quiere utilizar la moneda {{currency|capitalize}}, tiene que hacer un clic en <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> más abajo."
+    }
+  }
+}
+);
+
+$translateProvider.translations("fr-FR", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "date : {{build}}",
+    "PUBKEY": "Clé publique",
+    "MEMBER": "Membre",
+    "BLOCK" : "Bloc",
+    "BTN_OK": "OK",
+    "BTN_YES": "Oui",
+    "BTN_NO": "Non",
+    "BTN_SEND": "Envoyer",
+    "BTN_SEND_MONEY": "Faire un virement",
+    "BTN_SEND_MONEY_SHORT": "Virement",
+    "BTN_SAVE": "Enregistrer",
+    "BTN_YES_SAVE": "Oui, Enregistrer",
+    "BTN_YES_CONTINUE": "Oui, Continuer",
+    "BTN_SHOW": "Voir",
+    "BTN_SHOW_PUBKEY": "Afficher la clé publique",
+    "BTN_RELATIVE_UNIT": "Afficher les montants en DU ?",
+    "BTN_BACK": "Retour",
+    "BTN_NEXT": "Suivant",
+    "BTN_IMPORT": "Importer",
+    "BTN_CANCEL": "Annuler",
+    "BTN_CLOSE": "Fermer",
+    "BTN_LATER": "Plus tard",
+    "BTN_LOGIN": "Se connecter",
+    "BTN_LOGOUT": "Déconnexion",
+    "BTN_ADD_ACCOUNT": "Nouveau compte",
+    "BTN_SHARE": "Partager",
+    "BTN_EDIT": "Modifier",
+    "BTN_DELETE": "Supprimer",
+    "BTN_ADD": "Ajouter",
+    "BTN_SEARCH": "Rechercher",
+    "BTN_REFRESH": "Actualiser",
+    "BTN_RETRY": "Recommencer",
+    "BTN_START": "Commencer",
+    "BTN_CONTINUE": "Continuer",
+    "BTN_CREATE": "Créer",
+    "BTN_UNDERSTOOD": "J'ai compris",
+    "BTN_OPTIONS": "Options",
+    "BTN_HELP_TOUR": "Visite guidée",
+    "BTN_HELP_TOUR_SCREEN": "Découvrir cet écran",
+    "BTN_DOWNLOAD": "Télécharger",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Télécharger le relevé du compte",
+    "BTN_MODIFY": "Modifier",
+    "CHOOSE_FILE": "Déposez votre fichier <br/>ou cliquez pour le sélectionner",
+    "DAYS": "jours",
+    "NO_ACCOUNT_QUESTION": "Pas encore de compte ? Créez-en un gratuitement !",
+    "SEARCH_NO_RESULT": "Aucun résultat trouvé",
+    "LOADING": "Veuillez patienter...",
+    "LOADING_WAIT": "Veuillez patienter...<br/><small>(Cesium interroge le nœud Duniter)</small>",
+    "SEARCHING": "Recherche en cours...",
+    "FROM": "De",
+    "TO": "À",
+    "COPY": "Copier",
+    "LANGUAGE": "Langue",
+    "UNIVERSAL_DIVIDEND": "Dividende universel",
+    "UD": "DU",
+    "DATE_PATTERN": "DD/MM/YY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "DD/MM/YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+    "EMPTY_PARENTHESIS": "(vide)",
+    "UID": "Pseudonyme",
+    "ENABLE": "Activé",
+    "DISABLE": "Désactivé",
+    "RESULTS_LIST": "Résultats",
+    "RESULTS_COUNT": "{{count}} résultats",
+    "EXECUTION_TIME": "exécuté en {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "Afficher les valeurs en clair ?",
+    "POPOVER_ACTIONS_TITLE": "Options",
+    "POPOVER_FILTER_TITLE": "Filtres",
+    "SHOW_MORE": "Afficher plus",
+    "SHOW_MORE_COUNT": "(limite actuelle à {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Partager",
+      "SHARE_ON_TWITTER": "Partager sur Twitter",
+      "SHARE_ON_FACEBOOK": "Partager sur Facebook",
+      "SHARE_ON_DIASPORA": "Partager sur Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Partager sur Google+"
+    },
+    "FILE": {
+      "DATE": "Date :",
+      "TYPE": "Type :",
+      "SIZE": "Taille :",
+      "VALIDATING": "Validation en cours..."
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Choisir la source :",
+    "BTN_PICTURE_GALLERY": "Galerie",
+    "BTN_PICTURE_CAMERA": "<b>Caméra</b>"
+  },
+  "MENU": {
+    "HOME": "Accueil",
+    "WOT": "Annuaire",
+    "CURRENCY": "Monnaie",
+    "ACCOUNT": "Mon compte",
+    "WALLETS": "Mes portefeuilles",
+    "SETTINGS": "Paramètres",
+    "NETWORK": "Réseau",
+    "TRANSACTIONS": "Mes opérations"
+  },
+  "ABOUT": {
+    "TITLE": "À propos",
+    "LICENSE": "Application <b>libre</b> (Licence GNU AGPLv3).",
+    "LATEST_RELEASE": "Il existe une <b>version plus récente</b> de {{'COMMON.APP_NAME'|translate}} (<b>v{{version}}</b>)",
+    "PLEASE_UPDATE": "Veuillez mettre à jour {{'COMMON.APP_NAME'|translate}} (dernière version : <b>v{{version}}</b>)",
+    "CODE": "Code source :",
+    "OFFICIAL_WEB_SITE": "Site web officiel :",
+    "DEVELOPERS": "Développé par :",
+    "FORUM": "Forum :",
+    "PLEASE_REPORT_ISSUE": "N'hésitez pas à nous remonter les anomalies rencontrées",
+    "REPORT_ISSUE": "Remonter un problème",
+    "BTN_OPEN_DEV_WINDOW": "Ouvrir la fenêtre de debuggage"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Bienvenue dans l'application Cesium !",
+    "MESSAGE": "Recevez et envoyez de la monnaie libre {{currency|abbreviate}}",
+    "BTN_CURRENCY": "Explorer la monnaie {{name|abbreviate}}",
+    "BTN_ABOUT": "à propos",
+    "BTN_HELP": "Aide en ligne",
+    "REPORT_ISSUE": "anomalie",
+    "NOT_YOUR_ACCOUNT_QUESTION" : "Vous n'êtes pas propriétaire du compte <b class=\"ion-key\"> {{pubkey|formatPubkey}}</b>&nbsp;?",
+    "BTN_CHANGE_ACCOUNT": "Déconnecter ce compte",
+    "CONNECTION_ERROR": "Nœud <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Vérifiez votre connexion Internet, ou changer de nœud <a class=\"positive\" ng-click=\"doQuickFix('settings')\">dans les paramètres</a>.",
+    "SHOW_ALL_FEED": "Voir tout",
+    "READ_MORE": "Lire la suite",
+    "FEED_SOURCE": "Source"
+  },
+  "SETTINGS": {
+    "TITLE": "Paramètres",
+    "DISPLAY_DIVIDER": "Affichage",
+    "STORAGE_DIVIDER": "Stockage",
+    "NETWORK_SETTINGS": "Réseau",
+    "PEER": "Nœud Duniter",
+    "PEER_SHORT": "Nœud Duniter",
+    "PEER_CHANGED_TEMPORARY": "Adresse utilisée temporairement",
+    "PERSIST_CACHE": "Conserver les données de navigation (expérimental)",
+    "PERSIST_CACHE_HELP": "Permet une navigation plus rapide, en conservant localement les données reçues, pour les utiliser d'une session à l'autre.",
+    "USE_LOCAL_STORAGE": "Activer le stockage local",
+    "USE_LOCAL_STORAGE_HELP": "Permet de sauvegarder vos paramètres",
+    "WALLETS_SETTINGS": "Mes portefeuilles",
+    "USE_WALLETS_ENCRYPTION": "Sécuriser la liste ?",
+    "USE_WALLETS_ENCRYPTION_HELP": "Permet de sécuriser la liste de vos portefeuilles (par chiffrement), en exigeant une authentification pour y accéder.",
+    "ENABLE_HELPTIP": "Activer les bulles d'aide contextuelles",
+    "DISABLE_HELPTIP": "Désactiver les bulles d'aide contextuelles",
+    "ENABLE_UI_EFFECTS": "Activer les effets visuels",
+    "HISTORY_SETTINGS": "Mes opérations",
+    "DISPLAY_UD_HISTORY": "Afficher les dividendes produits ?",
+    "TX_HISTORY_AUTO_REFRESH": "Rafraîchir automatiquement",
+    "TX_HISTORY_AUTO_REFRESH_HELP": "Rafraîchit le solde et les opérations automatiquement, à chaque nouveau bloc du réseau.",
+    "AUTHENTICATION_SETTINGS": "Authentification",
+    "KEEP_AUTH": "Désauthentification automatique",
+    "KEEP_AUTH_SHORT": "Désauthentification",
+    "KEEP_AUTH_HELP": "Définit le moment où l'authentification est nettoyée de la mémoire.",
+    "KEEP_AUTH_OPTION": {
+      "NEVER": "Après chaque opération",
+      "SECONDS": "Après {{value}}s d'inactivité",
+      "MINUTE": "Après {{value}}min d'inactivité",
+      "MINUTES": "Après {{value}}min d'inactivité",
+      "HOUR": "Après {{value}}h d'inactivité",
+      "ALWAYS": "A la fin de la session"
+    },
+    "KEYRING_FILE": "Fichier de trousseau",
+    "KEYRING_FILE_HELP": "Permet de vous <b>connecter</b> automatiquement à chaque lancement<br/>et même de vous <b>authentifier</b> (seulement si \"Expiration de l'authentification\" est configurée \"à la fin de la session\").",
+    "REMEMBER_ME": "Se souvenir de moi ?",
+    "REMEMBER_ME_HELP": "Permet de rester identifié d'une session à l'autre, en conservant localement la clé publique.",
+    "PLUGINS_SETTINGS": "Extensions",
+    "BTN_RESET": "Restaurer les valeurs par défaut",
+    "EXPERT_MODE": "Activer le mode expert",
+    "EXPERT_MODE_HELP": "Permet un affichage plus détaillé.",
+    "BLOCK_VALIDITY_WINDOW": "Délai d'incertitude des blocs",
+    "BLOCK_VALIDITY_WINDOW_SHORT": "Délai d'incertitude",
+    "BLOCK_VALIDITY_WINDOW_HELP": "Délai avant de considérer qu'une information est validée",
+    "BLOCK_VALIDITY_OPTION": {
+      "NONE": "Aucun délai",
+      "N": "{{time | formatDuration}} ({{count}} blocs)"
+    },
+    "POPUP_PEER": {
+      "TITLE": "Nœud Duniter",
+      "HOST": "Adresse",
+      "HOST_HELP": "Adresse : serveur:port",
+      "USE_SSL": "Sécurisé ?",
+      "USE_SSL_HELP": "(Chiffrement SSL)",
+      "BTN_SHOW_LIST": "Liste des noeuds"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Hash : {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Bloc #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Bloc courant",
+      "TITLE": "Bloc #{{number|formatInteger}}",
+      "COMPUTED_BY": "Calculé par le noeud de",
+      "SHOW_RAW": "Voir le fichier brut",
+      "TECHNICAL_DIVIDER": "Informations techniques",
+      "VERSION": "Version du format",
+      "HASH": "Hash calculé",
+      "UNIVERSAL_DIVIDEND_HELP": "Monnaie co-produite par chacun des {{membersCount}} membres",
+      "EMPTY": "Aucune donnée dans ce bloc",
+      "POW_MIN": "Difficulté minimale",
+      "POW_MIN_HELP": "Difficulté imposée pour le calcul du hash",
+      "DATA_DIVIDER": "Données",
+      "IDENTITIES_COUNT": "Nouvelles identités",
+      "JOINERS_COUNT": "Nouveaux membres",
+      "ACTIVES_COUNT": "Renouvellements",
+      "ACTIVES_COUNT_HELP": "Membres ayant renouvelé leur adhésion",
+      "LEAVERS_COUNT": "Membres sortants",
+      "LEAVERS_COUNT_HELP": "Membres ne souhaitant plus de certification",
+      "EXCLUDED_COUNT": "Membres exclus",
+      "EXCLUDED_COUNT_HELP": "Anciens membres exclus par non renouvellement ou manque de certifications",
+      "REVOKED_COUNT": "Identités révoquées",
+      "REVOKED_COUNT_HELP": "Ces comptes ne pourront plus être membres",
+      "TX_COUNT": "Transactions",
+      "CERT_COUNT": "Certifications",
+      "TX_TO_HIMSELF": "Opération de change",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Conditions de déblocage",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "et",
+        "OR": "ou"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>Signature</b> de ",
+        "XHX": "<b>Mot de passe</b>, dont SHA256 =",
+        "CSV": "Bloqué pendant",
+        "CLTV": "Bloqué jusqu'à"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Blocs",
+      "NO_BLOCK": "Aucun bloc",
+      "LAST_BLOCKS": "Derniers blocs :",
+      "BTN_COMPACT": "Compacter"
+    }
+  },
+  "CURRENCY": {
+    "VIEW": {
+      "TITLE": "Monnaie",
+      "TAB_CURRENCY": "Monnaie",
+      "TAB_WOT": "Toile de confiance",
+      "TAB_NETWORK": "Réseau",
+      "TAB_BLOCKS": "Blocs",
+      "CURRENCY_SHORT_DESCRIPTION": "{{currency|abbreviate}} est une <b>monnaie libre</b>, démarrée {{firstBlockTime|formatFromNow}}. Elle compte actuellement <b>{{N}} membres</b>, qui produisent et perçoivent un <a ng-click=\"showHelpModal('ud')\">Dividende Universel</a> (DU), chaque {{dt|formatPeriod}}.",
+      "NETWORK_RULES_DIVIDER": "Règles du réseau",
+      "CURRENCY_NAME": "Nom de la monnaie",
+      "MEMBERS": "Nombre de membres",
+      "MEMBERS_VARIATION": "Variation depuis le dernier DU",
+      "MONEY_DIVIDER": "Monnaie",
+      "MASS": "Masse monétaire",
+      "SHARE": "Masse par membre",
+      "UD": "Dividende universel",
+      "C_ACTUAL": "Croissance actuelle",
+      "MEDIAN_TIME": "Heure de la blockchain",
+      "POW_MIN": "Niveau minimal de difficulté de calcul",
+      "MONEY_RULES_DIVIDER": "Règles de la monnaie",
+      "C_RULE": "Croissance théorique cible",
+      "UD_RULE": "Calcul du dividende universel",
+      "DT_REEVAL": "Période de revalorisation du DU",
+      "REEVAL_SYMBOL": "reval",
+      "DT_REEVAL_VALUE": "Tous les <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+      "UD_REEVAL_TIME0": "Date de la 1ère revalorisation",
+      "SIG_QTY_RULE": "Nombre de certifications requises pour devenir membre",
+      "SIG_STOCK": "Nombre maximal de certifications émises par membre",
+      "SIG_PERIOD": "Délai minimal d'attente entre 2 certifications successives émises par une même personne",
+      "SIG_WINDOW": "Délai limite de prise en compte d'une certification",
+      "SIG_VALIDITY": "Durée de vie d'une certification qui a été prise en compte",
+      "MS_WINDOW": "Délai limite de prise en compte d'une demande d'adhésion comme membre",
+      "MS_VALIDITY": "Durée de vie d'une adhésion qui a été prise en compte",
+      "STEP_MAX": "Distance maximale, par les certifications, entre un nouvel entrant et les membres référents",
+      "WOT_RULES_DIVIDER": "Règles de la toile de confiance",
+      "SENTRIES": "Nombre de certifications (émises <b>et</b> reçues) pour devenir membre référent",
+      "SENTRIES_FORMULA": "Nombre de certifications (émises <b>et</b> reçues) pour devenir membre référent (formule)",
+      "XPERCENT":"Pourcentage minimum de membres référents à atteindre pour respecter la règle de distance",
+      "AVG_GEN_TIME": "Temps moyen entre deux blocs",
+      "CURRENT": "actuel",
+      "MATH_CEILING": "PLAFOND",
+      "DISPLAY_ALL_RULES": "Afficher toutes les règles ?",
+      "BTN_SHOW_LICENSE": "Voir la licence",
+      "WOT_DIVIDER": "Toile de confiance"
+    },
+    "LICENSE": {
+      "TITLE": "Licence de la monnaie",
+      "BTN_DOWNLOAD": "Télécharger le fichier",
+      "NO_LICENSE_FILE": "Fichier de licence non trouvé."
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Heure de la blockchain",
+      "LOADING_PEERS": "Chargement des noeuds...",
+      "NODE_ADDRESS": "Adresse :",
+      "SOFTWARE": "Logiciel",
+      "WARN_PRE_RELEASE": "Pré-version (dernière version stable : <b>{{version}}</b>)",
+      "WARN_NEW_RELEASE": "Version <b>{{version}}</b> disponible",
+      "WS2PID": "Identifiant :",
+      "PRIVATE_ACCESS": "Accès privé",
+      "POW_PREFIX": "Préfixe de preuve de travail :",
+      "ENDPOINTS": {
+        "BMAS": "Interface sécurisée (SSL)",
+        "BMATOR": "Interface réseau TOR",
+        "WS2P": "Interface WS2P",
+        "ES_USER_API": "Noeud de données Cesium+"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "Les noeuds non SSL ont un affichage dégradé, car Cesium fonctionne en mode HTTPS."
+    }
+  },
+  "PEER": {
+    "PEERS": "Nœuds",
+    "SIGNED_ON_BLOCK": "Signé sur le bloc",
+    "MIRROR": "miroir",
+    "MIRRORS": "Miroirs",
+    "MIRROR_PEERS": "Nœuds miroirs",
+    "PEER_LIST" : "Liste des nœuds",
+    "MEMBERS" : "Membres",
+    "MEMBER_PEERS" : "Nœuds membres",
+    "ALL_PEERS" : "Tous les nœuds",
+    "DIFFICULTY" : "Difficulté",
+    "API" : "API",
+    "CURRENT_BLOCK" : "Bloc #",
+    "POPOVER_FILTER_TITLE": "Filtre",
+    "OFFLINE": "Hors ligne",
+    "OFFLINE_PEERS": "Nœuds hors ligne",
+    "BTN_SHOW_PEER": "Voir le nœud",
+    "VIEW": {
+      "TITLE": "Nœud",
+      "OWNER": "Appartient à",
+      "SHOW_RAW_PEERING": "Voir la fiche de pair",
+      "SHOW_RAW_CURRENT_BLOCK": "Voir le dernier bloc (format brut)",
+      "LAST_BLOCKS": "Derniers blocs connus",
+      "KNOWN_PEERS": "Nœuds connus :",
+      "GENERAL_DIVIDER": "Informations générales",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "Récupération des informations du noeud impossible. Le délai d'attente est dépassé.",
+        "LOADING_NODE_ERROR": "Récupération des informations du noeud impossible"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Recherche (pseudo ou clé publique)",
+    "SEARCH_INIT_PHASE_WARNING": "Durant la phase de pré-inscription, la recherche des inscriptions en attente <b>peut être longue</b>. Merci de patienter...",
+    "REGISTERED_SINCE": "Inscrit le",
+    "REGISTERED_SINCE_BLOCK": "Inscrit au bloc #",
+    "NO_CERTIFICATION": "Aucune certification validée",
+    "NO_GIVEN_CERTIFICATION": "Aucune certification émise",
+    "NOT_MEMBER_PARENTHESIS": "(non membre)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(identité révoquée)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(en cours de révocation)",
+    "EXPIRE_IN": "Expiration",
+    "NOT_WRITTEN_EXPIRE_IN": "Date limite<br/>de traitement",
+    "EXPIRED": "Expiré",
+    "PSEUDO": "Pseudonyme",
+    "SIGNED_ON_BLOCK": "Emise au bloc #{{block}}",
+    "WRITTEN_ON_BLOCK": "Ecrite au bloc #{{block}}",
+    "GENERAL_DIVIDER": "Informations générales",
+    "NOT_MEMBER_ACCOUNT": "Compte simple (non membre)",
+    "NOT_MEMBER_ACCOUNT_HELP": "Il s'agit d'un simple portefeuille, sans demande d'adhésion en attente.",
+    "TECHNICAL_DIVIDER": "Informations techniques",
+    "BTN_CERTIFY": "Certifier",
+    "BTN_YES_CERTIFY": "Oui, certifier",
+    "BTN_SELECT_AND_CERTIFY": "Nouvelle certification",
+    "ACCOUNT_OPERATIONS": "Opérations sur le compte",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identité {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Toile de confiance",
+      "NEWCOMERS": "Nouveaux membres",
+      "NEWCOMERS_COUNT": "{{count}} membres",
+      "PENDING": "Inscriptions en attente",
+      "PENDING_COUNT": "{{count}} inscriptions en attente",
+      "REGISTERED": "Inscrit {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Membre depuis {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Nouveaux membres",
+      "BTN_PENDING": "Inscriptions en attente",
+      "SHOW_MORE": "Afficher plus",
+      "SHOW_MORE_COUNT": "(limite actuelle à {{limit}})",
+      "NO_PENDING": "Aucune inscription en attente.",
+      "NO_NEWCOMERS": "Aucun membre."
+    },
+    "CONTACTS": {
+      "TITLE": "Contacts"
+    },
+    "MODAL": {
+      "TITLE": "Recherche"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications",
+      "SUMMARY": "Certifications reçues",
+      "LIST": "Détail des certifications reçues",
+      "PENDING_LIST": "Certifications en attente de traitement",
+      "RECEIVED": "Certifications reçues",
+      "RECEIVED_BY": "Certifications reçues par {{uid}}",
+      "ERROR": "Certifications reçues en erreur",
+      "SENTRY_MEMBER": "Membre référent"
+    },
+    "OPERATIONS": {
+      "TITLE": "{{uid}} - Opérations"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certifications émises",
+      "SUMMARY": "Certifications émises",
+      "LIST": "Détail des certifications émises",
+      "PENDING_LIST": "Certifications en attente de traitement",
+      "SENT": "Certifications émises",
+      "SENT_BY": "Certifications émises par {{uid}}",
+      "ERROR": "Certifications émises en erreur"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-log-in\"></i> Connexion",
+    "SCRYPT_FORM_HELP": "Veuillez saisir vos identifiants.<br>Pensez à vérifier que la clé publique est celle de votre compte.",
+    "PUBKEY_FORM_HELP": "Veuillez saisir une clé publique de compte :",
+    "FILE_FORM_HELP": "Choisissez le fichier de trousseau à utiliser :",
+    "SCAN_FORM_HELP": "Scanner le QR code d'un portefeuille.",
+    "SALT": "Identifiant secret",
+    "SALT_HELP": "Identifiant secret",
+    "SHOW_SALT": "Afficher l'identifiant secret ?",
+    "PASSWORD": "Mot de passe",
+    "PASSWORD_HELP": "Mot de passe",
+    "PUBKEY_HELP": "Clé publique ou pseudonyme",
+    "NO_ACCOUNT_QUESTION": "Vous n'avez pas encore de compte ?",
+    "HAVE_ACCOUNT_QUESTION": "Vous avez déjà un compte ?",
+    "CREATE_ACCOUNT": "Créer un compte...",
+    "CREATE_FREE_ACCOUNT": "Créer un compte gratuitement",
+    "FORGOTTEN_ID": "Mot de passe oublié ?",
+    "ASSOCIATED_PUBKEY": "Clé publique du trousseau :",
+    "BTN_METHODS": "Autres méthodes",
+    "BTN_METHODS_DOTS": "Changer de méthode...",
+    "METHOD_POPOVER_TITLE": "Méthodes",
+    "MEMORIZE_AUTH_FILE": "Mémoriser ce trousseau le temps de la session de navigation",
+    "SCRYPT_PARAMETERS": "Paramètres (Scrypt) :",
+    "AUTO_LOGOUT": {
+      "TITLE": "Information",
+      "MESSAGE": "<i class=\"ion-android-time\"></i> Vous avez été <b>déconnecté</b> automatiquement, suite à une inactivité prolongée.",
+      "BTN_RELOGIN": "Me reconnecter",
+      "IDLE_WARNING": "Vous allez être déconnecté... {{countdown}}"
+    },
+    "METHOD": {
+      "SCRYPT_DEFAULT": "Identifiant secret et mot de passe",
+      "SCRYPT_ADVANCED": "Salage avancé",
+      "FILE": "Fichier de trousseau",
+      "PUBKEY": "Clé publique ou pseudonyme",
+      "SCAN": "Scanner un QR code"
+    },
+    "SCRYPT": {
+      "SIMPLE": "Salage léger",
+      "DEFAULT": "Salage standard",
+      "SECURE": "Salage sûr",
+      "HARDEST": "Salage le plus sûr",
+      "EXTREME": "Salage extrême",
+      "USER": "Salage personnalisé",
+      "N": "N (Loop):",
+      "r": "r (RAM):",
+      "p": "p (CPU):"
+    },
+    "FILE": {
+      "HELP": "Format de fichier attendu : <b>.yml</b> ou <b>.dunikey</b> (type PubSec, WIF ou EWIF)."
+    }
+  },
+  "AUTH": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> Authentification",
+    "BTN_AUTH": "S'authentifier",
+    "GENERAL_HELP": "Veuillez vous authentifier :",
+    "EXPECTED_UID_HELP": "Veuillez vous authentifier sur le compte <i class=\"ion-person\"></i> {{uid}} :",
+    "EXPECTED_PUBKEY_HELP": "Veuillez vous authentifier sur le portefeuille <br class=\"visible-xs\"/><i class=\"ion-key\"></i> {{pubkey|formatPubkey}} :",
+    "SCAN_FORM_HELP": "Scanner le QR code de la <b>clef privée</b> du portefeuille."
+  },
+  "ACCOUNT": {
+    "TITLE": "Mon compte",
+    "BALANCE": "Solde",
+    "LAST_TX": "Dernières transactions validées",
+    "BALANCE_ACCOUNT": "Solde du compte",
+    "NO_TX": "Aucune transaction",
+    "SHOW_MORE_TX": "Afficher plus",
+    "SHOW_ALL_TX": "Afficher tout",
+    "TX_FROM_DATE": "(limite actuelle à {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Transactions en attente de traitement",
+    "VALIDATING_TX": "Transactions traitées, non validées",
+    "ERROR_TX": "Transactions non executées",
+    "ERROR_TX_SENT": "Transactions envoyées en échec",
+    "PENDING_TX_RECEIVED": "Transactions en attente de réception",
+    "EVENTS": "Evénements",
+    "OUT_DISTANCED": "Vos certifications actuelles proviennent d'un groupe trop isolé de la <a ng-click=\"showHelpModal('wot')\">Toile de Confiance</a> (TdC) : la <a ng-click=\"showHelpModal('distance_rule')\">règle de distance maximale</a> n'est pas respectée.<br/>Vous devez obtenir des certifications provenant d'autres secteurs de la TdC, ou bien attendre que celle-ci se resserre.",
+    "WAITING_MEMBERSHIP": "Demande d'adhésion envoyée. En attente d'acceptation.",
+    "WAITING_CERTIFICATIONS": "Vous devez <b>obtenir {{needCertificationCount}} certification(s)</b> pour devenir membre et produire le <a ng-click=\"showHelpModal('ud')\">Dividende Universel</a>. Votre compte est cependant déjà opérationnel, pour recevoir et effectuer des paiements.",
+    "WAITING_CERTIFICATIONS_HELP": "Pour obtenir vos certifications, sollicitez uniquement des membres <b>qui vous connaissent suffisamment</b>, comme l'exige <a ng-click=\"showLicenseModal()\">la licence de la monnaie</a> que vous avez acceptée.<br/>Si vous ne connaissez pas suffisamment de membres, faites-le savoir sur <a ng-click=\"openLink($event, $root.settings.userForumUrl)\">le forum utilisateur</a>.",
+    "WILL_MISSING_CERTIFICATIONS": "Vous allez bientôt <b>manquer de certifications</b> (au moins {{willNeedCertificationCount}} sont requises)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Votre adhésion comme membre <b>va expirer {{membershipExpiresIn|formatDurationTo}}</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a> d'ici là.",
+    "NEED_RENEW_MEMBERSHIP": "Vous n'êtes plus membre de la monnaie, car <b>votre adhésion a expiré</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a>.",
+    "NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED": "Vous n'êtes plus membre de la monnaie, <b>pour manque de certifications</b>. Pensez à <a ng-click=\"doQuickFix('renew')\">renouveler votre adhésion</a>.",
+    "NO_WAITING_MEMBERSHIP": "Aucune demande d'adhésion en attente. Si vous souhaitez <b>devenir membre</b>, pensez à <a ng-click=\"doQuickFix('membership')\">envoyer la demande d'adhésion</a>.",
+    "CERTIFICATION_COUNT": "Certifications reçues",
+    "CERTIFICATION_COUNT_SHORT": "Certifications",
+    "SIG_STOCK": "Certifications envoyées",
+    "BTN_RECEIVE_MONEY": "Encaisser",
+    "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Basculer vers une autre identité...",
+    "BTN_FIX_MEMBERSHIP": "Renvoyer la demande d'adhésion...",
+    "BTN_MEMBERSHIP_RENEW": "Renouveler l'adhésion",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Renouveler l'adhésion...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Arrêter l'adhésion...",
+    "BTN_SECURITY_DOTS": "Compte et sécurité...",
+    "BTN_SHOW_DETAILS": "Afficher les infos techniques",
+    "LOCKED_OUTPUTS_POPOVER": {
+      "TITLE": "Montant verrouillé",
+      "DESCRIPTION": "Voici les conditions de déverrouillage de ce montant :",
+      "DESCRIPTION_MANY": "Cette transaction est composé de plusieurs parties, dont voici les conditions de déverrouillage :",
+      "LOCKED_AMOUNT": "Conditions pour le montant :"
+    },
+    "NEW": {
+      "TITLE": "Création de compte",
+      "INTRO_WARNING_TIME": "La création d'un compte sur {{name|capitalize}} est très simple. Veuillez néanmoins prendre suffisament de temps pour faire correctement cette formalité (pour ne pas oublier les identifiants, mots de passe, etc.).",
+      "INTRO_WARNING_SECURITY": "Vérifiez que le matériel que vous utilisez actuellement (ordinateur, tablette, téléphone) <b>est sécurisé et digne de confiance</b>.",
+      "INTRO_WARNING_SECURITY_HELP": "Anti-virus à jour, pare-feu activé, session protégée par mot de passe ou code pin, etc.",
+      "INTRO_HELP": "Cliquez sur <b>{{'COMMON.BTN_START'|translate}}</b> pour débuter la création de compte. Vous serez guidé étape par étape.",
+      "REGISTRATION_NODE": "Votre inscription sera enregistrée via le noeud Duniter <b>{{server}}</b>, qui le diffusera ensuite au reste du réseau de la monnaie.",
+      "REGISTRATION_NODE_HELP": "Si vous ne faites pas confiance en ce noeud, veuillez en changer <a ng-click=\"doQuickFix('settings')\">dans les paramètres</a> de Cesium.",
+      "SELECT_ACCOUNT_TYPE": "Choisissez le type de compte à créer :",
+      "MEMBER_ACCOUNT": "Compte membre",
+      "MEMBER_ACCOUNT_TITLE": "Création d'un compte membre",
+      "MEMBER_ACCOUNT_HELP": "Si vous n'êtes pas encore inscrit en tant qu'individu (un seul compte possible par individu). Ce compte permet de co-produire la monnaie, en recevant un <b>dividende universel</b> chaque {{parameters.dt|formatPeriod}}.",
+      "WALLET_ACCOUNT": "Simple portefeuille",
+      "WALLET_ACCOUNT_TITLE": "Création d'un portefeuille",
+      "WALLET_ACCOUNT_HELP": "Pour tous les autres cas, par exemple si vous avez besoin d'un compte supplémentaire.<br/>Aucun dividende universel ne sera créé par ce compte.",
+      "SALT_WARNING": "Choisissez votre identifiant secret.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez le bien</b> : en cas de perte, plus personne ne pourra accéder à votre compte !",
+      "PASSWORD_WARNING": "Choisissez un mot de passe.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez bien ce mot de passe</b : en cas de perte, plus personne ne pourra accéder à votre compte !",
+      "PSEUDO_WARNING": "Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous identifier plus facilement.<div class='hidden-xs'><br/>Il <b>ne pourra pas être modifié</b>, sans refaire un compte.</div><br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>",
+      "PSEUDO": "Pseudonyme",
+      "PSEUDO_HELP": "Pseudonyme",
+      "SALT_CONFIRM": "Confirmation",
+      "SALT_CONFIRM_HELP": "Confirmation de l'identifiant secret",
+      "PASSWORD_CONFIRM": "Confirmation",
+      "PASSWORD_CONFIRM_HELP": "Confirmation du mot de passe",
+      "SLIDE_6_TITLE": "Confirmation :",
+      "COMPUTING_PUBKEY": "Calcul en cours...",
+      "LAST_SLIDE_CONGRATULATION": "Vous avez saisi toutes les informations nécessaires : Bravo !<br/>Vous pouvez maintenant <b>envoyer la demande de création</b> de compte.</b><br/><br/>Pour information, la clé publique ci-dessous identifiera votre futur compte.<br/>Elle pourra être communiquée à des tiers pour recevoir leurs paiements.<br/><b>Il n'est pas obligatoire</b> de la noter ici, vous pourrez également le faire plus tard.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> l'identifiant secret, le mot de passe et le pseudonyme ne pourront plus être modifiés.<br/><br/><b>Assurez-vous de toujours vous en rappeler !</b><br/><br/><b>Êtes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> l'identifiant secret et le mot de passe ne pourront plus être modifiés.<br/><br/><b>Assurez-vous de toujours vous en rappeler !</b><br/><br/><b>Êtes-vous sûr</b> de vouloir continuer avec ces identifiants ?",
+      "CHECKING_PSEUDO": "Vérification...",
+      "PSEUDO_AVAILABLE": "Pseudonyme disponible",
+      "PSEUDO_NOT_AVAILABLE": "Pseudonyme non disponible",
+      "INFO_LICENSE": "Avant de créer un compte membre, <b>veuillez lire et accepter la licence</b> d'usage de la monnaie :",
+      "BTN_ACCEPT": "J'accepte",
+      "BTN_ACCEPT_LICENSE": "J'accepte la licence"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Choisissez un pseudonyme",
+      "HELP": "Un pseudonyme est obligatoire pour devenir membre."
+    },
+    "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Sélection de l'identité",
+      "HELP": "Plusieurs <b>identités différentes</b> ont été envoyées, pour la clé publique <span class=\"gray\"><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</span>.<br/>Veuillez sélectionner le dossier à utiliser :"
+    },
+    "SELECT_WALLET_MODAL": {
+      "TITLE": "Sélection du portefeuille"
+    },
+    "WALLET_LIST": {
+      "TITLE": "Mes portefeuilles",
+      "BTN_NEW": "Ajouter un portefeuille",
+      "BTN_DOWNLOAD": "Télécharger la liste",
+      "BTN_IMPORT_FILE_DOTS": "Importer depuis un fichier...",
+      "NO_WALLET": "Aucun portefeuille secondaire",
+      "BTN_DELETE": "Retirer un portefeuille secondaire...",
+      "BTN_RENAME": "Renommer le portefeuille",
+      "EXPORT_FILENAME": "mes_portefeuilles-{{pubkey|formatPubkey}}-{{currency}}.csv",
+      "TOTAL_DOTS": "Total : ",
+      "EDIT_POPOVER": {
+        "TITLE": "Renommer le portefeuille",
+        "HELP": "Renseignez le nouveau nom",
+        "NAME_HELP": "Nom du portefeuille"
+      },
+      "IMPORT_MODAL": {
+        "TITLE": "Importer des portefeuilles",
+        "HELP": "Pour <b>importer des porftefeuilles</b>, veuillez glisser dans la zone ci-dessous le fichier de la liste des portefeuilles, ou bien cliquer dans la zone pour rechercher un fichier.",
+        "WALLET_COUNT": "<b>{{count}}</b> nouveau{{count > 1 ? 'x' : ''}} portefeuille{{count > 1 ? 's' : ''}}",
+        "NO_NEW_WALLET": "Aucun nouveau portefeuille"
+      }
+    },
+    "SECURITY": {
+      "ADD_QUESTION": "Ajouter une question personnalisée",
+      "BTN_CLEAN": "Vider",
+      "BTN_RESET": "Réinitialiser",
+      "DOWNLOAD_REVOKE": "Sauvegarder mon fichier de révocation",
+      "DOWNLOAD_REVOKE_HELP": "Disposer d'un fichier de révocation est important, par exemple en cas de perte de vos identifiants. Il vous permet de <b>sortir ce compte de la toile de confiance</b>, en redevenant ainsi un simple portefeuille.",
+      "GENERATE_KEYFILE": "Générer mon fichier de trousseau...",
+      "GENERATE_KEYFILE_HELP": "Génère un fichier permettant de vous authentifier sans saisir vos identifiants.<br/><b>Attention :</b> ce fichier contiendra votre trousseau de compte (clefs publique et secrète) ; il est donc très important de le mettre en lieu sûr !",
+      "KEYFILE_FILENAME": "trousseau-{{pubkey|formatPubkey}}-{{currency}}-{{format}}.dunikey",
+      "MEMBERSHIP_IN": "Transformer en compte membre...",
+      "MEMBERSHIP_IN_HELP": "Permet de <b>transformer</b> un compte simple portefeuille <b>en compte membre</b>, en envoyant une demande d'adhésion. Utile uniquement si vous n'avez pas déjà un autre compte membre.",
+      "SEND_IDENTITY": "Publier son identité...",
+      "SEND_IDENTITY_HELP": "Permet d'associer un pseudonyme à ce compte, mais <b>sans faire de demande d'adhésion</b> pour devenir membre. Cette association n'est généralement pas utile, car la validité de cette association de pseudonyme est limitée dans le temps.",
+      "HELP_LEVEL": "Pour générer un fichier de sauvegarde de vos identifiants, choisissez <strong> au moins {{nb}} questions :</strong>",
+      "LEVEL": "Niveau de sécurité",
+      "LOW_LEVEL": "Faible <span class=\"hidden-xs\">(2 questions minimum)</span>",
+      "MEDIUM_LEVEL": "Moyen <span class=\"hidden-xs\">(4 questions minimum)</span>",
+      "QUESTION_1": "Comment s'appelait votre meilleur ami lorsque vous étiez adolescent ?",
+      "QUESTION_2": "Comment s'appelait votre premier animal de compagnie ?",
+      "QUESTION_3": "Quel est le premier plat que vous avez appris à cuisiner ?",
+      "QUESTION_4": "Quel est le premier film que vous avez vu au cinéma ?",
+      "QUESTION_5": "Où êtes-vous allé la première fois que vous avez pris l'avion ?",
+      "QUESTION_6": "Comment s'appelait votre instituteur préféré à l'école primaire ?",
+      "QUESTION_7": "Quel serait selon vous le métier idéal ?",
+      "QUESTION_8": "Quel est le livre pour enfants que vous préférez ?",
+      "QUESTION_9": "Quel était le modèle de votre premier véhicule ?",
+      "QUESTION_10": "Quel était votre surnom lorsque vous étiez enfant ?",
+      "QUESTION_11": "Quel était votre personnage ou acteur de cinéma préféré lorsque vous étiez étudiant ?",
+      "QUESTION_12": "Quel était votre chanteur ou groupe préféré lorsque vous étiez étudiant ?",
+      "QUESTION_13": "Dans quelle ville vos parents se sont-ils rencontrés ?",
+      "QUESTION_14": "Comment s'appelait votre premier patron ?",
+      "QUESTION_15": "Quel est le nom de la rue où vous avez grandi ?",
+      "QUESTION_16": "Quel est le nom de la première plage où vous vous êtes baigné ?",
+      "QUESTION_17": "Quel est le premier album que vous avez acheté ?",
+      "QUESTION_18": "Quel est le nom de votre équipe de sport préférée ?",
+      "QUESTION_19": "Quel était le métier de votre grand-père ?",
+      "RECOVER_ID": "Retrouver mon mot de passe...",
+      "RECOVER_ID_HELP": "Si vous disposez d'un <b>fichier de sauvegarde de vos identifiants</b>, vous pouvez les retrouver en répondant correctement à vos questions personnelles.",
+      "RECOVER_ID_SELECT_FILE": "Choisissez le <b>fichier de sauvegarde de vos identifiants</b> à utiliser :",
+      "REVOCATION_WITH_FILE": "Révoquer mon compte membre...",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "Si vous avez <b>définitivement perdus vos identifiants</b> de compte membre (ou que la sécurité du compte est compromise), vous pouvez utiliser <b>le fichier de révocation</b> du compte pour <b>forcer sa sortie définitive de la toile de confiance</b>.",
+      "REVOCATION_WITH_FILE_HELP": "Pour <b>révoquer définitivement</b> un compte membre, veuillez glisser dans la zone ci-dessous votre fichier de révocation, ou bien cliquer dans la zone pour rechercher un fichier.",
+      "REVOCATION_WALLET": "Révoquer immédiatement ce compte",
+      "REVOCATION_WALLET_HELP": "Demander la révocation de votre identité entraîne la <b>sortie de la toile de confiance</b> (définitive pour le pseudonyme et la clé publique associés). Le compte ne pourra plus produire de Dividende Universel.<br/>Vous pourrez toutefois encore vous y connecter, comme à un simple portefeuille.",
+      "REVOCATION_FILENAME": "revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+      "SAVE_ID": "Sauvegarder mes identifiants...",
+      "SAVE_ID_HELP": "Création d'un fichier de sauvegarde, pour <b>retrouver votre mot de passe</b> (et l'identifiant secret) <b>en cas de d'oubli</b>. Le fichier est <b>sécurisé</b> (chiffré) à l'aide de questions personnelles.",
+      "STRONG_LEVEL": "Fort <span class=\"hidden-xs \">(6 questions minimum)</span>",
+      "TITLE": "Compte et sécurité",
+      "KEYFILE": {
+        "PUBSEC_FORMAT": "Format PubSec.",
+        "PUBSEC_FORMAT_HELP": "Ce format stocke votre trousseau de manière très simple. Il est compatible notamment avec Cesium, ğannonce et Duniter.<br/><b>Attention :</b>Le fichier <b>n'est pas chiffré</b> (la clef secrète y apparaît en clair) ; veuillez donc le stocker en lieu sûr !",
+        "WIF_FORMAT": "Format WIF (Wallet Import Format) - v1",
+        "WIF_FORMAT_HELP": "Ce format stocke votre trousseau en y intégrant une somme de contrôle pour vérifier l'intégrité du fichier. Il est compatible notamment avec les portefeuilles papier (Duniter paper wallet).<br/><b>Attention :</b>Le fichier <b>n'est pas chiffré</b> (la clef secrète y apparaît en clair) ; veuillez donc le stocker en lieu sûr !",
+        "EWIF_FORMAT": "Format EWIF (Encrypted Wallet Import Format) - v1",
+        "EWIF_FORMAT_HELP": "Ce format stocke votre trousseau <b>de manière chiffrée</b> à partir d'une phrase secrète de votre choix. Il intègre aussi une somme de contrôle pour vérifier l'intégrité du fichier.<br/><b>Attention :</b> Veillez à toujours vous souvenir de votre phrase secrète !",
+        "PASSWORD_POPUP": {
+          "TITLE": "Fichier de trousseau chiffré",
+          "HELP": "Veuillez indiquer la phrase secrète :",
+          "PASSWORD_HELP": "Phrase secrète"
+        },
+        "ERROR": {
+          "BAD_PASSWORD": "Phrase secrète incorrecte",
+          "BAD_CHECKSUM": "Somme de contrôle incorrecte"
+        }
+      }
+    },
+    "FILE_NAME": "{{currency}} - Relevé du compte {{pubkey|formatPubkey}} au {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Date",
+      "AMOUNT": "Montant",
+      "COMMENT": "Commentaire"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Virement",
+    "SUB_TITLE": "Faire un virement",
+    "SUB_TITLE_ALL": "Vider le compte",
+    "FROM": "De",
+    "TO": "À",
+    "AMOUNT": "Montant",
+    "AMOUNT_HELP": "Montant",
+    "COMMENT": "Commentaire",
+    "COMMENT_HELP": "Commentaire",
+    "BTN_SEND": "Envoyer",
+    "BTN_ADD_COMMENT": "Ajouter un commentaire",
+    "REST": "Reste du compte",
+    "REST_TO": "à",
+    "WARN_COMMENT_IS_PUBLIC": "Veuillez noter que <b>les commentaires sont publics</b> (non chiffrés).",
+    "MODAL": {
+      "TITLE": "Virement"
+    }
+  },
+  "ERROR": {
+    "UNKNOWN_URI_FORMAT": "Format d'URI inconnu",
+    "PUBKEY_INVALID_CHECKSUM": "Clé publique invalide (bad checksum).",
+    "POPUP_TITLE": "Erreur",
+    "UNKNOWN_ERROR": "Erreur inconnue",
+    "CRYPTO_UNKNOWN_ERROR": "Votre navigateur ne semble pas compatible avec les fonctionnalités de cryptographie.",
+    "DOWNLOAD_KEYFILE_FAILED": "Échec de la génération du fichier de trousseau.",
+    "EQUALS_TO_PSEUDO": "Doit être différent du pseudonyme",
+    "EQUALS_TO_SALT": "Doit être différent de l'identifiant secret",
+    "FIELD_REQUIRED": "Champ obligatoire",
+    "FIELD_TOO_SHORT": "Valeur trop courte",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "Valeur trop courte ({{minLength}} caractères min)",
+    "FIELD_TOO_LONG": "Valeur trop longue",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Valeur trop longue ({{maxLength}} caractères max)",
+    "FIELD_MIN": "Valeur minimale : {{min}}",
+    "FIELD_MAX": "Valeur maximale : {{max}}",
+    "FIELD_ACCENT": "Caractères accentués et virgules non autorisés",
+    "FIELD_NOT_NUMBER": "Valeur numérique attendue",
+    "FIELD_NOT_INT": "Valeur entière attendue",
+    "FIELD_NOT_EMAIL": "Adresse email non valide",
+    "PASSWORD_NOT_CONFIRMED": "Ne correspond pas au mot de passe",
+    "SALT_NOT_CONFIRMED": "Ne correspond pas à l'identifiant secret",
+    "SEND_IDENTITY_FAILED": "Échec de l'inscription",
+    "SEND_CERTIFICATION_FAILED": "Échec de la certification",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "Vous ne pouvez pas effectuer de certification, car ce compte n'est <b>pas membre</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "Vous ne pouvez pas effectuer de certification, car ce compte n'est pas encore membre.<br/><br/>Il vous manque encore des certifications, ou bien celles-ci n'ont pas encore été validées.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "Compte non certifiable. Aucune demande d'adhésion n'a été faite, ou bien elle n'a pas été renouvelée.",
+    "LOGIN_FAILED": "Erreur lors de la connexion.",
+    "LOAD_IDENTITY_FAILED": "Erreur de chargement de l'identité.",
+    "LOAD_REQUIREMENTS_FAILED": "Erreur de chargement des prérequis de l'identité.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Échec de la tentative d'entrée dans la communauté.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Échec de l'arrêt de l'adhésion.",
+    "REFRESH_WALLET_DATA": "Échec du rafraîchissement du portefeuille.",
+    "GET_CURRENCY_PARAMETER": "Échec de la récupération des règles de la monnaie.",
+    "GET_CURRENCY_FAILED": "Chargement de la monnaie impossible. Veuillez réessayer plus tard.",
+    "SEND_TX_FAILED": "Échec du virement.",
+    "ALL_SOURCES_USED": "Veuillez attendre le calcul du prochain bloc (toutes vos sources de monnaie ont été utilisées).",
+    "NOT_ENOUGH_SOURCES": "Pas assez de change pour envoyer ce montant en une seule transaction.<br/>Montant maximum : {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Échec de la création du compte membre.",
+    "RESTORE_WALLET_DATA_ERROR": "Échec du rechargement des paramètres depuis le stockage local",
+    "LOAD_WALLET_DATA_ERROR": "Échec du chargement des données du portefeuille.",
+    "COPY_CLIPBOARD_FAILED": "Copie de la valeur impossible.",
+    "TAKE_PICTURE_FAILED": "Échec de la récupération de la photo.",
+    "SCAN_FAILED": "Échec du scan de QR-code.",
+    "SCAN_UNKNOWN_FORMAT": "Code non reconnu.",
+    "WOT_LOOKUP_FAILED": "Échec de la recherche.",
+    "LOAD_PEER_DATA_FAILED": "Lecture du nœud Duniter impossible. Veuillez réessayer ultérieurement.",
+    "NEED_LOGIN_FIRST": "Veuillez d'abord vous connecter.",
+    "AMOUNT_REQUIRED": "Le montant est obligatoire.",
+    "AMOUNT_NEGATIVE": "Montant négatif non autorisé.",
+    "NOT_ENOUGH_CREDIT": "Crédit insuffisant.",
+    "INVALID_NODE_SUMMARY": "Nœud injoignable ou adresse invalide.",
+    "INVALID_USER_ID": "Le pseudonyme ne doit contenir ni espace ni caractère spécial ou accentué.",
+    "INVALID_COMMENT": "Le champ 'référence' ne doit pas contenir de caractères accentués.",
+    "INVALID_PUBKEY": "La clé publique n'a pas le format attendu.",
+    "INVALID_PUBKEY_CHECKSUM": "Somme de contrôle invalide.",
+    "IDENTITY_REVOKED": "Cette identité <b>a été révoquée</b>. Elle ne peut plus devenir membre.",
+    "IDENTITY_REVOKED_WITH_TIME": "Cette identité <b>a été révoquée {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Elle ne peut plus devenir membre.",
+    "IDENTITY_PENDING_REVOCATION": "La <b>révocation de cette identité</b> a été demandée et est en attente de traitement. La certification est donc désactivée.",
+    "IDENTITY_INVALID_BLOCK_HASH": "Cette demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé) : cette personne doit renouveler sa demande d'adhésion <b>avant</b> d'être certifiée.",
+    "IDENTITY_EXPIRED": "La publication de cette identité a expiré : cette personne doit effectuer une nouvelle demande d'adhésion <b>avant</b> d'être certifiée.",
+    "IDENTITY_SANDBOX_FULL": "Le nœud Duniter utilisé par Cesium ne peut plus recevoir de nouvelles identités, car sa file d'attente est pleine.<br/><br/>Veuillez réessayer ultérieurement ou changer de nœud (via le menu <b>Paramètres</b>).",
+    "IDENTITY_NOT_FOUND": "Identité non trouvée.",
+    "IDENTITY_TX_FAILED": "Échec du chargement des opérations.",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Adhésion non valide.",
+    "WALLET_INVALID_BLOCK_HASH": "Votre demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé).<br/>Vous devez <a ng-click=\"doQuickFix('fixMembership')\">envoyer une nouvelle demande</a> pour résoudre ce problème.",
+    "WALLET_IDENTITY_EXPIRED": "La publication de <b>votre identité a expirée</b>.<br/>Vous devez <a ng-click=\"doQuickFix('fixIdentity')\">publier à nouveau votre identité</a> pour résoudre ce problème.",
+    "WALLET_REVOKED": "Votre identité a été <b>révoquée</b> : ni votre pseudonyme ni votre clef publique ne pourra être utilisé à l'avenir pour un compte membre.",
+    "WALLET_HAS_NO_SELF": "Votre identité doit d'abord avoir été publiée, et ne pas être expirée.",
+    "AUTH_REQUIRED": "Authentification requise.",
+    "AUTH_INVALID_PUBKEY": "La clef attendue est <i class=\"ion-key\"></i> {{pubkey|formatPubkey}}...",
+    "AUTH_INVALID_SCRYPT": "Identifiant ou mot de passe invalide.",
+    "AUTH_INVALID_FILE": "Fichier de trousseau invalide.",
+    "AUTH_FILE_ERROR": "Échec de l'ouverture du fichier de trousseau.",
+    "IDENTITY_ALREADY_CERTIFY": "Vous avez <b>déjà certifié</b> cette identité.<br/><br/>Cette certification est encore valide (expiration {{expiresIn|formatDurationTo}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "Vous avez <b>déjà certifié</b> cette identité.<br/><br/>Cette certification est en attente de traitement (date limite de traitement {{expiresIn|formatDurationTo}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Certification impossible",
+    "LOAD_NEWCOMERS_FAILED": "Échec du chargement des nouveaux membres.",
+    "LOAD_PENDING_FAILED": "Échec du chargement des inscriptions en attente.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vous devez <b>être membre</b> pour pouvoir effectuer cette action.",
+    "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vous devez <b>être membre (ou ancien membre)</b> pour pouvoir effectuer cette action.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Vous devez avoir <b>publié votre identité</b> pour pouvoir effectuer cette action.",
+    "GET_BLOCK_FAILED": "Échec de la récupération du bloc.",
+    "INVALID_BLOCK_HASH": "Bloc non trouvé (hash différent).",
+    "DOWNLOAD_REVOCATION_FAILED": "Échec du téléchargement du fichier de révocation.",
+    "REVOCATION_FAILED": "Échec de la révocation.",
+    "SALT_OR_PASSWORD_NOT_CONFIRMED": "Identifiant secret ou mot de passe incorrect.",
+    "RECOVER_ID_FAILED": "Échec de la récupération des identifiants",
+    "LOAD_FILE_FAILED" : "Échec du chargement du fichier",
+    "NOT_VALID_REVOCATION_FILE": "Fichier de révocation non valide (mauvais format de fichier)",
+    "NOT_VALID_SAVE_ID_FILE": "Fichier de récupération non valide (mauvais format de fichier)",
+    "NOT_VALID_KEY_FILE": "Fichier de trousseau non valide (format non reconnu)",
+    "EXISTING_ACCOUNT": "Vos identifiants correspondent à un compte déjà existant, dont la <a ng-click=\"showHelpModal('pubkey')\">clef publique</a> est :",
+    "EXISTING_ACCOUNT_REQUEST": "Veuillez modifier vos identifiants afin qu'ils correspondent à un compte non utilisé.",
+    "GET_LICENSE_FILE_FAILED": "Récupération du fichier de licence impossible.",
+    "CHECK_NETWORK_CONNECTION": "Aucun nœud ne semble accessible.<br/><br/>Veuillez <b>vérifier votre connexion Internet</b>.",
+    "ISSUE_524_TX_FAILED": "Échec du virement.<br/><br/>Un message a été envoyé aux développeurs pour faciliter la résolution du problème. <b>Merci de votre aide</b>.",
+    "ADD_SECONDARY_WALLET_FAILED": "Échec de l'ajout du portefeuille secondaire.",
+    "UPDATE_WALLET_LIST_FAILED": "Échec du rafraîchissement des portefeuilles secondaires.",
+    "LOAD_WALLET_LIST_FAILED": "Échec du chargement des portefeuilles secondaires.",
+    "SAVE_WALLET_LIST_FAILED": "Échec de la sauvegarde des portefeuilles secondaires.",
+    "COULD_NOT_ADD_MAIN_WALLET": "Ce portefeuille <b>correspond au compte principal</b> avec lequel vous êtes connecté.<br/>Impossible de l'ajouter comme portefeuille secondaire.",
+    "COULD_NOT_ADD_EXISTING_WALLET": "Portefeuille déjà existant dans la liste.",
+    "UNKNOWN_WALLET_ID": "Portefeuille secondaire inconnu.",
+    "RESTORE_WALLET_LIST_FAILED": "Échec de la restauration des portefeuilles secondaires.",
+    "INVALID_FILE_FORMAT": "Format de fichier invalide.",
+    "SAME_TX_RECIPIENT": "Le destinataire doit être différent de l'émetteur."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Information",
+    "CERTIFICATION_DONE": "Certification envoyée",
+    "NOT_ENOUGH_CREDIT": "Crédit insuffisant",
+    "TRANSFER_SENT": "Virement envoyé",
+    "COPY_TO_CLIPBOARD_DONE": "Copié dans le presse-papier",
+    "MEMBERSHIP_OUT_SENT": "Résiliation envoyée",
+    "NOT_NEED_MEMBERSHIP": "Vous êtes déjà membre.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Cette identité va bientôt manquer de certifications (au moins {{willNeedCertificationCount}}).",
+    "IDENTITY_NEED_MEMBERSHIP": "Cette identité n'a pas envoyée de demande d'adhésion. Elle le devra si elle souhaite devenir membre.",
+    "HAS_ALTERNATIVE_IDENTITIES": "Il existe <b>plusieurs identités</b> rattachées à cette clé publique. <b>Avant toute certification</b>, pensez à <a ng-click=\"doQuickFix('showSelectIdentities')\">consulter les autres identités</a> pour choisir la bonne, ou bien contacter le propriétaire du compte.",
+    "REVOCATION_SENT": "Révocation envoyée",
+    "REVOCATION_SENT_WAITING_PROCESS": "La <b>révocation de cette identité</b> a été demandée et est en attente de traitement.",
+    "FEATURES_NOT_IMPLEMENTED": "Cette fonctionnalité est encore en cours de développement.<br/>Pourquoi ne pas <b>contribuer à Cesium</b>, pour l'obtenir plus rapidement ? ;)",
+    "EMPTY_TX_HISTORY": "Aucune opération à exporter"
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Confirmation</b>",
+    "POPUP_WARNING_TITLE": "<b>Avertissement</b>",
+    "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Avertissement de sécurité</b>",
+    "CERTIFY_RULES_TITLE_UID": "Certifier {{uid}}",
+    "CERTIFY_RULES": "<b class=\"assertive\">Ne PAS certifier</b> un compte si vous pensez que :<br/><br/><ul><li>1.) il ne correspond pas à une personne <b>physique et vivante</b>.<li>2.) son propriétaire <b>possède un autre compte</b> déjà certifié.<li>3.) son propriétaire viole (volontairement ou non) la règle 1 ou 2 (par exemple en certifiant des comptes factices ou en double).</ul><br/><b>Êtes-vous sûr</b> de vouloir néanmoins certifier cette identité ?",
+    "FULLSCREEN": "Afficher l'application en plein écran ?",
+    "EXIT_APP": "Fermer l'application ?",
+    "TRANSFER": "<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>",
+    "TRANSFER_ALL": "<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li><br/><li> - Reste : <b>{{restAmount}} {{unit}}</b> à <b>{{restTo}}</b></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>",
+    "MEMBERSHIP_OUT": "Cette opération est <b>irréversible</b>.<br/></br/>Êtes-vous sûr de vouloir <b>résilier votre compte membre</b> ?",
+    "MEMBERSHIP_OUT_2": "Cette opération est <b>irreversible</b> !<br/><br/>Êtes-vous vraiment sûr de vouloir <b>résilier votre adhésion</b> comme membre ?",
+    "LOGIN_UNUSED_WALLET_TITLE": "Erreur de saisie ?",
+    "LOGIN_UNUSED_WALLET": "Le compte connecté semble <b>inactif</b>.<br/><br/>Il s'agit probablement d'une <b>erreur de saisie</b> dans vos identifiants de connexion. Veuillez recommencer, en vérifiant que <b>la clé publique est celle de votre compte</b>.",
+    "FIX_IDENTITY": "Le pseudonyme <b>{{uid}}</b> va être publiée à nouveau, en remplacement de l'ancienne publication qui a expirée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",
+    "FIX_MEMBERSHIP": "Votre demande d'adhésion comme membre va être renvoyée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",
+    "MEMBERSHIP": "Votre demande d'adhésion comme membre va être envoyée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",
+    "RENEW_MEMBERSHIP": "Votre adhésion comme membre va être renouvelée.<br/></br/><b>Êtes-vous sûr</b> de vouloir continuer ?",
+    "REVOKE_IDENTITY": "Vous allez <b>revoquer définitivement cette identité</b>.<br/><br/>La clé publique et le pseudonyme associés <b>ne pourront plus jamais être utilisés</b> (pour un compte membre). <br/></br/><b>Êtes-vous sûr</b> de vouloir révoquer définitivement ce compte ?",
+    "REVOKE_IDENTITY_2": "Cette opération est <b>irreversible</b> !<br/><br/>Êtes-vous vraiment sûr de vouloir <b>révoquer définitivement</b> ce compte ?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Votre adhésion n'a pas besoin d'être renouvelée (elle n'expirera que dans {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Êtes-vous sûr</b> de vouloir renouveler votre adhésion ?",
+    "SAVE_BEFORE_LEAVE": "Voulez-vous <b>sauvegarder vos modifications</b> avant de quitter la page ?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Modifications non enregistrées",
+    "LOGOUT": "Êtes-vous sûr de vouloir vous déconnecter ?",
+    "USE_FALLBACK_NODE": "Nœud <b>{{old}}</b> injoignable ou adresse invalide.<br/><br/>Voulez-vous temporairement utiliser le nœud <b>{{new}}</b> ?",
+    "ISSUE_524_SEND_LOG": "La transaction a été rejetée, à cause d'une anomalie connue (ticket #524) mais <b>non reproduite</b>.<br/><br/>Pour aider les développeurs à corriger cette erreur, <b>acceptez-vous la transmission de vos logs</b> par message ?<br/><small>(aucune donnée confidentielle n'est envoyée)</small>."
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Fichier de révocation</b>",
+    "POPUP_REVOKE_MESSAGE": "Pour sécuriser votre compte, veuillez télécharger le <b>document de révocation de compte</b>. Il vous permettra le cas échéant d'annuler votre compte (en cas d'un vol de compte, d'un changement d'identifiant, d'un compte créé à tort, etc.).<br/><br/><b>Veuillez le stocker en lieu sûr.</b>"
+  },
+  "HELP": {
+    "TITLE": "Aide en ligne",
+    "JOIN": {
+      "SECTION": "Inscription",
+      "SALT": "L'identifiant secret est très important. Il sert à mélanger le mot de passe, avant qu'il ne serve à calculer la <span class=\"text-italic\">clé publique</span> de votre compte (son numéro) et la clé secrète pour y accéder.<br/><b>Veillez à bien la mémoriser</b>, car aucun moyen n'est actuellement prévu pour la retrouver en cas de perte.<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon identifiant secret doit être suffisamment long (au moins 8 caractères) et le plus original possible.",
+      "PASSWORD": "Le mot de passe est très important. Avec l'identifiant secret, il sert à calculer le numéro (la clé publique) de votre compte, et la clé secrète pour y accéder.<br/><b>Veillez à bien le mémoriser</b>, car aucun moyen n'est prévu de le retrouver en cas de perte (sauf à générer un fichier de sauvegarde).<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon mot de passe contient (idéalement) au moins 8 caractères, dont au moins une majuscule et un chiffre.",
+      "PSEUDO": "Le pseudonyme est utilisé uniquement dans le cas d'inscription comme <span class=\"text-italic\">membre</span>. Il est toujours associé à un portefeuille (via sa <span class=\"text-italic\">clé publique</span>).<br/>Il est publié sur le réseau, afin que les autres utilisateurs puisse l'identifier, le certifier ou envoyer de la monnaie sur le compte.<br/>Un pseudonyme doit être unique au sein des membres (<u>actuels</u> et anciens)."
+    },
+    "LOGIN": {
+      "SECTION": "Connexion",
+      "PUBKEY": "Clé publique du trousseau",
+      "PUBKEY_DEF": "La clef publique du trousseau est générée à partir des identifiants saisis (n'importe lesquels), sans pour autant qu'ils correspondent à un compte déjà utilisé.<br/><b>Vérifiez attentivement que la clé publique est celle de votre compte</b>. Dans le cas contraire, vous serez connecté à un compte probablement jamais utilisé, le risque de collision avec un compte existant étant infime.<br/><a href=\"https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique\" target=\"_system\">En savoir plus sur la cryptographie</a> par clé publique.",
+      "METHOD": "Méthodes de connexion",
+      "METHOD_DEF": "Plusieurs options sont disponibles pour vous connecter à un portefeuille :<br/> - La connexion <b>par salage (simple ou avancé)</b> mélange votre mot de passe grâce à l'identifiant secret, pour limiter les tentatives de <a href=\"https://fr.wikipedia.org/wiki/Attaque_par_force_brute\" target=\"_system\">piratage par force brute</a> (par exemple à partir de mots connus).<br/> - La connexion <b>par clé publique</b> évite de saisir vos identifiants, qui vous seront demandé seulement le moment venu lors d'une opération sur le compte.<br/> - La connexion <b>par fichier de trousseau</b> va lire les clés (publique et privée) du compte, depuis un fichier, sans besoin de saisir d'identifiants. Plusieurs formats de fichier sont possibles."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glossaire",
+      "PUBKEY_DEF": "Une clé publique identifie un portefeuille de monnaie, qui peut identifier un membre ou correspondre à un portefeuille anonyme. Dans Cesium la clé publique est calculée (par défaut) grâce à l'identifiant secret et au mot de passe.<br/><a href=\"https://fr.wikipedia.org/wiki/Cryptographie_asym%C3%A9trique\" target=\"_system\">En savoir plus sur la cryptographie</a> par clé publique.",
+      "MEMBER": "Membre",
+      "MEMBER_DEF": "Un membre est une personne humaine physique et vivante, désireuse de participer librement à la communauté monétaire. Elle co-produit un dividende universel, suivant une période et un montant tels que définis dans les <span class=\"text-italic\">règles de la monnaie</span>",
+      "CURRENCY_RULES": "Règles de la monnaie",
+      "CURRENCY_RULES_DEF": "Les règles de la monnaie sont définies une fois pour toutes. Elle fixe le fonctionnement de la monnaie : le calcul du dividende universel, le nombre de certifications nécessaire pour être membre, le nombre de certification maximum qu'un membre peut donner, etc. <a href=\"#/app/currency\">Voir les règles actuelles</a>.<br/>La non modification des règles dans le temps est possible par l'utilisation d'une <span class=\"text-italic\">BlockChain</span> qui porte et exécute ces règles, et en vérifie constamment la bonne application.",
+      "BLOCKCHAIN": "Chaîne de blocs (<span class=\"text-italic\">Blockchain</span>)",
+      "BLOCKCHAIN_DEF": "La BlockChain est un système décentralisé, qui, dans le cas de Duniter, sert à porter et exécuter les <span class=\"text-italic\">règles de la monnaie</span>.<br/><a href=\"https://duniter.org/fr/comprendre/\" target=\"_system\">En savoir plus sur Duniter</a> et le fonctionnement de sa blockchain.",
+      "UNIVERSAL_DIVIDEND_DEF": "Le Dividende Universel (DU) est la quantité de monnaie co-créée par chaque membre, suivant la période et le calcul définis dans les <span class=\"text-italic\">règles de la monnaie</span>.<br/>A chaque échéance, les membres recoivent sur leur compte la meme quantité de nouvelle monnaie.<br/><br/>Le DU subit une croissance régulière, pour rester juste entre les membres (actuels et à venir), calculée en fonction de l'espérance de vie moyenne, telle que démontré dans la Thérorie Relative de la Monnaie (TRM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">En savoir plus sur la TRM</a> et les monnaies libres.",
+      "WOT": "Toile de Confiance (TdC)",
+      "WOT_DEF": "La Toile de Confiance est constituée de l'ensemble des membres de la monnaie, et des liens de certification qui les relient.",
+      "DISTANCE_RULE": "Règle de distance",
+      "DISTANCE_RULE_DEF": "La règle de distance de la Toile de Confiance définie <b>une distance maximale à respecter</b> entre un postulant et un nombre minimum de membres référents (ou membres centraux). Cette distance est calculée en utilisant les liens de certification."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "Le menu <b>{{'MENU.CURRENCY'|translate}}</b> permet la consultation des <b>règles de la monnaie</b> et de son état.",
+      "CURRENCY_WOT": "Le <b>nombre de membres</b> montre l'importance de la communauté et permet de <b>suivre son évolution</b>.",
+      "CURRENCY_MASS": "Suivez ici la <b>quantité totale de monnaie</b> existante et sa <b>répartition moyenne</b> par membre.<br/><br/>Ceci permet de juger de l'<b>importance d'un montant</b>, vis à vis de ce que <b>possède les autres</b> sur leur compte (en moyenne).",
+      "CURRENCY_UNIT_RELATIVE": "L'unité utilisée (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifie que les montants en {{currency|capitalize}} ont été divisés par le <b>Dividende Universel</b> (DU).<br/><br/><small>Cette unité relative est <b>pertinente</b>, car stable malgré la quantitié de monnaie qui augmente en permanence.</small>",
+      "CURRENCY_CHANGE_UNIT": "L'option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permet de <b>changer d'unité</b>, pour visualiser les montants <b>directement en {{currency|capitalize}}</b> (plutôt qu'en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "L'option <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permet de <b>changer d'unité</b>, pour visualiser les montants en &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, c'est-à-dire relativement au Dividende Universel (le montant co-produit par chaque membre).",
+      "CURRENCY_RULES": "Les <b>règles</b> de la monnaie fixent son fonctionnement <b>exact et prévisible</b>.<br/><br/>Véritable ADN de la monnaie, elles rendent son code monétaire <b>lisible et transparent</b>.",
+      "MENU_BTN_NETWORK": "Le menu <b>{{'MENU.NETWORK'|translate}}</b> permet la consultation de l'état du réseau.",
+      "NETWORK_BLOCKCHAIN": "Toutes les opérations de la monnaie sont enregistrées dans un grand livre de compte <b>public et infalsifiable</b>, appelé aussi <b>chaine de blocs</b> (<em>BlockChain</em> en anglais).",
+      "NETWORK_PEERS": "Les <b>nœuds</b> visibles ici correspondent aux <b>ordinateurs qui actualisent et contrôlent</b> la chaine de blocs.<br/><br/>Plus il y a de nœuds, plus la monnaie a une gestion <b>décentralisée</b> et digne de confiance.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "Ce <b>numéro</b> (en vert) indique le <b>dernier bloc validé</b> pour ce nœud (dernière page écrite dans le grand livre de comptes).<br/><br/>La couleur verte indique que ce bloc est également validé par <b>la plupart des autres nœuds</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Chaque membre</b>, équipé d'un ordinateur avec Internet, <b>peut participer en ajoutant un nœud</b>. Il suffit d'<b>installer le logiciel Duniter</b> (libre et gratuit). <a href=\"{{installDocUrl}}\" target=\"_system\">Voir le manuel d'installation &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "Le menu <b>{{'MENU.ACCOUNT'|translate}}</b> permet d'accéder à la gestion de votre compte.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Consultez ici l'état de votre compte et les informations sur vos certifications.",
+      "WALLET_CERTIFICATIONS": "Cliquez ici pour consulter le détail de vos certifications (reçues et émises).",
+      "WALLET_RECEIVED_CERTIFICATIONS": "Cliquez ici pour consulter le détail de vos <b>certifications reçues</b>.",
+      "WALLET_GIVEN_CERTIFICATIONS": "Cliquez ici pour consulter le détail de vos <b>certifications émises</b>.",
+      "WALLET_BALANCE": "Le <b>solde</b> de votre compte s'affiche ici.",
+      "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>L'unité utilisée (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifie que le montant en {{currency|capitalize}} a été divisé par le <b>Dividende Universel</b> (DU) co-créé par chaque membre.<br/><br/>Actuellement 1 DU vaut {{currentUD|formatInteger}} {{currency|capitalize}}s.",
+      "WALLET_BALANCE_CHANGE_UNIT": "Vous pourrez <b>changer l'unité</b> d'affichage des montants dans les <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Par exemple pour visualiser les montants <b>directement en {{currency|capitalize}}</b>, plutôt qu'en unité relative.",
+      "WALLET_PUBKEY": "Voici la clé publique de votre compte. Vous pouvez la communiquer à un tiers afin qu'il identifie plus simplement votre compte.",
+      "WALLET_SEND": "Effectuer un paiement en quelques clics.",
+      "WALLET_SEND_NO_MONEY": "Effectuer un paiement en quelques clics.<br/>(Votre solde ne le permet pas encore)",
+      "WALLET_OPTIONS": "Ce bouton permet l'accès aux <b>actions d'adhésion</b> et de sécurité.<br/><br/>N'oubliez pas d'y jeter un oeil !",
+      "WALLET_RECEIVED_CERTS": "S'affichera ici la liste des personnes qui vous ont certifié.",
+      "WALLET_CERTIFY": "Le bouton <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permet de sélectionner une identité et de la certifier.<br/><br/>Seuls des utilisateurs <b>déjà membres</b> peuvent en certifier d'autres.",
+      "WALLET_CERT_STOCK": "Votre stock de certifications (émises) est limité à <b>{{sigStock}} certifications</b>.<br/><br/>Ce stock se renouvelle avec le temps, au fur et à mesure que les certifications s'invalident.",
+      "MENU_BTN_WALLETS": "Le menu <b>{{'MENU.WALLETS'|translate}}</b> permet d'ajouter des portefeuilles supplémentaires que vous gérer.",
+      "MENU_BTN_TX": "Le menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> permet de consulter votre solde, l'historique vos transactions et d'envoyer un paiement.",
+      "MENU_BTN_WOT": "Le menu <b>{{'MENU.WOT'|translate}}</b> permet de rechercher parmi les <b>utilisateurs</b> de la monnaie (membres ou non).",
+      "WOT_SEARCH_TEXT_XS": "Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique).<br/><br/>La recherche se lancera automatiquement.",
+      "WOT_SEARCH_TEXT": "Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique). <br/><br/>Appuyer ensuite sur <b>Entrée</b> pour lancer la recherche.",
+      "WOT_SEARCH_RESULT": "Visualisez la fiche détaillée simplement en <b>cliquant</b> sur une ligne.",
+      "WOT_VIEW_CERTIFICATIONS": "La ligne <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> montre combien de membres ont validé cette identité.<br/><br/>Ces certifications attestent que le compte appartient à <b>une personne humaine vivante</b> n'ayant <b>aucun autre compte membre</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "Il faut au moins <b>{{sigQty}} certifications</b> pour devenir membre et recevoir le <b>Dividende Universel</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Un clic ici permet d'ouvrir <b>la liste de toutes les certifications</b> de l'identité (reçues et émises).",
+      "WOT_VIEW_CERTIFY": "Le bouton <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permet d'ajouter votre certification à cette identité.",
+      "CERTIFY_RULES": "<b>Attention :</b> Ne certifiez que des <b>personnes physiques vivantes</b>, ne possédant aucun autre compte membre.<br/><br/>La sécurité de la monnaie dépend de la vigilance de chacun !",
+      "MENU_BTN_SETTINGS": "Les <b>{{'MENU.SETTINGS'|translate}}</b> vous permettront de configurer l'application.",
+      "HEADER_BAR_BTN_PROFILE": "Cliquez ici pour accéder à votre <b>profil utilisateur.</b>",
+      "SETTINGS_CHANGE_UNIT": "Vous pourrez <b>changer d'unité d'affichage</b> des montants en cliquant ci-dessus.<br/><br/>- Désactivez l'option pour un affichage des montants en {{currency|capitalize}}.<br/>- Activez l'option pour un affichage relatif en {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (tous les montants seront <b>divisés</b> par le Dividende Universel courant).",
+      "END_LOGIN": "Cette visite guidée est <b>terminée</b> !<br/><br/>Bonne continuation à vous, dans le nouveau monde de l'<b>économie libre</b> !",
+      "END_NOT_LOGIN": "Cette visite guidée est <b>terminée</b> !<br/><br/>Si vous souhaitez rejoindre la monnaie {{currency|capitalize}}, il vous suffira de cliquer sur <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> ci-dessous."
+    }
+  },
+  "API" :{
+    "COMMON": {
+      "LINK_DOC": "Documentation API",
+      "LINK_DOC_HELP": "Documentation pour les développeurs",
+      "LINK_STANDARD_APP": "Version classique",
+      "LINK_STANDARD_APP_HELP": "Ouvrir la version classique de {{'COMMON.APP_NAME'|translate}}",
+      "CONNECTION_ERROR": "Nœud <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Vérifiez votre connexion Internet, ou contactez l'administrateur du site</a>."
+    },
+    "HOME": {
+      "TITLE": "Documentation API {{'COMMON.APP_NAME'|translate}}",
+      "MESSAGE": "Bienvenue dans la <b>documentation de l'API</b> {{'COMMON.APP_NAME'|translate}}.<br/>Connectez vos sites web à <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> très simplement !",
+      "MESSAGE_SHORT": "Connectez vos sites à <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> très simplement !",
+      "DOC_HEADER": "Services disponibles :"
+    },
+    "TRANSFER": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} - Paiement en ligne",
+      "TITLE_SHORT": "Paiement en ligne",
+      "SUMMARY": "Récapitulatif du paiement :",
+      "AMOUNT": "Montant :",
+      "AMOUNTS_HELP": "Veuillez choisir le montant :",
+      "NAME": "Nom :",
+      "PUBKEY": "Clé publique du destinataire :",
+      "COMMENT": "Référence de l'opération :",
+      "NODE": "Adresse du nœud :",
+      "DEMO": {
+        "SALT": "demo",
+        "PASSWORD": "demo",
+        "PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
+        "HELP": "<b>Mode démonstration</b> : Aucun paiement ne sera réellement envoyé pendant cette simulation.<br/>Veuillez utiliser les identifiants : <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
+        "BAD_CREDENTIALS": "Vérifiez votre saisie.<br/>En mode démonstration, les identifiants sont : {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
+      },
+      "INFO": {
+        "SUCCESS_REDIRECTING_WITH_NAME": "Paiement envoyé.<br/>Redirection vers <b>{{name}}</b>...",
+        "SUCCESS_REDIRECTING": "Paiement envoyé.<br/>Redirection vers le site du vendeur...",
+        "CANCEL_REDIRECTING_WITH_NAME": "Paiement annulé.<br/>Redirection vers <b>{{name}}</b>...",
+        "CANCEL_REDIRECTING": "Paiement annulé.<br/>Redirection vers le site du vendeur..."
+      },
+      "ERROR": {
+        "TRANSFER_FAILED": "Échec du paiement"
+      }
+    },
+    "DOC": {
+      "DESCRIPTION_DIVIDER": "Description",
+      "URL_DIVIDER": "Adresse d'appel",
+      "PARAMETERS_DIVIDER": "Paramètres",
+      "AVAILABLE_PARAMETERS": "Voici la liste des paramètres possibles :",
+      "DEMO_DIVIDER": "Tester",
+      "DEMO_HELP": "Pour tester ce service, cliquez sur le bouton ci-contre. Le résultat s'affichera en dessous.",
+      "DEMO_RESULT": "Résultat retourné par l'appel :",
+      "DEMO_RESULT_PEER": "Adresse du nœud utilisé :",
+      "DEMO_SUCCEED": "<i class=\"icon ion-checkmark\"></i> Succès !",
+      "DEMO_CANCELLED": "<i class=\"icon ion-close\"></i> Annulé par l'utilisateur",
+      "INTEGRATE_DIVIDER": "Intégrer",
+      "INTEGRATE_CODE": "Code :",
+      "INTEGRATE_RESULT": "Prévisualisation du résultat :",
+      "INTEGRATE_PARAMETERS": "Paramètres",
+      "TRANSFER": {
+        "TITLE": "Paiements",
+        "DESCRIPTION": "Depuis un site (ex: vente en ligne) vous pouvez déléguer le paiement en monnaie libre à Cesium API. Pour cela, il vous suffit de déclencher l'ouverture d'une page sur l'adresse suivante :",
+        "PARAM_PUBKEY": "Clé publique du destinataire",
+        "PARAM_PUBKEY_HELP": "Clé publique du destinataire (obligatoire)",
+        "PARAM_AMOUNT": "Montant",
+        "PARAM_AMOUNT_HELP": "Montant de la transaction (obligatoire). Valeurs multiples autorisées, en utilisant un séparateur (point-virgule, barre verticale ou espace).",
+        "PARAM_COMMENT": "Référence (ou commentaire)",
+        "PARAM_COMMENT_HELP": "Référence ou commentaire. Vous permettra par exemple d'identifier le paiement dans la BlockChain.",
+        "PARAM_NAME": "Nom (du destinataire ou du site web)",
+        "PARAM_NAME_HELP": "Le nom du destinataire, ou du site web appelant. Cela peut être un nom lisible (\"Mon site en ligne\"), ou encore une pseudo-adresse web (\"MonSite.com\").",
+        "PARAM_REDIRECT_URL": "Adresse web de redirection",
+        "PARAM_REDIRECT_URL_HELP": "Adresse web (URL) de redirection, appelé quand le paiement a été envoyé. Peut contenir les chaînes suivantes, qui seront remplacées par les valeurs de la transaction : \"{tx}\", \"{hash}\", \"{comment}\", \"{amount}\", \"{pubkey}\" et \"{node}\".",
+        "PARAM_CANCEL_URL": "Adresse web d'annulation",
+        "PARAM_CANCEL_URL_HELP": "Adresse web (URL) en cas d'annulation du paiement, par l'utilisateur. Peut contenir les chaînes suivantes, qui seront remplacées dynamiquement : \"{comment}\", \"{amount}\" et {pubkey}.",
+        "PARAM_PREFERRED_NODE": "Adresse du nœud préféré",
+        "PARAM_PREFERRED_NODE_HELP": "Adresse (URL) du nœud Duniter à utiliser de préférence (\"g1.domaine.com:443\" ou \"https://g1.domaine.com\").",
+        "EXAMPLES_HELP": "Voici des exemples d'intégration :",
+        "EXAMPLE_BUTTON": "Bouton HTML",
+        "EXAMPLE_BUTTON_DEFAULT_TEXT": "Payer en {{currency|currencySymbol}}",
+        "EXAMPLE_BUTTON_DEFAULT_STYLE": "Style personnalisé",
+        "EXAMPLE_BUTTON_TEXT_HELP": "Texte du bouton",
+        "EXAMPLE_BUTTON_BG_COLOR": "Couleur du fond",
+        "EXAMPLE_BUTTON_BG_COLOR_HELP": "Exemple : #fbc14c, black, lightgrey, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_FONT_COLOR": "Couleur du texte",
+        "EXAMPLE_BUTTON_FONT_COLOR_HELP": "Exemple : black, orange, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_TEXT_ICON": "Icône",
+        "EXAMPLE_BUTTON_TEXT_WIDTH": "Largeur",
+        "EXAMPLE_BUTTON_TEXT_WIDTH_HELP": "Exemple : 200px, 50%",
+        "EXAMPLE_BUTTON_ICON_NONE": "Aucune",
+        "EXAMPLE_BUTTON_ICON_DUNITER": "Logo Duniter",
+        "EXAMPLE_BUTTON_ICON_CESIUM": "Logo Cesium",
+        "EXAMPLE_BUTTON_ICON_G1_COLOR": "Logo Äž1",
+        "EXAMPLE_BUTTON_ICON_G1_BLACK": "Logo Äž1 (noir)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("it-IT", {
+   "COMMON": {
+     "APP_NAME": "Cesium",
+     "APP_VERSION": "v{{version}}",
+     "APP_BUILD": "build {{build}}",
+     "PUBKEY": "Chiave privata",
+     "MEMBER": "Membro",
+     "BLOCK" : "Blocco",
+     "BTN_OK": "OK",
+     "BTN_YES": "Si",
+     "BTN_NO": "No",
+     "BTN_SEND": "Inviare",
+     "BTN_SEND_MONEY": "Trasferire soldi",
+     "BTN_SEND_MONEY_SHORT": "Trasferire",
+     "BTN_SAVE": "Salvare",
+     "BTN_YES_SAVE": "Si, salvare",
+     "BTN_YES_CONTINUE": "Si, continuare",
+     "BTN_SHOW": "Mostrare",
+     "BTN_SHOW_PUBKEY": "Mostrare chiave pubblica",
+     "BTN_RELATIVE_UNIT": "Mostra importi in DU?",
+     "BTN_BACK": "Indietro",
+     "BTN_NEXT": "Avanti",
+     "BTN_CANCEL": "Cancellare",
+     "BTN_CLOSE": "Chiudere",
+     "BTN_LATER": "Più tardi",
+     "BTN_LOGIN": "Accedi",
+     "BTN_LOGOUT": "Log out",
+     "BTN_ADD_ACCOUNT": "Nuovo conto",
+     "BTN_SHARE": "Condividere",
+     "BTN_EDIT": "Modificare",
+     "BTN_DELETE": "Eliminare",
+     "BTN_ADD": "Aggiungere",
+     "BTN_SEARCH": "Cercare",
+     "BTN_REFRESH": "Aggiornare",
+     "BTN_RETRY": "Riprovare",
+     "BTN_START": "Iniziare",
+     "BTN_CONTINUE": "Continuare",
+     "BTN_CREATE": "Creare",
+     "BTN_UNDERSTOOD": "Ho capito",
+     "BTN_OPTIONS": "Opzioni",
+     "BTN_HELP_TOUR": "Mostrami le funzionalità",
+     "BTN_HELP_TOUR_SCREEN": "Scoprire questo schermo",
+     "BTN_DOWNLOAD": "Scaricare",
+     "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Scaricare estratto conto",
+     "BTN_MODIFY": "Modificare",
+     "CHOOSE_FILE": "Trascini un file <br/>o cliccare per selezionare",
+     "DAYS": "giorni",
+     "NO_ACCOUNT_QUESTION": "Non sei ancora membro? Registrati subito!",
+     "SEARCH_NO_RESULT": "Nessun risultato trovato",
+     "LOADING": "Caricando...",
+     "SEARCHING": "Cercando...",
+     "FROM": "Da",
+     "TO": "A",
+     "COPY": "Copiare",
+     "LANGUAGE": "Lingua",
+     "UNIVERSAL_DIVIDEND": "Dividendo universale",
+     "UD": "UD",
+     "DATE_PATTERN": "DD/MM/YYYY HH:mm",
+     "DATE_FILE_PATTERN": "YYYY-MM-DD",
+     "DATE_SHORT_PATTERN": "DD/MM/YY",
+     "DATE_MONTH_YEAR_PATTERN": "MM/YYYY",
+     "EMPTY_PARENTHESIS": "(empty)",
+     "UID": "Pseudonimo",
+     "ENABLE": "Attivato",
+     "DISABLE": "Disattivato",
+     "RESULTS_LIST": "Risultati:",
+     "RESULTS_COUNT": "{{count}} risultati",
+     "EXECUTION_TIME": "eeseguit in {{duration|formatDurationMs}}",
+     "SHOW_VALUES": "Mostrare valori in modo trasparente?",
+     "POPOVER_ACTIONS_TITLE": "Opzioni",
+     "POPOVER_FILTER_TITLE": "Filtri",
+     "SHOW_MORE": "Mostrare di più",
+     "SHOW_MORE_COUNT": "(limite attuale di {{limit}})",
+     "POPOVER_SHARE": {
+       "TITLE": "Condividere",
+       "SHARE_ON_TWITTER": "Condividere su Twitter",
+       "SHARE_ON_FACEBOOK": "Condividere su Facebook",
+       "SHARE_ON_DIASPORA": "Condividere su Diaspora*",
+       "SHARE_ON_GOOGLEPLUS":"Condividere su Google+"
+     },
+     "FILE": {
+       "DATE" : "Data:",
+       "TYPE" : "Tipo:",
+       "SIZE": "Dimensioni del file:",
+       "VALIDATING": "Validazione in corso..."
+     }
+   },
+   "SYSTEM": {
+     "PICTURE_CHOOSE_TYPE": "Scegliere un file:",
+     "BTN_PICTURE_GALLERY": "Galleria",
+     "BTN_PICTURE_CAMERA": "<b>Camera</b>"
+   },
+   "MENU": {
+     "HOME": "Home",
+     "WOT": "Annuario",
+     "CURRENCY": "Moneta",
+     "ACCOUNT": "Mio conto",
+     "WALLETS": "I miei portafogli",
+     "SETTINGS": "Impostazioni",
+     "NETWORK": "Rete",
+     "TRANSACTIONS": "Miei pagamenti"
+   },
+   "ABOUT": {
+     "TITLE": "A proposito",
+     "LICENSE": "<b>Free/libre software</b> (License GNU AGPLv3).",
+     "CODE": "Codice sorgente:",
+     "DEVELOPERS": "Sviluppatori:",
+     "FORUM": "Forum:",
+     "DEV_WARNING": "Attenzione!",
+     "DEV_WARNING_MESSAGE": "Questa app è ancora in sviluppo attivo.<br/>Facci sapere se trovi dei bugs!",
+     "DEV_WARNING_MESSAGE_SHORT": "Questa app è tutt'ora instabile (in sviluppo)",
+     "REPORT_ISSUE": "Segnalare un bug"
+   },
+   "HOME": {
+     "TITLE": "Cesium",
+     "WELCOME": "Benvenuti nell'{{'COMMON.APP_NAME'|translate}} App!",
+     "MESSAGE": "Scambiate in moneta libera. {{currency|abbreviate}}!",
+     "BTN_CURRENCY": "Esplorare la moneta",
+     "BTN_ABOUT": "a proposito",
+     "BTN_HELP": "Aiuto",
+     "REPORT_ISSUE": "Segnalare un bug",
+     "NOT_YOUR_ACCOUNT_QUESTION" : "Non sei proprietario del conto <b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b>?",
+     "BTN_CHANGE_ACCOUNT": "Disconettere questo conto",
+     "CONNECTION_ERROR": "Peer <b>{{server}}</b> irraggiungibile o indirizzo invalido. <br/><br/> Verifica tua connessione or cambia nodo. <a class=\"positive\" ng-click=\"doQuickFix('settings')\">nell impostazioni. </a>."
+   },
+   "SETTINGS": {
+     "TITLE": "Impostazioni",
+     "NETWORK_SETTINGS": "Rete",
+     "PEER": "Indirizzo peer Duniter",
+     "PEER_CHANGED_TEMPORARY": "Indirizzo usato per un tempo determinato",
+     "USE_LOCAL_STORAGE": "Abilitare local storage",
+     "USE_LOCAL_STORAGE_HELP": "Permette di salvare tue impostazioni",
+     "ENABLE_HELPTIP": "Abilitare consigli dinamici",
+     "ENABLE_UI_EFFECTS": "Abilitare effetti visivi",
+     "HISTORY_SETTINGS": "Mio conto",
+     "DISPLAY_UD_HISTORY": "Mostrare dividendi prodotti?",
+     "AUTHENTICATION_SETTINGS": "Autenticazione",
+     "KEEP_AUTH": "Scadenza dell'autenticazione",
+     "KEEP_AUTH_SHORT": "Scadenza",
+     "KEEP_AUTH_HELP": "Definire quando l'autenticazione verrà eliminata dalla memoria.",
+     "KEEP_AUTH_OPTION": {
+       "NEVER": "Dopo ogni operazione",
+       "SECONDS": "Dopo {{value}}s d'inattività",
+       "MINUTE": "Dopo{{value}}min d'inattività",
+       "MINUTES": "Dopo {{value}}min d'inattività",
+       "HOUR": "Dopo {{value}}h d'inattività",
+       "ALWAYS": "Alla fine della sessione"
+     },
+     "REMEMBER_ME": "Ricordarsi di me?",
+     "REMEMBER_ME_HELP": "Rimanere identificato/a da una sessione all'altra, conservando la chiave localmente.",
+     "PLUGINS_SETTINGS": "Estensioni",
+     "BTN_RESET": "Ripristini valori predefiniti",
+     "EXPERT_MODE": "Abilitare modlità eseperto",
+     "EXPERT_MODE_HELP": "Permette di vedere più dettagli",
+     "POPUP_PEER": {
+       "TITLE" : "Peer Duniter",
+       "HOST" : "Indirizzo",
+       "HOST_HELP": "Indirizzo: server:port",
+       "USE_SSL" : "Securizzato?",
+       "USE_SSL_HELP" : "(SSL Encryption)",
+       "BTN_SHOW_LIST" : "Lista dei peers"
+     }
+   },
+   "BLOCKCHAIN": {
+     "HASH": "Hash: {{hash}}",
+     "VIEW": {
+       "HEADER_TITLE": "Blocco #{{number}}-{{hash|formatHash}}",
+       "TITLE_CURRENT": "Blocco attuale",
+       "TITLE": "Blocco #{{number|formatInteger}}",
+       "COMPUTED_BY": "Calcolato da",
+       "SHOW_RAW": "Mostrare dati grezzi",
+       "TECHNICAL_DIVIDER": "Informazioni tecniche",
+       "VERSION": "Versione di formatto",
+       "HASH": "Hash calcolato",
+       "UNIVERSAL_DIVIDEND_HELP": "Moneta co-prodotta da ciasciun dei {{membersCount}} membri",
+       "EMPTY": "Nessun dati in questo blocco",
+       "POW_MIN": "Difficoltà minimale",
+       "POW_MIN_HELP": "Difficoltà imposta nel calcolo del hash",
+       "DATA_DIVIDER": "Dati",
+       "IDENTITIES_COUNT": "Nuove identità",
+       "JOINERS_COUNT": "Nuovi membri",
+       "ACTIVES_COUNT": "Rinnovi",
+       "ACTIVES_COUNT_HELP": "Membri che hanno rinnovato la loro presenza nella rete",
+       "LEAVERS_COUNT": "",
+       "LEAVERS_COUNT_HELP": "Membri che si sono fatti escludere dalla rete",
+       "EXCLUDED_COUNT": "Membri esclusi",
+       "EXCLUDED_COUNT_HELP": "Vecchi membri, esclusi per certificazione non rinnovata o soglia di certificazioni non raggiunta.",
+       "REVOKED_COUNT": "Identità revocate",
+       "REVOKED_COUNT_HELP": "Può essere che questi conti non siano più attivi",
+       "TX_COUNT": "Transazioni",
+       "CERT_COUNT": "Certificazioni",
+       "TX_TO_HIMSELF": "Cambio",
+       "TX_OUTPUT_UNLOCK_CONDITIONS": "Sbloccare condizioni",
+       "TX_OUTPUT_OPERATOR": {
+         "AND": "e",
+         "OR": "o"
+       },
+       "TX_OUTPUT_FUNCTION": {
+         "SIG": "<b>Firma</b> della chive pubblica",
+         "XHX": "<b>Password</b>, incluso SHA256 =",
+         "CSV": "Bloccato per",
+         "CLTV": "Bloccato fino a"
+       }
+     },
+     "LOOKUP": {
+       "TITLE": "Blocchi",
+       "NO_BLOCK": "Nessun blocco",
+       "LAST_BLOCKS": "Ultimi blocchi:",
+       "BTN_COMPACT": "Compact"
+     }
+   },
+   "CURRENCY": {
+     "VIEW": {
+       "TITLE": "Moneta",
+       "TAB_CURRENCY": "Moneta",
+       "TAB_WOT": "Web of trust",
+       "TAB_NETWORK": "Rete",
+       "TAB_BLOCKS": "Blocchi",
+       "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} è <b>una moneta libera</b>, {{firstBlockTime | formatFromNow}}. La rete comprende <b>{{N}} membri </b>, che produccono e ricevono un <a ng-click=\"showHelpModal('ud')\">Dividendo Universale</a> (DU), ogni {{dt | formatPeriod}}.",
+       "NETWORK_RULES_DIVIDER": "Regole della rete",
+       "CURRENCY_NAME": "Nome della moneta",
+       "MEMBERS": "Numero di membri",
+       "MEMBERS_VARIATION": "Variazione da {{duration|formatDuration}} (dall' ultimo UD)",
+       "MONEY_DIVIDER": "Moneta",
+       "MASS": "Massa monetaria",
+       "SHARE": "Quantità a testa",
+       "UD": "Dividendo universale",
+       "C_ACTUAL": "Crescita attuale",
+       "MEDIAN_TIME": "Current blockchain time",
+       "POW_MIN": "Difficoltà commune",
+       "MONEY_RULES_DIVIDER": "Regole della moneta",
+       "C_RULE": "Obbietivo teorico di crescità",
+       "UD_RULE": "Dividendo universale (formula)",
+       "DT_REEVAL": "Periodo tra due re-evaluazioni del UD",
+       "REEVAL_SYMBOL": "reeval",
+       "DT_REEVAL_VALUE": "Ogni <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})",
+       "UD_REEVAL_TIME0": "Data della prima re-evaluzione del UD",
+       "SIG_QTY_RULE": "Numero di certificazioni requisiti per diventare membro",
+       "SIG_STOCK": "Numero massimo di certificazioni inviate da un membro",
+       "SIG_PERIOD": "Tempo minimo tra 2 certificazioni inviate da un unico membro.",
+       "SIG_WINDOW": "Periodo massimo prima che una certificazione venga studiata",
+       "SIG_VALIDITY": "Durata di vita di una certificazione che è state presa in conto",
+       "MS_WINDOW": "Periodo massimo prima che una certificazione pendente sia validata",
+       "MS_VALIDITY": "Durata di vita di un'adesione che è state presa in conto",
+       "STEP_MAX": "Distanza massima tra un nuovo membro e ogni membro referente.",
+       "WOT_RULES_DIVIDER": "Regole della Web of Trust",
+       "SENTRIES": "Numero di certificazioni (date <b>e</b> ricevute) per diventare membro referente ",
+       "SENTRIES_FORMULA": "Numero di certificazioni necessarie per diventare membro (formula)",
+       "XPERCENT":"Percentaggio minimino di membri referenti per rispettare la regola di distanza tra i membri",
+       "AVG_GEN_TIME": "Tempo medio tra due blocchi",
+       "CURRENT": "attuale",
+       "MATH_CEILING": "CEILING",
+       "DISPLAY_ALL_RULES": "Mostrare tutte le regole?",
+       "BTN_SHOW_LICENSE": "Mostrare licenza",
+       "WOT_DIVIDER": "Web of trust"
+     },
+     "LICENSE": {
+       "TITLE": "Licensa attuale",
+       "BTN_DOWNLOAD": "Scaricare il file",
+       "NO_LICENSE_FILE": "File di licenza non trovato ."
+     }
+   },
+   "NETWORK": {
+     "VIEW": {
+       "MEDIAN_TIME": "Blockchain time",
+       "LOADING_PEERS": "Caricando peers...",
+       "NODE_ADDRESS": "Indirizzo del peer",
+       "SOFTWARE": "Software",
+       "WARN_PRE_RELEASE": "Pre-versione (ultima versione stabile: <b>{{version}}</b>)",
+       "WARN_NEW_RELEASE": "Versione <b>{{version}}</b> disponibile",
+       "WS2PID": "Identificativo :",
+       "PRIVATE_ACCESS": "Accesso privato",
+       "POW_PREFIX": "Prefisso Prova di Lavoro :",
+       "ENDPOINTS": {
+         "BMAS": "Endpoint sicuro (SSL)",
+         "BMATOR": "Interfaccia rete TOR",
+         "WS2P": "Interfaccia WS2P",
+         "ES_USER_API": "Cesium+ data node"
+       }
+     },
+     "INFO": {
+       "ONLY_SSL_PEERS": "I nodi non-SSL hanno un display semplificato perche Cesium funziona in modalità HTTPS."
+     }
+   },
+   "PEER": {
+     "PEERS": "Peers-Nodi",
+     "SIGNED_ON_BLOCK": "Firmato nel blocco",
+     "MIRROR": "Specchio",
+     "MIRRORS": "Specchio",
+     "MIRROR_PEERS": "Peers specchio",
+     "PEER_LIST" : "Lista dei peers",
+     "MEMBERS" : "Membri",
+     "MEMBER_PEERS" : "Peers membri",
+     "ALL_PEERS" : "Tutti i peers",
+     "DIFFICULTY" : "Difficoltà",
+     "API" : "API",
+     "CURRENT_BLOCK" : "Blocco #",
+     "POPOVER_FILTER_TITLE": "Filtro",
+     "OFFLINE": "Sconessi",
+     "OFFLINE_PEERS": "Peers sconessi",
+     "BTN_SHOW_PEER": "Mostrare peer",
+     "VIEW": {
+       "TITLE": "Peer",
+       "OWNER": "Proprietà di ",
+       "SHOW_RAW_PEERING": "Vedere il documento di peering",
+      "SHOW_RAW_CURRENT_BLOCK": "Vedere l'utimo blocco (formatto grezzo)",
+       "LAST_BLOCKS": "Ultimi blocchi",
+       "KNOWN_PEERS": "Peers conosciuti :",
+       "GENERAL_DIVIDER": "Informazioni generali",
+       "ERROR": {
+         "LOADING_TOR_NODE_ERROR": "Impossibile ottenere i dati del peer, periodo di attesa scaduto.",
+         "LOADING_NODE_ERROR": "Impossibile ottenere i dati del peer"
+       }
+     }
+   },
+   "WOT": {
+     "SEARCH_HELP": "Cercare (membro o chiave pubblica)",
+     "SEARCH_INIT_PHASE_WARNING": "La ricerca per le certificazioni pendenti <b>può essere lunga</b> durante la fase di pre-certificazione. La preghiamo di attendere...",
+     "REGISTERED_SINCE": "Certificato/a dal",
+     "REGISTERED_SINCE_BLOCK": "Certificato/a dal blocco #",
+     "NO_CERTIFICATION": "Nessuna certificazione valida",
+     "NO_GIVEN_CERTIFICATION": "Nessuna certificazione data",
+     "NOT_MEMBER_PARENTHESIS": "(non-membro)",
+     "IDENTITY_REVOKED_PARENTHESIS": "(identità revocata)",
+     "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(Cancellazione dell'identità pendente)",
+     "EXPIRE_IN": "Scade",
+     "NOT_WRITTEN_EXPIRE_IN": "Scadenza <br/> ",
+     "EXPIRED": "Scaduto",
+     "PSEUDO": "Pseudonimo",
+     "SIGNED_ON_BLOCK": "Emessa nel blocco #{{block}}",
+     "WRITTEN_ON_BLOCK": "Scritta nel blocco #{{block}}",
+     "GENERAL_DIVIDER": "Informazioni generali",
+     "NOT_MEMBER_ACCOUNT": "Conto non-membro",
+     "NOT_MEMBER_ACCOUNT_HELP": "Questo è un semplice portafoglio osservatore, senza richiesta di certificazione emessa.",
+     "TECHNICAL_DIVIDER": "Dati tecnici",
+     "BTN_CERTIFY": "Certificare",
+     "BTN_YES_CERTIFY": "Si, certificare",
+     "BTN_SELECT_AND_CERTIFY": "Nuova certificazione",
+     "ACCOUNT_OPERATIONS": "Operazioni sul conto",
+     "VIEW": {
+       "POPOVER_SHARE_TITLE": "Identità {{title}}"
+     },
+     "LOOKUP": {
+       "TITLE": "Annuario",
+       "NEWCOMERS": "Nuovi membri:",
+       "NEWCOMERS_COUNT": "{{count}} membri",
+       "PENDING": "Registrazioni pendenti",
+       "PENDING_COUNT": "{{count}} inscrizioni pendenti",
+       "REGISTERED": "Registrato {{sigDate | formatFromNow}}",
+       "MEMBER_FROM": "Membro dal {{memberDate|medianFromNowShort}}",
+       "BTN_NEWCOMERS": "Ultimi membri",
+       "BTN_PENDING": "Registrazioni pendenti",
+       "SHOW_MORE": "Vedere di più",
+       "SHOW_MORE_COUNT": "(limite attuale di {{limit}})",
+       "NO_PENDING": "Nessuna certificazione pendente.",
+       "NO_NEWCOMERS": "Nessun membro."
+     },
+     "CONTACTS": {
+      "TITLE": "Contatti"
+    },
+     "MODAL": {
+       "TITLE": "Ricerca"
+     },
+     "CERTIFICATIONS": {
+       "TITLE": "{{uid}} - Certificazioni",
+       "SUMMARY": "Certificazioni ricevute",
+       "LIST": "Dettagli delle certificazioni ricevute",
+       "PENDING_LIST": "Certificazioni pendenti",
+       "RECEIVED": "Certificazioni ricevute",
+       "RECEIVED_BY": "Certifications ricevute da {{uid}}",
+       "ERROR": "Certificazioni ricevute per errore",
+       "SENTRY_MEMBER": "Membro referente"
+     },
+     "OPERATIONS": {
+       "TITLE": "{{uid}} - Operazioni"
+     },
+     "GIVEN_CERTIFICATIONS": {
+       "TITLE": "{{uid}} - Certificazioni inviate",
+       "SUMMARY": "Certificazioni inviate",
+       "LIST": "Dettagli delle certificazioni inviate",
+       "PENDING_LIST": "Certificazioni ",
+       "SENT": "Certificazioni inviate",
+       "SENT_BY": "Certificazioni inviate da {{uid}}",
+       "ERROR": "Certificazioni inviate per errore"
+     }
+   },
+   "LOGIN": {
+     "TITLE": "<i class=\"icon ion-log-in\"></i> Accedi",
+     "SCRYPT_FORM_HELP": "Accedi con tuoi dati <br> Ricordati di verificare che stai utilizzando la chiave del tuo conto.",
+     "PUBKEY_FORM_HELP": "Scrivi qui la tua chiave privata:",
+     "FILE_FORM_HELP": "Scegliere un portachiavi da utilizzare:",
+     "SCAN_FORM_HELP": "Scansiona il codice QR di un portafoglio.",
+     "SALT": "Identificativo segreto",
+     "SALT_HELP": "Identificativo segreto",
+     "SHOW_SALT": "Mostrare identificativo segreto?",
+     "PASSWORD": "Passsord",
+     "PASSWORD_HELP": "Password",
+     "PUBKEY_HELP": "Chiave pubblica, pseudonimo",
+     "NO_ACCOUNT_QUESTION": "Ancora non hai un conto?",
+     "HAVE_ACCOUNT_QUESTION": "Hai già un account?",
+     "CREATE_ACCOUNT": "Creare un conto",
+     "CREATE_FREE_ACCOUNT": "Crea un conto gratuito",
+     "FORGOTTEN_ID": "Non ricordi la password?",
+     "ASSOCIATED_PUBKEY": "Chiave pubblica:",
+     "BTN_METHODS": "Altri metodi",
+     "BTN_METHODS_DOTS": "Cambiare metodo...",
+     "METHOD_POPOVER_TITLE": "Metodi",
+     "MEMORIZE_AUTH_FILE": "Memorizzare questo portachiavi per la durata di questa sessione",
+     "SCRYPT_PARAMETERS": "Parametri (Scrypt) :",
+     "AUTO_LOGOUT": {
+       "TITLE": "Informazioni",
+       "MESSAGE": "<i class=\"ion-android-time\"></i> Sei stato <b>sconesso/ b> automaticamente, per un periodo di inattività prolongata",
+       "BTN_RELOGIN": "Accedi",
+       "IDLE_WARNING": "Sarai disconesso in... {{countdown}}"
+     },
+     "METHOD": {
+       "SCRYPT_DEFAULT": "Salatura standard (imp. predefinita)",
+       "SCRYPT_ADVANCED": "Salatura avanzata",
+       "FILE": "File del portachiavi",
+       "PUBKEY": "Chiave pubblica soltanto",
+       "SCAN": "Scansiona un codice QR"
+     },
+     "SCRYPT": {
+       "SIMPLE": "Salatura leggera",
+       "DEFAULT": "Salatura standard",
+       "SECURE": "Salatura sicura",
+       "HARDEST": "Salatura più sicura",
+       "EXTREME": "Salatura estrema",
+       "USER": "Salatura personalizzata",
+       "N": "N (Loop):",
+       "r": "r (RAM):",
+       "p": "p (CPU):"
+     },
+     "FILE": {
+       "HELP": "Format del file atteso: <b>.dunikey</b> (type PubSec). Altri formati in sviluppo (EWIF, WIF)."
+     }
+   },
+   "AUTH": {
+     "TITLE": "<i class=\"icon ion-locked\"></i> Autenticazione",
+     "BTN_AUTH": "Autenticarsi",
+     "GENERAL_HELP": "Autenticati :",
+     "EXPECTED_UID_HELP": "Effettua il login nell'account <i class=\"ion-person\"></i> {{uid}}:",
+     "EXPECTED_PUBKEY_HELP": "Si prega di autenticarsi sul portafoglio <i class=\"ion-key\"></i> {{pubkey|formatPubkey}}:",
+     "SCAN_FORM_HELP": "Scansiona il codice QR della <b>chiave privata</b> del portafoglio."
+   },
+   "ACCOUNT": {
+     "TITLE": "Mio conto",
+     "BALANCE": "Saldo",
+     "LAST_TX": "Ultime transazioni",
+     "BALANCE_ACCOUNT": "Saldo del conto",
+     "NO_TX": "Nessuna transazione",
+     "SHOW_MORE_TX": "Mostrare di più",
+     "SHOW_ALL_TX": "Mostrare tutte",
+     "TX_FROM_DATE": "(limite attuale del {{fromTime|medianFromNowShort}})",
+     "PENDING_TX": "Transazioni pendenti",
+     "VALIDATING_TX": "Transazioni in corso di convalida",
+     "ERROR_TX": "Transaction non eseguite",
+     "ERROR_TX_SENT": "Transazioni inviate",
+     "PENDING_TX_RECEIVED": "Transazioni in attesa di recezione",
+     "EVENTS": "Eventi",
+     "WAITING_MEMBERSHIP": "Richiesta di certificazione inviata. In attesa di validazione.",
+     "WAITING_CERTIFICATIONS": "Hai bisogno di {{needCertificationCount}} certificazione(i) per diventare membro.",
+     "WILL_MISSING_CERTIFICATIONS": "Mancherai a breve <b>di certificazioni</b> (occorrono almeno {{willNeedCertificationCount}} altre certificazioni)",
+     "WILL_NEED_RENEW_MEMBERSHIP": "Tua certificazione <b>scaderà{{membershipExpiresIn|formatDurationTo}}</b>. Ricordati di <a ng-click=\"doQuickFix('renew')\">rinnovarla</a> prima.",
+     "NEED_RENEW_MEMBERSHIP": "You are no longer a member because your membership <b>has expired</b>. Remember to <a ng-click=\"doQuickFix('renew')\">renew your membership</a>.",
+     "NO_WAITING_MEMBERSHIP": "Nessuna domanda di adesione pendente. Se desideri <b>diventare membro</b>, ricordati di <a ng-click=\"doQuickFix('membership')\">inviare tua domanda di adesione</a>.",
+     "CERTIFICATION_COUNT": "Certificazioni ricevute",
+     "CERTIFICATION_COUNT_SHORT": "Certificazioni",
+     "SIG_STOCK": "Stock di certificazioni da inviare",
+     "BTN_RECEIVE_MONEY": "Ricevere",
+     "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Usare un'altra identità..",
+     "BTN_FIX_MEMBERSHIP": "Invia nuovamente di adesione...",
+     "BTN_MEMBERSHIP_RENEW": "Rinnovare adesione",
+     "BTN_MEMBERSHIP_RENEW_DOTS": "Rinnovare adesione ...",
+     "BTN_MEMBERSHIP_OUT_DOTS": "Revocare adesione...",
+     "BTN_SECURITY_DOTS": "Login e securità...",
+     "BTN_SHOW_DETAILS": "Visualizzare dati tecnici",
+     "LOCKED_OUTPUTS_POPOVER": {
+       "TITLE": "Importo bloccata",
+       "DESCRIPTION": "Ecco le condizioni per sbloccare questo importo:",
+       "DESCRIPTION_MANY": "Questa transazione è fatta da diverse parti, di cui queste sono le condizioni di sblocco:",
+       "LOCKED_AMOUNT": "Condizioni per l'importo:"
+     },
+     "NEW": {
+       "TITLE": "Registrazione",
+       "INTRO_WARNING_TIME": "Crearsi un conto su {{name|capitalize}} è molto semplice. E consigliato prendere il giusto tempo per farlo correttamente (per evitare di dimenticare passwords, pseudonimi etc.).",
+       "INTRO_WARNING_SECURITY": "Occorre verificare che il hardware che stai utilizzando (computer, tablet, cellulare) <b>è sicuro e affidabile</b>.",
+       "INTRO_WARNING_SECURITY_HELP": "Anti-virus aggiornato, firewall abilitato, session protteta da un password o codice PIN...",
+       "INTRO_HELP": "Cliccare <b> {{'COMMON.BTN_START'|translate}}</b> per avviare la creazione del conto. Ti accompagniamo passo alla volta.",
+       "REGISTRATION_NODE": "Tua iscrizione verrà salvata dal nodo peer Duniter <b>{{server}}</b>, è verrà poi condivisa nella rete della moneta.",
+       "REGISTRATION_NODE_HELP": "Se non ti fidi di questo peer, per favore cambialo <a ng-click=\"doQuickFix('settings')\">nelle impostazioni/a> di Cesium.",
+       "SELECT_ACCOUNT_TYPE": "Scegliere un tipo di conto:",
+       "MEMBER_ACCOUNT": "Conto membro",
+       "MEMBER_ACCOUNT_TITLE": "Creare un conto membro",
+       "MEMBER_ACCOUNT_HELP": "Se non sei ancora registrato come individuo (un conto a persona soltanto).",
+       "WALLET_ACCOUNT": "Semplice portafoglio",
+       "WALLET_ACCOUNT_TITLE": "Creare un portafoglio",
+       "WALLET_ACCOUNT_HELP": "Se rappresenti un'azienda, associazione, altra ente o hai necessita di un altro portafoglio. Nessun Dividendo Universale sarà prodotto da questo conto.",
+       "SALT_WARNING": "Scegliere un identificativo segreto.<br/>E necessario per ogni connessione a questo conto.<br/><br/><b>Accertati di ricordarlo!</b>.<br/>Se lo dimentichi non ti potrà aiutare nessuno!",
+       "PASSWORD_WARNING": "Scegliere una password.<br/>E necessario per ogni connessione a questo conto.<br/><br/><b>Accertati di ricordarla!</b>.<br/>Se la dimentichi non ti potrà aiutare nessuno!",
+       "PSEUDO_WARNING": "Segliere uno pseudonimo.<br/>Puo essere utile per chi ti cerca nella rete.<br/><br/>.L'utilizzo delle<b>virgole, spazi e accenti</b> è vietato.<br/><div class='hidden-xs'><br/>Esempio: <span class='gray'>JohnDalton, JackieChan, etc.</span>",
+       "PSEUDO": "Pseudonimo",
+       "PSEUDO_HELP": "joe123",
+       "SALT_CONFIRM": "Confermare",
+       "SALT_CONFIRM_HELP": "Confermare l'identificativo segreto",
+       "PASSWORD_CONFIRM": "Confermare",
+       "PASSWORD_CONFIRM_HELP": "Confermare la password",
+       "SLIDE_6_TITLE": "Conferma:",
+       "COMPUTING_PUBKEY": "Calcolando...",
+       "LAST_SLIDE_CONGRATULATION": "Hai riempito tutti i campi richiesti.<br/><b>Puoi inviare la richiesta di creazione del conto</b>.<br/><br/>Per tua informazione, la chiave pubblica qui sotto identifica il tuo futuro conto.<br/>Puo essere communicata a chi ti deve pagare per esempio.<br/>Quando tuo conto verrà approvato potrai trovare la chiave qui <b>{{'ACCOUNT.TITLE'|translate}}</b>.",
+       "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> tuo identificare segreto, tua password e tuo pseudonimo non si possono cambiare.<br/><b>Ricordali per sempre!</b><br/><b>Sei sicuro/a</b>di voler inviare questa richiesta di creazione di conto?",
+       "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> tuo identificare segreto, tua password e tuo pseudonimo non si possono cambiare..<br/><b>Ricordali per sempre!</b><br/><b>Sei sicuro/a</b> di voler continuare?",
+       "CHECKING_PSEUDO": "Verificazione in corso...",
+       "PSEUDO_AVAILABLE": "Pseudonimo disponibile",
+       "PSEUDO_NOT_AVAILABLE": "Pseudonimo indisponibile",
+       "INFO_LICENSE": "TPer aderire alla moneta, ti chiediamo di leggere e accetare le condizioni della licenza.",
+       "BTN_ACCEPT": "Accetto",
+       "BTN_ACCEPT_LICENSE": "Accetto la licenza"
+     },
+     "POPUP_REGISTER": {
+       "TITLE": "Pseudonimo",
+       "HELP": "Un pseudonimo è necessario per che gli altri ti possino trovare."
+     },
+     "SELECT_IDENTITY_MODAL": {
+      "TITLE": "Selezionare una identità",
+      "HELP": "Più <b>identità diverse</b> sono state inviate per la chiave pubblica <span class=\"gray\"><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</span>.<br/>Seleziona un dossier da usare :"
+    },
+     "SELECT_WALLET_MODAL": {
+       "TITLE": "Selezione del portafoglio"
+     },
+     "WALLET_LIST": {
+       "TITLE": "Portafoglio secondario",
+       "BTN_NEW": "Aggiungi un portfolio",
+       "NO_WALLET": "Nessun portafoglio secondario",
+       "BTN_DELETE": "Rimuovi un portafoglio secondario ...",
+       "BTN_RENAME": "Rinominare il portafoglio",
+       "EDIT_POPOVER": {
+         "TITLE": "Rinominare il portafoglio",
+         "HELP": "Compila il nuovo nome",
+         "NAME_HELP": "Nome del portafoglio"
+       }
+     },
+     "SECURITY":{
+       "ADD_QUESTION" : "Aggiungere domanda personalizzata",
+       "BTN_CLEAN" : "Svuotare",
+       "BTN_RESET" : "Reset",
+       "DOWNLOAD_REVOKE": "Salvare un file di revoca",
+       "DOWNLOAD_REVOKE_HELP" : "Avere une file di revoca è necessario in caso di smarrimento dei tuoi credenziali. Ti permette <b> di rimuovere tuo conto dalla Web Of Trust</b>, per farlo tornare ad essere un semplice portafoglio.",
+       "HELP_LEVEL": "Scegliere <strong> almeno{{nb}} domande </strong> :",
+       "LEVEL": "Livello di sicurezza",
+       "LOW_LEVEL": "Basso <span class=\"hidden-xs\">(minimo di 2 domande)</span>",
+       "MEDIUM_LEVEL": "Medio <span class=\"hidden-xs\">(minimo di 4 domande)</span>",
+       "QUESTION_1": "Qual'era il nome del tuo miglior amico quando eri adolescente ?",
+       "QUESTION_2": "Qual'era il nome del tuo primo animale domestico?",
+       "QUESTION_3": "Qual'è il primo piatto che imparasti a cucinare?",
+       "QUESTION_4": "Qual'è il primo film che hai visto al cinema?",
+       "QUESTION_5": "Qual'era la destinazione del tuo primo volo?",
+       "QUESTION_6": "Qual'era il nome del tuo professore preferito in scuola ?",
+       "QUESTION_7": "Quale sarebbe il tuo lavoro preferito?",
+       "QUESTION_8": "Qual'è il tuo libro per bimbi preferito?",
+       "QUESTION_9": "Qual'era il marchio della tua prima macchina?",
+       "QUESTION_10": "Qual'era il tuo nomignolo da ragazzino/a ?",
+       "QUESTION_11": "Qual'era il tuo personaggio di film o attore preferito quand eri studente?",
+       "QUESTION_12": "Qual'era il tuo musicista/cantante/grupo preferito quand eri studente ?",
+       "QUESTION_13": "In che città si sono conosciuti tuoi genitori ?",
+       "QUESTION_14": "Qual'era il nome del tuo primo capo ?",
+       "QUESTION_15": "Qual'è il nome della strada dove sei cresciuto/a ?",
+       "QUESTION_16": "Qual'è il nome della tua spiaggia preferita ?",
+       "QUESTION_17": "Qual'è il primo album che ti sei comprato ?",
+       "QUESTION_18": "Qual'è il nome della squadra di sport preferita ?",
+       "QUESTION_19": "Cosa faceva tuo nonno ?",
+       "RECOVER_ID": "Ricuperare mia password...",
+       "RECOVER_ID_HELP": "Se hai un<b<file di backup dei tuoi credenziali</b>, li puoi trovare rispondendo correttamente alle tue domande personalizzate.",
+       "REVOCATION_WITH_FILE" : "Revocare il mio conto membro...",
+      "REVOCATION_WITH_FILE_DESCRIPTION": "Se pensi di aver perso <b>definitivamente tuoi credenziali</b> di conto membro (o che la sicurezza del tuo conto è compromessa), puoi usare <b>il file di revoca</b> del conto <b>per forzare la sua uscita permanente dalla Tela di Fiducia</b>.",
+       "REVOCATION_WITH_FILE_HELP": "Se hai <b>definitivamente perso tuoi credenziali (o se la sicurezza del tuo conto è compromessa), puoi usare <b>il file di revoca</b> del conto <b>per uscire dalla Web Of Trust</b>.",
+       "REVOCATION_WALLET": "Revocare questo conto subito",
+       "REVOCATION_WALLET_HELP": "Richiedere la cancellazione dell'identità <b>revocherà la tua adesione alla tua rete</ b> (con certezza per il pseudonimo e la chiave pubblica associata). Il conto non potrà più produrre il Dividendo Universale.<br/>Nonostante ciò, puoi ancora usare il conto come semplice portafoglio.",
+       "REVOCATION_FILENAME": "revocation-{{uid}}-{{pubkey|formatPubkey}}-{{currency}}.txt",
+       "SAVE_ID": "Salvare miei credenziali...",
+       "SAVE_ID_HELP": "Creare un file di backup, per <b>ricuperare vostra password</b> (e l'identificativo segreto) <b> in caso di smarrimento</b>. Il file è <b>sicuro</ b> (cryptato) utilizzando le domande personalizzate.",
+       "STRONG_LEVEL": "Alto <span class=\"hidden-xs \">(minimo di 6 domande)</span>",
+       "TITLE": "Conto e sicurezza"
+     },
+     "FILE_NAME": "{{currency}} - Account statement {{pubkey|formatPubkey}} to {{currentTime|formatDateForFile}}.csv",
+     "HEADERS": {
+       "TIME": "Date",
+       "AMOUNT": "Amount",
+       "COMMENT": "Comment"
+     }
+   },
+   "TRANSFER": {
+     "TITLE": "Bonifico",
+     "SUB_TITLE": "Fare un bonifico",
+     "FROM": "Da",
+     "TO": "A",
+     "AMOUNT": "Importo",
+     "AMOUNT_HELP": "Importo",
+     "COMMENT": "Commenti",
+     "COMMENT_HELP": "Commenti",
+     "BTN_SEND": "Inviare",
+     "BTN_ADD_COMMENT": "Scrivere un comento ?",
+     "WARN_COMMENT_IS_PUBLIC": "Ti avvertiamo <b>che i commenti sono pubblici</b> (non cifrati).",
+     "MODAL": {
+       "TITLE": "Bonifico"
+     }
+   },
+   "ERROR": {
+     "POPUP_TITLE": "Errore",
+     "UNKNOWN_ERROR": "Errore",
+     "CRYPTO_UNKNOWN_ERROR": "Suo navigatore non sembra compatibile con le funzionalità di cryptografia.",
+     "EQUALS_TO_PSEUDO": "Deve essere diverso dal pseudonimo",
+     "EQUALS_TO_SALT": "Deve essere diverso dal identificativo segreto",
+     "FIELD_REQUIRED": "Campo obbligatorio.",
+     "FIELD_TOO_SHORT": "Valore troppo corto.",
+     "FIELD_TOO_SHORT_WITH_LENGTH": "Valore troppo corto ({{minLength}} caratteri min)",
+     "FIELD_TOO_LONG": "Valore troppo lungo",
+     "FIELD_TOO_LONG_WITH_LENGTH": "Valore troppo lungo ({{maxLength}} caractteri max)",
+     "FIELD_MIN": "Valore minimo : {{min}}",
+     "FIELD_MAX": "Valore massimo : {{max}}",
+     "FIELD_ACCENT": "Virgole e caratteri accentati vietati",
+     "FIELD_NOT_NUMBER": "Valore numerico atteso",
+     "FIELD_NOT_INT": "Valore intero atteso",
+     "FIELD_NOT_EMAIL": "Indirizzo mail non valido",
+     "PASSWORD_NOT_CONFIRMED": "Non corrisponde alla password.",
+     "SALT_NOT_CONFIRMED": "Non corrisponde al identificativo segreto.",
+     "SEND_IDENTITY_FAILED": "Iscrizione fallita.",
+     "SEND_CERTIFICATION_FAILED": "Certificazione fallita.",
+     "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "Non puoi inviare certificazioni perche tuo conto <b>non è ancora un conto membro</b>.",
+     "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "Non puoi inviare certificazioni adesso perche <b>non sei ancora membro</b>.<br/><br/>Devi ancora entrare nella WOT.",
+     "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "Impossibile certificare questo conto. Nessuna richiesta di certificazione trovata o bisogna rinnovarla.",
+     "LOGIN_FAILED": "Errore di login.",
+     "LOAD_IDENTITY_FAILED": "Impossibile caricare la tua identità.",
+     "LOAD_REQUIREMENTS_FAILED": "Impossibile caricare i prerequisiti dell'identità.",
+     "SEND_MEMBERSHIP_IN_FAILED": "Ingresso nella WOT fallito.",
+     "SEND_MEMBERSHIP_OUT_FAILED": "Errore nel invio della revocazione.",
+     "REFRESH_WALLET_DATA": "Impossibile aggiornare il portafoglio.",
+     "GET_CURRENCY_PARAMETER": "Impossibile ricuperare i parametri della moneta.",
+     "GET_CURRENCY_FAILED": "Impossibile caricare la moneta. Riprovare più tardi.",
+     "SEND_TX_FAILED": "Impossibile eseguire la transazione.",
+     "ALL_SOURCES_USED": "Per favore aspetta il calcolo del prossimo blocco (Tutte le tue fonti di moneta sono state utilizzate).",
+     "NOT_ENOUGH_SOURCES": "Non hai abbastanza cambio per inviare questo importo in una sola transazione.<br/>Importo massimo: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+     "ACCOUNT_CREATION_FAILED": "Errore nella creazione del tuo conto membro.",
+     "RESTORE_WALLET_DATA_ERROR": "Errore nel aggiornamento delle impostazioni definite in local storage.",
+     "LOAD_WALLET_DATA_ERROR": "Errore nel caricamento dei dati del portafoglio.",
+     "COPY_CLIPBOARD_FAILED": "Impossibile copiare al clipboard",
+     "TAKE_PICTURE_FAILED": "Impossibile ricuperare foto.",
+     "SCAN_FAILED": "Impossibile scansionare il codice QR.",
+     "SCAN_UNKNOWN_FORMAT": "Codice non riconosciuto.",
+     "WOT_LOOKUP_FAILED": "Ricerca fallita.",
+     "LOAD_PEER_DATA_FAILED": "Peer Duniter non accessibile. Riprovare più tardi.",
+     "NEED_LOGIN_FIRST": "Accedi al tuo conto prima.",
+     "AMOUNT_REQUIRED": "Importo necessario.",
+     "AMOUNT_NEGATIVE": "Importo negativo non consentito.",
+     "NOT_ENOUGH_CREDIT": "Saldo insufficiente",
+     "INVALID_NODE_SUMMARY": "Impossibile comunicare col peer o indirizzo non valido",
+     "INVALID_USER_ID": "Il campo del 'pseudonimo' non deve avere spazi vuoti o caratteri speciali.",
+     "INVALID_COMMENT": "Il formato del campo 'reference' è errato.",
+     "INVALID_PUBKEY": "If formato della chiave pubblica è errato.",
+     "IDENTITY_REVOKED": "Questa identità <b>è stata revocata</b>. Non puo più diventare membro.",
+     "IDENTITY_REVOKED_WITH_TIME": "Questa identità <b>è stata revocata {{revocationTime|medianFromNow}}</b> ({{revocationTime|medianDate}}). Non puo più diventare membro.",
+     "IDENTITY_PENDING_REVOCATION": "L'<b>annulamento di questa identità</b> è stata richiesta ed è in corso di evaluazione. Capacità ad inviare certificazioni disabilitata",
+     "IDENTITY_INVALID_BLOCK_HASH": "Questa richiesta di certificazione non è più valida (perche si riferisce ad un blocco che è stato eliminato dai peers): la persona deve rinnovare la sua domanda di certificazione <b>prima</b> di essere certificata.",
+     "IDENTITY_EXPIRED": "Questa identità è scaduta: la persona deve fare una nuova domanda di certificazione <b>prima di</b> essere certificata.",
+     "IDENTITY_SANDBOX_FULL": "Il nodo Duniter utilizzato da Cesium non puo ricevere altre domande di certificazione per ora, la lista d'attesa è piena.<br/><br/>Riprova più tardi o scegli un'altro peer Duniter (nelle <b>Impostazioni</b>).",
+     "IDENTITY_NOT_FOUND": "Identità non trovata",
+     "IDENTITY_TX_FAILED": "Impossibile caricare le operazioni",
+     "WOT_PENDING_INVALID_BLOCK_HASH": "Adesione non valida.",
+     "WALLET_INVALID_BLOCK_HASH": "Tua domanda di certificazione non è più valida (perche si riferisce ad un blocco che è stato eliminato dai peers).<br/>Devi <a ng-click=\"doQuickFix('renew')\">rinnvoare la tua richiesta di adesione alla WOT</a> per risolvere il problema.",
+     "WALLET_IDENTITY_EXPIRED": "La pubblicazione della tua identità <b>è scaduta</b>.<br/>Devi <a ng-click=\"doQuickFix('fixIdentity')\">ripubblicare la tua identità</a> per risolvere il problema.",
+     "WALLET_REVOKED": "La tua identità è stata <b>revocata</b>: ne tuo pseudonimo ne tua chiave pubblica sarano utilizzati in futuro.",
+     "WALLET_HAS_NO_SELF": "La tua identità deve prima essere stata pubblicata e non essere ancora scaduta.",
+     "AUTH_REQUIRED": "Autenticazione necessaria.",
+     "AUTH_INVALID_PUBKEY": "La chiave pubblica non corrisponde al conto conesso.",
+     "AUTH_INVALID_SCRYPT": "Password o nome di utente non valido.",
+     "AUTH_INVALID_FILE": "File di portachiavi non valido.",
+     "AUTH_FILE_ERROR": "Impossibile aprire il file di portachiavi",
+     "IDENTITY_ALREADY_CERTIFY": "Hai <b>già certificato</b> questa identità.<br/><br/>Tuo certificato è ancora valido (scade {{expiresIn|formatDuration}}).",
+     "IDENTITY_ALREADY_CERTIFY_PENDING": "Hai <b>già certificato</b> questa identità.<br/><br/>Tua certificazione è ancora pendente (Scadenza del periodo di  treatment {{expiresIn|formatDuration}}).",
+     "UNABLE_TO_CERTIFY_TITLE": "Impossibile certificare",
+     "LOAD_NEWCOMERS_FAILED": "Impossibile caricare i nuovi membri.",
+     "LOAD_PENDING_FAILED": "Impossibile caricare le certificazioni pendenti.",
+     "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Devi <b>essere membro</b> per poter fare questo.",
+     "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Devi aver <b>publiccato tua identità</b> per poter fare questo.",
+     "GET_BLOCK_FAILED": "Impossibile caricare il blocco",
+     "INVALID_BLOCK_HASH": "Blocco non trovato (hash errato)",
+     "DOWNLOAD_REVOCATION_FAILED": "Errore avvenuto nel download del file di cancellazione d'identità.",
+     "REVOCATION_FAILED": "Errore avvenuto durante la richiesta di cancellazione dell'identità.",
+     "SALT_OR_PASSWORD_NOT_CONFIRMED": "identificativo segreto o password sbagliati",
+     "RECOVER_ID_FAILED": "Impossibile ricuperare la password",
+     "LOAD_FILE_FAILED" : "Impossibile caricare il file",
+     "NOT_VALID_REVOCATION_FILE": "File di cancellazione dell'identità errato (formato di file incorreto)",
+     "NOT_VALID_SAVE_ID_FILE": "File di backup dei credenziali errato (formato di file incorreto)",
+     "NOT_VALID_KEY_FILE": "File di portachiavi non valido (formato non riconosciuto)",
+     "EXISTING_ACCOUNT": "Tuoi credenziali corrispondono a quelli di un conto già esistente,di cui <a ng-click=\"showHelpModal('pubkey')\">la chiave pubblica</a> è:",
+     "EXISTING_ACCOUNT_REQUEST": "Per favore cambi tuoi credenziali in modo che corrispondino ad un conto non utilizzato.",
+     "GET_LICENSE_FILE_FAILED": "Impossibile caricare il file della licenza",
+     "CHECK_NETWORK_CONNECTION": "Nessun peer sembra disponibile.<br/><br/>Per favore <b>verifica la tua connessione Internet</b>.",
+     "ISSUE_524_TX_FAILED": "Bonifico .<br/><br/>Un message a été envoyé aux développeurs pour faciliter la résolution du problème. <b>Merci de votre aide</b>."
+    },
+   "INFO": {
+     "POPUP_TITLE": "Informazioni",
+     "CERTIFICATION_DONE": "Identità firmata con successo",
+     "NOT_ENOUGH_CREDIT": "Saldo insufficiente",
+     "TRANSFER_SENT": "Transazione inviata con successo",
+     "COPY_TO_CLIPBOARD_DONE": "Copiato con successo",
+     "MEMBERSHIP_OUT_SENT": "Revoca dell'identità inviata",
+     "NOT_NEED_MEMBERSHIP": "Già un membro.",
+     "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Questa identità mancherà a breve di certificazioni (almeno {{willNeedCertificationCount}}).",
+     "REVOCATION_SENT": "Revoca dell'identità inviata",
+     "REVOCATION_SENT_WAITING_PROCESS": "Cancellazione dell'identità <b>inviata con successo</b>. In attesa di validazione.",
+     "FEATURES_NOT_IMPLEMENTED": "Questa funzionalità non è ancora disponibile.<br/><br/>Vuoi contribuire per velocizzarne la disponibilità? ;)",
+     "EMPTY_TX_HISTORY": "Nessuna operazione da esportare"
+   },
+   "CONFIRM": {
+     "POPUP_TITLE": "<b>Conferma</b>",
+     "POPUP_WARNING_TITLE": "<b>Avviso</b>",
+     "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Avvertimento di sicurezza</b>",
+     "CERTIFY_RULES_TITLE_UID": "Certificare {{uid}}",
+     "CERTIFY_RULES": "<b class=\"assertive\">Non certificare un conto</b> se credi che: <ul><li>1.) l'identità della persona potrebbe essere finta.<li>2.) la oersona ha già un conto certicato.<li>3.) la persona trasgredisce la regola 1 o 2 o entrambe. (Certifica conti finti o gemelli).</ul></small><br/>Sei sicuro/a di voler certificare questa identità?",
+     "TRANSFER": "<b>Resoconto del bonifico:</b><br/><br/><ul><li> - Inviato da: <b>{{from}}</b></li><li> - A: <b>{{to}}</b></li><li> - Importo: <b>{{amount}} {{unit}}</b></li><li> - Comento: <i>{{comment}}</i></li></ul><br/><b>Sei sicuro di voler procedere con questo bonifico?</b>",
+     "MEMBERSHIP_OUT": "Questa operazione è <b>irreversibile</b>.<br/></br/><b>Sei sicuro/a di voler cancellare la tua presenza nella WOT?</b>",
+     "MEMBERSHIP_OUT_2": "Questa operazione è <b>irreversibile</b>!<br/><br/>Sei sicuro/a <b>di voler revocare la tua identità</b>?",
+     "LOGIN_UNUSED_WALLET_TITLE": "Errore di battitura?",
+     "LOGIN_UNUSED_WALLET": "Il conto sembra <b>inattivo</b>.<br/><br/>Probabilmente è un<b>errore di battitura</b> mientre digitavi i tuoi credenziali. Per favore riprova, verificando che la <b>chiave pubblica sia tua<b/>.",
+     "FIX_IDENTITY": "Lo pseudonimo <b>{{uid}}</b> verrà pubblicato nuovamente. Si sostituirà alla precedente pubblicazione che è scaduta.<br/></br/><b>Sei sicuro/a</b> di voler procedere?",
+     "FIX_MEMBERSHIP": "Tua domanda di certificazione sarà inviata alla rete.<br/></br/><b>Sei sicuro/a?</b>",
+     "MEMBERSHIP": "Tua domanda per diventare membro sta per essere inviata alla rete.<br/></br/><b>Sei sicuro/a/b> di voler continuare ?",
+     "RENEW_MEMBERSHIP": "Tua adesione verrà rinnovata.<br/></br/><b>Sei sicuro/a?</b>",
+     "REVOKE_IDENTITY": "Stai per <b>revocare definitivamente questa identità</b>.<br/><br/>La chiave pubblica e lo pseudonimo associato <b>non saranno mai più utilizzati</b> (per un conto membro).<br/></br/><b>Sei sicuro/a</b> di voler revocare questa identità?",
+     "REVOKE_IDENTITY_2": "Questa operazione è <b>irreversibile</b>!<br/><br/>Sei sicuro/a di volern<b>revocare questa identità</b>?",
+     "NOT_NEED_RENEW_MEMBERSHIP": "Tua presenza nella rete non deve ancora essere rinnovata (scaderà tra {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Sei sicuro/a</b> di voler rinnovare la tua presenza?",
+     "SAVE_BEFORE_LEAVE": "Vuoi <b>salvare tue modifiche</b> prima di uscira dalla pagina?",
+     "SAVE_BEFORE_LEAVE_TITLE": "Modifiche non salvate",
+     "LOGOUT": "Sei sicuro/a di voler chiudere la sessione?",
+     "USE_FALLBACK_NODE": "Peer <b>{{old}}</b> indisponibile o indirizzo errato.<br/><br/>Vuoi utilizzare temporanemante il <b>{{new}}</b> nodo?",
+     "INVALID_FILE_FORMAT": "Formato file non valido.",
+     "SAME_TX_RECIPIENT": "Il destinatario deve essere diverso dall'emittente."
+    },
+   "DOWNLOAD": {
+     "POPUP_TITLE": "<b>File di cancellazione dell'identità/b>",
+     "POPUP_REVOKE_MESSAGE": "Per migliorare la sicurezza del tuo conto, scarica <b>il documento di revoca del conto</b>. Ti consentirà di revocare tuo conto (nel caso di violazione del conto, della tua identità, conto creato con errori, etc.).<br/><br/><b>Tiene questo document al sicuro.</b>"
+   },
+   "HELP": {
+     "TITLE": "Aiuto online",
+     "JOIN": {
+       "SECTION": "Entrare nella rete",
+       "SALT": "Il tuo identificativo segreto è molto importante. E utilizzato per cryptare tua password che permette poi di calcolare tua <span class=\"text-italic\">chiave pubblica</span> (suo numero) è la chiave privata che ne consenta l'accesso.<br/><b>Ricordati bene di questo identificativo</b>, perche non ti potrà aiutare nessuno se lo perdi.<br/>Tra l'altro, non puo essere cambiato senza dover creare un conto nuovo.<br/><br/>Raccomandiamo che sia abbastanza lungo (8 caratteri almeno) è il più originale possibile. (buona entropia)",
+       "PASSWORD": "La password è molto importante, è utilizzata per calcolare tuo numero di conto (tua chiave pubblica) e la chiave privata che ne consento l'accesso.<br/><b>Ricordatila bene</b>, perche non ti potrà aiutare nessuno se lo perdi.<br/>Tra l'altro, non puo essere cambiata senza dover creare un conto nuovo.<br/><br/>Una buona password (preferibilmente) è composta da almeno 8 caratteri, con almeno una maiuscola e un numero.",
+       "PSEUDO": "Un pseudonimo è utilizzato quando ti iscrivi come <span class=\"text-italic\">membro</span>. E sempre associato ad un portafoglio (con sua <span class=\"text-italic\">chiave pubblica</span>).<br/>E pubblicato sulla rete perche gli altri membri possino identificarla, certificarla o invarle soldi. <br/> Lo pseudonimo deve essere unico nella rete (tra quelli utilizzati adesso e in passato)."
+     },
+     "LOGIN": {
+       "SECTION": "Accedi",
+       "PUBKEY": "Chiave pubblica del conto",
+       "PUBKEY_DEF": "La chiave pubblica del portachiavi è generata dai credenziali, ma non corrispode ad un conto già utilizzato.<br/><b>Accertati che tua chiave pubblica corrisponda al tuo conto</b>. Nel caso contrario, sarai conesso/a ad un conto probabilmente mai usato, datto che il rischio di collisione con un conto esistente è molto ridotto.<br/><a href=\"https://en.wikipedia.org/wiki/Elliptic_curve_cryptography\" target=\"_ system\">Saperne di più sulla cryptografia </a> con chiave pubblica.",
+       "METHOD": "Metodi di connessione",
+       "METHOD_DEF": "Hai diverse opzioni per accedere ad un portafoglio:<br/> - Accedendo con <b>salatura (leggera o sicura)</b> tua password sarà cryptata dal tuo identificativo segreto per scoraggiare tentativi di attachi di 'brute force' (per esempio con passwords conosciute).<br/> - Accedendo con la <b>chiave pubblica</b> ti evita di dover digitare tuoi credenziali che ti saranno chiesti solo quando vorrai fare una operazione col conto.<br/> - Accedendo <b>con un portachiavi</b> che leggerà tue chiave pubbliche e private da un file esterno, senza che tu li debba entrare."
+     },
+     "GLOSSARY": {
+       "SECTION": "Glossario",
+       "PUBKEY_DEF": "Una chiave pubblica permette di identificare un portafoglio. Puo anche identificare un membro. In Cesium  è calcolata con la password e lo pseudonimo.",
+       "MEMBER": "Membro",
+       "MEMBER_DEF": "Un membro è una persona reale e viva, che desidera participare liberamente alla communità monetaria. Questo membro riceverà un Dividendo Universale, a secondo delle regole definite <span class=\"text-italic\">nei parametri della moneta</span>.",
+       "CURRENCY_RULES": "Regole della moneta",
+       "CURRENCY_RULES_DEF": "I parametri delle moneta sono state definite per sempre e per tutti. I parametri con i quali la moneta si comporta: il calcolo del Dividendo Universale, il numero di certificazioni necessarie per diventare membro, il numero massimo di certificazioni che un membro puo inviare, etc.<br/><br/>I parametri non possono essere modificati perche c'è una<span class=\"text-italic\">Blockchain</span> che implementa e esegue queste regole e verifica costantemente la loro applicazione. <a href=\"#/app/currency\">Vedere i parametri </a>.",
+       "BLOCKCHAIN": "Blockchain",
+       "BLOCKCHAIN_DEF": "La Blockchain è un sistema decentralizzato che, nel caso di Duniter, permette di rispettare e implementare <span class=\"text-italic\">le regole della moneta</span>.<br/><a href=\"http://en.duniter.org/presentation/\" target=\"_blank\">Saperne di più su Duniter</a> e il funzionamento della blockchain.",
+       "UNIVERSAL_DIVIDEND_DEF": "Il Dividendo Universale (UD) è la quantità di moneta co-creata da ogni membro, seguendo le formule mathematiche definite nelle <span class=\"text-italic\">regole della moneta</span>.<br/>Al inizio di ogni periodo, il conto di ogni membro riceve una quantità uguale della nuova moneta creata. <br/><br/>Il DU conosce una crescita costante per rimanere equo nei confronti dei membri (attuali e passati). Viene calcolato tenendo in conto la speranza di vità media, cosi come dimostrato nella Teoria Relativa della Moneta (TRM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">Saperne di più sulla TRM</a> e la moneta libera."
+     },
+     "TIP": {
+       "MENU_BTN_CURRENCY": "Menu <b>{{'MENU.CURRENCY'|translate}}</b> permette la scoperta dei <b>parametri della moneta</b> e la sua condizione presente.",
+       "CURRENCY_WOT": "Il <b>numero di membri</b> mostra <b>le dimensioni della WoT e la sua evoluzione </b>.",
+       "CURRENCY_MASS": "In evidenza qui è <b>l'importo totale</b> attualmente in circolazione e la sua <b> ripartizione media </b> a testa.<br/><br/>Questa cifra permette di avere un'idea <b>del valore di qualsiasi importo</b>, in base a quello <b>hanno gli altri</b> sul loro conto (in media).",
+       "CURRENCY_UNIT_RELATIVE": "L'unità usata qui (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa che gli importi in {{currency|capitalize}} sono stati divisi dal <b>Dividendo Universale</b> (DU).<br/><br/><small>Questa unità relativa <b>ha senso</b> perche è stabile in contrasto con la massa monetaria che cresce costantemente.</small>",
+       "CURRENCY_CHANGE_UNIT": "Questa opzione <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permette di <b>permutare unità</b> per vedere gli importi in <b>{{currency|capitalize}}</b>, non divisi dal Dividendo Universale (piuttosto che in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+       "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "Questa opzione <b>{{'COMMON.BTN_RELATIVE_UNIT'|translate}}</b> permette <b>di permutare unità</b> per vedere gli importi in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, che è relativo al Dividendo Universale (l'importo co-prodotto da ogni membro).",
+       "CURRENCY_RULES": "Le<b>regole</b> della moneta determinano il suo <b>esatto e previdibile</b> comportamento.<br/><br/> Considerate come il proprio DNA della moneta, queste regole rendono il codice monetario <b>trasparente e comprensibile</b>.",
+       "MENU_BTN_NETWORK": "Menu <b>{{'MENU.NETWORK'|translate}}</b> permette la scopertà dello <b>stato della rete<b>.",
+       "NETWORK_BLOCKCHAIN": "Tutte le transazioni monetarie sono registrate in <b>registro sicuro e a prova di manomissione</b>, spesso chiamato <b>blockchain</b>.",
+       "NETWORK_PEERS": "I<b>peers</b> mostrati qui corrispondono a <b>dei computers che aggiornano e monitorano</b> la blockchain.<br/><br/>Più peers ci sono, più <b>decentralizzata</b> e più affidabile diventa la moneta.",
+       "NETWORK_PEERS_BLOCK_NUMBER": "Questo <b>numero</b> (in verda) indica <b>l'ultimo blocco validato</b> dal peer (ultima pagina scritta nel regitro).<br/><br/>Il verda indica che il blocco è stato validato anche dalla <b>maggioranza degli altri peers</b>.",
+       "NETWORK_PEERS_PARTICIPATE": "<b>Ogni membro</b>, che dispone di un computer connesso a Internet <b>puo partecipare, aggiungendosi come peer installando il software Duniter</b> (free/libre). <a target=\"_new\" href=\"{{installDocUrl}}\" target=\"_system\">Leggi il manuale d'installazione &gt;&gt;</a>.",
+       "MENU_BTN_ACCOUNT": "<b>{{'ACCOUNT.TITLE'|translate}}</b> permette l'accesso al saldo del conto e la cronologia delle transazioni.",
+       "MENU_BTN_ACCOUNT_MEMBER": "Qui puoi consultare lo stato del tuo conto, la cronologia delle transazioni e le tue certificazioni.",
+       "WALLET_CERTIFICATIONS": "Clicca qui per vedere i dettagli delle tue certificazioni (date o ricevute).",
+       "WALLET_RECEIVED_CERTIFICATIONS": "Clicca qui per vedere i dettagli delle <b>certificazioni che hai ricevuto</b>.",
+       "WALLET_GIVEN_CERTIFICATIONS": "Clicca qui per vedere i dettagli delle <b>certificazioni che hai date</b>.",
+       "WALLET_BALANCE": "Il <b>soldo</b> del tuo conto è visibile qui.",
+       "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>L'unità utilizzata (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) significa che questo importo in {{currency|capitalize}} è stato diviso dal <b>Dividendo Universale</b> (DU) co-creato da ogni membro.<br/>Ad oggi, 1 DU equivale a {{currentUD}} {{currency|capitalize}}.",
+       "WALLET_BALANCE_CHANGE_UNIT": "Puoi <b>cambiare l'unità</b> in cui sono mostrati gli importi in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>Per esempio, per mostrare gli importi <b>direttamente in {{currency|capitalize}}</b> piuttosto che in unità relativa.",
+       "WALLET_PUBKEY": "Questa è la chiave pubblica del tuo conto. La puoi dare ad un terzo perche possa identificare tuo conto.",
+       "WALLET_SEND": "Paghi in pochi clics.",
+       "WALLET_SEND_NO_MONEY": "Paghi in pochi clics.<br/>(Tuo saldo ancora non lo permette)",
+       "WALLET_OPTIONS": "Questo bottone permette di fare <b>altre, meno frequenti azioni</b>.<br/><br/> Non dimenticarti di fare il tour guidato di Cesium quando hai un attimo!",
+       "WALLET_RECEIVED_CERTS": "Questo mostra l'elenco delle persone che ti hanno fatto entrare nella WoT.",
+       "WALLET_CERTIFY": "Questo bottone <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permette di selezionare e certificare una identità.<br/><br/>Solo gli utenti <b>che sono già membri</b> possono certificare gli altri.",
+       "WALLET_CERT_STOCK": "Tuo stock di certificazioni da dare è limitato a <b>{{sigStock}} certificazioni</b>.<br/><br/>Questo stock si rifornisce col tempo, man mano che le certificazioni inviate scadono.",
+       "MENU_BTN_TX": "<b>{{'MENU.TRANSACTIONS'|translate}}</b> permette l'accesso alla cronologia delle transazioni, e permette di fare nuovi bonifici.",
+       "MENU_BTN_WOT": "Il menu<b>{{'MENU.WOT'|translate}}</b> permette di cercare <b>utenti</b> della moneta (membri o non).",
+       "WOT_SEARCH_TEXT_XS": "Per fare una ricerca nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>La ricerca inizierà automaticamente.",
+       "WOT_SEARCH_TEXT": "Per cercare nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>Dopodichè calca <b>Enter</b> per avviare la ricerca.",
+       "WOT_SEARCH_RESULT": "Visualizza la scheda dettagliata di un utente con un semplice click sulla linea.",
+       "WOT_VIEW_CERTIFICATIONS": "La linea <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> mostra quanti membri hanno certificato questa identità.<br/><br/>Queste certificazioni dimostrano che il conto appartiene ad <b>una persona viva</b> e che questa persona non ha <b>nessun altro conto membro</b>.",
+       "WOT_VIEW_CERTIFICATIONS_COUNT": "Ci vogliono almeno <b>{{sigQty}} certificazioni</b> per diventare membro e co-produrre il <b>Dividendo Universale</b>.",
+       "WOT_VIEW_CERTIFICATIONS_CLICK": "Clicca qui per aprire <b>una lista di tutte le certificazioni</b> ricevute e date da questa identità.",
+       "WOT_VIEW_CERTIFY": "Il bottone <b>{{'WOT.BTN_CERTIFY'|translate}}</b> permette di aggiungere tua certificazione a questa identità.",
+       "CERTIFY_RULES": "<b>Attenzione:</b> Certifichi <b> solo persone reali e vive</b> che non hanno nessun altro conto membro.<br/><br/>L'affidabilità della moneta dipende della vigilanza di ciascuno.",
+       "MENU_BTN_SETTINGS": "Les <b>{{'MENU.SETTINGS'|translate}}</b> ti permettono di configurare Cesium.<br/><br/>Per esempio, puoi <b>cambiare l'unità</b> in cui visualizzi la moneta.",
+       "HEADER_BAR_BTN_PROFILE": "Clicca qui per entrare nel <b>tuo profilo utente</b>",
+       "SETTINGS_CHANGE_UNIT": "Puoi cambiare <b>l'unità</b> della moneta cliccando qui.<br/><br/>- Disabilita questa opzione per vedere gli importi in {{currency|capitalize}}.<br/>- Abilita l'opzione per importi relativi in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divisi</b> dal attuale Dividendo Universale).",
+       "END_LOGIN": "Il tour guidato <b>è finito</b>.<br/><br/>Benvenuto nel <b>economia libera</b>!",
+       "END_NOT_LOGIN": "Il tour guidato <b>è finito</b>.<br/><br/>Se desideri entrare nella Web of Trust {{currency|capitalize}}, basta cliccare <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> qui sotto."
+     }
+   },
+  "API" :{
+    "COMMON": {
+      "LINK_DOC": "documentazione API",
+      "LINK_DOC_HELP": "Documentazione dello sviluppatore",
+      "LINK_STANDARD_APP": "versione classica",
+      "LINK_STANDARD_APP_HELP": "Apri la versione classica di {{'COMMON.APP_NAME'|translate}}"
+    },
+    "HOME": {
+      "TITLE": "Documentazione API {{'COMMON.APP_NAME'|translate}}",
+      "MESSAGE": "Bienvenue dans la <b>documentation de l'API</b> {{'COMMON.APP_NAME'|translate}}.<br/>Connecter vos sites web à <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> très simplement !",
+      "MESSAGE_SHORT": "Connecter vos sites à <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> très simplement !",
+      "DOC_HEADER": "Services disponibles :"
+    },
+    "TRANSFER": {
+      "TITLE": "{{'COMMON.APP_NAME'|translate}} - Paiement en ligne",
+      "TITLE_SHORT": "Pagamento online",
+      "SUMMARY": "Récapitulatif de la commande :",
+      "AMOUNT": "Montant :",
+      "NAME": "Nom :",
+      "PUBKEY": "Clé publique du destinaire :",
+      "COMMENT": "Référence de la commande :",
+      "DEMO": {
+        "SALT": "demo",
+        "PASSWORD": "demo",
+        "PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
+        "HELP": "<b>Mode démonstration</b> : Aucun paiement ne sera réellement envoyé pendant cette simulation.<br/>Veuillez utiliser les identifiants : <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
+        "BAD_CREDENTIALS": "Vérifiez votre saisie.<br/>En mode démonstration, les identifiants sont : {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
+      },
+      "INFO": {
+        "SUCCESS_REDIRECTING_WITH_NAME": "Paiement envoyé.<br/>Redirection vers <b>{{name}}</b>...",
+        "SUCCESS_REDIRECTING": "Paiement envoyé.<br/>Redirection vers le site du vendeur...",
+        "CANCEL_REDIRECTING_WITH_NAME": "Paiement annulé.<br/>Redirection vers <b>{{name}}</b>...",
+        "CANCEL_REDIRECTING": "Paiement annulé.<br/>Redirection vers le site du vendeur..."
+      },
+      "ERROR": {
+        "TRANSFER_FAILED": "Mancato pagamento"
+      }
+    },
+    "DOC": {
+      "DESCRIPTION_DIVIDER": "Descrizione",
+      "URL_DIVIDER": "Indirizzo chiamata",
+      "PARAMETERS_DIVIDER": "Impostazioni",
+      "AVAILABLE_PARAMETERS": "Ecco l'elenco dei parametri disponibili :",
+      "DEMO_DIVIDER": "Provare",
+      "DEMO_HELP": "Per provare questo servizio, clicca sul bottone qui a fianco. Il risultato apparirà qui sotto .",
+      "DEMO_RESULT": "Risultato della chiamata :",
+      "DEMO_SUCCEED": "<i class=\"icon ion-checkmark\"></i> Successo !",
+      "DEMO_CANCELLED": "<i class=\"icon ion-close\"></i> Annulato dal utente",
+      "INTEGRATE_DIVIDER": "Integrare",
+      "INTEGRATE_CODE": "Codice :",
+      "INTEGRATE_RESULT": "Previsualizzare il risultato :",
+      "INTEGRATE_PARAMETERS": "Parametri",
+      "TRANSFER": {
+        "TITLE": "Pagamenti",
+        "DESCRIPTION": "Da un sito (per es. : un sito e-commerce) si può delegare il pagamento in moneta libera a Cesium API. Per invocare l'API, basta innescare l'apertura di una pagina con questo indirizzo:",
+        "PARAM_PUBKEY": "Chiave pubblica del destinatario",
+        "PARAM_PUBKEY_HELP": "Chiave pubblica del destinatario (obliggatoria)",
+        "PARAM_AMOUNT": "Importo",
+        "PARAM_AMOUNT_HELP": "Importo della transazione (obligatorio)",
+        "PARAM_COMMENT": "Riferimento (o commento)",
+        "PARAM_COMMENT_HELP": "Riferimento o commento. Ti può aiutare per esempio a trovare tuo pagamento nella blockchain.",
+        "PARAM_NAME": "Nome (de destinatario o del sito web)",
+        "PARAM_NAME_HELP": "Nom del sito web o del destinatario chiamando l'API. Può essere un nome leggibile (\"Mio sito\"), oppure l'indirizzo http del sito (\"MioSito.com\").",
+        "PARAM_REDIRECT_URL": "Indirizzo web di redirezione",
+        "PARAM_REDIRECT_URL_HELP": "Indirizzo web (URL) di redirezione, chiamato dopo aver inviato il pagamento. Può includere le seguenti stringe, che saranno sostituite con i valori della transazione : \"{tx}\", \"{hash}\", \"{comment}\", \"{amount}\" e {pubkey}.",
+        "PARAM_CANCEL_URL": "Indirizzo web della cancellazione",
+        "PARAM_CANCEL_URL_HELP": "Indirizzo web (URL) in caso dell'annullamento del pagamento dall'utente. Può includere le seguenti stringe, che saranno sostituite dinamicamente : \"{comment}\", \"{amount}\" e {pubkey}.",
+        "EXAMPLES_HELP": "Ecco esempi di integrazione :",
+        "EXAMPLE_BUTTON": "Bottone HTML",
+        "EXAMPLE_BUTTON_DEFAULT_TEXT": "Pagare in {{currency|currencySymbol}}",
+        "EXAMPLE_BUTTON_DEFAULT_STYLE": "Stile personnalizzato",
+        "EXAMPLE_BUTTON_TEXT_HELP": "Testo del bottone",
+        "EXAMPLE_BUTTON_BG_COLOR": "Colore del fondo",
+        "EXAMPLE_BUTTON_BG_COLOR_HELP": "Per esempio: #fbc14c, black, lightgrey, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_FONT_COLOR": "Colore del testo",
+        "EXAMPLE_BUTTON_FONT_COLOR_HELP": "Esempio: black, orange, rgb(180,180,180)",
+        "EXAMPLE_BUTTON_TEXT_ICON": "Icona",
+        "EXAMPLE_BUTTON_TEXT_WIDTH": "Larghezza",
+        "EXAMPLE_BUTTON_TEXT_WIDTH_HELP": "Esempio: 200px, 50%",
+        "EXAMPLE_BUTTON_ICON_NONE": "Nessuna",
+        "EXAMPLE_BUTTON_ICON_DUNITER": "Logo Duniter",
+        "EXAMPLE_BUTTON_ICON_CESIUM": "Logo Cesium",
+        "EXAMPLE_BUTTON_ICON_G1_COLOR": "Logo Äž1",
+        "EXAMPLE_BUTTON_ICON_G1_BLACK": "Logo Äž1 (nero)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("nl-NL", {
+  "COMMON": {
+    "APP_NAME": "Cesium",
+    "APP_VERSION": "v{{version}}",
+    "APP_BUILD": "build {{build}}",
+    "PUBKEY": "Publieke sleutel",
+    "MEMBER": "Lid",
+    "BLOCK": "Blok",
+    "BTN_OK": "OK",
+    "BTN_YES": "Ja",
+    "BTN_NO": "Nee",
+    "BTN_SEND": "Verzenden",
+    "BTN_SEND_MONEY": "Verstuur geld",
+    "BTN_SEND_MONEY_SHORT": "Versturen",
+    "BTN_SAVE": "Opslaan",
+    "BTN_YES_SAVE": "Ja, opslaan",
+    "BTN_YES_CONTINUE": "Ja, doorgaan",
+    "BTN_SHOW": "Tonen",
+    "BTN_SHOW_PUBKEY": "Toon sleutel",
+    "BTN_RELATIVE_UNIT": "Gebruik relatieve eenheid",
+    "BTN_BACK": "Terug",
+    "BTN_NEXT": "Volgende",
+    "BTN_CANCEL": "Annuleer",
+    "BTN_CLOSE": "Sluit",
+    "BTN_LATER": "Later",
+    "BTN_LOGIN": "Aanmelden",
+    "BTN_LOGOUT": "Uitloggen",
+    "BTN_ADD_ACCOUNT": "Nieuwe Rekening",
+    "BTN_SHARE": "Delen",
+    "BTN_EDIT": "Bewerken",
+    "BTN_DELETE": "Wissen",
+    "BTN_ADD": "Toevoegen",
+    "BTN_SEARCH": "Zoeken",
+    "BTN_REFRESH": "Verwezenlijken",
+    "BTN_START": "Beginnen",
+    "BTN_CONTINUE": "Doorgaan",
+    "BTN_UNDERSTOOD": "Ik heb het begrepen",
+    "BTN_OPTIONS": "Opties",
+    "BTN_HELP_TOUR": "Rondleiding",
+    "BTN_HELP_TOUR_SCREEN": "Ontdek dit scherm",
+    "BTN_DOWNLOAD": "Downloaden",
+    "BTN_DOWNLOAD_ACCOUNT_STATEMENT": "Downloaden het rekeningoverzicht",
+    "BTN_MODIFY": "Bewerken",
+    "DAYS": "dagen",
+    "NO_ACCOUNT_QUESTION": "Nog geen lid? Registreer nu!",
+    "SEARCH_NO_RESULT": "Geen resultaten",
+    "LOADING": "Even geduld...",
+    "SEARCHING": "Zoeken...",
+    "FROM": "Van",
+    "TO": "Aan",
+    "COPY": "Kopieren",
+    "LANGUAGE": "Taal",
+    "UNIVERSAL_DIVIDEND": "Universeel dividend",
+    "UD": "UD",
+    "DATE_PATTERN": "DD-MM-YYYY HH:mm",
+    "DATE_FILE_PATTERN": "YYYY-MM-DD",
+    "DATE_SHORT_PATTERN": "DD-MM-YY",
+    "DATE_MONTH_YEAR_PATTERN": "MM-YYYY",
+    "EMPTY_PARENTHESIS": "(leeg)",
+    "UID": "Pseudoniem",
+    "ENABLE": "Geactiveerd",
+    "DISABLE": "Gedeactiveerd",
+    "RESULTS_LIST": "Resultaten:",
+    "RESULTS_COUNT": "{{count}} uitslagen",
+    "EXECUTION_TIME": "uitgevoerd in {{duration|formatDurationMs}}",
+    "SHOW_VALUES": "Toon waarden openlijk?",
+    "POPOVER_ACTIONS_TITLE": "Opties",
+    "POPOVER_FILTER_TITLE": "Filters",
+    "SHOW_MORE": "Toon meer",
+    "SHOW_MORE_COUNT": "(huidig limiet op {{limit}})",
+    "POPOVER_SHARE": {
+      "TITLE": "Delen",
+      "SHARE_ON_TWITTER": "Deel op Twitter",
+      "SHARE_ON_FACEBOOK": "Deel op Facebook",
+      "SHARE_ON_DIASPORA": "Deel op Diaspora*",
+      "SHARE_ON_GOOGLEPLUS": "Deel op Google+"
+    }
+  },
+  "SYSTEM": {
+    "PICTURE_CHOOSE_TYPE": "Selecteer bron:",
+    "BTN_PICTURE_GALLERY": "Gallerij",
+    "BTN_PICTURE_CAMERA": "<b>Camera</b>"
+  },
+  "MENU": {
+    "HOME": "Welkom",
+    "WOT": "Register",
+    "CURRENCY": "Valuta",
+    "CURRENCIES": "Valuta's",
+    "ACCOUNT": "Mijn rekening",
+    "SETTINGS": "Instellingen",
+    "NETWORK": "Netwerk",
+    "TRANSACTIONS": "Mijn transacties"
+  },
+  "ABOUT": {
+    "TITLE": "Over",
+    "LICENSE": "<b>Vrije</b> software (GNU AGPLv3 licentie).",
+    "CODE": "Broncode:",
+    "DEVELOPERS": "Ontwikkelaars:",
+    "FORUM": "Forum:",
+    "DEV_WARNING": "Waarschuwing",
+    "DEV_WARNING_MESSAGE": "Deze applicatie is nog in actieve onwikkeling.<br/>Meld ons elk pobleem!",
+    "DEV_WARNING_MESSAGE_SHORT": "Deze App is nog instabiel (in ontwikkeling).",
+    "REPORT_ISSUE": "Meld een probleem"
+  },
+  "HOME": {
+    "TITLE": "Cesium",
+    "WELCOME": "Welkom bij de Cesium Applicatie!",
+    "MESSAGE": "Bekijk je {{currency|abbreviate}} portefeilles in real time.",
+    "BTN_REGISTRY": "Register",
+    "BTN_CURRENCY": "Verken valuta",
+    "BTN_ABOUT": "over",
+    "BTN_HELP": "Help",
+    "REPORT_ISSUE": "Meld een probleem",
+    "NOT_YOUR_ACCOUNT_QUESTION" : "Is rekening <b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b> niet van jou?",
+    "BTN_CHANGE_ACCOUNT": "Dze rekening ontkoppelen",
+    "CONNECTION_ERROR": "Node <b>{{server}}</b> onbereikbaar of ongeldig adres.<br/><br/>Controleer de internetverbinding, of schakel knooppunt <a class=\"positive\" ng-click=\"doQuickFix('settings')\">in parameters</a>."
+  },
+  "SETTINGS": {
+    "TITLE": "Instellingen",
+    "NETWORK_SETTINGS": "Netwerk",
+    "PEER": "Duniter knooppunt adres",
+    "PEER_CHANGED_TEMPORARY": "Adres tijdelijk worden gebruikt",
+    "USE_LOCAL_STORAGE": "Lokale opslag inschakelen",
+    "USE_LOCAL_STORAGE_HELP": "Laat je instellingen opslaan",
+    "ENABLE_HELPTIP": "Contextgebonden hulp inschakelen",
+    "ENABLE_UI_EFFECTS": "Schakel visuele effecten",
+    "HISTORY_SETTINGS": "Mijn rekening",
+    "DISPLAY_UD_HISTORY": "Toon geproduceerde dividenden?",
+    "AUTHENTICATION_SETTINGS": "Authentificatie",
+    "REMEMBER_ME": "Onthoud mij",
+    "REMEMBER_ME_HELP": "Hiermee kunt u blijven altijd aangesloten (niet aanbevolen).",
+    "PLUGINS_SETTINGS": "Uitbreidingen",
+    "BTN_RESET": "Herstel standaardinstellingen",
+    "EXPERT_MODE": "Geavanceerde modus inschakelen",
+    "EXPERT_MODE_HELP": "Toon meer details",
+    "POPUP_PEER": {
+      "TITLE" : "Duniter Knooppunt",
+      "HOST" : "Adres",
+      "HOST_HELP": "Aadres: server:poort",
+      "USE_SSL" : "Secure?",
+      "USE_SSL_HELP" : "(SSL-encryptie)",
+      "BTN_SHOW_LIST" : "Lijst van knooppunten"
+    }
+  },
+  "BLOCKCHAIN": {
+    "HASH": "Hachee : {{hash}}",
+    "VIEW": {
+      "HEADER_TITLE": "Blok #{{number}}-{{hash|formatHash}}",
+      "TITLE_CURRENT": "Huidige blok",
+      "TITLE": "Blok #{{number|formatInteger}}",
+      "COMPUTED_BY": "Berekend door het knooppunt",
+      "SHOW_RAW": "Bekijk RAW-bestand",
+      "TECHNICAL_DIVIDER": "Technische informatie",
+      "VERSION": "Format versie",
+      "HASH": "Hash berekend",
+      "UNIVERSAL_DIVIDEND_HELP": "Munt gecoproduceerd door elk van de {{membersCount}} ledental",
+      "EMPTY": "Er zijn geen gegevens in dit blok",
+      "POW_MIN": "Mminimum moeilijkheid",
+      "POW_MIN_HELP": "Moeilijkheid opgelegd hash te berekenen",
+      "DATA_DIVIDER": "Gegevens",
+      "IDENTITIES_COUNT": "Nieuwe identiteiten",
+      "JOINERS_COUNT": "Nieuwe leden",
+      "ACTIVES_COUNT": "Verlengingen",
+      "ACTIVES_COUNT_HELP": "Leden die hun lidmaatschap te vernieuwen",
+      "LEAVERS_COUNT": "Verlaters",
+      "LEAVERS_COUNT_HELP": "Leden die niet langer wenst certificering",
+      "EXCLUDED_COUNT": "Uitgesloten leden",
+      "EXCLUDED_COUNT_HELP": "Oud-leden uitgesloten door niet-verlenging of gebrek aan certificeringen",
+      "REVOKED_COUNT": "Identiteiten ingetrokken",
+      "REVOKED_COUNT_HELP": "Deze rekeningen zullen niet langer leden",
+      "TX_COUNT": "Transacties",
+      "CERT_COUNT": "Certificeringen",
+      "TX_TO_HIMSELF": "Ruil deal",
+      "TX_OUTPUT_UNLOCK_CONDITIONS": "Omstandigheden van de introductie",
+      "TX_OUTPUT_OPERATOR": {
+        "AND": "en",
+        "OR": "of"
+      },
+      "TX_OUTPUT_FUNCTION": {
+        "SIG": "<b>handtekening</b> ",
+        "XHX": "<b>Wachtwoord</b>, wiens SHA256 =",
+        "CSV": "Geblokkeerd",
+        "CLTV": "Opgesloten"
+      }
+    },
+    "LOOKUP": {
+      "TITLE": "Blokken",
+      "NO_BLOCK": "Geen blok",
+      "LAST_BLOCKS": "Recente blokken :",
+      "BTN_COMPACT": "Compact"
+    }
+  },
+  "CURRENCY": {
+    "SELECT": {
+      "TITLE": "Valuta's",
+      "CURRENCIES": "Bekende valuta's",
+      "MEMBERS_COUNT": "{{membersCount}} leden"
+    },
+    "VIEW": {
+      "TITLE": "Valuta",
+      "TAB_CURRENCY": "Valuta",
+      "TAB_WOT": "Gemeenschap",
+      "TAB_NETWORK": "Netwerk",
+      "CURRENCY_NAME": "Valuta naam",
+      "MEMBERS": "Ledental",
+      "MEMBERS_VARIATION": "Variatie since {{duration | formatDuration}}",
+      "MONEY_DIVIDER": "Geld",
+      "MASS": "Monetaire massa",
+      "SHARE": "Aandeel per lid",
+      "UD": "Universeel Dividend",
+      "C_ACTUAL": "Huidige toename",
+      "MEDIAN_TIME": "Blockchain tijd",
+      "POW_MIN": "Algemene moeilijkheidsgraad",
+      "MONEY_RULES_DIVIDER": "Monetaire regels",
+      "C_RULE": "Toename",
+      "UD_RULE": "Universeel dividend (formule)",
+      "SIG_QTY_RULE": "Benodigd aantal certificaties om lid te worden",
+      "SIG_STOCK": "Maximum aantal certificaties te versturen per lid",
+      "SIG_PERIOD": "Minimum vertraging tussen 2 certificaties verzonden door één en dezelfde persoon.",
+      "SIG_WINDOW": "Maximum vertraging voor een certificatie in behandeling wordt genomen",
+      "STEP_MAX": "Maximum afstand tussen elk WoT lid en een nieuw lid.",
+      "WOT_RULES_DIVIDER": "Lidmaatschapseisen",
+      "XPERCENT":"Minimum percentage schildwachten te bereiken om de afstandsregel te respecteren"
+    }
+  },
+  "NETWORK": {
+    "VIEW": {
+      "MEDIAN_TIME": "Blockchain tijd",
+      "LOADING_PEERS": "Even geduld...",
+      "NODE_ADDRESS": "Adres :",
+      "ENDPOINTS": {
+        "BMAS": "Endpoint (SSL)",
+        "BMATOR": "Endpoint TOR",
+        "ES_USER_API": "Knoop Cesium+"
+      }
+    },
+    "INFO": {
+      "ONLY_SSL_PEERS": "Les noeuds non SSL ont un affichage dégradé, car Cesium fonctionne en mode HTTPS."
+    }
+  },
+  "PEER": {
+    "PEERS": "Knopen",
+    "SIGNED_ON_BLOCK": "Getekend op blok",
+    "MIRROR": "spiegel",
+    "CURRENT_BLOCK": "Blok #",
+    "VIEW": {
+      "TITLE": "Knoop",
+      "OWNER": "Maakt deel uit van",
+      "SHOW_RAW_PEERING": "Zie netwerkdocument",
+      "KNOWN_PEERS": "Bekende knopen :",
+      "GENERAL_DIVIDER": "Algemene informatie",
+      "ERROR": {
+        "LOADING_TOR_NODE_ERROR": "Kan knooppunt niet worden opgehaald. De wachttijd wordt overschreden.",
+        "LOADING_NODE_ERROR": "Kan knooppunt niet worden opgehaald"
+      }
+    }
+  },
+  "WOT": {
+    "SEARCH_HELP": "Zoeken (lid of publieke sleutel)",
+    "SEARCH_INIT_PHASE_WARNING": "Tijdens de pre-registratiefase, het zoeken van lopende registraties <b>kan lang</b> zijn. Dank je wel geduld...",
+    "REGISTERED_SINCE": "Registratie",
+    "REGISTERED_SINCE_BLOCK": "Geregistreerd op blok #",
+    "NO_CERTIFICATION": "Geen gevalideerde certificaties",
+    "NO_GIVEN_CERTIFICATION": "Geen uitgegeven certificaties",
+    "NOT_MEMBER_PARENTHESIS": "(niet-lid)",
+    "IDENTITY_REVOKED_PARENTHESIS": "(ingetrokken identiteit)",
+    "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(intrekking in behandeling)",
+    "EXPIRE_IN": "Verloopt",
+    "NOT_WRITTEN_EXPIRE_IN": "Uiterlijke<br/>behandeling",
+    "EXPIRED": "Verlopen",
+    "PSEUDO": "Pseudoniem",
+    "SIGNED_ON_BLOCK": "Uitgegeven op block #{{block}}",
+    "WRITTEN_ON_BLOCK": "Geschreven op block #{{block}}",
+    "GENERAL_DIVIDER": "Algemene informatie",
+    "NOT_MEMBER_ACCOUNT": "Simpele rekening (geen lid)",
+    "NOT_MEMBER_ACCOUNT_HELP": "Dit is een eenvoudige rekening, zonder dat er een aanvraag voor lidmaatschap in de wacht wordt gezet.",
+    "TECHNICAL_DIVIDER": "Technische informatie",
+    "BTN_CERTIFY": "Certificeren",
+    "BTN_YES_CERTIFY": "Ja, Certificeren",
+    "BTN_SELECT_AND_CERTIFY": "Nieuwe certificatie",
+    "ACCOUNT_OPERATIONS": "Operaties op de rekening",
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "Identiteit {{title}}"
+    },
+    "LOOKUP": {
+      "TITLE": "Register",
+      "NEWCOMERS": "Nieuwe leden:",
+      "PENDING": "Aspirant leden:",
+      "REGISTERED": "Geregistreerd {{sigDate | formatFromNow}}",
+      "MEMBER_FROM": "Lid sinds {{memberDate|medianFromNowShort}}",
+      "BTN_NEWCOMERS": "Nieuwste leden",
+      "BTN_PENDING": "Registraties in afwachting",
+      "SHOW_MORE": "Toon meer",
+      "SHOW_MORE_COUNT": "(huidige limiet op {{limit}})",
+      "NO_PENDING": "Er zijn geen registraties in afwachting gevonden.",
+      "NO_NEWCOMERS": "Er zijn geen nieuwe leden gevonden."
+    },
+    "MODAL": {
+      "TITLE": "Zoeken"
+    },
+    "CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Certificaties",
+      "SUMMARY": "Ontvangen certificaties",
+      "LIST": "Details van ontvangen certificaties",
+      "PENDING_LIST": "Certificaties in afwachting",
+      "RECEIVED": "Ontvangen certificaties",
+      "RECEIVED_BY": "Certificaties ontvanged door {{uid}}",
+      "ERROR": "Ontvangen vertificaties met fout",
+      "SENTRY_MEMBER": "Referent lid"
+    },
+    "GIVEN_CERTIFICATIONS": {
+      "TITLE": "{{uid}} - Verzonden certificaties",
+      "SUMMARY": "Verzonden certificaties",
+      "LIST": "Details van verzonden certificaties",
+      "PENDING_LIST": "Certificaties in afwachting",
+      "SENT": "Verzonden certificaties",
+      "SENT_BY": "Certificaties verzonden door {{uid}}",
+      "ERROR": "Verzonden certificaties met fout"
+    }
+  },
+  "LOGIN": {
+    "TITLE": "<i class=\"icon ion-locked\"></i> Inloggen",
+    "SALT": "Beveiligingszin",
+    "SALT_HELP": "Zin ter beveiliging van je rekening",
+    "SHOW_SALT": "Toon de beveiligingszin",
+    "PASSWORD": "Wachtwoord",
+    "PASSWORD_HELP": "Wachtwoord ter beveiliging van je rekening",
+    "NO_ACCOUNT_QUESTION": "Nog geen rekening?",
+    "CREATE_ACCOUNT": "Open een rekening",
+    "FORGOTTEN_ID": "Wachtwoord vergeten?"
+  },
+  "ACCOUNT": {
+    "TITLE": "Mijn rekening",
+    "BALANCE": "Saldo",
+    "LAST_TX": "Recente transacties",
+    "BALANCE_ACCOUNT": "Rekeningsaldo",
+    "NO_TX": "Geen transacties",
+    "SHOW_MORE_TX": "Show more",
+    "SHOW_ALL_TX": "Show all",
+    "TX_FROM_DATE": "(huidige limiet op {{fromTime|medianFromNowShort}})",
+    "PENDING_TX": "Transacties in afwachting",
+    "ERROR_TX": "Niet uitgevoerde transacties",
+    "ERROR_TX_SENT": "Verzonden transacties",
+    "ERROR_TX_RECEIVED": "Ontvangen transacties",
+    "EVENTS": "Gebeurtenissen",
+    "WAITING_MEMBERSHIP": "Lidmaatschapsverzoek verzonden. In afwachting van validatie.",
+    "WAITING_CERTIFICATIONS": "Je hebt {{needCertificationCount}} certificatie(s) nodig om lid te worden",
+    "WILL_MISSING_CERTIFICATIONS": "Je heeft binnenkort <b>onvoldoende certificaties</b> (ten minste {{willNeedCertificationCount}} benodigd)",
+    "WILL_NEED_RENEW_MEMBERSHIP": "Je lidmaatschap <b>gaat verlopen op {{membershipExpiresIn|formatDurationTo}}</b>. Vergeet niet <a ng-click=\"doQuickFix('renew')\">je lidmaatschap te vernieuwen</a> voor die tijd.",
+    "CERTIFICATION_COUNT": "Aantal certificaties",
+    "CERTIFICATION_COUNT_SHORT": "Certificaties",
+    "SIG_STOCK": "Voorraad uit te geven certificaties",
+    "BTN_RECEIVE_MONEY": "Ontvangen",
+    "BTN_MEMBERSHIP_IN_DOTS": "Lidmaatschap aanvragen...",
+    "BTN_MEMBERSHIP_RENEW": "Lidmaatschap verlengen",
+    "BTN_MEMBERSHIP_RENEW_DOTS": "Lidmaatschap verlengen...",
+    "BTN_MEMBERSHIP_OUT_DOTS": "Lidmaatschap opzeggen...",
+    "BTN_SEND_IDENTITY_DOTS": "Identiteit publiceren...",
+    "BTN_SECURITY_DOTS": "Rekening en veiligheid...",
+    "BTN_SHOW_DETAILS": "Tonen technische informatie",
+    "BTN_REVOKE": "Deze identiteit<span class='hidden-xs hidden-sm'> definitief</span> opzeggen...",
+    "NEW": {
+      "TITLE": "Registratie",
+      "SLIDE_1_TITLE": "Selecteer een valuta:",
+      "SLIDE_2_TITLE": "Soort rekening:",
+      "MEMBER_ACCOUNT": "Persoonlijke rekening (lidmaatschap)",
+      "MEMBER_ACCOUNT_HELP": "Als je nog niet als individu geregistreerd bent (één rekening per individu mogelijk).",
+      "WALLET_ACCOUNT": "Eenvoudige portefeille",
+      "WALLET_ACCOUNT_HELP": "Als je een onderneming, stichting etc. vertegenwoordigd of eenvoudigweg een additionele portefeille nodig hebt. Geen individueel universeel dividend zal door deze rekening gecréeerd worden.",
+      "SALT_WARNING": "Kies een beveiligingszin.<br/>Deze heb je nodig voor ieder verbinding met je rekening.<br/><br/><b>Zorg dat je deze zin goed onthoud</b>.<br/>Eenmaal verloren, is er geen mogelijkheid om hem te achterhalen!",
+      "PASSWORD_WARNING": "Kies een wachtwoord.<br/>Deze heb je nodig voor ieder verbinding met je rekening.<br/><br/><b>Zorg dat je dit woord goed onthoud</b>.<br/>Eenmaal verloren, is er geen mogelijkheid om hem te achterhalen!",
+      "PSEUDO_WARNING": "Kies een pseudoniem.<br/>Het dient om makkelijker gevonden te worden door anderen.<br/><br/>.Gebruik van spaties, komma's en accenten is niet toegestaan.<br/><div class='hidden-xs'><br/>Voorbeeld: <span class='gray'>JulesDeelder, JohanVermeer, etc.</span>",
+      "PSEUDO": "Pseudoniem",
+      "PSEUDO_HELP": "joe123",
+      "SALT_CONFIRM": "Bevestig",
+      "SALT_CONFIRM_HELP": "Bevestig de beveiligingszin",
+      "PASSWORD_CONFIRM": "Bevestig",
+      "PASSWORD_CONFIRM_HELP": "Bevestig het wachtwoord",
+      "SLIDE_6_TITLE": "Bevestiging:",
+      "COMPUTING_PUBKEY": "Berekening...",
+      "LAST_SLIDE_CONGRATULATION": "Bravo! Je hebt alle verplichte velden ingevuld.<br/>Je kunt je <b>rekeningaanvraag verzenden</b>.<br/><br/>Ter informatie, de publieke sleutel hieronder identificeert je toekomstige rekening.<br/>Je kunt deze aan derde partijen communiceren om geld te ontvangen. Zodra je rekening geopend is, kun je de sleutel terugvinden onder <b>{{'ACCOUNT.TITLE'|translate}}</b>.",
+      "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Waarschuwing:</b> je beveiligingszin, wachtwoord en pseudoniem kunnen hierna niet gewijzigd worden.<br/><b>Zorg dat ze goed onthoudt!</b><br/><b>Weet je zeker</b> dat je je persoonlijke rekeningaanvraag wil verzenden?",
+      "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Waarschuwing:</b> je wachtwoord en pseudoniem kunnen hierna niet gewijzigd worden.<br/><b>Zorg dat ze goed onthoudt!</b><br/><b>Weet je zeker</b> dat je deze portefeilleaanvraag wil verzenden?",
+      "PSEUDO_AVAILABLE": "Deze naam is beschikbaar",
+      "PSEUDO_NOT_AVAILABLE": "Deze gebruikersnaam is niet beschikbaar",
+      "INFO_LICENSE": "Om de valuta te sluiten, vragen wij u om te lezen en deze licentie te accepteren.",
+      "BTN_ACCEPT": "Ik accepteer",
+      "BTN_ACCEPT_LICENSE": "Ik ga akkoord met de licentie"
+    },
+    "POPUP_REGISTER": {
+      "TITLE": "Voer een pseudoniem in",
+      "HELP": "Een pseudoniem is nodig voor anderen om je te kunnen vinden."
+    },
+    "FILE_NAME": "{{currency}} - Rekeningafschrift {{pubkey|formatPubkey}} {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Datum",
+      "AMOUNT": "Bedrag",
+      "COMMENT": "Commentaar"
+    }
+  },
+  "TRANSFER": {
+    "TITLE": "Overboeken",
+    "SUB_TITLE": "Geld overboeken",
+    "FROM": "Van",
+    "TO": "Aan",
+    "AMOUNT": "Bedrag",
+    "AMOUNT_HELP": "Bedrag",
+    "COMMENT": "Opmerking",
+    "COMMENT_HELP": "Opmerking (optioneel)",
+    "BTN_SEND": "Verzenden",
+    "BTN_ADD_COMMENT": "Opmerking toevoegen",
+    "WARN_COMMENT_IS_PUBLIC": "Houd er rekening mee dat <b>reacties openbaar zijn </b> (niet-versleuteld).",
+    "MODAL": {
+      "TITLE": "Overboeking"
+    }
+  },
+  "ERROR": {
+    "POPUP_TITLE": "Error",
+    "UNKNOWN_ERROR": "Unknown error",
+    "CRYPTO_UNKNOWN_ERROR": "Your browser is not compatible with cryptographic features.",
+    "FIELD_REQUIRED": "This field is required.",
+    "FIELD_TOO_SHORT": "Value is too short (min {{minLength]] characters).",
+    "FIELD_TOO_SHORT_WITH_LENGTH": "This field value is too short.",
+    "FIELD_TOO_LONG": "Value is exceeding max length.",
+    "FIELD_TOO_LONG_WITH_LENGTH": "Value is too long (max {{maxLength}} characters).",
+    "FIELD_ACCENT": "Commas and accent characters not allowed",
+    "FIELD_NOT_NUMBER": "Value is not a number",
+    "FIELD_NOT_INT": "Value is not an integer",
+    "PASSWORD_NOT_CONFIRMED": "Must match previous password.",
+    "SALT_NOT_CONFIRMED": "Must match previous phrase.",
+    "SEND_IDENTITY_FAILED": "Error while trying to register.",
+    "SEND_CERTIFICATION_FAILED": "Could not certify identity.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "You could not send certification, because your account is <b>not a member account</b>.",
+    "NEED_MEMBER_ACCOUNT_TO_CERTIFY_HAS_SELF": "You could not send certification now, because your are <b>not a member</b> yet.<br/><br/>You still need certification to become a member.",
+    "IDENTITY_TO_CERTIFY_HAS_NO_SELF": "This account could not be certified. No registration found, or need to renew.",
+    "LOGIN_FAILED": "Error while sign in.",
+    "LOAD_IDENTITY_FAILED": "Could not load identity.",
+    "LOAD_REQUIREMENTS_FAILED": "Could not load identity requirements.",
+    "SEND_MEMBERSHIP_IN_FAILED": "Error while sending registration as member.",
+    "SEND_MEMBERSHIP_OUT_FAILED": "Error while sending membership revocation.",
+    "REFRESH_WALLET_DATA": "Could not refresh wallet.",
+    "GET_CURRENCY_PARAMETER": "Could not get currency parameters.",
+    "GET_CURRENCY_FAILED": "Could not load currency.",
+    "SEND_TX_FAILED": "Could not send transaction.",
+    "ALL_SOURCES_USED": "Please wait the next block computation (All transaction sources has been used).",
+    "NOT_ENOUGH_SOURCES": "Not enough changes to send this amount in one time.<br/>Maximum amount: {{amount}} {{unit}}<sub>{{subUnit}}</sub>.",
+    "ACCOUNT_CREATION_FAILED": "Error while creating your member account.",
+    "RESTORE_WALLET_DATA_ERROR": "Error while reloading settings from local storage",
+    "LOAD_WALLET_DATA_ERROR": "Error while loading wallet data.",
+    "COPY_CLIPBOARD_FAILED": "Could not copy to clipboard",
+    "TAKE_PICTURE_FAILED": "Could not get picture.",
+    "SCAN_FAILED": "Could not scan QR code.",
+    "SCAN_UNKNOWN_FORMAT": "Code not recognized.",
+    "WOT_LOOKUP_FAILED": "Search failed.",
+    "LOAD_PEER_DATA_FAILED": "Duniter peer not accessible. Please retry later.",
+    "NEED_LOGIN_FIRST": "Please sign in first.",
+    "AMOUNT_REQUIRED": "Amount is required.",
+    "AMOUNT_NEGATIVE": "Negative amount not allowed.",
+    "NOT_ENOUGH_CREDIT": "Not enough credit.",
+    "INVALID_NODE_SUMMARY": "Unreachable peer or invalid address",
+    "INVALID_USER_ID": "Field 'pseudonym' must not contains spaces or special characters.",
+    "INVALID_COMMENT": "Field 'reference' has a bad format.",
+    "INVALID_PUBKEY": "Public key has a bad format.",
+    "IDENTITY_INVALID_BLOCK_HASH": "This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.",
+    "IDENTITY_EXPIRED": "This identity has expired: this person must re-apply <b>before</b> being certified.",
+    "IDENTITY_SANDBOX_FULL": "Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).",
+    "WOT_PENDING_INVALID_BLOCK_HASH": "Membership not valid.",
+    "WALLET_INVALID_BLOCK_HASH": "Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.",
+    "WALLET_IDENTITY_EXPIRED": "The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.",
+    "WALLET_HAS_NO_SELF": "Your identity must first have been published, and not expired.",
+    "IDENTITY_ALREADY_CERTIFY": "You have <b>already certified</b> that identity.<br/><br/>Your certificate is still valid (expires {{expiresIn|formatDuration}}).",
+    "IDENTITY_ALREADY_CERTIFY_PENDING": "You have <b>already certified</b> that identity.<br/><br/>Your certification is still pending (Deadline for treatment {{expiresIn|formatDuration}}).",
+    "UNABLE_TO_CERTIFY_TITLE": "Unable to certify",
+    "LOAD_NEWCOMERS_FAILED": "Unable to load new members.",
+    "LOAD_PENDING_FAILED": "Unable to load pending registrations.",
+    "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.",
+    "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.",
+    "EXISTING_ACCOUNT": "Je gegevens komen overeen met een bestaande rekening, met de <a ng-click=\"showHelpModal('pubkey')\">publieke sleutel</a>:",
+    "EXISTING_ACCOUNT_REQUEST": "Gelieve je gegevens te wijzigen zodat ze met een niet gebruikte rekening overeenkomen."
+  },
+  "INFO": {
+    "POPUP_TITLE": "Informatie",
+    "CERTIFICATION_DONE": "Identiteit succesvol getekend",
+    "NOT_ENOUGH_CREDIT": "Niet genoeg krediet",
+    "TRANSFER_SENT": "Verzoek tot overboeken succesvol verzonden",
+    "COPY_TO_CLIPBOARD_DONE": "Kopie geslaagd",
+    "MEMBERSHIP_OUT_SENT": "Opzegging lidmaatschap succesvol verzonden",
+    "NOT_NEED_MEMBERSHIP": "Je bent al lid.",
+    "IDENTITY_WILL_MISSING_CERTIFICATIONS": "Deze identiteit heeft binnenkort onvoldoende certificaties (ten minste {{willNeedCertificationCount}} nodig)."
+  },
+  "CONFIRM": {
+    "POPUP_TITLE": "<b>Bevestiging</b>",
+    "POPUP_WARNING_TITLE": "<b>Waarschuwing</b>",
+    "CERTIFY_RULES_TITLE_UID": "Certificeer {{uid}}",
+    "CERTIFY_RULES": "<b>Beveiligingswaarschuwing:</b><br/><br/><b class=\"assertive\">Certificeer een rekening niet</b> als je gelooft dat: <ul><li>1.) de aanvrager niet echt is.<li>2.) de aanvrager al een andere gecertificeerde rekening heeft.<li>3.) de aanvrager opzettelijk of door onzorgvuldigheid regel 1 of 2 overtreedt bij het verzenden van certificaten.</ul></small><br/>Weet je zeker dat je deze identieit wilt certificeren?",
+    "TRANSFER": "<b>Samenvatting van de overboeking:</b><br/><br/><ul><li> - Van: <b>{{from}}</b></li><li> - Aan: <b>{{to}}</b></li><li> - Bedrag: <b>{{amount}} {{unit}}</b></li><li> - Opmerking: <i>{{comment}}</i></li></ul><br/><b>Weet je zeker dat je deze overboeking wil doen?</b>",
+    "MEMBERSHIP_OUT": "<b>Waarschuwing</b>:<br/>Je staat op het punt je lidmaatschap te beëindigen. Dit kan <b>niet ongedaan</b> worden gemaakt.<br/></br/><b>Weet je zeker dat je door wil gaan?</b>",
+    "LOGIN_UNUSED_WALLET_TITLE": "Typefout?",
+    "LOGIN_UNUSED_WALLET": "Je bent ingelogged op een rekening die <b>inactief</b> lijkt te zijn.<br/><br/>Als deze rekening niet met de jouwe overeenkomt, komt dat waarschijnlijk door een <b>typefout</b> bij het inloggen.<br/><br/><b>Wilt u toch doorgaan met deze rekening?</b>",
+    "FIX_IDENTITY": "De pseudoniem <b>{{uid}}</b> zal opnieuw gepubliceerd worden, waarmee de oude verlopen publicatie wordt vervangen.<br/></br/><bWeet je zeker</b> dat je door wil gaan?",
+    "FIX_MEMBERSHIP": "Je verzoek to lidmaatschap zal verstuurd worden.<br/></br/><b>Weet je het zeker?</b>",
+    "RENEW_MEMBERSHIP": "Je lidmaatschap zal verlengd worden.<br/></br/><b>Weet je het zeker?</b>",
+    "REVOKE_IDENTITY": "<b>Beveiligingswaarschuwing:</b><br/>You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated nickname <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to continue?",
+    "REVOKE_IDENTITY_2": "Deze handeling is <b>niet terug te draaien</b>!<br/><br/><b>Weet je zeker</b> dat je door wil gaan?",
+    "NOT_NEED_RENEW_MEMBERSHIP": "Je lidmaatschap hoeft niet verlengd te worden (het zal pas verlopen na {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Weet je zeker</b> dat je een verlengingsaanvraag wil versturen?",
+    "SAVE_BEFORE_LEAVE": "Wil je <b>je wijzigingen opslaan</b> voor je de pagina verlaat?",
+    "SAVE_BEFORE_LEAVE_TITLE": "Wijzigingen niet opgeslagen",
+    "LICENCE": "Ik heb gelezen en geaccepteerd de voorwaarden van de vergunning G1"
+  },
+  "DOWNLOAD": {
+    "POPUP_TITLE": "<b>Intrekkingsdocument</b>",
+    "POPUP_REVOKE_MESSAGE": "Om je rekening te beveiligen, download het <b>rekening intrekkingsdocument</b>. Dit heb je nodig om je rekening op te heffen (in het geval van diefstal, een verandering van ID, een ten onrechte gemaakte rekening, etc.).<br/><br/><b>Bewaar deze op een veilige plaats.</b>"
+  },
+  "HELP": {
+    "TITLE": "Online help",
+    "JOIN": {
+      "SECTION": "Join",
+      "SALT": "The protection phrase is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it. <b>Please remeber this phrase well</b>, because there is no way to recover it when lost. What's more, it cannot be changed without having to create a new account.<br/><br/>A good protection phrase must be sufficiently long (8 characters at the very least) and as original as possible.",
+      "PASSWORD": "The password is very important. Together with the protection phrase, it is use to calculate your account number (public key) and the private key to access it. <b>Please remember it well</b>, because there is no way to recover it when lost. What's more, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.",
+      "PSEUDO": "A pseudonym is used only when joining as <span class=\"text-italic\">member</span>. It is always associated with a wallet (by its <span class=\"text-italic\">public key</span>). It is published on the network so that other users may identify it, certify or send money to the account. A pseudonym must be unique among all members (current and past)."
+    },
+    "GLOSSARY": {
+      "SECTION": "Glossary",
+      "PUBKEY_DEF": "Een publieke sleutel identificeert altijd een portemonnee. Het kan een lid identificeren. In Cesium wordt berekend met de geheime ID en wachtwoord.",
+      "MEMBER": "Member",
+      "MEMBER_DEF": "A member is a real and living human, wishing to participate freely to the monitary community. The member will receive universal dividend, according to the period and amount as defined in the <span class=\"text-italic\">currency parameters</span>.",
+      "CURRENCY_RULES": "Currency rules",
+      "CURRENCY_RULES_DEF": "The currency rules are defined only once, and for all. They set the parameters under which the currency will perform: universal dividend calculation, the amount of certifications needed to become a member, the maximum amount of certifications a member can send, etc.<br/><br/>The parameters cannot be modified because of the use of a <span class=\"text-italic\">Blockchain</span> which carries and executes these rules, and constantly verifies their correct application. <a href=\"#/app/currency\">See current parameters</a>.",
+      "BLOCKCHAIN": "Blockchain",
+      "BLOCKCHAIN_DEF": "The Blockchain is a decentralised system which, in case of Duniter, serves to carry and execute the <span class=\"text-italic\">currency rules</span>.<br/><a href=\"http://en.duniter.org/presentation/\" target=\"_blank\">Read more about Duniter</a> and the working of its blockchain.",
+      "UNIVERSAL_DIVIDEND_DEF": "The Universal Dividend (UD) is the quantity of money co-created by each member, according to the period and the calculation defined in the <span class=\"text-italic\">currency rules</span>.<br/>Every term, the members receive an equal amount of new money on their account.<br/><br/>The UD undergoes a steady growth, to remain fair under its members (current and future), calculated by an average life expectancy, as demonstrated in the Relative Theory of Money (RTM).<br/><a href=\"http://trm.creationmonetaire.info\" target=\"_system\">Read more about RTM</a> and open money."
+    },
+    "TIP": {
+      "MENU_BTN_CURRENCY": "Menu <b>{{'MENU.CURRENCY'|translate}}</b> allows discovery of <b>currency parameters</b> and its state.",
+      "CURRENCY_WOT": "The <b>member count</b> shows the <b>community's weight and evolution</b>.",
+      "CURRENCY_MASS": "Shown here is the <b>total amount</b> currently in circulation and its <b>average distribution</b> per member.<br/><br/>This allows to estimate the <b>worth of any amount</b>, in respect to what <b>others own</b> on their account (on average).",
+      "CURRENCY_UNIT_RELATIVE": "The unit used here (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amounts in {{currency|capitalize}} have been devided by the <b>Universal Dividend</b> (UD).<br/><br/><small>This relative unit is <b>relevant</b> because it is stable in contrast to the permanently growing monitary mass.</small>",
+      "CURRENCY_CHANGE_UNIT": "This button allows to <b>switch the unit</b> to show amounts in <b>{{currency|capitalize}}</b>, undevided by the Universal Dividend (instead of in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;).",
+      "CURRENCY_CHANGE_UNIT_TO_RELATIVE": "This button allows to <b>switch the unit</b> to show amounts in &ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;, which is relative to the Universal Dividend (the amount co-produced by each member).",
+      "CURRENCY_RULES": "The <b>rules</b> of the currency determine its <b>exact and predictible</b> performance.<br/><br/>As a true DNA of the currency these rules make the monetary code <b>transparent and understandable</b>.",
+      "NETWORK_BLOCKCHAIN": "All monetary transactions are recoded in a <b>public and tamper proof</b> ledger, generally referred to as the <b>blockchain</b>.",
+      "NETWORK_PEERS": "The <b>peers</b> shown here correspond to <b>computers that update and check</b> the blockchain.<br/><br/>The more active peers there are, the more <b>decentralised</b> and therefore trustworhty the currency becomes.",
+      "NETWORK_PEERS_BLOCK_NUMBER": "This <b>number</b> indicates the peer's <b>latest validated block</b> (last page written in the ledger).<br/><br/>Green indicates that the block was equally validated by the <b>majority of other peers</b>.",
+      "NETWORK_PEERS_PARTICIPATE": "<b>Each member</b>, equiped with a computer with Internet, <b>can participate, adding a peer</b> simply by <b>installing the Duniter software</b> (free/libre and open source). <a href=\"{{installDocUrl}}\" target=\"_system\">Read the installation manual &gt;&gt;</a>.",
+      "MENU_BTN_ACCOUNT": "<b>{{'ACCOUNT.TITLE'|translate}}</b> allows access to your account balance and transaction history.",
+      "MENU_BTN_ACCOUNT_MEMBER": "Here you can consult your account status, transaction history and your certifications.",
+      "WALLET_CERTIFICATIONS": "Click here to reveiw the details of your certifications (given and received).",
+      "WALLET_BALANCE": "Your account <b>balance</b> is shown here.",
+      "WALLET_BALANCE_RELATIVE": "{{'HELP.TIP.WALLET_BALANCE'|translate}}<br/><br/>The used unit (&ldquo;<b>{{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub></b>&rdquo;) signifies that the amount in {{currency|capitalize}} has been divided by the <b>Universal Dividend</b> (UD) co-created by each member.<br/>At this moment, 1 UD equals {{currentUD}} {{currency|capitalize}}.",
+      "WALLET_BALANCE_CHANGE_UNIT": "You can <b>change the unit</b> in which amounts are shown in <b><i class=\"icon ion-android-settings\"></i>&nbsp;{{'MENU.SETTINGS'|translate}}</b>.<br/><br/>For example, to display amounts <b>directly in {{currency|capitalize}}</b> instead of relative amounts.",
+      "WALLET_SEND": "Issue a payment in just a few clicks.",
+      "WALLET_SEND_NO_MONEY": "Issue a payment in just a few clicks.<br/>(Your balance does not allow this yet)",
+      "WALLET_OPTIONS": "Please note that this button allows access to <b>other, less used actions</b>.<br/><br/>Don't forget to take a quick look, when you have a moment!",
+      "WALLET_RECEIVED_CERTS": "This shows the list of persons that certified you.",
+      "WALLET_CERTIFY": "The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.",
+      "WALLET_CERT_STOCK": "Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.",
+      "MENU_BTN_WOT": "The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).",
+      "WOT_SEARCH_TEXT_XS": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.",
+      "WOT_SEARCH_TEXT": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.",
+      "WOT_SEARCH_RESULT": "Simply click a user row to view the details sheet.",
+      "WOT_VIEW_CERTIFICATIONS": "The row <b>{{'ACCOUNT.CERTIFICATION_COUNT'|translate}}</b> shows how many members members validated this identity.<br/><br/>These certifications testify that the account belongs to <b>a living human</b> and this person has <b>no other member account</b>.",
+      "WOT_VIEW_CERTIFICATIONS_COUNT": "There are at least <b>{{sigQty}} certifications</b> needed to become a member and receive the <b>Universal Dividend</b>.",
+      "WOT_VIEW_CERTIFICATIONS_CLICK": "Click here to open <b>a list of all certifications</b> given to and by this identity.",
+      "WOT_VIEW_CERTIFY": "The button <b>{{'WOT.BTN_CERTIFY'|translate}}</b> allows to add your certification to this identity.",
+      "CERTIFY_RULES": "<b>Attention:</b> Only certify <b>real and living persons</b> that do not own any other certified account.<br/><br/>The trust carried by the currency depends on each member's vigilance!",
+      "MENU_BTN_SETTINGS": "The <b>{{'MENU.SETTINGS'|translate}}</b> allow you to configure the Cesium application.<br/><br/>For example, you can <b>change the unit</b> in which the currency will be shown.",
+      "HEADER_BAR_BTN_PROFILE": "Click here to access your <b>user profile</b>",
+      "SETTINGS_CHANGE_UNIT": "You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).",
+      "END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",
+      "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below."
+    }
+  }
+}
+);
+}]);
+
+
+angular.module('cesium.plugins', [
+  /* --  Generated plugin's modules -- */
+
+  'cesium.plugins.translations',
+  'cesium.plugins.templates',
+
+  /* --  Plugins  -- */
+
+  // Graph plugin:
+  // removeIf(ubuntu)
+  // Graph should be disable for Ubuntu build - see issue #463
+  'cesium.graph.plugin',
+  // endRemoveIf(ubuntu)
+
+  // RML9 plugin:
+  //'cesium.rml9.plugin',
+
+  // ES plugin (Cesium+):
+  'cesium.es.plugin',
+
+  // Map plugin (Cesium+):
+  'cesium.map.plugin'
+  ])
+;
+
+angular.module("cesium.plugins.translations", []).config(["$translateProvider", function($translateProvider) {
+$translateProvider.translations("en-GB", {
+  "COMMON": {
+    "CATEGORY": "Category",
+    "CATEGORIES": "Categories",
+    "CATEGORY_SEARCH_HELP": "Search",
+    "COMMENT_HELP": "Comments",
+    "LAST_MODIFICATION_DATE": "Updated on ",
+    "SUBMIT_BY": "Submitted by",
+    "BTN_LIKE": "I like",
+    "BTN_LIKE_REMOVE": "I don't like anymore",
+    "LIKES_TEXT": "{{total}} {{total > 1 ? 'people' : 'person'}} liked this page",
+    "ABUSES_TEXT": "{{total}} {{total > 1 ? 'people' : 'person'}} reported a problem on this page",
+    "BTN_REPORT_ABUSE_DOTS": "Report a problem or an abuse...",
+    "BTN_REMOVE_REPORTED_ABUSE": "Cancel my problem report",
+    "BTN_PUBLISH": "Publish",
+    "BTN_PICTURE_DELETE": "Delete",
+    "BTN_PICTURE_FAVORISE": "Default",
+    "BTN_PICTURE_ROTATE": "Rotate",
+    "BTN_ADD_PICTURE": "Add picture",
+    "NOTIFICATION": {
+      "TITLE": "New notification | {{'COMMON.APP_NAME'|translate}}",
+      "HAS_UNREAD": "You have {{count}} unread notification{{count>0?'s':''}}"
+    },
+    "NOTIFICATIONS": {
+      "TITLE": "Notifications",
+      "MARK_ALL_AS_READ": "Mark all as read",
+      "NO_RESULT": "No notification",
+      "SHOW_ALL": "Show all",
+      "LOAD_NOTIFICATIONS_FAILED": "Could not load notifications"
+    },
+    "REPORT_ABUSE": {
+      "TITLE": "Report a problem",
+      "SUB_TITLE": "Please explain briefly the problem:",
+      "REASON_HELP": "I explain the problem...",
+      "ASK_DELETE": "Request removal?",
+      "CONFIRM": {
+        "SENT": "Request sent. Thnak you!"
+      }
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Pages",
+    "USER_PROFILE": "My Profile",
+    "MESSAGES": "Messages",
+    "NOTIFICATIONS": "Notifications",
+    "INVITATIONS": "Invitations"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Account for an organization",
+      "ORGANIZATION_ACCOUNT_HELP": "If you represent a company, association, etc.<br/>No universal dividend will be created by this account."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "You can <a ui-sref=\"app.edit_profile\">fill your Cesium+ profile</a> (optional) to provide better visibility of your account. This profile will be stored in <b>a directory independent</b> of the currency, but decentralized."
+    },
+    "ERROR": {
+      "WS_CONNECTION_FAILED": "Cesium can not receive notifications because of a technical error (connection to the Cesium + data node).<br/><br/>If the problem persists, please <b>choose another data node</b> in Cesium+ settings."
+    }
+  },
+  "WOT": {
+    "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Suggest identities to certify...",
+    "BTN_ASK_CERTIFICATIONS_DOTS": "Ask members to certify me...",
+    "BTN_ASK_CERTIFICATION": "Ask a certification",
+    "SUGGEST_CERTIFICATIONS_MODAL": {
+      "TITLE": "Suggest certifications",
+      "HELP": "Select your suggestions"
+    },
+    "ASK_CERTIFICATIONS_MODAL": {
+      "TITLE": "Ask certifications",
+      "HELP": "Select recipients"
+    },
+    "SEARCH": {
+      "DIVIDER_PROFILE": "Accounts",
+      "DIVIDER_PAGE": "Pages",
+      "DIVIDER_GROUP": "Groups"
+    },
+    "CONFIRM": {
+      "SUGGEST_CERTIFICATIONS": "Are you sure you want <b>to send these certification suggestions</b>?",
+      "ASK_CERTIFICATION": "Are you sure you want to <b>send a certification request</b>?",
+      "ASK_CERTIFICATIONS": "Are you sure you want to <b>send a certification request</b> to these people?"
+    }
+  },
+  "INVITATION": {
+    "TITLE": "Invitations",
+    "NO_RESULT": "No invitation received",
+    "BTN_DELETE_ALL": "Delete all invitations",
+    "BTN_DELETE": "Delete invitation",
+    "BTN_NEW_INVITATION": "New invitation",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> asks for your certification",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> is suggested for certification",
+    "SUGGESTED_BY": "Suggestion sent by <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitations"
+    },
+    "LIST": {
+      "TITLE": "Invitations"
+    },
+    "NEW": {
+      "TITLE": "New invitation",
+      "RECIPIENTS": "A",
+      "RECIPIENTS_HELP": "Recipients of the invitation",
+      "RECIPIENTS_MODAL_TITLE": "Recipients",
+      "RECIPIENTS_MODAL_HELP": "Please choose recipients:",
+      "SUGGESTION_IDENTITIES": "Suggestions for certification",
+      "SUGGESTION_IDENTITIES_HELP": "Certifications to suggest",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Suggestions",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Please choose your suggestions:"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "Removing invitations is <b>an irreversible operation</b>.<br/><br/><b>Are you sure</b> you want to continue",
+      "SEND_INVITATIONS_TO_CERTIFY": "<b>Are you sure</b> you want <b>to sent this invitation to certify</b> ?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invitation sent"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Error while loading invitations",
+      "REMOVE_INVITATION_FAILED": "Error while deleting the invitation",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Error while deleting invitations",
+      "SEND_INVITATION_FAILED": "Error while sending invitation",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invitation unreadable (format unknown)</span> - sent by <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Comments",
+    "SHOW_MORE_COMMENTS": "Show previous comments",
+    "COMMENT_HELP": "Your comment, question...",
+    "COMMENT_HELP_REPLY_TO": "Your answer...",
+    "BTN_SEND": "Send",
+    "POPOVER_SHARE_TITLE": "Message #{{number}}",
+    "REPLY": "Reply",
+    "REPLY_TO": "Respond to:",
+    "REPLY_TO_LINK": "In response to ",
+    "REPLY_TO_DELETED_COMMENT": "In response to a deleted comment",
+    "REPLY_COUNT": "{{replyCount}} responses",
+    "DELETED_COMMENT": "Comment deleted",
+    "MODIFIED_ON": "modified on {{time|formatDate}}",
+    "MODIFIED_PARENTHESIS": "(modified then)",
+    "ERROR": {
+      "FAILED_SAVE_COMMENT": "Saving comment failed",
+      "FAILED_REMOVE_COMMENT": "Deleting comment failed"
+    }
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Re: ",
+    "FORWARD_TITLE_PREFIX": "Fw: ",
+    "BTN_REPLY": "Reply",
+    "BTN_COMPOSE": "New message",
+    "BTN_WRITE": "Write",
+    "NO_MESSAGE_INBOX": "No message received",
+    "NO_MESSAGE_OUTBOX": "No message sent",
+    "NOTIFICATIONS": {
+      "TITLE": "Messages",
+      "MESSAGE_RECEIVED": "You <b>received a message</b><br/>from"
+    },
+    "LIST": {
+      "INBOX": "Inbox",
+      "OUTBOX": "Outbox",
+      "LAST_INBOX": "New messages",
+      "LAST_OUTBOX": "Sent messages",
+      "BTN_LAST_MESSAGES": "Recent messages",
+      "TITLE": "Private messages",
+      "SEARCH_HELP": "Search in messages",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Options",
+        "DELETE_ALL": "Delete all messages"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "New message",
+      "TITLE_REPLY": "Reply",
+      "SUB_TITLE": "New message",
+      "TO": "To",
+      "OBJECT": "Object",
+      "OBJECT_HELP": "Object",
+      "ENCRYPTED_HELP": "Please note this message will be encrypted before sending so that only the recipient can read it and be sure you are the author.",
+      "MESSAGE": "Message",
+      "MESSAGE_HELP": "Message content",
+      "CONTENT_CONFIRMATION": "No message content.<br/><br/>Are your sure you want to send this message?"
+    },
+    "VIEW": {
+      "TITLE": "Message",
+      "SENDER": "Sent by",
+      "RECIPIENT": "Sent to",
+      "NO_CONTENT": "Empty message",
+      "DELETE": "Delete the message"
+    },
+    "CONFIRM": {
+      "REMOVE": "Are you sure you want to <b>delete this message</b>?<br/><br/> This operation is irreversible.",
+      "REMOVE_ALL": "Are you sure you want to <b>delete all messages</b>?<br/><br/> This operation is irreversible.",
+      "MARK_ALL_AS_READ": "Are you sure you want to <b>mark all message as read</b>?",
+      "USER_HAS_NO_PROFILE": "This identity has no Cesium + profile. It may not use the Cesium + extension, so it <b>will not read your message</b>.<br/><br/>Are you sure you want <b>to continue</b>?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Message successfully deleted",
+      "All_MESSAGE_REMOVED": "Messages successfully deleted",
+      "MESSAGE_SENT": "Message sent"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Error while sending message.",
+      "LOAD_MESSAGES_FAILED": "Error while loading messages.",
+      "LOAD_MESSAGE_FAILED": "Error while loading message.",
+      "MESSAGE_NOT_READABLE": "Unable to read message.",
+      "USER_NOT_RECIPIENT": "You are not the recipient of this message: unable to read it.",
+      "NOT_AUTHENTICATED_MESSAGE": "The authenticity of the message is not certain or its content is corrupted.",
+      "REMOVE_MESSAGE_FAILED": "Error while deleting message",
+      "MESSAGE_CONTENT_TOO_LONG": "Value too long ({{maxLength}} characters max).",
+      "MARK_AS_READ_FAILED": "Unable to mark the message as 'read'.",
+      "LOAD_NOTIFICATIONS_FAILED": "Error while loading messages notifications.",
+      "REMOVE_All_MESSAGES_FAILED": "Error while removing all messages.",
+      "MARK_ALL_AS_READ_FAILED": "Error while marking messages as read.",
+      "RECIPIENT_IS_MANDATORY": "Recipient is mandatory."
+    }
+  },
+  "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Block number, hash...",
+      "POPOVER_FILTER_TITLE": "Filter",
+      "HEADER_MEDIAN_TIME": "Date / Time",
+      "HEADER_BLOCK": "Block #",
+      "HEADER_ISSUER": "Peer owner",
+      "BTN_LAST": "Last blocks",
+      "DISPLAY_QUERY": "View query",
+      "HIDE_QUERY": "Hide query",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "<b class=\"ion-person\"></b> Members input/output",
+        "EXISTING_TRANSACTION": "<b class=\"ion-card\"></b> Having transactions",
+        "PERIOD": "<b class=\"ion-clock\"></b> Between <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) and <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Computed by {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Transactions concerning <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Error while searching blocks."
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Main activity",
+    "GENERAL_DIVIDER": "Basic information",
+    "LOCATION_DIVIDER": "Address",
+    "SOCIAL_NETWORKS_DIVIDER": "Social networks, web sites",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "BTN_SHOW_WOT": "People",
+    "BTN_SHOW_WOT_HELP": "Search for people",
+    "BTN_SHOW_PAGES": "Pages",
+    "BTN_SHOW_PAGES_HELP": "Search for pages",
+    "BTN_NEW": "New page",
+    "MY_PAGES": "My pages",
+    "NO_PAGE": "No page",
+    "SEARCH": {
+      "TITLE": "Pages",
+      "SEARCH_HELP": "What, Who: hairdresser, Lili's restaurant, ...",
+      "BTN_ADD": "New",
+      "BTN_LAST_RECORDS": "Recent pages",
+      "BTN_ADVANCED_SEARCH": "Advanced search",
+      "BTN_OPTIONS": "Advanced search",
+      "TYPE": "Kind of organization",
+      "LOCATION_HELP": "Where: City, Country",
+      "RESULTS": "Results",
+      "RESULT_COUNT_LOCATION": "{{count}} result{{count>0?'s':''}}, near {{location}}",
+      "RESULT_COUNT": "{{count}} result{{count>0?'s':''}}",
+      "LAST_RECORDS": "Recent pages",
+      "LAST_RECORD_COUNT_LOCATION": "{{count}} recent page{{count>0?'s':''}}, near {{location}}",
+      "LAST_RECORD_COUNT": "{{count}} recent page{{count>0?'s':''}}",
+      "POPOVER_FILTERS": {
+        "BTN_ADVANCED_SEARCH": "Advanced options?"
+      }
+    },
+    "VIEW": {
+      "TITLE": "Registry",
+      "CATEGORY": "Main activity:",
+      "LOCATION": "Address:",
+      "MENU_TITLE": "Options",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Are you sure you want to delete this reference?<br/><br/>This is irreversible."
+    },
+    "TYPE": {
+      "TITLE": "New page",
+      "SELECT_TYPE": "Kind of organization:",
+      "ENUM": {
+        "SHOP": "Local shops",
+        "COMPANY": "Company",
+        "ASSOCIATION": "Association",
+        "INSTITUTION": "Institution"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Edit",
+      "TITLE_NEW": "New page",
+      "RECORD_TYPE":"Kind of organization",
+      "RECORD_TITLE": "Name",
+      "RECORD_TITLE_HELP": "Name",
+      "RECORD_DESCRIPTION": "Description",
+      "RECORD_DESCRIPTION_HELP": "Describe activity",
+      "RECORD_ADDRESS": "Street",
+      "RECORD_ADDRESS_HELP": "Street, building...",
+      "RECORD_CITY": "City",
+      "RECORD_CITY_HELP": "City, Country",
+      "RECORD_SOCIAL_NETWORKS": "Social networks and web site",
+      "RECORD_PUBKEY": "Public key",
+      "RECORD_PUBKEY_HELP": "Public key to receive payments"
+    },
+    "WALLET": {
+      "PAGE_DIVIDER": "Pages",
+      "PAGE_DIVIDER_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>."
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Loading main activities failed",
+      "LOAD_RECORD_FAILED": "Loading failed",
+      "LOOKUP_RECORDS_FAILED": "Error while loading records.",
+      "REMOVE_RECORD_FAILED": "Deleting failed",
+      "SAVE_RECORD_FAILED": "Saving failed",
+      "RECORD_NOT_EXISTS": "Record not found",
+      "GEO_LOCATION_NOT_FOUND": "City or zip code not found"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Page successfully deleted",
+      "RECORD_SAVED": "Page successfully saved"
+    }
+  },
+  "PROFILE": {
+    "PROFILE_DIVIDER": "Cesium+ profile",
+    "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>.",
+    "NO_PROFILE_DEFINED": "No Cesium+ profile",
+    "BTN_ADD": "Create my profile",
+    "BTN_EDIT": "Edit my profile",
+    "BTN_DELETE": "Delete my profile",
+    "BTN_REORDER": "Reorder",
+    "UID": "Pseudonym",
+    "TITLE": "Lastname, FirstName",
+    "TITLE_HELP": "Name",
+    "DESCRIPTION": "About me",
+    "DESCRIPTION_HELP": "About me...",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "General data",
+    "SOCIAL_NETWORKS_DIVIDER": "Social networks and web site",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "MODAL_AVATAR": {
+      "TITLE": "Avatar",
+      "SELECT_FILE_HELP": "<b>Choose an image file</b>, by clicking on the button below:",
+      "BTN_SELECT_FILE": "Choose an image",
+      "RESIZE_HELP": "<b>Re-crop the image</b> if necessary. A click on the image allows to move it. Click on the area at the bottom left to zoom in.",
+      "RESULT_HELP": "<b>Here is the result</b> as seen on your profile:"
+    },
+    "CONFIRM": {
+      "DELETE": "Are you sure you want to <b>delete your Cesium+ profile ?</b><br/><br/>This operation is irreversible."
+    },
+    "ERROR": {
+      "REMOVE_PROFILE_FAILED": "Deleting profile failed",
+      "LOAD_PROFILE_FAILED": "Could not load user profile.",
+      "SAVE_PROFILE_FAILED": "Saving profile failed",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Invalid format: please fill a valid Internet address.<br/><br/>Examples :<ul><li>- A Facebook page (https://www.facebook.com/user)</li><li>- A web page (http://www.domain.com)</li><li>- An email address (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Error while resizing picture"
+    },
+    "INFO": {
+      "PROFILE_REMOVED": "Profile deleted",
+      "PROFILE_SAVED": "Profile saved"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "Please note that the information published here <b>is public</b>: visible including by <b>not logged in people</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"
+    }
+  },
+  "LOCATION": {
+    "BTN_GEOLOC_ADDRESS": "Find my address on the map",
+    "USE_GEO_POINT": "Appear on {{'COMMON.APP_NAME'|translate}} maps?",
+    "LOADING_LOCATION": "Searching address...",
+    "LOCATION_DIVIDER": "Localisation",
+    "ADDRESS": "Address",
+    "ADDRESS_HELP": "Address (optional)",
+    "CITY": "City",
+    "CITY_HELP": "City, Country",
+    "DISTANCE": "Maximum distance around the city",
+    "DISTANCE_UNIT": "mi",
+    "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+    "SEARCH_HELP": "City, Country",
+    "PROFILE_POSITION": "Profile position",
+    "MODAL": {
+      "TITLE": "Search address",
+      "SEARCH_HELP": "City, Country",
+      "ALTERNATIVE_RESULT_DIVIDER": "Alternative results for <b>{{address}}</b>:",
+      "POSITION": "lat/lon : {{lat}} / {{lon}}"
+    },
+    "ERROR": {
+      "CITY_REQUIRED_IF_STREET": "Required if a street has been filled",
+      "REQUIRED_FOR_LOCATION": "Required field to appear on the map",
+      "INVALID_FOR_LOCATION": "Unknown address",
+      "GEO_LOCATION_FAILED": "Unable to retrieve your current position. Please use the search button.",
+      "ADDRESS_LOCATION_FAILED": "Unable to retrieve the address position"
+    }
+  },
+  "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Online services",
+    "SUBSCRIPTION_DIVIDER_HELP": "Online services offer optional additional services, delegated to a third party.",
+    "BTN_ADD": "Add a service",
+    "BTN_EDIT": "Manage my services",
+    "NO_SUBSCRIPTION": "No service defined",
+    "SUBSCRIPTION_COUNT": "Services / Subscription",
+    "EDIT": {
+      "TITLE": "Online services",
+      "HELP_TEXT": "Manage your subscriptions and other online services here",
+      "PROVIDER": "Provider:"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Receive email notifications"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Are you sur you want to <b>delete this subscription</b>?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Error while loading online services",
+      "ADD_SUBSCRIPTION_FAILED": "Error while adding subscription",
+      "UPDATE_SUBSCRIPTION_FAILED": "Error during subscription update",
+      "DELETE_SUBSCRIPTION_FAILED": "Error while deleting subscription"
+    },
+    "MODAL_EMAIL": {
+      "TITLE" : "Notification by email",
+      "HELP" : "Fill out this form to <b>be notified by email</ b> of your account's events. <br/>Your email address will be encrypted only to be visible to the service provider.",
+      "EMAIL_LABEL" : "Your email:",
+      "EMAIL_HELP": "john@domain.com",
+      "FREQUENCY_LABEL": "Frequency of notifications:",
+      "FREQUENCY_DAILY": "Daily",
+      "FREQUENCY_WEEKLY": "Weekly",
+      "PROVIDER": "Service Provider:"
+    }
+  },
+  "DOCUMENT": {
+    "HASH": "Hash: ",
+    "LOOKUP": {
+      "TITLE": "Document search",
+      "BTN_ACTIONS": "Actions",
+      "SEARCH_HELP": "issuer:AAA*, time:1508406169",
+      "LAST_DOCUMENTS_DOTS": "Last documents:",
+      "LAST_DOCUMENTS": "Last documents",
+      "SHOW_QUERY": "Show query",
+      "HIDE_QUERY": "Hide query",
+      "HEADER_TIME": "Time/Hour",
+      "HEADER_ISSUER": "Issuer",
+      "HEADER_RECIPIENT": "Recipient",
+      "READ": "Read",
+      "BTN_REMOVE": "Delete this document",
+      "BTN_COMPACT": "Compact",
+      "HAS_CREATE_OR_UPDATE_PROFILE": "create or edit his profile",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Actions",
+        "REMOVE_ALL": "Delete these documents..."
+      }
+    },
+    "INFO": {
+      "REMOVED": "Deleted document"
+    },
+    "CONFIRM": {
+      "REMOVE": "Are you sure you want to <b>delete this document</b>?",
+      "REMOVE_ALL": "Are you sure you want to <b>delete these documents</b>?"
+    },
+    "ERROR": {
+      "LOAD_DOCUMENTS_FAILED": "Error searching documents",
+      "REMOVE_FAILED": "Error deleting the document",
+      "REMOVE_ALL_FAILED": "Error deleting documents"
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "PLUGIN_NAME_HELP": "User profiles, notifications, private messages",
+    "ENABLE_TOGGLE": "Enable extension?",
+    "ENABLE_REMOTE_STORAGE": "Enable remote storage for settings?",
+    "ENABLE_REMOTE_STORAGE_HELP": "Enables (encrypted) storage of your settings on Cesium + nodes",
+    "ENABLE_MESSAGE_TOGGLE": "Enable private messages?",
+    "PEER": "Data peer address",
+    "POPUP_PEER": {
+      "TITLE" : "Data peer",
+      "HELP" : "Set the address of the peer to use:",
+      "PEER_HELP": "server.domain.com:port"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Notifications",
+      "HELP_TEXT": "Enable the types of notifications you want to receive:",
+      "ENABLE_TX_SENT": "Notify the validation of <b>sent payments</b>?",
+      "ENABLE_TX_RECEIVED": "Notify the validation of <b>received payments</b>?",
+      "ENABLE_CERT_SENT": "Notify the validation of <b>sent certifications</b>?",
+      "ENABLE_CERT_RECEIVED": "Notify the validation of <b>received certifications</b>?",
+      "ENABLE_HTML5_NOTIFICATION": "Warn with each new notification?",
+      "ENABLE_HTML5_NOTIFICATION_HELP": "Opens a small popup window with each new notification."
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Optional features",
+      "ASK_ENABLE": "Cesium+ extension is <b>disabled</b> in your settings, making some features inactive: <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> user profiles</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Private messages</b>.</ul><br/><br/><b>Do you want to enable</b> the extension?"
+    }
+  },
+  "ES_WALLET": {
+    "ERROR": {
+      "RECIPIENT_IS_MANDATORY": "A recipient is required for encryption."
+    },
+    "ES_PEER": {
+      "NAME": "Name",
+      "DOCUMENTS": "Documents",
+      "SOFTWARE": "Software",
+      "DOCUMENT_COUNT": "Number of documents",
+      "EMAIL_SUBSCRIPTION_COUNT": "{{emailSubscription}} subscribers to email notification"
+    }
+  },
+  "EVENT": {
+    "NODE_STARTED": "Your node ES API <b>{{params[0]}}</b> is UP",
+    "NODE_BMA_DOWN": "Node <b>{{params[0]}}:{{params[1]}}</b> (used by your ES API) is <b>unreachable</b>.",
+    "NODE_BMA_UP": "Node <b>{{params[0]}}:{{params[1]}}</b> is reachable again.",
+    "MEMBER_JOIN": "You are now a <b>member</b> of currency <b>{{params[0]}}</b>!",
+    "MEMBER_LEAVE": "You are <b>not a member anymore</b> of currency <b>{{params[0]}}</b>!",
+    "MEMBER_EXCLUDE": "You are <b>not more member</b> of the currency <b>{{params[0]}}</b>, for lack of renewal or lack of certifications.",
+    "MEMBER_REVOKE": "Your account has been revoked. It will no longer be a member of the currency <b>{{params[0]}}</b>.",
+    "MEMBER_ACTIVE": "Your membership to <b>{{params[0]}}</b> has been <b>renewed successfully</b>.",
+    "TX_SENT": "Your payment to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",
+    "TX_SENT_MULTI": "Your payment to <b>{{params[1]}}</b> was executed.",
+    "TX_RECEIVED": "You received a payment from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "You received a payment from <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Your <b>certification</b> to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",
+    "CERT_RECEIVED": "You  have <b>received a certification</b> from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "USER": {
+      "LIKE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> like your profile",
+      "FOLLOW_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> follows your activity",
+      "STAR_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> rated you ({{params[3]}} <i class=\"ion-star\">)",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the profile: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> reported a profile to be deleted: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your profile"
+    },
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on your referencing: <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on your referencing: <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has replied to your comment on the referencing: <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on the page: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on the page: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> added a page: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> updated the page: <b>{{params[2]}}</b>",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the page: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> reported a page to be deleted: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your page: <b>{{params[2]}}</b>"
+    }
+  },
+  "LIKE": {
+    "ERROR": {
+      "FAILED_TOGGLE_LIKE": "Unable to execute this action."
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Data node <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the data node <b>{{new}}</b>?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Data node <b>{{server}}</b> unreachable or invalid address.<br/><br/>Cesium will continue to work, <b>without the Cesium+</b> extension (user profiles, private messages, maps and graphics).<br/><br/>Check your Internet connection, or change data node in <a class=\"positive\" ng-click=\"doQuickFix('settings')\">extension settings</a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
+  }
+}
+);
+
+$translateProvider.translations("en", {
+  "COMMON": {
+    "CATEGORY": "Category",
+    "CATEGORIES": "Categories",
+    "CATEGORY_SEARCH_HELP": "Search",
+    "COMMENT_HELP": "Comments",
+    "LAST_MODIFICATION_DATE": "Updated on ",
+    "SUBMIT_BY": "Submitted by",
+    "BTN_LIKE": "I like",
+    "BTN_LIKE_REMOVE": "I don't like anymore",
+    "LIKES_TEXT": "{{total}} {{total > 1 ? 'people' : 'person'}} liked this page",
+    "ABUSES_TEXT": "{{total}} {{total > 1 ? 'people' : 'person'}} reported a problem on this page",
+    "BTN_REPORT_ABUSE_DOTS": "Report a problem or an abuse...",
+    "BTN_REMOVE_REPORTED_ABUSE": "Cancel my problem report",
+    "BTN_PUBLISH": "Publish",
+    "BTN_PICTURE_DELETE": "Delete",
+    "BTN_PICTURE_FAVORISE": "Default",
+    "BTN_PICTURE_ROTATE": "Rotate",
+    "BTN_ADD_PICTURE": "Add picture",
+    "NOTIFICATION": {
+      "TITLE": "New notification | {{'COMMON.APP_NAME'|translate}}",
+      "HAS_UNREAD": "You have {{count}} unread notification{{count>0?'s':''}}"
+    },
+    "NOTIFICATIONS": {
+      "TITLE": "Notifications",
+      "MARK_ALL_AS_READ": "Mark all as read",
+      "NO_RESULT": "No notification",
+      "SHOW_ALL": "Show all",
+      "LOAD_NOTIFICATIONS_FAILED": "Could not load notifications"
+    },
+    "REPORT_ABUSE": {
+      "TITLE": "Report a problem",
+      "SUB_TITLE": "Please explain briefly the problem:",
+      "REASON_HELP": "I explain the problem...",
+      "ASK_DELETE": "Request removal?",
+      "CONFIRM": {
+        "SENT": "Request sent. Thnak you!"
+      }
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Pages",
+    "USER_PROFILE": "My Profile",
+    "MESSAGES": "Messages",
+    "NOTIFICATIONS": "Notifications",
+    "INVITATIONS": "Invitations"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Account for an organization",
+      "ORGANIZATION_ACCOUNT_HELP": "If you represent a company, association, etc.<br/>No universal dividend will be created by this account."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "You can <a ui-sref=\"app.edit_profile\">fill your Cesium+ profile</a> (optional) to provide better visibility of your account. This profile will be stored in <b>a directory independent</b> of the currency, but decentralized."
+    },
+    "ERROR": {
+      "WS_CONNECTION_FAILED": "Cesium can not receive notifications because of a technical error (connection to the Cesium + data node).<br/><br/>If the problem persists, please <b>choose another data node</b> in Cesium+ settings."
+    }
+  },
+  "WOT": {
+    "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Suggest identities to certify...",
+    "BTN_ASK_CERTIFICATIONS_DOTS": "Ask members to certify me...",
+    "BTN_ASK_CERTIFICATION": "Ask a certification",
+    "SUGGEST_CERTIFICATIONS_MODAL": {
+      "TITLE": "Suggest certifications",
+      "HELP": "Select your suggestions"
+    },
+    "ASK_CERTIFICATIONS_MODAL": {
+      "TITLE": "Ask certifications",
+      "HELP": "Select recipients"
+    },
+    "SEARCH": {
+      "DIVIDER_PROFILE": "Accounts",
+      "DIVIDER_PAGE": "Pages",
+      "DIVIDER_GROUP": "Groups"
+    },
+    "CONFIRM": {
+      "SUGGEST_CERTIFICATIONS": "Are you sure you want <b>to send these certification suggestions</b>?",
+      "ASK_CERTIFICATION": "Are you sure you want to <b>send a certification request</b>?",
+      "ASK_CERTIFICATIONS": "Are you sure you want to <b>send a certification request</b> to these people?"
+    }
+  },
+  "INVITATION": {
+    "TITLE": "Invitations",
+    "NO_RESULT": "No invitation received",
+    "BTN_DELETE_ALL": "Delete all invitations",
+    "BTN_DELETE": "Delete invitation",
+    "BTN_NEW_INVITATION": "New invitation",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> asks for your certification",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> is suggested for certification",
+    "SUGGESTED_BY": "Suggestion sent by <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitations"
+    },
+    "LIST": {
+      "TITLE": "Invitations"
+    },
+    "NEW": {
+      "TITLE": "New invitation",
+      "RECIPIENTS": "A",
+      "RECIPIENTS_HELP": "Recipients of the invitation",
+      "RECIPIENTS_MODAL_TITLE": "Recipients",
+      "RECIPIENTS_MODAL_HELP": "Please choose recipients:",
+      "SUGGESTION_IDENTITIES": "Suggestions for certification",
+      "SUGGESTION_IDENTITIES_HELP": "Certifications to suggest",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Suggestions",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Please choose your suggestions:"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "Removing invitations is <b>an irreversible operation</b>.<br/><br/><b>Are you sure</b> you want to continue",
+      "SEND_INVITATIONS_TO_CERTIFY": "<b>Are you sure</b> you want <b>to sent this invitation to certify</b> ?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invitation sent"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Error while loading invitations",
+      "REMOVE_INVITATION_FAILED": "Error while deleting the invitation",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Error while deleting invitations",
+      "SEND_INVITATION_FAILED": "Error while sending invitation",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invitation unreadable (format unknown)</span> - sent by <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Comments",
+    "SHOW_MORE_COMMENTS": "Show previous comments",
+    "COMMENT_HELP": "Your comment, question...",
+    "COMMENT_HELP_REPLY_TO": "Your answer...",
+    "BTN_SEND": "Send",
+    "POPOVER_SHARE_TITLE": "Message #{{number}}",
+    "REPLY": "Reply",
+    "REPLY_TO": "Respond to:",
+    "REPLY_TO_LINK": "In response to ",
+    "REPLY_TO_DELETED_COMMENT": "In response to a deleted comment",
+    "REPLY_COUNT": "{{replyCount}} responses",
+    "DELETED_COMMENT": "Comment deleted",
+    "MODIFIED_ON": "modified on {{time|formatDate}}",
+    "MODIFIED_PARENTHESIS": "(modified then)",
+    "ERROR": {
+      "FAILED_SAVE_COMMENT": "Saving comment failed",
+      "FAILED_REMOVE_COMMENT": "Deleting comment failed"
+    }
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Re: ",
+    "FORWARD_TITLE_PREFIX": "Fw: ",
+    "BTN_REPLY": "Reply",
+    "BTN_COMPOSE": "New message",
+    "BTN_WRITE": "Write",
+    "NO_MESSAGE_INBOX": "No message received",
+    "NO_MESSAGE_OUTBOX": "No message sent",
+    "NOTIFICATIONS": {
+      "TITLE": "Messages",
+      "MESSAGE_RECEIVED": "You <b>received a message</b><br/>from"
+    },
+    "LIST": {
+      "INBOX": "Inbox",
+      "OUTBOX": "Outbox",
+      "LAST_INBOX": "New messages",
+      "LAST_OUTBOX": "Sent messages",
+      "BTN_LAST_MESSAGES": "Recent messages",
+      "TITLE": "Private messages",
+      "SEARCH_HELP": "Search in messages",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Options",
+        "DELETE_ALL": "Delete all messages"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "New message",
+      "TITLE_REPLY": "Reply",
+      "SUB_TITLE": "New message",
+      "TO": "To",
+      "OBJECT": "Object",
+      "OBJECT_HELP": "Object",
+      "ENCRYPTED_HELP": "Please note this message will be encrypted before sending so that only the recipient can read it and be sure you are the author.",
+      "MESSAGE": "Message",
+      "MESSAGE_HELP": "Message content",
+      "CONTENT_CONFIRMATION": "No message content.<br/><br/>Are your sure you want to send this message?"
+    },
+    "VIEW": {
+      "TITLE": "Message",
+      "SENDER": "Sent by",
+      "RECIPIENT": "Sent to",
+      "NO_CONTENT": "Empty message",
+      "DELETE": "Delete the message"
+    },
+    "CONFIRM": {
+      "REMOVE": "Are you sure you want to <b>delete this message</b>?<br/><br/> This operation is irreversible.",
+      "REMOVE_ALL": "Are you sure you want to <b>delete all messages</b>?<br/><br/> This operation is irreversible.",
+      "MARK_ALL_AS_READ": "Are you sure you want to <b>mark all message as read</b>?",
+      "USER_HAS_NO_PROFILE": "This identity has no Cesium + profile. It may not use the Cesium + extension, so it <b>will not read your message</b>.<br/><br/>Are you sure you want <b>to continue</b>?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Message successfully deleted",
+      "All_MESSAGE_REMOVED": "Messages successfully deleted",
+      "MESSAGE_SENT": "Message sent"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Error while sending message.",
+      "LOAD_MESSAGES_FAILED": "Error while loading messages.",
+      "LOAD_MESSAGE_FAILED": "Error while loading message.",
+      "MESSAGE_NOT_READABLE": "Unable to read message.",
+      "USER_NOT_RECIPIENT": "You are not the recipient of this message: unable to read it.",
+      "NOT_AUTHENTICATED_MESSAGE": "The authenticity of the message is not certain or its content is corrupted.",
+      "REMOVE_MESSAGE_FAILED": "Error while deleting message",
+      "MESSAGE_CONTENT_TOO_LONG": "Value too long ({{maxLength}} characters max).",
+      "MARK_AS_READ_FAILED": "Unable to mark the message as 'read'.",
+      "LOAD_NOTIFICATIONS_FAILED": "Error while loading messages notifications.",
+      "REMOVE_All_MESSAGES_FAILED": "Error while removing all messages.",
+      "MARK_ALL_AS_READ_FAILED": "Error while marking messages as read.",
+      "RECIPIENT_IS_MANDATORY": "Recipient is mandatory."
+    }
+  },
+  "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Block number, hash...",
+      "POPOVER_FILTER_TITLE": "Filter",
+      "HEADER_MEDIAN_TIME": "Date / Time",
+      "HEADER_BLOCK": "Block #",
+      "HEADER_ISSUER": "Peer owner",
+      "BTN_LAST": "Last blocks",
+      "DISPLAY_QUERY": "View query",
+      "HIDE_QUERY": "Hide query",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "<b class=\"ion-person\"></b> Members input/output",
+        "EXISTING_TRANSACTION": "<b class=\"ion-card\"></b> Having transactions",
+        "PERIOD": "<b class=\"ion-clock\"></b> Between <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) and <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Computed by {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Transactions concerning <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Error while searching blocks."
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Main activity",
+    "GENERAL_DIVIDER": "Basic information",
+    "LOCATION_DIVIDER": "Address",
+    "SOCIAL_NETWORKS_DIVIDER": "Social networks, web sites",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "BTN_SHOW_WOT": "People",
+    "BTN_SHOW_WOT_HELP": "Search for people",
+    "BTN_SHOW_PAGES": "Pages",
+    "BTN_SHOW_PAGES_HELP": "Search for pages",
+    "BTN_NEW": "New page",
+    "MY_PAGES": "My pages",
+    "NO_PAGE": "No page",
+    "SEARCH": {
+      "TITLE": "Pages",
+      "SEARCH_HELP": "What, Who: hairdresser, Lili's restaurant, ...",
+      "BTN_ADD": "New",
+      "BTN_LAST_RECORDS": "Recent pages",
+      "BTN_ADVANCED_SEARCH": "Advanced search",
+      "BTN_OPTIONS": "Advanced search",
+      "TYPE": "Kind of organization",
+      "LOCATION_HELP": "Where: City, Country",
+      "RESULTS": "Results",
+      "RESULT_COUNT_LOCATION": "{{count}} result{{count>0?'s':''}}, near {{location}}",
+      "RESULT_COUNT": "{{count}} result{{count>0?'s':''}}",
+      "LAST_RECORDS": "Recent pages",
+      "LAST_RECORD_COUNT_LOCATION": "{{count}} recent page{{count>0?'s':''}}, near {{location}}",
+      "LAST_RECORD_COUNT": "{{count}} recent page{{count>0?'s':''}}",
+      "POPOVER_FILTERS": {
+        "BTN_ADVANCED_SEARCH": "Advanced options?"
+      }
+    },
+    "VIEW": {
+      "TITLE": "Registry",
+      "CATEGORY": "Main activity:",
+      "LOCATION": "Address:",
+      "MENU_TITLE": "Options",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Are you sure you want to delete this reference?<br/><br/>This is irreversible."
+    },
+    "TYPE": {
+      "TITLE": "New page",
+      "SELECT_TYPE": "Kind of organization:",
+      "ENUM": {
+        "SHOP": "Local shops",
+        "COMPANY": "Company",
+        "ASSOCIATION": "Association",
+        "INSTITUTION": "Institution"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Edit",
+      "TITLE_NEW": "New page",
+      "RECORD_TYPE":"Kind of organization",
+      "RECORD_TITLE": "Name",
+      "RECORD_TITLE_HELP": "Name",
+      "RECORD_DESCRIPTION": "Description",
+      "RECORD_DESCRIPTION_HELP": "Describe activity",
+      "RECORD_ADDRESS": "Street",
+      "RECORD_ADDRESS_HELP": "Street, building...",
+      "RECORD_CITY": "City",
+      "RECORD_CITY_HELP": "City, Country",
+      "RECORD_SOCIAL_NETWORKS": "Social networks and web site",
+      "RECORD_PUBKEY": "Public key",
+      "RECORD_PUBKEY_HELP": "Public key to receive payments"
+    },
+    "WALLET": {
+      "PAGE_DIVIDER": "Pages",
+      "PAGE_DIVIDER_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>."
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Loading main activities failed",
+      "LOAD_RECORD_FAILED": "Loading failed",
+      "LOOKUP_RECORDS_FAILED": "Error while loading records.",
+      "REMOVE_RECORD_FAILED": "Deleting failed",
+      "SAVE_RECORD_FAILED": "Saving failed",
+      "RECORD_NOT_EXISTS": "Record not found",
+      "GEO_LOCATION_NOT_FOUND": "City or zip code not found"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Page successfully deleted",
+      "RECORD_SAVED": "Page successfully saved"
+    }
+  },
+  "PROFILE": {
+    "PROFILE_DIVIDER": "Cesium+ profile",
+    "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>.",
+    "NO_PROFILE_DEFINED": "No Cesium+ profile",
+    "BTN_ADD": "Create my profile",
+    "BTN_EDIT": "Edit my profile",
+    "BTN_DELETE": "Delete my profile",
+    "BTN_REORDER": "Reorder",
+    "UID": "Pseudonym",
+    "TITLE": "Lastname, FirstName",
+    "TITLE_HELP": "Name",
+    "DESCRIPTION": "About me",
+    "DESCRIPTION_HELP": "About me...",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "General data",
+    "SOCIAL_NETWORKS_DIVIDER": "Social networks and web site",
+    "TECHNICAL_DIVIDER": "Technical data",
+    "MODAL_AVATAR": {
+      "TITLE": "Avatar",
+      "SELECT_FILE_HELP": "<b>Choose an image file</b>, by clicking on the button below:",
+      "BTN_SELECT_FILE": "Choose an image",
+      "RESIZE_HELP": "<b>Re-crop the image</b> if necessary. A click on the image allows to move it. Click on the area at the bottom left to zoom in.",
+      "RESULT_HELP": "<b>Here is the result</b> as seen on your profile:"
+    },
+    "CONFIRM": {
+      "DELETE": "Are you sure you want to <b>delete your Cesium+ profile ?</b><br/><br/>This operation is irreversible."
+    },
+    "ERROR": {
+      "REMOVE_PROFILE_FAILED": "Deleting profile failed",
+      "LOAD_PROFILE_FAILED": "Could not load user profile.",
+      "SAVE_PROFILE_FAILED": "Saving profile failed",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Invalid format: please fill a valid Internet address.<br/><br/>Examples :<ul><li>- A Facebook page (https://www.facebook.com/user)</li><li>- A web page (http://www.domain.com)</li><li>- An email address (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Error while resizing picture"
+    },
+    "INFO": {
+      "PROFILE_REMOVED": "Profile deleted",
+      "PROFILE_SAVED": "Profile saved"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "Please note that the information published here <b>is public</b>: visible including by <b>not logged in people</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"
+    }
+  },
+  "LOCATION": {
+    "BTN_GEOLOC_ADDRESS": "Find my address on the map",
+    "USE_GEO_POINT": "Appear on {{'COMMON.APP_NAME'|translate}} maps?",
+    "LOADING_LOCATION": "Searching address...",
+    "LOCATION_DIVIDER": "Localisation",
+    "ADDRESS": "Address",
+    "ADDRESS_HELP": "Address (optional)",
+    "CITY": "City",
+    "CITY_HELP": "City, Country",
+    "DISTANCE": "Maximum distance around the city",
+    "DISTANCE_UNIT": "mi",
+    "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+    "SEARCH_HELP": "City, Country",
+    "PROFILE_POSITION": "Profile position",
+    "MODAL": {
+      "TITLE": "Search address",
+      "SEARCH_HELP": "City, Country",
+      "ALTERNATIVE_RESULT_DIVIDER": "Alternative results for <b>{{address}}</b>:",
+      "POSITION": "lat/lon : {{lat}} / {{lon}}"
+    },
+    "ERROR": {
+      "CITY_REQUIRED_IF_STREET": "Required if a street has been filled",
+      "REQUIRED_FOR_LOCATION": "Required field to appear on the map",
+      "INVALID_FOR_LOCATION": "Unknown address",
+      "GEO_LOCATION_FAILED": "Unable to retrieve your current position. Please use the search button.",
+      "ADDRESS_LOCATION_FAILED": "Unable to retrieve the address position"
+    }
+  },
+  "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Online services",
+    "SUBSCRIPTION_DIVIDER_HELP": "Online services offer optional additional services, delegated to a third party.",
+    "BTN_ADD": "Add a service",
+    "BTN_EDIT": "Manage my services",
+    "NO_SUBSCRIPTION": "No service defined",
+    "SUBSCRIPTION_COUNT": "Services / Subscription",
+    "EDIT": {
+      "TITLE": "Online services",
+      "HELP_TEXT": "Manage your subscriptions and other online services here",
+      "PROVIDER": "Provider:"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Receive email notifications"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Are you sur you want to <b>delete this subscription</b>?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Error while loading online services",
+      "ADD_SUBSCRIPTION_FAILED": "Error while adding subscription",
+      "UPDATE_SUBSCRIPTION_FAILED": "Error during subscription update",
+      "DELETE_SUBSCRIPTION_FAILED": "Error while deleting subscription"
+    },
+    "MODAL_EMAIL": {
+      "TITLE" : "Notification by email",
+      "HELP" : "Fill out this form to <b>be notified by email</ b> of your account's events. <br/>Your email address will be encrypted only to be visible to the service provider.",
+      "EMAIL_LABEL" : "Your email:",
+      "EMAIL_HELP": "john@domain.com",
+      "FREQUENCY_LABEL": "Frequency of notifications:",
+      "FREQUENCY_DAILY": "Daily",
+      "FREQUENCY_WEEKLY": "Weekly",
+      "PROVIDER": "Service Provider:"
+    }
+  },
+  "DOCUMENT": {
+    "HASH": "Hash: ",
+    "LOOKUP": {
+      "TITLE": "Document search",
+      "BTN_ACTIONS": "Actions",
+      "SEARCH_HELP": "issuer:AAA*, time:1508406169",
+      "LAST_DOCUMENTS_DOTS": "Last documents:",
+      "LAST_DOCUMENTS": "Last documents",
+      "SHOW_QUERY": "Show query",
+      "HIDE_QUERY": "Hide query",
+      "HEADER_TIME": "Time/Hour",
+      "HEADER_ISSUER": "Issuer",
+      "HEADER_RECIPIENT": "Recipient",
+      "READ": "Read",
+      "BTN_REMOVE": "Delete this document",
+      "BTN_COMPACT": "Compact",
+      "HAS_CREATE_OR_UPDATE_PROFILE": "create or edit his profile",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Actions",
+        "REMOVE_ALL": "Delete these documents..."
+      }
+    },
+    "INFO": {
+      "REMOVED": "Deleted document"
+    },
+    "CONFIRM": {
+      "REMOVE": "Are you sure you want to <b>delete this document</b>?",
+      "REMOVE_ALL": "Are you sure you want to <b>delete these documents</b>?"
+    },
+    "ERROR": {
+      "LOAD_DOCUMENTS_FAILED": "Error searching documents",
+      "REMOVE_FAILED": "Error deleting the document",
+      "REMOVE_ALL_FAILED": "Error deleting documents"
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "PLUGIN_NAME_HELP": "User profiles, notifications, private messages",
+    "ENABLE_TOGGLE": "Enable extension?",
+    "ENABLE_REMOTE_STORAGE": "Enable remote storage for settings?",
+    "ENABLE_REMOTE_STORAGE_HELP": "Enables (encrypted) storage of your settings on Cesium + nodes",
+    "ENABLE_MESSAGE_TOGGLE": "Enable private messages?",
+    "PEER": "Data peer address",
+    "POPUP_PEER": {
+      "TITLE" : "Data peer",
+      "HELP" : "Set the address of the peer to use:",
+      "PEER_HELP": "server.domain.com:port"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Notifications",
+      "HELP_TEXT": "Enable the types of notifications you want to receive:",
+      "ENABLE_TX_SENT": "Notify the validation of <b>sent payments</b>?",
+      "ENABLE_TX_RECEIVED": "Notify the validation of <b>received payments</b>?",
+      "ENABLE_CERT_SENT": "Notify the validation of <b>sent certifications</b>?",
+      "ENABLE_CERT_RECEIVED": "Notify the validation of <b>received certifications</b>?",
+      "ENABLE_HTML5_NOTIFICATION": "Warn with each new notification?",
+      "ENABLE_HTML5_NOTIFICATION_HELP": "Opens a small popup window with each new notification."
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Optional features",
+      "ASK_ENABLE": "Cesium+ extension is <b>disabled</b> in your settings, making some features inactive: <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> user profiles</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Private messages</b>.</ul><br/><br/><b>Do you want to enable</b> the extension?"
+    }
+  },
+  "ES_WALLET": {
+    "ERROR": {
+      "RECIPIENT_IS_MANDATORY": "A recipient is required for encryption."
+    },
+    "ES_PEER": {
+      "NAME": "Name",
+      "DOCUMENTS": "Documents",
+      "SOFTWARE": "Software",
+      "DOCUMENT_COUNT": "Number of documents",
+      "EMAIL_SUBSCRIPTION_COUNT": "{{emailSubscription}} subscribers to email notification"
+    }
+  },
+  "EVENT": {
+    "NODE_STARTED": "Your node ES API <b>{{params[0]}}</b> is UP",
+    "NODE_BMA_DOWN": "Node <b>{{params[0]}}:{{params[1]}}</b> (used by your ES API) is <b>unreachable</b>.",
+    "NODE_BMA_UP": "Node <b>{{params[0]}}:{{params[1]}}</b> is reachable again.",
+    "MEMBER_JOIN": "You are now a <b>member</b> of currency <b>{{params[0]}}</b>!",
+    "MEMBER_LEAVE": "You are <b>not a member anymore</b> of currency <b>{{params[0]}}</b>!",
+    "MEMBER_EXCLUDE": "You are <b>not more member</b> of the currency <b>{{params[0]}}</b>, for lack of renewal or lack of certifications.",
+    "MEMBER_REVOKE": "Your account has been revoked. It will no longer be a member of the currency <b>{{params[0]}}</b>.",
+    "MEMBER_ACTIVE": "Your membership to <b>{{params[0]}}</b> has been <b>renewed successfully</b>.",
+    "TX_SENT": "Your payment to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",
+    "TX_SENT_MULTI": "Your payment to <b>{{params[1]}}</b> was executed.",
+    "TX_RECEIVED": "You received a payment from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "You received a payment from <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Your <b>certification</b> to <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> was executed.",
+    "CERT_RECEIVED": "You  have <b>received a certification</b> from <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "USER": {
+      "LIKE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> like your profile",
+      "FOLLOW_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> follows your activity",
+      "STAR_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> rated you ({{params[3]}} <i class=\"ion-star\">)",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the profile: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> reported a profile to be deleted: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your profile"
+    },
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on your referencing: <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on your referencing: <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has replied to your comment on the referencing: <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has commented on the page: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his comment on the page: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> added a page: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> updated the page: <b>{{params[2]}}</b>",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> asks you for a moderation on the page: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> reported a page to be deleted: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has requested moderation on your page: <b>{{params[2]}}</b>"
+    }
+  },
+  "LIKE": {
+    "ERROR": {
+      "FAILED_TOGGLE_LIKE": "Unable to execute this action."
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Data node <b>{{old}}</b> unreachable or invalid address.<br/><br/>Do you want to temporarily use the data node <b>{{new}}</b>?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Data node <b>{{server}}</b> unreachable or invalid address.<br/><br/>Cesium will continue to work, <b>without the Cesium+</b> extension (user profiles, private messages, maps and graphics).<br/><br/>Check your Internet connection, or change data node in <a class=\"positive\" ng-click=\"doQuickFix('settings')\">extension settings</a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
+  }
+}
+);
+
+$translateProvider.translations("eo-EO", {
+  "COMMON": {
+    "CATEGORY": "Kategorio",
+    "CATEGORIES": "Kategorioj",
+    "CATEGORY_SEARCH_HELP": "Serĉado",
+    "COMMENT_HELP": "Komento",
+    "LAST_MODIFICATION_DATE": "Äœisdatigita la",
+    "SUBMIT_BY": "Submetita de",
+    "BTN_LIKE": "Mi ŝatas",
+    "LIKES_TEXT": "{{total}} persono{{total > 1 ? 'j' : ''}} ŝatis tiun ĉi paĝon",
+    "ABUSES_TEXT": "{{total}} persono{{total > 1 ? 'j' : ''}} atentigis pri problemo",
+    "BTN_REPORT_ABUSE_DOTS": "Atentigi pri problemo aÅ­ misuzo...",
+    "BTN_REMOVE_REPORTED_ABUSE": "Nuligi mian atentigon",
+    "BTN_PUBLISH": "Publikigi",
+    "BTN_PICTURE_DELETE": "Forigi",
+    "BTN_PICTURE_FAVORISE": "Precipa",
+    "BTN_PICTURE_ROTATE": "Turni",
+    "BTN_ADD_PICTURE": "Aldoni foton",
+    "NOTIFICATION": {
+      "TITLE": "Nova avizo | {{'COMMON.APP_NAME'|translate}}",
+      "HAS_UNREAD": "Vi havas {{count}} avizo{{count>0?'j':''}}n ne legita{{count>0?'j':''}}n"
+    },
+    "NOTIFICATIONS": {
+      "TITLE": "Avizoj",
+      "MARK_ALL_AS_READ": "Ĉion marki legita",
+      "NO_RESULT": "Neniu avizo",
+      "SHOW_ALL": "Vidi ĉion",
+      "LOAD_NOTIFICATIONS_FAILED": "Malsukceso por ŝarĝi la avizojn"
+    },
+    "REPORT_ABUSE": {
+      "TITLE": "Atentigi pri problemo",
+      "SUB_TITLE": "Bonvolu klarigi rapide la problemon:",
+      "REASON_HELP": "Mi klarigas la problemon...",
+      "ASK_DELETE": "Peti la forigon?",
+      "CONFIRM": {
+        "SENT": "Atentigo sendita. Dankon!"
+      }
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Paĝoj",
+    "USER_PROFILE": "Mia profilo",
+    "MESSAGES": "Mesaĝoj",
+    "NOTIFICATIONS": "Avizoj",
+    "INVITATIONS": "Invitoj"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Konto por organizaĵo",
+      "ORGANIZATION_ACCOUNT_HELP": "Se vi reprezentas entreprenon, asocion, ktp.<br/>Neniu universala dividendo estos kreita per tiu ĉi konto."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "Vi povas <a ui-sref=\"app.edit_profile\">tajpi vian profilon Cesium+</a> (kromebleco) por disponi pli bonan videblecon por via konto."
+    },
+    "ERROR": {
+      "WS_CONNECTION_FAILED": "Cesium ne povas ricevi la avizojn pro teknika eraro (konekto al la daten-nodo Cesium+).<br/><br/>Se la problemo daŭradas, bonvolu <b>elekti alian daten-nodon</b> ĉe la parametroj Cesium+."
+    }
+  },
+  "WOT": {
+    "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Sugesti identecojn atestotajn...",
+    "BTN_ASK_CERTIFICATIONS_DOTS": "Peti membrojn atesti min...",
+    "BTN_ASK_CERTIFICATION": "Peti atestaĵon",
+    "SUGGEST_CERTIFICATIONS_MODAL": {
+      "TITLE": "Sugesti atestadojn",
+      "HELP": "Elekti viajn sugestojn"
+    },
+    "ASK_CERTIFICATIONS_MODAL": {
+      "TITLE": "Peti atestaĵojn",
+      "HELP": "Elekti la ricevontojn"
+    },
+    "SEARCH": {
+      "DIVIDER_PROFILE": "Kontoj",
+      "DIVIDER_PAGE": "Paĝoj",
+      "DIVIDER_GROUP": "Grupoj"
+    },
+    "CONFIRM": {
+      "SUGGEST_CERTIFICATIONS": "Ĉu vi certas, ke vi volas <b>sendi tiujn sugestojn por atestado</b>?",
+      "ASK_CERTIFICATION": "Ĉu vi certas, ke vi volas <b>sendi atesto-peton</b>?",
+      "ASK_CERTIFICATIONS": "Ĉu vi certas, ke vi volas <b>sendi atesto-peton</b> al tiuj personoj?"
+    }
+  },
+  "INVITATION": {
+    "TITLE": "Invitoj",
+    "NO_RESULT": "Neniu invito atendanta",
+    "BTN_DELETE_ALL": "Forigi ĉiujn invitojn",
+    "BTN_DELETE": "Forigi la inviton",
+    "BTN_NEW_INVITATION": "Nova invito",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> petas vian atestadon",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> estas sugestita al vi por atestado",
+    "SUGGESTED_BY": "Sugesto sendita de <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitoj"
+    },
+    "LIST": {
+      "TITLE": "Invitoj"
+    },
+    "NEW": {
+      "TITLE": "Nova invito",
+      "RECIPIENTS": "Al",
+      "RECIPIENTS_HELP": "Ricevontoj de la invito",
+      "RECIPIENTS_MODAL_TITLE": "Ricevontoj",
+      "RECIPIENTS_MODAL_HELP": "Bonvolu elekti la ricevontojn:",
+      "SUGGESTION_IDENTITIES": "Sugestoj por atestado",
+      "SUGGESTION_IDENTITIES_HELP": "Atestadoj sugestotaj",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Sugestoj",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Bonvolu elekti viajn sugestojn:"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "La forigo de la invitoj estas <b>neinversigebla ago</b>.<br/><br/><b>Ĉu vi certas</b>, ke vi volas daŭrigi?",
+      "SEND_INVITATIONS_TO_CERTIFY": "Ĉu vi certas, ke vi volas <b>sendi tiun inviton atestotan</b>?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invito sendita"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Malsukceso por ŝarĝi la invitojn",
+      "REMOVE_INVITATION_FAILED": "Eraro dum la forigo de la invito",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Eraro dum la forigo de la invitoj",
+      "SEND_INVITATION_FAILED": "Eraro dum la sendo de la invito",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invito nelegebla (strukturo nekonata)</span> - sendita de <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Komentoj",
+    "SHOW_MORE_COMMENTS": "Afiŝi la antaŭajn komentojn",
+    "COMMENT_HELP": "Via komento, demando, ktp.",
+    "COMMENT_HELP_REPLY_TO": "Via respondo...",
+    "BTN_SEND": "Sendi",
+    "POPOVER_SHARE_TITLE": "Mesaĝo #{{number}}",
+    "REPLY": "Respondi",
+    "REPLY_TO": "Respondo al:",
+    "REPLY_TO_LINK": "Responde al ",
+    "REPLY_TO_DELETED_COMMENT": "Responde al forigita komento",
+    "REPLY_COUNT": "{{replyCount}} respondoj",
+    "DELETED_COMMENT": "Komento forigita",
+    "MODIFIED_ON": "modifita la {{time|formatDate}}",
+    "MODIFIED_PARENTHESIS": "(modifita poste)",
+    "ERROR": {
+      "FAILED_SAVE_COMMENT": "Eraro dum la konservo de la komento",
+      "FAILED_REMOVE_COMMENT": "Eraro dum la forigo de la komento"
+    }
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Resp: ",
+    "FORWARD_TITLE_PREFIX": "Tr: ",
+    "BTN_REPLY": "Respondi",
+    "BTN_COMPOSE": "Nova mesaĝo",
+    "BTN_WRITE": "Skribi",
+    "NO_MESSAGE_INBOX": "Neniu mesaĝo ricevita",
+    "NO_MESSAGE_OUTBOX": "Neniu mesaĝo sendita",
+    "NOTIFICATIONS": {
+      "TITLE": "Mesaĝoj",
+      "MESSAGE_RECEIVED": "Vi <b>ricevis mesaĝon</b><br/>de"
+    },
+    "LIST": {
+      "INBOX": "Ricevujo",
+      "OUTBOX": "Senditaj mesaĝoj",
+      "LAST_INBOX": "Novaj mesaĝoj",
+      "LAST_OUTBOX": "Senditaj mesaĝoj",
+      "BTN_LAST_MESSAGES": "Freŝdataj mesaĝoj",
+      "TITLE": "Mesaĝoj",
+      "SEARCH_HELP": "Serĉado en la mesaĝoj",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Kromaĵoj",
+        "DELETE_ALL": "Forigi ĉiujn mesaĝojn"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "Nova mesaĝo",
+      "TITLE_REPLY": "Respondi",
+      "SUB_TITLE": "Nova mesaĝo",
+      "TO": "Al",
+      "OBJECT": "Temo",
+      "OBJECT_HELP": "Temo",
+      "ENCRYPTED_HELP": "Bonvolu noti, ke tiu ĉi mesaĝo estos ĉifrita antaŭ sendo, tiel ke nur la adresato povos legi ĝin, kaj ke li estos certa, ke vi ja estas ties aŭtoro.",
+      "MESSAGE": "Mesaĝo",
+      "MESSAGE_HELP": "Enhavo de la mesaĝo",
+      "CONTENT_CONFIRMATION": "La enhavo de la mesaĝo estas malplena.<br/><br/>Ĉu vi volas tamen sendi la mesaĝon?"
+    },
+    "VIEW": {
+      "TITLE": "Mesaĝo",
+      "SENDER": "Sendita de",
+      "RECIPIENT": "Sendita al",
+      "NO_CONTENT": "Mesaĝo malplena",
+      "DELETE": "Forigi la mesaĝon"
+    },
+    "CONFIRM": {
+      "REMOVE": "Ĉu vi certas, ke vi volas <b>forigi tiun ĉi mesaĝon</b>?<br/><br/>Tiu ago estas neinversigebla.",
+      "REMOVE_ALL" : "Ĉu vi certas, ke vi volas <b>forigi ĉiujn mesaĝojn</b>?<br/><br/>Tiu ago estas neinversigebla.",
+      "MARK_ALL_AS_READ": "Ĉu vi certas, ke vi volas <b>marki ĉiujn mesaĝojn legitaj</b>?",
+      "USER_HAS_NO_PROFILE": "Tiu identeco havas neniun profilon Cesium+. Eblas ke ĝi ne uzas la krom-programon Cesium+, kaj <b>do ne legos vian mesaĝon</b>.<br/><br/>Ĉu vi certas, ke vi volas tamen <b>daŭrigi</b>?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Mesaĝo forigita",
+      "All_MESSAGE_REMOVED": "Ĉiuj mesaĝoj estis forigitaj",
+      "MESSAGE_SENT": "Mesaĝo sendita"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Eraro dum la sendo de la mesaĝo.",
+      "LOAD_MESSAGES_FAILED": "Eraro dum la ricevo de la mesaĝoj.",
+      "LOAD_MESSAGE_FAILED": "Eraro dum la ricevo de la mesaĝo.",
+      "MESSAGE_NOT_READABLE": "Legado de la mesaĝo neebla.",
+      "USER_NOT_RECIPIENT": "Vi ne estas la adresato de tiu ĉi mesaĝo: malĉifrado neebla.",
+      "NOT_AUTHENTICATED_MESSAGE": "La aŭtenteco de la mesaĝo estas dubinda aŭ ties enhavo estas difektita.",
+      "REMOVE_MESSAGE_FAILED": "Malsukceso por forigi la mesaĝon",
+      "MESSAGE_CONTENT_TOO_LONG": "Signaro tro longa ({{maxLength}} signoj maksimume).",
+      "MARK_AS_READ_FAILED": "Neeblas marki la mesaĝon 'legita'.",
+      "LOAD_NOTIFICATIONS_FAILED": "Eraro dum la ricevo de la mesaĝo-avizoj.",
+      "REMOVE_All_MESSAGES_FAILED": "Eraro dum la forigo de ĉiuj mesaĝoj.",
+      "MARK_ALL_AS_READ_FAILED": "Eraro por marki la mesaĝojn legitaj.",
+      "RECIPIENT_IS_MANDATORY": "La adresato estas deviga."
+    }
+  },
+  "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Numero de bloko, haketo, publika ŝlosilo, ktp.",
+      "POPOVER_FILTER_TITLE": "Filtriloj",
+      "HEADER_MEDIAN_TIME": "Dato / Horo",
+      "HEADER_BLOCK": "Bloko #",
+      "HEADER_ISSUER": "Nodo elsendinta",
+      "BTN_LAST": "Lastaj blokoj",
+      "DISPLAY_QUERY": "Afiŝi la informpeton",
+      "HIDE_QUERY": "Kaŝi la informpeton",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "<b class=\"ion-person\"></b> Eniroj/eliroj de membroj",
+        "EXISTING_TRANSACTION": "<b class=\"ion-card\"></b> Kun spezoj",
+        "PERIOD": "<b class=\"ion-clock\"></b> Inter <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) kaj <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Kalkulita de <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Spezoj koncernantaj <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Eraro dum la serĉado de la blokoj."
+    }
+  },
+  "GROUP": {
+    "GENERAL_DIVIDER": "Äœeneralaj informoj",
+    "LOCATION_DIVIDER": "Adreso",
+    "SOCIAL_NETWORKS_DIVIDER": "Sociaj retoj kaj retejo",
+    "TECHNICAL_DIVIDER": "Teknikaj informoj",
+    "CREATED_TIME": "Kreita {{creationTime|formatFromNow}}",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitoj"
+    },
+    "LOOKUP": {
+      "TITLE": "Grupoj",
+      "SEARCH_HELP": "Nomo de grupo, vortoj, loko, ktp.",
+      "LAST_RESULTS_LIST": "Novaj grupoj:",
+      "OPEN_RESULTS_LIST": "Malfermitaj grupoj:",
+      "MANAGED_RESULTS_LIST": "Fermitaj grupoj:",
+      "BTN_LAST": "Novaj grupoj",
+      "BTN_NEW": "Mi aldonas grupon"
+    },
+    "TYPE": {
+      "TITLE": "Nova grupo",
+      "SELECT_TYPE": "Tipo de grupo:",
+      "OPEN_GROUP": "Malfermita grupo",
+      "OPEN_GROUP_HELP": "Malfermita grupo estas alirebla de iu ajn membro de la mono.",
+      "MANAGED_GROUP": "Administrita grupo",
+      "MANAGED_GROUP_HELP": "Administrita grupo estas mastrumata de administrantoj kaj moderigantoj, kiuj povas akcepti, rifuzi aÅ­ eksigi membron.",
+      "ENUM": {
+        "OPEN": "Malfermita grupo",
+        "MANAGED": "Administrita grupo"
+      }
+    },
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "MENU_TITLE": "Kromaĵoj",
+      "REMOVE_CONFIRMATION" : "Ĉu vi certas, ke vi volas forigi tiun ĉi grupon?<br/><br/>Tiu ago estas neinversigebla."
+    },
+    "EDIT": {
+      "TITLE": "Grupo",
+      "TITLE_NEW": "Nova grupo",
+      "RECORD_TITLE": "Titolo",
+      "RECORD_TITLE_HELP": "Titolo",
+      "RECORD_DESCRIPTION": "Priskribo",
+      "RECORD_DESCRIPTION_HELP": "Priskribo"
+    },
+    "ERROR": {
+      "SEARCH_GROUPS_FAILED": "Malsukceso por traserĉi grupojn",
+      "REMOVE_RECORD_FAILED": "Malsukceso por forigi la grupon"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Grupo forigita"
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Ĉefa agado",
+    "GENERAL_DIVIDER": "Äœeneralaj informoj",
+    "LOCATION_DIVIDER": "Adreso",
+    "SOCIAL_NETWORKS_DIVIDER": "Sociaj retoj kaj retejo",
+    "TECHNICAL_DIVIDER": "Teknikaj informoj",
+    "BTN_SHOW_WOT": "Personoj",
+    "BTN_SHOW_WOT_HELP": "Traserĉi personojn",
+    "BTN_SHOW_PAGES": "Paĝoj",
+    "BTN_SHOW_PAGES_HELP": "Traserĉi paĝojn",
+    "BTN_NEW": "Krei paĝon",
+    "MY_PAGES": "Miaj paĝoj",
+    "NO_PAGE": "Neniu paĝo",
+    "SEARCH": {
+      "TITLE": "Paĝoj",
+      "SEARCH_HELP": "Kio, Kiu: restoracio, Ĉe Marcelo, ...",
+      "BTN_ADD": "Nova",
+      "BTN_LAST_RECORDS": "Freŝdataj paĝoj",
+      "BTN_ADVANCED_SEARCH": "Sperta serĉado",
+      "BTN_OPTIONS": "Sperta serĉado",
+      "TYPE": "Tipo de paĝo",
+      "LOCATION_HELP": "Kie: Poŝto-kodo, Urbo",
+      "RESULTS": "Rezultoj",
+      "RESULT_COUNT_LOCATION": "{{count}} rezulto{{count>0?'j':''}}, proksime de {{location}}",
+      "RESULT_COUNT": "{{count}} rezulto{{count>0?'j':''}}",
+      "LAST_RECORDS": "Freŝdataj paĝoj",
+      "LAST_RECORD_COUNT_LOCATION": "{{count}} paĝo{{count>0?'j':''}} freŝdata{{count>0?'j':''}}, proksime de {{location}}",
+      "LAST_RECORD_COUNT": "{{count}} paĝo{{count>0?'j':''}} freŝdata{{count>0?'j':''}}",
+      "POPOVER_FILTERS": {
+        "BTN_ADVANCED_SEARCH": "Spertaj kromaĵoj?"
+      }
+    },
+    "VIEW": {
+      "TITLE": "Adresaro",
+      "CATEGORY": "Ĉefa agado:",
+      "LOCATION": "Adreso:",
+      "MENU_TITLE": "Kromaĵoj",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Ĉu vi certas, ke vi volas forigi tiun ĉi paĝon?<br/><br/>Tiu ago estas neinversigebla."
+    },
+    "TYPE": {
+      "TITLE": "Tipoj",
+      "SELECT_TYPE": "Tipo de paĝo:",
+      "ENUM": {
+        "SHOP": "Loka komerco",
+        "COMPANY": "Entrepreno",
+        "ASSOCIATION": "Asocio",
+        "INSTITUTION": "Institucio"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Redaktado",
+      "TITLE_NEW": "Nova paĝo",
+      "RECORD_TYPE":"Tipo de paĝo",
+      "RECORD_TITLE": "Nomo",
+      "RECORD_TITLE_HELP": "Nomo",
+      "RECORD_DESCRIPTION": "Priskribo",
+      "RECORD_DESCRIPTION_HELP": "Priskribo de la agado",
+      "RECORD_ADDRESS": "Strato",
+      "RECORD_ADDRESS_HELP": "Strato, konstruaĵo...",
+      "RECORD_CITY": "Urbo",
+      "RECORD_CITY_HELP": "Urbo",
+      "RECORD_SOCIAL_NETWORKS": "Sociaj retoj kaj retejo",
+      "RECORD_PUBKEY": "Publika ŝlosilo",
+      "RECORD_PUBKEY_HELP": "Publika ŝlosilo por ricevi la pagojn"
+    },
+    "WALLET": {
+      "PAGE_DIVIDER": "Paĝoj",
+      "PAGE_DIVIDER_HELP": "La paĝoj listigas agadojn, kiuj akceptas la liberan monon aŭ helpas ĝin: komercoj, entreprenoj, asocioj, institucioj."
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Malsukceso por ŝarĝi la liston de la agadoj",
+      "LOAD_RECORD_FAILED": "Eraro dum la ŝarĝado de la paĝo",
+      "LOOKUP_RECORDS_FAILED": "Eraro dum la serĉado",
+      "REMOVE_RECORD_FAILED": "Malsukceso por forigi la paĝon",
+      "SAVE_RECORD_FAILED": "Eraro dum la konservado",
+      "RECORD_NOT_EXISTS": "Paĝo neekzistanta",
+      "GEO_LOCATION_NOT_FOUND": "Urbo aŭ poŝto-kodo ne trovita"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Paĝo forigita",
+      "RECORD_SAVED": "Paĝo konservita"
+    }
+  },
+  "PROFILE": {
+    "PROFILE_DIVIDER": "Profilo Cesium+",
+    "PROFILE_DIVIDER_HELP": "Temas pri kromaj datenoj, stokitaj ekster la mon-reto.",
+    "NO_PROFILE_DEFINED": "Neniu profilo tajpita",
+    "BTN_ADD": "Tajpi mian profilon",
+    "BTN_EDIT": "Redakti mian profilon",
+    "BTN_DELETE": "Forigi mian profilon",
+    "BTN_REORDER": "Reordigi",
+    "UID": "PseÅ­donimo",
+    "TITLE": "Familia nomo, Persona nomo",
+    "TITLE_HELP": "Familia nomo, Persona nomo",
+    "DESCRIPTION": "Pri mi",
+    "DESCRIPTION_HELP": "Pri mi...",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "Äœeneralaj informoj",
+    "SOCIAL_NETWORKS_DIVIDER": "Sociaj retoj, retejoj",
+    "TECHNICAL_DIVIDER": "Teknikaj informoj",
+    "MODAL_AVATAR": {
+      "TITLE": "Profil-foto",
+      "SELECT_FILE_HELP": "Bonvolu <b>elekti bildo-dosieron</b>, alklakante la ĉi-suban butonon:",
+      "BTN_SELECT_FILE": "Elekti foton",
+      "RESIZE_HELP": "<b>Rekadri la bildon</b>, laŭbezone. Pluigi klakon sur la bildo ebligas movi ĝin. Alklaku la zonon malsupre maldekstre por zomi.",
+      "RESULT_HELP": "<b>Jen la rezulto</b> tiel videbla ĉe via profilo:"
+    },
+    "CONFIRM": {
+      "DELETE": "Ĉu vi certas, ke vi volas <b>forigi vian profilon Cesium+ ?</b><br/><br/>Tiu ago estas neinversigebla."
+    },
+    "ERROR": {
+      "REMOVE_PROFILE_FAILED": "Malsukceso por forigi la profilon",
+      "LOAD_PROFILE_FAILED": "Malsukceso por ŝarĝi la profilon de la uzanto.",
+      "SAVE_PROFILE_FAILED": "Eraro dum la konservado",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Strukturo ne rekonata: bonvolu tajpi validan adreson.<br/><br/>Ezemploj:<ul><li>- Facebook-paĝo (https://www.facebook.com/uzanto)</li><li>- Retpaĝo (http://www.miaretejo.net)</li><li>- Retadreso (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Eraro dum la reformatigo de la bildo"
+    },
+    "INFO": {
+      "PROFILE_REMOVED": "Profilo forigita",
+      "PROFILE_SAVED": "Profilo konservita"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "La informoj afiŝitaj en via profilo <b>estas publikaj</b>: videblaj inkluzive de la personoj <b>ne konektitaj</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"
+    }
+  },
+  "LOCATION": {
+    "BTN_GEOLOC_ADDRESS": "Trovi mian adreson surmape",
+    "USE_GEO_POINT": "Aperi sur la mapoj {{'COMMON.APP_NAME'|translate}}?",
+    "LOADING_LOCATION": "Serĉado de la adreso...",
+    "LOCATION_DIVIDER": "Adreso",
+    "ADDRESS": "Strato",
+    "ADDRESS_HELP": "Strato, adres-aldonaĵo...",
+    "CITY": "Urbo",
+    "CITY_HELP": "Poŝto-kodo, Urbo, Lando",
+    "DISTANCE": "Maksimuma distanco ĉirkaŭ la urbo",
+    "DISTANCE_UNIT": "km",
+    "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+    "SEARCH_HELP": "Poŝto-kodo, Urbo",
+    "PROFILE_POSITION": "Loko de la profilo",
+    "MODAL": {
+      "TITLE": "Serĉado de la adreso",
+      "SEARCH_HELP": "Urbo, Poŝto-kodo, Lando",
+      "ALTERNATIVE_RESULT_DIVIDER": "Alternativaj rezultoj por <b>{{address}}</b>:",
+      "POSITION": "Lat/Lon: {{lat}}/{{lon}}"
+    },
+    "ERROR": {
+      "CITY_REQUIRED_IF_STREET": "Deviga kampo (ĉar strato estas tajpita)",
+      "REQUIRED_FOR_LOCATION": "Deviga kampo por aperi sur la mapo",
+      "INVALID_FOR_LOCATION": "Adreso nekonata",
+      "GEO_LOCATION_FAILED": "Neeblas ricevi vian lokiĝon. Bonvolu uzi la serĉo-butonon.",
+      "ADDRESS_LOCATION_FAILED": "Neeblas ricevi la lokon per la adreso"
+    }
+  },
+  "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Retaj servoj",
+    "SUBSCRIPTION_DIVIDER_HELP": "La retaj servoj proponas pliajn nedevigajn servojn, delegitajn al aliulo.",
+    "BTN_ADD": "Aldoni servon",
+    "BTN_EDIT": "Mastrumi miajn servojn",
+    "NO_SUBSCRIPTION": "Neniu servo uzata",
+    "SUBSCRIPTION_COUNT": "Servoj / Abonoj",
+    "EDIT": {
+      "TITLE": "Retaj servoj",
+      "HELP_TEXT": "Mastrumu ĉi tie viajn abonojn kaj aliajn retajn servojn",
+      "PROVIDER": "Provizanto:"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Ricevi la avizojn per retmesaĝo"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Ĉu vi certas, ke vi volas <b>forigi tiun abonon</b>?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Eraro dum la ŝarĝo de la retaj servoj",
+      "ADD_SUBSCRIPTION_FAILED": "Malsukceso por sendi la abonon",
+      "UPDATE_SUBSCRIPTION_FAILED": "Malsukceso por ĝisdatigi la abonon",
+      "DELETE_SUBSCRIPTION_FAILED": "Eraro dum la forigo de la abono"
+    },
+    "MODAL_EMAIL": {
+      "TITLE" : "Avizo per retmesaĝo",
+      "HELP" : "Plenigu tiun ĉi formularon por <b>esti avizita per retmesaĝo</b> pri la okazaĵoj ĉe via konto.<br/>Via retadreso estos ĉifrita por esti videbla nur de la servo-provizanto.",
+      "EMAIL_LABEL" : "Via retadreso:",
+      "EMAIL_HELP": "johano.stelaro@esperanto.org",
+      "FREQUENCY_LABEL": "Periodo de la avizoj:",
+      "FREQUENCY_DAILY": "Ĉiutaga",
+      "FREQUENCY_WEEKLY": "Ĉiusemajna",
+      "PROVIDER": "Servo-provizanto:"
+    }
+  },
+  "DOCUMENT": {
+    "HASH": "Haketo: ",
+    "LOOKUP": {
+      "TITLE": "Serĉado de dokumentoj",
+      "BTN_ACTIONS": "Agoj",
+      "SEARCH_HELP": "Sendanto:AAA*, tempo:1508406169",
+      "LAST_DOCUMENTS_DOTS": "Lastaj dokumentoj:",
+      "LAST_DOCUMENTS": "Lastaj dokumentoj",
+      "SHOW_QUERY": "Vidi la informpeton",
+      "HIDE_QUERY": "Kaŝi la informpeton",
+      "HEADER_TIME": "Dato/Horo",
+      "HEADER_ISSUER": "Sendanto",
+      "HEADER_RECIPIENT": "Ricevonto",
+      "READ": "Legita",
+      "BTN_REMOVE": "Forigi tiun ĉi dokumenton",
+      "BTN_COMPACT": "Densigi",
+      "HAS_CREATE_OR_UPDATE_PROFILE": "kreis aÅ­ modifis sian profilon",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Agoj",
+        "REMOVE_ALL": "Forigi tiujn ĉi dokumentojn..."
+      }
+    },
+    "INFO": {
+      "REMOVED": "Dokumento forigita"
+    },
+    "CONFIRM": {
+      "REMOVE": "Ĉu vi certas, ke vi volas <b>forigi tiun ĉi dokumenton</b>?",
+      "REMOVE_ALL": "Ĉu vi certas, ke vi volas <b>forigi tiujn ĉi dokumentojn</b>?"
+    },
+    "ERROR": {
+      "LOAD_DOCUMENTS_FAILED": "Eraro dum la serĉado de dokumentoj",
+      "REMOVE_FAILED": "Eraro dum la forigo de la dokumento",
+      "REMOVE_ALL_FAILED": "Eraro dum la forigo de la dokumentoj"
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "PLUGIN_NAME_HELP": "Profiloj, avizoj, privataj mesaĝoj",
+    "ENABLE_TOGGLE": "Aktivigi la krom-programon?",
+    "ENABLE_REMOTE_STORAGE": "Aktivigi la foran stokadon?",
+    "ENABLE_REMOTE_STORAGE_HELP": "Ebligas stoki (ĉifrite) viajn parametrojn ĉe la nodoj Cesium+",
+    "ENABLE_MESSAGE_TOGGLE": "Aktivigi la privatajn mesaĝojn?",
+    "PEER": "Adreso de la daten-nodo",
+    "POPUP_PEER": {
+      "TITLE" : "Daten-nodo",
+      "HELP" : "Tajpu la adreson de la nodo, kiun vi volas uzi:",
+      "PEER_HELP": "servo.domajno.com:port"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Avizoj",
+      "HELP_TEXT": "Aktivigu la avizo-tipojn, kiujn vi deziras ricevi:",
+      "ENABLE_TX_SENT": "Avizi pri la <b>senditaj pagoj</b>?",
+      "ENABLE_TX_RECEIVED": "Avizi pri la <b>ricevitaj pagoj</b>?",
+      "ENABLE_CERT_SENT": "Avizi pri la <b>senditaj atestaĵoj</b>?",
+      "ENABLE_CERT_RECEIVED": "Avizi pri <b>la ricevitaj atestaĵoj</b>?",
+      "ENABLE_HTML5_NOTIFICATION": "Anonci ĉiun novan avizon?",
+      "ENABLE_HTML5_NOTIFICATION_HELP": "Malfermas fenestreton por ĉiu nova avizo."
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Kromaj funkcioj",
+      "ASK_ENABLE": "La krom-programo Cesium+ estas <b>malaktivigita</b> ĉe viaj parametroj, kio senaktivigas la funkciojn: <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Profiloj Cesium+</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Avizoj</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Privataj mesaĝoj</b>.<li>&nbsp;&nbsp;<b><i class=\"icon ion-location\"></i> Mapoj, ktp.</b>.</ul><br/><b>Ĉu vi deziras reaktivigi</b> la krom-programon?"
+    }
+  },
+  "ES_WALLET": {
+    "ERROR": {
+      "RECIPIENT_IS_MANDATORY": "Adresito estas deviga por la ĉifrado."
+    }
+  },
+  "ES_PEER": {
+    "NAME": "Nomo",
+    "DOCUMENTS": "Dokumentoj",
+    "SOFTWARE": "Programo",
+    "DOCUMENT_COUNT": "Nombro de dokumentoj",
+    "EMAIL_SUBSCRIPTION_COUNT": "{{emailSubscription}} abonantoj pri avizoj per retmesaĝoj"
+  },
+  "EVENT": {
+    "NODE_STARTED": "Via nodo ES API <b>{{params[0]}}</b> ekis",
+    "NODE_BMA_DOWN": "La nodo <b>{{params[0]}}:{{params[1]}}</b> (uzata de via nodo ES API) estas <b>neatingebla</b>.",
+    "NODE_BMA_UP": "La nodo <b>{{params[0]}}:{{params[1]}}</b> estas denove alirebla.",
+    "MEMBER_JOIN": "Vi estas nun <b>membro</b> de la mono <b>{{params[0]}}</b>!",
+    "MEMBER_LEAVE": "Vi <b>ne plu estas membro</b> de la mono <b>{{params[0]}}</b>!",
+    "MEMBER_EXCLUDE": "Vi <b>ne plu estas membro</b> de la mono <b>{{params[0]}}</b>, pro ne revalidiĝo aŭ pro manko da atestaĵoj.",
+    "MEMBER_REVOKE": "La nuligo de via konto efektiviĝis. Ĝi ne plu povos esti membro-konto de la mono <b>{{params[0]}}</b>.",
+    "MEMBER_ACTIVE": "La revalidiĝo de via aliĝo al la mono <b>{{params[0]}}</b> estis <b>ricevita</b>.",
+    "TX_SENT": "Via <b>pago</b> al <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> efektiviĝis.",
+    "TX_SENT_MULTI": "Via <b>pago</b> al <b>{{params[1]}}</b> efektiviĝis.",
+    "TX_RECEIVED": "Vi <b>ricevis pagon</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "Vi <b>ricevis pagon</b> de <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Via <b>atestado</b> al <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> efektiviĝis.",
+    "CERT_RECEIVED": "Vi <b>ricevis atestaĵon</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "USER": {
+      "LIKE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ŝatas vian profilon",
+      "FOLLOW_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> sekvas viajn agojn",
+      "STAR_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> notis vin ({{params[3]}} <b class=\"ion-star\">)",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> petas de vi moderigon pri la profilo: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri profilo foriginda: <b>{{params[2]}}</b>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri via profilo"
+    },
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> komentis vian anoncon: <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian komenton pri via anonco: <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> respondis al via komento pri la anonco: <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian respondon al via komento pri la anonco: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> komentis la paĝon: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis sian komenton ĉe la paĝo: <b>{{params[2]}}</b>",
+      "FOLLOW_NEW": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> aldonis la paĝon: <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> modifis la paĝon: <b>{{params[2]}}</b>",
+      "MODERATION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> petas de vis moderigon pri la paĝo: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri paĝo foriginda: <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> atentigis pri via paĝo: <b>{{params[2]}}</b>"
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Daten-nodo <b>{{old}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Ĉu vi volas provizore uzi la daten-nodon <b>{{new}}</b> ?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Daten-nodo <b>{{server}}</b> neatingebla aŭ adreso nevalida.<br/><br/>Cesium daŭrigos funkcii, <b>sen la krom-programo Cesium+</b> (uzanto-profiloj, privataj mesaĝoj, mapoj kaj grafikoj)<br/><br/>Kontrolu vian ret-konekton, aŭ ŝanĝu daten-nodon ĉe la <a class=\"positive\" ng-click=\"doQuickFix('settings')\">parametroj de la krom-programo</a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "La kvanto de datenoj sendotaj superas la limon fiksitan de la servilo.<br/>Bonvolu reprovi post, ekzemple, forigo de fotoj."
+  }
+}
+);
+
+$translateProvider.translations("es-ES", {
+  "COMMON": {
+    "CATEGORY": "Categoría",
+    "CATEGORIES": "Categorías",
+    "CATEGORY_SEARCH_HELP": "Búsqueda",
+    "LAST_MODIFICATION_DATE": "Actualización el",
+    "SUBMIT_BY": "Sometido por",
+    "BTN_PUBLISH": "Publicar",
+    "BTN_PICTURE_DELETE": "Suprimir",
+    "BTN_PICTURE_FAVORISE": "Principal",
+    "BTN_PICTURE_ROTATE": "Girar",
+    "BTN_ADD_PICTURE": "Añadir una foto",
+    "NOTIFICATIONS": {
+      "TITLE": "Notificaciónes",
+      "MARK_ALL_AS_READ": "Marcar todo como leído",
+      "NO_RESULT": "Ningúna notificación",
+      "SHOW_ALL": "Ver todo",
+      "LOAD_NOTIFICATIONS_FAILED": "Fracaso en la carga de las notificaciónes"
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Profesionales",
+    "USER_PROFILE": "Mi perfil",
+    "MESSAGES": "Mensajes",
+    "NOTIFICATIONS": "Notificaciónes",
+    "INVITATIONS": "Invitaciónes"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Cuenta para una organización",
+      "ORGANIZATION_ACCOUNT_HELP": "Si representa una empresa, una asociación, etc.<br/>Ningún dividendo universal será creído por esta cuenta."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "Para obtener sus certificaciónes más rapidamente, completa <a ui-sref=\"app.edit_profile\">su perfil usuario</a>. Los miembros concederán más fácilmente su confianza a una identidad verificable."
+    },
+    "ERROR": {
+      "WS_CONNECTION_FAILED": "Cesium no puede recibir las notificaciónes, a causa de un error técnico (conexión al nodo de datos Cesium+).<br/><br/>Si el problema persiste, por favor <b>elige un otro nodo de datos</b> en las configuraciónes Cesium+."
+    }
+  },
+  "WOT": {
+    "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Sugerir identidad a certificar...",
+    "BTN_ASK_CERTIFICATIONS_DOTS": "Solicitar otros miembros a certificarme…",
+    "BTN_ASK_CERTIFICATION": "Solicitar una certificación",
+    "SUGGEST_CERTIFICATIONS_MODAL": {
+      "TITLE": "Sugerir certificaciónes",
+      "HELP": "Selectionar sus sugerencias"
+    },
+    "ASK_CERTIFICATIONS_MODAL": {
+      "TITLE": "Solicitar certificaciónes",
+      "HELP": "Selectionar los destinatarios"
+    },
+    "SEARCH": {
+      "DIVIDER_PROFILE": "Cuentas",
+      "DIVIDER_PAGE": "Páginas",
+      "DIVIDER_GROUP": "Grupos"
+    },
+    "CONFIRM": {
+      "SUGGEST_CERTIFICATIONS": "Está usted segura/o querer <b>mandar estas sugerencia de certificatión</b> ?",
+      "ASK_CERTIFICATION": "Está usted segura/o querer <b>mandar una solicitud de certificación</b> ?",
+      "ASK_CERTIFICATIONS": "Está usted segura/o querer <b>mandar una solicitud de certificación</b> a estas personas ?"
+    }
+  },
+  "INVITATION": {
+    "TITLE": "Invitaciónes",
+    "NO_RESULT": "Ningúna invitación en espera",
+    "BTN_DELETE_ALL": "Suprimir todas las invitaciónes",
+    "BTN_DELETE": "Suprimir la invitación",
+    "BTN_NEW_INVITATION": "Nueva invitación",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> solicita su certificación",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> él es sugerido por certificación",
+    "SUGGESTED_BY": "Sugerencia mandada por <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitaciónes"
+    },
+    "LIST": {
+      "TITLE": "Invitaciónes"
+    },
+    "NEW": {
+      "TITLE": "Nueva invitación",
+      "RECIPIENTS": "A",
+      "RECIPIENTS_HELP": "Destinatarios de la invitación",
+      "RECIPIENTS_MODAL_TITLE": "Destinatarios",
+      "RECIPIENTS_MODAL_HELP": "Por favor, elige los destinatarios :",
+      "SUGGESTION_IDENTITIES": "Sugerencia de certificación",
+      "SUGGESTION_IDENTITIES_HELP": "Certificaciónes a sugerir",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Sugerencias",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Por favor, elige sus sugerencias :"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "La supresión de las invitaciónes es una <b>operación ireversible</b>.<br/><br/><b>Está usted segura/o </b> querer continuar ?",
+      "SEND_INVITATIONS_TO_CERTIFY": "Está usted segura/o querer <b>mandar esta invitación a certificar</b> ?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invitación mandada"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Fracaso en la carga de las invitaciónes",
+      "REMOVE_INVITATION_FAILED": "Fracaso durante la supresión de la invitación",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Fracaso durante la supresión de las invitaciónes",
+      "SEND_INVITATION_FAILED": "Fracaso durante el envío de la invitación",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invitación ilegible (formato desconocido)</span> - mandada por <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Comentarios",
+    "SHOW_MORE_COMMENTS": "Visualizar los comentarios anteriores",
+    "COMMENT_HELP": "Su comentario, preguntas, etc.",
+    "COMMENT_HELP_REPLY_TO": "Su repuesta…",
+    "BTN_SEND": "Mandar",
+    "POPOVER_SHARE_TITLE": "Mensaje #{{number}}",
+    "REPLY": "Responder",
+    "REPLY_TO": "Repuesta a :",
+    "REPLY_TO_LINK": "En repuesta a ",
+    "REPLY_TO_DELETED_COMMENT": "En repuesta a un comentario suprimido",
+    "REPLY_COUNT": "{{replyCount}} repuestas",
+    "DELETED_COMMENT": "Comentario suprimido",
+    "ERROR": {
+      "FAILED_SAVE_COMMENT": "Fracaso durante el respaldo del comentario",
+      "FAILED_REMOVE_COMMENT": "Fracaso durante la supresión del comentario"
+    }
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Rep: ",
+    "FORWARD_TITLE_PREFIX": "Tr: ",
+    "BTN_REPLY": "Responder",
+    "BTN_COMPOSE": "Nuevo mensaje",
+    "BTN_WRITE": "Escribir",
+    "NO_MESSAGE_INBOX": "Ningun mensaje recibido",
+    "NO_MESSAGE_OUTBOX": "Ningun mensaje mandado",
+    "NOTIFICATIONS": {
+      "TITLE": "Mensajes",
+      "MESSAGE_RECEIVED": "Ha <b>recibido un mensaje</b><br/>de"
+    },
+    "LIST": {
+      "INBOX": "Bandeja de entrada",
+      "OUTBOX": "Mensajes mandados",
+      "LAST_INBOX": "Nuevos mensajes",
+      "LAST_OUTBOX": "Mensajes enviados",
+      "BTN_LAST_MESSAGES": "Mensajes recientes",
+      "TITLE": "Mensajes",
+      "SEARCH_HELP": "Buscar en mensajes",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Opciónes",
+        "DELETE_ALL": "Suprimir todos los mensajes"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "Nuevo mensaje",
+      "TITLE_REPLY": "Responder",
+      "SUB_TITLE": "Nuevo mensaje",
+      "TO": "A",
+      "OBJECT": "Objeto",
+      "OBJECT_HELP": "Objeto",
+      "ENCRYPTED_HELP": "Por favor, nota que este mensaje será cifrado antes envío, a fin que solo el destinatario pueda leerlo, y que esté asegurado que usted esté bien su autor.",
+      "MESSAGE": "Mensaje",
+      "MESSAGE_HELP": "Contenido del mensaje",
+      "CONTENT_CONFIRMATION": "El contenido del mensaje es vacío.<br/><br/>Sin embargo, quiere mandar el mensaje ?"
+    },
+    "VIEW": {
+      "TITLE": "Mensaje",
+      "SENDER": "Mandado por",
+      "RECIPIENT": "Mandado a",
+      "NO_CONTENT": "Mensaje vacío",
+      "DELETE": "Eliminar el mensaje"
+    },
+    "CONFIRM": {
+      "REMOVE": "Está usted segura/o querer <b>suprimir este mensaje</b> ?<br/><br/>Esta operación es ireversible.",
+      "REMOVE_ALL" : "Está usted segura/o querer <b>suprimir todos los mensajes</b> ?<br/><br/>Esta operación es ireversible.",
+      "MARK_ALL_AS_READ": "Está usted segura/o querer <b>marcar todos los mensajes como leído</b> ?",
+      "USER_HAS_NO_PROFILE": "Esta identidad no tiene ningún perfil Cesium+. Se puede que no utilice la extensión Cesium+, y <b>así no consultará su mensaje</b>.<br/><br/>Está usted segura/o querer <b>continuar</b> a pesar de todo ?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Mensaje suprimido",
+      "All_MESSAGE_REMOVED": "Todos los mensajes fueron suprimido",
+      "MESSAGE_SENT": "Mensaje mandado"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Fracaso durante el envío del mensaje.",
+      "LOAD_MESSAGES_FAILED": "Fracaso durante la recuperación de los mensajes.",
+      "LOAD_MESSAGE_FAILED": "Fracaso durante la recuperación del mensaje.",
+      "MESSAGE_NOT_READABLE": "Lectura del mensaje imposible.",
+      "USER_NOT_RECIPIENT": "No esta el destinatario de este mensaje : deciframiento imposible.",
+      "NOT_AUTHENTICATED_MESSAGE": "La autenticidad del mensaje es dudosa o su contenido es corrupto.",
+      "REMOVE_MESSAGE_FAILED": "Fracaso en la supresión del mensaje",
+      "MESSAGE_CONTENT_TOO_LONG": "Valor demasiado largo ({{maxLength}} carácteres max).",
+      "MARK_AS_READ_FAILED": "Imposible marcar el mensaje como 'leído'.",
+      "LOAD_NOTIFICATIONS_FAILED": "Fracaso durante la recuperación de las notificaciónes de mensajes.",
+      "REMOVE_All_MESSAGES_FAILED": "Fracaso durante la supresión de todos los mensajes.",
+      "MARK_ALL_AS_READ_FAILED": "Fracaso durante el marcaje de los mensajes como leído.",
+      "RECIPIENT_IS_MANDATORY": "El destinatario es obligatorio."
+    }
+  },
+  "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Número de bloque, hash, llave pública, etc.",
+      "POPOVER_FILTER_TITLE": "Filtros",
+      "HEADER_MEDIAN_TIME": "Fecha / Hora",
+      "HEADER_BLOCK": "Bloque #",
+      "HEADER_ISSUER": "Nodo emisor",
+      "BTN_LAST": "últimos bloques",
+      "DISPLAY_QUERY": "Mostrar la consulta",
+      "HIDE_QUERY": "Ocultar la consulta",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "Entradas/salidas de miembros",
+        "EXISTING_TRANSACTION": "Con transacciones",
+        "PERIOD": "<b class=\"ion-clock\"></b> Entre el <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) y el <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Calculado por <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Transacciones que implican <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Fracaso en la búsqueda de los bloques."
+    }
+  },
+  "GROUP": {
+    "GENERAL_DIVIDER": "Informaciónes generales",
+    "LOCATION_DIVIDER": "Dirección",
+    "SOCIAL_NETWORKS_DIVIDER": "Redes sociales y sitio web",
+    "TECHNICAL_DIVIDER": "Informaciónes técnicas",
+    "CREATED_TIME": "Creada {{creationTime|formatFromNow}}",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitaciónes"
+    },
+    "LOOKUP": {
+      "TITLE": "Grupos",
+      "SEARCH_HELP": "Nombre de grupo, palabras , lugar, etc.",
+      "LAST_RESULTS_LIST": "Nuevos grupos :",
+      "OPEN_RESULTS_LIST": "Grupos abiertos :",
+      "MANAGED_RESULTS_LIST": "Grupos cerrados :",
+      "BTN_LAST": "Nuevos grupos",
+      "BTN_NEW": "Añado un grupo"
+    },
+    "TYPE": {
+      "TITLE": "Nuevo grupo",
+      "SELECT_TYPE": "Tipo de grupo :",
+      "OPEN_GROUP": "Grupo abierto",
+      "OPEN_GROUP_HELP": "Un grupo abierto es accesible por cualquier miembro de la moneda.",
+      "MANAGED_GROUP": "Grupo administrado",
+      "MANAGED_GROUP_HELP": "un grupo administrado es gestionado por administradores y moderadores, que pueden aceptar, rechazar o excluir un miembro en su seno.",
+      "ENUM": {
+        "OPEN": "Grupo abierto",
+        "MANAGED": "Grupo administrado"
+      }
+    },
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "MENU_TITLE": "Opciones",
+      "REMOVE_CONFIRMATION" : "Seguro que quieres eliminar este grupo?<br/><br/>Esta operación es irreversible."
+    },
+    "EDIT": {
+      "TITLE": "Grupo",
+      "TITLE_NEW": "Nuevo grupo",
+      "RECORD_TITLE": "Título",
+      "RECORD_TITLE_HELP": "Título",
+      "RECORD_DESCRIPTION": "Descripción",
+      "RECORD_DESCRIPTION_HELP": "Descripción"
+    },
+    "ERROR": {
+      "SEARCH_GROUPS_FAILED": "Fracaso en la búsqueda de grupos",
+      "REMOVE_RECORD_FAILED": "Error al eliminar el grupo"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Grupo eliminado"
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Actividad principal",
+    "GENERAL_DIVIDER": "Informaciónes generales",
+    "LOCATION_DIVIDER": "Dirección",
+    "SOCIAL_NETWORKS_DIVIDER": "Redes sociales y sitio web",
+    "TECHNICAL_DIVIDER": "Informaciónes técnicas",
+    "BTN_SHOW_WOT": "Personas",
+    "BTN_SHOW_WOT_HELP": "Buscar personas",
+    "BTN_SHOW_PAGES": "Páginas",
+    "BTN_SHOW_PAGES_HELP": "Búsqueda de páginas",
+    "BTN_NEW": "Creer una página",
+    "MY_PAGES": "Mis páginas",
+    "NO_PAGE": "Sin página",
+    "SEARCH": {
+      "TITLE": "Páginas",
+      "SEARCH_HELP": "Qué, Quién : restaurante, Con Marcel, ...",
+      "BTN_ADD": "Nuevo",
+      "BTN_LAST_RECORDS": "Páginas recientes",
+      "BTN_ADVANCED_SEARCH": "búsqueda avanzada",
+      "BTN_OPTIONS": "Búsqueda avanzada",
+      "TYPE": "Tipo de página",
+      "LOCATION_HELP": "Ciudad",
+      "RESULTS": "Resultados",
+      "RESULT_COUNT_LOCATION": "{{count}} Resultado{{count>0?'s':''}}, cerca de {{location}}",
+      "RESULT_COUNT": "{{count}} resultado{{count>0?'s':''}}",
+      "LAST_RECORDS": "Páginas recientes",
+      "LAST_RECORD_COUNT_LOCATION": "{{count}} página{{count>0?'s':''}} reciente{{count>0?'s':''}}, cerca de {{location}}",
+      "LAST_RECORD_COUNT": "{{count}} página{{count>0?'s':''}} reciente{{count>0?'s':''}}",
+      "POPOVER_FILTERS": {
+        "BTN_ADVANCED_SEARCH": "Opciones avanzadas?"
+      }
+    },
+    "VIEW": {
+      "TITLE": "Anuario",
+      "CATEGORY": "Actividad principal :",
+      "LOCATION": "Dirección :",
+      "MENU_TITLE": "Opciónes",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Está usted segura/o querer suprimir esta página ?<br/><br/>Esta operación es ireversible."
+    },
+    "TYPE": {
+      "TITLE": "Nueva página",
+      "SELECT_TYPE": "Tipo de página :",
+      "ENUM": {
+        "SHOP": "Comercio local",
+        "COMPANY": "Empresa",
+        "ASSOCIATION": "Asociación",
+        "INSTITUTION": "Institución"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Edición",
+      "TITLE_NEW": "Nueva página",
+      "RECORD_TYPE":"Tipo de página",
+      "RECORD_TITLE": "Nombre",
+      "RECORD_TITLE_HELP": "Nombre",
+      "RECORD_DESCRIPTION": "Descripción",
+      "RECORD_DESCRIPTION_HELP": "Descripción de la actividad",
+      "RECORD_ADDRESS": "Calle",
+      "RECORD_ADDRESS_HELP": "Calle, edificio...",
+      "RECORD_CITY": "Ciudad",
+      "RECORD_CITY_HELP": "Ciudad",
+      "RECORD_SOCIAL_NETWORKS": "Redes sociales y sitio web",
+      "RECORD_PUBKEY": "Llave pública" ,
+      "RECORD_PUBKEY_HELP": "Llave pública de recepción de los pagos"
+    },
+    "WALLET": {
+      "PAGE_DIVIDER": "Páginas",
+      "PAGE_DIVIDER_HELP": "Las páginas se refieren a actividades que aceptan dinero o lo favorecen: empresas, negocios, asociaciones, instituciones."
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Fracaso en la carga de la lista de actividades",
+      "LOAD_RECORD_FAILED": "Fracaso durante la carga de la página",
+      "LOOKUP_RECORDS_FAILED": "Fracaso durante la ejecución de la búsqueda.",
+      "REMOVE_RECORD_FAILED": "Fracaso en la supresión de la página",
+      "SAVE_RECORD_FAILED": "Fracaso durante el respaldo",
+      "RECORD_NOT_EXISTS": "Página inexistente",
+      "GEO_LOCATION_NOT_FOUND": "Ciudad o código postal no encontrado"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Página suprimida",
+      "RECORD_SAVED": "Página guardada"
+    }
+  },
+  "PROFILE": {
+    "PROFILE_DIVIDER": "Perfil Cesium+",
+    "PROFILE_DIVIDER_HELP": "Estos son datos auxiliares, almacenados fuera de la red monetaria.",
+    "NO_PROFILE_DEFINED": "Ningún perfil Cesium+",
+    "BTN_ADD": "Ingresar mi perfil",
+    "BTN_EDIT": "Editar mi perfil",
+    "BTN_DELETE": "Eliminar mi perfil",
+    "BTN_REORDER": "Reordenar",
+    "UID": "Seudónimo",
+    "TITLE": "Nombre, Apellido",
+    "TITLE_HELP": "Nombre, Apellido",
+    "DESCRIPTION": "A propósito de yo",
+    "DESCRIPTION_HELP": "A propósito de yo...",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "Informaciónes generales",
+    "SOCIAL_NETWORKS_DIVIDER": "Redes sociales, sitios web",
+    "TECHNICAL_DIVIDER": "Informaciónes técnicas",
+    "MODAL_AVATAR": {
+      "TITLE": "Foto de perfil",
+      "SELECT_FILE_HELP": "Por favor, <b>elige un fichero imagen</b>, haciendo un clic sobre el botón por debajo :",
+      "BTN_SELECT_FILE": "Eligir una foto",
+      "RESIZE_HELP": "<b>Encuadra la imagen</b>, si es necesario. Un clic mantenido sobre la imagen permite desplazarla. Hace un clic sobre la zona abajo a la izquierda para hacer zoom.",
+      "RESULT_HELP": "<b>Aquí está el resultado</b> tal como está visible sobre su perfil :"
+    },
+    "CONFIRM": {
+      "DELETE": "¿Estás seguro de que quieres <b>eliminar tu perfil Cesium+?</b><br/><br/>Esta operación es irreversible."
+    },
+    "ERROR": {
+      "REMOVE_PROFILE_FAILED": "Error de eliminación de perfil",
+      "LOAD_PROFILE_FAILED": "Fracaso en la carga del perfil usuario.",
+      "SAVE_PROFILE_FAILED": "Fracaso durante el respaldo",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Formato no tomado en cuenta : por favor, indica una dirección válida.<br/><br/>Ejemplos :<ul><li>- Una página Facebook (https://www.facebook.com/user)</li><li>- Una página web (http://www.misitio.es)</li><li>- Una dirección email (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Fracaso durante el redimensionamiento de la imagen"
+    },
+    "INFO": {
+      "PROFILE_REMOVED": "Perfil eliminado",
+      "PROFILE_SAVED": "Perfil respaldado"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "Las informaciónes informadas en su perfil <b>están públicas</b> : visibles también por personas <b>no conectadas</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"
+    }
+  },
+  "LOCATION": {
+    "BTN_GEOLOC_ADDRESS": "Actualizar desde la dirección",
+    "USE_GEO_POINT": "Aparecer en la tarjeta {{'COMMON.APP_NAME'|translate}} ?",
+    "LOADING_LOCATION": "Encontrar la dirección ...",
+    "LOCATION_DIVIDER": "Dirección",
+    "ADDRESS": "Calle",
+    "ADDRESS_HELP": "Calle, complemento de dirección...",
+    "CITY": "Ciudad",
+    "CITY_HELP": "Ciudad, País",
+    "DISTANCE": "Distancia máxima alrededor de la ciudad",
+    "DISTANCE_UNIT": "km",
+    "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+    "SEARCH_HELP": "Ciudad, País",
+    "PROFILE_POSITION": "Posición del perfil",
+    "MODAL": {
+      "TITLE": "Búsqueda de dirección",
+      "SEARCH_HELP": "Ciudad, País",
+      "ALTERNATIVE_RESULT_DIVIDER": "Resultados alternativos para <b>{{address}}</b> :",
+      "POSITION": "Latitud/Longitud : {{lat}} / {{lon}}"
+    },
+    "ERROR": {
+      "CITY_REQUIRED_IF_STREET": "Requerido si una calle ha sido llenada",
+      "REQUIRED_FOR_LOCATION": "Campo obligatorio para aparecer en el mapa",
+      "INVALID_FOR_LOCATION": "Dirección desconocida",
+      "GEO_LOCATION_FAILED": "No se puede recuperar su ubicación Por favor usa el botón de búsqueda.",
+      "ADDRESS_LOCATION_FAILED": "No se puede recuperar la posición de la dirección."
+    }
+  },
+  "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Servicios en línea",
+    "SUBSCRIPTION_DIVIDER_HELP": "Los servicios en línea ofrecen servicios adicionales opcionales, delegados a un tercero.",
+    "BTN_ADD": "Agregar un servicio",
+    "BTN_EDIT": "Administrar mis servicios",
+    "NO_SUBSCRIPTION": "Ningún servicio definido",
+    "SUBSCRIPTION_COUNT": "Servicios / Suscripción",
+    "EDIT": {
+      "TITLE": "Servicios en línea",
+      "HELP_TEXT": "Gestione sus suscripciones y otros servicios en línea aquí",
+      "PROVIDER": "Proveedor:"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Recibir notificaciones por correo electrónico"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Deseas <b>eliminar</b> esta suscripción ?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Error al cargar servicios en línea",
+      "ADD_SUBSCRIPTION_FAILED": "Error al agregar suscripción",
+      "UPDATE_SUBSCRIPTION_FAILED": "Error durante la actualización de la suscripción",
+      "DELETE_SUBSCRIPTION_FAILED": "Error al eliminar la suscripción"
+    },
+    "MODAL_EMAIL": {
+      "TITLE" : "Notificación por correo electrónico",
+      "HELP" : "Rellene este formulario para <b>ser notificado por correo electrónico</b> de los eventos de su cuenta. <br/> Su dirección de correo electrónico se cifrará únicamente para que sea visible para el proveedor de servicios.",
+      "EMAIL_LABEL" : "Tu correo electrónico :",
+      "EMAIL_HELP": "carlos@dominio.com",
+      "FREQUENCY_LABEL": "Frecuencia de las notificaciones :",
+      "FREQUENCY_DAILY": "Diariamente",
+      "FREQUENCY_WEEKLY": "Semanal",
+      "PROVIDER": "Proveedor de servicio :"
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "PLUGIN_NAME_HELP": "Perfiles, notificaciónes, mensajes privados",
+    "ENABLE_TOGGLE": "Activar la extensión ?",
+    "ENABLE_MESSAGE_TOGGLE": "Activar los mensajes privados ?",
+    "ENABLE_SETTINGS_TOGGLE": "Activar el almacenamiento a distancia de las configuraciónes ?",
+    "PEER": "Dirección del nodo de datos",
+    "POPUP_PEER": {
+      "TITLE" : "Nodo de datos",
+      "HELP" : "Ingresa la dirección del nodo que quiere utilizar :",
+      "PEER_HELP": "servidor.dominio.com:puerto"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Notificaciónes",
+      "HELP_TEXT": "Activa los tipos de notificaciónes que usted desea recibir :",
+      "ENABLE_TX_SENT": "Notificar la validación de los <b>pagos emitidos</b> ?",
+      "ENABLE_TX_RECEIVED": "Notificar la validación de los <b>pagos recibidos</b> ?",
+      "ENABLE_CERT_SENT": "Notificar la validación de las <b>certificaciónes emitidas</b> ?",
+      "ENABLE_CERT_RECEIVED": "Notificar la validación de las <b>certificaciónes recibidas</b> ?"
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Nuevas funcionalidades",
+      "ASK_ENABLE": "Nuevas funcionalidades son disponibles : <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Perfiles Cesium+</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notificaciónes</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Mensajes privados</b>.</ul><br/>Fueron <b>desactivadas</b> en sus configuraciones.<br/><br/><b>Quiere usted activarlas</b> ?"
+    }
+  },
+  "ES_WALLET": {
+    "ERROR": {
+      "RECIPIENT_IS_MANDATORY": "Un destinatario es obligatorio para el cifrado."
+    }
+  },
+  "EVENT": {
+    "NODE_STARTED": "Su nodo ES API <b>{{params[0]}}</b> es comenzado",
+    "NODE_BMA_DOWN": "El nodo <b>{{params[0]}}:{{params[1]}}</b> (utilizado por su nodo ES API) <b>no es localizable</b>.",
+    "NODE_BMA_UP": "El nodo <b>{{params[0]}}:{{params[1]}}</b> es de nuevo accesible.",
+    "MEMBER_JOIN": "Ahora usted está <b>miembro</b> de la moneda <b>{{params[0]}}</b> !",
+    "MEMBER_LEAVE": "No está <b>miembro</b> de la moneda <b>{{params[0]}}</b>!",
+    "MEMBER_EXCLUDE": "Usted ya no es un miembro de la moneda <b>{{params[0]}}</b>, la falta de no renovación o la falta de certificaciones.",
+    "MEMBER_REVOKE": "La revocación de su cuenta se ha hecho. Puede que no sea un miembro de la cuenta en moneda <b>{{params[0]}}</b>.",
+    "MEMBER_ACTIVE": "Su renovación de adhesión a la moneda <b>{{params[0]}}</b> fue <b>tomado en cuenta</b>.",
+    "TX_SENT": "Su <b>pago</b> a <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> fue efectuado.",
+    "TX_SENT_MULTI": "Su <b>pago</b> a <b>{{params[1]}}</b> fue efectuado.",
+    "TX_RECEIVED": "Ha <b>recibido un pago</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "Ha <b>recibido un pago</b> de <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Su <b>certificación</b> a <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> fue efectuada.",
+    "CERT_RECEIVED": "Ha <b>recibido una certificación</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha comentado su referencia : <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificado su comentario sobre su referencia : <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha contestado a su comentario sobre el referencia : <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificado la repuesta a su comentario sobre el referencia : <b>{{params[2]}}</b>"
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Nodo de datos <b> {{old}} </ b> dirección inalcanzable o no válida.<br/><br/>¿Desea utilizar temporalmente el nodo de datos <b>{{new}}</b>?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Nodo de datos <b>{{server}}</b> dirección inalcanzable o no válida.<br/><br/>Cesium continuará funcionando, <b>sin la extensión Cesium+</b> (perfiles de usuario, mensajes privados), mapas y gráficos).<br/><br/>Verifique su conexión a Internet, o cambie el nodo de datos en <a class=\"positive\" ng-click=\"doQuickFix('settings')\"> configuración de extensión </a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "El volumen de datos a enviar excede el límite establecido por el servidor.<br/><br/>Por favor, inténtelo de nuevo después, por ejemplo, borrando fotos."
+  }
+}
+);
+
+$translateProvider.translations("fr-FR", {
+  "COMMON": {
+    "CATEGORY": "Catégorie",
+    "CATEGORIES": "Catégories",
+    "CATEGORY_SEARCH_HELP": "Recherche",
+    "COMMENT_HELP": "Commentaire",
+    "LAST_MODIFICATION_DATE": "Mise à jour le",
+    "SUBMIT_BY": "Soumis par",
+    "BTN_LIKE": "J'aime",
+    "BTN_LIKE_REMOVE": "Je n'aime plus",
+    "LIKES_TEXT": "{{total}} personne{{total > 1 ? 's' : ''}} {{total > 1 ? 'ont' : 'a'}} aimé cette page",
+    "ABUSES_TEXT": "{{total}} personne{{total > 1 ? 's' : ''}} {{total > 1 ? 'ont' : 'a'}} signalé un problème",
+    "BTN_REPORT_ABUSE_DOTS": "Signaler un problème ou un abus...",
+    "BTN_REMOVE_REPORTED_ABUSE": "Annuler mon signalement",
+    "BTN_PUBLISH": "Publier",
+    "BTN_PICTURE_DELETE": "Supprimer",
+    "BTN_PICTURE_FAVORISE": "Principale",
+    "BTN_PICTURE_ROTATE": "Tourner",
+    "BTN_ADD_PICTURE": "Ajouter une photo",
+    "NOTIFICATION": {
+      "TITLE": "Nouvelle notification | {{'COMMON.APP_NAME'|translate}}",
+      "HAS_UNREAD": "Vous avez {{count}} notification{{count>0?'s':''}} non lue{{count>0?'s':''}}"
+    },
+    "NOTIFICATIONS": {
+      "TITLE": "Notifications",
+      "MARK_ALL_AS_READ": "Tout marquer comme lu",
+      "NO_RESULT": "Aucune notification",
+      "SHOW_ALL": "Voir tout",
+      "LOAD_NOTIFICATIONS_FAILED": "Erreur de chargement des notifications"
+    },
+    "REPORT_ABUSE": {
+      "TITLE": "Signaler un problème",
+      "SUB_TITLE": "Merci d'expliquer succintement le problème :",
+      "REASON_HELP": "J'explique le problème...",
+      "ASK_DELETE": "Demander la suppression ?",
+      "CONFIRM": {
+        "SENT": "Signalement envoyé. Merci !"
+      }
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Pages",
+    "USER_PROFILE": "Mon profil",
+    "MESSAGES": "Messages",
+    "NOTIFICATIONS": "Notifications",
+    "INVITATIONS": "Invitations"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Compte pour une organisation",
+      "ORGANIZATION_ACCOUNT_HELP": "Si vous représentez une entreprise, une association, etc.<br/>Aucun dividende universel ne sera créé par ce compte."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "Vous pouvez <a ui-sref=\"app.edit_profile\">saisir votre profil Cesium+</a> (optionnel) pour offrir une meilleure visibilité de votre compte. Ce profil sera stocké dans <b>un annuaire indépendant</b> de la monnaie, mais décentralisé."
+    },
+    "ERROR": {
+      "WS_CONNECTION_FAILED": "Cesium ne peut pas recevoir les notifications, à cause d'une erreur technique (connexion au noeud de données Cesium+).<br/><br/>Si le problème persiste, veuillez <b>choisir un autre noeud de données</b> dans les paramètres Cesium+."
+    }
+  },
+  "WOT": {
+    "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Suggérer des identités à certifier...",
+    "BTN_ASK_CERTIFICATIONS_DOTS": "Demander à des membres de me certifier...",
+    "BTN_ASK_CERTIFICATION": "Demander une certification",
+    "SUGGEST_CERTIFICATIONS_MODAL": {
+      "TITLE": "Suggérer des certifications",
+      "HELP": "Sélectionner vos suggestions"
+    },
+    "ASK_CERTIFICATIONS_MODAL": {
+      "TITLE": "Demander des certifications",
+      "HELP": "Sélectionner les destinataires"
+    },
+    "SEARCH": {
+      "DIVIDER_PROFILE": "Comptes",
+      "DIVIDER_PAGE": "Pages",
+      "DIVIDER_GROUP": "Groupes"
+    },
+    "CONFIRM": {
+      "SUGGEST_CERTIFICATIONS": "Êtes-vous sûr de vouloir <b>envoyer ces suggestions de certification</b> ?",
+      "ASK_CERTIFICATION": "Êtes-vous sûr de vouloir <b>envoyer une demande de certification</b> ?",
+      "ASK_CERTIFICATIONS": "Êtes-vous sûr de vouloir <b>envoyer une demande de certification</b> à ces personnes ?"
+    }
+  },
+  "INVITATION": {
+    "TITLE": "Invitations",
+    "NO_RESULT": "Aucune invitation en attente",
+    "BTN_DELETE_ALL": "Supprimer toutes les invitations",
+    "BTN_DELETE": "Supprimer l'invitation",
+    "BTN_NEW_INVITATION": "Nouvelle invitation",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> demande votre certification",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> vous est suggéré pour certification",
+    "SUGGESTED_BY": "Suggestion envoyée par <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitations"
+    },
+    "LIST": {
+      "TITLE": "Invitations"
+    },
+    "NEW": {
+      "TITLE": "Nouvelle invitation",
+      "RECIPIENTS": "A",
+      "RECIPIENTS_HELP": "Destinataires de l'invitation",
+      "RECIPIENTS_MODAL_TITLE": "Destinataires",
+      "RECIPIENTS_MODAL_HELP": "Veuillez choisir les destinataires :",
+      "SUGGESTION_IDENTITIES": "Suggestions de certification",
+      "SUGGESTION_IDENTITIES_HELP": "Certifications à suggérer",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Suggestions",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Veuillez choisir vos suggestions :"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "La suppression des invitations est une <b>opération irréversible</b>.<br/><br/><b>Êtes-vous sûr</b> de vouloir continuer ?",
+      "SEND_INVITATIONS_TO_CERTIFY": "Êtes-vous sûr de vouloir <b>envoyer cette invitation à certifier</b> ?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invitation envoyée"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Échec du chargement des invitations",
+      "REMOVE_INVITATION_FAILED": "Erreur lors de la suppression de l'invitation",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Erreur lors de la suppression des invitations",
+      "SEND_INVITATION_FAILED": "Erreur lors de l'envoi de l'invitation",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invitation illisible (format inconnu)</span> - envoyée par <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Commentaires",
+    "SHOW_MORE_COMMENTS": "Afficher les commentaires précédents",
+    "COMMENT_HELP": "Votre commentaire, question, etc.",
+    "COMMENT_HELP_REPLY_TO": "Votre réponse...",
+    "BTN_SEND": "Envoyer",
+    "POPOVER_SHARE_TITLE": "Message #{{number}}",
+    "REPLY": "Répondre",
+    "REPLY_TO": "Réponse à :",
+    "REPLY_TO_LINK": "En réponse à ",
+    "REPLY_TO_DELETED_COMMENT": "En réponse à un commentaire supprimé",
+    "REPLY_COUNT": "{{replyCount}} réponses",
+    "DELETED_COMMENT": "Commentaire supprimé",
+    "MODIFIED_ON": "modifié le {{time|formatDate}}",
+    "MODIFIED_PARENTHESIS": "(modifié ensuite)",
+    "ERROR": {
+      "FAILED_SAVE_COMMENT": "Erreur lors de la sauvegarde du commentaire",
+      "FAILED_REMOVE_COMMENT": "Erreur lors de la suppression du commentaire"
+    }
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Rep: ",
+    "FORWARD_TITLE_PREFIX": "Tr: ",
+    "BTN_REPLY": "Répondre",
+    "BTN_COMPOSE": "Nouveau message",
+    "BTN_WRITE": "Ecrire",
+    "NO_MESSAGE_INBOX": "Aucun message reçu",
+    "NO_MESSAGE_OUTBOX": "Aucun message envoyé",
+    "NOTIFICATIONS": {
+      "TITLE": "Messages",
+      "MESSAGE_RECEIVED": "Vous avez <b>reçu un message</b><br/>de"
+    },
+    "LIST": {
+      "INBOX": "Boîte de réception",
+      "OUTBOX": "Messages envoyés",
+      "LAST_INBOX": "Nouveaux messages",
+      "LAST_OUTBOX": "Messages envoyés",
+      "BTN_LAST_MESSAGES": "Messages récents",
+      "TITLE": "Messages",
+      "SEARCH_HELP": "Recherche dans les messages",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Options",
+        "DELETE_ALL": "Supprimer tous les messages"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "Nouveau message",
+      "TITLE_REPLY": "Répondre",
+      "SUB_TITLE": "Nouveau message",
+      "TO": "A",
+      "OBJECT": "Objet",
+      "OBJECT_HELP": "Objet",
+      "ENCRYPTED_HELP": "Veuillez noter que ce message sera chiffré avant envoi, afin que seul le destinataire puisse le lire, et qu'il soit assuré que vous soyez bien son auteur.",
+      "MESSAGE": "Message",
+      "MESSAGE_HELP": "Contenu du message",
+      "CONTENT_CONFIRMATION": "Le contenu du message est vide.<br/><br/>Voulez-vous néanmoins envoyer le message ?"
+    },
+    "VIEW": {
+      "TITLE": "Message",
+      "SENDER": "Envoyé par",
+      "RECIPIENT": "Envoyé à",
+      "NO_CONTENT": "Message vide",
+      "DELETE": "Supprimer le message"
+    },
+    "CONFIRM": {
+      "REMOVE": "Êtes-vous sûr de vouloir <b>supprimer ce message</b> ?<br/><br/>Cette opération est irréversible.",
+      "REMOVE_ALL" : "Êtes-vous sûr de vouloir <b>supprimer tous les messages</b> ?<br/><br/>Cette opération est irréversible.",
+      "MARK_ALL_AS_READ": "Êtes-vous sûr de vouloir <b>marquer tous les messages comme lus</b> ?",
+      "USER_HAS_NO_PROFILE": "Cette identité n'a aucun profil Cesium+. Il se peut qu'elle n'utilise pas l'extension Cesium+, et <b>ne consultera donc pas votre message</b>.<br/><br/>Êtes-vous sûr de vouloir <b>continuer</b> malgré tout ?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Message supprimé",
+      "All_MESSAGE_REMOVED": "Tous les messages ont été supprimés",
+      "MESSAGE_SENT": "Message envoyé"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Erreur lors de l'envoi du message.",
+      "LOAD_MESSAGES_FAILED": "Erreur lors de la récupération des messages.",
+      "LOAD_MESSAGE_FAILED": "Erreur lors de la récupération du message.",
+      "MESSAGE_NOT_READABLE": "Lecture du message impossible.",
+      "USER_NOT_RECIPIENT": "Vous n'êtes pas le destinataire de ce message : déchiffrement impossible.",
+      "NOT_AUTHENTICATED_MESSAGE": "L'authenticité du message est douteuse ou son contenu est corrompu.",
+      "REMOVE_MESSAGE_FAILED": "Erreur de suppression du message",
+      "MESSAGE_CONTENT_TOO_LONG": "Valeur trop longue ({{maxLength}} caractères max).",
+      "MARK_AS_READ_FAILED": "Impossible de marquer le message comme 'lu'.",
+      "LOAD_NOTIFICATIONS_FAILED": "Erreur lors de la récupération des notifications de messages.",
+      "REMOVE_All_MESSAGES_FAILED": "Erreur lors de la suppression de tous les messages.",
+      "MARK_ALL_AS_READ_FAILED": "Erreur lors du marquage des messages comme lus.",
+      "RECIPIENT_IS_MANDATORY": "Le destinataire est obligatoire."
+    }
+  },
+  "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Numéro de bloc, hash, clé publique, etc.",
+      "POPOVER_FILTER_TITLE": "Filtres",
+      "HEADER_MEDIAN_TIME": "Date / Heure",
+      "HEADER_BLOCK": "Bloc #",
+      "HEADER_ISSUER": "Noeud émetteur",
+      "BTN_LAST": "Derniers blocs",
+      "DISPLAY_QUERY": "Afficher la requête",
+      "HIDE_QUERY": "Masquer la requête",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "<b class=\"ion-person\"></b> Entrées/sorties de membres",
+        "EXISTING_TRANSACTION": "<b class=\"ion-card\"></b> Avec transactions",
+        "PERIOD": "<b class=\"ion-clock\"></b> Entre <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) et <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Calculé par <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Transactions concernant <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Erreur de la recherche des blocs."
+    }
+  },
+  "GROUP": {
+    "GENERAL_DIVIDER": "Informations générales",
+    "LOCATION_DIVIDER": "Adresse",
+    "SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux et site web",
+    "TECHNICAL_DIVIDER": "Informations techniques",
+    "CREATED_TIME": "Créé {{creationTime|formatFromNow}}",
+    "NOTIFICATIONS": {
+      "TITLE": "Invitations"
+    },
+    "LOOKUP": {
+      "TITLE": "Groupes",
+      "SEARCH_HELP": "Nom de groupe, mots, lieu, etc.",
+      "LAST_RESULTS_LIST": "Nouveaux groupes :",
+      "OPEN_RESULTS_LIST": "Groupes ouverts :",
+      "MANAGED_RESULTS_LIST": "Groupes fermés :",
+      "BTN_LAST": "Nouveaux groupes",
+      "BTN_NEW": "J'ajoute un groupe"
+    },
+    "TYPE": {
+      "TITLE": "Nouveau groupe",
+      "SELECT_TYPE": "Type de groupe :",
+      "OPEN_GROUP": "Groupe ouvert",
+      "OPEN_GROUP_HELP": "Un groupe ouvert est accessible par n'importe quel membre de la monnaie.",
+      "MANAGED_GROUP": "Groupe administré",
+      "MANAGED_GROUP_HELP": "un groupe administré est géré par des administrateurs et des modérateurs, qui peuvent accepter, refuser ou exclure un membre en son sein.",
+      "ENUM": {
+        "OPEN": "Groupe ouvert",
+        "MANAGED": "Groupe administré"
+      }
+    },
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "MENU_TITLE": "Options",
+      "REMOVE_CONFIRMATION" : "Êtes-vous sûr de vouloir supprimer ce groupe ?<br/><br/>Cette opération est irréversible."
+    },
+    "EDIT": {
+      "TITLE": "Groupe",
+      "TITLE_NEW": "Nouveau groupe",
+      "RECORD_TITLE": "Titre",
+      "RECORD_TITLE_HELP": "Titre",
+      "RECORD_DESCRIPTION": "Description",
+      "RECORD_DESCRIPTION_HELP": "Description"
+    },
+    "ERROR": {
+      "SEARCH_GROUPS_FAILED": "Échec de la recherche de groupes",
+      "REMOVE_RECORD_FAILED": "Erreur de la suppression du groupe"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Groupe supprimé"
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Activité principale",
+    "GENERAL_DIVIDER": "Informations générales",
+    "LOCATION_DIVIDER": "Adresse",
+    "SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux et site web",
+    "TECHNICAL_DIVIDER": "Informations techniques",
+    "BTN_SHOW_WOT": "Personnes",
+    "BTN_SHOW_WOT_HELP": "Rechercher des personnes",
+    "BTN_SHOW_PAGES": "Pages",
+    "BTN_SHOW_PAGES_HELP": "Rechercher des pages",
+    "BTN_NEW": "Créer une page",
+    "MY_PAGES": "Mes pages",
+    "NO_PAGE": "Aucune page",
+    "SEARCH": {
+      "TITLE": "Pages",
+      "SEARCH_HELP": "Quoi, Qui : restaurant, Chez Marcel, ...",
+      "BTN_ADD": "Nouveau",
+      "BTN_LAST_RECORDS": "Pages récentes",
+      "BTN_ADVANCED_SEARCH": "Recherche avancée",
+      "BTN_OPTIONS": "Recherche avancée",
+      "TYPE": "Type de page",
+      "LOCATION_HELP": "Où : Code postal, Ville",
+      "RESULTS": "Résultats",
+      "RESULT_COUNT_LOCATION": "{{count}} résultat{{count>0?'s':''}}, près de {{location}}",
+      "RESULT_COUNT": "{{count}} résultat{{count>0?'s':''}}",
+      "LAST_RECORDS": "Pages récentes",
+      "LAST_RECORD_COUNT_LOCATION": "{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}, près de {{location}}",
+      "LAST_RECORD_COUNT": "{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}",
+      "POPOVER_FILTERS": {
+        "BTN_ADVANCED_SEARCH": "Options avancées ?"
+      }
+    },
+    "VIEW": {
+      "TITLE": "Annuaire",
+      "CATEGORY": "Activité principale :",
+      "LOCATION": "Adresse :",
+      "MENU_TITLE": "Options",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Êtes-vous sûr de vouloir supprimer cette page ?<br/><br/>Cette opération est irréversible."
+    },
+    "TYPE": {
+      "TITLE": "Types",
+      "SELECT_TYPE": "Type de page :",
+      "ENUM": {
+        "SHOP": "Commerce local",
+        "COMPANY": "Entreprise",
+        "ASSOCIATION": "Association",
+        "INSTITUTION": "Institution"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Edition",
+      "TITLE_NEW": "Nouvelle page",
+      "RECORD_TYPE":"Type de page",
+      "RECORD_TITLE": "Nom",
+      "RECORD_TITLE_HELP": "Nom",
+      "RECORD_DESCRIPTION": "Description",
+      "RECORD_DESCRIPTION_HELP": "Description de l'activité",
+      "RECORD_ADDRESS": "Rue",
+      "RECORD_ADDRESS_HELP": "Rue, bâtiment...",
+      "RECORD_CITY": "Ville",
+      "RECORD_CITY_HELP": "Ville",
+      "RECORD_SOCIAL_NETWORKS": "Réseaux sociaux et site web",
+      "RECORD_PUBKEY": "Clé publique",
+      "RECORD_PUBKEY_HELP": "Clé publique de réception des paiements"
+    },
+    "WALLET": {
+      "PAGE_DIVIDER": "Pages",
+      "PAGE_DIVIDER_HELP": "Les pages référencent des activités acceptant la monnaie ou la favorisant : commerces, entreprises, associations, institutions. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref=\"app.es_network\">le réseau des nœuds Cesium+</a>."
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Erreur de chargement de la liste des activités",
+      "LOAD_RECORD_FAILED": "Erreur lors du chargement de la page",
+      "LOOKUP_RECORDS_FAILED": "Erreur lors de l'exécution de la recherche",
+      "REMOVE_RECORD_FAILED": "Erreur lors de la suppression de la page",
+      "SAVE_RECORD_FAILED": "Erreur lors de la sauvegarde",
+      "RECORD_NOT_EXISTS": "Page inexistante",
+      "GEO_LOCATION_NOT_FOUND": "Ville ou code postal non trouvé"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Page supprimée",
+      "RECORD_SAVED": "Page sauvegardée"
+    }
+  },
+  "PROFILE": {
+    "PROFILE_DIVIDER": "Profil Cesium+",
+    "PROFILE_DIVIDER_HELP": "Il s'agit de données annexes, optionnelles. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref=\"app.es_network\">le réseau Cesium+</a>.",
+    "NO_PROFILE_DEFINED": "Aucun profil saisi",
+    "BTN_ADD": "Saisir mon profil",
+    "BTN_EDIT": "Editer mon profil",
+    "BTN_DELETE": "Supprimer mon profil",
+    "BTN_REORDER": "Réordonner",
+    "UID": "Pseudonyme",
+    "TITLE": "Nom, Prénom",
+    "TITLE_HELP": "Nom, Prénom",
+    "DESCRIPTION": "A propos de moi",
+    "DESCRIPTION_HELP": "A propos de moi...",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "Informations générales",
+    "SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux, sites web",
+    "TECHNICAL_DIVIDER": "Informations techniques",
+    "MODAL_AVATAR": {
+      "TITLE": "Photo de profil",
+      "SELECT_FILE_HELP": "Veuillez <b>choisir un fichier image</b>, en cliquant sur le bouton ci-dessous :",
+      "BTN_SELECT_FILE": "Choisir une photo",
+      "RESIZE_HELP": "<b>Recadrez l'image</b>, si besoin. Un clic maintenu sur l'image permet de la déplacer. Cliquez sur la zone en bas à gauche pour zoomer.",
+      "RESULT_HELP": "<b>Voici le résultat</b> tel que visible sur votre profil :"
+    },
+    "CONFIRM": {
+      "DELETE": "Êtes-vous sûr de vouloir <b>supprimer votre profil Cesium+ ?</b><br/><br/>Cette opération est irréversible.",
+      "DELETE_BY_MODERATOR": "Êtes-vous sûr de vouloir <b>supprimer ce profil Cesium+ ?</b><br/><br/>Cette opération est irréversible."
+    },
+    "ERROR": {
+      "REMOVE_PROFILE_FAILED": "Erreur de suppression du profil",
+      "LOAD_PROFILE_FAILED": "Erreur de chargement du profil",
+      "SAVE_PROFILE_FAILED": "Erreur lors de la sauvegarde",
+      "DELETE_PROFILE_FAILED": "Erreur lors de la suppression du profil",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Format non pris en compte : veuillez indiquer une adresse valide.<br/><br/>Exemples :<ul><li>- Une page Facebook (https://www.facebook.com/user)</li><li>- Une page web (http://www.monsite.fr)</li><li>- Une adresse email (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Erreur lors du redimensionnement de l'image"
+    },
+    "INFO": {
+      "PROFILE_REMOVED": "Profil supprimé",
+      "PROFILE_SAVED": "Profil sauvegardé"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "Les informations renseignées dans votre profil <b>sont publiques</b> : visibles y compris par des personnes <b>non connectées</b>.<br/>{{'PROFILE.PROFILE_DIVIDER_HELP'|translate}}"
+    }
+  },
+  "LOCATION": {
+    "BTN_GEOLOC_ADDRESS": "Trouver mon adresse sur la carte",
+    "USE_GEO_POINT": "Apparaître sur les cartes {{'COMMON.APP_NAME'|translate}} ?",
+    "LOADING_LOCATION": "Recherche de l'adresse...",
+    "LOCATION_DIVIDER": "Adresse",
+    "ADDRESS": "Rue",
+    "ADDRESS_HELP": "Rue, complément d'adresse...",
+    "CITY": "Ville",
+    "CITY_HELP": "Code postal, Ville, Pays",
+    "DISTANCE": "Distance maximale autour de la ville",
+    "DISTANCE_UNIT": "km",
+    "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+    "SEARCH_HELP": "Code postal, Ville",
+    "PROFILE_POSITION": "Position du profil",
+    "MODAL": {
+      "TITLE": "Recherche de l'adresse",
+      "SEARCH_HELP": "Ville, Code postal, Pays",
+      "ALTERNATIVE_RESULT_DIVIDER": "Résultats alternatifs pour <b>{{address}}</b> :",
+      "POSITION": "Lat/Lon : {{lat}}/{{lon}}"
+    },
+    "ERROR": {
+      "CITY_REQUIRED_IF_STREET": "Champ obligatoire (car une rue est saisie)",
+      "REQUIRED_FOR_LOCATION": "Champ obligatoire pour apparaître sur la carte",
+      "INVALID_FOR_LOCATION": "Adresse inconnue",
+      "GEO_LOCATION_FAILED": "Impossible de récupérer votre position. Veuillez utiliser le bouton de recherche.",
+      "ADDRESS_LOCATION_FAILED": "Impossible de récupérer la position à partir de l'adresse"
+    }
+  },
+  "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Services en ligne",
+    "SUBSCRIPTION_DIVIDER_HELP": "Les services en ligne offrent des services supplémentaires et optionnels, délégués à un perstataire de votre choix. Par exemple, pour recevoir les notifications de paiement par email.",
+    "BTN_ADD": "Ajouter un service",
+    "BTN_EDIT": "Gérer mes services",
+    "NO_SUBSCRIPTION": "Aucun service utilisé",
+    "SUBSCRIPTION_COUNT": "Services / Abonnements",
+    "EDIT": {
+      "TITLE": "Services en ligne",
+      "HELP_TEXT": "Gérez ici vos abonnements et autres services en ligne",
+      "PROVIDER": "Prestataire :"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Recevoir les notifications par email"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Êtes-vous sûr de vouloir <b>supprimer cet abonnement</b> ?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Erreur lors du chargement des services en ligne",
+      "ADD_SUBSCRIPTION_FAILED": "Erreur de l'envoi de l'abonnement",
+      "UPDATE_SUBSCRIPTION_FAILED": "Erreur de la mise à jour de l'abonnement",
+      "DELETE_SUBSCRIPTION_FAILED": "Erreur lors de la suppression de l'abonnement"
+    },
+    "MODAL_EMAIL": {
+      "TITLE": "Notification par email",
+      "HELP": "Remplissez ce formulaire pour <b>être notifié par email</b> des événements de votre compte.<br/>Votre adresse email sera chiffrée pour n'être visible que par le prestataire de service.",
+      "EMAIL_LABEL": "Votre email :",
+      "EMAIL_HELP": "jean.dupond@domaine.com",
+      "FREQUENCY_LABEL": "Fréquence des notifications :",
+      "FREQUENCY_DAILY": "Journalier",
+      "FREQUENCY_WEEKLY": "Hebdomadaire",
+      "PROVIDER": "Prestataire du service :"
+    }
+  },
+  "DOCUMENT": {
+    "HASH": "Hash : ",
+    "LOOKUP": {
+      "TITLE": "Recherche de documents",
+      "BTN_ACTIONS": "Actions",
+      "SEARCH_HELP": "issuer:AAA*, time:1508406169",
+      "LAST_DOCUMENTS_DOTS": "Derniers documents :",
+      "LAST_DOCUMENTS": "Derniers documents",
+      "SHOW_QUERY": "Voir la requête",
+      "HIDE_QUERY": "Masquer la requête",
+      "HEADER_TIME": "Date/Heure",
+      "HEADER_ISSUER": "Emetteur",
+      "HEADER_RECIPIENT": "Destinataire",
+      "READ": "Lu",
+      "BTN_REMOVE": "Supprimer ce document",
+      "BTN_COMPACT": "Compacter",
+      "HAS_CREATE_OR_UPDATE_PROFILE": "a créé ou modifié son profil",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Actions",
+        "REMOVE_ALL": "Supprimer ces documents..."
+      }
+    },
+    "INFO": {
+      "REMOVED": "Document supprimé"
+    },
+    "CONFIRM": {
+      "REMOVE": "Êtes-vous sûr de vouloir <b>supprimer ce document</b> ?",
+      "REMOVE_ALL": "Êtes-vous sûr de vouloir <b>supprimer ces documents</b> ?"
+    },
+    "ERROR": {
+      "LOAD_DOCUMENTS_FAILED": "Erreur lors de la recherche de documents",
+      "REMOVE_FAILED": "Erreur lors de la suppression du document",
+      "REMOVE_ALL_FAILED": "Erreur lors de la suppression des documents"
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "PLUGIN_NAME_HELP": "Profils, notifications, messages privés",
+    "ENABLE_TOGGLE": "Activer l'extension ?",
+    "ENABLE_REMOTE_STORAGE": "Activer le stockage distant ?",
+    "ENABLE_REMOTE_STORAGE_HELP": "Permet de stockage (chiffré) de vos paramètres sur les noeuds Cesium+",
+    "ENABLE_MESSAGE_TOGGLE": "Activer les messages privés ?",
+    "PEER": "Nœud de données Cesium+",
+    "POPUP_PEER": {
+      "TITLE" : "Nœud de données",
+      "HELP" : "Saisissez l'adresse du nœud que vous voulez utiliser :",
+      "PEER_HELP": "serveur.domaine.com:port"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Notifications",
+      "HELP_TEXT": "Activez les types de notifications que vous souhaitez recevoir :",
+      "ENABLE_TX_SENT": "Notifier les <b>paiements émis</b> ?",
+      "ENABLE_TX_RECEIVED": "Notifier les <b>paiements reçus</b> ?",
+      "ENABLE_CERT_SENT": "Notifier les <b>certifications émises</b> ?",
+      "ENABLE_CERT_RECEIVED": "Notifier les <b>certifications reçues</b> ?",
+      "ENABLE_HTML5_NOTIFICATION": "Avertir à chaque nouvelle notification ?",
+      "ENABLE_HTML5_NOTIFICATION_HELP": "Ouvre une petite fenêtre à chaque nouvelle notification."
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Fonctionnalités optionnelles",
+      "ASK_ENABLE": "L'extension Cesium+ est <b>désactivée</b> dans vos paramètres, rendant inactives les fonctionnalités : <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Profils Cesium+</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Messages privés</b>.<li>&nbsp;&nbsp;<b><i class=\"icon ion-location\"></i> Cartes, etc.</b>.</ul><br/><b>Souhaitez-vous ré-activer</b> l'extension ?"
+    }
+  },
+  "ES_WALLET": {
+    "ERROR": {
+      "RECIPIENT_IS_MANDATORY": "Un destinataire est obligatoire pour le chiffrement."
+    }
+  },
+  "ES_PEER": {
+    "NAME": "Nom",
+    "DOCUMENTS": "Documents",
+    "SOFTWARE": "Logiciel",
+    "DOCUMENT_COUNT": "Nombre de documents",
+    "EMAIL_SUBSCRIPTION_COUNT": "{{emailSubscription}} abonné{{emailSubscription ? 's' : ''}} aux notifications par email"
+  },
+  "EVENT": {
+    "NODE_STARTED": "Votre noeud ES API <b>{{params[0]}}</b> est démarré",
+    "NODE_BMA_DOWN": "Le noeud <b>{{params[0]}}:{{params[1]}}</b> (utilisé par votre noeud ES API) est <b>injoignable</b>.",
+    "NODE_BMA_UP": "Le noeud <b>{{params[0]}}:{{params[1]}}</b> est à nouveau accessible.",
+    "MEMBER_JOIN": "Vous êtes maintenant <b>membre</b> de la monnaie <b>{{params[0]}}</b> !",
+    "MEMBER_LEAVE": "Vous n'êtes <b>plus membre</b> de la monnaie <b>{{params[0]}}</b> !",
+    "MEMBER_EXCLUDE": "Vous n'êtes <b>plus membre</b> de la monnaie <b>{{params[0]}}</b>, faute de non renouvellement ou par manque de certifications.",
+    "MEMBER_REVOKE": "La révocation de votre compte a été effectuée. Il ne pourra plus être un compte membre de la monnaie <b>{{params[0]}}</b>.",
+    "MEMBER_ACTIVE": "Votre renouvellement d'adhésion à la monnaie <b>{{params[0]}}</b> a été <b>pris en compte</b>.",
+    "TX_SENT": "Votre <b>paiement</b> à <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a été effectué.",
+    "TX_SENT_MULTI": "Votre <b>paiement</b> à <b>{{params[1]}}</b> a été effectué.",
+    "TX_RECEIVED": "Vous avez <b>reçu un paiement</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "Vous avez <b>reçu un paiement</b> de <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Votre <b>certification</b> à <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a été effectuée.",
+    "CERT_RECEIVED": "Vous avez <b>reçu une certification</b> de <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "USER": {
+      "LIKE_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> aime votre profil",
+      "FOLLOW_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> suit votre activité",
+      "STAR_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> vous a noté ({{params[3]}} <b class=\"ion-star\">)",
+      "MODERATION_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> vous demande une modération sur le profil : <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> demande la suppression d'un profil : <b>{{params[2]}}</b>",
+      "ABUSE_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a signalé votre profil"
+    },
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a commenté votre page : <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a modifié son commentaire sur votre page : <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a répondu à votre commentaire sur la page : <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a modifié sa réponse à votre commentaire sur la page : <b>{{params[2]}}</b>",
+      "FOLLOW_NEW_COMMENT": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a commenté la page : <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE_COMMENT": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a modifié son commentaire sur la page : <b>{{params[2]}}</b>",
+      "FOLLOW_NEW": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a ajouté la page : <b>{{params[2]}}</b>",
+      "FOLLOW_UPDATE": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a modifié la page : <b>{{params[2]}}</b>",
+      "MODERATION_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> vous demande une modération sur la page : <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "DELETION_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a signalé une page à supprimer : <b>{{params[2]}}</b><br/><b class=\"dark ion-quote\"> </b><span class=\"text-italic\">{{params[3]}}</span>",
+      "ABUSE_RECEIVED": "<span class=\"positive\"><i class=\"icon ion-person\"></i>&thinsp;{{name||params[1]}}</span> a signalé votre page : <b>{{params[2]}}</b>"
+    }
+  },
+  "LIKE": {
+    "ERROR": {
+      "FAILED_TOGGLE_LIKE": "Impossible d'exécuter cette action."
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Nœud de données <b>{{old}}</b> injoignable ou adresse invalide.<br/><br/>Voulez-vous temporairement utiliser le nœud de données <b>{{new}}</b> ?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Nœud de données <b>{{server}}</b> injoignable ou adresse invalide.<br/><br/>Cesium va continuer à fonctionner, <b>sans l'extension Cesium+</b> (profils utilisateur, messages privés, cartes et graphiques)<br/><br/>Vérifiez votre connexion Internet, ou changez de nœud de données dans les <a class=\"positive\" ng-click=\"doQuickFix('settings')\">paramètres de l'extension</a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "Le volume des données à envoyer dépasse la limite fixée par le serveur.<br/>Veuillez ré-essayer après avoir, par exemple, supprimer des photos."
+  }
+}
+);
+
+$translateProvider.translations("it-IT", {
+   "COMMON": {
+     "CATEGORY": "Categoria",
+     "CATEGORIES": "Categorie",
+     "CATEGORY_SEARCH_HELP": "Ricerca",
+     "LAST_MODIFICATION_DATE": "Aggiornato il ",
+     "SUBMIT_BY": "Inviato da",
+     "BTN_PUBLISH": "Pubblicare",
+     "BTN_PICTURE_DELETE": "Eliminare",
+     "BTN_PICTURE_FAVORISE": "Predefinito",
+     "BTN_PICTURE_ROTATE": "Girare",
+     "BTN_ADD_PICTURE": "Aggiungere foto",
+     "NOTIFICATIONS": {
+       "TITLE": "Notifiche",
+       "MARK_ALL_AS_READ": "Segna tutte come lette",
+       "NO_RESULT": "Nessuna notifica",
+       "SHOW_ALL": "Mostrare tutte",
+       "LOAD_NOTIFICATIONS_FAILED": "Impossibile caricare le notifiche"
+     }
+   },
+   "MENU": {
+     "REGISTRY": "Pagine",
+     "USER_PROFILE": "Mio profilo",
+     "MESSAGES": "Messaggi",
+     "NOTIFICATIONS": "Notifiche",
+     "INVITATIONS": "Inviti"
+   },
+   "ACCOUNT": {
+     "NEW": {
+       "ORGANIZATION_ACCOUNT": "Conto per enti",
+       "ORGANIZATION_ACCOUNT_HELP": "Se rappresenta un'azienda, un'associazione, etc.<br/>Questo conto non potrà creare il Dividendo Universale."
+     },
+     "EVENT": {
+       "MEMBER_WITHOUT_PROFILE": "Per ottenere sue certificazioni più velocemente, riempire le informazioni<a ui-sref=\"app.edit_profile\">del suo profilo</a>. I membri della rete si fidano più volontieri di profili verificabili."
+     },
+     "ERROR": {
+       "WS_CONNECTION_FAILED": "Cesium non può ricevere notifiche a causa di un problema tecnico (di conessione al data node Cesium+).<br/><br/>Se il problema persiste, le chiediamo di <b>scegliere un'altro data node</b> nelle impostazioni di Cesium+."
+     }
+   },
+   "WOT": {
+     "BTN_SUGGEST_CERTIFICATIONS_DOTS": "Suggerire delle identità da certificare..",
+     "BTN_ASK_CERTIFICATIONS_DOTS": "Chiedere una certificazione ai membri...",
+     "BTN_ASK_CERTIFICATION": "Chiedere una certificazione",
+     "SUGGEST_CERTIFICATIONS_MODAL": {
+       "TITLE": "Suggerire delle certificazioni",
+       "HELP": "Scegliere i suoi suggerimenti, aiuti"
+     },
+     "ASK_CERTIFICATIONS_MODAL": {
+       "TITLE": "Chiedere delle certificazioni",
+       "HELP": "Selezionare un ricevente"
+     },
+     "SEARCH": {
+      "DIVIDER_PROFILE": "Conti",
+      "DIVIDER_PAGE": "Pagine",
+      "DIVIDER_GROUP": "Gruppi"
+    },
+     "CONFIRM": {
+       "SUGGEST_CERTIFICATIONS": "E’ sicuro(a) di voler <b>suggerire queste certificazioni</b> ?",
+       "ASK_CERTIFICATION": " E’ sicuro(a) di voler  <b>chiedere una certificazione</b> ?",
+       "ASK_CERTIFICATIONS": " E’ sicuro(a) di voler <b>chiedere una certificazione</b> a questi membri ?"
+     },
+   },
+  "INVITATION": {
+    "TITLE": "Invitazioni",
+    "NO_RESULT": "Nessun invito ricevuto",
+    "BTN_DELETE_ALL": "Cancellare tutti gli inviti",
+    "BTN_DELETE": "Cancellare l'invito",
+    "BTN_NEW_INVITATION": "Nuovo invito",
+    "ASK_CERTIFICATION": "<a href=\"#/app/wot/{{pubkey}}/{{::uid}}\">{{::name||uid}}</a> ti ha chiesto una certificazione",
+    "SUGGESTION_CERTIFICATION": "<a href=\"#/app/wot/{{::pubkey}}/{{::uid}}\">{{::name||uid}}</a> è proposto per ricevere una certificazione",
+    "SUGGESTED_BY": "Suggerimento inviato da by <a class=\"positive\" href=\"#/app/wot/{{::issuer.pubkey}}/{{::issuer.uid}}\">{{::issuer.name||issuer.uid}}</a>",
+    "NOTIFICATIONS": {
+      "TITLE": "Inviti"
+    },
+    "LIST": {
+      "TITLE": "Inviti"
+    },
+    "NEW": {
+      "TITLE": "Nuovo invito",
+      "RECIPIENTS": "A",
+      "RECIPIENTS_HELP": "Riceventi dell'invito",
+      "RECIPIENTS_MODAL_TITLE": "Riceventi",
+      "RECIPIENTS_MODAL_HELP": "Scegliere riceventi:",
+      "SUGGESTION_IDENTITIES": "Suggerimenti di identità da certificare",
+      "SUGGESTION_IDENTITIES_HELP": "Suggerimenti di certificazioni",
+      "SUGGESTION_IDENTITIES_MODAL_TITLE": "Suggerimenti",
+      "SUGGESTION_IDENTITIES_MODAL_HELP": "Scegli tuoi sugerimenti:"
+    },
+    "CONFIRM": {
+      "DELETE_ALL_CONFIRMATION": "Cancellare degli inviti è <b>una operazione irreversibile</b>.<br/><br/><b>Sei sicuro/a</b> di voler proseguire",
+      "SEND_INVITATIONS_TO_CERTIFY": "<b>Sei sicuro/a</b> di voler <b>inviare questo suggerimento di certificazione</b> ?"
+    },
+    "INFO": {
+      "INVITATION_SENT": "Invito inviato"
+    },
+    "ERROR": {
+      "LOAD_INVITATIONS_FAILED": "Errore nel caricare gli inviti",
+      "REMOVE_INVITATION_FAILED": "Errore nel cancellare gli inviti",
+      "REMOVE_ALL_INVITATIONS_FAILED": "Errore nel cancellare inviti",
+      "SEND_INVITATION_FAILED": "Errore nel invio degli inviti",
+      "BAD_INVITATION_FORMAT": "<span class=\"assertive\"><i class=\"ion-close-circled\"></i> Invito illegibile (formatto sconosciuto)</span> - inviato da <a ui-sref=\"app.wot_identity({pubkey: '{{::pubkey}}', uid: '{{::uid}}' })\">{{::name||uid}}</a>"
+    }
+  },
+   "COMMENTS": {
+     "DIVIDER": "Commenti",
+     "SHOW_MORE_COMMENTS": "Mostrare commenti precedenti",
+     "COMMENT_HELP": "Suo commento o domanda...",
+     "COMMENT_HELP_REPLY_TO": "Sua risposta...",
+     "BTN_SEND": "Inviare",
+     "POPOVER_SHARE_TITLE": "Messaggio #{{number}}",
+     "REPLY": "Rispondere",
+     "REPLY_TO": "Rispondere a:",
+     "REPLY_TO_LINK": "In risposta a",
+     "REPLY_TO_DELETED_COMMENT": "In risposta ad un commento cancellato",
+     "REPLY_COUNT": "{{replyCount}} risposte",
+     "DELETED_COMMENT": "Commento cancellato",
+     "ERROR": {
+       "FAILED_SAVE_COMMENT": "Salvare il commento cancellato",
+       "FAILED_REMOVE_COMMENT": "Cancellazione del commento fallita"
+     }
+   },
+   "MESSAGE": {
+     "REPLY_TITLE_PREFIX": "Re: ",
+     "FORWARD_TITLE_PREFIX": "Fw: ",
+     "BTN_REPLY": "Rispondere",
+     "BTN_COMPOSE": "Nuovo messaggio",
+     "BTN_WRITE": "Scrivere",
+     "NO_MESSAGE_INBOX": "Nessun messaggio ricevuto",
+     "NO_MESSAGE_OUTBOX": "Nessun messaggio inviato",
+     "NOTIFICATIONS": {
+       "TITLE": "Messaggi",
+       "MESSAGE_RECEIVED": "Hai <b>ricevuto un messaggio/b><br/>da"
+     },
+     "LIST": {
+       "INBOX": "In entrata",
+       "OUTBOX": "In uscita",
+       "TITLE": "Messaggi privati",
+       "POPOVER_ACTIONS": {
+         "TITLE": "Opzioni",
+         "DELETE_ALL": "Eliminare tutti i messaggi"
+       }
+     },
+     "COMPOSE": {
+       "TITLE": "Nuovo messaggio",
+       "TITLE_REPLY": "Rispondere",
+       "SUB_TITLE": "Nuovo messaggio",
+       "TO": "A",
+       "OBJECT": "Oggetto",
+       "OBJECT_HELP": "Oggetto",
+       "ENCRYPTED_HELP": "La informiamo che questo messaggio verrà criptato prima della sua spedizione in modo che solo il destinatario lo possa leggere e essere sicuro che ne sia Lei l'autore.",
+       "MESSAGE": "Messaggio",
+       "MESSAGE_HELP": "Contenuto del messaggio",
+       "CONTENT_CONFIRMATION": "Nessun contenuto. <br/><br/>E’ sicura di voler inviare questo messaggio?"
+     },
+     "VIEW": {
+       "TITLE": "Messaggio",
+       "SENDER": "Inviato da",
+       "RECIPIENT": "Inviato a",
+       "NO_CONTENT": "Messaggio vuoto",
+       "DELETE": "Cancellare il messaggio"
+     },
+     "CONFIRM": {
+       "REMOVE": "E’ sicuro/a di voler <b>eliminare il messaggio</b>?<br/><br/> Questa operazione è irreversibile.",
+       "REMOVE_ALL": "E’ sicuro/a di voler <b>eliminare tutti i messaggi</b>?<br/><br/> Questa operazione è irreversibile.",
+       "MARK_ALL_AS_READ": "E’ sicuro/a di voler <b>segnare tutti i messaggi come letti/b>?",
+       "USER_HAS_NO_PROFILE": "Questa identità non ha un profilo Cesium+. Pertanto non può <b>leggere il suo messaggio</b>.<br/><br/>E’ sicuro/a di voler <b>continuare</b>?"
+     },
+     "INFO": {
+       "MESSAGE_REMOVED": "Messaggio eliminato correttamente",
+       "All_MESSAGE_REMOVED": "Messaggi eliminati correttamente",
+       "MESSAGE_SENT": "Messaggio inviato"
+     },
+     "ERROR": {
+       "SEND_MSG_FAILED": "Errore nella spedizione del messaggio.",
+       "LOAD_MESSAGES_FAILED": "Errore durante il caricamento dei messaggi.",
+       "LOAD_MESSAGE_FAILED": "Errore durante il caricamento del messaggio.",
+       "MESSAGE_NOT_READABLE": "Impossibile leggere il messaggio.",
+       "USER_NOT_RECIPIENT": "Lei non è il destinatario del messaggio: impossibile leggerlo.",
+       "NOT_AUTHENTICATED_MESSAGE": "Impossibile verificare l'autenticità del messaggio o contenuto corrotto.",
+       "REMOVE_MESSAGE_FAILED": "Errore avvenuto durante l'eliminazione del messaggio",
+       "MESSAGE_CONTENT_TOO_LONG": "Il contenuto supera il limite ({{maxLength}} caratteri ammessi).",
+       "MARK_AS_READ_FAILED": "Impossibile segnare il messaggio come 'letto'.",
+       "LOAD_NOTIFICATIONS_FAILED": "Errore nel caricare le notifiche.",
+       "REMOVE_All_MESSAGES_FAILED": "Errore avvenuto durante l'eliminazione dei messaggi.",
+       "MARK_ALL_AS_READ_FAILED": "Errore avvenuto nel segnare i messaggi come 'letti",
+       "RECIPIENT_IS_MANDATORY": "Destinatario obbligatorio"
+     }
+   },
+   "BLOCKCHAIN": {
+    "LOOKUP": {
+      "SEARCH_HELP": "Numero di blocco, hash...",
+      "POPOVER_FILTER_TITLE": "Filtro",
+      "HEADER_MEDIAN_TIME": "Data / Ora",
+      "HEADER_BLOCK": "Blocco #",
+      "HEADER_ISSUER": "Peer proprietario",
+      "BTN_LAST": "Ultimi blocchi",
+      "DISPLAY_QUERY": "Visualizzare query",
+      "HIDE_QUERY": "Nascondere query",
+      "TX_SEARCH_FILTER": {
+        "MEMBER_FLOWS": "<b class=\"ion-person\"></b> Input/output Membri",
+        "EXISTING_TRANSACTION": "<b class=\"ion-card\"></b> hanno transazioni",
+        "PERIOD": "<b class=\"ion-clock\"></b> Tra <b class=\"gray\">{{params[1]|medianDateShort}}</b> ({{params[1]|medianTime}}) e <b class=\"gray\">{{params[2]|medianDateShort}}</b> ({{params[2]|medianTime}})",
+        "ISSUER": "<b class=\"ion-android-desktop\"></b> Calcolato da {{params[1]|formatPubkey}}",
+        "TX_PUBKEY": "<b class=\"ion-card\"></b> Transazioni legate a  <b class=\"ion-key\"></b> {{params[1]|formatPubkey}}"
+      }
+    },
+    "ERROR": {
+      "SEARCH_BLOCKS_FAILED": "Errore durante la ricerca dei blocchi."
+    }
+  },
+  "GROUP": {
+    "GENERAL_DIVIDER": "Informazioni generali",
+    "LOCATION_DIVIDER": "Indirizzo",
+    "SOCIAL_NETWORKS_DIVIDER": "Presenza sui social e/o sito web",
+    "TECHNICAL_DIVIDER": "Dati tecnici",
+    "CREATED_TIME": "Creato {{creationTime|formatFromNow}}",
+    "NOTIFICATIONS": {
+      "TITLE": "Inviti"
+    },
+    "LOOKUP": {
+      "TITLE": "Gruppi",
+      "SEARCH_HELP": "Nome del grupo, parole chiavi, luogo, etc.",
+      "LAST_RESULTS_LIST": "Nuovi gruppi :",
+      "OPEN_RESULTS_LIST": "Gruppi aperti :",
+      "MANAGED_RESULTS_LIST": "Gruppi chiusi :",
+      "BTN_LAST": "Nuovi gruppi",
+      "BTN_NEW": "Aggiungo un grupo!"
+    },
+    "TYPE": {
+      "TITLE": "Nuovo gruppo",
+      "SELECT_TYPE": "Tipo di gruppo :",
+      "OPEN_GROUP": "Gruppo aperto",
+      "OPEN_GROUP_HELP": "Un gruppo aperto è accessibile da qualsiasi membro della moneta.",
+      "MANAGED_GROUP": "Gruppo amministrato",
+      "MANAGED_GROUP_HELP": "un gruppo amministrato è gestito da amministratori e moderatori, che possono accetare, rifiutare o escludere membri del gruppo.",
+      "ENUM": {
+        "OPEN": "Gruppo aperto",
+        "MANAGED": "Gruppo amministrato"
+      }
+    },
+    "VIEW": {
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "MENU_TITLE": "Opzioni",
+      "REMOVE_CONFIRMATION" : "Sei sicuro/a di voler chiudere questo gruppo ?<br/><br/>Questa operazione è irreversibile."
+    },
+    "EDIT": {
+      "TITLE": "Gruppo",
+      "TITLE_NEW": "Nuovo gruppo",
+      "RECORD_TITLE": "Titolo",
+      "RECORD_TITLE_HELP": "Titolo",
+      "RECORD_DESCRIPTION": "Descrizione",
+      "RECORD_DESCRIPTION_HELP": "Descrizione"
+    },
+    "ERROR": {
+      "SEARCH_GROUPS_FAILED": "Errore nella ricerca di gruppi",
+      "REMOVE_RECORD_FAILED": "Errore nel chiudere il gruppo"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Gruppo eliminato"
+    }
+  },
+   "REGISTRY": {
+     "CATEGORY": "Attività principale",
+     "GENERAL_DIVIDER": "Informazioni di base",
+     "LOCATION_DIVIDER": "Indirizzo",
+     "SOCIAL_NETWORKS_DIVIDER": "Presenza sui social, sito web",
+     "TECHNICAL_DIVIDER": "Dati tecnici",
+     "BTN_SHOW_WOT": "Persone",
+     "BTN_SHOW_WOT_HELP": "Cercare persone",
+     "BTN_SHOW_PAGES": "Pagine",
+     "BTN_SHOW_PAGES_HELP": "Cercare pagine",
+     "BTN_NEW": "Aggiungere",
+     "MY_PAGES": "Mie pagine",
+     "NO_PAGE": "Nessuna pagina",
+     "SEARCH": {
+         "TITLE": "Pagine",
+         "SEARCH_HELP": "Che, chi: parrucchiere, Pizza Efisio, ...",
+         "BTN_ADD": "Nuovo",
+         "BTN_LAST_RECORDS": "Pagine recenti",
+         "BTN_ADVANCED_SEARCH": "Ricerca avanzata",
+         "BTN_OPTIONS": "Ricerca avanzata",
+         "TYPE": "Tipo di ente",
+         "LOCATION_HELP": "Città",
+         "RESULTS": "Risultati",
+         "RESULT_COUNT_LOCATION": "{{count}} risultato{{count>0?'i':''}}, vicino a {{location}}",
+         "RESULT_COUNT": "{{count}} risultato{{count>0?'i':''}}",
+         "LAST_RECORDS": "Pagine recenti:",
+         "LAST_RECORD_COUNT_LOCATION": "{{count}} pagina{{count>0?'e':''}} recente{{count>0?'i':''}}, vicino a{{location}}",
+         "LAST_RECORD_COUNT": "{{count}} pagina{{count>0?'e':''}} recente{{count>0?'i':''}}",
+         "POPOVER_FILTERS": {
+           "BTN_ADVANCED_SEARCH": "Opzioni avanzate ?"
+         }
+     },
+     "VIEW": {
+       "TITLE": "Annuario",
+       "CATEGORY": "Attività principale:",
+       "LOCATION": "Indirizzo:",
+       "MENU_TITLE": "Impostazioni",
+       "POPOVER_SHARE_TITLE": "{{title}}",
+       "REMOVE_CONFIRMATION" : "E’ sicuro/a di voler eliminare questo riferimento?<br/><br/>Questa operazione è irreversibile."
+     },
+     "TYPE": {
+       "TITLE": "Nuovo riferimento",
+       "SELECT_TYPE": "Tipo di ente/organismo:",
+       "ENUM": {
+         "SHOP": "Negozi locali",
+         "COMPANY": "Azienda",
+         "ASSOCIATION": "Associazione",
+         "INSTITUTION": "Istituto"
+       }
+     },
+     "EDIT": {
+       "TITLE": "Modificare",
+       "TITLE_NEW": "Nuovo riferimento",
+       "RECORD_TYPE": "Tipo di ente",
+       "RECORD_TITLE": "Nome",
+       "RECORD_TITLE_HELP": "Nome",
+       "RECORD_DESCRIPTION": "Descrizione",
+       "RECORD_DESCRIPTION_HELP": "Descrivere l'attività",
+       "RECORD_ADDRESS": "Indirizzo",
+       "RECORD_ADDRESS_HELP": "Indirizzo: Strada, numero civico...",
+       "RECORD_CITY": "Città",
+       "RECORD_CITY_HELP": "Città, Paese",
+       "RECORD_SOCIAL_NETWORKS": "Presenza sui social e/o sito web",
+       "RECORD_PUBKEY": "Chiave pubblica",
+       "RECORD_PUBKEY_HELP": "Chiave pubblica per ricevere pagamenti"
+     },
+     "WALLET": {
+      "PAGE_DIVIDER": "Pagine",
+      "PAGE_DIVIDER_HELP": "Le pagine sono un elenco dei profesionisti che accettano o favoriscono: negozi, aziende, associazioni, istituti..."
+    },
+     "ERROR": {
+       "LOAD_CATEGORY_FAILED": "Errore nel caricamento delle attività principali",
+       "LOAD_RECORD_FAILED": "Caricamento fallito",
+       "LOOKUP_RECORDS_FAILED": "Errore nel caricare i dati",
+       "REMOVE_RECORD_FAILED": "Errore nella cancellazione",
+       "SAVE_RECORD_FAILED": "Impossibile salvare",
+       "RECORD_NOT_EXISTS": "Inesistente",
+       "GEO_LOCATION_NOT_FOUND": "Città o CAP inesistente"
+     },
+     "INFO": {
+       "RECORD_REMOVED" : "Pagina eliminata con successo.",
+       "RECORD_SAVED": "Pagina salvata"
+     }
+   },
+   "PROFILE": {
+     "PROFILE_DIVIDER": "Profilo Cesium+",
+     "PROFILE_DIVIDER_HELP": "Si tratta qui di data esterni, salvati fuori della rete della moneta.",
+     "NO_PROFILE_DEFINED": "Nessun profilo Cesium+",
+     "BTN_ADD": "Creare mio profilo",
+     "BTN_EDIT": "Modificare mio profilo",
+     "UID": "Pseudonimo",
+     "TITLE": "Cognome, Nome",
+     "TITLE_HELP": "Nome",
+     "DESCRIPTION": "A proposito di me",
+     "DESCRIPTION_HELP": "A proposito di me...",
+     "SOCIAL_HELP": "http://...",
+     "GENERAL_DIVIDER": "Informazioni generali",
+     "SOCIAL_NETWORKS_DIVIDER": "Presenza sui social e sito/i web",
+     "TECHNICAL_DIVIDER": "Dati tecnici",
+     "MODAL_AVATAR": {
+       "TITLE": "Avatar",
+       "SELECT_FILE_HELP": "<b>Scegliere un'immagine</b>, cliccando sul bottone qui sotto:",
+       "BTN_SELECT_FILE": "Scegliere un'immagine",
+       "RESIZE_HELP": "<b>Ritagliare l'immagine</b> se necessario. Cliccare sull'immagine permette di spostarla. Cliccando nella zona a basso sinistra permette di fare uno zoom-in.",
+       "RESULT_HELP": "<b>Questo è il risultato</b> come visibile sul suo profilo:"
+     },
+     "ERROR": {
+       "LOAD_PROFILE_FAILED": "Impossibile caricare il profilo dell’utente.",
+       "SAVE_PROFILE_FAILED": "Impossibile salvare il profilo",
+       "INVALID_SOCIAL_NETWORK_FORMAT": "Formatto scorretto: URL sbagliato.<br/><br/>Esempi: :<ul><li>- Una pagina Facebook (https://www.facebook.com/user)</li><li>- Un sito: (http://www.domain.com)</li><li>- Un indirizzo mail: (joe@dalton.com)</li></ul>",
+       "IMAGE_RESIZE_FAILED": "Errore nel ritagliare l'immagine"
+     },
+     "INFO": {
+       "PROFILE_SAVED": "Profilo salvato"
+     },
+     "HELP": {
+       "WARNING_PUBLIC_DATA": "La informiamo che le informazioni qui pubblicate <b>sono pubbliche</b>: sono anche visibili <b>da gente non registrata/b>."
+     }
+   },
+   "LOCATION": {
+     "BTN_GEOLOC_ADDRESS": "Trovare mio indirizzo sulla mappa",
+     "USE_GEO_POINT": "Geo-localizzare (raccomandato)?",
+     "LOADING_LOCATION": "Cercando indirizzo...",
+     "LOCATION_DIVIDER": "Posizione",
+     "ADDRESS": "Indirizzo",
+     "ADDRESS_HELP": "Indirizzo (opzionale)",
+     "CITY": "Città",
+     "CITY_HELP": "Città, Paese",
+     "DISTANCE": "Distanza massimale intorno alla città",
+     "DISTANCE_UNIT": "km",
+     "DISTANCE_OPTION": "{{value}} {{'LOCATION.DISTANCE_UNIT'|translate}}",
+     "SEARCH_HELP": "Città, CAP",
+     "MODAL": {
+       "TITLE": "Cercare indirizzo",
+       "SEARCH_HELP": "Città, Paese",
+       "ALTERNATIVE_RESULT_DIVIDER": "Risultati alternativi <b>{{address}}</b>:",
+       "POSITION": "lat/lon : {{lat}} {{lon}}"
+     },
+     "ERROR": {
+       "REQUIRED_FOR_LOCATION": "Campo obbligatorio per apparire sulla mappa",
+       "INVALID_FOR_LOCATION": "Indirizzo sconosciuto",
+       "GEO_LOCATION_FAILED": "Impossibile trovare sua posizione. Utilizzi il bottone di ricerca.",
+       "ADDRESS_LOCATION_FAILED": "Indirizzo non trovato"
+     }
+   },
+   "SUBSCRIPTION": {
+    "SUBSCRIPTION_DIVIDER": "Servizi online",
+    "SUBSCRIPTION_DIVIDER_HELP": "I servizi online offrono servizi addizionali opzionali, delegati ad terzi.",
+    "BTN_ADD": "Aggiungere un servizio",
+    "BTN_EDIT": "Gestire miei servizi",
+    "NO_SUBSCRIPTION": "Nessun servizio utilizzato",
+    "SUBSCRIPTION_COUNT": "Servizi/ Abbonamenti",
+    "EDIT": {
+      "TITLE": "Servizi online",
+      "HELP_TEXT": "Qui si possono gestire gli abbonamenti e/o altri servizi online",
+      "PROVIDER": "Prestatore :"
+    },
+    "TYPE": {
+      "ENUM": {
+        "EMAIL": "Ricevere notifiche per posta elettronica"
+      }
+    },
+    "CONFIRM": {
+      "DELETE_SUBSCRIPTION": "Sei sicuro/a di voler <b>cancellare questo abbonamento</b> ?"
+    },
+    "ERROR": {
+      "LOAD_SUBSCRIPTIONS_FAILED": "Errore nel caricamento dei servizi online",
+      "ADD_SUBSCRIPTION_FAILED": "Errore nel invio dell' abbonamento",
+      "UPDATE_SUBSCRIPTION_FAILED": "Errore nel aggiornamento dell' abbonamento",
+      "DELETE_SUBSCRIPTION_FAILED": "Errore nella cancellazine dell' abbonamento"
+    },
+    "MODAL_EMAIL": {
+      "TITLE" : "Notifiche per posta elettronica",
+      "HELP" : "Riempi questo formulario per <b>essere notificato/a per e-mail</b> degli eventi che avvengono sul tuo conto.<br/>Tuo indizzo mail sarà cifrato e solo il prestatore del servizio lo potrà vedere.",
+      "EMAIL_LABEL" : "Tuo indirizzo mail :",
+      "EMAIL_HELP": "cristiana.leonardi@dominio.com",
+      "FREQUENCY_LABEL": "Frequenza delle notifiche :",
+      "FREQUENCY_DAILY": "Quotidiano",
+      "FREQUENCY_WEEKLY": "Settimanale",
+      "PROVIDER": "Prestatore del servizio :"
+    }
+  },
+  "DOCUMENT": {
+    "HASH": "Hash: ",
+    "LOOKUP": {
+      "TITLE": "Ricerca di documenti",
+      "BTN_ACTIONS": "Azioni",
+      "SEARCH_HELP": "issuer:AAA*, time:1508406169",
+      "LAST_DOCUMENTS": "Ultimi documenti",
+      "SHOW_QUERY": "Visualizzare la richiesta",
+      "HIDE_QUERY": "Nacondere la richiesta",
+      "HEADER_TIME": "Data/Ora",
+      "HEADER_ISSUER": "Emittente",
+      "HEADER_RECIPIENT": "Destinatario",
+      "READ": "Letto",
+      "BTN_REMOVE": "Eliminare questo documento",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Azioni",
+        "REMOVE_ALL": "Eliminare questi documenti..."
+      }
+    },
+    "INFO": {
+      "REMOVED": "Documento eliminato"
+    },
+    "CONFIRM": {
+      "REMOVE": "Sei sicuro/a di voler <b>eliminare questo documento</b> ?",
+      "REMOVE_ALL": "Si sicuro/a di voler <b>eliminare questi documenti</b> ?"
+    },
+    "ERROR": {
+      "LOAD_DOCUMENTS_FAILED": "Errore nella ricerca dei documenti",
+      "REMOVE_FAILED": "Errore nell'eliminazione del documento",
+      "REMOVE_ALL_FAILED": "Errore nell'eliminazione dei documenti"
+    }
+  },
+   "ES_SETTINGS": {
+     "PLUGIN_NAME": "Cesium+",
+     "PLUGIN_NAME_HELP": "Profili di utenti, notifiche, messaggi privati",
+     "ENABLE_TOGGLE": "Abilitare l'estensione ?",
+     "ENABLE_MESSAGE_TOGGLE": "Abilitare i messaggi? privati",
+     "ENABLE_SETTINGS_TOGGLE": "Abilitare stoccaggio su dispositivi esterni per le impostazioni?",
+     "PEER": "Indirizzo di data peers",
+     "POPUP_PEER": {
+       "TITLE" : "Data peer",
+       "HELP" : "Definire l'indirizzo da usare per il peer:",
+       "PEER_HELP": "server.domain.com:port"
+     },
+     "NOTIFICATIONS": {
+       "DIVIDER": "Notifiche",
+       "HELP_TEXT": "Scegliere le notifiche che accetta ricevere:",
+       "ENABLE_TX_SENT": "Notificarmi di <b>pagamenti inviati</b> con successo?",
+       "ENABLE_TX_RECEIVED": "Notificarmi di <b>pagamenti in entrata</b>?",
+       "ENABLE_CERT_SENT": "Notificarmi delle <b>certificazioni inviate</b>?",
+       "ENABLE_CERT_RECEIVED": "Notificarmi di <b>certificazioni ricevute</b>?"
+     },
+     "CONFIRM": {
+       "ASK_ENABLE_TITLE": "Nuove funzionalità",
+       "ASK_ENABLE": "Sono disponibili nuove funzionalità: <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i>Profili di utenti</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Messaggi privati/b>.</ul><br/>Sono state <b>disabilitate</b> nelle sue impostazioni.<br/><br/><b>Desidera abilitare</b> queste funzionalità?"
+     }
+   },
+   "ES_WALLET": {
+     "ERROR": {
+       "RECIPIENT_IS_MANDATORY": "Un destinatario è necessario per il criptaggio."
+     }
+   },
+   "EVENT": {
+     "NODE_STARTED": "Suo nodo ES API <b>{{params[0]}}</b> è UP",
+     "NODE_BMA_DOWN": "Nodo<b>{{params[0]}}:{{params[1]}}</b> (utilizzato dal suo ES API) è <b>indisponibile</b>.",
+     "NODE_BMA_UP": "Nodo <b>{{params[0]}}:{{params[1]}}</b> è di nuovo attivo.",
+     "MEMBER_JOIN": "E diventato <b>membro/a</b> della WoT della moneta <b>{{params[0]}}</b>!",
+     "MEMBER_LEAVE": "Non <b>è più membro/a</b> della WoT della moneta <b>{{params[0]}}</b>!",
+     "MEMBER_EXCLUDE": "Non è <b>più membro/a</b> della WoT della moneta<b>{{params[0]}}</b>, a causa di certificazioni non rinnovate o soglia di certificazioni non raggiunta.",
+     "MEMBER_REVOKE": "Il suo conto è stato revocato. Da ora in poi non farà più parte della WoT. <b>{{params[0]}}</b>.",
+     "MEMBER_ACTIVE": "La sua presenza nella WoT <b>{{params[0]}}</b> è stata <b>rinnovata correttamente</b>.",
+     "TX_SENT": "Il suo pagamento <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> è stato eseguito.",
+     "TX_SENT_MULTI": "Il suo pagamento <b>{{params[1]}}</b> è stato eseguito.",
+     "TX_RECEIVED": "Ha ricevuto un pagamento da <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+     "TX_RECEIVED_MULTI": "Ha ricevuto un pagamento da <b>{{params[1]}}</b>.",
+     "CERT_SENT": "Sua <b>certificazione</b> a favore di <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> è stata eseguita.",
+     "CERT_RECEIVED": "Ha ricevuto <b>una certificazione</b> da parte di <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+     "PAGE": {
+       "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha scritto un commento sul suo riferimento: <b>{{params[2]}}</b>",
+       "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificato il suo commento sul suo riferimento: <b>{{params[2]}}</b>",
+       "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha risposto al suo commento sul riferimento: <b>{{params[2]}}</b>",
+       "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificato sua risposta sul suo commento a proposito del riferimento: <b>{{params[2]}}</b>"
+     }
+   },
+   "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Nodo<b>{{old}}</b> irraggiungibile o indirizzo sbagliato.<br/><br/>Vuoi utilizzare temporaneamente il nodo di dati <b>{{new}}</b> ?"
+  },
+   "ERROR": {
+    "ES_CONNECTION_ERROR": "Nodo di dati<b>{{server}}</b>  irraggiungibile o indirizzo sbagliato.<br/><br/>Cesium continuerà a funzionare <b>senza l'estensione Cesium+</b> (profili utenti, messaggi privati, mappe e grafici)<br/><br/>Verifica tua connessione o cambia nodo <a class=\"positive\" ng-click=\"doQuickFix('settings')\">impostazioni dell'estensione</a>.",
+     "ES_MAX_UPLOAD_BODY_SIZE": "Il volume di data da inviare supera il limite imposto dal server.<br/><br/>Suggeriamo di riprovare dopo aver eliminato delle foto, per esempio."
+   }
+ }
+);
+
+$translateProvider.translations("nl-NL", {
+  "COMMON": {
+    "CATEGORY": "Categorie",
+    "CATEGORIES": "Categorieën",
+    "CATEGORY_SEARCH_HELP": "Zoeken",
+    "LAST_MODIFICATION_DATE": "Vernieuwd op ",
+    "SUBMIT_BY": "Ingediend door",
+    "BTN_PUBLISH": "Publiceren",
+    "BTN_PICTURE_DELETE": "Wissen",
+    "BTN_PICTURE_FAVORISE": "Default",
+    "BTN_ADD_PICTURE": "Afbeelding toevoegen",
+    "NOTIFICATIONS": {
+      "TITLE": "Notificaties",
+      "MARK_ALL_AS_READ": "Markeer alles als gelezen",
+      "NO_RESULT": "Geen berichten",
+      "SHOW_ALL": "Toon alles",
+      "LOAD_NOTIFICATIONS_FAILED": "Kan berichten niet laden"
+    }
+  },
+  "MENU": {
+    "REGISTRY": "Pagina's",
+    "USER_PROFILE": "Mijn profiel",
+    "MESSAGES": "Berichten"
+  },
+  "ACCOUNT": {
+    "NEW": {
+      "ORGANIZATION_ACCOUNT": "Ondernemingsrekening",
+      "ORGANIZATION_ACCOUNT_HELP": "Als je een onderneming, vereniging etc. vertegenwoordigt.<br/>Deze rekening zal geen dividend créeren."
+    },
+    "EVENT": {
+      "MEMBER_WITHOUT_PROFILE": "Vul <a ui-sref=\"app.edit_profile\"je gebruikersprofiel</a> in om sneller een certificering te verkrijgen. Leden zullen een verfifieerbare identiteit eerder vertrouwen."
+    }
+  },
+  "COMMENTS": {
+    "DIVIDER": "Commentaren",
+    "SHOW_MORE_COMMENTS": "Toon eerdere commentaren",
+    "COMMENT_HELP": "Jouw commentaar, vraag...",
+    "COMMENT_HELP_REPLY_TO": "Jouw antwoord...",
+    "BTN_SEND": "Verzenden",
+    "POPOVER_SHARE_TITLE": "Bericht #{{number}}",
+    "REPLY": "Antwoord",
+    "REPLY_TO": "Antwoorden op:",
+    "REPLY_TO_LINK": "In antwoord op ",
+    "REPLY_TO_DELETED_COMMENT": "In antwoord op een gewist bericht",
+    "REPLY_COUNT": "{{replyCount}} antwoorden",
+    "DELETED_COMMENT": "Bericht gewist"
+  },
+  "MESSAGE": {
+    "REPLY_TITLE_PREFIX": "Re: ",
+    "FORWARD_TITLE_PREFIX": "Fw: ",
+    "BTN_REPLY": "Antwoord",
+    "BTN_COMPOSE": "Nieuw bericht",
+    "BTN_WRITE": "Schrijven",
+    "NO_MESSAGE_INBOX": "Geen bericht ontvangen",
+    "NO_MESSAGE_OUTBOX": "Geen bericht verzonden",
+    "NOTIFICATIONS": {
+      "TITLE": "Berichten",
+      "MESSAGE_RECEIVED": "Je hebt een <b>bericht ontvangen</b><br/>van"
+    },
+    "LIST": {
+      "INBOX": "Inbox",
+      "OUTBOX": "Verzonden",
+      "TITLE": "Privé",
+      "POPOVER_ACTIONS": {
+        "TITLE": "Opties",
+        "DELETE_ALL": "Alle berichten wissen"
+      }
+    },
+    "COMPOSE": {
+      "TITLE": "Nieuw bericht",
+      "TITLE_REPLY": "Antwoord",
+      "SUB_TITLE": "Nieuw bericht",
+      "TO": "Aan",
+      "OBJECT": "Onderwerp",
+      "OBJECT_HELP": "Onderwerp",
+      "ENCRYPTED_HELP": "Please note this message will by encrypt before sending zodat alleen de ontvanger het kan lezen en zeker kan zijn dat jij de auteur bent.",
+      "MESSAGE": "Bericht",
+      "MESSAGE_HELP": "Berichtinhoud",
+      "CONTENT_CONFIRMATION": "Geen berichtinhoud.<br/><br/>Weet je zeker dat je dit bericht wil verzenden?"
+    },
+    "VIEW": {
+      "TITLE": "Bericht",
+      "SENDER": "Verzonden door",
+      "RECIPIENT": "Verzonden aan",
+      "NO_CONTENT": "Leeg bericht"
+    },
+    "CONFIRM": {
+      "REMOVE": "Weet je zeker dat je <b>dit bericht wil wissen</b>?<br/><br/>Dit kan niet ongedaan gemaakt worden.",
+      "REMOVE_ALL": "Weet je zeker dat je <b>alle berichten wil wissen</b>?<br/><br/>Dit kan niet ongedaan gemaakt worden.",
+      "MARK_ALL_AS_READ": "Weet je zeker dat je <b>alle berichten als gelezen wil markeren</b>?"
+    },
+    "INFO": {
+      "MESSAGE_REMOVED": "Bericht succesvol gewist",
+      "All_MESSAGE_REMOVED": "Berichten succesvol gewist",
+      "MESSAGE_SENT": "Bericht verzonden"
+    },
+    "ERROR": {
+      "SEND_MSG_FAILED": "Fout tijdens verzending.",
+      "LOAD_MESSAGES_FAILED": "Kan berichten niet laden.",
+      "LOAD_MESSAGE_FAILED": "Kan bericht niet laden.",
+      "MESSAGE_NOT_READABLE": "Kan bericht niet lezen.",
+      "USER_NOT_RECIPIENT": "Je bent niet de geadresseerde van dit bericht: het kan niet gelezen worden.",
+      "NOT_AUTHENTICATED_MESSAGE": "De authenticiteit van het bericht is onduidelijk of de inhoud is gecorrumpeerd.",
+      "REMOVE_MESSAGE_FAILED": "Kan bericht niet wissen.",
+      "MESSAGE_CONTENT_TOO_LONG": "Waarde te lang (max {{maxLength}} characters).",
+      "MARK_AS_READ_FAILED": "Kan bericht niet als gelezen markeren.",
+      "LOAD_NOTIFICATIONS_FAILED": "Kan niet alle berichtnotificaties laden.",
+      "REMOVE_All_MESSAGES_FAILED": "Kan niet alle berichten wissen.",
+      "MARK_ALL_AS_READ_FAILED": "Kan berichten niet als gelezen markeren."
+    }
+  },
+  "REGISTRY": {
+    "CATEGORY": "Hoofdactiviteit",
+    "GENERAL_DIVIDER": "Basisinformatie",
+    "LOCATION_DIVIDER": "Adres",
+    "SOCIAL_NETWORKS_DIVIDER": "Sociale media en website",
+    "TECHNICAL_DIVIDER": "Technische informatie",
+    "BTN_NEW": "Toevoegen",
+    "SEARCH": {
+      "TITLE": "Bedrijfsregister",
+      "TITLE_SMALL_DEVICE": "Bedrijfsregister",
+      "SEARCH_HELP": "Wie, Wat: kapper, Lili's restaurant, ...",
+      "BTN_ADD": "Nieuw",
+      "BTN_OPTIONS": "Geavanceerd zoeken",
+      "TYPE": "Soort organisatie",
+      "LOCATION": "Locatie",
+      "LOCATION_HELP": "Plaats",
+      "LAST_RECORDS": "Nieuwste referenties:",
+      "RESULTS": "Resultaten:"
+    },
+    "VIEW": {
+      "TITLE": "Register",
+      "CATEGORY": "Hoofdactiviteit:",
+      "LOCATION": "Adres:",
+      "MENU_TITLE": "Opties",
+      "POPOVER_SHARE_TITLE": "{{title}}",
+      "REMOVE_CONFIRMATION" : "Weet je zeker dat je deze referentie wil verwijderen?<br/><br/>Dit kan niet ongedaan worden gemaakt."
+    },
+    "TYPE": {
+      "TITLE": "Nieuwe referentie",
+      "SELECT_TYPE": "Soort organizatie:",
+      "ENUM": {
+        "SHOP": "Locale winkel",
+        "COMPANY": "Onderneming",
+        "ASSOCIATION": "Stichting",
+        "INSTITUTION": "Instituut"
+      }
+    },
+    "EDIT": {
+      "TITLE": "Bewerk",
+      "TITLE_NEW": "Nieuwe referentie",
+      "RECORD_TYPE":"Soort organizatie",
+      "RECORD_TITLE": "Naam",
+      "RECORD_TITLE_HELP": "Naam",
+      "RECORD_DESCRIPTION": "Beschrijving",
+      "RECORD_DESCRIPTION_HELP": "Omschrijf activiteit",
+      "RECORD_ADDRESS": "Straat",
+      "RECORD_ADDRESS_HELP": "Straat, gebouw...",
+      "RECORD_CITY": "Plaats",
+      "RECORD_CITY_HELP": "Plaats",
+      "RECORD_SOCIAL_NETWORKS": "Sociale media en website",
+      "RECORD_PUBKEY": "Publieke sleutel",
+      "RECORD_PUBKEY_HELP": "Publieke sleutel om betalingen te ontvangen"
+    },
+    "ERROR": {
+      "LOAD_CATEGORY_FAILED": "Laden hoofdactiveiten mislukt",
+      "LOAD_RECORD_FAILED": "Laden datasheet mislukt",
+      "LOOKUP_RECORDS_FAILED": "Opzoeken datasheets is mislukt.",
+      "REMOVE_RECORD_FAILED": "Verwijderen datasheet mislukt",
+      "SAVE_RECORD_FAILED": "Opslaan datasheet mislukt",
+      "RECORD_NOT_EXISTS": "Datasheet niet gevonden"
+    },
+    "INFO": {
+      "RECORD_REMOVED" : "Datasheet succesvol verwijderd"
+    }
+  },
+  "PROFILE": {
+    "UID": "Pseudoniem",
+    "TITLE": "Naam",
+    "TITLE_HELP": "Naam",
+    "DESCRIPTION": "Over mij",
+    "DESCRIPTION_HELP": "Over mij...",
+    "ADDRESS": "Adres",
+    "ADDRESS_HELP": "Adres (optioneel)",
+    "CITY": "Plaats",
+    "CITY_HELP": "Plaats (optioneel)",
+    "SOCIAL_HELP": "http://...",
+    "GENERAL_DIVIDER": "Algemene informatie",
+    "LOCATION_DIVIDER": "Localisatie",
+    "SOCIAL_NETWORKS_DIVIDER": "Sociale media en website",
+    "TECHNICAL_DIVIDER": "Technische informatie",
+    "ERROR": {
+      "LOAD_PROFILE_FAILED": "Kon gebruikersprofiel niet laden.",
+      "SAVE_PROFILE_FAILED": "Opslaan profiel mislukt",
+      "INVALID_SOCIAL_NETWORK_FORMAT": "Ongeldig formaat: vul een geldig internetadres in.<br/><br/>Voorbeelden:<ul><li>- Een Facebookpagina (https://www.facebook.com/user)</li><li>- Een webpagina (http://www.domain.com)</li><li>- Een emailadres (joe@dalton.com)</li></ul>",
+      "IMAGE_RESIZE_FAILED": "Fout tijdens afbeelding schalen"
+    },
+    "INFO": {
+      "PROFILE_SAVED": "Profiel opgeslagen"
+    },
+    "HELP": {
+      "WARNING_PUBLIC_DATA": "Let op, de informatie die hier is vastgelegd <b>is publiek</b>: zichtbaar ook voor <b>niet ingelogde gebruikers</b>."
+    }
+  },
+  "ES_SETTINGS": {
+    "PLUGIN_NAME": "Cesium+",
+    "ENABLE_TOGGLE": "Uitbreiding inschakelen?",
+    "ENABLE_MESSAGE_TOGGLE": "Berichten inschakelen?",
+    "ENABLE_SETTINGS_TOGGLE": "Globale opslag voor instellingen inschakelen?",
+    "PEER": "Adres dataknooppunt",
+    "POPUP_PEER": {
+      "TITLE" : "Dataknoop",
+      "HELP" : "Stel het te gebruiken adres in:",
+      "PEER_HELP": "server.domein.com:poort"
+    },
+    "NOTIFICATIONS": {
+      "DIVIDER": "Notificaties",
+      "HELP_TEXT": "Schakel het type notificatie dat je wil ontvangen in:",
+      "ENABLE_TX_SENT": "Bericht bij validatie van <b>verzonden betalingen</b>?",
+      "ENABLE_TX_RECEIVED": "Bericht bij validatie van <b>ontvangen betalingen</b>?",
+      "ENABLE_CERT_SENT": "Bericht bij validatie van <b>verzonden certificaties</b>?",
+      "ENABLE_CERT_RECEIVED": "Bericht bij validatie van <b>ontvangen certificaties</b>?"
+    },
+    "CONFIRM": {
+      "ASK_ENABLE_TITLE": "Optionele functies",
+      "ASK_ENABLE": "Cesium+ is <b>uitgeschakeld</b> waardoor deze functies niet beschikbaar zijn: <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Gebruikersprofielen</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifcaitions\"></i> Notificaties</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Privéberichten</b>.</ul><br/><br/>Wil je deze functies <b>inschakelen</b>?"
+    }
+  },
+  "EVENT": {
+    "NODE_STARTED": "Je knoop ES API <b>{{params[0]}}</b> is UP",
+    "NODE_BMA_DOWN": "Knooppunt <b>{{params[0]}}:{{params[1]}}</b> (gebruikt door je ES API) is <b>onbereikbaar</b>.",
+    "NODE_BMA_UP": "Knooppunt <b>{{p0}}:{{params[1]}}</b> is weer bereikbaar.",
+    "MEMBER_JOIN": "Je bent nu <b>lid</b> van valuta <b>{{params[0]}}</b>!",
+    "MEMBER_LEAVE": "Je bent <b>geen lid meer</b> van valuta <b>{{params[0]}}</b>!",
+    "MEMBER_ACTIVE": "Je lidmaatschap bij <b>{{params[0]}}</b> is met <b>succes verlengd</b>.",
+    "TX_SENT": "Je <b>betaling</b> aan <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> is uitgevoerd.",
+    "TX_SENT_MULTI": "Je <b>betaling</b> aan <b>{{params[1]}}</b> is uitgevoerd.",
+    "TX_RECEIVED": "Je hebt een <b>betaling ontvangen</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "TX_RECEIVED_MULTI": "Je hebt een <b>betaling ontvangen</b> van <b>{{params[1]}}</b>.",
+    "CERT_SENT": "Je <b>certificatie</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\" ><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> is uitgevoerd.",
+    "CERT_RECEIVED": "Je hebt een <b>certificatie ontvangen</b> van <span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid}\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span>.",
+    "PAGE": {
+      "NEW_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft gereageerd op jouw referentie: <b>{{params[2]}}</b>",
+      "UPDATE_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft zijn/aar reactie op jouw referentie bewerkt: <b>{{params[2]}}</b>",
+      "NEW_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> hheeft gereageerd op jouw commentaar op referentie: <b>{{params[2]}}</b>",
+      "UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft zijn/haar reactie op jouw commentaar bewerkt, op referentie: <b>{{params[2]}}</b>"
+    }
+  },
+  "CONFIRM": {
+    "ES_USE_FALLBACK_NODE": "Knooppunt <b>{{old}}</b> onbereikbaar of ongeldig adres.<br/><br/>Tijdelijk knooppunt <b>{{new}}</b> gebruiken?"
+  },
+  "ERROR": {
+    "ES_CONNECTION_ERROR": "Knooppunt <b>{{server}}</b> onbereikbaar of ongeldig adres.<br/><br/>Cesium zal verder weken, <b>zonder de Cesium+ uitbreiding</b> (gebruikersprofielens, privéberichten, kaarten en grafieken).<br/><br/>Controleer je internetverbinding, of verander je knooppunt in <a class=\"positive\" ng-click=\"doQuickFix('settings')\">instellingen</a>.",
+    "ES_MAX_UPLOAD_BODY_SIZE": "De hoveelheid te verzenden gegevens is overschrijdt de serverlimiet.<br/><br/>Probeer het nogmaals na, bijvoorbeeld, het wissen foto's."
+  }
+}
+);
+
+$translateProvider.translations("en-GB", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Statistics"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Linear scale",
+      "LOGARITHMIC_SCALE" : "Logarithmic scale",
+      "BTN_SHOW_STATS": "See statistics",
+      "BTN_SHOW_DETAILED_STATS": "Detailed statistics",
+      "RANGE_DURATION_DIVIDER": "Step unit:",
+      "RANGE_DURATION": {
+        "HOUR": "Group by <b>hour</b>",
+        "DAY": "Group by <b>day</b>",
+        "MONTH": "Group by <b>month</b>"
+      }
+    },
+    "ACCOUNT": {
+      "TITLE": "Statistics",
+      "BTN_SHOW_STATS": "View account Statistics",
+      "BALANCE_DIVIDER": "Account status",
+      "BALANCE_TITLE": "Evolution of the account {{pubkey|formatPubkey}}",
+      "TX_RECEIVED_LABEL": "Receipts",
+      "TX_SENT_LABEL": "Spending",
+      "UD_LABEL": "UD",
+      "BALANCE_LABEL": "Balance",
+      "INPUT_CHART_TITLE": "Sum of incoming flows, per transmitter:",
+      "OUTPUT_CHART_TITLE": "Sum of outgoing flows, per recipient:"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Statistics",
+      "BLOCKS_ISSUERS_DIVIDER": "Written blocks by members",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} members</b> calculated <b>{{blockCount|formatInteger}} blocks</b>",
+      "BLOCKS_ISSUERS_TITLE": "Number of blocks calculated per member",
+      "BLOCKS_ISSUERS_LABEL": "Number of blocks",
+      "TX_DIVIDER": "Analysis of transactions",
+      "TX_AMOUNT_TITLE": "Transaction volume",
+      "TX_AMOUNT_PUBKEY_TITLE": "Volume of transactions calculated by {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Exchange volume",
+      "TX_COUNT_TITLE": "Number of written transactions",
+      "TX_COUNT_LABEL": "Number of transactions",
+      "TX_AVG_BY_BLOCK": "Average per block"
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evolution of the monetary mass",
+      "MONETARY_MASS_LABEL": "Monetary mass",
+      "MONETARY_MASS_SHARE_LABEL": "Average per member",
+      "UD_TITLE": "Evolution of the universal dividend",
+      "MEMBERS_COUNT_TITLE": "Evolution of the number of members",
+      "MEMBERS_COUNT_LABEL": "Number of members"
+    },
+    "PEER": {
+      "VIEW": {
+        "BLOCK_COUNT_LABEL": "Computed blocks count",
+        "BLOCK_COUNT": "{{count}} blocks",
+        "NO_BLOCK": "No block"
+      }
+    },
+    "DOC_STATS": {
+      "TITLE": "Data storage statistics (Cesium+)",
+      "USER": {
+        "TITLE": "Number of documents linked to an account",
+        "USER_PROFILE": "User profiles",
+        "USER_SETTINGS": "Saved settings"
+      },
+      "USER_DELTA": {
+        "TITLE": "Delta / Number of documents linked to an account",
+        "USER_PROFILE": "User profiles",
+        "USER_SETTINGS": "Saved settings"
+      },
+      "MESSAGE": {
+        "TITLE": "Number of documents related to the communication",
+        "MESSAGE_INBOX": "Messages in inbox",
+        "MESSAGE_OUTBOX": "Messages in outbox",
+        "INVITATION_CERTIFICATION": "Invitations to certify"
+      },
+      "SOCIAL": {
+        "TITLE": "Number of page or group",
+        "PAGE_COMMENT": "Comments",
+        "PAGE_RECORD": "Pages",
+        "GROUP_RECORD": "Groups"
+      },
+      "OTHER": {
+        "TITLE": "Other documents",
+        "HISTORY_DELETE": "Deletion of documents"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("en", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Statistics"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Linear scale",
+      "LOGARITHMIC_SCALE" : "Logarithmic scale",
+      "BTN_SHOW_STATS": "See statistics",
+      "BTN_SHOW_DETAILED_STATS": "Detailed statistics",
+      "RANGE_DURATION_DIVIDER": "Step unit:",
+      "RANGE_DURATION": {
+        "HOUR": "Group by <b>hour</b>",
+        "DAY": "Group by <b>day</b>",
+        "MONTH": "Group by <b>month</b>"
+      }
+    },
+    "ACCOUNT": {
+      "TITLE": "Statistics",
+      "BTN_SHOW_STATS": "View account Statistics",
+      "BALANCE_DIVIDER": "Account status",
+      "BALANCE_TITLE": "Evolution of the account {{pubkey|formatPubkey}}",
+      "TX_RECEIVED_LABEL": "Receipts",
+      "TX_SENT_LABEL": "Spending",
+      "UD_LABEL": "UD",
+      "BALANCE_LABEL": "Balance",
+      "INPUT_CHART_TITLE": "Sum of incoming flows, per transmitter:",
+      "OUTPUT_CHART_TITLE": "Sum of outgoing flows, per recipient:"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Statistics",
+      "BLOCKS_ISSUERS_DIVIDER": "Written blocks by members",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} members</b> calculated <b>{{blockCount|formatInteger}} blocks</b>",
+      "BLOCKS_ISSUERS_TITLE": "Number of blocks calculated per member",
+      "BLOCKS_ISSUERS_LABEL": "Number of blocks",
+      "TX_DIVIDER": "Analysis of transactions",
+      "TX_AMOUNT_TITLE": "Transaction volume",
+      "TX_AMOUNT_PUBKEY_TITLE": "Volume of transactions calculated by {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Exchange volume",
+      "TX_COUNT_TITLE": "Number of written transactions",
+      "TX_COUNT_LABEL": "Number of transactions",
+      "TX_AVG_BY_BLOCK": "Average per block"
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evolution of the monetary mass",
+      "MONETARY_MASS_LABEL": "Monetary mass",
+      "MONETARY_MASS_SHARE_LABEL": "Average per member",
+      "UD_TITLE": "Evolution of the universal dividend",
+      "MEMBERS_COUNT_TITLE": "Evolution of the number of members",
+      "MEMBERS_COUNT_LABEL": "Number of members"
+    },
+    "PEER": {
+      "VIEW": {
+        "BLOCK_COUNT_LABEL": "Computed blocks count",
+        "BLOCK_COUNT": "{{count}} blocks",
+        "NO_BLOCK": "No block"
+      }
+    },
+    "DOC_STATS": {
+      "TITLE": "Data storage statistics (Cesium+)",
+      "USER": {
+        "TITLE": "Number of documents linked to an account",
+        "USER_PROFILE": "User profiles",
+        "USER_SETTINGS": "Saved settings"
+      },
+      "USER_DELTA": {
+        "TITLE": "Delta / Number of documents linked to an account",
+        "USER_PROFILE": "User profiles",
+        "USER_SETTINGS": "Saved settings"
+      },
+      "MESSAGE": {
+        "TITLE": "Number of documents related to the communication",
+        "MESSAGE_INBOX": "Messages in inbox",
+        "MESSAGE_OUTBOX": "Messages in outbox",
+        "INVITATION_CERTIFICATION": "Invitations to certify"
+      },
+      "SOCIAL": {
+        "TITLE": "Number of page or group",
+        "PAGE_COMMENT": "Comments",
+        "PAGE_RECORD": "Pages",
+        "GROUP_RECORD": "Groups"
+      },
+      "OTHER": {
+        "TITLE": "Other documents",
+        "HISTORY_DELETE": "Deletion of documents"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("eo-EO", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Statistikoj"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Lineara skalo",
+      "LOGARITHMIC_SCALE" : "Logaritma skalo",
+      "BTN_SHOW_STATS": "Vidi la statistikojn",
+      "BTN_SHOW_DETAILED_STATS": "Detalaj statistikoj",
+      "RANGE_DURATION_DIVIDER": "Tempo-unuo:",
+      "RANGE_DURATION": {
+        "HOUR": "Horo",
+        "DAY": "Tago",
+        "MONTH": "Monato"
+      }
+    },
+    "ACCOUNT": {
+      "TITLE": "Statistikoj",
+      "BTN_SHOW_STATS": "Vidi la statistikojn de la konto",
+      "BALANCE_DIVIDER": "Stato de la konto",
+      "BALANCE_TITLE": "Evoluo de la konto {{pubkey|formatPubkey}}",
+      "TX_RECEIVED_LABEL": "Enspezoj",
+      "TX_SENT_LABEL": "Elspezoj",
+      "TX_ACCUMULATION_LABEL": "Bilanco de la spezoj",
+      "UD_LABEL": "UD",
+      "UD_ACCUMULATION_LABEL": "Bilanco de la UD",
+      "BALANCE_LABEL": "Saldo",
+      "WOT_DIVIDER": "Reto de fido",
+      "CERTIFICATION_TITLE": "Nombro de atestaĵoj - {{pubkey|formatPubkey}}",
+      "RECEIVED_CERT_LABEL": "Tuto pri la ricevitaj",
+      "RECEIVED_CERT_DELTA_LABEL": "Vario pri la ricevitaj",
+      "GIVEN_CERT_LABEL": "Tuto pri la senditaj",
+      "GIVEN_CERT_DELTA_LABEL": "Vario pri la senditaj",
+      "INPUT_CHART_TITLE": "Sumo de la enirantaj fluoj, por ĉiu sendinto:",
+      "OUTPUT_CHART_TITLE": "Sumo de la elirantaj fluoj, por ĉiu ricevinto:"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Statistikoj",
+      "BLOCKS_ISSUERS_DIVIDER": "Analizo de la kalkul-distribuo",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} membroj</b> kalkulis <b>{{blockCount|formatInteger}} blokojn</b>",
+      "BLOCKS_ISSUERS_TITLE": "Nombro de blokoj kalkulitaj por membro",
+      "BLOCKS_ISSUERS_LABEL": "Nombro de blokoj",
+      "TX_DIVIDER": "Analizo de la spezoj",
+      "TX_AMOUNT_TITLE": "Kvanto de la spezoj",
+      "TX_AMOUNT_PUBKEY_TITLE": "Kvanto de spezoj kalkulitaj de {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Kvanto interŝanĝita",
+      "TX_COUNT_TITLE": "Nombro de spezoj skribitaj",
+      "TX_COUNT_LABEL": "Nombro de spezoj",
+      "TX_AVG_BY_BLOCK": "Meza nombro de spezoj / bloko"
+
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evoluo de la mona maso",
+      "MONETARY_MASS_LABEL": "Mona maso",
+      "MONETARY_MASS_SHARE_LABEL": "Mezumo por membro",
+      "UD_TITLE": "Evoluo de la universala dividendo",
+      "MEMBERS_COUNT_TITLE": "Evoluo de la nombro de membroj",
+      "MEMBERS_COUNT_LABEL": "Nombro de membroj"
+    },
+    "PEER": {
+      "VIEW": {
+        "BLOCK_COUNT_LABEL": "Nombro de blokoj kalkulitaj",
+        "BLOCK_COUNT": "{{count}} blokoj",
+        "NO_BLOCK": "Neniu bloko"
+      }
+    },
+    "DOC_STATS": {
+      "TITLE": "Statistikoj pri stokado",
+      "USER": {
+        "TITLE": "Nombro de dokumentoj ligitaj al konto",
+        "USER_PROFILE": "Uzanto-profiloj",
+        "USER_SETTINGS": "Parametroj konservitaj"
+      },
+      "USER_DELTA": {
+        "TITLE": "Variado de la nombro de dokumentoj ligitaj al konto",
+        "USER_PROFILE": "Uzanto-profiloj",
+        "USER_SETTINGS": "Parametroj konservitaj"
+      },
+      "MESSAGE": {
+        "TITLE": "Nombro de dokumentoj ligitaj al komunikado",
+        "MESSAGE_INBOX": "Mesaĝoj en ricevujo",
+        "MESSAGE_OUTBOX": "Senditaj mesaĝoj konservitaj",
+        "INVITATION_CERTIFICATION": "Invitoj atestotaj"
+      },
+      "SOCIAL": {
+        "TITLE": "Nombro de paĝoj aŭ grupoj",
+        "PAGE_COMMENT": "Komentoj",
+        "PAGE_RECORD": "Paĝoj",
+        "GROUP_RECORD": "Grupoj"
+      },
+      "OTHER": {
+        "TITLE": "Aliaj dokumentoj",
+        "HISTORY_DELETE": "Forigoj de dokumentoj"
+      }
+    },
+    "SYNCHRO": {
+      "TITLE": "Statistikoj pri sinkronigoj",
+      "COUNT": {
+        "TITLE": "Kvanto sinkronigita",
+        "INSERTS": "Enmetoj",
+        "UPDATES": "Äœisdatigoj",
+        "DELETES": "Forigoj"
+      },
+      "PEER": {
+        "TITLE": "Nodoj informpetitaj",
+        "ES_USER_API": "Nodoj pri datenoj de uzantoj",
+        "ES_SUBSCRIPTION_API": "Nodoj pri retaj servoj"
+      },
+      "PERFORMANCE": {
+        "TITLE": "Efikecoj pri efektiviĝo",
+        "DURATION": "Tempo por efektiviĝo (ms)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("es-ES", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Estadística"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Escala lineal",
+      "LOGARITHMIC_SCALE" : "Escala logarítmica",
+      "BTN_SHOW_STATS": "Ver estadísticas",
+      "BTN_SHOW_DETAILED_STATS": "Estadísticas detalladas",
+      "RANGE_DURATION_DIVIDER": "Unidad de paso:",
+      "RANGE_DURATION": {
+        "HOUR": "Grupo por <b>hora</b>",
+        "DAY": "Grupo por <b>día</b>",
+        "MONTH": "Grupo por <b>mes</b>"
+      }
+    },
+    "ACCOUNT": {
+      "INPUT_CHART_TITLE": "Suma del flujo entrante, por el transmisor:",
+      "OUTPUT_CHART_TITLE": "Suma de las salidas por destino:"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Estadística",
+      "BLOCKS_ISSUERS_DIVIDER": "Bloques escritos por los miembros",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} members</b> has computed <b>{{blockCount|formatInteger}} blocks</b>",
+      "BLOCKS_ISSUERS_TITLE": "Número de bloques miembro calculado",
+      "BLOCKS_ISSUERS_LABEL": "Número de bloques",
+      "TX_DIVIDER": "Análisis de transacciones",
+      "TX_AMOUNT_TITLE": "El volumen de operaciones",
+      "TX_AMOUNT_PUBKEY_TITLE": "El volumen de operaciones calculado por {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Volumen negociado",
+      "TX_COUNT_TITLE": "Número de transacciones escritas",
+      "TX_COUNT_LABEL": "Número de transacciones",
+      "TX_AVG_BY_BLOCK": "Promedio por bloque"
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evolución de la masa monetaria",
+      "MONETARY_MASS_LABEL": "Masa monetaria",
+      "MONETARY_MASS_SHARE_LABEL": "Promedio miembro",
+      "UD_TITLE": "Evolución del dividendo universales",
+      "MEMBERS_COUNT_TITLE": "Evolución del número de miembros",
+      "MEMBERS_COUNT_LABEL": "Número de miembros"
+    },
+    "PEER": {
+      "VIEW": {
+        "BLOCK_COUNT_LABEL": "Número de bloques calculados",
+        "BLOCK_COUNT": "{{count}} bloques",
+        "NO_BLOCK": "Ningún bloque"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("fr-FR", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Statistiques"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Echelle linéaire",
+      "LOGARITHMIC_SCALE" : "Echelle logarithmique",
+      "BTN_SHOW_STATS": "Voir les statistiques",
+      "BTN_SHOW_DETAILED_STATS": "Statistiques détaillées",
+      "RANGE_DURATION_DIVIDER": "Unité de temps :",
+      "RANGE_DURATION": {
+        "HOUR": "Heure",
+        "DAY": "Jour",
+        "MONTH": "Mois"
+      }
+    },
+    "ACCOUNT": {
+      "TITLE": "Statistiques",
+      "BTN_SHOW_STATS": "Voir les statistiques du compte",
+      "BALANCE_DIVIDER": "Situation du compte",
+      "BALANCE_TITLE": "Evolution du compte {{pubkey|formatPubkey}}",
+      "TX_RECEIVED_LABEL": "Recettes",
+      "TX_SENT_LABEL": "Dépenses",
+      "TX_ACCUMULATION_LABEL": "Bilan des transactions",
+      "UD_LABEL": "DU",
+      "UD_ACCUMULATION_LABEL": "Bilan des DU",
+      "BALANCE_LABEL": "Solde",
+      "WOT_DIVIDER": "Toile de confiance",
+      "CERTIFICATION_TITLE": "Nombre de certifications - {{pubkey|formatPubkey}}",
+      "RECEIVED_CERT_LABEL": "Total reçues",
+      "RECEIVED_CERT_DELTA_LABEL": "Variation reçues",
+      "GIVEN_CERT_LABEL": "Total envoyées",
+      "GIVEN_CERT_DELTA_LABEL": "Variation envoyées",
+      "INPUT_CHART_TITLE": "Somme des flux entrants, par émetteur :",
+      "OUTPUT_CHART_TITLE": "Somme des flux sortants, par destinaire :"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Statistiques",
+      "BLOCKS_ISSUERS_DIVIDER": "Analyse de la répartition du calcul",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} membres</b> ont calculé <b>{{blockCount|formatInteger}} blocs</b>",
+      "BLOCKS_ISSUERS_TITLE": "Nombre de blocs calculés par membre",
+      "BLOCKS_ISSUERS_LABEL": "Nombre de blocs",
+      "TX_DIVIDER": "Analyse des transactions",
+      "TX_AMOUNT_TITLE": "Volume des transactions",
+      "TX_AMOUNT_PUBKEY_TITLE": "Volume des transactions calculées par {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Volume échangé",
+      "TX_COUNT_TITLE": "Nombre de transactions écrites",
+      "TX_COUNT_LABEL": "Nombre de transactions",
+      "TX_AVG_BY_BLOCK": "Nombre moyen de transactions / bloc"
+
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evolution de la masse monétaire",
+      "MONETARY_MASS_LABEL": "Masse monétaire",
+      "MONETARY_MASS_SHARE_LABEL": "Moyenne par membre",
+      "UD_TITLE": "Evolution du dividende universel",
+      "MEMBERS_COUNT_TITLE": "Evolution du nombre de membres",
+      "MEMBERS_COUNT_LABEL": "Nombre de membres"
+    },
+    "PEER": {
+      "VIEW": {
+        "BLOCK_COUNT_LABEL": "Nombre de blocs calculés",
+        "BLOCK_COUNT": "{{count}} blocs",
+        "NO_BLOCK": "Aucun bloc"
+      }
+    },
+    "DOC_STATS": {
+      "TITLE": "Statistiques de stockage",
+      "USER": {
+        "TITLE": "Nombre de documents liés à un compte",
+        "USER_PROFILE": "Profils utilisateur",
+        "USER_SETTINGS": "Paramètres sauvegardés"
+      },
+      "USER_DELTA": {
+        "TITLE": "Variation du nombre de documents liés à un compte",
+        "USER_PROFILE": "Profils utilisateur",
+        "USER_SETTINGS": "Paramètres sauvegardés"
+      },
+      "MESSAGE": {
+        "TITLE": "Nombre de documents liés à la communication",
+        "MESSAGE_INBOX": "Messages en boîte de réception",
+        "MESSAGE_OUTBOX": "Messages envoyés sauvegardés",
+        "INVITATION_CERTIFICATION": "Invitations à certifier"
+      },
+      "SOCIAL": {
+        "TITLE": "Nombre de pages ou groupes",
+        "PAGE_COMMENT": "Commentaires",
+        "PAGE_RECORD": "Pages",
+        "GROUP_RECORD": "Groupes"
+      },
+      "OTHER": {
+        "TITLE": "Autres documents",
+        "HISTORY_DELETE": "Suppressions de documents"
+      }
+    },
+    "SYNCHRO": {
+      "TITLE": "Statistiques de synchronisations",
+      "COUNT": {
+        "TITLE": "Volume synchronisé",
+        "INSERTS": "Insertions",
+        "UPDATES": "Mises à jour",
+        "DELETES": "Suppressions"
+      },
+      "PEER": {
+        "TITLE": "Noeuds requêtés",
+        "ES_USER_API": "Noeuds données utilisateurs",
+        "ES_SUBSCRIPTION_API": "Noeuds services en ligne"
+      },
+      "PERFORMANCE": {
+        "TITLE": "Performances d'exécution",
+        "DURATION": "Temps d'exécution (ms)"
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("it-IT", {
+   "NETWORK": {
+     "VIEW": {
+       "BTN_GRAPH": "Statistiche"
+     }
+   },
+   "GRAPH": {
+     "COMMON": {
+       "LINEAR_SCALE" : "Scala lineare",
+       "LOGARITHMIC_SCALE" : "Scala logaritmica",
+       "BTN_SHOW_STATS": "Vedere le statistiche",
+       "BTN_SHOW_DETAILED_STATS": "Statistiche dettagliate",
+       "RANGE_DURATION_DIVIDER": "Unità di tempo :",
+       "RANGE_DURATION": {
+         "HOUR": "Ora",
+         "DAY": "Giorno",
+         "MONTH": "Mese"
+       }
+     },
+     "ACCOUNT": {
+       "TITLE": "Statistiche",
+       "BTN_SHOW_STATS": "Visualizzare le statistiche del conto",
+       "BALANCE_DIVIDER": "Situazione del conto",
+       "BALANCE_TITLE": "Evoluzione del conto {{pubkey|formatPubkey}}",
+       "TX_RECEIVED_LABEL": "Incassi",
+       "TX_SENT_LABEL": "Spese",
+       "TX_ACCUMULATION_LABEL": "Bilancio delle transazioni",
+       "UD_LABEL": "DU",
+       "UD_ACCUMULATION_LABEL": "Bilancio dei DU",
+       "BALANCE_LABEL": "Saldo",
+       "WOT_DIVIDER": "Tela di fiducia",
+       "CERTIFICATION_TITLE": "Numero di certificazioni - {{pubkey|formatPubkey}}",
+       "RECEIVED_CERT_LABEL": "Totale ricevute",
+       "RECEIVED_CERT_DELTA_LABEL": "Variazione ricevute",
+       "GIVEN_CERT_LABEL": "Totale inviate",
+       "GIVEN_CERT_DELTA_LABEL": "Variazione inviate",
+       "INPUT_CHART_TITLE": "Somma dei flussi in entrata, par emittente :",
+       "OUTPUT_CHART_TITLE": "Somma dei flussi in uscita, per destinatario :"
+     },
+     "BLOCKCHAIN": {
+       "TITLE": "Statistiche",
+       "BLOCKS_ISSUERS_DIVIDER": "Analisi della ripartizione del calcolo",
+       "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} membri</b> hanno calcolato <b>{{blockCount|formatInteger}} blocchi</b>",
+       "BLOCKS_ISSUERS_TITLE": "Numero di blocchi calcolati a membro",
+       "BLOCKS_ISSUERS_LABEL": "Numero di blocchi",
+       "TX_DIVIDER": "Analisi delle transazioni",
+       "TX_AMOUNT_TITLE": "Volume delle transazioni",
+       "TX_AMOUNT_PUBKEY_TITLE": "Volume delle transazioni calcolato da {{issuer | formatPubkey}}",
+       "TX_AMOUNT_LABEL": "Volume scambiato",
+       "TX_COUNT_TITLE": "Numero di transazioni scritte",
+       "TX_COUNT_LABEL": "Numero di transazioni",
+       "TX_AVG_BY_BLOCK": "Numero medio di transazioni / blocco"
+     },
+     "CURRENCY": {
+       "MONETARY_MASS_TITLE": "Evoluzione della massa monetaria",
+       "MONETARY_MASS_LABEL": "Massa monetaria",
+       "MONETARY_MASS_SHARE_LABEL": "Media a membro",
+       "UD_TITLE": "Evoluzione del Dividendo Universale",
+       "MEMBERS_COUNT_TITLE": "Evoluzione del numero di membri",
+       "MEMBERS_COUNT_LABEL": "Numero di membri"
+     },
+     "PEER": {
+       "VIEW": {
+         "BLOCK_COUNT_LABEL": "Numero di blocchi calcolati",
+         "BLOCK_COUNT": "{{count}} blocchi",
+         "NO_BLOCK": "Nessun blocco"
+       }
+     },
+     "DOC_STATS": {
+       "TITLE": "Statistiche di stoccaggio",
+       "USER": {
+         "TITLE": "Numero di documenti legati ad un conto",
+         "USER_PROFILE": "Profili dell'utente",
+         "USER_SETTINGS": "Impostazioni salvate",
+       },
+       "MESSAGE": {
+         "TITLE": "Numero di documenti legati alla conversazione",
+         "MESSAGE_INBOX": "Messaggi in arrivo",
+         "MESSAGE_OUTBOX": "Messaggi inviati salvati",
+         "INVITATION_CERTIFICATION": "Invitazioni da certificare"
+       },
+       "SOCIAL": {
+         "TITLE": "Numero di pagine o gruppi",
+         "PAGE_COMMENT": "Commenti",
+         "PAGE_RECORD": "Pagine",
+         "GROUP_RECORD": "Gruppi",
+       },
+       "OTHER": {
+         "TITLE": "Altri documenti",
+         "HISTORY_DELETE": "Cronologia eliminazione documenti",
+       }
+     },
+     "SYNCHRO": {
+       "TITLE": "Statistiche di sincronizzazioni",
+       "COUNT": {
+         "TITLE": "Volume sincronizzato",
+         "INSERTS": "Inserimenti",
+         "UPDATES": "Aggiornamenti",
+         "DELETES": "Eliminazioni"
+       },
+       "PEER": {
+         "TITLE": "Nodi interrogati",
+         "ES_USER_API": "Nodi dati utenti",
+         "ES_SUBSCRIPTION_API": "Noeuds servizi online"
+       },
+       "PERFORMANCE": {
+         "TITLE": "Prestazioni (performance) di esecuzione",
+         "DURATION": "Tempo di esecuzione (ms)"
+       }
+     }
+   }
+ }
+);
+
+$translateProvider.translations("nl-NL", {
+  "NETWORK": {
+    "VIEW": {
+      "BTN_GRAPH": "Statistieken"
+    }
+  },
+  "GRAPH": {
+    "COMMON": {
+      "LINEAR_SCALE" : "Lineaire schaal",
+      "LOGARITHMIC_SCALE" : "Logaritmische schaal",
+      "BTN_SHOW_STATS": "Zie statistieken",
+      "BTN_SHOW_DETAILED_STATS": "Gedetailleerde statistieken",
+      "RANGE_DURATION_DIVIDER": "Stap eenheid:",
+      "RANGE_DURATION": {
+        "HOUR": "Groep per <b>uur</b>",
+        "DAY": "Groep per <b>dag</b>",
+        "MONTH": "Groep per <b>maand</b>"
+      }
+    },
+    "ACCOUNT": {
+      "INPUT_CHART_TITLE": "Som van de binnenkomende stroom, door de zender:",
+      "OUTPUT_CHART_TITLE": "Som van de uitstroom per bestemming:"
+    },
+    "BLOCKCHAIN": {
+      "TITLE": "Statistieken",
+      "BLOCKS_ISSUERS_DIVIDER": "Schriftelijke blokken door leden",
+      "BLOCKS_ISSUERS_HELP": "<b>{{issuerCount|formatInteger}} leden</b> berekend <b>{{blockCount|formatInteger}} blokken</b>",
+      "BLOCKS_ISSUERS_TITLE": "Aantal blokken berekend per lid",
+      "BLOCKS_ISSUERS_LABEL": "Aantal blokken",
+      "TX_DIVIDER": "Analyse van transacties",
+      "TX_AMOUNT_TITLE": "Trading volume",
+      "TX_AMOUNT_PUBKEY_TITLE": "Trading volume dat wordt berekend door {{issuer | formatPubkey}}",
+      "TX_AMOUNT_LABEL": "Verhandeld volume",
+      "TX_COUNT_TITLE": "Aantal schriftelijke transacties",
+      "TX_COUNT_LABEL": "Aantal transacties",
+      "TX_AVG_BY_BLOCK": "Gemiddeld aantal transacties / blok"
+    },
+    "CURRENCY": {
+      "MONETARY_MASS_TITLE": "Evolutie van de monetaire massa",
+      "MONETARY_MASS_LABEL": "Monetaire massa",
+      "MONETARY_MASS_SHARE_LABEL": "Gemiddelde leden",
+      "UD_TITLE": "Ontwikkeling van de universele dividend",
+      "MEMBERS_COUNT_TITLE": "Evolutie van het aantal leden",
+      "MEMBERS_COUNT_LABEL": "Aantal leden"
+    }
+  }
+}
+);
+
+$translateProvider.translations("fr-FR", {
+  "RML9": {
+    "BTN_EXPORT": "Télécharger",
+    "BTN_OPEN": "Ouvrir la page RML9",
+    "BTN_SWOW_TX": "Voir les transactions",
+    "FILE_NAME": "relevé du compte {{pubkey|formatPubkey}} au {{currentTime|formatDateForFile}}.csv",
+    "HEADERS": {
+      "TIME": "Date",
+      "AMOUNT": "Montant",
+      "COMMENT": "Commentaire"
+    },
+    "VIEW": {
+      "TITLE": "RML9",
+      "DIVIDER": "Dernières transactions :",
+      "BALANCE": "Solde du compte"
+    },
+    "CHART": {
+      "INPUT_CHART_TITLE": "Somme des flux entrants, par émetteur :",
+      "OUTPUT_CHART_TITLE": "Somme des flux sortants, par destinaire :"
+    },
+    "SETTINGS": {
+      "ENABLE_TOGGLE": "Activer le plugin RML9 ?"
+    }
+  }
+}
+);
+
+$translateProvider.translations("en-GB", {
+  "MAP": {
+    "COMMON": {
+      "SEARCH_DOTS": "Search...",
+      "BTN_LOCALIZE_ME": "Localize me"
+    },
+    "NETWORK": {
+      "LOOKUP": {
+        "BTN_MAP": "Peers map",
+        "BTN_MAP_HELP": "Open peers map"
+      },
+      "VIEW": {
+        "TITLE": "Peers map",
+        "LAYER": {
+          "MEMBER": "Member peers",
+          "MIRROR": "Mirror peers",
+          "OFFLINE": "Offline peers"
+        }
+      }
+    },
+    "WOT": {
+      "LOOKUP": {
+        "BTN_MAP": "Map",
+        "BTN_MAP_HELP": "Open members map"
+      },
+      "VIEW": {
+        "TITLE": "Members map",
+        "LAYER": {
+          "MEMBER": "<i class=\"icon ion-person positive\"></i> Members",
+          "PENDING": "<i class=\"icon ion-clock energized\"></i> Pending registrations",
+          "WALLET": "<i class=\"icon ion-card gray\"></i> Simple wallets"
+        }
+      },
+      "ERROR": {
+        "LOAD_POSITION_FAILED": "Can not retrieve the positions to display."
+      }
+    },
+    "REGISTRY": {
+      "LOOKUP": {
+        "BTN_MAP": "Map",
+        "BTN_MAP_HELP": "Open the map of the pages"
+      },
+      "VIEW": {
+        "TITLE": "Map of pages",
+        "LAYER": {
+          "SHOP": "<i class=\"icon ion-page-shop positive\"></i> Local shops",
+          "COMPANY": "<i class=\"icon ion-page-company positive\"></i> Companies",
+          "ASSOCIATION": "<i class=\"icon ion-page-association energized\"></i> Associations",
+          "INSTITUTION": "<i class=\"icon ion-page-institution gray\"></i> Institutions"
+        }
+      }
+    },
+    "PROFILE": {
+      "MARKER_HELP": "<b>Drag and drop</b> this marker to <b>update<br/>your position</b>, or use the buttons<br/>on top of the map."
+    },
+    "ERROR": {
+      "LOCALIZE_ME_FAILED": "Unable to retrieve your current position"
+    },
+    "SETTINGS": {
+      "MAP_DIVIDER": "Maps",
+      "ENABLE_GOOGLE_API": "Enable Google API services?",
+      "ENABLE_GOOGLE_API_HELP": "In the <b>members map</b>, allows you to display accounts with an address but without geolocation.",
+      "GOOGLE_API_KEY": "Google API key",
+      "BTN_GOOGLE_API": "Getting a key",
+      "BTN_GOOGLE_API_WARNING": "requires a Google account",
+      "GOOGLE_API_KEY_PLACEHOLDER": "eg: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"
+    },
+    "HELP": {
+      "TIP": {
+        "WOT": "This map displays <b>profiles with a position</b>, whether they are member accounts or not.<br/><br/>Only profiles with the option &quot;appear on the map&quot; has been activated.",
+        "WOT_BTN_LAYERS": "<b>Filter the displayed data</b>: members, pending registrations, simple portfolios, etc.",
+        "WOT_BTN_SEARCH": "You can <b>search</b> by name, public key, or member pseudonym."
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("en", {
+  "MAP": {
+    "COMMON": {
+      "SEARCH_DOTS": "Search...",
+      "BTN_LOCALIZE_ME": "Localize me"
+    },
+    "NETWORK": {
+      "LOOKUP": {
+        "BTN_MAP": "Peers map",
+        "BTN_MAP_HELP": "Open peers map"
+      },
+      "VIEW": {
+        "TITLE": "Peers map",
+        "LAYER": {
+          "MEMBER": "Member peers",
+          "MIRROR": "Mirror peers",
+          "OFFLINE": "Offline peers"
+        }
+      }
+    },
+    "WOT": {
+      "LOOKUP": {
+        "BTN_MAP": "Map",
+        "BTN_MAP_HELP": "Open members map"
+      },
+      "VIEW": {
+        "TITLE": "Members map",
+        "LAYER": {
+          "MEMBER": "<i class=\"icon ion-person positive\"></i> Members",
+          "PENDING": "<i class=\"icon ion-clock energized\"></i> Pending registrations",
+          "WALLET": "<i class=\"icon ion-card gray\"></i> Simple wallets"
+        }
+      },
+      "ERROR": {
+        "LOAD_POSITION_FAILED": "Can not retrieve the positions to display."
+      }
+    },
+    "REGISTRY": {
+      "LOOKUP": {
+        "BTN_MAP": "Map",
+        "BTN_MAP_HELP": "Open the map of the pages"
+      },
+      "VIEW": {
+        "TITLE": "Map of pages",
+        "LAYER": {
+          "SHOP": "<i class=\"icon ion-page-shop positive\"></i> Local shops",
+          "COMPANY": "<i class=\"icon ion-page-company positive\"></i> Companies",
+          "ASSOCIATION": "<i class=\"icon ion-page-association energized\"></i> Associations",
+          "INSTITUTION": "<i class=\"icon ion-page-institution gray\"></i> Institutions"
+        }
+      }
+    },
+    "PROFILE": {
+      "MARKER_HELP": "<b>Drag and drop</b> this marker to <b>update<br/>your position</b>, or use the buttons<br/>on top of the map."
+    },
+    "ERROR": {
+      "LOCALIZE_ME_FAILED": "Unable to retrieve your current position"
+    },
+    "SETTINGS": {
+      "MAP_DIVIDER": "Maps",
+      "ENABLE_GOOGLE_API": "Enable Google API services?",
+      "ENABLE_GOOGLE_API_HELP": "In the <b>members map</b>, allows you to display accounts with an address but without geolocation.",
+      "GOOGLE_API_KEY": "Google API key",
+      "BTN_GOOGLE_API": "Getting a key",
+      "BTN_GOOGLE_API_WARNING": "requires a Google account",
+      "GOOGLE_API_KEY_PLACEHOLDER": "eg: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"
+    },
+    "HELP": {
+      "TIP": {
+        "WOT": "This map displays <b>profiles with a position</b>, whether they are member accounts or not.<br/><br/>Only profiles with the option &quot;appear on the map&quot; has been activated.",
+        "WOT_BTN_LAYERS": "<b>Filter the displayed data</b>: members, pending registrations, simple portfolios, etc.",
+        "WOT_BTN_SEARCH": "You can <b>search</b> by name, public key, or member pseudonym."
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("eo-EO", {
+  "MAP": {
+    "COMMON": {
+      "SEARCH_DOTS": "Traserĉi...",
+      "BTN_LOCALIZE_ME": "Lokalizi min"
+    },
+    "NETWORK": {
+      "LOOKUP": {
+        "BTN_MAP": "Mapo",
+        "BTN_MAP_HELP": "Malfermi la mapon pri nodoj"
+      },
+      "VIEW": {
+        "TITLE": "Mapo pri nodoj",
+        "LAYER": {
+          "MEMBER": "Membro-nodoj",
+          "MIRROR": "Spegul-nodoj",
+          "OFFLINE": "Nekonektitaj nodoj"
+        }
+      }
+    },
+    "WOT": {
+      "LOOKUP": {
+        "BTN_MAP": "Mapo",
+        "BTN_MAP_HELP": "Malfermi la mapon pri membroj"
+      },
+      "VIEW": {
+        "TITLE": "Mapo pri membroj",
+        "LAYER": {
+          "MEMBER": "<i class=\"icon ion-person positive\"></i> Membroj",
+          "PENDING": "<i class=\"icon ion-clock energized\"></i> Aliĝoj atendantaj",
+          "WALLET": "<i class=\"icon ion-card gray\"></i> Simplaj monujoj"
+        }
+      },
+      "ERROR": {
+        "LOAD_POSITION_FAILED": "Neeblas ricevi la lokojn afiŝotajn."
+      }
+    },
+    "REGISTRY": {
+      "LOOKUP": {
+        "BTN_MAP": "Mapo",
+        "BTN_MAP_HELP": "Malfermi la mapon pri paĝoj"
+      },
+      "VIEW": {
+        "TITLE": "Mapo pri paĝoj",
+        "LAYER": {
+          "SHOP": "<i class=\"icon ion-page-shop positive\"></i> Lokaj komercoj",
+          "COMPANY": "<i class=\"icon ion-page-company positive\"></i> Entreprenoj",
+          "ASSOCIATION": "<i class=\"icon ion-page-association energized\"></i> Asocioj",
+          "INSTITUTION": "<i class=\"icon ion-page-institution gray\"></i> Institucioj"
+        }
+      }
+    },
+    "PROFILE": {
+      "MARKER_HELP": "<b>Ŝovu-demetu</b> tiun ĉi markilon por <b>aktualigi<br/> vian lokon</b> sur la mapo, aŭ uzu la serĉo-butonon<br/>super la mapo."
+    },
+    "ERROR": {
+      "LOCALIZE_ME_FAILED": "Neeblas ricevi vian nunan lokon"
+    },
+    "SETTINGS": {
+      "MAP_DIVIDER": "Mapoj",
+      "ENABLE_GOOGLE_API": "Aktivigi la Google-API-servojn?",
+      "ENABLE_GOOGLE_API_HELP": "Ebligas afiŝi sur la <b>mapo pri membroj</b> kontojn kun adreso sed sen iu GPS-lokalizo.",
+      "GOOGLE_API_KEY": "Google-API-ŝlosilo",
+      "BTN_GOOGLE_API": "Ekhavi ŝlosilon",
+      "BTN_GOOGLE_API_WARNING": "Necesigas havi Google-konton",
+      "GOOGLE_API_KEY_PLACEHOLDER": "Ekzemple: AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"
+    },
+    "HELP": {
+      "TIP": {
+        "WOT": "Tiu ĉi mapo afiŝas <b>la profilojn kun loko</b>, ĉu ili rilatas al membro-kontoj aŭ ne.<br/><br/>Nur videblas la profiloj, kies kromaĵo &quot;aperi sur la mapo&quot; estis aktivigita.",
+        "WOT_BTN_LAYERS": "<b>Filtru ĉi tie la afiŝitajn datenojn</b>: membroj, aliĝoj atendantaj, simplaj monujoj, ktp.",
+        "WOT_BTN_SEARCH": "Vi povas <b>efektivigi serĉadon</b> laŭ nomo, publika ŝlosilo aŭ membro-pseŭdonimo."
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("fr-FR", {
+  "MAP": {
+    "COMMON": {
+      "SEARCH_DOTS": "Rechercher...",
+      "BTN_LOCALIZE_ME": "Me localiser"
+    },
+    "NETWORK": {
+      "LOOKUP": {
+        "BTN_MAP": "Carte",
+        "BTN_MAP_HELP": "Ouvrir la carte des noeuds"
+      },
+      "VIEW": {
+        "TITLE": "Carte des noeuds",
+        "LAYER": {
+          "MEMBER": "Nœuds membre",
+          "MIRROR": "Nœuds miroir",
+          "OFFLINE": "Nœuds hors ligne"
+        }
+      }
+    },
+    "WOT": {
+      "LOOKUP": {
+        "BTN_MAP": "Carte",
+        "BTN_MAP_HELP": "Ouvrir la carte des membres"
+      },
+      "VIEW": {
+        "TITLE": "Carte des membres",
+        "LAYER": {
+          "MEMBER": "<i class=\"icon ion-person positive\"></i> Membres",
+          "PENDING": "<i class=\"icon ion-clock energized\"></i> Inscriptions en attente",
+          "WALLET": "<i class=\"icon ion-card gray\"></i> Simples portefeuilles"
+        }
+      },
+      "ERROR": {
+        "LOAD_POSITION_FAILED": "Impossible de récupérer les positions à afficher."
+      }
+    },
+    "REGISTRY": {
+      "LOOKUP": {
+        "BTN_MAP": "Carte",
+        "BTN_MAP_HELP": "Ouvrir la carte des pages"
+      },
+      "VIEW": {
+        "TITLE": "Carte des pages",
+        "LAYER": {
+          "SHOP": "<i class=\"icon ion-page-shop positive\"></i> Commerces locaux",
+          "COMPANY": "<i class=\"icon ion-page-company positive\"></i> Entreprises",
+          "ASSOCIATION": "<i class=\"icon ion-page-association energized\"></i> Associations",
+          "INSTITUTION": "<i class=\"icon ion-page-institution gray\"></i> Institutions"
+        }
+      }
+    },
+    "PROFILE": {
+      "MARKER_HELP": "<b>Glissez-déposez</b> ce marqueur pour <b>mettre<br/>à jour votre position</b> sur la carte, ou utilisez le bouton<br/>de recherche au-dessus de la carte."
+    },
+    "ERROR": {
+      "LOCALIZE_ME_FAILED": "Impossible de récupérer votre position actuelle"
+    },
+    "SETTINGS": {
+      "MAP_DIVIDER": "Cartes",
+      "ENABLE_GOOGLE_API": "Activer les services Google API ?",
+      "ENABLE_GOOGLE_API_HELP": "Permet l'affichage dans la <b>carte des membres</b> des comptes ayant une adresse mais aucun positionnement GPS.",
+      "GOOGLE_API_KEY": "Clé d'API Google",
+      "BTN_GOOGLE_API": "Obtenir une clé",
+      "BTN_GOOGLE_API_WARNING": "Nécessite d'avoir un compte Google",
+      "GOOGLE_API_KEY_PLACEHOLDER": "Exemple : AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"
+    },
+    "HELP": {
+      "TIP": {
+        "WOT": "Cette carte affiche <b>les profils ayant une position</b>, qu'ils correspondent à des comptes membre ou non.<br/><br/>Seuls sont visibles les profils dont l'option &quot;apparaître sur la carte&quot; a été activée.",
+        "WOT_BTN_LAYERS": "<b>Filtrez ici les données affichées</b> : membres, inscriptions en attente, simples portefeuilles, etc.",
+        "WOT_BTN_SEARCH": "Vous pouvez <b>effectuer une recherche</b> par nom, clef publique ou pseudonyme de membre."
+      }
+    }
+  }
+}
+);
+
+$translateProvider.translations("it-IT", {
+   "MAP": {
+     "COMMON": {
+       "SEARCH_DOTS": "Ricerca...",
+       "BTN_LOCALIZE_ME": "Trovami"
+     },
+     "NETWORK": {
+       "LOOKUP": {
+         "BTN_MAP": "Mappa dei peers",
+         "BTN_MAP_HELP": "Aprire mappa dei peers"
+       },
+       "VIEW": {
+         "TITLE": "Mappa dei peers",
+         "LAYER": {
+           "MEMBER": "Peers membri",
+           "MIRROR": "Peers specchi",
+           "OFFLINE": "Peers offline"
+         }
+       }
+     },
+     "WOT": {
+       "LOOKUP": {
+         "BTN_MAP": "Mappa dei membri",
+         "BTN_MAP_HELP": "Aprire mappa dei membri"
+       },
+       "VIEW": {
+         "TITLE": "Mappa membri",
+         "LAYER": {
+           "MEMBER": "<i class=\"icon ion-person positive\"></i> Membri",
+           "PENDING": "<i class=\"icon ion-clock energized\"></i> Registrazione pendenti",
+           "WALLET": "<i class=\"icon ion-card gray\"></i> Portafogli osservatori"
+         }
+       },
+       "ERROR": {
+         "LOAD_POSITION_FAILED": "Errore nel caricamento delle posizioni."
+       }
+     },
+     "REGISTRY": {
+       "LOOKUP": {
+         "BTN_MAP": "Mappa",
+         "BTN_MAP_HELP": "Aprire la mappa delle pagine pro"
+       },
+       "VIEW": {
+         "TITLE": "Mappa delle pagine pro",
+         "LAYER": {
+           "SHOP": "<i class=\"icon ion-page-shop positive\"></i> Negozi locali",
+           "COMPANY": "<i class=\"icon ion-page-company positive\"></i> Aziende",
+           "ASSOCIATION": "<i class=\"icon ion-page-association energized\"></i> Associazioni",
+           "INSTITUTION": "<i class=\"icon ion-page-institution gray\"></i> Instituti"
+         }
+       }
+     },
+     "PROFILE": {
+       "MARKER_HELP": "<b>Drag and drop</b> questo indicatore per <b>aggiornare<br/>tua posizione</b>, o usa i bottoni <br/>sopra la mappa."
+     },
+     "ERROR": {
+       "LOCALIZE_ME_FAILED": "Impossible trovare tua posizione attuale"
+     },
+     "SETTINGS": {
+       "MAP_DIVIDER": "Mappe",
+       "ENABLE_GOOGLE_API": "Abilitare i servizi Google API ?",
+       "ENABLE_GOOGLE_API_HELP": "Sulla <b>mappa dei membri</b>, ti permette di visualizzare i conti con un indirizzo ma senza geolocalizzazione.",
+       "GOOGLE_API_KEY": "Chiave Google API",
+       "BTN_GOOGLE_API": "Ottenere una chiave",
+       "BTN_GOOGLE_API_WARNING": "necessita un conto Google",
+       "GOOGLE_API_KEY_PLACEHOLDER": "per es. : AIzaqyAgszvWm0tM81x1sMK_ipDHBI7EowLqR7I"
+     },
+     "HELP": {
+       "TIP": {
+         "WOT": "Questa mappa mostra <b>profili che hanno fornito una posizione</b>, che siano conti membri o no.<br/><br/>Solo i profili che hanno attivato l'opzione &quot;apparire sulla mappa&quot; sono stati attivati.",
+         "WOT_BTN_LAYERS": "<b>Filtrare i dati visibili</b>: membri, registrazioni pendenti, portafogli osservatori, etc.",
+         "WOT_BTN_SEARCH": "Puoi <b>cercare</b> per nome, chiave pubblica, o pseudonimo del membro."
+       }
+     }
+   }
+ }
+ );
+}]);
+
+angular.module('cesium.plugins.templates', []).run(['$templateCache', function($templateCache) {$templateCache.put('plugins/es/templates/menu_extend.html','<div ng-if=":state:enable && extensionPoint === \'menu-user\'" class="visible-xs visible-sm"><a menu-close="" class="item item-icon-left" active-link="active" ng-if="login && walletData.isMember" active-link-path-prefix="#/app/invitations" ui-sref="app.view_invitations"><i class="icon ion-person-stalker"></i> <span translate="">MENU.INVITATIONS</span> <span class="badge badge-positive" ng-if="walletData.invitations.unreadCount">{{walletData.invitations.unreadCount}}</span> </a><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/user/message" ng-class="{\'item-menu-disable\': !login}" ui-sref="app.user_message.tab_inbox"><i class="icon ion-email"></i> <span translate="">MENU.MESSAGES</span> <span class="badge badge-positive" ng-if="walletData.messages.unreadCount">{{walletData.messages.unreadCount}}</span> </a><a menu-close="" class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/notifications" ng-class="{\'item-menu-disable\': !login}" ui-sref="app.view_notifications"><i class="icon ion-android-notifications"></i> <span translate="">MENU.NOTIFICATIONS</span> <span class="badge badge-positive" ng-if="walletData.notifications.unreadCount">{{walletData.notifications.unreadCount}}</span></a></div>');
+$templateCache.put('plugins/rml9/templates/01-button.html','<!-- Button that call a function of the controller -->\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ng-click="onButtonClick()"\n        title="{{\'RML9.BTN_OPEN\' | translate}}">\n</button>\n\n<!-- Button: Open a view, using `ui-sref` attribute\n<button class="button button-balanced button-small-padding icon ion-plus-circled"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_OPEN\' | translate}}">\n</button> -->\n\n');
+$templateCache.put('plugins/rml9/templates/02-view.html','<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      <!-- the pubkey -->\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      <!-- a text divider-->\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      <!-- iterate on each TX -->\n      <div class="item" ng-repeat="item in items">\n        <h3>{{item.time|formatDate}}</h3>\n        <h4>{{item.pubkey|formatPubkey}}</h4>\n        <div class="badge">{{item.amount|formatAmount}}</div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/rml9/templates/03-button.html','<!-- Button: Open a view, using `ui-sref` attribute -->\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n');
+$templateCache.put('plugins/rml9/templates/03-view_with_button.html','<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      <!-- buttons bar -->\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      <!-- the pubkey -->\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      <!-- the balance -->\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      <!-- a text divider-->\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      <!-- iterate on each TX -->\n      <div class="item item-text-wrap" ng-repeat="item in items">\n\n        <h3>\n          {{item.time|formatDate}}\n          <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n        </h3>\n\n        <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n        <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n        <div class="badge"\n             ng-class="{\'badge-balanced\': item.amount > 0}">\n          {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/rml9/templates/04-view_chart.html','<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      <!-- buttons bar -->\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      <!-- the pubkey -->\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      <!-- the balance -->\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      <!-- a text divider-->\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n\n      <div class="row">\n        <div class="col col-75">\n          <!-- iterate on each TX -->\n          <div class="item item-text-wrap" ng-repeat="item in items">\n\n            <h3>\n              {{item.time|formatDate}}\n              <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n            </h3>\n\n            <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n            <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n            <div class="badge"\n                 ng-class="{\'badge-balanced\': item.amount > 0}">\n              {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n            </div>\n          </div>\n        </div>\n\n        <div class="col col-25">\n\n          <!-- [NEW] TX input chart -->\n          <p class="gray" translate>RML9.CHART.INPUT_CHART_TITLE</p>\n          <canvas id="chart-received-pie" class="chart-pie"\n                  chart-data="inputChart.data"\n                  chart-labels="inputChart.labels"\n                  chart-colors="inputChart.colors">\n          </canvas>\n\n          <!-- [NEW] TX input chart -->\n          <p class="gray" translate>RML9.CHART.OUTPUT_CHART_TITLE</p>\n          <canvas id="chart-sent-pie" class="chart-pie"\n                  chart-data="outputChart.data"\n                  chart-labels="outputChart.labels"\n                  chart-colors="outputChart.colors">\n          </canvas>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/rml9/templates/06-button.html','<!-- [NEW] Display only if plugin is enable -->\n\n  <!-- Button: call a method from the state controller -->\n  <button ng-if="enable" class="button button-balanced button-small-padding icon ion-android-archive"\n          ng-click="onButtonClick()"\n          title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n  </button>\n\n\n');
+$templateCache.put('plugins/rml9/templates/06-settings_item.html','\n<div class="item item-toggle dark">\n  <div class="input-label" translate>RML9.SETTINGS.ENABLE_TOGGLE</div>\n  <label class="toggle toggle-royal">\n    <input type="checkbox" ng-model="formData.plugins.rml9.enable" >\n    <div class="track">\n      <div class="handle"></div>\n    </div>\n  </label>\n</div>\n');
+$templateCache.put('plugins/rml9/templates/07-button.html','<!-- Button: Open a view, using `ui-sref` attribute -->\n<button class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n');
+$templateCache.put('plugins/rml9/templates/07-view.html','<leaflet id="map-geojson" center="map.center" geojson="map.geojson"></leaflet>\n');
+$templateCache.put('plugins/rml9/templates/final-button.html','<!-- Button: Open a view, using `ui-sref` attribute -->\n<button ng-if class="button button-balanced button-small-padding icon ion-android-archive"\n        ui-sref="app.rml9({pubkey: formData.pubkey})"\n        title="{{\'RML9.BTN_SWOW_TX\' | translate}}">\n</button>\n\n');
+$templateCache.put('plugins/rml9/templates/final-view.html','<ion-view left-buttons="leftButtons">\n  <ion-nav-title>\n    {{\'RML9.VIEW.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content>\n    <div class="list">\n\n      <!-- buttons bar -->\n      <div class="center padding">\n        <div class="buttons">\n          <button class="button button-balanced icon-left icon ion-archive"\n                  ng-click="onExportButtonClick()">{{\'RML9.BTN_EXPORT\' | translate}}\n          </button>\n        </div>\n      </div>\n\n      <!-- the pubkey -->\n      <div class="item">\n        {{\'COMMON.PUBKEY\'|translate}}\n        <div class="badge">{{pubkey|formatPubkey}}</div>\n      </div>\n\n      <!-- the balance -->\n      <div class="item">\n        {{\'RML9.VIEW.BALANCE\'|translate}}\n        <div class="badge badge-calm">\n          {{balance|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n        </div>\n      </div>\n\n      <!-- a text divider-->\n      <div class="item item-divider">{{\'RML9.VIEW.DIVIDER\'|translate:{pubkey: pubkey} }}</div>\n\n      <!-- iterate on each TX -->\n      <div class="row">\n        <div class="col col-75">\n          <div class="item item-text-wrap" ng-repeat="item in items">\n\n            <h3>\n              {{item.time|formatDate}}\n              <span ng-if="item.comment" class="gray"> | {{item.comment}}</span>\n            </h3>\n\n            <h4 ng-if="item.uid" class="positive"><i class="icon ion-person"></i> {{item.name||item.uid}}</h4>\n            <h4 ng-if="!item.uid" class="gray"><i class="icon ion-key"></i> {{item.pubkey|formatPubkey}}</h4>\n\n            <div class="badge"\n                 ng-class="{\'badge-balanced\': item.amount > 0}">\n              {{item.amount|formatAmount}} <span ng-bind-html="$root.currency.name|currencySymbol"></span>\n            </div>\n          </div>\n\n        </div>\n\n        <div class="col col-25">\n\n          <!-- [NEW] TX input chart -->\n          <p class="gray" translate>RML9.CHART.INPUT_CHART_TITLE</p>\n          <canvas id="chart-received-pie" class="chart-pie"\n                  chart-data="inputChart.data"\n                  chart-labels="inputChart.labels">\n          </canvas>\n\n          <!-- [NEW] TX input chart -->\n          <p class="gray" translate>RML9.CHART.OUTPUT_CHART_TITLE</p>\n          <canvas id="chart-sent-pie" class="chart-pie"\n                  chart-data="outputChart.data"\n                  chart-labels="outputChart.labels">\n          </canvas>\n        </div>\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/es/templates/blockchain/items_blocks.html','<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-if ng-if=":rebind:!smallscreen"><ng-repeat ng-repeat="block in :rebind:search.results track by block.number" ng-include="!block.empty ? \'templates/blockchain/item_block_lg.html\' : \'templates/blockchain/item_block_empty_lg.html\'"></ng-repeat></ng-if><ng-if ng-if=":rebind:smallscreen"><ng-repeat ng-repeat="block in :rebind:search.results track by block.number" ng-include="::\'templates/blockchain/item_block.html\'"></ng-repeat></ng-if>');
+$templateCache.put('plugins/es/templates/blockchain/lookup.html','<ion-view><ion-nav-title><span translate>BLOCKCHAIN.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-navicon visible-xs visible-sm" ng-click="toggleCompactMode()"><b class="icon-secondary" ng-class="{\'ion-arrow-down-b\': !compactMode, \'ion-arrow-up-b\': compactMode}" style="top: -12px; left: 11px; font-size: 10px"></b> <b class="icon-secondary" ng-class="{\'ion-arrow-up-b\': !compactMode,\'ion-arrow-down-b\': compactMode}" style="top: 12px; left: 11px; font-size: 10px"></b></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/blockchain/lookup_form.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/blockchain/lookup_form.html','<div class="lookupForm"><div class="item no-padding"><div class="button button-small button-text button-stable button-icon-event padding no-padding-right ink" ng-repeat="filter in search.filters" ng-if="filter"><span ng-bind-html="\'BLOCKCHAIN.LOOKUP.TX_SEARCH_FILTER.\'+filter.type|translate:filter"></span> <i class="icon ion-close" ng-click="itemRemove($index)"></i></div><label class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'BLOCKCHAIN.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="helptip-blockchain-search-text"></a></div></label></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.type==\'last\'" translate="">BLOCKCHAIN.LOOKUP.LAST_BLOCKS</h4><h4 ng-if="search.type==\'text\'">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }} </small><small class="gray" ng-if=":rebind:expertMode && search.filters && search.filters.length">- <a ng-click="toggleShowQuery()" ng-if="!showQuery">{{\'DOCUMENT.LOOKUP.SHOW_QUERY\'|translate }} <i class="icon ion-arrow-down-b gray"></i> </a><a ng-click="toggleShowQuery()" ng-if="showQuery">{{\'DOCUMENT.LOOKUP.HIDE_QUERY\'|translate }} <i class="icon ion-arrow-up-b gray"></i></a></small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="item no-border no-padding" ng-if=":rebind:search.filters && search.filters.length && expertMode"><small class="no-padding no-margin" ng-if="showQuery"><span class="gray text-wrap dark">{{:rebind:search.query}}</span></small></div><ion-list class="list list-blocks" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/blockchain/items_blocks.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>');
+$templateCache.put('plugins/es/templates/blockchain/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>BLOCKCHAIN.LOOKUP.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a ng-if="enableFilter" class="item item-icon-left item-icon-right ink" ng-click="doSearchLast()"><i class="icon ion-clock"></i> {{\'BLOCKCHAIN.LOOKUP.BTN_LAST\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'last\'"></i></a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/common/edit_pictures.html','<div class="gallery" ng-controller="ESPicturesEditCtrl as ctrl"><div ng-repeat="picture in pictures" class="item card card-gallery stable-bg" ng-class="{\'in done\': picture.isnew}"><div><h2 ng-if="picture.title">{{picture.title}}</h2><img ng-src="{{picture.src}}"></div><div class="item done in tabs tabs-secondary tabs-icon-left"><a class="tab-item stable-bg assertive" ng-click="removePicture($index)" title="{{\'COMMON.BTN_PICTURE_DELETE\' | translate}}"><i class="icon ion-trash-a"></i>{{\'COMMON.BTN_PICTURE_DELETE\'|translate}}</a> <a class="tab-item stable-bg dark" ng-click="rotatePicture($index)" title="{{\'COMMON.BTN_PICTURE_ROTATE\' | translate}}"><i class="icon ion-forward"></i>{{\'COMMON.BTN_PICTURE_ROTATE\'|translate}}</a> <a class="tab-item stable-bg" ng-click="favoritePicture($index)" ng-class="{\'gray\': $index !== 0, \'positive\': $index === 0}" title="{{\'COMMON.BTN_PICTURE_FAVORISE\' | translate}}"><i class="icon ion-star"></i>{{\'COMMON.BTN_PICTURE_FAVORISE\'|translate}}</a></div></div><div class="item card card-gallery card-gallery-new text-center padding ink" ng-click="selectNewPicture(\'#pictureFile\')"><i class="ion-image stable" style="font-size:150px"></i> <b class="ion-plus gray" style="font-size:80px; position:absolute; top:25px; right: 5px"></b><p translate>COMMON.BTN_ADD_PICTURE</p></div><input type="file" id="pictureFile" accept="image/*" onchange="angular.element(this).scope().fileChanged(event)" style="visibility:hidden; position:absolute"></div>');
+$templateCache.put('plugins/es/templates/common/edit_position.html','<div class="item item-divider" translate>LOCATION.LOCATION_DIVIDER</div><ion-item class="item-input item-floating-label item-button-right"><span class="input-label">{{\'LOCATION.ADDRESS\' | translate}}</span><textarea placeholder="{{\'LOCATION.ADDRESS_HELP\' | translate}}" ng-model="formData.address" ng-model-options="{ debounce: 350 }" rows="4" cols="10">\n              </textarea></ion-item><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.geoPoint.$invalid}"><span class="input-label" translate>LOCATION.CITY</span> <input type="text" placeholder="{{\'LOCATION.CITY_HELP\'|translate}}" ng-model="formData.city" ng-model-options="{ updateOn: \'blur\' }" required-if="formData.address" ng-change="onCityChanged()"></div><input type="hidden" name="geoPoint" ng-model="formData.geoPoint" required-if="formPosition.enable" geo-point><div class="form-errors" ng-show="form.$submitted && form.city.$error" ng-messages="form.city.$error"><div class="form-error" ng-message="required"><span translate="LOCATION.ERROR.CITY_REQUIRED_IF_STREET"></span></div></div><div class="form-errors" ng-show="form.$submitted && form.geoPoint.$error" ng-messages="form.geoPoint.$error"><div class="form-error" ng-message="required"><span translate="LOCATION.ERROR.REQUIRED_FOR_LOCATION" ng-if="!formData.city"></span> <span translate="LOCATION.ERROR.INVALID_FOR_LOCATION" ng-if="formData.city"></span></div><div class="form-error" ng-message="geoPoint"><span translate="LOCATION.ERROR.REQUIRED_FOR_LOCATION" ng-if="!formData.city"></span> <span translate="LOCATION.ERROR.INVALID_FOR_LOCATION" ng-if="formData.city"></span></div></div><div class="item row item-text-wrap no-padding"><div class="col no-padding"><ion-checkbox ng-model="formPosition.enable" ng-change="onUseGeopointChanged()" class="item item-border-large done in"><div class="item-content"><span translate>LOCATION.USE_GEO_POINT</span><h4 class="gray" ng-if="formPosition.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner>{{\'LOCATION.LOADING_LOCATION\'|translate}}</h4></div></ion-checkbox></div><div class="col col-10 no-padding" style="min-width: 60px"><div class="row text-center"><a class="button button-stable button-small-padding" title="{{\'LOCATION.BTN_GEOLOC_ADDRESS\'|translate}}" ng-disabled="!formPosition.enable" ng-click="openSearchLocationModal()"><i class="icon ion-home" style="left: 15px"></i> <b class="icon-secondary ion-search" style="top: -9px; left:32px; font-size: 18px"></b></a></div></div></div><cs-extension-point name="after-position"></cs-extension-point>');
+$templateCache.put('plugins/es/templates/common/edit_socials.html','<div class="list no-padding {{::motion.ionListClass}}"><div class="item item-divider"><span translate="">PROFILE.SOCIAL_NETWORKS_DIVIDER</span> <a class="badge button button-text button-small button-small-padding" ng-class="{\'button-text-positive\': socialData.reorder}" ng-if="formData.socials && formData.socials.length &gt; 1" ng-click="socialData.reorder=!socialData.reorder"><span translate="">PROFILE.BTN_REORDER</span></a></div></div><ion-list show-reorder="socialData.reorder"><ion-item class="item-icon-left item-social-edit done in" type="no-padding item-text-wrap" ng-if="formData.socials && formData.socials.length" ng-repeat="social in formData.socials | filter:filterFn track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\', \'ion-iphone\': social.type == \'phone\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}} <i class="ion-locked" ng-if="social.recipient"></i></p><h2><span>{{social.url}}</span></h2><ion-option-button class="button-assertive" ng-if="!social.recipient" ng-click="formData.socials.splice($index, 1); dirty = true;">{{\'COMMON.BTN_DELETE\'|translate}}</ion-option-button><ion-option-button class="button-info" ng-if="!social.recipient" ng-click="editSocialNetwork($index)">{{\'COMMON.BTN_EDIT\'|translate}}</ion-option-button><ion-reorder-button class="ion-drag" on-reorder="reorderSocialNetwork(social, $fromIndex, $toIndex)"></ion-reorder-button></ion-item></ion-list><ion-list class="no-padding"><div class="item item-complex item-input-inset"><label class="item-input-wrapper"><input type="text" style="width:100%" placeholder="{{\'PROFILE.SOCIAL_HELP\'|translate}}" id="socialUrl" on-return="addSocialNetwork($event);" ng-model="socialData.url"></label><button class="button button-small hidden-xs" type="button" ng-click="addSocialNetwork($event)" translate="">COMMON.BTN_ADD</button> <button class="button button-small button-icon icon ion-android-add visible-xs" type="button" ng-click="addSocialNetwork($event)"></button></div></ion-list>');
+$templateCache.put('plugins/es/templates/common/item_comment.html','<ng-init ng-init="level = level + 1"><a name="{{::comment.id|formatHash}}"></a><ion-item id="comment-{{::comment.id|formatHash}}" class="card card-comment card-avatar stable-900-bg item-text-wrap no-padding" ng-class="::{\'in done\': comment.isnew}"><div class="card-header padding-left" ng-if="comment.parent && !hideParent"><h5 class="gray underline"><ng-if ng-if="!comment.parent.issuer">{{\'COMMENTS.REPLY_TO_DELETED_COMMENT\'|translate}}</ng-if><ng-if ng-if="comment.parent.issuer"><a ng-click="toggleExpandedParent(comment, $index)">{{\'COMMENTS.REPLY_TO_LINK\'|translate}}<ng-if ng-if="::comment.parent.uid">{{::comment.parent.name||comment.parent.uid}}</ng-if><ng-if ng-if="::!comment.parent.uid"><i class="ion-key"></i> {{::comment.parent.name|| (comment.parent.issuer|formatPubkey) }}</ng-if></a><i ng-class="{\'ion-arrow-down-b\': !comment.expandedParent[$index], \'ion-arrow-up-b\': comment.expandedParent[$index]}"></i></ng-if></h5><div class="padding-left" ng-if="comment.expandedParent[$index]"><div class="card card-avatar card-avatar-small stable-bg item-text-wrap no-padding in done"><ng-include ng-init="comment = comment.parent" src="\'plugins/es/templates/common/item_comment_content.html\'"></ng-include></div></div></div><ng-include src="::\'plugins/es/templates/common/item_comment_content.html\'"></ng-include><div class="card-footer gray"><small class="underline"><a ng-click="share($event, comment, $index)">{{comment.creationTime | formatFromNow}}</a><ng-if ng-if="comment.replyCount">| <a class="dark" ng-click="toggleExpandedReplies(comment, $index)">{{\'COMMENTS.REPLY_COUNT\'|translate:comment}}</a> <i ng-class="{\'ion-arrow-down-b\': !comment.showReplies, \'ion-arrow-up-b\': comment.showReplies}"></i></ng-if></small><div class="pull-right"><a class="ion-android-share-alt" ng-click="share($event, comment)"></a> <a class="ion-edit" ng-if="isUserPubkey(comment.issuer)" ng-click="edit(comment)"></a> <a class="ion-trash-a" ng-if="isUserPubkey(comment.issuer)" ng-click="remove(comment, $index)"></a> <a class="ion-reply" ng-click="reply(comment)">{{::\'COMMENTS.REPLY\'|translate}}</a></div></div></ion-item><div ng-if="comment.expandedReplies[$index]" class="padding-left card-avatar-small expanded" ng-init="hideParent=true"><ng-include ng-repeat="comment in comment.replies track by comment.id" src="\'plugins/es/templates/common/item_comment.html\'"></ng-include></div></ng-init>');
+$templateCache.put('plugins/es/templates/common/item_comment_content.html','<div class="item item-avatar done in"><span class="avatar" ng-if="::!comment.avatar" ng-class="::{\'avatar-member\': comment.uid, \'avatar-wallet\': !comment.uid}"></span> <span class="avatar" ng-if="::comment.avatar" style="background-image: url({{::comment.avatar.src}})"></span> <a class="pull-left" ui-sref="app.wot_identity({pubkey:comment.issuer, uid: comment.uid})"><span class="positive" ng-if="::comment.uid">{{::comment.name||comment.uid}} </span><span ng-if="::!comment.uid" class="gray"><i class="icon ion-key gray"></i> {{::comment.name || (comment.issuer|formatPubkey)}} </span></a>&nbsp; <span trust-as-html="comment.html"></span></div>');
+$templateCache.put('plugins/es/templates/common/item_location_search.html','<div class="item no-padding"><div class="item-input"><i class="icon ion-location placeholder-icon"></i> <input type="text" placeholder="{{(options.location.help||\'LOCATION.SEARCH_HELP\')|translate}}" ng-model-options="{ debounce: 350 }" ng-model="search.location" ng-keydown="onKeydown($event)" ng-change="onLocationChanged()" ng-blur="hideDropdown()"></div></div><ul class="item no-padding list dropdown-list" ng-if="locations" scroll="true"><div ng-if="!locations.length" class="item padding assertive"><span translate>COMMON.SEARCH_NO_RESULT</span></div><a ng-repeat="res in locations" class="item item-border-large item-text-wrap ink done in {{res.selected && \'active\' || \'\'}}" ng-class="::{\'item-divider\': !res.address, \'item-icon-left\': res.address}" ng-click="::res.address ? selectLocation(res) : false"><h4 class="text-italic" ng-if="::!res.address" ng-bind-html="res.name"></h4><ng-if ng-if="::res.address"><i class="icon ion-location"></i><h3 ng-if="res.address.road">{{::res.address.road}}</h3><h3><span ng-if="res.address.postcode">{{::res.address.postcode}}</span> {{::res.address.city||res.address.village}} <span class="gray">| {{::res.address.country}}</span></h3><h5 class="gray">{{\'LOCATION.MODAL.POSITION\'|translate:res }}</h5></ng-if></a></ul>');
+$templateCache.put('plugins/es/templates/common/modal_category.html','<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title">{{ (ctrl.title || \'COMMON.CATEGORIES\') | translate}}</h1></ion-header-bar><ion-content class="categoryModal"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list"><label class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" placeholder="{{\'COMMON.CATEGORY_SEARCH_HELP\'|translate}}" ng-model="ctrl.searchText" ng-model-options="{ debounce: 350 }" ng-change="ctrl.doSearch()"></label><div ng-repeat="cat in categories" class="item item-category item-text-wrap" ng-class="{\'item-divider\': !cat.parent}" ng-click="cat.parent ? closeModal(cat) : false"><h2 ng-bind-html="cat.name"></h2></div></div></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/common/modal_edit_avatar.html','<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs visible-sm" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>PROFILE.MODAL_AVATAR.TITLE</h1><button class="button button-clear icon-right visible-xs" ng-click="doCrop()" ng-disabled="formData.imageCropStep == 1" ng-if="formData.imageCropStep <= 2"><span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i></button> <button class="button button-clear icon-right visible-xs" ng-click="closeModal(formData.result)" ng-if="formData.imageCropStep == 3"><i class="icon ion-android-done"></i></button></ion-header-bar><ion-content class="modal-avatar padding"><div ng-show="formData.imageCropStep == 1"><p translate>PROFILE.MODAL_AVATAR.SELECT_FILE_HELP</p><div class="item card text-center padding ink" ng-click="openFileSelector()"><i class="ion-image stable" style="font-size:150px"></i> <b class="ion-plus gray" style="position:relative; font-size:80px; top:-51px; right: 19px"></b><p translate>PROFILE.MODAL_AVATAR.BTN_SELECT_FILE</p></div><input type="file" name="fileInput" accept="image/*" id="fileInput" onchange="angular.element(this).scope().fileChanged(event)" style="visibility:hidden; position:absolute"></div><div ng-show="formData.imageCropStep == 2"><p translate>PROFILE.MODAL_AVATAR.RESIZE_HELP</p><div class="item card text-center padding ink"><image-crop data-height="200" data-width="200" data-shape="circle" data-step="formData.imageCropStep" src="formData.imgSrc" data-result="formData.result" data-result-blob="formData.resultBlob" crop="formData.initCrop" padding="150" max-size="1024"></image-crop></div></div><div ng-show="formData.imageCropStep == 3"><p translate>PROFILE.MODAL_AVATAR.RESULT_HELP</p><div class="item card padding hero" style="height: 110px"><div class="content"><img class="avatar" ng-src="{{formData.result}}" style="height: 88px; width: 88px"></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-calm icon-right ion-chevron-right ink" ng-click="doCrop()" translate ng-disabled="formData.imageCropStep == 1" ng-if="formData.imageCropStep <= 2">COMMON.BTN_NEXT</button> <button class="button button-positive ink" ng-click="closeModal(formData.result)" translate ng-if="formData.imageCropStep == 3">COMMON.BTN_CONTINUE</button></div></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/common/modal_location.html','<ion-modal-view class="modal-full-height modal-search-location"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate="">COMMON.BTN_CANCEL</button><h1 class="title" translate="">LOCATION.MODAL.TITLE</h1></ion-header-bar><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'LOCATION.MODAL.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()"></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left" ng-if="!search.loading && search.results"><h4 translate="">COMMON.RESULTS_LIST</h4></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div ng-if="!search.loading && search.results && (!search.results.length || !search.results[0].address)" class="assertive padding"><span translate="">COMMON.SEARCH_NO_RESULT</span></div><ion-list ng-if="!search.loading" class="padding-top {{::motion.ionListClass}}"><div ng-repeat="res in search.results" class="item item-border-large item-text-wrap ink" ng-class="::{\'item-divider\': !res.address, \'item-icon-left item-icon-right\': res.address}" ng-click="res.address ? closeModal(res) : false"><h4 class="text-italic" ng-if="::!res.address" ng-bind-html="res.name"></h4><ng-if ng-if="::res.address"><i class="icon ion-location"></i><h2 ng-if="res.address.road">{{::res.address.road}}</h2><h3><span ng-if="res.address.postcode">{{::res.address.postcode}}</span> {{::res.address.city||res.address.village}} <span class="gray">| {{::res.address.country}}</span></h3><h5 class="gray">{{\'LOCATION.MODAL.POSITION\'|translate:res }}</h5><i class="icon ion-ios-arrow-right"></i></ng-if></div></ion-list></ion-content><ion-footer-bar class="stable-bg padding-left padding-right block" ng-if="license"><div class="pull-right copyright"><span class="dark">\xA9 </span><a class="positive" href="{{license.url}}" target="_blank">{{license.name}}</a></div></ion-footer-bar></ion-modal-view>');
+$templateCache.put('plugins/es/templates/common/popover_profile_extend.html','<button ng-if=":state:enable && auth" class="button button-positive button-small ink" ng-click="showEditUserProfile()">{{\'PROFILE.BTN_EDIT\' | translate}}</button>');
+$templateCache.put('plugins/es/templates/common/popup_report_abuse.html','<form name="abuseForm" ng-submit=""><div class="list" ng-init="setAbuseForm(abuseForm)"><label class="item item-input" ng-class="{\'item-input-error\': abuseForm.$submitted && abuseForm.comment.$invalid}"><textarea class="padding" style="background-color: transparent" name="comment" type="text" placeholder="{{\'COMMON.REPORT_ABUSE.REASON_HELP\' | translate}}" rows="3" ng-model="abuseData.comment" ng-minlength="8" required></textarea></label><div class="form-errors" ng-if="abuseForm.$submitted && abuseForm.comment.$error" ng-messages="abuseForm.comment.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-toggle item-text-wrap dark"><div class="input-label" translate>COMMON.REPORT_ABUSE.ASK_DELETE</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="abuseData.delete"><div class="track"><div class="handle"></div></div></label></div></div></form>');
+$templateCache.put('plugins/es/templates/common/view_comments.html','<form class="comments" ng-controller="ESCommentsCtrl" ng-submit="save()"><div class="item item-divider"><i class="icon ion-chatboxes"></i> <span translate="">COMMENTS.DIVIDER</span> <span class="gray" ng-if="comments.total">({{comments.total}})</span></div><span class="item item-more-comments" ng-if="comments.hasMore"><small><a ng-click="showMore()" translate="">COMMENTS.SHOW_MORE_COMMENTS</a></small></span><div class="padding-right"><ng-repeat ng-repeat="comment in comments.result track by comment.id" ng-include="::\'plugins/es/templates/common/item_comment.html\'"></ng-repeat></div><div class="visible-xs visible-sm" style="margin-bottom"><div class="block"><div class="item item-input-inset done in" ng-if="formData.parent"><div class="padding text-right pull-left" translate="">COMMENTS.REPLY_TO</div><br><div class="padding-left expanded"><div class="card card-comment stable-900-bg item-text-wrap no-padding in done"><ng-include ng-if="::formData.parent.message" ng-init="comment = formData.parent" src="\'plugins/es/templates/common/item_comment_content.html\'"></ng-include><span ng-if="::!formData.parent.message" translate="">COMMENTS.DELETED_COMMENT</span><div class="card-footer text-right gray"><div class="pull-right"><a class="ion-close" ng-click="removeParentLink()">{{::\'COMMON.BTN_CANCEL\'|translate}}</a></div></div></div></div></div><div class="item item-input-inset"><div class="item-input-wrapper"><input type="text" id="comment-form-input" style="width: 100%" placeholder="{{\'COMMENTS.COMMENT_HELP\'|translate}}" on-return="save();" ng-model="formData.message"> <button type="submit" class="button button-small button-small-padding button-icon button-dark button-icon gray"><i class="icon ion-android-send"></i></button></div></div></div></div></form>');
+$templateCache.put('plugins/es/templates/common/view_likes.html','<div class="likes"><ng-if ng-if="likeData.likes && likeData.likes.total"><span ng-class="{\'gray\': !likeData.likes.wasHitCount, \'positive\': likeData.likes.wasHitCount}"><a title="{{\'COMMON.LIKES_TEXT\'|translate: likeData.likes }}" ng-click="!canEdit && toggleLike($event, {kind: \'like\'})">{{likeData.likes.total}} <i class="icon ion-heart"></i></a></span></ng-if><ng-if ng-if="likeData.abuses && likeData.abuses.total"><span class="gray" ng-if="likeData.likes && likeData.likes.total">&nbsp;|&nbsp;</span> <a ng-class="{\'assertive\': likeData.abuses.wasHitCount}" ng-click="!canEdit && reportAbuse($event)" title="{{\'COMMON.ABUSES_TEXT\'|translate: likeData.abuses }}">{{likeData.abuses.total}} <i class="icon ion-android-warning"></i></a></ng-if></div>');
+$templateCache.put('plugins/es/templates/common/view_pictures.html','<div class="item gallery done in" ng-if="pictures && pictures.length>0"><div ng-repeat="picture in pictures" class="item card card-gallery"><div class="ink"><h2 ng-if="picture.title">{{::picture.title}}</h2><img ng-src="{{picture.src}}"></div></div></div>');
+$templateCache.put('plugins/es/templates/currency/tab_blocks_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'nav-buttons\'"><button class="button button-icon button-clear icon ion-android-search visible-xs visible-sm" ui-sref="app.blockchain_search"></button></ng-if>');
+$templateCache.put('plugins/es/templates/document/item_document.html','<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-click="selectDocument($event, doc)"><i class="icon ion-document stable" ng-if=":rebind:!doc.avatar"></i> <i class="avatar" ng-if=":rebind:doc.avatar" style="background-image: url(\'{{:rebind:doc.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h3 class="dark"><i class="ion-locked" ng-if=":rebind:doc.nonce"></i> {{:rebind:doc.time|formatDate}}</h3><h4 class="gray">{{:rebind:\'DOCUMENT.HASH\'|translate}} {{:rebind:doc.hash|formatHash}}</h4></div><div class="col"><h3><a ui-sref="app.wot_identity({pubkey: doc.pubkey, uid: doc.uid})"><span class="gray"><i class="ion-key"></i> {{:rebind:doc.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:doc.uid"><i class="ion-person"></i> {{:rebind:doc.name||doc.uid}}</span></a></h3></div><div class="col"><a ng-if=":rebind:login && doc.pubkey==walletData.pubkey" ng-click="remove($index)" class="gray pull-right" title="{{\'DOCUMENT.LOOKUP.BTN_REMOVE\'|translate}}"><i class="ion-trash-a"></i></a><h3 ng-if=":rebind:doc.recipient"><a ui-sref="app.wot_identity({pubkey: doc.recipient.pubkey, uid: doc.recipient.uid})"><span class="gray"><i class="ion-key"></i> {{:rebind:doc.recipient.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:doc.recipient.uid"><i class="ion-person"></i> {{:rebind:doc.recipient.name||doc.recipient.uid}}</span></a></h3><h4 class="gray" ng-if=":rebind:doc.read_signature"><i class="ion-checkmark"></i> <span translate>DOCUMENT.LOOKUP.READ</span></h4></div></div></ion-item>');
+$templateCache.put('plugins/es/templates/document/item_document_comment.html','<ion-item id="doc-{{::doc.id}}" class="item item-document item-document-comment item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'compacted\': compactMode}" ng-click="selectDocument($event, doc)"><i ng-show=":rebind:!compactMode" ng-if=":rebind:!doc.avatar" class="icon ion-ios-chatbubble-outline stable"></i> <i ng-show=":rebind:!compactMode" ng-if=":rebind:doc.avatar" class="avatar" style="background-image: url(\'{{:rebind:doc.avatar.src}}\')"></i><div class="row no-padding"><div class="col"><h4><i class="ion-ios-chatbubble-outline dark"></i> <span class="gray" ng-if=":rebind:doc.name"><i class="ion-person" ng-show=":rebind:!compactMode"></i> {{:rebind:doc.name}}: </span><span class="dark"><i class="ion-quote" ng-if=":rebind:!compactMode"></i> {{:rebind:doc.message|truncText:50}}</span></h4><h4 class="gray"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</h4></div><div class="col"><h3><a ui-sref="app.wot_identity({pubkey: doc.pubkey, uid: doc.name})"></a></h3></div><div class="col" ng-if=":rebind:!compactMode"></div></div></ion-item>');
+$templateCache.put('plugins/es/templates/document/item_document_page.html','<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'positive-100-bg\': doc.updated}" ng-click="selectDocument($event, doc)"><i ng-if=":rebind:doc.thumbnail" class="avatar" style="background-image: url({{:rebind:doc.thumbnail.src}})"></i> <i ng-if=":rebind:!doc.thumbnail" class="avatar icon dark cion-registry-{{doc.docType}}"></i><div class="row no-padding"><div class="col"><h3 ng-if="doc.title">{{:rebind:doc.title}}</h3><h4><span class="dark" ng-if=":rebind:doc.picturesCount > 1"><i class="ion-camera"></i> {{:rebind:doc.picturesCount}} </span><span class="dark" ng-if=":rebind:doc.city"><i class="ion-location"></i> {{:rebind:doc.city}} </span><span class="gray" ng-if=":rebind:doc.name"><i class="ion-person"></i> {{:rebind:doc.name}}</span></h4></div><div class="col col-33"><small class="gray pull-right"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</small></div></div></ion-item>');
+$templateCache.put('plugins/es/templates/document/item_document_profile.html','<ion-item id="doc-{{::doc.id}}" class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" ng-class="{\'compacted\': compactMode}" ng-click="selectDocument($event, doc)"><i ng-show=":rebind:!compactMode" ng-if=":rebind:doc.avatar" class="avatar" style="background-image: url({{:rebind:doc.avatar.src}})"></i> <i ng-show=":rebind:!compactMode" ng-if=":rebind:!doc.avatar" class="icon ion-person stable"></i><div class="row no-padding"><div class="col"><h4 ng-if=":rebind:doc.title"><i class="ion-person gray"></i> <span class="dark">{{:rebind:doc.title}} </span><span class="gray">{{:rebind:\'DOCUMENT.LOOKUP.HAS_CREATE_OR_UPDATE_PROFILE\' |translate}}</span></h4><h4><span class="dark" ng-if=":rebind:doc.city"><i class="ion-location"></i> {{:rebind:doc.city}} </span><span class="gray"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}}</span></h4></div><div class="col" ng-if=":rebind:!compactMode"><a ng-if=":rebind:login && doc.pubkey==walletData.pubkey" ng-click="remove($event, $index)" class="gray pull-right" title="{{\'DOCUMENT.LOOKUP.BTN_REMOVE\'|translate}}"><i class="ion-trash-a"></i></a></div></div></ion-item>');
+$templateCache.put('plugins/es/templates/document/items_documents.html','<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-repeat ng-repeat="doc in :rebind:search.results track by doc.id" ng-switch="" on="doc.type"><div ng-switch-when="comment"><ng-include src="::\'plugins/es/templates/document/item_document_comment.html\'"></ng-include></div><div ng-switch-when="profile"><ng-include src="::\'plugins/es/templates/document/item_document_profile.html\'"></ng-include></div><div ng-switch-when="record"><ng-include ng-if="doc.index === \'page\'" src="::\'plugins/es/templates/document/item_document_page.html\'"></ng-include><ng-include ng-if="doc.index !== \'page\'" src="::\'plugins/es/templates/document/item_document.html\'"></ng-include></div><div ng-switch-default=""><ng-include src="::\'plugins/es/templates/document/item_document.html\'"></ng-include></div></ng-repeat>');
+$templateCache.put('plugins/es/templates/document/list_documents.html','<ion-list class="list" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/document/items_documents.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/document/lookup.html','<ion-view><ion-nav-title><span translate>DOCUMENT.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/document/lookup_form.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/document/lookup_form.html','<div class="lookupForm"><div class="item no-padding"><label class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'DOCUMENT.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="{{helptipPrefix}}-search-text"></a></div></label></div><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.last" translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS</h4><h4 ng-if="!search.last">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }} </small><small class="gray" ng-if=":rebind:expertMode && search.filters && search.filters.length">- <a ng-click="toggleShowQuery()" ng-if="!showQuery"><span translate="">DOCUMENT.LOOKUP.SHOW_QUERY</span> <i class="icon ion-arrow-down-b gray"></i> </a><a ng-click="toggleShowQuery()" ng-if="showQuery"><span translate="">DOCUMENT.LOOKUP.HIDE_QUERY</span> <i class="icon ion-arrow-up-b gray"></i></a></small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="item no-border no-padding" ng-if=":rebind:search.filters && search.filters.length && expertMode"><small class="no-padding no-margin" ng-if="showQuery"><span class="gray text-wrap dark">{{:rebind:search.query}}</span></small></div><ion-list class="list" ng-class="::motion.ionListClass"><ng-include src="::\'plugins/es/templates/document/items_documents.html\'"></ng-include></ion-list><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>');
+$templateCache.put('plugins/es/templates/document/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>DOCUMENT.LOOKUP.POPOVER_ACTIONS.TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-class="{\'gray\': !search.total}" ng-click="removeAll()"><i class="icon ion-trash-a"></i> {{\'DOCUMENT.LOOKUP.POPOVER_ACTIONS.REMOVE_ALL\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/group/edit_group.html','<ion-view left-buttons="leftButtons"><ion-nav-title><span class="visible-xs" ng-if="id" ng-bind-html="formData.title"></span> <span class="visible-xs" ng-if="!loading && !id" translate="">GROUP.EDIT.TITLE_NEW</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-class="{\'ion-android-send\':!id, \'ion-android-done\': id}" ng-click="save()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding"><div class="col"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><form name="recordForm" novalidate="" ng-submit="save()"><div class="list" ng-class="motion.ionListClass" ng-init="setForm(recordForm)"><div class="item hidden-xs"><h1 ng-if="id" ng-bind-html="formData.title"></h1><h1 ng-if="!id" translate="">GROUP.EDIT.TITLE_NEW</h1><h2 class="balanced" ng-if="!id"><i class="icon ion-android-people"></i> <i class="icon ion-android-lock" ng-if="formData.type==\'managed\'"></i> {{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</h2></div><div class="item" ng-if="id"><h4 class="gray"><i class="icon ion-calendar"></i> {{\'COMMON.LAST_MODIFICATION_DATE\'|translate}}&nbsp;{{formData.time | formatDate}}</h4><div class="badge badge-balanced badge-editable" ng-click="showRecordTypeModal()">{{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</div></div><ng-include src="::\'plugins/es/templates/common/edit_pictures.html\'"></ng-include><div class="item item-divider" translate="">GROUP.GENERAL_DIVIDER</div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label" translate="">GROUP.EDIT.RECORD_TITLE</span> <input type="text" placeholder="{{\'GROUP.EDIT.RECORD_TITLE_HELP\'|translate}}" name="title" id="group-record-title" ng-model="formData.title" ng-minlength="3" ng-required="true"></div><div class="form-errors" ng-if="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-input item-floating-label"><span class="input-label" translate="">GROUP.EDIT.RECORD_DESCRIPTION</span><textarea placeholder="{{\'GROUP.EDIT.RECORD_DESCRIPTION_HELP\'|translate}}" ng-model="formData.description" rows="8" cols="10">\n                </textarea></div><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include></div></form></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/group/item_group.html','<a name="group-{{:rebind:group.hash}}"></a><div id="group-{{:rebind:group.hash}}" class="item item-icon-right item-avatar {{::ionItemClass}} ink" ng-click="select(group)"><i class="item-image avatar" style="background-image: url({{::group.avatar.src}})" ng-if="group.avatar"></i> <i class="item-image icon ion-android-people" ng-if="!group.avatar"></i> <i class="item-image icon-secondary ion-android-lock" ng-if="!group.avatar" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i><h2 ng-bind-html=":rebind:group.title"></h2><h4 class="gray pull-right"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: group }}</h4><h4 class="dark pull-left" ng-if=":rebind:group.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:group.membersCount}}</span></h4><i class="icon ion-ios-arrow-right"></i></div>');
+$templateCache.put('plugins/es/templates/group/items_groups.html','<div class="padding gray" ng-if=":rebind:!search.loading && !search.results.length" translate="">COMMON.SEARCH_NO_RESULT</div><ng-repeat ng-repeat="group in :rebind:search.results" ng-include="::\'plugins/es/templates/group/item_group.html\'"></ng-repeat>');
+$templateCache.put('plugins/es/templates/group/list.html','<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="notification in search.results" class="item-border-large item-text-wrap ink item-avatar" ng-class="{\'unread\': !notification.read}" ng-click="select(notification)"><i ng-if="!notification.avatar" class="item-image icon {{::notification.avatarIcon}}"></i> <i ng-if="notification.avatar" class="item-image avatar" style="background-image: url({{::notification.avatar.src}})"></i><h3 trust-as-html="notification.message | translate:notification"></h3><h4><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.time|formatFromNow}}</span> <span class="gray">| {{notification.time|formatDate}}</span></h4></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/group/lookup.html','<ion-view class="view-group"><ion-nav-title><span translate>GROUP.LOOKUP.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ng-include src="::\'plugins/es/templates/group/lookup_form.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/group/lookup_form.html','<div class="lookupForm"><label class="item item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'GROUP.LOOKUP.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearchText()"><div class="helptip-anchor-center"><a id="helptip-group-search-text"></a></div></label><div class="padding-top padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="search.type==\'open\'" translate="">GROUP.LOOKUP.OPEN_RESULTS_LIST</h4><h4 ng-if="search.type==\'last\'" translate="">GROUP.LOOKUP.LAST_RESULTS_LIST</h4><h4 ng-if="search.type==\'managed\'" translate="">GROUP.LOOKUP.MANAGED_RESULTS_LIST</h4><h4 ng-if="search.type==\'text\'">{{\'COMMON.RESULTS_LIST\'|translate}}</h4><h5 class="dark" ng-if="!search.loading && search.total"><span translate="COMMON.RESULTS_COUNT" translate-values="{count: search.total}"></span> <small class="gray" ng-if=":rebind:search.took && expertMode">- {{:rebind:\'COMMON.EXECUTION_TIME\'|translate: {duration: search.took} }}</small></h5><h5 class="gray" ng-if="search.loading"><ion-spinner class="icon ion-spinner-small" icon="android"></ion-spinner><span translate="">COMMON.SEARCHING</span><br></h5></div></div><div class="list {{::motion.ionListClass}}" ng-if="!$scope.search.loading"><ng-include src="::\'plugins/es/templates/group/items_groups.html\'"></ng-include></div><ion-infinite-scroll ng-if="search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll></div>');
+$templateCache.put('plugins/es/templates/group/lookup_item.html','<i class="item-image avatar" style="background-image: url({{::item.avatar.src}})" ng-if="item.avatar"></i> <i class="item-image icon ion-android-people" ng-if="!item.avatar"></i> <i class="item-image icon-secondary ion-android-lock" ng-if="!item.avatar" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i><h2 ng-bind-html=":rebind:item.title"></h2><h4 class="gray pull-right"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: item }}</h4><h4 class="dark pull-left" ng-if=":rebind:item.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:item.membersCount}}</span></h4>');
+$templateCache.put('plugins/es/templates/group/modal_record_type.html','<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>GROUP.TYPE.TITLE</h1></ion-header-bar><ion-content class="lookupForm padding"><h3 translate>GROUP.TYPE.SELECT_TYPE</h3><div class="list"><div class="item item-complex card stable-bg item-icon-left ink" ng-click="closeModal(\'open\')"><div class="item-content item-text-wrap"><i class="item-image icon ion-android-people dark"></i><h2 translate>GROUP.TYPE.OPEN_GROUP</h2><h4 class="gray" translate>GROUP.TYPE.OPEN_GROUP_HELP</h4></div></div><div class="item item-complex card stable-bg item-icon-left ink" ng-click="closeModal(\'managed\')"><div class="item-content item-text-wrap"><i class="item-image icon ion-android-people dark"></i> <i class="icon-secondary ion-android-lock dark" style="left: 10px; top: -8px"></i><h2 translate>GROUP.TYPE.MANAGED_GROUP</h2><h4 class="gray" translate>GROUP.TYPE.MANAGED_GROUP_HELP</h4></div></div></div></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/group/view_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>GROUP.VIEW.MENU_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/group/view_record.html','<ion-view left-buttons="leftButtons"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-bar button-icon button-clear visible-xs visible-sm" ng-click="edit()" ng-if="canEdit"><i class="icon ion-android-create"></i></button> <button class="button button-bar button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><div class="positive-900-bg hero"><div class="content" ng-if="!loading"><i class="avatar cion-registry-{{formData.type}}" ng-if="!formData.avatar"></i> <i class="avatar" style="background-image: url({{::formData.avatar.src}})" ng-if="formData.avatar"></i><h3 ng-bind-html="formData.title"></h3><h4>&nbsp;</h4></div><h4 class="content light" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><div class="row no-padding-xs no-padding-sm"><div class="col list item-text-wrap no-padding-xs no-padding-sm" ng-class="::motion.ionListClass"><div class="item"><h2 class="gray"><a ng-if="formData.city" ui-sref="app.groups({location:formData.city})"><i class="icon ion-location"></i> <span ng-bind-html="formData.city"></span> </a><span ng-if="formData.city && formData.type">&nbsp;|&nbsp;</span> <a ng-if="formData.type" ui-sref="app.groups({type:formData.type})"><i class="icon ion-flag"></i> {{\'GROUP.TYPE.ENUM.\'+formData.type|upper|translate}}</a></h2><h4><i class="icon ion-clock" ng-if="formData.time"></i> <span translate="">COMMON.SUBMIT_BY</span> <a ng-class="{\'positive\': issuer.uid, \'gray\': !issuer.uid}" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"><ng-if ng-if="issuer.uid"><i class="icon ion-person"></i> {{::issuer.name||issuer.uid}}</ng-if><span ng-if="!issuer.uid"><i class="icon ion-key"></i> {{issuer.pubkey|formatPubkey}} </span></a><span>{{formData.time|formatFromNow}}<h4 class="gray hidden-xs">| {{formData.time | formatDate}}</h4></span></h4></div><a id="group-share-anchor-{{id}}"></a><ion-item><h2><span trust-as-html="formData.description"></span></h2></ion-item><ion-item><h4 ng-if="formData.address"><span class="gray" translate="">REGISTRY.VIEW.LOCATION</span> <a class="positive" target="_blank" href="https://www.google.fr/maps/?q={{formData.address}},%20{{formData.city}}"><span ng-bind-html="formData.address"></span> <span ng-if="formData.city">- </span><span ng-bind-html="formData.city"></span></a></h4></ion-item><ng-if ng-if="formData.socials && formData.socials.length>0"><ion-item class="item-icon-left" type="no-padding item-text-wrap" ng-repeat="social in formData.socials track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}}</p><h2><a href="{{social.url}}" ng-if="social.type != \'email\'" target="_blank">{{social.url}}</a> <a href="mailto:{{social.url}}" ng-if="social.type == \'email\'">{{social.url}}</a></h2></ion-item></ng-if><div class="lazy-load"><ng-include src="::\'plugins/es/templates/common/view_pictures.html\'"></ng-include><span class="item item-divider" ng-if="formData.pubkey"><span translate="">REGISTRY.TECHNICAL_DIVIDER</span></span><div class="item item-icon-left item-text-wrap ink" ng-if="formData.pubkey" copy-on-click="{{::formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">REGISTRY.EDIT.RECORD_PUBKEY</span><h4 class="dark">{{::formData.pubkey}}</h4></div><ng-include src="::\'plugins/es/templates/common/view_comments.html\'"></ng-include></div></div></div></ion-content><button class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm" ng-if="formData.pubkey && !isUserPubkey(formData.pubkey)" ng-click="showTransferModal({pubkey: formData.pubkey, uid: formData.title})"></button></ion-view>');
+$templateCache.put('plugins/es/templates/invitation/list_invitation.html','<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="invitation in search.results" class="item-border-large item-text-wrap item-avatar"><i ng-if="::!invitation.avatar" class="item-image icon {{::invitation.avatarIcon}}"></i> <i ng-if="::invitation.avatar" class="item-image avatar" style="background-image: url({{::invitation.avatar.src}})"></i><h3 trust-as-html="invitation.message | translate:invitation"></h3><h3 class="dark text-italic" ng-if="invitation.comment"><i class="icon ion-quote"></i> <span ng-bind-html="invitation.comment"></span></h3><h4><i class="icon {{::invitation.icon}}"></i> <span class="dark" ng-if="::invitation.issuer" trust-as-html="\'INVITATION.SUGGESTED_BY\' | translate:invitation"></span> <span class="dark">{{::invitation.time|formatFromNow}}</span> <span class="gray">| {{::invitation.time|formatDate}}</span></h4><div class="block text-right"><button class="button button-positive button-small button-small-padding" ng-click="accept(invitation)" ng-if="::invitation.state" translate>{{::(invitation.okText||\'COMMON.BTN_SHOW\') |translate}}</button> <button class="button button-stable button-small button-small-padding" ng-click="delete($index)" translate>INVITATION.BTN_DELETE</button></div></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/invitation/modal_new_invitation.html','<ion-modal-view id="transfer" class="modal-invitation modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>INVITATION.NEW.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-header-bar><ion-content scroll="true"><ng-include src="::\'plugins/es/templates/invitation/new_invitation_form.html\'"></ng-include></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/invitation/new_invitation_form.html','<form name="invitationForm" novalidate="" ng-submit="doSend()"><div class="list" ng-init="setForm(invitationForm)"><a class="item item-icon-right gray ink" ng-class="{\'disable-pointer-events\': recipients.length, \'item-input-error\': form.$submitted && !recipients.length}" ng-click="showSelectRecipientModal($event)"><span class="gray" translate="">INVITATION.NEW.RECIPIENTS</span> <span class="item-note"><span class="hidden-xs" ng-if="!recipients.length" translate="">INVITATION.NEW.RECIPIENTS_HELP</span><ng-repeat ng-repeat="identity in recipients track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><ng-bind-html ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></ng-bind-html><b class="enable-pointer-events ion-close" ng-click="removeRecipient($index, $event)">&nbsp;&nbsp;</b></ng-repeat></span><i class="gray icon enable-pointer-events ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !recipients.length"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><a class="item item-icon-right gray ink" ng-class="{\'disable-pointer-events\': suggestions.length, \'item-input-error\': form.$submitted && !suggestions.length}" ng-click="showSelectSuggestionModal($event)"><span class="gray enable-pointer-events" translate="">INVITATION.NEW.SUGGESTION_IDENTITIES</span> <span class="item-note"><span class="hidden-xs" ng-if="!suggestions.length" translate="">INVITATION.NEW.SUGGESTION_IDENTITIES_HELP</span><ng-repeat ng-repeat="identity in suggestions track by identity.id" class="button button-small button-text button-stable button-icon-event ink" ng-class="{\'button-text-positive\': identity.selected}"><ng-bind-html ng-bind-html="identity.name||identity.uid||(identity.pubkey|formatPubkey)"></ng-bind-html><b class="enable-pointer-events ion-close" ng-click="removeSuggestion($index, $event)">&nbsp;&nbsp;</b></ng-repeat></span><i class="gray icon enable-pointer-events ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !suggestions.length"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-content item-toggle dark visible-xs visible-sm"><span class="input-label gray">{{\'TRANSFER.BTN_ADD_COMMENT\' | translate}}</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useComment"><div class="track"><div class="handle"></div></div></label></div><label class="item item-input item-floating-label visible-xs visible-sm" ng-if="formData.useComment" ng-class="{\'item-input-error\': form.$submitted && form.comment.$invalid}"><span class="input-label">{{\'TRANSFER.COMMENT\' | translate}}</span><textarea placeholder="{{\'TRANSFER.COMMENT_HELP\' | translate}}" name="comment" ng-model="formData.comment" ng-maxlength="255">\n        </textarea></label><div class="form-errors" ng-show="form.$submitted && form.comment.$error" ng-messages="form.comment.$error"><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG"></span></div><div class="form-error" ng-message="pattern"><span translate="ERROR.FIELD_ACCENT"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" tabindex="-1" ng-click="cancel()" type="button" translate="">COMMON.BTN_CANCEL</button> <button class="button button-positive ink" tabindex="8" type="submit" translate="">TRANSFER.BTN_SEND</button></div></form>');
+$templateCache.put('plugins/es/templates/invitation/popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-class="{\'gray\': !search.results.length, \'assertive\': search.results.length}" ng-click="deleteAll()"><i class="icon ion-trash-a"></i> <span translate>INVITATION.BTN_DELETE_ALL</span></a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/invitation/popover_invitation.html','');
+$templateCache.put('plugins/es/templates/invitation/view_invitations.html','<ion-view left-buttons="leftButtons" class="view-invitation"><ion-nav-title>{{\'INVITATION.LIST.TITLE\' | translate}}</ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding gray" ng-if="!search.loading && !search.results.length" translate="">INVITATION.NO_RESULT</div><ng-include src="::\'plugins/es/templates/invitation/list_invitation.html\'"></ng-include></div></div></ion-content><button id="fab-new-invitation" class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm spin" ng-click="showNewInvitationModal()"></button></ion-view>');
+$templateCache.put('plugins/es/templates/join/modal_join_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'select-account-type\'"><div class="item item-complex card stable-bg item-icon-left item-icon-right ink" ng-class="{ activated: accountTypeMember != null && !accountTypeMember }" ng-click="selectAccountType(\'organization\')"><div class="item-content item-text-wrap"><i class="item-image icon dark cion-registry-association"></i><h2 translate>ACCOUNT.NEW.ORGANIZATION_ACCOUNT</h2><h4 class="gray" translate>ACCOUNT.NEW.ORGANIZATION_ACCOUNT_HELP</h4><i class="icon dark ion-ios-arrow-right"></i></div></div></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'last-slide\'"><ion-slide-page><ion-content class="has-header" scroll="false"><p>TOTO</p></ion-content></ion-slide-page></ng-if>');
+$templateCache.put('plugins/es/templates/network/item_content_peer.html','<i class="icon ion-android-desktop" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" ng-if=":rebind:!peer.avatar"></i> <b class="icon-secondary ion-person" ng-if=":rebind:!peer.avatar" ng-class=":rebind:{\'balanced\': peer.online && peer.hasMainConsensusBlock, \'energized\': peer.online && peer.hasConsensusBlock, \'gray\': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, \'stable\': !peer.online}" style="left: 26px; top: -3px"></b> <i class="avatar" ng-if=":rebind:peer.avatar" style="background-image: url(\'{{:rebind:peer.avatar.src}}\')"></i> <b class="icon-secondary assertive ion-close-circled" ng-if=":rebind:!peer.online" style="left: 37px; top: -10px"></b><div class="row no-padding"><div class="col no-padding"><h3 class="dark">{{:rebind:peer.dns || peer.server}}</h3><h4><span class="gray" ng-if=":rebind:!peer.name"><i class="ion-key"></i> {{:rebind:peer.pubkey|formatPubkey}} </span><span class="positive" ng-if=":rebind:peer.name"><i class="ion-person"></i> {{:rebind:peer.name}} </span><span class="gray">{{:rebind:peer.dns && (\' | \' + peer.server) + (peer.ep.path||\'\') }}</span></h4></div><div class="col col-20 no-padding text-center" ng-if="::!expertMode && search.type != \'offline\'"><div style="min-width: 50px; padding-top: 5px" ng-if=":rebind:peer.docCount.emailSubscription!==undefined"><span ng-if=":rebind:peer.hasEndpoint(\'ES_SUBSCRIPTION_API\')" title="{{\'ES_PEER.EMAIL_SUBSCRIPTION_COUNT\'|translate: peer.docCount }}"><i class="ion-email"></i> {{:rebind:peer.docCount.emailSubscription || \'?\'}}</span></div></div><div class="col col-20 no-padding text-center" ng-if="::expertMode && search.type != \'offline\'"></div><div class="col col-20 no-padding text-center" id="{{$index === 0 ? helptipPrefix + \'-peer-0-block\' : \'\'}}"><span class="badge badge-stable">{{:rebind:peer.docCount.record !== undefined ? (peer.docCount.record|formatInteger) : \'?\'}} <span ng-if=":rebind:!expertMode && peer.docCount.record!==undefined">{{::\'ES_PEER.DOCUMENTS\'|translate|lowercase }} </span></span><span class="badge badge-secondary" ng-class=":rebind:{\'balanced\': peer.hasMainConsensusBlock, \'energized\': peer.hasConsensusBlock, \'ng-hide\': !peer.currentNumber }" ng-if="::expertMode">{{:rebind:\'BLOCKCHAIN.VIEW.TITLE\'|translate: {number:peer.currentNumber} }}</span></div></div>');
+$templateCache.put('plugins/es/templates/network/items_peers.html','<div ng-class="::motion.ionListClass" class="no-padding"><div class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-if="::isHttps && expertMode"><small><i class="icon ion-alert-circled"></i> {{::\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></div><div ng-repeat="peer in :rebind:search.results track by peer.id" class="item item-peer item-icon-left ink" ng-class="::ionItemClass" id="{{helptipPrefix}}-peer-{{$index}}" ng-click="selectPeer(peer)" ng-include="::\'plugins/es/templates/network/item_content_peer.html\'"></div></div>');
+$templateCache.put('plugins/es/templates/network/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>PEER.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'member\')"><i class="icon ion-person"></i> {{\'PEER.MEMBERS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'member\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'mirror\')"><i class="icon ion-radio-waves"></i> {{\'PEER.MIRRORS\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'mirror\'"></i> </a><a class="item item-icon-left item-icon-right ink" ng-click="toggleSearchType(\'offline\')"><i class="icon ion-eye-disabled"></i> {{\'PEER.OFFLINE\' | translate}} <i class="icon ion-ios-checkmark-empty" ng-show="search.type==\'offline\'"></i></a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/network/modal_network.html','<ion-modal-view id="nodes" class="modal-full-height" cache-view="false"><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>PEER.PEER_LIST</h1><div class="buttons buttons-right header-item"><span class="secondary"><button class="button button-clear icon ion-loop button-clear" ng-click="refresh()"></button> <button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></span></div></ion-header-bar><ion-content><div class="list"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4 ng-if="!enableFilter || !search.type">{{\'PEER.ALL_PEERS\' | translate}} <span ng-if="!search.loading">({{search.results.length}})</span></h4></div><div class="pull-right"><ion-spinner class="icon" icon="android" ng-if="search.loading"></ion-spinner>&nbsp;</div></div><ng-include src="::\'plugins/es/templates/network/items_peers.html\'"></ng-include></div></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/network/popover_endpoints.html','<ion-popover-view class="popover-endpoints popover-light" style="height: {{(titleKey?30:0)+((!items || items.length &lt;= 1) ? 55 : 3+items.length*52)}}px"><ion-header-bar class="bar bar-header stable-bg" ng-if="titleKey"><div class="title">{{titleKey | translate:titleValues }}</div></ion-header-bar><ion-content scroll="false"><div class="list" ng-class="{\'has-header\': titleKey}"><div class="item item-text-wrap" ng-repeat="item in items"><div class="item-label" ng-if="item.label">{{item.label | translate}}</div><div id="endpoint_{{$index}}" class="badge item-note dark">{{item.value}}</div></div></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/network/popover_network.html','');
+$templateCache.put('plugins/es/templates/network/popover_peer_info.html','');
+$templateCache.put('plugins/es/templates/network/view_es_network.html','<ion-view><ion-nav-title><span translate="">MENU.NETWORK</span>&nbsp; <span translate="">ES_SETTINGS.PLUGIN_NAME</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="refresh()"></button></ion-nav-buttons><ion-content scroll="true" ng-init="enableFilter=true; ionItemClass=\'item-border-large\';"><div class="row responsive-sm responsive-md responsive-lg"><div class="col list col-border-right"><div class="padding padding-xs" style="display: block; height: 60px"><div class="pull-left"><h4><span ng-if="enableFilter && !search.online" translate="">PEER.OFFLINE_PEERS</span> <span ng-if="!enableFilter || search.online" translate="">PEER.ALL_PEERS</span> <span ng-if="search.results.length">({{search.results.length}})</span><ion-spinner ng-if="search.loading" class="icon ion-spinner-small" icon="android"></ion-spinner></h4></div><div class="pull-right"><div class="pull-right" ng-if="enableFilter"><cs-extension-point name="filter-buttons"></cs-extension-point></div></div></div><div id="helptip-network-peers" style="display: block"></div><ng-include src="::\'plugins/es/templates/network/items_peers.html\'"></ng-include></div><div class="col col-33" ng-controller="ESLastDocumentsCtrl"><div class="padding padding-xs" style="display: block"><h4 translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS_DOTS</h4></div><ng-include src="::\'plugins/es/templates/document/list_documents.html\'"></ng-include></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/network/view_es_peer.html','<ion-view><ion-nav-title><span translate="">PEER.VIEW.TITLE</span>&nbsp; <span translate="">ES_SETTINGS.PLUGIN_NAME</span></ion-nav-title><ion-content><div class="row no-padding"><div class="col list"><ion-item><h1><span translate="">PEER.VIEW.TITLE</span> <span class="gray">{{node.host}}</span></h1><h2 class="gray"><i class="gray icon ion-android-globe"></i> {{node.ep.dns || node.server}} <span class="gray" ng-if="!loading && node.useSsl"><i class="gray ion-locked"></i> <small>SSL</small> </span><span class="gray" ng-if="!loading && node.useTor"><i class="gray ion-bma-tor-api"></i></span></h2><h3><span class="dark"><i class="icon ion-android-desktop"></i> {{\'PEER.VIEW.OWNER\'|translate}} </span><a class="positive" ng-if="node.name" ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.name})"><i class="ion-person"></i> {{node.name}} </a><span ng-if="!loading && !node.name"><a class="gray" ui-sref="app.wot_identity({pubkey: node.pubkey})"><i class="ion-key"></i> {{node.pubkey|formatPubkey}}</a></span></h3><h3><a ng-click="openRawPeering($event)"><i class="icon ion-share"></i> {{\'PEER.VIEW.SHOW_RAW_PEERING\'|translate}} </a><span class="gray" ng-if="!isReachable">| </span><a ng-if="!isReachable" ng-click="openRawCurrentBlock($event)"><i class="icon ion-share"></i> <span translate="">PEER.VIEW.SHOW_RAW_CURRENT_BLOCK</span></a></h3></ion-item><div class="item item-divider" translate="">PEER.VIEW.GENERAL_DIVIDER</div><ion-item class="item-icon-left item-text-wrap ink" copy-on-click="{{node.pubkey}}"><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><h4 class="dark text-left">{{node.pubkey}}</h4></ion-item><ion-item class="item item-icon-left item-text-wrap ink" ng-if="isReachable"><i class="icon ion-cube"></i> <span translate="">BLOCKCHAIN.VIEW.TITLE_CURRENT</span><div class="badge badge-calm" ng-if="!loading">{{current.number|formatInteger}}</div></ion-item><ion-item class="item item-icon-left item-text-wrap" ng-if="isReachable"><i class="icon ion-document"></i> <span translate="">ES_PEER.DOCUMENT_COUNT</span><div class="badge badge-stable" ng-if="!loading">{{node.docCount|formatInteger}}</div></ion-item><a class="item item-icon-left item-icon-right item-text-wrap ink" ng-if="isReachable" ui-sref="app.document_search(options.document)"><i class="icon ion-document" style="font-size: 25px"></i> <i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px"></i> <span translate="">DOCUMENT.LOOKUP.LAST_DOCUMENTS</span> <i class="gray icon ion-ios-arrow-right"></i></a><cs-extension-point name="general"></cs-extension-point><div class="item item-divider" ng-hide="loading || !isReachable" translate="">PEER.VIEW.KNOWN_PEERS</div><ion-item class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-show="!loading && !isReachable"><small><i class="icon ion-alert-circled"></i> {{\'NETWORK.INFO.ONLY_SSL_PEERS\'|translate}}</small></ion-item><div class="item center" ng-if="loading"><ion-spinner class="icon" icon="android"></ion-spinner></div><div class="list no-padding {{::motion.ionListClass}}" ng-if="isReachable"><div ng-repeat="peer in :rebind:peers track by peer.id" class="item item-peer item-icon-left ink" ng-class="::ionItemClass" ng-click="selectPeer(peer)" ng-include="::\'plugins/es/templates/network/item_content_peer.html\'"></div></div></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/network/view_network_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'network-buttons\'"></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'blockchain-buttons\'"><a class="button button-text button-small ink" ui-sref="app.blockchain_search"><i class="icon ion-android-search"></i> <span>{{\'COMMON.BTN_SEARCH\'|translate}}</span></a></ng-if>');
+$templateCache.put('plugins/es/templates/message/compose.html','<ion-view left-buttons="leftButtons" id="composeMessage"><ion-nav-title><span class="visible-xs visible-sm" nf-if="!isReply" translate="">MESSAGE.COMPOSE.TITLE</span> <span class="visible-xs visible-sm" nf-if="isReply" translate="">MESSAGE.COMPOSE.TITLE_REPLY</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-nav-buttons><ion-content scroll="true"><div class="row"><div class="col"><ng-include src="::\'plugins/es/templates/message/compose_form.html\'"></ng-include></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/message/compose_form.html','<form name="messageForm" novalidate="" ng-submit="doSend()"><div class="list no-margin" ng-init="setForm(messageForm)"><a class="item item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.destPub}" ng-click="showWotLookupModal()"><span class="gray" translate>MESSAGE.COMPOSE.TO</span> <span class="badge badge-royal" ng-if="destUid"><i class="ion-person"></i> {{destName||destUid}}</span>&nbsp; <span class="badge badge-stable" ng-if="!destUid && destPub">{{destName}} <span ng-if="!destName"><i class="ion-key"></i>{{destPub | formatPubkey}}</span> </span>&nbsp; <i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !formData.destPub"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ion-item class="item-text-wrap ink" ng-class="{\'item-icon-right\': enableSelectWallet}" ng-click="showSelectWalletModal()"><span class="gray" translate>TRANSFER.FROM</span> <span class="badge badge-balanced animate-fade-in animate-show-hide" ng-show="!loading"><ion-spinner icon="android" ng-if="!walletData.pubkey"></ion-spinner><span ng-if="walletData.pubkey && !walletData.isMember"><i class="ion-key"></i> {{walletData.pubkey| formatPubkey}}&nbsp;&nbsp; </span><span ng-if="walletData.isMember"><i class="ion-person"></i> {{walletData.name||walletData.uid}} </span></span><i class="gray icon ion-ios-arrow-right" ng-if="enableSelectWallet"></i></ion-item><div class="item item-input" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><input type="text" autocomplete="off" placeholder="{{\'MESSAGE.COMPOSE.OBJECT_HELP\' | translate}}" name="title" ng-model="formData.title" ng-maxlength="256" required> <span class="badge item-note" ng-if="isReply">({{\'MESSAGE.COMPOSE.OBJECT\' | translate}})</span></div><div class="form-errors" ng-show="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="maxlength"><span translate="MESSAGE.ERROR.MESSAGE_CONTENT_TOO_LONG" translate-values="{maxLength: 256}"></span></div><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.content.$invalid}"><span class="input-label">{{\'MESSAGE.COMPOSE.MESSAGE\' | translate}}</span><textarea placeholder="{{\'MESSAGE.COMPOSE.MESSAGE_HELP\' | translate}}" autocomplete="off" name="content" ng-model="formData.content" rows="8" ng-maxlength="5000">\n        </textarea></div><div class="form-errors" ng-show="form.$submitted && form.content.$error" ng-messages="form.content.$error"><div class="form-error" ng-message="maxlength"><span translate="MESSAGE.ERROR.MESSAGE_CONTENT_TOO_LONG" translate-values="{maxLength: 5000}"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="cancel()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" type="submit" ng-disabled="sending" translate>TRANSFER.BTN_SEND</button></div><div class="list no-margin"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate>MESSAGE.COMPOSE.ENCRYPTED_HELP</h4></div></div></form>');
+$templateCache.put('plugins/es/templates/message/list.html','<div class="padding gray" ng-if="!search.loading && !search.results.length"><span ng-if="search.type==\'last\'">{{ (\'MESSAGE.NO_MESSAGE_\' + type) | upper | translate }}</span> <span ng-if="search.type==\'text\'" translate="">COMMON.SEARCH_NO_RESULT</span></div><ion-list class="{{::motion.ionListClass}}" can-swipe="$root.device.enable"><ion-item class="item item-border-large item-avatar item-icon-right ink" ng-repeat="msg in :rebind:search.results track by msg.id" ng-click="select(msg, $event)"><i ng-if="::!msg.avatar" class="item-image icon" ng-class="{\'ion-person\': msg.uid, \'ion-email\': !msg.uid}"></i> <i ng-if="::msg.avatar" class="item-image avatar" style="background-image: url({{::msg.avatar.src}})"></i><h4 class="pull-right visible-xs visible-sm dark"><i class="ion-clock"></i> {{::msg.time|formatFromNow}}</h4><h3><a class="positive" ng-if="::msg.name||msg.uid" ui-sref="app.wot_identity({pubkey:msg.issuer, uid:msg.name||msg.uid})"><i class="ion-person"></i> {{::msg.name||msg.uid}} </a><a class="gray" ng-if="::!msg.name && !msg.uid" ui-sref="app.wot_identity({pubkey:msg.issuer})"><i class="ion-key"></i> {{::msg.issuer|formatPubkey}}</a></h3><h2 ng-class="{\'unread\': !msg.read}" ng-bind-html="::msg.title"></h2><p ng-bind-html="::msg.summary||msg.content"></p><i class="icon ion-ios-arrow-right"></i><ion-option-button class="button-stable" ng-click="showReplyModal($index)" translate="">MESSAGE.BTN_REPLY</ion-option-button><ion-option-button class="button-assertive" ng-click="delete($index)" translate="">COMMON.BTN_DELETE</ion-option-button></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" icon="ion-loading-c" on-infinite="showMore()" distance="10%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/message/lookup.html','<ion-view left-buttons="leftButtons" class="view-messages"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'MESSAGE.LIST.INBOX\'|translate}}" icon="ion-archive" ui-sref="app.user_message.tab_inbox"><ion-nav-view name="tab_inbox"></ion-nav-view></ion-tab><ion-tab title="{{\'MESSAGE.LIST.OUTBOX\'|translate}}" icon="ion-paper-airplane" ui-sref="app.user_message.tab_outbox"><ion-nav-view name="tab_outbox"></ion-nav-view></ion-tab></ion-tabs></ion-view>');
+$templateCache.put('plugins/es/templates/message/lookup_by_id.html','<ion-view left-buttons="leftButtons" class="view-messages"><ion-tabs class="tabs-positive tabs-icon-top"><ion-tab title="{{\'MESSAGE.LIST.INBOX\'|translate}}" icon="ion-archive" ui-sref="app.user_messages_by_id.tab_inbox"><ion-nav-view name="tab_inbox"></ion-nav-view></ion-tab><ion-tab title="{{\'MESSAGE.LIST.OUTBOX\'|translate}}" icon="ion-paper-airplane" ui-sref="app.user_messages_by_id.tab_outbox"><ion-nav-view name="tab_outbox"></ion-nav-view></ion-tab></ion-tabs></ion-view>');
+$templateCache.put('plugins/es/templates/message/lookup_lg.html','<ion-view left-buttons="leftButtons" class="view-messages"><ion-nav-title><span translate="">MESSAGE.LIST.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-click="showActionsPopover($event)"><i class="icon ion-android-more-vertical"></i></button></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh(true, $event)"></ion-refresher><div class="item no-padding"><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'MESSAGE.LIST.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearch()" select-on-click=""><div class="helptip-anchor-center"><a id="helptip-message-search-text"></a></div></div></div><div class="padding-top hidden-xs" style="display: block; height: 60px"><div class="pull-left" ng-if="!search.loading"><ng-if ng-if="search.type==\'last\'"><h4>{{ (\'MESSAGE.LIST.LAST_\' + type) | upper | translate}}</h4></ng-if><ng-if ng-if="search.type==\'text\'"><h4 translate="">COMMON.RESULTS_LIST</h4></ng-if></div></div><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><ng-include src="::\'plugins/es/templates/message/list.html\'"></ng-include></ion-content><button id="fab-add-message-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-compose visible-xs visible-sm spin" ng-click="showNewMessageModal()"></button></ion-view>');
+$templateCache.put('plugins/es/templates/message/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>MESSAGE.LIST.POPOVER_ACTIONS.TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-class="{\'gray\': (type != \'inbox\' && !messages.length)}" ng-click="markAllAsRead()"><i class="icon ion-android-checkmark-circle"></i> {{\'COMMON.NOTIFICATIONS.MARK_ALL_AS_READ\' | translate}} </a><a class="item item-icon-left assertive ink" ng-class="{\'gray\': !messages.length}" ng-click="deleteAll()"><i class="icon ion-trash-a"></i> {{\'MESSAGE.LIST.POPOVER_ACTIONS.DELETE_ALL\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/message/modal_compose.html','<ion-modal-view id="composeMessage" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" ng-if="!isReply" translate>MESSAGE.COMPOSE.TITLE</h1><h1 class="title" ng-if="isReply" translate>MESSAGE.COMPOSE.TITLE_REPLY</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSend()"></button></ion-header-bar><ion-content scroll="true"><ng-include src="::\'plugins/es/templates/message/compose_form.html\'"></ng-include></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/message/popover_message.html','');
+$templateCache.put('plugins/es/templates/message/view_message.html','<ion-view left-buttons="leftButtons" class="view-message"><ion-nav-title><span translate="">MESSAGE.VIEW.TITLE</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><div class="row no-padding"><div class="col no-padding"><div class="center padding" ng-if="loading"><ion-spinner icon="android"></ion-spinner></div><div class="list animate-fade-slide-in item-text-wrap"><div class="item item-avatar" ng-class="{\'item-avatar\': formData.avatar}"><i ng-if="!formData.avatar" class="item-image" ng-class="{\'ion-person\': formData.uid, \'ion-email\': !formData.uid}"></i> <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}})"></i><h4>{{type == \'inbox\' ? \'MESSAGE.VIEW.SENDER\': \'MESSAGE.VIEW.RECIPIENT\'|translate}} <a class="positive" ui-sref="app.wot_identity({pubkey: (type == \'inbox\') ? formData.issuer : formData.recipient, uid: formData.name||formData.uid})"><span ng-if="formData.uid"><i class="ion-person"></i> {{formData.name||formData.uid}} </span><span ng-if="!formData.uid" class="gray"><i class="ion-key gray"></i> {{formData.name||(formData.issuer|formatPubkey)}}</span></a></h4><h5 class="gray visible-xs visible-sm"><i class="ion-clock"></i> {{formData.time | formatDate}}</h5></div><ion-item class="visible-xs visible-sm"><h1 class="title" ng-bind-html="formData.title"></h1></ion-item><ion-item><p ng-bind-html="formData.html"></p><div class="padding gray" ng-if="!formData.content" translate="">MESSAGE.VIEW.NO_CONTENT</div></ion-item></div></div></div></ion-content><button id="fab-view-message-reply" class="button button-fab button-fab-bottom-right button-calm icon ion-reply visible-xs visible-sm spin" ng-click="showReplyModal()"></button></ion-view>');
+$templateCache.put('plugins/es/templates/message/view_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'MESSAGE.VIEW.DELETE\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/registry/edit_record.html','<ion-view left-buttons="leftButtons" class="view-page"><ion-nav-title><span class="visible-xs" ng-if="id" ng-bind-html="formData.title"></span> <span class="visible-xs" ng-if="!loading && !id" translate="">REGISTRY.EDIT.TITLE_NEW</span></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear visible-xs visible-sm" ng-class="{\'ion-android-send\':!id, \'ion-android-done\': id}" ng-click="save()"></button></ion-nav-buttons><ion-content scroll="true"><div class="hero"><div class="content"><i class="avatar" ng-class="avatarClass" ng-style="avatarStyle"><button class="button button-positive button-large button-clear flat icon ion-camera visible-xs visible-sm" style="display: inline-block" ng-click="showAvatarModal()"></button> <button ng-if="avatar.src" class="button button-positive button-large button-clear flat visible-xs visible-sm" style="display: inline-block; left: 85px; bottom:15px" ng-click="rotateAvatar()"><i class="icon-secondary ion-image" style="left: 24px; top: 3px; font-size: 24px"></i> <i class="icon-secondary ion-forward" style="left: 26px; top: -13px"></i></button></i><h3 class="dark"><span ng-if="!loading && formData.title">{{formData.title}}</span> <span ng-if="!loading && !id && !formData.title" translate="">REGISTRY.EDIT.TITLE_NEW</span></h3><h4 class="dark"><ion-spinner ng-if="loading" icon="android"></ion-spinner></h4></div></div><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><form name="recordForm" novalidate="" ng-submit="save()"><div class="list {{::motion.ionListClass}}" ng-init="setForm(recordForm)"><div class="item" ng-if="id"><h4 class="gray"><i class="icon ion-calendar"></i> {{\'COMMON.LAST_MODIFICATION_DATE\'|translate}}&nbsp;{{formData.time | formatDate}}</h4><div class="badge badge-balanced badge-editable" ng-click="showRecordTypeModal()">{{\'REGISTRY.TYPE.ENUM.\'+formData.type|upper|translate}}</div></div><ng-include src="::\'plugins/es/templates/common/edit_pictures.html\'"></ng-include><div class="item item-divider" translate="">REGISTRY.GENERAL_DIVIDER</div><div class="item item-input item-floating-label" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_TITLE</span> <input type="text" placeholder="{{\'REGISTRY.EDIT.RECORD_TITLE_HELP\'|translate}}" name="title" id="registry-record-title" ng-model="formData.title" ng-minlength="3" ng-required="true"></div><div class="form-errors" ng-if="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div></div><div class="item item-input item-floating-label"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_DESCRIPTION</span><textarea placeholder="{{\'REGISTRY.EDIT.RECORD_DESCRIPTION_HELP\'|translate}}" ng-model="formData.description" rows="8" cols="10">\n                </textarea></div><div class="item item-icon-right ink" ng-if="loading || formData.type===\'company\' || formData.type===\'shop\'" ng-class="{\'item-input-error\': form.$submitted && !formData.category.id, \'done in\': !loading}" ng-click="showCategoryModal()"><span translate="">REGISTRY.CATEGORY</span> <span class="badge badge-royal">{{formData.category.name | formatCategory}}</span>&nbsp; <i class="gray icon ion-ios-arrow-right"></i></div><input type="hidden" name="category" ng-model="formData.category.id" required-if="formData.type==\'company\' || formData.type==\'shop\'"><div class="form-errors" ng-if="form.$submitted && form.category.$error" ng-messages="form.category.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><ng-include src="::\'plugins/es/templates/common/edit_position.html\'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include><div class="item item-divider" translate="">REGISTRY.TECHNICAL_DIVIDER</div><div class="item item-input item-floating-label"><span class="input-label" translate="">REGISTRY.EDIT.RECORD_PUBKEY</span> <input type="text" placeholder="{{\'REGISTRY.EDIT.RECORD_PUBKEY_HELP\'|translate}}" ng-model="formData.pubkey"></div></div></form></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/registry/lookup_form.html','<form ng-submit="doSearch()"><div class="item no-padding"><div class="item-input"><i class="icon ion-search placeholder-icon"></i> <input type="text" class="visible-xs visible-sm" placeholder="{{\'REGISTRY.SEARCH.SEARCH_HELP\'|translate}}" ng-model="search.text" ng-model-options="{ debounce: 650 }" ng-change="doSearch()" on-return="doSearchText()" select-on-click=""></div></div><ng-include src="::\'plugins/es/templates/common/item_location_search.html\'" ng-if="entered && options.location.show && (!search.geoPoint || smallscreen)" ng-controller="ESSearchPositionItemCtrl"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_form_options.html\'"></ng-include></form><div class="padding-top padding-xs padding-sm" style="display: block; height: 60px"><div class="pull-left ng-hide" ng-show="!search.loading && search.results"><ng-if ng-if="search.lastRecords"><h4 translate="">REGISTRY.SEARCH.LAST_RECORDS</h4><small class="gray no-padding" ng-if="search.total"><span ng-if="search.geoPoint && search.total">{{\'REGISTRY.SEARCH.LAST_RECORD_COUNT_LOCATION\'|translate:{count: search.total, location: search.location} }}</span> <span ng-if="!search.geoPoint && search.total">{{\'REGISTRY.SEARCH.LAST_RECORD_COUNT\'|translate:{count: search.total} }}</span></small></ng-if><ng-if ng-if="!search.lastRecords"><h4 translate="">COMMON.RESULTS_LIST</h4><small class="gray no-padding" ng-if="search.total"><span ng-if="search.geoPoint && search.total">{{\'REGISTRY.SEARCH.RESULT_COUNT_LOCATION\'|translate:{count: search.total, location: search.location} }}</span> <span ng-if="!search.geoPoint && search.total">{{\'REGISTRY.SEARCH.RESULT_COUNT\'|translate:{count: search.total} }}</span></small></ng-if></div></div><div class="center" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding assertive" ng-if="!search.loading && search.results.length===0" translate="">COMMON.SEARCH_NO_RESULT</div>');
+$templateCache.put('plugins/es/templates/registry/lookup_form_options.html','<div class="item item-icon-left item-input item-select stable-bg" ng-if="search.advanced && options.location.show"><i class="icon ion-arrow-resize gray"></i> <span class="input-label item-icon-left-padding" translate="">LOCATION.DISTANCE</span><label><select ng-model="search.geoDistance" class="col-border-left" ng-options="i as (geoDistanceLabels[i].labelKey | translate:geoDistanceLabels[i].labelParams ) for i in geoDistances track by i"></select></label></div>');
+$templateCache.put('plugins/es/templates/registry/lookup_lg.html','<ion-view left-buttons="leftButtons"><ion-nav-title>{{\'REGISTRY.SEARCH.TITLE\' | translate}}</ion-nav-title><ion-content class="lookupForm padding no-padding-xs no-padding-sm"><ng-include src="::\'plugins/es/templates/wot/lookup_lg_extend.html\'" ng-init="enable= true; showNewPageButton=true;"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_form.html\'"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_list_lg.html\'"></ng-include></ion-content><button id="fab-add-registry-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg spin" ng-click="showNewPageModal()"></button></ion-view>');
+$templateCache.put('plugins/es/templates/registry/lookup_list.html','<ion-list class="{{::motion.ionListClass}}" ng-if="!search.loading && search.results"><div class="item item-avatar item-icon-right item-border-large ink" ng-repeat="item in search.results" ui-sref="app.view_page({id: item.id, title: item.urlTitle})"><i ng-if="::!item.avatar" class="item-image icon cion-page-{{::item.type}}"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html="::item.title"></h2><h4><span class="dark" ng-if="::item.city"><b class="ion-location"></b> <span ng-bind-html="::item.city"></span> </span><span class="gray" ng-if="::item.distance">({{::item.distance|formatDecimal}} {{::geoUnit}})</span></h4><h4 class="gray" ng-if="::item.time && search.lastRecords"><i class="ion-clock"></i> {{::item.time | formatFromNow}}</h4><h4 class="gray" ng-if="!search.lastRecords"><i class="cion-page-{{::item.type}}"></i> <span ng-if="item.category">{{::item.category.name}}</span> <span ng-if="!item.category">{{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</span></h4><i class="icon ion-ios-arrow-right"></i></div></ion-list>');
+$templateCache.put('plugins/es/templates/registry/lookup_list_lg.html','<div class="list {{::motion.ionListClass}}" ng-if="!search.loading && search.results && search.results.length > 0"><a ng-repeat="item in search.results" class="item item-record item-border-large ink padding-xs" ui-sref="app.view_page({id: item.id, title: item.urlTitle})"><div class="row row-record"><div class="col item-text-wrap item-avatar-left-padding" ng-class="::{\'item-avatar\': item.avatar || item.type}"><i class="item-image icon cion-page-{{::item.type}}" ng-if="::!item.avatar"></i> <i class="item-image avatar" style="background-image: url({{::item.avatar.src}})" ng-if="::item.avatar"></i><h2 ng-bind-html="::item.title"></h2><h4><span class="dark" ng-if="::item.city"><b class="ion-location"></b> <span ng-bind-html="::item.city"></span> </span><span class="gray" ng-if="::item.distance">({{::item.distance|formatDecimal}} {{::geoUnit}})</span></h4><h4><span class="gray" ng-if="::item.time && search.lastRecords"><b class="ion-clock"></b> {{::item.time | formatFromNow}} </span><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4><span ng-if="::item.picturesCount > 1" class="badge badge-balanced badge-picture-count">{{::item.picturesCount}}&nbsp;<i class="icon ion-camera"></i></span></div><div class="col hidden-xs"><h4 class="text-wrap"><span class="visible-sm"><b class="ion-flag"></b><ng-if ng-if="::item.category">{{::item.category.name|truncText:50}}</ng-if><ng-if ng-if="::!item.category">{{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</ng-if></span><span class="gray text-italic" ng-if="::item.description"><b class="ion-quote"></b> <span ng-bind-html="::item.description|truncText:500" ng-if="::item.description"></span></span></h4></div></div></a></div><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="10%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/registry/lookup_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="showNewPageModal();"><i class="icon ion-plus"></i> <span translate>REGISTRY.BTN_NEW</span></a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/registry/lookup_popover_filters.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_FILTER_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-click="doGetLastRecords()"><i class="icon ion-clock"></i> {{\'REGISTRY.SEARCH.BTN_LAST_RECORDS\' | translate}} </a><a class="item item-icon-left ink" ng-click="toggleAdvanced();"><i class="icon ion-android-checkbox-outline-blank" ng-show="!search.advanced"></i> <i class="icon ion-android-checkbox-outline" ng-show="search.advanced"></i> <span translate>REGISTRY.SEARCH.POPOVER_FILTERS.BTN_ADVANCED_SEARCH</span></a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/registry/modal_record_type.html','<ion-modal-view><ion-header-bar class="bar-positive"><button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>{{getParameters().title||\'REGISTRY.TYPE.TITLE\'|translate}}</h1></ion-header-bar><ion-content class="lookupForm"><div class="list padding"><h3 translate>REGISTRY.TYPE.SELECT_TYPE</h3><button class="button button-block button-stable icon-left cion-page-shop" ng-click="closeModal(\'shop\')" translate>REGISTRY.TYPE.ENUM.SHOP</button> <button class="button button-block button-stable icon-left cion-page-association" ng-click="closeModal(\'association\')" translate>REGISTRY.TYPE.ENUM.ASSOCIATION</button> <button class="button button-block button-stable icon-left cion-page-company" ng-click="closeModal(\'company\')" translate>REGISTRY.TYPE.ENUM.COMPANY</button> <button class="button button-block button-stable icon-left cion-page-institution" ng-click="closeModal(\'institution\')" translate>REGISTRY.TYPE.ENUM.INSTITUTION</button></div></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/registry/view_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>REGISTRY.VIEW.MENU_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left assertive ink visible-xs visible-sm" ng-if="canEdit" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'COMMON.BTN_DELETE\' | translate}}</a><ng-if ng-if="!canEdit && likeData.abuses"><button class="item item-icon-left ink" ng-disabled="!!likeData.abuses.wasHitCount" ng-class="{\'gray\': !!likeData.abuses.wasHitCount}" ng-click="hideActionsPopover() && reportAbuse($event)"><i class="icon ion-android-warning"></i> {{\'COMMON.BTN_REPORT_ABUSE_DOTS\' | translate}}</button></ng-if></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/registry/view_record.html','<ion-view left-buttons="leftButtons" class="view-page"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-bar button-icon button-clear visible-xs visible-sm" ng-click="edit()" ng-if="canEdit"><i class="icon ion-android-create"></i></button> <button class="button button-bar button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true" class="refresher-top-bg"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="load()"></ion-refresher><div class="hero"><div class="content" ng-if="!loading"><i class="avatar cion-page-{{formData.type}}" ng-if="!formData.avatar"></i> <i class="avatar" ng-style="{{avatarStyle}}" ng-if="formData.avatar"></i><h3><span class="dark" ng-bind-html="formData.title"></span></h3><h4 class="gray"><small ng-include="::\'plugins/es/templates/common/view_likes.html\'"></small></h4></div><h4 class="content dark" ng-if="loading"><ion-spinner icon="android"></ion-spinner></h4></div><div class="visible-xs visible-sm"><button class="button button-fab button-fab-top-right button-stable" ng-click="toggleLike($event)"><i class="icon ion-heart" ng-class="{\'gray\': !likeData.likes.wasHitCount, \'calm\': likeData.likes.wasHitCount}"></i></button></div><div class="row no-padding-xs no-padding-sm"><div class="col list animate-fade-slide-in item-text-wrap no-padding-xs no-padding-sm"><div class="item"><h2 class="gray"><a ng-if="formData.city" ui-sref="app.wot_lookup.tab_registry({location:formData.city})"><i class="icon ion-location"></i> <span ng-bind-html="formData.city"></span> </a><span ng-if="formData.city && formData.type">&nbsp;|&nbsp;</span> <a ng-if="formData.type" ui-sref="app.wot_lookup.tab_registry({type:formData.type})"><i class="cion-page-{{formData.type}}"></i> {{\'REGISTRY.TYPE.ENUM.\'+formData.type|upper|translate}}</a></h2><h4><i class="icon ion-clock" ng-if="formData.time"></i> <span translate="">COMMON.SUBMIT_BY</span> <a ng-class="{\'positive\': issuer.uid, \'gray\': !issuer.uid}" ui-sref="app.wot_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"><ng-if ng-if="issuer.uid"><i class="icon ion-person"></i> {{::issuer.name||issuer.uid}}</ng-if><span ng-if="!issuer.uid"><i class="icon ion-key"></i> {{issuer.pubkey|formatPubkey}} </span></a><span>{{formData.time|formatFromNow}}<h4 class="gray hidden-xs">| {{formData.time | formatDate}}</h4></span></h4></div><a id="registry-share-anchor-{{id}}"></a><div class="item"><h2 trust-as-html="formData.description"></h2></div><div class="item" ng-if="formData.category || formData.address"><h4 ng-if="formData.category"><span class="gray" translate="">REGISTRY.VIEW.CATEGORY</span> <a class="positive" ng-if="formData.category" ui-sref="app.wot_lookup.tab_registry({category:formData.category.id})"><span ng-bind-html="formData.category.name"></span></a></h4><h4 ng-if="formData.address"><span class="gray" translate="">REGISTRY.VIEW.LOCATION</span> <a class="positive" target="_system" href="https://www.openstreetmap.org/search?query={{formData.address}},%20{{formData.city}}"><span ng-bind-html="formData.address"></span> <span ng-if="formData.city">- </span><span ng-bind-html="formData.city"></span></a></h4></div><ng-if ng-if="formData.socials && formData.socials.length>0"><div class="item item-icon-left" type="no-padding item-text-wrap" ng-repeat="social in formData.socials track by social.url" id="social-{{social.url|formatSlug}}"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}}</p><h2><a ng-click="openLink($event, social.url, social.type)">{{social.url}}</a></h2></div></ng-if><div class="item item-icon-left item-text-wrap ink" ng-if="formData.pubkey" copy-on-click="{{::formData.pubkey}}"><i class="icon ion-key"></i> <span translate="">REGISTRY.EDIT.RECORD_PUBKEY</span><h4 class="dark">{{::formData.pubkey}}</h4></div><div class="lazy-load"><ng-include src="::\'plugins/es/templates/common/view_pictures.html\'"></ng-include><ng-include src="::\'plugins/es/templates/common/view_comments.html\'"></ng-include></div></div></div></ion-content><button class="button button-fab button-fab-bottom-right button-assertive icon ion-android-send visible-xs visible-sm" ng-if="formData.pubkey && !isUserPubkey(formData.pubkey)" ng-click="showTransferModal({pubkey: formData.pubkey, uid: formData.title})"></button></ion-view>');
+$templateCache.put('plugins/es/templates/registry/view_wallet_pages.html','<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'REGISTRY.MY_PAGES\' | translate}}</ion-nav-title><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doUpdate()"></ion-refresher><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!search.loading && !search.results.length" translate="">REGISTRY.NO_PAGE</div><ng-include src="::\'plugins/es/templates/registry/lookup_list.html\'"></ng-include></ion-content><button id="fab-wallet-add-registry-record" class="button button-fab button-fab-bottom-right button-assertive hidden-md hidden-lg spin" ng-click="showNewPageModal()"><i class="icon ion-plus"></i></button></ion-view>');
+$templateCache.put('plugins/es/templates/notification/list_notification.html','<ion-list class="{{::motion.ionListClass}}"><ion-item ng-repeat="notification in search.results track by notification.id" class="item-border-large item-text-wrap ink item-avatar" ng-class="{\'unread\': !notification.read}" ng-click="select($event, notification)"><i ng-if="!notification.avatar" class="item-image icon {{::notification.avatarIcon}}"></i> <i ng-if="notification.avatar" class="item-image avatar" style="background-image: url({{::notification.avatar.src}})"></i><h3 trust-as-html="notification.message | translate:(notification.messageParams||notification)"></h3><h4 ng-if="!notification.medianTime"><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.time|formatFromNow}}</span> <span class="gray">| {{notification.time|formatDate}}</span></h4><h4 ng-if="notification.medianTime"><i class="icon {{notification.icon}}"></i>&thinsp;<span class="dark">{{notification.medianTime|medianFromNow}}</span> <span class="gray">| {{notification.medianTime|medianDate}}</span></h4></ion-item></ion-list><ion-infinite-scroll ng-if="!search.loading && search.hasMore" spinner="android" on-infinite="showMore()" distance="1%"></ion-infinite-scroll>');
+$templateCache.put('plugins/es/templates/notification/popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-disabled="!search.results.length" ng-click="markAllAsRead()"><i class="icon ion-android-checkmark-circle"></i> {{\'COMMON.NOTIFICATIONS.MARK_ALL_AS_READ\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/notification/popover_notification.html','');
+$templateCache.put('plugins/es/templates/notification/view_notifications.html','<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'COMMON.NOTIFICATIONS.TITLE\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content scroll="true"><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh(true)"></ion-refresher><div class="row no-padding"><div class="col no-padding-xs no-padding-sm"><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="padding gray" ng-if="!search.loading && !search.results.length" translate="">COMMON.NOTIFICATIONS.NO_RESULT</div><ng-include src="::\'plugins/es/templates/notification/list_notification.html\'"></ng-include></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/settings/plugin_settings.html','<ion-view left-buttons="leftButtons" class="settings"><ion-nav-title translate="">ES_SETTINGS.PLUGIN_NAME</ion-nav-title><ion-content scroll="true"><div class="item item-toggle dark"><div class="input-label" translate="">ES_SETTINGS.ENABLE_TOGGLE</div><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.STORAGE_DIVIDER</span><div class="item item-toggle item-text-wrap dark"><div class="input-label" ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.ENABLE_REMOTE_STORAGE</div><h4 class="gray text-wrap" ng-bind-html="\'ES_SETTINGS.ENABLE_REMOTE_STORAGE_HELP\' | translate"></h4><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.useRemoteStorage" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></label></div><span class="item item-divider" translate="">SETTINGS.NETWORK_SETTINGS</span><ion-item class="ink item-icon-right item-text-wrap visible-xs visible-sm" ng-click="formData.enable && changeEsNode()" ng-disabled="!formData.enable"><div class="input-label" ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.PEER</div><ng-if ng-if="isFallbackNode"><h4 class="gray text-wrap assertive"><b class="ion-alert-circled"></b> <span ng-bind-html="\'SETTINGS.PEER_CHANGED_TEMPORARY\' | translate "></span></h4><div class="badge badge-assertive">{{server}}</div></ng-if><div class="badge" ng-class="{\'badge-balanced\': formData.enable, \'badge-stable\': !formData.enable}" ng-if="!isFallbackNode">{{server}}</div><i class="icon ion-ios-arrow-right"></i></ion-item><span class="item item-divider" translate="">ES_SETTINGS.NOTIFICATIONS.DIVIDER</span><span class="item gray item-text-wrap" translate="">ES_SETTINGS.NOTIFICATIONS.HELP_TEXT</span><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_TX_SENT</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.txSent" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_TX_RECEIVED</span><label class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.txReceived" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></label></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_CERT_SENT</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.certSent" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><label class="item item-toggle dark item-text-wrap"><span ng-class="{\'gray\': !formData.enable}" translate="">ES_SETTINGS.NOTIFICATIONS.ENABLE_CERT_RECEIVED</span><div class="toggle toggle-royal"><input type="checkbox" ng-model="formData.notifications.certReceived" ng-disabled="!formData.enable"><div class="track"><div class="handle"></div></div></div></label><cs-extension-point name="common"></cs-extension-point></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/settings/settings_extend.html','<div class="item item-text-wrap item-icon-right ink" ui-sref="app.es_settings"><div class="input-label ng-binding" translate>ES_SETTINGS.PLUGIN_NAME</div><h4 class="gray" translate>ES_SETTINGS.PLUGIN_NAME_HELP</h4><i class="icon ion-ios-arrow-right"></i></div>');
+$templateCache.put('plugins/es/templates/subscription/edit_subscriptions.html','<ion-view left-buttons="leftButtons" class="view-notification"><ion-nav-title>{{\'SUBSCRIPTION.EDIT.TITLE\' | translate}}</ion-nav-title><ion-nav-buttons side="secondary"></ion-nav-buttons><ion-content class="padding no-padding-xs no-padding-sm" scroll="true"><ion-refresher pulling-text="{{:locale:\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="load()"></ion-refresher><div class="center padding" ng-if="search.loading"><ion-spinner icon="android"></ion-spinner></div><div class="center padding gray" ng-if="!search.loading && !search.results.length" translate="">SUBSCRIPTION.NO_SUBSCRIPTION</div><div class="row no-padding"><div class="col list {{::motion.ionListClass}} item-border-large"><ng-repeat ng-repeat="subscriptions in search.results | filter: { type: \'email\' }" ng-include="\'plugins/es/templates/subscription/item_\' + subscriptions.type.toLowerCase() + \'_subscription.html\'">></ng-repeat></div></div></ion-content><button id="fab-add-subscription-record" class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg spin" ng-click="addSubscription()"></button></ion-view>');
+$templateCache.put('plugins/es/templates/subscription/item_email_subscription.html','<div class="item item-avatar"><i class="item-image icon ion-email"></i><h3>{{\'SUBSCRIPTION.TYPE.ENUM.\' + subscriptions.type.toUpperCase() | translate}}</h3><h4 class="gray">{{\'SUBSCRIPTION.EDIT.PROVIDER\'|translate}} <a ui-sref="app.wot_identity({pubkey: subscriptions.recipient, uid: subscriptions.uid})"><span ng-class="{\'positive\': subscriptions.uid, \'dark\': !subscriptions.uid}" ng-if="subscriptions.name||subscriptions.uid"><i class="ion-person" ng-if="subscriptions.uid"></i> {{subscriptions.name||subscriptions.uid}} </span><span class="gray" ng-if="!subscriptions.uid"><i class="ion-key"></i> {{subscriptions.recipient | formatPubkey}}</span></a></h4><div class="item-note text-right"><span ng-repeat="item in subscriptions.items">{{item.content.email}} <a class="ion-trash-a gray padding-left" ng-click="deleteSubscription(item)"></a> <a class="ion-edit gray padding-left" ng-click="editSubscription(item)"></a><br></span></div></div>');
+$templateCache.put('plugins/es/templates/subscription/modal_email.html','<ion-modal-view id="composeMessage" class="modal-full-height"><ion-header-bar class="bar-positive"><button class="button button-clear visible-xs" ng-click="closeModal()" translate>COMMON.BTN_CANCEL</button><h1 class="title" translate>SUBSCRIPTION.MODAL_EMAIL.TITLE</h1><button class="button button-icon button-clear icon ion-android-send visible-xs" ng-click="doSubmit()"></button></ion-header-bar><ion-content scroll="true"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate>SUBSCRIPTION.MODAL_EMAIL.HELP</h4></div><form name="subscriptionForm" novalidate="" ng-submit="doSubmit()"><div class="list" ng-init="setForm(subscriptionForm)"><label class="item item-input" ng-class="{\'item-input-error\': form.$submitted && (form.email.$invalid || form.email.$error)}"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.EMAIL_LABEL</span> <input name="email" type="text" placeholder="{{\'SUBSCRIPTION.MODAL_EMAIL.EMAIL_HELP\' | translate}}" ng-model="formData.content.email" ng-minlength="3" required email></label><div class="form-errors" ng-if="form.$submitted && (form.email.$invalid || form.email.$error)" ng-messages="form.email.$error"><div class="form-error" ng-message="minlength"><span translate="ERROR.FIELD_TOO_SHORT"></span></div><div class="form-error" ng-message="email"><span translate="ERROR.FIELD_NOT_EMAIL"></span></div></div><label class="item item-input item-select" ng-class="{\'item-input-error\': form.$submitted && !formData.content.frequency}"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_LABEL</span><select name="frequency" ng-model="formData.content.frequency" style="height: 46px;margin-top: 1px"><option value="weekly" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_WEEKLY</option><option value="daily" translate>SUBSCRIPTION.MODAL_EMAIL.FREQUENCY_DAILY</option></select></label><div class="form-errors" ng-if="form.$submitted && !formData.content.frequency"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div><a class="item item-input item-icon-right gray ink" ng-class="{\'item-input-error\': form.$submitted && !formData.recipient}" ng-click="showNetworkLookup()" style="height: 67px"><span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.PROVIDER</span> <span class="badge animate-fade-in animate-show-hide ng-hide" ng-class="{\'badge-royal\': recipient.uid, \'badge-stable\': !recipient.uid}" ng-show="recipient && (recipient.name||recipient.uid)"><i class="ion-person" ng-if="recipient.uid"></i> {{recipient.name||recipient.uid}} </span><span class="badge badge-secondary animate-fade-in animate-show-hide ng-hide" ng-show="formData.recipient"><i class="ion-key"></i> {{formData.recipient | formatPubkey}} </span><i class="gray icon ion-ios-arrow-right"></i></a><div class="form-errors" ng-if="form.$submitted && !formData.recipient"><div class="form-error"><span translate="ERROR.FIELD_REQUIRED"></span></div></div></div><div class="padding hidden-xs text-right"><button class="button button-clear button-dark ink" ng-click="cancel()" type="button" translate>COMMON.BTN_CANCEL</button> <button class="button button-positive ink" type="submit">{{\'COMMON.BTN_ADD\' | translate}}</button></div></form></ion-content></ion-modal-view>');
+$templateCache.put('plugins/es/templates/user/edit_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left assertive ink" ng-click="removeProfile()"><i class="icon ion-trash-a"></i> {{\'PROFILE.BTN_DELETE\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/user/edit_profile.html','<ion-view left-buttons="leftButtons"><ion-nav-title></ion-nav-title><ion-nav-buttons side="secondary"><button class="button button-icon button-clear button-assertive ion-trash-a visible-xs visible-sm" ng-click="removeProfile()" ng-if="existing"></button> <button class="button button-icon button-clear ion-android-done visible-xs visible-sm" ng-click="submitAndSaveAndClose()"></button></ion-nav-buttons><ion-content scroll="true"><div class="positive-900-bg hero"><div class="content"><i class="avatar" ng-style="avatarStyle" ng-class="{\'avatar-wallet\': !loading && !avatar && walletData && !walletData.isMember, \'avatar-member\': !loading && !avatar && walletData.isMember}"><button class="button button-positive button-large button-clear flat icon ion-camera visible-xs visible-sm" style="display: inline-block" ng-click="showAvatarModal()"></button> <button ng-if="avatar.src" class="button button-positive button-large button-clear flat visible-xs visible-sm" style="display: inline-block; left: 85px; bottom:15px" ng-click="rotateAvatar()"><i class="icon-secondary ion-image" style="left: 24px; top: 3px; font-size: 24px"></i> <i class="icon-secondary ion-forward" style="left: 26px; top: -13px"></i></button></i><h3 class="light"><ng-if ng-if="!loading && !formData.title && walletData && walletData.isMember">{{walletData.uid}}</ng-if><ng-if ng-if="!loading && !formData.title && walletData && !walletData.isMember">{{::walletData.pubkey | formatPubkey}}</ng-if><ng-if ng-if="!loading && formData.title">{{formData.title}}</ng-if></h3><h4 class="light"><ion-spinner ng-if="loading" icon="android"></ion-spinner></h4></div></div><div class="row no-padding"><div class="col"><form name="profileForm" novalidate="" ng-submit="saveAndClose()"><div class="list item-text-wrap {{::motion.ionListClass}}" ng-init="setForm(profileForm)"><div class="item item-icon-left item-text-wrap"><i class="icon ion-ios-information-outline positive"></i><h4 class="positive" translate="">PROFILE.HELP.WARNING_PUBLIC_DATA</h4></div><div class="item item-divider" translate="">PROFILE.GENERAL_DIVIDER</div><ion-item class="item-input item-floating-label item-button-right" ng-class="{\'item-input-error\': form.$submitted && form.title.$invalid}"><span class="input-label">{{\'PROFILE.TITLE\' | translate}}</span> <input type="text" name="title" placeholder="{{\'PROFILE.TITLE_HELP\' | translate}}" id="profile-name" ng-model="formData.title" ng-model-options="{ debounce: 350 }" ng-maxlength="50" required></ion-item><div class="form-errors" ng-show="form.$submitted && form.title.$error" ng-messages="form.title.$error"><div class="form-error" ng-message="required"><span translate="ERROR.FIELD_REQUIRED"></span></div><div class="form-error" ng-message="maxlength"><span translate="ERROR.FIELD_TOO_LONG_WITH_LENGTH" translate-values="{maxLength: 50}"></span></div></div><ion-item class="item-input item-floating-label item-button-right"><span class="input-label" style="width: 100%">{{\'PROFILE.DESCRIPTION\' | translate}}</span><textarea placeholder="{{\'PROFILE.DESCRIPTION_HELP\' | translate}}" ng-model="formData.description" ng-model-options="{ debounce: 350 }" rows="4" cols="10">\n              </textarea></ion-item><ng-include src="::\'plugins/es/templates/common/edit_position.html\'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include></div><ng-include src="::\'plugins/es/templates/common/edit_socials.html\'" ng-controller="ESSocialsEditCtrl"></ng-include><div class="list item-text-wrap {{::motion.ionListClass}}"><div class="item item-divider" translate="">PROFILE.TECHNICAL_DIVIDER</div><ion-item class="item-icon-left" ng-if="walletData && walletData.uid"><span translate="">COMMON.UID</span> <span class="badge badge-stable">{{::walletData.uid}}</span></ion-item><ion-item class="item-icon-left item-icon-right item-text-wrap ink" on-hold="copy(formData.pubkey)" copy-on-click=""><i class="icon ion-key"></i> <span translate="">COMMON.PUBKEY</span><p class="gray">{{walletData.pubkey}}</p></ion-item></div></form></div></div></ion-content></ion-view>');
+$templateCache.put('plugins/es/templates/user/items_profile.html','<div ng-if="!formData.profile" class="item gray" translate>PROFILE.NO_PROFILE_DEFINED</div><div class="item" ng-if="formData.profile && formData.name && showName"><span class="gray" translate>PROFILE.TITLE</span><h3>{{formData.name}}</h3></div><div class="item item-text-wrap" ng-if="formData.profile.descriptionHtml"><span class="gray" translate>PROFILE.DESCRIPTION</span><h3 trust-as-html="formData.profile.descriptionHtml"></h3></div><div class="item" ng-if="formData.profile && (formData.profile.address || formData.profile.city)" copy-on-click="{{formData.profile.address ? formData.profile.address + \'&#10;\' : \'\'}}{{formData.profile.city}}"><span class="gray" translate>LOCATION.LOCATION_DIVIDER</span><h3><span class="text-keep-lines" ng-if="formData.profile.address">{{formData.profile.address}}<br></span>{{formData.profile.city}}</h3></div><div class="item" ng-if="formData.profile && formData.profile.socials && formData.profile.socials.length" ng-controller="ESSocialsViewCtrl"><span class="gray" translate>PROFILE.SOCIAL_NETWORKS_DIVIDER</span><div class="list no-padding"><ion-item ng-repeat="social in formData.profile.socials | filter:filterFn track by social.url " id="social-{{::social.url|formatSlug}}" class="item-icon-left item-text-wrap no-padding-bottom ink" on-tap="openSocial($event, social)"><i class="icon ion-social-{{social.type}}" ng-class="{\'ion-bookmark\': social.type == \'other\', \'ion-link\': social.type == \'web\', \'ion-email\': social.type == \'email\', \'ion-iphone\': social.type == \'phone\'}"></i><p ng-if="social.type && social.type != \'web\'">{{social.type}} <i class="ion-locked" ng-if="social.recipient"></i></p><h4><a on-tap="openSocial($event, social)" href="{{::social.url}}" target="_blank">{{::social.url}}</a></h4></ion-item></div></div>');
+$templateCache.put('plugins/es/templates/wallet/item_wallet_extend.html','<h4 class="dark" ng-if=":state:enable && wallet.id!=\'default\'"><a ng-if="walletData.invitations.unreadCount"><i class="dark ion-person-stalker"></i> {{walletData.invitations.unreadCount}} </a><a ng-if="walletData.messages.unreadCount" ui-sref="app.user_messages_by_id.tab_inbox({id: wallet.id})"><i class="dark ion-email"></i> {{walletData.messages.unreadCount}} </a><a ng-if="walletData.notifications.unreadCount" ui-sref="app.view_notifications_by_id({id: wallet.id})"><i class="dark ion-android-notifications"></i> {{walletData.notifications.unreadCount}}</a></h4>');
+$templateCache.put('plugins/es/templates/wallet/view_wallet_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'hero\'"><small class="light" style="display: inline-block" ng-include="::\'plugins/es/templates/common/view_likes.html\'" ng-init="canEdit=true"></small></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-general\'"><div class="item item-divider item-divider-top-border"><span>{{\'PROFILE.PROFILE_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showProfileHelp=!showProfileHelp" class="icon positive ion-ios-help-outline" title="{{\'PROFILE.PROFILE_DIVIDER_HELP\' | translate}}"></i> </span><a class="badge button button-text button-small button-small-padding" ng-if="isDefaultWallet" ui-sref="app.edit_profile"><i class="icon ion-edit"></i> <span ng-if="!formData.profile" translate>PROFILE.BTN_ADD</span> <span ng-if="formData.profile" translate>PROFILE.BTN_EDIT</span> </a><a class="badge button button-text button-small button-small-padding" ng-if="!isDefaultWallet" ui-sref="app.edit_profile_by_id({id: walletId})"><i class="icon ion-edit"></i> <span ng-if="!formData.profile" translate>PROFILE.BTN_ADD</span> <span ng-if="formData.profile" translate>PROFILE.BTN_EDIT</span></a></div><div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showProfileHelp"><small trust-as-html="\'PROFILE.PROFILE_DIVIDER_HELP\'|translate"></small></div><ng-include src="::\'plugins/es/templates/user/items_profile.html\'" ng-init="showName=true"></ng-include><div class="item item-divider item-divider-top-border"><span>{{\'SUBSCRIPTION.SUBSCRIPTION_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showSubscriptionHelp=!showSubscriptionHelp" class="icon positive ion-ios-help-outline" title="{{\'SUBSCRIPTION.SUBSCRIPTION_DIVIDER_HELP\' | translate}}"></i> <span><a class="badge button button-text button-small button-small-padding" ng-if="!formData.subscriptions.count && isDefaultWallet" ui-sref="app.edit_subscriptions"><i class="icon ion-edit"></i> <span translate>SUBSCRIPTION.BTN_ADD</span> </a><a class="badge button button-text button-small button-small-padding" ng-if="!formData.subscriptions.count && !isDefaultWallet" ui-sref="app.edit_subscriptions_by_id({id: walletId})"><i class="icon ion-edit"></i> <span translate>SUBSCRIPTION.BTN_ADD</span></a></span></span></div><div class="item item-text-wrap positive item-small-height" ng-show="showSubscriptionHelp"><small translate>SUBSCRIPTION.SUBSCRIPTION_DIVIDER_HELP</small></div><div ng-if="!formData.subscriptions.count" class="item gray" translate>SUBSCRIPTION.NO_SUBSCRIPTION</div><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.subscriptions.count && isDefaultWallet" ui-sref="app.edit_subscriptions"><i class="icon ion-gear-a"></i> <span translate>SUBSCRIPTION.SUBSCRIPTION_COUNT</span> <span class="badge badge-calm">{{formData.subscriptions.count}}</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.subscriptions.count && !isDefaultWallet" ui-sref="app.edit_subscriptions_by_id({id: walletId})"><i class="icon ion-gear-a"></i> <span translate>SUBSCRIPTION.SUBSCRIPTION_COUNT</span> <span class="badge badge-calm">{{formData.subscriptions.count}}</span> <i class="gray icon ion-ios-arrow-right"></i></a><div class="item item-divider item-divider-top-border"><span>{{\'REGISTRY.WALLET.PAGE_DIVIDER\' | translate}} <i style="font-size: 12pt; cursor: pointer" ng-click="showPagesHelp=!showPagesHelp" class="icon positive ion-ios-help-outline" title="{{\'REGISTRY.WALLET.PAGE_DIVIDER_HELP\' | translate}}"></i> <span><a class="badge button button-text button-small button-small-padding" ng-if="!formData.pages.count" ng-click="showNewPageModal($event)"><i class="icon ion-edit"></i> <span translate>REGISTRY.BTN_NEW</span></a></span></span></div><div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showPagesHelp"><small trust-as-html="\'REGISTRY.WALLET.PAGE_DIVIDER_HELP\'|translate"></small></div><div ng-if="!formData.pages.count" class="item gray" translate>REGISTRY.NO_PAGE</div><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.pages.count && isDefaultWallet" ui-sref="app.wallet_pages"><i class="icon ion-social-buffer"></i> <span translate>REGISTRY.MY_PAGES</span> <span class="badge badge-calm">{{formData.pages.count}}</span> <i class="gray icon ion-ios-arrow-right"></i> </a><a class="item item-icon-left item-text-wrap item-icon-right ink" ng-if="formData.pages.count && !isDefaultWallet" ui-sref="app.wallet_pages_by_id({id: walletId})"><i class="icon ion-social-buffer"></i> <span translate>REGISTRY.MY_PAGES</span> <span class="badge badge-calm">{{formData.pages.count}}</span> <i class="gray icon ion-ios-arrow-right"></i></a></ng-if>');
+$templateCache.put('plugins/es/templates/wot/lookup_extend.html','<ion-tab ng-if=":state:enable" title="{{\'MENU.REGISTRY\'|translate}}" icon="ion-social-buffer" ui-sref="app.wot_lookup.tab_registry"><ion-nav-view name="tab_registry"></ion-nav-view></ion-tab>');
+$templateCache.put('plugins/es/templates/wot/lookup_item_group.html','<i ng-if="::!item.avatar" class="item-image icon ion-android-people"></i> <i ng-if="::!item.avatar" class="item-image icon-secondary ion-android-lock" style="left: 20px; top: 17px; font-size: 19px; color: #d9d9d9"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html=":rebind:item.name"></h2><h4 class="gray"><i class="ion-clock"></i> {{:rebind:\'GROUP.CREATED_TIME\'|translate: item }}</h4><h4 class="dark pull-left" ng-if=":rebind:item.membersCount"><i class="dark ion-person"></i> <span class="dark">+{{:rebind:item.membersCount}}</span></h4><h4 class="dark"><span class="dark" ng-if="::item.description"><i class="ion-quote"></i> {{::item.description|truncText}}</span></h4><h4 ng-if="::item.tags"><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>');
+$templateCache.put('plugins/es/templates/wot/lookup_item_page.html','<i ng-if="::!item.avatar" class="item-image icon cion-page-{{item.type}}"></i> <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i><h2 ng-bind-html=":rebind:item.name"></h2><h4 class="gray"><span class="gray" ng-if="::item.city"><i class="ion-location"></i> {{::item.city|truncText}} </span><span ng-if="::item.city && item.type">|</span> <span ng-if="item.type"><i class="cion-page-{{item.type}}"></i> {{::\'REGISTRY.TYPE.ENUM.\'+item.type|uppercase|translate}}</span></h4><h4 class="dark"><span class="dark" ng-if="::item.description"><i class="ion-quote"></i> {{::item.description|truncText}}</span></h4><h4 ng-if="::item.tags"><span ng-if="::item.tags" class="dark"><ng-repeat ng-repeat="tag in ::item.tags">#<ng-bind-html ng-bind-html="::tag"></ng-bind-html></ng-repeat></span></h4>');
+$templateCache.put('plugins/es/templates/wot/lookup_lg_extend.html','<div class="buttons-tabs" ng-if=":state:enable"><div class="pull-right"><div class="button button-tab dark" title="{{\'REGISTRY.BTN_SHOW_WOT_HELP\' | translate}}" nav-transition="none" active-link="active" active-link-path-prefix="#/app/wot/lg" ui-sref="app.wot_lookup_lg"><i class="icon ion-person-stalker"></i> {{\'REGISTRY.BTN_SHOW_WOT\' | translate}}</div><a class="button button-tab ink dark" title="{{\'REGISTRY.BTN_SHOW_PAGES_HELP\' | translate}}" nav-transition="none" active-link="active" active-link-path-prefix="#/app/wot/page" ui-sref="app.registry_lookup_lg"><i class="icon ion-social-buffer"></i> {{\'REGISTRY.BTN_SHOW_PAGES\' | translate}}</a></div><div class="pull-right" ng-if="showNewPageButton">&nbsp;</div></div>');
+$templateCache.put('plugins/es/templates/wot/popover_certification_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink" ng-if="canCertify" ng-click="certify()"><i class="icon ion-ribbon-b"></i> {{\'WOT.BTN_CERTIFY\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isUserPubkey(formData.pubkey) && formData.isMember" ng-click="askCertification()"><i class="icon-secondary ion-ribbon-b" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 35px; top: 0px"></b> {{\'WOT.BTN_ASK_CERTIFICATION\' | translate}} </a><a class="item item-icon-left ink" ng-if="isUserPubkey(formData.pubkey)" ng-click="showAskCertificationModal()"><i class="icon-secondary ion-ribbon-b" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 35px; top: 0px"></b> {{\'WOT.BTN_ASK_CERTIFICATIONS_DOTS\' | translate}} </a><a class="item item-icon-left ink" ng-if="!isUserPubkey(formData.pubkey)" ng-click="showSuggestCertificationModal()"><i class="icon-secondary ion-person-stalker" style="left: 16px; top: 0px; font-size: 25px"></i> <b class="icon-secondary ion-help" style="left: 37px; top: -4px"></b> {{\'WOT.BTN_SUGGEST_CERTIFICATIONS_DOTS\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/es/templates/wot/view_certifications_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'nav-buttons\'"><button class="button button-icon button-clear icon ion-android-more-vertical visible-xs visible-sm" ng-click="showCertificationActionsPopover($event)"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons\'"><button class="button button-stable button-small-padding icon ion-android-more-vertical" ng-click="showCertificationActionsPopover($event)" title="{{\'COMMON.POPOVER_ACTIONS_TITLE\' | translate}}"></button></ng-if>');
+$templateCache.put('plugins/es/templates/wot/view_identity_extend.html','<ng-if ng-if=":state:enable && extensionPoint === \'hero\'"><small class="light" style="display: inline-block" ng-include="::\'plugins/es/templates/common/view_likes.html\'"></small></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons-top-fab\'"><button id="fab-compose-{{:rebind:formData.pubkey}}" class="button button-fab button-fab-top-left button-fab-hero mini button-stable spin" style="left: 88px" ng-click="showNewMessageModal()"><i class="icon ion-compose"></i></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'buttons\'"><button class="button button-stable button-small-padding icon ion-compose" ng-disabled="loading" ng-click="showNewMessageModal()" title="{{\'MESSAGE.BTN_WRITE\' | translate}}"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-buttons\'"><button class="button button-stable button-small-padding icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ng-if><ng-if ng-if=":state:enable && extensionPoint === \'after-general\'"><span class="item item-divider item-divider-top-border"><span>{{\'PROFILE.PROFILE_DIVIDER\' | translate}} <a style="font-size: 12pt; cursor: pointer" ng-click="showProfileHelp=!showProfileHelp" class="icon positive ion-ios-help-outline ink" title="{{\'PROFILE.PROFILE_DIVIDER_HELP\' | translate}}"></a></span></span><div class="item item-text-wrap positive item-small-height" ng-show="showProfileHelp"><small translate>PROFILE.PROFILE_DIVIDER_HELP</small></div><ng-include src="::\'plugins/es/templates/user/items_profile.html\'" ng-init="showName=false;"></ng-include></ng-if>');
+$templateCache.put('plugins/es/templates/wot/view_popover_actions.html','<ion-popover-view class="fit has-header"><ion-header-bar><h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1></ion-header-bar><ion-content scroll="false"><div class="list item-text-wrap"><a class="item item-icon-left ink visible-xs visible-sm" ng-click="showSharePopover($event)"><i class="icon ion-android-share-alt"></i> {{\'COMMON.BTN_SHARE\' | translate}} </a><a class="item item-icon-left assertive ink" ng-if="canDelete" ng-click="delete()"><i class="icon ion-trash-a"></i> {{\'COMMON.BTN_DELETE\' | translate}} </a><a class="item item-icon-left ink" ng-if="!canEdit && likeData.likes" ng-click="hideActionsPopover() && toggleLike($event)"><i class="icon" ng-class="{\'ion-heart-broken\': likeData.likes.wasHit, \'ion-heart\': !likeData.likes.wasHit}"></i> {{(likeData.likes.wasHit ? \'COMMON.BTN_LIKE_REMOVE\' : \'COMMON.BTN_LIKE\' )| translate}} </a><a class="item item-icon-left ink" ng-if="!canEdit && likeData.abuses" ng-disabled="!!likeData.abuses.wasHitCount" ng-class="{\'gray\': !!likeData.abuses.wasHitCount}" ng-click="hideActionsPopover() && reportAbuse($event)"><i class="icon ion-android-warning"></i> {{\'COMMON.BTN_REPORT_ABUSE_DOTS\' | translate}}</a></div></ion-content></ion-popover-view>');
+$templateCache.put('plugins/graph/templates/blockchain/graph_block_issuers.html','\n    <div class="row responsive-lg">\n\n      <!-- bar -->\n      <div class="col col-75">\n        <canvas id="bar" class="chart-bar"\n                height="{{height}}" width="{{width}}"\n                chart-data="data"\n                chart-labels="labels"\n                chart-colors="colors"\n                chart-options="barOptions"\n                chart-click="onChartClick">\n        </canvas>\n      </div>\n\n      <!-- pie -->\n      <div class="col col-25 padding-top">\n        <canvas id="blocksByIssuer-pie" class="chart-pie"\n                chart-data="data"\n                chart-labels="labels"\n                chart-colors="colors"\n                chart-click="onChartClick">\n        </canvas>\n\n        <div class="gray padding-top text-center">\n          <small ng-bind-html="\'GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_HELP\'| translate:{issuerCount: data.length, blockCount: blockCount }"></small>\n        </div>\n      </div>\n    </div>\n');
+$templateCache.put('plugins/graph/templates/blockchain/graph_tx_count.html','\n    <!-- button bar -->\n    <div class="button-bar-inline "\n         style="top: 33px; margin-top:-33px; position: relative;">\n      <button\n        class="button button-stable button-clear no-padding-xs pull-right"\n        ng-click="showActionsPopover($event)">\n        <i class="icon ion-navicon-round"></i>\n      </button>\n    </div>\n\n    <div class="padding-left padding-right">\n      <canvas id="tx-line" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n\n    <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n');
+$templateCache.put('plugins/graph/templates/blockchain/view_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list" ng-if="!loading">\n\n\n      <!-- TX count -->\n      <ng-controller ng-controller="GpBlockchainTxCountCtrl">\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item item-divider" ng-if="!loading" >\n          {{\'GRAPH.BLOCKCHAIN.TX_DIVIDER\'|translate}}\n          <ion-spinner ng-if="loadingRange" class="ion-spinner-small" icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs no-padding-sm"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n             ng-init="setSize(350, 1000)">\n        </div>\n      </ng-controller>\n\n\n      <!-- Blocks issuer -->\n      <ng-controller ng-controller="GpBlockchainIssuersCtrl">\n\n        <div class="item item-divider" ng-if="!loading" translate>GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_DIVIDER</div>\n\n        <div class="item no-padding-xs no-padding-sm"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n             ng-init="setSize(300, 750)">\n        </div>\n\n      </ng-controller>\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/account/graph_balance.html','\n    <!-- button bar -->\n    <div class="button-bar-inline "\n         style="top: 33px; margin-top:-33px; position: relative;">\n      <button\n        class="button button-stable button-clear no-padding-xs pull-right"\n        ng-click="showActionsPopover($event)">\n        <i class="icon ion-navicon-round"></i>\n      </button>\n    </div>\n\n    <div class="padding-left padding-right">\n      <canvas id="account-balance" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n\n    <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n');
+$templateCache.put('plugins/graph/templates/account/graph_certifications.html','\n    <div class="padding-left padding-right">\n      <canvas id="account-certifications" class="chart-bar"\n              height="{{height}}" width="{{width}}"\n              chart-data="data"\n              chart-dataset-override="datasetOverride"\n              chart-colors="colors"\n              chart-options="options"\n              chart-labels="labels"\n              chart-click="onChartClick">\n      </canvas>\n    </div>\n');
+$templateCache.put('plugins/graph/templates/account/graph_sum_tx.html','<div class="row responsive-sm" ng-if="!loading">\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n  <div class="col text-center">\n\n    <!-- TX input chart -->\n    <p class="gray padding text-wrap"\n       ng-if="inputChart.data.length"\n       translate>GRAPH.ACCOUNT.INPUT_CHART_TITLE</p>\n    <canvas id="chart-received-pie" class="chart-pie"\n            chart-data="inputChart.data"\n            chart-labels="inputChart.labels"\n            chart-colors="inputChart.colors"\n            chart-click="onInputChartClick">\n    </canvas>\n\n  </div>\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n  <div class="col text-center">\n\n    <!-- TX output chart -->\n    <p class="gray padding text-wrap"\n       ng-if="outputChart.data.length"\n       translate>GRAPH.ACCOUNT.OUTPUT_CHART_TITLE</p>\n    <canvas id="chart-sent-pie" class="chart-pie"\n            chart-data="outputChart.data"\n            chart-labels="outputChart.labels"\n            chart-colors="outputChart.colors"\n            chart-click="onOutputChartClick">\n    </canvas>\n\n  </div>\n\n  <div class="col col-10 hidden-xs hidden-sm">&nbsp;</div>\n\n</div>\n');
+$templateCache.put('plugins/graph/templates/account/view_identity_tx_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n\n  <button class="button button-stable button-small-padding icon ion-stats-bars"\n          ui-sref="app.wot_identity_stats({pubkey: formData.pubkey})"\n          title="{{\'GRAPH.ACCOUNT.BTN_SHOW_STATS\' | translate}}">\n  </button>\n\n</ng-if>\n');
+$templateCache.put('plugins/graph/templates/account/view_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.ACCOUNT.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n\n\n    <div class="list" >\n\n      <!--  - - - - Balance - - - - -->\n      <ng-controller ng-controller="GpAccountBalanceCtrl">\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item item-divider" ng-if="!loading" >\n          {{\'GRAPH.ACCOUNT.BALANCE_DIVIDER\'|translate}}\n          <ion-spinner ng-if="loadingRange" class="ion-spinner-small" icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/account/graph_balance.html\'"\n             ng-init="setSize(350, 1000)">\n        </div>\n      </ng-controller>\n\n    </div>\n\n    <div class="item no-padding-xs"\n         ng-include="::\'plugins/graph/templates/account/graph_sum_tx.html\'"\n         ng-controller="GpAccountSumTxCtrl">\n    </div>\n\n    <!--  - - - - WOT - - - -\n    <div class="item item-divider" translate>\n      GRAPH.ACCOUNT.WOT_DIVIDER\n    </div>\n\n    <div class="item no-padding-xs"\n         ng-include="::\'plugins/graph/templates/account/graph_certifications.html\'"\n         ng-controller="GpAccountCertificationCtrl"\n         ng-init="setSize(350, 1000)">\n    </div>-->\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/account/view_wallet_tx_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n\n  <button class="button button-stable button-small-padding icon ion-stats-bars"\n          ui-sref="app.wot_identity_stats({pubkey: formData.pubkey})"\n          title="{{\'GRAPH.ACCOUNT.BTN_SHOW_STATS\' | translate}}">\n  </button>\n\n</ng-if>\n');
+$templateCache.put('plugins/graph/templates/common/graph_range_bar.html','\n  <div class="range range-positive no-padding-left no-padding-right">\n    <a\n      class="button button-stable button-clear no-padding pull-left"\n      ng-click="goPreviousRange($event)">\n      <i class="icon ion-chevron-left"></i>\n    </a>\n    <input type="range"\n           ng-model="formData.timePct"\n           name="timePct"\n           min="0" max="100"\n           value="{{formData.timePct}}"\n           ng-change="onRangeChanged();"\n           ng-model-options="{ debounce: 250 }">\n    <a\n      class="button button-stable button-clear no-padding pull-right"\n      ng-click="goNextRange($event)">\n      <i class="icon ion-chevron-right"></i>\n    </a>\n  </div>\n');
+$templateCache.put('plugins/graph/templates/common/popover_range_actions.html','<ion-popover-view class="has-header popover-graph-currency">\n  <ion-header-bar>\n    <h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1>\n  </ion-header-bar>\n  <ion-content scroll="false">\n    <div class="list item-text-wrap">\n\n      <!-- scale -->\n      <a class="item item-icon-left ink"\n         ng-click="toggleScale()">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.scale==\'logarithmic\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.LOGARITHMIC_SCALE\' | translate"></span>\n      </a>\n\n      <!-- duration divider -->\n      <div class="item item-divider">\n        {{\'GRAPH.COMMON.RANGE_DURATION_DIVIDER\'|translate}}\n      </div>\n\n      <!-- duration: hour -->\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'hour\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'hour\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.HOUR\' | translate"></span>\n      </a>\n\n      <!-- duration: day -->\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'day\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'day\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.DAY\' | translate"></span>\n      </a>\n\n      <!-- duration: month -->\n      <a class="item item-icon-left ink"\n         ng-click="setRangeDuration(\'month\')">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.rangeDuration==\'month\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.RANGE_DURATION.MONTH\' | translate"></span>\n      </a>\n\n    </div>\n  </ion-content>\n</ion-popover-view>\n');
+$templateCache.put('plugins/graph/templates/currency/graph_du.html','\n  <!-- graphs button bar -->\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs no-padding-sm pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="monetaryMass-bar" class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-dataset-override="datasetOverride"\n          chart-options="options"\n          chart-click="showBlock">\n  </canvas>\n');
+$templateCache.put('plugins/graph/templates/currency/graph_members_count.html','  <canvas id="membersCount-bar" class="chart-line"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-options="options"\n          chart-dataset-override="datasetOverride"\n          chart-click="onChartClick">\n  </canvas>\n');
+$templateCache.put('plugins/graph/templates/currency/graph_monetary_mass.html','\n  <!-- graphs button bar -->\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="monetaryMass-bar"\n          class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="data"\n          chart-labels="labels"\n          chart-colors="colors"\n          chart-dataset-override="datasetOverride"\n          chart-options="options"\n          chart-click="onChartClick">\n  </canvas>\n');
+$templateCache.put('plugins/graph/templates/currency/popover_monetary_mass_actions.html','<ion-popover-view class="fit has-header">\n  <ion-header-bar>\n    <h1 class="title" translate>COMMON.POPOVER_ACTIONS_TITLE</h1>\n  </ion-header-bar>\n  <ion-content scroll="false">\n    <div class="list item-text-wrap">\n\n      <a class="item item-icon-left ink"\n         ng-click="toggleScale()">\n        <i class="icon ion-ios-checkmark-empty" ng-show="formData.scale==\'logarithmic\'"></i>\n        <span ng-bind-html="\'GRAPH.COMMON.LOGARITHMIC_SCALE\' | translate"></span>\n      </a>\n\n    </div>\n  </ion-content>\n</ion-popover-view>\n');
+$templateCache.put('plugins/graph/templates/currency/tab_blocks_extend.html','<!-- buttons -->\n<ng-if ng-if=":state:enable && extensionPoint === \'buttons\'">\n  <div class="item item-divider">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_blocks_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n');
+$templateCache.put('plugins/graph/templates/currency/view_currency_extend.html','\n<!-- section actual parameters -->\n<ng-if ng-if=":state:enable && extensionPoint === \'parameters-actual\'" >\n\n  <ng-if ng-if="!smallscreen">\n    <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n         ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n         ng-controller="GpCurrencyMonetaryMassCtrl"\n         ng-init="displayShareAxis=false;">\n    </div>\n    <div class="item buttons no-padding-top ">\n      <a class="pull-right button button-text button-small button-small-padding ink" ui-sref="app.currency_stats_lg">\n        <i class="icon ion-stats-bars"></i>\n        <span translate>GRAPH.COMMON.BTN_SHOW_DETAILED_STATS</span>\n      </a>\n    </div>\n  </ng-if>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_parameters_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n<!-- section Wot -->\n<ng-if ng-if=":state:enable && extensionPoint === \'wot-actual\'" >\n\n  <ng-if ng-if="!smallscreen">\n    <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n         ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n         ng-controller="GpCurrencyMembersCountCtrl">\n    </div>\n    <div class="item buttons no-padding-top ">\n      <a class="pull-right button button-text button-small button-small-padding ink" ui-sref="app.currency_stats_lg">\n        <i class="icon ion-stats-bars"></i>\n        <span translate>GRAPH.COMMON.BTN_SHOW_DETAILED_STATS</span>\n      </a>\n    </div>\n  </ng-if>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_wot_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n<!-- section Wot -->\n<ng-if ng-if=":state:enable && extensionPoint === \'network-actual\'" >\n\n  <div class="item padding-left padding-right no-padding-xs no-padding-sm"\n       ng-if="!smallscreen"\n       ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n       ng-controller="GpBlockchainIssuersCtrl">\n  </div>\n\n  <div class="item item-divider"\n       ng-if="smallscreen">\n    <a class="badge button button-text button-small button-small-padding ink" ui-sref="app.currency.tab_network_stats">\n      <i class="icon ion-stats-bars"></i>\n      <span translate>GRAPH.COMMON.BTN_SHOW_STATS</span>\n    </a>\n  </div>\n</ng-if>\n\n');
+$templateCache.put('plugins/graph/templates/currency/view_stats_lg.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n\n\n    <div class="list" >\n\n      <!-- Monetary mass -->\n      <ng-controller ng-controller="GpCurrencyMonetaryMassCtrl" >\n\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <div class="item no-padding-xs" ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n             ng-init="setSize(250, 1000)">\n        </div>\n\n        <div ng-if="!loading"\n             class="item item-toggle dark no-border text-right">\n          <span class="" translate>COMMON.BTN_RELATIVE_UNIT</span>\n          <label class="toggle toggle-royal" id="helptip-currency-change-unit">\n            <input type="checkbox" ng-model="formData.useRelative">\n            <div class="track">\n              <div class="handle"></div>\n            </div>\n          </label>\n        </div>\n      </ng-controller>\n\n      <!-- DU -->\n      <ng-controller ng-controller="GpCurrencyDUCtrl" >\n        <div class="item no-padding-xs"\n             ng-if="!loading"\n             ng-include="::\'plugins/graph/templates/currency/graph_du.html\'"\n             ng-init="setSize(250, 1000)">\n        </div>\n      </ng-controller>\n\n      <!-- Member count  -->\n      <ng-controller ng-controller="GpCurrencyMembersCountCtrl" >\n      <div class="item no-padding-xs"\n           ng-if="!loading"\n           ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/currency/view_wot_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n\n  <ion-content scroll="true" >\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <ng-include\n      ng-if="!loading"\n      src="\'plugins/graph/templates/currency/graph_members_count.html\'" ></ng-include>\n  </ion-content>\n  </ion-view>\n');
+$templateCache.put('plugins/graph/templates/docstats/graph.html','\n  <!-- graphs button bar -->\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs no-padding-sm pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="{{::chartIdPrefix}}{{chart.id}}"\n          class="chart-line"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="chart.data"\n          chart-labels="labels"\n          chart-dataset-override="chart.datasetOverride"\n          chart-options="chart.options"\n          chart-click="onChartClick">\n  </canvas>\n\n  <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n');
+$templateCache.put('plugins/graph/templates/docstats/view_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.DOC_STATS.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n    <div class="list" >\n\n      <!-- Doc stat -->\n      <div class="center padding" ng-if="loading">\n        <ion-spinner icon="android"></ion-spinner>\n      </div>\n\n      <div class="item no-padding-xs no-padding-sm" ng-if="!loading"\n           ng-repeat="chart in charts"\n           ng-include="::\'plugins/graph/templates/docstats/graph.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/network/view_es_network_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'documents-buttons\'">\n  <a class="button button-text button-small ink"\n     ui-sref="app.doc_stats_lg" >\n    <i class="icon ion-stats-bars"></i>\n    <span>{{\'NETWORK.VIEW.BTN_GRAPH\'|translate}}</span>\n  </a>\n</ng-if>\n');
+$templateCache.put('plugins/graph/templates/network/view_es_peer_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'general\'">\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n     ng-if="isReachable"\n     ui-sref="app.doc_stats_lg(node)">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.DOC_STATS.TITLE</span>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n     ng-if="isReachable"\n     ui-sref="app.doc_synchro_lg(node)">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.SYNCHRO.TITLE</span>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n</ng-if>\n\n');
+$templateCache.put('plugins/graph/templates/network/view_network_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'blockchain-buttons\'">\n  <a class="button button-text button-small ink"\n     ui-sref="app.blockchain_stats" >\n    <i class="icon ion-stats-bars"></i>\n    <span>{{\'NETWORK.VIEW.BTN_GRAPH\'|translate}}</span>\n  </a>\n</ng-if>\n');
+$templateCache.put('plugins/graph/templates/network/view_peer_extend.html','<!-- Buttons section -->\n<ng-if ng-if=":state:enable && extensionPoint === \'general\'">\n\n  <a class="item item-icon-left item-icon-right item-text-wrap ink"\n    ui-sref="app.view_peer_stats({pubkey: node.pubkey})">\n    <i class="icon ion-stats-bars"></i>\n    <span translate>GRAPH.PEER.VIEW.BLOCK_COUNT_LABEL</span>\n    <span class="badge"\n          ng-if="!loading"\n          ng-class="{\'badge-stable\': blockCount > 0, \'badge-assertive\': !blockCount}">\n      {{!blockCount ? \'GRAPH.PEER.VIEW.NO_BLOCK\' : \'GRAPH.PEER.VIEW.BLOCK_COUNT\' | translate:{count: blockCount} }}\n    </span>\n    <ion-spinner class="badge" icon="android" ng-if="loading"></ion-spinner>\n    <i class="gray icon ion-ios-arrow-right"></i>\n  </a>\n</ng-if>\n\n');
+$templateCache.put('plugins/graph/templates/network/view_peer_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.BLOCKCHAIN.TITLE\' | translate}}{{id}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="no-padding">\n\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list" ng-if="!loading">\n\n      <!--  - - - - TX divider - - - - -->\n      <div class="item item-divider hidden-xs hidden-sm" translate>\n        GRAPH.BLOCKCHAIN.TX_DIVIDER\n      </div>\n\n      <div class="item no-padding-xs"\n           ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n           ng-init="setSize(350, 1000)">\n      </div>\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/synchro/graph.html','\n  <!-- graphs button bar -->\n  <div class="button-bar-inline "\n       style="top: 33px; margin-top:-33px; position: relative;">\n    <button\n      class="button button-stable button-clear no-padding-xs pull-right"\n      ng-click="showActionsPopover($event)">\n      <i class="icon ion-navicon-round"></i>\n    </button>\n  </div>\n\n  <canvas id="synchro-chart-{{chart.id}}"\n          class="chart-bar"\n          height="{{height}}"\n          width="{{width}}"\n          chart-data="chart.data"\n          chart-labels="labels"\n          chart-dataset-override="chart.datasetOverride"\n          chart-options="chart.options">\n  </canvas>\n\n  <ng-include src="::\'plugins/graph/templates/common/graph_range_bar.html\'"></ng-include>\n');
+$templateCache.put('plugins/graph/templates/synchro/view_stats.html','<ion-view left-buttons="leftButtons"\n          cache-view="false">\n  <ion-nav-title>\n    {{\'GRAPH.SYNCHRO.TITLE\' | translate}}\n  </ion-nav-title>\n\n  <ion-content scroll="true" class="padding" >\n\n    <div class="list" >\n\n      <div class="center padding" ng-if="loading">\n        <ion-spinner icon="android"></ion-spinner>\n      </div>\n\n      <div class="item no-padding-xs" ng-if="!loading"\n           ng-repeat="chart in charts"\n           ng-include="::\'plugins/graph/templates/synchro/graph.html\'"\n           ng-init="setSize(250, 1000)">\n      </div>\n\n    </div>\n\n  </ion-content>\n\n</ion-view>\n');
+$templateCache.put('plugins/map/templates/common/edit_position_extend.html','<div class="item no-padding hidden-xs hidden-sm {{ionItemClass}}" ng-if="formData.geoPoint && formData.geoPoint.lat && formData.geoPoint.lon">\n  <leaflet id="{{::mapId}}"\n           height="250px"\n           center="map.center"\n           markers="map.markers"\n           defaults="map.defaults">\n  </leaflet>\n</div>\n');
+$templateCache.put('plugins/map/templates/network/item_search_tooltip.html','<a href="#">\n  {{peer.dns || peer.server}}\n  <span class="{{peer.uid ? \'positive\' : \'gray\'}}">\n    <i class="icon {{peer.uid ? \'ion-person\' : \'ion-key\'}}"></i>\n    {{peer.uid ? (peer.name||peer.uid) : (peer.pubkey|formatPubkey) }}\n  </span>\n  <span class="gray">{{peer.ipv4 ? (peer.ipv4 + \':\' + peer.port) : \'\'}}</span>\n  <span class="{{peer.bma.useSsl  ? \'\' : \'ng-hide\'}}"><i class="ion-locked"></i> <small>SSL</small></span>\n</a>\n');
+$templateCache.put('plugins/map/templates/network/lookup_extend.html','<!-- FIXME issue #755 - https://git.duniter.org/clients/cesium-grp/cesium/issues/755\n<a ng-if="enable"\n   class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.NETWORK.LOOKUP.BTN_MAP_HELP\' | translate}}"\n        ui-sref="app.view_network_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.NETWORK.LOOKUP.BTN_MAP\' | translate}}\n</a>\n -->\n');
+$templateCache.put('plugins/map/templates/network/view_map.html','<ion-view left-buttons="leftButtons" class="view-map-network">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.NETWORK.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             center="map.center"\n             markers="map.markers"\n             layers="map.layers">\n    </leaflet>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/map/templates/registry/item_search_tooltip.html','<a href="#" class="{{type}}">\n  <i class="{{\'cion-page-\' + type}}"></i>\n  {{name != uid ? name +\' \' : \'\'}}\n  <span class="gray">\n    {{pubkey ? (pubkey|formatPubkey) : \'\'}}\n  </span>\n</a>\n');
+$templateCache.put('plugins/map/templates/registry/lookup_lg_extend.html','<a class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.REGISTRY.LOOKUP.BTN_MAP_HELP\' | translate}}"\n   ui-sref="app.view_registry_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.REGISTRY.LOOKUP.BTN_MAP\' | translate}}\n</a>\n');
+$templateCache.put('plugins/map/templates/registry/popup_marker.html','<div class="item no-border no-padding item-avatar "\n     ng-if="loadingMarker">\n\n  <i class="item-image icon ion-person"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top" >\n    <h2 class="stable-bg">\n      &nbsp;\n    </h2>\n    <h4 class="stable-bg col-75">\n      &nbsp;\n    </h4>\n    <h4 class="stable-bg col-50">\n      &nbsp;\n    </h4>\n  </div>\n</div>\n\n<a class="item no-border no-padding item-avatar ink animate-fade-in animate-show-hide ng-hide"\n     ng-show="!loadingMarker"\n     ui-sref="app.view_page({id: formData.id, title: formData.name})">\n  <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}}"></i>\n  <i ng-if="!formData.avatar" class="item-image icon cion-page-{{::formData.type}}"></i>\n  <div class="item-content item-avatar-left-padding padding-top">\n    <h2 class="dark">\n      {{::formData.name}}\n    </h2>\n    <h4 ng-if="::formData.category" class="gray" title="{{::formData.category.name}}">\n      <b class="ion-flag"></b> {{::formData.category.name}}\n    </h4>\n    <h4 ng-if="::formData.city" class="gray" title="{{::formData.city}}">\n      <b class="ion-location"></b> {{::formData.city}}\n    </h4>\n  </div>\n</a>\n<!-- buttons -->\n<div class="item no-border no-padding">\n  <div class="pull-left gray">\n    <!-- show description -->\n    <a class="animate-fade-in animate-show-hide gray ng-hide"\n       ng-class="{\'ion-arrow-down-b\': !showDescription, \'ion-arrow-up-b\': showDescription}"\n       ng-click="showDescription=!showDescription;"\n       title="{{\'PROFILE.DESCRIPTION\'|translate}}"\n       ng-show="!loadingMarker && formData.description">\n      &nbsp;\n    </a>\n  </div>\n</div>\n<div class="item no-border no-padding item-text-wrap hidden-xs ng-hide" ng-show="showDescription">\n  <small trust-as-html="::formData.description|truncText:500"></small>\n</div>\n');
+$templateCache.put('plugins/map/templates/registry/view_map.html','<ion-view left-buttons="leftButtons" class="view-map-registry">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.REGISTRY.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n    <button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="load()">\n    </button>\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <a id="helptip-map-registry" style="left: 150px; top: 50px; position: relative;"></a>\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             layers="map.layers"\n             markers="map.markers"\n             lf-center="map.center"\n             bounds="map.bounds">\n    </leaflet>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/map/templates/settings/es_settings_extend.html','\n<!--<span class="item item-divider" translate>MAP.SETTINGS.MAP_DIVIDER</span>\n\n<label class="item item-toggle dark item-text-wrap">\n  <span translate>MAP.SETTINGS.ENABLE_GOOGLE_API</span>\n  <h4 class="gray" translate>MAP.SETTINGS.ENABLE_GOOGLE_API_HELP</h4>\n  <div class="toggle toggle-royal">\n    <input type="checkbox" ng-model="formData.enableGoogleApi">\n    <div class="track">\n      <div class="handle"></div>\n    </div>\n  </div>\n</label>\n\n<ion-item class="item-input"\n          ng-if="!$root.config.plugins.es.googleApiKey"\n          ng-class="{\'item-input-error\': formData.enableGoogleApi && !formData.googleApiKey}">\n  <div class="input-label col-33">\n    <span class="" ng-class="{\'gray\': !formData.enableGoogleApi}"translate>MAP.SETTINGS.GOOGLE_API_KEY</span>\n    <h4>\n      <a ng-click="openLink($event, \'https://console.developers.google.com/apis/credentials/key\')" translate>MAP.SETTINGS.BTN_GOOGLE_API</a>\n      <span class="gray"> ({{\'MAP.SETTINGS.BTN_GOOGLE_API_WARNING\'|translate}})</span>\n    </h4>\n  </div>\n  <input type="text"\n         placeholder="{{\'MAP.SETTINGS.GOOGLE_API_KEY_PLACEHOLDER\' | translate}}"\n         ng-model="formData.googleApiKey"\n         ng-if="formData.enableGoogleApi">\n</ion-item>\n<div class="form-errors"\n     ng-show="formData.enableGoogleApi && !formData.googleApiKey">\n  <div class="form-error">\n    <span translate="ERROR.FIELD_REQUIRED"></span>\n  </div>\n</div>-->\n');
+$templateCache.put('plugins/map/templates/wot/item_search_tooltip.html','<a href="#" class="{{type}}">\n  <i class="{{pending ? \'ion-clock\': (type ? \'cion-page-\' + type : \'\')}}"></i>\n  {{name != uid ? name +\' \' : \'\'}}\n  <span class="{{uid ? \'positive\' : \'gray\'}}">\n    <i class="{{uid ? \'ion-person\' : \'ion-key\'}}"></i>\n    {{uid ? uid : (pubkey|formatPubkey) }}\n  </span>\n</a>\n');
+$templateCache.put('plugins/map/templates/wot/lookup_lg_extend.html','<a ng-if="enable"\n   class="button button-text button-small ink hidden-sm hidden-xs"\n   title="{{\'MAP.WOT.LOOKUP.BTN_MAP_HELP\' | translate}}"\n   ui-sref="app.view_wot_map">\n  <i class="icon ion-ios-location"></i>\n  {{\'MAP.WOT.LOOKUP.BTN_MAP\' | translate}}\n</a>\n');
+$templateCache.put('plugins/map/templates/wot/popup_marker.html','\n<div class="item no-border no-padding item-avatar "\n     ng-if="loadingMarker">\n\n  <i class="item-image icon ion-person"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top" >\n    <h2 class="stable-bg">\n      &nbsp;\n    </h2>\n    <h4 class="stable-bg col-75">\n      &nbsp;\n    </h4>\n    <h4 class="stable-bg col-50">\n      &nbsp;\n    </h4>\n  </div>\n</div>\n\n<a class="item no-border no-padding item-avatar ink animate-fade-in animate-show-hide ng-hide"\n   ng-show="!loadingMarker"\n   ui-sref="app.wot_identity({pubkey: formData.pubkey, uid: formData.uid})">\n\n  <i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}})"></i>\n  <i ng-if="!formData.avatar && formData.uid" class="item-image icon ion-person"></i>\n  <i ng-if="!formData.avatar && !formData.uid" class="item-image icon ion-card"></i>\n\n  <div class="item-content item-avatar-left-padding padding-top">\n    <h2 class="dark">\n      {{formData.name}}\n    </h2>\n    <h4>\n      <span ng-if="formData.uid" class="positive">\n        <b class="ion-person"></b>\n        {{formData.uid}}\n      </span>\n      <span class="gray" title="{{formData.pubkey}}"><b class="ion-key"></b> {{formData.pubkey|formatPubkey}}</span>\n      <span class="assertive" ng-if="!formData.isMember">\n        {{::\'WOT.NOT_MEMBER_PARENTHESIS\'|translate}}\n      </span>\n    </h4>\n    <h4 ng-if="formData.profile.city" class="gray" title="{{formData.profile.city}}">\n      <b class="ion-location"></b> {{formData.profile.city}}\n    </h4>\n  </div>\n</a>\n<!-- buttons -->\n<div class="item no-border no-padding">\n  <div class="pull-left gray">\n    <!-- show description -->\n    <a class="animate-fade-in animate-show-hide gray ng-hide"\n       ng-class="{\'ion-arrow-down-b\': !showDescription, \'ion-arrow-up-b\': showDescription}"\n       ng-click="showDescription=!showDescription;"\n       title="{{\'PROFILE.DESCRIPTION\'|translate}}"\n       ng-show="!loadingMarker && formData.profile.description">\n      &nbsp;\n    </a>\n  </div>\n  <div style="font-size: 18px;" class="pull-right gray">\n    <!-- share -->\n    <a class="icon ion-android-share-alt "\n       ng-click="showSharePopover($event)"\n       title="{{\'COMMON.BTN_SHARE\' | translate}}">&nbsp;</a>\n    <!-- certify -->\n    <a class="icon ion-ribbon-b"\n       ng-click="certify()"\n       title="{{\'WOT.BTN_CERTIFY\' | translate}}"\n       ng-hide="!canCertify">&nbsp;</a>\n    <!-- compose message -->\n    <a class="icon ion-compose"\n       ng-click="showNewMessageModal()"\n       title="{{\'MESSAGE.BTN_WRITE\' | translate}}">&nbsp;</a>\n    <!-- transfer -->\n    <a class="icon ion-card"\n       ng-click="showTransferModal({pubkey:formData.pubkey, uid: formData.name||formData.uid})"\n       title="{{\'COMMON.BTN_SEND_MONEY\' | translate}}">&nbsp;</a>\n\n  </div>\n</div>\n<div class="item no-border no-padding item-text-wrap hidden-xs ng-hide" ng-show="showDescription">\n  <small trust-as-html="formData.profile.description|truncText:500"></small>\n</div>\n');
+$templateCache.put('plugins/map/templates/wot/view_map.html','<ion-view left-buttons="leftButtons" class="view-map-wot">\n  <ion-nav-title>\n    <span class="hidden-xs" translate>MAP.WOT.VIEW.TITLE</span>\n  </ion-nav-title>\n\n  <ion-nav-buttons side="secondary">\n    <button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="load()">\n    </button>\n  </ion-nav-buttons>\n\n  <ion-content data-tap-disabled="true">\n    <a id="helptip-map-wot" style="left: 150px; top: 50px; position: relative;"></a>\n    <leaflet id="{{::mapId}}"\n             height="100%"\n             layers="map.layers"\n             markers="map.markers"\n             lf-center="map.center"\n             bounds="map.bounds">\n    </leaflet>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/es/templates/message/tabs/tab_list.html','<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="refresh()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'plugins/es/templates/message/list.html\'"></ng-include></ion-content><div class="visible-xs visible-sm"><button ng-if="fabButtonNewMessageId" id="{{::fabButtonNewMessageId}}" class="button button-fab button-fab-bottom-right button-assertive spin has-footer" ng-click="showNewMessageModal()"><i class="icon ion-compose"></i></button></div></ion-view>');
+$templateCache.put('plugins/es/templates/registry/tabs/tab_registry.html','<ion-view><ion-nav-buttons side="secondary"><cs-extension-point name="nav-buttons"></cs-extension-point><button class="button button-icon button-clear" ng-click="showFiltersPopover($event)"><i class="icon ion-android-funnel"></i></button> <button class="button button-icon button-clear icon ion-android-more-vertical" ng-click="showActionsPopover($event)"></button></ion-nav-buttons><ion-content><ion-refresher pulling-text="{{\'COMMON.BTN_REFRESH\' | translate}}" on-refresh="doSearch()"></ion-refresher><cs-extension-point name="buttons"></cs-extension-point><ng-include src="::\'plugins/es/templates/registry/lookup_form.html\'"></ng-include><ng-include src="::\'plugins/es/templates/registry/lookup_list.html\'"></ng-include></ion-content></ion-view>');
+$templateCache.put('plugins/graph/templates/currency/tabs/tab_blocks_stats.html','<ion-view>\n  <ion-content>\n    <div\n       ng-include="::\'plugins/graph/templates/blockchain/graph_tx_count.html\'"\n       ng-controller="GpBlockchainTxCountCtrl"\n       ng-init="setSize(500,700,false)">\n      </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/currency/tabs/tab_network_stats.html','<ion-view>\n  <ion-content>\n\n    <div class="list">\n      <div class="item"\n         ng-include="::\'plugins/graph/templates/blockchain/graph_block_issuers.html\'"\n         ng-controller="GpBlockchainIssuersCtrl"\n           ng-init="setSize(500,700,true)">\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/currency/tabs/tab_parameters_stats.html','<ion-view>\n  <ion-content>\n    <div class="list no-padding-xs no-padding-sm">\n\n      <ng-container ng-controller="GpCurrencyMonetaryMassCtrl">\n\n        <div class="center padding" ng-if="loading">\n          <ion-spinner icon="android"></ion-spinner>\n        </div>\n\n        <!-- Monetary mass -->\n        <div class="item"\n             ng-include="::\'plugins/graph/templates/currency/graph_monetary_mass.html\'"\n             ng-init="setSize(500,700,true)">\n        </div>\n      </ng-container>\n\n      <!-- DU -->\n      <ng-container ng-controller="GpCurrencyDUCtrl">\n        <div class="item"\n             ng-include="::\'plugins/graph/templates/currency/graph_du.html\'"\n             ng-init="setSize(500,700,true)">\n        </div>\n      </ng-container>\n    </div>\n  </ion-content>\n</ion-view>\n');
+$templateCache.put('plugins/graph/templates/currency/tabs/tab_wot_stats.html','<ion-view>\n  <ion-content>\n    <div class="center padding" ng-if="loading">\n      <ion-spinner icon="android"></ion-spinner>\n    </div>\n\n    <div class="list no-padding">\n      <div class="item no-padding-top"\n           ng-include="::\'plugins/graph/templates/currency/graph_members_count.html\'"\n           ng-init="setSize(600,700,false)">\n      </div>\n    </div>\n  </ion-content>\n</ion-view>\n');}]);
+
+angular.module('cesium.es.plugin', [
+    // Services
+    'cesium.es.services',
+    // Controllers
+    'cesium.es.app.controllers',
+    'cesium.es.common.controllers',
+    'cesium.es.settings.controllers',
+    'cesium.es.currency.controllers',
+    'cesium.es.wot.controllers',
+    'cesium.es.wallet.controllers',
+    'cesium.es.profile.controllers',
+    'cesium.es.message.controllers',
+    'cesium.es.notification.controllers',
+    'cesium.es.blockchain.controllers',
+    'cesium.es.network.controllers',
+    'cesium.es.registry.controllers',
+    'cesium.es.group.controllers',
+    'cesium.es.invitation.controllers',
+    'cesium.es.subscription.controllers',
+    'cesium.es.document.controllers',
+    'cesium.es.like.controllers'
+  ])
+;
+
+
+function EsNotification(json, markAsReadCallback) {
+
+  var messagePrefixes = {
+    'user': 'EVENT.USER.',
+    'page': 'EVENT.PAGE.'
+  };
+
+  var that = this;
+
+  // Avoid undefined errors
+  json = json || {};
+
+  that.id = json.id || ('' + Date.now()); // Keep id if exists, otherwise create it from timestamp
+  that.type = json.type && json.type.toLowerCase();
+  that.time = json.time;
+  that.hash = json.hash;
+  that.read = json.read_signature ? true : false;
+
+  that.message = json.code && (json.reference && messagePrefixes[json.reference.index] ?
+  messagePrefixes[json.reference.index] + json.code :
+  'EVENT.' + json.code) || json.message;
+  that.params = json.params;
+
+  if (markAsReadCallback && (typeof markAsReadCallback === "function") ) {
+    that.markAsReadCallback = markAsReadCallback;
+  }
+
+  function _formatHash(input) {
+    return input ? input.substr(0,4) + input.substr(input.length-4) : '';
+  }
+
+  that.markAsRead = function() {
+    if (that.markAsReadCallback) {
+      that.markAsReadCallback(that);
+    }
+  };
+
+  var pubkeys;
+
+  json.code = json.code || '';
+
+  // Membership
+  if (json.code.startsWith('MEMBER_')) {
+    that.avatarIcon = 'ion-person';
+    that.icon = 'ion-information-circled positive';
+    that.state = 'app.view_wallet';
+    that.medianTime = that.time;
+  }
+
+  // TX
+  else if (json.code.startsWith('TX_')) {
+    that.avatarIcon = 'ion-card';
+    that.icon = (json.code === 'TX_SENT') ? 'ion-paper-airplane dark' : 'ion-archive balanced';
+    that.medianTime = that.time;
+    pubkeys = json.params.length > 0 ? json.params[0] : null;
+    if (pubkeys && pubkeys.indexOf(',') == -1) {
+      that.pubkey = pubkeys;
+    }
+    that.state = 'app.view_wallet_tx';
+    that.stateParams = {refresh: true};
+  }
+
+  // Certifications
+  else if (json.code.startsWith('CERT_')) {
+    that.avatarIcon = (json.code === 'CERT_RECEIVED') ? 'ion-ribbon-b' : 'ion-ribbon-a';
+    that.icon = (json.code === 'CERT_RECEIVED') ? 'ion-ribbon-b balanced' : 'ion-ribbon-a gray';
+    that.pubkey = json.params.length > 0 ? json.params[0] : null;
+    that.medianTime = that.time;
+    that.state = 'app.wallet_cert';
+    that.stateParams = {
+      type: (json.code === 'CERT_RECEIVED') ? 'received' : 'given'
+    };
+  }
+
+  // Message
+  else if (json.code.startsWith('MESSAGE_')) {
+    that.avatarIcon = 'ion-email';
+    that.icon = 'ion-email dark';
+    pubkeys = json.params.length > 0 ? json.params[0] : null;
+    if (pubkeys && pubkeys.indexOf(',') === -1) {
+      that.pubkey = pubkeys;
+    }
+    that.id = json.reference.id; // Do not care about notification ID, because notification screen use message _id
+  }
+
+  // user profile record
+  else if (json.reference && json.reference.index === 'user' && json.reference.type === 'profile') {
+    that.pubkey = json.params.length > 0 ? json.params[0] : null;
+    that.state = 'app.wot_identity';
+    that.stateParams = {
+      pubkey: that.pubkey,
+      uid: json.params && json.params[3],
+    };
+    if (json.code.startsWith('LIKE_')) {
+      that.avatarIcon = 'ion-person';
+      that.icon = 'ion-ios-heart positive';
+    }
+    else if (json.code.startsWith('STAR_')) {
+      that.avatarIcon = 'ion-person';
+      that.icon = 'ion-star gray';
+    }
+    else if (json.code.startsWith('FOLLOW_')) {
+      that.avatarIcon = 'ion-person';
+      that.icon = 'ion-ios-people gray';
+    }
+    else if (json.code.startsWith('ABUSE_')) {
+      that.avatarIcon = 'ion-person';
+      that.icon = 'ion-android-warning assertive';
+    }
+    else if (json.code.startsWith('MODERATION_')) {
+      that.state = 'app.wot_identity';
+      that.stateParams = {
+        pubkey: json.reference.id,
+        uid: json.params && json.params[3],
+      };
+      that.avatarIcon = 'ion-alert-circled';
+      that.icon = 'ion-alert-circled energized';
+
+      // If deletion has been asked, change the message
+      var level = json.params && json.params[4] || 0;
+      if (json.code === 'MODERATION_RECEIVED' && level == 5) {
+        that.message = 'EVENT.USER.DELETION_RECEIVED';
+        that.icon = 'ion-trash-a assertive';
+      }
+    }
+    else {
+      that.icon = 'ion-person dark';
+    }
+
+  }
+
+  // page record
+  else if (json.reference && json.reference.index === 'page') {
+    that.pubkey = json.params.length > 0 ? json.params[0] : null;
+    that.avatarIcon = 'ion-social-buffer';
+    if (json.reference.anchor) {
+      that.icon = 'ion-ios-chatbubble-outline dark';
+      that.state = 'app.view_page_anchor';
+      that.stateParams = {
+        id: json.reference.id,
+        title: json.params[1],
+        anchor: _formatHash(json.reference.anchor)
+      };
+    }
+    else {
+      that.icon = 'ion-social-buffer dark';
+      that.state = 'app.view_page';
+      that.stateParams = {
+        id: json.reference.id,
+        title: json.params[1]
+      };
+    }
+
+    if (json.code.startsWith('LIKE_')) {
+      that.icon = 'ion-ios-heart positive';
+    }
+    else if (json.code.startsWith('FOLLOW_')) {
+      that.avatarIcon = 'ion-person';
+    }
+    else if (json.code.startsWith('ABUSE_')) {
+      that.icon = 'ion-alert-circled energized';
+    }
+    else if (json.code.startsWith('MODERATION_')) {
+      that.avatarIcon = 'ion-alert-circled';
+      that.icon = 'ion-alert-circled energized';
+
+      // If deletion has been asked, change the message
+      if (json.code === 'MODERATION_RECEIVED' && level == 5) {
+        that.message = 'EVENT.PAGE.DELETION_RECEIVED';
+        that.icon = 'ion-trash-a assertive';
+      }
+    }
+  }
+
+  // info message
+  else if (json.type === 'INFO') {
+    that.avatarIcon = 'ion-information';
+    that.icon = 'ion-information-circled positive';
+  }
+  // warn message
+  else if (json.type === 'WARN') {
+    that.avatarIcon = 'ion-alert-circled';
+    that.icon = 'ion-alert-circled energized';
+  }
+  // error message
+  else if (json.type === 'ERROR') {
+    that.avatarIcon = 'ion-close';
+    that.icon = 'ion-close-circled assertive';
+  }
+
+  return that;
+}
+
+
+function Comment(id, json) {
+
+  var that = this;
+
+  that.id = id;
+  that.message = null; // set in copyFromJson()
+  that.html = null; // set in copyFromJson()
+  that.issuer = null; // set in copyFromJson()
+  that.time = null; // set in copyFromJson()
+  that.creationTime = null; // set in copyFromJson()
+  that.reply_to = null; // set in copyFromJson()
+
+  that.replyCount = 0;
+  that.parent = null;
+  that.replies = [];
+  that.onRemoveListeners = [];
+
+  that.copy = function(otherComment) {
+    // Mandatory fields
+    that.message = otherComment.message;
+    that.html = otherComment.html;
+    that.issuer = otherComment.issuer;
+    that.time = otherComment.time;
+    that.creationTime = otherComment.creationTime || that.time; // fill using time, for backward compatibility
+
+    // Optional fields
+    that.id = otherComment.id || that.id;
+    that.reply_to = otherComment.reply_to || that.reply_to;
+    that.uid = otherComment.uid || that.uid;
+    that.name = otherComment.name || that.name;
+    that.avatarStyle = otherComment.avatarStyle || that.avatarStyle;
+    if (otherComment.parent) {
+      that.parent = otherComment.parent;
+    }
+    if (otherComment.replies) that.setReplies(otherComment.replies);
+  };
+
+  that.copyFromJson = function(json) {
+    that.message = json.message;
+    that.issuer = json.issuer;
+    that.time = json.time;
+    that.creationTime = json.creationTime || that.time;
+    that.reply_to = json.reply_to;
+  };
+
+  that.addOnRemoveListener = function(listener) {
+    if (listener && (typeof listener === "function") ) {
+      that.onRemoveListeners.push(listener);
+    }
+  };
+
+  that.cleanAllListeners = function() {
+    that.onRemoveListeners = [];
+  };
+
+  that.setReplies = function(replies) {
+    that.removeAllReplies();
+    that.addReplies(replies);
+  };
+
+  that.addReplies = function(replies) {
+    if (!replies || !replies.length) return;
+    replies = replies.sort(function(cm1, cm2) {
+      return (cm1.time - cm2.time);
+    });
+    _.forEach(replies, function(reply) {
+      reply.parent = that;
+      that.replies.push(reply);
+    });
+    that.replyCount += replies.length;
+  };
+
+  that.containsReply = function(reply) {
+    return that.replies.indexOf(reply) != -1;
+  };
+
+  that.addReply = function(reply) {
+    that.replyCount += 1;
+    that.replies.push(reply);
+    that.replies = that.replies.sort(function(cm1, cm2) {
+      return (cm1.time - cm2.time);
+    });
+    reply.parent = that;
+  };
+
+  that.removeAllReplies = function() {
+    if (that.replyCount) {
+      var replies = that.replies.splice(0, that.replies.length);
+      that.replyCount = 0;
+      _.forEach(replies, function (reply) {
+        reply.remove();
+      });
+    }
+  };
+
+  that.removeReply = function(replyId) {
+    var index = _.findIndex(that.replies, {id: replyId});
+    if (index != -1) {
+      that.replyCount--;
+      var reply = that.replies.splice(index, 1)[0];
+      delete reply.parent;
+    }
+  };
+
+  that.remove = function() {
+    if (that.parent) {
+      that.parent.removeReply(that.id);
+      delete that.parent;
+    }
+    //that.removeAllReplies();
+    if (that.onRemoveListeners.length) {
+      _.forEach(that.onRemoveListeners, function(listener) {
+        listener(that);
+      });
+      that.issuer = null;
+      that.message = null;
+      that.cleanAllListeners();
+    }
+  };
+
+  // Init from json
+  if (json && typeof json === "object") {
+    that.copyFromJson(json);
+  }
+}
+
+
+function Invitation(json) {
+
+  var that = this;
+
+  // Avoid undefined errors
+  json = json || {};
+
+  that.type = json.type && json.type.toLowerCase();
+  that.time = json.time;
+  that.id = json.id;
+
+  // Invitation to certify
+  if (that.type == 'certification') {
+
+    that.comment = json.comment;
+    that.icon = 'ion-ribbon-a';
+    that.okText= 'WOT.BTN_CERTIFY';
+
+    // read the identity to certify
+    if (!json.content || json.content.indexOf('-') == -1) {
+      console.error('[invitation] Empty content for invitation [{0}]'.format(that.id));
+      that.message = 'INVITATION.ERROR.BAD_INVITATION_FORMAT';
+      that.pubkey = json.issuer;
+      return;
+    }
+
+    var separatorIndex = json.content.lastIndexOf('-');
+    if (separatorIndex == -1) {
+      console.error('[invitation] Bad content format for invitation [{0}]: {1}'.format(that.id, json.content));
+      that.message = 'INVITATION.ERROR.BAD_INVITATION_FORMAT';
+      that.pubkey = json.issuer;
+      return;
+    }
+
+    var identity = {
+      uid: json.content.substr(0, separatorIndex),
+      pubkey: json.content.substr(separatorIndex+1)
+    };
+
+    // Prepare the state action
+    that.state = 'app.wot_identity';
+    that.stateParams = {
+      pubkey: identity.pubkey,
+      uid: identity.uid,
+      action: 'certify'
+    };
+
+    // Ask certification to himself
+    if (identity.pubkey == json.issuer) {
+      that.pubkey = json.issuer;
+      that.uid = identity.uid;
+      that.message = 'INVITATION.ASK_CERTIFICATION';
+    }
+
+    // Ask certification to someone else
+    else {
+      that.issuer = {
+        pubkey: json.issuer
+      };
+      that.message = 'INVITATION.SUGGESTION_CERTIFICATION';
+      that.pubkey = identity.pubkey;
+      that.uid = identity.uid;
+    }
+
+  }
+
+}
+
+
+
+function EsPeer(json) {
+
+  var that = this;
+
+  Object.keys(json).forEach(function (key) {
+    that[key] = json[key];
+  });
+
+  that.endpoints = that.endpoints || [];
+}
+
+
+EsPeer.prototype.regexp = {
+  API_REGEXP: /^([A-Z_]+)(?:[ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?(?:[ ]+([0-9.]+))?(?:[ ]+([0-9a-f:]+))?(?:[ ]+([0-9]+))(?:\/[^\/]+)?$/,
+  LOCAL_IP_ADDRESS: /^127[.]0[.]0.|192[.]168[.]|10[.]0[.]0[.]|172[.]16[.]/
+};
+
+EsPeer.prototype.keyID = function () {
+  var ep = this.ep || this.getEP();
+  if (ep.useBma) {
+    return [this.pubkey || "Unknown", ep.dns, ep.ipv4, ep.ipv6, ep.port, ep.useSsl, ep.path].join('-');
+  }
+  return [this.pubkey || "Unknown", ep.ws2pid, ep.path].join('-');
+};
+
+EsPeer.prototype.copyValues = function(to) {
+  var obj = this;
+  ["version", "currency", "pub", "endpoints", "hash", "status", "block", "signature"].forEach(function (key) {
+    to[key] = obj[key];
+  });
+};
+
+EsPeer.prototype.copyValuesFrom = function(from) {
+  var obj = this;
+  ["version", "currency", "pub", "endpoints", "block", "signature"].forEach(function (key) {
+    obj[key] = from[key];
+  });
+};
+
+EsPeer.prototype.json = function() {
+  var obj = this;
+  var json = {};
+  ["version", "currency", "endpoints", "status", "block", "signature"].forEach(function (key) {
+    json[key] = obj[key];
+  });
+  json.raw = this.raw && this.getRaw();
+  json.pubkey = this.pubkey;
+  return json;
+};
+
+EsPeer.prototype.getEP = function() {
+  if (this.ep) return this.ep;
+  var ep = null;
+  var epRegex = this.regexp.API_REGEXP;
+  this.endpoints.forEach(function(epStr){
+    var matches = !ep && epRegex.exec(epStr);
+    if (matches) {
+      ep = {
+        "api": matches[1] || '',
+        "dns": matches[2] || '',
+        "ipv4": matches[3] || '',
+        "ipv6": matches[4] || '',
+        "port": matches[5] || 80,
+        "path": matches[6] || '',
+        "useSsl": matches[5] == 443
+      };
+    }
+  });
+  return ep || {};
+};
+
+EsPeer.prototype.getEndpoints = function(regexp) {
+  if (!regexp) return this.endpoints;
+  if (typeof regexp === 'string') regexp = new RegExp('^' + regexp);
+    return this.endpoints.reduce(function(res, ep){
+      return ep.match(regexp) ?  res.concat(ep) : res;
+    }, []);
+};
+
+EsPeer.prototype.hasEndpoint = function(endpoint){
+  var regExp = this.regexp[endpoint] || new RegExp('^' + endpoint);
+  var endpoints = this.getEndpoints(regExp);
+  return endpoints && endpoints.length > 0;
+};
+
+EsPeer.prototype.hasEsEndpoint = function() {
+  var endpoints = this.getEsEndpoints();
+  return endpoints && endpoints.length > 0;
+};
+
+EsPeer.prototype.getEsEndpoints = function() {
+  return this.getEndpoints(/^(ES_CORE_API|ES_USER_API|ES_SUBSCRIPTION_API|GCHANGE_API)/);
+};
+
+EsPeer.prototype.getDns = function() {
+  var ep = this.ep || this.getEP();
+  return ep.dns ? ep.dns : null;
+};
+
+EsPeer.prototype.getIPv4 = function() {
+  var ep = this.ep || this.getEP();
+  return ep.ipv4 ? ep.ipv4 : null;
+};
+
+EsPeer.prototype.getIPv6 = function() {
+  var ep = this.ep || this.getEP();
+  return ep.ipv6 ? ep.ipv6 : null;
+};
+
+EsPeer.prototype.getPort = function() {
+  var ep = this.ep || this.getEP();
+  return ep.port ? ep.port : null;
+};
+
+EsPeer.prototype.getHost = function() {
+  var ep = this.ep || this.getEP();
+  return ((ep.port == 443 || ep.useSsl) && ep.dns) ? ep.dns :
+    (this.hasValid4(ep) ? ep.ipv4 :
+        (ep.dns ? ep.dns :
+          (ep.ipv6 ? '[' + ep.ipv6 + ']' :'')));
+};
+
+EsPeer.prototype.getURL = function() {
+  var ep = this.ep || this.getEP();
+  var host = this.getHost();
+  var protocol = (ep.port == 443 || ep.useSsl) ? 'https' : 'http';
+  return protocol + '://' + host + (ep.port ? (':' + ep.port) : '');
+};
+
+EsPeer.prototype.getServer = function() {
+  var ep = this.ep || this.getEP();
+  var host = this.getHost();
+  return host + (host && ep.port ? (':' + ep.port) : '');
+};
+
+EsPeer.prototype.hasValid4 = function(ep) {
+  return ep.ipv4 &&
+    /* exclude private address - see https://fr.wikipedia.org/wiki/Adresse_IP */
+    !ep.ipv4.match(this.regexp.LOCAL_IP_ADDRESS) ?
+    true : false;
+};
+
+EsPeer.prototype.isReachable = function () {
+  return !!this.getServer();
+};
+
+EsPeer.prototype.isSsl = function() {
+  var ep = this.ep || this.getEP();
+  return ep.useSsl;
+};
+
+EsPeer.prototype.isTor = function() {
+  var ep = this.ep || this.getEP();
+  return ep.useTor;
+};
+
+EsPeer.prototype.isHttp = function() {
+  var ep = this.ep || this.getEP();
+  return !bma.useTor;
+};
+
+
+
+angular.module('cesium.es.services', [
+    // Services
+    'cesium.es.http.services',
+    'cesium.es.comment.services',
+    'cesium.es.social.services',
+    'cesium.es.settings.services',
+    'cesium.es.crypto.services',
+    'cesium.es.profile.services',
+    'cesium.es.notification.services',
+    'cesium.es.message.services',
+    'cesium.es.modal.services',
+    'cesium.es.blockchain.services',
+    'cesium.es.registry.services',
+    'cesium.es.group.services',
+    'cesium.es.wallet.services',
+    'cesium.es.invitation.services',
+    'cesium.es.subscription.services',
+    'cesium.es.wot.services',
+    'cesium.es.tx.services',
+    'cesium.es.geo.services',
+    'cesium.es.document.services',
+    'cesium.es.network.services',
+    'cesium.es.like.services'
+  ])
+;
+
+angular.module('cesium.es.comment.services', ['ngResource', 'cesium.services',
+  'cesium.es.http.services', 'cesium.es.profile.services'])
+
+  .factory('esComment', ['$rootScope', '$q', 'esHttp', 'csWallet', 'csWot', function($rootScope, $q, esHttp, csWallet, csWot) {
+    'ngInject';
+
+    function EsComment(index) {
+
+      var
+        DEFAULT_SIZE = 20,
+        fields = {
+          commons: ["issuer", "creationTime", "time", "message", "reply_to"]
+        },
+        exports = {
+          index: index,
+          fields: {
+            commons: fields.commons
+          },
+          raw: {
+            search: esHttp.post('/'+index+'/comment/_search'),
+            remove: esHttp.record.remove(index, 'comment'),
+            wsChanges: esHttp.ws('/ws/_changes'),
+            add: new esHttp.record.post('/'+index+'/comment', {creationTime: true}),
+            update: new esHttp.record.post('/'+index+'/comment/:id/_update', {creationTime: true})
+          }
+        };
+
+      exports.raw.refreshTreeLinks = function(data) {
+        return exports.raw.addTreeLinks(data, true);
+      };
+
+      exports.raw.addTreeLinks = function(data, refresh) {
+        data = data || {};
+        data.result = data.result || [];
+        data.mapById = data.mapById || {};
+
+        var incompleteCommentIdByParentIds = {};
+        _.forEach(_.values(data.mapById), function(comment) {
+          if (comment.reply_to && !comment.parent) {
+            var parent = data.mapById[comment.reply_to];
+            if (!parent) {
+              parent = new Comment(comment.reply_to);
+              incompleteCommentIdByParentIds[parent.id] = comment.id;
+              data.mapById[parent.id] = parent;
+            }
+            if (!refresh || !parent.containsReply(comment)) {
+              parent.addReply(comment);
+            }
+          }
+        });
+
+        if (!_.size(incompleteCommentIdByParentIds)) {
+          var deferred = $q.defer();
+          deferred.resolve(data);
+          return deferred.promise;
+        }
+
+        var request = {
+          query : {
+            terms: {
+              _id: _.keys(incompleteCommentIdByParentIds)
+            }
+          },
+          sort : [
+            // Need desc, because of size+offset (will be sort in 'asc' order later)
+            { "creationTime" : {"order" : "desc"}},
+            { "time" : {"order" : "desc"}} // for backward compatibility
+          ],
+          from: 0,
+          size: 1000,
+          _source: fields.commons
+        };
+
+        console.debug("[ES] [comment] Getting missing comments in tree");
+        return exports.raw.search(request)
+          .then(function(res){
+            if (!res.hits.total) {
+              console.error("[ES] [comment] Comments has invalid [reply_to]: " + _.values(incompleteCommentIdByParentIds).join(','));
+              return data;
+            }
+
+            _.forEach(res.hits.hits, function(hit) {
+              var comment = data.mapById[hit._id];
+              comment.copyFromJson(hit._source);
+              // Parse URL and hashtags
+              comment.html = esHttp.util.parseAsHtml(comment.message);
+              delete incompleteCommentIdByParentIds[comment.id];
+            });
+
+            if (_.size(incompleteCommentIdByParentIds)) {
+              console.error("Comments has invalid [reply_to]: " + _.values(incompleteCommentIdByParentIds).join(','));
+            }
+
+            return exports.raw.addTreeLinks(data); // recursive call
+          });
+      };
+
+      exports.raw.loadDataByRecordId = function(recordId, options) {
+        options = options || {};
+        options.from = options.from || 0;
+        options.size = options.size || DEFAULT_SIZE;
+        options.loadAvatar = angular.isDefined(options.loadAvatar) ? options.loadAvatar : true;
+        options.loadAvatarAllParent = angular.isDefined(options.loadAvatarAllParent) ? (options.loadAvatar && options.loadAvatarAllParent) : false;
+        if (options.size < 0) options.size = 1000; // all comments
+
+        var request = {
+          query : {
+            term: { record : recordId}
+          },
+          sort : [
+            // Need desc, because of size+offset (will be sort in 'asc' order later)
+            { "creationTime" : {"order" : "desc"}},
+            { "time" : {"order" : "desc"}} // for backward compatibility
+          ],
+          from: options.from,
+          size: options.size,
+          _source: fields.commons
+        };
+
+        var data = {
+          total: 0,
+          mapById: {},
+          result: [],
+          pendings: {}
+        };
+
+        // Search comments
+        return exports.raw.search(request)
+          .then(function(res){
+            if (!res.hits.total) return data;
+            data.total = res.hits.total;
+            data.result = res.hits.hits.reduce(function (result, hit) {
+              var comment = new Comment(hit._id, hit._source);
+              // Parse URL and hashtags
+              comment.html = esHttp.util.parseAsHtml(comment.message);
+              // fill map by id
+              data.mapById[comment.id] = comment;
+              return result.concat(comment);
+            }, data.result);
+
+            // Add tree (parent/child) link
+            return exports.raw.addTreeLinks(data);
+          })
+
+          // Fill avatars (and uid)
+          .then(function() {
+            if (!options.loadAvatar) return;
+            if (options.loadAvatarAllParent) {
+              return csWot.extendAll(_.values(data.mapById), 'issuer');
+            }
+            return csWot.extendAll(data.result, 'issuer');
+          })
+
+          // Sort (creationTime asc)
+          .then(function() {
+            data.result = data.result.sort(function(cm1, cm2) {
+              return (cm1.creationTime - cm2.creationTime);
+            });
+            return data;
+          });
+      };
+
+      // Add listener to send deletion
+      exports.raw.createOnDeleteListener = function(data) {
+        return function(comment) {
+          var index = _.findIndex(data.result, {id: comment.id});
+          if (index === -1) return;
+          data.result.splice(index, 1);
+          delete data.mapById[comment.id];
+
+          var wallet = !csWallet.isUserPubkey(comment.issuer) ? csWallet.children.getByPubkey(comment.issuer) : csWallet;
+
+          // Send deletion request
+          if (wallet) {
+            return exports.raw.remove(comment.id)
+              .catch(function(err){
+                console.error(err);
+                throw new Error('COMMENTS.ERROR.FAILED_REMOVE_COMMENT');
+              });
+          }
+          else {
+            return $q.reject("No wallet found corresponding to the comment issuer");
+          }
+        };
+      };
+
+      exports.raw.startListenChanges = function(recordId, data, scope) {
+        data = data || {};
+        data.result = data.result || [];
+        data.mapById = data.mapById || {};
+        data.pendings = data.pendings || {};
+
+        scope = scope||$rootScope;
+
+        // Add listener to send deletion
+        var onRemoveListener = exports.raw.createOnDeleteListener(data);
+        _.forEach(data.result, function(comment) {
+          comment.addOnRemoveListener(onRemoveListener);
+        });
+
+        // Open websocket
+        var now = Date.now();
+        console.info("[ES] [comment] Starting websocket to listen comments on [{0}/record/{1}]".format(index, recordId.substr(0,8)));
+        var wsChanges = esHttp.websocket.changes(index + '/comment');
+        return wsChanges.open()
+
+          // Listen changes
+          .then(function(){
+            console.debug("[ES] [comment] Websocket opened in {0} ms".format(Date.now() - now));
+            wsChanges.on(function(change) {
+              if (!change) return;
+              scope.$applyAsync(function() {
+                var comment = data.mapById[change._id];
+                if (change._operation === 'DELETE') {
+                  if (comment) comment.remove();
+                }
+                else if (change._source && change._source.record === recordId) {
+                  // update
+                  if (comment) {
+                    comment.copyFromJson(change._source);
+                    // Parse URL and hashtags
+                    comment.html = esHttp.util.parseAsHtml(comment.message);
+                    exports.raw.refreshTreeLinks(data);
+                  }
+                  // create (if not in pending comment)
+                  else if ((!data.pendings || !data.pendings[change._source.creationTime]) && change._source.issuer != csWallet.data.pubkey) {
+                    comment = new Comment(change._id, change._source);
+                    comment.addOnRemoveListener(onRemoveListener);
+                    comment.isnew = true;
+                    // Parse URL and hashtags
+                    comment.html = esHttp.util.parseAsHtml(comment.message);
+                    // fill map by id
+                    data.mapById[change._id] = comment;
+                    exports.raw.refreshTreeLinks(data)
+                      // fill avatars (and uid)
+                      .then(function() {
+                        return csWot.extend(comment, 'issuer');
+                      })
+                      .then(function() {
+                        data.result.push(comment);
+                      });
+                  }
+                  else {
+                    console.debug("Skip comment received by WS (already in pending)");
+                  }
+                }
+              });
+            });
+          });
+      };
+
+      /**
+       * Save a comment (add or update)
+       * @param recordId
+       * @param data
+       * @param comment
+       * @returns {*}
+       */
+      exports.raw.save = function(recordId, data, comment) {
+        data = data || {};
+        data.result = data.result || [];
+        data.mapById = data.mapById || {};
+        data.pendings = data.pendings || {};
+
+        // Preparing JSON to sent
+        var id = comment.id;
+        var json = {
+          creationTime: id ? comment.creationTime || comment.time/*for compat*/ : moment().utc().unix(),
+          message: comment.message,
+          record: recordId,
+          issuer: csWallet.data.pubkey
+        };
+        if (comment.reply_to || comment.parent) {
+          json.reply_to = comment.reply_to || comment.parent.id;
+        }
+        else {
+          json.reply_to = null; // force to null because ES ignore missing field, when updating
+        }
+
+        // Create or update the entity
+        var entity;
+        if (!id) {
+          entity = new Comment(null, json);
+          entity.addOnRemoveListener(exports.raw.createOnDeleteListener(data));
+          // copy additional wallet data
+          entity.uid = csWallet.data.uid;
+          entity.name = csWallet.data.name;
+          entity.avatar = csWallet.data.avatar;
+
+          entity.isnew = true;
+          if (comment.parent) {
+            comment.parent.addReply(entity);
+          }
+          data.result.push(entity);
+        }
+        else {
+          entity = data.mapById[id];
+          entity.copy(comment);
+        }
+
+        // Parse URL and hashtags
+        entity.html = esHttp.util.parseAsHtml(entity.message);
+
+        // Send add request
+        if (!id) {
+          data.pendings = data.pendings || {};
+          data.pendings[json.creationTime] = json;
+
+          return exports.raw.add(json)
+            .then(function (id) {
+              entity.id = id;
+              data.mapById[id] = entity;
+              delete data.pendings[json.creationTime];
+              return entity;
+            });
+        }
+        // Send update request
+        else {
+          return exports.raw.update(json, {id: id})
+            .then(function () {
+              return entity;
+            });
+        }
+      };
+
+      exports.raw.stopListenChanges = function(data) {
+        console.debug("[ES] [comment] Stopping websocket on comments");
+        _.forEach(data.result, function(comment) {
+          comment.cleanAllListeners();
+        });
+        // Close previous
+        exports.raw.wsChanges().close();
+      };
+
+      // Expose functions
+      exports.load = exports.raw.loadDataByRecordId;
+      exports.save = exports.raw.save;
+      exports.changes = {
+        start: exports.raw.startListenChanges,
+        stop: exports.raw.stopListenChanges
+      };
+      return exports;
+    }
+
+    return {
+      instance: EsComment
+    };
+  }])
+;
+
+angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.services', 'cesium.config'])
+
+/**
+ * Elastic Search Http
+ */
+.factory('esHttp', ['$q', '$timeout', '$rootScope', '$state', '$sce', '$translate', '$window', '$filter', 'CryptoUtils', 'UIUtils', 'csHttp', 'csConfig', 'csSettings', 'csCache', 'BMA', 'csWallet', 'csPlatform', 'Api', function($q, $timeout, $rootScope, $state, $sce, $translate, $window, $filter,
+                            CryptoUtils, UIUtils, csHttp, csConfig, csSettings, csCache, BMA, csWallet, csPlatform, Api) {
+  'ngInject';
+
+  // Allow to force SSL connection with port different from 443
+  var forceUseSsl = (csConfig.httpsMode === 'true' || csConfig.httpsMode === true || csConfig.httpsMode === 'force') ||
+  ($window.location && $window.location.protocol === 'https:') ? true : false;
+  if (forceUseSsl) {
+    console.debug('[ES] [https] Enable SSL (forced by config or detected in URL)');
+  }
+
+  function EsHttp(host, port, useSsl, enableCache) {
+
+    var
+      that = this,
+      cachePrefix = 'esHttp-',
+      constants = {
+        ES_USER_API: 'ES_USER_API',
+        ES_SUBSCRIPTION_API: 'ES_SUBSCRIPTION_API',
+        ES_USER_API_ENDPOINT: 'ES_USER_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))',
+        ANY_API_ENDPOINT: '([A-Z_]+)(?:[ ]+([a-z_][a-z0-9-_.ÄŸÄž]*))?(?:[ ]+([0-9.]+))?(?:[ ]+([0-9a-f:]+))?(?:[ ]+([0-9]+))(?:\\/[^\\/]+)?',
+        MAX_UPLOAD_BODY_SIZE: csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.maxUploadBodySize || 2097152 /*=2M*/
+      },
+      regexp = {
+        IMAGE_SRC: exact('data:([A-Za-z//]+);base64,(.+)'),
+        URL: match('(www\\.|https?:\/\/(www\\.)?)[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)'),
+        HASH_TAG: match('(?:^|[\t\n\r\s ])#([0-9_-\\wḡĞǦğàáâãäåçèéêëìíîïðòóôõöùúûüýÿ]+)'),
+        USER_TAG: match('(?:^|[\t\n\r\s ])@('+BMA.constants.regexp.USER_ID+')'),
+        ES_USER_API_ENDPOINT: exact(constants.ES_USER_API_ENDPOINT),
+        API_ENDPOINT: exact(constants.ANY_API_ENDPOINT),
+      },
+      fallbackNodeIndex = 0,
+      listeners,
+      defaultSettingsNode,
+      truncUrlFilter = $filter('truncUrl');
+
+    that.data = {
+      isFallback: false
+    };
+    that.useCache = angular.isDefined(enableCache) ? enableCache : false; // need here because used in get() function
+    that.raw = {
+      getByPath: {},
+      postByPath: {},
+      wsByPath: {}
+    };
+    that.api = new Api(this, "esHttp");
+    that.started = false;
+    that.init = init;
+
+    init(host, port, useSsl);
+
+    function init(host, port, useSsl) {
+      // Use settings as default
+      if (!host && csSettings.data) {
+        host = host || (csSettings.data.plugins && csSettings.data.plugins.es ? csSettings.data.plugins.es.host : null);
+        port = port || (host ? csSettings.data.plugins.es.port : null);
+        useSsl = angular.isDefined(useSsl) ? useSsl : (port == 443 || csSettings.data.plugins.es.useSsl || forceUseSsl);
+      }
+
+      that.alive = false;
+      that.host = host;
+      that.port = port || ((useSsl || forceUseSsl) ? 443 : 80);
+      that.useSsl = angular.isDefined(useSsl) ? useSsl : (that.port == 443 || forceUseSsl);
+
+      that.server = csHttp.getServer(host, port);
+    }
+
+    function isSameNodeAsSettings(data) {
+      data = data || csSettings.data;
+      if (!data.plugins || !data.plugins.es) return false;
+
+      var host = data.plugins.es.host;
+      var useSsl = data.plugins.es.port == 443 || data.plugins.es.useSsl || forceUseSsl;
+      var port = data.plugins.es.port || (useSsl ? 443 : 80);
+
+      return isSameNode(host, port, useSsl);
+    }
+
+    function isSameNode(host, port, useSsl) {
+      return (that.host === host) &&
+        (that.port === port) &&
+        (angular.isUndefined(useSsl) || useSsl == that.useSsl);
+    }
+
+    // Say if the ES node is a fallback node or the configured node
+    function isFallbackNode() {
+      return that.data.isFallback;
+    }
+
+    // Set fallback flag (e.g. called by ES settings, when resetting settings)
+    function setIsFallbackNode(isFallback) {
+      that.data.isFallback = isFallback;
+    }
+
+    function exact(regexpContent) {
+      return new RegExp('^' + regexpContent + '$');
+    }
+    function match(regexpContent) {
+      return new RegExp(regexpContent);
+    }
+
+    function onSettingsReset(data, deferred) {
+      deferred = deferred || $q.defer();
+
+      if (that.data.isFallback) {
+        // Force a restart
+        if (that.started) {
+          that.stop();
+        }
+      }
+
+      // Reset to default values
+      that.data.isFallback = false;
+      defaultSettingsNode = null;
+
+      deferred.resolve(data);
+      return deferred.promise;
+    }
+
+    that.closeWs = function() {
+
+      if (!that.raw) return;
+
+      console.warn('[ES] [http] Closing all websockets...');
+      _.keys(that.raw.wsByPath||{}).forEach(function(key) {
+        var sock = that.raw.wsByPath[key];
+        sock.close();
+      });
+      that.raw.wsByPath = {};
+    };
+
+    that.cleanCache = function() {
+      console.debug("[ES] [http] Cleaning cache {prefix: '{0}'}...".format(cachePrefix));
+      csCache.clear(cachePrefix);
+
+      that.raw.getByPath = {};
+      that.raw.postByPath = {};
+      that.raw.wsByPath = {};
+    };
+
+    that.copy = function(otherNode) {
+      if (that.started) that.stop();
+      that.init(otherNode.host, otherNode.port, otherNode.useSsl || otherNode.port == 443);
+      that.data.isTemporary = false; // reset temporary flag
+      return that.start(true /*skipInit*/);
+    };
+
+    // Get node time (UTC) FIXME: get it from the node
+    that.date = { now : csHttp.date.now };
+
+    that.byteCount = function (s) {
+      s = (typeof s == 'string') ? s : JSON.stringify(s);
+      return encodeURI(s).split(/%(?:u[0-9A-F]{2})?[0-9A-F]{2}|./).length - 1;
+    };
+
+    that.getUrl  = function(path) {
+      return csHttp.getUrl(that.host, that.port, path, that.useSsl);
+    };
+
+    that.get = function (path, cacheTime) {
+
+      cacheTime = that.useCache && cacheTime;
+      var requestKey = path + (cacheTime ? ('#'+cacheTime) : '');
+
+      var getRequestFn = function(params) {
+        if (!that.started) {
+          if (!that._startPromise) {
+            console.warn('[ES] [http] Trying to get [{0}] before start(). Waiting...'.format(path));
+          }
+          return that.ready().then(function(start) {
+            if (!start) return $q.reject('ERROR.ES_CONNECTION_ERROR');
+            return getRequestFn(params); // loop
+          });
+        }
+
+        var request = that.raw.getByPath[requestKey];
+        if (!request) {
+          if (cacheTime) {
+            request =  csHttp.getWithCache(that.host, that.port, path, that.useSsl, cacheTime, null, null, cachePrefix);
+          }
+          else {
+            request =  csHttp.get(that.host, that.port, path, that.useSsl);
+          }
+          that.raw.getByPath[requestKey] = request;
+        }
+        return request(params);
+      };
+
+      return getRequestFn;
+    };
+
+    that.post = function(path) {
+      var postRequest = function(obj, params) {
+        if (!that.started) {
+          if (!that._startPromise) {
+            console.error('[ES] [http] Trying to post [{0}] before start()...'.format(path));
+          }
+          return that.ready().then(function(start) {
+            if (!start) return $q.reject('ERROR.ES_CONNECTION_ERROR');
+            return postRequest(obj, params); // loop
+          });
+        }
+
+        var request = that.raw.postByPath[path];
+        if (!request) {
+          request =  csHttp.post(that.host, that.port, path, that.useSsl);
+          that.raw.postByPath[path] = request;
+        }
+        return request(obj, params);
+      };
+      return postRequest;
+    };
+
+    that.ws = function(path) {
+      return function() {
+        var sock = that.raw.wsByPath[path];
+        if (!sock || sock.isClosed()) {
+          sock =  csHttp.ws(that.host, that.port, path, that.useSsl);
+
+          // When close, remove from cache
+          sock.onclose = function() {
+            delete that.raw.wsByPath[path];
+          };
+
+          that.raw.wsByPath[path] = sock;
+        }
+        return sock;
+      };
+    };
+
+    that.wsChanges = function(source) {
+      var wsChanges = that.ws('/ws/_changes')();
+      if (!source) return wsChanges;
+
+      // If a source is given, send it just after connection open
+      var _inheritedOpen = wsChanges.open;
+      wsChanges.open = function() {
+        return _inheritedOpen.call(wsChanges).then(function(sock) {
+          if(sock) {
+            sock.send(source);
+          }
+          else {
+            console.warn('Trying to access ws changes, but no sock anymore... already open ?');
+          }
+        });
+      };
+      return wsChanges;
+    };
+
+    that.isAlive = function() {
+      return csHttp.get(that.host, that.port, '/node/summary', that.useSsl)()
+        .then(function(json) {
+          var software = json && json.duniter && json.duniter.software || 'unknown';
+          if (software === "cesium-plus-pod" || software === "duniter4j-elasticsearch") return true;
+          console.error("[ES] [http] Not a Cesium+ Pod, but a {0} node. Please check '/node/summary'".format(software));
+          return false;
+        })
+        .catch(function() {
+          return false;
+        });
+    };
+
+    // Alert user if node not reached - fix issue #
+    that.checkNodeAlive = function(alive) {
+      if (alive) {
+        setIsFallbackNode(!isSameNodeAsSettings());
+        return true;
+      }
+      if (angular.isUndefined(alive)) {
+        return that.isAlive().then(that.checkNodeAlive);
+      }
+
+      var settings = csSettings.data.plugins && csSettings.data.plugins.es || {};
+
+      // Remember the default node
+      defaultSettingsNode = defaultSettingsNode || {
+        host: settings.host,
+        port: settings.port
+      };
+
+      var fallbackNode = settings.fallbackNodes && fallbackNodeIndex < settings.fallbackNodes.length && settings.fallbackNodes[fallbackNodeIndex++];
+      if (!fallbackNode) {
+        $translate('ERROR.ES_CONNECTION_ERROR', {server: that.server})
+          .then(UIUtils.alert.info);
+        return false; // stop the loop
+      }
+      var newServer = csHttp.getServer(fallbackNode.host, fallbackNode.port);
+      UIUtils.loading.hide();
+      return $translate('CONFIRM.ES_USE_FALLBACK_NODE', {old: that.server, new: newServer})
+        .then(UIUtils.alert.confirm)
+        .then(function (confirm) {
+          if (!confirm) return false; // stop the loop
+
+          that.cleanCache();
+
+          that.init(fallbackNode.host, fallbackNode.port, fallbackNode.useSsl || fallbackNode.port == 443);
+
+          // check is alive then loop
+          return that.isAlive().then(that.checkNodeAlive);
+        });
+    };
+
+    that.isStarted = function() {
+      return that.started;
+    };
+
+    that.ready = function() {
+      if (that.started) return $q.when(true);
+      return that._startPromise || that.start();
+    };
+
+    that.start = function(skipInit) {
+      if (that._startPromise) return that._startPromise;
+      if (that.started) return $q.when(that.alive);
+
+      that._startPromise = csPlatform.ready()
+        .then(function() {
+
+          if (!skipInit) {
+            // Init with defaults settings
+            that.init();
+          }
+        })
+        .then(function() {
+          console.debug('[ES] [http] Starting on [{0}]{1}...'.format(
+            that.server,
+            (that.useSsl ? ' (SSL on)' : '')
+          ));
+          var now = Date.now();
+
+          return that.checkNodeAlive()
+            .then(function(alive) {
+              that.alive = alive;
+              if (!alive) {
+                console.error('[ES] [http] Could not start [{0}]: node unreachable'.format(that.server));
+                that.started = true;
+                delete that._startPromise;
+                fallbackNodeIndex = 0; // reset the fallback node counter
+                return false;
+              }
+
+              // Add listeners
+              addListeners();
+
+              console.debug('[ES] [http] Started in '+(Date.now()-now)+'ms');
+              that.api.node.raise.start();
+
+              that.started = true;
+              delete that._startPromise;
+              fallbackNodeIndex = 0; // reset the fallback node counter
+
+
+              return true;
+            });
+        });
+      return that._startPromise;
+    };
+
+    that.stop = function() {
+      if (!that.started && !that._startPromise) return $q.when(); // Skip multiple call
+
+      console.debug('[ES] [http] Stopping...');
+
+      removeListeners();
+
+      setIsFallbackNode(false); // will be re-computed during start phase
+      delete that._startPromise;
+      if (that.alive) {
+        that.closeWs();
+        that.cleanCache();
+        that.alive = false;
+        that.started = false;
+        that.api.node.raise.stop();
+      }
+      else {
+        that.started = false;
+      }
+      return $q.when();
+    };
+
+    that.restart = function() {
+      that.stop();
+      return $timeout(that.start, 200);
+    };
+
+    function parseTagsFromText(value, prefix) {
+      prefix = prefix || '#';
+      var reg = prefix === '@' ? regexp.USER_TAG : regexp.HASH_TAG;
+      var matches = value && reg.exec(value);
+      var tags = matches && [];
+      while(matches) {
+        var tag = matches[1];
+        if (!_.contains(tags, tag)) {
+          tags.push(tag);
+        }
+        value = value.substr(matches.index + matches[1].length + 1);
+        matches = value.length > 0 && reg.exec(value);
+      }
+      return tags;
+    }
+
+    function parseUrlsFromText(value) {
+      var matches = value && regexp.URL.exec(value);
+      var urls = matches && [];
+      while(matches) {
+        var url = matches[0];
+        if (!_.contains(urls, url)) {
+          urls.push(url);
+        }
+        value = value.substr(matches.index + matches[0].length + 1);
+        matches = value && regexp.URL.exec(value);
+      }
+      return urls;
+    }
+
+    function parseMarkdownTitlesFromText(value, prefix, suffix) {
+      prefix = prefix || '##';
+      var reg = match('(?:^|[\\r\\s])('+prefix+'([^#></]+)' + (suffix||'') + ')');
+      var matches = value && reg.exec(value);
+      var lines = matches && [];
+      var res = matches && [];
+      while(matches) {
+        var line = matches[1];
+        if (!_.contains(lines, line)) {
+          lines.push(line);
+          res.push({
+            line: line,
+            title: matches[2]
+          });
+        }
+        value = value.substr(matches.index + matches[1].length + 1);
+        matches = value.length > 0 && reg.exec(value);
+      }
+      return res;
+    }
+
+
+    function escape(text) {
+      if (!text) return text;
+      return text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
+    }
+
+    function parseAsHtml(text, options) {
+
+      var content = text ? escape(text.trim()) : undefined;
+      if (content) {
+        options = options || {};
+        options.tagState = options.tagState || 'app.wot_lookup.tab_search';
+        options.uidState = options.uidState || 'app.wot_identity_uid';
+        if (options.newLine || !angular.isDefined(options.newLine)) {
+          content = content.replace(/\n/g, '<br>\n');
+        }
+
+        // Replace URL in description
+        var urls = parseUrlsFromText(content);
+        _.forEach(urls, function(url){
+          // Make sure protocol is defined
+          var href = (url.startsWith('http://') || url.startsWith('https://')) ? url : ('http://' + url);
+          // Redirect URL to the function 'openLink', to open a new window if need (e.g. desktop app)
+          var link = '<a on-tap=\"openLink($event, \'{0}\')\" href=\"{1}\" target="_blank">{2}</a>'.format(href, href, truncUrlFilter(url));
+          content = content.replace(url, link);
+        });
+
+        // Replace hashtags
+        var hashTags = parseTagsFromText(content);
+        _.forEach(hashTags, function(tag){
+          var link = '<a ui-sref=\"{0}({hash: \'{1}\'})\">#{2}</a>'.format(options.tagState, tag, tag);
+          content = content.replace('#'+tag, link);
+        });
+
+        // Replace user tags
+        var userTags = parseTagsFromText(content, '@');
+        _.forEach(userTags, function(tag){
+          var link = '<a ui-sref=\"{0}({uid: \'{1}\'})\">@{2}</a>'.format(options.uidState, tag, tag);
+          content = content.replace('@'+tag, link);
+        });
+
+        // Replace markdown titles
+        var titles = parseMarkdownTitlesFromText(content, '#+[ ]*', '<br>');
+        _.forEach(titles, function(matches){
+          var size = matches.line.lastIndexOf('#', 5)+1;
+          content = content.replace(matches.line, '<h{0}>{1}</h{2}>'.format(size, matches.title, size));
+        });
+      }
+      return content;
+    }
+
+    function fillRecordTags(record, fieldNames) {
+      fieldNames = fieldNames || ['title', 'description'];
+
+      record.tags = fieldNames.reduce(function(res, fieldName) {
+        var value = record[fieldName];
+        var tags = value && parseTagsFromText(value);
+        return tags ? res.concat(tags) : res;
+      }, []);
+    }
+
+    function findObjectInTree(obj, attrName) {
+      if (!obj) return;
+      if (obj[attrName]) return obj[attrName];
+      if (Array.isArray(obj)) {
+        return obj.reduce(function(res, item) {
+          return res ? res : findObjectInTree(item, attrName);
+        }, false);
+      }
+      else if (typeof obj == "object") {
+        return _.reduce(_.keys(obj), function (res, key) {
+          return res ? res : findObjectInTree(obj[key], attrName);
+        }, false);
+      }
+    }
+
+    function postRecord(path, options) {
+      options = options || {};
+      var postRequest = that.post(path);
+      return function(record, params) {
+        params = params || {};
+        var wallet = params.wallet || (params.walletId && csWallet.children.get(params.walletId)) ||
+          ((!params.pubkey || csWallet.isUserPubkey(params.pubkey)) && csWallet) ||
+          (params.pubkey && csWallet.children.getByPubkey(params.pubkey));
+
+        var keypair = params.keypair || wallet && wallet.data && wallet.data.keypair;
+
+        if (!keypair && !wallet) {
+          throw new Error('Missing wallet or keypair, to sign record');
+        }
+
+        // Create the POSt request params,
+        // but BEFORE, remove protected options
+        delete params.wallet;
+        delete params.walletId;
+        delete params.keypair;
+        var postParams = angular.copy(params);
+        postParams.pubkey = postParams.pubkey || wallet.data.pubkey;
+
+        return (wallet.isAuth() ? $q.when(wallet.data) : wallet.auth({silent: true, minData: true}))
+          .then(function() {
+            if (params.creationTime && !record.creationTime) {
+              record.creationTime = moment().utc().unix();
+            }
+            // Always update the time - fix #572
+            // Make sure time is always > previous (required by ES node)
+            var now = moment().utc().unix();
+            record.time = (!record.time || record.time < now) ? now : (record.time+1);
+
+            var obj = angular.copy(record);
+            delete obj.signature;
+            delete obj.hash;
+            obj.issuer = postParams.pubkey; // force keypair pubkey
+            if (!obj.version) {
+              obj.version = 2;
+            }
+
+            // Fill tags
+            if (options.tagFields) {
+              fillRecordTags(obj, options.tagFields);
+            }
+
+            // Remove unused fields
+            if (options.ignoreFields) {
+              _.forEach(options.ignoreFields, function(key) {
+                if (angular.isDefined(obj[key])) {
+                  delete obj[key];
+                }
+              });
+            }
+
+            var str = JSON.stringify(obj);
+
+            return CryptoUtils.util.hash(str)
+              .then(function(hash) {
+                return CryptoUtils.sign(hash, keypair)
+                  .then(function(signature) {
+                    // Prepend hash+signature
+                    str = '{"hash":"{0}","signature":"{1}",'.format(hash, signature) + str.substring(1);
+                    // Send data
+                    return postRequest(str, postParams)
+                      .then(function (id){
+
+                        // Clear cache
+                        csCache.clear(cachePrefix);
+
+                        return id;
+                      })
+                      .catch(function(err) {
+                        var bodyLength = that.byteCount(obj);
+                        if (bodyLength > constants.MAX_UPLOAD_BODY_SIZE) {
+                          throw {message: 'ERROR.ES_MAX_UPLOAD_BODY_SIZE', length: bodyLength};
+                        }
+                        throw err;
+                      });
+                  });
+              });
+          });
+      };
+    }
+
+    function countRecords(index, type, cacheTime) {
+      var getRequest = that.get("/{0}/{1}/_search?size=0".format(index, type), cacheTime);
+      return function(params) {
+        return getRequest(params)
+            .then(function(res) {
+              return res && res.hits && res.hits.total;
+            });
+      };
+    }
+
+    function removeRecord(index, type) {
+      return function(id, options) {
+        options = options || {};
+        var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+        return (wallet.isAuth() ? $q.when(wallet.data) : wallet.auth({silent: true, minData: true}))
+          .then(function(walletData) {
+
+            var obj = {
+              version: 2,
+              index: index,
+              type: type,
+              id: id,
+              issuer: walletData.pubkey,
+              time: moment().utc().unix()
+            };
+            var str = JSON.stringify(obj);
+            return CryptoUtils.util.hash(str)
+              .then(function (hash) {
+                return CryptoUtils.sign(hash, walletData.keypair)
+                  .then(function (signature) {
+                    // Prepend hash+signature
+                    str = '{"hash":"{0}","signature":"{1}",'.format(hash, signature) + str.substring(1);
+                    // Send data
+                    return that.post('/history/delete')(str)
+                      .then(function (id) {
+                        return id;
+                      });
+                  });
+              });
+          });
+      };
+    }
+
+    that.image = {};
+
+    function imageFromAttachment(attachment) {
+      if (!attachment || !attachment._content_type || !attachment._content || attachment._content.length === 0) {
+        return null;
+      }
+      var image = {
+        src: "data:" + attachment._content_type + ";base64," + attachment._content
+      };
+      if (attachment._title) {
+        image.title = attachment._title;
+      }
+      if (attachment._name) {
+        image.name = attachment._name;
+      }
+      return image;
+    }
+
+    function imageToAttachment(image) {
+      if (!image || !image.src) return null;
+      var match = regexp.IMAGE_SRC.exec(image.src);
+      if (!match) return null;
+      var attachment = {
+        _content_type: match[1],
+        _content: match[2]
+      };
+      if (image.title) {
+        attachment._title = image.title;
+      }
+      if (image.name) {
+        attachment._name = image.name;
+      }
+      return attachment;
+    }
+
+    /**
+     * This will create a image (src, title, name) using the _content is present, or computing a image URL to the ES node
+     * @param host
+     * @param port
+     * @param hit
+     * @param imageField
+     * @returns {{}}
+     */
+    that.image.fromHit = function(hit, imageField) {
+      if (!hit || !hit._source) return;
+      var attachment =  hit._source[imageField];
+      if (!attachment || !attachment._content_type || !attachment._content_type.startsWith("image/")) return;
+      var image = {};
+      // If full content: then use it directly
+      if (attachment._content) {
+        image.src = "data:" + attachment._content_type + ";base64," + attachment._content;
+      }
+      // Compute an url
+      else {
+        var extension = attachment._content_type.substr(6);
+        var path = [hit._index, hit._type, hit._id, '_image', imageField].join('/');
+        path = '/' + path + '.' + extension;
+        image.src = that.getUrl(path);
+      }
+      if (attachment._title) {
+        image.title = attachment._title;
+      }
+      if (attachment._name) {
+        image.name = attachment._name;
+      }
+      return image;
+    };
+
+    function parseEndPoint(endpoint) {
+      var matches = regexp.API_ENDPOINT.exec(endpoint);
+      if (!matches) return;
+      return {
+        "api": matches[1] || '',
+        "dns": matches[2] || '',
+        "ipv4": matches[3] || '',
+        "ipv6": matches[4] || '',
+        "port": matches[5] || 80,
+        "path": matches[6] || '',
+        "useSsl": matches[5] == 443
+      };
+    }
+
+    function emptyHit() {
+      return {
+        _id: null,
+        _index: null,
+        _type: null,
+        _version: null,
+        _source: {}
+      };
+    }
+
+    // Get latest release, of Cesium+ pod
+    function getLatestVersion() {
+      var getRequest = that.raw.getLatestRelease;
+      if (!getRequest) {
+        var url = csHttp.uri.parse(csSettings.data.plugins.es.latestReleaseUrl);
+        var useSsl = (url.port == 443 || url.protocol === 'https:' || forceUseSsl);
+        getRequest = csHttp.getWithCache(url.host, url.port, "/" + url.pathname, useSsl, csCache.constants.LONG);
+        that.raw.getLatestRelease = getRequest
+      }
+
+      return getRequest()
+        .then(function (json) {
+          if (!json) return;
+          if (json.name && json.html_url) {
+            return {
+              version: json.name,
+              url: json.html_url
+            };
+          }
+          if (json.tag_name && json.html_url) {
+            return {
+              version: json.tag_name.substring(1),
+              url: json.html_url
+            };
+          }
+        })
+        .catch(function(err) {
+          // silent (just log it)
+          console.error('[BMA] Failed to get Duniter latest version', err);
+        });
+    }
+
+    function addListeners() {
+      // Watch some service events
+      listeners = [
+        csSettings.api.data.on.reset($rootScope, onSettingsReset, that)
+      ];
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    // Define events
+    that.api.registerEvent('node', 'start');
+    that.api.registerEvent('node', 'stop');
+
+
+    var exports = {
+      getServer: csHttp.getServer,
+      node: {
+        summary: that.get('/node/summary'),
+        moderators: that.get('/node/moderators'),
+        parseEndPoint: parseEndPoint,
+        same: isSameNode,
+        sameAsSettings: isSameNodeAsSettings,
+        isFallback: isFallbackNode
+      },
+      version: {
+        latest: getLatestVersion
+      },
+      websocket: {
+        changes: that.wsChanges,
+        block: that.ws('/ws/block'),
+        peer: that.ws('/ws/peer')
+      },
+      wot: {
+        member: {
+          uids : that.get('/wot/members')
+        }
+      },
+      network: {
+        peering: {
+          self: that.get('/network/peering')
+        },
+        peers: that.get('/network/peers')
+      },
+      blockchain: {
+        current: that.get('/blockchain/current?_source=number,hash,medianTime')
+      },
+      record: {
+        post: postRecord,
+        remove: removeRecord,
+        count : countRecords
+      },
+      image: {
+        fromAttachment: imageFromAttachment,
+        toAttachment: imageToAttachment
+      },
+      hit: {
+        empty: emptyHit
+      },
+      util: {
+        parseTags: parseTagsFromText,
+        parseAsHtml: parseAsHtml,
+        findObjectInTree: findObjectInTree
+      },
+      constants: constants
+    };
+    exports.constants.regexp = regexp;
+    angular.merge(that, exports);
+  }
+
+
+  var service = new EsHttp(undefined, undefined, undefined, true);
+
+  service.instance = function(host, port, useSsl, enableCache) {
+    return new EsHttp(host, port, useSsl, enableCache);
+  };
+
+  service.lightInstance = function(host, port, useSsl, timeout) {
+    port = port || 80;
+    useSsl = angular.isDefined(useSsl) ? useSsl : (+port === 443);
+
+    function countHits(path, params) {
+      return csHttp.get(host, port, path)(params)
+        .then(function(res) {
+          return res && res.hits && res.hits.total;
+        });
+    }
+
+    function countRecords(index, type) {
+      return countHits("/{0}/{1}/_search?size=0".format(index, type));
+    }
+
+    function countSubscriptions(params) {
+      var queryString = _.keys(params||{}).reduce(function(res, key) {
+        return (res && (res + " AND ") || "") + key + ":" + params[key];
+      }, '');
+      return countHits("/subscription/record/_search?size=0&q=" + queryString);
+    }
+
+    return {
+      host: host,
+      port: port,
+      useSsl: useSsl,
+      node: {
+        summary: csHttp.getWithCache(host, port, '/node/summary', useSsl, csHttp.cache.LONG, false, timeout)
+      },
+      network: {
+        peering: {
+          self: csHttp.get(host, port, '/network/peering', useSsl, timeout)
+        },
+        peers: csHttp.get(host, port, '/network/peers', useSsl, timeout)
+      },
+      blockchain: {
+        current: csHttp.get(host, port, '/blockchain/current?_source=number,hash,medianTime', useSsl, timeout)
+      },
+      record: {
+        count: countRecords
+      },
+      subscription: {
+        count: countSubscriptions
+      }
+    };
+  };
+
+  return service;
+}])
+;
+
+angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.http.services'])
+.config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esSettings');
+    }
+
+  }])
+
+.factory('esSettings', ['$rootScope', '$q', '$timeout', 'Api', 'esHttp', 'csConfig', 'csSettings', 'CryptoUtils', 'Device', 'UIUtils', 'csWallet', function($rootScope, $q, $timeout, Api, esHttp,
+                            csConfig, csSettings, CryptoUtils, Device, UIUtils, csWallet) {
+  'ngInject';
+
+  var
+    SETTINGS_SAVE_SPEC = {
+      includes: ['locale', 'showUDHistory', 'useRelative', 'useLocalStorage', 'useLocalStorageEncryption', 'expertMode', 'logoutIdle', 'blockValidityWindow'],
+      excludes: ['timeout', 'cacheTimeMs', 'version', 'build', 'minVersion', 'fallbackLanguage'],
+      plugins: {
+        es: {
+          excludes: ['enable', 'host', 'port', 'useSsl', 'fallbackNodes', 'enableGoogleApi', 'googleApiKey', 'document', 'maxUploadBodySize', 'defaultCountry'],
+          notifications: {
+          }
+        }
+      },
+      wallet: {
+        includes: ['alertIfUnusedWallet'],
+        excludes: ['notificationReadTime'] // deprecated - should be removed later
+      },
+      helptip: {
+        excludes: ['installDocUrl']
+      },
+      notifications: {
+        excludes: ['time', 'warnCount', 'unreadCount']
+      }
+    },
+    defaultSettings = angular.merge({
+        plugins: {
+          es: {
+            askEnable: false,
+            useRemoteStorage: true,
+            latestReleaseUrl: "https://api.github.com/repos/duniter/cesium-plus-pod/releases/latest",
+            notifications: {
+              txSent: true,
+              txReceived: true,
+              certSent: true,
+              certReceived: true,
+              emitHtml5: false
+            },
+            invitations: {
+              readTime: true
+            },
+            defaultCountry: undefined,
+            enableGoogleApi: false,
+            googleApiKey: undefined,
+            wot: {
+              enableMixedSearch: true
+            },
+            document: {
+              index: 'user,page,group',
+              type: 'profile,record,comment'
+            },
+            registry: {
+              defaultSearch: {
+                location: null,
+                geoPoint: null
+              }
+            },
+            geoDistance: '20km'
+          }
+        }
+    }, {plugins: {es: csConfig.plugins && csConfig.plugins.es || {}}}),
+    that = this,
+    api = new Api('esSettings'),
+    previousRemoteData,
+    listeners,
+    ignoreSettingsChanged = false,
+    failEnable = false
+  ;
+
+  that.api = api;
+  that.get = esHttp.get('/user/settings/:id');
+  that.add = esHttp.record.post('/user/settings');
+  that.update = esHttp.record.post('/user/settings/:id/_update');
+
+  that.isEnable = function() {
+    return csSettings.data.plugins &&
+      csSettings.data.plugins.es &&
+      csSettings.data.plugins.es.enable &&
+      !!csSettings.data.plugins.es.host;
+  };
+
+  that.notifications = {};
+  that.notifications.isEmitHtml5Enable = function() {
+    return that.isEnable() &&
+      csSettings.data.plugins.es.notifications &&
+      angular.isDefined(csSettings.data.plugins.es.notifications.emitHtml5) ? csSettings.data.plugins.es.notifications.emitHtml5 : false;
+  };
+
+  that.wot = {};
+  that.wot.isMixedSearchEnable = function() {
+    return that.isEnable() &&
+      (angular.isDefined(csSettings.data.plugins.es.wot && csSettings.data.plugins.es.wot.enableMixedSearch) ?
+        csSettings.data.plugins.es.wot.enableMixedSearch : true);
+  };
+
+  function copyUsingSpec(data, copySpec) {
+    var result = {};
+
+    // Add implicit includes
+    if (copySpec.includes) {
+      _.forEach(_.keys(copySpec), function(key) {
+        if (key != "includes" && key != "excludes") {
+          copySpec.includes.push(key);
+        }
+      });
+    }
+
+    _.forEach(_.keys(data), function(key) {
+      if ((!copySpec.includes || _.contains(copySpec.includes, key)) &&
+        (!copySpec.excludes || !_.contains(copySpec.excludes, key))) {
+        if (data[key] && (typeof data[key] == 'object') &&
+          copySpec[key] && (typeof copySpec[key] == 'object')) {
+          result[key] = copyUsingSpec(data[key], copySpec[key]);
+        }
+        else {
+          result[key] = data[key];
+        }
+      }
+    });
+    return result;
+  }
+
+  // Load settings
+  function loadSettings(pubkey, boxKeypair) {
+    var now = Date.now();
+    return that.get({id: pubkey})
+        .catch(function(err){
+          if (err && err.ucode && err.ucode == 404) {
+            return null; // not found
+          }
+          else {
+            throw err;
+          }
+        })
+      .then(function(res) {
+        if (!res || !res._source) {
+          return;
+        }
+        var record = res._source;
+        // Do not apply if same version
+        if (record.time === csSettings.data.time) {
+          console.debug('[ES] [settings] Loaded in '+ (Date.now()-now) +'ms, but already up to date');
+          return;
+        }
+        var nonce = CryptoUtils.util.decode_base58(record.nonce);
+        // Decrypt settings content
+        return CryptoUtils.box.open(record.content, nonce, boxKeypair.boxPk, boxKeypair.boxSk)
+          .then(function(json) {
+            var settings = JSON.parse(json || '{}');
+            settings.time = record.time;
+            console.debug('[ES] [settings] Loaded and decrypted in '+ (Date.now()-now) +'ms');
+            return settings;
+          })
+          // if error: skip stored content
+          .catch(function(err){
+            console.error('[ES] [settings] Could not load remote settings: ' + (err && err.message || 'decryption error'));
+            // make sure to remove time, to be able to save it again
+            delete csSettings.data.time;
+            return null;
+          });
+      });
+  }
+
+  function onSettingsReset(data, deferred) {
+    deferred = deferred || $q.defer();
+    angular.merge(data, defaultSettings);
+
+    failEnable = false;
+    deferred.resolve(data);
+    return deferred.promise;
+  }
+
+  function onWalletAuth(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey || !data.keypair || !data.keypair.signSk || !data.keypair.boxSk) {
+      deferred.resolve();
+      return deferred.promise;
+    }
+
+    console.debug('[ES] [settings] Loading user settings...');
+
+    // Load settings
+    loadSettings(data.pubkey, data.keypair)
+      .then(function(settings) {
+        if (!settings) return; // not found or up to date
+        angular.merge(csSettings.data, settings);
+
+        // Remember for comparison
+        previousRemoteData = settings;
+
+        console.debug('[ES] [settings] Applied');
+        return storeSettingsLocally();
+      })
+    .then(function() {
+      deferred.resolve(data);
+    })
+    .catch(function(err){
+      deferred.reject(err);
+    });
+
+    return deferred.promise;
+  }
+
+  // Listen for settings changed
+  function onSettingsChanged(data) {
+    // avoid recursive call, because storeSettingsLocally() could emit event again
+    if (ignoreSettingsChanged) return;
+
+    var wasEnable = listeners && listeners.length > 0;
+
+    // Force to stop & restart, if ES node has changed
+    if (esHttp.isStarted() && !esHttp.node.isFallback() && !esHttp.node.sameAsSettings(data)) {
+      stop();
+    }
+
+    refreshState();
+
+    var isEnable = that.isEnable();
+    if (isEnable && csWallet.isAuth()) {
+      if (!wasEnable) {
+        onWalletAuth(csWallet.data);
+      }
+      else {
+        storeSettingsRemotely(data);
+      }
+    }
+  }
+
+  function storeSettingsLocally() {
+    if (ignoreSettingsChanged) return $q.when();
+    ignoreSettingsChanged = true;
+    return csSettings.store()
+      .then(function(){
+        ignoreSettingsChanged = false;
+      })
+      .catch(function(err) {
+        ignoreSettingsChanged = false;
+        throw err;
+      });
+  }
+
+  function storeSettingsRemotely(data) {
+    var filteredData = copyUsingSpec(data, SETTINGS_SAVE_SPEC);
+    if (previousRemoteData && angular.equals(filteredData, previousRemoteData)) {
+      return $q.when();
+    }
+
+    // Skip remote saving, if remote storage disable
+    if (!csSettings.data.plugins.es.useRemoteStorage) {
+      return storeSettingsLocally();
+    }
+
+    var time = moment().utc().unix(); // always update time
+    console.debug('[ES] [settings] Saving user settings remotely...');
+
+    return $q.all([
+        csWallet.getKeypair(), // same result as esWallet.box.getKeypair(), because box keypair computed on auth
+        CryptoUtils.util.random_nonce()
+      ])
+      .then(function(res) {
+        var boxKeypair = res[0];
+        var nonce = res[1];
+
+        // Make sure user has not disconnect
+        // This can occur, when auth + disabling ES plugin in settings
+        if (!boxKeypair.boxPk || !boxKeypair.boxSk) return;
+
+        var record = {
+          issuer: csWallet.data.pubkey,
+          nonce: CryptoUtils.util.encode_base58(nonce),
+          time: time
+        };
+
+        //console.debug("Will store settings remotely: ", filteredData);
+        var json = JSON.stringify(filteredData);
+
+        return CryptoUtils.box.pack(json, nonce, boxKeypair.boxPk, boxKeypair.boxSk)
+          .then(function(cypherText) {
+            record.content = cypherText;
+            // create or update
+            return angular.isUndefined(data.time) ?
+              that.add(record) :
+              that.update(record, {id: record.issuer})
+                .catch(function(err) {
+                  // Workaround if update failed: try to add() instead
+                  // Can occur when changing the cesium+ pod
+                  if (err && err.ucode == 404) return that.add(record);
+                  throw err;
+                });
+          })
+          .then(function() {
+            return true;
+          });
+      })
+      .then(function(saved) {
+        if (!saved) return;
+        // Update settings version, then store (on local store only)
+        data.time = time;
+        previousRemoteData = filteredData;
+        console.debug('[ES] [settings] Saved user settings remotely in ' + (moment().utc().unix() - time) + 'ms');
+        return storeSettingsLocally();
+      })
+      .catch(function(err) {
+        console.error(err);
+        throw err;
+      })
+    ;
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function addListeners() {
+    // Extend csWallet.login()
+    listeners = [
+      csSettings.api.data.on.reset($rootScope, onSettingsReset, this),
+      csWallet.api.data.on.auth($rootScope, onWalletAuth, this)
+    ];
+  }
+
+  function stop() {
+    removeListeners();
+    esHttp.stop();
+  }
+
+  function refreshState() {
+    var enable = that.isEnable();
+
+    // Disable
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [settings] Disable");
+      removeListeners();
+
+      // Force ES node to stop
+      return esHttp.stop()
+        .then(function() {
+          // Emit event
+          api.state.raise.changed(enable);
+        });
+    }
+
+    // Enable
+    else if (enable && (!listeners || listeners.length === 0 || !esHttp.isStarted()) ) {
+      return esHttp.start()
+        .then(function(alive) {
+          if (!alive) {
+            csSettings.data.plugins.es.enable = false;
+            // Will ask user to enable ES plugins (WARN: if config.js allow it)
+            csSettings.data.plugins.es.askEnable = true;
+            failEnable = true;
+
+            api.state.raise.changed(false);
+            console.error('[ES] [settings] Disable, has ES node could not be started');
+            return;
+          }
+          console.debug("[ES] [settings] Enable");
+          addListeners();
+
+          if (csWallet.isAuth()) {
+            return onWalletAuth(csWallet.data)
+              .then(function() {
+                // Emit event
+                api.state.raise.changed(enable);
+              });
+          }
+          else {
+            // Emit event
+            api.state.raise.changed(enable);
+          }
+        });
+    }
+  }
+
+  api.registerEvent('state', 'changed');
+
+  csSettings.ready().then(function() {
+
+    csSettings.api.data.on.changed($rootScope, onSettingsChanged, this);
+    esHttp.api.node.on.stop($rootScope, function() {
+      previousRemoteData = null;
+    }, this);
+    return refreshState();
+  })
+
+  .then(function() {
+    // Ask (once) user to enable ES plugin
+    if (!failEnable && // If NOT trying to start just before
+      csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.askEnable && // AND if config ask enable
+      !that.isEnable() && // AND user settings has disable plugin
+      csSettings.data.plugins.es.askEnable // AND user has not yet answer 'NO'
+    ) {
+
+      return UIUtils.alert.confirm('ES_SETTINGS.CONFIRM.ASK_ENABLE', 'ES_SETTINGS.CONFIRM.ASK_ENABLE_TITLE',
+        {
+          cancelText: 'COMMON.BTN_NO',
+          okText: 'COMMON.BTN_YES'
+        })
+        .then(function (confirm) {
+          if (confirm) {
+            csSettings.data.plugins.es.enable = true;
+          }
+          csSettings.data.plugins.es.askEnable = false;
+          return csSettings.store();
+        });
+    }
+  });
+
+  return that;
+}]);
+
+angular.module('cesium.es.registry.services', ['ngResource', 'cesium.services', 'cesium.es.http.services', 'cesium.es.like.services'])
+.config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+  'ngInject';
+
+  var enable = csConfig.plugins && csConfig.plugins.es;
+  if (enable) {
+    // Will force to load this service
+    PluginServiceProvider.registerEagerLoadingService('esRegistry');
+  }
+
+}])
+
+.factory('esRegistry', ['$rootScope', '$q', 'csPlatform', 'csSettings', 'csWallet', 'csWot', 'esHttp', 'esComment', 'esLike', 'esGeo', function($rootScope, $q, csPlatform, csSettings, csWallet, csWot, esHttp, esComment, esLike, esGeo) {
+  'ngInject';
+
+  var
+    fields = {
+      commons: ["title", "description", "issuer", "time", "address", "city", "creationTime", "avatar._content_type",
+        "picturesCount", "type", "category", "socials", "pubkey",
+        "geoPoint"
+      ]
+    },
+    that = this,
+    listeners;
+
+  that.raw = {
+    count: esHttp.get('/page/record/_search?size=0&q=issuer::pubkey'),
+    searchText: esHttp.get('/page/record/_search?q=:search'),
+    search: esHttp.post('/page/record/_search'),
+    get: esHttp.get('/page/record/:id'),
+    getCommons: esHttp.get('/page/record/:id?_source=' + fields.commons.join(',')),
+    category: {
+      get: esHttp.get('/page/category/:id'),
+      all: esHttp.get('/page/category/_search?sort=order&from=0&size=1000&_source=name,parent')
+    }
+  };
+
+  function onWalletReset(data) {
+    data.pages = null;
+  }
+
+  function onWalletLoad(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey || !data.keypair) {
+      deferred.resolve();
+      return deferred.promise;
+    }
+
+    console.debug('[ES] [registry] Loading pages count...');
+
+    // Load subscriptions count
+    that.raw.count({pubkey: data.pubkey})
+      .then(function(res) {
+        data.pages = data.pages || {};
+        data.pages.count = res && res.hits && res.hits.total;
+        console.debug('[ES] [registry] Loaded pages count (' + data.pages.count  + ')');
+        deferred.resolve(data);
+      })
+      .catch(function(err) {
+        console.error('[ES] [registry] Error while counting page: ' + (err.message ? err.message : err));
+        deferred.resolve(data);
+      });
+
+    return deferred.promise;
+  }
+
+  function getCategories() {
+    if (that.raw.categories && that.raw.categories.length) {
+      var deferred = $q.defer();
+      deferred.resolve(that.raw.categories);
+      return deferred.promise;
+    }
+    return that.raw.category.all()
+      .then(function(res) {
+        if (res.hits.total === 0) {
+          that.raw.categories = [];
+        }
+        else {
+          var categories = res.hits.hits.reduce(function(result, hit) {
+            var cat = hit._source;
+            cat.id = hit._id;
+            return result.concat(cat);
+          }, []);
+          // add as map also
+          _.forEach(categories, function(cat) {
+            categories[cat.id] = cat;
+          });
+          that.raw.categories = categories;
+        }
+        return that.raw.categories;
+      });
+  }
+
+  function getCategory(params) {
+    return that.raw.category.get(params)
+      .then(function(hit) {
+        var res = hit._source;
+        res.id = hit._id;
+        return res;
+      });
+  }
+
+  function readRecordFromHit(hit, categories) {
+    if (!hit) return;
+    var record = hit._source;
+    if (record.category && record.category.id) {
+      record.category = categories[record.category.id];
+    }
+    if (hit.highlight) {
+      if (hit.highlight.title) {
+        record.title = hit.highlight.title[0];
+      }
+      if (hit.highlight.description) {
+        record.description = hit.highlight.description[0];
+      }
+      if (hit.highlight.location) {
+        record.location = hit.highlight.location[0];
+      }
+      if (hit.highlight.tags) {
+        record.tags = hit.highlight.tags.reduce(function(res, tag){
+          return res.concat(tag.replace('<em>', '').replace('</em>', ''));
+        },[]);
+      }
+    }
+
+    // avatar
+    record.avatar = esHttp.image.fromHit(hit, 'avatar');
+
+    // pictures
+    if (hit._source.pictures && hit._source.pictures.reduce) {
+      record.pictures = hit._source.pictures.reduce(function(res, pic) {
+        return res.concat(esHttp.image.fromAttachment(pic.file));
+      }, []);
+    }
+
+    return record;
+  }
+
+
+  function search(request) {
+    request = request || {};
+    request.from = request.from || 0;
+    request.size = request.size || 20;
+    request._source = request._source || fields.commons;
+    request.highlight = request.highlight || {
+        fields : {
+          title : {},
+          description : {}
+        }
+    };
+
+    return $q.all([
+        // load categories
+        getCategories(),
+        // Do search
+        that.raw.search(request)
+      ])
+      .then(function(res) {
+        var categories = res[0];
+        res = res[1];
+
+        if (!res || !res.hits || !res.hits.total) {
+          return {
+            total: 0,
+            hits: []
+          };
+        }
+
+        // Get geo_distance filter
+        var geoDistanceObj = esHttp.util.findObjectInTree(request.query, 'geo_distance');
+        var geoPoint = geoDistanceObj && geoDistanceObj.geoPoint;
+        var geoDistanceUnit = geoDistanceObj && geoDistanceObj.distance && geoDistanceObj.distance.replace(new RegExp("[0-9 ]+", "gm"), '');
+
+        var hits = res.hits.hits.reduce(function(result, hit) {
+          var record = readRecordFromHit(hit, categories);
+          record.id = hit._id;
+
+          // Add distance to point
+          if (geoPoint && record.geoPoint && geoDistanceUnit) {
+            record.distance = esGeo.point.distance(
+              geoPoint.lat, geoPoint.lon,
+              record.geoPoint.lat, record.geoPoint.lon,
+              geoDistanceUnit
+            );
+          }
+          return result.concat(record);
+        }, []);
+
+        return {
+          total: res.hits.total,
+          hits: hits
+        };
+      });
+  }
+
+  function loadData(id, options) {
+    options = options || {};
+    options.raw = angular.isDefined(options.raw) ? options.raw : false;
+    options.fecthPictures = angular.isDefined(options.fetchPictures) ? options.fetchPictures : options.raw;
+
+    return $q.all([
+
+      // load categories
+      getCategories(),
+
+      // Do get source
+      options.fecthPictures ?
+        that.raw.get({id: id}) :
+        that.raw.getCommons({id: id})
+    ])
+    .then(function(res) {
+      var categories = res[0];
+      var hit = res[1];
+      var record = readRecordFromHit(hit, categories);
+
+      // parse description as Html
+      if (!options.raw) {
+        record.description = esHttp.util.parseAsHtml(record.description, {
+          tagState: 'app.wot_lookup.tab_registry'
+        });
+      }
+
+      // Load issuer (avatar, name, uid, etc.)
+      return csWot.extend({pubkey: record.issuer})
+        .then(function(issuer) {
+          return {
+            id: hit._id,
+            issuer: issuer,
+            record: record
+          };
+        });
+    });
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function addListeners() {
+    // Extend
+    listeners = [
+      csWallet.api.data.on.load($rootScope, onWalletLoad, this),
+      csWallet.api.data.on.init($rootScope, onWalletReset, this),
+      csWallet.api.data.on.reset($rootScope, onWalletReset, this)
+    ];
+  }
+
+  function refreshState() {
+    var enable = esHttp.alive;
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [subscription] Disable");
+      removeListeners();
+      if (csWallet.isLogin()) {
+        return onWalletReset(csWallet.data);
+      }
+    }
+    else if (enable && (!listeners || listeners.length === 0)) {
+      console.debug("[ES] [subscription] Enable");
+      addListeners();
+      if (csWallet.isLogin()) {
+        return onWalletLoad(csWallet.data);
+      }
+    }
+  }
+
+  // Default actions
+  csPlatform.ready().then(function() {
+    esHttp.api.node.on.start($rootScope, refreshState, this);
+    esHttp.api.node.on.stop($rootScope, refreshState, this);
+    return refreshState();
+  });
+
+  that.category = {
+      all: getCategories,
+      get: getCategory
+    };
+  that.record = {
+      search: search,
+      load: loadData,
+      add: esHttp.record.post('/page/record', {tagFields: ['title', 'description'], creationTime: true}),
+      update: esHttp.record.post('/page/record/:id/_update', {tagFields: ['title', 'description']}),
+      remove: esHttp.record.remove('page', 'record'),
+      fields: {
+        commons: fields.commons
+      },
+      picture: {
+        all: esHttp.get('/page/record/:id?_source=pictures')
+      },
+      like: esLike.instance('page', 'record'),
+      comment: esComment.instance('page')
+    };
+  that.currency = {
+      all: esHttp.get('/currency/record/_search?_source=currencyName,peers.host,peers.port'),
+      get: esHttp.get('/currency/record/:id/_source')
+    };
+  return that;
+}])
+;
+
+angular.module('cesium.es.social.services', ['cesium.es.crypto.services'])
+
+  .factory('SocialUtils', ['$filter', '$q', 'CryptoUtils', 'BMA', 'csWallet', 'esCrypto', '$timeout', function($filter, $q, CryptoUtils, BMA, csWallet, esCrypto, $timeout) {
+    'ngInject';
+
+    function SocialUtils() {
+
+      var
+        regexp = {
+          URI: "([a-zA−Z0-9]+)://[ a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",
+          EMAIL: "[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
+          PHONE: "[+]?[0-9. ]{9,15}",
+          socials: {
+            facebook: "https?://((fb.me)|((www.)?facebook.com))",
+            twitter: "https?://(www.)?twitter.com",
+            googleplus: "https?://plus.google.com(/u)?",
+            youtube: "https?://(www.)?youtube.com",
+            github: "https?://(www.)?github.com",
+            tumblr: "https?://(www.)?tumblr.com",
+            snapchat: "https?://(www.)?snapchat.com",
+            linkedin: "https?://(www.)?linkedin.com",
+            vimeo: "https?://(www.)?vimeo.com",
+            instagram: "https?://(www.)?instagram.com",
+            wordpress: "https?://([a-z]+)?wordpress.com",
+            diaspora: "https?://(www.)?((diaspora[-a-z]+)|(framasphere)).org",
+            duniter: "duniter://[a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",
+            bitcoin: "bitcoin://[a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+",
+            curve25519: "curve25519://(" + BMA.constants.regexp.PUBKEY + "):([a-zA-Z0-9]+)@([a-zA-Z0-9-_:/;*?!^\\+=@&~#|<>%.]+)"
+          }
+        }
+        ;
+
+      function exact(regexpContent) {
+        return new RegExp("^" + regexpContent + "$");
+      }
+
+      regexp.URI = exact(regexp.URI);
+      regexp.EMAIL = exact(regexp.EMAIL);
+      regexp.PHONE = exact(regexp.PHONE);
+      _.keys(regexp.socials).forEach(function(key){
+        regexp.socials[key] = exact(regexp.socials[key]);
+      });
+
+      function getTypeFromUrl(url){
+        var type;
+        if (regexp.URI.test(url)) {
+          var protocol = regexp.URI.exec(url)[1];
+          var urlToMatch = url;
+          if (protocol == 'http' || protocol == 'https') {
+            var slashPathIndex = url.indexOf('/', protocol.length + 3);
+            if (slashPathIndex > 0) {
+              urlToMatch = url.substring(0, slashPathIndex);
+            }
+          }
+          //console.debug("match URI, try to match: " + urlToMatch);
+          _.keys(regexp.socials).forEach(function(key){
+            if (regexp.socials[key].test(urlToMatch)) {
+              type = key;
+              return false; // stop
+            }
+          });
+          if (!type) {
+            type = 'web';
+          }
+        }
+        else if (regexp.EMAIL.test(url)) {
+          type = 'email';
+        }
+        else if (regexp.PHONE.test(url)) {
+          type = 'phone';
+        }
+        if (!type) {
+          console.warn("[ES] [social] Unable to detect type of social URL: " + url);
+        }
+        return type;
+      }
+
+      function getFromUrl(url) {
+        url = url ? url.trim() : url;
+        if (url && url.length > 0) {
+          if (url.startsWith('www.')) {
+            url = 'http://' + url;
+          }
+          return {
+            type: getTypeFromUrl(url),
+            url: url
+          };
+        }
+        return;
+      }
+
+      function reduceArray(socials) {
+        if (!socials || !socials.length) return [];
+        var map = {};
+        socials.forEach(function(social) {
+          if (social.type == 'curve25519') {
+            delete social.issuer;
+            if (social.valid) {
+              angular.merge(social, getFromUrl(social.url));
+            }
+          }
+          else {
+            // Retrieve object from URL, to get the right type (e.g. if new regexp)
+            social = getFromUrl(social.url);
+          }
+          if (social) {
+            var id = $filter('formatSlug')(social.url);
+            map[id] = social;
+          }
+        });
+        return _.values(map);
+      }
+
+      function createSocialForEncryption(recipient, dataToEncrypt) {
+        return {
+          recipient: recipient,
+          type: 'curve25519',
+          url: dataToEncrypt
+        };
+      }
+
+      function openArray(socials, issuer, recipient) {
+
+        recipient = recipient || csWallet.data.pubkey;
+
+        // Waiting to load crypto libs
+        if (!CryptoUtils.isLoaded()) {
+          console.debug('[socials] Waiting crypto lib loading...');
+          return $timeout(function() {
+            return openArray(socials, issuer, recipient);
+          }, 100);
+        }
+
+        var socialsToDecrypt = _.filter(socials||[], function(social){
+          var matches = social.url && social.type == 'curve25519' && regexp.socials.curve25519.exec(social.url);
+          if (!matches) return false;
+          social.recipient = matches[1];
+          social.nonce = matches[2];
+          social.url = matches[3];
+          social.issuer = issuer;
+          social.valid = (social.recipient === recipient);
+          return social.valid;
+        });
+        if (!socialsToDecrypt.length) return $q.when(reduceArray(socials));
+
+        return esCrypto.box.open(socialsToDecrypt, undefined/*=wallet keypair*/, 'issuer', 'url')
+          .then(function() {
+            // return all socials (encrypted or not)
+            return reduceArray(socials);
+          });
+      }
+
+      function packArray(socials) {
+        // Waiting to load crypto libs
+        if (!CryptoUtils.isLoaded()) {
+          console.debug('[socials] Waiting crypto lib loading...');
+          return $timeout(function() {
+            return packArray(socials);
+          }, 100);
+        }
+
+        var socialsToEncrypt = _.filter(socials||[], function(social){
+          return social.type == 'curve25519' && social.url && social.recipient;
+        });
+        if (!socialsToEncrypt.length) return $q.when(socials);
+
+        return CryptoUtils.util.random_nonce()
+          .then(function(nonce) {
+            return $q.all(socialsToEncrypt.reduce(function(res, social) {
+              return res.concat(esCrypto.box.pack(social, undefined/*=wallet keypair*/, 'recipient', 'url', nonce));
+            }, []));
+          })
+          .then(function(res){
+            return res.reduce(function(res, social) {
+              return res.concat({
+                type: 'curve25519',
+                url: 'curve25519://{0}:{1}@{2}'.format(social.recipient, social.nonce, social.url)
+              });
+            }, []);
+          });
+      }
+
+      return {
+        get: getFromUrl,
+        reduce: reduceArray,
+        // Encryption
+        createForEncryption: createSocialForEncryption,
+        open: openArray,
+        pack: packArray
+      };
+    }
+
+    var service = SocialUtils();
+    service.instance = SocialUtils;
+
+    return service;
+  }])
+;
+
+angular.module('cesium.es.crypto.services', ['ngResource', 'cesium.services'])
+
+.factory('esCrypto', ['$q', '$rootScope', 'CryptoUtils', function($q, $rootScope, CryptoUtils) {
+  'ngInject';
+
+
+  function getBoxKeypair(keypair) {
+    if (!keypair) {
+      throw new Error('Missing keypair');
+    }
+    if (keypair.boxPk && keypair.boxSk) {
+      return $q.when(keypair);
+    }
+
+    return $q.all([
+      CryptoUtils.box.keypair.skFromSignSk(keypair.signSk),
+      CryptoUtils.box.keypair.pkFromSignPk(keypair.signPk)
+    ])
+      .then(function(res) {
+        return {
+          boxSk: res[0],
+          boxPk: res[1]
+        };
+      });
+  }
+
+  function packRecordFields(record, keypair, recipientFieldName, cypherFieldNames, nonce) {
+
+    recipientFieldName = recipientFieldName || 'recipient';
+    if (!record[recipientFieldName]) {
+      return $q.reject({message:'ES_WALLET.ERROR.RECIPIENT_IS_MANDATORY'});
+    }
+
+    cypherFieldNames = cypherFieldNames || 'content';
+    if (typeof cypherFieldNames == 'string') {
+      cypherFieldNames = [cypherFieldNames];
+    }
+
+    // Work on a copy, to keep the original record (as it could be use again - fix #382)
+    record = angular.copy(record);
+
+    // Get recipient
+    var recipientPk = CryptoUtils.util.decode_base58(record[recipientFieldName]);
+
+    return $q.all([
+      getBoxKeypair(keypair),
+      CryptoUtils.box.keypair.pkFromSignPk(recipientPk),
+      nonce ? $q.when(nonce) : CryptoUtils.util.random_nonce()
+    ])
+      .then(function(res) {
+        //var senderSk = res[0];
+        var boxKeypair = res[0];
+        var senderSk = boxKeypair.boxSk;
+        var boxRecipientPk = res[1];
+        var nonce = res[2];
+
+        return $q.all(
+          cypherFieldNames.reduce(function(res, fieldName) {
+            if (!record[fieldName]) return res; // skip undefined fields
+            return res.concat(
+              CryptoUtils.box.pack(record[fieldName], nonce, boxRecipientPk, senderSk)
+            );
+          }, []))
+
+          .then(function(cypherTexts){
+            // Replace field values with cypher texts
+            var i = 0;
+            _.forEach(cypherFieldNames, function(cypherFieldName) {
+              if (!record[cypherFieldName]) {
+                // Force undefined fields to be present in object
+                // This is better for ES storage, that always works on lazy update mode
+                record[cypherFieldName] = null;
+              }
+              else {
+                record[cypherFieldName] = cypherTexts[i++];
+              }
+            });
+
+            // Set nonce
+            record.nonce = CryptoUtils.util.encode_base58(nonce);
+
+            return record;
+          });
+      });
+  }
+
+  function openRecordFields(records, keypair, issuerFieldName, cypherFieldNames) {
+
+    issuerFieldName = issuerFieldName || 'issuer';
+    cypherFieldNames = cypherFieldNames || 'content';
+    if (typeof cypherFieldNames == 'string') {
+      cypherFieldNames = [cypherFieldNames];
+    }
+
+    var now = Date.now();
+    var issuerBoxPks = {}; // a map used as cache
+
+    var jobs = [getBoxKeypair(keypair)];
+    return $q.all(records.reduce(function(jobs, message) {
+      var issuer = message[issuerFieldName];
+      if (!issuer) {throw 'Record has no ' + issuerFieldName;}
+      if (issuerBoxPks[issuer]) return res;
+      return jobs.concat(
+        CryptoUtils.box.keypair.pkFromSignPk(CryptoUtils.util.decode_base58(issuer))
+          .then(function(issuerBoxPk) {
+            issuerBoxPks[issuer] = issuerBoxPk; // fill box pk cache
+          }));
+    }, jobs))
+      .then(function(res){
+        var boxKeypair = res[0];
+        return $q.all(records.reduce(function(jobs, record) {
+          var issuerBoxPk = issuerBoxPks[record[issuerFieldName]];
+          var nonce = CryptoUtils.util.decode_base58(record.nonce);
+          record.valid = true;
+
+          return jobs.concat(
+            cypherFieldNames.reduce(function(res, cypherFieldName) {
+              if (!record[cypherFieldName]) return res;
+              return res.concat(CryptoUtils.box.open(record[cypherFieldName], nonce, issuerBoxPk, boxKeypair.boxSk)
+                .then(function(text) {
+                  record[cypherFieldName] = text;
+                })
+                .catch(function(err){
+                  console.error(err);
+                  console.warn('[ES] [crypto] a record may have invalid cypher ' + cypherFieldName);
+                  record.valid = false;
+                }));
+            }, []));
+        }, []));
+      })
+      .then(function() {
+        console.debug('[ES] [crypto] All record decrypted in ' + (Date.now() - now) + 'ms');
+        return records;
+      });
+
+  }
+
+  // exports
+  return {
+    box: {
+      getKeypair: getBoxKeypair,
+      pack: packRecordFields,
+      open: openRecordFields
+    }
+  };
+}])
+;
+
+angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http.services', 'cesium.es.like.services'])
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esProfile');
+    }
+
+  }])
+
+  .factory('esProfile', ['$rootScope', '$q', 'esHttp', 'SocialUtils', 'csWot', 'csWallet', 'csCache', 'csPlatform', 'esSettings', 'esLike', function($rootScope, $q, esHttp, SocialUtils, csWot, csWallet, csCache, csPlatform, esSettings, esLike) {
+    'ngInject';
+
+    var
+      that = this,
+      listeners;
+
+    that.raw = {
+      getFields: esHttp.get('/user/profile/:id?&_source_exclude=avatar._content&_source=:fields'),
+      get: esHttp.get('/user/profile/:id?&_source_exclude=avatar._content', csCache.constants.MEDIUM),
+      getAll: esHttp.get('/user/profile/:id', csCache.constants.MEDIUM),
+      search: esHttp.post('/user/profile/_search', csCache.constants.MEDIUM),
+      mixedSearch: esHttp.post('/user,page,group/profile,record/_search', csCache.constants.MEDIUM),
+      remove: esHttp.record.remove("user","profile")
+    };
+
+    function getAvatarAndName(pubkey) {
+      return that.raw.getFields({id: pubkey, fields: 'title,avatar._content_type'})
+        .then(function(res) {
+          var profile;
+          if (res && res._source) {
+            // name
+            profile = {name: res._source.title};
+            // avatar
+            profile.avatar = esHttp.image.fromHit(res, 'avatar');
+          }
+          return profile;
+        })
+        .catch(function(err){
+          // no profile defined
+          if (err && err.ucode && err.ucode == 404) {
+            return null;
+          }
+          else {
+            throw err;
+          }
+        });
+    }
+
+    function getProfile(pubkey, options) {
+      options = options || {};
+
+      var get = options.raw ? that.raw.getAll : that.raw.get;
+      return get({id: pubkey})
+        .then(function(res) {
+          if (!res || !res.found || !res._source) return undefined;
+
+          var profile = {
+            name: res._source.title,
+            source: res._source
+          };
+
+          // Avoid too long name (workaround for #308)
+          if (profile.name && profile.name.length > 30) {
+            profile.name = profile.name.substr(0, 27) + '...';
+          }
+
+          // avatar
+          profile.avatar = esHttp.image.fromHit(res, 'avatar');
+
+          // convert description into html
+          if (!options.raw && profile.source.description) {
+            profile.descriptionHtml = esHttp.util.parseAsHtml(profile.source.description);
+          }
+
+          // Social url must be unique in socials links - Workaround for issue #306:
+          if (profile.source.socials && profile.source.socials.length) {
+            profile.source.socials = _.uniq(profile.source.socials, false, function (social) {
+              return social.url;
+            });
+          }
+
+          if (!csWallet.isLogin()) {
+            // Exclude encrypted socials items
+            profile.source.socials = _.filter(profile.source.socials, function(social) {
+              return social.type !== 'curve25519';
+            });
+          }
+          else {
+            // decrypt socials (if login)
+            return SocialUtils.open(profile.source.socials, pubkey)
+              .then(function(){
+                // Exclude invalid decrypted socials
+                //console.debug(profile.source.socials);
+                //profile.source.socials = _.where(profile.source.socials, {valid: true});
+
+                return profile;
+              });
+          }
+
+          return profile;
+        })
+        .catch(function(err){
+          // no profile defined
+          if (err && err.ucode && err.ucode == 404) {
+            return null;
+          }
+          else {
+            throw err;
+          }
+        });
+    }
+
+    function fillAvatars(datas, pubkeyAtributeName) {
+      return onWotSearch(null, datas, pubkeyAtributeName);
+    }
+
+    function _fillSearchResultFromHit(data, hit, avatarFieldName) {
+      data.avatar = data.avatar || esHttp.image.fromHit(hit, avatarFieldName||'avatar');
+      // name (basic or highlighted)
+      data.name = hit._source.title;
+      // Avoid too long name (workaround for #308)
+      if (data.name && data.name.length > 30) {
+        data.name = data.name.substr(0, 27) + '...';
+      }
+      data.description = hit._source.description || data.description;
+      data.city = hit._source.city || data.city;
+
+      if (hit.highlight) {
+        if (hit.highlight.title) {
+          data.name = hit.highlight.title[0];
+        }
+        if (hit.highlight.tags) {
+          data.tags = hit.highlight.tags.reduce(function(res, tag){
+            return res.concat(tag.replace('<em>', '').replace('</em>', ''));
+          },[]);
+        }
+      }
+    }
+
+    function onWotSearch(text, datas, pubkeyAtributeName, deferred) {
+      deferred = deferred || $q.defer();
+      if (!text && (!datas || !datas.length)) {
+        deferred.resolve(datas);
+        return deferred.promise;
+      }
+
+      pubkeyAtributeName = pubkeyAtributeName || 'pubkey';
+      text = text ? text.toLowerCase().trim() : text;
+      var dataByPubkey;
+      var tags = text ? esHttp.util.parseTags(text) : undefined;
+      var request = {
+        query: {},
+        highlight: {fields : {title : {}, tags: {}}},
+        from: 0,
+        size: 100,
+        _source: ["title", "avatar._content_type"]
+      };
+
+      var mixedSearch = text && esSettings.wot.isMixedSearchEnable();
+      if (mixedSearch) {
+        request._source = request._source.concat(["description", "city", "creationTime", "membersCount", "type"]);
+        console.debug("[ES] [profile] Mixed search: enable");
+      }
+
+      if (datas.length > 0) {
+        // collect pubkeys and fill values map
+        dataByPubkey = {};
+        _.forEach(datas, function(data) {
+          var pubkey = data[pubkeyAtributeName];
+          if (pubkey) {
+            var values = dataByPubkey[pubkey];
+            if (!values) {
+              values = [data];
+              dataByPubkey[pubkey] = values;
+            }
+            else {
+              values.push(data);
+            }
+          }
+        });
+        var pubkeys = _.keys(dataByPubkey);
+        // Make sure all results will be return
+        request.size = (pubkeys.length <= request.size) ? request.size : pubkeys.length;
+        if (!text) {
+          delete request.highlight; // highlight not need
+          request.query.constant_score = {
+            filter: {
+              terms : {_id : pubkeys}
+            }
+          };
+        }
+        else {
+          request.query.bool = {
+            should: [
+              {terms : {"_id^4" : pubkeys}},
+              {match: {title: {query: text, boost: 2}}},
+              {prefix: {title: text}}
+            ]
+          };
+
+          if (tags) {
+            request.query.bool.should.push({terms: {tags: tags}});
+          }
+        }
+      }
+      else if (text){
+        request.query.bool = {
+          should: [
+            {match: {title: {
+              query: text,
+              boost: 2
+            }}},
+            {prefix: {title: text}}
+          ]
+        };
+        if (tags) {
+          request.query.bool.should.push({terms: {tags: tags}});
+        }
+      }
+      else {
+        // nothing to search: stop here
+        deferred.resolve(datas);
+        return deferred.promise;
+      }
+
+      if (text && mixedSearch) {
+        request.indices_boost = {
+          "user" : 100,
+          "page" : 1,
+          "group" : 0.01
+        };
+      }
+
+      var hits;
+
+      var search = mixedSearch ? that.raw.mixedSearch : that.raw.search;
+      search(request)
+        .then(function(res) {
+          hits = res.hits;
+          if (hits.total > 0) {
+            var indices = {};
+            var values;
+            _.forEach(hits.hits, function(hit) {
+
+              var avatarFieldName = 'avatar';
+              // User profile
+              if (hit._index == "user") {
+                values = dataByPubkey && dataByPubkey[hit._id];
+                if (!values) {
+                  var value = {};
+                  value[pubkeyAtributeName] = hit._id;
+                  values=[value];
+                  datas.push(value);
+                }
+              }
+
+              // Page or group
+              else if (hit._index != "user") {
+                if (!indices[hit._index]) {
+                  indices[hit._index] = true;
+                  // add a separator
+                  datas.push({
+                    id: 'divider-' + hit._index,
+                    divider: true,
+                    index: hit._index
+                  });
+                }
+                var item = {
+                  id: hit._index + '-' + hit._id, // unique id in list
+                  index: hit._index,
+                  templateUrl: 'plugins/es/templates/wot/lookup_item_{0}.html'.format(hit._index),
+                  state: 'app.view_{0}'.format(hit._index),
+                  stateParams: {id: hit._id, title: hit._source.title},
+                  creationTime: hit._source.creationTime,
+                  memberCount: hit._source.memberCount,
+                  type: hit._source.type
+                };
+                values=[item];
+                datas.push(item);
+                avatarFieldName = 'avatar';
+              }
+
+              var avatar = esHttp.image.fromHit(hit, avatarFieldName);
+              _.forEach(values, function(data) {
+                data.avatar= avatar;
+                _fillSearchResultFromHit(data, hit);
+              });
+            });
+
+            // Add divider on top
+            if (_.keys(indices).length) {
+              datas.splice(0,0, {
+                id: 'divider-identities',
+                divider: true,
+                index: 'profile'
+              });
+            }
+          }
+          deferred.resolve(datas);
+        })
+        .catch(function(err){
+          if (err && err.ucode && err.ucode == 404) {
+            deferred.resolve(datas);
+          }
+          else {
+            deferred.reject(err);
+          }
+        });
+
+      return deferred.promise;
+    }
+
+    function onWotLoad(data, deferred) {
+      deferred = deferred || $q.defer();
+      if (!data || !data.pubkey) {
+        deferred.resolve();
+        return deferred.promise;
+      }
+
+      console.debug("[ES] [profile] Extending identity {{0}} ...".format(data.pubkey.substr(0,8)));
+
+      $q.all([
+        // Load full profile
+        getProfile(data.pubkey)
+          .then(function(profile) {
+            if (profile) {
+              data.name = profile.name;
+              data.avatar = profile.avatar;
+              data.profile = data.profile || {};
+              angular.merge(data.profile, profile.source, {descriptionHtml: profile.descriptionHtml});
+            }
+            else {
+              data.name = null;
+              data.avatar = null;
+              data.profile = null;
+            }
+            deferred.resolve(data);
+          }),
+
+        // Load avatar on certifications
+        fillAvatars(
+          (data.received_cert||[])
+            .concat(data.received_cert_pending||[])
+            .concat(data.given_cert||[])
+            .concat(data.given_cert_pending||[])
+        )
+      ])
+        .catch(function(err){
+          deferred.reject(err);
+        });
+      return deferred.promise;
+    }
+
+    function removeProfile(pubkey, options) {
+      return that.raw.remove(pubkey, options)
+        .then(function(res) {
+          csCache.clear('csWot-');
+          csCache.clear('csWot-');
+          return res;
+        });
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function addListeners() {
+      // Extend csWot events
+      listeners = [
+        csWot.api.data.on.load($rootScope, onWotLoad, this),
+        csWot.api.data.on.search($rootScope, onWotSearch, this)
+      ];
+    }
+
+    function refreshState() {
+      var enable = esHttp.alive;
+      if (!enable && listeners && listeners.length > 0) {
+        console.debug("[ES] [profile] Disable");
+        removeListeners();
+      }
+      else if (enable && (!listeners || listeners.length === 0)) {
+        console.debug("[ES] [profile] Enable");
+        addListeners();
+      }
+    }
+
+    // Default actions
+    csPlatform.ready().then(function() {
+      esHttp.api.node.on.start($rootScope, refreshState, this);
+      esHttp.api.node.on.stop($rootScope, refreshState, this);
+      return refreshState();
+    });
+
+    return {
+      getAvatarAndName: getAvatarAndName,
+      get: getProfile,
+      add: esHttp.record.post('/user/profile', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml', 'moderator']}),
+      update: esHttp.record.post('/user/profile/:id/_update', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml', 'moderator']}),
+      remove: removeProfile,
+      avatar: esHttp.get('/user/profile/:id?_source=avatar'),
+      fillAvatars: fillAvatars,
+      like: esLike.instance('user', 'profile')
+    };
+  }])
+;
+
+angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es.http.services'])
+.config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esNotification');
+    }
+
+  }])
+
+.factory('esNotification', ['$rootScope', '$q', '$timeout', '$translate', '$state', 'csHttp', 'csConfig', 'csSettings', 'esHttp', 'esSettings', 'csWallet', 'csWot', 'UIUtils', 'filterTranslations', 'BMA', 'CryptoUtils', 'csPlatform', 'Api', function($rootScope, $q, $timeout, $translate, $state, csHttp,
+                                    csConfig, csSettings, esHttp, esSettings, csWallet, csWot, UIUtils, filterTranslations,
+                                    BMA, CryptoUtils, csPlatform, Api) {
+  'ngInject';
+
+  var
+    constants = {
+      MESSAGE_CODES: ['MESSAGE_RECEIVED'],
+      INVITATION_CODES: ['INVITATION_TO_CERTIFY'],
+      DEFAULT_LOAD_SIZE: 20
+    },
+
+    fields = {
+      commons: ["type", "code", "params", "reference", "recipient", "time", "hash", "read_signature"]
+    },
+    that = this,
+    listeners,
+    wsUserEventCloseFn,
+    api = new Api(this, 'esNotification')
+  ;
+
+  constants.EXCLUDED_CODES = constants.MESSAGE_CODES.concat(constants.INVITATION_CODES);
+
+  that.raw = {
+    postCount: esHttp.post('/user/event/_count'),
+    postSearch: esHttp.post('/user/event/_search'),
+    postReadById: esHttp.post('/user/event/:id/_read'),
+    ws: {
+      getUserEvent: esHttp.ws('/ws/event/user/:pubkey/:locale'),
+      getChanges: esHttp.ws('/ws/_changes')
+    }
+  };
+
+  // Create the filter query
+  function createFilterQuery(pubkey, options) {
+    options = options || {};
+    options.codes = options.codes || {};
+    options.codes.excludes = options.codes.excludes || constants.EXCLUDED_CODES;
+    var query = {
+      bool: {
+        must: [
+          {term: {recipient: pubkey}}
+        ]
+      }
+    };
+
+    // Includes codes
+    if (options.codes && options.codes.includes) {
+      query.bool.must.push({terms: { code: options.codes.includes}});
+    }
+    else {
+      // Excludes codes
+      var excludesCodes = [];
+      if (!csSettings.getByPath('plugins.es.notifications.txSent', false)) {
+        excludesCodes.push('TX_SENT');
+      }
+      if (!csSettings.getByPath('plugins.es.notifications.txReceived', true)) {
+        excludesCodes.push('TX_RECEIVED');
+      }
+      if (!csSettings.getByPath('plugins.es.notifications.certSent', false)) {
+        excludesCodes.push('CERT_SENT');
+      }
+      if (!csSettings.getByPath('plugins.es.notifications.certReceived', true)) {
+        excludesCodes.push('CERT_RECEIVED');
+      }
+      if (options.codes.excludes) {
+        _.forEach(options.codes.excludes, function(code) {
+          excludesCodes.push(code);
+        });
+      }
+      if (excludesCodes.length) {
+        query.bool.must_not = {terms: { code: excludesCodes}};
+      }
+    }
+
+    // Filter on time
+    if (options.readTime) {
+      query.bool.must.push({range: {time: {gt: options.readTime}}});
+    }
+    return query;
+  }
+
+  // Load unread notifications count
+  function loadUnreadNotificationsCount(pubkey, options) {
+    if (!pubkey) {
+      return $q.reject('[ES] [notification] Unable to load - missing pubkey');
+    }
+    var request = {
+      query: createFilterQuery(pubkey, options)
+    };
+    // Filter unread only
+    request.query.bool.must.push({missing: { field : "read_signature" }});
+    return that.raw.postCount(request)
+      .then(function(res) {
+        return res.count;
+      });
+  }
+
+  function getWalletNotifications(options) {
+    options = options || {};
+    var wallet = options.wallet || csWallet;
+
+    return new Promise(function(resolve) {
+      if (!wallet.data || !wallet.data.events ||!wallet.data.events.length) return resolve([]);
+
+      // Add some wallet events as notifications
+      var time = csHttp.date.now() - filterTranslations.MEDIAN_TIME_OFFSET;
+      var result = (wallet.data.events || []).reduce(function(res, event) {
+        if (event.type !== "warn" && event.type !== "error") return res; // Keep only warn and error events
+        var notification = new EsNotification({}, function(self) {
+          if (!self.read) {
+            self.read = true;
+            if (wallet.data.notifications && wallet.data.notifications.warnCount > 0) {
+              wallet.data.notifications.warnCount--;
+            }
+          }
+        });
+        notification.id= event.code;
+        notification.time= time;
+        notification.read = false;
+        notification.state = 'app.view_wallet';
+        notification.avatarIcon = 'ion-alert-circled';
+        notification.icon = 'ion-alert-circled assertive';
+        notification.message = event.message;
+        notification.messageParams = event.messageParams;
+        return res.concat(notification);
+      }, []);
+
+      resolve(result);
+    });
+
+  }
+
+  // Load user notifications
+  function loadNotifications(options) {
+    options = options || {};
+    if (!options.pubkey) {
+      return $q.reject('[ES] [notification] Unable to load - missing options.pubkey');
+    }
+    options.from = options.from || 0;
+    options.size = options.size || constants.DEFAULT_LOAD_SIZE;
+    var request = {
+      query: createFilterQuery(options.pubkey, options),
+      sort : [
+        { "time" : {"order" : "desc"}}
+      ],
+      from: options.from,
+      size: options.size,
+      _source: fields.commons
+    };
+
+    return $q.all([
+      // Get wallet events (as notifications)
+      getWalletNotifications(options),
+
+      // Load notification from ES node
+      that.raw.postSearch(request)
+    ]).then(function(res) {
+
+        var walletNotifs = res[0] || [];
+        res = res[1];
+
+        if (!res.hits || !res.hits.total) return walletNotifs;
+
+        var notifications = res.hits.hits.reduce(function(res, hit) {
+          var item = new EsNotification(hit._source, markNotificationAsRead);
+          item.id = hit._id;
+          return res.concat(item);
+        }, walletNotifs);
+
+        return csWot.extendAll(notifications);
+      });
+  }
+
+  function onNewUserEvent(event) {
+    if (!event || !csWallet.isLogin()) return;
+
+    // If notification is an invitation
+    if (_.contains(constants.INVITATION_CODES, event.code)) {
+      api.event.raise.newInvitation(event);
+      return;
+    }
+
+    // If notification is a message
+    if (_.contains(constants.MESSAGE_CODES, event.code)) {
+      api.event.raise.newMessage(event);
+      return;
+    }
+
+    var notification = new EsNotification(event, markNotificationAsRead);
+    notification.id = event.id || notification.id;
+
+    // Extend the notification entity
+    return csWot.extendAll([notification])
+      .then(function() {
+        if (!$rootScope.$$phase) {
+          $rootScope.$applyAsync(function() {
+            addNewNotification(notification);
+          });
+        }
+        else {
+          addNewNotification(notification);
+        }
+      })
+      .then(function() {
+        if (esSettings.notifications.isEmitHtml5Enable()) return emitEsNotification(notification);
+      });
+  }
+
+  function addNewNotification(notification) {
+    csWallet.data.notifications = csWallet.data.notifications || {};
+    csWallet.data.notifications.unreadCount++;
+    api.data.raise.new(notification);
+
+    return notification;
+  }
+
+  function htmlToPlaintext(text) {
+    return text ? String(text).replace(/<[^>]*>/gm, '').replace(/&[^;]+;/gm, '')  : '';
+  }
+
+  function emitEsNotification(notification, title) {
+
+    // If it's okay let's create a notification
+    $q.all([
+      $translate(title||'COMMON.NOTIFICATION.TITLE'),
+      $translate(notification.message, notification)
+    ])
+      .then(function(res) {
+        var title = htmlToPlaintext(res[0]);
+        var body = htmlToPlaintext(res[1]);
+        var icon = notification.avatar && notification.avatar.src || './img/logo.png';
+        emitHtml5Notification(title, {
+          body: body,
+          icon: icon,
+          lang: $translate.use(),
+          tag: notification.id,
+          onclick: function() {
+            $rootScope.$applyAsync(function() {
+              if (typeof notification.markAsRead === "function") {
+                notification.markAsRead();
+              }
+              if (notification.state) {
+                $state.go(notification.state, notification.stateParams);
+              }
+            });
+          }
+        });
+      });
+  }
+
+  function emitHtml5Notification(title, options) {
+
+    // Let's check if the browser supports notifications
+    if (!("Notification" in window)) return;
+
+    // Let's check whether notification permissions have already been granted
+    if (Notification.permission === "granted") {
+
+      // If it's okay let's create a notification
+      var browserNotification = new Notification(title, options);
+      browserNotification.onclick = options.onclick || browserNotification.onclick;
+    }
+
+    // Otherwise, we need to ask the user for permission
+    else if (Notification.permission !== "denied") {
+      Notification.requestPermission(function (permission) {
+        // If the user accepts, let's create a notification
+        if (permission === "granted") {
+          emitHtml5Notification(title, options); // recursive call
+        }
+      });
+    }
+  }
+
+  // Mark a notification as read
+  function markNotificationAsRead(notification) {
+    if (notification.read || !notification.id) return; // avoid multi call
+    // Should never append (fix in Duniter4j issue #12)
+    if (!notification.id) {
+      console.error('[ES] [notification] Could not mark as read: no \'id\' found!', notification);
+      return;
+    }
+
+    // user not auth: could not mark as read
+    if (!csWallet.isAuth()) return;
+
+    notification.read = true;
+    return csWallet.getKeypair()
+      .then(function(keypair) {
+        return CryptoUtils.sign(notification.hash, keypair)
+          .then(function(signature){
+            return that.raw.postReadById(signature, {id:notification.id});
+          })
+          .catch(function(err) {
+            console.error('[ES] [notification] Error while trying to mark event as read.', err);
+          });
+
+      });
+  }
+
+  function onWalletReset(data) {
+    data.notifications = data.notifications || {};
+    data.notifications.unreadCount = null;
+    data.notifications.warnCount = null;
+    data.notifications.time = null;
+    // Stop listening notification
+    if (wsUserEventCloseFn) {
+      console.debug("[ES] [notification] Closing websocket...");
+      wsUserEventCloseFn();
+      wsUserEventCloseFn = null;
+    }
+  }
+
+  function onWalletLoad(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey || !data.keypair) {
+      $timeout(function() {
+        deferred.resolve(data);
+      });
+      return deferred.promise;
+    }
+
+    var now = Date.now();
+    var time = Math.trunc(now / 1000);
+
+    // Skip if loaded less than 1 min ago
+    // (This is need to avoid reload on login AND load phases)
+    if (data.notifications && data.notifications.time && (time - data.notifications.time < 30 /*=30s*/)) {
+      // update warn count
+      data.notifications.warnCount = countWarnEvents(data);
+
+      console.debug('[ES] [notification] Skipping load (loaded '+(time - data.notifications.time)+'s ago)');
+      $timeout(function() {
+        deferred.resolve(data);
+      });
+      return deferred.promise;
+    }
+
+    var isDefaultWallet =  csWallet.isUserPubkey(data.pubkey);
+    console.debug('[ES] [notification] Loading count...' + data.pubkey.substr(0,8));
+
+    // Load unread notifications count
+    loadUnreadNotificationsCount(
+        data.pubkey, {
+          readTime: data.notifications && data.notifications.time || 0,
+          excludeCodes: constants.EXCLUDED_CODES
+        })
+      .then(function(unreadCount) {
+        data.notifications = data.notifications || {};
+        data.notifications.unreadCount = unreadCount;
+        data.notifications.warnCount = countWarnEvents(data);
+
+        // Emit HTML5 notification (only on main wallet)
+        if (unreadCount > 0 && esSettings.notifications.isEmitHtml5Enable() && isDefaultWallet) {
+          $timeout(function() {
+            emitEsNotification({
+              message: 'COMMON.NOTIFICATION.HAS_UNREAD',
+              count: unreadCount,
+              state: 'app.view_notifications'
+            }, data.ui || data.name || data.pubkey && data.pubkey.substr(0,8));
+          }, 500);
+        }
+
+        console.debug('[ES] [notification] Loaded count (' + unreadCount + ') in '+(Date.now()-now)+'ms');
+        deferred.resolve(data);
+      })
+      .catch(function(err){
+        console.error('Error while counting notification: ' + (err.message ? err.message : err));
+        deferred.resolve(data);
+      });
+
+    return deferred.promise;
+  }
+
+  function onWalletLogin(data, deferred) {
+    // Call load
+    return onWalletLoad(data, deferred)
+
+      // then start listening new events
+      .then(function(){
+        console.debug('[ES] [notification] Starting listen user event...');
+        var wsUserEvent = that.raw.ws.getUserEvent();
+        wsUserEvent.on(
+          onNewUserEvent,
+          {pubkey: data.pubkey, locale: csSettings.data.locale.id}
+        )
+          .catch(function(err) {
+            console.error('[ES] [notification] Unable to listen user event', err);
+
+            // TODO : send a event to csHttp instead ?
+            // And display such connectivity errors in UI
+            UIUtils.alert.error('ACCOUNT.ERROR.WS_CONNECTION_FAILED');
+          });
+        wsUserEventCloseFn = function() {wsUserEvent.close();};
+      });
+  }
+
+  function countWarnEvents(data){
+    if (!data.events) return 0;
+    return data.events.reduce(function(counter, event) {
+      return (event.type == "warn") ? counter+1 : counter;
+    }, 0);
+  }
+
+  function addListeners() {
+    // Listen some events
+    listeners = [
+      csWallet.api.data.on.login($rootScope, onWalletLogin, this),
+      csWallet.api.data.on.load($rootScope, onWalletLoad, this),
+      csWallet.api.data.on.init($rootScope, onWalletReset, this),
+      csWallet.api.data.on.reset($rootScope, onWalletReset, this)
+    ];
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function refreshState() {
+    var enable = esHttp.alive;
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [notification] Disable");
+      removeListeners();
+      if (csWallet.isLogin()) {
+        onWalletReset(csWallet.data);
+      }
+    }
+    else if (enable && (!listeners || listeners.length === 0)) {
+      console.debug("[ES] [notification] Enable");
+      addListeners();
+      if (csWallet.isLogin()) {
+        return onWalletLogin(csWallet.data);
+      }
+    }
+  }
+
+  // Register extension points
+  api.registerEvent('data', 'new');
+  api.registerEvent('event', 'newInvitation');
+  api.registerEvent('event', 'newMessage');
+
+  // Default actions
+  csPlatform.ready().then(function() {
+    esHttp.api.node.on.start($rootScope, refreshState, this);
+    esHttp.api.node.on.stop($rootScope, refreshState, this);
+    return refreshState();
+  });
+
+  // Exports
+  that.load = loadNotifications;
+  that.unreadCount = loadUnreadNotificationsCount;
+  that.html5 = {
+    emit: emitHtml5Notification
+  };
+  that.api = api;
+  that.websocket = {
+      event: that.raw.ws.getUserEvent,
+      change: that.raw.ws.getChanges
+    };
+  that.constants = constants;
+
+  return that;
+}])
+;
+
+angular.module('cesium.es.message.services', ['ngResource', 'cesium.platform',
+  'cesium.es.http.services', 'cesium.es.wallet.services', 'cesium.es.notification.services'])
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esMessage');
+    }
+
+  }])
+
+  .factory('esMessage', ['$q', '$rootScope', '$timeout', 'UIUtils', 'Api', 'CryptoUtils', 'csPlatform', 'csConfig', 'csSettings', 'esHttp', 'csWallet', 'esWallet', 'csWot', 'esNotification', function($q, $rootScope, $timeout, UIUtils, Api, CryptoUtils,
+                                 csPlatform, csConfig, csSettings, esHttp, csWallet, esWallet, csWot, esNotification) {
+    'ngInject';
+
+    var
+      constants = {
+        DEFAULT_LOAD_SIZE: 10
+      },
+      fields = {
+        commons: ["issuer", "recipient", "title", "content", "time", "nonce", "read_signature"],
+        notifications: ["issuer", "time", "hash", "read_signature"]
+      },
+      raw = {
+        postSearch: esHttp.post('/message/inbox/_search'),
+        postSearchByType: esHttp.post('/message/:type/_search'),
+        getByTypeAndId : esHttp.get('/message/:type/:id'),
+        postReadById: esHttp.post('/message/inbox/:id/_read')
+      },
+      listeners,
+      api = new Api(this, 'esMessage');
+
+    function onWalletInit(data) {
+      data.messages = data.messages || {};
+      data.messages.unreadCount = null;
+      data.messages.time = null;
+    }
+
+    function onWalletReset(data) {
+      if (data.messages) {
+        delete data.messages;
+      }
+    }
+
+    function onWalletLoad(data, deferred) {
+      deferred = deferred || $q.defer();
+
+      if (!data || !data.pubkey) {
+        $timeout(function() {
+          deferred.resolve(data);
+        });
+        return deferred.promise;
+      }
+
+      var now = Date.now();
+      var time = Math.trunc(now / 1000);
+
+      // Skip if loaded less than 1 min ago
+      // (This is need to avoid reload on login AND load phases)
+      if (data.messages && data.messages.time && (time - data.messages.time < 30 /*=30s*/)) {
+        console.debug('[ES] [message] Skipping load (loaded '+(time - data.messages.time)+'s ago)');
+        $timeout(function() {
+          deferred.resolve(data);
+        });
+        return deferred.promise;
+      }
+
+      console.debug('[ES] [message] Loading count...');
+
+      // Count unread messages
+      countUnreadMessages({pubkey: data.pubkey})
+        .then(function(unreadCount) {
+          data.messages = data.messages || {};
+          data.messages.unreadCount = unreadCount;
+          data.messages.time = time;
+          console.debug('[ES] [message] Loaded count (' + unreadCount + ') in '+(Date.now()-now)+'ms');
+          deferred.resolve(data);
+        })
+        .catch(function(err){
+          console.error('Error while counting messages: ' + (err.message ? err.message : err));
+          deferred.resolve(data);
+        });
+      return deferred.promise;
+    }
+
+    function countUnreadMessages(options) {
+      options = options || {};
+      var wallet = options.wallet ||
+        (options.walletId && csWallet.children.get(options.walletId)) || csWallet;
+      var pubkey = options.pubkey || (wallet && wallet.data && wallet.data.pubkey);
+      if (!pubkey) {
+        throw new Error('no pubkey or wallet found in options, and user not connected.');
+      }
+
+      var request = {
+        query: {
+          bool: {
+            must: [
+              {term: {recipient: pubkey}},
+              {missing: { field : "read_signature" }}
+            ]
+          }
+        }
+      };
+
+      return esHttp.post('/message/inbox/_count')(request)
+        .then(function(res) {
+          return res.count;
+        });
+    }
+
+    // Listen message changes
+    function onNewMessageEvent(event, wallet) {
+      console.debug("[ES] [message] detected new message (from notification service)");
+
+      var notification = new EsNotification(event);
+      notification.issuer = notification.pubkey;
+      delete notification.pubkey;
+
+      if (!notification.issuer) return; // Skip if invalid
+
+      // Get the wallet
+      wallet = wallet || (notification.issuer && csWallet.isUserPubkey(notification.issuer) && csWallet) ||
+       (notification.issuer && csWallet.children.getByPubkey(notification.issuer));
+
+      if (!wallet) {
+        throw new Error("No wallet for pubkey: {0}".format(notification.issuer.substring(0, 6)));
+      }
+
+      csWot.extend(notification, 'issuer')
+        .then(function() {
+
+          wallet.data.messages = wallet.data.messages || {};
+          wallet.data.messages.unreadCount++;
+
+          // Raise event
+          api.data.raise.new(notification);
+        });
+    }
+
+    function sendMessage(message, options) {
+      options = options || {};
+      var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      delete options.wallet;
+      message.issuer = message.issuer || wallet.data.pubkey;
+      return wallet.getKeypair()
+        .then(function(keypair) {
+
+          // Send to recipient inbox
+          return doSendMessage(message, keypair)
+            .then(function (res) {
+
+              // Check if outbox is enable (in settings)
+              var outbox = (csSettings.data.plugins.es.message &&
+              angular.isDefined(csSettings.data.plugins.es.message.outbox)) ?
+                csSettings.data.plugins.es.message.outbox : true;
+              if (!outbox) return res;
+
+              // Send to outbox
+              return doSendMessage(message, keypair, '/message/outbox', 'issuer')
+                .catch(function (err) {
+                  console.error("Failed to store message to outbox: " + err);
+                  return res; // the first result
+                });
+            })
+            .then(function (res) {
+              // Raise API event
+              api.data.raise.sent(res);
+
+              return res;
+            });
+        });
+    }
+
+    function doSendMessage(message, keypair, boxPath, recipientFieldName) {
+      boxPath = boxPath || '/message/inbox';
+
+      // Encrypt fields
+      return esWallet.box.record.pack(message, keypair, recipientFieldName, ['title', 'content'])
+      // Send message
+        .then(function(message){
+          return esHttp.record.post(boxPath)(message, {pubkey: message.issuer, keypair: keypair});
+        });
+    }
+
+    function loadMessageNotifications(options) {
+      options = options || {};
+      options.from = options.from || 0;
+      options.size = options.size || constants.DEFAULT_LOAD_SIZE;
+      var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      delete options.wallet;
+
+      if (!wallet.isLogin()) {
+        return $q.when([]); // Should never happen
+      }
+      var request = {
+        sort: {
+          "time" : "desc"
+        },
+        query: {bool: {filter: {term: {recipient: wallet.data.pubkey}}}},
+        from: options.from,
+        size: options.size,
+        _source: fields.notifications
+      };
+
+      return raw.postSearch(request)
+        .then(function(res) {
+          if (!res || !res.hits || !res.hits.total) return [];
+          var notifications = res.hits.hits.reduce(function(result, hit) {
+            var msg = hit._source;
+            msg.id = hit._id;
+            msg.read = !!msg.read_signature;
+            delete msg.read_signature; // not need anymore
+            return result.concat(msg);
+          }, []);
+          return csWot.extendAll(notifications, 'issuer');
+        });
+    }
+
+
+    function searchMessages(pubkey, options) {
+      pubkey = pubkey || csWallet.data.pubkey;
+
+      options = options || {};
+      options.type = options.type || 'inbox';
+      options.from = options.from || 0;
+      options.size = options.size || 1000;
+      options._source = options._source || fields.commons;
+      var request = {
+        sort: {
+          "time" : "desc"
+        },
+        from: options.from,
+        size: options.size,
+        _source: options._source
+      };
+
+      if (options.type == 'inbox') {
+        request.query = {bool: {filter: {term: {recipient: pubkey}}}};
+      }
+      else {
+        request.query = {bool: {filter: {term: {issuer: pubkey}}}};
+      }
+
+      return raw.postSearchByType(request, {type: options.type})
+        .then(function(res) {
+          if (!res || !res.hits || !res.hits.total) {
+            return [];
+          }
+          var messages = res.hits.hits.reduce(function(res, hit) {
+            var msg = hit._source || {};
+            msg.id = hit._id;
+            msg.read = (options.type == 'outbox') || !!msg.read_signature;
+            delete msg.read_signature; // not need anymore
+            return res.concat(msg);
+          }, []);
+
+          console.debug('[ES] [message] Loading {0} {1} messages'.format(messages.length, options.type));
+
+          return messages;
+        });
+    }
+
+    function loadMessages(options) {
+      options = options || {};
+      options.type = options.type || 'inbox';
+      options._source = fields.commons;
+      options.summary = angular.isDefined(options.summary) ? options.summary : true;
+      options.filter = angular.isDefined(options.filter) ? options.filter : undefined;
+      options.from = options.from || 0;
+
+      var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      delete options.wallet; // avoid error in angular.copy()
+
+      var promise = wallet.auth()
+        .then(function(walletData) {
+
+          // Get encrypted message (with common fields)
+          return searchMessages(walletData.pubkey, options)
+
+          // Decrypt content
+            .then(function(messages) {
+              return decryptMessages(messages, walletData.keypair, options.summary);
+            });
+        })
+
+        // Add avatar
+        .then(function(messages){
+          var avatarField = (options.type == 'inbox') ? 'issuer' : 'recipient';
+          return csWot.extendAll(messages, avatarField);
+        })
+
+        // Update message count
+        .then(function(messages){
+          if (messages.length && options.filter){
+            var filteredMessages = filterMessages(messages, options.filter);
+
+            // Need more messages: iterate again
+            if (filteredMessages.length < messages.length) {
+              options = angular.copy(options);
+              options.from += options.size;
+              options.size = messages.length - filteredMessages.length;
+              // put the wallet again, because it has been removed before the angular.copy()
+              // To avoid an error
+              options.wallet = wallet;
+              return loadMessages(options) // Loop
+                .then(function(messages) {
+                  return filteredMessages.concat(messages);
+                });
+            }
+          }
+
+          if (options.from === 0 && !options.filter) {
+            wallet.data.messages = wallet.data.messages || {};
+            wallet.data.messages.count = messages.length;
+          }
+
+          return messages;
+        });
+
+      // If filter, apply sorting (only once)
+      if (options.from === 0 && options.filter) {
+        promise.then(sortFilteredMessages);
+      }
+
+      return promise;
+    }
+
+    function getAndDecrypt(id, type, options) {
+      type = type || 'inbox';
+      options = options || {};
+      options.summary = angular.isDefined(options.summary) ? options.summary : false/*summary not need by default*/;
+      var wallet = options.wallet || (options.walletId && csWallet.children.get(options.walletId)) || csWallet;
+
+      return wallet.auth()
+        .then(function(walletData) {
+          return raw.getByTypeAndId({id: id, type: type})
+            .then(function(hit) {
+              if (!hit.found) return;
+              var msg = hit._source;
+              msg.id = hit._id;
+              msg.read = (type == 'outbox') || !!msg.read_signature;
+              delete msg.read_signature; // not need anymore
+
+              // Decrypt message
+              return decryptMessages([msg], walletData.keypair, options.summary)
+
+              // Add avatar
+                .then(function(){
+                  var avatarField = (type == 'inbox') ? 'issuer' : 'recipient';
+                  return csWot.extend(msg, avatarField);
+                });
+            });
+        });
+    }
+
+    function decryptMessages(messages, keypair, withSummary) {
+
+      var now = Date.now();
+      var issuerBoxPks = {}; // a map used as cache
+
+      var jobs = [esWallet.box.getKeypair(keypair)];
+      return $q.all(messages.reduce(function(jobs, message) {
+        if (issuerBoxPks[message.issuer]) return res;
+        return jobs.concat(
+          CryptoUtils.box.keypair.pkFromSignPk(CryptoUtils.util.decode_base58(message.issuer))
+            .then(function(issuerBoxPk) {
+              issuerBoxPks[message.issuer] = issuerBoxPk; // fill box pk cache
+            }));
+      }, jobs))
+        .then(function(res){
+          var boxKeypair = res[0];
+          return $q.all(messages.reduce(function(jobs, message) {
+            var issuerBoxPk = issuerBoxPks[message.issuer];
+            var nonce = CryptoUtils.util.decode_base58(message.nonce);
+            message.valid = true;
+
+            return jobs.concat(
+              // title
+              CryptoUtils.box.open(message.title, nonce, issuerBoxPk, boxKeypair.boxSk)
+                .then(function(title) {
+                  message.title = title;
+                })
+                .catch(function(err){
+                  console.error(err);
+                  console.warn('[ES] [message] may have invalid cypher title');
+                  message.valid = false;
+                }),
+
+              // content
+              CryptoUtils.box.open(message.content, nonce, issuerBoxPk, boxKeypair.boxSk)
+                .then(function(content) {
+                  message.content = content;
+                  if (withSummary) {
+                    fillSummary(message);
+                  }
+                  else if (content){
+                    message.html = esHttp.util.parseAsHtml(content);
+                  }
+                })
+                .catch(function(err){
+                  console.error(err);
+                  console.warn('[ES] [message] may have invalid cypher content');
+                  message.valid = false;
+                })
+            );
+          }, []));
+        })
+        .then(function() {
+          console.debug('[ES] [message] All messages decrypted in ' + (Date.now() - now) + 'ms');
+          return messages;
+        });
+
+    }
+
+    // Compute a summary (truncated to 140 characters), from the message content
+    function fillSummary(message) {
+      if (message.content) {
+        message.summary = message.content.replace(/(^|[\n\r]+)\s*>[^\n\r]*/g, '').trim();
+        if (message.summary.length > 140) {
+          message.summary = message.summary.substr(0, 137) + '...';
+        }
+      }
+    }
+
+    function removeMessage(id, type, options) {
+      type = type || 'inbox';
+
+      var wallet = options.wallet || (options.walletId && csWallet.children.get(options.walletId)) || csWallet;
+
+      return esHttp.record.remove('message', type)(id, {wallet: wallet})
+        .then(function(res) {
+          // Update message count
+          if (type === 'inbox') {
+            wallet.data.messages = wallet.data.messages || {};
+            wallet.data.messages.count = wallet.data.messages.count > 0 ? wallet.data.messages.count-1 : 0;
+          }
+
+          // Raise event
+          if (wallet.isDefault()) {
+            api.data.raise.delete(id);
+          }
+
+          return res;
+        });
+    }
+
+    function removeAllMessages(type, options) {
+      type = type || 'inbox';
+      var wallet = options && options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      return wallet.auth()
+        .then(function(walletData) {
+          // Get all message id
+          return searchMessages(walletData.pubkey, {type: type, from: 0, size: 1000, _source: false})
+            .then(function (res) {
+              if (!res || !res.length) return;
+
+              var ids = _.pluck(res, 'id');
+
+              // Remove each messages
+              return $q.all(res.reduce(function (res, msg) {
+                return res.concat(esHttp.record.remove('message', type)(msg.id, {wallet: wallet}));
+              }, []))
+                .then(function() {
+                  return ids;
+                });
+            })
+            .then(function (ids) {
+              // update message count
+              if (type === 'inbox') {
+                wallet.data.messages = wallet.data.messages || {};
+                wallet.data.messages.count = 0;
+                wallet.data.messages.unreadCount = 0;
+              }
+
+              // Raise events
+              if (wallet.isDefault()) {
+                _.forEach(ids, api.data.raise.delete);
+              }
+            });
+        });
+    }
+
+    // Mark a message as read
+    function markMessageAsRead(message, options) {
+      options = options || {};
+      var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      var type = options && options.type || (!wallet.isUserPubkey(message.recipient) ? 'outbox' : 'inbox');
+      if (message.read) {
+        var deferred = $q.defer();
+        deferred.resolve();
+        return deferred.promise;
+      }
+      message.read = true;
+
+      return wallet.getKeypair()
+
+      // Prepare the read_signature to sent
+        .then(function(keypair) {
+          return CryptoUtils.sign(message.hash, keypair);
+        })
+
+        // Send read request
+        .then(function(signature){
+          return raw.postReadById(signature, {id:message.id});
+        })
+
+        // Update message count
+        .then(function() {
+          if (type === 'inbox') {
+            wallet.data.messages = wallet.data.messages || {};
+            wallet.data.messages.unreadCount = wallet.data.messages.unreadCount ? wallet.data.messages.unreadCount - 1 : 0;
+          }
+        });
+    }
+
+    // Mark all messages as read
+    function markAllMessageAsRead(options) {
+      options = options || {};
+      var wallet = options.wallet || options.walletId && csWallet.children.get(options.walletId) || csWallet;
+      return wallet.auth()
+        .then(function(walletData) {
+
+          // Get all messages hash
+          return searchMessages(walletData.pubkey, {
+            type: 'inbox',
+            from: 0,
+            size: 1000,
+            _source: ['hash', 'read_signature']
+          })
+
+            .then(function (messages) {
+              if (!messages || !messages.length) return;
+
+              // Keep only unread message
+              messages = _.filter(messages, {read: false});
+
+              // Remove  messages
+              return $q.all(messages.reduce(function (res, message) {
+                return res.concat(
+                  // Sign hash
+                  CryptoUtils.sign(message.hash, walletData.keypair)
+                  // then send read request
+                    .then(function (signature) {
+                      return raw.postReadById(signature, {id: message.id});
+                    }));
+              }, []));
+            })
+            .then(function () {
+              // update message count
+              wallet.data.messages = wallet.data.messages || {};
+              wallet.data.messages.unreadCount = 0;
+            });
+        });
+    }
+
+    // Filter messages (after decryption) searching on [title, content]
+    function filterMessages(messages, filter) {
+      if (filter && !filter.trim().length) return messages;
+
+      // Init summary, removing reply content (lines starting with '>')
+      messages.forEach(function(msg) {
+        if (msg.content) {
+          msg.summary = msg.content.replace(/(^|[\n\r]+)\s*>[^\n\r]*/g, '').trim() || '';
+        }
+      });
+
+      // For each search words
+      var words = filter.trim().split(' ');
+      words.forEach(function(word) {
+        var regexp = new RegExp(word, 'gi');
+        messages.forEach(function(msg) {
+
+          // Search on title
+          var matches = regexp.exec(msg.title);
+          if (matches) {
+            msg.title = msg.title.replace(regexp, '<b>$&</b>');
+            msg.titleMatch = (msg.titleMatch || 0) + 1;
+            while(true) {
+              matches = regexp.exec(msg.title.substring(matches.index + word.length));
+              if (!matches || msg.titleMatch >= 10) break;
+              msg.titleMatch = msg.titleMatch + 1;
+            }
+            return;
+          }
+
+          // Search on summary
+          matches = regexp.exec(msg.summary);
+          if (matches) {
+            if (matches.index > 140) {
+              msg.summary = '...' + msg.summary.substring(matches.index - 20);
+            }
+            msg.summary = msg.summary.replace(regexp, '<b>$&</b>');
+            msg.contentMatch = (msg.contentMatch || 0) + 1;
+            while(true) {
+              matches = regexp.exec(msg.summary.substring(matches.index + word.length));
+              if (!matches || msg.contentMatch >= 10) break;
+              msg.contentMatch++;
+            }
+            if (msg.summary.length > 140) {
+              msg.summary = msg.summary.substr(0, 137) + '...';
+            }
+          }
+        });
+      });
+
+      // Keep only matches
+      messages = _.filter(messages, function(msg) {
+        return msg.titleMatch || msg.contentMatch;
+      });
+
+      return messages;
+    }
+
+    // Sort filtered messages by matches
+    function sortFilteredMessages(messages) {
+      // Sort by matches
+      return _.sortBy(messages, function(msg) {
+        return -1 * (
+          1000 * (msg.titleMatch || 0) +
+          100 * (msg.contentMatch || 0) +
+          (msg.time / 10000000000));
+      });
+    }
+
+    // Send message to developers - need for issue #524
+    function onSendError(message) {
+      var developers = csConfig.developers || [{pubkey: '38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE'/*kimamila*/}];
+      if(!message || !message.content || !developers || !developers.length) return;
+
+      console.info("[ES] [message] Sending logs to developers...");
+      message.issuer = csWallet.data.pubkey;
+      message.title = message.title || 'Sending log';
+      message.time = moment().utc().unix();
+
+      csWallet.getKeypair()
+        .then(function(keypair) {
+          return $q.all(developers.reduce(function(res, developer){
+            return !developer.pubkey ? res :
+              res.concat(doSendMessage(angular.merge({recipient: developer.pubkey}, message), keypair));
+          }, []));
+        })
+        .then(function(res) {
+          console.info("[ES] [message] Logs sent to {0} developers".format(res.length));
+        });
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function addListeners() {
+      // Extend csWallet events
+      listeners = [
+        csWallet.api.data.on.init($rootScope, onWalletInit, this),
+        csWallet.api.data.on.login($rootScope, onWalletLoad, this),
+        csWallet.api.data.on.load($rootScope, onWalletLoad, this), // need for secondary wallets
+        csWallet.api.data.on.reset($rootScope, onWalletReset, this),
+        esNotification.api.event.on.newMessage($rootScope, onNewMessageEvent, this),
+        // for issue #524
+        csWallet.api.error.on.send($rootScope, onSendError, this)
+      ];
+    }
+
+    function refreshState() {
+      var enable = esHttp.alive;
+      if (!enable && listeners && listeners.length > 0) {
+        console.debug("[ES] [message] Disable");
+        removeListeners();
+        if (csWallet.isLogin()) {
+          onWalletReset(csWallet.data);
+        }
+      }
+      else if (enable && (!listeners || listeners.length === 0)) {
+        console.debug("[ES] [message] Enable");
+        addListeners();
+        if (csWallet.isLogin()) {
+          onWalletLoad(csWallet.data);
+        }
+      }
+    }
+
+    // Register extension points
+    api.registerEvent('data', 'new');
+    api.registerEvent('data', 'delete');
+    api.registerEvent('data', 'sent');
+
+    // Default action
+    csPlatform.ready().then(function() {
+      esHttp.api.node.on.start($rootScope, refreshState, this);
+      esHttp.api.node.on.stop($rootScope, refreshState, this);
+      return refreshState();
+    });
+
+    return {
+      api: api,
+      search: raw.postSearch,
+      notifications: {
+        load: loadMessageNotifications
+      },
+      load: loadMessages,
+      get: getAndDecrypt,
+      send: sendMessage,
+      remove: removeMessage,
+      removeAll: removeAllMessages,
+      markAsRead: markMessageAsRead,
+      markAllAsRead: markAllMessageAsRead,
+      fields: {
+        commons: fields.commons
+      }
+    };
+  }])
+;
+
+angular.module('cesium.es.modal.services', ['cesium.modal.services', 'cesium.es.message.services'])
+
+  .factory('esModals', ['$state', 'ModalUtils', 'UIUtils', 'csWallet', function($state, ModalUtils, UIUtils, csWallet) {
+    'ngInject';
+
+    function showMessageCompose(parameters) {
+      return ModalUtils.show('plugins/es/templates/message/modal_compose.html','ESMessageComposeModalCtrl',
+        parameters, {focusFirstInput: true});
+    }
+
+    function updateNotificationCountAndReadTime() {
+      csWallet.data.notifications.unreadCount = 0;
+      if (csWallet.data.notifications && csWallet.data.notifications.history.length) {
+        var lastNotification = csWallet.data.notifications.history[0];
+        var readTime = lastNotification ? lastNotification.time : 0;
+        csSettings.data.wallet = csSettings.data.wallet || {};
+        if (readTime && csSettings.data.wallet.notificationReadTime != readTime) {
+          csSettings.data.wallet.notificationReadTime = readTime;
+          csSettings.store();
+        }
+      }
+    }
+
+    function showNotificationsPopover(scope, event) {
+      return UIUtils.popover.show(event, {
+        templateUrl :'plugins/es/templates/common/popover_notification.html',
+        scope: scope,
+        autoremove: false, // reuse popover
+        afterHidden: updateNotificationCountAndReadTime
+      })
+        .then(function(notification) {
+          if (!notification) return; // no selection
+          if (notification.onRead && typeof notification.onRead == 'function') notification.onRead();
+          if (notification.state) {
+            $state.go(notification.state, notification.stateParams);
+          }
+        });
+    }
+
+    function showNewInvitation(parameters) {
+      return csWallet.auth({minData: true})
+        .then(function(walletData) {
+          UIUtils.loading.hide();
+
+          // Not allow for non-member - issue #561
+          if (!walletData.isMember) {
+            return UIUtils.alert.error('ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION');
+          }
+          return ModalUtils.show('plugins/es/templates/invitation/modal_new_invitation.html', 'ESNewInvitationModalCtrl',
+            parameters);
+        });
+    }
+
+    function showNewPage(options) {
+      var wallet = options && options.wallet || csWallet;
+      return wallet.auth({minData: true})
+        .then(function() {
+          UIUtils.loading.hide();
+
+          return ModalUtils.show('plugins/es/templates/registry/modal_record_type.html', undefined, {
+            title: 'REGISTRY.EDIT.TITLE_NEW'
+          })
+            .then(function(type){
+              if (type) {
+                $state.go('app.registry_add_record', {type: type, wallet: wallet.id});
+              }
+            });
+        });
+    }
+
+    function showNetworkLookup(parameters) {
+      return ModalUtils.show('plugins/es/templates/network/modal_network.html', 'ESNetworkLookupModalCtrl',
+        parameters, {focusFirstInput: false});
+    }
+
+    return {
+      showMessageCompose: showMessageCompose,
+      showNotifications: showNotificationsPopover,
+      showNewInvitation: showNewInvitation,
+      showNewPage: showNewPage,
+      showNetworkLookup: showNetworkLookup
+    };
+
+  }]);
+
+angular.module('cesium.es.blockchain.services', ['cesium.services', 'cesium.es.http.services'])
+
+.factory('esBlockchain', ['$rootScope', '$q', '$timeout', 'BMA', 'csCache', 'esHttp', function($rootScope, $q, $timeout, BMA, csCache, esHttp) {
+  'ngInject';
+
+  function EsBlockchain() {
+
+    var
+      PUBKEY = BMA.constants.regexp.PUBKEY,
+      CONSTANTS = {
+        DEFAULT_SEARCH_SIZE: 40,
+        ES_CORE_API_ENDPOINT: 'ES_CORE_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))'
+      },
+      REGEXPS = {
+        /* WARNING: keep keys order for UI */
+        SEARCH_FILTER: {
+          TX_PUBKEY: new RegExp('\\(transactions\\.issuers:('+PUBKEY+') OR transactions\\.outputs:\\*('+PUBKEY+')\\)([ ]+AND)?'),
+          ISSUER: new RegExp('issuer:('+PUBKEY+')([ ]+AND)?'),
+          MEMBER_FLOWS: new RegExp('\\(_exists_:joiners OR _exists_:leavers OR _exists_:revoked OR _exists_:excluded\\)([ ]+AND)?'),
+          EXISTING_TRANSACTION: new RegExp('_exists_:transactions([ ]+AND)?'),
+          PERIOD: new RegExp('medianTime:>=?([0-9]+)[ ]+AND[ ]+medianTime:<=?([0-9]+)([ ]+AND)?')
+        },
+        LAST_AND: /[ ]+AND$/
+      },
+      FIELDS = {
+        MINIMAL: ['number', 'hash', 'medianTime', 'issuer'],
+        COMMONS: ['number', 'hash', 'medianTime', 'issuer', 'currency', 'version', 'powMin', 'dividend', 'membersCount', 'identities', 'joiners', 'actives', 'leavers', 'revoked', 'excluded', 'certifications', 'transactions']
+      },
+      exports = {
+        node: {},
+        block: {},
+        raw: {
+          block: {
+            search: esHttp.post('/:currency/block/_search', csCache.constants.SHORT),
+            searchText: esHttp.get('/:currency/block/_search?q=:text'),
+            get: esHttp.get('/:currency/block/:number/_source', csCache.constants.SHORT)
+          }
+        },
+        regexp: {
+          ES_CORE_API_ENDPOINT: exact(CONSTANTS.ES_CORE_API_ENDPOINT)
+        }
+      };
+    exports.regex = exports.regexp;  // deprecated
+
+    function exact(regexpContent) {
+      return new RegExp('^' + regexpContent + '$');
+    }
+
+    exports.node.parseEndPoint = function(endpoint) {
+      var matches = exports.regexp.ES_CORE_API_ENDPOINT.exec(endpoint);
+      if (!matches) return;
+      return {
+        dns: matches[2] || '',
+        ipv4: matches[4] || '',
+        ipv6: matches[6] || '',
+        port: matches[8] || 80
+      };
+    };
+
+
+    exports.raw.block.processSearchResult = function(res, options) {
+      options = options || {};
+      options.excludeCurrent = angular.isDefined(options.excludeCurrent) ? options.excludeCurrent : true;
+      options.fillAvatar = angular.isDefined(options.fillAvatar) ? options.fillAvatar : true;
+      options.cleanData = angular.isDefined(options.cleanData) ? options.cleanData : true;
+
+      var hasExcludedCurrent = false;
+      var hits = (res && res.hits && res.hits.hits || []).reduce(function(res, hit) {
+        if (hit._id == 'current' && options.excludeCurrent) {
+          hasExcludedCurrent = true;
+          return res;
+        }
+        if (!hit._source) return res;
+        var block = new Block(hit._source);
+        if (options.cleanData) {
+          block.cleanData(); // release data's arrays
+        }
+        return res.concat(block);
+      }, []);
+      return {
+        hits: hits,
+        took: res.took,
+        total: res && res.hits && res.hits.total ? (
+          hasExcludedCurrent ? res.hits.total-1 : res.hits.total) : 0
+      };
+    };
+
+    exports.block.search = function(currency, options) {
+      var request = options ? angular.copy(options) : {};
+      delete request.excludeCurrent;
+      delete request.fillAvatar;
+      delete request.skipData;
+      request.from = request.from || 0;
+      request.size = request.size || CONSTANTS.DEFAULT_SEARCH_SIZE;
+      request._source = options._source || FIELDS.COMMONS;
+      if (options._source && options._source == '*') {
+        delete request._source;
+      }
+
+      return exports.raw.block.search(request, {currency: currency})
+        .then(function(res) {
+          return exports.raw.block.processSearchResult(res, options);
+        });
+    };
+
+    exports.block.searchText = function(currency, text, options) {
+      if (options && angular.isUndefined(options.excludeCurrent)) {
+        options.excludeCurrent = true;
+      }
+      var request = options ? angular.copy(options) : {};
+      delete request.excludeCurrent;
+      delete request.fillAvatar;
+      delete request.skipData;
+      request.from = request.from || 0;
+      request.size = request.size || CONSTANTS.DEFAULT_SEARCH_SIZE;
+      request._source = options._source || FIELDS.COMMONS.join(',');
+      if (options._source && options._source == '*') {
+        delete request._source;
+      }
+
+      request.currency=currency;
+      request.text=text||'';
+
+      return exports.raw.block.searchText(request)
+        .then(function(res) {
+          return exports.raw.block.processSearchResult(res, options);
+        });
+    };
+
+    exports.block.parseSearchText = function(text, filters) {
+
+      var unparsedText = text;
+      filters = _.keys(REGEXPS.SEARCH_FILTER).reduce(function(res, filterType){
+        var matches = REGEXPS.SEARCH_FILTER[filterType].exec(unparsedText);
+        if (matches) {
+          var filterText = matches[0];
+
+          // update rest
+          unparsedText = unparsedText.replace(filterText, '');
+
+          filterText = filterText.replace(REGEXPS.LAST_AND, '');
+
+          var filter = {
+            type: filterType,
+            text: filterText,
+            params: matches
+          };
+          return res.concat(filter);
+        }
+        return res;
+      }, filters||[]);
+
+      return {
+        filters: filters,
+        text: unparsedText.trim()
+      };
+    };
+
+    return exports;
+  }
+
+
+  return EsBlockchain();
+}])
+;
+
+angular.module('cesium.es.group.services', ['cesium.platform', 'cesium.es.http.services',
+  'cesium.es.profile.services', 'cesium.es.notification.services', 'cesium.es.comment.services'])
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esGroup');
+    }
+
+  }])
+
+.factory('esGroup', ['$q', '$rootScope', 'csPlatform', 'BMA', 'csSettings', 'esHttp', 'CryptoUtils', 'csWot', 'csWallet', 'esNotification', 'esComment', function($q, $rootScope, csPlatform, BMA, csSettings, esHttp, CryptoUtils, csWot, csWallet, esNotification, esComment) {
+  'ngInject';
+
+  var
+    listeners,
+    defaultLoadSize = 50,
+    fields = {
+      list: ["issuer", "title", "description", "type", "creationTime", "avatar._content_type"],
+      commons: ["issuer", "title", "description", "creationTime", "time", "signature"],
+      notifications: ["issuer", "time", "hash", "read_signature"]
+    },
+    exports = {
+      _internal: {}
+    };
+
+  function onWalletInit(data) {
+    data.groups = data.groups || {};
+    data.groups.unreadCount = null;
+  }
+
+  function onWalletReset(data) {
+    if (data.groups) {
+      delete data.groups;
+    }
+  }
+
+  function onWalletLogin(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey) {
+      deferred.resolve();
+      return deferred.promise;
+    }
+
+    // Count unread notifications
+    esNotification.unreadCount(data.pubkey, {codes: {
+      includes: ['GROUP_INVITATION'],
+      excludes: []
+    }})
+      .then(function(unreadCount){
+        data.groups = data.groups || {};
+        data.groups.unreadCount = unreadCount;
+        console.debug('[ES] [group] Detecting ' + unreadCount + ' unread notifications');
+        deferred.resolve(data);
+      })
+      .catch(function(err){
+        console.error('Error while counting group notifications: ' + (err.message ? err.message : err));
+        deferred.resolve(data);
+      });
+    return deferred.promise;
+  }
+
+  function readRecordFromHit(hit, html) {
+    if (!hit) return;
+    var record = hit._source;
+    if (html && hit.highlight) {
+      if (hit.highlight.title) {
+        record.title = hit.highlight.title[0];
+      }
+      if (hit.highlight.description) {
+        record.description = hit.highlight.description[0];
+      }
+      if (hit.highlight.location) {
+        record.location = hit.highlight.location[0];
+      }
+      if (hit.highlight.tags) {
+        data.tags = hit.highlight.tags.reduce(function(res, tag){
+          return res.concat(tag.replace('<em>', '').replace('</em>', ''));
+        },[]);
+      }
+    }
+
+    // description
+    if (html) {
+      record.description = esHttp.util.parseAsHtml(record.description);
+    }
+
+    // avatar
+    record.avatar = esHttp.image.fromHit(hit, 'avatar');
+
+    // pictures
+    if (hit._source.pictures && hit._source.pictures.reduce) {
+      record.pictures = hit._source.pictures.reduce(function(res, pic) {
+        return res.concat(esHttp.image.fromAttachment(pic.file));
+      }, []);
+    }
+
+    return record;
+  }
+
+  exports._internal.search = esHttp.post('/group/record/_search');
+
+  function _executeSearchRequest(request) {
+    return exports._internal.search(request)
+      .then(function(res) {
+        if (!res || !res.hits || !res.hits.total) {
+          return [];
+        }
+        var groups = res.hits.hits.reduce(function(res, hit) {
+          var record = readRecordFromHit(hit, true/*html*/);
+          record.id = hit._id;
+          return record ? res.concat(record) : res;
+        }, []);
+
+        console.debug('[ES] [group] Loading {0} groups'.format(groups.length));
+
+        return groups;
+      });
+  }
+
+  function getLastGroups(options) {
+    options = options || {};
+
+    /*if (!csWallet.isLogin()) {
+      return $q.when([]);
+    }*/
+
+    var request = {
+      sort: {
+        "time" : "desc"
+      },
+      from: options.from || 0,
+      size: options.size || defaultLoadSize,
+      _source: options._source || fields.list
+    };
+
+    return _executeSearchRequest(request);
+  }
+
+  function searchGroups(options) {
+    options = options || {};
+
+    var text = options.text && options.text.trim();
+    if (!text) return getLastGroups(options);
+
+    var request = {
+      from: options.from || 0,
+      size: options.size || defaultLoadSize,
+      highlight: {fields : {title : {}, tags: {}}},
+      _source: options._source || fields.list
+    };
+
+
+    var matches = [];
+    var filters = [];
+    // pubkey : use a special 'term', because of 'non indexed' field
+    if (BMA.regexp.PUBKEY.test(text /*case sensitive*/)) {
+      filters.push({term : { issuer: text}});
+      filters.push({term : { pubkey: text}});
+    }
+    else {
+      text = text.toLowerCase();
+      var matchFields = ["title", "description"];
+      matches.push({multi_match : { query: text,
+        fields: matchFields,
+        type: "phrase_prefix"
+      }});
+      matches.push({match : { title: text}});
+      matches.push({match : { description: text}});
+    }
+
+    request.query = {bool: {}};
+    if (matches.length > 0) {
+      request.query.bool.should =  matches;
+    }
+    if (filters.length > 0) {
+      request.query.bool.filter =  filters;
+    }
+
+
+
+
+    return _executeSearchRequest(request);
+  }
+
+  exports._internal.get = esHttp.get('/group/record/:id');
+  exports._internal.getCommons = esHttp.get('/group/record/:id?_source=' + fields.commons.join(','));
+
+  function loadData(id, options) {
+    options = options || {};
+    options.fecthPictures = angular.isDefined(options.fetchPictures) ? options.fetchPictures : false;
+    options.html = angular.isDefined(options.html) ? options.html : true;
+
+    // Do get source
+    var promise = options.fecthPictures ?
+      exports._internal.get({id: id}) :
+      exports._internal.getCommons({id: id});
+
+    return promise
+      .then(function(hit) {
+        var record = readRecordFromHit(hit, options.html);
+
+        // Load issuer (avatar, name, uid, etc.)
+        return csWot.extend({pubkey: record.issuer})
+          .then(function(issuer) {
+            return {
+              id: hit._id,
+              issuer: issuer,
+              record: record
+            };
+          });
+      });
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function addListeners() {
+    // Extend csWallet.loadData()
+    listeners = [
+      csWallet.api.data.on.login($rootScope, onWalletLogin, this),
+      csWallet.api.data.on.init($rootScope, onWalletInit, this),
+      csWallet.api.data.on.reset($rootScope, onWalletReset, this)
+    ];
+  }
+
+  function refreshState() {
+    var enable = esHttp.alive;
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [group] Disable");
+      removeListeners();
+      if (csWallet.isLogin()) {
+        onWalletReset(csWallet.data);
+      }
+    }
+    else if (enable && (!listeners || listeners.length === 0)) {
+      console.debug("[ES] [group] Enable");
+      addListeners();
+      if (csWallet.isLogin()) {
+        onWalletLogin(csWallet.data);
+      }
+    }
+  }
+
+  // Default actions
+  csPlatform.ready().then(function() {
+    esHttp.api.node.on.start($rootScope, refreshState, this);
+    esHttp.api.node.on.stop($rootScope, refreshState, this);
+    return refreshState();
+  });
+
+  return {
+    record: {
+      last: getLastGroups,
+      search: searchGroups,
+      load: loadData,
+      add: esHttp.record.post('/group/record', {tagFields: ['title', 'description']}),
+      update: esHttp.record.post('/group/record/:id/_update', {tagFields: ['title', 'description']}),
+      remove: esHttp.record.remove('group', 'record'),
+      fields: {
+        commons: fields.commons
+      },
+      picture: {
+        all: esHttp.get('/group/record/:id?_source=pictures')
+      },
+      comment: esComment.instance('group')
+    }
+  };
+}])
+;
+
+angular.module('cesium.es.invitation.services', ['cesium.platform',
+  'cesium.es.http.services', 'cesium.es.wallet.services', 'cesium.es.notification.services'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esInvitation');
+    }
+
+  }])
+
+.factory('esInvitation', ['$rootScope', '$q', '$timeout', 'CryptoUtils', 'csPlatform', 'Api', 'esHttp', 'csWallet', 'esWallet', 'csWot', 'esNotification', function($rootScope, $q, $timeout, CryptoUtils, csPlatform, Api, esHttp, csWallet, esWallet, csWot, esNotification) {
+  'ngInject';
+
+  var
+    that = this,
+    constants = {
+      DEFAULT_LOAD_SIZE: 20
+    },
+    fields = {
+      commons: ["issuer", "time", "hash", "content", "nonce", "comment"]
+    },
+    api = new Api(this, 'esInvitation'),
+    listeners;
+
+  that.raw = {
+    certification: {
+      get: esHttp.get('/invitation/certification/:id?_source:fields'),
+      add: esHttp.record.post('/invitation/certification'),
+      postSearch: esHttp.post('/invitation/certification/_search'),
+      remove: esHttp.record.remove('invitation', 'certification'),
+      getIds: esHttp.get('/invitation/certification/_search?q=recipient::pubkey&_source=false&size=1000')
+    }
+  };
+
+  function onWalletInit(data) {
+    data.invitations = data.invitations || {};
+    data.invitations.unreadCount = null;
+    data.invitations.time = null;
+  }
+
+  function onWalletReset(data) {
+    if (data.invitations) {
+      delete data.invitations;
+    }
+  }
+
+  function onWalletLoad(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey) {
+      $timeout(function() {
+        deferred.resolve(data);
+      });
+      return deferred.promise;
+    }
+
+    var now = Date.now();
+    var time = Math.trunc(now / 1000);
+
+    // Skip if loaded less than 1 min ago
+    // (This is need to avoid reload on login AND load phases)
+    if (data.invitations && data.invitations.time && (time - data.invitations.time < 30 /*=30s*/)) {
+      console.debug('[ES] [invitation] Skipping load (loaded {0}s ago)'.format(time - data.invitations.time));
+      $timeout(function() {
+        deferred.resolve(data);
+      });
+      return deferred.promise;
+    }
+
+    console.debug('[ES] [invitation] Loading count...');
+
+    // Count unread invitations
+    countUnreadInvitations(data.pubkey)
+      .then(function(unreadCount){
+        data.invitations = data.invitations || {};
+        data.invitations.unreadCount = unreadCount;
+        data.invitations.time = time;
+        console.debug('[ES] [invitation] Loaded count (' + unreadCount + ') in '+(Date.now()-now)+'ms');
+        deferred.resolve(data);
+      })
+      .catch(function(err){
+        console.error('Error while counting invitation: ' + (err.message ? err.message : err));
+        deferred.resolve(data);
+      });
+    return deferred.promise;
+  }
+
+  function onWalletCertify(cert) {
+    if (!csWallet.data.invitations || !csWallet.data.invitations.list) return;
+
+    // Search on invitations
+    var invitationstoRemove = _.where(csWallet.data.invitations.list, {
+      type: 'certification',
+      pubkey: cert.pubkey
+    });
+    if (!invitationstoRemove || !invitationstoRemove.length) return;
+
+    // Remove all invitations related to this pubkey
+    return $q.all(
+      invitationstoRemove.reduce(function(res, invitation) {
+        return res.concat(
+          deleteInvitation(invitation)
+        );
+      }, []));
+  }
+
+  function onNewInvitationEvent(event) {
+    console.debug("[ES] [invitation] detected new invitation (from notification service)");
+
+    // If user not auth: simply increment counter
+    if (!csWallet.isAuth()) {
+      $rootScope.$applyAsync(function() {
+        csWallet.data.invitations = csWallet.data.invitations || {};
+        csWallet.data.invitations.unreadCount++;
+      });
+      return;
+    }
+
+    getInvitationById(event.reference.id, event.reference.type)
+      .then(function(invitation){
+        csWallet.data.invitations = csWallet.data.invitations || {};
+        csWallet.data.invitations.unreadCount++;
+
+        // Insert into the result list (if exists = already loaded)
+        if (csWallet.data.invitations.list) {
+          csWallet.data.invitations.list.splice(0,0,invitation);
+        }
+
+        // Raise event
+        api.data.raise.new(invitation);
+      });
+  }
+
+  function countUnreadInvitations(pubkey) {
+    pubkey = pubkey || (csWallet.isLogin() ? csWallet.data.pubkey : pubkey);
+    if (!pubkey) {
+      throw new Error('User not connected or no pubkey');
+    }
+
+    var request = {
+      query: {
+        bool: {
+          must: [
+            {term: {recipient: pubkey}}
+          ]
+        }
+      }
+    };
+
+    // TODO : count using size=0
+    // and with 'group by' on type
+    return esHttp.post('/invitation/certification/_count')(request)
+      .then(function(res) {
+        return res.count;
+      });
+  }
+
+  function sendInvitation(record, options) {
+    options = options || {};
+    options.type = options.type || 'certification';
+    var keypair = options.keypair || (options.wallet && options.wallet.data.keypair);
+    return esWallet.box.record.pack(record, keypair, 'recipient', ['content', 'comment'])
+      .then(function(record) {
+        return that.raw[options.type].add(record, options);
+      });
+  }
+
+  function getInvitationById(id, type) {
+    type = type || 'certification';
+    return $q.all([
+        esWallet.box.getKeypair(),
+        that.raw[type].get({id: id, fields: fields.commons.join(',')})
+      ])
+      .then(function(res) {
+        var keypair = res[0];
+        var hit = res[1];
+        var json = hit._source;
+        json.id = hit._id;
+        json.type = hit._type;
+
+        // Encrypt content
+        return esWallet.box.record.open([json], keypair, 'issuer', ['content', 'comment']);
+      })
+
+      // Extend identity: add name, avatar...
+      .then(function(jsons) {
+        var json = jsons[0];
+        if (!json || !json.valid) return; // skip invalid cypher content
+        var invitation = new Invitation(json);
+
+        return csWot.extendAll(invitation.issuer ? [invitation, invitation.issuer] : [invitation], 'pubkey')
+          .then(function() {
+            return invitation;
+          });
+      });
+  }
+
+  function loadInvitations(options, keypair) {
+    if (!csWallet.isLogin()) return $q.when([]); // Should never happen
+    options = options || {};
+    options.from = options.from || 0;
+    options.size = options.size || constants.DEFAULT_LOAD_SIZE;
+
+    var issuer = options.issuer || csWallet.data.pubkey;
+    var request = {
+      sort: {
+        "time" : "desc"
+      },
+      query: {bool: {filter: {term: {recipient: issuer}}}},
+      from: options.from,
+      size: options.size,
+      _source: fields.commons
+    };
+
+    // Filter on time
+    if (options.readTime) {
+      query.bool.must = [{range: {time: {gt: options.readTime}}}];
+    }
+
+    return that.raw.certification.postSearch(request)
+      .then(function(res) {
+        if (!res || !res.hits || !res.hits.total) return [];
+
+        var invitations = res.hits.hits.reduce(function (result, hit) {
+          var msg = hit._source;
+          msg.id = hit._id;
+          msg.type = hit._type;
+          msg.read = !!msg.read_signature;
+          delete msg.read_signature; // not need anymore
+          return result.concat(msg);
+        }, []);
+
+        // Encrypt content
+        return esWallet.box.record.open(invitations, keypair, 'issuer', ['content', 'comment']);
+      })
+
+      // Extension identities entity
+      .then(function(invitations) {
+
+        var identitiesToExtend = [];
+        invitations = invitations.reduce(function (res, json) {
+          if (!json || !json.valid) return res; // skipping invalid cypher
+          var invitation = new Invitation(json);
+          identitiesToExtend.push(invitation);
+          if (invitation.issuer) {
+            identitiesToExtend.push(invitation.issuer);
+          }
+          return res.concat(invitation);
+        }, []);
+
+        // Extend all identities (issuer and invitation): add name, avatar...
+        return csWot.extendAll(identitiesToExtend, 'pubkey')
+
+          // Update invitations count
+          .then(function(){
+
+            csWallet.data.invitations = csWallet.data.invitations || {};
+
+            // Update invitation list
+            if (!csWallet.data.invitations.list) {
+              csWallet.data.invitations.list = invitations;
+            }
+            else {
+              // Reset previous existing invitation
+              if (csWallet.data.invitations.list.length) {
+                csWallet.data.invitations.list.splice(options.from, csWallet.data.invitations.list.length-options.from);
+              }
+              // Then insert new invitations
+              _.forEach(invitations, function (invitation) {
+                csWallet.data.invitations.list.push(invitation);
+              });
+            }
+
+            return csWallet.data.invitations.list; // final result
+          });
+      });
+  }
+
+  function deleteInvitation(invitation, options) {
+    if (!invitation || !invitation.id) throw 'Invalid invitation (empty or without id). Could not delete.';
+    var type = invitation.type || 'certification';
+    var wallet = options && options.walletId && csWallet.children.get(options.walletId) || csWallet;
+    return that.raw[type].remove(invitation.id, {wallet: wallet})
+      .then(function() {
+        // Always reset unread count
+        wallet.data.invitations.unreadCount = 0;
+
+        if (!wallet.data.invitations || !wallet.data.invitations.list) return;
+
+        // Remove form list
+        wallet.data.invitations.list.splice(wallet.data.invitations.list.indexOf(invitation), 1);
+      });
+  }
+
+  function deleteInvitationsByIds(ids, type, options) {
+    if (!ids || !ids.length) return $q.when();
+    type = type || 'certification';
+    return $q.all(
+        ids.reduce(function(res, id) {
+          return res.concat(that.raw[type].remove(id, options));
+        }, [])
+      );
+  }
+
+  function deleteAllInvitationsByPubkey(type, options) {
+
+    type = type || 'certification';
+
+    var now = Date.now();
+    console.debug('[ES] [invitation] Deleting all {0} invitations...'.format(type));
+
+    var wallet = (options && options.pubkey && csWallet.children.getByPubkey(options.pubkey)) ||
+      (options && options.walletId && csWallet.children.getByPubkey(options.walletId)) ||
+      csWallet;
+    var countBeforeDeletion = (wallet.data.invitations && wallet.data.invitations.count) || 0;
+    var unreadCountBeforeDeletion = (wallet.data.invitations && wallet.data.invitations.unreadCount) || 0;
+
+    // Get invitation ids
+    return that.raw[type].getIds({pubkey: wallet.data.pubkey})
+      .then(function(res) {
+        if (!res || !res.hits || !res.hits.total) return;
+        var ids = res.hits.hits.reduce(function (res, hit) {
+          return res.concat(hit._id);
+        }, []);
+
+        // Do deletion by ids
+        return deleteInvitationsByIds(ids, type, {walletId: wallet.id})
+          .then(function() {
+            // Update wallet count
+            wallet.data.invitations = wallet.data.invitations || {};
+            // Decrement count (warning: could have received new invitations during deletion execution)
+            if (wallet.data.invitations.count >= countBeforeDeletion) {
+              wallet.data.invitations.count -= countBeforeDeletion || 0;
+            }
+            else {
+              wallet.data.invitations.count = 0;
+            }
+            // Decrement count (warning: could have received new invitations during deletion execution)
+            if (wallet.data.invitations.unreadCount >= unreadCountBeforeDeletion) {
+              wallet.data.invitations.unreadCount -= unreadCountBeforeDeletion || 0;
+            }
+            else {
+              wallet.data.invitations.unreadCount = 0;
+            }
+
+            console.debug('[ES] [invitation] All {0} invitations deleted in {1}ms'.format(type, Date.now()-now));
+          });
+      });
+  }
+
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function addListeners() {
+    // Extend csWallet events
+    listeners = [
+      csWallet.api.data.on.init($rootScope, onWalletInit, this),
+      csWallet.api.data.on.login($rootScope, onWalletLoad, this),
+      csWallet.api.data.on.load($rootScope, onWalletLoad, this),
+      csWallet.api.data.on.reset($rootScope, onWalletReset, this),
+      csWallet.api.action.on.certify($rootScope, onWalletCertify, this),
+      esNotification.api.event.on.newInvitation($rootScope, onNewInvitationEvent, this)
+    ];
+  }
+
+  function refreshState() {
+    var enable = esHttp.alive;
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [invitations] Disable");
+      removeListeners();
+      if (csWallet.isLogin()) {
+        onWalletReset(csWallet.data);
+      }
+    }
+    else if (enable && (!listeners || listeners.length === 0)) {
+      console.debug("[ES] [invitations] Enable");
+      addListeners();
+      if (csWallet.isLogin()) {
+        onWalletLoad(csWallet.data);
+      }
+    }
+  }
+
+  // Register extension points
+  api.registerEvent('data', 'new');
+
+  // Default action
+  csPlatform.ready().then(function() {
+    esHttp.api.node.on.start($rootScope, refreshState, this);
+    esHttp.api.node.on.stop($rootScope, refreshState, this);
+    return refreshState();
+  });
+
+  // Exports
+  that.api = api;
+  that.load = loadInvitations;
+  that.get = getInvitationById;
+  that.send = sendInvitation;
+  that.delete = deleteInvitation;
+  that.deleteByIds = deleteInvitationsByIds;
+  that.deleteAll = deleteAllInvitationsByPubkey;
+
+  that.constants = constants;
+
+  return that;
+}])
+;
+
+angular.module('cesium.es.subscription.services', ['cesium.platform', 'cesium.es.http.services'])
+.config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esSubscription');
+    }
+
+  }])
+
+.factory('esSubscription', ['$rootScope', '$q', '$timeout', 'esHttp', '$state', '$sce', '$sanitize', 'esSettings', 'CryptoUtils', 'UIUtils', 'csWallet', 'csWot', 'BMA', 'csPlatform', 'esWallet', function($rootScope, $q, $timeout, esHttp, $state, $sce, $sanitize,
+                            esSettings, CryptoUtils, UIUtils, csWallet, csWot, BMA, csPlatform, esWallet) {
+  'ngInject';
+  var
+    constants = {
+    },
+    that = this,
+    listeners;
+
+  that.raw = {
+    getAll: esHttp.get('/subscription/record/_search?_source_excludes=recipientContent&q=issuer::issuer'),
+    count: esHttp.get('/subscription/record/_search?size=0&q=issuer::pubkey'),
+    add: esHttp.record.post('/subscription/record'),
+    update: esHttp.record.post('/subscription/record/:id/_update'),
+    category: {
+      get: esHttp.get('/subscription/category/:id'),
+      all: esHttp.get('/subscription/category/_search?sort=order&from=0&size=1000&_source=name,parent,key')
+    }
+  };
+
+  function onWalletReset(data) {
+    data.subscriptions = null;
+  }
+
+  function onWalletLoad(data, deferred) {
+    deferred = deferred || $q.defer();
+    if (!data || !data.pubkey || !data.keypair) {
+      deferred.resolve();
+      return deferred.promise;
+    }
+
+    console.debug('[ES] [subscription] Loading subscriptions count...');
+
+    // Load subscriptions count
+    that.raw.count({pubkey: data.pubkey})
+      .then(function(res) {
+        data.subscriptions = data.subscriptions || {};
+        data.subscriptions.count = res && res.hits && res.hits.total;
+        console.debug('[ES] [subscription] Loaded count (' + data.subscriptions.count  + ')');
+        deferred.resolve(data);
+      })
+      .catch(function(err) {
+        console.error('[ES] [subscription] Error while counting subscription: ' + (err.message ? err.message : err));
+        deferred.resolve(data);
+      });
+
+    return deferred.promise;
+  }
+
+  function loadRecordsByPubkey(issuer, keypair) {
+    return that.raw.getAll({issuer: issuer})
+      .then(function(res) {
+        var records = res && res.hits && res.hits.total &&
+          res.hits.hits.reduce(function(res, hit) {
+            var record = hit._source;
+            record.id = hit._id;
+            return res.concat(record);
+          }, []) || [];
+
+        return esWallet.box.record.open(records, keypair, 'issuer', 'issuerContent')
+          .then(function(records) {
+            _.forEach(records, function(record) {
+              record.content = JSON.parse(record.issuerContent || '{}');
+              delete record.issuerContent;
+              delete record.recipientContent;
+            });
+            return records;
+          });
+      });
+  }
+
+  function addRecord(record, options) {
+    if (!record || !record.type || !record.content || !record.recipient) {
+      return $q.reject("Missing arguments 'record' or 'record.type' or 'record.content' or 'record.recipient'");
+    }
+
+    var wallet = options && options.wallet || (options && options.walletId && csWallet.children.get(options.walletId)) || csWallet;
+    var issuer = wallet.data.pubkey;
+
+    var contentStr = JSON.stringify(record.content);
+
+    // Get a unique nonce
+    return CryptoUtils.util.random_nonce()
+      // Encrypt contents
+      .then(function(nonce) {
+        return $q.all([
+          esWallet.box.record.pack({issuer: issuer, issuerContent: contentStr}, wallet.data.keypair, 'issuer', 'issuerContent', nonce),
+          esWallet.box.record.pack({recipient: record.recipient, recipientContent: contentStr}, wallet.data.keypair, 'recipient', 'recipientContent', nonce)
+        ]);
+      })
+      // Merge encrypted record
+      .then(function(res){
+        var encryptedRecord = angular.merge(res[0], res[1]);
+        encryptedRecord.type = record.type;
+
+        // Post subscription
+        return that.raw.add(encryptedRecord, {wallet: wallet})
+          .then(function(id) {
+            record.id = id;
+            return record;
+          });
+      })
+      ;
+  }
+
+  function updateRecord(record, options) {
+    if (!record || !record.content || !record.recipient) {
+      return $q.reject("Missing arguments 'record' or 'record.content', or 'record.recipient'");
+    }
+
+    var wallet = options && options.wallet || (options && options.walletId && csWallet.children.get(options.walletId)) || csWallet;
+    var issuer = wallet.data.pubkey;
+    var contentStr = JSON.stringify(record.content);
+
+    // Get a unique nonce
+    return CryptoUtils.util.random_nonce()
+    // Encrypt contents
+      .then(function(nonce) {
+        return $q.all([
+          esWallet.box.record.pack({issuer: issuer, issuerContent: contentStr}, wallet.data.keypair, 'issuer', 'issuerContent', nonce),
+          esWallet.box.record.pack({recipient: record.recipient, recipientContent: contentStr}, wallet.data.keypair, 'recipient', 'recipientContent', nonce)
+        ]);
+      })
+      // Merge encrypted record
+      .then(function(res){
+        var encryptedRecord = angular.merge(res[0], res[1]);
+        encryptedRecord.type = record.type;
+
+        // Post subscription
+        return that.raw.update(encryptedRecord, {id:record.id, wallet: wallet})
+          .then(function() {
+            return record; // return original record
+          });
+      })
+      ;
+  }
+
+  function getCategories() {
+    if (that.raw.categories && that.raw.categories.length) {
+      var deferred = $q.defer();
+      deferred.resolve(that.raw.categories);
+      return deferred.promise;
+    }
+
+    return that.raw.category.all()
+      .then(function(res) {
+        if (res.hits.total === 0) {
+          that.raw.categories = [];
+        }
+        else {
+          var categories = res.hits.hits.reduce(function(result, hit) {
+            var cat = hit._source;
+            cat.id = hit._id;
+            return result.concat(cat);
+          }, []);
+          // add as map also
+          _.forEach(categories, function(cat) {
+            categories[cat.id] = cat;
+          });
+          that.raw.categories = categories;
+        }
+        return that.raw.categories;
+      });
+  }
+
+  function getCategory(params) {
+    return that.raw.category.get(params)
+      .then(function(hit) {
+        var res = hit._source;
+        res.id = hit._id;
+        return res;
+      });
+  }
+
+  function removeListeners() {
+    _.forEach(listeners, function(remove){
+      remove();
+    });
+    listeners = [];
+  }
+
+  function addListeners() {
+    // Extend
+    listeners = [
+      csWallet.api.data.on.load($rootScope, onWalletLoad, this),
+      csWallet.api.data.on.init($rootScope, onWalletReset, this),
+      csWallet.api.data.on.reset($rootScope, onWalletReset, this)
+    ];
+  }
+
+  function refreshState() {
+    var enable = esHttp.alive;
+    if (!enable && listeners && listeners.length > 0) {
+      console.debug("[ES] [subscription] Disable");
+      removeListeners();
+      if (csWallet.isLogin()) {
+        return onWalletReset(csWallet.data);
+      }
+    }
+    else if (enable && (!listeners || listeners.length === 0)) {
+      console.debug("[ES] [subscription] Enable");
+      addListeners();
+      if (csWallet.isLogin()) {
+        return onWalletLoad(csWallet.data);
+      }
+    }
+  }
+
+  // Default actions
+  csPlatform.ready().then(function() {
+    esHttp.api.node.on.start($rootScope, refreshState, this);
+    esHttp.api.node.on.stop($rootScope, refreshState, this);
+    return refreshState();
+  });
+
+  // Exports
+  that.record = {
+    load: loadRecordsByPubkey,
+    add: addRecord,
+    update: updateRecord,
+    remove: esHttp.record.remove('subscription', 'record')
+  };
+  that.category = {
+    all: getCategories,
+    get: getCategory
+  };
+  that.constants = constants;
+
+  return that;
+}])
+;
+
+angular.module('cesium.es.wallet.services', ['ngResource', 'cesium.platform', 'cesium.es.http.services', 'cesium.es.crypto.services'])
+
+  .factory('esWallet', ['$q', '$rootScope', '$timeout', 'CryptoUtils', 'csPlatform', 'csWallet', 'csSettings', 'esCrypto', 'esProfile', 'esHttp', function($q, $rootScope, $timeout, CryptoUtils, csPlatform, csWallet, csSettings, esCrypto, esProfile, esHttp) {
+    'ngInject';
+
+    var
+      listeners,
+      that = this;
+
+    function onWalletReset(data) {
+      data.name = null;
+      data.avatar = null;
+      data.profile = null;
+      data.moderator = null;
+      csWallet.events.cleanByContext('esWallet');
+      if (data.keypair) {
+        delete data.keypair.boxSk;
+        delete data.keypair.boxPk;
+      }
+    }
+
+    function onWalletAuth(data, deferred) {
+      deferred = deferred || $q.defer();
+
+      // Generate box keypair
+      esCrypto.box.getKeypair(data.keypair)
+        .then(function(res) {
+          data.keypair.boxSk = res.boxSk;
+          data.keypair.boxPk = res.boxPk;
+          console.debug("[ES] [wallet] Box keypair successfully computed");
+          deferred.resolve();
+        })
+        .catch(deferred.reject);
+      return deferred.promise;
+    }
+
+    function onWalletUnauth(data) {
+      data = data || csWallet.data;
+      if (data.keypair) {
+        delete data.keypair.boxSk;
+        delete data.keypair.boxPk;
+      }
+    }
+
+    function onWalletLogin(data, deferred) {
+      deferred = deferred || $q.defer();
+      if (!data || !data.pubkey || !data.keypair) {
+        deferred.resolve();
+        return deferred.promise;
+      }
+
+      // Waiting to load crypto libs
+      if (!CryptoUtils.isLoaded()) {
+        console.debug('[ES] [wallet] Waiting crypto lib loading...');
+        return $timeout(function() {
+          return onWalletLogin(data, deferred);
+        }, 50);
+      }
+
+      console.debug('[ES] [wallet] Loading user avatar+name...');
+      var now = Date.now();
+
+      var jobs = [
+        esProfile.getAvatarAndName(data.pubkey)
+          .then(function(profile) {
+            if (profile) {
+              data.name = profile.name;
+              data.avatarStyle = profile.avatarStyle;
+              data.avatar = profile.avatar;
+              console.debug('[ES] [wallet] Loaded user avatar+name in '+ (Date.now()-now) +'ms');
+            }
+            else {
+              console.debug('[ES] [wallet] No user avatar+name found');
+            }
+            deferred.resolve(data);
+          })
+        ];
+
+        // Check if user is a moderators (only if expert mode)
+      if (csSettings.data.expertMode) {
+        jobs.push(esHttp.node.moderators()
+          .then(function(res) {
+            data.moderator = _.contains(res && res.moderators, data.pubkey);
+          })
+          .catch(function(err) {
+            console.error("[ES] [wallet] Cannot check is user is moderator: ", (err && err.message || err));
+            // Continue
+          })
+        );
+      }
+
+      $q.all(jobs)
+      .then(function() {
+        deferred.resolve(data);
+      })
+      .catch(deferred.reject);
+
+      return deferred.promise;
+    }
+
+    function onWalletLoad(data, deferred) {
+      deferred = deferred || $q.defer();
+
+      // Reset events
+      csWallet.events.cleanByContext('esWallet');
+
+      // If membership pending and not revocated, but not enough certifications: suggest to fill user profile
+      if (!data.name && !data.requirements.revoked && data.requirements.pendingMembership && data.requirements.needCertificationCount > 0) {
+        csWallet.events.add({type:'info', message: 'ACCOUNT.EVENT.MEMBER_WITHOUT_PROFILE', context: 'esWallet'});
+      }
+
+      console.debug('[ES] [wallet] Loading full user profile...');
+      var now = Date.now();
+
+      // Load full profile
+      esProfile.get(data.pubkey)
+        .then(function(profile) {
+          if (profile) {
+            data.name = profile.name;
+            data.avatar = profile.avatar;
+            data.profile = data.profile || {};
+            angular.merge(data.profile, profile.source, {descriptionHtml: profile.descriptionHtml});
+            console.debug('[ES] [wallet] Loaded full user profile in {0}ms'.format(Date.now()-now));
+          }
+          deferred.resolve(data);
+        })
+      .catch(deferred.reject);
+
+      return deferred.promise;
+    }
+
+    function getBoxKeypair(keypair) {
+      if (!keypair && !csWallet.isAuth()) {
+        throw new Error('Unable to get box keypair: user not authenticated !');
+      }
+
+      return (keypair ? $q.when(keypair) : csWallet.getKeypair({silent: true}))
+        .then(function(keypair) {
+          // box keypair already computed: use it
+          if (keypair && keypair.boxPk && keypair.boxSk) {
+            return $q.when(keypair);
+          }
+          // Compute box keypair
+          return esCrypto.box.getKeypair(keypair)
+            .then(function(res) {
+              // Store in the wallet keypair
+              keypair.boxSk = res.boxSk;
+              keypair.boxPk = res.boxPk;
+              console.debug("[ES] [wallet] Box keypair successfully computed");
+              return keypair;
+            });
+        });
+    }
+
+    function addListeners() {
+      // Extend API events
+      listeners = [
+        csWallet.api.data.on.login($rootScope, onWalletLogin, this),
+        csWallet.api.data.on.load($rootScope, onWalletLoad, this),
+        csWallet.api.data.on.init($rootScope, onWalletReset, this),
+        csWallet.api.data.on.reset($rootScope, onWalletReset, this),
+        csWallet.api.data.on.unauth($rootScope, onWalletUnauth, this),
+        csWallet.api.data.on.auth($rootScope, onWalletAuth, this)
+      ];
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function refreshState() {
+      var enable = esHttp.alive;
+      if (!enable && listeners && listeners.length > 0) {
+        console.debug("[ES] [wallet] Disable");
+        removeListeners();
+        if (csWallet.isLogin()) {
+          return onWalletReset(csWallet.data);
+        }
+      }
+      else if (enable && (!listeners || listeners.length === 0)) {
+        console.debug("[ES] [wallet] Enable");
+        addListeners();
+        if (csWallet.isLogin()) {
+          return onWalletLogin(csWallet.data);
+        }
+      }
+    }
+
+    // Default action
+    csPlatform.ready().then(function() {
+      esHttp.api.node.on.start($rootScope, refreshState, this);
+      esHttp.api.node.on.stop($rootScope, refreshState, this);
+      return refreshState();
+    });
+
+    // exports
+    that.box = {
+      getKeypair: getBoxKeypair,
+      record: {
+        pack: function(record, keypair, recipientFieldName, cypherFieldNames, nonce) {
+          return getBoxKeypair(keypair)
+            .then(function(fullKeypair) {
+              return esCrypto.box.pack(record, fullKeypair, recipientFieldName, cypherFieldNames, nonce);
+            });
+        },
+        open: function(records, keypair, issuerFieldName, cypherFieldNames) {
+          return getBoxKeypair(keypair)
+            .then(function(fullKeypair) {
+              return esCrypto.box.open(records, fullKeypair, issuerFieldName, cypherFieldNames);
+            });
+        }
+      }
+    };
+
+    return that;
+  }])
+;
+
+angular.module('cesium.es.wot.services', ['ngResource', 'cesium.es.http.services'])
+
+  .factory('esWot', ['$rootScope', '$q', 'esHttp', 'csCache', function($rootScope, $q, esHttp, csCache) {
+    'ngInject';
+
+    var
+      cachePrefix = 'esWot-',
+      membershipsCache = csCache.get(cachePrefix + 'memberships-', csCache.constants.MEDIUM),
+      raw = {
+          user: {
+            event: esHttp.post('/user/event/_search')
+          }
+        };
+
+    function loadMemberships(pubkey, options) {
+      options = options || {};
+
+      var result = (options.cache !== false) ? membershipsCache.get(pubkey) : null;
+      if (result) return $q.when(result);
+
+      // Get user events on membership state
+      var request = {
+        "size": 1000,
+        "query": {
+          "bool": {
+            "filter": [
+              {"term": {"recipient" : pubkey }},
+              {"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }}
+            ]
+          }
+        },
+        "sort" : [
+          { "time" : {"order" : "asc"}}
+        ],
+        _source: ["code", "time"]
+      };
+
+      return raw.user.event(request)
+
+        .then(function(res) {
+          if (!res.hits || !res.hits.total) return;
+
+          // Compute member periods
+          var lastJoinTime;
+          var result = res.hits.hits.reduce(function(res, hit){
+            var isMember = hit._source.code === 'MEMBER_JOIN' || hit._source.code === 'MEMBER_ACTIVE';
+            // If join
+            if (isMember && !lastJoinTime) {
+              lastJoinTime = hit._source.time;
+            }
+            // If leave
+            else if (!isMember && lastJoinTime) {
+              // Add an entry
+              res = res.concat({
+                joinTime: lastJoinTime,
+                leaveTime: hit._source.time
+              });
+              lastJoinTime = 0; // reset
+            }
+            return res;
+          }, []);
+
+          if (lastJoinTime) {
+            // Add last entry if need
+            result.push({
+              joinTime: lastJoinTime,
+              leaveTime: moment().utc().unix()
+            });
+          }
+
+          // Put in the cache
+          membershipsCache.put(pubkey, result);
+
+          return result;
+        });
+    };
+
+
+    function cleanAllCache() {
+      console.debug("[ES] [wot] Cleaning cache {prefix: '{0}'}...".format(cachePrefix));
+      csCache.clear(cachePrefix);
+    }
+
+    // Listen if node changed
+    esHttp.api.node.on.stop($rootScope, cleanAllCache, this);
+
+    return {
+      memberships: loadMemberships,
+      cache: {
+        clearAll: cleanAllCache
+      }
+    };
+  }]);
+
+angular.module('cesium.es.tx.services', ['ngResource', 'cesium.services', 'cesium.es.http.services', 'cesium.es.wot.services'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esTx');
+    }
+
+  }])
+
+  .factory('esTx', ['$q', '$rootScope', 'csPlatform', 'csCurrency', 'csTx', 'esHttp', 'esWot', function($q, $rootScope, csPlatform, csCurrency, csTx, esHttp, esWot) {
+    'ngInject';
+
+    var
+      listeners,
+      raw = {
+        block: {
+          search: esHttp.post('/:currency/block/_search')
+        }
+      };
+
+    function _powBase(amount, base) {
+      return base <= 0 ? amount : amount * Math.pow(10, base);
+    }
+
+    function onLoadUDs(options, deferred) {
+      deferred = deferred || $q.defer();
+
+      options = options || {};
+      if (!options.pubkey) deferred.reject('Missing [pubkey] when calling [loadUDs] extension point');
+
+      $q.all([
+          // Get currency
+          csCurrency.get(),
+
+          // Get user memberships
+          esWot.memberships(options.pubkey)
+        ])
+        .then(function(res) {
+          var currency = res[0] && res[0].name;
+          var memberships =  res[1];
+          if (!currency || !memberships || !memberships.length) return;
+
+          // Filter memberships using options.fromTime
+          if (options.fromTime !== -1) {
+            memberships = memberships.reduce(function(res, membership) {
+              if (membership.leaveTime < options.fromTime) return res;
+              membership.joinTime = Math.max(membership.joinTime, options.fromTime);
+              return res.concat(membership);
+            }, []);
+          }
+
+          return $q.all(memberships.reduce(function(res, membership) {
+            var request = {
+              query: {
+                filtered: {
+                  filter: {
+                    bool: {
+                      must: [
+                        {
+                          exists: {
+                            field: 'dividend'
+                          }
+                        },
+                        {
+                          range: {
+                            medianTime: {
+                              // Fix #736: Add 1 second, because when membership begins in a block with DU, the DU is not received
+                              from: membership.joinTime+1,
+                              to: membership.leaveTime
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  }
+                }
+              },
+              size: options.size || 10000, // TODO: use scroll ?
+              from: options.from || 0,
+              sort: {"medianTime" : "desc"},
+              _source: ["medianTime", "number", "dividend", "unitbase"]
+            };
+            return res.concat(raw.block.search(request, {currency: currency}));
+          }, []));
+        })
+        .then(function(res){
+          if (!res || !res.length) return;
+          return res.reduce(function(uds, res){
+
+            if (!res.hits.total || !res.hits.hits.length) return res;
+
+            return uds.concat(res.hits.hits.reduce(function(res, hit){
+              var block = hit._source;
+              return res.concat({
+                time: block.medianTime,
+                amount: _powBase(block.dividend, block.unitbase),
+                isUD: true,
+                block_number: block.number
+              });
+            }, []));
+
+          }, []);
+
+        })
+        .then(function(res){
+          deferred.resolve(res);
+        })
+        .catch(function(err) {
+          deferred.reject(err);
+        });
+
+      return deferred.promise;
+    }
+
+    function addListeners() {
+      // Extend API events
+      listeners = [
+        csTx.api.data.on.loadUDs($rootScope, onLoadUDs, this)
+      ];
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function refreshState() {
+      var enable = esHttp.alive;
+      if (!enable && listeners && listeners.length > 0) {
+        console.debug("[ES] [tx] Disable");
+        removeListeners();
+      }
+      else if (enable && (!listeners || listeners.length === 0)) {
+        console.debug("[ES] [tx] Enable");
+        addListeners();
+      }
+    }
+
+    // Default action
+    csPlatform.ready().then(function() {
+      esHttp.api.node.on.start($rootScope, refreshState, this);
+      esHttp.api.node.on.stop($rootScope, refreshState, this);
+      return refreshState();
+    });
+
+    // Exports
+    return {};
+  }]);
+
+angular.module('cesium.es.geo.services', ['cesium.services', 'cesium.es.http.services'])
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esGeo');
+    }
+
+  }])
+
+  .factory('esGeo', ['$rootScope', '$q', 'csConfig', 'csSettings', 'csHttp', function($rootScope, $q, csConfig, csSettings, csHttp) {
+    'ngInject';
+
+    var
+      that = this;
+
+    that.raw = {
+      osm: {
+        search: csHttp.get('nominatim.openstreetmap.org', 443, '/search.php?format=json'),
+        license: {
+          name: 'OpenStreetMap',
+          url: 'https://www.openstreetmap.org/copyright'
+        }
+      },
+      google: {
+        apiKey: undefined,
+        search: csHttp.get('maps.google.com', 443, '/maps/api/geocode/json')
+      },
+      freegeoip: {
+        //search: csHttp.get('localhost', 8080, '/json/:ip'),
+        search: csHttp.get('freegeoip.net', 443, '/json/:ip'),
+        license: {
+          name: 'freegeoip',
+          url: 'https://freegeoip.net'
+        }
+      }
+    };
+
+    function _normalizeAddressString(text) {
+      // Remove line break
+      var searchText = text.trim().replace(/\n/g, ',');
+      // Remove zip code
+      searchText = searchText.replace(/(?:^|[\t\n\r\s ])([A−Z09-]+)(?:$|[\t\n\r\s ])/g, '');
+      // Remove redundant comma
+      searchText = searchText.replace(/,[ ,]+/g, ', ');
+      return searchText;
+    }
+
+    function googleSearchPositionByString(address) {
+
+      return that.raw.google.search({address: address, key: that.raw.google.apiKey})
+        .then(function(res) {
+          if (!res || !res.results || !res.results.length) return;
+          return res.results.reduce(function(res, hit) {
+            return res.concat({
+              display_name: hit.address_components && hit.address_components.reduce(function(res, address){
+                return address.long_name ? res.concat(address.long_name) : res;
+              }, []).join(', '),
+              lat: hit.geometry && hit.geometry.location && hit.geometry.location.lat,
+              lon: hit.geometry && hit.geometry.location && hit.geometry.location.lng
+            });
+          }, []);
+        });
+    }
+
+    function _fallbackSearchPositionByString(osmErr, address) {
+
+      console.debug('[ES] [geo] Search position failed on [OSM]. Trying [google] service');
+
+      return googleSearchPositionByString(address)
+        .catch(function(googleErr) {
+          console.debug('[ES] [geo] Search position failed on [google] service');
+          throw osmErr || googleErr; // throw first OMS error if exists
+        });
+    }
+
+    function searchPositionByAddress(query) {
+
+      if (typeof query == 'string') {
+        query = {q: query};
+      }
+
+      // Normalize query string
+      if (query.q) {
+        query.q = _normalizeAddressString(query.q);
+      }
+
+      query.addressdetails = 1; // need address field
+
+      var now = Date.now();
+      //console.debug('[ES] [geo] Searching position...', query);
+
+      return that.raw.osm.search(query)
+        .then(function(res) {
+          //console.debug('[ES] [geo] Received {0} results from OSM'.format(res && res.length || 0), res);
+          if (!res) return; // no result
+
+          // Filter on city/town/village
+          res = res.reduce(function(res, hit){
+            if (hit.class == 'waterway' || hit.class == 'railway' ||!hit.address) return res;
+            hit.address.city =  hit.address.city || hit.address.village || hit.address.town || hit.address.postcode;
+            hit.address.road =  hit.address.road || hit.address.suburb || hit.address.hamlet;
+            if (hit.address.postcode && hit.address.city == hit.address.postcode) {
+              delete hit.address.postcode;
+            }
+            if (!hit.address.city) return res;
+            return res.concat({
+              id: hit.place_id,
+              name: hit.display_name,
+              address: hit.address,
+              lat: hit.lat,
+              lon: hit.lon,
+              class: hit.class,
+              license: that.raw.osm.license
+            });
+          }, []);
+
+          console.debug('[ES] [geo] Found {0} address position(s)'.format(res && res.length || 0, Date.now() - now), res);
+
+          return res.length ? res : undefined;
+        })
+
+        // Fallback service
+        .catch(function(err) {
+          var address = query.q ? query.q : ((query.street ? query.street +', ' : '') + query.city +  (query.country ? ', '+ query.country : ''));
+          return _fallbackSearchPositionByString(err, address);
+        });
+    }
+
+    function getCurrentPosition() {
+      var defer = $q.defer();
+      if (navigator.geolocation) {
+        navigator.geolocation.getCurrentPosition(function(position) {
+          if (!position || !position.coords) {
+            console.error('[ES] [geo] navigator geolocation > Unknown format:', position);
+            return;
+          }
+          defer.resolve({
+            lat: position.coords.latitude,
+            lon: position.coords.longitude
+          });
+        }, function(error) {
+          defer.reject(error);
+        },{timeout:5000});
+      }else{
+        defer.reject();
+      }
+      return defer.promise;
+    }
+
+    function searchPositionByIP(ip) {
+
+      //var now = new Date();
+      //console.debug('[ES] [geo] Searching IP position [{0}]...'.format(ip));
+
+      return that.raw.freegeoip.search({ip: ip})
+        .then(function(res) {
+          //console.debug('[ES] [geo] Found IP {0} position in {0}ms'.format(res ? 1 : 0, Date.now() - now.getTime()));
+          return res ? {
+            lat: res.latitude,
+            lng: res.longitude
+          } : undefined;
+        });
+    }
+
+    // Source: http://www.geodatasource.com/developers/javascript
+    // Unit: 'M' is statute miles (default),  'Km' is kilometers, 'N' is nautical miles
+    function getDistance(lat1, lon1, lat2, lon2, unit) {
+      var radlat1 = Math.PI * lat1/180;
+      var radlat2 = Math.PI * lat2/180;
+      var theta = lon1-lon2;
+      var radtheta = Math.PI * theta/180;
+      var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
+      dist = Math.acos(dist);
+      dist = dist * 180/Math.PI;
+      dist = dist * 60 * 1.1515;
+      // nautical miles
+      if (unit == "km") { return dist * 1.609344; }
+      // nautical miles
+      if (unit == "N") return dist * 0.8684;
+      // statute miles
+      return dist;
+    }
+
+    that.raw.google.apiKey = csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.googleApiKey;
+    var hasConfigApiKey = !!that.raw.google.apiKey;
+    csSettings.ready()
+      .then(function() {
+
+        // Listen settings changed
+        function onSettingsChanged(data){
+          if (!hasConfigApiKey) {
+            // If no google api key in config, use in settings
+            that.raw.google.apiKey = data.plugins.es.googleApiKey;
+          }
+          that.raw.google.enable = that.raw.google.apiKey && data.plugins && data.plugins.es && data.plugins.es.enableGoogleApi;
+        }
+        csSettings.api.data.on.changed($rootScope, onSettingsChanged, this);
+
+        onSettingsChanged(csSettings.data);
+      });
+
+    return {
+      point: {
+        current: getCurrentPosition,
+        searchByAddress: searchPositionByAddress,
+        distance: getDistance,
+        ip: {
+          search: searchPositionByIP,
+          license: that.raw.freegeoip.license
+        }
+      },
+      google: {
+        isEnable: function() {
+          return that.raw.google.enable && that.raw.google.apiKey;
+        },
+        searchByAddress: googleSearchPositionByString
+      }
+    };
+  }]);
+
+angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform', 'cesium.es.http.services'])
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Will force to load this service
+      PluginServiceProvider.registerEagerLoadingService('esDocument');
+    }
+
+  }])
+
+  .factory('esDocument', ['$q', '$rootScope', '$timeout', 'UIUtils', 'Api', 'CryptoUtils', 'csPlatform', 'csConfig', 'csSettings', 'csWot', 'csWallet', 'esHttp', function($q, $rootScope, $timeout, UIUtils, Api, CryptoUtils,
+                                  csPlatform, csConfig, csSettings, csWot, csWallet, esHttp) {
+    'ngInject';
+
+    var
+      constants = {
+        DEFAULT_LOAD_SIZE: 40
+      },
+      fields = {
+        commons: ["issuer", "pubkey", "hash", "time", "recipient", "nonce", "read_signature"],
+        peer: ["*"],
+        movement: ["*"]
+      },
+      raw = {
+        search: esHttp.post('/:index/:type/_search'),
+        searchText: esHttp.get('/:index/:type/_search?q=:text&_source=:source')
+      };
+
+    function _initOptions(options) {
+      if (!options || !options.index || !options.type) throw new Error('Missing mandatory options [index, type]');
+
+      var side = 'desc';
+      if (options.type === 'peer') {
+        if (!options.sort || options.sort.time) {
+          side = options.sort && options.sort.time || side;
+          options.sort = {
+            'stats.medianTime': {
+              nested_path: 'stats',
+              order: side
+            }
+          };
+        }
+        options._source = fields.peer;
+        options.getTimeFunction = function(doc) {
+          doc.time = doc.stats && doc.stats.medianTime;
+          return doc.time;
+        };
+      }
+      else if (options.type === 'movement') {
+        if (!options.sort || options.sort.time) {
+          side = options.sort && options.sort.time || side;
+          options.sort = {'medianTime': side};
+        }
+        options._source = options._source || fields.movement;
+        options.getTimeFunction = function(doc) {
+          doc.time = doc.medianTime;
+          return doc.time;
+        };
+      }
+
+      return options;
+    }
+
+    function _readSearchHits(res, options) {
+      options.issuerField = options.issuerField || 'pubkey';
+
+      var hits = (res && res.hits && res.hits.hits || []).reduce(function(res, hit) {
+        var doc = hit._source || {};
+        doc.docType = doc.type; // Save source.type, before replacement
+        doc.index = hit._index;
+        doc.type = hit._type;
+        doc.id = hit._id;
+        doc.pubkey = doc.issuer || options.issuerField && doc[options.issuerField] || doc.pubkey; // need to call csWot.extendAll()
+        doc.time = options.getTimeFunction && options.getTimeFunction(doc) || doc.time;
+        doc.thumbnail = esHttp.image.fromHit(hit, 'avatar') || esHttp.image.fromHit(hit, 'thumbnail');
+        return res.concat(doc);
+      }, []);
+
+
+      var recipients = hits.reduce(function(res, doc) {
+        if (doc.recipient) {
+          doc.recipient = {
+            pubkey: doc.recipient
+          };
+          return res.concat(doc.recipient);
+        }
+        return res;
+      }, []);
+
+      return csWot.extendAll(hits.concat(recipients))
+        .then(function() {
+          return  {
+            hits: hits,
+            took: res.took,
+            total: res && res.hits && res.hits.total || 0
+          };
+        });
+    }
+
+    function readSearchHit(hit) {
+      var options = _initOptions({
+        index: hit._index,
+        type: hit._type
+      });
+
+      return _readSearchHits({
+        hits: {
+          hits: [hit]
+        }
+      }, options)
+        .then(function(res) {
+          return res.hits[0];
+        });
+    }
+
+    function search(options) {
+      options = _initOptions(options);
+
+      var request = {
+        from: options.from || 0,
+        size: options.size || constants.DEFAULT_LOAD_SIZE,
+        sort: options.sort || {time:'desc'},
+        _source: options._source || fields.commons
+      };
+      if (options.query) {
+        request.query = options.query;
+      }
+
+      return raw.search(request, {
+        index: options.index,
+        type: options.type
+      })
+        .then(function(res) {
+          return _readSearchHits(res, options);
+        });
+    }
+
+    function searchText(queryString, options) {
+
+      options = options || {};
+
+      var request = {
+        text: queryString,
+        index: options.index || 'user',
+        type: options.type || 'profiles',
+        from: options.from || 0,
+        size: options.size || constants.DEFAULT_LOAD_SIZE,
+        sort: options.sort || 'time:desc',
+        source: options._source && options._source.join(',') || fields.commons.join(',')
+      };
+
+      console.debug('[ES] [wallet] [document] [{0}/{1}] Loading documents...'.format(
+        options.index,
+        options.type
+      ));
+      var now = Date.now();
+
+      return raw.searchText(request)
+        .then(function(res) {
+          return _readSearchHits(res, options);
+        })
+        .then(function(res) {
+          console.debug('[ES] [document] [{0}/{1}] Loading {2} documents in {3}ms'.format(
+            options.index,
+            options.type,
+            res && res.hits && res.hits.length || 0,
+            Date.now() - now
+          ));
+          return res;
+        });
+    }
+
+    function remove(document, options) {
+      if (!document || !document.index || !document.type || !document.id) return $q.reject('Could not remove document: missing mandatory fields');
+
+      return esHttp.record.remove(document.index, document.type)(document.id, options);
+    }
+
+    function removeAll(documents, options) {
+      if (!documents || !documents.length) return;
+
+      var wallet = options && options.walletId && csWallet.children.get(options.walletId) || csWallet;
+
+      return wallet.auth() // Auth once
+        .then(function() {
+          // Remove each doc
+          return $q.all(documents.reduce(function (res, doc) {
+            return res.concat(esHttp.record.remove(doc.index, doc.type)(doc.id, {wallet: wallet}));
+          }, []));
+        });
+    }
+
+    return {
+      search: search,
+      searchText: searchText,
+      remove: remove,
+      removeAll: removeAll,
+      fields: {
+        commons: fields.commons
+      },
+      fromHit: readSearchHit
+    };
+  }])
+;
+
+
+angular.module('cesium.es.network.services', ['ngApi', 'cesium.es.http.services'])
+
+.factory('esNetwork', ['$rootScope', '$q', '$interval', '$timeout', '$window', 'csSettings', 'csConfig', 'esHttp', 'Api', 'BMA', function($rootScope, $q, $interval, $timeout, $window, csSettings, csConfig, esHttp, Api, BMA) {
+  'ngInject';
+
+  function EsNetwork(id) {
+
+    var
+      interval,
+      constants = {
+        UNKNOWN_BUID: -1
+      },
+      isHttpsMode = $window.location.protocol === 'https:',
+      api = new Api(this, "csNetwork-" + id),
+
+      data = {
+        pod: null,
+        listeners: [],
+        loading: true,
+        peers: [],
+        filter: {
+          endpointFilter: null,
+          online: true,
+          ssl: undefined,
+          tor: undefined
+        },
+        sort:{
+          type: null,
+          asc: true,
+          compact: true
+        },
+        groupBy: 'pubkey',
+        expertMode: false,
+        knownBlocks: [],
+        mainBlock: null,
+        searchingPeersOnNetwork: false,
+        timeout: csConfig.timeout
+      },
+
+      // Return the block uid
+      buid = function(block) {
+        return block && [block.number, block.hash].join('-');
+      },
+
+      resetData = function() {
+        data.pod = null;
+        data.listeners = [];
+        data.peers.splice(0);
+        data.filter = {
+          endpointFilter: null,
+          online: true
+        };
+        data.sort = {
+          type: null,
+          asc: true
+        };
+        data.groupBy = 'pubkey';
+        data.expertMode = false;
+        data.knownBlocks = [];
+        data.mainBlock = null;
+        data.loading = true;
+        data.searchingPeersOnNetwork = false;
+        data.timeout = csConfig.timeout;
+
+        data.document = {
+          index : csSettings.data.plugins.es && csSettings.data.plugins.es.document && csSettings.data.plugins.es.document.index || 'user',
+          type: csSettings.data.plugins.es && csSettings.data.plugins.es.document && csSettings.data.plugins.es.document.type || 'profile'
+        };
+      },
+
+      hasPeers = function() {
+        return data.peers && data.peers.length > 0;
+      },
+
+      getPeers = function() {
+        return data.peers;
+      },
+
+      isBusy = function() {
+        return data.loading;
+      },
+
+      getKnownBlocks = function() {
+        return data.knownBlocks;
+      },
+
+      loadPeers = function() {
+        data.peers = [];
+        data.searchingPeersOnNetwork = true;
+        data.loading = true;
+        data.pod = data.pod || esHttp;
+        var newPeers = [];
+
+        if (interval) {
+          $interval.cancel(interval);
+        }
+
+        interval = $interval(function() {
+          // not same job instance
+          if (newPeers.length) {
+            flushNewPeersAndSort(newPeers);
+          }
+          else if (data.loading && !data.searchingPeersOnNetwork) {
+            data.loading = false;
+            $interval.cancel(interval);
+            // The peer lookup end, we can make a clean final report
+            sortPeers(true/*update main buid*/);
+
+            console.debug('[network] Finish: {0} peers found.'.format(data.peers.length));
+          }
+        }, 1000);
+
+        return $q.when()
+          .then(function(){
+            // online nodes
+            if (data.filter.online) {
+              return data.pod.network.peers()
+                .then(function(res){
+                  var jobs = [];
+                  _.forEach(res.peers, function(json) {
+                    if (json.status !== 'UP') return;
+                    jobs.push(addOrRefreshPeerFromJson(json, newPeers));
+                  });
+
+                  if (jobs.length) return $q.all(jobs);
+                })
+                .catch(function(err) {
+                  // Log and continue
+                  console.error(err);
+                });
+            }
+
+            // offline nodes
+            return data.pod.network.peers()
+              .then(function(res){
+                var jobs = [];
+                _.forEach(res.peers, function(json) {
+                  if (json.status === 'UP') return;
+                  jobs.push(addOrRefreshPeerFromJson(json, newPeers));
+                });
+                if (jobs.length) return $q.all(jobs);
+              });
+          })
+          .then(function(){
+            data.searchingPeersOnNetwork = false;
+          })
+          .catch(function(err){
+            console.error(err);
+            data.searchingPeersOnNetwork = false;
+          });
+      },
+
+      /**
+       * Apply filter on a peer. (peer uid should have been filled BEFORE)
+       */
+      applyPeerFilter = function(peer) {
+        // no filter
+        if (!data.filter) return true;
+
+        // Filter on endpoints
+        if (data.filter.endpointFilter &&
+          (peer.ep && peer.ep.api && peer.ep.api !== data.filter.endpointFilter || !peer.hasEndpoint(data.filter.endpointFilter))) {
+          return false;
+        }
+
+        // Filter on status
+        if (!data.filter.online && peer.status === 'UP') {
+          return false;
+        }
+
+        // Filter on ssl
+        if (angular.isDefined(data.filter.ssl) && peer.isSsl() != data.filter.ssl) {
+          return false;
+        }
+
+        // Filter on tor
+        if (angular.isDefined(data.filter.tor) && peer.isTor() != data.filter.tor) {
+          return false;
+        }
+
+        return true;
+      },
+
+      addOrRefreshPeerFromJson = function(json, list) {
+        list = list || data.newPeers;
+
+        var peers = createPeerEntities(json);
+        var hasUpdates = false;
+
+        var jobs = peers.reduce(function(jobs, peer) {
+            var existingPeer = _.findWhere(data.peers, {id: peer.id});
+            var existingMainBuid = existingPeer ? existingPeer.buid : null;
+            var existingOnline = existingPeer ? existingPeer.online : false;
+
+            return jobs.concat(
+              refreshPeer(peer)
+                .then(function (refreshedPeer) {
+                  if (existingPeer) {
+                    // remove existing peers, when reject or offline
+                    if (!refreshedPeer || (refreshedPeer.online !== data.filter.online && data.filter.online !== 'all')) {
+                      var existingIndex = data.peers.indexOf(existingPeer);
+                      if (existingIndex !== -1) {
+                        console.debug('[network] Peer [{0}] removed (cause: {1})'.format(peer.server, !refreshedPeer ? 'filtered' : (refreshedPeer.online ? 'UP': 'DOWN')));
+                        data.peers.splice(existingIndex, 1);
+                        hasUpdates = true;
+                      }
+                    }
+                    else if (refreshedPeer.buid !== existingMainBuid){
+                      console.debug('[network] {0} endpoint [{1}] new current block'.format(
+                        refreshedPeer.ep && refreshedPeer.ep.api || '',
+                        refreshedPeer.server));
+                      hasUpdates = true;
+                    }
+                    else if (existingOnline !== refreshedPeer.online){
+                      console.debug('[network] {0} endpoint [{1}] is now {2}'.format(
+                        refreshedPeer.ep && refreshedPeer.ep.api || '',
+                        refreshedPeer.server,
+                        refreshedPeer.online ? 'UP' : 'DOWN'));
+                      hasUpdates = true;
+                    }
+                    else {
+                      console.debug("[ES] [network] {0} endpoint [{1}] unchanged".format(
+                        refreshedPeer.ep && refreshedPeer.ep.api || '',
+                        refreshedPeer.server));
+                    }
+                  }
+                  else if (refreshedPeer && (refreshedPeer.online === data.filter.online || data.filter.online === 'all')) {
+                    console.debug("[ES] [network] {0} endpoint [{1}] is {2}".format(
+                      refreshedPeer.ep && refreshedPeer.ep.api || '',
+                      refreshedPeer.server,
+                      refreshedPeer.online ? 'UP' : 'DOWN'
+                    ));
+                    list.push(refreshedPeer);
+                    hasUpdates = true;
+                  }
+                })
+           );
+        }, []);
+        return (jobs.length === 1 ? jobs[0] : $q.all(jobs))
+          .then(function() {
+            return hasUpdates;
+          });
+      },
+
+      createPeerEntities = function(json, ep) {
+        if (!json) return [];
+        var peer = new EsPeer(json);
+
+        // Read endpoints
+        if (!ep) {
+          var endpointsAsString = peer.getEndpoints();
+          if (!endpointsAsString) return []; // no BMA
+
+          var endpoints = endpointsAsString.reduce(function (res, epStr) {
+            var ep = esHttp.node.parseEndPoint(epStr);
+            return ep ? res.concat(ep) : res;
+          }, []);
+
+          // recursive call, on each endpoint
+          if (endpoints.length > 1) {
+            return endpoints.reduce(function (res, ep) {
+              return res.concat(createPeerEntities(json, ep));
+            }, []);
+          }
+          else {
+            // if only one endpoint: use it and continue
+            ep = endpoints[0];
+          }
+        }
+        peer.ep = ep;
+        peer.server = peer.getServer();
+        peer.dns = peer.getDns();
+        peer.blockNumber = peer.block && peer.block.replace(/-.+$/, '');
+        peer.id = peer.keyID();
+        return [peer];
+      },
+
+      refreshPeer = function(peer) {
+
+        // Apply filter
+        if (!applyPeerFilter(peer)) return $q.when();
+
+        if (!data.filter.online || (!data.filter.online && peer.status === 'DOWN') || !peer.getHost() /*fix #537*/) {
+          peer.online = false;
+          return $q.when(peer);
+        }
+
+        // App running in SSL: Do not try to access not SSL node,
+        if (isHttpsMode && !peer.isSsl()) {
+          peer.online = (peer.status === 'UP');
+          peer.buid = constants.UNKNOWN_BUID;
+          delete peer.version;
+
+          return $q.when(peer);
+        }
+
+        // Do not try to access TOR or WS2P endpoints
+        if (peer.ep.useTor) {
+          peer.online = (peer.status == 'UP');
+          peer.buid = constants.UNKNOWN_BUID;
+          delete peer.software;
+          delete peer.version;
+          return $q.when(peer);
+        }
+
+        peer.api = peer.api ||  esHttp.lightInstance(peer.getHost(), peer.getPort(), peer.isSsl(), data.timeout);
+
+        // Get current block
+        return peer.api.blockchain.current()
+          .then(function(block) {
+            peer.currentNumber = block.number;
+            peer.online = true;
+            peer.buid = buid(block);
+            peer.medianTime = block.medianTime;
+            if (data.knownBlocks.indexOf(peer.buid) === -1) {
+              data.knownBlocks.push(peer.buid);
+            }
+            return peer;
+          })
+          .catch(function(err) {
+            // Special case for currency init (root block not exists): use fixed values
+            if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) {
+              peer.online = true;
+              peer.buid = buid({number:0, hash: BMA.constants.ROOT_BLOCK_HASH});
+              peer.difficulty  = 0;
+              return peer;
+            }
+            if (!peer.secondTry) {
+              var ep = peer.ep || peer.getEP();
+              if (ep.dns && peer.server.indexOf(ep.dns) === -1) {
+                // try again, using DNS instead of IPv4 / IPV6
+                peer.secondTry = true;
+                peer.api = esHttp.lightInstance(ep.dns, peer.getPort(), peer.isSsl(), data.timeout);
+                return refreshPeer(peer); // recursive call
+              }
+            }
+
+            peer.online=false;
+            peer.currentNumber = null;
+            peer.buid = null;
+            return peer;
+          })
+          .then(function(peer) {
+            // Exit if offline
+            if (!data.filter.online || !peer || !peer.online) return peer;
+
+            peer.docCount = {};
+
+            return $q.all([
+              // Get summary (software and version) - expert mode only
+              !data.expertMode ? $q.when() : peer.api.node.summary()
+                .then(function(res){
+                  peer.software = res && res.duniter && res.duniter.software || undefined;
+                  peer.version = res && res.duniter && res.duniter.version || '?';
+                })
+                .catch(function() {
+                  peer.software = undefined;
+                  peer.version = '?';
+                }),
+
+              // Count documents
+              peer.api.record.count(data.document.index,data.document.type)
+                .then(function(count){
+                  peer.docCount.record = count;
+                })
+                .catch(function() {
+                  peer.docCount.record = undefined;
+                }),
+
+              // Count email subscription
+              peer.api.subscription.count({recipient: peer.pubkey, type: 'email'})
+                .then(function(res){
+                  peer.docCount.emailSubscription = res;
+                })
+                .catch(function() {
+                  peer.docCount.emailSubscription = undefined; // continue
+                })
+            ]);
+
+        })
+        .then(function() {
+          // Clean the instance
+          delete peer.api;
+          return peer;
+        });
+      },
+
+      flushNewPeersAndSort = function(newPeers, updateMainBuid) {
+        newPeers = newPeers || data.newPeers;
+        if (!newPeers.length) return;
+        var ids = _.map(data.peers, function(peer){
+          return peer.id;
+        });
+        var hasUpdates = false;
+        var newPeersAdded = 0;
+        _.forEach(newPeers.splice(0), function(peer) {
+          if (!ids[peer.id]) {
+            data.peers.push(peer);
+            ids[peer.id] = peer;
+            hasUpdates = true;
+            newPeersAdded++;
+          }
+        });
+        if (hasUpdates) {
+          console.debug('[network] Flushing {0} new peers...'.format(newPeersAdded));
+          sortPeers(updateMainBuid);
+        }
+      },
+
+      computeScoreAlphaValue = function(value, nbChars, asc) {
+        if (!value) return 0;
+        var score = 0;
+        value = value.toLowerCase();
+        if (nbChars > value.length) {
+          nbChars = value.length;
+        }
+        score += value.charCodeAt(0);
+        for (var i=1; i < nbChars; i++) {
+          score += Math.pow(0.001, i) * value.charCodeAt(i);
+        }
+        return asc ? (1000 - score) : score;
+      },
+
+      sortPeers = function(updateMainBuid) {
+        // Construct a map of buid, with peer count and medianTime
+        var buids = {};
+        _.forEach(data.peers, function(peer){
+          if (peer.buid) {
+            var buid = buids[peer.buid];
+            if (!buid || !buid.medianTime) {
+              buid = {
+                buid: peer.buid,
+                medianTime: peer.medianTime,
+                count: 0
+              };
+              buids[peer.buid] = buid;
+            }
+            // If not already done, try to fill medianTime (need to compute consensusBlockDelta)
+            else if (!buid.medianTime && peer.medianTime) {
+              buid.medianTime = peer.medianTime;
+            }
+            if (buid.buid !== constants.UNKNOWN_BUID) {
+              buid.count++;
+            }
+          }
+        });
+        // Compute pct of use, per buid
+        _.forEach(_.values(buids), function(buid) {
+          buid.pct = buid.count * 100 / data.peers.length;
+        });
+        var mainBlock = _.max(buids, function(obj) {
+          return obj.count;
+        });
+        _.forEach(data.peers, function(peer){
+          peer.hasMainConsensusBlock = peer.buid == mainBlock.buid;
+          peer.hasConsensusBlock = peer.buid && !peer.hasMainConsensusBlock && buids[peer.buid].count > 1;
+          if (peer.hasConsensusBlock) {
+            peer.consensusBlockDelta = buids[peer.buid].medianTime - mainBlock.medianTime;
+          }
+        });
+        data.peers = _.uniq(data.peers, false, function(peer) {
+          return peer.id;
+        });
+        data.peers = _.sortBy(data.peers, function(peer) {
+          var score = 0;
+          if (data.sort.type) {
+            var sortScore = 0;
+            sortScore += (data.sort.type == 'name' ? computeScoreAlphaValue(peer.name, 10, data.sort.asc) : 0);
+            sortScore += (data.sort.type == 'software' ? computeScoreAlphaValue(peer.software, 10, data.sort.asc) : 0);
+            sortScore += (data.sort.type == 'api') &&
+              ((peer.hasEndpoint('ES_SUBSCRIPTION_API') && (data.sort.asc ? 1 : -1) || 0) +
+              (peer.hasEndpoint('ES_USER_API') && (data.sort.asc ? 0.01 : -0.01) || 0) +
+              (peer.isSsl() && (data.sort.asc ? 0.75 : -0.75) || 0)) || 0;
+            sortScore += (data.sort.type == 'doc_count' ? (peer.docCount ? (data.sort.asc ? (1000000000 - peer.docCount) : peer.docCount) : 0) : 0);
+            score += (10000000000 * sortScore);
+          }
+          score += (1000000000 * (peer.online ? 1 : 0));
+          score += (100000000  * (peer.hasMainConsensusBlock ? 1 : 0));
+          score += (1000000    * (peer.hasConsensusBlock ? buids[peer.buid].pct : 0));
+          if (data.expertMode) {
+            score += (100     * (peer.difficulty ? (10000-peer.difficulty) : 0));
+            score += (1       * (peer.uid ? computeScoreAlphaValue(peer.uid, 2, true) : 0));
+          }
+          else {
+            score += (100     * (peer.uid ? computeScoreAlphaValue(peer.uid, 2, true) : 0));
+            score += (1       * (!peer.uid ? computeScoreAlphaValue(peer.pubkey, 2, true) : 0));
+          }
+          return -score;
+        });
+
+        if (data.groupBy) {
+          var previousPeer;
+          data.peers.forEach(function(peer) {
+            peer.compacted = (previousPeer && peer[data.groupBy] && peer[data.groupBy] === previousPeer[data.groupBy]);
+            previousPeer = peer;
+          });
+        }
+
+        // Raise event on new main block
+        if (updateMainBuid && mainBlock && mainBlock.buid && (!data.mainBlock || data.mainBlock.buid !== mainBlock.buid)) {
+          data.mainBlock = mainBlock;
+          api.data.raise.mainBlockChanged(mainBlock);
+        }
+
+        // Raise event when changed
+        api.data.raise.changed(data); // raise event
+      },
+
+      removeListeners = function() {
+        _.forEach(data.listeners, function(remove){
+          remove();
+        });
+        data.listeners = [];
+      },
+
+      addListeners = function() {
+        data.listeners = [
+
+          // Listen for new block
+          data.pod.websocket.block().onListener(function(block) {
+            if (!block || data.loading) return;
+            var buid = [block.number, block.hash].join('-');
+            if (data.knownBlocks.indexOf(buid) === -1) {
+              console.debug('[network] Receiving block: ' + buid.substring(0, 20));
+              data.knownBlocks.push(buid);
+              // If first block: do NOT refresh peers (will be done in start() method)
+              var skipRefreshPeers = data.knownBlocks.length === 1;
+              if (!skipRefreshPeers) {
+                data.loading = true;
+                // We wait 2s when a new block is received, just to wait for network propagation
+                $timeout(function() {
+                  console.debug('[network] new block received by WS: will refresh peers');
+                  loadPeers();
+                }, 2000, false /*invokeApply*/);
+              }
+            }
+          }),
+
+          // Listen for new peer
+          data.pod.websocket.peer().onListener(function(json) {
+            if (!json || data.loading) return;
+            var newPeers = [];
+            addOrRefreshPeerFromJson(json, newPeers)
+              .then(function(hasUpdates) {
+                if (!hasUpdates) return;
+                if (newPeers.length>0) {
+                  flushNewPeersAndSort(newPeers, true);
+                }
+                else {
+                  console.debug('[network] [ws] Peers updated received');
+                  sortPeers(true);
+                }
+              });
+          })
+        ];
+      },
+
+      sort = function(options) {
+        options = options || {};
+        data.filter = options.filter ? angular.merge(data.filter, options.filter) : data.filter;
+        data.sort = options.sort ? angular.merge(data.sort, options.sort) : data.sort;
+        sortPeers(false);
+      },
+
+      start = function(pod, options) {
+        options = options || {};
+        return esHttp.ready()
+          .then(function() {
+            close();
+            resetData();
+            data.pod = pod || esHttp;
+            data.filter = options.filter ? angular.merge(data.filter, options.filter) : data.filter;
+            data.sort = options.sort ? angular.merge(data.sort, options.sort) : data.sort;
+            data.expertMode = angular.isDefined(options.expertMode) ? options.expertMode : data.expertMode;
+            data.timeout = angular.isDefined(options.timeout) ? options.timeout : csConfig.timeout;
+            console.info('[ES] [network] Starting network from [{0}]'.format(data.pod.server));
+            var now = Date.now();
+
+            addListeners();
+
+            return loadPeers()
+              .then(function(peers){
+                console.debug('[ES] [network] Started in '+(Date.now() - now)+'ms');
+                return peers;
+              });
+          });
+      },
+
+      close = function() {
+        if (data.pod) {
+          console.info('[ES] [network-service] Stopping...');
+          removeListeners();
+          resetData();
+        }
+      },
+
+      isStarted = function() {
+        return !data.pod;
+      },
+
+      $q_started = function(callback) {
+        if (!isStarted()) { // start first
+          return start()
+            .then(function() {
+              return $q(callback);
+            });
+        }
+        else {
+          return $q(callback);
+        }
+      },
+
+      getMainBlockUid = function() {
+        return $q_started(function(resolve, reject){
+          resolve (data.mainBuid);
+        });
+      },
+
+      // Get peers on the main consensus blocks
+      getTrustedPeers = function() {
+        return $q_started(function(resolve, reject){
+          resolve(data.peers.reduce(function(res, peer){
+            return (peer.hasMainConsensusBlock && peer.uid) ? res.concat(peer) : res;
+          }, []));
+        });
+      }
+      ;
+
+    // Register extension points
+    api.registerEvent('data', 'changed');
+    api.registerEvent('data', 'mainBlockChanged');
+    api.registerEvent('data', 'rollback');
+
+    return {
+      id: id,
+      data: data,
+      start: start,
+      close: close,
+      hasPeers: hasPeers,
+      getPeers: getPeers,
+      sort: sort,
+      getTrustedPeers: getTrustedPeers,
+      getKnownBlocks: getKnownBlocks,
+      getMainBlockUid: getMainBlockUid,
+      loadPeers: loadPeers,
+      isBusy: isBusy,
+      // api extension
+      api: api
+    };
+  };
+
+  var service = new EsNetwork('default');
+
+  service.instance = function(id) {
+    return new EsNetwork(id);
+  };
+
+  return service;
+}]);
+
+angular.module('cesium.es.like.services', ['ngResource', 'cesium.services',
+  'cesium.es.http.services'])
+
+  .factory('esLike', ['$q', 'csWallet', 'esHttp', function($q, csWallet, esHttp) {
+    'ngInject';
+
+
+    var constants = {
+      KINDS: ['LIKE', 'ABUSE']
+    };
+
+    function EsLike(index, type) {
+
+      var that = this;
+      that.raw = {
+          getSearch: esHttp.get('/like/record/_search?_source=false&q=:q'),
+          searchBaseQueryString: 'index:{0} AND type:{1} AND id:'.format(index, type),
+          postSearch: esHttp.post("/like/record/_search"),
+          postRecord: esHttp.record.post('/{0}/{1}/:id/_like'.format(index, type)),
+          removeRecord: esHttp.record.remove('like', 'record')
+        };
+
+      function getLikeIds(id, options) {
+        options = options || {};
+        options.kind = options.kind || 'LIKE';
+        var queryString = that.raw.searchBaseQueryString + id;
+        if (options.kind) queryString += ' AND kind:' + options.kind.toUpperCase();
+        if (options.issuer) queryString += ' AND issuer:' + options.issuer;
+
+        return that.raw.getSearch({q: queryString})
+          .then(function(res) {
+            return (res && res.hits && res.hits.hits || []).map(function(hit) {
+              return hit._id;
+            });
+          });
+      }
+
+      function addLike(id, options) {
+        options = options || {};
+        options.kind = options.kind && options.kind.toUpperCase() || 'LIKE';
+        if (!csWallet.isLogin()) return $q.reject('Wallet must be login before sending record to ES node');
+        var record = {
+          version: 2,
+          index: index,
+          type: type,
+          id: id,
+          kind: options.kind
+        };
+        if (options.comment) record.comment = options.comment;
+        if (angular.isDefined(options.level)) record.level = options.level;
+
+        return that.raw.postRecord(record, options);
+      }
+
+      function toggleLike(id, options) {
+          options = options || {};
+          options.kind = options.kind || 'LIKE';
+          var pubkey = options.pubkey || options.wallet && options.wallet.data.pubkey || (csWallet.isLogin() && csWallet.data.pubkey);
+          if (!pubkey) return $q.reject('User not log in!');
+          options.wallet = options.wallet || csWallet.getByPubkey(pubkey);
+          return getLikeIds(id, {kind: options.kind, issuer: pubkey})
+            .then(function(existingLikeIds) {
+              // User already like: so remove it
+              if (existingLikeIds && existingLikeIds.length) {
+                return $q.all(_.map(existingLikeIds, function(likeId) {
+                  return removeLike(likeId, options)
+                }))
+                  // Return the deletion, as a delta
+                  .then(function() {
+                    return -1 * existingLikeIds.length;
+                  });
+              }
+              // User not like, so add it
+              else {
+                return addLike(id, options)
+                  // Return the insertion, as a delta
+                  .then(function() {
+                    return +1;
+                  });
+              }
+          });
+      }
+
+      function removeLike(id, options) {
+        if (!id) throw new Error("Missing 'id' argument");
+        return that.raw.removeRecord(id, options);
+      }
+
+      function countLike(id, options) {
+        options = options || {};
+        options.kind = options.kind || 'LIKE';
+
+        var request = {
+          query: {
+            bool: {
+              filter: [
+                {term: {index: index}},
+                {term: {type: type}},
+                {term: {id: id}},
+                {term: {kind: options.kind.toUpperCase()}}
+              ]
+            }
+          },
+          size: 0
+        };
+
+        // To known if the user already like, add 'should' on issuers
+        var issuers = options.issuer ? [options.issuer] : options.issuers;
+        if (issuers && issuers.length) {
+          request.query.bool.should = {terms: {issuer: issuers}};
+          request.size = issuers.length;
+          request._source = ["issuer"];
+        }
+
+        return that.raw.postSearch(request)
+          .then(function(res) {
+            var hits = res && res.hits;
+            var result = {
+              total: hits && hits.total || 0,
+              wasHitByPubkey: {},
+              wasHitCount: 0
+            };
+
+            // Check is issuer is return (because of size=1 and should filter)
+            _.forEach(issuers, function(issuer) {
+              var issuerHitIndex =  hits ? _.findIndex(hits.hits || [], function(hit) {
+                return hit._source.issuer === issuer;
+              }) : -1;
+
+              result.wasHitByPubkey[issuer] = issuerHitIndex !== -1 || false;
+              result.wasHitCount += issuerHitIndex !== -1 ? 1 : 0;
+            })
+
+            return result;
+          })
+      }
+
+      // Expose functions
+      return {
+        index: index,
+        type: type,
+        toggle: toggleLike,
+        add: addLike,
+        remove: removeLike,
+        count: countLike
+      };
+    }
+
+    return {
+      constants: constants,
+      instance: EsLike
+    };
+  }])
+;
+
+
+ESPicturesEditController.$inject = ['$scope', 'UIUtils', '$q', 'Device'];
+ESSocialsEditController.$inject = ['$scope', '$focus', '$filter', 'UIUtils', 'SocialUtils'];
+ESSocialsViewController.$inject = ['$scope'];
+ESCommentsController.$inject = ['$scope', '$filter', '$state', '$focus', '$timeout', '$anchorScroll', 'UIUtils'];
+ESCategoryModalController.$inject = ['$scope', 'UIUtils', '$timeout', 'parameters'];
+ESAvatarModalController.$inject = ['$scope'];
+ESPositionEditController.$inject = ['$scope', 'csConfig', 'esGeo', 'ModalUtils'];
+ESLookupPositionController.$inject = ['$scope', '$q', 'csConfig', 'esGeo', 'ModalUtils'];
+ESSearchPositionItemController.$inject = ['$scope', '$timeout', 'ModalUtils', 'csConfig', 'esGeo'];
+ESSearchPositionModalController.$inject = ['$scope', '$q', '$translate', 'esGeo', 'parameters'];angular.module('cesium.es.common.controllers', ['ngResource', 'cesium.es.services'])
+
+  .controller('ESPicturesEditCtrl', ESPicturesEditController)
+
+  .controller('ESPicturesEditCtrl', ESPicturesEditController)
+
+  .controller('ESSocialsEditCtrl', ESSocialsEditController)
+
+  .controller('ESSocialsViewCtrl', ESSocialsViewController)
+
+  .controller('ESCommentsCtrl', ESCommentsController)
+
+  .controller('ESCategoryModalCtrl', ESCategoryModalController)
+
+  .controller('ESAvatarModalCtrl', ESAvatarModalController)
+
+  .controller('ESPositionEditCtrl', ESPositionEditController)
+
+  .controller('ESLookupPositionCtrl', ESLookupPositionController)
+
+  .controller('ESSearchPositionItemCtrl', ESSearchPositionItemController)
+
+  .controller('ESSearchPositionModalCtrl', ESSearchPositionModalController)
+;
+
+
+function ESPicturesEditController($scope, UIUtils, $q, Device) {
+  'ngInject';
+
+  $scope.selectNewPicture = function(inputSelector) {
+    if (Device.enable){
+      $scope.openPicturePopup();
+    }
+    else {
+      var fileInput = angular.element(document.querySelector(inputSelector||'#pictureFile'));
+      if (fileInput && fileInput.length > 0) {
+        fileInput[0].click();
+      }
+    }
+  };
+
+  $scope.openPicturePopup = function() {
+    Device.camera.getPicture()
+      .then(function(imageData) {
+        $scope.pictures.push({
+          src: "data:image/png;base64," + imageData,
+          isnew: true // use to prevent visibility hidden (if animation)
+        });
+      })
+      .catch(UIUtils.onError('ERROR.TAKE_PICTURE_FAILED'));
+  };
+
+  $scope.fileChanged = function(event) {
+    if (!event.target.files || !event.target.files.length) return;
+    UIUtils.loading.show();
+    var file = event.target.files[0];
+    return UIUtils.image.resizeFile(file)
+      .then(function(imageData) {
+        $scope.pictures.push({
+          src: imageData,
+          isnew: true // use to prevent visibility hidden (if animation)
+        });
+        event.target.value = ""; // reset input[type=file]
+        UIUtils.loading.hide(100);
+      })
+      .catch(function(err) {
+        console.error(err);
+        event.target.value = ""; // reset input[type=file]
+        UIUtils.loading.hide();
+      });
+  };
+
+  $scope.removePicture = function(index){
+    $scope.pictures.splice(index, 1);
+  };
+
+  $scope.favoritePicture = function(index){
+    if (index > 0) {
+      var item = $scope.pictures[index];
+      $scope.pictures.splice(index, 1);
+      $scope.pictures.splice(0, 0, item);
+    }
+  };
+
+  $scope.rotatePicture = function(index){
+    var item = $scope.pictures[index];
+    UIUtils.image.rotateSrc(item.src)
+      .then(function(dataURL){
+        item.src = dataURL;
+      });
+  };
+}
+
+
+function ESCategoryModalController($scope, UIUtils, $timeout, parameters) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.allCategories = [];
+  $scope.categories = [];
+  this.searchText = '';
+
+  // modal title
+  this.title = parameters && parameters.title;
+
+  $scope.afterLoad = function(result) {
+    $scope.categories = result;
+    $scope.allCategories = result;
+    $scope.loading = false;
+    $timeout(function() {
+      UIUtils.ink();
+    }, 10);
+  };
+
+  this.doSearch = function() {
+    var searchText = this.searchText.toLowerCase().trim();
+    if (searchText.length > 1) {
+      $scope.loading = true;
+      $scope.categories = $scope.allCategories.reduce(function(result, cat) {
+        if (cat.parent && cat.name.toLowerCase().search(searchText) != -1) {
+          return result.concat(cat);
+        }
+        return result;
+      }, []);
+
+      $scope.loading = false;
+    }
+    else {
+      $scope.categories = $scope.allCategories;
+    }
+  };
+
+  // load categories
+  if (parameters && parameters.categories) {
+    $scope.afterLoad(parameters.categories);
+  }
+  else if (parameters && parameters.load) {
+    parameters.load()
+      .then(function(res){
+        $scope.afterLoad(res);
+      });
+  }
+
+}
+
+
+
+function ESCommentsController($scope, $filter, $state, $focus, $timeout, $anchorScroll, UIUtils) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.defaultCommentSize = 5;
+  $scope.formData = {};
+  $scope.comments = {};
+
+  $scope.$on('$recordView.enter', function(e, state) {
+    // First enter
+    if ($scope.loading) {
+      $scope.anchor = state && state.stateParams.anchor;
+    }
+    // second call (when using cached view)
+    else if (!$scope.loading && $scope.id) {
+      $scope.load($scope.id, {animate: false});
+    }
+  });
+
+  $scope.$on('$recordView.load', function(event, id, service) {
+    $scope.id = id || $scope.id;
+    $scope.service = service || $scope.service;
+    console.debug("[ES] [comment] Will use {" + service.index + "} service");
+    if ($scope.id) {
+      $scope.load($scope.id)
+        .then(function() {
+          // Scroll to anchor
+          $scope.scrollToAnchor();
+        });
+    }
+  });
+
+  $scope.load = function(id, options) {
+    options = options || {};
+    options.from = options.from || 0;
+    // If anchor has been defined, load all comments
+    options.size = options.size || ($scope.anchor && -1/*all*/);
+    options.size = options.size || $scope.defaultCommentSize;
+    options.animate = angular.isDefined(options.animate) ? options.animate : true;
+    options.loadAvatarAllParent = angular.isDefined(options.loadAvatarAllParent) ? options.loadAvatarAllParent : true;
+    $scope.loading = true;
+    return $scope.service.load(id, options)
+      .then(function(data) {
+        if (!options.animate && data.result.length) {
+          _.forEach(data.result, function(cmt) {
+            cmt.isnew = true;
+          });
+        }
+        $scope.comments = data;
+        $scope.comments.hasMore = (data.total > data.result.length);
+        $scope.loading = false;
+        $scope.service.changes.start(id, data, $scope);
+
+        // Set Motion
+        $scope.motion.show({
+          selector: '.comments .item',
+          ink: false
+        });
+      });
+  };
+
+  $scope.$on('$recordView.beforeLeave', function(){
+    if ($scope.comments) {
+      if (!$scope.service) {
+        console.error('[comment] Comment controller has no service ! Unable to listen changes...');
+        return;
+      }
+      $scope.service.changes.stop($scope.comments);
+    }
+  });
+
+  $scope.scrollToAnchor = function() {
+    if (!$scope.anchor) return;
+    var elemList = document.getElementsByName($scope.anchor);
+    // Waiting for the element
+    if (!elemList || !elemList.length) {
+      return $timeout($scope.scrollToAnchor, 500);
+    }
+    // If many, remove all anchor except the last one
+    for (var i = 0; i<elemList.length-1; i++) {
+      angular.element(elemList[i]).remove();
+    }
+    // Scroll to the anchor
+    $anchorScroll($scope.anchor);
+    // Remove the anchor. This will the CSS class 'positive-100-bg' on the comment
+    $timeout(function () {
+      $scope.anchor = null;
+    }, 1500);
+  };
+
+  $scope.showMore = function(){
+    var from = 0;
+    var size = -1;
+    $scope.load($scope.id, {from: from, size: size, loadAvatarAllParent: false})
+      .then(function() {
+        // Set Motion
+        $scope.motion.show({
+          selector: '.card-avatar'
+        });
+      });
+  };
+
+  $scope.onKeypress = function(event) {
+    // If Ctrl + Enter: submit
+    if (event && event.charCode == 10 && event.ctrlKey) {
+      $scope.save();
+      event.preventDefault();
+    }
+  };
+
+  $scope.save = function() {
+    if (!$scope.formData.message || !$scope.formData.message.length) return;
+
+    $scope.loadWallet({minData: true, auth: true})
+      .then(function() {
+        UIUtils.loading.hide();
+        var comment = $scope.formData;
+        $scope.formData = {};
+        $scope.focusNewComment();
+        return $scope.service.save($scope.id, $scope.comments, comment);
+      })
+      .then(function() {
+        $scope.comments.total++;
+      })
+      .catch(UIUtils.onError('COMMENTS.ERROR.FAILED_SAVE_COMMENT'));
+  };
+
+  $scope.share = function(event, comment) {
+    var params = angular.copy($state.params);
+    var stateUrl;
+    if (params.anchor) {
+      params.anchor= $filter('formatHash')(comment.id);
+      stateUrl = $state.href($state.current.name, params, {absolute: true});
+    }
+    else {
+      stateUrl = $state.href($state.current.name, params, {absolute: true}) + '/' + $filter('formatHash')(comment.id);
+    }
+    var index = _.findIndex($scope.comments.result, {id: comment.id});
+    var url = stateUrl + '?u=' + (comment.uid||$filter('formatPubkey')(comment.issuer));
+    UIUtils.popover.show(event, {
+      templateUrl: 'templates/common/popover_share.html',
+      scope: $scope,
+      bindings: {
+        titleKey: 'COMMENTS.POPOVER_SHARE_TITLE',
+        titleValues: {number: index ? index + 1 : 1},
+        date: comment.creationTime,
+        value: url,
+        postUrl: stateUrl,
+        postMessage: comment.message
+      },
+      autoselect: '.popover-share input'
+    });
+  };
+
+  $scope.edit = function(comment) {
+    var newComment = new Comment();
+    newComment.copy(comment);
+    $scope.formData = newComment;
+  };
+
+  $scope.remove = function(comment) {
+    if (!comment) {return;}
+    comment.remove();
+    $scope.comments.total--;
+  };
+
+  $scope.reply = function(parent) {
+    if (!parent || !parent.id) {return;}
+
+    $scope.formData = {
+      parent: parent
+    };
+
+    $scope.focusNewComment(true);
+  };
+
+  $scope.cancel = function() {
+    $scope.formData = {};
+    $scope.focusNewComment();
+  };
+
+  $scope.focusNewComment = function(forceIfSmall) {
+    if (!UIUtils.screen.isSmall()) {
+      $focus('comment-form-textarea');
+    }
+    else {
+      if (forceIfSmall) $focus('comment-form-input');
+    }
+  };
+
+  $scope.removeParentLink = function() {
+    delete $scope.formData.parent;
+    delete $scope.formData.reply_to;
+    $scope.focusNewComment();
+  };
+
+  $scope.toggleExpandedReplies = function(comment, index) {
+    comment.expandedReplies = comment.expandedReplies || {};
+    comment.expandedReplies[index] = !comment.expandedReplies[index];
+  };
+
+  $scope.toggleExpandedParent = function(comment, index) {
+    comment.expandedParent = comment.expandedParent || {};
+    comment.expandedParent[index] = !comment.expandedParent[index];
+  };
+}
+
+function ESSocialsEditController($scope, $focus, $filter, UIUtils, SocialUtils)  {
+  'ngInject';
+
+  $scope.socialData = {
+    url: null,
+    reorder: false
+  };
+
+  $scope.addSocialNetwork = function() {
+    if (!$scope.socialData.url || $scope.socialData.url.trim().length === 0) {
+      return;
+    }
+
+    $scope.formData.socials = $scope.formData.socials || [];
+    var url = $scope.socialData.url.trim();
+
+    var exists = _.findWhere($scope.formData.socials, {url: url});
+    if (exists) { // duplicate entry
+      $scope.socialData.url = '';
+      return;
+    }
+
+    var social = SocialUtils.get(url);
+    if (!social) {
+      UIUtils.alert.error('PROFILE.ERROR.INVALID_SOCIAL_NETWORK_FORMAT');
+      $focus('socialUrl');
+      return; // stop here
+    }
+    $scope.formData.socials.push(social);
+    $scope.socialData.url = '';
+
+    // Set Motion
+    $scope.motion.show({
+      selector: '#social-' + $filter('formatSlug')(social.url),
+      startVelocity: 10000
+    });
+  };
+
+  $scope.editSocialNetwork = function(index) {
+    var social = $scope.formData.socials[index];
+    $scope.formData.socials.splice(index, 1);
+    $scope.socialData.url = social.url;
+    $focus('socialUrl');
+  };
+
+
+  $scope.reorderSocialNetwork = function(social, fromIndex, toIndex) {
+    if (!social || fromIndex == toIndex) return; // no changes
+    $scope.formData.socials.splice(fromIndex, 1);
+    $scope.formData.socials.splice(toIndex, 0, social);
+  };
+
+  $scope.filterFn = function(social) {
+    return !social.recipient || social.valid;
+  };
+}
+
+function ESSocialsViewController($scope)  {
+  'ngInject';
+
+  $scope.openSocial = function(event, social) {
+    return $scope.openLink(event, social.url, {
+      type: social.type
+    });
+  };
+
+
+  $scope.filterFn = function(social) {
+    return !social.recipient || social.valid;
+  };
+
+}
+
+
+
+function ESAvatarModalController($scope) {
+
+  $scope.formData = {
+    initCrop: false,
+    imageCropStep: 0,
+    imgSrc: undefined,
+    result: undefined,
+    resultBlob: undefined
+  };
+
+  $scope.openFileSelector = function() {
+    var fileInput = angular.element(document.querySelector('.modal-avatar #fileInput'));
+    if (fileInput && fileInput.length > 0) {
+      fileInput[0].click();
+    }
+  };
+
+  $scope.fileChanged = function(e) {
+
+    var files = e.target.files;
+    var fileReader = new FileReader();
+    fileReader.readAsDataURL(files[0]);
+
+    fileReader.onload = function(e) {
+      var res = this.result;
+      $scope.$applyAsync(function() {
+        $scope.formData.imgSrc = res;
+      });
+    };
+  };
+
+  $scope.doNext = function() {
+    if ($scope.formData.imageCropStep == 2) {
+      $scope.doCrop();
+    }
+    else if ($scope.formData.imageCropStep == 3) {
+      $scope.closeModal($scope.formData.result);
+    }
+  };
+
+  $scope.doCrop = function() {
+    $scope.formData.initCrop = true;
+  };
+
+  $scope.clear = function() {
+    $scope.formData = {
+      initCrop: false,
+      imageCropStep: 1,
+      imgSrc: undefined,
+      result: undefined,
+      resultBlob: undefined
+    };
+  };
+
+}
+
+
+function ESPositionEditController($scope, csConfig, esGeo, ModalUtils) {
+  'ngInject';
+
+  // The default country used for address localisation
+  var defaultCountry = csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.defaultCountry;
+
+  var loadingCurrentPosition = false;
+  $scope.formPosition = {
+    loading: false,
+    enable: undefined
+  };
+  $scope.searchModalOpened = false;
+
+  $scope.tryToLocalize = function() {
+    if ($scope.formPosition.loading || loadingCurrentPosition) return;
+
+    var searchText = $scope.getAddressToSearch();
+
+    // No address, so try to localize by device
+    if (!searchText) {
+      loadingCurrentPosition = true;
+      return esGeo.point.current()
+        .then($scope.updateGeoPoint)
+        .then(function() {
+          loadingCurrentPosition = false;
+        })
+        .catch(function(err) {
+          console.error(err); // Silent
+          loadingCurrentPosition = false;
+        });
+    }
+
+    $scope.formPosition.loading = true;
+    return esGeo.point.searchByAddress(searchText)
+      .then(function(res) {
+        if (res && res.length == 1) {
+          return $scope.updateGeoPoint(res[0]);
+        }
+        return $scope.openSearchLocationModal({
+          text: searchText,
+          results: res||[],
+          forceFallback: !res || !res.length // force fallback search first
+        });
+      })
+      .then(function() {
+        $scope.formPosition.loading = false;
+      })
+      .catch(function(err) {
+        console.error(err); // Silent
+        $scope.formPosition.loading = false;
+      });
+  };
+
+    $scope.onCityChanged = function() {
+        if ($scope.loading) return;
+        if ($scope.formPosition.enable) {
+          if ($scope.formData.geoPoint) {
+            // Invalidate the position
+            $scope.formData.geoPoint.lat = undefined;
+            $scope.formData.geoPoint.lon = undefined;
+          }
+          return $scope.tryToLocalize();
+        }
+    };
+
+  $scope.onUseGeopointChanged = function() {
+    if ($scope.loading) return;
+    if (!$scope.formPosition.enable) {
+      if ($scope.formData.geoPoint) {
+        $scope.formData.geoPoint.lat = undefined;
+        $scope.formData.geoPoint.lon = undefined;
+        $scope.dirty = true;
+      }
+    }
+    else {
+      $scope.tryToLocalize();
+    }
+  };
+
+  $scope.onGeopointChanged = function() {
+    if ($scope.loading) {
+      $scope.formPosition.enable = $scope.formData.geoPoint && !!$scope.formData.geoPoint.lat && !!$scope.formData.geoPoint.lon;
+    }
+  };
+  $scope.$watch('formData.geoPoint', $scope.onGeopointChanged);
+
+  $scope.getAddressToSearch = function() {
+    return $scope.formData.address && $scope.formData.city ?
+      [$scope.formData.address.trim(), $scope.formData.city.trim()].join(', ') :
+    $scope.formData.city || $scope.formData.address || $scope.formData.location ;
+  };
+
+  $scope.updateGeoPoint = function(res) {
+    // user cancel
+    if (!res || !res.lat || !res.lon) {
+      // nothing to do
+      return;
+    }
+
+    $scope.dirty = true;
+    $scope.formData.geoPoint = $scope.formData.geoPoint || {};
+    $scope.formData.geoPoint.lat =  parseFloat(res.lat);
+    $scope.formData.geoPoint.lon =  parseFloat(res.lon);
+
+    if (res.address && res.address.city) {
+      var cityParts = [res.address.city];
+      if (res.address.postcode) {
+        cityParts.push(res.address.postcode);
+      }
+      if (res.address.country != defaultCountry) {
+        cityParts.push(res.address.country);
+      }
+      $scope.formData.city = cityParts.join(', ');
+    }
+  };
+
+  /* -- modal -- */
+
+  $scope.openSearchLocationModal = function(options) {
+
+    if ($scope.searchModalOpened) return; // Skip
+
+    $scope.searchModalOpened = true;
+    options = options || {};
+
+    var parameters = {
+      text: options.text || $scope.getAddressToSearch(),
+      results: options.results,
+      fallbackText: options.fallbackText || $scope.formData.city,
+      forceFallback: angular.isDefined(options.forceFallback) ? options.forceFallback : undefined
+    };
+
+    return ModalUtils.show(
+      'plugins/es/templates/common/modal_location.html',
+      'ESSearchPositionModalCtrl',
+      parameters,
+      {
+        focusFirstInput: true
+      }
+    )
+      .then(function(res) {
+        $scope.searchModalOpened = false;
+        $scope.updateGeoPoint(res);
+      })
+      .catch(function() {
+        console.error(err);
+        $scope.searchModalOpened = false;
+      });
+  };
+}
+
+
+function ESLookupPositionController($scope, $q, csConfig, esGeo, ModalUtils) {
+  'ngInject';
+
+  // The default country used for address localisation
+  var defaultCountry = csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.defaultCountry;
+  var loadingPosition = false;
+
+  $scope.geoDistanceLabels = [5,10,20,50,100,250,500].reduce(function(res, distance){
+    res[distance] = {
+      labelKey: 'LOCATION.DISTANCE_OPTION',
+      labelParams: {value: distance}
+    };
+    return res;
+  }, {});
+  $scope.geoDistances = _.keys($scope.geoDistanceLabels);
+
+  $scope.searchPosition = function(searchText) {
+    if (loadingPosition) return $q.when();
+
+    loadingPosition = true;
+
+    // No address, so try to localize by device
+    var promise = !searchText ?
+      esGeo.point.current() :
+      esGeo.point.searchByAddress(searchText)
+      .then(function(res) {
+        if (res && res.length == 1) {
+          res[0].exact = true;
+          return res[0];
+        }
+        return $scope.openSearchLocationModal({
+          text: searchText,
+          results: res||[],
+          forceFallback: !res || !res.length // force fallback search first
+        })
+          .then(function(res) {
+            // Compute point name
+            if (res && res.address && res.address.city) {
+              var cityParts = [res.address.city];
+              if (res.address.postcode) {
+                cityParts.push(res.address.postcode);
+              }
+              if (res.address.country != defaultCountry) {
+                cityParts.push(res.address.country);
+              }
+              res.shortName = cityParts.join(', ');
+            }
+            return res;
+          });
+      });
+
+    promise
+      .then(function(res) {
+
+        loadingPosition = false;
+
+        // user cancel
+        if (!res || !res.lat || !res.lon) return;
+
+        return {
+          lat: parseFloat(res.lat),
+          lon: parseFloat(res.lon),
+          name: res.shortName,
+          exact: res.exact
+        };
+
+      })
+      .catch(function(err) {
+        console.error(err); // Silent
+        loadingPosition = false;
+      });
+
+    return promise;
+  };
+
+
+  /* -- modal -- */
+
+  $scope.openSearchLocationModal = function(options) {
+
+    options = options || {};
+
+    var parameters = {
+      text: options.text || $scope.getAddressToSearch(),
+      results: options.results,
+      fallbackText: options.fallbackText || $scope.search.location,
+      forceFallback: angular.isDefined(options.forceFallback) ? options.forceFallback : undefined
+    };
+
+    return ModalUtils.show(
+      'plugins/es/templates/common/modal_location.html',
+      'ESSearchPositionModalCtrl',
+      parameters,
+      {
+        focusFirstInput: true
+        //,scope: $scope
+      }
+    );
+  };
+}
+
+function ESSearchPositionItemController($scope, $timeout, ModalUtils, csConfig, esGeo) {
+  'ngInject';
+
+  // The default country used for address localisation
+  var defaultCountry = csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.defaultCountry;
+  //$scope.smallscreen = angular.isDefined($scope.smallscreen) ? $scope.smallscreen : UIUtils.screen.isSmall();
+
+  var loadingPosition = false;
+  var minLength = 3;
+  $scope.locations = undefined;
+  $scope.selectLocationIndex = -1;
+
+  $scope.onKeydown = function(e) {
+
+    switch(e.keyCode)
+    {
+      case 27://Esc
+        $scope.hideDropdown();
+        break;
+      case 13://Enter
+        if($scope.locations && $scope.locations.length)
+          $scope.onEnter();
+        break;
+      case 38://Up
+        $scope.onArrowUpOrDown(-1);
+        e.preventDefault();
+        break;
+      case 40://Down
+        $scope.onArrowUpOrDown(1);
+        e.preventDefault();
+        break;
+      case  8://Backspace
+      case 45://Insert
+      case 46://Delete
+        break;
+      case 37://Left
+      case 39://Right
+      case 16://Shift
+      case 17://Ctrl
+      case 35://End
+      case 36://Home
+        break;
+      default://All keys
+        $scope.showDropdown();
+    }
+  };
+
+  $scope.onEnter = function() {
+    if ($scope.selectLocationIndex > -1) {
+      $scope.selectLocation($scope.locations[$scope.selectLocationIndex]);
+    }
+    else {
+      $scope.selectLocation($scope.locations[0]);
+    }
+  };
+
+  $scope.onArrowUpOrDown = function(velocity) {
+    if (!$scope.locations) return;
+
+    $scope.selectLocationIndex+=velocity;
+    if ($scope.selectLocationIndex >= $scope.locations.length) {
+      $scope.selectLocationIndex = 0;
+    }
+    if ($scope.selectLocationIndex < 0) {
+      $scope.selectLocationIndex = $scope.locations.length-1;
+    }
+
+    _.forEach($scope.locations||[], function(item, index) {
+      item.selected = (index == $scope.selectLocationIndex);
+    });
+
+    // TODO: scroll to item ?
+  };
+
+  $scope.onLocationChanged = function() {
+    if (loadingPosition || $scope.search.loading) return;
+    $scope.search.geoPoint = undefined; // reset geo point
+
+    $scope.showDropdown();
+  };
+
+  $scope.showDropdown = function() {
+    var text = $scope.search.location && $scope.search.location.trim();
+    if (!text || text.length < minLength) {
+        return $scope.hideDropdown(true/*force, if still loading*/);
+    }
+
+    // Compute a request id, to apply response only if current request
+    var requestId = ($scope.requestId && $scope.requestId + 1) || 1;
+    $scope.requestId = requestId;
+
+    loadingPosition = true;
+
+    // Execute the given query
+    return esGeo.point.searchByAddress(text)
+      .then(function(res) {
+        if ($scope.requestId != requestId) return; // Skip apply if not same request:
+
+        loadingPosition = false;
+        $scope.locations = res||[];
+        $scope.license = res && res.length && res[0].license;
+      })
+      .catch(function(err) {
+        $scope.hideDropdown();
+        throw err;
+      });
+  };
+
+  $scope.hideDropdown = function(force) {
+    // force, even if still loading
+    if (force) {
+      $scope.locations = undefined;
+      $scope.selectLocationIndex = -1;
+      $scope.license = undefined;
+      loadingPosition = false;
+      return;
+    }
+
+    return $timeout(function() {
+      if (loadingPosition) return;
+      $scope.locations = undefined;
+      $scope.license = undefined;
+      loadingPosition = false;
+    }, 500);
+  };
+
+  $scope.selectLocation = function(res, exactMatch) {
+    loadingPosition = true; // avoid event
+    if (res) {
+      // Update position
+      $scope.search.geoPoint = $scope.search.geoPoint || {};
+      $scope.search.geoPoint.lat =  parseFloat(res.lat);
+      $scope.search.geoPoint.lon =  parseFloat(res.lon);
+
+      if (exactMatch) {
+        $scope.search.geoPoint.exact = true;
+      }
+      else {
+        // Update location name
+        if (res && res.address && res.address.city) {
+          var cityParts = [res.address.city];
+          if (res.address.postcode) {
+            cityParts.push(res.address.postcode);
+          }
+          if (res.address.country != defaultCountry) {
+            cityParts.push(res.address.country);
+          }
+          $scope.search.location = cityParts.join(', ');
+        }
+      }
+    }
+
+    $scope.hideDropdown(true);
+  };
+
+  /* -- modal -- */
+
+  $scope.openSearchLocationModal = function(options) {
+
+    options = options || {
+      text: $scope.search.location
+    };
+
+    var parameters = {
+      text: options.text || $scope.search.location
+    };
+
+    return ModalUtils.show(
+        'plugins/es/templates/common/modal_location.html',
+        'ESSearchPositionModalCtrl',
+        parameters,
+        {
+          focusFirstInput: true
+        }
+      )
+      .then($scope.selectLocation);
+  };
+
+}
+
+function ESSearchPositionModalController($scope, $q, $translate, esGeo, parameters) {
+  'ngInject';
+
+  $scope.search = {
+    text: parameters.text || '',
+    fallbackText: parameters.fallbackText || undefined,
+    forceFallback: angular.isDefined(parameters.forceFallback) ? parameters.forceFallback : false,
+    loading: false,
+    results: parameters.results || undefined
+  };
+
+  $scope.$on('modal.shown', function() {
+    // Load search
+    $scope.doSearch(true/*first search*/);
+  });
+
+  $scope.doSearch = function(firstSearch) {
+
+    var text = $scope.search.text && $scope.search.text.trim();
+    if (!text) {
+      return $q.when(); // nothing to search
+    }
+
+    $scope.search.loading = true;
+
+    // Compute alternative query text
+    var fallbackText = firstSearch && $scope.search.fallbackText && $scope.search.fallbackText.trim();
+    fallbackText = fallbackText && fallbackText != text ? fallbackText : undefined;
+
+    // Execute the given query
+    return ((firstSearch && $scope.search.forceFallback && $scope.search.results) ?
+        $q.when($scope.search.results) :
+        esGeo.point.searchByAddress(text)
+      )
+      .then(function(res) {
+        if (res && res.length || !fallbackText) return res;
+
+        // Fallback search
+        return $q.all([
+          $translate('LOCATION.MODAL.ALTERNATIVE_RESULT_DIVIDER', {address: fallbackText}),
+          esGeo.point.searchByAddress(fallbackText)
+        ])
+          .then(function (res) {
+            var dividerText = res[0];
+            res = res[1];
+            if (!res || !res.length) return res;
+
+            return [{name: dividerText}].concat(res);
+          });
+      })
+      .then(function(res) {
+        $scope.search.loading = false;
+        $scope.search.results = res||[];
+
+        $scope.license = res && res.length && res[0].license;
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        $scope.search.results = [];
+        $scope.license = undefined;
+        throw err;
+      })
+      ;
+  };
+
+}
+
+
+ESExtensionController.$inject = ['$scope', 'esSettings', 'PluginService'];
+ESMenuExtendController.$inject = ['$scope', '$state', '$controller', 'UIUtils', 'csWallet'];
+ESProfilePopoverExtendController.$inject = ['$scope', '$q', '$state', 'esSettings', 'csWallet'];angular.module('cesium.es.app.controllers', ['ngResource', 'cesium.es.services'])
+
+  // Configure menu items
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Menu extension points
+      PluginServiceProvider.extendState('app', {
+         points: {
+           // removeIf(device)
+           'nav-buttons-right': {
+             templateUrl: "plugins/es/templates/menu_extend.html",
+             controller: "ESMenuExtendCtrl"
+           },
+           // endRemoveIf(device)
+           'menu-user': {
+             templateUrl: "plugins/es/templates/menu_extend.html",
+             controller: "ESMenuExtendCtrl"
+           }
+         }
+        });
+
+      // Profile popover extension points
+      PluginServiceProvider.extendState('app', {
+        points: {
+          'profile-popover-user': {
+            templateUrl: "plugins/es/templates/common/popover_profile_extend.html",
+            controller: "ESProfilePopoverExtendCtrl"
+          }
+        }
+      });
+    }
+  }])
+
+ .controller('ESExtensionCtrl', ESExtensionController)
+
+ .controller('ESMenuExtendCtrl', ESMenuExtendController)
+
+ .controller('ESProfilePopoverExtendCtrl', ESProfilePopoverExtendController)
+
+
+;
+
+
+/**
+ * Generic controller, that enable/disable depending on esSettings enable/disable
+ */
+function ESExtensionController($scope, esSettings, PluginService) {
+  'ngInject';
+  $scope.extensionPoint = PluginService.extensions.points.current.get();
+  $scope.enable = esSettings.isEnable();
+  esSettings.api.state.on.changed($scope, function(enable) {
+    $scope.enable = enable;
+    $scope.$broadcast('$$rebind::state');
+  });
+}
+
+/**
+ * Control menu extension
+ */
+function ESMenuExtendController($scope, $state, $controller, UIUtils, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESExtensionCtrl', {$scope: $scope}));
+
+  $scope.showRegistryLookupView = function() {
+    $state.go(UIUtils.screen.isSmall() ? 'app.wot_lookup.tab_registry': 'app.registry_lookup_lg');
+  };
+
+  $scope.showNotificationsPopover = function(event) {
+    return UIUtils.popover.show(event, {
+        templateUrl :'plugins/es/templates/notification/popover_notification.html',
+        scope: $scope,
+        autoremove: false, // reuse popover
+        // Auto-close if open when un-authenticate
+        afterShow: function(popover) {
+          var listener = csWallet.api.data.on.unauth(popover.scope, function() {
+            popover.scope.closePopover();
+            listener();
+          });
+        }
+      });
+  };
+
+  $scope.showMessagesPopover = function(event) {
+    // Make sure tobe auth before opening this popover
+    if (!csWallet.isAuth()) {
+      return csWallet.auth({minData: true}).then(function(){
+        UIUtils.loading.hide();
+        return $scope.showMessagesPopover(event); // loop
+      });
+    }
+
+    return UIUtils.popover.show(event, {
+      templateUrl :'plugins/es/templates/message/popover_message.html',
+      scope: $scope,
+      autoremove: false, // reuse popover
+      // Auto-close if open when un-authenticate
+      afterShow: function(popover) {
+        var listener = csWallet.api.data.on.unauth(popover.scope, function() {
+          popover.scope.closePopover();
+          listener();
+        });
+      }
+    });
+  };
+
+  $scope.showInvitationsPopover = function(event) {
+    // Make sure tobe auth before opening this popover
+    if (!csWallet.isAuth()) {
+      return csWallet.auth().then(function(){
+        UIUtils.loading.hide();
+        return $scope.showInvitationsPopover(event); // loop
+      });
+    }
+
+    return UIUtils.popover.show(event, {
+      templateUrl :'plugins/es/templates/invitation/popover_invitation.html',
+      scope: $scope,
+      autoremove: false, // reuse popover
+      // Auto-close if open when un-authenticate
+      afterShow: function(popover) {
+        var listener = csWallet.api.data.on.unauth(popover.scope, function() {
+          popover.scope.closePopover();
+          listener();
+        });
+      }
+    });
+  };
+}
+
+/**
+ * Control profile popover extension
+ */
+function ESProfilePopoverExtendController($scope, $q, $state, esSettings, csWallet) {
+  'ngInject';
+
+  $scope.updateView = function() {
+    $scope.enable = csWallet.isLogin() && esSettings.isEnable();
+  };
+
+  $scope.showEditUserProfile = function() {
+    $scope.closeProfilePopover();
+    $state.go('app.edit_profile');
+  };
+
+  esSettings.api.state.on.changed($scope, $scope.updateView);
+  csWallet.api.data.on.login($scope, function(data, deferred){
+    $scope.enable = esSettings.isEnable();
+    return deferred && deferred.resolve() || $q.when();
+  });
+  csWallet.api.data.on.logout($scope, function() {
+    $scope.enable = false;
+  });
+
+  // Default action
+  $scope.updateView();
+
+}
+
+
+ESPluginSettingsController.$inject = ['$scope', '$window', '$q', '$translate', '$ionicPopup', 'UIUtils', 'Modals', 'csHttp', 'csConfig', 'csSettings', 'esHttp', 'esSettings', 'esModals'];angular.module('cesium.es.settings.controllers', ['cesium.es.services'])
+
+  // Configure menu items
+  .config(['PluginServiceProvider', '$stateProvider', 'csConfig', function(PluginServiceProvider, $stateProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Extend settings via extension points
+      PluginServiceProvider.extendState('app.settings', {
+        points: {
+          'plugins': {
+            templateUrl: "plugins/es/templates/settings/settings_extend.html",
+            controller: "ESExtensionCtrl"
+          }
+        }
+      });
+
+      $stateProvider
+        .state('app.es_settings', {
+          url: "/settings/es",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/es/templates/settings/plugin_settings.html",
+              controller: 'ESPluginSettingsCtrl'
+            }
+          }
+        });
+    }
+  }])
+
+  .controller('ESPluginSettingsCtrl', ESPluginSettingsController)
+;
+
+
+/*
+ * Settings extend controller
+ */
+function ESPluginSettingsController ($scope, $window, $q,  $translate, $ionicPopup,
+                                     UIUtils, Modals, csHttp, csConfig, csSettings, esHttp, esSettings, esModals) {
+  'ngInject';
+
+  $scope.hasWindowNotification = !!("Notification" in window);
+  $scope.formData = {};
+  $scope.popupData = {}; // need for the node popup
+  $scope.loading = true;
+
+  $scope.enter= function(e, state) {
+    $scope.load();
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function(keepEnableState) {
+    $scope.loading = true;
+
+    var wasEnable = $scope.formData.enable;
+    $scope.formData = csSettings.data.plugins && csSettings.data.plugins.es ?
+      angular.copy(csSettings.data.plugins.es) : {
+        enable: false,
+        host: undefined,
+        port: undefined
+      };
+    if (keepEnableState && wasEnable) {
+      $scope.formData.enable = wasEnable;
+    }
+
+    $scope.isFallbackNode = $scope.formData.enable && esHttp.node.isFallback();
+    $scope.server = $scope.getServer(esHttp);
+
+    $scope.loading = false;
+  };
+
+  esSettings.api.state.on.changed($scope, function(enable) {
+    $scope.load(true);
+  });
+
+  $scope.setPopupForm = function(popupForm) {
+    $scope.popupForm = popupForm;
+  };
+
+  // Change ESnode
+  $scope.changeEsNode= function(node) {
+    node = node || {
+      host: $scope.formData.host,
+      port: $scope.formData.port && $scope.formData.port != 80 && $scope.formData.port != 443 ? $scope.formData.port : undefined,
+      useSsl: angular.isDefined($scope.formData.useSsl) ?
+        $scope.formData.useSsl :
+        ($scope.formData.port == 443)
+    };
+
+    $scope.showNodePopup(node)
+      .then(function(newNode) {
+        if (newNode.host === $scope.formData.host &&
+          newNode.port == $scope.formData.port &&
+          newNode.useSsl == $scope.formData.useSsl) {
+          UIUtils.loading.hide();
+          return; // same node = nothing to do
+        }
+        UIUtils.loading.show();
+
+        var newEsNode = esHttp.instance(newNode.host, newNode.port, newNode.useSsl);
+        return newEsNode.isAlive() // ping the node
+          .then(function(alive) {
+            if (!alive) {
+              UIUtils.loading.hide();
+              return UIUtils.alert.error('ERROR.INVALID_NODE_SUMMARY')
+                .then(function(){
+                  $scope.changeEsNode(newNode); // loop
+                });
+            }
+
+            $scope.formData.host = newEsNode.host;
+            $scope.formData.port = newEsNode.port;
+            $scope.formData.useSsl = newEsNode.useSsl;
+
+            return esHttp.copy(newEsNode);
+          })
+          .then(function() {
+            $scope.server = $scope.getServer(esHttp);
+            $scope.isFallbackNode = false;
+            UIUtils.loading.hide();
+          });
+      });
+  };
+
+  // Show node popup
+  $scope.showNodePopup = function(node) {
+
+    return $q(function(resolve, reject) {
+      var parts = [node.host];
+      if (node.port && node.port != 80) {
+        parts.push(node.port);
+      }
+      $scope.popupData.newNode = parts.join(':');
+      $scope.popupData.useSsl = angular.isDefined(node.useSsl) ? node.useSsl : (node.port == 443);
+      if (!!$scope.popupForm) {
+        $scope.popupForm.$setPristine();
+      }
+      $translate(['ES_SETTINGS.POPUP_PEER.TITLE', 'ES_SETTINGS.POPUP_PEER.HELP', 'COMMON.BTN_OK', 'COMMON.BTN_CANCEL'])
+        .then(function (translations) {
+          // Choose UID popup
+          $ionicPopup.show({
+            templateUrl: 'templates/settings/popup_node.html',
+            title: translations['ES_SETTINGS.POPUP_PEER.TITLE'],
+            subTitle: translations['ES_SETTINGS.POPUP_PEER.HELP'],
+            scope: $scope,
+            buttons: [
+              { text: translations['COMMON.BTN_CANCEL'] },
+              {
+                text: translations['COMMON.BTN_OK'],
+                type: 'button-positive',
+                onTap: function(e) {
+                  $scope.popupForm.$submitted=true;
+                  if(!$scope.popupForm.$valid || !$scope.popupForm.newNode) {
+                    //don't allow the user to close unless he enters a node
+                    e.preventDefault();
+                  } else {
+                    return {
+                      server: $scope.popupData.newNode,
+                      useSsl: $scope.popupData.useSsl
+                    };
+                  }
+                }
+              }
+            ]
+          })
+            .then(function(res) {
+              if (!res) { // user cancel
+                UIUtils.loading.hide();
+                return;
+              }
+              var parts = res.server.split(':');
+              parts[1] = parts[1] ? parts[1] : (res.useSsl ? 443 : 80);
+              resolve({
+                host: parts[0],
+                port: parts[1],
+                useSsl: res.useSsl
+              });
+            });
+        });
+    });
+  };
+
+  $scope.showNodeList = function() {
+    // Check if need a filter on SSL node
+    var forceUseSsl = (csConfig.httpsMode === 'true' || csConfig.httpsMode === true || csConfig.httpsMode === 'force') ||
+    ($window.location && $window.location.protocol === 'https:') ? true : false;
+
+    $ionicPopup._popupStack[0].responseDeferred.promise.close();
+    return esModals.showNetworkLookup({
+      enableFilter: true,
+      endpoint: esHttp.constants.ES_USER_API_ENDPOINT,
+      ssl: forceUseSsl ? true: undefined
+    })
+      .then(function (peer) {
+        if (!peer) return;
+        var esEps = (peer.getEsEndpoints() || []).reduce(function(res, ep){
+          var esEp = esHttp.node.parseEndPoint(ep);
+          return esEp ? res.concat(esEp) : res;
+        }, []);
+        if (!esEps.length) return;
+        var ep = esEps[0];
+        return {
+          host: (ep.dns ? ep.dns :
+                 (peer.hasValid4(ep) ? ep.ipv4 : ep.ipv6)),
+          port: ep.port || 80,
+          useSsl: ep.useSsl || ep.port == 443
+        };
+      })
+      .then(function(newEsNode) {
+        $scope.changeEsNode(newEsNode); // get back to node popup
+      });
+  };
+
+  $scope.onFormChanged = function() {
+    if ($scope.loading) return;
+
+    if ($scope.hasWindowNotification &&
+      $scope.formData.notifications.emitHtml5 !== (window.Notification.permission === "granted")){
+      window.Notification.requestPermission(function (permission) {
+        // If the user accepts, let's create a notification
+        $scope.formData.notifications.emitHtml5 = (permission === "granted"); // revert to false if permission not granted
+        $scope.onFormChanged(); // Loop
+      });
+      return;
+    }
+
+    $scope.loading = true;
+    csSettings.data.plugins = csSettings.data.plugins || {};
+    csSettings.data.plugins.es = csSettings.data.plugins.es ?
+      angular.merge(csSettings.data.plugins.es, $scope.formData) :
+      $scope.formData;
+
+    // Fix old settings (unused)
+    delete csSettings.data.plugins.es.newNode;
+
+    csSettings.store()
+      .then(function() {
+        $scope.loading = false;
+      });
+  };
+  $scope.$watch('formData', $scope.onFormChanged, true);
+
+  $scope.getServer = function(node) {
+    node = node || $scope.formData;
+    if (!node.host) return undefined;
+    return csHttp.getServer(node.host, node.port);
+  };
+}
+
+angular.module('cesium.es.currency.controllers', ['ngResource', 'cesium.es.services'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      PluginServiceProvider.extendState('app.currency.tab_blocks', {
+        points: {
+          'nav-buttons': {
+            templateUrl: "plugins/es/templates/currency/tab_blocks_extend.html",
+            controller: 'ESExtensionCtrl'
+          }
+        }
+      })
+      ;
+    }
+  }])
+;
+
+
+
+ESWalletViewController.$inject = ['$scope', '$controller', '$state', 'csWallet', 'esModals'];
+ESWalletLikesController.$inject = ['$scope', '$controller', 'UIUtils', 'esHttp', 'esProfile'];angular.module('cesium.es.wallet.controllers', ['cesium.es.services'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      PluginServiceProvider
+        .extendStates(['app.view_wallet', 'app.view_wallet_by_id'], {
+          points: {
+            'hero': {
+              templateUrl: "plugins/es/templates/wallet/view_wallet_extend.html",
+              controller: 'ESWalletLikesCtrl'
+            },
+            'after-general': {
+              templateUrl: "plugins/es/templates/wallet/view_wallet_extend.html",
+              controller: 'ESWalletViewCtrl'
+            }
+          }
+        })
+
+        .extendState('app.view_wallets', {
+          points: {
+            'item-wallet': {
+              templateUrl: "plugins/es/templates/wallet/item_wallet_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+
+      ;
+    }
+
+  }])
+
+
+  .controller('ESWalletViewCtrl', ESWalletViewController)
+
+  .controller('ESWalletLikesCtrl', ESWalletLikesController)
+
+;
+
+function ESWalletViewController($scope, $controller, $state, csWallet, esModals) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESExtensionCtrl', {$scope: $scope}));
+
+  $scope.showProfileHelp = false;
+
+  /* -- modals -- */
+
+  $scope.showNewPageModal = function(event) {
+    var wallet = ($state.params && $state.params.id) ? csWallet.children.get($state.params.id) : csWallet;
+    if (!wallet) {
+      UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+      return;
+    }
+
+    return esModals.showNewPage({wallet: wallet});
+  };
+}
+
+
+function ESWalletLikesController($scope, $controller, UIUtils, esHttp, esProfile) {
+  'ngInject';
+
+  $scope.options = $scope.options || {};
+  $scope.options.like = $scope.options.like || {
+    index: 'user',
+    type: 'profile',
+    service: esProfile.like
+  };
+  $scope.canEdit = true; // Avoid to change like counter itself
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESLikesCtrl', {$scope: $scope}));
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESExtensionCtrl', {$scope: $scope}));
+
+  // Load likes, when profile loaded
+  $scope.$watch('formData.pubkey', function(pubkey) {
+    if (pubkey) {
+      $scope.loadLikes(pubkey);
+    }
+  });
+}
+
+
+ESWotLookupExtendController.$inject = ['$scope', '$controller', '$state'];
+ESWotIdentityViewController.$inject = ['$scope', '$ionicPopover', '$q', '$controller', '$timeout', 'UIUtils', 'Modals', 'csWallet', 'esHttp', 'esLike', 'esModals', 'esWallet', 'esProfile', 'esInvitation'];angular.module('cesium.es.wot.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      PluginServiceProvider
+
+        .extendState('app.wot_lookup', {
+          points: {
+            'tabs': {
+              templateUrl: "plugins/es/templates/wot/lookup_extend.html",
+              controller: "ESExtensionCtrl"
+            }
+          }
+        })
+
+        .extendState('app.wot_lookup_lg', {
+          points: {
+            'top': {
+              templateUrl: "plugins/es/templates/wot/lookup_lg_extend.html",
+              controller: "ESWotLookupExtendCtrl"
+            }
+          }
+        })
+
+        .extendStates(['app.wot_identity', 'app.wot_identity_uid'], {
+          points: {
+            'hero': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'general': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'after-general': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'buttons': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'after-buttons': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'buttons-top-fab': {
+              templateUrl: "plugins/es/templates/wot/view_identity_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            }
+          }
+        })
+
+        .extendStates(['app.wot_cert', 'app.wot_cert_lg', 'app.wallet_cert', 'app.wallet_cert_lg'], {
+          points: {
+            'nav-buttons': {
+              templateUrl: "plugins/es/templates/wot/view_certifications_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            },
+            'buttons': {
+              templateUrl: "plugins/es/templates/wot/view_certifications_extend.html",
+              controller: 'ESWotIdentityViewCtrl'
+            }
+          }
+        })
+      ;
+    }
+
+  }])
+
+
+ .controller('ESWotLookupExtendCtrl', ESWotLookupExtendController)
+
+ .controller('ESWotIdentityViewCtrl', ESWotIdentityViewController)
+
+;
+
+function ESWotLookupExtendController($scope, $controller, $state) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESExtensionCtrl', {$scope: $scope}));
+
+  $scope.openRegistryLookup = function() {
+
+    var text = $scope.search.text && $scope.search.text.trim() || '';
+    var location = $scope.search.location && $scope.search.location.trim() || '';
+    var stateParams = {
+      q: text.length ? text : undefined,
+      location: location.length ? location : undefined
+    };
+
+    $state.go('app.wot_lookup.tab_registry', stateParams);
+  };
+}
+
+function ESWotIdentityViewController($scope, $ionicPopover, $q, $controller, $timeout, UIUtils, Modals, csWallet,
+                                     esHttp, esLike, esModals, esWallet, esProfile, esInvitation) {
+  'ngInject';
+
+  $scope.options = $scope.options || {};
+  $scope.options.like = $scope.options.like || {
+    kinds: esLike.constants.KINDS,
+    index: 'user',
+    type: 'profile',
+    service: esProfile.like
+  };
+  $scope.smallscreen = angular.isDefined($scope.smallscreen) ? $scope.smallscreen : UIUtils.screen.isSmall();
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESLikesCtrl', {$scope: $scope}));
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESExtensionCtrl', {$scope: $scope}));
+
+  $scope.canCertify = false; // disable certify on the popover (by default - override by the wot map controller)
+
+  /* -- modals -- */
+
+  $scope.showNewMessageModal = function(confirm) {
+
+    // note: not need to select wallet here, because message modal will do it, if need
+    return csWallet.login({minData: true, method: 'default'})
+      .then(function() {
+        UIUtils.loading.hide();
+
+        // Ask confirmation, if user has no Cesium+ profil
+        if (!confirm && !$scope.formData.profile) {
+          return UIUtils.alert.confirm('MESSAGE.CONFIRM.USER_HAS_NO_PROFILE')
+            .then(function (confirm) {
+              // Recursive call (with confirm flag)
+              if (confirm) return true;
+            });
+        }
+        return true;
+      })
+      // Open modal
+      .then(function(confirm) {
+        if (!confirm) return false;
+
+        return esModals.showMessageCompose({
+          destPub: $scope.formData.pubkey,
+          destUid: $scope.formData.name||$scope.formData.uid
+        })
+        .then(function(sent) {
+          if (sent) UIUtils.toast.show('MESSAGE.INFO.MESSAGE_SENT');
+        });
+      });
+  };
+
+  $scope.showSuggestCertificationModal = function() {
+
+    $scope.hideCertificationActionsPopover();
+
+    var identities;
+
+    return csWallet.auth({minData: true})
+      .then(function(walletData) {
+        UIUtils.loading.hide();
+        if (!walletData) return;
+
+        // Not allow for non-member - issue #561
+        if (!walletData.isMember) {
+          return UIUtils.alert.error('ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION');
+        }
+
+        return Modals.showWotLookup({
+          allowMultiple: true,
+          enableFilter: true,
+          title: 'WOT.SUGGEST_CERTIFICATIONS_MODAL.TITLE',
+          help: 'WOT.SUGGEST_CERTIFICATIONS_MODAL.HELP',
+          okText: 'COMMON.BTN_NEXT',
+          okType: 'button-positive'
+        })
+        .then(function(res) {
+          if (!res || !res.length) return; // user cancelled
+          identities = res;
+
+          return $q.all([
+            // Get keypair only once (if not done here, certification.send() with compute it many times)
+            esWallet.box.getKeypair(walletData.keypair),
+            // Ask confirmation
+            UIUtils.alert.confirm('WOT.CONFIRM.SUGGEST_CERTIFICATIONS', undefined, {okText: 'COMMON.BTN_SEND'})
+          ])
+            .then(function(res) {
+              if (!res) return;
+              var keypair = res[0];
+              var confirm = res[1];
+              if (!confirm) return;
+              var time = moment().utc().unix(); // use same date for each invitation
+              return $q.all(
+                identities.reduce(function(res, identity){
+                  return res.concat(
+                    esInvitation.send({
+                      issuer: walletData.pubkey,
+                      recipient: $scope.formData.pubkey,
+                      time: time,
+                      content: [identity.uid, identity.pubkey].join('-')
+                    }, keypair, 'certification')
+                  );
+                }, [])
+              );
+            })
+            .then(function() {
+              UIUtils.toast.show('INVITATION.INFO.INVITATION_SENT');
+            })
+            .catch(UIUtils.onError('INVITATION.ERROR.SEND_INVITATION_FAILED'));
+        });
+      });
+  };
+
+  $scope.showAskCertificationModal = function() {
+
+    $scope.hideCertificationActionsPopover();
+
+    var identities;
+    return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+      .then(function(wallet) {
+        if (!wallet) throw 'CANCELLED';
+        return wallet.auth({minData: true});
+      })
+      .then(function(walletData) {
+        UIUtils.loading.hide();
+        if (!walletData) return;
+
+        // Not allow for non-member - issue #561
+        if (!walletData.isMember) {
+          return UIUtils.alert.error('ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION');
+        }
+
+        return Modals.showWotLookup({
+          allowMultiple: true,
+          enableFilter: false,
+          title: 'WOT.ASK_CERTIFICATIONS_MODAL.TITLE',
+          help: 'WOT.ASK_CERTIFICATIONS_MODAL.HELP',
+          okText: 'COMMON.BTN_NEXT',
+          okType: 'button-positive'
+        })
+        .then(function(res) {
+          if (!res || !res.length) return; // user cancelled
+          identities = res;
+
+          return $q.all([
+            // Get keypair only once (if not done here, certification.send() with compute it many times)
+            esWallet.box.getKeypair(walletData.keypair),
+            // Ask confirmation
+            UIUtils.alert.confirm('WOT.CONFIRM.ASK_CERTIFICATIONS', undefined, {okText: 'COMMON.BTN_SEND'})
+          ])
+            .then(function(res) {
+              var keypair = res && res[0];
+              var confirm = res && res[1];
+              if (!keypair || !confirm) return;
+              var time = moment().utc().unix(); // use same date for each invitation
+              return $q.all(identities.reduce(function(res, identity){
+                return res.concat(
+                  esInvitation.send({
+                    issuer: walletData.pubkey,
+                    recipient: identity.pubkey,
+                    time: time,
+                    content: [walletData.uid, walletData.pubkey].join('-')
+                  }, keypair, 'certification')
+                );
+              }, []))
+                .then(function() {
+                  UIUtils.toast.show('INVITATION.INFO.INVITATION_SENT');
+                })
+                .catch(UIUtils.onError('INVITATION.ERROR.SEND_INVITATION_FAILED'));
+            });
+          });
+      });
+  };
+
+  $scope.askCertification = function() {
+    $scope.hideCertificationActionsPopover();
+
+    return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+      .then(function(wallet) {
+        return wallet.auth({minData: true});
+      })
+      .then(function(walletData) {
+        UIUtils.loading.hide();
+        if (!walletData) return;
+
+        // Not allow for non-member - issue #561
+        if (!walletData.isMember) {
+          return UIUtils.alert.error('ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION');
+        }
+        // ask confirmation
+        return UIUtils.alert.confirm('WOT.CONFIRM.ASK_CERTIFICATION', undefined, {
+          okText: 'COMMON.BTN_SEND'
+        })
+          .then(function(confirm) {
+            if (!confirm) return;
+            return esInvitation.send({
+                issuer: walletData.pubkey,
+                recipient: $scope.formData.pubkey,
+                content: [walletData.uid, walletData.pubkey].join('-')
+              },
+              {
+                type: 'certification',
+                keypair: walletData.keypair
+              })
+              .then(function() {
+                UIUtils.toast.show('INVITATION.INFO.INVITATION_SENT');
+              })
+              .catch(UIUtils.onError('INVITATION.ERROR.SEND_INVITATION_FAILED'));
+          });
+      });
+  };
+
+  /**
+   * Delete the user profile (need moderator access, on Cs+ pod)
+   * @param confirm
+   * @returns {*}
+   */
+  $scope.delete = function(confirm) {
+
+    if (!confirm) {
+      $scope.hideActionsPopover();
+      if (!$scope.formData.pubkey) return; // Skip
+
+      return UIUtils.alert.confirm('PROFILE.CONFIRM.DELETE_BY_MODERATOR')
+        .then(function(confirm) {
+          if (confirm) return $scope.delete(confirm); // recursive call
+        });
+    }
+
+    // TODO: ask for deletion of all data ? (e.g. message, comment, likes, etc.)
+    // if (angular.isUndefined(allData)) {
+    //   return UIUtils.alert.confirm(...)
+    //   ...
+    // }
+
+    return UIUtils.loading.show()
+      .then(function() {
+        return esProfile.remove($scope.formData.pubkey);
+      })
+      .then(function() {
+        return $scope.doUpdate();
+      })
+      .then(function() {
+        return $timeout(function() {
+          UIUtils.toast.show('DOCUMENT.INFO.REMOVED'); // toast
+        }, 800);
+      })
+      .catch(UIUtils.onError("PROFILE.ERROR.DELETE_PROFILE_FAILED"));
+  };
+
+  /* -- Load data -- */
+
+  // Watch when profile loaded
+  $scope.$watch('formData.pubkey', function(pubkey) {
+    if (pubkey) {
+
+      // Load likes,
+      $scope.loadLikes(pubkey);
+
+      // Enable deletion, if moderator
+      $scope.canDelete = $scope.formData.profile && csWallet.isLogin() && csWallet.data.moderator === true;
+    }
+
+  });
+
+  /* -- Popover -- */
+
+  $scope.showCertificationActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/wot/popover_certification_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.certificationActionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideCertificationActionsPopover = function() {
+    if ($scope.certificationActionsPopover) {
+      $scope.certificationActionsPopover.hide();
+      $scope.certificationActionsPopover = null;
+    }
+    return true;
+  };
+
+  $scope.showActionsPopover = function (event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/wot/view_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+    return true;
+  };
+
+  if ($scope.extensionPoint === 'buttons-top-fab') {
+      // Show fab button, when parent execute motions
+      $scope.$on('$csExtension.motion', function(event) {
+        var canCompose = !!$scope.formData.profile;
+        if (canCompose) {
+          $scope.showFab('fab-compose-' + $scope.formData.pubkey);
+        }
+      });
+  }
+
+  // TODO : for DEV only
+  /*$timeout(function() {
+    if ($scope.extensionPoint != 'buttons') return;
+    $scope.showSuggestCertificationModal();
+  }, 1000);*/
+}
+
+
+ESRegistryLookupController.$inject = ['$scope', '$focus', '$timeout', '$filter', '$controller', '$location', '$translate', '$ionicPopover', 'Device', 'UIUtils', 'ModalUtils', 'BMA', 'csSettings', 'csWallet', 'esModals', 'esRegistry', 'esHttp'];
+ESWalletPagesController.$inject = ['$scope', '$controller', '$timeout', 'UIUtils', 'esModals', 'csWallet'];
+ESRegistryRecordViewController.$inject = ['$scope', '$rootScope', '$state', '$q', '$timeout', '$ionicPopover', '$ionicHistory', '$translate', '$controller', '$anchorScroll', 'csConfig', 'csWallet', 'esRegistry', 'UIUtils', 'esHttp'];
+ESRegistryRecordEditController.$inject = ['$scope', '$timeout', '$state', '$q', '$ionicHistory', '$focus', '$translate', '$controller', 'Device', 'UIUtils', 'ModalUtils', 'csWallet', 'esHttp', 'esRegistry'];angular.module('cesium.es.registry.controllers', ['cesium.es.services', 'cesium.es.common.controllers'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+    .state('app.wot_lookup.tab_registry', {
+      url: "/page?q&type&hash&category&location&issuer&reload&lat&lon&d&last",
+      views: {
+        'tab_registry': {
+          templateUrl: "plugins/es/templates/registry/tabs/tab_registry.html",
+          controller: 'ESRegistryLookupCtrl'
+        }
+      },
+      data: {
+        large: 'app.registry_lookup_lg',
+        silentLocationChange: true
+      }
+    })
+
+    .state('app.registry_lookup_lg', {
+      url: "/wot/page/lg?q&type&hash&category&location&issuer&reload&lat&lon&d&last",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/lookup_lg.html",
+          controller: 'ESRegistryLookupCtrl'
+        }
+      },
+      data: {
+        silentLocationChange: true
+      }
+    })
+
+    .state('app.wallet_pages', {
+      url: "/account/pages?refresh",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/view_wallet_pages.html",
+          controller: 'ESWalletPagesCtrl'
+        }
+      },
+      data: {
+        login: true,
+        minData: true,
+        silentLocationChange: true
+      }
+    })
+
+    .state('app.wallet_pages_by_id', {
+      url: "/wallets/:id/pages?refresh",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/view_wallet_pages.html",
+          controller: 'ESWalletPagesCtrl'
+        }
+      },
+      data: {
+        login: true,
+        minData: true,
+        silentLocationChange: true
+      }
+    })
+
+    .state('app.view_page', {
+      url: "/page/view/:id/:title?refresh",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/view_record.html",
+          controller: 'ESRegistryRecordViewCtrl'
+        }
+      }
+    })
+
+    .state('app.view_page_anchor', {
+      url: "/page/view/:id/:title/:anchor",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/view_record.html",
+          controller: 'ESRegistryRecordViewCtrl'
+        }
+      }
+    })
+
+    .state('app.registry_add_record', {
+      cache: false,
+      url: "/page/add/:type?wallet",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/edit_record.html",
+          controller: 'ESRegistryRecordEditCtrl'
+        }
+      },
+      data: {
+        auth: true,
+        minData: true
+      }
+    })
+
+    .state('app.registry_edit_record', {
+      cache: false,
+      url: "/page/edit/:id/:title?wallet",
+      views: {
+        'menuContent': {
+          templateUrl: "plugins/es/templates/registry/edit_record.html",
+          controller: 'ESRegistryRecordEditCtrl'
+        }
+      },
+      data: {
+        auth: true,
+        minData: true
+      }
+    })
+    ;
+  }])
+
+ .controller('ESRegistryLookupCtrl', ESRegistryLookupController)
+
+ .controller('ESWalletPagesCtrl', ESWalletPagesController)
+
+ .controller('ESRegistryRecordViewCtrl', ESRegistryRecordViewController)
+
+ .controller('ESRegistryRecordEditCtrl', ESRegistryRecordEditController)
+
+;
+
+function ESRegistryLookupController($scope, $focus, $timeout, $filter, $controller, $location, $translate, $ionicPopover,
+                                    Device, UIUtils, ModalUtils, BMA, csSettings, csWallet, esModals, esRegistry, esHttp) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESLookupPositionCtrl', {$scope: $scope}));
+
+  var defaultSearchLimit = 10;
+
+  $scope.search = {
+    text: '',
+    results: [],
+    loading: true,
+    lastRecords: true,
+    type: null,
+    category: null,
+    location: null,
+    advanced: null,
+    issuer: null,
+    geoDistance: !isNaN(csSettings.data.plugins.es.geoDistance) ? csSettings.data.plugins.es.geoDistance : 20
+  };
+  $scope.searchTextId = 'registrySearchText';
+  $scope.enableFilter = true;
+  $scope.smallscreen = angular.isDefined($scope.smallscreen) ? $scope.smallscreen : UIUtils.screen.isSmall();
+
+  $scope.options = angular.merge($scope.options||{}, {
+    location: {
+      show: true,
+      help: 'REGISTRY.SEARCH.LOCATION_HELP'
+    }
+  });
+
+  $scope.enter = function(e, state) {
+    if (!$scope.entered || !$scope.search.results || $scope.search.results.length === 0) {
+
+      // Resolve distance unit
+      if (!$scope.geoUnit) {
+        return $translate('LOCATION.DISTANCE_UNIT')
+          .then(function(unit) {
+            $scope.geoUnit = unit;
+            return $scope.enter(e, state); // Loop
+          });
+      }
+
+      var finishEntered = function() {
+        // removeIf(device)
+        // Focus on search text (only if NOT device, to avoid keyboard opening)
+        if ($scope.searchTextId) {
+          $focus($scope.searchTextId);
+        }
+        // endRemoveIf(device)
+
+        $scope.entered = true;
+
+        $scope.doSearch();
+      };
+
+      // Search by text
+      if (state.stateParams && state.stateParams.q && (typeof state.stateParams.q == 'string')) {
+        $scope.search.text=state.stateParams.q;
+      }
+
+      if (state.stateParams && state.stateParams.hash) { // hash tag parameter
+        $scope.search.text = '#' + state.stateParams.hash;
+      }
+
+      // Search on location
+      if (state.stateParams && state.stateParams.location) {
+        $scope.search.location = state.stateParams.location;
+        if (state.stateParams.lat && state.stateParams.lon) {
+          $scope.search.geoPoint = {
+            lat: parseFloat(state.stateParams.lat),
+            lon: parseFloat(state.stateParams.lon)
+          };
+        }
+        if (state.stateParams.d) {
+          $scope.search.geoDistance = state.stateParams.d;
+        }
+      }
+      else {
+        var defaultSearch = csSettings.data.plugins.es.registry && csSettings.data.plugins.es.registry.defaultSearch;
+        // Apply defaults from settings
+        if (defaultSearch) {
+          if (defaultSearch.location){
+            angular.merge($scope.search, csSettings.data.plugins.es.registry.defaultSearch);
+          }
+          else {
+            defaultSearch = undefined; // invalid
+          }
+        }
+        // First time calling this view: apply profile location (if loaded)
+        if (!defaultSearch && csWallet.isLogin() && csWallet.data.profile) {
+          if (!csWallet.isDataLoaded()) {
+            UIUtils.loading.show();
+            return csWallet.loadData()
+              .then(function() {
+                UIUtils.loading.hide();
+                return $scope.enter(e,state); // loop
+              });
+          }
+          $scope.search.geoPoint = csWallet.data.profile.geoPoint;
+          $scope.search.location = csWallet.data.profile.city||(csWallet.data.profile.geoPoint ? $translate.instant('LOCATION.PROFILE_POSITION') : undefined);
+        }
+      }
+
+      // Search on type
+      if (state.stateParams && (state.stateParams.type || state.stateParams.last)) {
+        if (state.stateParams.last || state.stateParams.type == 'last') {
+          $scope.search.lastRecords = true;
+          $scope.search.type = undefined;
+        }
+        else {
+          $scope.search.type = state.stateParams.type;
+        }
+      }
+      else {
+        $scope.search.lastRecords = false;
+      }
+
+      // Search on issuer
+      if (state.stateParams && state.stateParams.issuer) {
+        $scope.search.issuer = state.stateParams.issuer;
+      }
+
+      // Search on category
+      if (state.stateParams && state.stateParams.category) {
+        esRegistry.category.get({id: state.stateParams.category})
+        .then(function(cat) {
+          $scope.search.category = cat;
+          finishEntered();
+        })
+        .catch(UIUtils.onError("REGISTRY.ERROR.LOAD_CATEGORY_FAILED"));
+      }
+      else {
+        finishEntered();
+      }
+    }
+    $scope.showFab('fab-add-registry-record');
+
+  };
+  $scope.$on('$ionicView.enter', function(e, state) {
+    // WARN: do not set by reference
+    // because it can be overrided by sub controller
+    return $scope.enter(e, state);
+  });
+
+  // Store some search options as settings defaults
+  $scope.leave = function() {
+    var dirty = false;
+
+    csSettings.data.plugins.es.registry = csSettings.data.plugins.es.registry || {};
+    csSettings.data.plugins.es.registry.defaultSearch = csSettings.data.plugins.es.registry.defaultSearch || {};
+
+    // Check if location changed
+    var location = $scope.search.location && $scope.search.location.trim();
+    var oldLocation = csSettings.data.plugins.es.registry.defaultSearch.location;
+    if (!oldLocation || (oldLocation !== location)) {
+      csSettings.data.plugins.es.registry.defaultSearch = {
+        location: location,
+        geoPoint: location && $scope.search.geoPoint ? angular.copy($scope.search.geoPoint) : undefined
+      };
+      dirty = true;
+    }
+
+    // Check if distance changed
+    var odlDistance = csSettings.data.plugins.es.geoDistance;
+    if (!odlDistance || odlDistance !== $scope.search.geoDistance) {
+      csSettings.data.plugins.es.geoDistance = $scope.search.geoDistance;
+      dirty = true;
+    }
+
+    // execute with a delay, for better UI perf
+    if (dirty) {
+      $timeout(function() {
+        csSettings.store();
+      });
+    }
+  };
+  $scope.$on('$ionicView.leave', function() {
+    // WARN: do not set by reference
+    // because it can be overrided by sub controller
+    return $scope.leave();
+  });
+
+  $scope.onGeoPointChanged = function() {
+    if ($scope.search.loading) return;
+
+    if ($scope.search.geoPoint && $scope.search.geoPoint.lat && $scope.search.geoPoint.lon && !$scope.search.geoPoint.exact) {
+      $scope.doSearch();
+      $scope.updateLocationHref();
+    }
+  };
+  $scope.$watch('search.geoPoint', $scope.onGeoPointChanged, true);
+
+  $scope.resolveLocationPosition = function() {
+    if ($scope.search.loadingPosition) return;
+
+    $scope.search.loadingPosition = true;
+    return $scope.searchPosition($scope.search.location)
+      .then(function(res) {
+        if (!res) {
+          $scope.search.loading = false;
+          $scope.search.results = undefined;
+          $scope.search.total = 0;
+          $scope.search.loadingPosition = false;
+          $scope.search.geoPoint = undefined;
+          throw 'CANCELLED';
+        }
+        $scope.search.geoPoint = res;
+        if (res.shortName && !res.exact) {
+          $scope.search.location = res.shortName;
+        }
+        $scope.search.loadingPosition = false;
+      });
+  };
+
+  $scope.doGetLastRecords = function(from) {
+    $scope.hidePopovers();
+
+    $scope.search.text = undefined;
+    return $scope.doSearch(from);
+  };
+
+  $scope.doSearchText = function() {
+    $scope.doSearch();
+
+    // removeIf(no-device)
+    Device.keyboard.close();
+    // endRemoveIf(no-device)
+  };
+
+  $scope.doSearch = function(from) {
+    $scope.search.loading = !from;
+
+    // Resolve location position
+    if ($scope.search.location && $scope.search.location.length >= 3 && !$scope.search.geoPoint) {
+      return $scope.resolveLocationPosition()
+        .then(function() {
+          return $scope.doSearch(from); // Loop
+        });
+    }
+
+    var text = $scope.search.text && $scope.search.text.trim() || '';
+    $scope.search.lastRecords = !text || !text.length;
+    var matches = [];
+    var filters = [];
+    if (text && text.length) {
+      // pubkey : use a special 'term', because of 'non indexed' field
+      if (BMA.regexp.PUBKEY.test(text /*case sensitive*/)) {
+        filters.push({term : { pubkey: text}});
+      }
+      else {
+        text = text.toLowerCase();
+        var tags = text ? esHttp.util.parseTags(text) : undefined;
+        var matchFields = ["title", "description", "city", "address"];
+        matches.push({multi_match : { query: text,
+          fields: matchFields,
+          type: "phrase_prefix"
+        }});
+        matches.push({match : { title: {query: text, boost: 2}}});
+        matches.push({prefix: {title: text}});
+        matches.push({match : { description: text}});
+        matches.push({
+          nested: {
+            path: "category",
+            query: {
+              bool: {
+                filter: {
+                  match: { "category.name": text}
+                }
+              }
+            }
+          }
+        });
+        if (tags && tags.length) {
+          filters.push({terms: {tags: tags}});
+        }
+      }
+    }
+    // issuer: use only on filter
+    else if ($scope.search.issuer) {
+      filters.push({term : { issuer: $scope.search.issuer}});
+    }
+    if ($scope.search.type) {
+      filters.push({term: { type: $scope.search.type}});
+    }
+    if ($scope.search.category) {
+      filters.push({
+        nested: {
+          path: "category",
+          query: {
+            bool: {
+              filter: {
+                term: { "category.id": $scope.search.category.id}
+              }
+            }
+          }
+        }
+      });
+    }
+
+    var location = $scope.search.location && $scope.search.location.trim().toLowerCase();
+    if ($scope.search.geoPoint && $scope.search.geoPoint.lat && $scope.search.geoPoint.lon) {
+
+      // match location OR geo distance
+      if (location && location.length) {
+        var locationCity = location.split(',')[0];
+        filters.push({
+          or : [
+            // No position defined
+            {
+              and: [
+                {not: {exists: { field : "geoPoint" }}},
+                {match_phrase: { city: locationCity }}
+              ]
+            },
+            // Has position
+            {geo_distance: {
+              distance: $scope.search.geoDistance + $scope.geoUnit,
+              geoPoint: {
+                lat: $scope.search.geoPoint.lat,
+                lon: $scope.search.geoPoint.lon
+              }
+            }}
+          ]
+        });
+      }
+
+      else {
+        filters.push(
+          {geo_distance: {
+            distance: $scope.search.geoDistance + $scope.geoUnit,
+            geoPoint: {
+              lat: $scope.search.geoPoint.lat,
+              lon: $scope.search.geoPoint.lon
+            }
+          }});
+      }
+    }
+
+    var request = {
+      highlight: {fields : {title : {}, description: {}, tags: {}}},
+      from: from
+    };
+    if (matches.length > 0) {
+      request.query = request.query || {bool: {}};
+      request.query.bool.should =  matches;
+      // Exclude result with score=0
+      request.query.bool.minimum_should_match = 1;
+    }
+    if (filters.length > 0) {
+      request.query = request.query || {bool: {}};
+      request.query.bool.filter =  filters;
+    }
+    if ($scope.search.lastRecords) {
+      request.sort = {creationTime : "desc"};
+    }
+
+    // Update href location
+    $scope.updateLocationHref();
+
+    // Execute the request
+    return $scope.doRequest(request);
+  };
+
+  $scope.doRequest = function(options) {
+    options = options || {};
+    options.from = options.from || 0;
+    options.size = options.size || defaultSearchLimit;
+    if (options.size < defaultSearchLimit) options.size = defaultSearchLimit;
+    $scope.search.loading = (options.from === 0);
+
+    var requestId = ($scope.requestId && $scope.requestId + 1) || 1;
+    $scope.requestId = requestId;
+
+    return esRegistry.record.search(options)
+      .then(function(res) {
+        if ($scope.requestId != requestId) return; // Skip apply if not same request:
+
+        if (!res || !res.hits || !res.hits.length) {
+          $scope.search.results = (options.from > 0) ? $scope.search.results : [];
+          $scope.search.total = (options.from > 0) ? $scope.search.total : 0;
+          $scope.search.loading = false;
+          $scope.search.hasMore = false;
+          return;
+        }
+        var formatSlug = $filter('formatSlug');
+        _.forEach(res.hits, function(record) {
+          // Compute title for url
+          record.urlTitle = formatSlug(record.title);
+        });
+
+        // Replace results, or append if 'show more' clicked
+        if (!options.from) {
+          $scope.search.results = res.hits;
+          $scope.search.total = res.total;
+        }
+        else {
+          $scope.search.results = $scope.search.results.concat(res.hits);
+        }
+        $scope.search.hasMore = $scope.search.results.length < res.total;
+        $scope.search.loading = false;
+
+        $scope.motion.show({selector: '.list .item', ink: true});
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        $scope.search.results = (options.from > 0) ? $scope.search.results : [];
+        $scope.search.total = (options.from > 0) ? $scope.search.total : 0;
+        $scope.search.hasMore = false;
+        UIUtils.onError('REGISTRY.ERROR.LOOKUP_RECORDS_FAILED')(err);
+      });
+  };
+
+  $scope.showMore= function() {
+    var from = $scope.search.results ? $scope.search.results.length : 0;
+
+    $scope.search.loadingMore = true;
+
+    var searchFunction = ($scope.search.lastRecords) ?
+      $scope.doGetLastRecords :
+      $scope.doSearch;
+
+    return searchFunction(from)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.search.loadingMore = false;
+        $scope.search.hasMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.removeType = function() {
+    $scope.search.type = null;
+    $scope.doSearch();
+    $scope.updateLocationHref();
+  };
+
+  $scope.removeCategory = function() {
+    $scope.search.category = null;
+    $scope.category = null;
+    $scope.doSearch();
+    $scope.updateLocationHref();
+  };
+
+  $scope.removeLocation = function() {
+    $scope.search.location = null;
+    $scope.search.geoPoint = null;
+    $scope.doSearch();
+    $scope.updateLocationHref();
+  };
+
+  // Update location href
+  $scope.updateLocationHref = function(from) {
+    // removeIf(device)
+    // Skip when "show more"
+    if (from) return;
+
+    $timeout(function() {
+      var text = $scope.search.text && $scope.search.text.trim();
+      var location = $scope.search.location && $scope.search.location.trim();
+      var stateParams = {
+        location: location && location.length ? location : undefined,
+        category: $scope.search.category ? $scope.search.category.id : undefined,
+        last: $scope.search.lastRecords ? true : undefined,
+        type: $scope.search.type ? $scope.search.type : undefined,
+        lat: $scope.search.geoPoint && $scope.search.geoPoint.lat || undefined,
+        lon: $scope.search.geoPoint && $scope.search.geoPoint.lon || undefined,
+        d: $scope.search.geoPoint && $scope.search.geoDistance || undefined
+      };
+      if (text && text.match(/^#\w+$/)) {
+        stateParams.hash = text.substr(1);
+      }
+      else if (text && text.length){
+        stateParams.q = text;
+      }
+
+      $location.search(stateParams).replace();
+    });
+    // endRemoveIf(device)
+  };
+
+
+  $scope.onToggleAdvanced = function() {
+    if ($scope.search.entered && !$scope.search.lastRecords) {
+      $scope.doSearch();
+      $scope.updateLocationHref();
+    }
+  };
+  $scope.$watch('search.advanced', $scope.onToggleAdvanced, true);
+
+  $scope.toggleAdvanced = function() {
+    $scope.search.advanced = !$scope.search.advanced;
+    $timeout($scope.hidePopovers, 200);
+  };
+
+  /* -- modals -- */
+
+  $scope.showRecordTypeModal = function(event) {
+    $scope.hidePopovers();
+
+    $timeout(function() {
+      if (event.isDefaultPrevented()) return;
+
+      ModalUtils.show('plugins/es/templates/registry/modal_record_type.html')
+        .then(function(type){
+          if (type) {
+            $scope.search.type = type;
+            $scope.doSearch();
+            $scope.updateLocationHref();
+          }
+        });
+    }, 350); // use timeout to allow event to be prevented in removeType()
+  };
+
+  $scope.showCategoryModal = function(event) {
+    $timeout(function() {
+      if (event.isDefaultPrevented()) return;
+
+      // load categories
+      esRegistry.category.all()
+        .then(function (categories) {
+          // open modal
+          return ModalUtils.show('plugins/es/templates/common/modal_category.html', 'ESCategoryModalCtrl as ctrl',
+            {categories: categories}, {focusFirstInput: true});
+        })
+        .then(function (cat) {
+          if (cat && cat.parent) {
+            $scope.search.category = cat;
+            $scope.doSearch();
+            $scope.updateLocationHref();
+          }
+        });
+    }, 350); // use timeout to allow event to be prevented in removeCategory()
+  };
+
+  $scope.showNewPageModal = function() {
+    $scope.hidePopovers();
+    return esModals.showNewPage();
+  };
+
+  /* -- popovers -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl :'plugins/es/templates/registry/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.filtersPopover = null;
+    }
+  };
+
+  $scope.showFiltersPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl :'plugins/es/templates/registry/lookup_popover_filters.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.filtersPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideFiltersPopover = function() {
+    if ($scope.filtersPopover) {
+      $scope.filtersPopover.hide();
+      $scope.filtersPopover = null;
+    }
+  };
+
+  $scope.hidePopovers = function() {
+    $scope.hideActionsPopover();
+    $scope.hideFiltersPopover();
+  };
+
+
+  // TODO: remove auto add account when done
+ /* $timeout(function() {
+    $scope.search.text='lavenier';
+    $scope.doSearch();
+  }, 400);
+  */
+}
+
+
+function ESWalletPagesController($scope, $controller, $timeout, UIUtils, esModals, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESRegistryLookupCtrl', {$scope: $scope}));
+
+  $scope.searchTextId = undefined; // avoid focus
+
+  var wallet;
+
+  // Override the default enter
+  $scope.enter = function(e, state) {
+    if (!$scope.entered) {
+
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      return wallet.login({minData: true})
+        .then(function(walletData) {
+          UIUtils.loading.hide();
+          $scope.search.issuer = walletData.pubkey;
+          $scope.search.advanced = true;
+          $timeout($scope.doSearch, 100);
+          $scope.showFab('fab-wallet-add-registry-record');
+        });
+    }
+    else {
+      // Asking refresh
+      if (state.stateParams && state.stateParams.refresh) {
+        return $timeout($scope.doSearch, 2000 /*waiting for propagation, if deletion*/);
+      }
+    }
+  };
+
+  $scope.doUpdate = function() {
+    if (!wallet || !wallet.isLogin()) return;
+    $scope.search.issuer = csWallet.data.pubkey;
+    $scope.search.advanced = true;
+    return $scope.doSearch();
+  };
+
+  // Override inherited, to pass the select wallet
+  $scope.showNewPageModal = function() {
+    $scope.hidePopovers();
+    return esModals.showNewPage({wallet: wallet});
+  };
+
+}
+
+
+function ESRegistryRecordViewController($scope, $rootScope, $state, $q, $timeout, $ionicPopover, $ionicHistory, $translate, $controller,
+                                        $anchorScroll, csConfig, csWallet, esRegistry, UIUtils, esHttp) {
+  'ngInject';
+
+  $scope.formData = {};
+  $scope.id = null;
+  $scope.category = {};
+  $scope.pictures = [];
+  $scope.canEdit = false;
+  $scope.showTransfer = false;
+  $scope.loading = true;
+  $scope.motion = UIUtils.motion.fadeSlideIn;
+
+  // Init likes here, to be able to use in extension
+  $scope.options = $scope.options || {};
+  $scope.options.like = {
+    kinds: ['LIKE', 'ABUSE'],
+    index: 'page',
+    type: 'record'
+  };
+  $scope.likeData = {
+    likes: {},
+    abuses: {}
+  };
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESLikesCtrl', {$scope: $scope}));
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if (state.stateParams && state.stateParams.id) { // Load by id
+      if ($scope.loading || state.stateParams.refresh) { // prevent reload if same id (if not forced)
+        $scope.load(state.stateParams.id, state.stateParams.anchor);
+      }
+      $scope.$broadcast('$recordView.enter', state);
+    }
+    else {
+      $state.go('app.wot_lookup.tab_registry');
+    }
+  });
+
+  $scope.$on('$ionicView.beforeLeave', function(event, args){
+    $scope.$broadcast('$recordView.beforeLeave', args);
+  });
+
+  $scope.load = function(id, anchor) {
+    id = id || $scope.id;
+    $scope.loading = true;
+
+    return $q.all([
+      esRegistry.record.load(id)
+        .then(function (data) {
+          $scope.id= data.id;
+          $scope.formData = data.record;
+          //console.debug('Loading record', $scope.formData);
+          $scope.canEdit = csWallet.isUserPubkey($scope.formData.issuer) || csWallet.children.hasPubkey($scope.formData.issuer);
+          $scope.showTransfer = !$scope.canEdit && $scope.formData.pubkey;
+          $scope.issuer = data.issuer;
+          // avatar
+          $scope.avatar = $scope.formData.avatar;
+          $scope.avatarStyle= $scope.formData.avatar && {'background-image':'url("'+$scope.avatar.src+'")'};
+
+          UIUtils.loading.hide();
+          $scope.loading = false;
+          // Set Motion (only direct children, to exclude .lazy-load children)
+          $scope.motion.show({selector: '.list > .item, .list > ng-if > .item'});
+        })
+        .catch(function(err) {
+          // Retry (ES could have error)
+          if (!$scope.secondTry) {
+            $scope.secondTry = true;
+            $q(function() {
+              $scope.load(id);
+            }, 100);
+          }
+          else {
+            $scope.loading = false;
+            if (err && err.ucode === 404) {
+              UIUtils.toast.show('REGISTRY.ERROR.RECORD_NOT_EXISTS');
+              $state.go('app.wot_lookup.tab_registry');
+            }
+            else {
+              UIUtils.onError('REGISTRY.ERROR.LOAD_RECORD_FAILED')(err);
+            }
+          }
+        }),
+
+      // Load pictures
+      esRegistry.record.picture.all({id: id})
+        .then(function(hit) {
+
+          $scope.pictures = hit._source.pictures && hit._source.pictures.reduce(function(res, pic) {
+              return res.concat(esHttp.image.fromAttachment(pic.file));
+            }, []);
+
+          // Set Motion
+          if ($scope.pictures.length > 0) {
+            $scope.motion.show({
+              selector: '.lazy-load .item.card-gallery',
+              startVelocity: 3000
+            });
+          }
+        })
+        .catch(function() {
+          $scope.pictures = [];
+        }),
+
+      // Load other data (from child controller)
+      $timeout(function() {
+        return $scope.$broadcast('$recordView.load', id, esRegistry.record.comment);
+      })
+    ])
+    .then(function() {
+      // Display items in technical parts
+      $scope.motion.show({
+        selector: '.lazy-load .item',
+        startVelocity: 3000
+      });
+
+      // scroll (if comment anchor)
+      if (anchor) $timeout(function() {
+        $anchorScroll(anchor);
+      }, 1000);
+    });
+  };
+
+  // Edit click
+  $scope.edit = function() {
+    var wallet = csWallet.isUserPubkey($scope.formData.issuer) ? csWallet : csWallet.children.getByPubkey($scope.formData.issuer);
+    if (!wallet) return;
+    UIUtils.loading.show();
+    return $state.go('app.registry_edit_record', {id: $scope.id, wallet: wallet.id});
+  };
+
+  $scope.delete = function() {
+    $scope.hideActionsPopover();
+
+    var wallet = csWallet.isUserPubkey($scope.formData.issuer) ? csWallet : csWallet.children.getByPubkey($scope.formData.issuer);
+    if (!wallet) return;
+
+    // translate
+    var translations;
+    $translate(['REGISTRY.VIEW.REMOVE_CONFIRMATION', 'REGISTRY.INFO.RECORD_REMOVED'])
+    .then(function(res) {
+      translations = res;
+      return UIUtils.alert.confirm(res['REGISTRY.VIEW.REMOVE_CONFIRMATION']);
+    })
+    .then(function(confirm) {
+      if (confirm) {
+        esRegistry.record.remove($scope.id, {wallet: wallet})
+        .then(function () {
+          if (wallet.data.pages && wallet.data.pages.count) {
+            wallet.data.pages.count--;
+          }
+          $ionicHistory.nextViewOptions({
+            historyRoot: true
+          });
+          if (wallet.isDefault()) {
+            $state.go('app.wallet_pages', {refresh: true});
+          }
+          else {
+            $state.go('app.wallet_pages_by_id', {refresh: true, id: wallet.id});
+          }
+
+          UIUtils.toast.show(translations['REGISTRY.INFO.RECORD_REMOVED']);
+        })
+        .catch(UIUtils.onError('REGISTRY.ERROR.REMOVE_RECORD_FAILED'));
+      }
+    });
+  };
+
+  /* -- modals & popover -- */
+
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/registry/view_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+    return true;
+  };
+
+  $scope.showSharePopover = function(event) {
+    $scope.hideActionsPopover();
+    var title = $scope.formData.title;
+    // Use shareBasePath (fix #530) or rootPath (fix #390)
+    var url = (csConfig.shareBaseUrl || $rootScope.rootPath) + $state.href('app.view_page', {title: title, id: $scope.id});
+    // Override default position, is small screen - fix #545
+    if (UIUtils.screen.isSmall()) {
+      event = angular.element(document.querySelector('#registry-share-anchor-'+$scope.id)) || event;
+    }
+    UIUtils.popover.share(event, {
+      bindings: {
+        url: url,
+        titleKey: 'REGISTRY.VIEW.POPOVER_SHARE_TITLE',
+        titleValues: {title: title},
+        time: $scope.formData.time,
+        postMessage: title
+      }
+    });
+  };
+
+}
+
+function ESRegistryRecordEditController($scope, $timeout,  $state, $q, $ionicHistory, $focus, $translate, $controller,
+                                        Device, UIUtils, ModalUtils, csWallet, esHttp, esRegistry) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESPositionEditCtrl', {$scope: $scope}));
+
+  $scope.formData = {
+    title: null,
+    description: null,
+    socials: [],
+    geoPoint: null
+  };
+
+  $scope.loading = true;
+  $scope.dirty = false;
+  $scope.walletData = null;
+  $scope.id = null;
+  $scope.avatar = null;
+  $scope.pictures = [];
+
+  $scope.setForm =  function(form) {
+    $scope.form = form;
+  };
+
+  var wallet;
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+
+    if ($scope.loading) {
+      wallet = (state.stateParams && state.stateParams.wallet && state.stateParams.wallet != 'default') ? csWallet.children.get(state.stateParams.wallet) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      return wallet.login({minData: true})
+        .then(function(walletData) {
+          $scope.walletData = walletData;
+          if (state.stateParams && state.stateParams.id) { // Load by id
+            $scope.load(state.stateParams.id);
+          }
+          else {
+            if (state.stateParams && state.stateParams.type) {
+              $scope.updateView({
+                record: {
+                  type: state.stateParams.type
+                }
+              });
+            }
+          }
+          // removeIf(device)
+          $focus('registry-record-title');
+          // endRemoveIf(device)
+        });
+    }
+  });
+
+  $scope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {
+    if ($scope.dirty && !$scope.saving) {
+
+      // stop the change state action
+      event.preventDefault();
+
+      if (!$scope.loading) {
+        $scope.loading = true;
+        return UIUtils.alert.confirm('CONFIRM.SAVE_BEFORE_LEAVE',
+          'CONFIRM.SAVE_BEFORE_LEAVE_TITLE', {
+            cancelText: 'COMMON.BTN_NO',
+            okText: 'COMMON.BTN_YES_SAVE'
+          })
+          .then(function(confirmSave) {
+            $scope.loading = false;
+            if (confirmSave) {
+              $scope.form.$submitted=true;
+              return $scope.save(false/*silent*/, true/*haswait debounce*/)
+                .then(function(saved){
+                  if (saved) {
+                    $scope.dirty = false;
+                  }
+                  return saved; // change state only if not error
+                });
+            }
+            else {
+              $scope.dirty = false;
+              return true; // ok, change state
+            }
+          })
+          .then(function(confirmGo) {
+            if (confirmGo) {
+              // continue to the order state
+              $ionicHistory.nextViewOptions({
+                historyRoot: true
+              });
+              $state.go(next.name, nextParams);
+            }
+          })
+          .catch(function(err) {
+            // Silent
+          });
+      }
+    }
+  });
+
+  $scope.load = function(id) {
+    $scope.loading = true;
+    esRegistry.record.load(id, {
+        raw: true
+      })
+      .then(function (data) {
+        if (data && data.record) {
+          $scope.updateView(data);
+        }
+        else {
+          $scope.updateView({record: {}});
+        }
+      })
+      .catch(function(err) {
+        UIUtils.loading.hide(10);
+        $scope.loading = false;
+        UIUtils.onError('REGISTRY.ERROR.LOAD_RECORD_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function(data) {
+    $scope.formData = data.record || {};
+    $scope.id= data.id;
+
+    // avatar
+    $scope.avatar = $scope.formData.avatar;
+    if ($scope.avatar) {
+      $scope.avatarStyle = $scope.avatar && {'background-image':'url("'+$scope.avatar.src+'")'};
+      $scope.avatarClass = {};
+    }
+    else {
+      $scope.avatarStyle = undefined;
+      $scope.avatarClass = {};
+      $scope.avatarClass['cion-page-' +  $scope.formData.type] = !$scope.avatar;
+    }
+
+    // pictures
+    $scope.pictures = data.record && data.record.pictures || [];
+    delete data.record.pictures; // remove, as already stored in $scope.pictures
+
+    $scope.motion.show({
+      selector: '.animate-ripple .item, .card-gallery',
+      startVelocity: 3000
+    });
+    UIUtils.loading.hide();
+
+    // Update loading - done with a delay, to avoid trigger onFormDataChanged()
+    $timeout(function() {
+      $scope.loading = false;
+    }, 1000);
+  };
+
+  $scope.onFormDataChanged = function() {
+    if ($scope.loading) return;
+    $scope.dirty = true;
+  };
+  $scope.$watch('formData', $scope.onFormDataChanged, true);
+
+
+
+  $scope.needCategory = function() {
+    return $scope.formData.type && ($scope.formData.type=='company' || $scope.formData.type=='shop');
+  };
+
+  $scope.save = function(silent, hasWaitDebounce) {
+    $scope.form.$submitted=true;
+    if($scope.saving || // avoid multiple save
+       !$scope.form.$valid ||
+       (($scope.formData.type === 'shop' || $scope.formData.type === 'company') && (!$scope.formData.category || !$scope.formData.category.id))) {
+      return $q.reject();
+    }
+
+    if (!hasWaitDebounce) {
+      console.debug('[ES] [page] Waiting debounce end, before saving...');
+      return $timeout(function() {
+        return $scope.save(silent, true);
+      }, 650);
+    }
+
+    $scope.saving = true;
+    console.debug('[ES] [page] Saving record...');
+
+    var showSuccessToast = function() {
+      if (!silent) {
+        // removeIf(no-device)
+        UIUtils.loading.hide();
+        // endRemoveIf(no-device)
+
+        return $translate('REGISTRY.INFO.RECORD_SAVED')
+          .then(function(message){
+            UIUtils.toast.show(message);
+          });
+      }
+    };
+
+    var promise = $q.when();
+    // removeIf(no-device)
+    if (!silent) {
+      promise = UIUtils.loading.show();
+    }
+    // endRemoveIf(no-device)
+
+    return promise
+      .then(function(){
+        var json = $scope.formData;
+        if (!$scope.needCategory()) {
+          delete json.category;
+        }
+        json.time = moment().utc().unix();
+
+        // geo point
+        if (json.geoPoint && json.geoPoint.lat && json.geoPoint.lon) {
+          json.geoPoint.lat =  parseFloat(json.geoPoint.lat);
+          json.geoPoint.lon =  parseFloat(json.geoPoint.lon);
+        }
+        else{
+          json.geoPoint = null;
+        }
+
+        // Social url must be unique in socials links - Fix #306:
+        if (json.socials && json.socials.length) {
+          json.socials = _.uniq(json.socials, false, function(social) {
+            return social.url;
+          });
+        }
+
+        // Pictures
+        json.picturesCount = $scope.pictures.length;
+        if (json.picturesCount > 0) {
+          json.pictures = $scope.pictures.reduce(function (res, pic) {
+            return res.concat({file: esHttp.image.toAttachment(pic)});
+          }, []);
+        }
+        else {
+          json.pictures = [];
+        }
+
+        // Avatar
+        if ($scope.avatar && $scope.avatar.src) {
+          return UIUtils.image.resizeSrc($scope.avatar.src, true) // resize to avatar
+            .then(function(imageSrc) {
+              json.avatar = esHttp.image.toAttachment({src: imageSrc});
+              return json;
+            });
+        }
+        else {
+          // Workaround to allow content deletion, because of a bug in the ES attachment-mapper:
+          // get error (in ES node) : MapperParsingException[No content is provided.] - AttachmentMapper.parse(AttachmentMapper.java:471
+          json.avatar = {
+            _content: '',
+            _content_type: ''
+          };
+          return json;
+        }
+      })
+      .then(function(json){
+        // Create
+        if (!$scope.id) {
+          return esRegistry.record.add(json, {wallet: wallet});
+        }
+        // Update
+        return esRegistry.record.update(json, {id: $scope.id, wallet: wallet});
+      })
+
+      .then(function(id) {
+        console.info("[ES] [page] Record successfully saved.");
+        if (!$scope.id && wallet.data.pages && wallet.data.pages.count) {
+          csWallet.data.pages.count++;
+        }
+        $scope.id = $scope.id || id;
+        $scope.saving = false;
+        $scope.dirty = false;
+
+        showSuccessToast();
+
+        $ionicHistory.clearCache($ionicHistory.currentView().stateId); // clear current view
+        $ionicHistory.nextViewOptions({historyRoot: true});
+        return $state.go('app.view_page', {id: $scope.id, refresh: true});
+      })
+
+      .catch(function(err) {
+        $scope.saving = false;
+        UIUtils.onError('REGISTRY.ERROR.SAVE_RECORD_FAILED')(err);
+      });
+  };
+
+  $scope.openPicturePopup = function() {
+    Device.camera.getPicture()
+    .then(function(imageData) {
+      if (imageData) {
+        $scope.pictures.push({src: "data:image/png;base64," + imageData});
+      }
+    })
+    .catch(UIUtils.onError('ERROR.TAKE_PICTURE_FAILED'));
+  };
+
+  $scope.rotateAvatar = function(){
+    if (!$scope.avatar || !$scope.avatar.src || $scope.rotating) return;
+
+    $scope.rotating = true;
+
+    return UIUtils.image.rotateSrc($scope.avatar.src)
+      .then(function(imageData){
+        $scope.avatar.src = imageData;
+        $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+        $scope.dirty = true;
+        $scope.rotating = false;
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.rotating = false;
+      });
+  };
+
+  $scope.fileChanged = function(event) {
+    UIUtils.loading.show();
+    return $q(function(resolve, reject) {
+      var file = event.target.files[0];
+      UIUtils.image.resizeFile(file)
+      .then(function(imageData) {
+        $scope.pictures.push({src: imageData});
+        UIUtils.loading.hide();
+        resolve();
+      });
+    });
+  };
+
+  $scope.removePicture = function(index){
+    $scope.pictures.splice(index, 1);
+  };
+
+  $scope.favoritePicture = function(index){
+    if (index > 0) {
+      var item = $scope.pictures[index];
+      $scope.pictures.splice(index, 1);
+      $scope.pictures.splice(0, 0, item);
+    }
+  };
+
+  $scope.cancel = function() {
+    $ionicHistory.goBack();
+  };
+
+  /* -- modals -- */
+  $scope.showAvatarModal = function() {
+    if (Device.camera.enable) {
+      return Device.camera.getPicture()
+        .then(function(imageData) {
+          if (!imageData) return;
+          $scope.avatar = {src: "data:image/png;base64," + imageData};
+          $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+          $scope.dirty = true;
+          $scope.avatarClass = {};
+        })
+        .catch(UIUtils.onError('ERROR.TAKE_PICTURE_FAILED'));
+    }
+    else {
+      return ModalUtils.show('plugins/es/templates/common/modal_edit_avatar.html','ESAvatarModalCtrl',
+        {})
+        .then(function(imageData) {
+          if (!imageData) return;
+          $scope.avatar = {src: imageData};
+          $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+          $scope.dirty = true;
+          $scope.avatarClass = {};
+        });
+    }
+  };
+
+  $scope.showRecordTypeModal = function() {
+    ModalUtils.show('plugins/es/templates/registry/modal_record_type.html')
+    .then(function(type){
+      if (type) {
+        $scope.formData.type = type;
+        if (!$scope.avatar) {
+          $scope.avatarClass['cion-page-' + type] = true;
+        }
+      }
+    });
+  };
+
+  $scope.showCategoryModal = function(parameters) {
+    // load categories
+    esRegistry.category.all()
+    .then(function(categories){
+      // open modal
+      return ModalUtils.show('plugins/es/templates/common/modal_category.html', 'ESCategoryModalCtrl as ctrl',
+             {categories: categories}, {focusFirstInput: true});
+    })
+    .then(function(cat){
+      if (cat && cat.parent) {
+        $scope.formData.category = cat;
+      }
+    });
+  };
+}
+
+
+ESViewEditProfileController.$inject = ['$scope', '$q', '$timeout', '$state', '$focus', '$translate', '$controller', '$ionicHistory', '$ionicPopover', 'UIUtils', 'csWallet', 'esHttp', 'esProfile', 'ModalUtils', 'Device'];angular.module('cesium.es.profile.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+
+    $stateProvider
+      .state('app.edit_profile', {
+        url: "/wallet/profile/edit",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/user/edit_profile.html",
+            controller: 'ESViewEditProfileCtrl'
+          }
+        },
+        cache: false,
+        data: {
+          auth: true
+        }
+      })
+
+      .state('app.edit_profile_by_id', {
+        url: "/wallets/:id/profile/edit",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/user/edit_profile.html",
+            controller: 'ESViewEditProfileCtrl'
+          }
+        },
+        cache: false,
+        data: {
+          login: true
+        }
+      });
+
+  }])
+
+ .controller('ESViewEditProfileCtrl', ESViewEditProfileController)
+
+
+;
+
+function ESViewEditProfileController($scope, $q, $timeout, $state, $focus, $translate, $controller,
+                                     $ionicHistory, $ionicPopover,
+                                     UIUtils, csWallet, esHttp, esProfile, ModalUtils, Device) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESPositionEditCtrl', {$scope: $scope}));
+
+  $scope.formData = {
+    title: null,
+    description: null,
+    socials: [],
+    geoPoint: null
+  };
+  $scope.loading = true;
+  $scope.dirty = false;
+  $scope.walletData = null;
+  $scope.avatar = null;
+  $scope.existing = false;
+  $scope.socialData = {
+    url: null
+  };
+  $scope.socialReorder = true;
+
+  var wallet;
+
+  $scope.enter = function(e, state) {
+
+    wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+    if (!wallet) {
+      UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+      return $scope.showHome();
+    }
+
+    $scope.walletId = wallet.id;
+
+    return wallet.auth({
+        minData: true
+      })
+      .then($scope.load)
+      .catch(function(err){
+        if (err == 'CANCELLED') {
+          UIUtils.loading.hide(10);
+          $scope.cancel();
+          return;
+        }
+        UIUtils.onError('PROFILE.ERROR.LOAD_PROFILE_FAILED')(err);
+      });
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {
+    if ($scope.dirty && !$scope.saving) {
+
+      // stop the change state action
+      event.preventDefault();
+
+      if (!$scope.loading) {
+        $scope.loading = true;
+        return UIUtils.alert.confirm('CONFIRM.SAVE_BEFORE_LEAVE',
+          'CONFIRM.SAVE_BEFORE_LEAVE_TITLE', {
+            cancelText: 'COMMON.BTN_NO',
+            okText: 'COMMON.BTN_YES_SAVE'
+          })
+          .then(function(confirmSave) {
+            $scope.loading = false;
+            if (confirmSave) {
+              $scope.form.$submitted=true;
+              return $scope.save(false/*silent*/, true/*haswait debounce*/)
+                .then(function(saved){
+                  if (saved) {
+                    $scope.dirty = false;
+                  }
+                  return saved; // change state only if not error
+                });
+            }
+            else {
+              $scope.dirty = false;
+              return true; // ok, change state
+            }
+          })
+          .then(function(confirmGo) {
+            if (confirmGo) {
+              // continue to the order state
+              $ionicHistory.nextViewOptions({
+                historyRoot: true
+              });
+              $state.go(next.name, nextParams);
+            }
+          })
+          .catch(function(err) {
+            // Silent
+          });
+      }
+    }
+  });
+
+  $scope.load = function(walletData) {
+    $scope.loading = true; // to avoid the call of doSave()
+    return esProfile.get(walletData.pubkey, {
+        raw: true
+      })
+      .then(function(profile) {
+        if (profile) {
+          $scope.avatar = esHttp.image.fromAttachment(profile.source.avatar);
+          $scope.existing = true;
+          $scope.updateView(walletData, profile.source);
+        }
+        else {
+          $scope.avatar = undefined;
+          $scope.existing = false;
+          $scope.updateView(walletData, {});
+        }
+
+        UIUtils.loading.hide();
+
+        // Update loading - done with a delay, to avoid trigger onFormDataChanged()
+        return $timeout(function() {
+          $scope.loading = false;
+        }, 1000);
+      })
+      .then(function() {
+        // removeIf(device)
+        $focus('profile-name');
+        // endRemoveIf(device)
+      })
+      .catch(UIUtils.onError('PROFILE.ERROR.LOAD_PROFILE_FAILED'));
+  };
+
+  $scope.setForm = function(form) {
+    $scope.form = form;
+  };
+
+  $scope.updateView = function(walletData, profile) {
+    $scope.walletData = walletData;
+    $scope.formData = profile;
+    if (profile.avatar) {
+      $scope.avatarStyle={'background-image':'url("'+$scope.avatar.src+'")'};
+    }
+    $scope.motion.show();
+  };
+
+  $scope.onFormDataChanged = function() {
+    if ($scope.loading) return;
+    $scope.dirty = true;
+  };
+  $scope.$watch('formData', $scope.onFormDataChanged, true);
+
+  $scope.save = function(silent, hasWaitDebounce) {
+    if($scope.form.$invalid || !$scope.walletData || ($scope.saving && !hasWaitDebounce)) {
+      return $q.reject();
+    }
+
+    if (!hasWaitDebounce) {
+      $scope.saving = true;
+      return $timeout(function() {
+        return $scope.save(silent, true);
+      }, 650);
+    }
+
+    console.debug('[ES] [profile] Saving user profile...');
+
+    // removeIf(no-device)
+    if (!silent) {
+      UIUtils.loading.show();
+    }
+    // endRemoveIf(no-device)
+
+    var onError = function(message) {
+      return function(err) {
+        $scope.saving = false;
+        UIUtils.onError(message)(err);
+      };
+    };
+
+    var updateWallet = function(formData) {
+      if (formData) {
+        $scope.walletData.name = formData.title;
+        if ($scope.avatar) {
+          $scope.walletData.avatar = $scope.avatar;
+        }
+        else {
+          delete $scope.walletData.avatar;
+        }
+
+        $scope.walletData.profile = angular.copy(formData);
+        $scope.walletData.profile.descriptionHtml = esHttp.util.parseAsHtml(formData.description);
+      }
+    };
+
+    var showSuccessToast = function() {
+      if (!silent) {
+        // removeIf(no-device)
+        UIUtils.loading.hide();
+        // endRemoveIf(no-device)
+
+        return $translate('PROFILE.INFO.PROFILE_SAVED')
+          .then(function(message){
+            UIUtils.toast.show(message);
+          });
+      }
+    };
+
+    var doFinishSave = function(formData) {
+      // Social url must be unique in socials links - Fix #306:
+      if (formData.socials && formData.socials.length) {
+        formData.socials = _.uniq(formData.socials, false, function(social) {
+          return social.url;
+        });
+      }
+
+      // Workaround for old data
+      if (formData.position) {
+        formData.position = null;
+      }
+
+      // Make sure to convert lat/lon to float
+      if (formData.geoPoint && formData.geoPoint.lat && formData.geoPoint.lon) {
+        formData.geoPoint.lat =  parseFloat(formData.geoPoint.lat);
+        formData.geoPoint.lon =  parseFloat(formData.geoPoint.lon);
+      }
+      else{
+        formData.geoPoint = null; // force to null, need by ES update request
+      }
+
+      if (!$scope.existing) {
+        return esProfile.add(formData, {wallet: wallet})
+          .then(function() {
+            console.info("[ES] [profile] Successfully created.");
+            $scope.existing = true;
+            $scope.saving = false;
+            $scope.dirty = false;
+            updateWallet(formData);
+            showSuccessToast();
+            return true;
+          })
+          .catch(onError('PROFILE.ERROR.SAVE_PROFILE_FAILED'));
+      }
+      else {
+        return esProfile.update(formData, {id: $scope.walletData.pubkey, wallet: wallet})
+          .then(function() {
+            console.info("[ES] Profile successfully updated.");
+            $scope.saving = false;
+            $scope.dirty = false;
+            updateWallet(formData);
+            showSuccessToast();
+            return true;
+          })
+          .catch(onError('PROFILE.ERROR.SAVE_PROFILE_FAILED'));
+      }
+    }; // end of doFinishSave
+
+    if ($scope.avatar && $scope.avatar.src) {
+      return UIUtils.image.resizeSrc($scope.avatar.src, true) // resize to thumbnail
+        .then(function(imageSrc) {
+          $scope.formData.avatar = esHttp.image.toAttachment({src: imageSrc});
+          return doFinishSave($scope.formData);
+        });
+    }
+    else {
+      delete $scope.formData.avatar;
+      return doFinishSave($scope.formData);
+    }
+  };
+
+  $scope.saveAndClose = function() {
+    return $scope.save()
+      .then(function(saved) {
+        if (saved) $scope.close();
+      });
+  };
+
+  $scope.submitAndSaveAndClose = function() {
+    $scope.form.$submitted=true;
+    $scope.saveAndClose();
+  };
+
+  $scope.cancel = function() {
+    $scope.dirty = false; // force not saved
+    if (wallet.isDefault()) {
+      $ionicHistory.nextViewOptions({
+        historyRoot: true
+      });
+      return $state.go('app.view_wallet');
+    }
+    else {
+      return $state.go('app.view_wallet_by_id', {id: wallet.id});
+    }
+  };
+
+  $scope.close = function() {
+    if (wallet.isDefault()) {
+      $ionicHistory.nextViewOptions({
+        historyRoot: true
+      });
+      return $state.go('app.view_wallet', {refresh: true});
+    }
+    else {
+      return $state.go('app.view_wallet_by_id', {refresh: true, id: wallet.id});
+    }
+  };
+
+  $scope.showAvatarModal = function() {
+    if (Device.camera.enable) {
+      return Device.camera.getPicture()
+        .then(function(imageData) {
+          if (!imageData) return;
+          $scope.avatar = {src: "data:image/png;base64," + imageData};
+          $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+          $scope.dirty = true;
+        })
+        .catch(UIUtils.onError('ERROR.TAKE_PICTURE_FAILED'));
+    }
+    else {
+      return ModalUtils.show('plugins/es/templates/common/modal_edit_avatar.html','ESAvatarModalCtrl',
+        {})
+        .then(function(imageData) {
+          if (!imageData) return;
+          $scope.avatar = {src: imageData};
+          $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+          $scope.dirty = true;
+        });
+    }
+  };
+
+  $scope.rotateAvatar = function(){
+    if (!$scope.avatar || !$scope.avatar.src || $scope.rotating) return;
+
+    $scope.rotating = true;
+
+    return UIUtils.image.rotateSrc($scope.avatar.src)
+      .then(function(imageData){
+        $scope.avatar.src = imageData;
+        $scope.avatarStyle={'background-image':'url("'+imageData+'")'};
+        $scope.dirty = true;
+        $scope.rotating = false;
+      })
+      .catch(function(err) {
+        console.error(err);
+        $scope.rotating = false;
+      });
+  };
+
+  $scope.removeProfile = function(){
+    // Hide popover if need
+    $scope.hideActionsPopover();
+
+    return $scope.existing && wallet.auth({minData: true})
+        .then(function(walletData) {
+
+          UIUtils.loading.hide();
+          UIUtils.alert.confirm('PROFILE.CONFIRM.DELETE', undefined, {okText: 'COMMON.BTN_DELETE'})
+            .then(function(confirm) {
+              if (confirm){
+
+                console.debug('[ES] [profile] Deleting user profile...');
+                // removeIf(no-device)
+                UIUtils.loading.show();
+                // endRemoveIf(no-device)
+                return esProfile.remove(walletData.pubkey, {wallet: wallet})
+                  .then(function () {
+                    if (wallet.isDefault()) {
+                      walletData.name=null; // keep local name, on children wallets
+                    }
+                    walletData.profile = null;
+                    walletData.avatar = null;
+                    console.debug('[ES] [profile] Successfully deleted');
+                    $scope.dirty = false;
+                    return $scope.close();
+                  })
+                  .then(function() {
+                    return $timeout(function() {
+                      UIUtils.toast.show('PROFILE.INFO.PROFILE_REMOVED');
+                    }, 750);
+                  })
+                  .catch(UIUtils.onError('PROFILE.ERROR.REMOVE_PROFILE_FAILED'));
+              }
+            });
+        });
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/user/edit_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+}
+
+
+
+
+ESMessageAbstractListController.$inject = ['$scope', '$state', '$translate', '$ionicHistory', '$ionicPopover', '$timeout', 'csWallet', 'esModals', 'UIUtils', 'esMessage'];
+ESMessageInboxListController.$inject = ['$scope', '$controller'];
+ESMessageOutboxListController.$inject = ['$scope', '$controller'];
+ESMessageComposeController.$inject = ['$scope', '$controller'];
+ESMessageComposeModalController.$inject = ['$scope', 'Modals', 'UIUtils', 'csWallet', 'esHttp', 'esMessage', 'parameters'];
+ESMessageViewController.$inject = ['$scope', '$state', '$timeout', '$translate', '$ionicHistory', '$ionicPopover', 'UIUtils', 'esModals', 'esMessage', 'csWallet'];
+PopoverMessageController.$inject = ['$scope', 'UIUtils', '$state', 'csWallet', 'esHttp', 'esMessage', 'esModals', '$timeout'];angular.module('cesium.es.message.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.user_message', {
+        url: "/user/message",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup.html"
+          }
+        }
+      })
+
+      .state('app.user_message.tab_inbox', {
+        url: "/inbox",
+        views: {
+          'tab_inbox': {
+            controller: 'ESMessageInboxListCtrl',
+            templateUrl: "plugins/es/templates/message/tabs/tab_list.html"
+          }
+        },
+        data: {
+          auth: true,
+          minData: true,
+          large: 'app.user_messages_lg_inbox'
+        }
+      })
+
+      .state('app.user_message.tab_outbox', {
+        url: "/outbox",
+        views: {
+          'tab_outbox': {
+            controller: 'ESMessageOutboxListCtrl',
+            templateUrl: "plugins/es/templates/message/tabs/tab_list.html"
+          }
+        },
+        data: {
+          auth: true,
+          minData: true,
+          large: 'app.user_messages_lg_outbox'
+        }
+      })
+
+      .state('app.user_messages_lg_inbox', {
+        url: "/user/message/lg/inbox",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup_lg.html",
+            controller: 'ESMessageInboxListCtrl'
+          }
+        },
+        data: {
+          auth: true,
+          minData: true
+        }
+      })
+
+      .state('app.user_messages_by_id', {
+        url: "/wallets/:id/message",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup_by_id.html"
+          }
+        }
+      })
+
+      .state('app.user_messages_by_id.tab_inbox', {
+        url: "/inbox",
+        views: {
+          'tab_inbox': {
+            controller: 'ESMessageInboxListCtrl',
+            templateUrl: "plugins/es/templates/message/tabs/tab_list.html"
+          }
+        },
+        data: {
+          large: 'app.user_messages_lg_inbox_by_id'
+        }
+      })
+
+      .state('app.user_messages_by_id.tab_outbox', {
+        url: "/outbox",
+        views: {
+          'tab_outbox': {
+            controller: 'ESMessageOutboxListCtrl',
+            templateUrl: "plugins/es/templates/message/tabs/tab_list.html"
+          }
+        },
+        data: {
+          large: 'app.user_messages_lg_outbox_by_id'
+        }
+      })
+
+      .state('app.user_messages_lg_inbox_by_id', {
+        url: "/wallets/:id/message/lg/inbox",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup_lg.html",
+            controller: 'ESMessageInboxListCtrl'
+          }
+        }
+      })
+
+      .state('app.user_messages_lg_outbox', {
+        url: "/user/message/lg/outbox",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup_lg.html",
+            controller: 'ESMessageOutboxListCtrl'
+          }
+        },
+        data: {
+          auth: true,
+          minData: true
+        }
+      })
+
+      .state('app.user_messages_lg_outbox_by_id', {
+        url: "/wallets/:id/message/lg/outbox",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/lookup_lg.html",
+            controller: 'ESMessageOutboxListCtrl'
+          }
+        }
+      })
+
+      .state('app.user_new_message', {
+        cache: false,
+        url: "/user/message/new?pubkey&uid&title&content&isReply",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/compose.html",
+            controller: 'ESMessageComposeCtrl'
+          }
+        }
+      })
+
+      .state('app.user_view_message', {
+        cache: false,
+        url: "/user/message/view/:type/:messageId",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/view_message.html",
+            controller: 'ESMessageViewCtrl'
+          }
+        },
+        data: {
+          auth: true,
+          minData: true
+        }
+      })
+
+      .state('app.user_view_message_by_id', {
+        cache: false,
+        url: "/wallets/:id/message/view/:type/:messageId",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/message/view_message.html",
+            controller: 'ESMessageViewCtrl'
+          }
+        }
+      })
+
+    ;
+  }])
+
+  .controller('ESMessageAbstractListCtrl', ESMessageAbstractListController)
+
+  .controller('ESMessageInboxListCtrl', ESMessageInboxListController)
+
+  .controller('ESMessageOutboxListCtrl', ESMessageOutboxListController)
+
+  .controller('ESMessageComposeCtrl', ESMessageComposeController)
+
+  .controller('ESMessageComposeModalCtrl', ESMessageComposeModalController)
+
+  .controller('ESMessageViewCtrl', ESMessageViewController)
+
+  .controller('PopoverMessageCtrl', PopoverMessageController)
+
+;
+
+function ESMessageAbstractListController($scope, $state, $translate, $ionicHistory, $ionicPopover, $timeout,
+                                 csWallet, esModals, UIUtils, esMessage) {
+  'ngInject';
+
+  var defaultSearchLimit = 40;
+  var wallet;
+  var selectPrevented = false;
+
+  $scope.search = {
+    loading: true,
+    results: [],
+    hasMore : false,
+    loadingMore : false,
+    limit: defaultSearchLimit,
+    type: 'last',
+    text: null,
+    options: {
+    }
+  };
+
+  $scope.fabButtonNewMessageId = undefined;
+
+  $scope.enter = function(s, state) {
+    // First enter
+    if ($scope.search.loading) {
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      $scope.isDefaultWallet = wallet.isDefault();
+      $scope.walletId = wallet.id;
+
+      wallet.auth({minData: true})
+        .then(function() {
+          if (!$scope.entered) {
+            $scope.entered = true;
+            $scope.type = $scope.type || state.stateParams && state.stateParams.type || 'inbox';
+            $scope.load();
+          }
+
+          if ($scope.fabButtonNewMessageId) {
+            $scope.showFab($scope.fabButtonNewMessageId);
+          }
+        })
+        .catch(function(err) {
+          if ('CANCELLED' === err) {
+            $ionicHistory.nextViewOptions({
+              historyRoot: true
+            });
+            $scope.showHome();
+          }
+      });
+    }
+    // Not first entering: refresh the view
+    else {
+      $scope.updateView();
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function(from, size, silent) {
+
+    var options = angular.copy($scope.search.options);
+    options.from = options.from || from || 0;
+    options.size = options.size || size || defaultSearchLimit;
+    options.type = $scope.type;
+    options.summary = false;
+    options.filter = ($scope.search.type == 'text' && $scope.search.text && $scope.search.text.trim().length > 0) ?
+      $scope.search.text : undefined;
+    options.wallet = wallet;
+
+    $scope.search.loading = !silent;
+    return esMessage.load(options)
+      .then(function(res) {
+
+        if (!options.from) {
+          $scope.search.results = res || [];
+        }
+        else if (res){
+          $scope.search.results = $scope.search.results.concat(res);
+        }
+
+        UIUtils.loading.hide();
+        $scope.search.loading = false;
+        $scope.search.hasMore = ($scope.search.results && $scope.search.results.length >= $scope.search.limit);
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        if (!options.from) {
+          $scope.search.results = [];
+        }
+        $scope.search.hasMore = false;
+        UIUtils.onError('MESSAGE.ERROR.LOAD_MESSAGES_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function() {
+    if ($scope.motion && $scope.motion.ionListClass && $scope.search.results.length) {
+      $scope.motion.show({selector: '.view-messages .list .item'});
+    }
+    $scope.$broadcast('$$rebind::rebind'); // notifier binder
+  };
+
+  $scope.showMore = function() {
+    $scope.search.limit = $scope.search.limit || defaultSearchLimit;
+    $scope.search.limit += defaultSearchLimit;
+    if ($scope.search.limit < defaultSearchLimit) {
+      $scope.search.limit = defaultSearchLimit;
+    }
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.search.limit,
+      true /*silent*/)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.markAllAsRead = function() {
+    $scope.hideActionsPopover();
+    if (!$scope.search.results || !$scope.search.results.length) return;
+
+    UIUtils.alert.confirm('MESSAGE.CONFIRM.MARK_ALL_AS_READ')
+      .then(function(confirm) {
+        if (confirm) {
+          esMessage.markAllAsRead()
+            .then(function () {
+              _.forEach($scope.search.results, function(msg){
+                msg.read = true;
+              });
+            })
+            .catch(UIUtils.onError('MESSAGE.ERROR.MARK_ALL_AS_READ_FAILED'));
+        }
+      });
+  };
+
+  $scope.delete = function(index) {
+    var message = $scope.search.results[index];
+    if (!message) return;
+
+    UIUtils.alert.confirm('MESSAGE.CONFIRM.REMOVE')
+      .then(function(confirm) {
+        if (confirm) {
+          esMessage.remove(message.id, $scope.type, {walletId: $scope.walletId})
+            .then(function () {
+              $scope.search.results.splice(index,1); // remove from messages array
+              $scope.updateView();
+              UIUtils.toast.show('MESSAGE.INFO.MESSAGE_REMOVED');
+            })
+            .catch(UIUtils.onError('MESSAGE.ERROR.REMOVE_MESSAGE_FAILED'));
+        }
+      });
+  };
+
+  $scope.deleteAll = function() {
+    $scope.hideActionsPopover();
+    if (!$scope.search.results || !$scope.search.results.length) return;
+
+    UIUtils.alert.confirm('MESSAGE.CONFIRM.REMOVE_ALL')
+      .then(function(confirm) {
+        if (confirm) {
+          esMessage.removeAll($scope.type, {walletId: $scope.walletId})
+            .then(function () {
+              $scope.search.results.splice(0,$scope.search.results.length); // reset array
+              $scope.updateView();
+              UIUtils.toast.show('MESSAGE.INFO.All_MESSAGE_REMOVED');
+            })
+            .catch(UIUtils.onError('MESSAGE.ERROR.REMOVE_All_MESSAGES_FAILED'));
+        }
+      });
+  };
+
+  $scope.doSearchLast = function() {
+    $scope.search.type='last';
+    $scope.search.loadingMore=false;
+    $scope.search.limit = defaultSearchLimit;
+    return $scope.load();
+  };
+
+  $scope.doSearch = function() {
+    if (!$scope.search.text || $scope.search.text.length < 3) {
+      return;
+    }
+    $scope.search.type='text';
+    $scope.search.loadingMore=false;
+    $scope.search.results = [];
+    $scope.search.limit = defaultSearchLimit;
+
+    console.debug('[message] [{0}] Searching for: {1}'.format($scope.type, $scope.search.text));
+    return $scope.load();
+  };
+
+
+  $scope.refresh = function(silent) {
+    selectPrevented = true; // Will disable select() to open the message
+    return $scope.load(undefined, undefined, silent)
+      .then(function() {
+        selectPrevented = false;
+      })
+      .catch(function() {
+        selectPrevented = false;
+      });
+  };
+
+  $scope.select = function(message, event) {
+    if (event.isDefaultPrevented() || $scope.search.loading || selectPrevented) return; // skip
+
+    // Add a timeout, to be sure the refres action was not called before
+    return $timeout(function() {
+      if (selectPrevented || event.isDefaultPrevented()) return; // skip
+      event.preventDefault();
+
+      if ($scope.walletId === 'default') {
+        return $state.go('app.user_view_message', {type: $scope.type, messageId:message.id});
+      }
+      else {
+        return $state.go('app.user_view_message_by_id', {type: $scope.type, messageId:message.id, id: $scope.walletId});
+      }
+    }, 200);
+  };
+
+  /* -- Modals -- */
+
+  $scope.showNewMessageModal = function(parameters) {
+    return wallet.login({minData: true})
+      .then(function() {
+        UIUtils.loading.hide();
+
+        parameters = parameters || {};
+        parameters.wallet = $scope.walletId;
+
+        return esModals.showMessageCompose(parameters)
+          .then(function(id) {
+            if (id) UIUtils.toast.show('MESSAGE.INFO.MESSAGE_SENT');
+          });
+      });
+  };
+
+  $scope.showReplyModal = function(index) {
+    var message = $scope.search.results[index];
+    if (!message) return;
+
+    $translate('MESSAGE.REPLY_TITLE_PREFIX')
+      .then(function (prefix) {
+        var content = message.content ? message.content.replace(/^/g, ' > ') : null;
+        content = content ? content.replace(/\n/g, '\n > ') : null;
+        content = content ? content +'\n' : null;
+        return esModals.showMessageCompose({
+          destPub: message.issuer,
+          destUid: message.name||message.uid,
+          title: prefix + message.title,
+          content: content,
+          isReply: true,
+          wallet: $scope.walletId
+        });
+      })
+      .then(function(sent) {
+        if (sent) UIUtils.toast.show('MESSAGE.INFO.MESSAGE_SENT');
+      });
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/message/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- watch events (delete, received, sent) -- */
+
+  // Message deletion
+  $scope.onMessageDelete = function(id) {
+    var index = _.findIndex($scope.search.results, function(msg) {
+      return msg.id == id;
+    });
+    if (index) {
+      $scope.search.results.splice(index,1); // remove from messages array
+    }
+    $scope.updateView();
+  };
+  esMessage.api.data.on.delete($scope, $scope.onMessageDelete);
+
+  // Watch user sent message
+  $scope.onNewOutboxMessage = function(id) {
+    if ($scope.type !== 'outbox') return;
+    // Add message sent to list
+    $scope.search.loading = true;
+    return $timeout(function() {
+       // Load the message sent
+        return esMessage.get(id, $scope.type, {summary: true, wallet: wallet});
+      }, 500 /*waiting ES propagation*/)
+      .then(function(msg) {
+        $scope.search.results.splice(0,0,msg);
+        $scope.search.loading = false;
+        $scope.updateView();
+      })
+      .catch(function() {
+        $scope.loading = false;
+      });
+  };
+  esMessage.api.data.on.sent($scope, $scope.onNewOutboxMessage);
+
+  // Watch received message
+  $scope.onNewInboxMessage = function(notification) {
+    if ($scope.type !== 'inbox' || !$scope.entered || !wallet.isUserPubkey(notification.issuer)) return;
+    // Add message sent to list
+    $scope.search.loading = true;
+    // Load the the message
+    return esMessage.get(notification.id, $scope.type, {summary: true, wallet: wallet})
+      .then(function(msg) {
+        $scope.search.results.splice(0,0,msg);
+        $scope.search.loading = false;
+        $scope.updateView();
+      })
+      .catch(function() {
+        $scope.search.loading = false;
+      });
+  };
+  esMessage.api.data.on.new($scope, $scope.onNewInboxMessage);
+
+  // Watch unauth
+  $scope.onUnauth = function() {
+    // Reset all data
+    $scope.search.results = undefined;
+    $scope.search.loading = false;
+    $scope.entered = false;
+  };
+  csWallet.api.data.on.unauth($scope, $scope.onUnauth);
+
+  // for DEV only
+  /*$timeout(function() {
+    $scope.showNewMessageModal();
+   }, 900);
+   */
+}
+
+function ESMessageInboxListController($scope, $controller) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESMessageAbstractListCtrl', {$scope: $scope}));
+
+  $scope.type = 'inbox';
+  $scope.fabButtonNewMessageId = 'fab-add-message-record-inbox';
+
+}
+
+
+function ESMessageOutboxListController($scope, $controller) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESMessageAbstractListCtrl', {$scope: $scope}));
+
+  $scope.type = 'outbox';
+  $scope.fabButtonNewMessageId = 'fab-add-message-record-outbox';
+}
+
+function ESMessageComposeController($scope, $controller) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESMessageComposeModalCtrl', {$scope: $scope, parameters: {}}));
+
+
+  $scope.enter = function(e, state) {
+
+    // Apply state parameters
+    if (state && state.stateParams) {
+      $scope.setParameters(state.stateParams);
+    }
+
+    // Load wallet
+    return $scope.load()
+      .then(UIUtils.loading.hide);
+  };
+  $scope.$on('$ionicView.enter',$scope.enter);
+
+  $scope.cancel = function() {
+    $scope.sending = false;
+    $scope.showHome();
+  };
+
+  $scope.setForm = function(form) {
+    $scope.form = form;
+  };
+
+  $scope.closeModal = function() {
+    $scope.sending = false;
+    $scope.showHome();
+  };
+
+}
+
+function ESMessageComposeModalController($scope, Modals, UIUtils, csWallet, esHttp, esMessage, parameters) {
+  'ngInject';
+
+  var wallet;
+
+  $scope.formData = {
+    title: null,
+    content: null,
+    destPub: null,
+    walletId: null
+  };
+  $scope.destUid = null;
+  $scope.destPub = null;
+  $scope.isReply = false;
+  $scope.enableSelectWallet = true;
+  $scope.sending = false;
+
+  $scope.setParameters = function(parameters) {
+    if (!parameters) return;
+
+    if (parameters.pubkey || parameters.destPub) {
+      $scope.formData.destPub = parameters.pubkey || parameters.destPub;
+      if (parameters.uid || parameters.destUid) {
+        $scope.destUid = parameters.uid || parameters.destUid;
+        $scope.destPub = '';
+      }
+      else {
+        $scope.destUid = '';
+        $scope.destPub = $scope.formData.destPub;
+      }
+    }
+
+    if (parameters.title) {
+      $scope.formData.title = parameters.title;
+    }
+
+    if (parameters.content) {
+      $scope.formData.content = parameters.content;
+    }
+
+    $scope.isReply = parameters.isReply || false;
+
+    if (parameters.wallet) {
+      $scope.formData.walletId = parameters.wallet;
+    }
+  };
+
+  // Read default parameters
+  $scope.setParameters(parameters);
+
+  $scope.load = function() {
+    $scope.enableSelectWallet = csWallet.children.count() > 0;
+
+    wallet = $scope.enableSelectWallet && ($scope.formData.walletId ? csWallet.children.get($scope.formData.walletId) : csWallet) || csWallet;
+    if (!wallet.isDefault()) {
+      console.debug("[message] Using {" + wallet.id + "} wallet");
+    }
+    else {
+      console.debug("[message] Using default wallet");
+    }
+
+    return wallet.login({minData: true, silent: true})
+      .then(function(data) {
+        $scope.walletData = data;
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') {
+          $scope.cancel();
+        }
+      });
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  $scope.doSend = function(forceNoContent) {
+    $scope.form.$submitted=true;
+    if(!$scope.form.$valid) {
+      return;
+    }
+
+    // Ask user confirmation if no content
+    if (!forceNoContent && (!$scope.formData.content || !$scope.formData.content.trim().length)) {
+      return UIUtils.alert.confirm('MESSAGE.COMPOSE.CONTENT_CONFIRMATION')
+        .then(function(confirm) {
+          if (confirm) {
+            $scope.doSend(true);
+          }
+        });
+    }
+
+    $scope.sending = true;
+    UIUtils.loading.show();
+    var data = {
+      issuer: wallet.data.pubkey,
+      recipient: $scope.formData.destPub,
+      title: $scope.formData.title,
+      content: $scope.formData.content,
+      time: moment().utc().unix()
+    };
+
+    esMessage.send(data, {wallet: wallet})
+      .then(function(id) {
+        $scope.id=id;
+        UIUtils.loading.hide();
+        $scope.closeModal(id);
+      })
+      .catch(function(err) {
+        $scope.sending = false;
+        // silent, if user cancelled;
+        if (err === 'CANCELLED') {
+          UIUtils.loading.hide();
+          return;
+        }
+        UIUtils.onError('MESSAGE.ERROR.SEND_MSG_FAILED')(err);
+      });
+  };
+
+
+  $scope.cancel = function() {
+    $scope.closeModal();
+  };
+
+  /* -- Modals -- */
+
+  $scope.showWotLookupModal = function() {
+    Modals.showWotLookup()
+      .then(function(result){
+        if (result) {
+          if (result.uid) {
+            $scope.destUid = result.uid;
+            $scope.destPub = '';
+          }
+          else {
+            $scope.destUid = '';
+            $scope.destPub = result.pubkey;
+          }
+          $scope.destName = result.name || result.uid;
+          $scope.formData.destPub = result.pubkey;
+          // TODO focus on title field
+          //$focus('');
+        }
+      });
+  };
+
+  $scope.showSelectWalletModal = function() {
+    if (!$scope.enableSelectWallet) return;
+
+    return Modals.showSelectWallet({
+      showDefault: true,
+      showBalance: false
+    })
+      .then(function(newWallet) {
+        if (!newWallet || (wallet && wallet.id === newWallet.id)) return;
+        wallet = newWallet;
+        $scope.walletData = wallet.data;
+        console.debug("[message] Using {" + wallet.id + "} wallet");
+      });
+  };
+
+
+
+  // TODO : for DEV only
+  /*$timeout(function() {
+    $scope.formData.destPub = 'G2CBgZBPLe6FSFUgpx2Jf1Aqsgta6iib3vmDRA1yLiqU';
+    $scope.formData.title = 'test';
+    $scope.formData.content = 'test';
+    $scope.destPub = $scope.formData.destPub;
+
+    $timeout(function() {
+      //$scope.doSend();
+    }, 800);
+  }, 100);
+  */
+}
+
+
+function ESMessageViewController($scope, $state, $timeout, $translate, $ionicHistory, $ionicPopover,
+                                 UIUtils, esModals, esMessage, csWallet) {
+  'ngInject';
+
+  $scope.formData = {};
+  $scope.id = null;
+  $scope.loading = true;
+
+  var wallet;
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.enter = function(e, state) {
+    // First enter
+    if ($scope.loading) {
+
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      $scope.isDefaultWallet = wallet.isDefault();
+      $scope.walletId = wallet.id;
+
+      var messageId = state.stateParams && state.stateParams.messageId;
+      $scope.type = state.stateParams.type || 'inbox';
+
+      // No message id: redirect
+      if (angular.isUndefined(messageId)) {
+        $scope.goBack();
+        return;
+      }
+
+      wallet.auth({minData: true})
+        .then(function () {
+          return $scope.load(messageId, $scope.type);
+        })
+        .then(function(message) {
+
+          UIUtils.loading.hide();
+          if (!message) return; // SKip
+
+          $scope.updateView(message);
+          $scope.showFab('fab-view-message-reply');
+
+          // Mark as read
+          if (!message.read) {
+            $timeout(function() {
+              // Message has NOT changed
+              if ($scope.id === message.id) {
+                esMessage.markAsRead(message, {type: $scope.type, wallet: wallet})
+                  .then(function() {
+                    console.debug("[message] marked as read");
+                  })
+                  .catch(UIUtils.onError('MESSAGE.ERROR.MARK_AS_READ_FAILED'));
+              }
+            }, 2000); // 2s
+          }
+        });
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function(id, type) {
+    type = type || 'inbox';
+    return esMessage.get(id, type, {wallet: wallet})
+      .catch(UIUtils.onError('MESSAGE.ERROR.LOAD_MESSAGE_FAILED'))
+      .then(function(message) {
+        if (!message.valid) {
+          return UIUtils.alert.error(!$scope.isUserPubkey(message.recipient) ? 'MESSAGE.ERROR.USER_NOT_RECIPIENT' : 'MESSAGE.ERROR.NOT_AUTHENTICATED_MESSAGE',
+            'MESSAGE.ERROR.MESSAGE_NOT_READABLE')
+            .then(function () {
+              $scope.goBack(true/*clear cache*/);
+            });
+        }
+        return message;
+      });
+  };
+
+  $scope.updateView = function(message) {
+    $scope.loading = false;
+    $scope.id = message.id;
+    $scope.formData = message;
+    $scope.canDelete = true;
+    $scope.motion.show({selector: '.view-message .list .item'});
+  };
+
+  $scope.delete = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+    }
+
+    UIUtils.alert.confirm('MESSAGE.CONFIRM.REMOVE')
+      .then(function(confirm) {
+        if (confirm) {
+          return esMessage.remove($scope.id, $scope.type, {wallet: wallet})
+            .then(function () {
+              $scope.goBack(true/*clear page cache*/);
+              UIUtils.toast.show('MESSAGE.INFO.MESSAGE_REMOVED');
+            })
+            .catch(UIUtils.onError('MESSAGE.ERROR.REMOVE_MESSAGE_FAILED'));
+        }
+      });
+  };
+
+  $scope.goBack = function(clearPageCache) {
+    if (clearPageCache) {
+      $ionicHistory.clearCache($ionicHistory.currentView().stateId); // clear current view
+    }
+    $ionicHistory.nextViewOptions({historyRoot: true});
+    if ($scope.isDefaultWallet) {
+      if ($scope.type) {
+        $state.go('app.user_message.tab_' + $scope.type, {type: $scope.type});
+      }
+    }
+    else {
+      if ($scope.type) {
+        $state.go('app.user_messages_by_id.tab_' + $scope.type, {type: $scope.type, id: $scope.walletId});
+      }
+    }
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/message/view_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- Modals -- */
+
+  $scope.showReplyModal = function() {
+    var recipientField = ($scope.type === 'inbox') ? 'issuer' : 'recipient';
+    $translate('MESSAGE.REPLY_TITLE_PREFIX')
+      .then(function (prefix) {
+        var content = $scope.formData.content ? $scope.formData.content.replace(/^/g, ' > ') : null;
+        content = content ? content.replace(/\n/g, '\n > ') : null;
+        content = content ? content +'\n' : null;
+        return esModals.showMessageCompose({
+            destPub: $scope.formData[recipientField],
+            destUid: $scope.formData.name||$scope.formData.uid,
+            title: prefix + $scope.formData.title,
+            content: content,
+            isReply: true,
+            walletId: wallet.id
+          });
+      })
+      .then(function(sent) {
+        if (sent) {
+          UIUtils.toast.show('MESSAGE.INFO.MESSAGE_SENT')
+            .then(function() {
+              $ionicHistory.goBack();
+            });
+        }
+      })
+    ;
+  };
+}
+
+function PopoverMessageController($scope, UIUtils, $state, csWallet, esHttp, esMessage, esModals, $timeout) {
+  'ngInject';
+
+  var defaultSearchLimit = 40;
+  var wallet;
+
+  $scope.search = {
+    loading : true,
+    results: null,
+    hasMore : false,
+    loadingMore : false,
+    limit: defaultSearchLimit
+  };
+
+  $scope.$on('popover.shown', function() {
+    if ($scope.search.loading) {
+      // TODO manage secondary wallets
+      wallet = $scope.walletId && csWallet.children.get($scope.walletId) || csWallet;
+
+      /* -- wallet listeners -- */
+      if (wallet.isDefault()) {
+        wallet.api.data.on.logout($scope, $scope.resetData);
+        esMessage.api.data.on.new($scope, $scope.onNewMessageNotification);
+      }
+
+      $scope.load();
+    }
+  });
+
+  $scope.load = function(from, size) {
+    var options = {};
+    options.from = from || 0;
+    options.size = size || defaultSearchLimit;
+    return esMessage.notifications.load(options)
+      .then(function(notifications) {
+        if (!from) {
+          $scope.search.results = notifications;
+        }
+        else {
+          $scope.search.results = $scope.search.results.concat(notifications);
+        }
+        $scope.search.loading = false;
+        $scope.search.hasMore = ($scope.search.results && $scope.search.results.length >= $scope.search.limit);
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        if (!from) {
+          $scope.search.results = [];
+        }
+        $scope.search.hasMore = false;
+        UIUtils.onError('MESSAGE.ERROR.LOAD_NOTIFICATIONS_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function() {
+    if ($scope.motion && $scope.search.results && $scope.search.results.length) {
+      $scope.motion.show({selector: '.popover-notification .item'});
+    }
+  };
+
+  $scope.showMore = function() {
+    $scope.search.limit = $scope.search.limit || defaultSearchLimit;
+    $scope.search.limit = $scope.search.limit * 2;
+    if ($scope.search.limit < defaultSearchLimit) {
+      $scope.search.limit = defaultSearchLimit;
+    }
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.search.limit)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  // Listen notifications changes
+  $scope.onNewMessageNotification = function(notification) {
+    if ($scope.search.loading || $scope.search.loadingMore) return;
+
+    if (!wallet.isUserPubkey(notification.issuer)) return; // skip
+
+    // Prepend to list
+    $scope.search.results.splice(0,0,notification);
+    $scope.updateView();
+  };
+
+  $scope.select = function(notification) {
+    if (!notification.read) notification.read = true;
+    if ($scope.walletId === 'default') {
+      $state.go('app.user_view_message', {messageId: notification.id});
+    }
+    else {
+      $state.go('app.user_view_message_by_id', {messageId: notification.id, id: $scope.walletId});
+    }
+    $scope.closePopover(notification);
+  };
+
+  $scope.resetData = function() {
+    if ($scope.search.loading) return;
+    console.debug("[ES] [messages] Resetting data (settings or account may have changed)");
+    $scope.search.hasMore = false;
+    $scope.search.results = [];
+    $scope.search.loading = true;
+    delete $scope.search.limit;
+  };
+
+
+  /* -- Modals -- */
+
+  $scope.showNewMessageModal = function(parameters) {
+
+    $scope.closePopover();
+
+    $timeout(function() {
+      parameters = parameters || {};
+      parameters.walletId = wallet.id;
+
+      esModals.showMessageCompose(parameters)
+        .then(function(id) {
+          if (id) UIUtils.toast.show('MESSAGE.INFO.MESSAGE_SENT');
+        });
+    }, 500); // Timeout need, to avoid freeze
+  };
+
+  /* -- listeners -- */
+
+  esHttp.api.node.on.stop($scope, $scope.resetData);
+  esHttp.api.node.on.start($scope, $scope.load);
+
+}
+
+
+NotificationsController.$inject = ['$scope', '$ionicPopover', '$state', '$timeout', 'UIUtils', 'esHttp', 'csWallet', 'esNotification'];
+PopoverNotificationsController.$inject = ['$scope', '$timeout', '$controller', '$state', 'UIUtils', 'csWallet'];
+angular.module('cesium.es.notification.controllers', ['cesium.es.services'])
+
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.view_notifications', {
+        url: "/notifications",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/notification/view_notifications.html",
+            controller: 'NotificationsCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+      .state('app.view_notifications_by_id', {
+        url: "/wallets/:id/notifications",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/notification/view_notifications.html",
+            controller: 'NotificationsCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+    ;
+  }])
+
+  .controller('NotificationsCtrl', NotificationsController)
+
+  .controller('PopoverNotificationsCtrl', PopoverNotificationsController)
+
+;
+
+function NotificationsController($scope, $ionicPopover, $state, $timeout, UIUtils, esHttp, csWallet, esNotification) {
+  'ngInject';
+
+  var defaultSearchLimit = 40;
+
+  $scope.preventSelect = false;
+  $scope.search = {
+    loading : true,
+    results: null,
+    hasMore : false,
+    loadingMore : false,
+    limit: defaultSearchLimit,
+    options: {
+      codes: {
+        excludes: esNotification.constants.EXCLUDED_CODES
+      }
+    }
+  };
+  $scope.listeners = [];
+
+  var wallet;
+
+  $scope.setWallet = function(aWallet) {
+    wallet = aWallet;
+  };
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if ($scope.search.loading) {
+
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      wallet.login({
+        minData: true
+      })
+        .then(function() {
+          $scope.load();
+          UIUtils.loading.hide();
+
+          $scope.addListeners();
+
+          // Reset unread counter
+          return $timeout(function() {
+            $scope.resetUnreadCount();
+          }, 1000);
+        });
+    }
+  });
+
+  $scope.refresh = function(silent) {
+    return $scope.load(undefined, undefined, silent);
+  };
+
+  $scope.load = function(from, size, silent) {
+    // Make sure wallet is init (need by PopoverInvitationCtrl)
+    wallet = wallet || csWallet;
+
+    if (!wallet.data.pubkey) {
+      $scope.search.loading = true;
+      return;
+    }
+
+    $scope.search.preventSelect = true;
+
+    var options = angular.copy($scope.search.options);
+    options.from = options.from || from || 0;
+    options.size = options.size || size || defaultSearchLimit;
+    options.pubkey = wallet.data.pubkey;
+    $scope.search.loading = !silent;
+    return esNotification.load(options)
+      .then(function(res) {
+        if (!options.from) {
+          $scope.search.results = res || [];
+        }
+        else if (res){
+          $scope.search.results = $scope.search.results.concat(res);
+        }
+        $scope.search.loading = false;
+        $scope.search.preventSelect = false;
+        $scope.search.hasMore = $scope.search.results.length >= $scope.search.limit;
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        if (!options.from) {
+          $scope.search.results = [];
+        }
+        $scope.search.preventSelect = false;
+        $scope.search.hasMore = false;
+        UIUtils.onError('COMMON.NOTIFICATIONS.LOAD_NOTIFICATIONS_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function() {
+    if ($scope.motion && $scope.motion.ionListClass && $scope.search.results.length) {
+      $scope.motion.show({selector: '.view-notification .item'});
+    }
+  };
+
+  $scope.markAllAsRead = function() {
+    $scope.hideActionsPopover();
+
+    // Make sure to be auth before doing this
+    if (!wallet.isAuth()) {
+      return wallet.auth().then(function(){
+        UIUtils.loading.hide();
+        return $scope.markAllAsRead(); // loop
+      });
+    }
+
+    if (!$scope.search.results.length) return;
+
+    UIUtils.loading.show()
+      .then(function() {
+        wallet.data.notifications.unreadCount = 0;
+        var lastNotification = $scope.search.results[0];
+        wallet.data.notifications.time = lastNotification ? lastNotification.time : 0;
+        _.forEach($scope.search.results, function (item) {
+          if (item.markAsRead && typeof item.markAsRead == 'function') item.markAsRead();
+        });
+
+        return UIUtils.loading.hide();
+      });
+  };
+
+  $scope.resetUnreadCount = function() {
+    if ($scope.search.loading || !wallet.data.notifications) {
+      return $timeout($scope.resetUnreadCount, 2000);
+    }
+    if (!wallet.data.notifications.unreadCount || !$scope.search.results || !$scope.search.results.length) return;
+    wallet.data.notifications.unreadCount = 0;
+    var lastNotification = $scope.search.results[0];
+    var readTime = lastNotification.time ? lastNotification.time : 0;
+    if (readTime && (!wallet.data.notifications.time || wallet.data.notifications.time != readTime)) {
+      wallet.data.notifications.time = readTime;
+      wallet.storeData();
+    }
+  };
+
+  $scope.select = function(event, item) {
+
+    if ($scope.search.loading || event.preventDefault() || $scope.search.preventSelect) return;
+
+    if (item.markAsRead && typeof item.markAsRead == 'function') {
+      $timeout(item.markAsRead);
+    }
+    if (item.state) {
+      $state.go(item.state, item.stateParams);
+    }
+  };
+
+  $scope.showMore = function() {
+    $scope.search.limit = $scope.search.limit || defaultSearchLimit;
+    $scope.search.limit += defaultSearchLimit;
+    if ($scope.search.limit < defaultSearchLimit) {
+      $scope.search.limit = defaultSearchLimit;
+    }
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.search.limit)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  // Listen notifications changes
+  $scope.onNewNotification = function(notification) {
+    if ($scope.search.loading || $scope.search.loadingMore) return;
+
+    // Retrieve insertion index
+    var nextIndex = _.findIndex($scope.search.results, function(n) {
+      return notification.time > n.time;
+    });
+    if (nextIndex < 0) nextIndex = 0;
+
+    // Update the array
+    $scope.search.results.splice(nextIndex,0,notification);
+    $scope.updateView();
+  };
+
+  $scope.resetData = function() {
+    if ($scope.search.loading) return;
+    console.debug("[ES] [notifications] Resetting data (settings or account may have changed)");
+    $scope.search.hasMore = false;
+    $scope.search.results = [];
+    $scope.search.loading = true;
+    delete $scope.search.limit;
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl :'plugins/es/templates/notification/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- listeners -- */
+
+  $scope.addListeners = function() {
+    if (!wallet) throw "Controller wallet not set !";
+
+    $scope.listeners = [
+      esHttp.api.node.on.stop($scope, $scope.resetData),
+      esHttp.api.node.on.start($scope, $scope.load),
+      wallet.api.data.on.logout($scope, $scope.resetData)
+    ];
+
+    if (wallet.isDefault()) {
+      // Subscribe to new notification
+      $scope.listeners.push(
+        esNotification.api.data.on.new($scope, $scope.onNewNotification)
+      );
+    }
+  };
+
+  $scope.removeListeners = function() {
+    _.forEach($scope.listeners, function(remove){
+      remove();
+    });
+    $scope.listeners = [];
+  };
+}
+
+function PopoverNotificationsController($scope, $timeout, $controller, $state,
+                                        UIUtils, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('NotificationsCtrl', {$scope: $scope}));
+
+  // Disable list motion
+  $scope.motion = null;
+
+  // Set the wallet to use
+  $scope.setWallet(csWallet);
+
+  $scope.$on('popover.shown', function() {
+    if ($scope.search.loading) {
+      $scope.addListeners();
+      $scope.load();
+    }
+  });
+
+  $scope.updateView = function() {
+    if (!$scope.search.results.length) return;
+
+    // Set Ink
+    $timeout(function() {
+      UIUtils.ink({selector: '.popover-notification .item.ink'});
+    }, 100);
+  };
+
+  $scope.$on('popover.hidden', $scope.resetUnreadCount);
+
+  $scope.select = function($event, notification) {
+    if ($event.preventDefault() || !notification) return; // no selection
+    if (notification.markAsRead && typeof notification.markAsRead == 'function') notification.markAsRead();
+    if (notification.state) {
+      $state.go(notification.state, notification.stateParams);
+    }
+    $scope.closePopover(notification);
+  };
+}
+
+
+ESBlockLookupController.$inject = ['$scope', '$controller', '$ionicPopover', '$location', 'UIUtils', 'esBlockchain'];
+angular.module('cesium.es.blockchain.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.lookup_blocks_currency', {
+        url: "/currencies/:currency/blocks?q",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/blockchain/lookup.html",
+            controller: 'ESBlockLookupCtrl'
+          }
+        }
+      })
+
+      .state('app.blockchain_search', {
+        url: "/blockchain/search?q&type",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/blockchain/lookup.html",
+            controller: 'ESBlockLookupCtrl'
+          }
+        },
+        data: {
+          silentLocationChange: true
+        }
+      })
+    ;
+  }])
+
+  .controller('ESBlockLookupCtrl', ESBlockLookupController)
+;
+
+
+function ESBlockLookupController($scope, $controller, $ionicPopover, $location, UIUtils, esBlockchain) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('BlockLookupCtrl', {$scope: $scope}));
+
+  $scope.search.text = null;
+  $scope.search.type = 'last';
+  $scope.search.sort = undefined;
+  $scope.search.asc = true;
+  $scope.searchTextId = 'blockchainSearchText';
+  $scope.compactMode = true;
+  $scope.enableFilter = true;
+
+  $scope.doSearchText = function() {
+    if ((!$scope.search.text || !$scope.search.text.trim().length) &&
+      (!$scope.search.filters || !$scope.search.filters.length) ) {
+      return $scope.doSearchLast();
+    }
+
+    $scope.search.type = 'text';
+
+    $scope.doSearch();
+
+    // Update location href
+    $location.search({q: $scope.search.query}).replace();
+  };
+
+  $scope.doSearchLast = function() {
+    $scope.hideActionsPopover();
+
+    $scope.search.type = 'last';
+    $scope.search.sort = undefined;
+    $scope.doSearch();
+
+    $location.search({q: undefined}).replace();
+  };
+
+
+  // This method override the base class method
+  $scope.doSearch = function(from) {
+    if ($scope.search.error) return;
+
+    from = angular.isDefined(from) ? from : 0;
+    var promise;
+    var request = {};
+
+    $scope.search.loading = (from === 0);
+    request.size = $scope.defaultSizeLimit;
+
+    // last block
+    if ($scope.search.type == 'last') {
+      // Add '+1' to skip the indexed block with _id='current'
+      request.from = (from === 0) ? 0 : from+1;
+      // add sort
+      if ($scope.search.sort) {
+        request.sort = {};
+        request.sort[$scope.search.sort] = !$scope.search.asc ? "desc" : "asc";
+      }
+      else { // default sort
+        request.sort = {
+          "number": "desc"
+        };
+      }
+      request.excludeCurrent = (from === 0);
+
+      promise = esBlockchain.block.search($scope.currency, request);
+    }
+
+    // Full text search
+    else if ($scope.search.type == 'text') {
+
+      // Parse text search into filters array
+      var res = esBlockchain.block.parseSearchText($scope.search.text, $scope.search.filters);
+      $scope.search.filters = res.filters;
+      var query = $scope.search.filters.reduce(function(query, filter){
+        return query + ' AND ' + filter.text;
+      }, '');
+      if (res.text.length) {
+        query += ' AND ' + res.text;
+      }
+
+      $scope.search.query = query.substr(5);
+      $scope.search.text = res.text;
+
+      request.from = from;
+
+      // add sort
+      if ($scope.search.sort) {
+        request.sort = $scope.search.sort + ':' + (!$scope.search.asc ? "desc" : "asc");
+      }
+      else { // default sort
+        request.sort = "number:desc";
+      }
+      request.excludeCurrent = true;
+
+      promise = esBlockchain.block.searchText($scope.currency, $scope.search.query, request);
+    }
+
+    var now = Date.now();
+    return promise
+      .then(function(result) {
+        // Apply transformation need by UI (e.g add avatar and name...)
+        return $scope.doPrepareResult(result.hits)
+          .then(function() {
+            return result;
+          });
+      })
+      .then(function(result) {
+        $scope.showPubkey = ($scope.search.sort == 'issuer');
+        // Compute time only once (on first page)
+        $scope.search.took = (from === 0) ? (Date.now() - now) : $scope.search.took;
+        // Keep previous total, when already computed (because of current, that is excluded only in the first page)
+        var total = (from === 0) ? result.total : $scope.search.total;
+        $scope.doDisplayResult(result.hits, from, total);
+        $scope.search.loading = false;
+      })
+      .catch(function(err) {
+        $scope.search.error = true;
+        $scope.search.loading = false;
+        UIUtils.onError('BLOCKCHAIN.ERROR.SEARCH_BLOCKS_FAILED')(err)
+          .then(function() {
+            $scope.search.error = false;
+          });
+      });
+  };
+
+  $scope.toggleSort = function(sort){
+    if ($scope.search.sort === sort && !$scope.search.asc) {
+      $scope.search.asc = undefined;
+      $scope.search.sort = undefined;
+    }
+    else {
+      $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true;
+      $scope.search.sort = sort;
+    }
+    $scope.doSearch();
+  };
+
+  $scope.showHelpTip = function() {
+
+  };
+
+  /* -- popups -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/blockchain/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- manage click -- */
+
+
+  // Cancel search filter
+  $scope.itemRemove = function(index) {
+    $scope.search.filters.splice(index, 1);
+    $scope.doSearchText();
+  };
+
+  //Show the query
+  $scope.toggleShowQuery = function() {
+    $scope.showQuery = !$scope.showQuery;
+  };
+}
+
+
+
+ESNetworkLookupController.$inject = ['$scope', '$state', '$location', '$ionicPopover', '$window', '$translate', 'esHttp', 'UIUtils', 'csConfig', 'csSettings', 'csCurrency', 'esNetwork', 'csWot'];
+ESNetworkLookupModalController.$inject = ['$scope', '$controller', 'parameters'];
+ESPeerViewController.$inject = ['$scope', '$q', '$window', '$state', 'UIUtils', 'csWot', 'esHttp', 'csHttp', 'csSettings'];
+ESNetworkLookupPopoverController.$inject = ['$scope', '$controller'];
+ESPeerInfoPopoverController.$inject = ['$scope', '$q', 'csSettings', 'csCurrency', 'csHttp', 'esHttp'];angular.module('cesium.es.network.controllers', ['cesium.es.services'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      PluginServiceProvider.extendState('app.network', {
+        points: {
+          'network-buttons': {
+            templateUrl: "plugins/es/templates/network/view_network_extend.html",
+            controller: 'ESExtensionCtrl'
+          },
+          'blockchain-buttons': {
+            templateUrl: "plugins/es/templates/network/view_network_extend.html",
+            controller: 'ESExtensionCtrl'
+          }
+        }
+      })
+      ;
+    }
+  }])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.es_network', {
+        url: "/network/data?online&expert",
+        cache: false, // fix #766
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/network/view_es_network.html",
+            controller: 'ESNetworkLookupCtrl'
+          }
+        },
+        data: {
+          silentLocationChange: true
+        }
+      })
+
+      .state('app.view_es_peer', {
+        url: "/network/data/peer/:server?ssl&tor",
+        cache: false,
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/network/view_es_peer.html",
+            controller: 'ESPeerViewCtrl'
+          }
+        },
+        data: {
+          preferHttp: true // avoid HTTPS if config has httpsMode=clever
+        }
+      });
+  }])
+
+  .controller('ESNetworkLookupCtrl', ESNetworkLookupController)
+
+  .controller('ESNetworkLookupModalCtrl', ESNetworkLookupModalController)
+
+  .controller('ESPeerViewCtrl', ESPeerViewController)
+
+  .controller('ESNetworkLookupPopoverCtrl', ESNetworkLookupPopoverController)
+
+  .controller('ESPeerInfoPopoverCtrl', ESPeerInfoPopoverController)
+
+;
+
+
+function ESNetworkLookupController($scope,  $state, $location, $ionicPopover, $window, $translate,
+                                 esHttp, UIUtils, csConfig, csSettings, csCurrency, esNetwork, csWot) {
+  'ngInject';
+
+  $scope.networkStarted = false;
+  $scope.ionItemClass = '';
+  $scope.expertMode = csSettings.data.expertMode && !UIUtils.screen.isSmall();
+  $scope.isHttps = ($window.location.protocol === 'https:');
+  $scope.search = {
+    text: '',
+    loading: true,
+    online: true,
+    results: [],
+    endpointFilter: esHttp.constants.ES_USER_API,
+    sort : undefined,
+    asc: true
+  };
+  $scope.compactMode = true;
+  $scope.listeners = [];
+  $scope.helptipPrefix = 'helptip-network';
+  $scope.enableLocationHref = true; // can be overrided by sub-controller (e.g. popup)
+
+  $scope.removeListeners = function() {
+    if ($scope.listeners.length) {
+      console.debug("[ES] [network] Closing listeners");
+      _.forEach($scope.listeners, function(remove){
+        remove();
+      });
+      $scope.listeners = [];
+    }
+  };
+
+  /**
+   * Enter in view
+   */
+  $scope.enter = function(e, state) {
+    if ($scope.networkStarted) return;
+    $scope.networkStarted = true;
+    $scope.search.loading = true;
+    csCurrency.get()
+      .then(function (currency) {
+        if (currency) {
+          $scope.node = !esHttp.node.same(currency.node.host, currency.node.port) ?
+            esHttp.instance(currency.node.host, currency.node.port) : esHttp;
+          if (state && state.stateParams) {
+            if (state.stateParams.online === 'true') {
+              $scope.search.online = true;
+            }
+            if (state.stateParams.expert) {
+              $scope.expertMode = (state.stateParams.expert == 'true');
+            }
+          }
+          $scope.load();
+        }
+      })
+      .catch(function(err) {
+        UIUtils.onError('ERROR.GET_CURRENCY_FAILED')(err);
+        $scope.networkStarted = false;
+      });
+  };
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+  /**
+   * Leave the view
+   */
+  $scope.leave = function() {
+    if (!$scope.networkStarted) return;
+    $scope.removeListeners();
+    esNetwork.close();
+    $scope.networkStarted = false;
+    $scope.search.loading = true;
+  };
+  $scope.$on('$ionicView.beforeLeave', $scope.leave);
+  $scope.$on('$ionicParentView.beforeLeave', $scope.leave);
+  $scope.$on('$destroy', $scope.leave);
+
+
+  $scope.computeOptions = function() {
+    var options = {
+      filter: {
+        member: (!$scope.search.type || $scope.search.type === 'member'),
+        mirror: (!$scope.search.type || $scope.search.type === 'mirror'),
+        endpointFilter : (angular.isDefined($scope.search.endpointFilter) ? $scope.search.endpointFilter : null),
+        online: $scope.search.online && true
+      },
+      sort: {
+        type : $scope.search.sort,
+        asc : $scope.search.asc
+      },
+      expertMode: $scope.expertMode,
+      // larger timeout when on expert mode
+      timeout: csConfig.timeout && ($scope.expertMode ? (csConfig.timeout / 10) : (csConfig.timeout / 100))
+    };
+    return options;
+  };
+
+  $scope.load = function() {
+
+    if ($scope.search.loading){
+      // Start network scan
+      esNetwork.start($scope.node, $scope.computeOptions());
+
+      // Catch event on new peers
+      $scope.refreshing = false;
+      $scope.listeners.push(
+        esNetwork.api.data.on.changed($scope, function(data){
+          if (!$scope.refreshing) {
+            $scope.refreshing = true;
+            csWot.extendAll(data.peers)
+              .then(function() {
+                // Avoid to refresh if view has been leaving
+                if ($scope.networkStarted) {
+                  $scope.updateView(data);
+                }
+                $scope.refreshing = false;
+              });
+          }
+        }));
+    }
+  };
+
+  $scope.updateView = function(data) {
+    console.debug("[peers] Updating UI");
+    $scope.$broadcast('$$rebind::rebind'); // force data binding
+    $scope.search.results = data.peers;
+    $scope.search.memberPeersCount = data.memberPeersCount;
+    // Always tru if network not started (e.g. after leave+renter the view)
+    $scope.search.loading = !$scope.networkStarted || esNetwork.isBusy();
+    if (!$scope.loading) {
+      $scope.$broadcast('$$rebind::rebind'); // force data binding
+    }
+    if ($scope.motion && $scope.search.results && $scope.search.results.length > 0) {
+      $scope.motion.show({selector: '.item-peer'});
+    }
+  };
+
+  $scope.refresh = function() {
+    // Network
+    $scope.search.loading = true;
+    esNetwork.loadPeers();
+  };
+
+  $scope.sort = function() {
+    $scope.search.loading = true;
+    $scope.refreshing = true;
+    esNetwork.sort($scope.computeOptions());
+    $scope.updateView(esNetwork.data);
+  };
+
+  $scope.toggleOnline = function(online){
+    $scope.hideActionsPopover();
+    $scope.search.online = (online !== false);
+    esNetwork.close();
+    $scope.search.loading = true;
+    $scope.load();
+
+    // Update location href
+    if ($scope.enableLocationHref) {
+      $location.search($scope.search.online ? {} : {online: false}).replace();
+    }
+  };
+
+  $scope.toggleSearchEndpoint = function(endpoint){
+    $scope.hideActionsPopover();
+    if ($scope.search.endpointFilter === endpoint || endpoint === null) {
+      $scope.search.endpointFilter = null;
+    }
+    else {
+      $scope.search.endpointFilter = endpoint;
+    }
+    $scope.sort();
+  };
+
+  $scope.toggleSort = function(sort){
+    if ($scope.search.sort === sort && !$scope.search.asc) {
+      $scope.search.asc = undefined;
+      $scope.search.sort = undefined;
+    }
+    else {
+      $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true;
+      $scope.search.sort = sort;
+    }
+    $scope.sort();
+  };
+
+  $scope.selectPeer = function(peer) {
+    if (peer.compacted && $scope.compactMode) {
+      $scope.toggleCompactMode();
+      return;
+    }
+
+    // Skip offline
+    if (!peer.online ) return;
+
+    var stateParams = {server: peer.getServer()};
+    if (peer.isSsl()) {
+      stateParams.ssl = true;
+    }
+    if (peer.isTor()) {
+      stateParams.tor = true;
+    }
+    $state.go('app.view_es_peer', stateParams);
+  };
+
+  $scope.$on('csView.action.refresh', function(event, context) {
+    if (context === 'peers') {
+      $scope.refresh();
+    }
+  });
+
+  $scope.$on('csView.action.showActionsPopover', function(event, clickEvent) {
+    $scope.showActionsPopover(clickEvent);
+  });
+
+  /* -- popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/network/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  $scope.showEndpointsPopover = function($event, peer, endpointFilter) {
+    $event.preventDefault();
+    $event.stopPropagation();
+
+    var endpoints = peer.getEndpoints(endpointFilter);
+    endpoints = (endpoints||[]).reduce(function(res, ep) {
+      var bma = esHttp.node.parseEndPoint(ep);
+      return res.concat({
+        label: 'NETWORK.VIEW.NODE_ADDRESS',
+        value: peer.getServer() + (bma.path||'')
+      });
+    }, []);
+    if (!endpoints.length) return;
+
+    // Call extension points
+    UIUtils.popover.show($event, {
+      templateUrl: 'templates/network/popover_endpoints.html',
+      bindings: {
+        titleKey: 'NETWORK.VIEW.ENDPOINTS.' + endpointFilter,
+        items: endpoints
+      }
+    });
+  };
+
+  $scope.showWs2pPopover = function($event, peer) {
+    $event.stopPropagation();
+
+    return $translate('NETWORK.VIEW.PRIVATE_ACCESS')
+      .then(function(privateAccessMessage) {
+        UIUtils.popover.show($event, {
+          templateUrl: 'templates/network/popover_endpoints.html',
+          bindings: {
+            titleKey: 'NETWORK.VIEW.ENDPOINTS.WS2P',
+            valueKey: 'NETWORK.VIEW.NODE_ADDRESS',
+            items: [
+              {
+                label: 'NETWORK.VIEW.NODE_ADDRESS',
+                value: !peer.bma.private ? (peer.getServer() + (peer.bma.path||'')) : privateAccessMessage
+              },
+              {
+                label: 'NETWORK.VIEW.WS2PID',
+                value: peer.bma.ws2pid
+              },
+              {
+                label: 'NETWORK.VIEW.POW_PREFIX',
+                value: peer.powPrefix
+              }]
+            }
+          });
+      });
+  };
+}
+
+
+function ESNetworkLookupModalController($scope, $controller, parameters) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESNetworkLookupCtrl', {$scope: $scope}));
+
+  // Read parameters
+  parameters = parameters || {};
+  $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : true;
+  $scope.search.type = angular.isDefined(parameters.type) ? parameters.type : $scope.search.type;
+  $scope.search.endpointFilter = angular.isDefined(parameters.endpointFilter) ? parameters.endpointFilter : $scope.search.endpointFilter;
+  $scope.expertMode = angular.isDefined(parameters.expertMode) ? parameters.expertMode : $scope.expertMode;
+  $scope.ionItemClass = parameters.ionItemClass || 'item-border-large';
+  $scope.enableLocationHref = false;
+  $scope.helptipPrefix = '';
+
+  $scope.selectPeer = function(peer) {
+    $scope.closeModal(peer);
+  };
+
+  $scope.$on('modal.hidden', function(){
+    $scope.leave();
+  });
+
+  // Disable this unsed method - called by load()
+  $scope.showHelpTip = function() {};
+
+  // Enter the modal
+  $scope.enter();
+}
+
+
+function ESNetworkLookupPopoverController($scope, $controller) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('NetworkLookupCtrl', {$scope: $scope}));
+
+  // Read parameters
+  var parameters = parameters || {};
+  $scope.enableFilter = angular.isDefined(parameters.enableFilter) ? parameters.enableFilter : true;
+  $scope.search.type = angular.isDefined(parameters.type) ? parameters.type : $scope.search.type;
+  $scope.search.endpointFilter = angular.isDefined(parameters.endpointFilter) ? parameters.endpointFilter : $scope.search.endpointFilter;
+  $scope.expertMode = angular.isDefined(parameters.expertMode) ? parameters.expertMode : $scope.expertMode;
+  $scope.ionItemClass = parameters.ionItemClass || 'item-border-large';
+  $scope.helptipPrefix = '';
+
+  $scope.selectPeer = function(peer) {
+    $scope.closePopover(peer);
+  };
+
+  $scope.$on('popover.hidden', function(){
+    $scope.leave();
+  });
+
+  // Disable this unsed method - called by load()
+  $scope.showHelpTip = function() {};
+
+  // Enter the popover
+  $scope.enter();
+}
+
+function ESPeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, esHttp) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.formData = {};
+
+  $scope.load = function() {
+
+    $scope.loading = true;
+    $scope.formData = {};
+
+    return $q.all([
+      // get current block
+      esHttp.blockchain.current()
+        .then(function(block) {
+          $scope.formData.number = block.number;
+          $scope.formData.medianTime = block.medianTime;
+          $scope.formData.powMin = block.powMin;
+          $scope.formData.useSsl = esHttp.useSsl;
+        })
+        .catch(function() {
+          delete $scope.formData.number;
+          delete $scope.formData.medianTime;
+          delete $scope.formData.powMin;
+          delete $scope.formData.useSsl;
+          // continue
+        }),
+
+      // Get node current version
+      esHttp.node.summary()
+        .then(function(res){
+          $scope.formData.version = res && res.duniter && res.duniter.version;
+          $scope.formData.software = res && res.duniter && res.duniter.software;
+        })
+        .catch(function() {
+          delete $scope.formData.version;
+          delete $scope.formData.software;
+          // continue
+        }),
+
+      // Get latest version
+      esHttp.version.latest()
+        .then(function(latestRelease){
+          $scope.formData.latestRelease = latestRelease;
+        })
+        .catch(function() {
+          delete $scope.formData.latestRelease;
+          // continue
+        })
+    ])
+      .then(function() {
+        // Compare, to check if newer
+        if ($scope.formData.latestRelease && $scope.formData.software === 'cesium-plus-pod') {
+          var compare = csHttp.version.compare($scope.formData.version, $scope.formData.latestRelease.version);
+          $scope.formData.isPreRelease = compare > 0;
+          $scope.formData.hasNewRelease = compare < 0;
+        }
+        else {
+          $scope.formData.isPreRelease = false;
+          $scope.formData.hasNewRelease = false;
+        }
+        $scope.loading = false;
+        $scope.$broadcast('$$rebind::rebind'); // force data binding
+      });
+  };
+
+  // Update UI on new block
+  csCurrency.api.data.on.newBlock($scope, function(block) {
+    if ($scope.loading) return;
+    console.debug("[peer info] Received new block. Reload content");
+    $scope.load();
+  });
+
+  // Update UI on settings changed
+  csSettings.api.data.on.changed($scope, function(data) {
+    if ($scope.loading) return;
+    console.debug("[peer info] Peer settings changed. Reload content");
+    $scope.load();
+  });
+
+  // Load data when enter
+  $scope.load();
+}
+
+function ESPeerViewController($scope, $q, $window, $state, UIUtils, csWot, esHttp, csHttp, csSettings) {
+  'ngInject';
+
+  $scope.node = {};
+  $scope.loading = true;
+  $scope.isHttps = ($window.location.protocol === 'https:');
+  $scope.isReachable = true;
+  $scope.options = {
+    document: {
+      index : csSettings.data.plugins.es && csSettings.data.plugins.es.document && csSettings.data.plugins.es.document.index || 'user',
+      type: csSettings.data.plugins.es && csSettings.data.plugins.es.document && csSettings.data.plugins.es.document.type || 'profile'
+    }
+  };
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    var isDefaultNode = !state.stateParams || !state.stateParams.server;
+    var server = state.stateParams && state.stateParams.server || esHttp.server;
+    var useSsl = state.stateParams && state.stateParams.ssl == "true" || (isDefaultNode ? esHttp.useSsl : false);
+    var useTor = state.stateParams.tor == "true" || (isDefaultNode ? esHttp.useTor : false);
+
+    return $scope.load(server, useSsl, useTor)
+      .then(function() {
+        return $scope.$broadcast('$csExtension.enter', e, state);
+      })
+      .then(function(){
+        $scope.loading = false;
+      })
+      .catch(function() {
+        $scope.loading = false;
+      });
+  });
+
+  $scope.load = function(server, useSsl, useTor) {
+    var node = {
+      server: server,
+      host: server,
+      useSsl: useSsl,
+      useTor: useTor
+    };
+    var serverParts = server.split(':');
+    if (serverParts.length === 2) {
+      node.host = serverParts[0];
+      node.port = serverParts[1];
+    }
+    node.url = csHttp.getUrl(node.host, node.port, undefined/*path*/, node.useSsl);
+
+    angular.merge($scope.node,
+      useTor ?
+        // For TOR, use a web2tor to access the endpoint
+        esHttp.lightInstance(node.host + ".to", 443, 443, true/*ssl*/, 60000 /*long timeout*/) :
+        esHttp.lightInstance(node.host, node.port, node.useSsl),
+      node);
+
+    $scope.isReachable = !$scope.isHttps || useSsl;
+    if (!$scope.isReachable) {
+      // Get node from the default node
+      return esHttp.network.peers()
+        .then(function(res) {
+          // find the current peer
+          var peers = (res && res.peers || []).reduce(function(res, json) {
+            var peer = new EsPeer(json);
+            if (!peer.hasEsEndpoint()) return res;
+            var ep = esHttp.node.parseEndPoint(peer.getEsEndpoints()[0]);
+            if((ep.dns == node.host || ep.ipv4 == node.host || ep.ipv6 == node.host) && (
+              ep.port == node.port)) {
+              peer.ep = ep;
+              return res.concat(peer);
+            }
+            return res;
+          }, []);
+          var peer = peers.length && peers[0];
+
+          // Current node found
+          if (peer) {
+            $scope.node.pubkey = peer.pubkey;
+            $scope.node.currency = peer.currency;
+            return csWot.extend($scope.node);
+          }
+          else {
+            console.warn('Could not get peer from /network/peers');
+          }
+        });
+    }
+
+    return $q.all([
+
+      // Get node peer info
+      $scope.node.network.peering.self()
+        .then(function(json) {
+          $scope.node.pubkey = json.pubkey;
+          $scope.node.currency = json.currency;
+        }),
+
+      // Get node doc count
+      $scope.node.record.count($scope.options.document.index, $scope.options.document.type)
+        .then(function(count) {
+          $scope.node.docCount = count;
+        }),
+
+      // Get known peers
+      $scope.node.network.peers()
+        .then(function(json) {
+          var peers = json.peers.reduce(function (res, p) {
+            var peer = new EsPeer(p);
+            if (!peer.hasEsEndpoint()) return res;
+            peer.online = p.status === 'UP';
+            peer.blockNumber = peer.block.replace(/-.+$/, '');
+            peer.ep = esHttp.node.parseEndPoint(peer.getEsEndpoints()[0]);
+            peer.dns = peer.getDns();
+            peer.id = peer.keyID();
+            peer.server = peer.getServer();
+            return res.concat(peer);
+          }, []);
+
+          // Extend (add uid+name+avatar)
+          return csWot.extendAll([$scope.node].concat(peers))
+            .then(function() {
+              // Final sort
+              $scope.peers = _.sortBy(peers, function(p) {
+                var score = 1;
+                score += 10000 * (p.online ? 1 : 0);
+                score += 1000  * (p.hasMainConsensusBlock ? 1 : 0);
+                score += 100   * (p.name ? 1 : 0);
+                return -score;
+              });
+              $scope.motion.show({selector: '.item-peer'});
+            });
+        }),
+
+      // Get current block
+      $scope.node.blockchain.current()
+        .then(function(json) {
+          $scope.current = json;
+        })
+    ])
+      .catch(UIUtils.onError(useTor ? "PEER.VIEW.ERROR.LOADING_TOR_NODE_ERROR" : "PEER.VIEW.ERROR.LOADING_NODE_ERROR"));
+  };
+
+  $scope.selectPeer = function(peer) {
+    // Skip offline
+    if (!peer.online ) return;
+
+    var stateParams = {server: peer.getServer()};
+    if (peer.isSsl()) {
+      stateParams.ssl = true;
+    }
+    if (peer.isTor()) {
+      stateParams.tor = true;
+    }
+    $state.go('app.view_es_peer', stateParams);
+  };
+
+  /* -- manage link to raw document -- */
+
+  $scope.openRawPeering = function(event) {
+    return $scope.openLink(event, $scope.node.url + '/network/peering?pretty');
+  };
+
+  $scope.openRawCurrentBlock = function(event) {
+    return $scope.openLink(event, $scope.node.url + '/network/peering?pretty');
+  };
+}
+
+
+ESGroupListController.$inject = ['$scope', 'UIUtils', '$state', 'csWallet', 'esGroup', 'ModalUtils'];
+ESGroupViewController.$inject = ['$scope', '$state', '$ionicPopover', '$ionicHistory', '$translate', 'UIUtils', 'csConfig', 'esGroup', 'csWallet'];
+ESGroupEditController.$inject = ['$scope', 'esGroup', 'UIUtils', '$state', '$q', 'Device', '$ionicHistory', 'ModalUtils', '$focus', 'esHttp'];angular.module('cesium.es.group.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.groups', {
+        url: "/group?type&location",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/group/lookup.html",
+            controller: 'ESGroupListCtrl'
+          }
+        }
+      })
+
+      .state('app.add_group', {
+        url: "/group/add/:type",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/group/edit_group.html",
+            controller: 'ESGroupEditCtrl'
+          }
+        }
+      })
+
+      .state('app.edit_group', {
+        url: "/group/edit/:id",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/group/edit_group.html",
+            controller: 'ESGroupEditCtrl'
+          }
+        }
+      })
+
+
+      .state('app.view_group', {
+        url: "/group/view/:id",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/group/view_record.html",
+            controller: 'ESGroupViewCtrl'
+          }
+        }
+      })
+
+    ;
+  }])
+
+  .controller('ESGroupListCtrl', ESGroupListController)
+
+  .controller('ESGroupViewCtrl', ESGroupViewController)
+
+  .controller('ESGroupEditCtrl', ESGroupEditController)
+
+;
+
+function ESGroupListController($scope, UIUtils, $state, csWallet, esGroup, ModalUtils) {
+  'ngInject';
+
+  var defaultSearchLimit = 40;
+
+  $scope.search = {
+    loading : true,
+    results: null,
+    type: 'last',
+    hasMore : false,
+    loadingMore : false,
+    limit: defaultSearchLimit
+  };
+  $scope.enableFilter = !UIUtils.screen.isSmall();
+  $scope.ionItemClass = 'item-border-large';
+
+  $scope.$on('$ionicView.enter', function() {
+    if ($scope.search.loading) {
+      $scope.doSearch();
+    }
+  });
+
+  $scope.doSearchText = function() {
+    var text = $scope.search.text && $scope.search.text.trim();
+    if (!text || !text.length) {
+      return $scope.doSearchLast();
+    }
+    $scope.search.type='text';
+    return $scope.doSearch();
+  };
+
+  $scope.doSearchLast = function() {
+    $scope.search.type = 'last';
+    return $scope.doSearch();
+  };
+
+  $scope.doSearch = function(from, size) {
+    var options = {};
+    options.from = from || 0;
+    options.size = size || defaultSearchLimit;
+
+    options.text = $scope.search.type == 'text' && $scope.search.text && $scope.search.text.trim();
+
+    $scope.search.loading = true;
+    return esGroup.record.search(options)
+      .then(function(res) {
+        if (!from) {
+          $scope.search.results = res || [];
+        }
+        else if (res){
+          $scope.search.results = $scope.search.results.concat(res);
+        }
+        $scope.search.loading = false;
+        $scope.search.hasMore = $scope.search.results.length >= $scope.search.limit;
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.search.loading = false;
+        if (!from) {
+          $scope.search.results = [];
+        }
+        $scope.search.hasMore = false;
+        UIUtils.onError('GROUP.ERROR.SEARCH_GROUPS_FAILED')(err);
+      });
+  };
+
+  $scope.updateView = function() {
+
+    $scope.$broadcast('$$rebind::rebind'); // notify binder
+    $scope.motion.show({selector: '.list.{0} .item'.format($scope.motion.ionListClass)});
+  };
+
+  $scope.select = function(item) {
+    if (item && item.id) $state.go('app.view_group', {id: item.id});
+  };
+
+  $scope.showMore = function() {
+    $scope.search.limit = $scope.search.limit || defaultSearchLimit;
+    $scope.search.limit += defaultSearchLimit;
+    if ($scope.search.limit < defaultSearchLimit) {
+      $scope.search.limit = defaultSearchLimit;
+    }
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.search.limit)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.resetData = function() {
+    if ($scope.search.loading) return;
+    console.debug("[ES] [group] Resetting data (settings or account may have changed)");
+    $scope.search.hasMore = false;
+    $scope.search.results = [];
+    $scope.search.loading = true;
+    delete $scope.search.limit;
+  };
+  // When logout: force reload
+  csWallet.api.data.on.logout($scope, $scope.resetData);
+
+  /* -- modals and views -- */
+
+  $scope.showNewRecordModal = function() {
+    $scope.loadWallet({minData: true})
+      .then(function(walletData) {
+        UIUtils.loading.hide();
+        $scope.walletData = walletData;
+        ModalUtils.show('plugins/es/templates/group/modal_record_type.html')
+          .then(function(type){
+            if (type) {
+              $state.go('app.add_group', {type: type});
+            }
+          });
+      });
+  };
+}
+
+
+function ESGroupViewController($scope, $state, $ionicPopover, $ionicHistory, $translate,
+                               UIUtils, csConfig, esGroup, csWallet) {
+  'ngInject';
+
+  $scope.formData = {};
+  $scope.id = null;
+  $scope.pictures = [];
+  $scope.canEdit = false;
+  $scope.loading = true;
+  $scope.motion = UIUtils.motion.fadeSlideIn;
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if (state.stateParams && state.stateParams.id) { // Load by id
+      if ($scope.loading || state.stateParams.refresh) { // prevent reload if same id (if not forced)
+        $scope.load(state.stateParams.id, state.stateParams.anchor);
+      }
+      UIUtils.loading.hide();
+      $scope.$broadcast('$recordView.enter', state);
+    }
+    else {
+      $state.go('app.groups');
+    }
+  });
+
+  $scope.load = function(id) {
+    esGroup.record.load(id, {
+      fetchPictures: true
+    })
+      .then(function (data) {
+        $scope.id = data.id;
+        $scope.formData = data.record;
+        $scope.issuer= data.issuer;
+        $scope.canEdit = csWallet.isUserPubkey($scope.formData.issuer) || csWallet.children.hasPubkey($scope.formData.issuer);
+
+        $scope.pictures = data.record.pictures || [];
+        delete data.record.pictures; // remove, as already stored in $scope.pictures
+
+        // Load other data (from child controller)
+        $scope.$broadcast('$recordView.load', id, esGroup.record.comment);
+
+        $scope.loading = false;
+        UIUtils.loading.hide();
+        $scope.updateView();
+
+      })
+      .catch(UIUtils.onError('GROUP.ERROR.LOAD_RECORD_FAILED'));
+  };
+
+  $scope.updateView = function() {
+    $scope.motion.show();
+  };
+
+  // Edit click
+  $scope.edit = function() {
+    UIUtils.loading.show();
+    $state.go('app.edit_group', {id: $scope.id});
+  };
+
+  $scope.delete = function() {
+    $scope.hideActionsPopover();
+
+    // translate
+    var translations;
+    $translate(['GROUP.VIEW.REMOVE_CONFIRMATION', 'GROUP.INFO.RECORD_REMOVED'])
+      .then(function(res) {
+        translations = res;
+        return UIUtils.alert.confirm(res['GROUP.VIEW.REMOVE_CONFIRMATION']);
+      })
+      .then(function(confirm) {
+        if (confirm) {
+          esGroup.record.remove($scope.id)
+            .then(function () {
+              $ionicHistory.nextViewOptions({
+                historyRoot: true
+              });
+              $state.go('app.groups');
+              UIUtils.toast.show(translations['GROUP.INFO.RECORD_REMOVED']);
+            })
+            .catch(UIUtils.onError('GROUP.ERROR.REMOVE_RECORD_FAILED'));
+        }
+      });
+  };
+
+  /* -- modals & popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/group/view_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  $scope.showSharePopover = function(event) {
+    $scope.hideActionsPopover();
+
+    var title = $scope.formData.title;
+    // Use shareBasePath (fix #530) or rootPath (fix #390)
+    var url = (csConfig.shareBaseUrl || $rootScope.rootPath) + $state.href('app.view_group', {id: $scope.id});
+    // Override default position, is small screen - fix #545
+    if (UIUtils.screen.isSmall()) {
+      event = angular.element(document.querySelector('#group-share-anchor-'+$scope.id)) || event;
+    }
+    UIUtils.popover.share(event, {
+      bindings: {
+        url: url,
+        titleKey: 'GROUP.VIEW.POPOVER_SHARE_TITLE',
+        titleValues: {title: title},
+        time: $scope.formData.time,
+        postMessage: title
+      }
+    });
+  };
+}
+
+function ESGroupEditController($scope, esGroup, UIUtils, $state, $q, Device,
+                               $ionicHistory, ModalUtils, $focus, esHttp) {
+  'ngInject';
+
+  $scope.walletData = {};
+  $scope.formData = {};
+  $scope.id = null;
+  $scope.pictures = [];
+  $scope.loading = true;
+
+  $scope.setForm =  function(form) {
+    $scope.form = form;
+  };
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    $scope.loadWallet({minData: true})
+      .then(function(walletData) {
+        $scope.walletData = walletData;
+        if (state.stateParams && state.stateParams.id) { // Load by id
+          $scope.load(state.stateParams.id);
+        }
+        else {
+          if (state.stateParams && state.stateParams.type) {
+            $scope.formData.type=state.stateParams.type;
+          }
+          $scope.loading = false;
+          UIUtils.loading.hide();
+          $scope.updateView();
+        }
+        // removeIf(device)
+        $focus('group-record-title');
+        // endRemoveIf(device)
+      });
+  });
+
+  $scope.load = function(id) {
+    esGroup.record.load(id, {
+      fetchPictures: true,
+      html: false
+    })
+      .then(function (data) {
+        $scope.formData = data.record;
+        $scope.issuer= data.issuer;
+        $scope.id= data.id;
+
+        $scope.pictures = data.record.pictures || [];
+        delete data.record.pictures; // remove, as already stored in $scope.pictures
+
+        $scope.loading = false;
+        UIUtils.loading.hide();
+        $scope.updateView();
+
+      })
+      .catch(UIUtils.onError('GROUP.ERROR.LOAD_RECORD_FAILED'));
+  };
+
+  $scope.updateView = function() {
+    $scope.motion.show({selector: '.list.{0} .item, .card-gallery'.format($scope.motion.ionListClass)});
+  };
+
+  $scope.save = function() {
+    $scope.form.$submitted=true;
+    if($scope.saving || // avoid multiple save
+      !$scope.form.$valid ||
+      ($scope.formData.type !== 'managed' && $scope.formData.type !== 'open')) {
+      return;
+    }
+    $scope.saving = true;
+    return UIUtils.loading.show()
+
+      .then(function(){
+        var json = $scope.formData;
+        json.time = moment().utc().unix();
+
+        // Resize pictures
+        json.picturesCount = $scope.pictures.length;
+        if (json.picturesCount > 0) {
+          json.pictures = $scope.pictures.reduce(function(res, pic) {
+            return res.concat({file: esHttp.image.toAttachment(pic)});
+          }, []);
+          return UIUtils.image.resizeSrc($scope.pictures[0].src, true) // resize avatar
+            .then(function(imageSrc) {
+              json.avatar = esHttp.image.toAttachment({src: imageSrc});
+              return json;
+            });
+        }
+        else {
+          if (json.avatar) {
+            // FIXME: this is a workaround to allow content deletion
+            // Is it a bug in the ES attachment-mapper ?
+            json.avatar = {
+              _content: '',
+              _content_type: ''
+            };
+          }
+          json.pictures = [];
+          return json;
+        }
+      })
+      .then(function(json){
+        // Create
+        if (!$scope.id) {
+          json.creationTime = moment().utc().unix();
+          return esGroup.record.add(json);
+        }
+        // Update
+        return esGroup.record.update(json, {id: $scope.id});
+      })
+
+      .then(function(id) {
+        $scope.id = $scope.id || id;
+        $scope.saving = false;
+        $ionicHistory.clearCache($ionicHistory.currentView().stateId); // clear current view
+        $ionicHistory.nextViewOptions({historyRoot: true});
+        return $state.go('app.view_group', {id: $scope.id, refresh: true});
+      })
+
+      .catch(function(err) {
+        $scope.saving = false;
+        UIUtils.onError('GROUP.ERROR.SAVE_RECORD_FAILED')(err);
+      });
+  };
+
+  $scope.openPicturePopup = function() {
+    Device.camera.getPicture()
+      .then(function(imageData) {
+        $scope.pictures.push({src: "data:image/png;base64," + imageData});
+      })
+      .catch(UIUtils.onError('ERROR.TAKE_PICTURE_FAILED'));
+  };
+
+  $scope.fileChanged = function(event) {
+    UIUtils.loading.show();
+    return $q(function(resolve, reject) {
+      var file = event.target.files[0];
+      UIUtils.image.resizeFile(file)
+        .then(function(imageData) {
+          $scope.pictures.push({src: imageData});
+          UIUtils.loading.hide();
+          resolve();
+        });
+    });
+  };
+
+  $scope.removePicture = function(index){
+    $scope.pictures.splice(index, 1);
+  };
+
+  $scope.favoritePicture = function(index){
+    if (index > 0) {
+      var item = $scope.pictures[index];
+      $scope.pictures.splice(index, 1);
+      $scope.pictures.splice(0, 0, item);
+    }
+  };
+
+  $scope.cancel = function() {
+    $ionicHistory.goBack();
+  };
+
+  /* -- modals -- */
+  $scope.showRecordTypeModal = function() {
+    ModalUtils.show('plugins/es/templates/group/modal_record_type.html')
+      .then(function(type){
+        if (type) {
+          $scope.formData.type = type;
+        }
+      });
+  };
+
+}
+
+
+InvitationsController.$inject = ['$scope', '$q', '$ionicPopover', '$state', '$timeout', 'UIUtils', 'csWallet', 'esHttp', 'esModals', 'esNotification', 'esInvitation'];
+PopoverInvitationController.$inject = ['$scope', '$controller', 'csWallet'];
+NewInvitationModalController.$inject = ['$scope', '$q', 'Modals', 'UIUtils', 'csWallet', 'esHttp', 'esWallet', 'esInvitation', 'parameters'];angular.module('cesium.es.invitation.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.view_invitations', {
+        url: "/invitations?id",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/invitation/view_invitations.html",
+            controller: 'InvitationsCtrl'
+          }
+        },
+        data: {
+          auth: true
+        }
+      })
+
+      .state('app.view_invitations_by_id', {
+        url: "/wallets/:id/invitations",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/invitation/view_invitations.html",
+            controller: 'InvitationsCtrl'
+          }
+        },
+        data: {
+          login: true
+        }
+      })
+    ;
+  }])
+
+  .controller('InvitationsCtrl', InvitationsController)
+
+  .controller('PopoverInvitationCtrl', PopoverInvitationController)
+
+  .controller('ESNewInvitationModalCtrl', NewInvitationModalController)
+;
+
+function InvitationsController($scope, $q, $ionicPopover, $state, $timeout, UIUtils, csWallet,
+                               esHttp, esModals, esNotification, esInvitation) {
+  'ngInject';
+
+  var defaultSearchLimit = esInvitation.constants.DEFAULT_LOAD_SIZE;
+
+  $scope.search = {
+    loading : true,
+    results: null,
+    hasMore : false,
+    loadingMore : false,
+    limit: defaultSearchLimit,
+    options: {
+      codes: {
+        includes: esNotification.constants.INVITATION_CODES
+      }
+    }
+  };
+
+  var wallet;
+
+  $scope.setWallet = function(aWallet) {
+    wallet = aWallet;
+  };
+
+  $scope.$on('$ionicView.enter', function(e, state) {
+    if ($scope.search.loading) {
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      $scope.loadWallet({
+        wallet: wallet,
+        minData: true
+      })
+      .then(function() {
+
+        $scope.addListeners();
+
+        if (esHttp.isAlive()) {
+          $scope.load();
+
+          // Reset unread counter
+          $scope.resetUnreadCount();
+
+          $scope.showFab('fab-new-invitation');
+        }
+      });
+    }
+  });
+
+  $scope.load = function(from, size) {
+    var options = angular.copy($scope.search.options);
+    options.from = options.from || from || 0;
+    options.size = options.size || size || defaultSearchLimit;
+
+    // Make sure wallet is init (need by PopoverInvitationCtrl)
+    wallet = wallet || csWallet;
+
+    return esInvitation.load(options, wallet.data.keypair)
+      .then(function(invitations) {
+        $scope.search.results = invitations;
+        $scope.search.loading = false;
+        $scope.search.hasMore = ($scope.search.results && $scope.search.results.length >= $scope.search.limit);
+        $scope.updateView();
+        UIUtils.loading.hide();
+      })
+      .catch(function(err) {
+        if (err === 'CANCELLED') return $scope.cancel();
+        $scope.search.loading = false;
+        if (!from) {
+          $scope.search.results = [];
+        }
+        $scope.search.hasMore = false;
+        UIUtils.onError('INVITATION.ERROR.LOAD_INVITATIONS_FAILED')(err);
+      });
+  };
+
+  $scope.cancel = function() {
+
+  };
+
+  $scope.updateView = function() {
+    if ($scope.motion && $scope.search.results && $scope.search.results.length) {
+      $scope.motion.show({selector: '.view-invitation .item'});
+    }
+  };
+  $scope.$watchCollection('search.results', $scope.updateView);
+
+  $scope.showMore = function() {
+    $scope.search.limit = $scope.search.limit || defaultSearchLimit;
+    $scope.search.limit = $scope.search.limit * 2;
+    if ($scope.search.limit < defaultSearchLimit) {
+      $scope.search.limit = defaultSearchLimit;
+    }
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.search.limit)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.onNewInvitation = function(invitation) {
+    if ($scope.search.loading || $scope.search.loadingMore) return;
+
+    // Insert the new invitation (ONLY if not already done by service. May occur when using same array instance)
+    if (!$scope.search.results[0] || $scope.search.results[0] !== invitation) {
+      $scope.search.results.splice(0,0,invitation);
+    }
+  };
+
+  $scope.resetData = function() {
+    if ($scope.search.loading) return;
+    console.debug("[ES] [invitation] Resetting data (settings or account may have changed)");
+    $scope.search.hasMore = false;
+    $scope.search.results = [];
+    $scope.search.loading = true;
+    delete $scope.search.limit;
+  };
+
+  $scope.resetUnreadCount = function() {
+    if ($scope.search.loading || !wallet.data.invitations) {
+      return $timeout($scope.resetUnreadCount, 2000);
+    }
+    if (!wallet.data.invitations.unreadCount) return;
+    console.debug('[ES] [invitation] Resetting unread count');
+    wallet.data.invitations.unreadCount = 0;
+    if (!$scope.search.results || !$scope.search.results.length) return;
+    var lastNotification = $scope.search.results[0];
+    var readTime = lastNotification.time ? lastNotification.time : 0;
+    if (readTime && (!wallet.data.invitations.readTime || wallet.data.invitations.readTime != readTime)) {
+      wallet.data.invitations.readTime = readTime;
+      wallet.storeData();
+    }
+  };
+
+  $scope.deleteAll = function(confirm) {
+    $scope.hideActionsPopover();
+    if (!$scope.search.results.length) return;
+
+    if (!confirm) {
+      return UIUtils.alert.confirm('INVITATION.CONFIRM.DELETE_ALL_CONFIRMATION')
+        .then(function(confirm) {
+          if (confirm) return $scope.deleteAll(confirm); // recursive call
+        });
+    }
+
+    return $q.all([
+        UIUtils.loading.show(),
+        esInvitation.deleteAll(wallet.data.pubkey)
+      ])
+      .then(function() {
+        $scope.search.results.splice(0, $scope.search.results.length); // update list
+        return UIUtils.loading.hide();
+      })
+      .catch(UIUtils.onError('INVITATION.ERROR.REMOVE_ALL_INVITATIONS_FAILED'));
+  };
+
+  $scope.delete = function(index) {
+    var invitation = $scope.search.results[index];
+    if (!invitation) return;
+
+    return esInvitation.delete(invitation)
+      .then(function() {
+        // Remove from list (ONLY if not already done by service. May occur when using same array instance)
+        if ($scope.search.results[index] && $scope.search.results[index] === invitation) {
+          $scope.search.results.splice(index,1);
+        }
+      })
+      .catch(UIUtils.onError('INVITATION.ERROR.REMOVE_INVITATION_FAILED'));
+  };
+
+  $scope.accept = function(invitation) {
+    $scope.hideActionsPopover(); // need when PopoverInvitationController
+
+    if (invitation.state) {
+     $state.go(invitation.state, invitation.stateParams || {});
+    }
+  };
+
+  /* -- Modal -- */
+
+  $scope.showNewInvitationModal = function() {
+    $scope.hideActionsPopover();
+
+    return $timeout(function() {
+      return esModals.showNewInvitation({})
+    }, 500); // Timeout need, to avoid freeze
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/invitation/popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+
+  // Listeners
+  $scope.addListeners = function() {
+    if (!wallet) throw "Controller wallet not set !";
+
+    $scope.listeners = [
+      esHttp.api.node.on.stop($scope, $scope.resetData),
+      esHttp.api.node.on.start($scope, $scope.load),
+      wallet.api.data.on.logout($scope, $scope.resetData)
+    ];
+
+    if (wallet.isDefault()) {
+      // Subscribe to new invitation
+      $scope.listeners.push(
+        esInvitation.api.data.on.new($scope, $scope.onNewInvitation)
+      );
+    }
+  };
+}
+
+function PopoverInvitationController($scope, $controller, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('InvitationsCtrl', {$scope: $scope}));
+
+  // Disable list effects
+  $scope.motion = null;
+
+  // Set the wallet to use
+  $scope.setWallet(csWallet);
+
+  $scope.$on('popover.shown', function() {
+    if ($scope.search.loading) {
+      $scope.addListeners();
+      $scope.load();
+    }
+  });
+
+  $scope.updateView = function() {
+    // no animation
+  };
+
+  $scope.$on('popover.hidden', $scope.resetUnreadCount);
+
+  $scope.hideActionsPopover = function() {
+    $scope.closePopover();
+  };
+
+  $scope.cancel = function() {
+    $scope.closePopover();
+  };
+}
+
+
+function NewInvitationModalController($scope, $q, Modals, UIUtils, csWallet, esHttp, esWallet, esInvitation, parameters) {
+  'ngInject';
+
+  // Controller var
+  var wallet;
+
+  // Scope var
+  $scope.recipients = [];
+  $scope.suggestions = [];
+  $scope.formData = {
+    useComment: false,
+    walletId: null
+  };
+  $scope.enableSelectWallet = true;
+
+  /* -- scope functions -- */
+
+  $scope.setParameters = function(parameters) {
+    if (!parameters) return;
+    if (!parameters.wallet || parameters.wallet === "default") {
+      $scope.formData.walletId = csWallet.id;
+    }
+    else {
+      $scope.formData.walletId = parameters.wallet;
+    }
+  };
+  // Read default parameters
+  $scope.setParameters(parameters);
+
+  $scope.load = function() {
+    $scope.enableSelectWallet = csWallet.children.count() > 0;
+
+    wallet = $scope.enableSelectWallet && ($scope.formData.walletId ? csWallet.children.get($scope.formData.walletId) : csWallet) || csWallet;
+    $scope.formData.walletId = wallet.id; // update the walletId (could have changed)
+    if (!wallet.isDefault()) {
+      console.debug("[transfer] Using {" + wallet.id + "} wallet");
+    }
+
+    // Make to sure to load full wallet data (balance)
+    return wallet.login({sources: true, silent: true})
+      .then(function(data) {
+        $scope.walletData = data;
+        UIUtils.ink({selector: '.modal-invitation .ink'});
+
+        if (!$scope.destPub || $scope.destUid) {
+          $scope.loading = false;
+        }
+        else {
+          // Fill the uid from the pubkey
+          return csWot.extend({pubkey: $scope.destPub})
+            .then(function(res) {
+              $scope.destUid = res && (res.name || res.uid);
+              if ($scope.destUid) {
+                $scope.destPub = '';
+              }
+              $scope.loading = false;
+            });
+        }
+      })
+      .catch(function(err){
+        if (err === 'CANCELLED') return $scope.cancel(); // close the modal
+        UIUtils.onError('ERROR.LOGIN_FAILED')(err);
+      });
+  };
+  $scope.$on('modal.shown', $scope.load);
+
+  // When changing use comment
+  $scope.onUseCommentChanged = function() {
+    if (!$scope.formData.useComment) {
+      $scope.formData.comment = null; // reset comment only when disable
+    }
+  };
+  $scope.$watch('formData.useComment', $scope.onUseCommentChanged, true);
+
+
+  $scope.removeRecipient= function(index, e) {
+    $scope.recipients.splice(index, 1);
+    e.preventDefault();
+  };
+
+  $scope.removeSuggestion = function(index, e) {
+    $scope.suggestions.splice(index, 1);
+    e.preventDefault();
+  };
+
+  $scope.cancel = function() {
+    $scope.closeModal();
+  };
+
+  $scope.doSend = function() {
+    $scope.form.$submitted=true;
+    if(!$scope.form.$valid || !$scope.recipients.length || !$scope.suggestions.length) {
+      return;
+    }
+
+    if (!wallet.isLogin()) return $scope.closeModal(); // should never happen
+
+    // Make sure user is still authenticated
+    return wallet.auth({silent: true})
+      .then(function() {
+        return $q.all([
+          // Get keypair only once (if not done here, esInvitation.send() with compute it many times)
+          esWallet.box.getKeypair(wallet.data.keypair),
+          // Ask confirmation
+          UIUtils.alert.confirm('INVITATION.CONFIRM.SEND_INVITATIONS_TO_CERTIFY', undefined, {okText: 'COMMON.BTN_SEND'})
+        ]);
+      })
+      .then(function(res) {
+        var keypair = res && res[0];
+        var confirm = res && res[1];
+        if (!keypair || !confirm) return;
+        UIUtils.loading.show();
+        var time = moment().utc().unix(); // use same date for each invitation
+        var comment = $scope.formData.useComment && $scope.formData.comment && $scope.formData.comment.trim();
+        return $q.all(
+          $scope.recipients.reduce(function (res, recipient) {
+            return res.concat($scope.suggestions.reduce(function (res, identity) {
+              if (!identity.uid || !identity.pubkey) {
+                console.error('Unable to send suggestion for this identity (no uid or pubkey)', identity);
+                return res;
+              }
+              var invitation = {
+                issuer: wallet.data.pubkey,
+                recipient: recipient.pubkey,
+                time: time,
+                content: [identity.uid, identity.pubkey].join('-'),
+                comment: comment
+              };
+              return res.concat(
+                esInvitation.send(invitation, {
+                  wallet: wallet,
+                  type: 'certification'
+                }));
+            }, []));
+          }, []))
+          .then(function() {
+            $scope.closeModal();
+            return UIUtils.loading.hide();
+          })
+          .then(function() {
+            UIUtils.toast.show('INVITATION.INFO.INVITATION_SENT');
+          })
+          .catch(UIUtils.onError('INVITATION.ERROR.SUGGEST_CERTIFICATIONS_FAILED'));
+      });
+  };
+
+  /* -- Modals -- */
+
+  $scope.showSelectRecipientModal = function(e) {
+    if (e.isDefaultPrevented()) return;
+
+    return Modals.showWotLookup({
+      allowMultiple: true,
+      enableFilter: true,
+      title: 'INVITATION.NEW.RECIPIENTS_MODAL_TITLE',
+      help: 'INVITATION.NEW.RECIPIENTS_MODAL_HELP',
+      okText: 'COMMON.BTN_OK',
+      okType: 'button-positive',
+      selection: angular.copy($scope.recipients)
+    })
+      .then(function(res) {
+        if (!res) return; // user cancel
+        $scope.recipients = res;
+      });
+
+  };
+
+  $scope.showSelectSuggestionModal = function(e) {
+    if (e.isDefaultPrevented()) return;
+
+    return Modals.showWotLookup({
+      allowMultiple: true,
+      enableFilter: true,
+      title: 'INVITATION.NEW.SUGGESTION_IDENTITIES_MODAL_TITLE',
+      help: 'INVITATION.NEW.SUGGESTION_IDENTITIES_MODAL_HELP',
+      okText: 'COMMON.BTN_OK',
+      okType: 'button-positive',
+      selection: angular.copy($scope.suggestions)
+    })
+      .then(function(res) {
+        if (!res) return; // user cancel
+        $scope.suggestions = res;
+      });
+  };
+
+
+  $scope.showSelectWalletModal = function() {
+    if (!$scope.enableSelectWallet) return;
+
+    return Modals.showSelectWallet()
+      .then(function(wallet) {
+        if (!wallet || $scope.formData.walletId === wallet.id) return;
+        console.debug("[transfer] Using {" + wallet.id + "} wallet");
+        $scope.wallet = wallet;
+        $scope.walletData = wallet.data;
+        $scope.formData.walletId = wallet.id;
+        $scope.onAmountChanged();
+      });
+  };
+}
+
+
+
+ViewSubscriptionsController.$inject = ['$scope', '$q', '$ionicHistory', 'csWot', 'csWallet', 'UIUtils', 'ModalUtils', 'esSubscription'];
+ModalEmailSubscriptionsController.$inject = ['$scope', 'Modals', 'csSettings', 'esHttp', 'csWot', 'esModals', 'parameters'];angular.module('cesium.es.subscription.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+
+    $stateProvider
+      .state('app.edit_subscriptions', {
+        cache: false,
+        url: "/wallet/subscriptions",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/subscription/edit_subscriptions.html",
+            controller: 'ViewSubscriptionsCtrl'
+          }
+        },
+        data: {
+          auth: true,
+          minData: true
+        }
+      })
+
+      .state('app.edit_subscriptions_by_id', {
+        cache: false,
+        url: "/wallets/:id/subscriptions",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/subscription/edit_subscriptions.html",
+            controller: 'ViewSubscriptionsCtrl'
+          }
+        },
+        data: {
+          login: true,
+          minData: true
+        }
+      });
+
+  }])
+
+  .controller('ViewSubscriptionsCtrl', ViewSubscriptionsController)
+
+  .controller('ModalEmailSubscriptionsCtrl', ModalEmailSubscriptionsController)
+
+;
+
+function ViewSubscriptionsController($scope, $q, $ionicHistory, csWot, csWallet, UIUtils, ModalUtils, esSubscription) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.popupData = {}; // need for the node popup
+  $scope.search = {
+    results: [],
+    loading: true
+  };
+  $scope.emailFrequencies = [
+    {id: "daily", label: "daily"},
+    {id: "weekly", label: "weekly"}
+  ];
+
+  var wallet;
+
+  $scope.enter = function(e, state) {
+
+    // First load
+    if ($scope.loading) {
+
+      wallet = (state.stateParams && state.stateParams.id) ? csWallet.children.get(state.stateParams.id) : csWallet;
+      if (!wallet) {
+        UIUtils.alert.error('ERROR.UNKNOWN_WALLET_ID');
+        return $scope.showHome();
+      }
+
+      wallet.auth({minData: true})
+        .then(function() {
+          UIUtils.loading.hide();
+          return $scope.load();
+        })
+        .then(function() {
+          $scope.showFab('fab-add-subscription-record');
+        })
+        .catch(function(err){
+          if (err === 'CANCELLED') {
+            UIUtils.loading.hide(10);
+            $scope.loading=true; // reset for force reload next time
+            $ionicHistory.goBack();
+            return;
+          }
+          UIUtils.onError('SUBSCRIPTION.ERROR.LOAD_SUBSCRIPTIONS_FAILED')(err);
+        });
+    }
+
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.load = function() {
+    $scope.loading = true; // to avoid the call of doSave()
+    return esSubscription.record.load(wallet.data.pubkey, wallet.data.keypair)
+      .then(function(results) {
+        // Group by type
+        var groups = _.groupBy((results || []), function (record) {
+          return [record.type, record.recipient].join('|');
+        });
+        return _.keys(groups).reduce(function (res, key) {
+          var parts = key.split('|');
+          return res.concat({
+            type: parts[0],
+            recipient: parts[1],
+            items: groups[key]
+          });
+        }, []);
+      })
+      .then(function(results) {
+        return csWot.extendAll(results, 'recipient');
+      })
+      // Display result
+      .then($scope.updateView)
+      .catch(function(err){
+        UIUtils.loading.hide(10);
+        if (err && err.ucode == 404) {
+          $scope.updateView([]);
+          $scope.existing = false;
+        }
+        else {
+          UIUtils.onError('PROFILE.ERROR.LOAD_PROFILE_FAILED')(err);
+        }
+      });
+  };
+
+  $scope.updateView = function(results) {
+    if (results) {
+      $scope.search.results = results;
+    }
+
+    if ($scope.search.results && $scope.search.results.length) {
+      $scope.motion.show();
+    }
+    $scope.search.loading = false;
+  };
+
+  $scope.addSubscription = function() {
+    var type;
+    $scope.showCategoryModal()
+      .then(function(cat) {
+        if (!cat) return;
+        type = cat.id;
+        // get subscription parameters
+        if (type === 'email') {
+          return $scope.showEmailModal();
+        }
+        else {
+          UIUtils.alert.notImplemented();
+        }
+      })
+      .then(function(record) {
+        if (!record) return;
+        UIUtils.loading.show();
+        esSubscription.record.add(record, {wallet: wallet})
+          .then($scope.addToUI)
+          .then(function() {
+            wallet.data.subscriptions = wallet.data.subscriptions || {count: 0};
+            wallet.data.subscriptions.count++;
+            UIUtils.loading.hide();
+            $scope.updateView();
+          })
+          .catch(UIUtils.onError('SUBSCRIPTION.ERROR.ADD_SUBSCRIPTION_FAILED'));
+      });
+  };
+
+  $scope.editSubscription = function(record) {
+
+    // get subscription parameters
+    var promise;
+    var oldRecord = angular.copy(record);
+    if (record.type === 'email') {
+      promise = $scope.showEmailModal(record);
+    }
+    if (!promise) return;
+    return promise
+      .then(function(res) {
+        if (!res) return;
+        UIUtils.loading.show();
+        record.id = oldRecord.id;
+        return esSubscription.record.update(record, wallet)
+          .then(function() {
+            // If recipient change, update in results
+            if (oldRecord.type !== record.type ||
+              oldRecord.recipient !== record.recipient) {
+              $scope.removeFromUI(oldRecord);
+              return $scope.addToUI(record);
+            }
+          })
+          .then(function() {
+            UIUtils.loading.hide();
+            $scope.updateView();
+          })
+          .catch(UIUtils.onError('SUBSCRIPTION.ERROR.UPDATE_SUBSCRIPTION_FAILED'));
+      });
+  };
+
+  $scope.deleteSubscription = function(record, confirm) {
+    if (!record || !record.id) return;
+
+    if (!confirm) {
+      return UIUtils.alert.confirm('SUBSCRIPTION.CONFIRM.DELETE_SUBSCRIPTION')
+        .then(function(confirm) {
+          if (confirm) return $scope.deleteSubscription(record, confirm);
+        });
+    }
+
+    UIUtils.loading.show();
+    esSubscription.record.remove(record.id, {wallet: wallet})
+      .then(function() {
+        wallet.data.subscriptions = wallet.data.subscriptions || {count: 1};
+        wallet.data.subscriptions.count--;
+        $scope.removeFromUI(record);
+        UIUtils.loading.hide();
+      })
+      .catch(UIUtils.onError('SUBSCRIPTION.ERROR.DELETE_SUBSCRIPTION_FAILED'));
+  };
+
+  $scope.removeFromUI = function(record) {
+    var subscriptions = _.findWhere($scope.search.results, {type: record.type, recipient: record.recipient});
+    var index = _.findIndex(subscriptions.items, record);
+    if (index >= 0) {
+      subscriptions.items.splice(index, 1);
+    }
+    if (!subscriptions.items.length) {
+      index = _.findIndex($scope.search.results, subscriptions);
+      $scope.search.results.splice(index, 1);
+    }
+  };
+
+  $scope.addToUI = function(record) {
+    $scope.search.results = $scope.search.results || [];
+    var subscriptions = _.findWhere($scope.search.results,
+      {type: record.type, recipient: record.recipient});
+
+    if (!subscriptions) {
+      subscriptions = {type: record.type, recipient: record.recipient, items: []};
+      return csWot.extendAll([subscriptions], 'recipient')
+        .then(function(){
+          subscriptions.items.push(record);
+          $scope.search.results.push(subscriptions);
+          return record;
+        });
+    }
+
+    subscriptions.items.push(record);
+    return $q.when(record);
+  };
+
+  /* -- modals -- */
+
+  $scope.showCategoryModal = function() {
+    // load categories
+    return esSubscription.category.all()
+      .then(function(categories){
+        return ModalUtils.show('plugins/es/templates/common/modal_category.html', 'ESCategoryModalCtrl as ctrl',
+          {categories : categories},
+          {focusFirstInput: true}
+        );
+      })
+      .then(function(cat){
+        if (cat && cat.parent) {
+          return cat;
+        }
+      });
+  };
+
+  $scope.showEmailModal = function(parameters) {
+    return ModalUtils.show('plugins/es/templates/subscription/modal_email.html','ModalEmailSubscriptionsCtrl',
+      parameters, {focusFirstInput: true});
+  };
+}
+
+
+function ModalEmailSubscriptionsController($scope, Modals, csSettings, esHttp, csWot, esModals, parameters) {
+  'ngInject';
+
+  $scope.frequencies = [
+    {id: "daily", label: "daily"},
+    {id: "weekly", label: "weekly"}
+  ];
+  $scope.formData = parameters || {};
+  $scope.formData.content = $scope.formData.content || {};
+  $scope.formData.content.frequency = $scope.formData.content.frequency || $scope.frequencies[0].id; // set to first value
+  $scope.recipient = {};
+
+  $scope.$on('modal.shown', function() {
+    // Load recipient (uid, name, avatar...)
+    if ($scope.formData.recipient) {
+      $scope.recipient = {pubkey: $scope.formData.recipient};
+      return csWot.extendAll([$scope.recipient]);
+    }
+    else {
+      return esHttp.network.peering.self()
+        .then(function(res){
+          if (!res) return;
+          $scope.formData.recipient = res.pubkey;
+          $scope.recipient = {pubkey: $scope.formData.recipient};
+          return csWot.extendAll([$scope.recipient]);
+        });
+    }
+  });
+
+  // Submit
+  $scope.doSubmit = function() {
+    $scope.form.$submitted = true;
+    if (!$scope.form.$valid || !$scope.formData.content.email || !$scope.formData.content.frequency) return;
+
+    var record = {
+      type: 'email',
+      recipient: $scope.formData.recipient,
+      content: {
+        email: $scope.formData.content.email,
+        locale: csSettings.data.locale.id,
+        frequency: $scope.formData.content.frequency
+      }
+    };
+    $scope.closeModal(record);
+  };
+
+  $scope.cancel = function() {
+    $scope.closeModal();
+  };
+
+  if (!!$scope.subscriptionForm) {
+    $scope.subscriptionForm.$setPristine();
+  }
+
+  $scope.showNetworkLookup = function() {
+    return esModals.showNetworkLookup({
+      enableFilter: true,
+      endpointFilter: esHttp.constants.ES_SUBSCRIPTION_API
+    })
+      .then(function (peer) {
+        if (peer) {
+          $scope.recipient = peer;
+          $scope.formData.recipient = peer.pubkey;
+        }
+      });
+
+  };
+}
+
+
+ESDocumentLookupController.$inject = ['$scope', '$ionicPopover', '$location', '$timeout', 'csSettings', 'csWallet', 'UIUtils', 'esHttp', 'esDocument'];
+ESLastDocumentsController.$inject = ['$scope', '$controller', '$timeout', '$state', '$filter'];angular.module('cesium.es.document.controllers', ['cesium.es.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.document_search', {
+        url: "/data/search/:index/:type?q",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/es/templates/document/lookup.html",
+            controller: 'ESDocumentLookupCtrl'
+          }
+        },
+        data: {
+          silentLocationChange: true
+        }
+      })
+    ;
+  }])
+
+  .controller('ESDocumentLookupCtrl', ESDocumentLookupController)
+
+  .controller('ESLastDocumentsCtrl', ESLastDocumentsController)
+;
+
+function ESDocumentLookupController($scope, $ionicPopover, $location, $timeout,
+                                    csSettings, csWallet, UIUtils, esHttp, esDocument) {
+  'ngInject';
+
+  $scope.search = $scope.search || {
+    loading: true,
+    hasMore: false,
+    text: undefined,
+    index: 'invitation',
+    type: 'certification',
+    results: [],
+    sort: 'time',
+    asc: false,
+    loadingMore: false
+  };
+  $scope.entered = false;
+  $scope.searchTextId = 'documentSearchText';
+  $scope.ionItemClass = 'item-border-large';
+  $scope.defaultSizeLimit = $scope.defaultSizeLimit || (UIUtils.screen.isSmall() ? 50 : 100);
+  $scope.helptipPrefix = 'helptip-document';
+  $scope.compactMode = angular.isDefined($scope.compactMode) ? $scope.compactMode : true;
+  $scope._source = $scope._source || ["issuer", "hash", "time", "creationTime", "title", "message"];
+  $scope.showHeaders = angular.isDefined($scope.showHeaders) ? $scope.showHeaders : true;
+
+  /**
+   * Enter into the view
+   * @param e
+   * @param state
+   */
+  $scope.enter = function(e, state) {
+    if (!$scope.entered) {
+      $scope.entered = true;
+      $scope.search.index = state.stateParams && state.stateParams.index || $scope.search.index;
+      $scope.search.type = state.stateParams && state.stateParams.type || $scope.search.type;
+      $scope.search.text = state.stateParams && state.stateParams.q || $scope.search.text;
+      $scope.search.last = !$scope.search.text;
+      $scope.load();
+    }
+    $scope.expertMode = angular.isDefined($scope.expertMode) ? $scope.expertMode : !UIUtils.screen.isSmall() && csSettings.data.expertMode;
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.computeOptions = function(offset, size) {
+    var options  = {
+      index: $scope.search.index,
+      type: $scope.search.type,
+      from: offset || 0,
+      size: size || $scope.defaultSizeLimit
+    };
+
+    // add sort
+    if ($scope.search.sort) {
+      options.sort = {};
+      options.sort[$scope.search.sort] = (!$scope.search.asc ? "desc" : "asc");
+    }
+    else { // default sort
+      options.sort = {time:'desc'};
+    }
+
+    // Included fields
+    options._source = options._source || $scope._source;
+
+    return options;
+  };
+
+  $scope.load = function(offset, size, silent) {
+    if ($scope.search.error) return;
+
+    var options = $scope.computeOptions(offset, size);
+
+    $scope.search.loading = !silent;
+
+    var searchFn =  $scope.search.last ?
+      esDocument.search(options) :
+      esDocument.searchText($scope.search.text||'', options);
+    return searchFn
+      .then(function(res) {
+        if (!offset) {
+          $scope.search.results = res.hits;
+          $scope.search.took = res.took;
+        }
+        else {
+          $scope.search.results = $scope.search.results.concat(res.hits);
+        }
+        $scope.search.total = res.total;
+
+        UIUtils.loading.hide();
+        $scope.search.loading = false;
+        $scope.search.hasMore = res.hits && res.hits.length > 0 && res.total > $scope.search.results.length;
+
+        $scope.updateView();
+      })
+      .catch(function(err) {
+        $scope.search.results = [];
+        $scope.search.loading = false;
+        $scope.search.error = true;
+        $scope.search.hasMore = false;
+        UIUtils.onError('DOCUMENT.ERROR.LOAD_DOCUMENTS_FAILED')(err)
+          .then(function() {
+            $scope.search.error = false;
+          });
+      });
+  };
+
+  $scope.updateView = function() {
+    if ($scope.motion && $scope.search.results && $scope.search.results.length) {
+      $scope.motion.show({selector: '.list .item.item-document'});
+    }
+    $scope.$broadcast('$$rebind::rebind'); // notify binder
+  };
+
+  $scope.doSearchText = function() {
+    $scope.search.last = $scope.search.text ? false : true;
+    return $scope.load()
+      .then(function() {
+        // Update location href
+        $location.search({q: $scope.search.text}).replace();
+      });
+  };
+
+  $scope.doSearchLast = function() {
+    $scope.search.last = true;
+    $scope.search.text = undefined;
+    return $scope.load();
+  };
+
+  $scope.removeAll = function() {
+    $scope.hideActionsPopover();
+    if (!$scope.search.results || !$scope.search.results.length) return;
+
+    return UIUtils.alert.confirm('DOCUMENT.CONFIRM.REMOVE_ALL')
+      .then(function(confirm) {
+        if (!confirm) return;
+        UIUtils.loading.show();
+        return esDocument.removeAll($scope.search.results)
+          .then(function() {
+            $scope.search.loading = false;
+            return $timeout(function() {
+              UIUtils.toast.show('DOCUMENT.INFO.REMOVED'); // toast
+              return $scope.load();
+            }, 1000 /*waiting propagation*/);
+          })
+          .catch(UIUtils.onError('DOCUMENT.ERROR.REMOVE_ALL_FAILED'));
+      });
+  };
+
+  $scope.remove = function($event, index) {
+    var doc = $scope.search.results[index];
+    if (!doc || $event.defaultPrevented) return;
+    $event.stopPropagation();
+
+    UIUtils.alert.confirm('DOCUMENT.CONFIRM.REMOVE')
+      .then(function(confirm) {
+        if (!confirm) return;
+        return esDocument.remove(doc)
+          .then(function () {
+            $scope.search.results.splice(index,1); // remove from messages array
+            $scope.$broadcast('$$rebind::rebind'); // notify binder
+            UIUtils.toast.show('DOCUMENT.INFO.REMOVED'); // toast
+          })
+          .catch(UIUtils.onError('MESSAGE.ERROR.REMOVE_FAILED'));
+      });
+  };
+
+  $scope.selectDocument = function(event, doc) {
+    console.debug("Selected document: ", doc, esHttp);
+
+    var url = esHttp.getUrl('/{0}/{1}/_search?pretty&q=_id:{2}'.format(doc.index, doc.type, doc.id));
+    return $scope.openLink(event, url);
+  };
+
+  $scope.toggleCompactMode = function() {
+    $scope.compactMode = !$scope.compactMode;
+    $scope.updateView();
+
+    // Workaround to re-initialized the <ion-infinite-loop>
+    if (!$scope.search.hasMore && $scope.search.results.length && $scope.search.type == 'last') {
+      $timeout(function() {
+        $scope.search.hasMore = true;
+      }, 500);
+    }
+  };
+
+  $scope.toggleSort = function(sort){
+    if ($scope.search.sort === sort && !$scope.search.asc) {
+      $scope.search.asc = undefined;
+      $scope.search.sort = undefined;
+    }
+    else {
+      $scope.search.asc = ($scope.search.sort === sort) ? !$scope.search.asc : true;
+      $scope.search.sort = sort;
+    }
+    $scope.load();
+  };
+
+  $scope.showMore = function() {
+    if ($scope.search.loading) return;
+    $scope.search.loadingMore = true;
+    $scope.load(
+      $scope.search.results.length, // from
+      $scope.defaultSizeLimit,
+      true/*silent*/)
+      .then(function() {
+        $scope.search.loadingMore = false;
+        $scope.$broadcast('scroll.infiniteScrollComplete');
+      });
+  };
+
+  $scope.startListenChanges = function() {
+    var now = Date.now();
+    var source = $scope.search.index + '/' + $scope.search.type;
+    var wsChanges = esHttp.websocket.changes(source);
+    return wsChanges.open()
+      .then(function(){
+        console.debug("[ES] [document] Websocket opened in {0} ms".format(Date.now()- now));
+        wsChanges.on(function(change) {
+          if (!$scope.search.last || !change) return; // ignore
+          esDocument.fromHit(change)
+            .then(function(doc) {
+              if (change._operation === 'DELETE') {
+                $scope.onDeleteDocument(doc);
+              }
+              else {
+                $scope.onNewDocument(doc);
+              }
+            });
+        });
+      });
+  };
+
+  $scope.onNewDocument = function(document) {
+    if (!$scope.search.last || $scope.search.loading) return; // skip
+    console.debug("[ES] [document] Detected new document: ", document);
+    var index = _.findIndex($scope.search.results, {id: document.id, index: document.index, type: document.type});
+    if (index < 0) {
+      $scope.search.total++;
+      $scope.search.results.splice(0, 0, document);
+    }
+    else {
+      document.updated = true;
+      $timeout(function() {
+        document.updated = false;
+      }, 2000);
+      $scope.search.results.splice(index, 1, document);
+    }
+    $scope.updateView();
+  };
+
+  $scope.onDeleteDocument = function(document) {
+    if (!$scope.search.last || $scope.search.loading) return; // skip
+    $timeout(function() {
+      var index = _.findIndex($scope.search.results, {id: document.id, index: document.index, type: document.type});
+      if (index < 0) return; // skip if not found
+      console.debug("[ES] [document] Detected document deletion: ", document);
+      $scope.search.results.splice(index, 1);
+      $scope.search.total--;
+      $scope.updateView();
+    }, 750);
+  };
+
+  /* -- Modals -- */
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/es/templates/document/lookup_popover_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+  /* -- watch events -- */
+
+  $scope.resetData = function() {
+    if ($scope.search.loading) return;
+    console.debug("[ES] [document] Resetting data (settings or account may have changed)");
+    // Reset all data
+    $scope.search.results = [];
+    $scope.search.loading = false;
+    $scope.search.total = undefined;
+    $scope.search.loadingMore = false;
+    $scope.entered = false;
+    delete $scope.search.limit;
+  };
+
+  csWallet.api.data.on.unauth($scope, $scope.resetData);
+
+  // for DEV only
+  /*$timeout(function() {
+    // launch default action fo DEV
+   }, 900);
+   */
+}
+
+
+function ESLastDocumentsController($scope, $controller, $timeout, $state, $filter) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('ESDocumentLookupCtrl', {$scope: $scope}));
+
+  $scope.search = {
+    loading: true,
+    hasMore: true,
+    text: undefined,
+    index: 'user,page,group', type: 'profile,record,comment',
+    results: undefined,
+    sort: 'time',
+    asc: false
+  };
+  $scope.expertMode = false;
+  $scope.defaultSizeLimit = 20;
+  $scope._source = ["issuer", "hash", "time", "creationTime", "title", "avatar._content_type", "city", "message", "record", "type"];
+  $scope.showHeaders = false;
+
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+  $scope.selectDocument = function(event, doc) {
+    if (!doc || !event || event.defaultPrevented) return;
+    event.stopPropagation();
+
+    if (doc.index === "user" && doc.type === "profile") {
+      $state.go('app.wot_identity', {pubkey: doc.pubkey, uid: doc.name});
+    }
+    else if (doc.index === "page" && doc.type === "record") {
+      $state.go('app.view_page', {title: doc.title, id: doc.id});
+    }
+    else if (doc.index === "page" && doc.type === "comment") {
+      var anchor = $filter('formatHash')(doc.id);
+      $state.go('app.view_page_anchor', {title: doc.title, id: doc.record, anchor: anchor});
+    }
+    else if (doc.index === "group" && doc.type === "record") {
+      $state.go('app.view_group', {title: doc.title, id: doc.id});
+    }
+    else if (doc.index === "group" && doc.type === "comment") {
+      var anchor = $filter('formatHash')(doc.id);
+      $state.go('app.view_group_anchor', {title: doc.title, id: doc.record, anchor: anchor});
+    }
+    else {
+      console.warn("Click on this kind of document not implement yet!", doc)
+    }
+  };
+
+  // Override parent function computeOptions
+  var inheritedComputeOptions = $scope.computeOptions;
+  $scope.computeOptions = function(offset, size){
+    // Cal inherited function
+    var options = inheritedComputeOptions(offset, size);
+
+    if (!options.sort || options.sort.time) {
+      var side = options.sort && options.sort.time || side;
+      options.sort = [
+        //{'creationTime': side},
+        {'time': side}
+      ];
+    }
+
+    options._source = options._source || $scope._source;
+    options.getTimeFunction = function(doc) {
+      doc.time = doc.creationTime || doc.time;
+      return doc.time;
+    };
+    return options;
+  };
+
+  // Listen for changes
+  $timeout(function() {
+    $scope.startListenChanges();
+  }, 1000);
+}
+
+
+ESLikesController.$inject = ['$scope', '$q', '$timeout', '$translate', '$ionicPopup', 'UIUtils', 'Modals', 'csWallet', 'esHttp', 'esLike'];angular.module('cesium.es.like.controllers', ['ngResource', 'cesium.es.services'])
+
+  .controller('ESLikesCtrl', ESLikesController)
+;
+
+function ESLikesController($scope, $q, $timeout, $translate, $ionicPopup, UIUtils, Modals, csWallet, esHttp, esLike) {
+  'ngInject';
+
+  $scope.entered = false;
+  $scope.abuseData = {};
+  $scope.abuseLevels = [
+    {value: 1, label: 'LOW'},
+    {value: 2, label: 'LOW'}
+  ];
+  $scope.staring = false;
+  $scope.options = $scope.options || {};
+  $scope.options.like = $scope.options.like || {
+    kinds: esLike.constants.KINDS,
+    index: undefined,
+    type: undefined,
+    id: undefined
+  };
+
+  $scope.$on('$recordView.enter', function(e, state) {
+    // First enter
+    if (!$scope.entered) {
+      $scope.entered = false;
+      // Nothing to do: main controller will trigger '$recordView.load' event
+    }
+    // second call (e.g. if cache)
+    else if ($scope.id) {
+      $scope.loadLikes($scope.id);
+    }
+  });
+
+  $scope.$on('$recordView.load', function(event, id) {
+    $scope.id = id || $scope.id;
+    if ($scope.id) {
+      $scope.loadLikes($scope.id);
+    }
+  });
+
+  // Init Like service
+  $scope.initLikes = function() {
+    if (!$scope.likeData) {
+      throw new Error("Missing 'likeData' in scope. Cannot load likes counter");
+    }
+    if (!$scope.options.like.service) {
+      if (!$scope.options.like.index || !$scope.options.like.type) {
+        throw new Error("Missing 'options.like.index' or 'options.like.type' in scope. Cannot load likes counter");
+      }
+      $scope.options.like.service = esLike.instance($scope.options.like.index, $scope.options.like.type);
+    }
+    if (!$scope.options.like.kinds) {
+      // Get scope's kinds (e.g. defined in the parent scope)
+      $scope.options.like.kinds = _.filter(esLike.constants.KINDS, function (kind) {
+        var key = kind.toLowerCase() + 's';
+        return angular.isDefined($scope.likeData[key]);
+      });
+    }
+  };
+
+  $scope.loadLikes = function(id) {
+    if (!$scope.likeData || $scope.likeData.loading) return;// Skip
+
+    id = id || $scope.likeData.id;
+    $scope.initLikes();
+
+    var kinds = $scope.options.like.kinds || [];
+    if (!kinds.length) return; // skip
+
+    $scope.likeData.loading = true;
+    var now = Date.now();
+    console.debug("[ES] Loading counter of {0}... ({1})".format(id.substring(0,8), kinds));
+
+    var issuers = csWallet.isLogin() ? csWallet.pubkeys() : undefined;
+
+    return $q.all(_.map(kinds, function(kind) {
+      var key = kind.toLowerCase() + 's';
+      return $scope.options.like.service.count(id, {issuers: issuers, kind: kind})
+        .then(function (res) {
+          // Store result to scope
+          if ($scope.likeData[key]) {
+            angular.merge($scope.likeData[key], res);
+          }
+        });
+    }))
+      .then(function () {
+        $scope.likeData.id = id;
+        console.debug("[ES] Loading counter of {0} [OK] in {1}ms".format(id.substring(0,8), Date.now()-now));
+
+        if (_.contains(kinds, 'VIEW') && !$scope.canEdit) {
+          $scope.markAsView();
+        }
+
+        // Publish to parent scope (to be able to use it in action popover's buttons)
+        if ($scope.$parent) {
+          console.debug("[ES] [likes] Adding data and functions to parent scope");
+          $scope.$parent.toggleLike = $scope.toggleLike;
+          $scope.$parent.reportAbuse = $scope.reportAbuse;
+        }
+
+        $scope.likeData.loading = false;
+      })
+      .catch(function (err) {
+        console.error(err && err.message || err);
+        $scope.likeData.loading = false;
+      });
+  };
+
+  $scope.toggleLike = function(event, options) {
+    $scope.initLikes();
+    if (!$scope.likeData.id) throw new Error("Missing 'likeData.id' in scope. Cannot apply toggle");
+
+    options = options || {};
+    options.kind = options.kind && options.kind.toUpperCase() || 'LIKE';
+    var key = options.kind.toLowerCase() + 's';
+
+    $scope.likeData[key] = $scope.likeData[key] || {};
+
+    // Avoid too many call
+    if ($scope.likeData[key].loading === true || $scope.likeData.loading) {
+      event.preventDefault();
+      return $q.reject();
+    }
+
+    // Select the wallet, if many
+    if (!options.pubkey) {
+      return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+        .then(function(wallet) {
+          if (!wallet) throw 'CANCELLED';
+          options.pubkey = wallet.data.pubkey;
+          return $scope.toggleLike(event, options); // Loop
+        });
+    }
+
+    var wallet = csWallet.getByPubkey(options.pubkey);
+    if (!wallet) return;
+
+    $scope.likeData[key].loading = true;
+    return wallet.auth({minData: true})
+      .then(function(walletData) {
+        if (!walletData) {
+          UIUtils.loading.hide();
+          return;
+        }
+
+        // Check if member account
+        if (!walletData.isMember) {
+          // TODO: enable this
+          //throw {message: "ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION"};
+        }
+
+        // Apply like
+        options.id = $scope.likeData.id;
+        return $scope.options.like.service.toggle($scope.likeData.id, options);
+      })
+      .then(function(delta) {
+        UIUtils.loading.hide();
+        if (delta !== 0) {
+          $scope.likeData[key].total = ($scope.likeData[key].total || 0) + delta;
+          $scope.likeData[key].wasHitByPubkey = $scope.likeData[key].wasHitByPubkey || {};
+          $scope.likeData[key].wasHitByPubkey[options.pubkey] = delta > 0;
+          $scope.likeData[key].wasHitCount += delta;
+        }
+        $timeout(function() {
+          $scope.likeData[key].loading = false;
+          $scope.$broadcast('$$rebind::like'); // notify binder
+        }, 1000);
+      })
+      .catch(function(err) {
+        $scope.likeData[key].loading = false;
+        if (err === 'CANCELLED') return; // User cancelled
+        console.error(err);
+        UIUtils.onError('LIKE.ERROR.FAILED_TOGGLE_LIKE')(err);
+        event.preventDefault();
+      });
+  };
+
+  $scope.setAbuseForm = function(form) {
+    $scope.abuseForm = form;
+  };
+
+  $scope.showAbuseCommentPopover = function(event) {
+    return $translate(['COMMON.REPORT_ABUSE.TITLE', 'COMMON.REPORT_ABUSE.SUB_TITLE','COMMON.BTN_SEND', 'COMMON.BTN_CANCEL'])
+      .then(function(translations) {
+
+        UIUtils.loading.hide();
+
+        return $ionicPopup.show({
+          templateUrl: 'plugins/es/templates/common/popup_report_abuse.html',
+          title: translations['COMMON.REPORT_ABUSE.TITLE'],
+          subTitle: translations['COMMON.REPORT_ABUSE.SUB_TITLE'],
+          cssClass: 'popup-report-abuse',
+          scope: $scope,
+          buttons: [
+            {
+              text: translations['COMMON.BTN_CANCEL'],
+              type: 'button-stable button-clear gray'
+            },
+            {
+              text: translations['COMMON.BTN_SEND'],
+              type: 'button button-positive  ink',
+              onTap: function(e) {
+                $scope.abuseForm.$submitted=true;
+                if(!$scope.abuseForm.$valid || !$scope.abuseData.comment) {
+                  //don't allow the user to close unless he enters a uid
+                  e.preventDefault();
+                } else {
+                  return $scope.abuseData;
+                }
+              }
+            }
+          ]
+        });
+      })
+      .then(function(res) {
+        $scope.abuseData = {};
+        if (!res || !res.comment) { // user cancel
+          UIUtils.loading.hide();
+          return undefined;
+        }
+        return res;
+      });
+  };
+
+  $scope.reportAbuse = function(event, options) {
+    if (!$scope.likeData || !$scope.likeData.abuses || $scope.likeData.abuses.wasHitCount) return; // skip
+    if ($scope.likeData.abuses.wasHitCount) return; // already report
+
+    options = options || {};
+
+    // Select the wallet, if many
+    if (!options.pubkey) {
+      return (csWallet.children.count() ? Modals.showSelectWallet({displayBalance: false}) : $q.when(csWallet))
+        .then(function(wallet) {
+          if (!wallet) throw 'CANCELLED';
+          options.pubkey = wallet.data.pubkey;
+          return $scope.reportAbuse(event, options); // Loop
+        });
+    }
+
+    var wallet = csWallet.getByPubkey(options.pubkey);
+
+    // Check if member account
+    if (!wallet || !wallet.isMember()) {
+      UIUtils.alert.info("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION");
+      return;
+    }
+
+    if (!options.comment) {
+      // Ask a comment
+      return $scope.showAbuseCommentPopover(event)
+        // Loop, with options.comment filled
+        .then(function(res) {
+          if (!res || !res.comment) return; // Empty comment: skip
+          options.comment = res.comment;
+          options.level = res.level || (res.delete && 5) || undefined;
+          return $scope.reportAbuse(event, options) // Loop, with the comment
+        });
+    }
+
+    // Send abuse report
+    options.kind = 'ABUSE';
+    return $scope.toggleLike(event, options)
+      .then(function() {
+        UIUtils.toast.show('COMMON.REPORT_ABUSE.CONFIRM.SENT')
+      })
+  };
+
+  csWallet.api.data.on.reset($scope, function() {
+    _.forEach($scope.options.like.kinds||[], function(kind) {
+      var key = kind.toLowerCase() + 's';
+      if ($scope.likeData[key]) {
+        $scope.likeData[key].wasHitByPubkey = {};
+        $scope.likeData[key].wasHitCount = 0;
+      }
+    })
+    $scope.$broadcast('$$rebind::like'); // notify binder
+  }, this);
+
+}
+
+
+angular.module('cesium.graph.plugin', [
+    // Services
+    'cesium.graph.services',
+    // Controllers
+    'cesium.graph.common.controllers',
+    'cesium.graph.blockchain.controllers',
+    'cesium.graph.network.controllers',
+    'cesium.graph.currency.controllers',
+    'cesium.graph.account.controllers',
+    'cesium.graph.docstats.controllers',
+    'cesium.graph.synchro.controllers'
+  ])
+;
+
+
+angular.module('cesium.graph.services', [
+    // Services
+    'cesium.graph.color.services',
+    'cesium.graph.data.services'
+  ])
+;
+
+angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es.http.services', 'cesium.es.wot.services'])
+
+  .factory('gpData', ['$rootScope', '$q', '$timeout', 'csHttp', 'esHttp', 'BMA', 'csWot', 'csCache', 'esWot', function($rootScope, $q, $timeout, csHttp, esHttp, BMA, csWot, csCache, esWot) {
+    'ngInject';
+
+    var
+      cachePrefix = 'gpData-',
+      currencyCache = csCache.get(cachePrefix + 'currency-', csCache.constants.SHORT),
+      exports = {
+        node: {},
+        wot: {},
+        blockchain: {},
+        docstat: {},
+        synchro: {
+          execution: {}
+        },
+        raw: {
+          block: {
+            search: esHttp.post('/:currency/block/_search')
+          },
+          blockstat: {
+            search: esHttp.post('/:currency/blockstat/_search')
+          },
+          movement: {
+            search: esHttp.post('/:currency/movement/_search')
+          },
+          user: {
+            event: esHttp.post('/user/event/_search?pretty')
+          },
+          docstat: {
+            search: esHttp.post('/document/stats/_search')
+          },
+          synchro: {
+            search: esHttp.post('/:currency/synchro/_search')
+          }
+
+        },
+        regex: {
+        }
+      };
+
+    function _powBase(amount, base) {
+      return base <= 0 ? amount : amount * Math.pow(10, base);
+    }
+
+    function rawLightInstance(host, port, useSsl, timeout) {
+      port = port || 80;
+      useSsl = angular.isDefined(useSsl) ? useSsl : (port == 443);
+
+      return {
+        docstat: {
+          search: csHttp.post(host, port, '/document/stats/_search', useSsl, timeout)
+        },
+        synchro: {
+          search: csHttp.post(host, port, '/:currency/synchro/_search', useSsl, timeout)
+        }
+      };
+    }
+
+    function _initRangeOptions(options) {
+      options = options || {};
+      options.maxRangeSize = options.maxRangeSize || 30;
+      options.defaultTotalRangeCount = options.defaultTotalRangeCount || options.maxRangeSize*2;
+
+      options.rangeDuration = options.rangeDuration || 'day';
+      options.endTime = options.endTime || moment().utc().add(1, options.rangeDuration).unix();
+      options.startTime = options.startTime ||
+        moment.unix(options.endTime).utc().subtract(options.defaultTotalRangeCount, options.rangeDuration).unix();
+      // Make to sure startTime is never before the currency starts - fix #483
+      if (options.firstBlockTime && options.startTime < options.firstBlockTime) {
+        options.startTime = options.firstBlockTime;
+      }
+      return options;
+    }
+
+    /**
+     * Graph: "blocks count by issuer"
+     * @param currency
+     * @returns {*}
+     */
+    exports.blockchain.countByIssuer = function(currency) {
+
+      var request = {
+        size: 0,
+        aggs: {
+          blocksByIssuer: {
+            terms: {
+              field: 'issuer',
+              size: 0
+            }
+          }
+        }
+      };
+
+      return exports.raw.block.search(request, {currency: currency})
+        .then(function(res) {
+          var aggs = res.aggregations;
+          if (!aggs.blocksByIssuer || !aggs.blocksByIssuer.buckets || !aggs.blocksByIssuer.buckets.length) return;
+
+          var result = {
+            blockCount: res.hits.total
+          };
+          result.data = (aggs.blocksByIssuer.buckets || []).reduce(function(res, agg) {
+              return res.concat(agg.doc_count);
+            }, []);
+          result.issuers = (aggs.blocksByIssuer.buckets || []).reduce(function(res, agg) {
+            return res.concat({pubkey: agg.key});
+          }, []);
+
+          return csWot.extendAll(result.issuers)
+            .then(function() {
+              // Set labels, using name, uid or pubkey
+              result.labels = result.issuers.reduce(function(res, issuer) {
+                return res.concat(issuer.name || issuer.uid || issuer.pubkey.substr(0,8));
+              }, []);
+              return result;
+            });
+        });
+      };
+
+    /**
+     * All block with dividend
+     * @param currency
+     * @returns {*}
+     */
+    exports.blockchain.withDividend = function(currency, options) {
+      options = options || {};
+      var withCache = angular.isDefined(options.withCache) ? options.withCache : true; // enable by default
+
+      var cacheKey = [currency, JSON.stringify(options)].join('-');
+      if (withCache) {
+        var result = currencyCache.get(cacheKey);
+        if (result) {
+          // should be already a promise (previous call still running)
+          if (!result.blocks) {
+            var deferred = $q.defer();
+            result.then(function(res) {
+              //console.debug("[graph] Detected a duplicated request on monetaryMass [" + currency + "]: will use same request result");
+              deferred.resolve(res);
+              return res;
+            });
+            return deferred.promise;
+          }
+          console.debug("[graph] monetaryMass for [" + currency + "] found in cache");
+          return $q.when(result);
+        }
+      }
+
+      var request = {
+        query: {
+          filtered: {
+            filter: {
+              bool: {
+                must: [
+                  {
+                    exists: {
+                      field: 'dividend'
+                    }
+                  }
+                ]
+              }
+            }
+          }
+        },
+        size: options.size || 10000,
+        from: options.from || 0,
+        _source: ["medianTime", "number", "dividend", "monetaryMass", "membersCount", "unitbase"],
+        sort: {
+          "medianTime" : "asc"
+        }
+      };
+
+      var promise = $q.all([
+        // Get the current block (if need)
+        options.withCurrent ?
+          BMA.blockchain.current()
+          .catch(function(err) {
+            // Special case when currency not started
+            if (err && err.ucode == BMA.errorCodes.NO_CURRENT_BLOCK) return undefined;
+            throw err;
+          }) : $q.when(),
+        // Send search request to the ES node
+        exports.raw.block.search(request, {currency: currency})
+      ])
+        .then(function(res) {
+          var currentBlock = res[0];
+          res = res[1];
+          if (!res.hits.total || !res.hits.hits.length) return;
+
+          var result = {};
+          result.blocks = res.hits.hits.reduce(function(res, hit){
+            var block = hit._source;
+
+            // Apply unitbase on dividend
+            block.dividend = _powBase(block.dividend, block.unitbase);
+            delete block.unitbase;
+
+            return res.concat(block);
+          }, []);
+
+          // Add current block
+          if (currentBlock) {
+            var deltaWithLastDividend = result.blocks.length && (currentBlock.medianTime - result.blocks[result.blocks.length-1].medianTime);
+            if (deltaWithLastDividend && deltaWithLastDividend >= 60*60) {
+              // Apply unitbase on dividend
+              currentBlock.dividend = _powBase(currentBlock.dividend, currentBlock.unitbase);
+              delete currentBlock.unitbase;
+              result.blocks.push(currentBlock);
+            }
+          }
+
+          result.times = result.blocks.reduce(function(res, block){
+            return res.concat(block.medianTime);
+          }, []);
+
+          // replace promise in cache, with data
+          currencyCache.put(cacheKey, result);
+          return result;
+        });
+      currencyCache.put(cacheKey, promise);
+
+      return promise;
+    };
+
+    /**
+     * Graph: "tx count"
+     * @param currency
+     * @returns {*}
+     */
+    exports.blockchain.txCount = function(currency, options) {
+
+      options = _initRangeOptions(options);
+
+      var jobs = [];
+
+      var from = moment.unix(options.startTime).utc().startOf(options.rangeDuration);
+      var to = moment.unix(options.endTime).utc().startOf(options.rangeDuration);
+      var ranges = [];
+      while(from.isBefore(to)) {
+
+        ranges.push({
+          from: from.unix(),
+          to: from.add(1, options.rangeDuration).unix()
+        });
+
+        // Flush if max range count, or just before loop condition end (fix #483)
+        var flush = (ranges.length === options.maxRangeSize) || !from.isBefore(to);
+        if (flush) {
+          var request = {
+            size: 0,
+            aggs: {
+              tx: {
+                range: {
+                  field: "medianTime",
+                  ranges: ranges
+                },
+                aggs: {
+                  txCount : {
+                    stats: {
+                      field : "txCount"
+                    }
+                  },
+                  txAmount : {
+                    stats: {
+                      field : "txAmount"
+                    }
+                  }
+                }
+
+              }
+            }
+
+          };
+
+          if (options.issuer) {
+            request.query = {bool: {filter: {term: {issuer: options.issuer}}}};
+          }
+          // prepare next loop
+          ranges = [];
+
+          if (jobs.length === 10) {
+            console.error('Too many parallel jobs!');
+            from = moment.unix(options.endTime).utc(); // stop while
+          }
+          else {
+            jobs.push(
+              exports.raw.blockstat.search(request, {currency: currency})
+                .then(function (res) {
+                  var aggs = res.aggregations;
+                  if (!aggs.tx || !aggs.tx.buckets || !aggs.tx.buckets.length) return;
+                  return (aggs.tx.buckets || []).reduce(function (res, agg) {
+                    return res.concat({
+                      from: agg.from,
+                      to: agg.to,
+                      count: agg.txCount.sum||0,
+                      amount: agg.txAmount.sum || 0,
+                      avgByBlock: Math.round(agg.txCount.avg * 100) / 100,
+                      maxByBlock: agg.txCount.max
+                    });
+                  }, []);
+                })
+            );
+          }
+        }
+      } // loop
+
+      return $q.all(jobs)
+        .then(function(res) {
+          res = res.reduce(function(res, hits){
+            if (!hits || !hits.length) return res;
+            return res.concat(hits);
+          }, []);
+
+          res = _.sortBy(res, 'from');
+
+          return {
+            count: _.pluck(res, 'count'),
+            avgByBlock: _.pluck(res, 'avgByBlock'),
+            maxByBlock: _.pluck(res, 'maxByBlock'),
+            amount:  res.reduce(function(res, hit){
+              return res.concat(hit.amount/100);
+            }, []),
+            times: _.pluck(res, 'from')
+          };
+        });
+    };
+
+    /**
+     * Graph: "block count"
+     * @param currency
+     * @returns {*}
+     */
+    exports.node.blockCount = function(currency, pubkey) {
+
+      var request = {
+        size: 0,
+        query: {bool: {filter: {term: {issuer: pubkey}}}}
+      };
+
+      return exports.raw.block.search(request, {currency: currency})
+        .then(function (res) {
+          return res.hits.total;
+        });
+    };
+
+
+    exports.raw.movement.getByRange = function(currency, pubkey, ranges) {
+      if (!pubkey) {
+        throw new Error('Missing \'pubkey\' argument!');
+      }
+      var request = {
+        size: 0,
+        query: {
+          bool: {
+            should: [
+              {term: {recipient: pubkey}},
+              {term: {issuer: pubkey}}
+            ]
+          }
+        },
+        aggs: {
+          tx: {
+            range: {
+              field: "medianTime",
+              ranges: ranges
+            },
+            aggs: {
+              received: {
+                filter: {term: {recipient: pubkey}},
+                aggs: {
+                  received_stats: {
+                    stats: {
+                      field: "amount"
+                    }
+                  }
+                }
+              },
+              sent: {
+                filter: {term: {issuer: pubkey}},
+                aggs: {
+                  sent_stats: {
+                    stats: {
+                      field: "amount"
+                    }
+                  }
+                }
+              }
+            }
+
+          }
+        }
+      };
+
+      return exports.raw.movement.search(request, {currency: currency})
+        .then(function(res) {
+          var aggs = res.aggregations;
+          if (!aggs.tx || !aggs.tx.buckets || !aggs.tx.buckets.length) return;
+          return (aggs.tx.buckets || []).reduce(function (res, agg) {
+            var sent = agg.sent.sent_stats;
+            var received = agg.received.received_stats;
+            return res.concat({
+              from: agg.from,
+              to: agg.to,
+              sent: sent.sum ? (-sent.sum / 100) : 0,
+              received: received.sum ? (received.sum / 100) : 0
+            });
+          }, []);
+        });
+    };
+
+    exports.raw.movement.getUds = function(currency, ranges, fromMapping) {
+      var request = {
+        size: 0,
+        query: {
+          bool: {
+            should: [
+              {exists: {field: 'dividend'}}
+            ]
+          }
+        },
+        aggs: {
+          ud: {
+            range: {
+              field: 'medianTime',
+              ranges: ranges
+            },
+            aggs: {
+              ud_stats: {
+                stats: {
+                  field: 'dividend'
+                }
+              },
+              unitbase_stats: {
+                stats: {
+                  field: 'unitbase'
+                }
+              }
+            }
+          }
+        }
+      };
+
+      return exports.raw.block.search(request, {currency: currency})
+        .then(function(res) {
+          var aggs = res.aggregations;
+          if (!aggs.ud || !aggs.ud.buckets || !aggs.ud.buckets.length) return;
+          return (aggs.ud.buckets || []).reduce(function (res, agg) {
+            var from = fromMapping[agg.from];
+            res[from] = _powBase(agg.ud_stats.sum, agg.unitbase_stats.min) / 100;
+            return res;
+          }, {});
+        });
+    };
+
+    /**
+     * Graph: "tx amount"
+     * @param currency
+     * @returns {*}
+     */
+    exports.blockchain.movement = function(currency, options) {
+
+      options = _initRangeOptions(options);
+      options.withUD = angular.isDefined(options.withUD) ? options.withUD : true;
+
+      var jobs = [];
+
+      // If need and missing: load membership periods
+      if (options.withUD && !options.memberships) {
+        return esWot.memberships(options.pubkey)
+          .then(function(res) {
+            options.memberships = res || [];
+            // loop, with membership filled
+            return exports.blockchain.movement(currency, options);
+          });
+      }
+
+      var from = moment.unix(options.startTime).utc().startOf(options.rangeDuration);
+      var to = moment.unix(options.endTime).utc().startOf(options.rangeDuration);
+
+      var ranges = [];
+      var udRanges = [];
+      var udFromMapping = {};
+      var memberships = angular.copy(options.memberships).reverse();
+      var membership = memberships.pop();
+
+      function addRange(range) {
+        ranges.push(range);
+        var member = membership && membership.joinTime < range.to;
+        if (member) {
+          var udRange = {
+            from: Math.max(membership.joinTime, range.from),
+            to: Math.min(membership.leaveTime, range.to)
+          };
+          udRanges.push(udRange);
+          udFromMapping[udRange.from] = range.from;
+          while (membership && (membership.leaveTime && membership.leaveTime < range.to)) {
+            membership = memberships.pop();
+          }
+        }
+      }
+
+      // Add a range to get TX before startTime
+      addRange({
+        from: 0,
+        to: from.unix()
+      });
+
+      while(from.isBefore(to)) {
+
+        addRange({
+          from: from.unix(),
+          to: from.add(1, options.rangeDuration).unix()
+        });
+
+        // Flush if max range count, or just before loop condition end (fix #483)
+        var flush = (!jobs.length && ranges.length == options.maxRangeSize+1) ||
+          (jobs.length && ranges.length == options.maxRangeSize) ||
+          !from.isBefore(to);
+        if (flush) {
+          if (udRanges.length) {
+            jobs.push($q.all([
+              exports.raw.movement.getUds(currency, udRanges, udFromMapping),
+              exports.raw.movement.getByRange(currency, options.pubkey, ranges)
+            ])
+            .then(function(res){
+              var udsMap = res[0];
+              res = res[1];
+              // fill UD
+              res.forEach(function(hit){
+                hit.ud = (udsMap[hit.from]) || 0;
+              });
+              return res;
+            }));
+          }
+          else {
+            jobs.push(exports.raw.movement.getByRange(currency, options.pubkey, ranges)
+              .then(function(res){
+                // fill UD
+                res.forEach(function(hit){
+                  hit.ud = 0;
+                });
+                return res;
+              }));
+          }
+
+          // reset ranges for the next loop
+          ranges = [];
+        }
+      } // loop
+
+      return $q.all(jobs)
+        .then(function(res) {
+          // concat all results
+          res = res.reduce(function(res, hits){
+            if (!hits || !hits.length) return res;
+            return res.concat(hits);
+          }, []);
+
+          if (!res.length) return;
+
+          // Sort by 'from' field
+          res = _.sortBy(res, 'from');
+
+          // First item should be history (tx before startTime)
+          var history = res.splice(0,1)[0];
+          var balance = history.received + history.sent + history.ud;
+
+          return {
+            times: _.pluck(res, 'from'),
+            ud: _.pluck(res, 'ud'),
+            sent: _.pluck(res, 'sent'),
+            received: _.pluck(res, 'received'),
+            balance: res.reduce(function(res, hit){
+              balance += hit.received + hit.sent + hit.ud;
+              return res.concat(balance);
+            }, [])
+          };
+        });
+    };
+
+
+    /**
+     * Graph: "tx count"
+     * @param currency
+     * @returns {*}
+     */
+    exports.wot.certifications = function(options) {
+
+      options = _initRangeOptions(options);
+
+      return csWot.load(options.pubkey)
+        .then(function(idty) {
+          if (!idty) return;
+          var res = {};
+          _.forEach(idty.given_cert||[], function(cert){
+            var truncTime = moment.unix(cert.time).utc().startOf(options.rangeDuration).unix();
+            res[truncTime] = res[truncTime] || {time:truncTime,given:0,received:0};
+            res[truncTime].given++;
+          });
+          _.forEach(idty.received_cert||[], function(cert){
+            var truncTime = moment.unix(cert.time).utc().startOf(options.rangeDuration).unix();
+            res[truncTime] = res[truncTime] || {time:truncTime,given:0,received:0};
+            res[truncTime].received++;
+          });
+
+          // Sort by time
+          res = _.sortBy(_.values(res), 'time');
+
+          // create final result
+          var result = {
+            times: _.pluck(res, 'time'),
+            deltaGiven: _.pluck(res, 'given'),
+            deltaReceived: _.pluck(res, 'received')
+          };
+          var sum = 0;
+          result.given = result.deltaGiven.reduce(function(res, delta) {
+            sum += delta;
+            return res.concat(sum);
+          }, []);
+          sum = 0;
+          result.received = result.deltaReceived.reduce(function(res, delta) {
+            sum += delta;
+            return res.concat(sum);
+          }, []);
+          return result;
+
+        });
+    };
+
+
+    exports.wot.memberships = function(options) {
+
+      options = options || {};
+
+      // Get user events on membership state
+      var request = {
+        "size": 1000,
+        "query": {
+          "bool": {
+            "filter": [
+              {"term": {"recipient" : options.pubkey }},
+              {"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }}
+            ]
+          }
+        },
+        "sort" : [
+          { "time" : {"order" : "asc"}}
+        ],
+        _source: ["code", "time"]
+      };
+
+      return exports.raw.user.event(request)
+
+        .then(function(res) {
+          if (!res.hits || !res.hits.total) return;
+
+          // Compute member periods
+          var lastJoinTime;
+          var result = res.hits.hits.reduce(function(res, hit){
+            var isMember = hit._source.code == 'MEMBER_JOIN' || hit._source.code == 'MEMBER_ACTIVE';
+            // If join
+            if (isMember && !lastJoinTime) {
+              lastJoinTime = hit._source.time;
+            }
+            // If leave
+            else if (!isMember && lastJoinTime) {
+              // Add an entry
+              res = res.concat({
+                joinTime: lastJoinTime,
+                leaveTime: hit._source.time
+              });
+              lastJoinTime = 0; // reset
+            }
+            return res;
+          }, []);
+
+          if (lastJoinTime) {
+            // Add last entry if need
+            result.push({
+              joinTime: lastJoinTime,
+              leaveTime: moment().utc().unix()
+            });
+          }
+
+          return result;
+        });
+    };
+
+    /**
+     * Graph: "statictics on ES documents"
+     * @param currency
+     * @returns {*}
+     */
+    exports.docstat.get = function(options) {
+
+      options = _initRangeOptions(options);
+
+      var searchRequest = exports.raw.docstat.search;
+      if (options.server) {
+        var serverParts = options.server.split(':');
+        var host = serverParts[0];
+        var port = serverParts[1] || 80;
+        searchRequest = rawLightInstance(host, port, options.useSsl).docstat.search;
+      }
+
+      var jobs = [];
+
+      var from = moment.unix(options.startTime).utc().startOf(options.rangeDuration);
+      var to = moment.unix(options.endTime).utc().startOf(options.rangeDuration);
+      var ranges = [];
+
+      var processSearchResult = function (res) {
+        var aggs = res.aggregations;
+        return (aggs.range && aggs.range.buckets || []).reduce(function (res, agg) {
+          var item = {
+            from: agg.from,
+            to: agg.to
+          };
+          _.forEach(agg.index && agg.index.buckets || [], function (agg) {
+            var index = agg.key;
+            _.forEach(agg.type && agg.type.buckets || [], function (agg) {
+              var key = (index + '_' + agg.key);
+              item[key] = agg.max.value;
+              if (!indices[key]) indices[key] = true;
+            });
+          });
+          return res.concat(item);
+        }, []);
+      };
+
+      while(from.isBefore(to)) {
+
+        ranges.push({
+          from: from.unix(),
+          to: from.add(1, options.rangeDuration).unix()
+        });
+
+        // Flush if max range count, or just before loop condition end (fix #483)
+        var flush = (ranges.length === options.maxRangeSize) || !from.isBefore(to);
+        if (flush) {
+          var request = {
+            size: 0,
+            aggs: {
+              range: {
+                range: {
+                  field: "time",
+                  ranges: ranges
+                },
+                aggs: {
+                  index : {
+                    terms: {
+                      field: "index",
+                      size: 0
+                    },
+                    aggs: {
+                      type: {
+                        terms: {
+                          field: "type",
+                          size: 0
+                        },
+                        aggs: {
+                          max: {
+                            max: {
+                              field : "count"
+                            }
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+            }
+
+          };
+
+          // prepare next loop
+          ranges = [];
+          var indices = {};
+          var params = {
+            request_cache: angular.isDefined(options.cache) ? options.cache : true // enable by default
+          };
+
+          if (jobs.length === 10) {
+            console.error('Too many parallel jobs!');
+            from = moment.unix(options.endTime).utc(); // stop while
+          }
+          else {
+            jobs.push(
+              searchRequest(request, params)
+                  .then(processSearchResult)
+            );
+          }
+        }
+      } // loop
+
+      return $q.all(jobs)
+        .then(function(res) {
+          res = res.reduce(function(res, hits){
+            if (!hits || !hits.length) return res;
+            return res.concat(hits);
+          }, []);
+
+          res = _.sortBy(res, 'from');
+
+          return _.keys(indices).reduce(function(series, index) {
+            series[index] = _.pluck(res, index);
+            return series;
+          }, {
+            times: _.pluck(res, 'from')
+          });
+        });
+    };
+
+
+    /**
+     * Graph: "statictics on ES documents"
+     * @param currency
+     * @returns {*}
+     */
+    exports.synchro.execution.get = function(options) {
+
+      options = _initRangeOptions(options);
+
+      var searchRequest = exports.raw.synchro.search;
+      if (options.server) {
+        var serverParts = options.server.split(':');
+        var host = serverParts[0];
+        var port = serverParts[1] || 80;
+        searchRequest = rawLightInstance(host, port, options.useSsl).synchro.search;
+      }
+
+      var jobs = [];
+
+      var from = moment.unix(options.startTime).utc().startOf(options.rangeDuration);
+      var to = moment.unix(options.endTime).utc().startOf(options.rangeDuration);
+      var ranges = [];
+      var processSearchResult = function (res) {
+        var aggs = res.aggregations;
+
+        return (aggs.range && aggs.range.buckets || []).reduce(function (res, agg) {
+          var item = {
+            from: agg.from,
+            to: agg.to,
+            inserts: agg.result.inserts.value,
+            updates: agg.result.inserts.value,
+            deletes: agg.result.deletes.value,
+            duration: agg.duration.value
+          };
+          _.forEach(agg.api && agg.api.buckets || [], function (api) {
+            item[api.key] = api.peer_count && api.peer_count.value || 0;
+            if (!apis[api.key]) apis[api.key] = true;
+          });
+
+          return res.concat(item);
+        }, []);
+      };
+
+      while(from.isBefore(to)) {
+
+        ranges.push({
+          from: from.unix(),
+          to: from.add(1, options.rangeDuration).unix()
+        });
+
+        // Flush if max range count, or just before loop condition end (fix #483)
+        var flush = (ranges.length === options.maxRangeSize) || !from.isBefore(to);
+        if (flush) {
+          var request = {
+            size: 0,
+            aggs: {
+              range: {
+                range: {
+                  field: "time",
+                  ranges: ranges
+                },
+                aggs: {
+                  api: {
+                    terms: {
+                      field: "api",
+                      size: 0
+                    },
+                    aggs: {
+                      peer_count: {
+                        cardinality: {
+                          field: "peer"
+                        }
+                      }
+                    }
+                  },
+                  duration: {
+                    sum: {
+                      field: "executionTime"
+                    }
+                  },
+                  result: {
+                    nested: {
+                      path: "result"
+                    },
+                    aggs: {
+                      inserts : {
+                        sum: {
+                          field : "result.inserts"
+                        }
+                      },
+                      updates : {
+                        sum: {
+                          field : "result.updates"
+                        }
+                      },
+                      deletes : {
+                        sum: {
+                          field : "result.deletes"
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+            }
+
+          };
+
+          // prepare next loop
+          ranges = [];
+          var apis = {};
+
+          if (jobs.length === 10) {
+            console.error('Too many parallel jobs!');
+            from = moment.unix(options.endTime).utc(); // stop while
+          }
+          else {
+            jobs.push(
+              searchRequest(request, {currency: options.currency})
+                .then(processSearchResult)
+            );
+          }
+        }
+      } // loop
+
+      return $q.all(jobs)
+        .then(function(res) {
+          res = res.reduce(function(res, hits){
+            if (!hits || !hits.length) return res;
+            return res.concat(hits);
+          }, []);
+
+          res = _.sortBy(res, 'from');
+
+          var series = {
+            times: _.pluck(res, 'from'),
+            inserts: _.pluck(res, 'inserts'),
+            updates: _.pluck(res, 'updates'),
+            deletes: _.pluck(res, 'deletes'),
+            duration: _.pluck(res, 'duration')
+          };
+
+          _.keys(apis).forEach(function(api) {
+            series[api] = _.pluck(res, api);
+          });
+
+          return series;
+        });
+    };
+
+    function cleanAllCache() {
+      console.debug("[graph] Cleaning cache {prefix: '{0}'}...".format(cachePrefix));
+      csCache.clear(cachePrefix);
+    }
+
+    // Listen if node changed
+    esHttp.api.node.on.stop($rootScope, cleanAllCache, this);
+
+    return exports;
+  }])
+
+;
+
+angular.module('cesium.graph.color.services', [])
+
+  .factory('gpColor', function() {
+    'ngInject';
+
+    var
+      constants = {
+        css2Rgb: {
+          'white': [255, 255, 255],
+          'assertive': [239, 71, 58], // ok
+          'calm': [17, 193, 243], // ok
+          'positive': [56, 126, 245], // ok
+          'balanced': [51, 205, 95], // ok
+          'energized': [255, 201, 0], // ok
+          'royal': [136, 106, 234], // ok
+          'gray': [150, 150, 150], // ok
+          'stable': [248, 248, 248] // ok
+        }
+      },
+      exports = {
+        scale: {}
+      };
+
+
+    /**
+     * Compute colors scale
+     * @param count
+     * @param opacity
+     * @param startColor
+     * @param startState
+     * @returns {Array}
+     */
+    exports.scale.custom = function (count, opacity, startColor, startState) {
+
+      function _state2side(state) {
+        switch (state) {
+          case 0:
+            return 0;
+          case 1:
+            return -1;
+          case 2:
+            return 0;
+          case 3:
+            return 1;
+        }
+      }
+
+      // From [0,1]
+      opacity = opacity>0 && opacity|| 0.55;
+
+      var defaultStateSize = Math.round(count / 2.5/*=4 states max*/);
+
+      // Start color [r,v,b]
+      var color = startColor && startColor.length == 3 ? angular.copy(startColor) : [255, 0, 0]; // Red
+
+      // Colors state: 0=keep, 1=decrease, 2=keep, 3=increase
+      var states = startState && startState.length == 3 ? angular.copy(startState) : [0, 2, 3]; // R=keep, V=keep, B=increase
+
+      var steps = startColor ? [
+        Math.round(255 / defaultStateSize),
+        Math.round(255 / defaultStateSize),
+        Math.round(255 / defaultStateSize)
+      ] : [
+        Math.round((color[0] - 50) / defaultStateSize),
+        Math.round((255 - color[1]) / defaultStateSize),
+        Math.round((255 - color[2]) / defaultStateSize)
+      ];
+
+
+      // Compute start sides (1=increase, 0=flat, -1=decrease)
+      var sides = [
+        _state2side(states[0]),
+        _state2side(states[1]),
+        _state2side(states[2])];
+
+      // Use to detect when need to change a 'flat' state (when state = 0 or 2)
+      var stateCounters = [0, 0, 0];
+
+      var result = [];
+      for (var i = 0; i < count; i++) {
+        for (var j = 0; j < 3; j++) {
+          color[j] += sides[j] * steps[j];
+          stateCounters[j]++;
+          // color has reach a limit
+          if (((color[j] <= 0 || color[j] >= 255) && sides[j] !== 0) ||
+            (sides[j] === 0 && stateCounters[j] == defaultStateSize)) {
+            // Max sure not overflow limit
+            if (color[j] <= 0) {
+              color[j] = 0;
+            }
+            else if (color[j] >= 255) {
+              color[j] = 255;
+            }
+            // Go to the next state, in [0..3]
+            states[j] = (states[j] + 1) % 4;
+
+            // Update side from this new state
+            sides[j] = _state2side(states[j]);
+
+            // Reset state counter
+            stateCounters[j] = 0;
+          }
+        }
+
+        // Add the color to result
+        result.push('rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + opacity + ')');
+
+      }
+      return result;
+    };
+
+    exports.scale.default = function () {
+      return exports.scale.custom(25);
+    };
+
+    /**
+     * Create a array with the given color
+     **/
+    exports.scale.fix = function (length, color) {
+      return Array.apply(null, Array(length||25))
+        .map(String.prototype.valueOf, color||exports.rgba.calm(0.5));
+    };
+
+    // Create a function to generate a rgba string, from
+    exports.rgba = _.mapObject(constants.css2Rgb, function(rgbArray){
+      var prefix = 'rgba(' + rgbArray.join(',') + ',';
+      return function(opacity){
+        if (!opacity || opacity < 0) {
+          return 'rgb(' + rgbArray.join(',') + ')';
+        }
+        return prefix + opacity + ')';
+      };
+    });
+
+    exports.rgba.translucent = function() {
+      return 'rgb(0,0,0,0)';
+    };
+
+    exports.constants = constants;
+
+    return exports;
+  })
+
+;
+
+
+GpCurrencyAbstractController.$inject = ['$scope', '$filter', '$ionicPopover', '$ionicHistory', '$state', 'csSettings', 'csCurrency', 'esHttp', 'UIUtils'];
+angular.module('cesium.graph.common.controllers', ['cesium.services'])
+
+  .controller('GpCurrencyAbstractCtrl', GpCurrencyAbstractController)
+;
+
+function GpCurrencyAbstractController($scope, $filter, $ionicPopover, $ionicHistory, $state, csSettings, csCurrency, esHttp, UIUtils) {
+  'ngInject';
+
+  $scope.loading = true;
+  $scope.formData = $scope.formData || {
+    useRelative: csSettings.data.useRelative,
+    timePct: 100,
+    rangeDuration: 'day',
+    firstBlockTime: 0,
+    scale: 'linear',
+    hide: [],
+    beginAtZero: true
+  };
+  $scope.formData.useRelative = false; /*angular.isDefined($scope.formData.useRelative) ?
+    $scope.formData.useRelative : csSettings.data.useRelative;*/
+  $scope.scale = 'linear';
+  $scope.height = undefined;
+  $scope.width = undefined;
+  $scope.maintainAspectRatio = true;
+  $scope.times = [];
+
+  function _truncDate(time) {
+    return moment.unix(time).utc().startOf($scope.formData.rangeDuration).unix();
+  }
+
+  $scope.enter = function (e, state) {
+    if ($scope.loading) {
+
+      if (state && state.stateParams) {
+        // remember state, to be able to refresh location
+        $scope.stateName = state && state.stateName;
+        $scope.stateParams = angular.copy(state && state.stateParams||{});
+
+        if (!$scope.formData.currency && state && state.stateParams && state.stateParams.currency) { // Currency parameter
+          $scope.formData.currency = state.stateParams.currency;
+        }
+        if (state.stateParams.t) {
+          $scope.formData.timePct = state.stateParams.t;
+        }
+        else if (state.stateParams.timePct) {
+          $scope.formData.timePct = state.stateParams.timePct;
+        }
+        if (state.stateParams.stepUnit) {
+          $scope.formData.rangeDuration = state.stateParams.stepUnit;
+        }
+        if (state.stateParams.scale) {
+          $scope.formData.scale = state.stateParams.scale;
+        }
+        // Allow to hide some dataset
+        if (state.stateParams.hide) {
+          $scope.formData.hide = state.stateParams.hide.split(',').reduce(function(res, index){
+            return res.concat(parseInt(index));
+          }, []);
+        }
+      }
+
+      // Should be override by subclasses
+      $scope.init(e, state);
+
+      // Make sure there is currency, or load it not
+      if (!$scope.formData.currency) {
+        return csCurrency.get()
+          .then(function (currency) {
+            $scope.formData.currency = currency ? currency.name : null;
+            $scope.formData.firstBlockTime = currency ? _truncDate(currency.firstBlockTime) : 0;
+            if (!$scope.formData.firstBlockTime){
+              console.warn('[graph] currency.firstBlockTime not loaded ! Should have been loaded by currrency service!');
+            }
+            $scope.formData.currencyAge = _truncDate(moment().utc().unix()) - $scope.formData.firstBlockTime;
+
+            return $scope.enter(e, state);
+          });
+      }
+
+      $scope.load()  // Should be override by subclasses
+        .then(function () {
+          // Update scale
+          $scope.setScale($scope.formData.scale);
+          // Hide some dataset by index (read from state params)
+          $scope.updateHiddenDataset();
+
+          $scope.loading = false;
+        });
+    }
+  };
+  $scope.$on('$csExtension.enter', $scope.enter);
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+  $scope.updateLocation = function() {
+    if (!$scope.stateName) return;
+
+    $ionicHistory.nextViewOptions({
+      disableAnimate: true,
+      disableBack: true,
+      historyRoot: true
+    });
+
+    $scope.stateParams = $scope.stateParams || {};
+    $scope.stateParams.t = ($scope.formData.timePct >= 0 && $scope.formData.timePct < 100) ? $scope.formData.timePct : undefined;
+    $scope.stateParams.stepUnit = $scope.formData.rangeDuration != 'day' ? $scope.formData.rangeDuration : undefined;
+    $scope.stateParams.hide = $scope.formData.hide && $scope.formData.hide.length ? $scope.formData.hide.join(',') : undefined;
+    $scope.stateParams.scale = $scope.formData.scale != 'linear' ?$scope.formData.scale : undefined;
+
+    $state.go($scope.stateName, $scope.stateParams, {
+      reload: false,
+      inherit: true,
+      notify: false}
+    );
+  };
+
+  // Allow to fixe size, form a template (e.g. in a 'ng-init' tag)
+  $scope.setSize = function(height, width, maintainAspectRatio) {
+    $scope.height = height;
+    $scope.width = width;
+    $scope.maintainAspectRatio = angular.isDefined(maintainAspectRatio) ? maintainAspectRatio : $scope.maintainAspectRatio;
+  };
+
+  // When parent view execute a refresh action
+  $scope.$on('csView.action.refresh', function(event, context) {
+    if (!context || context == 'currency') {
+      return $scope.load();
+    }
+  });
+
+  $scope.init = function(e, state) {
+    // Should be override by subclasses
+  };
+
+  $scope.load = function() {
+    // Should be override by subclasses
+  };
+
+  $scope.toggleScale = function() {
+    $scope.setScale($scope.formData.scale === 'linear' ? 'logarithmic' : 'linear');
+    $scope.updateLocation();
+  };
+
+  $scope.setScale = function(scale) {
+    $scope.hideActionsPopover();
+    $scope.formData.scale = scale;
+
+    if (!$scope.options || !$scope.options.scales || !$scope.options.scales.yAxes) return;
+
+    var format = $filter('formatInteger');
+
+    _.forEach($scope.options.scales.yAxes, function(yAxe, index) {
+      yAxe.type = scale;
+      yAxe.ticks = yAxe.ticks || {};
+      if (scale == 'linear') {
+        yAxe.ticks.beginAtZero = angular.isDefined($scope.formData.beginAtZero) ? $scope.formData.beginAtZero : true;
+        delete yAxe.ticks.min;
+        yAxe.ticks.callback = function(value) {
+          return format(value);
+        };
+      }
+      else {
+        //yAxe.ticks.min = 0;
+        delete yAxe.ticks.beginAtZero;
+        delete yAxe.ticks.callback;
+        yAxe.ticks.callback = function(value, index) {
+          if (!value) return;
+          if (Math.log10(value)%1 === 0 || Math.log10(value/3)%1 === 0) {
+            return format(value);
+          }
+          return '';
+        };
+      }
+    });
+  };
+
+  $scope.setRangeDuration = function(rangeDuration) {
+    $scope.hideActionsPopover();
+    if ($scope.formData && rangeDuration == $scope.formData.rangeDuration) return;
+
+    $scope.formData.rangeDuration = rangeDuration;
+
+    // Restore default values
+    delete $scope.formData.startTime;
+    delete $scope.formData.endTime;
+    delete $scope.formData.rangeDurationSec;
+    //$scope.formData.timePct = 100;
+
+    // Reload data
+    $scope.load();
+    // Update location
+    $scope.updateLocation();
+  };
+
+  $scope.updateHiddenDataset = function(datasetOverride) {
+    datasetOverride = datasetOverride || $scope.datasetOverride || {};
+
+    _.forEach($scope.formData.hide||[], function(index) {
+      if (!datasetOverride[index]) return; // skip invalid index
+
+      // Hide the dataset (stroke the legend)
+      datasetOverride[index].hidden = true;
+
+      // If this dataset has an yAxis, hide it (if not used elsewhere)
+      var yAxisID = datasetOverride[index].yAxisID;
+      var yAxe = yAxisID && $scope.options && $scope.options.scales && _.findWhere($scope.options.scales.yAxes||[], {id: yAxisID});
+      if (yAxisID && yAxe) {
+        var yAxisDatasetCount = _.filter(datasetOverride, function(dataset) {
+          return dataset.yAxisID === yAxisID;
+        }).length;
+        if (yAxisDatasetCount == 1) {
+          yAxe.display = false;
+        }
+      }
+
+    });
+  };
+
+  $scope.onLegendClick = function(e, legendItem) {
+    var index = legendItem.datasetIndex;
+    var ci = this.chart;
+    var meta = ci.getDatasetMeta(index);
+
+    // Hide/show the dataset
+    meta.hidden = meta.hidden === null? !ci.data.datasets[index].hidden : null;
+
+    // Update yAxis display (if used by only ONE dataset)
+    if (ci.config && ci.config.data && ci.config.data.datasets) {
+      var yAxisDatasetCount = _.filter(ci.config.data.datasets, function(dataset) {
+        return dataset.yAxisID && dataset.yAxisID === meta.yAxisID;
+      }).length;
+      if (yAxisDatasetCount === 1) {
+        ci.scales[meta.yAxisID].options.display = !(meta.hidden === true);
+      }
+    }
+
+    // We hid a dataset ... rerender the chart
+    ci.update();
+
+    // Update window location
+    $scope.formData.hide = $scope.formData.hide||[];
+    $scope.formData.hide = meta.hidden ?
+      _.union($scope.formData.hide, [index]) :
+      _.difference($scope.formData.hide, [index]);
+    $scope.updateLocation();
+  };
+
+  $scope.goPreviousRange = function() {
+    if ($scope.loadingRange) return;
+    $scope.loadingRange = true;
+
+    $scope.formData.startTime -= $scope.times.length * $scope.formData.rangeDurationSec;
+    if ($scope.formData.startTime < $scope.formData.firstBlockTime) {
+      $scope.formData.startTime = $scope.formData.firstBlockTime;
+    }
+    $scope.formData.endTime = $scope.formData.startTime + $scope.times.length * $scope.formData.rangeDurationSec;
+
+    // Reload data
+    $scope.load().then(function(){
+      // Update location
+      $scope.updateLocation();
+
+      $scope.loadingRange = false;
+    });
+  };
+
+  $scope.goNextRange = function() {
+    if ($scope.loadingRange) return;
+    $scope.loadingRange = true;
+    $scope.formData.startTime += $scope.times.length * $scope.formData.rangeDurationSec;
+    if ($scope.formData.startTime > $scope.formData.firstBlockTime + $scope.formData.currencyAge - $scope.formData.timeWindow) {
+      $scope.formData.startTime = $scope.formData.firstBlockTime + $scope.formData.currencyAge - $scope.formData.timeWindow;
+    }
+    $scope.formData.endTime = $scope.formData.startTime + $scope.times.length * $scope.formData.rangeDurationSec;
+
+    // Reload data
+    $scope.load().then(function(){
+      // Update location
+      $scope.updateLocation();
+
+      $scope.loadingRange = false;
+    });
+  };
+
+  $scope.onRangeChanged = function() {
+    if ($scope.loadingRange) return;
+    $scope.loadingRange = true;
+
+    $scope.formData.startTime = $scope.formData.firstBlockTime + (parseFloat($scope.formData.timePct) / 100) * ($scope.formData.currencyAge - $scope.formData.timeWindow) ;
+    $scope.formData.endTime = $scope.formData.startTime + $scope.times.length * $scope.formData.rangeDurationSec;
+
+    // Reload data
+    $scope.load().then(function(){
+      // Update location
+      $scope.updateLocation();
+
+      $scope.loadingRange = false;
+    });
+  };
+
+  $scope.updateRange = function(startTime, endTime, updateTimePct) {
+    updateTimePct = angular.isDefined(updateTimePct) ? updateTimePct : true;
+
+    $scope.formData.startTime = startTime;
+    $scope.formData.endTime = endTime;
+    $scope.formData.timeWindow = $scope.formData.timeWindow || $scope.formData.endTime - $scope.formData.startTime;
+    $scope.formData.rangeDurationSec = $scope.formData.rangeDurationSec || $scope.formData.timeWindow / ($scope.times.length-1);
+
+    if (updateTimePct) {
+      $scope.formData.timePct = Math.ceil(($scope.formData.startTime - $scope.formData.firstBlockTime) * 100 /
+        ($scope.formData.currencyAge - $scope.formData.timeWindow));
+    }
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/graph/templates/common/popover_range_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+}
+
+
+GpBlockchainTxCountController.$inject = ['$scope', '$controller', '$q', '$state', '$filter', '$translate', 'gpData', 'gpColor'];
+GpBlockchainIssuersController.$inject = ['$scope', '$controller', '$q', '$state', '$translate', 'gpColor', 'gpData'];
+angular.module('cesium.graph.blockchain.controllers', ['chart.js', 'cesium.services', 'cesium.graph.services'])
+
+  .config(['$stateProvider', function($stateProvider) {
+    'ngInject';
+
+    $stateProvider
+
+      .state('app.blockchain_stats', {
+        url: "/blockchain/stats?currency&stepUnit&t&hide&scale",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/blockchain/view_stats.html"
+          }
+        }
+      })
+
+      .state('app.currency_blockchain_stats', {
+        url: "/:currency/blockchain/stats",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/blockchain/view_stats.html"
+          }
+        }
+      })
+    ;
+  }])
+
+  .controller('GpBlockchainTxCountCtrl', GpBlockchainTxCountController)
+  .controller('GpBlockchainIssuersCtrl', GpBlockchainIssuersController)
+;
+
+
+function GpBlockchainTxCountController($scope, $controller, $q, $state, $filter, $translate, gpData, gpColor) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.displayRightAxis = true;
+
+  $scope.init = function(e, state) {
+    if (state && state.stateParams) {
+
+      // get the pubkey
+      if (!$scope.formData.issuer && state && state.stateParams && state.stateParams.pubkey) { // Currency parameter
+        $scope.formData.issuer = state.stateParams.pubkey;
+      }
+    }
+  };
+
+  $scope.load = function(updateTimePct) {
+
+    var formData = $scope.formData;
+
+    return $q.all([
+
+      $translate($scope.formData.issuer?
+        'GRAPH.BLOCKCHAIN.TX_AMOUNT_PUBKEY_TITLE':
+        'GRAPH.BLOCKCHAIN.TX_AMOUNT_TITLE', formData),
+
+      // translate i18n keys
+      $translate(['GRAPH.BLOCKCHAIN.TX_AMOUNT_LABEL',
+        'GRAPH.BLOCKCHAIN.TX_COUNT_LABEL',
+        'GRAPH.BLOCKCHAIN.TX_AVG_BY_BLOCK',
+        'COMMON.DATE_PATTERN',
+        'COMMON.DATE_SHORT_PATTERN',
+        'COMMON.DATE_MONTH_YEAR_PATTERN']),
+
+      // get data
+      gpData.blockchain.txCount($scope.formData.currency, formData)
+    ])
+      .then(function(result) {
+
+        var title = result[0];
+
+        var translations = result[1];
+        var datePatterns = {
+          hour: translations['COMMON.DATE_PATTERN'],
+          day: translations['COMMON.DATE_SHORT_PATTERN'],
+          month: translations['COMMON.DATE_MONTH_YEAR_PATTERN']
+        };
+
+        result = result[2];
+
+        if (!result || !result.times) return; // no data
+        $scope.times = result.times;
+
+        var formatInteger = $filter('formatInteger');
+        var formatAmount =  $filter('formatDecimal');
+        $scope.currencySymbol = $filter('currencySymbolNoHtml')($scope.formData.currency, $scope.formData.useRelative);
+
+        // Data
+        if ($scope.formData.rangeDuration != 'hour') {
+          $scope.data = [
+            result.amount,
+            result.count
+          ];
+        }
+        else {
+          $scope.data = [
+            result.amount,
+            result.count
+          ];
+        }
+
+        // Labels
+        var labelPattern = datePatterns[$scope.formData.rangeDuration];
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(moment.unix(time).local().format(labelPattern));
+        }, []);
+
+        // Colors
+        $scope.colors = gpColor.scale.fix(result.times.length);
+
+        // Update range options with received values
+        $scope.updateRange(result.times[0], result.times[result.times.length-1], updateTimePct);
+
+        // Options
+        $scope.options = {
+          responsive: true,
+          maintainAspectRatio: true,
+          title: {
+            display: true,
+            text: title
+          },
+          scales: {
+            yAxes: [
+              {
+                id: 'y-axis-amount',
+                position: 'left'
+              },
+              {
+                id: 'y-axis-count',
+                display: $scope.displayRightAxis,
+                position: 'right',
+                gridLines: {
+                  drawOnChartArea: false
+                }
+              }
+            ]
+          },
+          legend: {
+            display: $scope.displayRightAxis,
+            onClick: $scope.onLegendClick
+          },
+          tooltips: {
+            enabled: true,
+            mode: 'index',
+            callbacks: {
+              label: function(tooltipItems, data) {
+                if (tooltipItems.datasetIndex === 0) {
+                  return data.datasets[tooltipItems.datasetIndex].label +
+                    ': ' + formatAmount(tooltipItems.yLabel) +
+                    ' ' + $scope.currencySymbol;
+                }
+                return data.datasets[tooltipItems.datasetIndex].label +
+                  ': ' + tooltipItems.yLabel;
+              }
+            }
+          }
+        };
+
+        // Override dataset config
+        $scope.datasetOverride = [
+          {
+            yAxisID: 'y-axis-amount',
+            type: 'bar',
+            label: translations['GRAPH.BLOCKCHAIN.TX_AMOUNT_LABEL'],
+            hoverBackgroundColor: gpColor.rgba.calm(0.6)
+          },
+          {
+            yAxisID: 'y-axis-count',
+            type: 'line',
+            label: translations['GRAPH.BLOCKCHAIN.TX_COUNT_LABEL'],
+            fill: false,
+            borderColor: gpColor.rgba.gray(0.5),
+            borderWidth: 2,
+            backgroundColor: gpColor.rgba.gray(0.5),
+            pointBackgroundColor: gpColor.rgba.gray(0.5),
+            pointBorderColor: gpColor.rgba.white(),
+            pointHoverBackgroundColor: gpColor.rgba.gray(1),
+            pointHoverBorderColor: gpColor.rgba.translucent(),
+            pointRadius: 3
+          }
+        ];
+      });
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var from = $scope.times[item._index];
+    var to = moment.unix(from).utc().add(1, $scope.formData.rangeDuration).unix();
+    var query = '_exists_:transactions AND medianTime:>={0} AND medianTime:<{1}'.format(from, to);
+    if ($scope.formData.issuer) {
+      query += ' AND issuer:' + $scope.formData.issuer;
+    }
+    $state.go('app.blockchain_search', {q: query});
+  };
+
+}
+
+
+function GpBlockchainIssuersController($scope, $controller, $q, $state, $translate, gpColor, gpData) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.load = function() {
+    return $q.all([
+      $translate([
+        'GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_TITLE',
+        'GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_LABEL'
+      ]),
+      gpData.blockchain.countByIssuer($scope.formData.currency)
+    ])
+      .then(function(result) {
+        var translations =  result[0];
+        result = result[1];
+        if (!result || !result.data) return;
+
+        // Data
+        $scope.data = result.data;
+
+        // Labels
+        $scope.labels = result.labels;
+
+        // Data to keep (for click or label)
+        $scope.blockCount = result.blockCount;
+        $scope.issuers = result.issuers;
+
+        // Options
+        $scope.barOptions = {
+          responsive: true,
+          maintainAspectRatio: $scope.maintainAspectRatio,
+          title: {
+            display: true,
+            text: translations['GRAPH.BLOCKCHAIN.BLOCKS_ISSUERS_TITLE']
+          },
+          scales: {
+            yAxes: [{
+              type: 'linear',
+              ticks: {
+                beginAtZero: true
+              }
+            }]
+          }
+        };
+
+        // Colors
+        $scope.colors = gpColor.scale.custom(result.data.length);
+
+      });
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var issuer = $scope.issuers[item._index];
+    $state.go('app.wot_identity', issuer);
+  };
+}
+
+
+GpPeerViewExtendController.$inject = ['$scope', '$timeout', 'PluginService', 'esSettings', 'csCurrency', 'gpData'];
+angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.services'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+        .extendState('app.network', {
+          points: {
+            'blockchain-buttons': {
+              templateUrl: "plugins/graph/templates/network/view_network_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+
+        .extendState('app.view_peer', {
+          points: {
+            'general': {
+              templateUrl: "plugins/graph/templates/network/view_peer_extend.html",
+              controller: 'GpPeerViewExtendCtrl'
+            }
+          }
+        })
+
+        .extendState('app.es_network', {
+          points: {
+            'documents-buttons': {
+              templateUrl: "plugins/graph/templates/network/view_es_network_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+
+        .extendState('app.view_es_peer', {
+          points: {
+            'general': {
+              templateUrl: "plugins/graph/templates/network/view_es_peer_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+      ;
+
+      $stateProvider
+        .state('app.view_peer_stats', {
+          url: "/network/peer/:pubkey/stats",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/graph/templates/network/view_peer_stats.html",
+              controller: 'GpBlockchainTxCountCtrl'
+            }
+          }
+        });
+    }
+  }])
+
+  .controller('GpPeerViewExtendCtrl', GpPeerViewExtendController)
+
+;
+
+function GpPeerViewExtendController($scope, $timeout, PluginService, esSettings, csCurrency, gpData) {
+  'ngInject';
+
+  $scope.extensionPoint = PluginService.extensions.points.current.get();
+  $scope.enable = esSettings.isEnable();
+  $scope.loading = true;
+  $scope.node = $scope.node || {};
+
+  esSettings.api.state.on.changed($scope, function(enable) {
+    $scope.enable = enable;
+  });
+
+  /**
+   * Enter into the view
+   * @param e
+   * @param state
+   */
+  $scope.enter = function(e, state) {
+
+    if (!$scope.node.currency && state && state.stateParams && state.stateParams.currency) { // Currency parameter
+      $scope.node.currency = state.stateParams.currency;
+    }
+
+    // Make sure there is currency, or load if not
+    if (!$scope.node.currency) {
+      return csCurrency.get()
+        .then(function(currency) {
+          $scope.node.currency = currency ? currency.name : null;
+          return $scope.enter(e, state);
+        });
+    }
+
+    // Make sure there is pubkey, or wait for parent load to be finished
+    if (!$scope.node.pubkey) {
+      return $timeout(function () {
+        return $scope.enter(e, state);
+      }, 500);
+    }
+
+    // load
+    return $scope.load();
+  };
+  $scope.$on('$csExtension.enter', $scope.enter);
+
+  $scope.load = function() {
+    if (!$scope.node.currency && !$scope.node.pubkey) return;
+    console.info("[Graph] [peer] Loading blocks count for [{0}]".format($scope.node.pubkey.substr(0, 8)));
+
+    return gpData.node.blockCount($scope.node.currency, $scope.node.pubkey)
+      .then(function(count) {
+        $scope.blockCount = count;
+        $scope.loading = false;
+      });
+  };
+}
+
+
+GpCurrencyViewExtendController.$inject = ['$scope', 'PluginService', 'UIUtils', 'esSettings'];
+GpCurrencyMonetaryMassController.$inject = ['$scope', '$controller', '$q', '$state', '$translate', 'UIUtils', 'gpColor', 'gpData', '$filter', 'csSettings'];
+GpCurrencyDUController.$inject = ['$scope', '$q', '$controller', '$translate', 'gpColor', 'gpData', '$filter', 'UIUtils'];
+GpCurrencyMembersCountController.$inject = ['$scope', '$controller', '$q', '$state', '$translate', 'gpColor', 'gpData', '$filter'];
+angular.module('cesium.graph.currency.controllers', ['chart.js', 'cesium.graph.services', 'cesium.graph.common.controllers'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    $stateProvider
+      .state('app.currency.tab_parameters_stats', {
+        url: "/parameters/stats",
+        views: {
+          'tab-parameters': {
+            templateUrl: "plugins/graph/templates/currency/tabs/tab_parameters_stats.html"
+          }
+        }
+      })
+      .state('app.currency.tab_wot_stats', {
+        url: "/community/stats",
+        views: {
+          'tab-wot': {
+            templateUrl: "plugins/graph/templates/currency/tabs/tab_wot_stats.html",
+            controller: 'GpCurrencyMembersCountCtrl'
+          }
+        }
+      })
+      .state('app.currency.tab_network_stats', {
+        url: "/network/stats",
+        views: {
+          'tab-network': {
+            templateUrl: "plugins/graph/templates/currency/tabs/tab_network_stats.html"
+          }
+        }
+      })
+      .state('app.currency.tab_blocks_stats', {
+        url: "/blocks/stats",
+        views: {
+          'tab-blocks': {
+            templateUrl: "plugins/graph/templates/currency/tabs/tab_blocks_stats.html"
+          }
+        }
+      })
+      .state('app.currency_stats_lg', {
+        url: "/currency/stats/lg?hide&scale",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/currency/view_stats_lg.html"
+          }
+        }
+      });
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      PluginServiceProvider
+        .extendStates(['app.currency_name', 'app.currency', 'app.currency_name_lg', 'app.currency_lg'], {
+          points: {
+            'parameters-actual': {
+              templateUrl: "plugins/graph/templates/currency/view_currency_extend.html",
+              controller: 'GpCurrencyViewExtendCtrl'
+            },
+            'wot-actual': {
+              templateUrl: "plugins/graph/templates/currency/view_currency_extend.html",
+              controller: 'GpCurrencyViewExtendCtrl'
+            },
+            'network-actual': {
+              templateUrl: "plugins/graph/templates/currency/view_currency_extend.html",
+              controller: 'GpCurrencyViewExtendCtrl'
+            }
+          }
+        })
+        .extendStates(['app.currency.tab_blocks'], {
+          points: {
+            'buttons': {
+              templateUrl: "plugins/graph/templates/currency/tab_blocks_extend.html",
+              controller: 'GpCurrencyViewExtendCtrl'
+            }
+          }
+        })
+      ;
+    }
+  }])
+
+
+  .controller('GpCurrencyViewExtendCtrl', GpCurrencyViewExtendController)
+
+  .controller('GpCurrencyMonetaryMassCtrl', GpCurrencyMonetaryMassController)
+
+  .controller('GpCurrencyDUCtrl', GpCurrencyDUController)
+
+  .controller('GpCurrencyMembersCountCtrl', GpCurrencyMembersCountController)
+;
+
+function GpCurrencyViewExtendController($scope, PluginService, UIUtils, esSettings) {
+  'ngInject';
+
+  $scope.extensionPoint = PluginService.extensions.points.current.get();
+  $scope.enable = esSettings.isEnable();
+  $scope.smallscreen = UIUtils.screen.isSmall();
+
+  esSettings.api.state.on.changed($scope, function(enable) {
+    $scope.enable = enable;
+  });
+}
+
+function GpCurrencyMonetaryMassController($scope, $controller, $q, $state, $translate, UIUtils, gpColor, gpData, $filter, csSettings) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.formData.useRelative = angular.isDefined($scope.formData.useRelative) ?
+    $scope.formData.useRelative :
+    csSettings.data.useRelative;
+  $scope.displayShareAxis = true;
+  $scope.hiddenDatasets = [];
+
+  $scope.init = function(e, state) {
+    // nothing to do here
+  };
+
+  $scope.onUseRelativeChanged = function() {
+    if (!$scope.loading) {
+      $scope.load();
+    }
+  };
+  $scope.$watch('formData.useRelative', $scope.onUseRelativeChanged);
+
+  var truncAmount = function(value) {
+    return Math.trunc(value*100)/100;
+  };
+
+  $scope.load = function(from, size) {
+    from = from || 0;
+    size = size || 10000;
+
+    return $q.all([
+      $translate(['GRAPH.CURRENCY.MONETARY_MASS_TITLE',
+        'GRAPH.CURRENCY.MONETARY_MASS_LABEL',
+        'GRAPH.CURRENCY.MONETARY_MASS_SHARE_LABEL']),
+      gpData.blockchain.withDividend($scope.formData.currency, {
+        from: from,
+        size: size
+      })
+    ])
+      .then(function(result) {
+        var translations = result[0];
+        result = result[1];
+        if (!result || !result.times) return;
+        $scope.times = result.times;
+
+        // Choose a date formatter, depending on the blocks period
+        var blocksPeriod = result.times[result.times.length-1] - result.times[0];
+        var formatDate;
+        if (blocksPeriod < 31557600/* less than 1 year */) {
+          formatDate = $filter('medianDateShort');
+        }
+        else {
+          formatDate = $filter('formatDateMonth'); //see #683
+        }
+
+        var formatAmount =  $filter('formatDecimal');
+        $scope.currencySymbol = $filter('currencySymbolNoHtml')($scope.formData.currency, $scope.formData.useRelative);
+
+        // Data: relative
+        var data = [];
+        if($scope.formData.useRelative) {
+
+          // M/N
+          data.push(
+            result.blocks.reduce(function(res, block) {
+              return res.concat(truncAmount(block.monetaryMass / block.dividend / block.membersCount));
+            }, []));
+
+          // Mass
+          data.push(
+            result.blocks.reduce(function(res, block) {
+              return res.concat(truncAmount(block.monetaryMass / block.dividend));
+            }, []));
+        }
+
+        // Data: quantitative
+        else {
+          // M/N
+          data.push(
+            result.blocks.reduce(function(res, block) {
+              return res.concat(truncAmount(block.monetaryMass / block.membersCount / 100));
+            }, []));
+
+          // Mass
+          data.push(
+            result.blocks.reduce(function(res, block) {
+              return res.concat(block.monetaryMass / 100);
+            }, []));
+        }
+        $scope.data = data;
+
+        // Labels
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(formatDate(time));
+        }, []);
+
+        // Colors
+        $scope.colors = gpColor.scale.fix(result.times.length);
+
+        // Options
+        $scope.options = {
+          responsive: true,
+          maintainAspectRatio: $scope.maintainAspectRatio,
+          title: {
+            display: true,
+            text: translations['GRAPH.CURRENCY.MONETARY_MASS_TITLE']
+          },
+          legend: {
+            display: $scope.displayShareAxis,
+            onClick: $scope.onLegendClick
+          },
+          scales: {
+            yAxes: [
+              {
+                id: 'y-axis-mn'
+              },
+              {
+                id: 'y-axis-mass',
+                display: $scope.displayShareAxis,
+                position: 'right',
+                gridLines: {
+                  drawOnChartArea: false
+                }
+              },
+
+            ]
+          },
+          tooltips: {
+            enabled: true,
+            mode: 'index',
+            callbacks: {
+              label: function(tooltipItems, data) {
+                return data.datasets[tooltipItems.datasetIndex].label +
+                  ': ' + formatAmount(tooltipItems.yLabel) +
+                  ' ' + $scope.currencySymbol;
+              }
+            }
+          }
+        };
+
+        $scope.datasetOverride = [
+          {
+            yAxisID: 'y-axis-mn',
+            type: 'line',
+            label: translations['GRAPH.CURRENCY.MONETARY_MASS_SHARE_LABEL'],
+            borderWidth: 2,
+            pointRadius: 0,
+            pointHitRadius: 4,
+            pointHoverRadius: 3
+          },
+          {
+            yAxisID: 'y-axis-mass',
+            type: 'line',
+            label: translations['GRAPH.CURRENCY.MONETARY_MASS_LABEL'],
+            fill: false,
+            showLine: true,
+            borderColor: gpColor.rgba.energized(),
+            borderWidth: 1,
+            backgroundColor: gpColor.rgba.energized(),
+            pointBackgroundColor: gpColor.rgba.energized(),
+            pointBorderColor: gpColor.rgba.energized(),
+            pointHoverBackgroundColor: gpColor.rgba.energized(),
+            pointHoverBorderColor: gpColor.rgba.energized(),
+            pointRadius: 0,
+            pointHitRadius: 4,
+            pointHoverRadius: 3
+          }];
+
+        $scope.setScale($scope.scale);
+
+        // Keep only block number (need for click)
+        $scope.blocks = result.blocks.reduce(function(res, block) {
+          return res.concat(block.number);
+        }, []);
+      });
+
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var number = $scope.blocks[item._index];
+    $state.go('app.view_block', {number: number});
+  };
+
+  /* -- Popover -- */
+
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/graph/templates/currency/popover_monetary_mass_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+}
+
+
+function GpCurrencyDUController($scope, $q, $controller, $translate, gpColor, gpData, $filter, UIUtils) {
+  'ngInject';
+
+  $scope.formData = {
+    scale: 'linear',
+    beginAtZero: false
+  };
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyMonetaryMassCtrl', {$scope: $scope}));
+
+
+  $scope.load = function(from, size) {
+    from = from || 0;
+    size = size || 10000;
+
+    return $q.all([
+      $translate([
+        'GRAPH.CURRENCY.UD_TITLE',
+        'COMMON.UNIVERSAL_DIVIDEND']),
+      gpData.blockchain.withDividend($scope.formData.currency, {
+        from: from,
+        size: size
+      })
+    ])
+      .then(function(result) {
+        var translations = result[0];
+        result = result[1];
+        if (!result || !result.times) return;
+        $scope.times = result.times;
+
+        // Choose a date formatter, depending on the blocks period
+        var blocksPeriod = result.times[result.times.length-1] - result.times[0];
+        var dateFilter;
+        if (blocksPeriod < 31557600/* less than 1 year */) {
+          dateFilter = $filter('medianDateShort');
+        }
+        else {
+          dateFilter = $filter('formatDateMonth');
+        }
+
+        var formatAmount =  $filter('formatDecimal');
+        $scope.currencySymbol = $filter('currencySymbolNoHtml')($scope.formData.currency, false);
+
+        // Data
+        $scope.data = [
+          result.blocks.reduce(function(res, block) {
+            return res.concat(block.dividend / 100);
+          }, [])
+        ];
+
+        // Labels
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(dateFilter(time));
+        }, []);
+
+        // Colors
+        $scope.colors = result.blocks.reduce(function(res) {
+          return res.concat(gpColor.rgba.calm(0.5));
+        }, []);
+
+        // Options
+        $scope.options = {
+          responsive: true,
+          maintainAspectRatio: $scope.maintainAspectRatio,
+          title: {
+            display: true,
+            text: translations['GRAPH.CURRENCY.UD_TITLE']
+          },
+          scales: {
+            yAxes: [
+              {
+                id: 'y-axis-ud',
+                ticks: {
+                  beginAtZero: $scope.formData.beginAtZero
+                }
+              }
+            ]
+          },
+          tooltips: {
+            enabled: true,
+            mode: 'index',
+            callbacks: {
+              label: function(tooltipItems, data) {
+                return data.datasets[tooltipItems.datasetIndex].label +
+                  ': ' + formatAmount(tooltipItems.yLabel) +
+                  ' ' + $scope.currencySymbol;
+              }
+            }
+          }
+        };
+        $scope.setScale($scope.scale);
+
+        $scope.datasetOverride = [
+          {
+            yAxisID: 'y-axis-ud',
+            type: 'line',
+            label: translations['COMMON.UNIVERSAL_DIVIDEND'],
+            borderWidth: 2,
+            pointRadius: 0,
+            pointHitRadius: 4,
+            pointHoverRadius: 3
+          }];
+
+        // Keep only block number (need for click)
+        $scope.blocks = result.blocks.reduce(function(res, block) {
+          return res.concat(block.number);
+        }, []);
+      });
+
+  };
+
+  /* -- Popover -- */
+  $scope.showActionsPopover = function(event) {
+    UIUtils.popover.show(event, {
+      templateUrl: 'plugins/graph/templates/currency/popover_monetary_mass_actions.html',
+      scope: $scope,
+      autoremove: true,
+      afterShow: function(popover) {
+        $scope.actionsPopover = popover;
+      }
+    });
+  };
+
+  $scope.hideActionsPopover = function() {
+    if ($scope.actionsPopover) {
+      $scope.actionsPopover.hide();
+      $scope.actionsPopover = null;
+    }
+  };
+
+}
+
+
+function GpCurrencyMembersCountController($scope, $controller, $q, $state, $translate, gpColor, gpData, $filter) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.load = function(from, size) {
+    from = from || 0;
+    size = size || 10000;
+
+    return $q.all([
+      $translate(['GRAPH.CURRENCY.MEMBERS_COUNT_TITLE', 'GRAPH.CURRENCY.MEMBERS_COUNT_LABEL']),
+      gpData.blockchain.withDividend($scope.formData.currency, {
+        from: from,
+        size: size,
+        withCurrent: true
+      })
+    ])
+      .then(function(result) {
+        var translations = result[0];
+        result = result[1];
+
+        if (!result || !result.times) return;
+        $scope.times = result.times;
+
+        // Choose a date formatter, depending on the blocks period
+        var blocksPeriod = result.times[result.blocks.length-1] - result.times[0];
+        var dateFilter;
+        if (blocksPeriod < 31557600/* less than 1 year*/) {
+          dateFilter = $filter('medianDateShort');
+        }
+        else {
+          dateFilter = $filter('formatDateMonth');
+        }
+
+        // Format time
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(dateFilter(time));
+        }, []);
+
+        // Members count graph: -------------------------
+        $scope.options = {
+            responsive: true,
+            maintainAspectRatio: $scope.maintainAspectRatio,
+            title: {
+              display: true,
+              text: translations['GRAPH.CURRENCY.MEMBERS_COUNT_TITLE']
+            },
+            scales: {
+              xAxes: [{
+                position: 'bottom'
+              }],
+              yAxes: [{
+                id: 'y-axis-1',
+                ticks: {
+                  beginAtZero: false
+                }
+              }]
+            }
+          };
+        $scope.datasetOverride = [{
+            yAxisID: 'y-axis-1',
+            type: 'line',
+            label: translations['GRAPH.CURRENCY.MEMBERS_COUNT_LABEL'],
+            borderWidth: 2,
+            pointRadius: 0,
+            pointHitRadius: 4,
+            pointHoverRadius: 3
+          }];
+
+        // Data
+        $scope.data = [
+          result.blocks.reduce(function(res, block) {
+            return res.concat(block.membersCount);
+          }, [])
+        ];
+
+        // Colors
+        $scope.colors = gpColor.scale.fix(result.blocks.length);
+      });
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    if (!item._index) {
+      $state.go('app.view_block', {number: 0});
+      return;
+    }
+    var from = $scope.times[item._index-1];
+    var to = moment.unix(from).utc().add(1, 'day').unix();
+    $state.go('app.blockchain_search', {
+      q: '(_exists_:joiners OR _exists_:leavers OR _exists_:revoked OR _exists_:excluded) AND medianTime:>{0} AND medianTime:<={1}'.format(from, to)
+    });
+  };
+
+
+}
+
+
+GpAccountBalanceController.$inject = ['$scope', '$controller', '$q', '$state', '$filter', '$translate', 'csWot', 'gpData', 'gpColor', 'csWallet'];
+GpAccountSumTxController.$inject = ['$scope', '$controller', '$filter', '$state', 'csTx', 'gpColor'];
+GpAccountCertificationController.$inject = ['$scope', '$controller', '$q', '$state', '$filter', '$translate', 'gpData', 'gpColor', 'csWallet'];
+angular.module('cesium.graph.account.controllers', ['chart.js', 'cesium.graph.services'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+        .extendState('app.view_wallet_tx', {
+          points: {
+            'buttons': {
+              templateUrl: "plugins/graph/templates/account/view_wallet_tx_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+
+        .extendState('app.view_wallet_tx_by_id', {
+          points: {
+            'buttons': {
+              templateUrl: "plugins/graph/templates/account/view_wallet_tx_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+
+        .extendStates(['app.wot_identity_tx_uid', 'app.wot_identity_tx_uid_lg'], {
+          points: {
+            'buttons': {
+              templateUrl: "plugins/graph/templates/account/view_identity_tx_extend.html",
+              controller: 'ESExtensionCtrl'
+            }
+          }
+        })
+      ;
+
+      $stateProvider
+        .state('app.view_wallet_stats', {
+          url: "/wallet/stats?t&stepUnit&hide&scale",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/graph/templates/account/view_stats.html"
+            }
+          },
+          data: {
+            auth: true
+          }
+        })
+
+        .state('app.view_wallet_stats_by_id', {
+          url: "/wallets/:id/stats?t&stepUnit&hide&scale",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/graph/templates/account/view_stats.html"
+            }
+          },
+          data: {
+            auth: true
+          }
+        })
+
+        .state('app.wot_identity_stats', {
+          url: "/wot/:pubkey/stats?t&stepUnit&hide&scale",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/graph/templates/account/view_stats.html"
+            }
+          }
+        });
+    }
+  }])
+
+  .controller('GpAccountBalanceCtrl', GpAccountBalanceController)
+
+  .controller('GpAccountSumTxCtrl', GpAccountSumTxController)
+
+  .controller('GpAccountCertificationCtrl', GpAccountCertificationController)
+;
+
+function GpAccountBalanceController($scope, $controller, $q, $state, $filter, $translate, csWot, gpData, gpColor, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.init = function(e, state) {
+
+      if (state && state.stateParams && state.stateParams.pubkey) { // Currency parameter
+        $scope.formData.pubkey = state.stateParams.pubkey;
+      }
+      else if(csWallet.isLogin()) {
+        $scope.formData.pubkey = csWallet.data.pubkey;
+      }
+
+  };
+
+  var defaultSetScale = $scope.setScale;
+  $scope.setScale = function(scale) {
+    // linear scale: sent values as negative
+    if (scale === 'linear') {
+      $scope.data[$scope.data.length-2] = _.map($scope.data[$scope.data.length-2], function(value) {
+        return -1 * Math.abs(value);
+      });
+    }
+    // log scale: sent values as positive
+    else {
+      $scope.data[$scope.data.length-2] = _.map($scope.data[$scope.data.length-2], function(value) {
+        return Math.abs(value);
+      });
+    }
+
+    // call default implementation
+    defaultSetScale(scale);
+  };
+
+  $scope.load = function(updateTimePct) {
+
+    updateTimePct = angular.isDefined(updateTimePct) ? updateTimePct : true;
+
+    var withUD = true;
+
+    return csWot.load($scope.formData.pubkey, null/*uid*/, {cache: true})
+      .then(function(identity) {
+        $scope.identity = identity;
+        withUD = $scope.identity.isMember || $scope.identity.wasMember;
+
+        return $q.all([
+
+          $translate('GRAPH.ACCOUNT.BALANCE_TITLE', $scope.formData),
+
+          // translate i18n keys
+          $translate(['GRAPH.ACCOUNT.UD_LABEL',
+            'GRAPH.ACCOUNT.TX_RECEIVED_LABEL',
+            'GRAPH.ACCOUNT.TX_SENT_LABEL',
+            'GRAPH.ACCOUNT.UD_ACCUMULATION_LABEL',
+            'GRAPH.ACCOUNT.TX_ACCUMULATION_LABEL',
+            'GRAPH.ACCOUNT.BALANCE_LABEL',
+            'COMMON.DATE_PATTERN',
+            'COMMON.DATE_SHORT_PATTERN',
+            'COMMON.DATE_MONTH_YEAR_PATTERN']),
+
+          // get data
+          gpData.blockchain.movement($scope.formData.currency, angular.copy($scope.formData, {withUD: withUD}))
+        ]);
+      })
+      .then(function(result) {
+        var title = result[0];
+        var translations = result[1];
+        result = result[2];
+
+        if (!result || !result.times) return; // no data
+        $scope.times = result.times;
+
+        var formatDecimal =  $filter('formatDecimal');
+        $scope.currencySymbol = $filter('currencySymbolNoHtml')($scope.formData.currency, $scope.formData.useRelative);
+
+        // Data
+        $scope.data = [
+          result.ud,
+          result.received,
+          result.sent,
+          result.balance
+        ];
+
+        var datePatterns = {
+          hour: translations['COMMON.DATE_PATTERN'],
+          day: translations['COMMON.DATE_SHORT_PATTERN'],
+          month: translations['COMMON.DATE_MONTH_YEAR_PATTERN']
+        };
+        // Labels
+        var labelPattern = datePatterns[$scope.formData.rangeDuration];
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(moment.unix(time).local().format(labelPattern));
+        }, []);
+
+        // Colors
+        $scope.colors = gpColor.scale.fix(result.times.length);
+
+        // Update range with received values
+        $scope.updateRange(result.times[0], result.times[result.times.length-1], updateTimePct);
+
+        // Options
+        $scope.options = {
+          responsive: true,
+          maintainAspectRatio: true,
+          title: {
+            display: true,
+            text: title
+          },
+          scales: {
+            xAxes: [{
+              stacked: true
+            }],
+            yAxes: [
+              {
+                id: 'y-axis-left',
+                type: 'linear',
+                position: 'left',
+                stacked: true
+              }
+            ]
+          },
+          legend: {
+            display: true,
+            onClick: $scope.onLegendClick
+          },
+          tooltips: {
+            enabled: true,
+            mode: 'index',
+            callbacks: {
+              label: function(tooltipItems, data) {
+                return data.datasets[tooltipItems.datasetIndex].label +
+                  ': ' +
+                  (!tooltipItems.yLabel ? '0' :
+                    (formatDecimal(tooltipItems.yLabel) + ' ' + $scope.currencySymbol));
+              }
+            }
+          }
+        };
+
+        $scope.datasetOverride = [
+          {
+            yAxisID: 'y-axis-left',
+            type: 'bar',
+            label: translations['GRAPH.ACCOUNT.UD_LABEL'],
+            backgroundColor: gpColor.rgba.energized(0.3),
+            hoverBackgroundColor: gpColor.rgba.energized(0.5),
+            borderWidth: 1
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'bar',
+            label: translations['GRAPH.ACCOUNT.TX_RECEIVED_LABEL'],
+            backgroundColor: gpColor.rgba.positive(0.4),
+            hoverBackgroundColor: gpColor.rgba.positive(0.6),
+            borderWidth: 1
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'bar',
+            label: translations['GRAPH.ACCOUNT.TX_SENT_LABEL'],
+            backgroundColor: gpColor.rgba.assertive(0.4),
+            hoverBackgroundColor: gpColor.rgba.assertive(0.6),
+            borderWidth: 1
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'line',
+            label: translations['GRAPH.ACCOUNT.BALANCE_LABEL'],
+            fill: 'origin',
+            borderColor: gpColor.rgba.calm(0.5),
+            borderWidth: 2,
+            pointBackgroundColor: gpColor.rgba.calm(0.5),
+            pointBorderColor: gpColor.rgba.white(),
+            pointHoverBackgroundColor: gpColor.rgba.calm(1),
+            pointHoverBorderColor: 'rgba(0,0,0,0)',
+            pointRadius: 3,
+            lineTension: 0.1
+          }
+        ];
+
+
+        if (!withUD) {
+          // remove UD
+          $scope.data.splice(0,1);
+          $scope.datasetOverride.splice(0,1);
+        }
+        else {
+          // FIXME: fund why UD data not working well
+          // remove UD
+          /*$scope.data.splice(0,1);
+          $scope.datasetOverride.splice(0,1);*/
+        }
+      });
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var from = $scope.times[item._index];
+    var to = moment.unix(from).utc().add(1, $scope.formData.rangeDuration).unix();
+    var query = 'medianTime:>={0} AND medianTime:<{1}'.format(from, to);
+    if ($scope.formData.pubkey) {
+      query += ' AND (transactions.issuers:' + $scope.formData.pubkey + ' OR transactions.outputs:*' + $scope.formData.pubkey + ')';
+    }
+    $state.go('app.blockchain_search', {q: query});
+  };
+}
+
+//TODO : Avoid csTx loading, switch to Elasticsearch
+function GpAccountSumTxController($scope, $controller, $filter, $state, csTx, gpColor) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  // When opening the view
+  $scope.init= function(e, state) {
+
+    // Get the pubkey (from URL params) and store it in the page context ($scope)
+    $scope.pubkey = (state && state.stateParams && state.stateParams.pubkey);
+
+  };
+
+  // When opening the view
+  $scope.load = function(e, state) {
+    if (!$scope.pubkey) return;
+
+    // Load account TX data
+    return csTx.load($scope.pubkey, -1)
+      .then(function(result) {
+
+        if (result && result.tx && result.tx.history) {
+          //Charts data
+          $scope.inputChart = $scope.computeChartData(_.filter(result.tx.history, function(tx) {
+            return tx.amount > 0;
+          }));
+          $scope.outputChart = $scope.computeChartData(_.filter(result.tx.history, function(tx) {
+            return tx.amount < 0;
+          }));
+        }
+      });
+  };
+
+  // Load chart data: received amount by pubkey
+  $scope.computeChartData = function(txArray) {
+
+    var formatPubkey = $filter('formatPubkey');
+
+    // Sum TX amount, with a group by pubkey
+    var sumByPubkeys = {};
+    _.forEach(txArray, function (tx) {
+      sumByPubkeys[tx.pubkey] = sumByPubkeys[tx.pubkey] || {
+          label: tx.name || tx.uid || formatPubkey(tx.pubkey),
+          pubkey: tx.pubkey,
+          sum: 0
+        };
+      sumByPubkeys[tx.pubkey].sum += Math.abs(tx.amount);
+    });
+
+    // Get values (from the map), then sort (desc) on sum
+    var sumItems = _.sortBy(_.values(sumByPubkeys), 'sum').reverse();
+
+    // Divide total amount by 100
+    _.each(sumItems, function(item) {
+      item.sum = item.sum / 100;
+    });
+
+    // Return arrays expected by angular-chart
+    return {
+      data: _.pluck(sumItems, 'sum'),
+      labels: _.pluck(sumItems, 'label'),
+      pubkeys: _.pluck(sumItems, 'pubkey'),
+      colors: gpColor.scale.custom(
+        Math.max(10, sumItems.length) // avoid strange colors
+      )
+    };
+  };
+
+  $scope.onInputChartClick = function(data, e, item) {
+    if (!item) return;
+    var pubkey = $scope.inputChart.pubkeys[item._index];
+    $state.go('app.wot_identity', {pubkey: pubkey});
+  };
+
+  $scope.onOutputChartClick = function(data, e, item) {
+    if (!item) return;
+    var pubkey = $scope.outputChart.pubkeys[item._index];
+    $state.go('app.wot_identity', {pubkey: pubkey});
+  };
+}
+
+
+/**
+ * Graph that display received/sent certification
+ */
+function GpAccountCertificationController($scope, $controller, $q, $state, $filter, $translate, gpData, gpColor, csWallet) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.init = function(e, state) {
+      if (state && state.stateParams && state.stateParams.pubkey) { // Currency parameter
+        $scope.formData.pubkey = state.stateParams.pubkey;
+      }
+      else if(csWallet.isLogin()) {
+        $scope.formData.pubkey = csWallet.data.pubkey;
+      }
+
+      // for DEV only
+      //$scope.formData.pubkey = '38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE';
+  };
+
+  $scope.load = function(updateTimePct) {
+
+    var formData = $scope.formData;
+
+    return $q.all([
+
+      $translate('GRAPH.ACCOUNT.CERTIFICATION_TITLE', formData),
+
+      // translate i18n keys
+      $translate(['GRAPH.ACCOUNT.GIVEN_CERT_LABEL',
+        'GRAPH.ACCOUNT.RECEIVED_CERT_LABEL',
+        'GRAPH.ACCOUNT.GIVEN_CERT_DELTA_LABEL',
+        'GRAPH.ACCOUNT.RECEIVED_CERT_DELTA_LABEL',
+        'COMMON.DATE_PATTERN',
+        'COMMON.DATE_SHORT_PATTERN',
+        'COMMON.DATE_MONTH_YEAR_PATTERN']),
+
+      // get data
+      gpData.wot.certifications(formData)
+    ])
+      .then(function(result) {
+
+        var title = result[0];
+        var translations = result[1];
+        result = result[2];
+
+        if (!result || !result.times) return; // no data
+        $scope.times = result.times;
+
+        var formatInteger = $filter('formatInteger');
+
+        // Data
+        $scope.data = [
+          result.deltaReceived,
+          result.received,
+          result.deltaGiven,
+          result.given
+        ];
+
+        // Labels
+        $scope.labels = result.labels;
+
+        var displayFormats = {
+          hour: translations['COMMON.DATE_PATTERN'],
+          day: translations['COMMON.DATE_SHORT_PATTERN'],
+          month: translations['COMMON.DATE_MONTH_YEAR_PATTERN']
+        };
+        var displayFormat = displayFormats[$scope.formData.rangeDuration];
+        // Labels
+        $scope.labels = result.times.reduce(function(res, time) {
+          return res.concat(moment.unix(time).local().format(displayFormat));
+        }, []);
+
+        // Colors
+        $scope.colors = gpColor.scale.fix(result.times.length);
+
+        // Update options with received values
+        $scope.updateRange(result.times[0], result.times[result.times.length-1], updateTimePct);
+
+        // Options
+        $scope.options = {
+          responsive: true,
+          maintainAspectRatio: true,
+          title: {
+            display: true,
+            text: title
+          },
+          scales: {
+            yAxes: [
+              {
+                id: 'y-axis-left',
+                type: 'linear',
+                position: 'left'
+              },
+              {
+                id: 'y-axis-hide',
+                type: 'linear',
+                display: false,
+                position: 'right'
+              }
+            ]
+          },
+          legend: {
+            display: true
+          },
+          tooltips: {
+            enabled: true,
+            mode: 'index',
+            callbacks: {
+              label: function(tooltipItems, data) {
+                // Should add a '+' before value ?
+                var addPlus = (tooltipItems.datasetIndex === 0 || tooltipItems.datasetIndex === 2) && tooltipItems.yLabel > 0;
+                return data.datasets[tooltipItems.datasetIndex].label +
+                  ': ' +
+                  (addPlus ? '+' : '') +
+                  !tooltipItems.yLabel ? '0' : formatInteger(tooltipItems.yLabel);
+              }
+            }
+          }
+        };
+
+        $scope.datasetOverride = [
+          {
+            yAxisID: 'y-axis-left',
+            type: 'bar',
+            label: translations['GRAPH.ACCOUNT.RECEIVED_CERT_DELTA_LABEL'],
+            borderColor: gpColor.rgba.positive(0.6),
+            borderWidth: 1,
+            backgroundColor: gpColor.rgba.positive(0.4),
+            hoverBackgroundColor: gpColor.rgba.positive(0.6)
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'line',
+            label: translations['GRAPH.ACCOUNT.RECEIVED_CERT_LABEL'],
+            fill: false,
+            borderColor: gpColor.rgba.positive(0.5),
+            borderWidth: 2,
+            backgroundColor: gpColor.rgba.positive(1),
+            pointBackgroundColor: gpColor.rgba.positive(0.5),
+            pointBorderColor: gpColor.rgba.white(),
+            pointHoverBackgroundColor: gpColor.rgba.positive(1),
+            pointHoverBorderColor: 'rgba(0,0,0,0)',
+            pointRadius: 3
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'bar',
+            label: translations['GRAPH.ACCOUNT.GIVEN_CERT_DELTA_LABEL'],
+            borderColor: gpColor.rgba.assertive(0.6),
+            borderWidth: 1,
+            backgroundColor: gpColor.rgba.assertive(0.4),
+            hoverBackgroundColor: gpColor.rgba.assertive(0.6)
+          },
+          {
+            yAxisID: 'y-axis-left',
+            type: 'line',
+            label: translations['GRAPH.ACCOUNT.GIVEN_CERT_LABEL'],
+            fill: false,
+            borderColor: gpColor.rgba.assertive(0.4),
+            borderWidth: 2,
+            backgroundColor: gpColor.rgba.assertive(1),
+            pointBackgroundColor: gpColor.rgba.assertive(0.4),
+            pointBorderColor: gpColor.rgba.white(),
+            pointHoverBackgroundColor: gpColor.rgba.assertive(1),
+            pointHoverBorderColor: 'rgba(0,0,0,0)',
+            pointRadius: 3,
+            lineTension: 0.1
+          }
+        ];
+      });
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var from = $scope.times[item._index];
+    var to = moment.unix(from).utc().add(1, $scope.formData.rangeDuration).unix();
+    var query = '_exists_:transactions AND medianTime:>={0} AND medianTime:<{1}'.format(from, to);
+    if ($scope.formData.pubkey) {
+      query += ' AND (transactions.issuers:' + $scope.formData.pubkey + ' OR transactions.outputs:*' + $scope.formData.pubkey + ')';
+    }
+    $state.go('app.blockchain_search', {q: query});
+  };
+}
+
+
+GpDocStatsController.$inject = ['$scope', '$state', '$controller', '$q', '$translate', 'gpColor', 'gpData', '$filter'];
+angular.module('cesium.graph.docstats.controllers', ['chart.js', 'cesium.graph.services', 'cesium.graph.common.controllers'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    $stateProvider
+      .state('app.doc_stats_lg', {
+        url: "/network/data/stats/:server?stepUnit&t&hide&scale&useSsl&useTor",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/docstats/view_stats.html",
+            controller: 'GpDocStatsCtrl'
+          }
+        }
+      })
+
+      // Deprecated URL
+      .state('app.doc_stats_lg_old', {
+        url: "/data/stats?stepUnit&t&hide&scale&useSsl&useTor",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/docstats/view_stats.html",
+            controller: 'GpDocStatsCtrl'
+          }
+        }
+      });
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // TODO: add buttons to link with doc stats
+    }
+  }])
+
+
+  .controller('GpDocStatsCtrl', GpDocStatsController)
+;
+
+function GpDocStatsController($scope, $state, $controller, $q, $translate, gpColor, gpData, $filter) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.formData.rangeDuration = 'month';
+
+  $scope.displayRightAxis = true;
+  $scope.hiddenDatasets = [];
+
+  $scope.chartIdPrefix = 'docstats-chart-';
+  $scope.charts = [
+
+    // User count
+    {
+      id: 'user',
+      title: 'GRAPH.DOC_STATS.USER.TITLE',
+      series: [
+        {
+          key: 'user_profile',
+          label: 'GRAPH.DOC_STATS.USER.USER_PROFILE',
+          color: gpColor.rgba.royal(0.7),
+          pointHoverBackgroundColor: gpColor.rgba.royal(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'user', type: 'profile'}
+          }
+        },
+        {
+          key: 'user_settings',
+          label: 'GRAPH.DOC_STATS.USER.USER_SETTINGS',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'user', type: 'settings'}
+          }
+        }
+      ]
+    },
+
+    // User delta
+    {
+      id: 'user_delta',
+      title: 'GRAPH.DOC_STATS.USER_DELTA.TITLE',
+      series: [
+        {
+          key: 'user_profile_delta',
+          label: 'GRAPH.DOC_STATS.USER_DELTA.USER_PROFILE',
+          type: 'line',
+          yAxisID: 'y-axis-delta',
+          color: gpColor.rgba.royal(),
+          pointHoverBackgroundColor: gpColor.rgba.royal()
+        },
+        {
+          key: 'user_settings_delta',
+          label: 'GRAPH.DOC_STATS.USER_DELTA.USER_SETTINGS',
+          type: 'line',
+          yAxisID: 'y-axis-delta',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray()
+        }
+      ]
+    },
+
+    // Message & Co.
+    {
+      id: 'message',
+      title: 'GRAPH.DOC_STATS.MESSAGE.TITLE',
+      series: [
+        {
+          key: 'message_inbox',
+          label: 'GRAPH.DOC_STATS.MESSAGE.MESSAGE_INBOX',
+          color: gpColor.rgba.royal(),
+          pointHoverBackgroundColor: gpColor.rgba.royal(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'message', type: 'inbox'}
+          }
+        },
+        {
+          key: 'message_outbox',
+          label: 'GRAPH.DOC_STATS.MESSAGE.MESSAGE_OUTBOX',
+          color: gpColor.rgba.calm(),
+          pointHoverBackgroundColor: gpColor.rgba.calm(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'message', type: 'outbox'}
+          }
+        },
+        {
+          key: 'invitation_certification',
+          label: 'GRAPH.DOC_STATS.MESSAGE.INVITATION_CERTIFICATION',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'invitation', type: 'certification'}
+          }
+        }
+      ]
+    },
+
+    // Social Page & group
+    {
+      id: 'social',
+      title: 'GRAPH.DOC_STATS.SOCIAL.TITLE',
+      series: [
+        {
+          key: 'page_record',
+          label: 'GRAPH.DOC_STATS.SOCIAL.PAGE_RECORD',
+          color: gpColor.rgba.royal(),
+          pointHoverBackgroundColor: gpColor.rgba.royal(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'page', type: 'record'}
+          }
+        },
+        {
+          key: 'group_record',
+          label: 'GRAPH.DOC_STATS.SOCIAL.GROUP_RECORD',
+          color: gpColor.rgba.calm(),
+          pointHoverBackgroundColor: gpColor.rgba.calm(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'group', type: 'record'}
+          }
+        },
+        {
+          key: 'page_comment',
+          label: 'GRAPH.DOC_STATS.SOCIAL.PAGE_COMMENT',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'page', type: 'comment'}
+          }
+        }
+      ]
+    },
+
+    // Other: deletion, doc, etc.
+    {
+      id: 'other',
+      title: 'GRAPH.DOC_STATS.OTHER.TITLE',
+      series: [
+        {
+          key: 'history_delete',
+          label: 'GRAPH.DOC_STATS.OTHER.HISTORY_DELETE',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray(),
+          clickState: {
+            name: 'app.document_search',
+            params: {index:'history', type: 'delete'}
+          }
+        }
+      ]
+    }
+  ];
+
+  var formatInteger = $filter('formatInteger');
+
+  $scope.defaultChartOptions = {
+    responsive: true,
+    maintainAspectRatio: $scope.maintainAspectRatio,
+    title: {
+      display: true
+    },
+    legend: {
+      display: true,
+      onClick: $scope.onLegendClick
+    },
+    scales: {
+      xAxes: [{
+        stacked: true
+      }],
+      yAxes: [
+        {
+          id: 'y-axis',
+          stacked: true
+        },
+        {
+          id: 'y-axis-delta',
+          stacked: false
+        },
+        {
+          id: 'y-axis-delta-right',
+          stacked: false,
+          display: $scope.displayRightAxis,
+          position: 'right',
+          gridLines: {
+            drawOnChartArea: false
+          }
+        }
+      ]
+    },
+    tooltips: {
+      enabled: true,
+      mode: 'index',
+      callbacks: {
+        label: function(tooltipItems, data) {
+          return data.datasets[tooltipItems.datasetIndex].label +
+            ': ' + formatInteger(tooltipItems.yLabel);
+        }
+      }
+    }
+  };
+
+  $scope.init = function(e, state) {
+    if (state && state.stateParams) {
+      // Manage URL parameters
+
+      var server = state.stateParams && state.stateParams.server || undefined;
+      if (server) {
+        console.debug("[docstats] Will use server: " + server);
+        angular.merge($scope.formData, {
+          server: state.stateParams.server,
+          useSsl: state.stateParams.useSsl,
+          useTor: state.stateParams.useTor
+        });
+      }
+    }
+  };
+
+  $scope.load = function(updateTimePct) {
+
+    return $q.all([
+      // Get i18n keys (chart title, series labels, date patterns)
+      $translate($scope.charts.reduce(function(res, chart) {
+        return res.concat(chart.series.reduce(function(res, serie) {
+          return res.concat(serie.label);
+        }, [chart.title]));
+      }, [
+        'COMMON.DATE_PATTERN',
+        'COMMON.DATE_SHORT_PATTERN',
+        'COMMON.DATE_MONTH_YEAR_PATTERN'
+      ])),
+
+      // get Data
+      gpData.docstat.get($scope.formData)
+    ])
+    .then(function(result) {
+      var translations = result[0];
+      var datePatterns = {
+        hour: translations['COMMON.DATE_PATTERN'],
+        day: translations['COMMON.DATE_SHORT_PATTERN'],
+        month: translations['COMMON.DATE_MONTH_YEAR_PATTERN']
+      };
+
+      result = result[1];
+      if (!result || !result.times) return; // no data
+      $scope.times = result.times;
+
+      // Labels
+      var labelPattern = datePatterns[$scope.formData.rangeDuration];
+      $scope.labels = _.map(result.times, function(time) {
+        return moment.unix(time).local().format(labelPattern);
+      });
+
+      // Update range options with received values
+      $scope.updateRange(result.times[0], result.times[result.times.length-1], updateTimePct);
+
+      $scope.setScale($scope.scale);
+
+      // For each chart
+      _.forEach($scope.charts, function(chart){
+
+        // Prepare chart data
+        var usedYAxisIDs = {};
+        chart.data = _.map(chart.series, function(serie) {
+          usedYAxisIDs[serie.yAxisID||'y-axis'] = true;
+          // If 'delta' serie, then compute delta from the source serie
+          if (serie.key.endsWith('_delta')) {
+            var key = serie.key.substring(0, serie.key.length - '_delta'.length);
+            return getDeltaFromValueArray(result[key]) || [];
+          }
+          return result[serie.key]||[];
+        });
+
+        // Options (with title)
+        chart.options = angular.copy($scope.defaultChartOptions);
+        chart.options.title.text = translations[chart.title];
+
+        // Remove unused yAxis
+        chart.options.scales.yAxes = chart.options.scales.yAxes.reduce(function(res, yAxe){
+          return usedYAxisIDs[yAxe.id] ? res.concat(yAxe) : res;
+        }, []);
+
+        // Series datasets
+        chart.datasetOverride = _.map(chart.series, function(serie) {
+          return {
+            yAxisID: serie.yAxisID || 'y-axis',
+            type: serie.type || 'line',
+            label: translations[serie.label],
+            fill: serie.type !== 'line',
+            borderWidth: 2,
+            pointRadius: serie.type !== 'line' ? 0 : 2,
+            pointHitRadius: 4,
+            pointHoverRadius: 3,
+            borderColor: serie.color,
+            backgroundColor: serie.color,
+            pointBackgroundColor: serie.color,
+            pointBorderColor: serie.color,
+            pointHoverBackgroundColor: serie.pointHoverBackgroundColor||serie.color,
+            pointHoverBorderColor: serie.pointHoverBorderColor||gpColor.rgba.white()
+          };
+        });
+      });
+    });
+
+  };
+
+  $scope.onChartClick = function(data, e, item) {
+    if (!item) return;
+    var chart = _.find($scope.charts , function(chart) {
+      return ($scope.chartIdPrefix  + chart.id) == item._chart.canvas.id;
+    });
+
+    var serie = chart.series[item._datasetIndex];
+
+    if (serie && serie.clickState && serie.clickState.name) {
+      var stateParams = serie.clickState.params ? angular.copy(serie.clickState.params) : {};
+
+      // Compute query
+      var from = $scope.times[item._index];
+      var to = moment.unix(from).utc().add(1, $scope.formData.rangeDuration).unix();
+      stateParams.q = 'time:>={0} AND time:<{1}'.format(from, to);
+
+      return $state.go(serie.clickState.name, stateParams);
+    }
+    else {
+      console.debug('Click on item index={0} on range [{1},{2}]'.format(item._index, from, to));
+    }
+  };
+
+  function getDeltaFromValueArray(values) {
+    if (!values) return undefined;
+    var previousValue;
+    return _.map(values, function(value) {
+      var newValue = (value !== undefined && previousValue !== undefined) ? (value - (previousValue || value)) : undefined;
+      previousValue = value;
+      return newValue;
+    });
+  }
+
+}
+
+
+GpSynchroController.$inject = ['$scope', '$controller', '$q', '$translate', 'gpColor', 'gpData', '$filter'];
+angular.module('cesium.graph.synchro.controllers', ['chart.js', 'cesium.graph.services', 'cesium.graph.common.controllers'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    $stateProvider
+      .state('app.doc_synchro_lg', {
+        url: "/network/data/synchro/:server?stepUnit&t&hide&scale&useSsl&useTor",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/synchro/view_stats.html",
+            controller: "GpSynchroCtrl"
+          }
+        }
+      })
+
+      // Deprecated URL
+      .state('app.doc_synchro_lg_old', {
+        url: "/data/synchro?stepUnit&t&hide&scale&useSsl&useTor",
+        views: {
+          'menuContent': {
+            templateUrl: "plugins/graph/templates/synchro/view_stats.html",
+            controller: "GpSynchroCtrl"
+          }
+        }
+      })
+    ;
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // TODO: add buttons to link with doc stats
+    }
+  }])
+
+
+  .controller('GpSynchroCtrl', GpSynchroController)
+;
+
+function GpSynchroController($scope, $controller, $q, $translate, gpColor, gpData, $filter) {
+  'ngInject';
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope}));
+
+  $scope.formData.rangeDuration = 'month';
+
+  $scope.hiddenDatasets = [];
+
+  $scope.charts = [
+
+    // Execution: number of doc
+    {
+      id: 'count',
+      title: 'GRAPH.SYNCHRO.COUNT.TITLE',
+      series: [
+        {
+          key: 'inserts',
+          type: 'bar',
+          label: 'GRAPH.SYNCHRO.COUNT.INSERTS',
+          color: gpColor.rgba.royal(),
+          pointHoverBackgroundColor: gpColor.rgba.royal()
+        },
+        {
+          key: 'updates',
+          type: 'bar',
+          label: 'GRAPH.SYNCHRO.COUNT.UPDATES',
+          color: gpColor.rgba.calm(),
+          pointHoverBackgroundColor: gpColor.rgba.calm()
+        },
+        {
+          key: 'deletes',
+          type: 'bar',
+          label: 'GRAPH.SYNCHRO.COUNT.DELETES',
+          color: gpColor.rgba.assertive(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.assertive()
+        }
+      ]
+    },
+
+    // Execution: number of peers
+    {
+      id: 'peer',
+      title: 'GRAPH.SYNCHRO.PEER.TITLE',
+      series: [
+        {
+          key: 'ES_USER_API',
+          label: 'GRAPH.SYNCHRO.PEER.ES_USER_API',
+          color: gpColor.rgba.royal(),
+          pointHoverBackgroundColor: gpColor.rgba.royal()
+        },
+        {
+          key: 'ES_SUBSCRIPTION_API',
+          label: 'GRAPH.SYNCHRO.PEER.ES_SUBSCRIPTION_API',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray()
+        }
+      ]
+    },
+
+    // Execution: number of peers
+    {
+      id: 'performance',
+      title: 'GRAPH.SYNCHRO.PERFORMANCE.TITLE',
+      series: [
+        {
+          key: 'duration',
+          type: 'bar',
+          label: 'GRAPH.SYNCHRO.PERFORMANCE.DURATION',
+          color: gpColor.rgba.gray(0.5),
+          pointHoverBackgroundColor: gpColor.rgba.gray()
+        }
+      ]
+    }
+  ];
+
+  var formatInteger = $filter('formatInteger');
+
+  $scope.defaultChartOptions = {
+    responsive: true,
+    maintainAspectRatio: $scope.maintainAspectRatio,
+    title: {
+      display: true
+    },
+    legend: {
+      display: true,
+      onClick: $scope.onLegendClick
+    },
+    scales: {
+      xAxes: [{
+        stacked: true
+      }],
+      yAxes: [
+        {
+          stacked: true,
+          id: 'y-axis'
+        }
+      ]
+    },
+    tooltips: {
+      enabled: true,
+      mode: 'index',
+      callbacks: {
+        label: function(tooltipItems, data) {
+          return data.datasets[tooltipItems.datasetIndex].label +
+            ': ' + formatInteger(tooltipItems.yLabel);
+        }
+      }
+    }
+  };
+
+  $scope.init = function(e, state) {
+    if (state && state.stateParams) {
+      // Manage URL parameters
+      var server = state.stateParams && state.stateParams.server || undefined;
+      if (server) {
+        console.debug("[synchro] Will use server: " + server);
+        angular.merge($scope.formData, state.stateParams);
+      }
+    }
+  };
+
+  $scope.load = function(updateTimePct) {
+
+    return $q.all([
+      // Get i18n keys (chart title, series labels, date patterns)
+      $translate($scope.charts.reduce(function(res, chart) {
+        return res.concat(chart.series.reduce(function(res, serie) {
+          return res.concat(serie.label);
+        }, [chart.title]));
+      }, [
+        'COMMON.DATE_PATTERN',
+        'COMMON.DATE_SHORT_PATTERN',
+        'COMMON.DATE_MONTH_YEAR_PATTERN'
+      ])),
+
+      // get Data
+      gpData.synchro.execution.get($scope.formData)
+    ])
+    .then(function(result) {
+      var translations = result[0];
+      var datePatterns = {
+        hour: translations['COMMON.DATE_PATTERN'],
+        day: translations['COMMON.DATE_SHORT_PATTERN'],
+        month: translations['COMMON.DATE_MONTH_YEAR_PATTERN']
+      };
+
+      result = result[1];
+      if (!result || !result.times) return; // no data
+      $scope.times = result.times;
+
+      // Labels
+      var labelPattern = datePatterns[$scope.formData.rangeDuration];
+      $scope.labels = result.times.reduce(function(res, time) {
+        return res.concat(moment.unix(time).local().format(labelPattern));
+      }, []);
+
+      // Update range options with received values
+      $scope.updateRange(result.times[0], result.times[result.times.length-1], updateTimePct);
+
+      $scope.setScale($scope.scale);
+
+      // For each chart
+      _.forEach($scope.charts, function(chart){
+
+        // Data
+        chart.data = [];
+        _.forEach(chart.series, function(serie){
+          chart.data.push(result[serie.key]||[]);
+        });
+
+        // Options (with title)
+        chart.options = angular.copy($scope.defaultChartOptions);
+        chart.options.title.text = translations[chart.title];
+
+        // Series datasets
+        chart.datasetOverride = chart.series.reduce(function(res, serie) {
+          return res.concat({
+            yAxisID: 'y-axis',
+            type: serie.type || 'line',
+            label: translations[serie.label],
+            fill: true,
+            borderWidth: 2,
+            pointRadius: 0,
+            pointHitRadius: 4,
+            pointHoverRadius: 3,
+            borderColor: serie.color,
+            backgroundColor: serie.color,
+            pointBackgroundColor: serie.color,
+            pointBorderColor: serie.color,
+            pointHoverBackgroundColor: serie.pointHoverBackgroundColor||serie.color,
+            pointHoverBorderColor: serie.pointHoverBorderColor||gpColor.rgba.white()
+          });
+        }, []);
+      });
+    });
+  };
+}
+
+
+angular.module('cesium.map.plugin', [
+    'ui-leaflet',
+    // Services
+    'cesium.map.services',
+    // Controllers
+    'cesium.map.common.controllers',
+    'cesium.map.wot.controllers',
+    'cesium.map.registry.controllers',
+    'cesium.map.network.controllers',
+    'cesium.map.user.controllers',
+    'cesium.map.settings.controllers',
+    'cesium.map.help.controllers'
+  ])
+
+  // Configure plugin
+  .config(function() {
+    'ngInject';
+
+    // Define icon prefix for AwesomeMarker (a Leaflet plugin)
+    L.AwesomeMarkers.Icon.prototype.options.prefix = 'ion';
+  });
+
+
+
+
+angular.module('cesium.map.services', [
+    // Services
+    'cesium.map.wot.services',
+    'cesium.map.registry.services',
+    'cesium.map.utils.services'
+  ])
+;
+
+
+angular.module('cesium.map.wot.services', ['cesium.services'])
+
+.factory('mapWot', ['$q', 'csHttp', 'esHttp', 'esSettings', 'csWot', 'BMA', 'esGeo', function($q, csHttp, esHttp, esSettings, csWot, BMA, esGeo) {
+  'ngInject';
+
+  var
+    that = this,
+    constants = {
+      DEFAULT_LOAD_SIZE: 1000
+    },
+    fields = {
+      min: ["title", "geoPoint"],
+      profile: ["title", "geoPoint", "avatar._content_type", "address", "city"]
+    };
+
+  that.raw = {
+    profile: {
+      search: esHttp.post('/user/profile/_search'),
+      mixedSearch: esHttp.post('/user,page,group/profile,record/_search')
+      //FOR DEV ONLY mixedSearch: esHttp.post('/page/record/_search')
+    }
+  };
+
+  function createFilterQuery(options) {
+    options = options || {};
+    var query = {
+      bool: {}
+    };
+
+    // Limit to profile with geo point
+    if (options.searchAddress) {
+      query.bool.should = [
+        {exists: {field: "geoPoint"}},
+        {exists: {field: "city"}}
+      ];
+    }
+    else {
+      query.bool.must= [
+        {exists: {field: "geoPoint"}}
+      ];
+    }
+
+    // Filter on bounding box
+    // see https://www.elastic.co/guide/en/elasticsearch/reference/2.4/geo-point.html
+    if (options.bounds && options.bounds.northEast && options.bounds.southWest) {
+      var boundingBox = {
+        "geoPoint" : {
+          "top_left" : {
+            "lat" : Math.max(Math.min(options.bounds.northEast.lat, 90), -90),
+            "lon" : Math.max(Math.min(options.bounds.southWest.lng, 180), -180)
+          },
+          "bottom_right" : {
+            "lat" : Math.max(Math.min(options.bounds.southWest.lat, 90), -90),
+            "lon" : Math.max(Math.min(options.bounds.northEast.lng, 180), -180)
+          }
+        }
+      };
+      console.debug("[map] [wot] Filtering on bounds: ", options.bounds);
+      query.bool.must = query.bool.must || [];
+      query.bool.must.push({geo_bounding_box:  boundingBox});
+    }
+    return query;
+  }
+
+  function load(options) {
+    options = options || {};
+    options.from = options.from || 0;
+    options.size = options.size || constants.DEFAULT_LOAD_SIZE;
+    options.searchAddress = esGeo.google.isEnable() && (angular.isDefined(options.searchAddress) ? options.searchAddress : true);
+
+    options.fields = options.fields || {};
+    options.fields.description = angular.isDefined(options.fields.description) ? options.fields.description : false;
+
+    var request = {
+      query: createFilterQuery(options),
+      from: 0,
+      size: options.size,
+      _source: options.fields.description ? fields.profile.concat("description") : fields.profile
+    };
+
+    var mixedSearch = false;
+    /*var mixedSearch = esSettings.wot.isMixedSearchEnable();
+    if (mixedSearch) {
+      // add special fields for page and group
+      request._source = request._source.concat(["type", "pubkey", "issuer", "category"]);
+      console.debug("[ES] [map] Mixed search: enable");
+    }*/
+
+    var search = mixedSearch ? that.raw.profile.mixedSearch : that.raw.profile.search;
+
+    return $q.all([
+        search(request),
+        BMA.wot.member.uids(),
+        BMA.wot.member.pending()
+          .then(function(res) {
+            return (res.memberships && res.memberships.length) ? res.memberships : [];
+          })
+      ])
+      .then(function(res) {
+        var uids = res[1];
+        var memberships = res[2];
+        var res = res[0];
+        if (!res.hits || !res.hits.total) return [];
+
+        // Transform pending MS into a map by pubkey
+        memberships = memberships.reduce(function(res, ms){
+          if (ms.membership == 'IN' && !uids[ms.pubkey]) {
+            var idty = {
+              uid: ms.uid,
+              pubkey: ms.pubkey,
+              block: ms.blockNumber,
+              blockHash: ms.blockHash,
+              pending: true
+            };
+            var otherIdtySamePubkey = res[ms.pubkey];
+            if (otherIdtySamePubkey && idty.block > otherIdtySamePubkey.block) {
+              return res; // skip
+            }
+            res[idty.pubkey] = idty;
+          }
+          return res;
+        }, {});
+
+        var jobs = [
+          processLoadHits(options, uids, memberships, res)
+        ];
+
+        // Additional slice requests
+        request.from += request.size;
+        while (request.from < res.hits.total) {
+          jobs.push(search(angular.copy(request))
+            .then(function(res) {
+              if (!res.hits || !res.hits.hits.length) return [];
+              return processLoadHits(options, uids, memberships, res);
+            }));
+          request.from += request.size;
+        }
+        return $q.all(jobs)
+          .then(function(res){
+            return res.reduce(function(res, items) {
+              return res.concat(items);
+            }, []);
+          });
+      });
+  }
+
+  function processLoadHits(options, uids, memberships, res) {
+
+    // Transform profile hits
+    var commaRegexp = new RegExp('[,]');
+    var searchAddressItems = [];
+    var items = res.hits.hits.reduce(function(res, hit) {
+      var pubkey =  hit._id;
+      var uid = uids[pubkey];
+      var item = uid && {uid: uid} || memberships[pubkey] || {};
+      item.pubkey = pubkey;
+      item.index = hit._index;
+
+      // City & address
+      item.city = hit._source.city;
+      item.address = hit._source.address;
+
+      // Set geo point
+      item.geoPoint = hit._source.geoPoint;
+      if (!item.geoPoint || !item.geoPoint.lat || !item.geoPoint.lon) {
+        if (!options.searchAddress || !item.city) return res; // no city: exclude this item
+        item.searchAddress = item.city && ((hit._source.address ? hit._source.address+ ', ' : '') + item.city);
+        searchAddressItems.push(item);
+      }
+      else {
+        // Convert lat/lon to float (if need)
+        if (item.geoPoint.lat && typeof item.geoPoint.lat === 'string') {
+          item.geoPoint.lat = parseFloat(item.geoPoint.lat.replace(commaRegexp, '.'));
+        }
+        if (item.geoPoint.lon && typeof item.geoPoint.lon === 'string') {
+          item.geoPoint.lon = parseFloat(item.geoPoint.lon.replace(commaRegexp, '.'));
+        }
+      }
+
+      // Avatar
+      item.avatar = esHttp.image.fromHit(hit, 'avatar');
+
+      // Name
+      item.name = hit._source.title;
+      // Avoid too long name (workaround for #308)
+      if (item.name && item.name.length > 30) {
+        item.name = item.name.substr(0, 27) + '...';
+      }
+
+      // Description
+      item.description = hit._source.description && esHttp.util.parseAsHtml(hit._source.description);
+
+      return item.geoPoint ? res.concat(item) : res;
+    }, []);
+
+    // Resolve missing positions by addresses (only if google API enable)
+    if (searchAddressItems.length) {
+      var now = Date.now();
+      console.debug('[map] [wot] Search positions of {0} addresses...'.format(searchAddressItems.length));
+      var counter = 0;
+
+      return $q.all(searchAddressItems.reduce(function(res, item) {
+        return !item.city ? res : res.concat(esGeo.google.searchByAddress(item.searchAddress)
+          .then(function(res) {
+            if (!res || !res.length) return;
+            item.geoPoint = res[0];
+            // If search on city, add a randomized delta to avoid superposition
+            if (item.city == item.searchAddress) {
+              item.geoPoint.lon += Math.random() / 1000;
+              item.geoPoint.lat += Math.random() / 1000;
+            }
+            delete item.searchAddress; // not need anymore
+            items.push(item);
+            counter++;
+          })
+          .catch(function() {/*silent*/}));
+      }, []))
+        .then(function(){
+          console.debug('[map] [wot] Resolved {0}/{1} addresses in {2}ms'.format(counter, searchAddressItems.length, Date.now()-now));
+          return items;
+        });
+    }
+
+    return $q.when(items);
+  }
+
+  return {
+    load: load
+  };
+
+}]);
+
+
+angular.module('cesium.map.registry.services', ['cesium.services'])
+
+.factory('mapRegistry', ['$q', 'csHttp', 'esHttp', 'esSettings', 'csWot', 'BMA', 'esGeo', function($q, csHttp, esHttp, esSettings, csWot, BMA, esGeo) {
+  'ngInject';
+
+  var
+    that = this,
+    constants = {
+      DEFAULT_LOAD_SIZE: 1000
+    },
+    fields = {
+      record: ["title", "geoPoint", "avatar._content_type", "address", "city", "type", "pubkey", "issuer", "category"]
+    };
+
+  that.raw = {
+    profile: {
+      search: esHttp.post('/page/record/_search'),
+      mixedSearch: esHttp.post('/user,page,group/profile,record/_search')
+    }
+  };
+
+  function createFilterQuery(options) {
+    options = options || {};
+    var query = {
+      bool: {}
+    };
+
+    // Limit to profile with geo point
+    if (options.searchAddress) {
+      query.bool.should = [
+        {exists: {field: "geoPoint"}},
+        {exists: {field: "city"}}
+      ];
+    }
+    else {
+      query.bool.must= [
+        {exists: {field: "geoPoint"}}
+      ];
+    }
+
+    // Filter on bounding box
+    // see https://www.elastic.co/guide/en/elasticsearch/reference/2.4/geo-point.html
+    if (options.bounds && options.bounds.northEast && options.bounds.southWest) {
+      query.bool.should = query.bool.should || {};
+      query.bool.should.geo_bounding_box = {
+        "geoPoint" : {
+          "top_left" : {
+            "lat" : Math.max(Math.min(options.bounds.northEast.lat, 90), -90),
+            "lon" : Math.max(Math.min(options.bounds.southWest.lng, 180), -180)
+          },
+          "bottom_right" : {
+            "lat" : Math.max(Math.min(options.bounds.southWest.lat, 90), -90),
+            "lon" : Math.max(Math.min(options.bounds.northEast.lng, 180), -180)
+          }
+        }
+      };
+    }
+    return query;
+  }
+
+  function load(options) {
+    options = options || {};
+    options.from = options.from || 0;
+    options.size = options.size || constants.DEFAULT_LOAD_SIZE;
+    options.searchAddress = esGeo.google.isEnable() && (angular.isDefined(options.searchAddress) ? options.searchAddress : true);
+
+    options.fields = options.fields || {};
+    options.fields.description = angular.isDefined(options.fields.description) ? options.fields.description : true;
+
+    var request = {
+      query: createFilterQuery(options),
+      from: 0,
+      size: options.size,
+      _source: options.fields.description ? fields.record.concat("description") : fields.record
+    };
+
+    // Search on profiles ?
+    var mixedSearch = false;
+    /*var mixedSearch = esSettings.registry.isMixedSearchEnable();
+    if (mixedSearch) {
+      console.debug("[ES] [map] Mixed search: enable");
+    }*/
+
+    var search = mixedSearch ? that.raw.profile.mixedSearch : that.raw.profile.search;
+    var processSearchResult = function(res) {
+      if (!res.hits || !res.hits.hits.length) return $q.when([]);
+      return processLoadHits(options, res);
+    };
+    return search(request)
+      .then(function(res) {
+        if (!res.hits || !res.hits.total) return [];
+
+        var jobs = [
+          processLoadHits(options, res)
+        ];
+
+        // Additional slice requests
+        request.from += request.size;
+        while (request.from < res.hits.total) {
+          jobs.push(
+            search(angular.copy(request)).then(processSearchResult)
+          );
+          request.from += request.size;
+        }
+        return $q.all(jobs)
+          .then(function(res){
+            return res.reduce(function(res, items) {
+              return res.concat(items);
+            }, []);
+          });
+      });
+  }
+
+  function processLoadHits(options, res) {
+    // Transform hits
+    var commaRegexp = new RegExp('[,]');
+    var searchAddressItems = [];
+    var items = res.hits.hits.reduce(function(res, hit) {
+      var pubkey =  hit._source.issuer;
+      var item = {};
+      item.issuer = pubkey;
+      item.pubkey = hit._source.pubkey||item.issuer;
+      item.id = hit._id;
+      item.index = hit._index;
+      item.type = hit._source.type;
+      item.category = hit._source.category;
+      if (item.category) {
+        delete item.category.parent; // parent not need
+      }
+
+      // City & address
+      item.city = hit._source.city;
+      item.address = hit._source.address;
+
+      // Set geo point
+      item.geoPoint = hit._source.geoPoint;
+      if (!item.geoPoint || !item.geoPoint.lat || !item.geoPoint.lon) {
+        if (!options.searchAddress || !item.city) return res; // no city: exclude this item
+        item.searchAddress = item.city && ((hit._source.address ? hit._source.address+ ', ' : '') + item.city);
+        searchAddressItems.push(item);
+      }
+      else {
+        // Convert lat/lon to float (if need)
+        if (item.geoPoint.lat && typeof item.geoPoint.lat === 'string') {
+          item.geoPoint.lat = parseFloat(item.geoPoint.lat.replace(commaRegexp, '.'));
+        }
+        if (item.geoPoint.lon && typeof item.geoPoint.lon === 'string') {
+          item.geoPoint.lon = parseFloat(item.geoPoint.lon.replace(commaRegexp, '.'));
+        }
+      }
+
+      // Avatar
+      item.avatar = esHttp.image.fromHit(hit, 'avatar');
+
+      // Name
+      item.name = hit._source.title;
+      // Avoid too long name (workaround for #308)
+      if (item.name && item.name.length > 30) {
+        item.name = item.name.substr(0, 27) + '...';
+      }
+
+      // Description
+      item.description = hit._source.description && esHttp.util.parseAsHtml(hit._source.description);
+
+      return item.geoPoint ? res.concat(item) : res;
+    }, []);
+
+    // Resolve missing positions by addresses (only if google API enable)
+    if (searchAddressItems.length) {
+      var now = Date.now();
+      console.debug('[map] [registry] Search positions of {0} addresses...'.format(searchAddressItems.length));
+      var counter = 0;
+
+      return $q.all(searchAddressItems.reduce(function(res, item) {
+        return !item.city ? res : res.concat(esGeo.google.searchByAddress(item.searchAddress)
+          .then(function(res) {
+            if (!res || !res.length) return;
+            item.geoPoint = res[0];
+            // If search on city, add a randomized delta to avoid superposition
+            if (item.city == item.searchAddress) {
+              item.geoPoint.lon += Math.random() / 1000;
+              item.geoPoint.lat += Math.random() / 1000;
+            }
+            delete item.searchAddress; // not need anymore
+            items.push(item);
+            counter++;
+          })
+          .catch(function() {/*silent*/}));
+      }, []))
+        .then(function(){
+          console.debug('[map] [registry] Resolved {0}/{1} addresses in {2}ms'.format(counter, searchAddressItems.length, Date.now()-now));
+          return items;
+        });
+    }
+
+    return $q.when(items);
+  }
+
+  return {
+    load: load
+  };
+
+}]);
+
+
+angular.module('cesium.map.utils.services', ['cesium.services', 'ui-leaflet'])
+
+.factory('MapUtils', ['$timeout', '$q', '$translate', '$window', 'leafletData', 'csConfig', 'csSettings', 'esGeo', 'UIUtils', 'leafletHelpers', function($timeout, $q, $translate, $window, leafletData, csConfig, csSettings, esGeo, UIUtils, leafletHelpers) {
+  'ngInject';
+
+
+  var
+    googleApiKey = csConfig.plugins && csConfig.plugins.es && csConfig.plugins.es.googleApiKey,
+    constants = {
+      locations: {
+        FRANCE: {
+          lat: 46.5588603, lng: 4.229736328124999, zoom: 6
+        }
+      },
+      LOCALIZE_ZOOM: 15
+    },
+    data = {
+      cache: {}
+    };
+  constants.DEFAULT_CENTER = csSettings.data && csSettings.data.plugins && csSettings.data.plugins.map && csSettings.data.plugins.map.center || constants.locations.FRANCE;
+
+  function initMap(options){
+    options = angular.merge({
+      center: angular.copy(constants.DEFAULT_CENTER),
+      cache: false,
+      defaults: {
+        scrollWheelZoom: true,
+        tileLayerOptions: {
+          attribution: '© <a target=\"_blank\" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
+        }
+      },
+      layers: {
+        baselayers: {
+          osm: {
+            name: 'OpenStreetMap',
+            type: 'xyz',
+            url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
+            layerOptions: {
+              subdomains: ["a", "b", "c"],
+              attribution: "&copy; <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
+              continuousWorld: true
+            }
+          },
+          google: {
+            name: "Google map",
+            type: "xyz",
+            url: ('https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key='+googleApiKey),
+            layerOptions: {
+              subdomains: ['mt0','mt1','mt2','mt3'],
+              attribution: "&copy; <a target=\"_blank\"  href=\"https://www.google.com/intl/fr_fr/help/terms_maps.html\">Google</a>",
+              continuousWorld: true
+            }
+          }
+        }
+      },
+      controls: {
+        custom: []
+      }
+    }, options || {});
+
+    // Restore existing map options
+    if (options.cache && data.cache[options.cache]) {
+      console.debug("[map] Restoring map from cache :", data.cache[options.cache]);
+      options = angular.merge(options, data.cache[options.cache]);
+    }
+
+    // Translate overlays name, if any
+    var overlaysNames;
+    if (options.layers.overlays) {
+      overlaysNames = _.keys(options.layers.overlays).reduce(function (res, key) {
+        return res.concat(options.layers.overlays[key].name);
+      }, []);
+
+      $translate(overlaysNames).then(function (translations) {
+        // Translate overlay names
+        _.keys(options.layers.overlays || {}).forEach(function (key) {
+          options.layers.overlays[key].name = translations[options.layers.overlays[key].name];
+        });
+      });
+    }
+
+    return options;
+  }
+
+  function updateMapCenter(map, center) {
+    if (isSameCenter(center, map)) return $q.when();
+
+    return $timeout(function () {
+      map.invalidateSize();
+      map._resetView(center, center.zoom, true);
+    }, 300);
+  }
+
+  function bindMapOptions(scope, mapId, options) {
+    options = options || {};
+    if (!mapId || !options.layers || !scope) throw 'Illegal arguments';
+    if (!options.cache) return; // no cache, so bind not need
+
+    // Bind overlays visibility
+    if (options.layers.overlays) {
+      var overlayNames = _.keys(options.layers.overlays);
+
+      // Init the cache if need
+      if (!data.cache[options.cache]) {
+        data.cache[options.cache] = {
+            center: options.center,
+            bounds: options.bounds,
+            layers: angular.copy(options.layers)
+          };
+      }
+
+      // Listen for changes
+      leafletData.getMap(mapId)
+        .then(function() {
+          _($window.document.querySelectorAll('#{0} .leaflet-control-layers-overlays input[type=checkbox]'.format(mapId)))
+            .forEach(function (element, index) {
+              var overlayName = overlayNames[index];
+              var state = options.layers.overlays[overlayName].visible;
+              element.addEventListener('change', function (e) {
+                state = !state; // update state
+                // update cache
+                data.cache[options.cache].layers.overlays[overlayName].visible = state;
+              });
+            });
+        });
+    }
+
+    // Refresh center and bound, when leaving the view
+    scope.$on('$ionicView.leave', function() {
+      // update center and bounds
+      data.cache[options.cache].center = options.center;
+      data.cache[options.cache].bounds = options.bounds;
+    });
+
+  }
+
+
+  function getCenter(options) {
+    if (!options) return;
+    var center;
+    if (options.lat) {
+      center = {};
+      center.lat = parseFloat(options.lat);
+    }
+    if (options.lng || options.lon) {
+      center = center || {};
+      center.lng = parseFloat(options.lng || options.lon);
+    }
+    if (options.zoom) {
+      center = center || {};
+      center.zoom = parseFloat(options.zoom);
+    }
+    if (!center) return;
+
+    // If missing some properties, complete with defaults
+    if (!leafletHelpers.isValidCenter(center)) {
+      center = angular.merge({}, constants.DEFAULT_CENTER, center);
+    }
+    return center;
+  }
+
+  function isSameCenter(center, map) {
+    return leafletHelpers.isSameCenterOnMap(center, map);
+  }
+
+  function isDefaultCenter(centerModel) {
+    var mapCenter = constants.DEFAULT_CENTER;
+    if (centerModel.lat && centerModel.lng && mapCenter.lat.toFixed(4) === centerModel.lat.toFixed(4) && mapCenter.lng.toFixed(4) === centerModel.lng.toFixed(4) && mapCenter.zoom === centerModel.zoom) {
+      return true;
+    }
+    return false;
+  }
+
+  // Set the id of a control (set the attribute 'id' of the HTML container)
+  function setControlId(control, id) {
+    if (!control || !id) throw 'Illegal arguments';
+
+    // Control already added to map
+    if (control._container) {
+      control._container.id = id;
+    }
+    // Control not already added to the map (HTML element not exists yet)
+    else {
+      // Override onAdd() function
+      var superOnAdd = control.onAdd;
+      control.onAdd = function (map) {
+        var container = superOnAdd.call(this, map);
+        container.id = id;
+        return container;
+      };
+    }
+  }
+
+  // Create a default serach control, with default options
+  function initSearchControl(options) {
+
+    options = options || {};
+    options.initial = angular.isDefined(options.initial) ? options.initial : false;
+    options.marker = angular.isDefined(options.marker) ? options.marker : false;
+    options.propertyName = angular.isDefined(options.propertyName) ? options.propertyName : 'title';
+    options.position = angular.isDefined(options.position) ? options.position : 'topleft';
+    options.zoom = angular.isDefined(options.zoom) ? options.zoom : constants.LOCALIZE_ZOOM;
+    options.markerLocation = angular.isDefined(options.markerLocation) ? options.markerLocation : true;
+
+    var translatePromise = $translate(['MAP.COMMON.SEARCH_DOTS', 'COMMON.SEARCH_NO_RESULT']);
+
+    return {
+      // Simulate an addTo function, but wait for end of translations job
+      addTo: function (map) {
+        translatePromise.then(function (translations) {
+          var control = L.control.search(angular.merge(options, {
+            textPlaceholder: translations['MAP.COMMON.SEARCH_DOTS'],
+            textErr: translations['COMMON.SEARCH_NO_RESULT']
+          }));
+
+          // Set the HTML element id
+          if (options.id) {
+            setControlId(control, options.id);
+          }
+          control.addTo(map);
+        });
+      }
+    };
+  }
+
+  function initLocalizeMeControl(options) {
+    options = options || {};
+    return L.easyButton({
+        position: 'topleft',      // inherited from L.Control -- the corner it goes in
+        type: 'replace',          // set to animate when you're comfy with css
+        leafletClasses: true,     // use leaflet classes to style the button?
+        states:[{                 // specify different icons and responses for your button
+          stateName: 'locate-me',
+          onClick: function(btn, map){
+            esGeo.point.current()
+              .then(function(res) {
+                map.setView({
+                  lat: res.lat,
+                  lng: res.lon
+                }, constants.LOCALIZE_ZOOM);
+              })
+              .catch(function(err) {
+                console.error(err);
+                UIUtils.alert.error('MAP.ERROR.LOCALIZE_ME_FAILED');
+              });
+          },
+          title: options.title,
+          icon: 'icon ion-android-locate'
+        }]
+      });
+  }
+
+  return {
+    map: initMap,
+    updateCenter: updateMapCenter,
+    center: {
+      get: getCenter,
+      isSame: isSameCenter,
+      isDefault: isDefaultCenter
+    },
+    control: {
+      search: initSearchControl,
+      localizeMe: initLocalizeMeControl,
+      setId: setControlId
+    },
+    cache: {
+      bind: bindMapOptions
+    },
+    constants: constants
+  };
+
+}]);
+
+
+MapEditPositionAbstractController.$inject = ['$scope', '$timeout', '$q', 'MapUtils', '$translate'];
+angular.module('cesium.map.common.controllers', ['cesium.services', 'cesium.map.services'])
+
+  .controller('MapEditPositionAbstractCtrl', MapEditPositionAbstractController)
+
+;
+
+/**
+ * An abstract controller, that allow to edit psotion, using a map view (e.g. used by profile and page edition)
+ * @param $scope
+ * @param $timeout
+ * @param $q
+ * @param MapUtils
+ * @param $translate
+ * @constructor
+ */
+function MapEditPositionAbstractController($scope, $timeout, $q, MapUtils, $translate) {
+  'ngInject';
+
+  var listeners = [];
+  $scope.mapId = 'map-user-profile-' + $scope.$id;
+  $scope.map = MapUtils.map({
+    markers: {},
+    center: {
+      zoom: 13
+    }
+  });
+  $scope.loading = true;
+  $scope.mapId = $scope.mapId || 'map-abstract-' + $scope.$id; // Should have beed override by sub-controllers
+
+  $scope.enter = function(e, state) {
+
+    // Wait parent controller load the profile
+    if (!$scope.formData || (!$scope.formData.title && !$scope.formData.geoPoint)) {
+      return $timeout($scope.enter, 500);
+    }
+
+    $scope.loading = true;
+    return $scope.load();
+  };
+  $scope.$on('$csExtension.enter', $scope.enter);
+  $scope.$on('$ionicParentView.enter', $scope.enter);
+
+  $scope.load = function() {
+
+    // no position define: remove existing listener
+    if (!$scope.formData.geoPoint || !$scope.formData.geoPoint.lat || !$scope.formData.geoPoint.lon) {
+      _.forEach(listeners, function(listener){
+        listener(); // unlisten
+      });
+      listeners = [];
+      delete $scope.map.markers.geoPoint;
+      $scope.loading = false;
+      return $q.when();
+    }
+
+    // If no marker exists on map: create it
+    if (!$scope.map.markers.geoPoint) {
+
+      return $translate('MAP.PROFILE.MARKER_HELP')
+        .then(function(helpText) {
+
+          $scope.map.markers.geoPoint = {
+            message: helpText,
+            lat: parseFloat($scope.formData.geoPoint.lat),
+            lng: parseFloat($scope.formData.geoPoint.lon),
+            draggable: true,
+            focus: true
+          };
+          angular.extend($scope.map.center, {
+            lat: $scope.map.markers.geoPoint.lat,
+            lng: $scope.map.markers.geoPoint.lng
+          });
+
+          // Listening changes
+          var listener = $scope.$watch('map.markers.geoPoint', function() {
+            if ($scope.loading) return;
+            if ($scope.map.markers.geoPoint && $scope.map.markers.geoPoint.lat && $scope.map.markers.geoPoint.lng) {
+              $scope.formData.geoPoint = $scope.formData.geoPoint || {};
+              $scope.formData.geoPoint.lat = $scope.map.markers.geoPoint.lat;
+              $scope.formData.geoPoint.lon = $scope.map.markers.geoPoint.lng;
+            }
+          }, true);
+          listeners.push(listener);
+
+
+          // Make sure map appear, if shown later
+          if (!$scope.ionItemClass) {
+            $scope.ionItemClass = 'done in';
+          }
+
+          $scope.loading = false;
+        });
+    }
+
+    // Marker exists: update lat/lon
+    else {
+      $scope.map.markers.geoPoint.lat = $scope.formData.geoPoint.lat;
+      $scope.map.markers.geoPoint.lng = $scope.formData.geoPoint.lon;
+    }
+  };
+
+
+  $scope.$watch('formData.geoPoint', function() {
+    if ($scope.loading) return;
+    $scope.load();
+  }, true);
+
+}
+
+
+MapWotViewController.$inject = ['$scope', '$filter', '$templateCache', '$interpolate', '$timeout', '$location', '$translate', '$q', '$controller', 'ionicReady', 'leafletData', 'UIUtils', 'csSettings', 'csWallet', 'MapUtils', 'mapWot'];
+angular.module('cesium.map.wot.controllers', ['cesium.services', 'cesium.map.services', 'cesium.map.help.controllers'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+
+        .extendState('app.wot_lookup.tab_search', {
+          points: {
+            'nav-buttons': {
+              template: '<button class="button button-icon button-clear" ui-sref="app.view_wot_map"><i class="icon ion-ios-location"></i></button>'
+            }
+          }
+        })
+
+        .extendState('app.wot_lookup_lg', {
+          points: {
+            'filter-buttons': {
+              templateUrl: "plugins/map/templates/wot/lookup_lg_extend.html",
+              controller: "ESExtensionCtrl"
+            }
+          }
+        });
+
+      $stateProvider
+        .state('app.view_wot_map', {
+          url: "/wot/map?c&center",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/map/templates/wot/view_map.html",
+              controller: 'MapWotViewCtrl'
+            }
+          },
+          // Seems to works without cache ??
+          //cache: false,
+          data: {
+            silentLocationChange: true
+          }
+        });
+    }
+  }])
+
+  // Map view of the WOT
+  .controller('MapWotViewCtrl', MapWotViewController)
+
+;
+
+
+function MapWotViewController($scope, $filter, $templateCache, $interpolate, $timeout, $location, $translate, $q, $controller,
+                              ionicReady,
+                              leafletData, UIUtils, csSettings, csWallet, MapUtils, mapWot) {
+  'ngInject';
+
+  // Initialize the super classes and extend it.
+  angular.extend(this, $controller('WotIdentityAbstractCtrl', { $scope: $scope}));
+  angular.extend(this, $controller('ESWotIdentityViewCtrl', {$scope: $scope}));
+
+  var
+    // Create a  hidden layer, to hold search markers
+    markersSearchLayer,
+    icons= {
+      member: {
+        type: 'awesomeMarker',
+        icon: 'person',
+        markerColor: 'blue'
+      },
+      pending: {
+        type: 'awesomeMarker',
+        icon: 'clock',
+        markerColor: 'lightgreen',
+        iconColor: 'gray'
+      },
+      wallet: {
+        type: 'awesomeMarker',
+        icon: 'key',
+        markerColor: 'lightgray'
+      }
+    };
+
+  $scope.loading = true;
+  $scope.loadingMarker = true;
+  $scope.mapId = 'map-wot-' + $scope.$id;
+
+  $scope.map = MapUtils.map({
+    cache: 'map-wot',
+    layers: {
+      overlays: {
+
+        // User profile
+        member: {
+          type: 'featureGroup',
+          name: 'MAP.WOT.VIEW.LAYER.MEMBER',
+          visible: true
+        },
+        pending: {
+          type: 'featureGroup',
+          name: 'MAP.WOT.VIEW.LAYER.PENDING',
+          visible: true
+        },
+        wallet: {
+          type: 'featureGroup',
+          name: 'MAP.WOT.VIEW.LAYER.WALLET',
+          visible: true
+        }
+      }
+    },
+    bounds: {},
+    markers: {},
+    loading: true
+  }, $scope.mapId);
+
+  // Variables for marker
+  $scope.showDescription = false;
+  ionicReady().then(function() {
+    $scope.enableDescription = !UIUtils.screen.isSmall() && ionic.Platform.grade.toLowerCase() === 'a';
+    if (!$scope.enableDescription) {
+     console.debug("[map] [wot] Disable profile description.", ionic.Platform.grade);
+    }
+  });
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.enter = function(e, state) {
+
+    if ($scope.loading) {
+
+      UIUtils.loading.show({
+        noBackdrop: true // avoid a too long release
+      });
+      if (state.stateParams && state.stateParams.c) {
+        var cPart = state.stateParams.c.split(':');
+        $scope.map.center.lat = parseFloat(cPart[0]);
+        $scope.map.center.lng = parseFloat(cPart[1]);
+        $scope.map.center.zoom = parseInt(cPart[2]);
+      }
+
+      $scope.$watch("map.center", function() {
+        if (!$scope.loading) {
+          return $timeout(function() {
+            $scope.updateLocationHref();
+          }, 300);
+        }
+      }, true);
+
+      // Load the map (and init if need)
+      var now = Date.now();
+      $scope.loadMap()
+        .then($scope.load)
+        .then(function() {
+          console.debug("[map] [wot] Loaded in "+ (Date.now() - now) +"ms");
+
+          $scope.showHelpTip();
+        });
+    }
+    else {
+      // Make sure to have previous center coordinate defined in the location URL
+      $scope.updateLocationHref();
+      $scope.showHelpTip();
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.loadMap = function() {
+    return $q.all([
+      $translate(['COMMON.BTN_HELP_TOUR_SCREEN', 'COMMON.BTN_REFRESH', 'MAP.COMMON.BTN_LOCALIZE_ME']),
+      leafletData.getMap($scope.mapId)
+    ]).then(function(res) {
+      var translations = res[0];
+      var map = res[1];
+      if (!$scope.map.loading) return map; // already loaded
+
+      if (!UIUtils.screen.isSmall()) {
+        // Add a start tour button
+        L.easyButton({
+            position: 'topright',      // inherited from L.Control -- the corner it goes in
+            type: 'replace',          // set to animate when you're comfy with css
+            leafletClasses: true,     // use leaflet classes to style the button?
+            states:[{                 // specify different icons and responses for your button
+              stateName: 'show-help-tour',
+              onClick: $scope.startHelpTour,
+              title: translations['COMMON.BTN_HELP_TOUR_SCREEN'],
+              icon: 'icon ion-easel'
+            }]
+          }
+        ).addTo(map);
+
+        // Add a refresh button
+        L.easyButton({
+            position: 'topright',      // inherited from L.Control -- the corner it goes in
+            type: 'replace',          // set to animate when you're comfy with css
+            leafletClasses: true,     // use leaflet classes to style the button?
+            states:[{                 // specify different icons and responses for your button
+              stateName: 'refresh',
+              onClick: function(btn, map){
+                return $scope.load(map);
+              },
+              title: translations['COMMON.BTN_REFRESH'],
+              icon: 'icon ion-refresh'
+            }]
+          }
+        ).addTo(map);
+      }
+
+      // Add loading control
+      L.Control.loading({
+        position: 'topright',
+        separate: true
+      }).addTo(map);
+
+      // Add localize me control
+      MapUtils.control.localizeMe({
+          title: translations['MAP.COMMON.BTN_LOCALIZE_ME']
+        })
+        .addTo(map);
+
+      // Add search control
+      markersSearchLayer = L.layerGroup({visible: false});
+      var searchTip = $interpolate($templateCache.get('plugins/map/templates/wot/item_search_tooltip.html'));
+      MapUtils.control.search({
+        layer: markersSearchLayer,
+        propertyName: 'title',
+        buildTip: function (text, val) {
+          return searchTip(val.layer.options);
+        },
+        moveToLocation: function(lnglat, title, map) {
+          if(this.options.zoom)
+            this._map.setView(lnglat, this.options.zoom);
+          else
+            this._map.panTo(lnglat);
+          var popupMarkerId = lnglat.layer && lnglat.layer.options && lnglat.layer.options.popupMarkerId;
+          $timeout(function(){
+            var popupMarker = popupMarkerId && _.find(map._layers, function(layer) {
+                return (layer.options && layer.options.id === popupMarkerId);
+              });
+            popupMarker && popupMarker.openPopup();
+          }, 400);
+        },
+        firstTipSubmit: true,
+        tooltipLimit: 50
+      }).addTo(map);
+
+      // Add marker cluster layer
+      var extractMarkerLayer = function(marker) {
+        return marker.options && marker.options.layer;
+      };
+      var markerClusterLayer = L.markerClusterGroup({
+        disableClusteringAtZoom: MapUtils.constants.LOCALIZE_ZOOM,
+        maxClusterRadius: 65,
+        showCoverageOnHover: false,
+        iconCreateFunction: function (cluster) {
+          var countByLayer = _.countBy(cluster.getAllChildMarkers(), extractMarkerLayer);
+          var markerColor = countByLayer.member ? 'blue' : (countByLayer.pending ? 'lightgreen' : 'lightgray');
+          var childCount = cluster.getChildCount();
+          var className = 'marker-cluster ' + markerColor + ' marker-cluster-';
+          if (childCount < 10) {
+            className += 'small';
+          } else if (childCount < 100) {
+            className += 'medium';
+          } else {
+            className += 'large';
+          }
+          return L.divIcon({ html: '<div><span>' + childCount + '</span></div>', className: className, iconSize: new L.Point(40, 40) });
+        }
+      });
+      map.eachLayer(function(layer) {
+        // Add capabilities of 'featureGroup.subgroup', if layer is a group
+        if (layer.addLayer){
+          angular.extend(layer, L.featureGroup.subGroup(markerClusterLayer));
+        }
+      });
+      markerClusterLayer.addTo(map);
+
+      // Bind map with options (e.g. to received overlays visibility updates)
+      // Cache no more need, as view is not cached
+      //MapUtils.cache.bind($scope, $scope.mapId, $scope.map);
+
+      $scope.map.loading = false;
+
+      return map;
+    });
+  };
+
+  // Load markers data
+  $scope.load = function(map) {
+    if (!map) {
+      return leafletData.getMap($scope.mapId)
+      // loop with the map object
+        .then($scope.load);
+    }
+
+    $scope.loading = true;
+    // Show loading indicator
+    map.fire('dataloading');
+
+    var options = {
+      fields: {
+        description: $scope.enableDescription
+      }
+    };
+
+    // add bounding box
+    if ($scope.map.bounds) {
+      // FIXME - this is not working well
+      //options.bounds = angular.copy($scope.map.bounds);
+      //delete options.bounds.options;
+    }
+
+    // Load wot data, from service
+    return mapWot.load(options)
+
+      .then(function(res) {
+        var markers = {};
+
+        // Clean search layer
+        markersSearchLayer.clearLayers();
+
+        if (res && res.length) {
+
+          var formatPubkey = $filter('formatPubkey');
+          var markerTemplate = $templateCache.get('plugins/map/templates/wot/popup_marker.html');
+
+          _.forEach(res, function (hit) {
+            var type = hit.pending ? 'pending' : (hit.uid ? 'member' : 'wallet');
+            var shortPubkey = formatPubkey(hit.pubkey);
+            var id = hit.index + '_' + (hit.id || (hit.uid ? (hit.uid + ':' + hit.pubkey) : hit.pubkey)).replace(/-/g, '_');
+            var marker = {
+              layer: type,
+              icon: icons[type],
+              opacity: hit.uid ? 1 : 0.7,
+              title: hit.name + ' | ' + shortPubkey,
+              lat: hit.geoPoint.lat,
+              lng: hit.geoPoint.lon,
+              getMessageScope: function () {
+                var scope = $scope.$new();
+                scope.loadingMarker = true;
+                scope.formData = {};
+                scope.$applyAsync(function() {
+                  scope.formData = {
+                    pubkey: hit.pubkey,
+                    uid: hit.uid,
+                    name: hit.name,
+                    profile: hit
+                  };
+                  scope.loadingMarker = false;
+                });
+                return scope;
+              },
+              focus: false,
+              message: markerTemplate,
+              id: id
+            };
+            markers[id] = marker;
+
+            // Create a search marker (will be hide)
+            var searchText = hit.name + ((hit.uid && hit.uid != hit.name) ? (' | ' + hit.uid) : '') + ' | ' + shortPubkey;
+            var searchMarker = angular.merge({
+              type: type,
+              opacity: 0,
+              icon: L.divIcon({
+                className: type + ' ng-hide',
+                iconSize: L.point(0, 0)
+              })
+            }, {title: searchText, pubkey: hit.pubkey, uid: hit.uid, name: hit.name, pending: hit.pending, popupMarkerId: id});
+            markersSearchLayer.addLayer(new L.Marker({
+                lat: hit.geoPoint.lat,
+                lng: hit.geoPoint.lon
+              },
+              searchMarker));
+          });
+        }
+
+        $scope.map.markers = markers;
+
+        return $timeout(function(){
+          $scope.loading = false;
+
+          // hide loading indicator
+          map.fire('dataload');
+
+          UIUtils.loading.hide();
+        });
+      })
+      .catch(function(err) {
+        $scope.map.markers = {};
+        $scope.loading = false;
+        UIUtils.onError('MAP.WOT.ERROR.LOAD_POSITION_FAILED')(err);
+      });
+  };
+
+  // Update the browser location, to be able to refresh the page
+  $scope.updateLocationHref = function(centerHash) {
+    // removeIf(device)
+    var params = $location.search() || {};
+    if (!params.c || !MapUtils.center.isDefault($scope.map.center)) {
+      centerHash = centerHash || '{0}:{1}:{2}'.format($scope.map.center.lat.toFixed(4), $scope.map.center.lng.toFixed(4), $scope.map.center.zoom);
+      $location.search({c: centerHash}).replace();
+    }
+    // endRemoveIf(device)
+  };
+
+  /* -- help tip -- */
+
+  // Show help tour
+  $scope.startHelpTour = function() {
+    return $scope.showHelpTip(0, true);
+  };
+
+  // Show help tip
+  $scope.showHelpTip = function(index, isTour) {
+    if (!isTour && !csWallet.isLogin()) return;
+
+    index = angular.isDefined(index) ? index :
+      (angular.isNumber(csSettings.data.helptip.mapwot) ? csSettings.data.helptip.mapwot : 0);
+    isTour = angular.isDefined(isTour) ? isTour : false;
+
+    if (index < 0 || index > 2/*max steps*/) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope(isTour, 'MapHelpTipCtrl');
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    // Set isTour and mapId
+    helptipScope.tour = isTour;
+    helptipScope.mapId = $scope.mapId;
+
+    return helptipScope.startMapWotTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        csSettings.data.helptip.mapwot = angular.isNumber(csSettings.data.helptip.mapwot) ?
+          Math.max(endIndex, csSettings.data.helptip.mapwot) :
+          endIndex;
+        csSettings.store();
+      });
+  };
+}
+
+
+MapRegistryViewController.$inject = ['$scope', '$filter', '$templateCache', '$interpolate', '$timeout', '$location', '$translate', '$q', 'ionicReady', 'leafletData', 'UIUtils', 'csSettings', 'csWallet', 'MapUtils', 'mapRegistry'];
+MapPageEditController.$inject = ['$scope', '$controller'];
+angular.module('cesium.map.registry.controllers', ['cesium.services', 'cesium.map.services', 'cesium.map.help.controllers', 'cesium.map.common.controllers'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+
+        .extendState('app.wot_lookup.tab_registry', {
+          points: {
+            'nav-buttons': {
+              template: '<button class="button button-icon button-clear" ui-sref="app.view_registry_map"><i class="icon ion-ios-location"></i></button>'
+            }
+          }
+        })
+
+        .extendState('app.registry_lookup_lg', {
+          points: {
+            'filter-buttons': {
+              templateUrl: "plugins/map/templates/registry/lookup_lg_extend.html"
+            }
+          }
+        })
+
+        .extendState('app.registry_edit_record', {
+          points: {
+            'after-position': {
+              templateUrl: 'plugins/map/templates/common/edit_position_extend.html',
+              controller: 'MapPageEditCtrl'
+            }
+          }
+        });
+
+      $stateProvider
+        .state('app.view_registry_map', {
+          url: "/wot/pagemap?c&center",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/map/templates/registry/view_map.html",
+              controller: 'MapRegistryViewCtrl'
+            }
+          },
+          // Seems to works without cache ??
+          //cache: false,
+          data: {
+            silentLocationChange: true
+          }
+        });
+    }
+  }])
+
+  // Map view of the registry
+  .controller('MapRegistryViewCtrl', MapRegistryViewController)
+
+  .controller('MapPageEditCtrl', MapPageEditController)
+;
+
+
+function MapRegistryViewController($scope, $filter, $templateCache, $interpolate, $timeout, $location, $translate, $q,
+                                   ionicReady, leafletData,
+                                   UIUtils, csSettings, csWallet, MapUtils, mapRegistry) {
+  'ngInject';
+
+  var
+    // Create a  hidden layer, to hold search markers
+    markersSearchLayer,
+    icons= {
+      shop: {
+        type: 'awesomeMarker',
+        icon: 'page-shop',
+        markerColor: 'blue'
+      },
+      company: {
+        type: 'awesomeMarker',
+        icon: 'page-company',
+        markerColor: 'blue'
+      },
+      association: {
+        type: 'awesomeMarker',
+        icon: 'page-association',
+        markerColor: 'lightgreen',
+        iconColor: 'gray'
+      },
+      institution: {
+        type: 'awesomeMarker',
+        icon: 'page-institution',
+        markerColor: 'lightgray'
+      }
+    };
+
+  $scope.loading = true;
+  $scope.loadingMarker = true;
+  $scope.mapId = 'map-registry-' + $scope.$id;
+
+  $scope.map = MapUtils.map({
+    cache: 'map-registry',
+    layers: {
+      overlays: {
+        // Pages
+        shop: {
+          type: 'featureGroup',
+          name: 'MAP.REGISTRY.VIEW.LAYER.SHOP',
+          visible: true
+        },
+        company: {
+          type: 'featureGroup',
+          name: 'MAP.REGISTRY.VIEW.LAYER.COMPANY',
+          visible: true
+        },
+        association: {
+          type: 'featureGroup',
+          name: 'MAP.REGISTRY.VIEW.LAYER.ASSOCIATION',
+          visible: true
+        },
+        institution: {
+          type: 'featureGroup',
+          name: 'MAP.REGISTRY.VIEW.LAYER.INSTITUTION',
+          visible: true
+        }
+      }
+    },
+    bounds: {},
+    markers: {},
+    loading: true
+  }, $scope.mapId);
+
+  // Variables for marker
+  $scope.formData = {};
+  $scope.showDescription = false;
+  ionicReady().then(function() {
+    $scope.enableDescription = !UIUtils.screen.isSmall() && ionic.Platform.grade.toLowerCase() === 'a';
+    if (!$scope.enableDescription) {
+      console.debug("[map] [wot] Disable profile description.", ionic.Platform.grade);
+    }
+  });
+
+  $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
+    // Enable back button (workaround need for navigation outside tabs - https://stackoverflow.com/a/35064602)
+    viewData.enableBack = UIUtils.screen.isSmall() ? true : viewData.enableBack;
+  });
+
+  $scope.enter = function(e, state) {
+
+    if ($scope.loading) {
+      if (state.stateParams && state.stateParams.c) {
+        var cPart = state.stateParams.c.split(':');
+        $scope.map.center.lat = parseFloat(cPart[0]);
+        $scope.map.center.lng = parseFloat(cPart[1]);
+        $scope.map.center.zoom = parseInt(cPart[2]);
+      }
+
+      $scope.$watch("map.center", function() {
+        if (!$scope.loading) {
+          return $timeout(function() {
+            $scope.updateLocationHref();
+          }, 300);
+        }
+      }, true);
+
+      // Load the map (and init if need)
+      $scope.loadMap()
+        .then(function() {
+          if (csWallet.isLogin()) {
+            $scope.showHelpTip();
+          }
+          return $scope.load();
+        });
+    }
+    else {
+      // Make sure to have previous center coordinate defined in the location URL
+      $scope.updateLocationHref();
+      if (csWallet.isLogin()) {
+        $scope.showHelpTip();
+      }
+    }
+  };
+  $scope.$on('$ionicView.enter', $scope.enter);
+
+  $scope.loadMap = function() {
+    return $q.all([
+      $translate(['COMMON.BTN_HELP_TOUR_SCREEN', 'COMMON.BTN_REFRESH', 'MAP.COMMON.BTN_LOCALIZE_ME']),
+      leafletData.getMap($scope.mapId)
+    ]).then(function(res) {
+      var translations = res[0];
+      var map = res[1];
+      if (!$scope.map.loading) return map; // already loaded
+
+      if (!UIUtils.screen.isSmall()) {
+
+        // Add a refresh button
+        L.easyButton({
+            position: 'topright',      // inherited from L.Control -- the corner it goes in
+            type: 'replace',          // set to animate when you're comfy with css
+            leafletClasses: true,     // use leaflet classes to style the button?
+            states:[{                 // specify different icons and responses for your button
+              stateName: 'refresh',
+              onClick: function(btn, map){
+                return $scope.load(map);
+              },
+              title: translations['COMMON.BTN_REFRESH'],
+              icon: 'icon ion-refresh'
+            }]
+          }
+        ).addTo(map);
+      }
+
+      // Add loading control
+      L.Control.loading({
+        position: 'topright',
+        separate: true
+      }).addTo(map);
+
+      // Add localize me control
+      MapUtils.control.localizeMe({
+          title: translations['MAP.COMMON.BTN_LOCALIZE_ME']
+        })
+        .addTo(map);
+
+      // Add search control
+      markersSearchLayer = L.layerGroup({visible: false});
+      var searchTip = $interpolate($templateCache.get('plugins/map/templates/registry/item_search_tooltip.html'));
+      MapUtils.control.search({
+        layer: markersSearchLayer,
+        propertyName: 'title',
+        buildTip: function (text, val) {
+          return searchTip(val.layer.options);
+        },
+        moveToLocation: function(lnglat, title, map) {
+          if(this.options.zoom)
+            this._map.setView(lnglat, this.options.zoom);
+          else
+            this._map.panTo(lnglat);
+          var popupMarkerId = lnglat.layer && lnglat.layer.options && lnglat.layer.options.popupMarkerId;
+          $timeout(function(){
+            var popupMarker = popupMarkerId && _.find(map._layers, function(layer) {
+                return (layer.options && layer.options.id === popupMarkerId);
+              });
+            popupMarker && popupMarker.openPopup();
+          }, 400);
+        },
+        firstTipSubmit: true,
+        tooltipLimit: 50
+      }).addTo(map);
+
+      // Add marker cluster layer
+      var extractMarkerLayer = function(marker) {
+        return marker.options && marker.options.layer;
+      };
+      var markerClusterLayer = L.markerClusterGroup({
+        disableClusteringAtZoom: MapUtils.constants.LOCALIZE_ZOOM,
+        maxClusterRadius: 65,
+        showCoverageOnHover: false,
+        iconCreateFunction: function (cluster) {
+          var countByLayer = _.countBy(cluster.getAllChildMarkers(), extractMarkerLayer);
+          var markerColor = countByLayer.shop||countByLayer.company ? 'blue' : (countByLayer.association ? 'lightgreen' : 'lightgray');
+          var childCount = cluster.getChildCount();
+          var className = 'marker-cluster ' + markerColor + ' marker-cluster-';
+          if (childCount < 10) {
+            className += 'small';
+          } else if (childCount < 100) {
+            className += 'medium';
+          } else {
+            className += 'large';
+          }
+          return L.divIcon({ html: '<div><span>' + childCount + '</span></div>', className: className, iconSize: new L.Point(40, 40) });
+        }
+      });
+      map.eachLayer(function(layer) {
+        // Add capabilities of 'featureGroup.subgroup', if layer is a group
+        if (layer.addLayer){
+          angular.extend(layer, L.featureGroup.subGroup(markerClusterLayer));
+        }
+      });
+      markerClusterLayer.addTo(map);
+
+      // Bind map with options (e.g. to received overlays visibility updates)
+      // Cache no more need, as view is not cached
+      //MapUtils.cache.bind($scope, $scope.mapId, $scope.map);
+
+      $scope.map.loading = false;
+      return map;
+    });
+  };
+
+  // Load markers data
+  $scope.load = function(map) {
+    if (!map) {
+      return leafletData.getMap($scope.mapId)
+      // loop with the map object
+        .then($scope.load);
+    }
+
+    $scope.loading = true;
+    // Show loading indicator
+    map.fire('dataloading');
+
+    var options = {
+      fields: {
+        description: $scope.enableDescription
+      }
+    };
+
+    // Load wot data, from service
+    return mapRegistry.load(options)
+
+      .then(function(res) {
+        var markers = {};
+
+        // Clean search layer
+        markersSearchLayer.clearLayers();
+
+        if (res && res.length) {
+
+          var formatPubkey = $filter('formatPubkey');
+          var pageMarkerTemplate = $templateCache.get('plugins/map/templates/registry/popup_marker.html');
+
+          _.forEach(res, function (hit) {
+            var shortPubkey = formatPubkey(hit.pubkey);
+            var id = hit.index + '_' + (hit.id).replace(/-/g, '_');
+            var marker = {
+              layer: hit.type,
+              icon: icons[hit.type],
+              opacity: 1,
+              title: hit.name + ' | ' + shortPubkey,
+              lat: hit.geoPoint.lat,
+              lng: hit.geoPoint.lon,
+              getMessageScope: function () {
+                var scope = $scope.$new();
+                scope.loadingMarker = true;
+                scope.formData = {};
+                scope.$applyAsync(function() {
+                  angular.extend(scope.formData, hit);
+                  scope.loadingMarker = false;
+                });
+                return scope;
+              },
+              focus: false,
+              message: pageMarkerTemplate,
+              id: id
+            };
+            markers[id] = marker;
+
+            // Create a search marker (will be hide)
+            var searchText = hit.name + ' | ' + shortPubkey;
+            var searchMarker = angular.merge({
+              type: hit.type,
+              opacity: 0,
+              icon: L.divIcon({
+                className: hit.type + ' ng-hide',
+                iconSize: L.point(0, 0)
+              })
+            }, {title: searchText, pubkey: hit.pubkey, name: hit.name, popupMarkerId: id});
+            markersSearchLayer.addLayer(new L.Marker({
+                lat: hit.geoPoint.lat,
+                lng: hit.geoPoint.lon
+              },
+              searchMarker));
+          });
+        }
+
+        $scope.map.markers = markers;
+
+        $scope.loading = false;
+
+        // hide loading indicator
+        map.fire('dataload');
+      })
+      .catch(function(err) {
+        $scope.map.markers = {};
+        $scope.loading = false;
+        UIUtils.onError('MAP.WOT.ERROR.LOAD_POSITION_FAILED')(err);
+      });
+  };
+
+  // Update the browser location, to be able to refresh the page
+  $scope.updateLocationHref = function(centerHash) {
+    // removeIf(device)
+    var params = $location.search() || {};
+    if (!params.c || !MapUtils.center.isDefault($scope.map.center)) {
+      centerHash = centerHash || '{0}:{1}:{2}'.format($scope.map.center.lat.toFixed(4), $scope.map.center.lng.toFixed(4), $scope.map.center.zoom);
+      $location.search({c: centerHash}).replace();
+    }
+    // endRemoveIf(device)
+  };
+
+  // removeIf(device)
+  // Update the browser location, to be able to refresh the page
+  // FIXME: not need, should be removed
+  $scope.$on("centerUrlHash", function(event, centerHash) {
+    if (!$scope.loading) {
+
+      return $timeout(function() {
+        $scope.updateLocationHref(centerHash);
+      }, 300);
+    }
+  });
+  // endRemoveIf(device)
+
+
+  /* -- help tip -- */
+
+  // Show help tour
+  $scope.startHelpTour = function() {
+    return $scope.showHelpTip(0, true);
+  };
+
+  // Show help tip
+  $scope.showHelpTip = function(index, isTour) {
+    index = angular.isDefined(index) ? index :
+      (angular.isNumber(csSettings.data.helptip.mapwot) ? csSettings.data.helptip.mapwot : 0);
+    isTour = angular.isDefined(isTour) ? isTour : false;
+
+    if (index < 0 || index > 2/*max steps*/) return;
+
+    // Create a new scope for the tour controller
+    var helptipScope = $scope.createHelptipScope(isTour, 'MapHelpTipCtrl');
+    if (!helptipScope) return; // could be undefined, if a global tour already is already started
+
+    // Set isTour and mapId
+    helptipScope.tour = isTour;
+    helptipScope.mapId = $scope.mapId;
+
+    return helptipScope.startMapWotTour(index, false)
+      .then(function(endIndex) {
+        helptipScope.$destroy();
+        csSettings.data.helptip.mapwot = angular.isNumber(csSettings.data.helptip.mapwot) ?
+          Math.max(endIndex, csSettings.data.helptip.mapwot) :
+          endIndex;
+        csSettings.store();
+      });
+  };
+}
+
+
+function MapPageEditController($scope, $controller) {
+  'ngInject';
+
+  $scope.mapId = 'map-page-' + $scope.$id;
+
+  // Initialize the super classes and extend it.
+  angular.extend(this, $controller('MapEditPositionAbstractCtrl', { $scope: $scope}));
+}
+
+
+angular.module('cesium.map.network.controllers', ['cesium.services', 'cesium.map.services'])
+
+  .config(['$stateProvider', 'PluginServiceProvider', 'csConfig', function($stateProvider, PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+
+        .extendState('app.network', {
+          points: {
+            'filter-buttons': {
+              templateUrl: "plugins/map/templates/network/lookup_extend.html",
+              controller: "ESExtensionCtrl"
+            }
+          }
+        });
+
+      $stateProvider
+        .state('app.view_network_map', {
+          url: "/network/map?c",
+          views: {
+            'menuContent': {
+              templateUrl: "plugins/map/templates/network/view_map.html",
+              controller: 'MapNetworkViewCtrl'
+            }
+          },
+          data: {
+            silentLocationChange: true
+          }
+        });
+    }
+  }])
+
+  // [NEW] Manage events from the page #/app/wot/map
+  .controller('MapNetworkViewCtrl', ['$scope', '$controller', '$q', '$interpolate', '$translate', '$filter', '$templateCache', '$timeout', '$location', 'esGeo', 'UIUtils', 'csNetwork', 'MapUtils', 'leafletData', function($scope, $controller, $q, $interpolate, $translate, $filter, $templateCache, $timeout, $location,
+                                         esGeo, UIUtils, csNetwork, MapUtils, leafletData) {
+    'ngInject';
+
+    // Initialize the super class and extend it.
+    angular.extend(this, $controller('NetworkLookupCtrl', {$scope: $scope}));
+
+    var
+      formatPubkey = $filter('formatPubkey'),
+      markerMessageTemplate,
+      markersSearchLayer,
+      icons= {
+        member: {
+          type: 'awesomeMarker',
+          icon: 'person',
+          markerColor: 'green',
+          iconColor: 'white'
+        },
+        mirror: {
+          type: 'awesomeMarker',
+          icon: 'radio-waves',
+          markerColor: 'green',
+          iconColor: 'white'
+        },
+        offline: {
+          type: 'awesomeMarker',
+          icon: 'ion-close-circled',
+          markerColor: 'red',
+          iconColor: 'white'
+        }
+      },
+      markerIdByPeerId = {},
+      markerCounter = 0
+    ;
+
+    // Init the template for marker popup
+    markerMessageTemplate = '<div class="item item-peer item-icon-left no-border" ng-click="selectPeer(peer)">';
+    markerMessageTemplate += $templateCache.get('templates/network/item_content_peer.html');
+    markerMessageTemplate += '</div>';
+    markerMessageTemplate = markerMessageTemplate.replace(/[:]rebind[:]|[:][:]/g, ''); // remove binding limitation
+
+    $scope.loading = true;
+    $scope.mapId = 'map-network-' + $scope.$id;
+    $scope.helptipPrefix = 'helptip-' + $scope.mapId; //Override value from super controller (avoid error during help tour)
+
+    $scope.map = MapUtils.map({
+      cache: 'map-network',
+      layers: {
+        overlays: {
+          member: {
+            type: 'featureGroup',
+            name: 'MAP.NETWORK.VIEW.LAYER.MEMBER',
+            visible: true
+          },
+          mirror: {
+            type: 'featureGroup',
+            name: 'MAP.NETWORK.VIEW.LAYER.MIRROR',
+            visible: true
+          },
+          offline: {
+            type: 'featureGroup',
+            name: 'MAP.NETWORK.VIEW.LAYER.OFFLINE',
+            visible: false
+          }
+        }
+      },
+      bounds: {},
+      loading: true,
+      markers: {}
+    });
+
+    var inheritedEnter = $scope.enter;
+    $scope.enter = function(e, state) {
+      if ($scope.loading) {
+        if (state.stateParams && state.stateParams.c) {
+          var cPart = state.stateParams.c.split(':');
+          $scope.map.center.lat = parseFloat(cPart[0]);
+          $scope.map.center.lng = parseFloat(cPart[1]);
+          $scope.map.center.zoom = parseInt(cPart[2]);
+        }
+
+        $scope.$watch("map.center", function() {
+          if (!$scope.map.loading) {
+            return $timeout(function() {
+              $scope.updateLocationHref();
+            }, 300);
+          }
+        }, true);
+
+        // Load the map (and init if need)
+        $scope.loadMap()
+          .then(function(map){
+
+            // Load indicator
+            map.fire('dataloading');
+
+            // inherited
+            return inheritedEnter(e, state); // will call inherited load()
+          });
+      }
+
+      else {
+        // Make sur to have previous center coordinate defined in the location URL
+        $scope.updateLocationHref();
+
+        // inherited
+        return inheritedEnter(e, state);
+      }
+    };
+    $scope.$on('$ionicView.enter', $scope.enter);
+
+    var inheritedComputeOptions = $scope.computeOptions;
+    $scope.computeOptions = function() {
+      var options = inheritedComputeOptions();
+      options.filter.online = 'all';
+      return options;
+    };
+
+    $scope.loadMap = function() {
+      return leafletData.getMap($scope.mapId).then(function(map) {
+        if (!$scope.map.loading) return map; // already loaded
+
+        // Add loading control
+        L.Control.loading({
+          position: 'topright',
+          separate: true
+        }).addTo(map);
+
+        // Add search control
+        // Create a  hidden layer, to hold search markers
+        markersSearchLayer = L.layerGroup({visible: false});
+        var searchTip = $interpolate($templateCache.get('plugins/map/templates/network/item_search_tooltip.html'));
+        MapUtils.control.search({
+          layer: markersSearchLayer,
+          propertyName: 'title',
+          buildTip: function (text, val) {
+            return searchTip(val.layer.options);
+          },
+          moveToLocation: function(lnglat, title, map) {
+            if(this.options.zoom)
+              this._map.setView(lnglat, this.options.zoom);
+            else
+              this._map.panTo(lnglat);
+            var popupMarkerId = lnglat.layer && lnglat.layer.options && lnglat.layer.options.popupMarkerId;
+            if (popupMarkerId) {
+              $timeout(function(){
+                var popupMarker = _.find(map._layers, function(layer) {
+                  return (layer.options && layer.options.id === popupMarkerId);
+                });
+                if (popupMarker) popupMarker.openPopup();
+              }, 400);
+            }
+          },
+          firstTipSubmit: true,
+          tooltipLimit: 50
+        })
+        .addTo(map);
+
+        // Add marker cluster layer
+        var _getMarkerColor = function(marker) {
+          return marker.options && marker.options.icon.options.markerColor;
+        };
+        var markerClusterLayer = L.markerClusterGroup({
+          disableClusteringAtZoom: MapUtils.constants.LOCALIZE_ZOOM,
+          maxClusterRadius: 65,
+          showCoverageOnHover: false,
+          iconCreateFunction: function (cluster) {
+            var countByColor = _.countBy(cluster.getAllChildMarkers(), _getMarkerColor);
+            var markerColor = countByColor.green ? 'green' :
+              (countByColor.lightgreen ? 'lightgreen' : (countByColor.lightgray ? 'lightgray' : 'red'));
+            var childCount = cluster.getChildCount();
+            var className = 'marker-cluster ' + markerColor + ' marker-cluster-';
+            if (childCount < 10) {
+              className += 'small';
+            } else if (childCount < 100) {
+              className += 'medium';
+            } else {
+              className += 'large';
+            }
+            return L.divIcon({ html: '<div><span>' + childCount + '</span></div>', className: className, iconSize: new L.Point(40, 40) });
+          }
+        });
+        map.eachLayer(function(layer) {
+          // Add capabilities of 'featureGroup.subgroup', if layer is a group
+          if (layer.addLayer){
+            angular.extend(layer, L.featureGroup.subGroup(markerClusterLayer));
+          }
+        });
+        if (esGeo.point.ip.license) {
+          markerClusterLayer.getAttribution = function() {
+            return '<a target=\"_blank\" href="{0}">{1}</a>'.format(
+              esGeo.point.ip.license.url,
+              esGeo.point.ip.license.name);
+          };
+        }
+        markerClusterLayer.addTo(map);
+
+        //$scope.map.layers.overlays['offline'].visible=false;
+
+        $scope.map.loading = false;
+        return map;
+      });
+    };
+
+    $scope.updateView = function(data) {
+      console.debug("[map] [peers] Updating UI");
+
+      // Always tru if network not started (e.g. after leave+renter the view)
+      $scope.search.loading = !$scope.networkStarted || csNetwork.isBusy();
+
+      // Store marker id, to be able to apply deletion
+      var markerIdByPeerIdToRemove = angular.copy(markerIdByPeerId);
+
+      _.forEach(data.peers||[], function(peer){
+        // skip TOR peer
+        if (peer.isTor()) return; // already define
+        // get marker id
+        var markerId = markerIdByPeerId[peer.id];
+
+        // if already exists
+        if (markerId && $scope.map.markers[markerId]) {
+          $scope.updateMarker($scope.map.markers[markerId], peer);
+          delete markerIdByPeerIdToRemove[peer.id];
+          return;
+        }
+
+        // Get position by IP
+        var bma = peer.bma;
+        var address = peer.hasValid4(bma) ? bma.ipv4 : (bma.dns || bma.ipv6);
+        esGeo.point.ip.search(address)
+
+        // Create the marker
+          .then(function(position){// Add marker to list
+            markerId = '' + markerCounter++;
+            var marker = $scope.updateMarker({
+              position: position,
+              getMessageScope: function() {
+                var scope = $scope.$new();
+                scope.peer = peer;
+                return scope;
+              },
+              draggable: false,
+              focus: false,
+              message: markerMessageTemplate,
+              id: markerId
+            }, peer);
+
+
+            $scope.map.markers[markerId] = marker;
+            markerIdByPeerId[peer.id] = markerId;
+
+            // Create a search marker (will be hide)
+            var searchServer = peer.dns || peer.server;
+            var searchText = searchServer +
+              (peer.uid ? (' | ' + (peer.name||peer.uid)) : '') +
+              ' | ' + formatPubkey(peer.pubkey);
+            var searchIp;
+            if (bma.ipv4 && !(peer.dns || peer.server).startsWith(bma.ipv4)) {
+              searchIp = bma.ipv4;
+              searchText += ' | ' + bma.ipv4;
+            }
+            markersSearchLayer.addLayer(new L.Marker({
+                lat: position.lat,
+                lng: position.lng
+              },
+              {
+                opacity: 0,
+                icon: L.divIcon({
+                  className: 'ng-hide',
+                  iconSize: L.point(0, 0)
+                }),
+                title: searchText,
+                peer: angular.extend({ipv4: searchIp}, peer),
+                popupMarkerId: markerId
+              }));
+          })
+          .catch(function(err) {
+            console.debug('No position found for address ['+address+']', err);
+          });
+      });
+
+      // Remove old markers not found in the new result
+      _.forEach(_.keys(markerIdByPeerIdToRemove), function(peerId) {
+        delete markerIdByPeerId[peerId];
+      });
+      _.forEach(_.values(markerIdByPeerIdToRemove), function(markerId) {
+        delete $scope.map.markers[markerId];
+      });
+
+      // Hide loading indicator, when finished
+      if (!$scope.search.loading) {
+        leafletData.getMap($scope.mapId)
+          .then(function (map) {
+            $scope.loading = false;
+            map.fire('dataload');
+          });
+      }
+    };
+
+    $scope.updateMarker = function(marker, peer) {
+      marker.layer = !peer.online ? 'offline' : (peer.uid ? 'member' : 'mirror');
+      marker.icon = angular.copy(icons[marker.layer]);
+      marker.opacity = peer.online ? 1 : 1;
+      marker.title = peer.dns || peer.server;
+      if (peer.online && !peer.hasMainConsensusBlock) {
+        marker.icon.markerColor = peer.hasConsensusBlock ? 'lightgreen' : 'lightgray';
+        marker.opacity = peer.hasConsensusBlock ? 0.9 : 0.8;
+      }
+      if (!marker.lng) {
+        marker.lng = marker.position.lng + Math.random() / 1000;
+        marker.lat = marker.position.lat + Math.random() / 1000;
+      }
+
+      return marker;
+    };
+
+
+    // Update the browser location, to be able to refresh the page
+    $scope.updateLocationHref = function(centerHash) {
+      // removeIf(device)
+      var params = $location.search() || {};
+      if (!params.c || !MapUtils.center.isDefault($scope.map.center)) {
+        centerHash = centerHash || '{0}:{1}:{2}'.format($scope.map.center.lat.toFixed(4), $scope.map.center.lng.toFixed(4), $scope.map.center.zoom);
+        $location.search({ c:  centerHash}).replace();
+      }
+      // endRemoveIf(device)
+    };
+
+    // removeIf(device)
+    // Update the browser location, to be able to refresh the page
+    // FIXME: not need, should be removed
+    $scope.$on("centerUrlHash", function(event, centerHash) {
+      if (!$scope.loading) {
+        return $timeout(function() {
+          $scope.updateLocationHref(centerHash);
+        }, 300);
+      }
+    });
+    // endRemoveIf(device)
+
+    /* -- help tip -- */
+
+    $scope.showHelpTip = function() {
+      // override subclass
+    };
+  }]);
+
+
+MapProfileEditController.$inject = ['$scope', '$controller'];
+angular.module('cesium.map.user.controllers', ['cesium.services', 'cesium.map.services', 'cesium.map.common.controllers'])
+
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+
+      PluginServiceProvider
+
+        .extendState('app.edit_profile', {
+          points: {
+            'after-position': {
+              templateUrl: 'plugins/map/templates/common/edit_position_extend.html',
+              controller: 'MapProfileEditCtrl'
+            }
+          }
+        })
+
+        .extendState('app.edit_profile_by_id', {
+          points: {
+            'after-position': {
+              templateUrl: 'plugins/map/templates/common/edit_position_extend.html',
+              controller: 'MapProfileEditCtrl'
+            }
+          }
+        });
+    }
+  }])
+
+  .controller('MapProfileEditCtrl', MapProfileEditController);
+
+
+function MapProfileEditController($scope, $controller) {
+  'ngInject';
+
+  $scope.mapId = 'map-profile-' + $scope.$id;
+
+  // Initialize the super classes and extend it.
+  angular.extend(this, $controller('MapEditPositionAbstractCtrl', { $scope: $scope}));
+}
+
+angular.module('cesium.map.settings.controllers', ['cesium.services'])
+
+  // Configure menu items
+  .config(['PluginServiceProvider', 'csConfig', function(PluginServiceProvider, csConfig) {
+    'ngInject';
+
+    var enable = csConfig.plugins && csConfig.plugins.es;
+    if (enable) {
+      // Extend settings via extension points
+      PluginServiceProvider.extendState('app.es_settings', {
+        points: {
+          'common': {
+            templateUrl: "plugins/map/templates/settings/es_settings_extend.html"
+          }
+        }
+      });
+    }
+  }])
+
+;
+
+
+
+
+MapHelpTipController.$inject = ['$scope', '$controller'];
+angular.module('cesium.map.help.controllers', ['cesium.services'])
+
+  .controller('MapHelpTipCtrl', MapHelpTipController)
+;
+
+
+/* ----------------------------
+*  Help Tip
+* ---------------------------- */
+function MapHelpTipController($scope, $controller) {
+
+  // Initialize the super class and extend it.
+  angular.extend(this, $controller('HelpTipCtrl', {$scope: $scope}));
+
+  $scope.mapId = undefined; // should be set by caller controllers
+
+  /**
+   * Features tour on map WOT
+   * @returns {*}
+   */
+  $scope.startMapWotTour = function(startIndex, hasNext) {
+
+    var steps = [
+
+      function(){
+        return $scope.showHelpTip('helptip-map-wot', {
+          bindings: {
+            content: 'MAP.HELP.TIP.WOT',
+            icon: {
+              position: 'center',
+              glyph: 'ion-information-circled'
+            }
+          }
+        });
+      },
+
+      function(){
+        return $scope.showHelpTip(null, {
+          selector: '#{0} .leaflet-control-search'.format($scope.mapId),
+          bindings: {
+            content: 'MAP.HELP.TIP.WOT_BTN_SEARCH',
+            icon: {
+              position: 'center'
+            }
+          }
+        });
+      },
+
+      function () {
+        return $scope.showHelpTip(null, {
+          selector: '#{0} .leaflet-control-layers'.format($scope.mapId),
+          bindings: {
+            content: 'MAP.HELP.TIP.WOT_BTN_LAYERS',
+            icon: {
+              position: 'right'
+            },
+            hasNext: hasNext
+          }
+        });
+      }
+    ];
+
+    // Launch steps
+    return $scope.executeStep('mapwot', steps, startIndex);
+  };
+}
+
+// Ionic Starter App
+
+// angular.module is a global place for creating, registering and retrieving Angular modules
+// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
+// the 2nd parameter is an array of 'requires'
+// 'starter.controllers' is found in controllers.js
+angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'ngSanitize', 'pascalprecht.translate',
+  'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier', 'ImageCropper', 'ion-digit-keyboard',
+  'FBAngular', // = angular-fullscreen
+  // removeIf(no-device)
+  'ngCordova',
+  // endRemoveIf(no-device)
+  // removeIf(no-plugin)
+  'cesium.plugins',
+  // endRemoveIf(no-plugin)
+  'cesium.filters', 'cesium.config', 'cesium.platform', 'cesium.controllers', 'cesium.templates', 'cesium.translations', 'cesium.components', 'cesium.directives'
+  ])
+
+  // Override the automatic sync between location URL and state
+  // (see watch event $locationChangeSuccess in the run() function bellow)
+  .config(['$urlRouterProvider', function ($urlRouterProvider) {
+    'ngInject';
+
+    $urlRouterProvider.deferIntercept();
+  }])
+
+  .run(['$rootScope', '$translate', '$state', '$window', '$urlRouter', 'ionicReady', 'Device', 'UIUtils', '$ionicConfig', 'PluginService', 'csPlatform', 'csWallet', function($rootScope, $translate, $state, $window, $urlRouter, ionicReady,
+                Device, UIUtils, $ionicConfig, PluginService, csPlatform, csWallet) {
+    'ngInject';
+
+    // Must be done before any other $stateChangeStart listeners
+    csPlatform.disableChangeState();
+
+    var preventStateChange = false; // usefull to avoid duplicate login, when a first page with auth
+    $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {
+      if (event.defaultPrevented) return;
+
+      var skip = !next.data || $rootScope.tour || event.currentScope.tour; // disabled for help tour
+      if (skip) return;
+
+      if (preventStateChange) {
+        event.preventDefault();
+        return;
+      }
+
+      var options;
+
+      var wallet = nextParams.wallet && nextParams.wallet != "default" ? csWallet.children.get(nextParams.wallet) : csWallet;
+      if (nextParams.wallet && !wallet) {
+        console.warn("[app] Unable to find the children wallet: " + nextParams.wallet);
+      }
+      // If state need auth
+      if (next.data.auth && !wallet.isAuth()) {
+        event.preventDefault();
+        options = next.data.minData ? {minData: true} : undefined;
+        preventStateChange = true;
+        return csWallet.auth(options)
+          .then(function() {
+            preventStateChange = false;
+            return $state.go(next.name, nextParams);
+          })
+          .catch(function(err) {
+            preventStateChange = false;
+            // If cancel, redirect to home, if no current state
+            if (err === 'CANCELLED' && !$state.current.name) {
+              return $state.go('app.home');
+            }
+          });
+      }
+
+      // If state need login
+      else if (next.data.login && !csWallet.isLogin()) {
+        event.preventDefault();
+        options = next.data.minData ? {minData: true} : undefined;
+        preventStateChange = true;
+        return csWallet.login(options)
+          .then(function() {
+            preventStateChange = false;
+            return $state.go(next.name, nextParams);
+          })
+          .catch(function(err) {
+            preventStateChange = false;
+            // If cancel, redirect to home, if no current state
+            if (err === 'CANCELLED' && !$state.current.name) {
+              return $state.go('app.home');
+            }
+          });
+      }
+
+      // If state need login or auth, make sure to load wallet data
+      else if (next.data.login || next.data.auth)  {
+        options = next.data.minData ? {minData: true} : undefined;
+        if (!wallet.isDataLoaded(options)) {
+          event.preventDefault();
+          // Show loading message, when full load
+          if (!options || !options.minData) UIUtils.loading.show();
+          return wallet.loadData(options)
+            .then(function() {
+              preventStateChange = false;
+              return $state.go(next.name, nextParams);
+            });
+        }
+      }
+    });
+
+    // Leave the current page, if auth was required to access it
+    csWallet.api.data.on.unauth($rootScope, function() {
+      if ($state.current && $state.current.data && $state.current.data.auth) {
+        $state.go('app.home');
+      }
+    });
+
+    // Prevent $urlRouter's default handler from firing (don't sync ui router)
+    $rootScope.$on('$locationChangeSuccess', function(event, newUrl, oldUrl) {
+      if ($state.current.data && $state.current.data.silentLocationChange === true) {
+        // Skipping propagation, because same URL, and state configured with 'silentLocationChange' options
+        var sameUrl = oldUrl && (oldUrl.split('?')[0] === newUrl.split('?')[0]);
+        if (sameUrl) event.preventDefault();
+      }
+    });
+
+    // Configures $urlRouter's listener *after* the previous listener
+    $urlRouter.listen();
+
+    // Start plugins eager services
+    PluginService.start();
+
+    ionicReady().then(function() {
+      if (ionic.Platform.isIOS()) {
+        if(window.StatusBar) {
+          // fix font color not white on iOS 11+
+          StatusBar.styleLightContent();
+        }
+      }
+    });
+  }])
+;
+
+window.ionic.Platform.ready(function() {
+  angular.bootstrap(document, ['cesium']);
+});
+
+angular.module('cesium.components', [])
+
+  .component('csBadgeCertification', {
+    bindings: {
+      requirements: '=',
+      parameters: '<',
+      csId: '@'
+    },
+    templateUrl: 'templates/common/badge_certification_count.html'
+  })
+
+  .component('csBadgeGivenCertification', {
+    bindings: {
+      identity: '=',
+      parameters: '<',
+      csId: '@'
+    },
+    templateUrl: 'templates/common/badge_given_certification_count.html'
+  })
+
+  .component('csSortIcon', {
+    bindings: {
+      asc: '=',
+      sort: '=',
+      toggle: '<'
+    },
+    template:
+    '<i class="ion-chevron-up" ng-class="{gray: !$ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative; left: 5px; top:-5px; font-size: 9px;"></i>' +
+    '<i class="ion-chevron-down" ng-class="{gray : $ctrl.asc || $ctrl.sort != $ctrl.toggle}" style="position: relative; left: -2.6px; top: 3px; font-size: 9px;"></i>'
+  })
+
+;
+
+angular.module('cesium.directives', [])
+
+  // Add new compare-to directive (need for form validation)
+  .directive("compareTo", function() {
+      return {
+          require: "?ngModel",
+          link: function(scope, element, attributes, ngModel) {
+            if (ngModel && attributes.compareTo) {
+              ngModel.$validators.compareTo = function(modelValue) {
+                  return modelValue == scope.$eval(attributes.compareTo);
+              };
+
+              scope.$watch(attributes.compareTo, function() {
+                  ngModel.$validate();
+              });
+            }
+          }
+      };
+  })
+
+  // Add new different-to directive (need for form validation)
+  .directive("differentTo", function() {
+    return {
+      require: "?ngModel",
+      link: function(scope, element, attributes, ngModel) {
+        if (ngModel && attributes.differentTo) {
+          ngModel.$validators.differentTo = function(modelValue) {
+            return modelValue != scope.$eval(attributes.differentTo);
+          };
+
+          scope.$watch(attributes.differentTo, function() {
+            ngModel.$validate();
+          });
+        }
+      }
+    };
+  })
+
+  .directive('numberFloat', function() {
+    var NUMBER_REGEXP = new RegExp('^[0-9]+([.,][0-9]+)?$');
+
+    return {
+      require: '?ngModel',
+      link: function(scope, element, attributes, ngModel) {
+        if (ngModel) {
+          ngModel.$validators.numberFloat = function(value) {
+            return ngModel.$isEmpty(value) || NUMBER_REGEXP.test(value);
+          };
+        }
+      }
+    };
+  })
+
+  .directive('numberInt', function() {
+    var INT_REGEXP = new RegExp('^[0-9]+$');
+    return {
+      require: 'ngModel',
+      link: function(scope, element, attrs, ngModel) {
+        if (ngModel) {
+          ngModel.$validators.numberInt = function (value) {
+            return ngModel.$isEmpty(value) || INT_REGEXP.test(value);
+          };
+        }
+      }
+    };
+  })
+
+  .directive('email', function() {
+    var EMAIL_REGEXP = new RegExp('^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$');
+    return {
+      require: 'ngModel',
+      link: function(scope, element, attrs, ngModel) {
+        if (ngModel) {
+          ngModel.$validators.email = function (value) {
+            return ngModel.$isEmpty(value) || EMAIL_REGEXP.test(value);
+          };
+        }
+      }
+    };
+  })
+
+  .directive('requiredIf', function() {
+    return {
+      require: '?ngModel',
+      link: function(scope, element, attributes, ngModel) {
+        if (ngModel && attributes.requiredIf) {
+          ngModel.$validators.required = function(value) {
+            return !(scope.$eval(attributes.requiredIf)) || !ngModel.$isEmpty(value);
+          };
+
+          scope.$watch(attributes.requiredIf, function() {
+            ngModel.$validate();
+          });
+        }
+      }
+    };
+  })
+
+  .directive('geoPoint', function() {
+    return {
+      require: '?ngModel',
+      link: function(scope, element, attributes, ngModel) {
+        if (ngModel) {
+          ngModel.$validators.geoPoint = function(value) {
+            return ngModel.$isEmpty(value) ||
+              // twice are defined
+              (angular.isDefined(value.lat) && angular.isDefined(value.lon)) ||
+              // or twice are NOT defined (=empty object - can be useful to override data in ES node)
+              (angular.isUndefined(value.lat) && angular.isUndefined(value.lon));
+          };
+        }
+      }
+    };
+  })
+
+  // Add a copy-on-click directive
+  .directive('copyOnClick', ['$window', 'Device', 'UIUtils', function ($window, Device, UIUtils) {
+    'ngInject';
+    return {
+      restrict: 'A',
+      link: function (scope, element, attrs) {
+        var showCopyPopover = function (event) {
+          var value = attrs.copyOnClick;
+          if (value && Device.clipboard.enable) {
+            // copy to clipboard
+            Device.clipboard.copy(value)
+              .then(function(){
+                 UIUtils.toast.show('INFO.COPY_TO_CLIPBOARD_DONE');
+              })
+              .catch(UIUtils.onError('ERROR.COPY_CLIPBOARD'));
+          }
+          else if (value) {
+            var rows = value && value.indexOf('\n') >= 0 ? value.split('\n').length : 1;
+            UIUtils.popover.show(event, {
+              scope: scope,
+              templateUrl: 'templates/common/popover_copy.html',
+              bindings: {
+                value: attrs.copyOnClick,
+                rows: rows
+              },
+              autoselect: '.popover-copy ' + (rows <= 1 ? 'input' : 'textarea')
+            });
+          }
+        };
+        element.bind('click', showCopyPopover);
+        element.bind('hold', showCopyPopover);
+      }
+    };
+  }])
+
+  // Add a select-on-click directive
+  .directive('selectOnClick', ['$window', function ($window) {
+    'ngInject';
+      return {
+          restrict: 'A',
+          link: function (scope, element, attrs) {
+              element.bind('click', function () {
+                if ($window.getSelection && !$window.getSelection().toString() && this.value) {
+                  this.setSelectionRange(0, this.value.length);
+                }
+              });
+          }
+      };
+  }])
+
+  .directive('activeLink', ['$location', function ($location) {
+    'ngInject';
+    return {
+      restrict: 'A',
+      link: function(scope, element, attrs, controller) {
+        var clazz = attrs.activeLink;
+        var path;
+        if (attrs.activeLinkPathPrefix) {
+          path = attrs.activeLinkPathPrefix.substring(1); //hack because path does not return including hashbang
+          scope.location = $location;
+          scope.$watch('location.path()', function (newPath) {
+            if (newPath && newPath.indexOf(path) === 0) {
+              element.addClass(clazz);
+            } else {
+              element.removeClass(clazz);
+            }
+          });
+        }
+        else if (attrs.href) {
+          path = attrs.href.substring(1); //hack because path does not return including hashbang
+          scope.location = $location;
+          scope.$watch('location.path()', function (newPath) {
+            if (newPath && newPath == path) {
+              element.addClass(clazz);
+            } else {
+              element.removeClass(clazz);
+            }
+          });
+        }
+      }
+    };
+  }])
+
+  // All this does is allow the message
+  // to be sent when you tap return
+  .directive('input', ['$timeout', function($timeout) {
+    return {
+      restrict: 'E',
+      scope: {
+        'returnClose': '=',
+        'onReturn': '&',
+        'onFocus': '&',
+        'onBlur': '&'
+      },
+      link: function(scope, element, attr) {
+        element.bind('focus', function(e) {
+          if (scope.onFocus) {
+            $timeout(function() {
+              scope.onFocus();
+            });
+          }
+        });
+        element.bind('blur', function(e) {
+          if (scope.onBlur) {
+            $timeout(function() {
+              scope.onBlur();
+            });
+          }
+        });
+        element.bind('keydown', function(e) {
+          if (e.which == 13) {
+            if (scope.returnClose) element[0].blur();
+            if (scope.onReturn) {
+              $timeout(function() {
+                scope.onReturn();
+              });
+            }
+          }
+        });
+      }
+    };
+  }])
+
+  .directive('trustAsHtml', ['$sce', '$compile', '$parse', function($sce, $compile, $parse){
+    return {
+      restrict: 'A',
+      compile: function (tElement, tAttrs) {
+        var ngBindHtmlGetter = $parse(tAttrs.trustAsHtml);
+        var ngBindHtmlWatch = $parse(tAttrs.trustAsHtml, function getStringValue(value) {
+          return (value || '').toString();
+        });
+        $compile.$$addBindingClass(tElement);
+
+        return function ngBindHtmlLink(scope, element, attr) {
+          $compile.$$addBindingInfo(element, attr.trustAsHtml);
+
+          scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {
+            // we re-evaluate the expr because we want a TrustedValueHolderType
+            // for $sce, not a string
+            element.html($sce.getTrustedHtml($sce.trustAsHtml(ngBindHtmlGetter(scope))) || '');
+            $compile(element.contents())(scope);
+          });
+        };
+      }
+    };
+  }])
+
+  /**
+  * Close the current modal
+  */
+  .directive('modalClose', ['$ionicHistory', '$timeout', function($ionicHistory, $timeout) {
+    return {
+      restrict: 'AC',
+      link: function($scope, $element) {
+        $element.bind('click', function() {
+          if ($scope.closeModal) {
+            $ionicHistory.nextViewOptions({
+              historyRoot: true,
+              disableAnimate: true,
+              expire: 300
+            });
+            // if no transition in 300ms, reset nextViewOptions
+            // the expire should take care of it, but will be cancelled in some
+            // cases. This directive is an exception to the rules of history.js
+            $timeout( function() {
+              $ionicHistory.nextViewOptions({
+                historyRoot: false,
+                disableAnimate: false
+              });
+            }, 300);
+            $scope.closeModal();
+          }
+        });
+      }
+    };
+  }])
+
+  /**
+  * Plugin extension point (see services/plugin-services.js)
+  */
+  .directive('csExtensionPoint', ['$state', '$compile', '$controller', '$templateCache', 'PluginService', function ($state, $compile, $controller, $templateCache, PluginService) {
+    var getTemplate = function(extensionPoint) {
+      var template = extensionPoint.templateUrl ? $templateCache.get(extensionPoint.templateUrl) : extensionPoint.template;
+      if (!template) {
+        console.error('[plugin] Could not found template for extension :' + (extensionPoint.templateUrl ? extensionPoint.templateUrl : extensionPoint.template));
+        return '';
+      }
+      if (extensionPoint.controller) {
+        template = '<ng-controller ng-controller="'+extensionPoint.controller+'">' + template + '</div>';
+      }
+      return template;
+    };
+
+    var compiler = function(tElement, tAttributes) {
+
+      if (angular.isDefined(tAttributes.name)) {
+        var extensionPoints = PluginService.extensions.points.getActivesByName(tAttributes.name);
+        if (extensionPoints.length > 0) {
+          tElement.html("");
+          _.forEach(extensionPoints, function(extensionPoint){
+            tElement.append(getTemplate(extensionPoint));
+          });
+        }
+      }
+
+      return {
+        pre: function(scope, iElement, iAttrs){
+          PluginService.extensions.points.current.set(iAttrs.name);
+        },
+        post: function(){
+          PluginService.extensions.points.current.set();
+        }
+      };
+    };
+
+
+    return {
+      restrict: "E",
+      compile: compiler,
+      scope: {
+          content:'='
+      }
+    };
+  }])
+
+  .directive('onReadFile', ['$parse', function ($parse) {
+    return {
+      restrict: 'A',
+      scope: false,
+      link: function(scope, element, attrs) {
+        var fn = $parse(attrs.onReadFile);
+
+        element.on('change', function(onChangeEvent) {
+          var reader = new FileReader();
+          var fileData = {
+            name: this.files[0].name,
+            size: this.files[0].size,
+            type: this.files[0].type
+          };
+
+          reader.onload = function(onLoadEvent) {
+            scope.$applyAsync(function() {
+              fn(scope, {
+                file: {
+                  fileContent: onLoadEvent.target.result,
+                  fileData : fileData}
+              });
+            });
+          };
+          reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]);
+        });
+      }
+    };
+  }])
+
+.directive("dropZone", ['$parse', function($parse) {
+    return {
+      restrict: 'A',
+      scope: false,
+      link: function(scope, elem, attrs) {
+        var fn = $parse(attrs.dropZone);
+        elem.bind('dragover', function (e) {
+          e.stopPropagation();
+          e.preventDefault();
+        });
+        elem.bind('dragenter', function(e) {
+          e.stopPropagation();
+          e.preventDefault();
+        });
+        elem.bind('dragleave', function(e) {
+          e.stopPropagation();
+          e.preventDefault();
+        });
+        elem.bind('drop', function(e) {
+          e.stopPropagation();
+          e.preventDefault();
+          var fileData = {
+            name: e.dataTransfer.files[0].name,
+            size: e.dataTransfer.files[0].size,
+            type: e.dataTransfer.files[0].type
+          };
+
+          var reader = new FileReader();
+          reader.onload = function(onLoadEvent) {
+            scope.$apply(function () {
+              fn(scope, {
+                file: {
+                  fileContent: onLoadEvent.target.result,
+                  fileData : fileData}
+              });
+            });
+          };
+          reader.readAsText(e.dataTransfer.files[0]);
+        });
+      }
+    };
+  }])
+
+
+  // See http://embed.plnkr.co/2vgnFe/
+  .directive('fileSelect', ['$parse', function ($parse) {
+    'use strict';
+
+    return {
+      restrict: 'A',
+      scope: false,
+      template: '<input type="file" style="display: none;" />' +
+        '<ng-transclude></ng-transclude>',
+      transclude: true,
+      link: function (scope, element, attrs) {
+        var fn = $parse(attrs.fileSelect);
+
+        var fileInput = element.children('input[file]');
+
+        if (attrs.accept) {
+          fileInput[0].accept = attrs.accept;
+        }
+
+        fileInput.on('change', function (onChangeEvent) {
+          var reader = new FileReader();
+          var fileData = {
+            name: this.files[0].name,
+            size: this.files[0].size,
+            type: this.files[0].type
+          };
+
+          reader.onload = function(onLoadEvent) {
+            scope.$applyAsync(function() {
+              fn(scope, {
+                file: {
+                  fileContent: onLoadEvent.target.result,
+                  fileData : fileData}
+              });
+            });
+          };
+          reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]);
+        });
+
+        element.on('click', function () {
+          fileInput[0].click();
+        });
+      }
+    };
+  }])
+
+
+  // Un-authenticate when window closed
+  // see: https://stackoverflow.com/questions/28197316/javascript-or-angularjs-defer-browser-close-or-tab-close-between-refresh
+  .directive('windowExitUnauth', ['$window', 'csSettings', 'csWallet', function($window, csSettings, csWallet) {
+    return {
+      restrict: 'AE',
+      link: function(element, attrs){
+        var myEvent = $window.attachEvent || $window.addEventListener,
+          chkevent = $window.attachEvent ? 'onunload' : 'unload'; /// make IE7, IE8 compatible
+
+        myEvent(chkevent, function (e) { // For >=IE7, Chrome, Firefox
+          if (csSettings.data && csSettings.data.keepAuthIdle != csSettings.constants.KEEP_AUTH_IDLE_SESSION) {
+            return csWallet.unauth();
+          }
+        });
+      }
+    };
+  }]);
+;
+
+// Cesium filters
+angular.module('cesium.filters', ['cesium.config', 'cesium.platform', 'pascalprecht.translate', 'cesium.translations'
+])
+
+  .factory('filterTranslations', ['$rootScope', '$q', 'csPlatform', 'csSettings', 'csCurrency', '$translate', '$timeout', function($rootScope, $q, csPlatform, csSettings, csCurrency, $translate, $timeout) {
+    'ngInject';
+
+    var
+      started = false,
+      startPromise,
+      that = this;
+
+    that.MEDIAN_TIME_OFFSET = 3600  /*G1 default value*/;
+
+    // Update some translations, when locale changed
+    function onLocaleChange() {
+      console.debug('[filter] Loading translations for locale [{0}]'.format($translate.use()));
+      return $translate(['COMMON.DATE_PATTERN', 'COMMON.DATE_SHORT_PATTERN', 'COMMON.UD', 'COMMON.DAYS'])
+        .then(function(translations) {
+          that.DATE_PATTERN = translations['COMMON.DATE_PATTERN'];
+          if (that.DATE_PATTERN === 'COMMON.DATE_PATTERN') {
+            that.DATE_PATTERN = 'YYYY-MM-DD HH:mm';
+          }
+          that.DATE_SHORT_PATTERN = translations['COMMON.DATE_SHORT_PATTERN'];
+          if (that.DATE_SHORT_PATTERN === 'COMMON.DATE_SHORT_PATTERN') {
+            that.DATE_SHORT_PATTERN = 'YYYY-MM-DD';
+          }
+          that.DATE_MONTH_YEAR_PATTERN = translations['COMMON.DATE_MONTH_YEAR_PATTERN'];
+          if (that.DATE_MONTH_YEAR_PATTERN === 'COMMON.DATE_MONTH_YEAR_PATTERN') {
+            that.DATE_MONTH_YEAR_PATTERN = 'MMM YY';
+          }
+          that.DAYS = translations['COMMON.DAYS'];
+          if (that.DAYS === 'COMMON.DAYS') {
+            that.DAYS = 'days';
+          }
+          that.UD = translations['COMMON.UD'];
+          if (that.UD === 'COMMON.UD') {
+            that.UD = 'UD';
+          }
+        });
+    }
+
+    // Update some translations, when locale changed
+    function onCurrencyChange() {
+      console.debug('[filter] Computing constants from currency parameters');
+      that.MEDIAN_TIME_OFFSET = csCurrency.data.medianTimeOffset || that.MEDIAN_TIME_OFFSET;
+    }
+
+    that.ready = function() {
+      if (started) return $q.when();
+      return startPromise || that.start();
+    };
+
+    that.start = function() {
+      startPromise = csPlatform.ready()
+        .then(onLocaleChange)
+        .then(function() {
+          onCurrencyChange();
+          started = true;
+
+          csSettings.api.locale.on.changed($rootScope, onLocaleChange, this);
+          csCurrency.api.data.on.ready($rootScope, onCurrencyChange, this);
+        });
+      return startPromise;
+    };
+
+    // Default action
+    // Must be started with a delay, to allow settings override, before starting platform (need by Cesium API)
+    $timeout(function() {
+      that.start();
+    });
+
+    return that;
+  }])
+
+  .filter('formatInteger', function() {
+    return function(input) {
+      return !input ? '0' : (input < 10000000 ? numeral(input).format('0,0') : numeral(input).format('0,0.000 a'));
+    };
+  })
+
+  .filter('formatAmount', ['csConfig', 'csSettings', 'csCurrency', '$filter', function(csConfig, csSettings, csCurrency, $filter) {
+    var pattern = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
+    var patternBigNumber = '0,0.000 a';
+    var currencySymbol = $filter('currencySymbol');
+
+    // Always add one decimal for relative unit
+    var patternRelative = pattern + '0';
+    var minValueRelative = 1 / Math.pow(10, (csConfig.decimalCount || 4) + 1 /*add one decimal in relative*/);
+
+    function formatRelative(input, options) {
+      var currentUD = options && options.currentUD ? options.currentUD : csCurrency.data.currentUD;
+      if (!currentUD) {
+        console.warn("formatAmount: currentUD not defined");
+        return;
+      }
+      var amount = input / currentUD;
+      if (Math.abs(input) < minValueRelative && input !== 0) {
+        amount = '~ 0';
+      }
+      else {
+        amount = numeral(amount).format(patternRelative);
+      }
+      if (options && options.currency) {
+        return amount + ' ' + currencySymbol(options.currency, true);
+      }
+      return amount;
+    }
+
+    function formatQuantitative(input, options) {
+      var amount = numeral(input/100).format((input < -1000000000 || input > 1000000000) ? patternBigNumber : pattern);
+      if (options && options.currency) {
+        return amount + ' ' + currencySymbol(options.currency, false);
+      }
+      return amount;
+    }
+
+    return function(input, options) {
+      if (input === undefined) return;
+      return (options && angular.isDefined(options.useRelative) ? options.useRelative : csSettings.data.useRelative) ?
+        formatRelative(input, options) :
+        formatQuantitative(input, options);
+    };
+  }])
+
+  .filter('formatAmountNoHtml', ['csConfig', 'csSettings', 'csCurrency', '$filter', function(csConfig, csSettings, csCurrency, $filter) {
+    var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
+    var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
+    var currencySymbol = $filter('currencySymbolNoHtml');
+
+    function formatRelative(input, options) {
+      var currentUD = options && options.currentUD ? options.currentUD : csCurrency.data.currentUD;
+      if (!currentUD) {
+        console.warn("formatAmount: currentUD not defined");
+        return;
+      }
+      var amount = input / currentUD;
+      if (Math.abs(amount) < minValue && input !== 0) {
+        amount = '~ 0';
+      }
+      else {
+        amount = numeral(amount).format(format);
+      }
+      if (options && options.currency) {
+        return amount + ' ' + currencySymbol(options.currency, true);
+      }
+      return amount;
+    }
+
+    function formatQuantitative(input, options) {
+      var amount = numeral(input/100).format((input > -1000000000 && input < 1000000000) ? '0,0.00' : '0,0.000 a');
+      if (options && options.currency) {
+        return amount + ' ' + currencySymbol(options.currency, false);
+      }
+      return amount;
+    }
+
+    return function(input, options) {
+      if (input === undefined) return;
+      return (options && angular.isDefined(options.useRelative) ? options.useRelative : csSettings.data.useRelative) ?
+        formatRelative(input, options) :
+        formatQuantitative(input, options);
+    };
+  }])
+
+  .filter('currencySymbol', ['filterTranslations', '$filter', 'csSettings', function(filterTranslations, $filter, csSettings) {
+    return function(input, useRelative) {
+      if (!input) return '';
+      return (angular.isDefined(useRelative) ? useRelative : csSettings.data.useRelative) ?
+        (filterTranslations.UD + '<sub>' + $filter('abbreviate')(input) + '</sub>') :
+        $filter('abbreviate')(input);
+    };
+  }])
+
+  .filter('currencySymbolNoHtml', ['filterTranslations', '$filter', 'csSettings', function(filterTranslations, $filter, csSettings) {
+    return function(input, useRelative) {
+      if (!input) return '';
+      return (angular.isDefined(useRelative) ? useRelative : csSettings.data.useRelative) ?
+        (filterTranslations.UD + ' ' + $filter('abbreviate')(input)) :
+        $filter('abbreviate')(input);
+    };
+  }])
+
+  .filter('formatDecimal', ['csConfig', 'csCurrency', function(csConfig, csCurrency) {
+    var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
+    var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
+
+    return function(input) {
+      if (input === undefined) return '0';
+      if (input === Infinity || input === -Infinity) {
+        console.warn("formatDecimal: division by zero ? (is currentUD defined ?) = "  + csCurrency.data.currentUD);
+        return 'error';
+      }
+      if (Math.abs(input) < minValue) return '~ 0';
+      return numeral(input/*-0.00005*/).format(format);
+    };
+  }])
+
+  .filter('formatNumeral', function() {
+    return function(input, pattern) {
+      if (input === undefined) return '0';
+      // for DEBUG only
+      //if (isNaN(input)) {
+      //    return 'NaN';
+      //}
+      if (Math.abs(input) < 0.0001) return '~ 0';
+      return numeral(input).format(pattern);
+    };
+  })
+
+  .filter('formatDate', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).local().format(filterTranslations.DATE_PATTERN || 'YYYY-MM-DD HH:mm') : '';
+    };
+  }])
+
+  .filter('formatDateShort', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).local().format(filterTranslations.DATE_SHORT_PATTERN || 'YYYY-MM-DD') : '';
+    };
+  }])
+
+  .filter('formatDateMonth', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).local().format(filterTranslations.DATE_MONTH_YEAR_PATTERN || 'MMM YY') : '';
+    };
+  }])
+
+  .filter('formatDateForFile', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).local().format(filterTranslations.DATE_FILE_PATTERN || 'YYYY-MM-DD') : '';
+    };
+  }])
+
+  .filter('formatTime', function() {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).local().format('HH:mm') : '';
+    };
+  })
+
+  .filter('formatFromNow', function() {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)).fromNow() : '';
+    };
+  })
+
+  .filter('formatFromNowAndDate', ['filterTranslations', function(filterTranslations) {
+    return function(input, options) {
+      var m = input && moment.unix(parseInt(input));
+      return m && (m.fromNow() + (options && options.separator || ' | ') + m.local().format(filterTranslations.DATE_PATTERN || 'YYYY-MM-DD HH:mm')) || '';
+    };
+  }])
+
+  .filter('formatDurationTo', function() {
+    return function(input) {
+      return input ? moment.unix(moment().utc().unix() + parseInt(input)).fromNow() : '';
+    };
+  })
+
+  .filter('formatDuration', function() {
+    return function(input) {
+      return input ? moment(0).from(moment.unix(parseInt(input)), true) : '';
+    };
+  })
+
+
+  .filter('formatDurationTime', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      if (!input) return '';
+      var sign = input && input < 0 ? '-' : '+';
+      input = Math.abs(input);
+      var day = Math.trunc(input/3600/24);
+      var hour = Math.trunc(input/3600 - day*24);
+      var min = Math.trunc(input/60 - day*24*60 - hour*60);
+      return day > 0 ? (sign + day + ' ' + filterTranslations.DAYS + ' ' + hour + 'h ' + min + 'm') :
+        (hour > 0 ? (sign + hour + 'h ' + min + 'm') : (sign + min + 'm')) ;
+    };
+  }])
+
+  // Display time in ms or seconds (see i18n label 'COMMON.EXECUTION_TIME')
+  .filter('formatDurationMs', function() {
+    return function(input) {
+      return input ? (
+        (input < 1000) ?
+          (input + 'ms') :
+          (input/1000 + 's')
+      ) : '';
+    };
+  })
+
+  .filter('formatPeriod', function() {
+    return function(input) {
+      if (!input) {return null;}
+      var duration = moment(0).from(moment.unix(parseInt(input)), true);
+      return duration.split(' ').slice(-1)[0]; // keep only last words (e.g. remove "un" "a"...)
+    };
+  })
+
+  .filter('formatFromNowShort', function() {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)+offset).fromNow(true) : '';
+    };
+  })
+
+  /* -- median time (apply currency offset)-- */
+
+  .filter('medianDate', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input) + filterTranslations.MEDIAN_TIME_OFFSET).local().format(filterTranslations.DATE_PATTERN || 'YYYY-MM-DD HH:mm') : '';
+    };
+  }])
+
+  .filter('medianDateShort', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input) + filterTranslations.MEDIAN_TIME_OFFSET).local().format(filterTranslations.DATE_SHORT_PATTERN || 'YYYY-MM-DD') : '';
+    };
+  }])
+
+
+  .filter('medianTime', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)+filterTranslations.MEDIAN_TIME_OFFSET).local().format('HH:mm') : '';
+    };
+  }])
+
+  .filter('medianFromNow', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input) + filterTranslations.MEDIAN_TIME_OFFSET).fromNow() : '';
+    };
+  }])
+
+  .filter('medianFromNowShort', ['filterTranslations', function(filterTranslations) {
+    return function(input) {
+      return input ? moment.unix(parseInt(input)+filterTranslations.MEDIAN_TIME_OFFSET).fromNow(true) : '';
+    };
+  }])
+
+  .filter('medianFromNowAndDate', ['filterTranslations', function(filterTranslations) {
+    return function(input, options) {
+      var m = input && moment.unix(parseInt(input)+filterTranslations.MEDIAN_TIME_OFFSET);
+      return m && (m.fromNow() + (options && options.separator || ' | ')  + m.local().format(filterTranslations.DATE_PATTERN || 'YYYY-MM-DD HH:mm')) || '';
+    };
+  }])
+
+
+  /* -- text filter -- */
+
+  .filter('capitalize', function() {
+    return function(input) {
+      if (!input) return '';
+      input = input.toLowerCase();
+      return input.length > 1 ? (input.substring(0,1).toUpperCase()+input.substring(1)) : input;
+    };
+  })
+
+  .filter('abbreviate', function() {
+    var _cache = {};
+    return function(input) {
+      var currency = input || '';
+      if (_cache[currency]) return _cache[currency];
+      if (currency.length > 3) {
+        var unit = '', sepChars = ['-', '_', ' '];
+        for (var i = 0; i < currency.length; i++) {
+          var c = currency[i];
+          if (i === 0) {
+            unit = (c === 'g' || c === 'G') ? 'Äž' : c ;
+          }
+          else if (i > 0 && sepChars.indexOf(currency[i-1]) != -1) {
+            unit += c;
+          }
+        }
+        currency = unit.toUpperCase();
+      }
+      else {
+        currency = currency.toUpperCase();
+        if (currency.charAt(0) === 'G') {
+          currency = 'Äž' + (currency.length > 1 ? currency.substr(1) : '');
+        }
+      }
+
+      _cache[input] = currency;
+      return currency;
+    };
+  })
+
+  .filter('upper', function() {
+    return function(input) {
+      if (!input) return '';
+      return input.toUpperCase();
+    };
+  })
+
+  .filter('formatPubkey', function() {
+    return function(input) {
+      return input ? input.substr(0,8) : '';
+    };
+  })
+
+  .filter('formatHash', function() {
+    return function(input) {
+      return input ? input.substr(0,4) + input.substr(input.length-4) : '';
+    };
+  })
+
+  .filter('formatCategory', function() {
+    return function(input) {
+      return input && input.length > 28 ? input.substr(0,25)+'...' : input;
+    };
+  })
+
+  // Convert to user friendly URL (e.g. "Like - This" -> "like-this")
+  .filter('formatSlug', function() {
+    return function(input) {
+      return input ? encodeURIComponent(input
+        .toLowerCase()
+        .replace(/<[^>]+>/g,'') // Remove tag (like HTML tag)
+        .replace(/[^\w ]+/g,'')
+        .replace(/ +/g,'-'))
+        : '';
+    };
+  })
+
+  // Convert a URI into parameter (e.g. "http://hos/path" -> "http%3A%2F%2Fhost%2Fpath")
+  .filter('formatEncodeURI', function() {
+    return function(input) {
+      return input ? encodeURIComponent(input): '';
+    };
+  })
+
+  .filter('truncText', function() {
+    return function(input, size) {
+      size = size || 500;
+      return !input || input.length <= size ? input : (input.substr(0, size) + '...');
+    };
+  })
+
+  .filter('truncUrl', function() {
+    return function(input, size) {
+      size = size || 25;
+      var startIndex = input.startsWith('http://') ? 7 : (input.startsWith('https://') ? 8 : 0);
+      startIndex = input.startsWith('www.', startIndex) ? startIndex + 4 : startIndex; // Remove sequence 'www.'
+      return !input || (input.length-startIndex) <= size ? input.substr(startIndex) : (input.substr(startIndex, size) + '...');
+    };
+  })
+
+  .filter('trustAsHtml', ['$sce', function($sce) {
+    return function(html) {
+      return $sce.trustAsHtml(html);
+    };
+  }])
+;
+
+
+angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services'])
+
+  // Translation i18n
+  .config(['$translateProvider', 'csConfig', function ($translateProvider, csConfig) {
+    'ngInject';
+
+    $translateProvider
+      .uniformLanguageTag('bcp47')
+      .determinePreferredLanguage()
+      // Cela fait bugger les placeholder (pb d'affichage des accents en FR)
+      //.useSanitizeValueStrategy('sanitize')
+      .useSanitizeValueStrategy(null)
+      .fallbackLanguage([csConfig.fallbackLanguage ? csConfig.fallbackLanguage : 'en'])
+      .useLoaderCache(true);
+  }])
+
+  .config(['$httpProvider', 'csConfig', function($httpProvider, csConfig) {
+    'ngInject';
+
+    // Set default timeout
+    $httpProvider.defaults.timeout = !!csConfig.timeout ? csConfig.timeout : 300000 /* default timeout */;
+
+    //Enable cross domain calls
+    $httpProvider.defaults.useXDomain = true;
+
+    //Remove the header used to identify ajax call  that would prevent CORS from working
+    delete $httpProvider.defaults.headers.common['X-Requested-With'];
+
+    // removeIf(no-device)
+    // Group http request response processing (better performance when many request)
+    $httpProvider.useApplyAsync(true);
+    // endRemoveIf(no-device)
+  }])
+
+  .config(['$compileProvider', 'csConfig', function($compileProvider, csConfig) {
+    'ngInject';
+
+    $compileProvider.debugInfoEnabled(csConfig.debug === true);
+
+    // Fix issue #893
+    // See https://stackoverflow.com/questions/31859257/firefox-addon-using-angularjs-ng-src-not-working
+    $compileProvider.imgSrcSanitizationWhitelist(/^\s*(filesystem:resource|resource|moz-extension|chrome-extension|file):/);
+  }])
+
+  .config(['$animateProvider', function($animateProvider) {
+    'ngInject';
+
+    $animateProvider.classNameFilter( /\banimate-/ );
+  }])
+
+  // Configure cache (used by HTTP requests) default options
+  .config(['CacheFactoryProvider', 'csConfig', function (CacheFactoryProvider, csConfig) {
+    'ngInject';
+
+    angular.extend(CacheFactoryProvider.defaults, {
+      // Fixed options:
+      recycleFreq: 60 * 1000, // Scan expired items every 1min
+      storagePrefix: 'caches.', // Override storage key prefix
+      capacity: 100, // Force to use a LRU cache, to avoid size exceed max
+
+      // Options overwritten by the csCache service:
+      maxAge: csConfig.cacheTimeMs || 60 * 1000, // from config if exists, or 1min
+      storageMode: 'memory' // Do NOT use local Storage by default
+    });
+  }])
+
+  // Configure screen size detection
+  .config(['screenmatchConfigProvider', function(screenmatchConfigProvider) {
+    'ngInject';
+
+    screenmatchConfigProvider.config.rules = 'bootstrap';
+  }])
+
+  .config(['$ionicConfigProvider', function($ionicConfigProvider) {
+    'ngInject';
+
+    // JS scrolling need for iOs (see http://blog.ionic.io/native-scrolling-in-ionic-a-tale-in-rhyme/)
+    var enableJsScrolling = ionic.Platform.isIOS();
+    $ionicConfigProvider.scrolling.jsScrolling(enableJsScrolling);
+
+    // Configure the view cache
+    $ionicConfigProvider.views.maxCache(5);
+  }])
+
+  .config(['IdleProvider', 'csConfig', function(IdleProvider, csConfig) {
+    'ngInject';
+
+    IdleProvider.idle(csConfig.logoutIdle||10*60/*10min*/);
+    IdleProvider.timeout(csConfig.logoutTimeout||15); // display warning during 15s
+  }])
+
+  .factory('$exceptionHandler', ['$log', function($log) {
+    'ngInject';
+
+    return function(exception, cause) {
+      if (cause) $log.error(exception, cause);
+      else $log.error(exception);
+    };
+  }])
+
+
+  .factory('csPlatform', ['ionicReady', '$rootScope', '$q', '$state', '$translate', '$timeout', 'UIUtils', 'BMA', 'Device', 'csHttp', 'csConfig', 'csCache', 'csSettings', 'csCurrency', 'csWallet', function (ionicReady, $rootScope, $q, $state, $translate, $timeout, UIUtils,
+                                   BMA, Device, csHttp, csConfig, csCache, csSettings, csCurrency, csWallet) {
+
+    'ngInject';
+    var
+      fallbackNodeIndex = 0,
+      defaultSettingsNode,
+      started = false,
+      startPromise,
+      listeners,
+      removeChangeStateListener;
+
+    function disableChangeState() {
+      if (removeChangeStateListener) return; // make sure to call this once
+
+      var remove = $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {
+        if (!event.defaultPrevented && next.name !== 'app.home' && next.name !== 'app.settings') {
+          event.preventDefault();
+          if (startPromise) {
+            startPromise.then(function() {
+              $state.go(next.name, nextParams);
+            });
+          }
+          else {
+            UIUtils.loading.hide();
+          }
+        }
+      });
+
+      // store remove listener function
+      removeChangeStateListener = remove;
+    }
+
+    function enableChangeState() {
+      if (removeChangeStateListener) removeChangeStateListener();
+      removeChangeStateListener = null;
+    }
+
+    // Alert user if node not reached - fix issue #
+    function checkBmaNodeAlive(alive) {
+      if (alive) return true;
+
+      // Remember the default node
+      defaultSettingsNode = defaultSettingsNode || csSettings.data.node;
+
+      var fallbackNode = csSettings.data.fallbackNodes && fallbackNodeIndex < csSettings.data.fallbackNodes.length && csSettings.data.fallbackNodes[fallbackNodeIndex++];
+      if (!fallbackNode) {
+        throw 'ERROR.CHECK_NETWORK_CONNECTION';
+      }
+      var newServer = fallbackNode.host + ((!fallbackNode.port && fallbackNode.port != 80 && fallbackNode.port != 443) ? (':' + fallbackNode.port) : '');
+
+      // Skip is same as actual node
+      if (BMA.node.same(fallbackNode)) {
+        console.debug('[platform] Skipping fallback node [{0}]: same as actual node'.format(newServer));
+        return checkBmaNodeAlive(); // loop (= go to next node)
+      }
+
+      // Try to get summary
+      return csHttp.get(fallbackNode.host, fallbackNode.port, '/node/summary', fallbackNode.port==443 || BMA.node.forceUseSsl)()
+        .catch(function(err) {
+          console.error('[platform] Could not reach fallback node [{0}]: skipping'.format(newServer));
+          // silent, but return no result (will loop to the next fallback node)
+        })
+        .then(function(res) {
+          if (!res) return checkBmaNodeAlive(); // Loop
+
+          // Force to show port/ssl, if this is the only difference
+          var messageParam = {old: BMA.server, new: newServer};
+          if (messageParam.old === messageParam.new) {
+            if (BMA.port != fallbackNode.port) {
+              messageParam.new += ':' + fallbackNode.port;
+            }
+            else if (BMA.useSsl == false && (fallbackNode.useSsl || fallbackNode.port==443)) {
+              messageParam.new += ' (SSL)';
+            }
+          }
+
+          return $translate('CONFIRM.USE_FALLBACK_NODE', messageParam)
+            .then(function(msg) {
+              return UIUtils.alert.confirm(msg);
+            })
+            .then(function (confirm) {
+              if (!confirm) return;
+
+              // Only change BMA node in settings
+              csSettings.data.node = fallbackNode;
+
+              // Add a marker, for UI
+              csSettings.data.node.temporary = true;
+
+              csHttp.cache.clear();
+
+              // loop
+              return BMA.copy(fallbackNode)
+                .then(checkBmaNodeAlive);
+            });
+        });
+    }
+
+    function isStarted() {
+      return started;
+    }
+
+    function getLatestRelease() {
+      var latestRelease = csSettings.data.latestReleaseUrl && csHttp.uri.parse(csSettings.data.latestReleaseUrl);
+      if (latestRelease) {
+        return csHttp.getWithCache(latestRelease.host, latestRelease.protocol === 'https:' ? 443 : latestRelease.port, "/" + latestRelease.pathname, undefined, csCache.constants.LONG)()
+          .then(function (json) {
+            if (json && json.name && json.tag_name && json.html_url) {
+              return {
+                version: json.name,
+                url: json.html_url,
+                isNewer: (csHttp.version.compare(csConfig.version, json.name) < 0)
+              };
+            }
+          })
+          .catch(function(err) {
+            // silent (just log it)
+            console.error('[platform] Failed to get Cesium latest version', err);
+          })
+          ;
+      }
+      return $q.when();
+    }
+
+    function addListeners() {
+      listeners = [
+        // Listen if node changed
+        BMA.api.node.on.restart($rootScope, restart, this)
+      ];
+    }
+
+    function removeListeners() {
+      _.forEach(listeners, function(remove){
+        remove();
+      });
+      listeners = [];
+    }
+
+    function ready() {
+      if (started) return $q.when();
+      return startPromise || start();
+    }
+
+    function restart() {
+      console.debug('[platform] restarting csPlatform');
+      return stop()
+        .then(function () {
+          return $timeout(start, 200);
+        });
+    }
+
+    function start() {
+
+      // Avoid change state
+      disableChangeState();
+
+      // We use 'ionicReady()' instead of '$ionicPlatform.ready()', because this one is callable many times
+      startPromise = ionicReady()
+
+        .then($q.all([
+          // Load device
+          Device.ready(),
+
+          // Start settings
+          csSettings.ready()
+        ]))
+
+        // Load BMA
+        .then(function(){
+          return BMA.ready().then(checkBmaNodeAlive);
+        })
+
+        // Load currency
+        .then(csCurrency.ready)
+
+        // Trying to restore wallet
+        .then(csWallet.ready)
+
+        .then(function(){
+          enableChangeState();
+          addListeners();
+          startPromise = null;
+          started = true;
+        })
+        .catch(function(err) {
+          startPromise = null;
+          started = false;
+          if($state.current.name !== $rootScope.errorState) {
+            $state.go($rootScope.errorState, {error: 'peer'});
+          }
+          throw err;
+        });
+
+      return startPromise;
+    }
+
+    function stop() {
+      if (!started) return $q.when();
+      removeListeners();
+
+      csWallet.stop();
+      csCurrency.stop();
+      BMA.stop();
+
+      return $timeout(function() {
+        enableChangeState();
+        started = false;
+        startPromise = null;
+      }, 500);
+    }
+
+    return  {
+      disableChangeState: disableChangeState,
+      isStarted: isStarted,
+      ready: ready,
+      restart: restart,
+      start: start,
+      stop: stop,
+      version: {
+        latest: getLatestRelease
+      }
+    };
+  }])
+
+  .run(['$rootScope', '$state', '$window', '$urlRouter', 'ionicReady', '$ionicPlatform', '$ionicHistory', 'Device', 'UIUtils', '$ionicConfig', 'PluginService', 'csPlatform', 'csWallet', 'csSettings', 'csConfig', 'csCurrency', function($rootScope, $state, $window, $urlRouter, ionicReady, $ionicPlatform, $ionicHistory,
+                Device, UIUtils, $ionicConfig, PluginService, csPlatform, csWallet, csSettings, csConfig, csCurrency) {
+    'ngInject';
+
+    // Allow access to service data, from HTML templates
+    $rootScope.config = csConfig;
+    $rootScope.settings = csSettings.data;
+    $rootScope.currency = csCurrency.data;
+    $rootScope.device = Device;
+    $rootScope.errorState = 'app.home';
+    $rootScope.smallscreen = UIUtils.screen.isSmall();
+
+    // Compute the root path
+    var hashIndex = $window.location.href.indexOf('#');
+    $rootScope.rootPath = (hashIndex !== -1) ? $window.location.href.substr(0, hashIndex) : $window.location.href;
+    console.debug('[app] Root path is [' + $rootScope.rootPath + ']');
+
+    // We use 'ionicReady()' instead of '$ionicPlatform.ready()', because this one is callable many times
+    ionicReady().then(function() {
+
+      // Keyboard
+      if (Device.keyboard.enable) {
+        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
+        // for form inputs)
+        Device.keyboard.hideKeyboardAccessoryBar(true);
+
+        // iOS: do not push header up when opening keyboard
+        // (see http://ionicframework.com/docs/api/page/keyboard/)
+        if (ionic.Platform.isIOS()) {
+          Device.keyboard.disableScroll(true);
+        }
+      }
+
+      // Ionic Platform Grade is not A, disabling views transitions
+      if (ionic.Platform.grade.toLowerCase() !== 'a') {
+        console.info('[app] Disabling UI effects, because plateform\'s grade is [' + ionic.Platform.grade + ']');
+        UIUtils.setEffects(false);
+      }
+
+      // Status bar style
+      if (window.StatusBar) {
+        console.debug("[app] Status bar plugin enable");
+      }
+
+      // Get latest release
+      csPlatform.version.latest()
+        .then(function(release) {
+          if (release && release.isNewer) {
+            console.info('[app] New release detected [{0}]'.format(release.version));
+            $rootScope.newRelease = release;
+          }
+          else {
+            console.info('[app] Current version [{0}] is the latest release'.format(csConfig.version));
+          }
+        });
+
+      // Prevent BACK button to exit without confirmation
+      $ionicPlatform.registerBackButtonAction(function(event) {
+        if ($ionicHistory.backView()) {
+          return $ionicHistory.goBack();
+        }
+        event.preventDefault();
+        return UIUtils.alert.confirm('CONFIRM.EXIT_APP')
+          .then(function (confirm) {
+            if (!confirm) return; // user cancelled
+            ionic.Platform.exitApp();
+          });
+      }, 100);
+
+      // Make sure platform is started
+      return csPlatform.ready();
+    });
+  }])
+;
+
+// Workaround to add "".startsWith() if not present
+if (typeof String.prototype.startsWith !== 'function') {
+  console.debug("Adding String.prototype.startsWith() -> was missing on this platform");
+  String.prototype.startsWith = function(prefix, position) {
+    return this.indexOf(prefix, position) === 0;
+  };
+}
+
+// Workaround to add "".startsWith() if not present
+if (typeof String.prototype.trim !== 'function') {
+  console.debug("Adding String.prototype.trim() -> was missing on this platform");
+  // Make sure we trim BOM and NBSP
+  var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
+  String.prototype.trim = function() {
+    return this.replace(rtrim, '');
+  };
+}
+
+// Workaround to add Math.trunc() if not present - fix #144
+if (Math && typeof Math.trunc !== 'function') {
+  console.debug("Adding Math.trunc() -> was missing on this platform");
+  Math.trunc = function(number) {
+    return (number - 0.5).toFixed();
+  };
+}
+
+// Workaround to add "".format() if not present
+if (typeof String.prototype.format !== 'function') {
+  console.debug("Adding String.prototype.format() -> was missing on this platform");
+  String.prototype.format = function() {
+    var args = arguments;
+    return this.replace(/{(\d+)}/g, function(match, number) {
+      return typeof args[number] != 'undefined' ? args[number] : match;
+    });
+  };
+}
diff --git a/assets/www/dist_js/vendor.js b/assets/www/dist_js/vendor.js
index 68c157fc000868f95bb82bda4156ebb162633077..a3385b48468ca2d07231ab114bbe9d7fa7710128 100644
--- a/assets/www/dist_js/vendor.js
+++ b/assets/www/dist_js/vendor.js
@@ -1,4 +1,3 @@
-/* minified */
 /*! @preserve
  * numeral.js
  * version : 1.5.6
@@ -6,55 +5,4621 @@
  * license : MIT
  * http://adamwdraper.github.com/Numeral-js/
  */
-(function(){var e,t={},n={currentLanguage:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0"},r={currentLanguage:n.currentLanguage,zeroFormat:n.zeroFormat,nullFormat:n.nullFormat,defaultFormat:n.defaultFormat},i={bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],iec:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]};function o(e){this._value=e}function a(e,t,n,r){var i,o,a,s,l=e.toString().split("."),u=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,u),t):u,s=(n(e*(a=Math.pow(10,i)))/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}function s(e,n,i){var o,s,l,u,c=!1,d=!1,h=!1,f="",p=!1,m=!1,g=!1,v=!1,_=!1,y="",b=!1;return null===e&&(e=0),o=Math.abs(e),n.indexOf("(")>-1?(c=!0,n=n.slice(1,-1)):n.indexOf("+")>-1&&(d=!0,n=n.replace(/\+/g,"")),n.indexOf("a")>-1&&(p=n.indexOf("aK")>=0,m=n.indexOf("aM")>=0,g=n.indexOf("aB")>=0,v=n.indexOf("aT")>=0,_=p||m||g||v,n.indexOf(" a")>-1&&(f=" "),n=n.replace(new RegExp(f+"a[KMBT]?"),""),o>=Math.pow(10,12)&&!_||v?(f+=t[r.currentLanguage].abbreviations.trillion,e/=Math.pow(10,12)):o<Math.pow(10,12)&&o>=Math.pow(10,9)&&!_||g?(f+=t[r.currentLanguage].abbreviations.billion,e/=Math.pow(10,9)):o<Math.pow(10,9)&&o>=Math.pow(10,6)&&!_||m?(f+=t[r.currentLanguage].abbreviations.million,e/=Math.pow(10,6)):(o<Math.pow(10,6)&&o>=Math.pow(10,3)&&!_||p)&&(f+=t[r.currentLanguage].abbreviations.thousand,e/=Math.pow(10,3))),n.indexOf("[.]")>-1&&(h=!0,n=n.replace("[.]",".")),s=e.toString().split(".")[0],l=n.split(".")[1],u=n.indexOf(","),l?(s=(y=l.indexOf("[")>-1?a(e,(l=(l=l.replace("]","")).split("["))[0].length+l[1].length,i,l[1].length):a(e,l.length,i)).split(".")[0],y=y.indexOf(".")>-1?t[r.currentLanguage].delimiters.decimal+y.split(".")[1]:"",h&&0===Number(y.slice(1))&&(y="")):s=a(e,null,i),s.indexOf("-")>-1&&(s=s.slice(1),b=!0),u>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+t[r.currentLanguage].delimiters.thousands)),0===n.indexOf(".")&&(s=""),(c&&b?"(":"")+(!c&&b?"-":"")+(!b&&d?"+":"")+s+y+(f||"")+(c&&b?")":"")}function l(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function u(){return Array.prototype.slice.call(arguments).reduce((function(e,t){var n=l(e),r=l(t);return n>r?n:r}),-1/0)}(e=function(t){return new o(t=e.isNumeral(t)?t.value():0===t||void 0===t?0:null===t?null:Number(t)?Number(t):e.fn.unformat(t))}).version="1.5.6",e.isNumeral=function(e){return e instanceof o},e.language=function(n,i){if(!n)return r.currentLanguage;if((n=n.toLowerCase())&&!i){if(!t[n])throw new Error("Unknown language : "+n);r.currentLanguage=n}return!i&&t[n]||function(e,n){t[e]=n}(n,i),e},e.reset=function(){for(var e in n)r[e]=n[e]},e.languageData=function(e){if(!e)return t[r.currentLanguage];if(!t[e])throw new Error("Unknown language : "+e);return t[e]},e.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.zeroFormat=function(e){r.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){r.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){r.defaultFormat="string"==typeof e?e:"0.0"},e.validate=function(t,n){var r,i,o,a,s,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.languageData(n)}catch(t){u=e.languageData(e.language())}return o=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,i="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==o)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==s.thousand&&c[0]!==s.million&&c[0]!==s.billion&&c[0]!==s.trillion)||(l=new RegExp(i+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},Array.prototype.reduce||(Array.prototype.reduce=function(e){"use strict";if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var t,n=Object(this),r=n.length>>>0,i=0;if(2===arguments.length)t=arguments[1];else{for(;i<r&&!(i in n);)i++;if(i>=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i<r;i++)i in n&&(t=e(t,n[i],i,n));return t}),e.fn=o.prototype={clone:function(){return e(this)},format:function(e,n){return function(e,n,o){return 0===e._value&&null!==r.zeroFormat?r.zeroFormat:null===e._value&&null!==r.nullFormat?r.nullFormat:n.indexOf("$")>-1?function(e,n,i){var o,a,l=n.indexOf("$"),u=n.indexOf("("),c=n.indexOf("-"),d="";return n.indexOf(" $")>-1?(d=" ",n=n.replace(" $","")):n.indexOf("$ ")>-1?(d=" ",n=n.replace("$ ","")):n=n.replace("$",""),a=s(e._value,n,i),l<=1?a.indexOf("(")>-1||a.indexOf("-")>-1?(o=1,(l<u||l<c)&&(o=0),(a=a.split("")).splice(o,0,t[r.currentLanguage].currency.symbol+d),a=a.join("")):a=t[r.currentLanguage].currency.symbol+d+a:a.indexOf(")")>-1?((a=a.split("")).splice(-1,0,d+t[r.currentLanguage].currency.symbol),a=a.join("")):a=a+d+t[r.currentLanguage].currency.symbol,a}(e,n,o):n.indexOf("%")>-1?function(e,t,n){var r,i="",o=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),(r=s(o,t,n)).indexOf(")")>-1?((r=r.split("")).splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}(e,n,o):n.indexOf(":")>-1?function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}(e):n.indexOf("b")>-1||n.indexOf("ib")>-1?function(e,t,n){var r,o,a,l=t.indexOf("ib")>-1?i.iec:i.bytes,u=e._value,c="";for(t.indexOf(" b")>-1||t.indexOf(" ib")>-1?(c=" ",t=t.replace(" ib","").replace(" b","")):t=t.replace("ib","").replace("b",""),r=0;r<=l.length;r++)if(o=Math.pow(1024,r),a=Math.pow(1024,r+1),null===u||0===u||u>=o&&u<a){c+=l[r],o>0&&(u/=o);break}return s(u,t,n)+c}(e,n,o):n.indexOf("o")>-1?function(e,n,i){var o="";return n.indexOf(" o")>-1?(o=" ",n=n.replace(" o","")):n=n.replace("o",""),o+=t[r.currentLanguage].ordinal(e._value),s(e._value,n,i)+o}(e,n,o):s(e._value,n,o)}(this,e||r.defaultFormat,void 0!==n?n:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:function(e,n){var o,a,s,l,u,c,d=n,h=!1;if(n.indexOf(":")>-1)c=function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}(n);else if(n===r.zeroFormat||n===r.nullFormat)c=0;else{for("."!==t[r.currentLanguage].delimiters.decimal&&(n=n.replace(/\./g,"").replace(t[r.currentLanguage].delimiters.decimal,".")),o=new RegExp("[^a-zA-Z]"+t[r.currentLanguage].abbreviations.thousand+"(?:\\)|(\\"+t[r.currentLanguage].currency.symbol+")?(?:\\))?)?$"),a=new RegExp("[^a-zA-Z]"+t[r.currentLanguage].abbreviations.million+"(?:\\)|(\\"+t[r.currentLanguage].currency.symbol+")?(?:\\))?)?$"),s=new RegExp("[^a-zA-Z]"+t[r.currentLanguage].abbreviations.billion+"(?:\\)|(\\"+t[r.currentLanguage].currency.symbol+")?(?:\\))?)?$"),l=new RegExp("[^a-zA-Z]"+t[r.currentLanguage].abbreviations.trillion+"(?:\\)|(\\"+t[r.currentLanguage].currency.symbol+")?(?:\\))?)?$"),u=1;u<=i.bytes.length&&!(h=(n.indexOf(i.bytes[u])>-1||n.indexOf(i.iec[u])>-1)&&Math.pow(1024,u));u++);c=h||1,c*=d.match(o)?Math.pow(10,3):1,c*=d.match(a)?Math.pow(10,6):1,c*=d.match(s)?Math.pow(10,9):1,c*=d.match(l)?Math.pow(10,12):1,c*=n.indexOf("%")>-1?.01:1,c*=(n.split("-").length+Math.min(n.split("(").length-1,n.split(")").length-1))%2?1:-1,c*=Number(n.replace(/[^0-9\.]+/g,"")),c=h?Math.ceil(c):c}return e._value=c,e._value}(this,e||r.defaultFormat)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){var t=u.call(null,this._value,e);return this._value=[this._value,e].reduce((function(e,n,r,i){return e+t*n}),0)/t,this},subtract:function(e){var t=u.call(null,this._value,e);return this._value=[e].reduce((function(e,n,r,i){return e-t*n}),this._value*t)/t,this},multiply:function(e){return this._value=[this._value,e].reduce((function(e,t,n,r){var i=u(e,t);return e*i*(t*i)/(i*i)}),1),this},divide:function(e){return this._value=[this._value,e].reduce((function(e,t,n,r){var i=u(e,t);return e*i/(t*i)})),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"==typeof ender&&(this.numeral=e),"function"==typeof define&&define.amd&&define([],(function(){return e}))}).call(this),
+
+(function() {
+
+    /************************************
+        Variables
+    ************************************/
+
+    var numeral,
+        VERSION = '1.5.6',
+        // internal storage for language config files
+        languages = {},
+        defaults = {
+            currentLanguage: 'en',
+            zeroFormat: null,
+            nullFormat: null,
+            defaultFormat: '0,0'
+        },
+        options = {
+            currentLanguage: defaults.currentLanguage,
+            zeroFormat: defaults.zeroFormat,
+            nullFormat: defaults.nullFormat,
+            defaultFormat: defaults.defaultFormat
+        },
+        byteSuffixes = {
+            bytes: ['B','KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
+            iec: ['B','KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
+        };
+
+
+    /************************************
+        Constructors
+    ************************************/
+
+
+    // Numeral prototype object
+    function Numeral(number) {
+        this._value = number;
+    }
+
+    /**
+     * Implementation of toFixed() that treats floats more like decimals
+     *
+     * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present
+     * problems for accounting- and finance-related software.
+     */
+    function toFixed (value, maxDecimals, roundingFunction, optionals) {
+        var splitValue = value.toString().split('.'),
+            minDecimals = maxDecimals - (optionals || 0),
+            boundedPrecision,
+            optionalsRegExp,
+            power,
+            output;
+
+        // Use the smallest precision value possible to avoid errors from floating point representation
+        if (splitValue.length === 2) {
+          boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);
+        } else {
+          boundedPrecision = minDecimals;
+        }
+
+        power = Math.pow(10, boundedPrecision);
+
+        //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);
+        // Multiply up by precision, round accurately, then divide and use native toFixed():
+        output = (roundingFunction(value * power) / power).toFixed(boundedPrecision);
+
+        if (optionals > maxDecimals - boundedPrecision) {
+            optionalsRegExp = new RegExp('\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');
+            output = output.replace(optionalsRegExp, '');
+        }
+
+        return output;
+    }
+
+    /************************************
+        Formatting
+    ************************************/
+
+    // determine what type of formatting we need to do
+    function formatNumeral(n, format, roundingFunction) {
+        var output;
+
+        if (n._value === 0 && options.zeroFormat !== null) {
+            output = options.zeroFormat;
+        } else if (n._value === null && options.nullFormat !== null) {
+            output = options.nullFormat;
+        } else {
+            // figure out what kind of format we are dealing with
+            if (format.indexOf('$') > -1) {
+                output = formatCurrency(n, format, roundingFunction);
+            } else if (format.indexOf('%') > -1) {
+                output = formatPercentage(n, format, roundingFunction);
+            } else if (format.indexOf(':') > -1) {
+                output = formatTime(n, format);
+            } else if (format.indexOf('b') > -1 || format.indexOf('ib') > -1) {
+                output = formatBytes(n, format, roundingFunction);
+            } else if (format.indexOf('o') > -1) {
+                output = formatOrdinal(n, format, roundingFunction);
+            } else {
+                output = formatNumber(n._value, format, roundingFunction);
+            }
+        }
+
+        return output;
+    }
+
+    function formatCurrency(n, format, roundingFunction) {
+        var symbolIndex = format.indexOf('$'),
+            openParenIndex = format.indexOf('('),
+            minusSignIndex = format.indexOf('-'),
+            space = '',
+            spliceIndex,
+            output;
+
+        // check for space before or after currency
+        if (format.indexOf(' $') > -1) {
+            space = ' ';
+            format = format.replace(' $', '');
+        } else if (format.indexOf('$ ') > -1) {
+            space = ' ';
+            format = format.replace('$ ', '');
+        } else {
+            format = format.replace('$', '');
+        }
+
+        // format the number
+        output = formatNumber(n._value, format, roundingFunction, false);
+
+        // position the symbol
+        if (symbolIndex <= 1) {
+            if (output.indexOf('(') > -1 || output.indexOf('-') > -1) {
+                output = output.split('');
+                spliceIndex = 1;
+                if (symbolIndex < openParenIndex || symbolIndex < minusSignIndex) {
+                    // the symbol appears before the "(" or "-"
+                    spliceIndex = 0;
+                }
+                output.splice(spliceIndex, 0, languages[options.currentLanguage].currency.symbol + space);
+                output = output.join('');
+            } else {
+                output = languages[options.currentLanguage].currency.symbol + space + output;
+            }
+        } else {
+            if (output.indexOf(')') > -1) {
+                output = output.split('');
+                output.splice(-1, 0, space + languages[options.currentLanguage].currency.symbol);
+                output = output.join('');
+            } else {
+                output = output + space + languages[options.currentLanguage].currency.symbol;
+            }
+        }
+
+        return output;
+    }
+
+    function formatPercentage(n, format, roundingFunction) {
+        var space = '',
+            output,
+            value = n._value * 100;
+
+        // check for space before %
+        if (format.indexOf(' %') > -1) {
+            space = ' ';
+            format = format.replace(' %', '');
+        } else {
+            format = format.replace('%', '');
+        }
+
+        output = formatNumber(value, format, roundingFunction);
+
+        if (output.indexOf(')') > -1) {
+            output = output.split('');
+            output.splice(-1, 0, space + '%');
+            output = output.join('');
+        } else {
+            output = output + space + '%';
+        }
+
+        return output;
+    }
+
+    function formatBytes(n, format, roundingFunction) {
+        var output,
+            suffixes = format.indexOf('ib') > -1 ? byteSuffixes.iec : byteSuffixes.bytes,
+            value = n._value,
+            suffix = '',
+            power,
+            min,
+            max;
+
+        // check for space before
+        if (format.indexOf(' b') > -1 || format.indexOf(' ib') > -1) {
+            suffix = ' ';
+            format = format.replace(' ib', '').replace(' b', '');
+        } else {
+            format = format.replace('ib', '').replace('b', '');
+        }
+
+        for (power = 0; power <= suffixes.length; power++) {
+            min = Math.pow(1024, power);
+            max = Math.pow(1024, power + 1);
+
+            if (value === null || value === 0 || value >= min && value < max) {
+                suffix += suffixes[power];
+
+                if (min > 0) {
+                    value = value / min;
+                }
+
+                break;
+            }
+        }
+
+        output = formatNumber(value, format, roundingFunction);
+
+        return output + suffix;
+    }
+
+    function formatOrdinal(n, format, roundingFunction) {
+        var output,
+            ordinal = '';
+
+        // check for space before
+        if (format.indexOf(' o') > -1) {
+            ordinal = ' ';
+            format = format.replace(' o', '');
+        } else {
+            format = format.replace('o', '');
+        }
+
+        ordinal += languages[options.currentLanguage].ordinal(n._value);
+
+        output = formatNumber(n._value, format, roundingFunction);
+
+        return output + ordinal;
+    }
+
+    function formatTime(n) {
+        var hours = Math.floor(n._value / 60 / 60),
+            minutes = Math.floor((n._value - (hours * 60 * 60)) / 60),
+            seconds = Math.round(n._value - (hours * 60 * 60) - (minutes * 60));
+
+        return hours + ':' + ((minutes < 10) ? '0' + minutes : minutes) + ':' + ((seconds < 10) ? '0' + seconds : seconds);
+    }
+
+    function formatNumber(value, format, roundingFunction) {
+        var negP = false,
+            signed = false,
+            optDec = false,
+            abbr = '',
+            abbrK = false, // force abbreviation to thousands
+            abbrM = false, // force abbreviation to millions
+            abbrB = false, // force abbreviation to billions
+            abbrT = false, // force abbreviation to trillions
+            abbrForce = false, // force abbreviation
+            abs,
+            min,
+            max,
+            power,
+            w,
+            precision,
+            thousands,
+            d = '',
+            neg = false;
+
+        if (value === null) {
+            value = 0;
+        }
+
+        abs = Math.abs(value);
+
+        // see if we should use parentheses for negative number or if we should prefix with a sign
+        // if both are present we default to parentheses
+        if (format.indexOf('(') > -1) {
+            negP = true;
+            format = format.slice(1, -1);
+        } else if (format.indexOf('+') > -1) {
+            signed = true;
+            format = format.replace(/\+/g, '');
+        }
+
+        // see if abbreviation is wanted
+        if (format.indexOf('a') > -1) {
+            // check if abbreviation is specified
+            abbrK = format.indexOf('aK') >= 0;
+            abbrM = format.indexOf('aM') >= 0;
+            abbrB = format.indexOf('aB') >= 0;
+            abbrT = format.indexOf('aT') >= 0;
+            abbrForce = abbrK || abbrM || abbrB || abbrT;
+
+            // check for space before abbreviation
+            if (format.indexOf(' a') > -1) {
+                abbr = ' ';
+            }
+
+            format = format.replace(new RegExp(abbr + 'a[KMBT]?'), '');
+
+            if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {
+                // trillion
+                abbr = abbr + languages[options.currentLanguage].abbreviations.trillion;
+                value = value / Math.pow(10, 12);
+            } else if (abs < Math.pow(10, 12) && abs >= Math.pow(10, 9) && !abbrForce || abbrB) {
+                // billion
+                abbr = abbr + languages[options.currentLanguage].abbreviations.billion;
+                value = value / Math.pow(10, 9);
+            } else if (abs < Math.pow(10, 9) && abs >= Math.pow(10, 6) && !abbrForce || abbrM) {
+                // million
+                abbr = abbr + languages[options.currentLanguage].abbreviations.million;
+                value = value / Math.pow(10, 6);
+            } else if (abs < Math.pow(10, 6) && abs >= Math.pow(10, 3) && !abbrForce || abbrK) {
+                // thousand
+                abbr = abbr + languages[options.currentLanguage].abbreviations.thousand;
+                value = value / Math.pow(10, 3);
+            }
+        }
+
+
+        if (format.indexOf('[.]') > -1) {
+            optDec = true;
+            format = format.replace('[.]', '.');
+        }
+
+        w = value.toString().split('.')[0];
+        precision = format.split('.')[1];
+        thousands = format.indexOf(',');
+
+        if (precision) {
+            if (precision.indexOf('[') > -1) {
+                precision = precision.replace(']', '');
+                precision = precision.split('[');
+                d = toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);
+            } else {
+                d = toFixed(value, precision.length, roundingFunction);
+            }
+
+            w = d.split('.')[0];
+
+            if (d.indexOf('.') > -1) {
+                d = languages[options.currentLanguage].delimiters.decimal + d.split('.')[1];
+            } else {
+                d = '';
+            }
+
+            if (optDec && Number(d.slice(1)) === 0) {
+                d = '';
+            }
+        } else {
+            w = toFixed(value, null, roundingFunction);
+        }
+
+        // format number
+        if (w.indexOf('-') > -1) {
+            w = w.slice(1);
+            neg = true;
+        }
+
+        if (thousands > -1) {
+            w = w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + languages[options.currentLanguage].delimiters.thousands);
+        }
+
+        if (format.indexOf('.') === 0) {
+            w = '';
+        }
+
+        return ((negP && neg) ? '(' : '') + ((!negP && neg) ? '-' : '') + ((!neg && signed) ? '+' : '') + w + d + ((abbr) ? abbr : '') + ((negP && neg) ? ')' : '');
+    }
+
+
+    /************************************
+        Unformatting
+    ************************************/
+
+    // revert to number
+    function unformatNumeral(n, string) {
+        var stringOriginal = string,
+            thousandRegExp,
+            millionRegExp,
+            billionRegExp,
+            trillionRegExp,
+            bytesMultiplier = false,
+            power,
+            value;
+
+        if (string.indexOf(':') > -1) {
+            value = unformatTime(string);
+        } else {
+            if (string === options.zeroFormat || string === options.nullFormat) {
+                value = 0;
+            } else {
+                if (languages[options.currentLanguage].delimiters.decimal !== '.') {
+                    string = string.replace(/\./g, '').replace(languages[options.currentLanguage].delimiters.decimal, '.');
+                }
+
+                // see if abbreviations are there so that we can multiply to the correct number
+                thousandRegExp = new RegExp('[^a-zA-Z]' + languages[options.currentLanguage].abbreviations.thousand + '(?:\\)|(\\' + languages[options.currentLanguage].currency.symbol + ')?(?:\\))?)?$');
+                millionRegExp = new RegExp('[^a-zA-Z]' + languages[options.currentLanguage].abbreviations.million + '(?:\\)|(\\' + languages[options.currentLanguage].currency.symbol + ')?(?:\\))?)?$');
+                billionRegExp = new RegExp('[^a-zA-Z]' + languages[options.currentLanguage].abbreviations.billion + '(?:\\)|(\\' + languages[options.currentLanguage].currency.symbol + ')?(?:\\))?)?$');
+                trillionRegExp = new RegExp('[^a-zA-Z]' + languages[options.currentLanguage].abbreviations.trillion + '(?:\\)|(\\' + languages[options.currentLanguage].currency.symbol + ')?(?:\\))?)?$');
+
+                // see if bytes are there so that we can multiply to the correct number
+                for (power = 1; power <= byteSuffixes.bytes.length; power++) {
+                    bytesMultiplier = ((string.indexOf(byteSuffixes.bytes[power]) > -1) || (string.indexOf(byteSuffixes.iec[power]) > -1))? Math.pow(1024, power) : false;
+
+                    if (bytesMultiplier) {
+                        break;
+                    }
+                }
+
+                // do some math to create our number
+                value = bytesMultiplier ? bytesMultiplier : 1;
+                value *= stringOriginal.match(thousandRegExp) ? Math.pow(10, 3) : 1;
+                value *= stringOriginal.match(millionRegExp) ? Math.pow(10, 6) : 1;
+                value *= stringOriginal.match(billionRegExp) ? Math.pow(10, 9) : 1;
+                value *= stringOriginal.match(trillionRegExp) ? Math.pow(10, 12) : 1;
+                // check for percentage
+                value *= string.indexOf('%') > -1 ? 0.01 : 1;
+                // check for negative number
+                value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1;
+                // remove non numbers
+                value *= Number(string.replace(/[^0-9\.]+/g, ''));
+                // round if we are talking about bytes
+                value = bytesMultiplier ? Math.ceil(value) : value;
+            }
+        }
+
+        n._value = value;
+
+        return n._value;
+    }
+    function unformatTime(string) {
+        var timeArray = string.split(':'),
+            seconds = 0;
+        // turn hours and minutes into seconds and add them all up
+        if (timeArray.length === 3) {
+            // hours
+            seconds = seconds + (Number(timeArray[0]) * 60 * 60);
+            // minutes
+            seconds = seconds + (Number(timeArray[1]) * 60);
+            // seconds
+            seconds = seconds + Number(timeArray[2]);
+        } else if (timeArray.length === 2) {
+            // minutes
+            seconds = seconds + (Number(timeArray[0]) * 60);
+            // seconds
+            seconds = seconds + Number(timeArray[1]);
+        }
+        return Number(seconds);
+    }
+
+
+    /************************************
+        Top Level Functions
+    ************************************/
+
+    numeral = function(input) {
+        if (numeral.isNumeral(input)) {
+            input = input.value();
+        } else if (input === 0 || typeof input === 'undefined') {
+            input = 0;
+        } else if (input === null) {
+            input = null;
+        } else if (!Number(input)) {
+            input = numeral.fn.unformat(input);
+        } else {
+            input = Number(input);
+        }
+
+        return new Numeral(input);
+    };
+
+    // version number
+    numeral.version = VERSION;
+
+    // compare numeral object
+    numeral.isNumeral = function(obj) {
+        return obj instanceof Numeral;
+    };
+
+
+    // This function will load languages and then set the global language.  If
+    // no arguments are passed in, it will simply return the current global
+    // language key.
+    numeral.language = function(key, values) {
+        if (!key) {
+            return options.currentLanguage;
+        }
+
+        key = key.toLowerCase();
+
+        if (key && !values) {
+            if (!languages[key]) {
+                throw new Error('Unknown language : ' + key);
+            }
+
+            options.currentLanguage = key;
+        }
+
+        if (values || !languages[key]) {
+            loadLanguage(key, values);
+        }
+
+        return numeral;
+    };
+
+    numeral.reset = function() {
+        for (var property in defaults) {
+            options[property] = defaults[property];
+        }
+    };
+
+    // This function provides access to the loaded language data.  If
+    // no arguments are passed in, it will simply return the current
+    // global language object.
+    numeral.languageData = function(key) {
+        if (!key) {
+            return languages[options.currentLanguage];
+        }
+
+        if (!languages[key]) {
+            throw new Error('Unknown language : ' + key);
+        }
+
+        return languages[key];
+    };
+
+    numeral.language('en', {
+        delimiters: {
+            thousands: ',',
+            decimal: '.'
+        },
+        abbreviations: {
+            thousand: 'k',
+            million: 'm',
+            billion: 'b',
+            trillion: 't'
+        },
+        ordinal: function(number) {
+            var b = number % 10;
+            return (~~(number % 100 / 10) === 1) ? 'th' :
+                (b === 1) ? 'st' :
+                (b === 2) ? 'nd' :
+                (b === 3) ? 'rd' : 'th';
+        },
+        currency: {
+            symbol: '$'
+        }
+    });
+
+    numeral.zeroFormat = function(format) {
+        options.zeroFormat = typeof(format) === 'string' ? format : null;
+    };
+
+    numeral.nullFormat = function (format) {
+        options.nullFormat = typeof(format) === 'string' ? format : null;
+    };
+
+    numeral.defaultFormat = function(format) {
+        options.defaultFormat = typeof(format) === 'string' ? format : '0.0';
+    };
+
+    numeral.validate = function(val, culture) {
+        var _decimalSep,
+            _thousandSep,
+            _currSymbol,
+            _valArray,
+            _abbrObj,
+            _thousandRegEx,
+            languageData,
+            temp;
+
+        //coerce val to string
+        if (typeof val !== 'string') {
+            val += '';
+            if (console.warn) {
+                console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);
+            }
+        }
+
+        //trim whitespaces from either sides
+        val = val.trim();
+
+        //if val is just digits return true
+        if ( !! val.match(/^\d+$/)) {
+            return true;
+        }
+
+        //if val is empty return false
+        if (val === '') {
+            return false;
+        }
+
+        //get the decimal and thousands separator from numeral.languageData
+        try {
+            //check if the culture is understood by numeral. if not, default it to current language
+            languageData = numeral.languageData(culture);
+        } catch (e) {
+            languageData = numeral.languageData(numeral.language());
+        }
+
+        //setup the delimiters and currency symbol based on culture/language
+        _currSymbol = languageData.currency.symbol;
+        _abbrObj = languageData.abbreviations;
+        _decimalSep = languageData.delimiters.decimal;
+        if (languageData.delimiters.thousands === '.') {
+            _thousandSep = '\\.';
+        } else {
+            _thousandSep = languageData.delimiters.thousands;
+        }
+
+        // validating currency symbol
+        temp = val.match(/^[^\d]+/);
+        if (temp !== null) {
+            val = val.substr(1);
+            if (temp[0] !== _currSymbol) {
+                return false;
+            }
+        }
+
+        //validating abbreviation symbol
+        temp = val.match(/[^\d]+$/);
+        if (temp !== null) {
+            val = val.slice(0, -1);
+            if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {
+                return false;
+            }
+        }
+
+        _thousandRegEx = new RegExp(_thousandSep + '{2}');
+
+        if (!val.match(/[^\d.,]/g)) {
+            _valArray = val.split(_decimalSep);
+            if (_valArray.length > 2) {
+                return false;
+            } else {
+                if (_valArray.length < 2) {
+                    return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx));
+                } else {
+                    if (_valArray[0].length === 1) {
+                        return ( !! _valArray[0].match(/^\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
+                    } else {
+                        return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
+                    }
+                }
+            }
+        }
+
+        return false;
+    };
+
+    /************************************
+        Helpers
+    ************************************/
+
+    function loadLanguage(key, values) {
+        languages[key] = values;
+    }
+
+    /************************************
+        Floating-point helpers
+    ************************************/
+
+    // The floating-point helper functions and implementation
+    // borrows heavily from sinful.js: http://guipn.github.io/sinful.js/
+
+    // Production steps of ECMA-262, Edition 5, 15.4.4.21
+    // Reference: http://es5.github.io/#x15.4.4.21
+    if (!Array.prototype.reduce) {
+        Array.prototype.reduce = function(callback /*, initialValue*/) {
+            'use strict';
+            if (this === null) {
+                throw new TypeError('Array.prototype.reduce called on null or undefined');
+            }
+
+            if (typeof callback !== 'function') {
+                throw new TypeError(callback + ' is not a function');
+            }
+
+            var t = Object(this), len = t.length >>> 0, k = 0, value;
+
+            if (arguments.length === 2) {
+                value = arguments[1];
+            } else {
+                while (k < len && !(k in t)) {
+                    k++;
+                }
+
+                if (k >= len) {
+                    throw new TypeError('Reduce of empty array with no initial value');
+                }
+
+                value = t[k++];
+            }
+            for (; k < len; k++) {
+                if (k in t) {
+                    value = callback(value, t[k], k, t);
+                }
+            }
+            return value;
+        };
+    }
+
+    /**
+     * Computes the multiplier necessary to make x >= 1,
+     * effectively eliminating miscalculations caused by
+     * finite precision.
+     */
+    function multiplier(x) {
+        var parts = x.toString().split('.');
+        if (parts.length < 2) {
+            return 1;
+        }
+        return Math.pow(10, parts[1].length);
+    }
+
+    /**
+     * Given a variable number of arguments, returns the maximum
+     * multiplier that must be used to normalize an operation involving
+     * all of them.
+     */
+    function correctionFactor() {
+        var args = Array.prototype.slice.call(arguments);
+        return args.reduce(function(prev, next) {
+            var mp = multiplier(prev),
+                mn = multiplier(next);
+            return mp > mn ? mp : mn;
+        }, -Infinity);
+    }
+
+
+    /************************************
+        Numeral Prototype
+    ************************************/
+
+
+    numeral.fn = Numeral.prototype = {
+
+        clone: function() {
+            return numeral(this);
+        },
+
+        format: function (inputString, roundingFunction) {
+            return formatNumeral(this,
+                inputString ? inputString : options.defaultFormat,
+                roundingFunction !== undefined ? roundingFunction : Math.round
+            );
+        },
+
+        unformat: function (inputString) {
+            if (Object.prototype.toString.call(inputString) === '[object Number]') {
+                return inputString;
+            }
+
+            return unformatNumeral(this, inputString ? inputString : options.defaultFormat);
+        },
+
+        value: function() {
+            return this._value;
+        },
+
+        valueOf: function() {
+            return this._value;
+        },
+
+        set: function(value) {
+            this._value = Number(value);
+            return this;
+        },
+
+        add: function(value) {
+            var corrFactor = correctionFactor.call(null, this._value, value);
+
+            function cback(accum, curr, currI, O) {
+                return accum + corrFactor * curr;
+            }
+            this._value = [this._value, value].reduce(cback, 0) / corrFactor;
+            return this;
+        },
+
+        subtract: function(value) {
+            var corrFactor = correctionFactor.call(null, this._value, value);
+
+            function cback(accum, curr, currI, O) {
+                return accum - corrFactor * curr;
+            }
+            this._value = [value].reduce(cback, this._value * corrFactor) / corrFactor;
+            return this;
+        },
+
+        multiply: function(value) {
+            function cback(accum, curr, currI, O) {
+                var corrFactor = correctionFactor(accum, curr);
+                return (accum * corrFactor) * (curr * corrFactor) /
+                    (corrFactor * corrFactor);
+            }
+            this._value = [this._value, value].reduce(cback, 1);
+            return this;
+        },
+
+        divide: function(value) {
+            function cback(accum, curr, currI, O) {
+                var corrFactor = correctionFactor(accum, curr);
+                return (accum * corrFactor) / (curr * corrFactor);
+            }
+            this._value = [this._value, value].reduce(cback);
+            return this;
+        },
+
+        difference: function(value) {
+            return Math.abs(numeral(this._value).subtract(value).value());
+        }
+
+    };
+
+    /************************************
+        Exposing Numeral
+    ************************************/
+
+    // CommonJS module is defined
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = numeral;
+    }
+
+    /*global ender:false */
+    if (typeof ender === 'undefined') {
+        // here, `this` means `window` in the browser, or `global` on the server
+        // add `numeral` as a global object via a string identifier,
+        // for Closure Compiler 'advanced' mode
+        this['numeral'] = numeral;
+    }
+
+    /*global define:false */
+    if (typeof define === 'function' && define.amd) {
+        define([], function() {
+            return numeral;
+        });
+    }
+}).call(this);
+
 /*! @preserve 
  * numeral.js language configuration
  * language : french (fr)
  * author : Adam Draper : https://github.com/adamwdraper
  */
-function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("fr",e)}(),
+(function () {
+    var language = {
+        delimiters: {
+            thousands: ' ',
+            decimal: ','
+        },
+        abbreviations: {
+            thousand: 'k',
+            million: 'm',
+            billion: 'b',
+            trillion: 't'
+        },
+        ordinal : function (number) {
+            return number === 1 ? 'er' : 'e';
+        },
+        currency: {
+            symbol: '€'
+        }
+    };
+
+    // Node
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = language;
+    }
+    // Browser
+    if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
+        this.numeral.language('fr', language);
+    }
+}());
 /*! @preserve 
  * numeral.js language configuration
  * language : english united kingdom (uk)
  * author : Dan Ristic : https://github.com/dristic
  */
-function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"£"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("en-gb",e)}(),
+(function () {
+    var language = {
+        delimiters: {
+            thousands: ',',
+            decimal: '.'
+        },
+        abbreviations: {
+            thousand: 'k',
+            million: 'm',
+            billion: 'b',
+            trillion: 't'
+        },
+        ordinal: function (number) {
+            var b = number % 10;
+            return (~~ (number % 100 / 10) === 1) ? 'th' :
+                (b === 1) ? 'st' :
+                (b === 2) ? 'nd' :
+                (b === 3) ? 'rd' : 'th';
+        },
+        currency: {
+            symbol: '£'
+        }
+    };
+
+    // Node
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = language;
+    }
+    // Browser
+    if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
+        this.numeral.language('en-gb', language);
+    }
+}());
 /*! @preserve 
  * numeral.js language configuration
  * language : netherlands-dutch (nl-nl)
  * author : Dave Clayton : https://github.com/davedx
  */
-function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(e){var t=e%100;return 0!==e&&t<=1||8===t||t>=20?"ste":"de"},currency:{symbol:"€ "}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("nl-nl",e)}(),
+(function () {
+    var language = {
+        delimiters: {
+            thousands: '.',
+            decimal  : ','
+        },
+        abbreviations: {
+            thousand : 'k',
+            million  : 'mln',
+            billion  : 'mrd',
+            trillion : 'bln'
+        },
+        ordinal : function (number) {
+            var remainder = number % 100;
+            return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
+        },
+        currency: {
+            symbol: '€ '
+        }
+    };
+
+    // Node
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = language;
+    }
+    // Browser
+    if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
+        this.numeral.language('nl-nl', language);
+    }
+}());
 /*! @preserve 
  * numeral.js language configuration
  * language : spanish
  * author : Hernan Garcia : https://github.com/hgarcia
  */
-function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===t||3===t?"er":2===t?"do":7===t||0===t?"mo":8===t?"vo":9===t?"no":"to"},currency:{symbol:"$"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("es",e)}(),
+(function () {
+    var language = {
+        delimiters: {
+            thousands: '.',
+            decimal: ','
+        },
+        abbreviations: {
+            thousand: 'k',
+            million: 'mm',
+            billion: 'b',
+            trillion: 't'
+        },
+        ordinal: function (number) {
+            var b = number % 10;
+            return (b === 1 || b === 3) ? 'er' :
+                (b === 2) ? 'do' :
+                (b === 7 || b === 0) ? 'mo' : 
+		(b === 8) ? 'vo' :
+		(b === 9) ? 'no' : 'to';
+        },
+        currency: {
+            symbol: '$'
+        }
+    };
+
+    // Node
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = language;
+    }
+    // Browser
+    if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
+        this.numeral.language('es', language);
+    }
+}());
+
 /*! @preserve 
  * numeral.js language configuration
  * language : italian Italy (it)
  * author : Giacomo Trombi : http://cinquepunti.it
  */
-function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("it",e)}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("../numeral")):"function"==typeof define&&define.amd?define(["numeral"],t):t(e.numeral)}(this,(function(e){"use strict";e.language("eo",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"x10^3",million:"x10^6",billion:"x10^9",trillion:"x10^12"},ordinal:function(e){return"a"},currency:{symbol:"X"}})}));var e,t,n,r,qrcode=function(){var qrcode=function(e,t){var n=e,o=r[t],f=null,p=0,g=null,v=[],_={},y=function(e,t){f=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(p=4*n+17),b(0,0),b(p-7,0),b(0,p-7),L(),w(),k(e,t),n>=7&&M(e),null==g&&(g=S(n,o,v)),x(g,t)},b=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||p<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||p<=t+r||(f[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},w=function(){for(var e=8;e<p-8;e+=1)null==f[e][6]&&(f[e][6]=e%2==0);for(var t=8;t<p-8;t+=1)null==f[6][t]&&(f[6][t]=t%2==0)},L=function(){for(var e=i.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var o=e[t],a=e[r];if(null==f[o][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)f[o+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},M=function(e){for(var t=i.getBCHTypeNumber(n),r=0;r<18;r+=1){var o=!e&&1==(t>>r&1);f[Math.floor(r/3)][r%3+p-8-3]=o}for(r=0;r<18;r+=1)o=!e&&1==(t>>r&1),f[r%3+p-8-3][Math.floor(r/3)]=o},k=function(e,t){for(var n=o<<3|t,r=i.getBCHTypeInfo(n),a=0;a<15;a+=1){var s=!e&&1==(r>>a&1);a<6?f[a][8]=s:a<8?f[a+1][8]=s:f[p-15+a][8]=s}for(a=0;a<15;a+=1)s=!e&&1==(r>>a&1),a<8?f[8][p-a-1]=s:a<9?f[8][15-a-1+1]=s:f[8][15-a-1]=s;f[p-8][8]=!e},x=function(e,t){for(var n=-1,r=p-1,o=7,a=0,s=i.getMaskFunction(t),l=p-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var u=0;u<2;u+=1)if(null==f[r][l-u]){var c=!1;a<e.length&&(c=1==(e[a]>>>o&1)),s(r,l-u)&&(c=!c),f[r][l-u]=c,-1==(o-=1)&&(a+=1,o=7)}if((r+=n)<0||p<=r){r-=n,n=-n;break}}},S=function(e,t,n){for(var r=s.getRSBlocks(e,t),o=l(),u=0;u<n.length;u+=1){var c=n[u];o.put(c.getMode(),4),o.put(c.getLength(),i.getLengthInBits(c.getMode(),e)),c.write(o)}var d=0;for(u=0;u<r.length;u+=1)d+=r[u].dataCount;if(o.getLengthInBits()>8*d)throw"code length overflow. ("+o.getLengthInBits()+">"+8*d+")";for(o.getLengthInBits()+4<=8*d&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*d||(o.put(236,8),o.getLengthInBits()>=8*d));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,s=new Array(t.length),l=new Array(t.length),u=0;u<t.length;u+=1){var c=t[u].dataCount,d=t[u].totalCount-c;r=Math.max(r,c),o=Math.max(o,d),s[u]=new Array(c);for(var h=0;h<s[u].length;h+=1)s[u][h]=255&e.getBuffer()[h+n];n+=c;var f=i.getErrorCorrectPolynomial(d),p=a(s[u],f.getLength()-1).mod(f);for(l[u]=new Array(f.getLength()-1),h=0;h<l[u].length;h+=1){var m=h+p.getLength()-l[u].length;l[u][h]=m>=0?p.getAt(m):0}}var g=0;for(h=0;h<t.length;h+=1)g+=t[h].totalCount;var v=new Array(g),_=0;for(h=0;h<r;h+=1)for(u=0;u<t.length;u+=1)h<s[u].length&&(v[_]=s[u][h],_+=1);for(h=0;h<o;h+=1)for(u=0;u<t.length;u+=1)h<l[u].length&&(v[_]=l[u][h],_+=1);return v}(o,r)};_.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=u(e);break;case"Alphanumeric":n=c(e);break;case"Byte":n=d(e);break;case"Kanji":n=h(e);break;default:throw"mode:"+t}v.push(n),g=null},_.isDark=function(e,t){if(e<0||p<=e||t<0||p<=t)throw e+","+t;return f[e][t]},_.getModuleCount=function(){return p},_.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=s.getRSBlocks(e,o),r=l(),a=0;a<v.length;a++){var u=v[a];r.put(u.getMode(),4),r.put(u.getLength(),i.getLengthInBits(u.getMode(),e)),u.write(r)}var c=0;for(a=0;a<t.length;a++)c+=t[a].dataCount;if(r.getLengthInBits()<=8*c)break}n=e}y(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){y(!0,n);var r=i.getLostPoint(_);(0==n||e>r)&&(e=r,t=n)}return t}())},_.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<_.getModuleCount();r+=1){n+="<tr>";for(var i=0;i<_.getModuleCount();i+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=_.isDark(r,i)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},_.createSvgTag=function(e,t,n,r){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,n=i.alt,r=i.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var o,a,s,l,u=_.getModuleCount()*e+2*t,c="";for(l="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=i.scalable?"":' width="'+u+'px" height="'+u+'px"',c+=' viewBox="0 0 '+u+" "+u+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=r.text||n.text?' role="img" aria-labelledby="'+T([r.id,n.id].join(" ").trim())+'"':"",c+=">",c+=r.text?'<title id="'+T(r.id)+'">'+T(r.text)+"</title>":"",c+=n.text?'<description id="'+T(n.id)+'">'+T(n.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',a=0;a<_.getModuleCount();a+=1)for(s=a*e+t,o=0;o<_.getModuleCount();o+=1)_.isDark(a,o)&&(c+="M"+(o*e+t)+","+s+l);return(c+='" stroke="transparent" fill="black"/>')+"</svg>"},_.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=_.getModuleCount()*e+2*t,r=t,i=n-t;return m(n,n,(function(t,n){if(r<=t&&t<i&&r<=n&&n<i){var o=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return _.isDark(a,o)?0:1}return 1}))},_.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=_.getModuleCount()*e+2*t,i="";return i+="<img",i+=' src="',i+=_.createDataURL(e,t),i+='"',i+=' width="',i+=r,i+='"',i+=' height="',i+=r,i+='"',n&&(i+=' alt="',i+=T(n),i+='"'),i+"/>"};var T=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="&lt;";break;case">":t+="&gt;";break;case"&":t+="&amp;";break;case'"':t+="&quot;";break;default:t+=r}}return t};return _.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,i,o,a=1*_.getModuleCount()+2*e,s=e,l=a-e,u={"██":"█","█ ":"▀"," █":"▄","  ":" "},c={"██":"▀","█ ":"▀"," █":" ","  ":" "},d="";for(t=0;t<a;t+=2){for(r=Math.floor((t-s)/1),i=Math.floor((t+1-s)/1),n=0;n<a;n+=1)o="█",s<=n&&n<l&&s<=t&&t<l&&_.isDark(r,Math.floor((n-s)/1))&&(o=" "),s<=n&&n<l&&s<=t+1&&t+1<l&&_.isDark(i,Math.floor((n-s)/1))?o+=" ":o+="█",d+=e<1&&t+1>=l?c[o]:u[o];d+="\n"}return a%2&&e>0?d.substring(0,d.length-a-1)+Array(a+1).join("▀"):d.substring(0,d.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,i,o,a=_.getModuleCount()*e+2*t,s=t,l=a-t,u=Array(e+1).join("██"),c=Array(e+1).join("  "),d="",h="";for(n=0;n<a;n+=1){for(i=Math.floor((n-s)/e),h="",r=0;r<a;r+=1)o=1,s<=r&&r<l&&s<=n&&n<l&&_.isDark(i,Math.floor((r-s)/e))&&(o=0),h+=o?u:c;for(i=0;i<e;i+=1)d+=h+"\n"}return d.substring(0,d.length-1)},_.renderTo2dContext=function(e,t){t=t||2;for(var n=_.getModuleCount(),r=0;r<n;r++)for(var i=0;i<n;i++)e.fillStyle=_.isDark(r,i)?"black":"white",e.fillRect(r*t,i*t,t,t)},_};qrcode.stringToBytes=(qrcode.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,qrcode.createStringToBytes=function(e,t){var n=function(){for(var n=p(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},i=0,o={};;){var a=n.read();if(-1==a)break;var s=r(),l=r()<<8|r();o[String.fromCharCode(a<<8|s)]=l,i+=1}if(i!=t)throw i+" != "+t;return o}(),r="?".charCodeAt(0);return function(e){for(var t=[],i=0;i<e.length;i+=1){var o=e.charCodeAt(i);if(o<128)t.push(o);else{var a=n[e.charAt(i)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(r)}}return t}};var e,t,n,r={L:1,M:0,Q:3,H:2},i=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(t={}).getBCHTypeInfo=function(e){for(var t=e<<10;n(t)-n(1335)>=0;)t^=1335<<n(t)-n(1335);return 21522^(e<<10|t)},t.getBCHTypeNumber=function(e){for(var t=e<<12;n(t)-n(7973)>=0;)t^=7973<<n(t)-n(7973);return e<<12|t},t.getPatternPosition=function(t){return e[t-1]},t.getMaskFunction=function(e){switch(e){case 0:return function(e,t){return(e+t)%2==0};case 1:return function(e,t){return e%2==0};case 2:return function(e,t){return t%3==0};case 3:return function(e,t){return(e+t)%3==0};case 4:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case 5:return function(e,t){return e*t%2+e*t%3==0};case 6:return function(e,t){return(e*t%2+e*t%3)%2==0};case 7:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},t.getErrorCorrectPolynomial=function(e){for(var t=a([1],0),n=0;n<e;n+=1)t=t.multiply(a([1,o.gexp(n)],0));return t},t.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+e}}},t.getLostPoint=function(qrcode){for(var e=qrcode.getModuleCount(),t=0,n=0;n<e;n+=1)for(var r=0;r<e;r+=1){for(var i=0,o=qrcode.isDark(n,r),a=-1;a<=1;a+=1)if(!(n+a<0||e<=n+a))for(var s=-1;s<=1;s+=1)r+s<0||e<=r+s||0==a&&0==s||o==qrcode.isDark(n+a,r+s)&&(i+=1);i>5&&(t+=3+i-5)}for(n=0;n<e-1;n+=1)for(r=0;r<e-1;r+=1){var l=0;qrcode.isDark(n,r)&&(l+=1),qrcode.isDark(n+1,r)&&(l+=1),qrcode.isDark(n,r+1)&&(l+=1),qrcode.isDark(n+1,r+1)&&(l+=1),0!=l&&4!=l||(t+=3)}for(n=0;n<e;n+=1)for(r=0;r<e-6;r+=1)qrcode.isDark(n,r)&&!qrcode.isDark(n,r+1)&&qrcode.isDark(n,r+2)&&qrcode.isDark(n,r+3)&&qrcode.isDark(n,r+4)&&!qrcode.isDark(n,r+5)&&qrcode.isDark(n,r+6)&&(t+=40);for(r=0;r<e;r+=1)for(n=0;n<e-6;n+=1)qrcode.isDark(n,r)&&!qrcode.isDark(n+1,r)&&qrcode.isDark(n+2,r)&&qrcode.isDark(n+3,r)&&qrcode.isDark(n+4,r)&&!qrcode.isDark(n+5,r)&&qrcode.isDark(n+6,r)&&(t+=40);var u=0;for(r=0;r<e;r+=1)for(n=0;n<e;n+=1)qrcode.isDark(n,r)&&(u+=1);return t+Math.abs(100*u/e/e-50)/5*10},t),o=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;return{glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}}}();function a(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),i=0;i<e.length-n;i+=1)r[i]=e[i+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var i=0;i<e.getLength();i+=1)t[n+i]^=o.gexp(o.glog(r.getAt(n))+o.glog(e.getAt(i)));return a(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=o.glog(r.getAt(0))-o.glog(e.getAt(0)),n=new Array(r.getLength()),i=0;i<r.getLength();i+=1)n[i]=r.getAt(i);for(i=0;i<e.getLength();i+=1)n[i]^=o.gexp(o.glog(e.getAt(i))+t);return a(n,0).mod(e)}};return r}var s=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,i){var o=function(t,n){switch(n){case r.L:return e[4*(t-1)+0];case r.M:return e[4*(t-1)+1];case r.Q:return e[4*(t-1)+2];case r.H:return e[4*(t-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var a=o.length/3,s=[],l=0;l<a;l+=1)for(var u=o[3*l+0],c=o[3*l+1],d=o[3*l+2],h=0;h<u;h+=1)s.push(t(c,d));return s}};return n}(),l=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},u=function(e){var t=e,n={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+2<n.length;)e.put(r(n.substring(i,i+3)),10),i+=3;i<n.length&&(n.length-i==1?e.put(r(n.substring(i,i+1)),4):n.length-i==2&&e.put(r(n.substring(i,i+2)),7))}},r=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return n},c=function(e){var t=e,n={getMode:function(){return 2},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+1<n.length;)e.put(45*r(n.charAt(i))+r(n.charAt(i+1)),11),i+=2;i<n.length&&e.put(r(n.charAt(i)),6)}},r=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return n},d=function(e){var t=qrcode.stringToBytes(e);return{getMode:function(){return 4},getLength:function(e){return t.length},write:function(e){for(var n=0;n<t.length;n+=1)e.put(t[n],8)}}},h=function(e){var t=qrcode.stringToBytesFuncs.SJIS;if(!t)throw"sjis not supported.";!function(e,n){var r=t("友");if(2!=r.length||38726!=(r[0]<<8|r[1]))throw"sjis not supported."}();var n=t(e);return{getMode:function(){return 8},getLength:function(e){return~~(n.length/2)},write:function(e){for(var t=n,r=0;r+1<t.length;){var i=(255&t[r])<<8|255&t[r+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(r+1)+"/"+i;i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13),r+=2}if(r<t.length)throw"illegal char at "+(r+1)}}},f=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var i=0;i<r;i+=1)t.writeByte(e[i+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+"]"}};return t},p=function(e){var t=e,n=0,r=0,i=0,o={read:function(){for(;i<8;){if(n>=t.length){if(0==i)return-1;throw"unexpected end of file./"+i}var e=t.charAt(n);if(n+=1,"="==e)return i=0,-1;e.match(/^\s$/)||(r=r<<6|a(e.charCodeAt(0)),i+=6)}var o=r>>>i-8&255;return i-=8,o}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return o},m=function(e,t,n){for(var r=function(e,t){var n=e,r=t,i=new Array(e*t),o={setPixel:function(e,t,r){i[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=a(2);e.writeByte(2);for(var i=0;t.length-i>255;)e.writeByte(255),e.writeBytes(t,i,255),i+=255;e.writeByte(t.length-i),e.writeBytes(t,i,t.length-i),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,o=s(),a=0;a<t;a+=1)o.add(String.fromCharCode(a));o.add(String.fromCharCode(t)),o.add(String.fromCharCode(n));var l,u,c,d=f(),h=(l=d,u=0,c=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;u+t>=8;)l.writeByte(255&(e<<u|c)),t-=8-u,e>>>=8-u,c=0,u=0;c|=e<<u,u+=t},flush:function(){u>0&&l.writeByte(c)}});h.write(t,r);var p=0,m=String.fromCharCode(i[p]);for(p+=1;p<i.length;){var g=String.fromCharCode(i[p]);p+=1,o.contains(m+g)?m+=g:(h.write(o.indexOf(m),r),o.size()<4095&&(o.size()==1<<r&&(r+=1),o.add(m+g)),m=g)}return h.write(o.indexOf(m),r),h.write(n,r),h.flush(),d.toByteArray()},s=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return o}(e,t),i=0;i<t;i+=1)for(var o=0;o<e;o+=1)r.setPixel(o,i,n(o,i));var a=f();r.write(a);for(var s=function(){var e=0,t=0,n=0,r="",i={},o=function(e){r+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return i.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)o(e>>>t-6),t-=6},i.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),n%3!=0)for(var i=3-n%3,a=0;a<i;a+=1)r+="="},i.toString=function(){return r},i}(),l=a.toByteArray(),u=0;u<l.length;u+=1)s.writeByte(l[u]);return s.flush(),"data:image/gif;base64,"+s};return qrcode}();qrcode.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},e=function(){return qrcode},"function"==typeof define&&define.amd?define([],e):"object"==typeof exports&&(module.exports=e()),
+(function () {
+    var language = {
+        delimiters: {
+            thousands: '.',
+            decimal: ','
+        },
+        abbreviations: {
+            thousand: 'mila',
+            million: 'mil',
+            billion: 'b',
+            trillion: 't'
+        },
+        ordinal: function (number) {
+            return 'º';
+        },
+        currency: {
+            symbol: '€'
+        }
+    };
+
+    // Node
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = language;
+    }
+    // Browser
+    if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
+        this.numeral.language('it', language);
+    }
+}());
+//! numeral.js locale configuration
+//! locale : esperanto (eo)
+//! author : Vivakvo: https://github.com/vivakvo
+
+(function (global, factory) {
+   typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../numeral')) :
+   typeof define === 'function' && define.amd ? define(['numeral'], factory) :
+   factory(global.numeral)
+}(this, function (numeral) { 'use strict';
+
+  numeral.language('eo', {
+    "delimiters": {
+      "thousands": " ",
+      "decimal": ","
+    },
+    "abbreviations": {
+      "thousand": "x10^3",
+      "million":  "x10^6",
+      "billion":  "x10^9",
+      "trillion": "x10^12"
+    },
+    "ordinal": function (number) {
+      return (number === 1) ? 'a' : 'a';
+    },
+    "currency": {
+      "symbol": "X"
+    }
+  });
+}));
+
+//---------------------------------------------------------------------
+//
+// QR Code Generator for JavaScript
+//
+// Copyright (c) 2009 Kazuhiko Arase
+//
+// URL: http://www.d-project.com/
+//
+// Licensed under the MIT license:
+//  http://www.opensource.org/licenses/mit-license.php
+//
+// The word 'QR Code' is registered trademark of
+// DENSO WAVE INCORPORATED
+//  http://www.denso-wave.com/qrcode/faqpatent-e.html
+//
+//---------------------------------------------------------------------
+
+var qrcode = function() {
+
+  //---------------------------------------------------------------------
+  // qrcode
+  //---------------------------------------------------------------------
+
+  /**
+   * qrcode
+   * @param typeNumber 1 to 40
+   * @param errorCorrectionLevel 'L','M','Q','H'
+   */
+  var qrcode = function(typeNumber, errorCorrectionLevel) {
+
+    var PAD0 = 0xEC;
+    var PAD1 = 0x11;
+
+    var _typeNumber = typeNumber;
+    var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];
+    var _modules = null;
+    var _moduleCount = 0;
+    var _dataCache = null;
+    var _dataList = [];
+
+    var _this = {};
+
+    var makeImpl = function(test, maskPattern) {
+
+      _moduleCount = _typeNumber * 4 + 17;
+      _modules = function(moduleCount) {
+        var modules = new Array(moduleCount);
+        for (var row = 0; row < moduleCount; row += 1) {
+          modules[row] = new Array(moduleCount);
+          for (var col = 0; col < moduleCount; col += 1) {
+            modules[row][col] = null;
+          }
+        }
+        return modules;
+      }(_moduleCount);
+
+      setupPositionProbePattern(0, 0);
+      setupPositionProbePattern(_moduleCount - 7, 0);
+      setupPositionProbePattern(0, _moduleCount - 7);
+      setupPositionAdjustPattern();
+      setupTimingPattern();
+      setupTypeInfo(test, maskPattern);
+
+      if (_typeNumber >= 7) {
+        setupTypeNumber(test);
+      }
+
+      if (_dataCache == null) {
+        _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);
+      }
+
+      mapData(_dataCache, maskPattern);
+    };
+
+    var setupPositionProbePattern = function(row, col) {
+
+      for (var r = -1; r <= 7; r += 1) {
+
+        if (row + r <= -1 || _moduleCount <= row + r) continue;
+
+        for (var c = -1; c <= 7; c += 1) {
+
+          if (col + c <= -1 || _moduleCount <= col + c) continue;
+
+          if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )
+              || (0 <= c && c <= 6 && (r == 0 || r == 6) )
+              || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {
+            _modules[row + r][col + c] = true;
+          } else {
+            _modules[row + r][col + c] = false;
+          }
+        }
+      }
+    };
+
+    var getBestMaskPattern = function() {
+
+      var minLostPoint = 0;
+      var pattern = 0;
+
+      for (var i = 0; i < 8; i += 1) {
+
+        makeImpl(true, i);
+
+        var lostPoint = QRUtil.getLostPoint(_this);
+
+        if (i == 0 || minLostPoint > lostPoint) {
+          minLostPoint = lostPoint;
+          pattern = i;
+        }
+      }
+
+      return pattern;
+    };
+
+    var setupTimingPattern = function() {
+
+      for (var r = 8; r < _moduleCount - 8; r += 1) {
+        if (_modules[r][6] != null) {
+          continue;
+        }
+        _modules[r][6] = (r % 2 == 0);
+      }
+
+      for (var c = 8; c < _moduleCount - 8; c += 1) {
+        if (_modules[6][c] != null) {
+          continue;
+        }
+        _modules[6][c] = (c % 2 == 0);
+      }
+    };
+
+    var setupPositionAdjustPattern = function() {
+
+      var pos = QRUtil.getPatternPosition(_typeNumber);
+
+      for (var i = 0; i < pos.length; i += 1) {
+
+        for (var j = 0; j < pos.length; j += 1) {
+
+          var row = pos[i];
+          var col = pos[j];
+
+          if (_modules[row][col] != null) {
+            continue;
+          }
+
+          for (var r = -2; r <= 2; r += 1) {
+
+            for (var c = -2; c <= 2; c += 1) {
+
+              if (r == -2 || r == 2 || c == -2 || c == 2
+                  || (r == 0 && c == 0) ) {
+                _modules[row + r][col + c] = true;
+              } else {
+                _modules[row + r][col + c] = false;
+              }
+            }
+          }
+        }
+      }
+    };
+
+    var setupTypeNumber = function(test) {
+
+      var bits = QRUtil.getBCHTypeNumber(_typeNumber);
+
+      for (var i = 0; i < 18; i += 1) {
+        var mod = (!test && ( (bits >> i) & 1) == 1);
+        _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;
+      }
+
+      for (var i = 0; i < 18; i += 1) {
+        var mod = (!test && ( (bits >> i) & 1) == 1);
+        _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
+      }
+    };
+
+    var setupTypeInfo = function(test, maskPattern) {
+
+      var data = (_errorCorrectionLevel << 3) | maskPattern;
+      var bits = QRUtil.getBCHTypeInfo(data);
+
+      // vertical
+      for (var i = 0; i < 15; i += 1) {
+
+        var mod = (!test && ( (bits >> i) & 1) == 1);
+
+        if (i < 6) {
+          _modules[i][8] = mod;
+        } else if (i < 8) {
+          _modules[i + 1][8] = mod;
+        } else {
+          _modules[_moduleCount - 15 + i][8] = mod;
+        }
+      }
+
+      // horizontal
+      for (var i = 0; i < 15; i += 1) {
+
+        var mod = (!test && ( (bits >> i) & 1) == 1);
+
+        if (i < 8) {
+          _modules[8][_moduleCount - i - 1] = mod;
+        } else if (i < 9) {
+          _modules[8][15 - i - 1 + 1] = mod;
+        } else {
+          _modules[8][15 - i - 1] = mod;
+        }
+      }
+
+      // fixed module
+      _modules[_moduleCount - 8][8] = (!test);
+    };
+
+    var mapData = function(data, maskPattern) {
+
+      var inc = -1;
+      var row = _moduleCount - 1;
+      var bitIndex = 7;
+      var byteIndex = 0;
+      var maskFunc = QRUtil.getMaskFunction(maskPattern);
+
+      for (var col = _moduleCount - 1; col > 0; col -= 2) {
+
+        if (col == 6) col -= 1;
+
+        while (true) {
+
+          for (var c = 0; c < 2; c += 1) {
+
+            if (_modules[row][col - c] == null) {
+
+              var dark = false;
+
+              if (byteIndex < data.length) {
+                dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);
+              }
+
+              var mask = maskFunc(row, col - c);
+
+              if (mask) {
+                dark = !dark;
+              }
+
+              _modules[row][col - c] = dark;
+              bitIndex -= 1;
+
+              if (bitIndex == -1) {
+                byteIndex += 1;
+                bitIndex = 7;
+              }
+            }
+          }
+
+          row += inc;
+
+          if (row < 0 || _moduleCount <= row) {
+            row -= inc;
+            inc = -inc;
+            break;
+          }
+        }
+      }
+    };
+
+    var createBytes = function(buffer, rsBlocks) {
+
+      var offset = 0;
+
+      var maxDcCount = 0;
+      var maxEcCount = 0;
+
+      var dcdata = new Array(rsBlocks.length);
+      var ecdata = new Array(rsBlocks.length);
+
+      for (var r = 0; r < rsBlocks.length; r += 1) {
+
+        var dcCount = rsBlocks[r].dataCount;
+        var ecCount = rsBlocks[r].totalCount - dcCount;
+
+        maxDcCount = Math.max(maxDcCount, dcCount);
+        maxEcCount = Math.max(maxEcCount, ecCount);
+
+        dcdata[r] = new Array(dcCount);
+
+        for (var i = 0; i < dcdata[r].length; i += 1) {
+          dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];
+        }
+        offset += dcCount;
+
+        var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
+        var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);
+
+        var modPoly = rawPoly.mod(rsPoly);
+        ecdata[r] = new Array(rsPoly.getLength() - 1);
+        for (var i = 0; i < ecdata[r].length; i += 1) {
+          var modIndex = i + modPoly.getLength() - ecdata[r].length;
+          ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0;
+        }
+      }
+
+      var totalCodeCount = 0;
+      for (var i = 0; i < rsBlocks.length; i += 1) {
+        totalCodeCount += rsBlocks[i].totalCount;
+      }
+
+      var data = new Array(totalCodeCount);
+      var index = 0;
+
+      for (var i = 0; i < maxDcCount; i += 1) {
+        for (var r = 0; r < rsBlocks.length; r += 1) {
+          if (i < dcdata[r].length) {
+            data[index] = dcdata[r][i];
+            index += 1;
+          }
+        }
+      }
+
+      for (var i = 0; i < maxEcCount; i += 1) {
+        for (var r = 0; r < rsBlocks.length; r += 1) {
+          if (i < ecdata[r].length) {
+            data[index] = ecdata[r][i];
+            index += 1;
+          }
+        }
+      }
+
+      return data;
+    };
+
+    var createData = function(typeNumber, errorCorrectionLevel, dataList) {
+
+      var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);
+
+      var buffer = qrBitBuffer();
+
+      for (var i = 0; i < dataList.length; i += 1) {
+        var data = dataList[i];
+        buffer.put(data.getMode(), 4);
+        buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );
+        data.write(buffer);
+      }
+
+      // calc num max data.
+      var totalDataCount = 0;
+      for (var i = 0; i < rsBlocks.length; i += 1) {
+        totalDataCount += rsBlocks[i].dataCount;
+      }
+
+      if (buffer.getLengthInBits() > totalDataCount * 8) {
+        throw 'code length overflow. ('
+          + buffer.getLengthInBits()
+          + '>'
+          + totalDataCount * 8
+          + ')';
+      }
+
+      // end code
+      if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
+        buffer.put(0, 4);
+      }
+
+      // padding
+      while (buffer.getLengthInBits() % 8 != 0) {
+        buffer.putBit(false);
+      }
+
+      // padding
+      while (true) {
+
+        if (buffer.getLengthInBits() >= totalDataCount * 8) {
+          break;
+        }
+        buffer.put(PAD0, 8);
+
+        if (buffer.getLengthInBits() >= totalDataCount * 8) {
+          break;
+        }
+        buffer.put(PAD1, 8);
+      }
+
+      return createBytes(buffer, rsBlocks);
+    };
+
+    _this.addData = function(data, mode) {
+
+      mode = mode || 'Byte';
+
+      var newData = null;
+
+      switch(mode) {
+      case 'Numeric' :
+        newData = qrNumber(data);
+        break;
+      case 'Alphanumeric' :
+        newData = qrAlphaNum(data);
+        break;
+      case 'Byte' :
+        newData = qr8BitByte(data);
+        break;
+      case 'Kanji' :
+        newData = qrKanji(data);
+        break;
+      default :
+        throw 'mode:' + mode;
+      }
+
+      _dataList.push(newData);
+      _dataCache = null;
+    };
+
+    _this.isDark = function(row, col) {
+      if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {
+        throw row + ',' + col;
+      }
+      return _modules[row][col];
+    };
+
+    _this.getModuleCount = function() {
+      return _moduleCount;
+    };
+
+    _this.make = function() {
+      if (_typeNumber < 1) {
+        var typeNumber = 1;
+
+        for (; typeNumber < 40; typeNumber++) {
+          var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);
+          var buffer = qrBitBuffer();
+
+          for (var i = 0; i < _dataList.length; i++) {
+            var data = _dataList[i];
+            buffer.put(data.getMode(), 4);
+            buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );
+            data.write(buffer);
+          }
+
+          var totalDataCount = 0;
+          for (var i = 0; i < rsBlocks.length; i++) {
+            totalDataCount += rsBlocks[i].dataCount;
+          }
+
+          if (buffer.getLengthInBits() <= totalDataCount * 8) {
+            break;
+          }
+        }
+
+        _typeNumber = typeNumber;
+      }
+
+      makeImpl(false, getBestMaskPattern() );
+    };
+
+    _this.createTableTag = function(cellSize, margin) {
+
+      cellSize = cellSize || 2;
+      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
+
+      var qrHtml = '';
+
+      qrHtml += '<table style="';
+      qrHtml += ' border-width: 0px; border-style: none;';
+      qrHtml += ' border-collapse: collapse;';
+      qrHtml += ' padding: 0px; margin: ' + margin + 'px;';
+      qrHtml += '">';
+      qrHtml += '<tbody>';
+
+      for (var r = 0; r < _this.getModuleCount(); r += 1) {
+
+        qrHtml += '<tr>';
+
+        for (var c = 0; c < _this.getModuleCount(); c += 1) {
+          qrHtml += '<td style="';
+          qrHtml += ' border-width: 0px; border-style: none;';
+          qrHtml += ' border-collapse: collapse;';
+          qrHtml += ' padding: 0px; margin: 0px;';
+          qrHtml += ' width: ' + cellSize + 'px;';
+          qrHtml += ' height: ' + cellSize + 'px;';
+          qrHtml += ' background-color: ';
+          qrHtml += _this.isDark(r, c)? '#000000' : '#ffffff';
+          qrHtml += ';';
+          qrHtml += '"/>';
+        }
+
+        qrHtml += '</tr>';
+      }
+
+      qrHtml += '</tbody>';
+      qrHtml += '</table>';
+
+      return qrHtml;
+    };
+
+    _this.createSvgTag = function(cellSize, margin, alt, title) {
+
+      var opts = {};
+      if (typeof arguments[0] == 'object') {
+        // Called by options.
+        opts = arguments[0];
+        // overwrite cellSize and margin.
+        cellSize = opts.cellSize;
+        margin = opts.margin;
+        alt = opts.alt;
+        title = opts.title;
+      }
+
+      cellSize = cellSize || 2;
+      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
+
+      // Compose alt property surrogate
+      alt = (typeof alt === 'string') ? {text: alt} : alt || {};
+      alt.text = alt.text || null;
+      alt.id = (alt.text) ? alt.id || 'qrcode-description' : null;
+
+      // Compose title property surrogate
+      title = (typeof title === 'string') ? {text: title} : title || {};
+      title.text = title.text || null;
+      title.id = (title.text) ? title.id || 'qrcode-title' : null;
+
+      var size = _this.getModuleCount() * cellSize + margin * 2;
+      var c, mc, r, mr, qrSvg='', rect;
+
+      rect = 'l' + cellSize + ',0 0,' + cellSize +
+        ' -' + cellSize + ',0 0,-' + cellSize + 'z ';
+
+      qrSvg += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"';
+      qrSvg += !opts.scalable ? ' width="' + size + 'px" height="' + size + 'px"' : '';
+      qrSvg += ' viewBox="0 0 ' + size + ' ' + size + '" ';
+      qrSvg += ' preserveAspectRatio="xMinYMin meet"';
+      qrSvg += (title.text || alt.text) ? ' role="img" aria-labelledby="' +
+          escapeXml([title.id, alt.id].join(' ').trim() ) + '"' : '';
+      qrSvg += '>';
+      qrSvg += (title.text) ? '<title id="' + escapeXml(title.id) + '">' +
+          escapeXml(title.text) + '</title>' : '';
+      qrSvg += (alt.text) ? '<description id="' + escapeXml(alt.id) + '">' +
+          escapeXml(alt.text) + '</description>' : '';
+      qrSvg += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>';
+      qrSvg += '<path d="';
+
+      for (r = 0; r < _this.getModuleCount(); r += 1) {
+        mr = r * cellSize + margin;
+        for (c = 0; c < _this.getModuleCount(); c += 1) {
+          if (_this.isDark(r, c) ) {
+            mc = c*cellSize+margin;
+            qrSvg += 'M' + mc + ',' + mr + rect;
+          }
+        }
+      }
+
+      qrSvg += '" stroke="transparent" fill="black"/>';
+      qrSvg += '</svg>';
+
+      return qrSvg;
+    };
+
+    _this.createDataURL = function(cellSize, margin) {
+
+      cellSize = cellSize || 2;
+      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
+
+      var size = _this.getModuleCount() * cellSize + margin * 2;
+      var min = margin;
+      var max = size - margin;
+
+      return createDataURL(size, size, function(x, y) {
+        if (min <= x && x < max && min <= y && y < max) {
+          var c = Math.floor( (x - min) / cellSize);
+          var r = Math.floor( (y - min) / cellSize);
+          return _this.isDark(r, c)? 0 : 1;
+        } else {
+          return 1;
+        }
+      } );
+    };
+
+    _this.createImgTag = function(cellSize, margin, alt) {
+
+      cellSize = cellSize || 2;
+      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
+
+      var size = _this.getModuleCount() * cellSize + margin * 2;
+
+      var img = '';
+      img += '<img';
+      img += '\u0020src="';
+      img += _this.createDataURL(cellSize, margin);
+      img += '"';
+      img += '\u0020width="';
+      img += size;
+      img += '"';
+      img += '\u0020height="';
+      img += size;
+      img += '"';
+      if (alt) {
+        img += '\u0020alt="';
+        img += escapeXml(alt);
+        img += '"';
+      }
+      img += '/>';
+
+      return img;
+    };
+
+    var escapeXml = function(s) {
+      var escaped = '';
+      for (var i = 0; i < s.length; i += 1) {
+        var c = s.charAt(i);
+        switch(c) {
+        case '<': escaped += '&lt;'; break;
+        case '>': escaped += '&gt;'; break;
+        case '&': escaped += '&amp;'; break;
+        case '"': escaped += '&quot;'; break;
+        default : escaped += c; break;
+        }
+      }
+      return escaped;
+    };
+
+    var _createHalfASCII = function(margin) {
+      var cellSize = 1;
+      margin = (typeof margin == 'undefined')? cellSize * 2 : margin;
+
+      var size = _this.getModuleCount() * cellSize + margin * 2;
+      var min = margin;
+      var max = size - margin;
+
+      var y, x, r1, r2, p;
+
+      var blocks = {
+        '██': '█',
+        'â–ˆ ': 'â–€',
+        ' â–ˆ': 'â–„',
+        '  ': ' '
+      };
+
+      var blocksLastLineNoMargin = {
+        '██': '▀',
+        'â–ˆ ': 'â–€',
+        ' â–ˆ': ' ',
+        '  ': ' '
+      };
+
+      var ascii = '';
+      for (y = 0; y < size; y += 2) {
+        r1 = Math.floor((y - min) / cellSize);
+        r2 = Math.floor((y + 1 - min) / cellSize);
+        for (x = 0; x < size; x += 1) {
+          p = 'â–ˆ';
+
+          if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) {
+            p = ' ';
+          }
+
+          if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) {
+            p += ' ';
+          }
+          else {
+            p += 'â–ˆ';
+          }
+
+          // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.
+          ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p];
+        }
+
+        ascii += '\n';
+      }
+
+      if (size % 2 && margin > 0) {
+        return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('â–€');
+      }
+
+      return ascii.substring(0, ascii.length-1);
+    };
+
+    _this.createASCII = function(cellSize, margin) {
+      cellSize = cellSize || 1;
+
+      if (cellSize < 2) {
+        return _createHalfASCII(margin);
+      }
+
+      cellSize -= 1;
+      margin = (typeof margin == 'undefined')? cellSize * 2 : margin;
+
+      var size = _this.getModuleCount() * cellSize + margin * 2;
+      var min = margin;
+      var max = size - margin;
+
+      var y, x, r, p;
+
+      var white = Array(cellSize+1).join('██');
+      var black = Array(cellSize+1).join('  ');
+
+      var ascii = '';
+      var line = '';
+      for (y = 0; y < size; y += 1) {
+        r = Math.floor( (y - min) / cellSize);
+        line = '';
+        for (x = 0; x < size; x += 1) {
+          p = 1;
+
+          if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) {
+            p = 0;
+          }
+
+          // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.
+          line += p ? white : black;
+        }
+
+        for (r = 0; r < cellSize; r += 1) {
+          ascii += line + '\n';
+        }
+      }
+
+      return ascii.substring(0, ascii.length-1);
+    };
+
+    _this.renderTo2dContext = function(context, cellSize) {
+      cellSize = cellSize || 2;
+      var length = _this.getModuleCount();
+      for (var row = 0; row < length; row++) {
+        for (var col = 0; col < length; col++) {
+          context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';
+          context.fillRect(row * cellSize, col * cellSize, cellSize, cellSize);
+        }
+      }
+    }
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // qrcode.stringToBytes
+  //---------------------------------------------------------------------
+
+  qrcode.stringToBytesFuncs = {
+    'default' : function(s) {
+      var bytes = [];
+      for (var i = 0; i < s.length; i += 1) {
+        var c = s.charCodeAt(i);
+        bytes.push(c & 0xff);
+      }
+      return bytes;
+    }
+  };
+
+  qrcode.stringToBytes = qrcode.stringToBytesFuncs['default'];
+
+  //---------------------------------------------------------------------
+  // qrcode.createStringToBytes
+  //---------------------------------------------------------------------
+
+  /**
+   * @param unicodeData base64 string of byte array.
+   * [16bit Unicode],[16bit Bytes], ...
+   * @param numChars
+   */
+  qrcode.createStringToBytes = function(unicodeData, numChars) {
+
+    // create conversion map.
+
+    var unicodeMap = function() {
+
+      var bin = base64DecodeInputStream(unicodeData);
+      var read = function() {
+        var b = bin.read();
+        if (b == -1) throw 'eof';
+        return b;
+      };
+
+      var count = 0;
+      var unicodeMap = {};
+      while (true) {
+        var b0 = bin.read();
+        if (b0 == -1) break;
+        var b1 = read();
+        var b2 = read();
+        var b3 = read();
+        var k = String.fromCharCode( (b0 << 8) | b1);
+        var v = (b2 << 8) | b3;
+        unicodeMap[k] = v;
+        count += 1;
+      }
+      if (count != numChars) {
+        throw count + ' != ' + numChars;
+      }
+
+      return unicodeMap;
+    }();
+
+    var unknownChar = '?'.charCodeAt(0);
+
+    return function(s) {
+      var bytes = [];
+      for (var i = 0; i < s.length; i += 1) {
+        var c = s.charCodeAt(i);
+        if (c < 128) {
+          bytes.push(c);
+        } else {
+          var b = unicodeMap[s.charAt(i)];
+          if (typeof b == 'number') {
+            if ( (b & 0xff) == b) {
+              // 1byte
+              bytes.push(b);
+            } else {
+              // 2bytes
+              bytes.push(b >>> 8);
+              bytes.push(b & 0xff);
+            }
+          } else {
+            bytes.push(unknownChar);
+          }
+        }
+      }
+      return bytes;
+    };
+  };
+
+  //---------------------------------------------------------------------
+  // QRMode
+  //---------------------------------------------------------------------
+
+  var QRMode = {
+    MODE_NUMBER :    1 << 0,
+    MODE_ALPHA_NUM : 1 << 1,
+    MODE_8BIT_BYTE : 1 << 2,
+    MODE_KANJI :     1 << 3
+  };
+
+  //---------------------------------------------------------------------
+  // QRErrorCorrectionLevel
+  //---------------------------------------------------------------------
+
+  var QRErrorCorrectionLevel = {
+    L : 1,
+    M : 0,
+    Q : 3,
+    H : 2
+  };
+
+  //---------------------------------------------------------------------
+  // QRMaskPattern
+  //---------------------------------------------------------------------
+
+  var QRMaskPattern = {
+    PATTERN000 : 0,
+    PATTERN001 : 1,
+    PATTERN010 : 2,
+    PATTERN011 : 3,
+    PATTERN100 : 4,
+    PATTERN101 : 5,
+    PATTERN110 : 6,
+    PATTERN111 : 7
+  };
+
+  //---------------------------------------------------------------------
+  // QRUtil
+  //---------------------------------------------------------------------
+
+  var QRUtil = function() {
+
+    var PATTERN_POSITION_TABLE = [
+      [],
+      [6, 18],
+      [6, 22],
+      [6, 26],
+      [6, 30],
+      [6, 34],
+      [6, 22, 38],
+      [6, 24, 42],
+      [6, 26, 46],
+      [6, 28, 50],
+      [6, 30, 54],
+      [6, 32, 58],
+      [6, 34, 62],
+      [6, 26, 46, 66],
+      [6, 26, 48, 70],
+      [6, 26, 50, 74],
+      [6, 30, 54, 78],
+      [6, 30, 56, 82],
+      [6, 30, 58, 86],
+      [6, 34, 62, 90],
+      [6, 28, 50, 72, 94],
+      [6, 26, 50, 74, 98],
+      [6, 30, 54, 78, 102],
+      [6, 28, 54, 80, 106],
+      [6, 32, 58, 84, 110],
+      [6, 30, 58, 86, 114],
+      [6, 34, 62, 90, 118],
+      [6, 26, 50, 74, 98, 122],
+      [6, 30, 54, 78, 102, 126],
+      [6, 26, 52, 78, 104, 130],
+      [6, 30, 56, 82, 108, 134],
+      [6, 34, 60, 86, 112, 138],
+      [6, 30, 58, 86, 114, 142],
+      [6, 34, 62, 90, 118, 146],
+      [6, 30, 54, 78, 102, 126, 150],
+      [6, 24, 50, 76, 102, 128, 154],
+      [6, 28, 54, 80, 106, 132, 158],
+      [6, 32, 58, 84, 110, 136, 162],
+      [6, 26, 54, 82, 110, 138, 166],
+      [6, 30, 58, 86, 114, 142, 170]
+    ];
+    var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
+    var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
+    var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
+
+    var _this = {};
+
+    var getBCHDigit = function(data) {
+      var digit = 0;
+      while (data != 0) {
+        digit += 1;
+        data >>>= 1;
+      }
+      return digit;
+    };
+
+    _this.getBCHTypeInfo = function(data) {
+      var d = data << 10;
+      while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {
+        d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) );
+      }
+      return ( (data << 10) | d) ^ G15_MASK;
+    };
+
+    _this.getBCHTypeNumber = function(data) {
+      var d = data << 12;
+      while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {
+        d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) );
+      }
+      return (data << 12) | d;
+    };
+
+    _this.getPatternPosition = function(typeNumber) {
+      return PATTERN_POSITION_TABLE[typeNumber - 1];
+    };
+
+    _this.getMaskFunction = function(maskPattern) {
+
+      switch (maskPattern) {
+
+      case QRMaskPattern.PATTERN000 :
+        return function(i, j) { return (i + j) % 2 == 0; };
+      case QRMaskPattern.PATTERN001 :
+        return function(i, j) { return i % 2 == 0; };
+      case QRMaskPattern.PATTERN010 :
+        return function(i, j) { return j % 3 == 0; };
+      case QRMaskPattern.PATTERN011 :
+        return function(i, j) { return (i + j) % 3 == 0; };
+      case QRMaskPattern.PATTERN100 :
+        return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; };
+      case QRMaskPattern.PATTERN101 :
+        return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; };
+      case QRMaskPattern.PATTERN110 :
+        return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; };
+      case QRMaskPattern.PATTERN111 :
+        return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; };
+
+      default :
+        throw 'bad maskPattern:' + maskPattern;
+      }
+    };
+
+    _this.getErrorCorrectPolynomial = function(errorCorrectLength) {
+      var a = qrPolynomial([1], 0);
+      for (var i = 0; i < errorCorrectLength; i += 1) {
+        a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) );
+      }
+      return a;
+    };
+
+    _this.getLengthInBits = function(mode, type) {
+
+      if (1 <= type && type < 10) {
+
+        // 1 - 9
+
+        switch(mode) {
+        case QRMode.MODE_NUMBER    : return 10;
+        case QRMode.MODE_ALPHA_NUM : return 9;
+        case QRMode.MODE_8BIT_BYTE : return 8;
+        case QRMode.MODE_KANJI     : return 8;
+        default :
+          throw 'mode:' + mode;
+        }
+
+      } else if (type < 27) {
+
+        // 10 - 26
+
+        switch(mode) {
+        case QRMode.MODE_NUMBER    : return 12;
+        case QRMode.MODE_ALPHA_NUM : return 11;
+        case QRMode.MODE_8BIT_BYTE : return 16;
+        case QRMode.MODE_KANJI     : return 10;
+        default :
+          throw 'mode:' + mode;
+        }
+
+      } else if (type < 41) {
+
+        // 27 - 40
+
+        switch(mode) {
+        case QRMode.MODE_NUMBER    : return 14;
+        case QRMode.MODE_ALPHA_NUM : return 13;
+        case QRMode.MODE_8BIT_BYTE : return 16;
+        case QRMode.MODE_KANJI     : return 12;
+        default :
+          throw 'mode:' + mode;
+        }
+
+      } else {
+        throw 'type:' + type;
+      }
+    };
+
+    _this.getLostPoint = function(qrcode) {
+
+      var moduleCount = qrcode.getModuleCount();
+
+      var lostPoint = 0;
+
+      // LEVEL1
+
+      for (var row = 0; row < moduleCount; row += 1) {
+        for (var col = 0; col < moduleCount; col += 1) {
+
+          var sameCount = 0;
+          var dark = qrcode.isDark(row, col);
+
+          for (var r = -1; r <= 1; r += 1) {
+
+            if (row + r < 0 || moduleCount <= row + r) {
+              continue;
+            }
+
+            for (var c = -1; c <= 1; c += 1) {
+
+              if (col + c < 0 || moduleCount <= col + c) {
+                continue;
+              }
+
+              if (r == 0 && c == 0) {
+                continue;
+              }
+
+              if (dark == qrcode.isDark(row + r, col + c) ) {
+                sameCount += 1;
+              }
+            }
+          }
+
+          if (sameCount > 5) {
+            lostPoint += (3 + sameCount - 5);
+          }
+        }
+      };
+
+      // LEVEL2
+
+      for (var row = 0; row < moduleCount - 1; row += 1) {
+        for (var col = 0; col < moduleCount - 1; col += 1) {
+          var count = 0;
+          if (qrcode.isDark(row, col) ) count += 1;
+          if (qrcode.isDark(row + 1, col) ) count += 1;
+          if (qrcode.isDark(row, col + 1) ) count += 1;
+          if (qrcode.isDark(row + 1, col + 1) ) count += 1;
+          if (count == 0 || count == 4) {
+            lostPoint += 3;
+          }
+        }
+      }
+
+      // LEVEL3
+
+      for (var row = 0; row < moduleCount; row += 1) {
+        for (var col = 0; col < moduleCount - 6; col += 1) {
+          if (qrcode.isDark(row, col)
+              && !qrcode.isDark(row, col + 1)
+              &&  qrcode.isDark(row, col + 2)
+              &&  qrcode.isDark(row, col + 3)
+              &&  qrcode.isDark(row, col + 4)
+              && !qrcode.isDark(row, col + 5)
+              &&  qrcode.isDark(row, col + 6) ) {
+            lostPoint += 40;
+          }
+        }
+      }
+
+      for (var col = 0; col < moduleCount; col += 1) {
+        for (var row = 0; row < moduleCount - 6; row += 1) {
+          if (qrcode.isDark(row, col)
+              && !qrcode.isDark(row + 1, col)
+              &&  qrcode.isDark(row + 2, col)
+              &&  qrcode.isDark(row + 3, col)
+              &&  qrcode.isDark(row + 4, col)
+              && !qrcode.isDark(row + 5, col)
+              &&  qrcode.isDark(row + 6, col) ) {
+            lostPoint += 40;
+          }
+        }
+      }
+
+      // LEVEL4
+
+      var darkCount = 0;
+
+      for (var col = 0; col < moduleCount; col += 1) {
+        for (var row = 0; row < moduleCount; row += 1) {
+          if (qrcode.isDark(row, col) ) {
+            darkCount += 1;
+          }
+        }
+      }
+
+      var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
+      lostPoint += ratio * 10;
+
+      return lostPoint;
+    };
+
+    return _this;
+  }();
+
+  //---------------------------------------------------------------------
+  // QRMath
+  //---------------------------------------------------------------------
+
+  var QRMath = function() {
+
+    var EXP_TABLE = new Array(256);
+    var LOG_TABLE = new Array(256);
+
+    // initialize tables
+    for (var i = 0; i < 8; i += 1) {
+      EXP_TABLE[i] = 1 << i;
+    }
+    for (var i = 8; i < 256; i += 1) {
+      EXP_TABLE[i] = EXP_TABLE[i - 4]
+        ^ EXP_TABLE[i - 5]
+        ^ EXP_TABLE[i - 6]
+        ^ EXP_TABLE[i - 8];
+    }
+    for (var i = 0; i < 255; i += 1) {
+      LOG_TABLE[EXP_TABLE[i] ] = i;
+    }
+
+    var _this = {};
+
+    _this.glog = function(n) {
+
+      if (n < 1) {
+        throw 'glog(' + n + ')';
+      }
+
+      return LOG_TABLE[n];
+    };
+
+    _this.gexp = function(n) {
+
+      while (n < 0) {
+        n += 255;
+      }
+
+      while (n >= 256) {
+        n -= 255;
+      }
+
+      return EXP_TABLE[n];
+    };
+
+    return _this;
+  }();
+
+  //---------------------------------------------------------------------
+  // qrPolynomial
+  //---------------------------------------------------------------------
+
+  function qrPolynomial(num, shift) {
+
+    if (typeof num.length == 'undefined') {
+      throw num.length + '/' + shift;
+    }
+
+    var _num = function() {
+      var offset = 0;
+      while (offset < num.length && num[offset] == 0) {
+        offset += 1;
+      }
+      var _num = new Array(num.length - offset + shift);
+      for (var i = 0; i < num.length - offset; i += 1) {
+        _num[i] = num[i + offset];
+      }
+      return _num;
+    }();
+
+    var _this = {};
+
+    _this.getAt = function(index) {
+      return _num[index];
+    };
+
+    _this.getLength = function() {
+      return _num.length;
+    };
+
+    _this.multiply = function(e) {
+
+      var num = new Array(_this.getLength() + e.getLength() - 1);
+
+      for (var i = 0; i < _this.getLength(); i += 1) {
+        for (var j = 0; j < e.getLength(); j += 1) {
+          num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );
+        }
+      }
+
+      return qrPolynomial(num, 0);
+    };
+
+    _this.mod = function(e) {
+
+      if (_this.getLength() - e.getLength() < 0) {
+        return _this;
+      }
+
+      var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );
+
+      var num = new Array(_this.getLength() );
+      for (var i = 0; i < _this.getLength(); i += 1) {
+        num[i] = _this.getAt(i);
+      }
+
+      for (var i = 0; i < e.getLength(); i += 1) {
+        num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);
+      }
+
+      // recursive call
+      return qrPolynomial(num, 0).mod(e);
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // QRRSBlock
+  //---------------------------------------------------------------------
+
+  var QRRSBlock = function() {
+
+    var RS_BLOCK_TABLE = [
+
+      // L
+      // M
+      // Q
+      // H
+
+      // 1
+      [1, 26, 19],
+      [1, 26, 16],
+      [1, 26, 13],
+      [1, 26, 9],
+
+      // 2
+      [1, 44, 34],
+      [1, 44, 28],
+      [1, 44, 22],
+      [1, 44, 16],
+
+      // 3
+      [1, 70, 55],
+      [1, 70, 44],
+      [2, 35, 17],
+      [2, 35, 13],
+
+      // 4
+      [1, 100, 80],
+      [2, 50, 32],
+      [2, 50, 24],
+      [4, 25, 9],
+
+      // 5
+      [1, 134, 108],
+      [2, 67, 43],
+      [2, 33, 15, 2, 34, 16],
+      [2, 33, 11, 2, 34, 12],
+
+      // 6
+      [2, 86, 68],
+      [4, 43, 27],
+      [4, 43, 19],
+      [4, 43, 15],
+
+      // 7
+      [2, 98, 78],
+      [4, 49, 31],
+      [2, 32, 14, 4, 33, 15],
+      [4, 39, 13, 1, 40, 14],
+
+      // 8
+      [2, 121, 97],
+      [2, 60, 38, 2, 61, 39],
+      [4, 40, 18, 2, 41, 19],
+      [4, 40, 14, 2, 41, 15],
+
+      // 9
+      [2, 146, 116],
+      [3, 58, 36, 2, 59, 37],
+      [4, 36, 16, 4, 37, 17],
+      [4, 36, 12, 4, 37, 13],
+
+      // 10
+      [2, 86, 68, 2, 87, 69],
+      [4, 69, 43, 1, 70, 44],
+      [6, 43, 19, 2, 44, 20],
+      [6, 43, 15, 2, 44, 16],
+
+      // 11
+      [4, 101, 81],
+      [1, 80, 50, 4, 81, 51],
+      [4, 50, 22, 4, 51, 23],
+      [3, 36, 12, 8, 37, 13],
+
+      // 12
+      [2, 116, 92, 2, 117, 93],
+      [6, 58, 36, 2, 59, 37],
+      [4, 46, 20, 6, 47, 21],
+      [7, 42, 14, 4, 43, 15],
+
+      // 13
+      [4, 133, 107],
+      [8, 59, 37, 1, 60, 38],
+      [8, 44, 20, 4, 45, 21],
+      [12, 33, 11, 4, 34, 12],
+
+      // 14
+      [3, 145, 115, 1, 146, 116],
+      [4, 64, 40, 5, 65, 41],
+      [11, 36, 16, 5, 37, 17],
+      [11, 36, 12, 5, 37, 13],
+
+      // 15
+      [5, 109, 87, 1, 110, 88],
+      [5, 65, 41, 5, 66, 42],
+      [5, 54, 24, 7, 55, 25],
+      [11, 36, 12, 7, 37, 13],
+
+      // 16
+      [5, 122, 98, 1, 123, 99],
+      [7, 73, 45, 3, 74, 46],
+      [15, 43, 19, 2, 44, 20],
+      [3, 45, 15, 13, 46, 16],
+
+      // 17
+      [1, 135, 107, 5, 136, 108],
+      [10, 74, 46, 1, 75, 47],
+      [1, 50, 22, 15, 51, 23],
+      [2, 42, 14, 17, 43, 15],
+
+      // 18
+      [5, 150, 120, 1, 151, 121],
+      [9, 69, 43, 4, 70, 44],
+      [17, 50, 22, 1, 51, 23],
+      [2, 42, 14, 19, 43, 15],
+
+      // 19
+      [3, 141, 113, 4, 142, 114],
+      [3, 70, 44, 11, 71, 45],
+      [17, 47, 21, 4, 48, 22],
+      [9, 39, 13, 16, 40, 14],
+
+      // 20
+      [3, 135, 107, 5, 136, 108],
+      [3, 67, 41, 13, 68, 42],
+      [15, 54, 24, 5, 55, 25],
+      [15, 43, 15, 10, 44, 16],
+
+      // 21
+      [4, 144, 116, 4, 145, 117],
+      [17, 68, 42],
+      [17, 50, 22, 6, 51, 23],
+      [19, 46, 16, 6, 47, 17],
+
+      // 22
+      [2, 139, 111, 7, 140, 112],
+      [17, 74, 46],
+      [7, 54, 24, 16, 55, 25],
+      [34, 37, 13],
+
+      // 23
+      [4, 151, 121, 5, 152, 122],
+      [4, 75, 47, 14, 76, 48],
+      [11, 54, 24, 14, 55, 25],
+      [16, 45, 15, 14, 46, 16],
+
+      // 24
+      [6, 147, 117, 4, 148, 118],
+      [6, 73, 45, 14, 74, 46],
+      [11, 54, 24, 16, 55, 25],
+      [30, 46, 16, 2, 47, 17],
+
+      // 25
+      [8, 132, 106, 4, 133, 107],
+      [8, 75, 47, 13, 76, 48],
+      [7, 54, 24, 22, 55, 25],
+      [22, 45, 15, 13, 46, 16],
+
+      // 26
+      [10, 142, 114, 2, 143, 115],
+      [19, 74, 46, 4, 75, 47],
+      [28, 50, 22, 6, 51, 23],
+      [33, 46, 16, 4, 47, 17],
+
+      // 27
+      [8, 152, 122, 4, 153, 123],
+      [22, 73, 45, 3, 74, 46],
+      [8, 53, 23, 26, 54, 24],
+      [12, 45, 15, 28, 46, 16],
+
+      // 28
+      [3, 147, 117, 10, 148, 118],
+      [3, 73, 45, 23, 74, 46],
+      [4, 54, 24, 31, 55, 25],
+      [11, 45, 15, 31, 46, 16],
+
+      // 29
+      [7, 146, 116, 7, 147, 117],
+      [21, 73, 45, 7, 74, 46],
+      [1, 53, 23, 37, 54, 24],
+      [19, 45, 15, 26, 46, 16],
+
+      // 30
+      [5, 145, 115, 10, 146, 116],
+      [19, 75, 47, 10, 76, 48],
+      [15, 54, 24, 25, 55, 25],
+      [23, 45, 15, 25, 46, 16],
+
+      // 31
+      [13, 145, 115, 3, 146, 116],
+      [2, 74, 46, 29, 75, 47],
+      [42, 54, 24, 1, 55, 25],
+      [23, 45, 15, 28, 46, 16],
+
+      // 32
+      [17, 145, 115],
+      [10, 74, 46, 23, 75, 47],
+      [10, 54, 24, 35, 55, 25],
+      [19, 45, 15, 35, 46, 16],
+
+      // 33
+      [17, 145, 115, 1, 146, 116],
+      [14, 74, 46, 21, 75, 47],
+      [29, 54, 24, 19, 55, 25],
+      [11, 45, 15, 46, 46, 16],
+
+      // 34
+      [13, 145, 115, 6, 146, 116],
+      [14, 74, 46, 23, 75, 47],
+      [44, 54, 24, 7, 55, 25],
+      [59, 46, 16, 1, 47, 17],
+
+      // 35
+      [12, 151, 121, 7, 152, 122],
+      [12, 75, 47, 26, 76, 48],
+      [39, 54, 24, 14, 55, 25],
+      [22, 45, 15, 41, 46, 16],
+
+      // 36
+      [6, 151, 121, 14, 152, 122],
+      [6, 75, 47, 34, 76, 48],
+      [46, 54, 24, 10, 55, 25],
+      [2, 45, 15, 64, 46, 16],
+
+      // 37
+      [17, 152, 122, 4, 153, 123],
+      [29, 74, 46, 14, 75, 47],
+      [49, 54, 24, 10, 55, 25],
+      [24, 45, 15, 46, 46, 16],
+
+      // 38
+      [4, 152, 122, 18, 153, 123],
+      [13, 74, 46, 32, 75, 47],
+      [48, 54, 24, 14, 55, 25],
+      [42, 45, 15, 32, 46, 16],
+
+      // 39
+      [20, 147, 117, 4, 148, 118],
+      [40, 75, 47, 7, 76, 48],
+      [43, 54, 24, 22, 55, 25],
+      [10, 45, 15, 67, 46, 16],
+
+      // 40
+      [19, 148, 118, 6, 149, 119],
+      [18, 75, 47, 31, 76, 48],
+      [34, 54, 24, 34, 55, 25],
+      [20, 45, 15, 61, 46, 16]
+    ];
+
+    var qrRSBlock = function(totalCount, dataCount) {
+      var _this = {};
+      _this.totalCount = totalCount;
+      _this.dataCount = dataCount;
+      return _this;
+    };
+
+    var _this = {};
+
+    var getRsBlockTable = function(typeNumber, errorCorrectionLevel) {
+
+      switch(errorCorrectionLevel) {
+      case QRErrorCorrectionLevel.L :
+        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
+      case QRErrorCorrectionLevel.M :
+        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
+      case QRErrorCorrectionLevel.Q :
+        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
+      case QRErrorCorrectionLevel.H :
+        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
+      default :
+        return undefined;
+      }
+    };
+
+    _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {
+
+      var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);
+
+      if (typeof rsBlock == 'undefined') {
+        throw 'bad rs block @ typeNumber:' + typeNumber +
+            '/errorCorrectionLevel:' + errorCorrectionLevel;
+      }
+
+      var length = rsBlock.length / 3;
+
+      var list = [];
+
+      for (var i = 0; i < length; i += 1) {
+
+        var count = rsBlock[i * 3 + 0];
+        var totalCount = rsBlock[i * 3 + 1];
+        var dataCount = rsBlock[i * 3 + 2];
+
+        for (var j = 0; j < count; j += 1) {
+          list.push(qrRSBlock(totalCount, dataCount) );
+        }
+      }
+
+      return list;
+    };
+
+    return _this;
+  }();
+
+  //---------------------------------------------------------------------
+  // qrBitBuffer
+  //---------------------------------------------------------------------
+
+  var qrBitBuffer = function() {
+
+    var _buffer = [];
+    var _length = 0;
+
+    var _this = {};
+
+    _this.getBuffer = function() {
+      return _buffer;
+    };
+
+    _this.getAt = function(index) {
+      var bufIndex = Math.floor(index / 8);
+      return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;
+    };
+
+    _this.put = function(num, length) {
+      for (var i = 0; i < length; i += 1) {
+        _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);
+      }
+    };
+
+    _this.getLengthInBits = function() {
+      return _length;
+    };
+
+    _this.putBit = function(bit) {
+
+      var bufIndex = Math.floor(_length / 8);
+      if (_buffer.length <= bufIndex) {
+        _buffer.push(0);
+      }
+
+      if (bit) {
+        _buffer[bufIndex] |= (0x80 >>> (_length % 8) );
+      }
+
+      _length += 1;
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // qrNumber
+  //---------------------------------------------------------------------
+
+  var qrNumber = function(data) {
+
+    var _mode = QRMode.MODE_NUMBER;
+    var _data = data;
+
+    var _this = {};
+
+    _this.getMode = function() {
+      return _mode;
+    };
+
+    _this.getLength = function(buffer) {
+      return _data.length;
+    };
+
+    _this.write = function(buffer) {
+
+      var data = _data;
+
+      var i = 0;
+
+      while (i + 2 < data.length) {
+        buffer.put(strToNum(data.substring(i, i + 3) ), 10);
+        i += 3;
+      }
+
+      if (i < data.length) {
+        if (data.length - i == 1) {
+          buffer.put(strToNum(data.substring(i, i + 1) ), 4);
+        } else if (data.length - i == 2) {
+          buffer.put(strToNum(data.substring(i, i + 2) ), 7);
+        }
+      }
+    };
+
+    var strToNum = function(s) {
+      var num = 0;
+      for (var i = 0; i < s.length; i += 1) {
+        num = num * 10 + chatToNum(s.charAt(i) );
+      }
+      return num;
+    };
+
+    var chatToNum = function(c) {
+      if ('0' <= c && c <= '9') {
+        return c.charCodeAt(0) - '0'.charCodeAt(0);
+      }
+      throw 'illegal char :' + c;
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // qrAlphaNum
+  //---------------------------------------------------------------------
+
+  var qrAlphaNum = function(data) {
+
+    var _mode = QRMode.MODE_ALPHA_NUM;
+    var _data = data;
+
+    var _this = {};
+
+    _this.getMode = function() {
+      return _mode;
+    };
+
+    _this.getLength = function(buffer) {
+      return _data.length;
+    };
+
+    _this.write = function(buffer) {
+
+      var s = _data;
+
+      var i = 0;
+
+      while (i + 1 < s.length) {
+        buffer.put(
+          getCode(s.charAt(i) ) * 45 +
+          getCode(s.charAt(i + 1) ), 11);
+        i += 2;
+      }
+
+      if (i < s.length) {
+        buffer.put(getCode(s.charAt(i) ), 6);
+      }
+    };
+
+    var getCode = function(c) {
+
+      if ('0' <= c && c <= '9') {
+        return c.charCodeAt(0) - '0'.charCodeAt(0);
+      } else if ('A' <= c && c <= 'Z') {
+        return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;
+      } else {
+        switch (c) {
+        case ' ' : return 36;
+        case '$' : return 37;
+        case '%' : return 38;
+        case '*' : return 39;
+        case '+' : return 40;
+        case '-' : return 41;
+        case '.' : return 42;
+        case '/' : return 43;
+        case ':' : return 44;
+        default :
+          throw 'illegal char :' + c;
+        }
+      }
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // qr8BitByte
+  //---------------------------------------------------------------------
+
+  var qr8BitByte = function(data) {
+
+    var _mode = QRMode.MODE_8BIT_BYTE;
+    var _data = data;
+    var _bytes = qrcode.stringToBytes(data);
+
+    var _this = {};
+
+    _this.getMode = function() {
+      return _mode;
+    };
+
+    _this.getLength = function(buffer) {
+      return _bytes.length;
+    };
+
+    _this.write = function(buffer) {
+      for (var i = 0; i < _bytes.length; i += 1) {
+        buffer.put(_bytes[i], 8);
+      }
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // qrKanji
+  //---------------------------------------------------------------------
+
+  var qrKanji = function(data) {
+
+    var _mode = QRMode.MODE_KANJI;
+    var _data = data;
+
+    var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];
+    if (!stringToBytes) {
+      throw 'sjis not supported.';
+    }
+    !function(c, code) {
+      // self test for sjis support.
+      var test = stringToBytes(c);
+      if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {
+        throw 'sjis not supported.';
+      }
+    }('\u53cb', 0x9746);
+
+    var _bytes = stringToBytes(data);
+
+    var _this = {};
+
+    _this.getMode = function() {
+      return _mode;
+    };
+
+    _this.getLength = function(buffer) {
+      return ~~(_bytes.length / 2);
+    };
+
+    _this.write = function(buffer) {
+
+      var data = _bytes;
+
+      var i = 0;
+
+      while (i + 1 < data.length) {
+
+        var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);
+
+        if (0x8140 <= c && c <= 0x9FFC) {
+          c -= 0x8140;
+        } else if (0xE040 <= c && c <= 0xEBBF) {
+          c -= 0xC140;
+        } else {
+          throw 'illegal char at ' + (i + 1) + '/' + c;
+        }
+
+        c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);
+
+        buffer.put(c, 13);
+
+        i += 2;
+      }
+
+      if (i < data.length) {
+        throw 'illegal char at ' + (i + 1);
+      }
+    };
+
+    return _this;
+  };
+
+  //=====================================================================
+  // GIF Support etc.
+  //
+
+  //---------------------------------------------------------------------
+  // byteArrayOutputStream
+  //---------------------------------------------------------------------
+
+  var byteArrayOutputStream = function() {
+
+    var _bytes = [];
+
+    var _this = {};
+
+    _this.writeByte = function(b) {
+      _bytes.push(b & 0xff);
+    };
+
+    _this.writeShort = function(i) {
+      _this.writeByte(i);
+      _this.writeByte(i >>> 8);
+    };
+
+    _this.writeBytes = function(b, off, len) {
+      off = off || 0;
+      len = len || b.length;
+      for (var i = 0; i < len; i += 1) {
+        _this.writeByte(b[i + off]);
+      }
+    };
+
+    _this.writeString = function(s) {
+      for (var i = 0; i < s.length; i += 1) {
+        _this.writeByte(s.charCodeAt(i) );
+      }
+    };
+
+    _this.toByteArray = function() {
+      return _bytes;
+    };
+
+    _this.toString = function() {
+      var s = '';
+      s += '[';
+      for (var i = 0; i < _bytes.length; i += 1) {
+        if (i > 0) {
+          s += ',';
+        }
+        s += _bytes[i];
+      }
+      s += ']';
+      return s;
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // base64EncodeOutputStream
+  //---------------------------------------------------------------------
+
+  var base64EncodeOutputStream = function() {
+
+    var _buffer = 0;
+    var _buflen = 0;
+    var _length = 0;
+    var _base64 = '';
+
+    var _this = {};
+
+    var writeEncoded = function(b) {
+      _base64 += String.fromCharCode(encode(b & 0x3f) );
+    };
+
+    var encode = function(n) {
+      if (n < 0) {
+        // error.
+      } else if (n < 26) {
+        return 0x41 + n;
+      } else if (n < 52) {
+        return 0x61 + (n - 26);
+      } else if (n < 62) {
+        return 0x30 + (n - 52);
+      } else if (n == 62) {
+        return 0x2b;
+      } else if (n == 63) {
+        return 0x2f;
+      }
+      throw 'n:' + n;
+    };
+
+    _this.writeByte = function(n) {
+
+      _buffer = (_buffer << 8) | (n & 0xff);
+      _buflen += 8;
+      _length += 1;
+
+      while (_buflen >= 6) {
+        writeEncoded(_buffer >>> (_buflen - 6) );
+        _buflen -= 6;
+      }
+    };
+
+    _this.flush = function() {
+
+      if (_buflen > 0) {
+        writeEncoded(_buffer << (6 - _buflen) );
+        _buffer = 0;
+        _buflen = 0;
+      }
+
+      if (_length % 3 != 0) {
+        // padding
+        var padlen = 3 - _length % 3;
+        for (var i = 0; i < padlen; i += 1) {
+          _base64 += '=';
+        }
+      }
+    };
+
+    _this.toString = function() {
+      return _base64;
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // base64DecodeInputStream
+  //---------------------------------------------------------------------
+
+  var base64DecodeInputStream = function(str) {
+
+    var _str = str;
+    var _pos = 0;
+    var _buffer = 0;
+    var _buflen = 0;
+
+    var _this = {};
+
+    _this.read = function() {
+
+      while (_buflen < 8) {
+
+        if (_pos >= _str.length) {
+          if (_buflen == 0) {
+            return -1;
+          }
+          throw 'unexpected end of file./' + _buflen;
+        }
+
+        var c = _str.charAt(_pos);
+        _pos += 1;
+
+        if (c == '=') {
+          _buflen = 0;
+          return -1;
+        } else if (c.match(/^\s$/) ) {
+          // ignore if whitespace.
+          continue;
+        }
+
+        _buffer = (_buffer << 6) | decode(c.charCodeAt(0) );
+        _buflen += 6;
+      }
+
+      var n = (_buffer >>> (_buflen - 8) ) & 0xff;
+      _buflen -= 8;
+      return n;
+    };
+
+    var decode = function(c) {
+      if (0x41 <= c && c <= 0x5a) {
+        return c - 0x41;
+      } else if (0x61 <= c && c <= 0x7a) {
+        return c - 0x61 + 26;
+      } else if (0x30 <= c && c <= 0x39) {
+        return c - 0x30 + 52;
+      } else if (c == 0x2b) {
+        return 62;
+      } else if (c == 0x2f) {
+        return 63;
+      } else {
+        throw 'c:' + c;
+      }
+    };
+
+    return _this;
+  };
+
+  //---------------------------------------------------------------------
+  // gifImage (B/W)
+  //---------------------------------------------------------------------
+
+  var gifImage = function(width, height) {
+
+    var _width = width;
+    var _height = height;
+    var _data = new Array(width * height);
+
+    var _this = {};
+
+    _this.setPixel = function(x, y, pixel) {
+      _data[y * _width + x] = pixel;
+    };
+
+    _this.write = function(out) {
+
+      //---------------------------------
+      // GIF Signature
+
+      out.writeString('GIF87a');
+
+      //---------------------------------
+      // Screen Descriptor
+
+      out.writeShort(_width);
+      out.writeShort(_height);
+
+      out.writeByte(0x80); // 2bit
+      out.writeByte(0);
+      out.writeByte(0);
+
+      //---------------------------------
+      // Global Color Map
+
+      // black
+      out.writeByte(0x00);
+      out.writeByte(0x00);
+      out.writeByte(0x00);
+
+      // white
+      out.writeByte(0xff);
+      out.writeByte(0xff);
+      out.writeByte(0xff);
+
+      //---------------------------------
+      // Image Descriptor
+
+      out.writeString(',');
+      out.writeShort(0);
+      out.writeShort(0);
+      out.writeShort(_width);
+      out.writeShort(_height);
+      out.writeByte(0);
+
+      //---------------------------------
+      // Local Color Map
+
+      //---------------------------------
+      // Raster Data
+
+      var lzwMinCodeSize = 2;
+      var raster = getLZWRaster(lzwMinCodeSize);
+
+      out.writeByte(lzwMinCodeSize);
+
+      var offset = 0;
+
+      while (raster.length - offset > 255) {
+        out.writeByte(255);
+        out.writeBytes(raster, offset, 255);
+        offset += 255;
+      }
+
+      out.writeByte(raster.length - offset);
+      out.writeBytes(raster, offset, raster.length - offset);
+      out.writeByte(0x00);
+
+      //---------------------------------
+      // GIF Terminator
+      out.writeString(';');
+    };
+
+    var bitOutputStream = function(out) {
+
+      var _out = out;
+      var _bitLength = 0;
+      var _bitBuffer = 0;
+
+      var _this = {};
+
+      _this.write = function(data, length) {
+
+        if ( (data >>> length) != 0) {
+          throw 'length over';
+        }
+
+        while (_bitLength + length >= 8) {
+          _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) );
+          length -= (8 - _bitLength);
+          data >>>= (8 - _bitLength);
+          _bitBuffer = 0;
+          _bitLength = 0;
+        }
+
+        _bitBuffer = (data << _bitLength) | _bitBuffer;
+        _bitLength = _bitLength + length;
+      };
+
+      _this.flush = function() {
+        if (_bitLength > 0) {
+          _out.writeByte(_bitBuffer);
+        }
+      };
+
+      return _this;
+    };
+
+    var getLZWRaster = function(lzwMinCodeSize) {
+
+      var clearCode = 1 << lzwMinCodeSize;
+      var endCode = (1 << lzwMinCodeSize) + 1;
+      var bitLength = lzwMinCodeSize + 1;
+
+      // Setup LZWTable
+      var table = lzwTable();
+
+      for (var i = 0; i < clearCode; i += 1) {
+        table.add(String.fromCharCode(i) );
+      }
+      table.add(String.fromCharCode(clearCode) );
+      table.add(String.fromCharCode(endCode) );
+
+      var byteOut = byteArrayOutputStream();
+      var bitOut = bitOutputStream(byteOut);
+
+      // clear code
+      bitOut.write(clearCode, bitLength);
+
+      var dataIndex = 0;
+
+      var s = String.fromCharCode(_data[dataIndex]);
+      dataIndex += 1;
+
+      while (dataIndex < _data.length) {
+
+        var c = String.fromCharCode(_data[dataIndex]);
+        dataIndex += 1;
+
+        if (table.contains(s + c) ) {
+
+          s = s + c;
+
+        } else {
+
+          bitOut.write(table.indexOf(s), bitLength);
+
+          if (table.size() < 0xfff) {
+
+            if (table.size() == (1 << bitLength) ) {
+              bitLength += 1;
+            }
+
+            table.add(s + c);
+          }
+
+          s = c;
+        }
+      }
+
+      bitOut.write(table.indexOf(s), bitLength);
+
+      // end code
+      bitOut.write(endCode, bitLength);
+
+      bitOut.flush();
+
+      return byteOut.toByteArray();
+    };
+
+    var lzwTable = function() {
+
+      var _map = {};
+      var _size = 0;
+
+      var _this = {};
+
+      _this.add = function(key) {
+        if (_this.contains(key) ) {
+          throw 'dup key:' + key;
+        }
+        _map[key] = _size;
+        _size += 1;
+      };
+
+      _this.size = function() {
+        return _size;
+      };
+
+      _this.indexOf = function(key) {
+        return _map[key];
+      };
+
+      _this.contains = function(key) {
+        return typeof _map[key] != 'undefined';
+      };
+
+      return _this;
+    };
+
+    return _this;
+  };
+
+  var createDataURL = function(width, height, getPixel) {
+    var gif = gifImage(width, height);
+    for (var y = 0; y < height; y += 1) {
+      for (var x = 0; x < width; x += 1) {
+        gif.setPixel(x, y, getPixel(x, y) );
+      }
+    }
+
+    var b = byteArrayOutputStream();
+    gif.write(b);
+
+    var base64 = base64EncodeOutputStream();
+    var bytes = b.toByteArray();
+    for (var i = 0; i < bytes.length; i += 1) {
+      base64.writeByte(bytes[i]);
+    }
+    base64.flush();
+
+    return 'data:image/gif;base64,' + base64;
+  };
+
+  //---------------------------------------------------------------------
+  // returns qrcode function.
+
+  return qrcode;
+}();
+
+// multibyte support
+!function() {
+
+  qrcode.stringToBytesFuncs['UTF-8'] = function(s) {
+    // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array
+    function toUTF8Array(str) {
+      var utf8 = [];
+      for (var i=0; i < str.length; i++) {
+        var charcode = str.charCodeAt(i);
+        if (charcode < 0x80) utf8.push(charcode);
+        else if (charcode < 0x800) {
+          utf8.push(0xc0 | (charcode >> 6),
+              0x80 | (charcode & 0x3f));
+        }
+        else if (charcode < 0xd800 || charcode >= 0xe000) {
+          utf8.push(0xe0 | (charcode >> 12),
+              0x80 | ((charcode>>6) & 0x3f),
+              0x80 | (charcode & 0x3f));
+        }
+        // surrogate pair
+        else {
+          i++;
+          // UTF-16 encodes 0x10000-0x10FFFF by
+          // subtracting 0x10000 and splitting the
+          // 20 bits of 0x0-0xFFFFF into two halves
+          charcode = 0x10000 + (((charcode & 0x3ff)<<10)
+            | (str.charCodeAt(i) & 0x3ff));
+          utf8.push(0xf0 | (charcode >>18),
+              0x80 | ((charcode>>12) & 0x3f),
+              0x80 | ((charcode>>6) & 0x3f),
+              0x80 | (charcode & 0x3f));
+        }
+      }
+      return utf8;
+    }
+    return toUTF8Array(s);
+  };
+
+}();
+
+(function (factory) {
+  if (typeof define === 'function' && define.amd) {
+      define([], factory);
+  } else if (typeof exports === 'object') {
+      module.exports = factory();
+  }
+}(function () {
+    return qrcode;
+}));
+
 /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
-function(e){"use strict";function t(e){return parseInt(e)===e}function n(e){if(!t(e.length))return!1;for(var n=0;n<e.length;n++)if(!t(e[n])||e[n]<0||e[n]>255)return!1;return!0}function r(e,r){if(e.buffer&&"Uint8Array"===e.name)return r&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(t(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var a,s={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n<e.length;){var i=e.charCodeAt(n++);37===i?(t.push(parseInt(e.substr(n,2),16)),n+=2):t.push(i)}return r(t)},fromBytes:function(e){for(var t=[],n=0;n<e.length;){var r=e[n];r<128?(t.push(String.fromCharCode(r)),n++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},l=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},fromBytes:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(a[(240&r)>>4]+a[15&r])}return t.join("")}}),u={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],_=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],b=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],L=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],M=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function x(e){for(var t=[],n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var S=function(e){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:r(e,!0)}),this._prepare()};S.prototype._prepare=function(){var e=u[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,r=4*(e+1),i=this.key.length/4,o=x(this.key);for(t=0;t<i;t++)n=t>>2,this._Ke[n][t%4]=o[t],this._Kd[e-n][t%4]=o[t];for(var a,s=0,l=i;l<r;){if(a=o[i-1],o[0]^=d[a>>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^c[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];for(a=o[i/2-1],o[i/2]^=d[255&a]^d[a>>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24,t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&l<r;)h=l>>2,f=l%4,this._Ke[h][f]=o[t],this._Kd[e-h][f]=o[t++],l++}for(var h=1;h<e;h++)for(var f=0;f<4;f++)a=this._Kd[h][f],this._Kd[h][f]=w[a>>24&255]^L[a>>16&255]^M[a>>8&255]^k[255&a]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=x(e),o=0;o<4;o++)r[o]^=this._Ke[0][o];for(var a=1;a<t;a++){for(o=0;o<4;o++)n[o]=f[r[o]>>24&255]^p[r[(o+1)%4]>>16&255]^m[r[(o+2)%4]>>8&255]^g[255&r[(o+3)%4]]^this._Ke[a][o];r=n.slice()}var s,l=i(16);for(o=0;o<4;o++)s=this._Ke[t][o],l[4*o]=255&(d[r[o]>>24&255]^s>>24),l[4*o+1]=255&(d[r[(o+1)%4]>>16&255]^s>>16),l[4*o+2]=255&(d[r[(o+2)%4]>>8&255]^s>>8),l[4*o+3]=255&(d[255&r[(o+3)%4]]^s);return l},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=x(e),o=0;o<4;o++)r[o]^=this._Kd[0][o];for(var a=1;a<t;a++){for(o=0;o<4;o++)n[o]=v[r[o]>>24&255]^_[r[(o+3)%4]>>16&255]^y[r[(o+2)%4]>>8&255]^b[255&r[(o+1)%4]]^this._Kd[a][o];r=n.slice()}var s,l=i(16);for(o=0;o<4;o++)s=this._Kd[t][o],l[4*o]=255&(h[r[o]>>24&255]^s>>24),l[4*o+1]=255&(h[r[(o+3)%4]>>16&255]^s>>16),l[4*o+2]=255&(h[r[(o+2)%4]>>8&255]^s>>8),l[4*o+3]=255&(h[255&r[(o+1)%4]]^s);return l};var T=function(e){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(e)};T.prototype.encrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),n=i(16),a=0;a<e.length;a+=16)o(e,n,0,a,a+16),o(n=this._aes.encrypt(n),t,a);return t},T.prototype.decrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=i(e.length),n=i(16),a=0;a<e.length;a+=16)o(e,n,0,a,a+16),o(n=this._aes.decrypt(n),t,a);return t};var $=function(e,t){if(!(this instanceof $))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=i(16);this._lastCipherblock=r(t,!0),this._aes=new S(e)};$.prototype.encrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),n=i(16),a=0;a<e.length;a+=16){o(e,n,0,a,a+16);for(var s=0;s<16;s++)n[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(n),o(this._lastCipherblock,t,a)}return t},$.prototype.decrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=i(e.length),n=i(16),a=0;a<e.length;a+=16){o(e,n,0,a,a+16),n=this._aes.decrypt(n);for(var s=0;s<16;s++)t[a+s]=n[s]^this._lastCipherblock[s];o(e,this._lastCipherblock,0,a,a+16)}return t};var D=function(e,t,n){if(!(this instanceof D))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=i(16);n||(n=1),this.segmentSize=n,this._shiftRegister=r(t,!0),this._aes=new S(e)};D.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,n=r(e,!0),i=0;i<n.length;i+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[i+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(n,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return n},D.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,n=r(e,!0),i=0;i<n.length;i+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[i+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return n};var C=function(e,t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=i(16);this._lastPrecipher=r(t,!0),this._lastPrecipherIndex=16,this._aes=new S(e)};C.prototype.encrypt=function(e){for(var t=r(e,!0),n=0;n<t.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},C.prototype.decrypt=C.prototype.encrypt;var E=function(e){if(!(this instanceof E))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=i(16),this.setValue(e)):this.setBytes(e)};E.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},E.prototype.setBytes=function(e){if(16!=(e=r(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},E.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var A=function(e,t){if(!(this instanceof A))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof E||(t=new E(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(e)};A.prototype.encrypt=function(e){for(var t=r(e,!0),n=0;n<t.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[n]^=this._remainingCounter[this._remainingCounterIndex++];return t},A.prototype.decrypt=A.prototype.encrypt;var P={AES:S,Counter:E,ModeOfOperation:{ecb:T,cbc:$,cfb:D,ofb:C,ctr:A},utils:{hex:l,utf8:s},padding:{pkcs7:{pad:function(e){var t=16-(e=r(e,!0)).length%16,n=i(e.length+t);o(e,n);for(var a=e.length;a<n.length;a++)n[a]=t;return n},strip:function(e){if((e=r(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,a=0;a<t;a++)if(e[n+a]!==t)throw new Error("PKCS#7 invalid padding byte");var s=i(n);return o(e,s,0,0,n),s}}},_arrayTest:{coerceArray:r,createArray:i,copyArray:o}};"undefined"!=typeof exports?module.exports=P:"function"==typeof define&&define.amd?define([],(function(){return P})):(e.aesjs&&(P._aesjs=e.aesjs),e.aesjs=P)}(this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,(function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,r){return St(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var n=h(e),r=t.call(n.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&r);if(e._strict&&(i=i&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function p(e){var t=d(NaN);return null!=e?c(h(t),e):h(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var m=n.momentProperties=[];function g(e,t){var n,r,i;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=h(t)),o(t._locale)||(e._locale=t._locale),0<m.length)for(n=0;n<m.length;n++)o(i=t[r=m[n]])||(e[r]=i);return e}var v=!1;function _(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function y(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(t)),n}function L(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&a++;return a+o}function M(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var r=!0;return c((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){for(var i,o=[],a=0;a<arguments.length;a++){if(i="","object"==typeof arguments[a]){for(var s in i+="\n["+a+"] ",arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[a];o.push(i)}M(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var x,S={};function T(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),S[e]||(M(t),S[e]=!0)}function $(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,r=c({},e);for(n in t)u(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},c(r[n],e[n]),c(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)u(e,n)&&!u(t,n)&&i(e[n])&&(r[n]=c({},r[n]));return r}function C(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n};var E={};function A(e,t){var n=e.toLowerCase();E[n]=E[n+"s"]=E[t]=e}function P(e){return"string"==typeof e?E[e]||E[e.toLowerCase()]:void 0}function Y(e){var t,n,r={};for(n in e)u(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var O={};function I(e,t){O[e]=t}function j(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},R={};function z(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return j(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=V(t,e.localeData()),N[t]=N[t]||function(e){var t,n,r,i=e.match(B);for(t=0,n=i.length;t<n;t++)R[i[t]]?i[t]=R[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=$(i[r])?i[r].call(t,e):i[r];return o}}(t),N[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(H.lastIndex=0;0<=n&&H.test(e);)e=e.replace(H,r),H.lastIndex=0,n-=1;return e}var W=/\d/,U=/\d\d/,q=/\d{3}/,G=/\d{4}/,Z=/[+-]?\d{6}/,J=/\d\d?/,X=/\d\d\d\d?/,K=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,re=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,se={};function le(e,t,n){se[e]=$(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return u(se,e)?se[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),a(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)de[e[n]]=r}function fe(e,t){he(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}var pe=0,me=1,ge=2,ve=3,_e=4,ye=5,be=6,we=7,Le=8;function Me(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}z("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),z(0,["YY",2],0,(function(){return this.year()%100})),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),A("year","y"),I("year",1),le("Y",re),le("YY",J,U),le("YYYY",ee,G),le("YYYYY",te,Z),le("YYYYYY",te,Z),he(["YYYYY","YYYYYY"],pe),he("YYYY",(function(e,t){t[pe]=2===e.length?n.parseTwoDigitYear(e):w(e)})),he("YY",(function(e,t){t[pe]=n.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[pe]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return w(e)+(68<w(e)?1900:2e3)};var xe,Se=Te("FullYear",!0);function Te(e,t){return function(r){return null!=r?(De(this,e,r),n.updateOffset(this,t),this):$e(this,e)}}function $e(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ke(e)?29:28:31-n%7%2}xe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},z("M",["MM",2],"Mo",(function(){return this.month()+1})),z("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),z("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),A("month","M"),I("month",8),le("M",J),le("MM",J,U),le("MMM",(function(e,t){return t.monthsShortRegex(e)})),le("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[me]=w(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[me]=i:h(n).invalidMonth=e}));var Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(!a(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Oe(e){return null!=e?(Ye(this,e),n.updateOffset(this,!0),this):$e(this,"Month")}var Ie=ae,je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=d([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=ce(r[t]),i[t]=ce(i[t]);for(t=0;t<24;t++)o[t]=ce(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function He(e){var t;if(e<100&&0<=e){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ne(e,t,n){var r=7+t-n;return-(7+He(e,0,r).getUTCDay()-t)%7+r-1}function Re(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Ne(e,r,i);return a=s<=0?Me(o=e-1)+s:s>Me(e)?(o=e+1,s-Me(e)):(o=e,s),{year:o,dayOfYear:a}}function ze(e,t,n){var r,i,o=Ne(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Fe(i=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Fe(e,t,n){var r=Ne(e,t,n),i=Ne(e+1,t,n);return(Me(e)-r+i)/7}function Ve(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),I("week",5),I("isoWeek",5),le("w",J),le("ww",J,U),le("W",J),le("WW",J,U),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=w(e)})),z("d",0,"do","day"),z("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),z("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),z("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),le("d",J),le("e",J),le("E",J),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,n,r){t[r]=w(e)}));var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ge=ae,Ze=ae,Je=ae;function Xe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=ce(s[t]),l[t]=ce(l[t]),u[t]=ce(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Qe(e,t){z(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function et(e,t){return t._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Ke),z("k",["kk",2],0,(function(){return this.hours()||24})),z("hmm",0,0,(function(){return""+Ke.apply(this)+j(this.minutes(),2)})),z("hmmss",0,0,(function(){return""+Ke.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),z("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),z("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),A("hour","h"),I("hour",13),le("a",et),le("A",et),le("H",J),le("h",J),le("k",J),le("HH",J,U),le("hh",J,U),le("kk",J,U),le("hmm",X),le("hmmss",K),le("Hmm",X),le("Hmmss",K),he(["H","HH"],ve),he(["k","kk"],(function(e,t,n){var r=w(e);t[ve]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[ve]=w(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[ve]=w(e.substr(0,r)),t[_e]=w(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ve]=w(e.substr(0,r)),t[_e]=w(e.substr(r,2)),t[ye]=w(e.substr(i)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[ve]=w(e.substr(0,r)),t[_e]=w(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ve]=w(e.substr(0,r)),t[_e]=w(e.substr(r,2)),t[ye]=w(e.substr(i))}));var tt,nt=Te("Hours",!0),rt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ae,monthsShort:Pe,week:{dow:0,doy:6},weekdays:We,weekdaysMin:qe,weekdaysShort:Ue,meridiemParse:/[ap]\.?m?\.?/i},it={},ot={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function st(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),lt(t)}catch(e){}return it[e]}function lt(e,t){var n;return e&&((n=o(t)?ct(e):ut(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function ut(e,t){if(null===t)return delete it[e],null;var n,r=rt;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])r=it[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return ot[t.parentLocale]||(ot[t.parentLocale]=[]),ot[t.parentLocale].push({name:e,config:t}),null;r=n._config}return it[e]=new C(D(r,t)),ot[e]&&ot[e].forEach((function(e){ut(e.name,e.config)})),lt(e),it[e]}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!r(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=at(e[o]).split("-")).length,n=(n=at(e[o+1]))?n.split("-"):null;0<t;){if(r=st(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(i,n,!0)>=t-1)break;t--}o++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[me]<0||11<n[me]?me:n[ge]<1||n[ge]>Ce(n[pe],n[me])?ge:n[ve]<0||24<n[ve]||24===n[ve]&&(0!==n[_e]||0!==n[ye]||0!==n[be])?ve:n[_e]<0||59<n[_e]?_e:n[ye]<0||59<n[ye]?ye:n[be]<0||999<n[be]?be:-1,h(e)._overflowDayOfYear&&(t<pe||ge<t)&&(t=ge),h(e)._overflowWeeks&&-1===t&&(t=we),h(e)._overflowWeekday&&-1===t&&(t=Le),h(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ft(e){var t,r,i,o,a,s=[];if(!e._d){var l,u;for(l=e,u=new Date(n.now()),i=l._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ge]&&null==e._a[me]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=ht(t.GG,e._a[pe],ze(Tt(),1,4).year),r=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=ze(Tt(),o,a);n=ht(t.gg,e._a[pe],u.year),r=ht(t.w,u.week),null!=t.d?((i=t.d)<0||6<i)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||6<t.e)&&(l=!0)):i=o}r<1||r>Fe(n,o,a)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=Re(n,r,i,o,a),e._a[pe]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=ht(e._a[pe],i[pe]),(e._dayOfYear>Me(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),r=He(a,0,e._dayOfYear),e._a[me]=r.getUTCMonth(),e._a[ge]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[_e]&&0===e._a[ye]&&0===e._a[be]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?He:function(e,t,n,r,i,o,a){var s;return e<100&&0<=e?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var pt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,vt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_t=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yt=/^\/?Date\((\-?\d+)/i;function bt(e){var t,n,r,i,o,a,s=e._i,l=pt.exec(s)||mt.exec(s);if(l){for(h(e).iso=!0,t=0,n=vt.length;t<n;t++)if(vt[t][1].exec(l[1])){i=vt[t][0],r=!1!==vt[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=_t.length;t<n;t++)if(_t[t][1].exec(l[3])){o=(l[2]||" ")+_t[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!gt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Lt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mt(e){var t,n,r,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var o=function(e,t,n,r,i,o){var a=[function(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}(e),Pe.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=o,r=e,(t=i[1])&&Ue.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(h(r).weekdayMismatch=!0,!(r._isValid=!1)))return;e._a=o,e._tzm=function(e,t,n){if(e)return Lt[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],h(e).empty=!0;var t,r,i,o,a,s,l,c,d=""+e._i,f=d.length,p=0;for(i=V(e._f,e._locale).match(B)||[],t=0;t<i.length;t++)o=i[t],(r=(d.match(ue(o,e))||[])[0])&&(0<(a=d.substr(0,d.indexOf(r))).length&&h(e).unusedInput.push(a),d=d.slice(d.indexOf(r)+r.length),p+=r.length),R[o]?(r?h(e).empty=!1:h(e).unusedTokens.push(o),s=o,c=e,null!=(l=r)&&u(de,s)&&de[s](l,c._a,c,s)):e._strict&&!r&&h(e).unusedTokens.push(o);h(e).charsLeftOver=f-p,0<d.length&&h(e).unusedInput.push(d),e._a[ve]<=12&&!0===h(e).bigHour&&0<e._a[ve]&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(e._locale,e._a[ve],e._meridiem),ft(e),dt(e)}else Mt(e);else bt(e)}function xt(e){var t,u,d,m,v=e._i,b=e._f;return e._locale=e._locale||ct(e._l),null===v||void 0===b&&""===v?p({nullInput:!0}):("string"==typeof v&&(e._i=v=e._locale.preparse(v)),y(v)?new _(dt(v)):(s(v)?e._d=v:r(b)?function(e){var t,n,r,i,o;if(0===e._f.length)return h(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)o=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),f(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));c(e,n||t)}(e):b?kt(e):o(u=(t=e)._i)?t._d=new Date(n.now()):s(u)?t._d=new Date(u.valueOf()):"string"==typeof u?(d=t,null===(m=yt.exec(d._i))?(bt(d),!1===d._isValid&&(delete d._isValid,Mt(d),!1===d._isValid&&(delete d._isValid,n.createFromInputFallback(d)))):d._d=new Date(+m[1])):r(u)?(t._a=l(u.slice(0),(function(e){return parseInt(e,10)})),ft(t)):i(u)?function(e){if(!e._d){var t=Y(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ft(e)}}(t):a(u)?t._d=new Date(u):n.createFromInputFallback(t),f(e)||(e._d=null),e))}function St(e,t,n,o,a){var s,l={};return!0!==n&&!1!==n||(o=n,n=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=o,(s=new _(dt(xt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return St(e,t,n,r,!1)}n.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var $t=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()})),Dt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:p()}));function Ct(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Et=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=Y(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===xe.call(Et,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Et.length;++r)if(e[Et[r]]){if(n)return!1;parseFloat(e[Et[r]])!==w(e[Et[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=ct(),this._bubble()}function Pt(e){return e instanceof At}function Yt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ot(e,t){z(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+j(~~(e/60),2)+t+j(~~e%60,2)}))}Ot("Z",":"),Ot("ZZ",""),le("Z",oe),le("ZZ",oe),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=jt(oe,e)}));var It=/([\+\-]|\d\d)/gi;function jt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(It)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Bt(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(y(e)||s(e)?e.valueOf():Tt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Tt(e).local()}function Ht(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Nt(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Rt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ft(e,t){var n,r,i,o=e,s=null;return Pt(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:a(e)?(o={},t?o[t]=e:o.milliseconds=e):(s=Rt.exec(e))?(n="-"===s[1]?-1:1,o={y:0,d:w(s[ge])*n,h:w(s[ve])*n,m:w(s[_e])*n,s:w(s[ye])*n,ms:w(Yt(1e3*s[be]))*n}):(s=zt.exec(e))?(n="-"===s[1]?-1:1,o={y:Vt(s[2],n),M:Vt(s[3],n),w:Vt(s[4],n),d:Vt(s[5],n),h:Vt(s[6],n),m:Vt(s[7],n),s:Vt(s[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=function(e,t){var n;return e.isValid()&&t.isValid()?(t=Bt(t,e),e.isBefore(t)?n=Wt(e,t):((n=Wt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(Tt(o.from),Tt(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new At(o),Pt(e)&&u(e,"_locale")&&(r._locale=e._locale),r}function Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),qt(this,Ft(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,r,i){var o=t._milliseconds,a=Yt(t._days),s=Yt(t._months);e.isValid()&&(i=null==i||i,s&&Ye(e,$e(e,"Month")+s*r),a&&De(e,"Date",$e(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}Ft.fn=At.prototype,Ft.invalid=function(){return Ft(NaN)};var Gt=Ut(1,"add"),Zt=Ut(-1,"subtract");function Jt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ct(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Kt=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Qt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function rn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function on(e,t){z(0,[e,e.length],0,t)}function an(e,t,n,r,i){var o;return null==e?ze(this,r,i).year:((o=Fe(e,r,i))<t&&(t=o),function(e,t,n,r,i){var o=Re(e,t,n,r,i),a=He(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}z(0,["gg",2],0,(function(){return this.weekYear()%100})),z(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),le("G",re),le("g",re),le("GG",J,U),le("gg",J,U),le("GGGG",ee,G),le("gggg",ee,G),le("GGGGG",te,Z),le("ggggg",te,Z),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=w(e)})),fe(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),z("Q",0,"Qo","quarter"),A("quarter","Q"),I("quarter",7),le("Q",W),he("Q",(function(e,t){t[me]=3*(w(e)-1)})),z("D",["DD",2],"Do","date"),A("date","D"),I("date",9),le("D",J),le("DD",J,U),le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],ge),he("Do",(function(e,t){t[ge]=w(e.match(J)[0])}));var sn=Te("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),I("dayOfYear",4),le("DDD",Q),le("DDDD",q),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=w(e)})),z("m",["mm",2],0,"minute"),A("minute","m"),I("minute",14),le("m",J),le("mm",J,U),he(["m","mm"],_e);var ln=Te("Minutes",!1);z("s",["ss",2],0,"second"),A("second","s"),I("second",15),le("s",J),le("ss",J,U),he(["s","ss"],ye);var un,cn=Te("Seconds",!1);for(z("S",0,0,(function(){return~~(this.millisecond()/100)})),z(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),z(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),z(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),z(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),z(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),z(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),I("millisecond",16),le("S",Q,W),le("SS",Q,U),le("SSS",Q,q),un="SSSS";un.length<=9;un+="S")le(un,ne);function dn(e,t){t[be]=w(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")he(un,dn);var hn=Te("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var fn=_.prototype;function pn(e){return e}fn.add=Gt,fn.calendar=function(e,t){var r=e||Tt(),i=Bt(r,this).startOf("day"),o=n.calendarFormat(this,i)||"sameElse",a=t&&($(t[o])?t[o].call(this,r):t[o]);return this.format(a||this.localeData().calendar(o,this,Tt(r)))},fn.clone=function(){return new _(this)},fn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Bt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":o=Jt(this,r)/12;break;case"month":o=Jt(this,r);break;case"quarter":o=Jt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:b(o)},fn.endOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?rn:nn;switch(e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(y(e)&&e.isValid()||Tt(e).isValid())?Ft({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Tt(),e)},fn.to=function(e,t){return this.isValid()&&(y(e)&&e.isValid()||Tt(e).isValid())?Ft({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Tt(),e)},fn.get=function(e){return $(this[e=P(e)])?this[e]():this},fn.invalidAt=function(){return h(this).overflow},fn.isAfter=function(e,t){var n=y(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=y(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){var i=y(e)?e:Tt(e),o=y(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))},fn.isSame=function(e,t){var n,r=y(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return f(this)},fn.lang=Kt,fn.locale=Xt,fn.localeData=Qt,fn.max=Dt,fn.min=$t,fn.parsingFlags=function(){return c({},h(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:O[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=Y(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if($(this[e=P(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?rn:nn;switch(e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3)}return this._d.setTime(t),n.updateOffset(this,!0),this},fn.subtract=Zt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Se,fn.isLeapYear=function(){return ke(this.year())},fn.weekYear=function(e){return an.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return an.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Oe,fn.daysInMonth=function(){return Ce(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},fn.date=sn,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-r,"d")):r},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,r=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?r:r-7)},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=nt,fn.minute=fn.minutes=ln,fn.second=fn.seconds=cn,fn.millisecond=fn.milliseconds=hn,fn.utcOffset=function(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?o:Ht(this);if("string"==typeof e){if(null===(e=jt(oe,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=Ht(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?qt(this,Ft(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=jt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Nt,fn.isUTC=Nt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=k("dates accessor is deprecated. Use date instead.",sn),fn.months=k("months accessor is deprecated. Use month instead",Oe),fn.years=k("years accessor is deprecated. Use year instead",Se),fn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=xt(e))._a){var t=e._isUTC?d(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<L(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var mn=C.prototype;function gn(e,t,n,r){var i=ct(),o=d().set(r,t);return i[n](o,e)}function vn(e,t,n){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return gn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=gn(e,r,n,"month");return i}function _n(e,t,n,r){"boolean"==typeof e?a(t)&&(n=t,t=void 0):(t=e,e=!1,a(n=t)&&(n=t,t=void 0)),t=t||"";var i,o=ct(),s=e?o._week.dow:0;if(null!=n)return gn(t,(n+s)%7,r,"day");var l=[];for(i=0;i<7;i++)l[i]=gn(t,(i+s)%7,r,"day");return l}mn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return $(r)?r.call(t,n):r},mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(e){return this._ordinal.replace("%d",e)},mn.preparse=pn,mn.postformat=pn,mn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return $(i)?i(e,t,n,r):i.replace(/%d/i,e)},mn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return $(n)?n(t):n.replace(/%s/i,t)},mn.set=function(e){var t,n;for(n in e)$(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone},mn.monthsShort=function(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=xe.call(this._shortMonthsParse,a))?i:null:-1!==(i=xe.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=xe.call(this._shortMonthsParse,a))?i:-1!==(i=xe.call(this._longMonthsParse,a))?i:null:-1!==(i=xe.call(this._longMonthsParse,a))?i:-1!==(i=xe.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},mn.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Be.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Be.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=Ie),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ve(n,this._week.dow):e?n[e.day()]:n},mn.weekdaysMin=function(e){return!0===e?Ve(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},mn.weekdaysShort=function(e){return!0===e?Ve(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},mn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=xe.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=xe.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=xe.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=xe.call(this._weekdaysParse,a))?i:-1!==(i=xe.call(this._shortWeekdaysParse,a))?i:-1!==(i=xe.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=xe.call(this._shortWeekdaysParse,a))?i:-1!==(i=xe.call(this._weekdaysParse,a))?i:-1!==(i=xe.call(this._minWeekdaysParse,a))?i:null:-1!==(i=xe.call(this._minWeekdaysParse,a))?i:-1!==(i=xe.call(this._weekdaysParse,a))?i:-1!==(i=xe.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},mn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},lt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=k("moment.lang is deprecated. Use moment.locale instead.",lt),n.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ct);var yn=Math.abs;function bn(e,t,n,r){var i=Ft(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function wn(e){return e<0?Math.floor(e):Math.ceil(e)}function Ln(e){return 4800*e/146097}function Mn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}var xn=kn("ms"),Sn=kn("s"),Tn=kn("m"),$n=kn("h"),Dn=kn("d"),Cn=kn("w"),En=kn("M"),An=kn("Q"),Pn=kn("y");function Yn(e){return function(){return this.isValid()?this._data[e]:NaN}}var On=Yn("milliseconds"),In=Yn("seconds"),jn=Yn("minutes"),Bn=Yn("hours"),Hn=Yn("days"),Nn=Yn("months"),Rn=Yn("years"),zn=Math.round,Fn={ss:44,s:45,m:45,h:22,d:26,M:11},Vn=Math.abs;function Wn(e){return(0<e)-(e<0)||+e}function Un(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),i=Vn(this._months);t=b((e=b(n/60))/60),n%=60,e%=60;var o=b(i/12),a=i%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",f=Wn(this._months)!==Wn(d)?"-":"",p=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return h+"P"+(o?f+o+"Y":"")+(a?f+a+"M":"")+(s?p+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var qn=At.prototype;qn.isValid=function(){return this._isValid},qn.abs=function(){var e=this._data;return this._milliseconds=yn(this._milliseconds),this._days=yn(this._days),this._months=yn(this._months),e.milliseconds=yn(e.milliseconds),e.seconds=yn(e.seconds),e.minutes=yn(e.minutes),e.hours=yn(e.hours),e.months=yn(e.months),e.years=yn(e.years),this},qn.add=function(e,t){return bn(this,e,t,1)},qn.subtract=function(e,t){return bn(this,e,t,-1)},qn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ln(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Mn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},qn.asMilliseconds=xn,qn.asSeconds=Sn,qn.asMinutes=Tn,qn.asHours=$n,qn.asDays=Dn,qn.asWeeks=Cn,qn.asMonths=En,qn.asQuarters=An,qn.asYears=Pn,qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},qn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return 0<=o&&0<=a&&0<=s||o<=0&&a<=0&&s<=0||(o+=864e5*wn(Mn(s)+a),s=a=0),l.milliseconds=o%1e3,e=b(o/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,s+=i=b(Ln(a+=b(n/24))),a-=wn(Mn(i)),r=b(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},qn.clone=function(){return Ft(this)},qn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},qn.milliseconds=On,qn.seconds=In,qn.minutes=jn,qn.hours=Bn,qn.days=Hn,qn.weeks=function(){return b(this.days()/7)},qn.months=Nn,qn.years=Rn,qn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,r,i,o,a,s,l,u,c,d=this.localeData(),h=(t=!e,n=d,r=Ft(this).abs(),i=zn(r.as("s")),o=zn(r.as("m")),a=zn(r.as("h")),s=zn(r.as("d")),l=zn(r.as("M")),u=zn(r.as("y")),(c=i<=Fn.ss&&["s",i]||i<Fn.s&&["ss",i]||o<=1&&["m"]||o<Fn.m&&["mm",o]||a<=1&&["h"]||a<Fn.h&&["hh",a]||s<=1&&["d"]||s<Fn.d&&["dd",s]||l<=1&&["M"]||l<Fn.M&&["MM",l]||u<=1&&["y"]||["yy",u])[2]=t,c[3]=0<+this,c[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,c));return e&&(h=d.pastFuture(+this,h)),d.postformat(h)},qn.toISOString=Un,qn.toString=Un,qn.toJSON=Un,qn.locale=Xt,qn.localeData=Qt,qn.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Un),qn.lang=Kt,z("X",0,0,"unix"),z("x",0,0,"valueOf"),le("x",re),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(w(e))})),n.version="2.24.0",e=Tt,n.fn=fn,n.min=function(){return Ct("isBefore",[].slice.call(arguments,0))},n.max=function(){return Ct("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=d,n.unix=function(e){return Tt(1e3*e)},n.months=function(e,t){return vn(e,t,"months")},n.isDate=s,n.locale=lt,n.invalid=p,n.duration=Ft,n.isMoment=y,n.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},n.parseZone=function(){return Tt.apply(null,arguments).parseZone()},n.localeData=ct,n.isDuration=Pt,n.monthsShort=function(e,t){return vn(e,t,"monthsShort")},n.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},n.defineLocale=ut,n.updateLocale=function(e,t){if(null!=t){var n,r,i=rt;null!=(r=st(e))&&(i=r._config),(n=new C(t=D(i,t))).parentLocale=it[e],it[e]=n,lt(e)}else null!=it[e]&&(null!=it[e].parentLocale?it[e]=it[e].parentLocale:null!=it[e]&&delete it[e]);return it[e]},n.locales=function(){return x(it)},n.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},n.normalizeUnits=P,n.relativeTimeRounding=function(e){return void 0===e?zn:"function"==typeof e&&(zn=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==Fn[e]&&(void 0===t?Fn[e]:(Fn[e]=t,"s"===e&&(Fn.ss=t-1),!0))},n.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=fn,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),n.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}}),n.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});var Gn={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},Zn=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},Jn={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Xn=function(e){return function(t,n,r,i){var o=Zn(t),a=Jn[e][Zn(t)];return 2===o&&(a=a[n?0:1]),a.replace(/%d/i,t)}},Kn=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];n.defineLocale("ar-ly",{months:Kn,monthsShort:Kn,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:Xn("s"),ss:Xn("s"),m:Xn("m"),mm:Xn("m"),h:Xn("h"),hh:Xn("h"),d:Xn("d"),dd:Xn("d"),M:Xn("M"),MM:Xn("M"),y:Xn("y"),yy:Xn("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return Gn[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}}),n.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});var Qn={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},er={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};n.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return er[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return Qn[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}}),n.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});var tr={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},nr={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},rr=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},ir={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},or=function(e){return function(t,n,r,i){var o=rr(t),a=ir[e][rr(t)];return 2===o&&(a=a[n?0:1]),a.replace(/%d/i,t)}},ar=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];n.defineLocale("ar",{months:ar,monthsShort:ar,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:or("s"),ss:or("s"),m:or("m"),mm:or("m"),h:or("h"),hh:or("h"),d:or("d"),dd:or("d"),M:or("M"),MM:or("M"),y:or("y"),yy:or("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return nr[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return tr[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});var sr={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};function lr(e,t,n){var r,i;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?i[0]:2<=r%10&&r%10<=4&&(r%100<10||20<=r%100)?i[1]:i[2])}n.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10;return e+(sr[t]||sr[e%100-t]||sr[100<=e?100:null])},week:{dow:1,doy:7}}),n.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:lr,mm:lr,h:lr,hh:lr,d:"дзень",dd:lr,M:"месяц",MM:lr,y:"год",yy:lr},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}}),n.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":10<n&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}}),n.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var ur={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},cr={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};n.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,(function(e){return cr[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return ur[e]}))},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&4<=e||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});var dr={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},hr={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};function fr(e,t,n){var r,i,o;return e+" "+(r={mm:"munutenn",MM:"miz",dd:"devezh"}[n],2!==e?r:void 0!==(o={m:"v",b:"v",d:"z"})[(i=r).charAt(0)]?o[i.charAt(0)]+i.substring(1):i)}function pr(e,t,n){var r=e+" ";switch(n){case"ss":return r+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}n.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,(function(e){return hr[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return dr[e]}))},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&4<=e||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}}),n.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:fr,h:"un eur",hh:"%d eur",d:"un devezh",dd:fr,M:"ur miz",MM:fr,y:"ur bloaz",yy:function(e){switch(function e(t){return 9<t?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}}),n.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},
-sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:pr,m:pr,mm:pr,h:pr,hh:pr,d:"dan",dd:pr,M:"mjesec",MM:pr,y:"godinu",yy:pr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),n.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});var mr="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),gr="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),vr=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],_r=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function yr(e){return 1<e&&e<5&&1!=~~(e/10)}function br(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(yr(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(yr(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(yr(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(yr(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(yr(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(yr(e)?"roky":"let"):i+"lety"}}function wr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}function Lr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}function Mr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}n.defineLocale("cs",{months:mr,monthsShort:gr,monthsRegex:_r,monthsShortRegex:_r,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:vr,longMonthsParse:vr,shortMonthsParse:vr,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:br,ss:br,m:br,mm:br,h:br,hh:br,d:br,dd:br,M:br,MM:br,y:br,yy:br},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"рен":/\u04ab\u0443\u043b$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-мӗш",week:{dow:1,doy:7}}),n.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return 20<e?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":0<e&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}}),n.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:wr,mm:"%d Minuten",h:wr,hh:"%d Stunden",d:wr,dd:wr,M:wr,MM:wr,y:wr,yy:wr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Lr,mm:"%d Minuten",h:Lr,hh:"%d Stunden",d:Lr,dd:Lr,M:Lr,MM:Lr,y:Lr,yy:Lr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Mr,mm:"%d Minuten",h:Mr,hh:"%d Stunden",d:Mr,dd:Mr,M:Mr,MM:Mr,y:Mr,yy:Mr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var kr=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],xr=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];n.defineLocale("dv",{months:kr,monthsShort:kr,weekdays:xr,weekdaysShort:xr,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}}),n.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return 11<e?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n=this._calendarEl[e],r=t&&t.hours();return $(n)&&(n=n.apply(t)),n.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%dη",week:{dow:1,doy:4}}),n.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return 11<e?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var Sr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Tr="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),$r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Dr=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;n.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Tr[e.month()]:Sr[e.month()]:Sr},monthsRegex:Dr,monthsShortRegex:Dr,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:$r,longMonthsParse:$r,shortMonthsParse:$r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}});var Cr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Er="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Ar=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Pr=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;n.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Er[e.month()]:Cr[e.month()]:Cr},monthsRegex:Pr,monthsShortRegex:Pr,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Ar,longMonthsParse:Ar,shortMonthsParse:Ar,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:0,doy:6}});var Yr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Or="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Ir=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],jr=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;function Br(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}n.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Or[e.month()]:Yr[e.month()]:Yr},monthsRegex:jr,monthsShortRegex:jr,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Ir,longMonthsParse:Ir,shortMonthsParse:Ir,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:Br,ss:Br,m:Br,mm:Br,h:Br,hh:Br,d:Br,dd:"%d päeva",M:Br,MM:Br,y:Br,yy:Br},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Hr={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},Nr={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};n.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,(function(e){return Nr[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return Hr[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%dم",week:{dow:6,doy:12}});var Rr="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),zr=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",Rr[7],Rr[8],Rr[9]];function Fr(e,t,n,r){var i,o="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":return r?"sekunnin":"sekuntia";case"m":return r?"minuutin":"minuutti";case"mm":o=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":o=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":o=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":o=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":o=r?"vuoden":"vuotta"}return((i=e)<10?r?zr[i]:Rr[i]:i)+" "+o}n.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:Fr,ss:Fr,m:Fr,mm:Fr,h:Fr,hh:Fr,d:Fr,dd:Fr,M:Fr,MM:Fr,y:Fr,yy:Fr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),n.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}}),n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var Vr="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Wr="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");function Ur(e,t,n,r){var i={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?i[n][0]:i[n][1]}n.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Wr[e.month()]:Vr[e.month()]:Vr},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),n.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),n.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),n.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:Ur,ss:Ur,m:Ur,mm:Ur,h:Ur,hh:Ur,d:Ur,dd:Ur,M:Ur,MM:Ur,y:Ur,yy:Ur},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?12<e?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});var qr={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},Gr={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};n.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,(function(e){return Gr[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return qr[e]}))},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?10<=e?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}}),n.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}});var Zr={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Jr={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function Xr(e,t,n){var r=e+" ";switch(n){case"ss":return r+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}n.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return Jr[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return Zr[e]}))},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?10<=e?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}}),n.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:Xr,m:Xr,mm:Xr,h:Xr,hh:Xr,d:"dan",dd:Xr,M:"mjesec",MM:Xr,y:"godinu",yy:Xr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Kr="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function Qr(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function ei(e){return(e?"":"[múlt] ")+"["+Kr[this.day()]+"] LT[-kor]"}function ti(e){return e%100==11||e%10!=1}function ni(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return ti(e)?i+(t||r?"sekúndur":"sekúndum"):i+"sekúnda";case"m":return t?"mínúta":"mínútu";case"mm":return ti(e)?i+(t||r?"mínútur":"mínútum"):t?i+"mínúta":i+"mínútu";case"hh":return ti(e)?i+(t||r?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return t?"dagur":r?"dag":"degi";case"dd":return ti(e)?t?i+"dagar":i+(r?"daga":"dögum"):t?i+"dagur":i+(r?"dag":"degi");case"M":return t?"mánuður":r?"mánuð":"mánuði";case"MM":return ti(e)?t?i+"mánuðir":i+(r?"mánuði":"mánuðum"):t?i+"mánuður":i+(r?"mánuð":"mánuði");case"y":return t||r?"ár":"ári";case"yy":return ti(e)?i+(t||r?"ár":"árum"):i+(t||r?"ár":"ári")}}n.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return ei.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return ei.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:Qr,ss:Qr,m:Qr,mm:Qr,h:Qr,hh:Qr,d:Qr,dd:Qr,M:Qr,MM:Qr,y:Qr,yy:Qr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}}),n.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?11<=e?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),n.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:ni,ss:ni,m:ni,mm:ni,h:"klukkustund",hh:ni,d:ni,dd:ni,M:ni,MM:ni,y:ni,yy:ni},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()<e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),n.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?11<=e?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),n.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10ec\u10d4\u10da\u10d8)/.test(e)?e.replace(/\u10d8$/,"ში"):e+"ში"},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"ის წინ"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});var ri={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};n.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(ri[e]||ri[e%10]||ri[100<=e?100:null])},week:{dow:1,doy:7}});var ii={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},oi={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};n.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,(function(e){return oi[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return ii[e]}))},week:{dow:1,doy:4}});var ai={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},si={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};n.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,(function(e){return si[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return ai[e]}))},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?10<=e?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}}),n.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}});var li={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},ui={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},ci=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];n.defineLocale("ku",{months:ci,monthsShort:ci,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return ui[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return li[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});var di={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};function hi(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function fi(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return fi(0===t?e/10:t)}if(e<1e4){for(;10<=e;)e/=10;return fi(e)}return fi(e/=1e3)}n.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(di[e]||di[e%10]||di[100<=e?100:null])},week:{dow:1,doy:7}}),n.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return fi(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return fi(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:hi,mm:"%d Minutten",h:hi,hh:"%d Stonnen",d:hi,dd:"%d Deeg",M:hi,MM:"%d Méint",y:hi,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});var pi={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function mi(e,t,n,r){return t?vi(n)[0]:r?vi(n)[1]:vi(n)[2]}function gi(e){return e%10==0||10<e&&e<20}function vi(e){return pi[e].split("_")}function _i(e,t,n,r){var i=e+" ";return 1===e?i+mi(0,t,n[0],r):t?i+(gi(e)?vi(n)[1]:vi(n)[0]):r?i+vi(n)[1]:i+(gi(e)?vi(n)[1]:vi(n)[2])}n.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:_i,m:mi,mm:_i,h:mi,hh:_i,d:mi,dd:_i,M:mi,MM:_i,y:mi,yy:_i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var yi={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function bi(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function wi(e,t,n){return e+" "+bi(yi[n],e,t)}function Li(e,t,n){return bi(yi[n],e,t)}n.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:wi,m:Li,mm:wi,h:Li,hh:wi,d:Li,dd:wi,M:Li,MM:wi,y:Li,yy:wi},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Mi={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:2<=e&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=Mi.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+Mi.correctGrammaticalCase(e,r)}};function ki(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}n.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:Mi.translate,m:Mi.translate,mm:Mi.translate,h:Mi.translate,hh:Mi.translate,d:"dan",dd:Mi.translate,M:"mjesec",MM:Mi.translate,y:"godinu",yy:Mi.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),n.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":10<n&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}}),n.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&4<=e||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}}),n.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:ki,ss:ki,m:ki,mm:ki,h:ki,hh:ki,d:ki,dd:ki,M:ki,MM:ki,y:ki,yy:ki},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});var xi={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Si={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function Ti(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}n.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:Ti,ss:Ti,m:Ti,mm:Ti,h:Ti,hh:Ti,d:Ti,dd:Ti,M:Ti,MM:Ti,y:Ti,yy:Ti},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return Si[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return xi[e]}))},meridiemParse:/\u0930\u093e\u0924\u094d\u0930\u0940|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?10<=e?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}}),n.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?11<=e?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),n.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?11<=e?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),n.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}});var $i={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},Di={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};n.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,(function(e){return Di[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return $i[e]}))},week:{dow:1,doy:4}}),n.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ci={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Ei={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};n.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return Ei[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return Ci[e]}))},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?10<=e?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});var Ai="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),Pi="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Yi=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Oi=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;n.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Pi[e.month()]:Ai[e.month()]:Ai},monthsRegex:Oi,monthsShortRegex:Oi,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Yi,longMonthsParse:Yi,shortMonthsParse:Yi,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});var Ii="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),ji="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Bi=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Hi=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;n.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?ji[e.month()]:Ii[e.month()]:Ii},monthsRegex:Hi,monthsShortRegex:Hi,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Bi,longMonthsParse:Bi,shortMonthsParse:Bi,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),n.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Ni={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},Ri={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};n.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,(function(e){return Ri[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return Ni[e]}))},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?10<=e?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});var zi="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),Fi="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function Vi(e){return e%10<5&&1<e%10&&~~(e/10)%10!=1}function Wi(e,t,n){var r=e+" ";switch(n){case"ss":return r+(Vi(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(Vi(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(Vi(e)?"godziny":"godzin");case"MM":return r+(Vi(e)?"miesiące":"miesięcy");case"yy":return r+(Vi(e)?"lata":"lat")}}function Ui(e,t,n){var r=" ";return(20<=e%100||100<=e&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[n]}function qi(e,t,n){var r,i;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:2<=r%10&&r%10<=4&&(r%100<10||20<=r%100)?i[1]:i[2])}n.defineLocale("pl",{months:function(e,t){return e?""===t?"("+Fi[e.month()]+"|"+zi[e.month()]+")":/D MMMM/.test(t)?Fi[e.month()]:zi[e.month()]:zi},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:Wi,m:Wi,mm:Wi,h:Wi,hh:Wi,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:Wi,y:"rok",yy:Wi},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº"}),n.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),n.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:Ui,m:"un minut",mm:Ui,h:"o oră",hh:Ui,d:"o zi",dd:Ui,M:"o lună",MM:Ui,y:"un an",yy:Ui},week:{dow:1,doy:7}});var Gi=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];n.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:Gi,longMonthsParse:Gi,shortMonthsParse:Gi,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:qi,m:qi,mm:qi,h:"час",hh:qi,d:"день",dd:qi,M:"месяц",MM:qi,y:"год",yy:qi},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});var Zi=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],Ji=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];n.defineLocale("sd",{months:Zi,monthsShort:Zi,weekdays:Ji,weekdaysShort:Ji,weekdaysMin:Ji,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),n.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" වැනි"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return 11<e?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});var Xi="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),Ki="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function Qi(e){return 1<e&&e<5}function eo(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekúnd":"pár sekundami";case"ss":return t||r?i+(Qi(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?i+(Qi(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(Qi(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?i+(Qi(e)?"dni":"dní"):i+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?i+(Qi(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?i+(Qi(e)?"roky":"rokov"):i+"rokmi"}}function to(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+(1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return i+(1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return i+(1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami");case"d":return t||r?"en dan":"enim dnem";case"dd":return i+(1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi");case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+(1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci");case"y":return t||r?"eno leto":"enim letom";case"yy":return i+(1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti")}}n.defineLocale("sk",{months:Xi,monthsShort:Ki,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:
-return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:eo,ss:eo,m:eo,mm:eo,h:eo,hh:eo,d:eo,dd:eo,M:eo,MM:eo,y:eo,yy:eo},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:to,ss:to,m:to,mm:to,h:to,hh:to,d:to,dd:to,M:to,MM:to,y:to,yy:to},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),n.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var no={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:2<=e&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=no.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+no.correctGrammaticalCase(e,r)}};n.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:no.translate,m:no.translate,mm:no.translate,h:no.translate,hh:no.translate,d:"дан",dd:no.translate,M:"месец",MM:no.translate,y:"годину",yy:no.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var ro={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:2<=e&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=ro.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+ro.correctGrammaticalCase(e,r)}};n.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:ro.translate,m:ro.translate,mm:ro.translate,h:ro.translate,hh:ro.translate,d:"dan",dd:ro.translate,M:"mesec",MM:ro.translate,y:"godinu",yy:ro.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),n.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?11<=e?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),n.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}}),n.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var io={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},oo={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};n.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,(function(e){return oo[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return io[e]}))},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&10<=e?e:e+12},week:{dow:0,doy:6}}),n.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%dవ",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?10<=e?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}}),n.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}});var ao={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};n.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?11<=e?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(ao[e]||ao[e%10]||ao[100<=e?100:null])},week:{dow:1,doy:7}}),n.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),n.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var so="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function lo(e,t,n,r){var i=function(e){var t=Math.floor(e%1e3/100),n=Math.floor(e%100/10),r=e%10,i="";return 0<t&&(i+=so[t]+"vatlh"),0<n&&(i+=(""!==i?" ":"")+so[n]+"maH"),0<r&&(i+=(""!==i?" ":"")+so[r]),""===i?"pagh":i}(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}n.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:lo,m:"wa’ tup",mm:lo,h:"wa’ rep",hh:lo,d:"wa’ jaj",dd:lo,M:"wa’ jar",MM:lo,y:"wa’ DIS",yy:lo},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var uo={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};function co(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r?i[n][0]:t?i[n][0]:i[n][1]}function ho(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:2<=r%10&&r%10<=4&&(r%100<10||20<=r%100)?i[1]:i[2])}function fo(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}n.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var n=e%10;return e+(uo[n]||uo[e%100-n]||uo[100<=e?100:null])}},week:{dow:1,doy:7}}),n.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return 11<e?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:co,ss:co,m:co,mm:co,h:co,hh:co,d:co,dd:co,M:co,MM:co,y:co,yy:co},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),n.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),n.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}}),n.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:11<=e?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}}),n.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(t)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:fo("[Сьогодні "),nextDay:fo("[Завтра "),lastDay:fo("[Вчора "),nextWeek:fo("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return fo("[Минулої] dddd [").call(this);case 1:case 2:case 4:return fo("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:ho,m:ho,mm:ho,h:"годину",hh:ho,d:"день",dd:ho,M:"місяць",MM:ho,y:"рік",yy:ho},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});var po=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],mo=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];return n.defineLocale("ur",{months:po,monthsShort:po,weekdays:mo,weekdaysShort:mo,weekdaysMin:mo,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),n.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),n.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}}),n.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),n.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),n.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}}),n.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:11<=e?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}}),n.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?11<=e?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?11<=e?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),n.locale("en"),n})),t=function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var n,r=o(e),a=r.source,c=r.id,d=r.path,h=u[c]&&d in u[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||h?(l("ignoring socket cache for %s",a),n=s(a,t)):(u[c]||(l("new io instance for %s",a),u[c]=s(a,t)),n=u[c]),r.query&&!t.query?t.query=r.query:t&&"object"===i(t.query)&&(t.query=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}(t.query)),n.socket(r.path,t)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(1),a=n(7),s=n(17),l=n(3)("socket.io-client");e.exports=t=r;var u=t.managers={};t.protocol=a.protocol,t.connect=r,t.Manager=n(17),t.Socket=n(44)},function(e,t,n){(function(t){"use strict";var r=n(2),i=n(3)("socket.io-client:url");e.exports=function(e,n){var o=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),i("parse %s",e),o=r(e)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";var a=-1!==o.host.indexOf(":")?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+a+":"+o.port,o.href=o.protocol+"://"+a+(n&&n.port===o.port?"":":"+o.port),o}}).call(t,function(){return this}())},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var a=n.exec(e||""),s={},l=14;l--;)s[r[l]]=a[l]||"";return-1!=i&&-1!=o&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(e,t,n){(function(r){function i(){try{return t.storage.debug}catch(e){}if(void 0!==r&&"env"in r)return r.env.DEBUG}(t=e.exports=n(5)).log=function(){return"object"==typeof console&&alert&&Function.prototype.apply.call(alert,console,arguments)},t.formatArgs=function(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r),e},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){return"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(t,n(4))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(){p&&h&&(p=!1,h.length?f=h.concat(f):m=-1,f.length&&a())}function a(){if(!p){var e=i(o);p=!0;for(var t=f.length;t;){for(h=f,f=[];++m<t;)h&&h[m].run();m=-1,t=f.length}h=null,p=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var u,c,d=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(e){c=r}}();var h,f=[],p=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new s(e,t)),1!==f.length||p||i(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){function r(e){function n(){}function r(){var e=r,n=+new Date,a=n-(i||n);e.diff=a,e.prev=i,e.curr=n,i=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=t.colors[o++%t.colors.length]);for(var s=new Array(arguments.length),l=0;l<s.length;l++)s[l]=arguments[l];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var u=0;s[0]=s[0].replace(/%([a-z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),s=t.formatArgs.apply(e,s),(r.log||t.log||alert.bind(console)).apply(e,s)}n.enabled=!1,r.enabled=!0;var a=t.enabled(e)?r:n;return a.namespace=e,a}(t=e.exports=r.debug=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(6),t.names=[],t.skips=[],t.formatters={};var i,o=0},function(e,t){function n(e){return r(e,s,"day")||r(e,a,"hour")||r(e,o,"minute")||r(e,i,"second")||e+" ms"}function r(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var i=1e3,o=60*i,a=60*o,s=24*a,l=365.25*s;e.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*o;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return t.long?n(e):function(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=o?Math.round(e/o)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){function r(){}function i(e){var n="",r=!1;return n+=e.type,t.BINARY_EVENT!=e.type&&t.BINARY_ACK!=e.type||(n+=e.attachments,n+="-"),e.nsp&&"/"!=e.nsp&&(r=!0,n+=e.nsp),null!=e.id&&(r&&(n+=",",r=!1),n+=e.id),null!=e.data&&(r&&(n+=","),n+=u.stringify(e.data)),l("encoded %j as %s",e,n),n}function o(){this.reconstructor=null}function a(e){this.reconPack=e,this.buffers=[]}function s(e){return{type:t.ERROR,data:"parser error"}}var l=n(8)("socket.io-parser"),u=n(11),c=n(13),d=n(14),h=n(16);t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=r,t.Decoder=o,r.prototype.encode=function(e,n){l("encoding packet %j",e),t.BINARY_EVENT==e.type||t.BINARY_ACK==e.type?function(e,t){d.removeBlobs(e,(function(e){var n=d.deconstructPacket(e),r=i(n.packet),o=n.buffers;o.unshift(r),t(o)}))}(e,n):n([i(e)])},c(o.prototype),o.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n={},r=0;if(n.type=Number(e.charAt(0)),null==t.types[n.type])return s();if(t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type){for(var i="";"-"!=e.charAt(++r)&&(i+=e.charAt(r),r!=e.length););if(i!=Number(i)||"-"!=e.charAt(r))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"==e.charAt(r+1))for(n.nsp="";++r&&","!=(a=e.charAt(r))&&(n.nsp+=a,r!=e.length););else n.nsp="/";var o=e.charAt(r+1);if(""!==o&&Number(o)==o){for(n.id="";++r;){var a;if(null==(a=e.charAt(r))||Number(a)!=a){--r;break}if(n.id+=e.charAt(r),r==e.length)break}n.id=Number(n.id)}return e.charAt(++r)&&(n=function(e,t){try{e.data=u.parse(t)}catch(e){return s()}return e}(n,e.substr(r))),l("decoded %s as %j",e,n),n}(e),t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type?(this.reconstructor=new a(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!h(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},o.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},a.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length==this.reconPack.attachments){var t=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},a.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){function r(){var e;try{e=t.storage.debug}catch(e){}return e}(t=e.exports=n(9)).log=function(){return"object"==typeof console&&alert&&Function.prototype.apply.call(alert,console,arguments)},t.formatArgs=function(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r),e},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(r())},function(e,t,n){(t=e.exports=function(e){function n(){}function o(){var e=o,n=+new Date,a=n-(r||n);e.diff=a,e.prev=r,e.curr=n,r=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=t.colors[i++%t.colors.length]);var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var l=0;s[0]=s[0].replace(/%([a-z%])/g,(function(n,r){if("%%"===n)return n;l++;var i=t.formatters[r];if("function"==typeof i){var o=s[l];n=i.call(e,o),s.splice(l,1),l--}return n})),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s)),(o.log||t.log||alert.bind(console)).apply(e,s)}n.enabled=!1,o.enabled=!0;var a=t.enabled(e)?o:n;return a.namespace=e,a}).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(10),t.names=[],t.skips=[],t.formatters={};var r,i=0},function(e,t){function n(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var r=1e3,i=6e4,o=36e5,a=24*o;e.exports=function(e,t){return t=t||{},"string"==typeof e?function(e){if(!((e=""+e).length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}(e):t.long?function(e){return n(e,a,"day")||n(e,o,"hour")||n(e,i,"minute")||n(e,r,"second")||e+" ms"}(e):function(e){return e>=a?Math.round(e/a)+"d":e>=o?Math.round(e/o)+"h":e>=i?Math.round(e/i)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e)}},function(e,t,n){(function(e,n){(function(){function r(e,t){function n(e){if(n[e]!==g)return n[e];var r;if("bug-string-char-index"==e)r="a"!="a"[0];else if("json"==e)r=n("json-stringify")&&n("json-parse");else{var i,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=t.stringify,c="function"==typeof l&&y;if(c){(i=function(){return 1}).toJSON=i;try{c="0"===l(0)&&"0"===l(new o)&&'""'==l(new s)&&l(_)===g&&l(g)===g&&l()===g&&"1"===l(i)&&"[1]"==l([i])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,_,null])&&l({a:[i,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===l(null,i)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new u(-1))}catch(e){c=!1}}r=c}if("json-parse"==e){var d=t.parse;if("function"==typeof d)try{if(0===d("0")&&!d(!1)){var h=5==(i=d(a)).a.length&&1===i.a[0];if(h){try{h=!d('"\t"')}catch(e){}if(h)try{h=1!==d("01")}catch(e){}if(h)try{h=1!==d("1.")}catch(e){}}}}catch(e){h=!1}r=h}}return n[e]=!!r}e||(e=a.Object()),t||(t=a.Object());var o=e.Number||a.Number,s=e.String||a.String,l=e.Object||a.Object,u=e.Date||a.Date,c=e.SyntaxError||a.SyntaxError,d=e.TypeError||a.TypeError,h=e.Math||a.Math,f=e.JSON||a.JSON;"object"==typeof f&&f&&(t.stringify=f.stringify,t.parse=f.parse);var p,m,g,v=l.prototype,_=v.toString,y=new u(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(e){}if(!n("json")){var b="[object Function]",w="[object Number]",L="[object String]",M="[object Array]",k=n("bug-string-char-index");if(!y)var x=h.floor,S=[0,31,59,90,120,151,181,212,243,273,304,334],T=function(e,t){return S[t]+365*(e-1970)+x((e-1969+(t=+(t>1)))/4)-x((e-1901+t)/100)+x((e-1601+t)/400)};if((p=v.hasOwnProperty)||(p=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=_?p=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,p=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,p.call(this,e)}),m=function(e,t){var n,r,o,a=0;for(o in(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n)p.call(r,o)&&a++;return n=r=null,a?m=2==a?function(e,t){var n,r={},i=_.call(e)==b;for(n in e)i&&"prototype"==n||p.call(r,n)||!(r[n]=1)||!p.call(e,n)||t(n)}:function(e,t){var n,r,i=_.call(e)==b;for(n in e)i&&"prototype"==n||!p.call(e,n)||(r="constructor"===n)||t(n);(r||p.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(e,t){var n,o,a=_.call(e)==b,s=!a&&"function"!=typeof e.constructor&&i[typeof e.hasOwnProperty]&&e.hasOwnProperty||p;for(n in e)a&&"prototype"==n||!s.call(e,n)||t(n);for(o=r.length;n=r[--o];s.call(e,n)&&t(n));}),m(e,t)},!n("json-stringify")){var $={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D=function(e,t){return("000000"+(t||0)).slice(-e)},C=function(e){for(var t='"',n=0,r=e.length,i=!k||r>10,o=i&&(k?e.split(""):e);n<r;n++){var a=e.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=$[a];break;default:if(a<32){t+="\\u00"+D(2,a.toString(16));break}t+=i?o[n]:e.charAt(n)}}return t+'"'},E=function(e,t,n,r,i,o,a){var s,l,u,c,h,f,v,y,b,k,S,$,A,P,Y,O;try{s=t[e]}catch(e){}if("object"==typeof s&&s)if("[object Date]"!=(l=_.call(s))||p.call(s,"toJSON"))"function"==typeof s.toJSON&&(l!=w&&l!=L&&l!=M||p.call(s,"toJSON"))&&(s=s.toJSON(e));else if(s>-1/0&&s<1/0){if(T){for(h=x(s/864e5),u=x(h/365.2425)+1970-1;T(u+1,0)<=h;u++);for(c=x((h-T(u,0))/30.42);T(u,c+1)<=h;c++);h=1+h-T(u,c),v=x((f=(s%864e5+864e5)%864e5)/36e5)%24,y=x(f/6e4)%60,b=x(f/1e3)%60,k=f%1e3}else u=s.getUTCFullYear(),c=s.getUTCMonth(),h=s.getUTCDate(),v=s.getUTCHours(),y=s.getUTCMinutes(),b=s.getUTCSeconds(),k=s.getUTCMilliseconds();s=(u<=0||u>=1e4?(u<0?"-":"+")+D(6,u<0?-u:u):D(4,u))+"-"+D(2,c+1)+"-"+D(2,h)+"T"+D(2,v)+":"+D(2,y)+":"+D(2,b)+"."+D(3,k)+"Z"}else s=null;if(n&&(s=n.call(t,e,s)),null===s)return"null";if("[object Boolean]"==(l=_.call(s)))return""+s;if(l==w)return s>-1/0&&s<1/0?""+s:"null";if(l==L)return C(""+s);if("object"==typeof s){for(P=a.length;P--;)if(a[P]===s)throw d();if(a.push(s),S=[],Y=o,o+=i,l==M){for(A=0,P=s.length;A<P;A++)$=E(A,s,n,r,i,o,a),S.push($===g?"null":$);O=S.length?i?"[\n"+o+S.join(",\n"+o)+"\n"+Y+"]":"["+S.join(",")+"]":"[]"}else m(r||s,(function(e){var t=E(e,s,n,r,i,o,a);t!==g&&S.push(C(e)+":"+(i?" ":"")+t)})),O=S.length?i?"{\n"+o+S.join(",\n"+o)+"\n"+Y+"}":"{"+S.join(",")+"}":"{}";return a.pop(),O}};t.stringify=function(e,t,n){var r,o,a,s;if(i[typeof t]&&t)if((s=_.call(t))==b)o=t;else if(s==M){a={};for(var l,u=0,c=t.length;u<c;l=t[u++],((s=_.call(l))==L||s==w)&&(a[l]=1));}if(n)if((s=_.call(n))==w){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else s==L&&(r=n.length<=10?n:n.slice(0,10));return E("",((l={})[""]=e,l),o,a,r,"",[])}}if(!n("json-parse")){var A,P,Y=s.fromCharCode,O={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},I=function(){throw A=P=null,c()},j=function(){for(var e,t,n,r,i,o=P,a=o.length;A<a;)switch(i=o.charCodeAt(A)){case 9:case 10:case 13:case 32:A++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=k?o.charAt(A):o[A],A++,e;case 34:for(e="@",A++;A<a;)if((i=o.charCodeAt(A))<32)I();else if(92==i)switch(i=o.charCodeAt(++A)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=O[i],A++;break;case 117:for(t=++A,n=A+4;A<n;A++)(i=o.charCodeAt(A))>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||I();e+=Y("0x"+o.slice(t,A));break;default:I()}else{if(34==i)break;for(i=o.charCodeAt(A),t=A;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++A);e+=o.slice(t,A)}if(34==o.charCodeAt(A))return A++,e;I();default:if(t=A,45==i&&(r=!0,i=o.charCodeAt(++A)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(A+1))>=48&&i<=57&&I(),r=!1;A<a&&(i=o.charCodeAt(A))>=48&&i<=57;A++);if(46==o.charCodeAt(A)){for(n=++A;n<a&&(i=o.charCodeAt(n))>=48&&i<=57;n++);n==A&&I(),A=n}if(101==(i=o.charCodeAt(A))||69==i){for(43!=(i=o.charCodeAt(++A))&&45!=i||A++,n=A;n<a&&(i=o.charCodeAt(n))>=48&&i<=57;n++);n==A&&I(),A=n}return+o.slice(t,A)}if(r&&I(),"true"==o.slice(A,A+4))return A+=4,!0;if("false"==o.slice(A,A+5))return A+=5,!1;if("null"==o.slice(A,A+4))return A+=4,null;I()}return"$"},B=function(e){var t,n;if("$"==e&&I(),"string"==typeof e){if("@"==(k?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=j());n||(n=!0))n&&(","==e?"]"==(e=j())&&I():I()),","==e&&I(),t.push(B(e));return t}if("{"==e){for(t={};"}"!=(e=j());n||(n=!0))n&&(","==e?"}"==(e=j())&&I():I()),","!=e&&"string"==typeof e&&"@"==(k?e.charAt(0):e[0])&&":"==j()||I(),t[e.slice(1)]=B(j());return t}I()}return e},H=function(e,t,n){var r=N(e,t,n);r===g?delete e[t]:e[t]=r},N=function(e,t,n){var r,i=e[t];if("object"==typeof i&&i)if(_.call(i)==M)for(r=i.length;r--;)H(i,r,n);else m(i,(function(e){H(i,e,n)}));return n.call(e,t,i)};t.parse=function(e,t){var n,r;return A=0,P=""+e,n=B(j()),"$"!=j()&&I(),A=P=null,t&&_.call(t)==b?N(((r={})[""]=n,r),"",t):n}}}return t.runInContext=r,t}var i={function:!0,object:!0},o=i[typeof t]&&t&&!t.nodeType&&t,a=i[typeof window]&&window||this,s=o&&i[typeof e]&&e&&!e.nodeType&&"object"==typeof n&&n;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(a=s),o)r(a,o);else{var l=a.JSON,u=a.JSON3,c=!1,d=r(a,a.JSON3={noConflict:function(){return c||(c=!0,a.JSON=l,a.JSON3=u,l=u=null),d}});a.JSON={parse:d.parse,stringify:d.stringify}}}).call(this)}).call(t,n(12)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){function n(e){if(e)return function(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}(e)}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t);return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(e){var r=n(15),i=n(16);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(n){if(!n)return n;if(i(n)){var o={_placeholder:!0,num:t.length};return t.push(n),o}if(r(n)){for(var a=new Array(n.length),s=0;s<n.length;s++)a[s]=e(n[s]);return a}if("object"==typeof n&&!(n instanceof Date)){for(var l in a={},n)a[l]=e(n[l]);return a}return n}(n),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(n){if(n&&n._placeholder)return t[n.num];if(r(n)){for(var i=0;i<n.length;i++)n[i]=e(n[i]);return n}if(n&&"object"==typeof n){for(var o in n)n[o]=e(n[o]);return n}return n}(e.data),e.attachments=void 0,e},t.removeBlobs=function(t,n){var o=0,a=t;(function t(s,l,u){if(!s)return s;if(e.Blob&&s instanceof Blob||e.File&&s instanceof File){o++;var c=new FileReader;c.onload=function(){u?u[l]=this.result:a=this.result,--o||n(a)},c.readAsArrayBuffer(s)}else if(r(s))for(var d=0;d<s.length;d++)t(s[d],d,s);else if(s&&"object"==typeof s&&!i(s))for(var h in s)t(s[h],h,s)})(a),o||n(a)}}).call(t,function(){return this}())},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){(function(t){e.exports=function(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t){return this instanceof r?(e&&"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new l.Encoder,this.decoder=new l.Decoder,this.autoConnect=!1!==t.autoConnect,void(this.autoConnect&&this.open())):new r(e,t)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(18),a=n(44),s=n(35),l=n(7),u=n(46),c=n(47),d=n(3)("socket.io-client:manager"),h=n(42),f=n(48),p=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)p.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},r.prototype.updateSocketIds=function(){for(var e in this.nsps)p.call(this.nsps,e)&&(this.nsps[e].id=this.engine.id)},s(r.prototype),r.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},r.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},r.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(e,t){if(d("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var i=u(n,"open",(function(){r.onopen(),e&&e()})),a=u(n,"error",(function(t){if(d("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;d("connect attempt will timeout after %d",s);var l=setTimeout((function(){d("connect attempt timed out after %d",s),i.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",s)}),s);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(i),this.subs.push(a),this},r.prototype.onopen=function(){d("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(u(e,"data",c(this,"ondata"))),this.subs.push(u(e,"ping",c(this,"onping"))),this.subs.push(u(e,"pong",c(this,"onpong"))),this.subs.push(u(e,"error",c(this,"onerror"))),this.subs.push(u(e,"close",c(this,"onclose"))),this.subs.push(u(this.decoder,"decoded",c(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(e){this.decoder.add(e)},r.prototype.ondecoded=function(e){this.emit("packet",e)},r.prototype.onerror=function(e){d("error",e),this.emitAll("error",e)},r.prototype.socket=function(e,t){function n(){~h(i.connecting,r)||i.connecting.push(r)}var r=this.nsps[e];if(!r){r=new a(this,e,t),this.nsps[e]=r;var i=this;r.on("connecting",n),r.on("connect",(function(){r.id=i.engine.id})),this.autoConnect&&n()}return r},r.prototype.destroy=function(e){var t=h(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},r.prototype.packet=function(e){d("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){d("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){d("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){d("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();d("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(d("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(d("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(d("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(19)},function(e,t,n){e.exports=n(20),e.exports.parser=n(27)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=u(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=u(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=d.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized?null:n.rejectUnauthorized,this.forceNode=!!n.forceNode;var i="object"==typeof t&&t;i.global===i&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}var i=n(21),o=n(35),a=n(3)("engine.io-client:socket"),s=n(42),l=n(27),u=n(2),c=n(43),d=n(36);e.exports=r,r.priorWebsocketSuccess=!1,o(r.prototype),r.protocol=l.protocol,r.Socket=r,r.Transport=n(26),r.transports=n(21),r.parser=n(27),r.prototype.createTransport=function(e){a('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);return t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id),new i[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders,forceNode:this.forceNode,localAddress:this.localAddress})},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){a("setting transport %s",e.name);var t=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},r.prototype.probe=function(e){function t(){if(h.onlyBinaryUpgrades){var t=!this.supportsBinary&&h.transport.supportsBinary;d=d||t}d||(a('probe transport "%s" opened',e),c.send([{type:"ping",data:"probe"}]),c.once("packet",(function(t){if(!d)if("pong"===t.type&&"probe"===t.data){if(a('probe transport "%s" pong',e),h.upgrading=!0,h.emit("upgrading",c),!c)return;r.priorWebsocketSuccess="websocket"===c.name,a('pausing current transport "%s"',h.transport.name),h.transport.pause((function(){d||"closed"!==h.readyState&&(a("changing transport and sending upgrade packet"),u(),h.setTransport(c),c.send([{type:"upgrade"}]),h.emit("upgrade",c),c=null,h.upgrading=!1,h.flush())}))}else{a('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=c.name,h.emit("upgradeError",n)}})))}function n(){d||(d=!0,u(),c.close(),c=null)}function i(t){var r=new Error("probe error: "+t);r.transport=c.name,n(),a('probe transport "%s" failed because of error: %s',e,t),h.emit("upgradeError",r)}function o(){i("transport closed")}function s(){i("socket closed")}function l(e){c&&e.name!==c.name&&(a('"%s" works - aborting "%s"',e.name,c.name),n())}function u(){c.removeListener("open",t),c.removeListener("error",i),c.removeListener("close",o),h.removeListener("close",s),h.removeListener("upgrading",l)}a('probing transport "%s"',e);var c=this.createTransport(e,{probe:1}),d=!1,h=this;r.priorWebsocketSuccess=!1,c.once("open",t),c.once("error",i),c.once("close",o),this.once("close",s),this.once("upgrading",l),c.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},r.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(c(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},r.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){a("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},r.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},r.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function e(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function t(){r.removeListener("upgrade",t),r.removeListener("upgradeError",t),e()}function n(){r.once("upgrade",t),r.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?n():e()})):this.upgrading?n():e()}return this},r.prototype.onError=function(e){a("socket error %j",e),r.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},r.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(a('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},r.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}}).call(t,function(){return this}())},function(e,t,n){(function(e){var r=n(22),i=n(24),o=n(39),a=n(40);t.polling=function(t){var n=!1,a=!1,s=!1!==t.jsonp;if(e.location){var l="https:"===location.protocol,u=location.port;u||(u=l?443:80),n=t.hostname!==location.hostname||u!==t.port,a=t.secure!==l}if(t.xdomain=n,t.xscheme=a,"open"in new r(t)&&!t.forceJSONP)return new i(t);if(!s)throw new Error("JSONP disabled");return new o(t)},t.websocket=a}).call(t,function(){return this}())},function(e,t,n){(function(t){var r=n(23);e.exports=function(e){var n=e.xdomain,i=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!i&&o)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(t,function(){return this}())},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){function r(){}function i(e){if(l.call(this,e),this.requestTimeout=e.requestTimeout,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}else this.extraHeaders=e.extraHeaders}function o(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function a(){for(var e in o.requests)o.requests.hasOwnProperty(e)&&o.requests[e].abort()}var s=n(22),l=n(25),u=n(35),c=n(37),d=n(3)("engine.io-client:polling-xhr");e.exports=i,e.exports.Request=o,c(i,l),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new o(e)},i.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",(function(e){i.onError("xhr post error",e)})),this.sendXhr=r},i.prototype.doPoll=function(){d("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},u(o.prototype),o.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new s(e),r=this;try{d("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if(this.supportsBinary&&(n.responseType="arraybuffer"),"POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223===n.status?r.onLoad():setTimeout((function(){r.onError(n.status)}),0))},d("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout((function(){r.onError(e)}),0)}t.document&&(this.index=o.requestsCount++,o.requests[this.index]=this)},o.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},o.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},o.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},o.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,e)try{this.xhr.abort()}catch(e){}t.document&&delete o.requests[this.index],this.xhr=null}},o.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(e){}if("application/octet-stream"===t)e=this.xhr.response||this.xhr.responseText;else if(this.supportsBinary)try{e=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(t){for(var n=new Uint8Array(this.xhr.response),r=[],i=0,o=n.length;i<o;i++)r.push(n[i]);e=String.fromCharCode.apply(null,r)}else e=this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},o.prototype.hasXDR=function(){return void 0!==t.XDomainRequest&&!this.xs&&this.enablesXDR},o.prototype.abort=function(){this.cleanup()},o.requestsCount=0,o.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",a):t.addEventListener&&t.addEventListener("beforeunload",a,!1))}).call(t,function(){return this}())},function(e,t,n){function r(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),i.call(this,e)}var i=n(26),o=n(36),a=n(27),s=n(37),l=n(38),u=n(3)("engine.io-client:polling");e.exports=r;var c=null!=new(n(22))({xdomain:!1}).responseType;s(r,i),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(e){function t(){u("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||t()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||t()})))}else t()},r.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(e){var t=this;u("polling got data %s",e),a.decodePayload(e,this.socket.binaryType,(function(e,n,r){return"opening"===t.readyState&&t.onOpen(),"close"===e.type?(t.onClose(),!1):void t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function e(){u("writing close packet"),t.write([{type:"close"}])}var t=this;"open"===this.readyState?(u("transport open - closing"),e()):(u("transport not open - deferring close"),this.once("open",e))},r.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};a.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=l()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){function r(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}var i=n(27),o=n(35);e.exports=r,o(r.prototype),r.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)},r.prototype.onPacket=function(e){this.emit("packet",e)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){(function(e){function r(e,n){return n("b"+t.packets[e.type]+e.data.data)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=g[e.type];for(var s=0;s<o.length;s++)a[s+1]=o[s];return r(a.buffer)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(m)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){e.data=i.result,t.encodePacket(e,n,!0,r)},i.readAsArrayBuffer(e.data)}(e,n,r);var i=new Uint8Array(1);return i[0]=g[e.type],r(new y([i.buffer,e.data]))}function a(e,t,n){for(var r=new Array(e.length),i=d(e.length,n),o=function(e,n,i){t(n,(function(t,n){r[e]=n,i(t,r)}))},a=0;a<e.length;a++)o(a,e[a],i)}var s,l=n(28),u=n(29),c=n(30),d=n(31),h=n(32);e&&e.ArrayBuffer&&(s=n(33));var f="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),p="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),m=f||p;t.protocol=3;var g=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=l(g),_={type:"error",data:"parser error"},y=n(34);t.encodePacket=function(t,n,a,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof a&&(s=a,a=null);var l=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&l instanceof ArrayBuffer)return i(t,n,s);if(y&&l instanceof e.Blob)return o(t,n,s);if(l&&l.base64)return r(t,s);var u=g[t.type];return void 0!==t.data&&(u+=a?h.encode(String(t.data)):String(t.data)),s(""+u)},t.encodeBase64Packet=function(n,r){var i,o="b"+t.packets[n.type];if(y&&n.data instanceof e.Blob){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];r(o+e)},a.readAsDataURL(n.data)}try{i=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(e){for(var s=new Uint8Array(n.data),l=new Array(s.length),u=0;u<s.length;u++)l[u]=s[u];i=String.fromCharCode.apply(null,l)}return o+=e.btoa(i),r(o)},t.decodePacket=function(e,n,r){if(void 0===e)return _;if("string"==typeof e){if("b"==e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=h.decode(e)}catch(e){return!1}return e}(e)))return _;var i=e.charAt(0);return Number(i)==i&&v[i]?e.length>1?{type:v[i],data:e.substring(1)}:{type:v[i]}:_}i=new Uint8Array(e)[0];var o=c(e,1);return y&&"blob"===n&&(o=new y([o])),{type:v[i],data:o}},t.decodeBase64Packet=function(e,t){var n=v[e.charAt(0)];if(!s)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=s.decode(e.substr(1));return"blob"===t&&y&&(r=new y([r])),{type:n,data:r}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var i=u(e);return n&&i?y&&!m?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void a(e,(function(e,r){t.encodePacket(e,!!i&&n,!0,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))})):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""==e)return r(_,0,1);for(var o,a,s="",l=0,u=e.length;l<u;l++){var c=e.charAt(l);if(":"!=c)s+=c;else{if(""==s||s!=(o=Number(s)))return r(_,0,1);if(s!=(a=e.substr(l+1,o)).length)return r(_,0,1);if(a.length){if(i=t.decodePacket(a,n,!0),_.type==i.type&&_.data==i.data)return r(_,0,1);if(!1===r(i,l+o,u))return}l+=o,s=""}}return""!=s?r(_,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){return e.length?void a(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),i=new Uint8Array(r),o=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),a=0;a<e.length;a++)r[a]=e.charCodeAt(a);n=r.buffer}i[o++]=t?0:1;var s=n.byteLength.toString();for(a=0;a<s.length;a++)i[o++]=parseInt(s[a]);for(i[o++]=255,r=new Uint8Array(n),a=0;a<r.length;a++)i[o++]=r[a]})),n(i.buffer)})):n(new ArrayBuffer(0))},t.encodePayloadAsBlob=function(e,n){a(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),a=new Uint8Array(o.length+1);for(i=0;i<o.length;i++)a[i]=parseInt(o[i]);if(a[o.length]=255,y){var s=new y([t.buffer,a.buffer,e]);n(null,s)}}))}),(function(e,t){return n(new y(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var i=e,o=[],a=!1;i.byteLength>0;){for(var s=new Uint8Array(i),l=0===s[0],u="",d=1;255!=s[d];d++){if(u.length>310){a=!0;break}u+=s[d]}if(a)return r(_,0,1);i=c(i,2+u.length),u=parseInt(u);var h=c(i,0,u);if(l)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(e){var f=new Uint8Array(h);for(h="",d=0;d<f.length;d++)h+=String.fromCharCode(f[d])}o.push(h),i=c(i,u)}var p=o.length;o.forEach((function(e,i){r(t.decodePacket(e,n,!0),i,p)}))}}).call(t,function(){return this}())},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t,n){(function(t){var r=n(15);e.exports=function(e){return function e(n){if(!n)return!1;if(t.Buffer&&t.Buffer.isBuffer&&t.Buffer.isBuffer(n)||t.ArrayBuffer&&n instanceof ArrayBuffer||t.Blob&&n instanceof Blob||t.File&&n instanceof File)return!0;if(r(n)){for(var i=0;i<n.length;i++)if(e(n[i]))return!0}else if(n&&"object"==typeof n)for(var o in n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),n)if(Object.prototype.hasOwnProperty.call(n,o)&&e(n[o]))return!0;return!1}(e)}}).call(t,function(){return this}())},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),a=t,s=0;a<n;a++,s++)o[s]=i[a];return o.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){function i(e,n){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=r):0!==i.count||o||t(null,n)}var o=!1;return r=r||n,i.count=e,0===e?t():i}},function(e,t,n){var r;(function(e,i){!function(o){function a(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function s(e,t){return m(e>>t&63|128)}function l(e){if(0==(4294967168&e))return m(e);var t="";return 0==(4294965248&e)?t=m(e>>6&31|192):0==(4294901760&e)?(t=m(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=m(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+m(63&e|128)}function u(){if(p>=f)throw Error("Invalid byte index");var e=255&h[p];if(p++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,t;if(p>f)throw Error("Invalid byte index");if(p==f)return!1;if(e=255&h[p],p++,0==(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|u())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|u()<<6|u())>=2048)return t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|u()<<12|u()<<6|u())>=65536&&t<=1114111)return t;throw Error("Invalid WTF-8 detected")}var d=("object"==typeof e&&e&&e.exports,"object"==typeof i&&i);d.global!==d&&d.window;var h,f,p,m=String.fromCharCode,g={version:"1.0.0",encode:function(e){for(var t=a(e),n=t.length,r=-1,i="";++r<n;)i+=l(t[r]);return i},decode:function(e){h=a(e),f=h.length,p=0;for(var t,n=[];!1!==(t=c());)n.push(t);return function(e){for(var t,n=e.length,r=-1,i="";++r<n;)(t=e[r])>65535&&(i+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=m(t);return i}(n)}};void 0===(r=function(){return g}.call(t,n,t,e))||(e.exports=r)}()}).call(t,n(12)(e),function(){return this}())},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,r,i,o,a,s=.75*e.length,l=e.length,u=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),d=new Uint8Array(c);for(t=0;t<l;t+=4)r=n[e.charCodeAt(t)],i=n[e.charCodeAt(t+1)],o=n[e.charCodeAt(t+2)],a=n[e.charCodeAt(t+3)],d[u++]=r<<2|i>>4,d[u++]=(15&i)<<4|o>>2,d[u++]=(3&o)<<6|63&a;return c}}()},function(e,t){(function(t){function n(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var i=new Uint8Array(n.byteLength);i.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=i.buffer}e[t]=r}}}var r=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,i=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=i&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),a=r&&r.prototype.append&&r.prototype.getBlob;e.exports=i?o?t.Blob:function(e,t){return n(e),new Blob(e,t||{})}:a?function(e,t){t=t||{};var i=new r;n(e);for(var o=0;o<e.length;o++)i.append(e[o]);return t.type?i.getBlob(t.type):i.getBlob()}:void 0}).call(t,function(){return this}())},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){"use strict";function n(e){var t="";do{t=o[e%a]+t,e=Math.floor(e/a)}while(e>0);return t}function r(){var e=n(+new Date);return e!==i?(l=0,i=e):e+"."+n(l++)}for(var i,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,s={},l=0,u=0;u<a;u++)s[o[u]]=u;r.encode=n,r.decode=function(e){var t=0;for(u=0;u<e.length;u++)t=t*a+s[e.charAt(u)];return t},e.exports=r},function(e,t,n){(function(t){function r(){}function i(e){o.call(this,e),this.query=this.query||{},s||(t.___eio||(t.___eio=[]),s=t.___eio),this.index=s.length;var n=this;s.push((function(e){n.onData(e)})),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",(function(){n.script&&(n.script.onerror=r)}),!1)}var o=n(25),a=n(37);e.exports=i;var s,l=/\n/g,u=/\\n/g;a(i,o),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},i.prototype.doWrite=function(e,t){function n(){r(),t()}function r(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+i.iframeId+'">';o=document.createElement(e)}catch(e){(o=document.createElement("iframe")).name=i.iframeId,o.src="javascript:0"}o.id=i.iframeId,i.form.appendChild(o),i.iframe=o}var i=this;if(!this.form){var o,a=document.createElement("form"),s=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=c,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),r(),e=e.replace(u,"\\\n"),this.area.value=e.replace(l,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=d&&!e.forceNode,this.usingBrowserWebSocket||(h=i),o.call(this,e)}var i,o=n(26),a=n(27),s=n(36),l=n(37),u=n(38),c=n(3)("engine.io-client:websocket"),d=t.WebSocket||t.MozWebSocket;if("undefined"==typeof window)try{i=n(41)}catch(e){}var h=d;h||"undefined"!=typeof window||(h=i),e.exports=r,l(r,o),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t={agent:this.agent,perMessageDeflate:this.perMessageDeflate};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(t.headers=this.extraHeaders),this.localAddress&&(t.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?new h(e):new h(e,void 0,t)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},r.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,i=0,o=r;i<o;i++)!function(e){a.encodePacket(e,n.supportsBinary,(function(i){if(!n.usingBrowserWebSocket){var o={};e.options&&(o.compress=e.options.compress),n.perMessageDeflate&&("string"==typeof i?t.Buffer.byteLength(i):i.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,o)}catch(e){c("websocket closed before onclose event")}--r||(n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0))}))}(e[i])},r.prototype.onClose=function(){o.prototype.onClose.call(this)},r.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=u()),this.supportsBinary||(e.b64=1),(e=s.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},r.prototype.check=function(){return!(!h||"__initialize"in h&&this.name===r.prototype.name)}}).call(t,function(){return this}())},function(e,t){},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t){(function(t){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,i=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,o=/(?:^|:|,)(?:\s*\[)+/g,a=/^\s+/,s=/\s+$/;e.exports=function(e){return"string"==typeof e&&e?(e=e.replace(a,"").replace(s,""),t.JSON&&JSON.parse?JSON.parse(e):n.test(e.replace(r,"@").replace(i,"]").replace(o,""))?new Function("return "+e)():void 0):null}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}var i=n(7),o=n(35),a=n(45),s=n(46),l=n(47),u=n(3)("socket.io-client:socket"),c=n(29);e.exports=r;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=o.prototype.emit;o(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",l(this,"onopen")),s(e,"packet",l(this,"onpacket")),s(e,"close",l(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var e=a(arguments);return e.unshift("message"),this.emit.apply(this,e),this},r.prototype.emit=function(e){if(d.hasOwnProperty(e))return h.apply(this,arguments),this;var t=a(arguments),n=i.EVENT;c(t)&&(n=i.BINARY_EVENT);var r={type:n,data:t,options:{}};return r.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),delete this.flags,this},r.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},r.prototype.onopen=function(){u("transport is open - connecting"),"/"!==this.nsp&&(this.query?this.packet({type:i.CONNECT,query:this.query}):this.packet({type:i.CONNECT}))},r.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},r.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case i.CONNECT:this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:this.onevent(e);break;case i.ACK:case i.BINARY_ACK:this.onack(e);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",e.data)}},r.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?h.apply(this,t):this.receiveBuffer.push(t)},r.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);u("sending ack %j",r);var o=c(r)?i.BINARY_ACK:i.ACK;t.packet({type:o,id:e,data:r})}}},r.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)h.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:i.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){"use strict";e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}}])},"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.io=t():this.io=t(),function(){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},t=e._,n=Array.prototype,r=Object.prototype,i="undefined"!=typeof Symbol?Symbol.prototype:null,o=n.push,a=n.slice,s=r.toString,l=r.hasOwnProperty,u=Array.isArray,c=Object.keys,d=Object.create,h=function(){},f=function(e){return e instanceof f?e:this instanceof f?void(this._wrapped=e):new f(e)};"undefined"==typeof exports||exports.nodeType?e._=f:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=f),exports._=f),f.VERSION="1.9.1";var p,m=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},g=function(e,t,n){return f.iteratee!==p?f.iteratee(e,t):null==e?f.identity:f.isFunction(e)?m(e,t,n):f.isObject(e)&&!f.isArray(e)?f.matcher(e):f.property(e)};f.iteratee=p=function(e,t){return g(e,t,1/0)};var v=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},_=function(e){if(!f.isObject(e))return{};if(d)return d(e);h.prototype=e;var t=new h;return h.prototype=null,t},y=function(e){return function(t){return null==t?void 0:t[e]}},b=function(e,t){return null!=e&&l.call(e,t)},w=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},L=Math.pow(2,53)-1,M=y("length"),k=function(e){var t=M(e);return"number"==typeof t&&0<=t&&t<=L};f.each=f.forEach=function(e,t,n){var r,i;if(t=m(t,n),k(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=f.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},f.map=f.collect=function(e,t,n){t=g(t,n);for(var r=!k(e)&&f.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var x=function(e){return function(t,n,r,i){var o=3<=arguments.length;return function(t,n,r,i){var o=!k(t)&&f.keys(t),a=(o||t).length,s=0<e?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);0<=s&&s<a;s+=e){var l=o?o[s]:s;r=n(r,t[l],l,t)}return r}(t,m(n,i,4),r,o)}};f.reduce=f.foldl=f.inject=x(1),f.reduceRight=f.foldr=x(-1),f.find=f.detect=function(e,t,n){var r=(k(e)?f.findIndex:f.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},f.filter=f.select=function(e,t,n){var r=[];return t=g(t,n),f.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},f.reject=function(e,t,n){return f.filter(e,f.negate(g(t)),n)},f.every=f.all=function(e,t,n){t=g(t,n);for(var r=!k(e)&&f.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},f.some=f.any=function(e,t,n){t=g(t,n);for(var r=!k(e)&&f.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},f.contains=f.includes=f.include=function(e,t,n,r){return k(e)||(e=f.values(e)),("number"!=typeof n||r)&&(n=0),0<=f.indexOf(e,t,n)},f.invoke=v((function(e,t,n){var r,i;return f.isFunction(t)?i=t:f.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),f.map(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=w(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))})),f.pluck=function(e,t){return f.map(e,f.property(t))},f.where=function(e,t){return f.filter(e,f.matcher(t))},f.findWhere=function(e,t){return f.find(e,f.matcher(t))},f.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=k(e)?e:f.values(e)).length;s<l;s++)null!=(r=e[s])&&o<r&&(o=r);else t=g(t,n),f.each(e,(function(e,n,r){i=t(e,n,r),(a<i||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o},f.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=k(e)?e:f.values(e)).length;s<l;s++)null!=(r=e[s])&&r<o&&(o=r);else t=g(t,n),f.each(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o},f.shuffle=function(e){return f.sample(e,1/0)},f.sample=function(e,t,n){if(null==t||n)return k(e)||(e=f.values(e)),e[f.random(e.length-1)];var r=k(e)?f.clone(e):f.values(e),i=M(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=f.random(a,o),l=r[a];r[a]=r[s],r[s]=l}return r.slice(0,t)},f.sortBy=function(e,t,n){var r=0;return t=g(t,n),f.pluck(f.map(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(r<n||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")};var S=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=g(r,i),f.each(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}};f.groupBy=S((function(e,t,n){b(e,n)?e[n].push(t):e[n]=[t]})),f.indexBy=S((function(e,t,n){e[n]=t})),f.countBy=S((function(e,t,n){b(e,n)?e[n]++:e[n]=1}));var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;f.toArray=function(e){return e?f.isArray(e)?a.call(e):f.isString(e)?e.match(T):k(e)?f.map(e,f.identity):f.values(e):[]},f.size=function(e){return null==e?0:k(e)?e.length:f.keys(e).length},f.partition=S((function(e,t,n){e[n?0:1].push(t)}),!0),f.first=f.head=f.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:f.initial(e,e.length-t)},f.initial=function(e,t,n){return a.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},f.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:f.rest(e,Math.max(0,e.length-t))},f.rest=f.tail=f.drop=function(e,t,n){return a.call(e,null==t||n?1:t)},f.compact=function(e){return f.filter(e,Boolean)};var $=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=M(e);o<a;o++){var s=e[o];if(k(s)&&(f.isArray(s)||f.isArguments(s)))if(t)for(var l=0,u=s.length;l<u;)r[i++]=s[l++];else $(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};f.flatten=function(e,t){return $(e,t,!1)},f.without=v((function(e,t){return f.difference(e,t)})),f.uniq=f.unique=function(e,t,n,r){f.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=g(n,r));for(var i=[],o=[],a=0,s=M(e);a<s;a++){var l=e[a],u=n?n(l,a,e):l;t&&!n?(a&&o===u||i.push(l),o=u):n?f.contains(o,u)||(o.push(u),i.push(l)):f.contains(i,l)||i.push(l)}return i},f.union=v((function(e){return f.uniq($(e,!0,!0))})),f.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=M(e);r<i;r++){var o=e[r];if(!f.contains(t,o)){var a;for(a=1;a<n&&f.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},f.difference=v((function(e,t){return t=$(t,!0,!0),f.filter(e,(function(e){return!f.contains(t,e)}))})),f.unzip=function(e){for(var t=e&&f.max(e,M).length||0,n=Array(t),r=0;r<t;r++)n[r]=f.pluck(e,r);return n},f.zip=v(f.unzip),f.object=function(e,t){for(var n={},r=0,i=M(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var D=function(e){return function(t,n,r){n=g(n,r);for(var i=M(t),o=0<e?0:i-1;0<=o&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};f.findIndex=D(1),f.findLastIndex=D(-1),f.sortedIndex=function(e,t,n,r){for(var i=(n=g(n,r,1))(t),o=0,a=M(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var C=function(e,t,n){return function(r,i,o){var s=0,l=M(r);if("number"==typeof o)0<e?s=0<=o?o:Math.max(o+l,s):l=0<=o?Math.min(o+1,l):o+l+1;else if(n&&o&&l)return r[o=n(r,i)]===i?o:-1;if(i!=i)return 0<=(o=t(a.call(r,s,l),f.isNaN))?o+s:-1;for(o=0<e?s:l-1;0<=o&&o<l;o+=e)if(r[o]===i)return o;return-1}};f.indexOf=C(1,f.findIndex,f.sortedIndex),f.lastIndexOf=C(-1,f.findLastIndex),f.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},f.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(a.call(e,r,r+=t));return n};var E=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=_(e.prototype),a=e.apply(o,i);return f.isObject(a)?a:o};f.bind=v((function(e,t,n){if(!f.isFunction(e))throw new TypeError("Bind must be called on a function");var r=v((function(i){return E(e,r,t,this,n.concat(i))}));return r})),f.partial=v((function(e,t){var n=f.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return E(e,r,this,this,a)};return r})),(f.partial.placeholder=f).bindAll=v((function(e,t){var n=(t=$(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=f.bind(e[r],e)}})),f.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return b(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},f.delay=v((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),f.defer=f.partial(f.delay,f,1),f.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:f.now(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=f.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return i=this,o=arguments,c<=0||t<c?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},f.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=v((function(a){if(r&&clearTimeout(r),n){var s=!r
-;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=f.delay(o,t,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},f.wrap=function(e,t){return f.partial(t,e)},f.negate=function(e){return function(){return!e.apply(this,arguments)}},f.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},f.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},f.before=function(e,t){var n;return function(){return 0<--e&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},f.once=f.partial(f.before,2),f.restArguments=v;var A=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Y=function(e,t){var n=P.length,i=e.constructor,o=f.isFunction(i)&&i.prototype||r,a="constructor";for(b(e,a)&&!f.contains(t,a)&&t.push(a);n--;)(a=P[n])in e&&e[a]!==o[a]&&!f.contains(t,a)&&t.push(a)};f.keys=function(e){if(!f.isObject(e))return[];if(c)return c(e);var t=[];for(var n in e)b(e,n)&&t.push(n);return A&&Y(e,t),t},f.allKeys=function(e){if(!f.isObject(e))return[];var t=[];for(var n in e)t.push(n);return A&&Y(e,t),t},f.values=function(e){for(var t=f.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},f.mapObject=function(e,t,n){t=g(t,n);for(var r=f.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},f.pairs=function(e){for(var t=f.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},f.invert=function(e){for(var t={},n=f.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},f.functions=f.methods=function(e){var t=[];for(var n in e)f.isFunction(e[n])&&t.push(n);return t.sort()};var O=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;l<s;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=o[u])}return n}};f.extend=O(f.allKeys),f.extendOwn=f.assign=O(f.keys),f.findKey=function(e,t,n){t=g(t,n);for(var r,i=f.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var I,j,B=function(e,t,n){return t in n};f.pick=v((function(e,t){var n={},r=t[0];if(null==e)return n;f.isFunction(r)?(1<t.length&&(r=m(r,t[1])),t=f.allKeys(e)):(r=B,t=$(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),f.omit=v((function(e,t){var n,r=t[0];return f.isFunction(r)?(r=f.negate(r),1<t.length&&(n=t[1])):(t=f.map($(t,!1,!1),String),r=function(e,n){return!f.contains(t,n)}),f.pick(e,r,n)})),f.defaults=O(f.allKeys,!0),f.create=function(e,t){var n=_(e);return t&&f.extendOwn(n,t),n},f.clone=function(e){return f.isObject(e)?f.isArray(e)?e.slice():f.extend({},e):e},f.tap=function(e,t){return t(e),e},f.isMatch=function(e,t){var n=f.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},I=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&j(e,t,n,r)},j=function(e,t,n,r){e instanceof f&&(e=e._wrapped),t instanceof f&&(t=t._wrapped);var o=s.call(e);if(o!==s.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return i.valueOf.call(e)===i.valueOf.call(t)}var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(f.isFunction(l)&&l instanceof l&&f.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var c=(n=n||[]).length;c--;)if(n[c]===e)return r[c]===t;if(n.push(e),r.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!I(e[c],t[c],n,r))return!1}else{var d,h=f.keys(e);if(c=h.length,f.keys(t).length!==c)return!1;for(;c--;)if(d=h[c],!b(t,d)||!I(e[d],t[d],n,r))return!1}return n.pop(),r.pop(),!0},f.isEqual=function(e,t){return I(e,t)},f.isEmpty=function(e){return null==e||(k(e)&&(f.isArray(e)||f.isString(e)||f.isArguments(e))?0===e.length:0===f.keys(e).length)},f.isElement=function(e){return!(!e||1!==e.nodeType)},f.isArray=u||function(e){return"[object Array]"===s.call(e)},f.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},f.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){f["is"+e]=function(t){return s.call(t)==="[object "+e+"]"}})),f.isArguments(arguments)||(f.isArguments=function(e){return b(e,"callee")});var H=e.document&&e.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof H&&(f.isFunction=function(e){return"function"==typeof e||!1}),f.isFinite=function(e){return!f.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},f.isNaN=function(e){return f.isNumber(e)&&isNaN(e)},f.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===s.call(e)},f.isNull=function(e){return null===e},f.isUndefined=function(e){return void 0===e},f.has=function(e,t){if(!f.isArray(t))return b(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!l.call(e,i))return!1;e=e[i]}return!!n},f.noConflict=function(){return e._=t,this},f.identity=function(e){return e},f.constant=function(e){return function(){return e}},f.noop=function(){},f.property=function(e){return f.isArray(e)?function(t){return w(t,e)}:y(e)},f.propertyOf=function(e){return null==e?function(){}:function(t){return f.isArray(t)?w(e,t):e[t]}},f.matcher=f.matches=function(e){return e=f.extendOwn({},e),function(t){return f.isMatch(t,e)}},f.times=function(e,t,n){var r=Array(Math.max(0,e));t=m(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},f.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},f.now=Date.now||function(){return(new Date).getTime()};var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},R=f.invert(N),z=function(e){var t=function(t){return e[t]},n="(?:"+f.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};f.escape=z(N),f.unescape=z(R),f.result=function(e,t,n){f.isArray(t)||(t=[t]);var r=t.length;if(!r)return f.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=f.isFunction(o)?o.call(e):o}return e};var F=0;f.uniqueId=function(e){var t=++F+"";return e?e+t:t},f.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+W[e]};f.template=function(e,t,n){!t&&n&&(t=n),t=f.defaults({},t,f.templateSettings);var r,i=RegExp([(t.escape||V).source,(t.interpolate||V).source,(t.evaluate||V).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(U,q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(e){return r.call(this,e,f)},l=t.variable||"obj";return s.source="function("+l+"){\n"+a+"}",s},f.chain=function(e){var t=f(e);return t._chain=!0,t};var G=function(e,t){return e._chain?f(t).chain():t};f.mixin=function(e){return f.each(f.functions(e),(function(t){var n=f[t]=e[t];f.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),G(this,n.apply(f,e))}})),f},f.mixin(f),f.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=n[e];f.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],G(this,n)}})),f.each(["concat","join","slice"],(function(e){var t=n[e];f.prototype[e]=function(){return G(this,t.apply(this._wrapped,arguments))}})),f.prototype.value=function(){return this._wrapped},f.prototype.valueOf=f.prototype.toJSON=f.prototype.value,f.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],(function(){return f}))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(function(){try{return require("moment")}catch(e){}}()):"function"==typeof define&&define.amd?define(["require"],(function(e){return t(function(){try{return e("moment")}catch(e){}}())})):(e=e||self).Chart=t(e.moment)}(this,(function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(e,t){return e(t={exports:{}}),t.exports}((function(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[t[r]]=r);var i=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in i)if(i.hasOwnProperty(o)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);var a=i[o].channels,s=i[o].labels;delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:a}),Object.defineProperty(i[o],"labels",{value:s})}i.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},i.rgb.hsv=function(e){var t,n,r,i,o,a=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(a,s,l),c=u-Math.min(a,s,l),d=function(e){return(u-e)/6/c+.5};return 0===c?i=o=0:(o=c/u,t=d(a),n=d(s),r=d(l),a===u?i=r-n:s===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*u]},i.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[i.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},i.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},i.rgb.keyword=function(e){var r=n[e];if(r)return r;var i,o,a,s=1/0;for(var l in t)if(t.hasOwnProperty(l)){var u=(o=e,a=t[l],Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<s&&(s=u,i=l)}return i},i.keyword.rgb=function(e){return t[e]},i.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},i.rgb.lab=function(e){var t=i.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},i.hsl.rgb=function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(r=a+1/3*-(u-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[u]=255*o;return i},i.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[t,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},i.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},i.hsv.hsl=function(e){var t,n,r,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(t=(2-o)*s)<=1?t:2-t)||0),100*(r/=2)]},i.hwb.rgb=function(e){var t,n,r,i,o,a,s,l=e[0]/360,u=e[1]/100,c=e[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),i=u+r*((n=1-c)-u),t){default:case 6:case 0:o=n,a=i,s=u;break;case 1:o=i,a=n,s=u;break;case 2:o=u,a=n,s=i;break;case 3:o=u,a=i,s=n;break;case 4:o=i,a=u,s=n;break;case 5:o=n,a=u,s=i}return[255*o,255*a,255*s]},i.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},i.xyz.rgb=function(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},i.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},i.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},i.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},i.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:i.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},i.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},i.hsl.hcg=function(e){var t,n=e[1]/100,r=e[2]/100,i=0;return(t=r<.5?2*n*r:2*n*(1-r))<1&&(i=(r-.5*t)/(1-t)),[e[0],100*t,100*i]},i.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},i.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},i.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},i.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},i.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},i.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var i=r.pop(),o=Object.keys(n[i]),a=o.length,s=0;s<a;s++){var l=o[s],u=t[l];-1===u.distance&&(u.distance=t[i].distance+1,u.parent=i,r.unshift(l))}return t}function i(e,t){return function(n){return t(e(n))}}function o(e,t){for(var r=[t[e].parent,e],o=n[t[e].parent][e],a=t[e].parent;t[a].parent;)r.unshift(t[a].parent),o=i(n[t[a].parent][a],o),a=t[a].parent;return o.conversion=r,o}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var a={};Object.keys(n).forEach((function(e){a[e]={},Object.defineProperty(a[e],"channels",{value:n[e].channels}),Object.defineProperty(a[e],"labels",{value:n[e].labels});var t=function(e){for(var t=r(e),n={},i=Object.keys(t),a=i.length,s=0;s<a;s++){var l=i[s];null!==t[l].parent&&(n[l]=o(l,t))}return n}(e);Object.keys(t).forEach((function(n){var r=t[n];a[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var s=a,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:c,getHsla:d,getRgb:function(e){var t=c(e);return t&&t.slice(0,3)},getHsl:function(e){var t=d(e);return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=c(e);return t?t[3]:(t=d(e))?t[3]:(t=h(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+v(e[0])+v(e[1])+v(e[2])+(t>=0&&t<1?v(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?f(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:f,percentString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:p,hslString:function(e,t){return t<1||e[3]&&e[3]<1?m(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return _[e.slice(0,3)]}};function c(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var o=0;o<t.length;o++)t[o]=parseInt(r[o]+r[o],16);i&&(n=Math.round(parseInt(i+i,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(i=r[2],r=r[1],o=0;o<t.length;o++)t[o]=parseInt(r.slice(2*o,2*o+2),16);i&&(n=Math.round(parseInt(i,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=parseInt(r[o+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=Math.round(2.55*parseFloat(r[o+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=l[r[1]]))return}for(o=0;o<t.length;o++)t[o]=g(t[o],0,255);return n=n||0==n?g(n,0,1):1,t[3]=n,t}}function d(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function h(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function f(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function p(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function g(e,t,n){return Math.min(Math.max(t,e),n)}function v(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var _={};for(var y in l)_[l[y]]=y;var b=function(e){return e instanceof b?e:this instanceof b?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=u.getRgba(e))?this.setValues("rgb",t):(t=u.getHsla(e))?this.setValues("hsl",t):(t=u.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new b(e);var t};b.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,i=2*r-1,o=this.alpha()-n.alpha(),a=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new b,r=this.values,i=n.values;for(var o in r)r.hasOwnProperty(o)&&(e=r[o],"[object Array]"===(t={}.toString.call(e))?i[o]=e.slice(0):"[object Number]"===t?i[o]=e:console.error("unexpected color value:",e));return n}},b.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},b.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},b.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},b.prototype.setValues=function(e,t){var n,r,i=this.values,o=this.spaces,a=this.maxes,l=1;if(this.valid=!0,"alpha"===e)l=t;else if(t.length)i[e]=t.slice(0,e.length),l=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)i[e][n]=t[e.charAt(n)];l=t.a}else if(void 0!==t[o[e][0]]){var u=o[e];for(n=0;n<e.length;n++)i[e][n]=t[u[n]];l=t.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===l?i.alpha:l)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(a[e][n],i[e][n])),i[e][n]=Math.round(r);for(var c in o)c!==e&&(i[c]=s[e][c](i[e]));return!0},b.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},b.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:n===r[t]?this:(r[t]=n,this.setValues(e,r),this)},"undefined"!=typeof window&&(window.Color=b);var w,L=b,M={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return M.valueOrDefault(M.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var i,o,a;if(M.isArray(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(M.isObject(e))for(o=(a=Object.keys(e)).length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])},arrayEquals:function(e,t){var n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i instanceof Array&&o instanceof Array){if(!M.arrayEquals(i,o))return!1}else if(i!==o)return!1;return!0},clone:function(e){if(M.isArray(e))return e.map(M.clone);if(M.isObject(e)){for(var t={},n=Object.keys(e),r=n.length,i=0;i<r;++i)t[n[i]]=M.clone(e[n[i]]);return t}return e},_merger:function(e,t,n,r){var i=t[e],o=n[e];M.isObject(i)&&M.isObject(o)?M.merge(i,o,r):t[e]=M.clone(o)},_mergerIf:function(e,t,n){var r=t[e],i=n[e];M.isObject(r)&&M.isObject(i)?M.mergeIf(r,i):t.hasOwnProperty(e)||(t[e]=M.clone(i))},merge:function(e,t,n){var r,i,o,a,s,l=M.isArray(t)?t:[t],u=l.length;if(!M.isObject(e))return e;for(r=(n=n||{}).merger||M._merger,i=0;i<u;++i)if(t=l[i],M.isObject(t))for(s=0,a=(o=Object.keys(t)).length;s<a;++s)r(o[s],e,t,n);return e},mergeIf:function(e,t){return M.merge(e,t,{merger:M._mergerIf})},extend:Object.assign||function(e){return M.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=M.inherits,e&&M.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},k=M;M.callCallback=M.callback,M.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var x={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-x.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*x.easeInBounce(2*e):.5*x.easeOutBounce(2*e-1)+.5}},S={effects:x};k.easingEffects=x;var T=Math.PI,$=T/180,D=2*T,C=T/2,E=T/4,A=2*T/3,P={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,i,o){if(o){var a=Math.min(o,i/2,r/2),s=t+a,l=n+a,u=t+r-a,c=n+i-a;e.moveTo(t,l),s<u&&l<c?(e.arc(s,l,a,-T,-C),e.arc(u,l,a,-C,0),e.arc(u,c,a,0,C),e.arc(s,c,a,C,T)):s<u?(e.moveTo(s,n),e.arc(u,l,a,-C,C),e.arc(s,l,a,C,T+C)):l<c?(e.arc(s,l,a,-T,0),e.arc(s,c,a,0,T)):e.arc(s,l,a,-T,T),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)},drawPoint:function(e,t,n,r,i,o){var a,s,l,u,c,d=(o||0)*$;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(a=t.toString())||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(r,i),e.rotate(d),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,i,n,0,D),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=A,e.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=A,e.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),e.closePath();break;case"rectRounded":u=n-(c=.516*n),s=Math.cos(d+E)*u,l=Math.sin(d+E)*u,e.arc(r-s,i-l,c,d-T,d-C),e.arc(r+l,i-s,c,d-C,d),e.arc(r+s,i+l,c,d,d+C),e.arc(r-l,i+s,c,d+C,d+T),e.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*n,e.rect(r-u,i-u,2*u,2*u);break}d+=E;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+l,i-s),e.lineTo(r+s,i+l),e.lineTo(r-l,i+s),e.closePath();break;case"crossRot":d+=E;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s),d+=E,s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l);break;case"dash":e.moveTo(r,i),e.lineTo(r+Math.cos(d)*n,i+Math.sin(d)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var i=n.steppedLine;if(i){if("middle"===i){var o=(t.x+n.x)/2;e.lineTo(o,r?n.y:t.y),e.lineTo(o,r?t.y:n.y)}else"after"===i&&!r||"after"!==i&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},Y=P;k.clear=P.clear,k.drawRoundedRectangle=function(e){e.beginPath(),P.roundedRect.apply(P,arguments)};var O={_set:function(e,t){return k.merge(this[e]||(this[e]={}),t)}};O._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var I=O,j=k.valueOrDefault,B={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,i;return k.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,i=+e.left||0):t=n=r=i=+e||0,{top:t,right:n,bottom:r,left:i,height:t+r,width:i+n}},_parseFont:function(e){var t=I.global,n=j(e.fontSize,t.defaultFontSize),r={family:j(e.fontFamily,t.defaultFontFamily),lineHeight:k.options.toLineHeight(j(e.lineHeight,t.defaultLineHeight),n),size:n,style:j(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return r.string=function(e){return!e||k.isNullOrUndef(e.size)||k.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r},resolve:function(e,t,n,r){var i,o,a,s=!0;for(i=0,o=e.length;i<o;++i)if(void 0!==(a=e[i])&&(void 0!==t&&"function"==typeof a&&(a=a(t),s=!1),void 0!==n&&k.isArray(a)&&(a=a[n],s=!1),void 0!==a))return r&&!s&&(r.cacheable=!1),a}},H={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort((function(e,t){return e-t})).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},N=H;k.log10=H.log10;var R=k,z=S,F=Y,V=B,W=N;R.easing=z,R.canvas=F,R.options=V,R.math=W,R.rtl={getRtlAdapter:function(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};var U=function(e){R.extend(this,e),this.initialize.apply(this,arguments)};R.extend(U.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=R.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,r=t._start,i=t._view;return n&&1!==e?(i||(i=t._view={}),r||(r=t._start={}),function(e,t,n,r){var i,o,a,s,l,u,c,d,h,f=Object.keys(n);for(i=0,o=f.length;i<o;++i)if(u=n[a=f[i]],t.hasOwnProperty(a)||(t[a]=u),(s=t[a])!==u&&"_"!==a[0]){if(e.hasOwnProperty(a)||(e[a]=s),(c=typeof u)==typeof(l=e[a]))if("string"===c){if((d=L(l)).valid&&(h=L(u)).valid){t[a]=h.mix(d,r).rgbString();continue}}else if(R.isFinite(l)&&R.isFinite(u)){t[a]=l+(u-l)*r;continue}t[a]=u}}(r,i,n,e),t):(t._view=R.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return R.isNumber(this._model.x)&&R.isNumber(this._model.y)}}),U.extend=R.inherits;var q=U,G=q.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=G;Object.defineProperty(G.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(G.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),I._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:R.noop,onComplete:R.noop}});var J={animations:[],request:null,addAnimation:function(e,t,n,r){var i,o,a=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),i=0,o=a.length;i<o;++i)if(a[i].chart===e)return void(a[i]=t);a.push(t),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=R.findIndex(this.animations,(function(t){return t.chart===e}));-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=R.requestAnimFrame.call(window,(function(){e.request=null,e.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,i=this.animations,o=0;o<i.length;)t=(e=i[o]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),R.callback(e.render,[t,e],t),R.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(R.callback(e.onAnimationComplete,[e],t),t.animating=!1,i.splice(o,1)):++o}},X=R.options.resolve,K=["push","pop","shift","splice","unshift"];function Q(e,t){var n=e._chartjs;if(n){var r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(K.forEach((function(t){delete e[t]})),delete e._chartjs)}}var ee=function(e,t){this.initialize(e,t)};R.extend(ee.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),i=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Q(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(e=0,t=r.length;e<t;++e)i[e]=i[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,r=n.getDataset(),i=r.data||(r.data=[]);n._data!==i&&(n._data&&Q(n._data,n),i&&Object.isExtensible(i)&&(t=n,(e=i)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),K.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),i=r.apply(this,t);return R.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),i}})})))),n._data=i),n.resyncElements()},_configure:function(){this._config=R.merge({},[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&R._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:R.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,i=0;i<r;++i)n[i].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),r&&void 0===e?t=this._resolveDatasetElementOptions(r||{}):(e=e||0,t=this._resolveDataElementOptions(n.data[e]||{},e)),!1!==t.fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,i,o,a=this,s=a.chart,l=a._config,u=e.custom||{},c=s.options.elements[a.datasetElementType.prototype._type]||{},d=a._datasetElementOptions,h={},f={chart:s,dataset:a.getDataset(),datasetIndex:a.index,hover:t};for(n=0,r=d.length;n<r;++n)i=d[n],o=t?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,h[i]=X([u[o],l[o],c[o]],f);return h},_resolveDataElementOptions:function(e,t){var n=this,r=e&&e.custom,i=n._cachedDataOpts;if(i&&!r)return i;var o,a,s,l,u=n.chart,c=n._config,d=u.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},p={chart:u,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!r};if(r=r||{},R.isArray(h))for(a=0,s=h.length;a<s;++a)f[l=h[a]]=X([r[l],c[l],d[l]],p,t,m);else for(a=0,s=(o=Object.keys(h)).length;a<s;++a)f[l=o[a]]=X([r[l],c[h[l]],c[l],d[l]],p,t,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(e){R.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},i=e._model,o=R.getHoverColor;e.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth},i.backgroundColor=X([r.hoverBackgroundColor,t.hoverBackgroundColor,o(i.backgroundColor)],void 0,n),i.borderColor=X([r.hoverBorderColor,t.hoverBorderColor,o(i.borderColor)],void 0,n),i.borderWidth=X([r.hoverBorderWidth,t.hoverBorderWidth,i.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,i,o,a=this.getMeta().dataset,s={};if(a){for(o=a._model,i=this._resolveDatasetElementOptions(a,!0),e=0,t=(r=Object.keys(i)).length;e<t;++e)s[n=r[e]]=o[n],o[n]=i[n];a.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):r>n&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),ee.extend=R.inherits;var te=ee,ne=2*Math.PI;function re(e,t){var n=t.startAngle,r=t.endAngle,i=t.pixelMargin,o=i/t.outerRadius,a=t.x,s=t.y;e.beginPath(),e.arc(a,s,t.outerRadius,n-o,r+o),t.innerRadius>i?(o=i/t.innerRadius,e.arc(a,s,t.innerRadius-i,r+o,n-o,!0)):e.arc(a,s,i,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}I._set("global",{elements:{arc:{backgroundColor:I.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ie=q.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=R.getAngleFromPoint(n,{x:e,y:t}),i=r.angle,o=r.distance,a=n.startAngle,s=n.endAngle;s<a;)s+=ne;for(;i>s;)i-=ne;for(;i<a;)i+=ne;var l=i>=a&&i<=s,u=o>=n.innerRadius&&o<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/ne)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+ne,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),e=0;e<i.fullCircles;++e)t.fill();i.endAngle=i.startAngle+n.circumference%ne}t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&function(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var i,o=n.endAngle;for(r&&(n.endAngle=n.startAngle+ne,re(e,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=ne,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+ne,n.startAngle,!0),i=0;i<n.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+ne),i=0;i<n.fullCircles;++i)e.stroke()}(e,t,n,r),r&&re(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}(t,n,i),t.restore()}}),oe=R.valueOrDefault,ae=I.global.defaultColor;I._set("global",{elements:{line:{tension:.4,backgroundColor:ae,borderWidth:3,borderColor:ae,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var se=q.extend({_type:"line",draw:function(){var e,t,n,r=this,i=r._view,o=r._chart.ctx,a=i.spanGaps,s=r._children.slice(),l=I.global,u=l.elements.line,c=-1,d=r._loop;if(s.length){if(r._loop){for(e=0;e<s.length;++e)if(t=R.previousItem(s,e),!s[e]._view.skip&&t._view.skip){s=s.slice(e).concat(s.slice(0,e)),d=a;break}d&&s.push(s[0])}for(o.save(),o.lineCap=i.borderCapStyle||u.borderCapStyle,o.setLineDash&&o.setLineDash(i.borderDash||u.borderDash),o.lineDashOffset=oe(i.borderDashOffset,u.borderDashOffset),o.lineJoin=i.borderJoinStyle||u.borderJoinStyle,o.lineWidth=oe(i.borderWidth,u.borderWidth),o.strokeStyle=i.borderColor||l.defaultColor,o.beginPath(),(n=s[0]._view).skip||(o.moveTo(n.x,n.y),c=0),e=1;e<s.length;++e)n=s[e]._view,t=-1===c?R.previousItem(s,e):s[c],n.skip||(c!==e-1&&!a||-1===c?o.moveTo(n.x,n.y):R.canvas.lineTo(o,t._view,n),c=e);d&&o.closePath(),o.stroke(),o.restore()}}}),le=R.valueOrDefault,ue=I.global.defaultColor;function ce(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}I._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ue,borderColor:ue,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var de=q.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ce,inXRange:ce,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,i=t.rotation,o=t.radius,a=t.x,s=t.y,l=I.global,u=l.defaultColor;t.skip||(void 0===e||R.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||u,n.lineWidth=le(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||u,R.canvas.drawPoint(n,r,o,a,s,i))}}),he=I.global.defaultColor;function fe(e){return e&&void 0!==e.width}function pe(e){var t,n,r,i,o;return fe(e)?(o=e.width/2,t=e.x-o,n=e.x+o,r=Math.min(e.y,e.base),i=Math.max(e.y,e.base)):(o=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-o,i=e.y+o),{left:t,top:r,right:n,bottom:i}}function me(e,t,n){return e===t?n:e===n?t:e}function ge(e,t,n){var r=null===t,i=null===n,o=!(!e||r&&i)&&pe(e);return o&&(r||t>=o.left&&t<=o.right)&&(i||n>=o.top&&n<=o.bottom)}I._set("global",{elements:{rectangle:{backgroundColor:he,borderColor:he,borderSkipped:"bottom",borderWidth:0}}});var ve=q.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=pe(e),n=t.right-t.left,r=t.bottom-t.top,i=function(e,t,n){var r,i,o,a,s=e.borderWidth,l=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=me(t,"left","right")):e.base<e.y&&(t=me(t,"bottom","top")),n[t]=!0,n):n}(e);return R.isObject(s)?(r=+s.top||0,i=+s.right||0,o=+s.bottom||0,a=+s.left||0):r=i=o=a=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||i<0?0:i>t?t:i,b:l.bottom||o<0?0:o>n?n:o,l:l.left||a<0?0:a>t?t:a}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}}(t),r=n.outer,i=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===i.w&&r.h===i.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(i.x,i.y,i.w,i.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ge(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return fe(n)?ge(n,e,null):ge(n,null,t)},inXRange:function(e){return ge(this._view,e,null)},inYRange:function(e){return ge(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return fe(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return fe(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),_e={},ye=ie,be=se,we=de,Le=ve;_e.Arc=ye,_e.Line=be,_e.Point=we,_e.Rectangle=Le;var Me=R._deprecated,ke=R.valueOrDefault;I._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),I._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var xe=te.extend({dataElementType:_e.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;te.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Me("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Me("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Me("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Me("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Me("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this,i=r.getMeta(),o=r.getDataset(),a=r._resolveDataElementOptions(e,t);e._xScale=r.getScaleForId(i.xAxisID),e._yScale=r.getScaleForId(i.yAxisID),e._datasetIndex=r.index,e._index=t,e._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:r.chart.data.labels[t]},R.isArray(o.data[t])&&(e._model.borderSkipped=null),r._updateElementGeometry(e,t,n,a),e.pivot()},_updateElementGeometry:function(e,t,n,r){var i=this,o=e._model,a=i._getValueScale(),s=a.getBasePixel(),l=a.isHorizontal(),u=i._ruler||i.getRuler(),c=i.calculateBarValuePixels(i.index,t,r),d=i.calculateBarIndexPixels(i.index,t,u,r);o.horizontal=l,o.base=n?s:c.base,o.x=l?n?s:c.head:d.center,o.y=l?d.center:n?s:c.head,o.height=l?d.size:void 0,o.width=l?void 0:d.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),i=r._getMatchingVisibleMetas(this._type),o=r.options.stacked,a=i.length,s=[];for(t=0;t<a&&(n=i[t],(!1===o||-1===s.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,i,o,a,s,l,u,c=this.chart,d=this._getValueScale(),h=d.isHorizontal(),f=c.data.datasets,p=d._getMatchingVisibleMetas(this._type),m=d._parseValue(f[e].data[t]),g=n.minBarLength,v=d.options.stacked,_=this.getMeta().stack,y=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,b=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=p.length;if(v||void 0===v&&void 0!==_)for(r=0;r<w&&(i=p[r]).index!==e;++r)i.stack===_&&(o=void 0===(u=d._parseValue(f[i.index].data[t])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(m.min<0&&o<0||m.max>=0&&o>0)&&(y+=o));return a=d.getPixelForValue(y),l=(s=d.getPixelForValue(y+b))-a,void 0!==g&&Math.abs(l)<g&&(l=g,s=b>=0&&!h||b<0&&h?a-g:a+g),{size:l,base:a,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,r){var i="flex"===r.barThickness?function(e,t,n){var r,i=t.pixels,o=i[e],a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null,l=n.categoryPercentage;return null===a&&(a=o-(null===s?t.end-t.start:s-o)),null===s&&(s=o+o-a),r=o-(o-Math.min(a,s))/2*l,{chunk:Math.abs(s-a)/2*l/t.stackCount,ratio:n.barPercentage,start:r}}(t,n,r):function(e,t,n){var r,i,o=n.barThickness,a=t.stackCount,s=t.pixels[e],l=R.isNullOrUndef(o)?function(e,t){var n,r,i,o,a=e._length;for(i=1,o=t.length;i<o;++i)a=Math.min(a,Math.abs(t[i]-t[i-1]));for(i=0,o=e.getTicks().length;i<o;++i)r=e.getPixelForTick(i),a=i>0?Math.min(a,Math.abs(r-n)):a,n=r;return a}(t.scale,t.pixels):-1;return R.isNullOrUndef(o)?(r=l*n.categoryPercentage,i=n.barPercentage):(r=o*a,i=1),{chunk:r/a,ratio:i,start:s-r/2}}(t,n,r),o=this.getStackIndex(e,this.getMeta().stack),a=i.start+i.chunk*o+i.chunk/2,s=Math.min(ke(r.maxBarThickness,1/0),i.chunk*i.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),i=n.length,o=0;for(R.canvas.clipArea(e.ctx,e.chartArea);o<i;++o){var a=t._parseValue(r.data[o]);isNaN(a.min)||isNaN(a.max)||n[o].draw()}R.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=this,t=R.extend({},te.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,r=e._getValueScale().options;return t.barPercentage=ke(n.barPercentage,t.barPercentage),t.barThickness=ke(n.barThickness,t.barThickness),t.categoryPercentage=ke(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=ke(n.maxBarThickness,t.maxBarThickness),t.minBarLength=ke(r.minBarLength,t.minBarLength),t}}),Se=R.valueOrDefault,Te=R.options.resolve;I._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var $e=te.extend({dataElementType:_e.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta().data;R.each(n,(function(n,r){t.updateElement(n,r,e)}))},updateElement:function(e,t,n){var r=this,i=r.getMeta(),o=e.custom||{},a=r.getScaleForId(i.xAxisID),s=r.getScaleForId(i.yAxisID),l=r._resolveDataElementOptions(e,t),u=r.getDataset().data[t],c=r.index,d=n?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof u?u:NaN,t,c),h=n?s.getBasePixel():s.getPixelForValue(u,t,c);e._xScale=a,e._yScale=s,e._options=l,e._datasetIndex=c,e._index=t,e._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:o.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=R.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Se(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Se(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Se(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,r=n.chart,i=n.getDataset(),o=e.custom||{},a=i.data[t]||{},s=te.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:t,dataset:i,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=R.extend({},s)),s.radius=Te([o.radius,a.r,n._config.radius,r.options.elements.point.radius],l,t),s}}),De=R.valueOrDefault,Ce=Math.PI,Ee=2*Ce,Ae=Ce/2;I._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data,a=o.datasets,s=o.labels;if(i.setAttribute("class",e.id+"-legend"),a.length)for(t=0,n=a[0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var i=e.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(t.datasets[0].data[r])||i.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n<r;++n)(i=a.getDatasetMeta(n)).data[o]&&(i.data[o].hidden=!i.data[o].hidden);a.update()}},cutoutPercentage:50,rotation:-Ae,circumference:Ee,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return R.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var Pe=te.extend({dataElementType:_e.Arc,linkScales:R.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,i,o=this,a=o.chart,s=a.chartArea,l=a.options,u=1,c=1,d=0,h=0,f=o.getMeta(),p=f.data,m=l.cutoutPercentage/100||0,g=l.circumference,v=o._getRingWeight(o.index);if(g<Ee){var _=l.rotation%Ee,y=(_+=_>=Ce?-Ee:_<-Ce?Ee:0)+g,b=Math.cos(_),w=Math.sin(_),L=Math.cos(y),M=Math.sin(y),k=_<=0&&y>=0||y>=Ee,x=_<=Ae&&y>=Ae||y>=Ee+Ae,S=_<=-Ae&&y>=-Ae||y>=Ce+Ae,T=_===-Ce||y>=Ce?-1:Math.min(b,b*m,L,L*m),$=S?-1:Math.min(w,w*m,M,M*m),D=k?1:Math.max(b,b*m,L,L*m),C=x?1:Math.max(w,w*m,M,M*m);u=(D-T)/2,c=(C-$)/2,d=-(D+T)/2,h=-(C+$)/2}for(r=0,i=p.length;r<i;++r)p[r]._options=o._resolveDataElementOptions(p[r],r);for(a.borderWidth=o.getMaxBorderWidth(),t=(s.right-s.left-a.borderWidth)/u,n=(s.bottom-s.top-a.borderWidth)/c,a.outerRadius=Math.max(Math.min(t,n)/2,0),a.innerRadius=Math.max(a.outerRadius*m,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),a.offsetX=d*a.outerRadius,a.offsetY=h*a.outerRadius,f.total=o.calculateTotal(),o.outerRadius=a.outerRadius-a.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-a.radiusLength*v,0),r=0,i=p.length;r<i;++r)o.updateElement(p[r],r,e)},updateElement:function(e,t,n){var r=this,i=r.chart,o=i.chartArea,a=i.options,s=a.animation,l=(o.left+o.right)/2,u=(o.top+o.bottom)/2,c=a.rotation,d=a.rotation,h=r.getDataset(),f=n&&s.animateRotate?0:e.hidden?0:r.calculateCircumference(h.data[t])*(a.circumference/Ee),p=n&&s.animateScale?0:r.innerRadius,m=n&&s.animateScale?0:r.outerRadius,g=e._options||{};R.extend(e,{_datasetIndex:r.index,_index:t,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+i.offsetX,y:u+i.offsetY,startAngle:c,endAngle:d,circumference:f,outerRadius:m,innerRadius:p,label:R.valueAtIndexOrDefault(h.label,t,i.data.labels[t])}});var v=e._model;n&&s.animateRotate||(v.startAngle=0===t?a.rotation:r.getMeta().data[t-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),r=0;return R.each(n.data,(function(n,i){e=t.data[i],isNaN(e)||n.hidden||(r+=Math.abs(e))})),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Ee*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,i,o,a,s,l,u=0,c=this.chart;if(!e)for(t=0,n=c.data.datasets.length;t<n;++t)if(c.isDatasetVisible(t)){e=(r=c.getDatasetMeta(t)).data,t!==this.index&&(o=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)i=e[t],o?(o._configure(),a=o._resolveDataElementOptions(i,t)):a=i._options,"inner"!==a.borderAlign&&(s=a.borderWidth,u=(l=a.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(e){var t=e._model,n=e._options,r=R.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=De(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=De(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=De(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(De(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});I._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),I._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ye=xe.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Oe=R.valueOrDefault,Ie=R.options.resolve,je=R.canvas._isPointInArea;function Be(e,t){var n=e&&e.options.ticks||{},r=n.reverse,i=void 0===n.min?t:0,o=void 0===n.max?t:0;return{start:r?o:i,end:r?i:o}}function He(e,t,n){var r=n/2,i=Be(e,r),o=Be(t,r);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}function Ne(e){var t,n,r,i;return R.isObject(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i}}I._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Re=te.extend({datasetElementType:_e.Line,dataElementType:_e.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,i=r.getMeta(),o=i.dataset,a=i.data||[],s=r.chart.options,l=r._config,u=r._showLine=Oe(l.showLine,s.showLines);for(r._xScale=r.getScaleForId(i.xAxisID),r._yScale=r.getScaleForId(i.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=r._yScale,o._datasetIndex=r.index,o._children=a,o._model=r._resolveDatasetElementOptions(o),o.pivot()),t=0,n=a.length;t<n;++t)r.updateElement(a[t],t,e);for(u&&0!==o._model.tension&&r.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r,i,o=this,a=o.getMeta(),s=e.custom||{},l=o.getDataset(),u=o.index,c=l.data[t],d=o._xScale,h=o._yScale,f=a.dataset._model,p=o._resolveDataElementOptions(e,t);r=d.getPixelForValue("object"==typeof c?c:NaN,t,u),i=n?h.getBasePixel():o.calculatePointY(c,t,u),e._xScale=d,e._yScale=h,e._options=p,e._datasetIndex=u,e._index=t,e._model={x:r,y:i,skip:s.skip||isNaN(r)||isNaN(i),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Oe(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,r=e.custom||{},i=t.chart.options,o=i.elements.line,a=te.prototype._resolveDatasetElementOptions.apply(t,arguments);return a.spanGaps=Oe(n.spanGaps,i.spanGaps),a.tension=Oe(n.lineTension,o.tension),a.steppedLine=Ie([r.steppedLine,n.steppedLine,o.stepped]),a.clip=Ne(Oe(n.clip,He(t._xScale,t._yScale,a.borderWidth))),a},calculatePointY:function(e,t,n){var r,i,o,a,s,l,u,c=this.chart,d=this._yScale,h=0,f=0;if(d.options.stacked){for(s=+d.getRightValue(e),u=(l=c._getSortedVisibleDatasetMetas()).length,r=0;r<u&&(o=l[r]).index!==n;++r)i=c.data.datasets[o.index],"line"===o.type&&o.yAxisID===d.id&&((a=+d.getRightValue(i.data[t]))<0?f+=a||0:h+=a||0);return s<0?d.getPixelForValue(f+s):d.getPixelForValue(h+s)}return d.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,i=this.chart,o=this.getMeta(),a=o.dataset._model,s=i.chartArea,l=o.data||[];function u(e,t,n){return Math.max(Math.min(e,n),t)}if(a.spanGaps&&(l=l.filter((function(e){return!e._model.skip}))),"monotone"===a.cubicInterpolationMode)R.splineCurveMonotone(l);else for(e=0,t=l.length;e<t;++e)n=l[e]._model,r=R.splineCurve(R.previousItem(l,e)._model,n,R.nextItem(l,e)._model,a.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(i.options.elements.line.capBezierPoints)for(e=0,t=l.length;e<t;++e)n=l[e]._model,je(n,s)&&(e>0&&je(l[e-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),e<l.length-1&&je(l[e+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],i=t.chartArea,o=t.canvas,a=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,R.canvas.clipArea(t.ctx,{left:!1===e.left?0:i.left-e.left,right:!1===e.right?o.width:i.right+e.right,top:!1===e.top?0:i.top-e.top,bottom:!1===e.bottom?o.height:i.bottom+e.bottom}),n.dataset.draw(),R.canvas.unclipArea(t.ctx));a<s;++a)r[a].draw(i)},setHoverStyle:function(e){var t=e._model,n=e._options,r=R.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Oe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Oe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Oe(n.hoverBorderWidth,n.borderWidth),t.radius=Oe(n.hoverRadius,n.radius)}}),ze=R.options.resolve;I._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data,a=o.datasets,s=o.labels;if(i.setAttribute("class",e.id+"-legend"),a.length)for(t=0,n=a[0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var i=e.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(t.datasets[0].data[r])||i.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n<r;++n)(i=a.getDatasetMeta(n)).data[o].hidden=!i.data[o].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Fe=te.extend({dataElementType:_e.Arc,linkScales:R.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,i=this,o=i.getDataset(),a=i.getMeta(),s=i.chart.options.startAngle||0,l=i._starts=[],u=i._angles=[],c=a.data;for(i._updateRadius(),a.count=i.countVisibleElements(),t=0,n=o.data.length;t<n;t++)l[t]=s,r=i._computeAngle(t),u[t]=r,s+=r;for(t=0,n=c.length;t<n;++t)c[t]._options=i._resolveDataElementOptions(c[t],t),i.updateElement(c[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(i/2,0),t.innerRadius=Math.max(r.cutoutPercentage?t.outerRadius/100*r.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var r=this,i=r.chart,o=r.getDataset(),a=i.options,s=a.animation,l=i.scale,u=i.data.labels,c=l.xCenter,d=l.yCenter,h=a.startAngle,f=e.hidden?0:l.getDistanceFromCenterForValue(o.data[t]),p=r._starts[t],m=p+(e.hidden?0:r._angles[t]),g=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[t]),v=e._options||{};R.extend(e,{_datasetIndex:r.index,_index:t,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:c,y:d,innerRadius:0,outerRadius:n?g:f,startAngle:n&&s.animateRotate?h:p,endAngle:n&&s.animateRotate?h:m,label:R.valueAtIndexOrDefault(u,t,u[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return R.each(t.data,(function(t,r){isNaN(e.data[r])||t.hidden||n++})),n},setHoverStyle:function(e){var t=e._model,n=e._options,r=R.getHoverColor,i=R.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=i(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=i(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=i(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,r=t.getDataset(),i=t.getMeta();if(isNaN(r.data[e])||i.data[e].hidden)return 0;var o={chart:t.chart,dataIndex:e,dataset:r,datasetIndex:t.index};return ze([t.chart.options.elements.arc.angle,2*Math.PI/n],o,e)}});I._set("pie",R.clone(I.doughnut)),I._set("pie",{cutoutPercentage:0});var Ve=Pe,We=R.valueOrDefault;I._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Ue=te.extend({datasetElementType:_e.Line,dataElementType:_e.Point,linkScales:R.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this,i=r.getMeta(),o=i.dataset,a=i.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=r.index,o._children=a,o._loop=!0,o._model=r._resolveDatasetElementOptions(o),o.pivot(),t=0,n=a.length;t<n;++t)r.updateElement(a[t],t,e);for(r.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r=this,i=e.custom||{},o=r.getDataset(),a=r.chart.scale,s=a.getPointPositionForValue(t,o.data[t]),l=r._resolveDataElementOptions(e,t),u=r.getMeta().dataset._model,c=n?a.xCenter:s.x,d=n?a.yCenter:s.y;e._scale=a,e._options=l,e._datasetIndex=r.index,e._index=t,e._model={x:c,y:d,skip:i.skip||isNaN(c)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:We(i.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,r=te.prototype._resolveDatasetElementOptions.apply(e,arguments);return r.spanGaps=We(t.spanGaps,n.spanGaps),r.tension=We(t.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var e,t,n,r,i=this.getMeta(),o=this.chart.chartArea,a=i.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(i.dataset._model.spanGaps&&(a=a.filter((function(e){return!e._model.skip}))),e=0,t=a.length;e<t;++e)n=a[e]._model,r=R.splineCurve(R.previousItem(a,e,!0)._model,n,R.nextItem(a,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,o.left,o.right),n.controlPointPreviousY=s(r.previous.y,o.top,o.bottom),n.controlPointNextX=s(r.next.x,o.left,o.right),n.controlPointNextY=s(r.next.y,o.top,o.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=R.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=We(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=We(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=We(n.hoverBorderWidth,n.borderWidth),t.radius=We(n.hoverRadius,n.radius)}});I._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),I._set("global",{datasets:{scatter:{showLine:!1}}});var qe={bar:xe,bubble:$e,doughnut:Pe,horizontalBar:Ye,line:Re,polarArea:Fe,pie:Ve,radar:Ue,scatter:Re};function Ge(e,t){return e.native?{x:e.x,y:e.y}:R.getRelativePosition(e,t)}function Ze(e,t){var n,r,i,o,a,s,l=e._getSortedVisibleDatasetMetas();for(r=0,o=l.length;r<o;++r)for(i=0,a=(n=l[r].data).length;i<a;++i)(s=n[i])._view.skip||t(s)}function Je(e,t){var n=[];return Ze(e,(function(e){e.inRange(t.x,t.y)&&n.push(e)})),n}function Xe(e,t,n,r){var i=Number.POSITIVE_INFINITY,o=[];return Ze(e,(function(e){if(!n||e.inRange(t.x,t.y)){var a=e.getCenterPoint(),s=r(t,a);s<i?(o=[e],i=s):s===i&&o.push(e)}})),o}function Ke(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){var i=t?Math.abs(e.x-r.x):0,o=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function Qe(e,t,n){var r=Ge(t,e);n.axis=n.axis||"x";var i=Ke(n.axis),o=n.intersect?Je(e,r):Xe(e,r,!1,i),a=[];return o.length?(e._getSortedVisibleDatasetMetas().forEach((function(e){var t=e.data[o[0]._index];t&&!t._view.skip&&a.push(t)})),a):[]}var et={modes:{single:function(e,t){var n=Ge(t,e),r=[];return Ze(e,(function(e){if(e.inRange(n.x,n.y))return r.push(e),r})),r.slice(0,1)},label:Qe,index:Qe,dataset:function(e,t,n){var r=Ge(t,e);n.axis=n.axis||"xy";var i=Ke(n.axis),o=n.intersect?Je(e,r):Xe(e,r,!1,i);return o.length>0&&(o=e.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(e,t){return Qe(e,t,{intersect:!1})},point:function(e,t){return Je(e,Ge(t,e))},nearest:function(e,t,n){var r=Ge(t,e);n.axis=n.axis||"xy";var i=Ke(n.axis);return Xe(e,r,n.intersect,i)},x:function(e,t,n){var r=Ge(t,e),i=[],o=!1;return Ze(e,(function(e){e.inXRange(r.x)&&i.push(e),e.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i},y:function(e,t,n){var r=Ge(t,e),i=[],o=!1;return Ze(e,(function(e){e.inYRange(r.y)&&i.push(e),e.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i}}},tt=R.extend;function nt(e,t){return R.where(e,(function(e){return e.pos===t}))}function rt(e,t){return e.sort((function(e,n){var r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function it(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ot(e,t,n){var r,i,o=n.box,a=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,e[n.pos]+=n.size,o.getPadding){var s=o.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(r=t.outerWidth-it(a,e,"left","right"),i=t.outerHeight-it(a,e,"top","bottom"),r!==e.w||i!==e.h)return e.w=r,e.h=i,n.horizontal?r!==e.w:i!==e.h}function at(e,t){var n=t.maxPadding;return function(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}(e?["left","right"]:["top","bottom"])}function st(e,t,n){var r,i,o,a,s,l,u=[];for(r=0,i=e.length;r<i;++r)(a=(o=e[r]).box).update(o.width||t.w,o.height||t.h,at(o.horizontal,t)),ot(t,n,o)&&(l=!0,u.length&&(s=!0)),a.fullWidth||u.push(o);return s&&st(u,t,n)||l}function lt(e,t,n){var r,i,o,a,s=n.padding,l=t.x,u=t.y;for(r=0,i=e.length;r<i;++r)a=(o=e[r]).box,o.horizontal?(a.left=a.fullWidth?s.left:t.left,a.right=a.fullWidth?n.outerWidth-s.right:t.left+t.w,a.top=u,a.bottom=u+a.height,a.width=a.right-a.left,u=a.bottom):(a.left=l,a.right=l+a.width,a.top=t.top,a.bottom=t.top+t.h,a.height=a.bottom-a.top,l=a.right);t.x=l,t.y=u}I._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ut,ct={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,i=["fullWidth","position","weight"],o=i.length,a=0;a<o;++a)r=i[a],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(e,t,n){if(e){var r=e.options.layout||{},i=R.options.toPadding(r.padding),o=t-i.width,a=n-i.height,s=function(e){var t=function(e){var t,n,r,i=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],i.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return i}(e),n=rt(nt(t,"left"),!0),r=rt(nt(t,"right")),i=rt(nt(t,"top"),!0),o=rt(nt(t,"bottom"));return{leftAndTop:n.concat(i),rightAndBottom:r.concat(o),chartArea:nt(t,"chartArea"),vertical:n.concat(r),horizontal:i.concat(o)}}(e.boxes),l=s.vertical,u=s.horizontal,c=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:a/2}),d=tt({maxPadding:tt({},i),w:o,h:a,x:i.left,y:i.top},i);!function(e,t){var n,r,i;for(n=0,r=e.length;n<r;++n)(i=e[n]).width=i.horizontal?i.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,i.height=i.horizontal&&t.hBoxMaxHeight}(l.concat(u),c),st(l,d,c),st(u,d,c)&&st(l,d,c),function(e){var t=e.maxPadding;function n(n){var r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(d),lt(s.leftAndTop,d,c),d.x+=d.w,d.y+=d.h,lt(s.rightAndBottom,d,c),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},R.each(s.chartArea,(function(t){var n=t.box;tt(n,e.chartArea),n.update(d.w,d.h)}))}}},dt=(ut=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ut.default||ut,ht="$chartjs",ft="chartjs-size-monitor",pt="chartjs-render-monitor",mt=["animationstart","webkitAnimationStart"],gt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function vt(e,t){var n=R.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var _t=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function yt(e,t,n){e.addEventListener(t,n,_t)}function bt(e,t,n){e.removeEventListener(t,n,_t)}function wt(e,t,n,r,i){return{type:e,chart:t,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Lt(e){var t=document.createElement("div");return t.className=e||"",t}var Mt={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e[ht]||(e[ht]={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,dt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[ht]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var o=vt(e,"width");void 0!==o&&(e.width=o)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var a=vt(e,"height");void 0!==o&&(e.height=a)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t[ht]){var n=t[ht].initial;["height","width"].forEach((function(e){var r=n[e];R.isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)})),R.each(n.style||{},(function(e,n){t.style[n]=e})),t.width=t.width,delete t[ht]}},addEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=n[ht]||(n[ht]={});yt(r,t,(i.proxies||(i.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=gt[e.type]||e.type,r=R.getRelativePosition(e,t);return wt(n,t,r.x,r.y,e)}(t,e))})}else!function(e,t,n){var r,i,o,a,s=e[ht]||(e[ht]={}),l=s.resizer=function(e){var t=Lt(ft),n=Lt(ft+"-expand"),r=Lt(ft+"-shrink");n.appendChild(Lt()),r.appendChild(Lt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){t._reset(),e()};return yt(n,"scroll",i.bind(n,"expand")),yt(r,"scroll",i.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,i=r?r.clientWidth:0;t(wt("resize",n)),r&&r.clientWidth<i&&n.canvas&&t(wt("resize",n))}},o=!1,a=[],function(){a=Array.prototype.slice.call(arguments),i=i||this,o||(o=!0,R.requestAnimFrame.call(window,(function(){o=!1,r.apply(i,a)})))}));!function(e,t){var n=e[ht]||(e[ht]={}),r=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};R.each(mt,(function(t){yt(e,t,r)})),n.reflow=!!e.offsetParent,e.classList.add(pt)}(e,(function(){if(s.resizer){var t=e.parentNode;t&&t!==l.parentNode&&t.insertBefore(l,t.firstChild),l._reset()}}))}(r,n,e)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=((n[ht]||{}).proxies||{})[e.id+"_"+t];i&&bt(r,t,i)}else!function(e){var t=e[ht]||{},n=t.resizer;delete t.resizer,function(e){var t=e[ht]||{},n=t.renderProxy;n&&(R.each(mt,(function(t){bt(e,t,n)})),delete t.renderProxy),e.classList.remove(pt)}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}(r)}};R.addEvent=yt,R.removeEvent=bt;var kt=Mt._enabled?Mt:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},xt=R.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},kt);I._set("global",{plugins:{}});var St={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,i,o,a,s,l=this.descriptors(e),u=l.length;for(r=0;r<u;++r)if("function"==typeof(s=(o=(i=l[r]).plugin)[t])&&((a=[e].concat(n||[])).push(i.options),!1===s.apply(o,a)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],r=[],i=e&&e.config||{},o=i.options&&i.options.plugins||{};return this._plugins.concat(i.plugins||[]).forEach((function(e){if(-1===n.indexOf(e)){var t=e.id,i=o[t];!1!==i&&(!0===i&&(i=R.clone(I.global.plugins[t])),n.push(e),r.push({plugin:e,options:i||{}}))}})),t.descriptors=r,t.id=this._cacheId,r},_invalidate:function(e){delete e.$plugins}},Tt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=R.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?R.merge({},[I.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=R.extend(this.defaults[e],t))},addScalesToLayout:function(e){R.each(e.scales,(function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,ct.addBox(e,t)}))}},$t=R.valueOrDefault,Dt=R.rtl.getRtlAdapter;I._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:R.noop,title:function(e,t){var n="",r=t.labels,i=r?r.length:0;if(e.length>0){var o=e[0];o.label?n=o.label:o.xLabel?n=o.xLabel:i>0&&o.index<i&&(n=r[o.index])}return n},afterTitle:R.noop,beforeBody:R.noop,beforeLabel:R.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),R.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:R.noop,afterBody:R.noop,beforeFooter:R.noop,footer:R.noop,afterFooter:R.noop}}});var Ct={average:function(e){if(!e.length)return!1;var t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){var a=e[t];if(a&&a.hasValue()){var s=a.tooltipPosition();r+=s.x,i+=s.y,++o}}return{x:r/o,y:i/o}},nearest:function(e,t){var n,r,i,o=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var l=e[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),c=R.distanceBetweenPoints(t,u);c<s&&(s=c,i=l)}}if(i){var d=i.tooltipPosition();o=d.x,a=d.y}return{x:o,y:a}}};function Et(e,t){return t&&(R.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function At(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Pt(e){var t=I.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:$t(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:$t(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:$t(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:$t(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:$t(e.titleFontStyle,t.defaultFontStyle),titleFontSize:$t(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:$t(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:$t(e.footerFontStyle,t.defaultFontStyle),footerFontSize:$t(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Yt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ot(e){return Et([],At(e))}var It=q.extend({initialize:function(){this._model=Pt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),i=n.title.apply(e,arguments),o=n.afterTitle.apply(e,arguments),a=[];return a=Et(a,At(r)),a=Et(a,At(i)),Et(a,At(o))},getBeforeBody:function(){return Ot(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,i=[];return R.each(e,(function(e){var o={before:[],lines:[],after:[]};Et(o.before,At(r.beforeLabel.call(n,e,t))),Et(o.lines,r.label.call(n,e,t)),Et(o.after,At(r.afterLabel.call(n,e,t))),i.push(o)})),i},getAfterBody:function(){return Ot(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),i=t.afterFooter.apply(e,arguments),o=[];return o=Et(o,At(n)),o=Et(o,At(r)),Et(o,At(i))},update:function(e){var t,n,r,i,o,a,s,l,u,c,d=this,h=d._options,f=d._model,p=d._model=Pt(h),m=d._active,g=d._data,v={xAlign:f.xAlign,yAlign:f.yAlign},_={x:f.x,y:f.y},y={width:f.width,height:f.height},b={x:f.caretX,y:f.caretY};if(m.length){p.opacity=1;var w=[],L=[];b=Ct[h.position].call(d,m,d._eventPosition);var M=[];for(t=0,n=m.length;t<n;++t)M.push((i=void 0,o=void 0,l=void 0,u=void 0,c=void 0,i=(r=m[t])._xScale,o=r._yScale||r._scale,a=r._index,s=r._datasetIndex,u=(l=r._chart.getDatasetMeta(s).controller)._getIndexScale(),c=l._getValueScale(),{xLabel:i?i.getLabelForIndex(a,s):"",yLabel:o?o.getLabelForIndex(a,s):"",label:u?""+u.getLabelForIndex(a,s):"",value:c?""+c.getLabelForIndex(a,s):"",index:a,datasetIndex:s,x:r._model.x,y:r._model.y}));h.filter&&(M=M.filter((function(e){return h.filter(e,g)}))),h.itemSort&&(M=M.sort((function(e,t){return h.itemSort(e,t,g)}))),R.each(M,(function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),L.push(h.callbacks.labelTextColor.call(d,e,d._chart))})),p.title=d.getTitle(M,g),p.beforeBody=d.getBeforeBody(M,g),p.body=d.getBody(M,g),p.afterBody=d.getAfterBody(M,g),p.footer=d.getFooter(M,g),p.x=b.x,p.y=b.y,p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=L,p.dataPoints=M,_=function(e,t,n,r){var i=e.x,o=e.y,a=e.caretSize,s=e.caretPadding,l=e.cornerRadius,u=n.xAlign,c=n.yAlign,d=a+s,h=l+s;return"right"===u?i-=t.width:"center"===u&&((i-=t.width/2)+t.width>r.width&&(i=r.width-t.width),i<0&&(i=0)),"top"===c?o+=d:o-="bottom"===c?t.height+d:t.height/2,"center"===c?"left"===u?i+=d:"right"===u&&(i-=d):"left"===u?i-=h:"right"===u&&(i+=h),{x:i,y:o}}(p,y=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,i=0,o=t.body,a=o.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);a+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,l=t.footer.length,u=t.titleFontSize,c=t.bodyFontSize,d=t.footerFontSize;r+=s*u,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=a*c,r+=a?(a-1)*t.bodySpacing:0,r+=l?t.footerMarginTop:0,r+=l*d,r+=l?(l-1)*t.footerSpacing:0;var h=0,f=function(e){i=Math.max(i,n.measureText(e).width+h)};return n.font=R.fontString(u,t._titleFontStyle,t._titleFontFamily),R.each(t.title,f),n.font=R.fontString(c,t._bodyFontStyle,t._bodyFontFamily),R.each(t.beforeBody.concat(t.afterBody),f),h=t.displayColors?c+2:0,R.each(o,(function(e){R.each(e.before,f),R.each(e.lines,f),R.each(e.after,f)})),h=0,n.font=R.fontString(d,t._footerFontStyle,t._footerFontFamily),R.each(t.footer,f),{width:i+=2*t.xPadding,height:r}}(this,p),v=function(e,t){var n,r,i,o,a,s=e._model,l=e._chart,u=e._chart.chartArea,c="center",d="center";s.y<t.height?d="top":s.y>l.height-t.height&&(d="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===d?(n=function(e){return e<=h},r=function(e){return e>h}):(n=function(e){return e<=t.width/2},r=function(e){return e>=l.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>l.width},o=function(e){return e-t.width-s.caretSize-s.caretPadding<0},a=function(e){return e<=f?"top":"bottom"},n(s.x)?(c="left",i(s.x)&&(c="center",d=a(s.y))):r(s.x)&&(c="right",o(s.x)&&(c="center",d=a(s.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:d}}(this,y),d._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=_.x,p.y=_.y,p.width=y.width,p.height=y.height,p.caretX=b.x,p.caretY=b.y,d._model=p,e&&h.custom&&h.custom.call(d,p),d},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(e,t,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var r,i,o,a,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=e.x,p=e.y,m=t.width,g=t.height;if("center"===h)s=p+g/2,"left"===d?(i=(r=f)-u,o=r,a=s+u,l=s-u):(i=(r=f+m)+u,o=r,a=s-u,l=s+u);else if("left"===d?(r=(i=f+c+u)-u,o=i+u):"right"===d?(r=(i=f+m-c-u)-u,o=i+u):(r=(i=n.caretX)-u,o=i+u),"top"===h)s=(a=p)-u,l=a;else{s=(a=p+g)+u,l=a;var v=o;o=r,r=v}return{x1:r,x2:i,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(e,t,n){var r,i,o,a=t.title,s=a.length;if(s){var l=Dt(t.rtl,t.x,t.width);for(e.x=Yt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,i=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=R.fontString(r,t._titleFontStyle,t._titleFontFamily),o=0;o<s;++o)n.fillText(a[o],l.x(e.x),e.y+r/2),e.y+=r+i,o+1===s&&(e.y+=t.titleMarginBottom-i)}},drawBody:function(e,t,n){var r,i,o,a,s,l,u,c,d=t.bodyFontSize,h=t.bodySpacing,f=t._bodyAlign,p=t.body,m=t.displayColors,g=0,v=m?Yt(t,"left"):0,_=Dt(t.rtl,t.x,t.width),y=function(t){n.fillText(t,_.x(e.x+g),e.y+d/2),e.y+=d+h},b=_.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=R.fontString(d,t._bodyFontStyle,t._bodyFontFamily),e.x=Yt(t,b),n.fillStyle=t.bodyFontColor,R.each(t.beforeBody,y),g=m&&"right"!==b?"center"===f?d/2+1:d+2:0,s=0,u=p.length;s<u;++s){for(r=p[s],i=t.labelTextColors[s],o=t.labelColors[s],n.fillStyle=i,R.each(r.before,y),l=0,c=(a=r.lines).length;l<c;++l){if(m){var w=_.x(v);n.fillStyle=t.legendColorBackground,n.fillRect(_.leftForLtr(w,d),e.y,d,d),n.lineWidth=1,n.strokeStyle=o.borderColor,n.strokeRect(_.leftForLtr(w,d),e.y,d,d),n.fillStyle=o.backgroundColor,n.fillRect(_.leftForLtr(_.xPlus(w,1),d-2),e.y+1,d-2,d-2),n.fillStyle=i}y(a[l])}R.each(r.after,y)}g=0,R.each(t.afterBody,y),e.y-=h},drawFooter:function(e,t,n){var r,i,o=t.footer,a=o.length;if(a){var s=Dt(t.rtl,t.x,t.width);for(e.x=Yt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=R.fontString(r,t._footerFontStyle,t._footerFontFamily),i=0;i<a;++i)n.fillText(o[i],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var i=t.xAlign,o=t.yAlign,a=e.x,s=e.y,l=r.width,u=r.height,c=t.cornerRadius;n.beginPath(),n.moveTo(a+c,s),"top"===o&&this.drawCaret(e,r),n.lineTo(a+l-c,s),n.quadraticCurveTo(a+l,s,a+l,s+c),"center"===o&&"right"===i&&this.drawCaret(e,r),n.lineTo(a+l,s+u-c),n.quadraticCurveTo(a+l,s+u,a+l-c,s+u),"bottom"===o&&this.drawCaret(e,r),n.lineTo(a+c,s+u),n.quadraticCurveTo(a,s+u,a,s+u-c),"center"===o&&"left"===i&&this.drawCaret(e,r),n.lineTo(a,s+c),n.quadraticCurveTo(a,s,a+c,s),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,o=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(r,t,e,n),r.y+=t.yPadding,R.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),R.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!R.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),jt=Ct,Bt=It;Bt.positioners=jt;var Ht=R.valueOrDefault;function Nt(){return R.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var i,o,a,s=n[e].length;for(t[e]||(t[e]=[]),i=0;i<s;++i)a=n[e][i],o=Ht(a.type,"xAxes"===e?"category":"linear"),i>=t[e].length&&t[e].push({}),!t[e][i].type||a.type&&a.type!==t[e][i].type?R.merge(t[e][i],[Tt.getScaleDefaults(o),a]):R.merge(t[e][i],a)}else R._merger(e,t,n,r)}})}function Rt(){return R.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){var i=t[e]||{},o=n[e];"scales"===e?t[e]=Nt(i,o):"scale"===e?t[e]=R.merge(i,[Tt.getScaleDefaults(o.type),o]):R._merger(e,t,n,r)}})}function zt(e){var t=e.options;R.each(e.scales,(function(t){ct.removeBox(e,t)})),t=Rt(I.global,I[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Ft(e,t,n){var r,i=function(e){return e.id===r};do{r=t+n++}while(R.findIndex(e,i)>=0);return r}function Vt(e){return"top"===e||"bottom"===e}function Wt(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}I._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ut=function(e,t){return this.construct(e,t),this};R.extend(Ut.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Rt(I.global,I[e.type],e.options||{}),e}(t);var r=xt.acquireContext(e,t),i=r&&r.canvas,o=i&&i.height,a=i&&i.width;n.id=R.uid(),n.ctx=r,n.canvas=i,n.config=t,n.width=a,n.height=o,n.aspectRatio=o?a/o:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ut.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return St.notify(e,"beforeInit"),R.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),St.notify(e,"afterInit"),e},clear:function(){return R.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,i=n.maintainAspectRatio&&t.aspectRatio||null,o=Math.max(0,Math.floor(R.getMaximumWidth(r))),a=Math.max(0,Math.floor(i?o/i:R.getMaximumHeight(r)));if((t.width!==o||t.height!==a)&&(r.width=t.width=o,r.height=t.height=a,r.style.width=o+"px",r.style.height=a+"px",R.retinaScale(t,n.devicePixelRatio),!e)){var s={width:o,height:a};St.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;R.each(t.xAxes,(function(e,n){e.id||(e.id=Ft(t.xAxes,"x-axis-",n))})),R.each(t.yAxes,(function(e,n){e.id||(e.id=Ft(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],i=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),R.each(r,(function(t){var r=t.options,o=r.id,a=Ht(r.type,t.dtype);Vt(r.position)!==Vt(t.dposition)&&(r.position=t.dposition),i[o]=!0;var s=null;if(o in n&&n[o].type===a)(s=n[o]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=Tt.getScaleConstructor(a);if(!l)return;s=new l({id:o,type:a,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),R.each(i,(function(e,t){e||delete n[t]})),e.scales=n,Tt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],i=n.data.datasets;for(e=0,t=i.length;e<t;e++){var o=i[e],a=n.getDatasetMeta(e),s=o.type||n.config.type;if(a.type&&a.type!==s&&(n.destroyDatasetMeta(e),a=n.getDatasetMeta(e)),a.type=s,a.order=o.order||0,a.index=e,a.controller)a.controller.updateIndex(e),a.controller.linkScales();else{var l=qe[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(n,e),r.push(a.controller)}}return r},resetElements:function(){var e=this;R.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),zt(r),St._invalidate(r),!1!==St.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var i=r.buildOrUpdateControllers();for(t=0,n=r.data.datasets.length;t<n;t++)r.getDatasetMeta(t).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&R.each(i,(function(e){e.reset()})),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],St.notify(r,"afterUpdate"),r._layers.sort(Wt("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:r.render(e)}},updateLayout:function(){var e=this;!1!==St.notify(e,"beforeLayout")&&(ct.update(this,this.width,this.height),e._layers=[],R.each(e.boxes,(function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())}),e),e._layers.forEach((function(e,t){e._idx=t})),St.notify(e,"afterScaleUpdate"),St.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==St.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);St.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==St.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),St.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=Ht(e.duration,n&&n.duration),i=e.lazy;if(!1!==St.notify(t,"beforeRender")){var o=function(e){St.notify(t,"afterRender"),R.callback(n&&n.onComplete,[e],t)};if(n&&r){var a=new Z({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=R.easing.effects[t.easing],r=t.currentStep,i=r/t.numSteps;e.draw(n(i),i,r)},onAnimationProgress:n.onProgress,onAnimationComplete:o});J.addAnimation(t,a,r,i)}else t.draw(),o(new Z({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),R.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==St.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),St.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Wt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==St.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(t[n],e);St.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==St.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),St.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==St.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),St.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return et.modes.single(this,e)},getElementsAtEvent:function(e){return et.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return et.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=et.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return et.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),R.canvas.clear(n),xt.releaseContext(n.ctx),n.canvas=null,n.ctx=null),St.notify(n,"destroy"),delete Ut.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Bt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};R.each(e.options.events,(function(r){xt.addEventListener(e,r,n),t[r]=n})),e.options.responsive&&(n=function(){e.resize()},xt.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,R.each(t,(function(t,n){xt.removeEventListener(e,n,t)})))},updateHoverStyle:function(e,t,n){var r,i,o,a=n?"set":"remove";for(i=0,o=e.length;i<o;++i)(r=e[i])&&this.getDatasetMeta(r._datasetIndex).controller[a+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==St.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),St.notify(t,"afterEvent",[e]);var i=t._bufferedRequest;return i?t.render(i):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},i=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,i.mode,i),R.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),
-n.lastActive.length&&n.updateHoverStyle(n.lastActive,i.mode,!1),n.active.length&&i.mode&&n.updateHoverStyle(n.active,i.mode,!0),t=!R.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Ut.instances={};var qt=Ut;function Gt(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Zt(e){this.options=e||{}}Ut.Controller=Ut,Ut.types={},R.configMerge=Rt,R.scaleMerge=Nt,R.extend(Zt.prototype,{formats:Gt,parse:Gt,format:Gt,add:Gt,diff:Gt,startOf:Gt,endOf:Gt,_create:function(e){return e}}),Zt.override=function(e){R.extend(Zt.prototype,e)};var Jt={_date:Zt},Xt={formatters:{values:function(e){return R.isArray(e)?e:""+e},linear:function(e,t,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var i=R.log10(Math.abs(r)),o="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var a=R.log10(Math.abs(e)),s=Math.floor(a)-Math.floor(i);s=Math.max(Math.min(s,20),0),o=e.toExponential(s)}else{var l=-1*Math.floor(i);l=Math.max(Math.min(l,20),0),o=e.toFixed(l)}else o="0";return o},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(R.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},Kt=R.isArray,Qt=R.isNullOrUndef,en=R.valueOrDefault,tn=R.valueAtIndexOrDefault;function nn(e,t,n){var r,i=e.getTicks().length,o=Math.min(t,i-1),a=e.getPixelForTick(o),s=e._startPixel,l=e._endPixel;if(!(n&&(r=1===i?Math.max(a-s,l-a):0===t?(e.getPixelForTick(1)-a)/2:(a-e.getPixelForTick(o-1))/2,(a+=o<t?r:-r)<s-1e-6||a>l+1e-6)))return a}function rn(e){return e.drawTicks?e.tickMarkLength:0}function on(e){var t,n;return e.display?(t=R.options._parseFont(e),n=R.options.toPadding(e.padding),t.lineHeight+n.height):0}function an(e,t){return R.extend(R.options._parseFont({fontFamily:en(t.fontFamily,e.fontFamily),fontSize:en(t.fontSize,e.fontSize),fontStyle:en(t.fontStyle,e.fontStyle),lineHeight:en(t.lineHeight,e.lineHeight)}),{color:R.options.resolve([t.fontColor,e.fontColor,I.global.defaultFontColor])})}function sn(e){var t=an(e,e.minor);return{minor:t,major:e.major.enabled?an(e,e.major):t}}function ln(e){var t,n,r,i=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&i.push(t);return i}function un(e,t,n,r){var i,o,a,s,l=en(n,0),u=Math.min(en(r,e.length),e.length),c=0;for(t=Math.ceil(t),r&&(t=(i=r-n)/Math.floor(i/t)),s=l;s<0;)c++,s=Math.round(l+c*t);for(o=Math.max(l,0);o<u;o++)a=e[o],o===s?(a._index=o,c++,s=Math.round(l+c*t)):delete a.label}I._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Xt.formatters.values,minor:{},major:{}}});var cn=q.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){R.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,i,o,a,s,l=this,u=l.options.ticks,c=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=R.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],(!(a=l.afterBuildTicks(a)||a)||!a.length)&&l.ticks)for(a=[],r=0,i=l.ticks.length;r<i;++r)a.push({value:l.ticks[r],major:!1});return l._ticks=a,s=c<a.length,o=l._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,i=0,o=e.length;i<o;i+=r)n.push(e[Math.floor(i)]);return n}(a,c):a),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(a):a,s&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){R.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){R.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){R.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){R.callback(this.options.beforeDataLimits,[this])},determineDataLimits:R.noop,afterDataLimits:function(){R.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){R.callback(this.options.beforeBuildTicks,[this])},buildTicks:R.noop,afterBuildTicks:function(e){var t=this;return Kt(e)&&e.length?R.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=R.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){R.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){R.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){R.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,i,o,a,s=this,l=s.options,u=l.ticks,c=s.getTicks().length,d=u.minRotation||0,h=u.maxRotation,f=d;!s._isVisible()||!u.display||d>=h||c<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(i=l.offset?s.maxWidth/c:r/(c-1))&&(i=r/(c-(l.offset?.5:1)),o=s.maxHeight-rn(l.gridLines)-u.padding-on(l.scaleLabel),a=Math.sqrt(t*t+n*n),f=R.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/i,1)),Math.asin(Math.min(o/a,1))-Math.asin(n/a))),f=Math.max(d,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){R.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){R.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,i=r.ticks,o=r.scaleLabel,a=r.gridLines,s=e._isVisible(),l="bottom"===r.position,u=e.isHorizontal();if(u?t.width=e.maxWidth:s&&(t.width=rn(a)+on(o)),u?s&&(t.height=rn(a)+on(o)):t.height=e.maxHeight,i.display&&s){var c=sn(i),d=e._getLabelSizes(),h=d.first,f=d.last,p=d.widest,m=d.highest,g=.4*c.minor.lineHeight,v=i.padding;if(u){var _=0!==e.labelRotation,y=R.toRadians(e.labelRotation),b=Math.cos(y),w=Math.sin(y),L=w*p.width+b*(m.height-(_?m.offset:0))+(_?0:g);t.height=Math.min(e.maxHeight,t.height+L+v);var M,k,x=e.getPixelForTick(0)-e.left,S=e.right-e.getPixelForTick(e.getTicks().length-1);_?(M=l?b*h.width+w*h.offset:w*(h.height-h.offset),k=l?w*(f.height-f.offset):b*f.width+w*f.offset):(M=h.width/2,k=f.width/2),e.paddingLeft=Math.max((M-x)*e.width/(e.width-x),0)+3,e.paddingRight=Math.max((k-S)*e.width/(e.width-S),0)+3}else{var T=i.mirror?0:p.width+v+g;t.width=Math.min(e.maxWidth,t.width+T),e.paddingTop=h.height/2,e.paddingBottom=f.height/2}}e.handleMargins(),u?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){R.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Qt(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,i=this;for(i.ticks=e.map((function(e){return e.value})),i.beforeTickToLabelConversion(),t=i.convertTicksToLabels(e)||i.ticks,i.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=function(e,t,n,r){var i,o,a,s,l,u,c,d,h,f,p,m,g,v=n.length,_=[],y=[],b=[];for(i=0;i<v;++i){if(s=n[i].label,l=n[i].major?t.major:t.minor,e.font=u=l.string,c=r[u]=r[u]||{data:{},gc:[]},d=l.lineHeight,h=f=0,Qt(s)||Kt(s)){if(Kt(s))for(o=0,a=s.length;o<a;++o)p=s[o],Qt(p)||Kt(p)||(h=R.measureText(e,c.data,c.gc,h,p),f+=d)}else h=R.measureText(e,c.data,c.gc,h,s),f=d;_.push(h),y.push(f),b.push(d/2)}function w(e){return{width:_[e]||0,height:y[e]||0,offset:b[e]||0}}return function(e,t){R.each(e,(function(e){var n,r=e.gc,i=r.length/2;if(i>t){for(n=0;n<i;++n)delete e.data[r[n]];r.splice(0,i)}}))}(r,v),m=_.indexOf(Math.max.apply(null,_)),g=y.indexOf(Math.max.apply(null,y)),{first:w(0),last:w(v-1),widest:w(m),highest:w(g)}}(e.ctx,sn(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,r,i;return Kt(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),i=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),r=e,i=e),{min:r,max:i,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:R.noop,getPixelForValue:R.noop,getValueForPixel:R.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||e>n-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,i,o=this.options.ticks,a=this._length,s=o.maxTicksLimit||a/this._tickSize()+1,l=o.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],u=l.length,c=l[0],d=l[u-1];if(u>s)return function(e,t,n){var r,i,o=0,a=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)i=e[r],r===a?(i._index=r,a=t[++o*n]):delete i.label}(e,l,u/s),ln(e);if(r=function(e,t,n,r){var i,o,a,s,l=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),u=(t.length-1)/r;if(!l)return Math.max(u,1);for(a=0,s=(i=R.math._factorize(l)).length-1;a<s;a++)if((o=i[a])>u)return o;return Math.max(u,1)}(l,e,0,s),u>0){for(t=0,n=u-1;t<n;t++)un(e,r,l[t],l[t+1]);return i=u>1?(d-c)/(u-1):null,un(e,r,R.isNullOrUndef(i)?0:c-i,c),un(e,r,d,R.isNullOrUndef(i)?e.length:d+i),ln(e)}return un(e,r),ln(e)},_tickSize:function(){var e=this.options.ticks,t=R.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r},_isVisible:function(){var e,t,n,r=this.chart,i=this.options.display;if("auto"!==i)return!!i;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,i,o,a,s,l,u,c,d,h,f,p,m,g,v,_=this,y=_.chart,b=_.options,w=b.gridLines,L=b.position,M=w.offsetGridLines,k=_.isHorizontal(),x=_._ticksToDraw,S=x.length+(M?1:0),T=rn(w),$=[],D=w.drawBorder?tn(w.lineWidth,0,0):0,C=D/2,E=R._alignPixel,A=function(e){return E(y,e,D)};for("top"===L?(t=A(_.bottom),s=_.bottom-T,u=t-C,d=A(e.top)+C,f=e.bottom):"bottom"===L?(t=A(_.top),d=e.top,f=A(e.bottom)-C,s=t+C,u=_.top+T):"left"===L?(t=A(_.right),a=_.right-T,l=t-C,c=A(e.left)+C,h=e.right):(t=A(_.left),c=e.left,h=A(e.right)-C,a=t+C,l=_.left+T),n=0;n<S;++n)r=x[n]||{},Qt(r.label)&&n<x.length||(n===_.zeroLineIndex&&b.offset===M?(p=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],v=w.zeroLineBorderDashOffset||0):(p=tn(w.lineWidth,n,1),m=tn(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],v=w.borderDashOffset||0),void 0!==(i=nn(_,r._index||n,M))&&(o=E(y,i,p),k?a=l=c=h=o:s=u=d=f=o,$.push({tx1:a,ty1:s,tx2:l,ty2:u,x1:c,y1:d,x2:h,y2:f,width:p,color:m,borderDash:g,borderDashOffset:v})));return $.ticksLength=S,$.borderValue=t,$},_computeLabelItems:function(){var e,t,n,r,i,o,a,s,l,u,c,d,h=this,f=h.options,p=f.ticks,m=f.position,g=p.mirror,v=h.isHorizontal(),_=h._ticksToDraw,y=sn(p),b=p.padding,w=rn(f.gridLines),L=-R.toRadians(h.labelRotation),M=[];for("top"===m?(o=h.bottom-w-b,a=L?"left":"center"):"bottom"===m?(o=h.top+w+b,a=L?"right":"center"):"left"===m?(i=h.right-(g?0:w)-b,a=g?"left":"right"):(i=h.left+(g?0:w)+b,a=g?"right":"left"),e=0,t=_.length;e<t;++e)r=(n=_[e]).label,Qt(r)||(s=h.getPixelForTick(n._index||e)+p.labelOffset,u=(l=n.major?y.major:y.minor).lineHeight,c=Kt(r)?r.length:1,v?(i=s,d="top"===m?((L?1:.5)-c)*u:(L?0:.5)*u):(o=s,d=(1-c)*u/2),M.push({x:i,y:o,rotation:L,label:r,font:l,textOffset:d,textAlign:a}));return M},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,i,o,a,s,l=t.ctx,u=t.chart,c=R._alignPixel,d=n.drawBorder?tn(n.lineWidth,0,0):0,h=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(o=0,a=h.length;o<a;++o)r=(s=h[o]).width,i=s.color,r&&i&&(l.save(),l.lineWidth=r,l.strokeStyle=i,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var f,p,m,g,v=d,_=tn(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;t.isHorizontal()?(f=c(u,t.left,v)-v/2,p=c(u,t.right,_)+_/2,m=g=y):(m=c(u,t.top,v)-v/2,g=c(u,t.bottom,_)+_/2,f=p=y),l.lineWidth=d,l.strokeStyle=tn(n.color,0),l.beginPath(),l.moveTo(f,m),l.lineTo(p,g),l.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,r,i,o,a,s,l,u=e.ctx,c=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,r=c.length;t<r;++t){if(a=(o=c[t]).font,u.save(),u.translate(o.x,o.y),u.rotate(o.rotation),u.font=a.string,u.fillStyle=a.color,u.textBaseline="middle",u.textAlign=o.textAlign,s=o.label,l=o.textOffset,Kt(s))for(n=0,i=s.length;n<i;++n)u.fillText(""+s[n],0,l),l+=a.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var i,o,a=en(r.fontColor,I.global.defaultFontColor),s=R.options._parseFont(r),l=R.options.toPadding(r.padding),u=s.lineHeight/2,c=n.position,d=0;if(e.isHorizontal())i=e.left+e.width/2,o="bottom"===c?e.bottom-u-l.bottom:e.top+u+l.top;else{var h="left"===c;i=h?e.left+u+l.top:e.right-u-l.top,o=e.top+e.height/2,d=h?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(i,o),t.rotate(d),t.textAlign="center",t.textBaseline="middle",t.fillStyle=a,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter((function(r){return(!e||r.type===e)&&(n?r.xAxisID===t.id:r.yAxisID===t.id)}))}});cn.prototype._draw=cn.prototype.draw;var dn=cn,hn=R.isNullOrUndef,fn=dn.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),r=t.options.ticks,i=r.min,o=r.max,a=0,s=n.length-1;void 0!==i&&(e=n.indexOf(i))>=0&&(a=e),void 0!==o&&(e=n.indexOf(o))>=0&&(s=e),t.minIndex=a,t.maxIndex=s,t.min=n[a],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;dn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,i,o,a=this;return hn(t)||hn(n)||(e=a.chart.data.datasets[n].data[t]),hn(e)||(r=a.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=R.valueOrDefault(r,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}});fn._defaults={position:"bottom"};var pn=R.noop,mn=R.isNullOrUndef,gn=dn.extend({getRightValue:function(e){return"string"==typeof e?+e:dn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=R.sign(e.min),r=R.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var i=void 0!==t.min||void 0!==t.suggestedMin,o=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:pn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:R.valueOrDefault(t.fixedStepSize,t.stepSize)},i=e.ticks=function(e,t){var n,r,i,o,a=[],s=e.stepSize,l=s||1,u=e.maxTicks-1,c=e.min,d=e.max,h=e.precision,f=t.min,p=t.max,m=R.niceNum((p-f)/u/l)*l;if(m<1e-14&&mn(c)&&mn(d))return[f,p];(o=Math.ceil(p/m)-Math.floor(f/m))>u&&(m=R.niceNum(o*m/u/l)*l),s||mn(h)?n=Math.pow(10,R._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),r=Math.floor(f/m)*m,i=Math.ceil(p/m)*m,s&&(!mn(c)&&R.almostWhole(c/m,m/1e3)&&(r=c),!mn(d)&&R.almostWhole(d/m,m/1e3)&&(i=d)),o=(i-r)/m,o=R.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),r=Math.round(r*n)/n,i=Math.round(i*n)/n,a.push(mn(c)?r:c);for(var g=1;g<o;++g)a.push(Math.round((r+g*m)*n)/n);return a.push(mn(d)?i:d),a}(r,e);e.handleDirectionalChanges(),e.max=R.max(i),e.min=R.min(i),t.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),dn.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),r=t.min,i=t.max;dn.prototype._configure.call(t),t.options.offset&&n.length&&(r-=e=(i-r)/Math.max(n.length-1,1)/2,i+=e),t._startValue=r,t._endValue=i,t._valueRange=i-r}}),vn={position:"left",ticks:{callback:Xt.formatters.linear}};function _n(e,t,n,r){var i,o,a=e.options,s=function(e,t,n){var r=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}(t,a.stacked,n),l=s.pos,u=s.neg,c=r.length;for(i=0;i<c;++i)o=e._parseValue(r[i]),isNaN(o.min)||isNaN(o.max)||n.data[i].hidden||(l[i]=l[i]||0,u[i]=u[i]||0,a.relativePoints?l[i]=100:o.min<0||o.max<0?u[i]+=o.min:l[i]+=o.max)}function yn(e,t,n){var r,i,o=n.length;for(r=0;r<o;++r)i=e._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||t.data[r].hidden||(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var bn=gn.extend({determineDataLimits:function(){var e,t,n,r,i=this,o=i.options,a=i.chart.data.datasets,s=i._getMatchingVisibleMetas(),l=o.stacked,u={},c=s.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===l)for(e=0;!l&&e<c;++e)l=void 0!==(t=s[e]).stack;for(e=0;e<c;++e)n=a[(t=s[e]).index].data,l?_n(i,u,t,n):yn(i,t,n);R.each(u,(function(e){r=e.pos.concat(e.neg),i.min=Math.min(i.min,R.min(r)),i.max=Math.max(i.max,R.max(r))})),i.min=R.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=R.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=R.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),wn=vn;bn._defaults=wn;var Ln=R.valueOrDefault,Mn=R.math.log10,kn={position:"left",ticks:{callback:Xt.formatters.logarithmic}};function xn(e,t){return R.isFinite(e)&&e>=0?e:t}var Sn=dn.extend({determineDataLimits:function(){var e,t,n,r,i,o,a=this,s=a.options,l=a.chart,u=l.data.datasets,c=a.isHorizontal();function d(e){return c?e.xAxisID===a.id:e.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(e=0;e<u.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t)&&void 0!==t.stack){h=!0;break}if(s.stacked||h){var f={};for(e=0;e<u.length;e++){var p=[(t=l.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(l.isDatasetVisible(e)&&d(t))for(void 0===f[p]&&(f[p]=[]),i=0,o=(r=u[e].data).length;i<o;i++){var m=f[p];n=a._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(m[i]=m[i]||0,m[i]+=n.max)}}R.each(f,(function(e){if(e.length>0){var t=R.min(e),n=R.max(e);a.min=Math.min(a.min,t),a.max=Math.max(a.max,n)}}))}else for(e=0;e<u.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t))for(i=0,o=(r=u[e].data).length;i<o;i++)n=a._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(a.min=Math.min(n.min,a.min),a.max=Math.max(n.max,a.max),0!==n.min&&(a.minNotZero=Math.min(n.min,a.minNotZero)));a.min=R.isFinite(a.min)?a.min:null,a.max=R.isFinite(a.max)?a.max:null,a.minNotZero=R.isFinite(a.minNotZero)?a.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=xn(t.min,e.min),e.max=xn(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(Mn(e.min))-1),e.max=Math.pow(10,Math.floor(Mn(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(Mn(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(Mn(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Mn(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:xn(t.min),max:xn(t.max)},i=e.ticks=function(e,t){var n,r,i=[],o=Ln(e.min,Math.pow(10,Math.floor(Mn(t.min)))),a=Math.floor(Mn(t.max)),s=Math.ceil(t.max/Math.pow(10,a));0===o?(n=Math.floor(Mn(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),i.push(o),o=r*Math.pow(10,n)):(n=Math.floor(Mn(o)),r=Math.floor(o/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{i.push(o),10==++r&&(r=1,l=++n>=0?1:l),o=Math.round(r*Math.pow(10,n)*l)/l}while(n<a||n===a&&r<s);var u=Ln(e.max,o);return i.push(u),i}(r,e);e.max=R.max(i),e.min=R.min(i),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),dn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Mn(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;dn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Ln(e.options.ticks.fontSize,I.global.defaultFontSize)/e._length),e._startValue=Mn(t),e._valueOffset=n,e._valueRange=(Mn(e.max)-Mn(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(Mn(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),Tn=kn;Sn._defaults=Tn;var $n=R.valueOrDefault,Dn=R.valueAtIndexOrDefault,Cn=R.options.resolve,En={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Xt.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function An(e){var t=e.ticks;return t.display&&e.display?$n(t.fontSize,I.global.defaultFontSize)+2*t.backdropPaddingY:0}function Pn(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function Yn(e){return 0===e||180===e?"center":e<180?"left":"right"}function On(e,t,n,r){var i,o,a=n.y+r/2;if(R.isArray(t))for(i=0,o=t.length;i<o;++i)e.fillText(t[i],n.x,a),a+=r;else e.fillText(t,n.x,a)}function In(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function jn(e){return R.isNumber(e)?e:0}var Bn=gn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=An(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;R.each(t.data.datasets,(function(i,o){if(t.isDatasetVisible(o)){var a=t.getDatasetMeta(o);R.each(i.data,(function(t,i){var o=+e.getRightValue(t);isNaN(o)||a.data[i].hidden||(n=Math.min(o,n),r=Math.max(o,r))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/An(this.options))},convertTicksToLabels:function(){var e=this;gn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=R.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,i=R.options._parseFont(e.options.pointLabels),o={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=i.string,e._pointLabelSizes=[];var s,l,u,c=e.chart.data.labels.length;for(t=0;t<c;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,l=i.lineHeight,u=e.pointLabels[t],n=R.isArray(u)?{w:R.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=R.toDegrees(d)%360,f=Pn(h,r.x,n.w,0,180),p=Pn(h,r.y,n.h,90,270);f.start<o.l&&(o.l=f.start,a.l=d),f.end>o.r&&(o.r=f.end,a.r=d),p.start<o.t&&(o.t=p.start,a.t=d),p.end>o.b&&(o.b=p.end,a.b=d)}e.setReductions(e.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,i=t.l/Math.sin(n.l),o=Math.max(t.r-r.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=jn(i),o=jn(o),a=jn(a),s=jn(s),r.drawingArea=Math.min(Math.floor(e-(i+o)/2),Math.floor(e-(a+s)/2)),r.setCenterPoint(i,o,a,s)},setCenterPoint:function(e,t,n,r){var i=this,o=i.width-t-i.drawingArea,a=e+i.drawingArea,s=n+i.drawingArea,l=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+l)/2+i.top+i.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(R.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,i=r.ctx,o=r.options,a=o.gridLines,s=o.angleLines,l=$n(s.lineWidth,a.lineWidth),u=$n(s.color,a.color);if(o.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,i=An(n),o=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),a=R.options._parseFont(r);t.save(),t.font=a.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var l=0===s?i/2:0,u=e.getPointPosition(s,o+l+5),c=Dn(r.fontColor,s,I.global.defaultFontColor);t.fillStyle=c;var d=e.getIndexAngle(s),h=R.toDegrees(d);t.textAlign=Yn(h),In(h,e._pointLabelSizes[s],u),On(t,e.pointLabels[s],u,a.lineHeight)}t.restore()}(r),a.display&&R.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var i,o=e.ctx,a=t.circular,s=e.chart.data.labels.length,l=Dn(t.color,r-1),u=Dn(t.lineWidth,r-1);if((a||s)&&l&&u){if(o.save(),o.strokeStyle=l,o.lineWidth=u,o.setLineDash&&(o.setLineDash(t.borderDash||[]),o.lineDashOffset=t.borderDashOffset||0),o.beginPath(),a)o.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{i=e.getPointPosition(0,n),o.moveTo(i.x,i.y);for(var c=1;c<s;c++)i=e.getPointPosition(c,n),o.lineTo(i.x,i.y)}o.closePath(),o.stroke(),o.restore()}}(r,a,t,n))})),s.display&&l&&u){for(i.save(),i.lineWidth=l,i.strokeStyle=u,i.setLineDash&&(i.setLineDash(Cn([s.borderDash,a.borderDash,[]])),i.lineDashOffset=Cn([s.borderDashOffset,a.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,i,o=e.getIndexAngle(0),a=R.options._parseFont(n),s=$n(n.fontColor,I.global.defaultFontColor);t.save(),t.font=a.string,t.translate(e.xCenter,e.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",R.each(e.ticks,(function(o,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(i=t.measureText(o).width,t.fillStyle=n.backdropColor,t.fillRect(-i/2-n.backdropPaddingX,-r-a.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,a.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(o,0,-r))})),t.restore()}},_drawTitle:R.noop}),Hn=En;Bn._defaults=Hn;var Nn=R._deprecated,Rn=R.options.resolve,zn=R.valueOrDefault,Fn=Number.MIN_SAFE_INTEGER||-9007199254740991,Vn=Number.MAX_SAFE_INTEGER||9007199254740991,Wn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Un=Object.keys(Wn);function qn(e,t){return e-t}function Gn(e){return R.valueOrDefault(e.time.min,e.ticks.min)}function Zn(e){return R.valueOrDefault(e.time.max,e.ticks.max)}function Jn(e,t,n,r){var i=function(e,t,n){for(var r,i,o,a=0,s=e.length-1;a>=0&&a<=s;){if(i=e[(r=a+s>>1)-1]||null,o=e[r],!i)return{lo:null,hi:o};if(o[t]<n)a=r+1;else{if(!(i[t]>n))return{lo:i,hi:o};s=r-1}}return{lo:o,hi:null}}(e,t,n),o=i.lo?i.hi?i.lo:e[e.length-2]:e[0],a=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=a[t]-o[t],l=s?(n-o[t])/s:0,u=(a[r]-o[r])*l;return o[r]+u}function Xn(e,t){var n=e._adapter,r=e.options.time,i=r.parser,o=i||r.format,a=t;return"function"==typeof i&&(a=i(a)),R.isFinite(a)||(a="string"==typeof o?n.parse(a,o):n.parse(a)),null!==a?+a:(i||"function"!=typeof o||(a=o(t),R.isFinite(a)||(a=n.parse(a))),a)}function Kn(e,t){if(R.isNullOrUndef(t))return null;var n=e.options.time,r=Xn(e,e.getRightValue(t));return null===r?r:(n.round&&(r=+e._adapter.startOf(r,n.round)),r)}function Qn(e,t,n,r){var i,o,a,s=Un.length;for(i=Un.indexOf(e);i<s-1;++i)if(a=(o=Wn[Un[i]]).steps?o.steps:Vn,o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Un[i];return Un[s-1]}function er(e,t,n){var r,i,o=[],a={},s=t.length;for(r=0;r<s;++r)a[i=t[r]]=r,o.push({value:i,major:!1});return 0!==s&&n?function(e,t,n,r){var i,o,a=e._adapter,s=+a.startOf(t[0].value,r),l=t[t.length-1].value;for(i=s;i<=l;i=+a.add(i,1,r))(o=n[i])>=0&&(t[o].major=!0);return t}(e,o,a,n):o}var tr=dn.extend({initialize:function(){this.mergeTicksOptions(),dn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new Jt._date(t.adapters.date);return Nn("time scale",n.format,"time.format","time.parser"),Nn("time scale",n.min,"time.min","ticks.min"),Nn("time scale",n.max,"time.max","ticks.max"),R.mergeIf(n.displayFormats,r.formats()),dn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),dn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,i,o,a,s=this,l=s.chart,u=s._adapter,c=s.options,d=c.time.unit||"day",h=Vn,f=Fn,p=[],m=[],g=[],v=s._getLabels();for(e=0,n=v.length;e<n;++e)g.push(Kn(s,v[e]));for(e=0,n=(l.data.datasets||[]).length;e<n;++e)if(l.isDatasetVisible(e))if(i=l.data.datasets[e].data,R.isObject(i[0]))for(m[e]=[],t=0,r=i.length;t<r;++t)o=Kn(s,i[t]),p.push(o),m[e][t]=o;else m[e]=g.slice(0),a||(p=p.concat(g),a=!0);else m[e]=[];g.length&&(h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),p.length&&(p=n>1?function(e){var t,n,r,i={},o=[];for(t=0,n=e.length;t<n;++t)i[r=e[t]]||(i[r]=!0,o.push(r));return o}(p).sort(qn):p.sort(qn),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=Kn(s,Gn(c))||h,f=Kn(s,Zn(c))||f,h=h===Vn?+u.startOf(Date.now(),d):h,f=f===Fn?+u.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:p,datasets:m,labels:g}},buildTicks:function(){var e,t,n,r=this,i=r.min,o=r.max,a=r.options,s=a.ticks,l=a.time,u=r._timestamps,c=[],d=r.getLabelCapacity(i),h=s.source,f=a.distribution;for(u="data"===h||"auto"===h&&"series"===f?u.data:"labels"===h?u.labels:function(e,t,n,r){var i,o=e._adapter,a=e.options,s=a.time,l=s.unit||Qn(s.minUnit,t,n,r),u=Rn([s.stepSize,s.unitStepSize,1]),c="week"===l&&s.isoWeekday,d=t,h=[];if(c&&(d=+o.startOf(d,"isoWeek",c)),d=+o.startOf(d,c?"day":l),o.diff(n,t,l)>1e5*u)throw t+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(i=d;i<n;i=+o.add(i,u,l))h.push(i);return i!==n&&"ticks"!==a.bounds||h.push(i),h}(r,i,o,d),"ticks"===a.bounds&&u.length&&(i=u[0],o=u[u.length-1]),i=Kn(r,Gn(a))||i,o=Kn(r,Zn(a))||o,e=0,t=u.length;e<t;++e)(n=u[e])>=i&&n<=o&&c.push(n);return r.min=i,r.max=o,r._unit=l.unit||(s.autoSkip?Qn(l.minUnit,r.min,r.max,d):function(e,t,n,r,i){var o,a;for(o=Un.length-1;o>=Un.indexOf(n);o--)if(a=Un[o],Wn[a].common&&e._adapter.diff(i,r,a)>=t-1)return a;return Un[n?Un.indexOf(n):0]}(r,c.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=Un.indexOf(e)+1,n=Un.length;t<n;++t)if(Wn[Un[t]].common)return Un[t]}(r._unit):void 0,r._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var i,o,a,s,l,u=[],c=[t];for(i=0,o=e.length;i<o;++i)(s=e[i])>t&&s<n&&c.push(s);for(c.push(n),i=0,o=c.length;i<o;++i)l=c[i+1],a=c[i-1],s=c[i],void 0!==a&&void 0!==l&&Math.round((l+a)/2)===s||u.push({time:s,pos:i/(o-1)});return u}(r._timestamps.data,i,o,f),r._offsets=function(e,t,n,r,i){var o,a,s=0,l=0;return i.offset&&t.length&&(o=Jn(e,"time",t[0],"pos"),s=1===t.length?1-o:(Jn(e,"time",t[1],"pos")-o)/2,a=Jn(e,"time",t[t.length-1],"pos"),l=1===t.length?a:(a-Jn(e,"time",t[t.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,c,0,0,a),s.reverse&&c.reverse(),er(r,c,r._majorUnit)},getLabelForIndex:function(e,t){var n=this,r=n._adapter,i=n.chart.data,o=n.options.time,a=i.labels&&e<i.labels.length?i.labels[e]:"",s=i.datasets[t].data[e];return R.isObject(s)&&(a=n.getRightValue(s)),o.tooltipFormat?r.format(Xn(n,a),o.tooltipFormat):"string"==typeof a?a:r.format(Xn(n,a),o.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var i=this._adapter,o=this.options,a=o.time.displayFormats,s=a[this._unit],l=this._majorUnit,u=a[l],c=n[t],d=o.ticks,h=l&&u&&c&&c.major,f=i.format(e,r||(h?u:s)),p=h?d.major:d.minor,m=Rn([p.callback,p.userCallback,d.callback,d.userCallback]);return m?m(f,t,n):f},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=Jn(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=Kn(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=Jn(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=R.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),o=Math.sin(r),a=zn(t.fontSize,I.global.defaultFontSize);return{w:n*i+a*o,h:n*o+a*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=t.tickFormatFunction(e,0,er(t,[e],t._majorUnit),i),a=t._getLabelSize(o),s=Math.floor(t.isHorizontal()?t.width/a.w:t.height/a.h);return t.options.offset&&s--,s>0?s:1}});tr._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var nr={category:fn,linear:bn,logarithmic:Sn,radialLinear:Bn,time:tr},rr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Jt._date.override("function"==typeof e?{_id:"moment",formats:function(){return rr},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),I._set("global",{plugins:{filler:{propagate:!0}}});var ir={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),i=r&&n.isDatasetVisible(t)&&r.dataset._children||[],o=i.length||0;return o?function(e,t){return t<o&&i[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,r=t?t.y:null;return R.isArray(t)?function(e,n){return t[n]}:function(e){return{x:null===n?e.x:n,y:null===r?e.y:r}}}};function or(e,t,n){var r,i=e._model||{},o=i.fill;if(void 0===o&&(o=!!i.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(r=parseFloat(o,10),isFinite(r)&&Math.floor(r)===r)return"-"!==o[0]&&"+"!==o[0]||(r=t+r),!(r===t||r<0||r>=n)&&r;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function ar(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,i,o,a=e.el._scale,s=a.options,l=a.chart.data.labels.length,u=e.fill,c=[];if(!l)return null;for(t=s.ticks.reverse?a.max:a.min,n=s.ticks.reverse?a.min:a.max,r=a.getPointPositionForValue(0,t),i=0;i<l;++i)o="start"===u||"end"===u?a.getPointPositionForValue(i,"start"===u?t:n):a.getBasePosition(i),s.gridLines.circular&&(o.cx=r.x,o.cy=r.y,o.angle=a.getIndexAngle(i)-Math.PI/2),c.push(o);return c}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},i=e.fill,o=null;if(isFinite(i))return null;if("start"===i?o=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===i?o=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:r.getBasePixel&&(o=r.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(R.isFinite(o))return{x:(t=r.isHorizontal())?o:null,y:t?null:o}}return null}(e)}function sr(e,t,n){var r,i=e[t].fill,o=[t];if(!n)return i;for(;!1!==i&&-1===o.indexOf(i);){if(!isFinite(i))return i;if(!(r=e[i]))return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function lr(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),ir[n](e))}function ur(e){return e&&!e.skip}function cr(e,t,n,r,i){var o,a,s,l;if(r&&i){for(e.moveTo(t[0].x,t[0].y),o=1;o<r;++o)R.canvas.lineTo(e,t[o-1],t[o]);if(void 0===n[0].angle)for(e.lineTo(n[i-1].x,n[i-1].y),o=i-1;o>0;--o)R.canvas.lineTo(e,n[o],n[o-1],!0);else for(a=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-a,2)+Math.pow(n[0].y-s,2)),o=i-1;o>0;--o)e.arc(a,s,l,n[o].angle,n[o-1].angle,!0)}}function dr(e,t,n,r,i,o){var a,s,l,u,c,d,h,f,p=t.length,m=r.spanGaps,g=[],v=[],_=0,y=0;for(e.beginPath(),a=0,s=p;a<s;++a)c=n(u=t[l=a%p]._view,l,r),d=ur(u),h=ur(c),o&&void 0===f&&d&&(s=p+(f=a+1)),d&&h?(_=g.push(u),y=v.push(c)):_&&y&&(m?(d&&g.push(u),h&&v.push(c)):(cr(e,g,v,_,y),_=y=0,g=[],v=[]));cr(e,g,v,_,y),e.closePath(),e.fillStyle=i,e.fill()}var hr={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,i,o,a=(e.data.datasets||[]).length,s=t.propagate,l=[];for(r=0;r<a;++r)o=null,(i=(n=e.getDatasetMeta(r)).dataset)&&i._model&&i instanceof _e.Line&&(o={visible:e.isDatasetVisible(r),fill:or(i,r,a),chart:e,el:i}),n.$filler=o,l.push(o);for(r=0;r<a;++r)(o=l[r])&&(o.fill=sr(l,r,s),o.boundary=ar(o),o.mapper=lr(o))},beforeDatasetsDraw:function(e){var t,n,r,i,o,a,s,l=e._getSortedVisibleDatasetMetas(),u=e.ctx;for(n=l.length-1;n>=0;--n)(t=l[n].$filler)&&t.visible&&(i=(r=t.el)._view,o=r._children||[],a=t.mapper,s=i.backgroundColor||I.global.defaultColor,a&&s&&o.length&&(R.canvas.clipArea(u,e.chartArea),dr(u,o,a,i,s,r._loop),R.canvas.unclipArea(u)))}},fr=R.rtl.getRtlAdapter,pr=R.noop,mr=R.valueOrDefault;function gr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}I._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var i=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data.datasets;for(i.setAttribute("class",e.id+"-legend"),t=0,n=o.length;t<n;t++)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[t].backgroundColor,o[t].label&&r.appendChild(document.createTextNode(o[t].label));return i.outerHTML}});var vr=q.extend({initialize:function(e){R.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:pr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:pr,beforeSetDimensions:pr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:pr,beforeBuildLabels:pr,buildLabels:function(){var e=this,t=e.options.labels||{},n=R.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:pr,beforeFit:pr,fit:function(){var e=this,t=e.options,n=t.labels,r=t.display,i=e.ctx,o=R.options._parseFont(n),a=o.size,s=e.legendHitBoxes=[],l=e.minSize,u=e.isHorizontal();if(u?(l.width=e.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=e.maxHeight),r){if(i.font=o.string,u){var c=e.lineWidths=[0],d=0;i.textAlign="left",i.textBaseline="middle",R.each(e.legendItems,(function(e,t){var r=gr(n,a)+a/2+i.measureText(e.text).width;(0===t||c[c.length-1]+r+2*n.padding>l.width)&&(d+=a+n.padding,c[c.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:a},c[c.length-1]+=r+n.padding})),l.height+=d}else{var h=n.padding,f=e.columnWidths=[],p=e.columnHeights=[],m=n.padding,g=0,v=0;R.each(e.legendItems,(function(e,t){var r=gr(n,a)+a/2+i.measureText(e.text).width;t>0&&v+a+2*h>l.height&&(m+=g+n.padding,f.push(g),p.push(v),g=0,v=0),g=Math.max(g,r),v+=a+h,s[t]={left:0,top:0,width:r,height:a}})),m+=g,f.push(g),p.push(v),l.width+=m}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:pr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=I.global,i=r.defaultColor,o=r.elements.line,a=e.height,s=e.columnHeights,l=e.width,u=e.lineWidths;if(t.display){var c,d=fr(t.rtl,e.left,e.minSize.width),h=e.ctx,f=mr(n.fontColor,r.defaultFontColor),p=R.options._parseFont(n),m=p.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=p.string;var g=gr(n,m),v=e.legendHitBoxes,_=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},y=e.isHorizontal();c=y?{x:e.left+_(l,u[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+_(a,s[0]),line:0},R.rtl.overrideTextDirection(e.ctx,t.textDirection);var b=m+n.padding;R.each(e.legendItems,(function(t,r){var f=h.measureText(t.text).width,p=g+m/2+f,w=c.x,L=c.y;d.setWidth(e.minSize.width),y?r>0&&w+p+n.padding>e.left+e.minSize.width&&(L=c.y+=b,c.line++,w=c.x=e.left+_(l,u[c.line])):r>0&&L+b>e.top+e.minSize.height&&(w=c.x=w+e.columnWidths[c.line]+n.padding,c.line++,L=c.y=e.top+_(a,s[c.line]));var M=d.x(w);!function(e,t,r){if(!(isNaN(g)||g<=0)){h.save();var a=mr(r.lineWidth,o.borderWidth);if(h.fillStyle=mr(r.fillStyle,i),h.lineCap=mr(r.lineCap,o.borderCapStyle),h.lineDashOffset=mr(r.lineDashOffset,o.borderDashOffset),h.lineJoin=mr(r.lineJoin,o.borderJoinStyle),h.lineWidth=a,h.strokeStyle=mr(r.strokeStyle,i),h.setLineDash&&h.setLineDash(mr(r.lineDash,o.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,l=d.xPlus(e,g/2),u=t+m/2;R.canvas.drawPoint(h,r.pointStyle,s,l,u,r.rotation)}else h.fillRect(d.leftForLtr(e,g),t,g,m),0!==a&&h.strokeRect(d.leftForLtr(e,g),t,g,m);h.restore()}}(M,L,t),v[r].left=d.leftForLtr(M,v[r].width),v[r].top=L,function(e,t,n,r){var i=m/2,o=d.xPlus(e,g+i),a=t+i;h.fillText(n.text,o,a),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,a),h.lineTo(d.xPlus(o,r),a),h.stroke())}(M,L,t,f),y?c.x+=p+n.padding:c.y+=b})),R.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,i,o=this;if(e>=o.left&&e<=o.right&&t>=o.top&&t<=o.bottom)for(i=o.legendHitBoxes,n=0;n<i.length;++n)if(e>=(r=i[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return o.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,i="mouseup"===e.type?"click":e.type;if("mousemove"===i){if(!r.onHover&&!r.onLeave)return}else{if("click"!==i)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===i?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function _r(e,t){var n=new vr({ctx:e.ctx,options:t,chart:e});ct.configure(e,n,t),ct.addBox(e,n),e.legend=n}var yr={id:"legend",_element:vr,beforeInit:function(e){var t=e.options.legend;t&&_r(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(R.mergeIf(t,I.global.legend),n?(ct.configure(e,n,t),n.options=t):_r(e,t)):n&&(ct.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},br=R.noop;I._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var wr=q.extend({initialize:function(e){R.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:br,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:br,beforeSetDimensions:br,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:br,beforeBuildLabels:br,buildLabels:br,afterBuildLabels:br,beforeFit:br,fit:function(){var e,t=this,n=t.options,r=t.minSize={},i=t.isHorizontal();n.display?(e=(R.isArray(n.text)?n.text.length:1)*R.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=i?t.maxWidth:e,t.height=r.height=i?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:br,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,i,o,a=R.options._parseFont(n),s=a.lineHeight,l=s/2+n.padding,u=0,c=e.top,d=e.left,h=e.bottom,f=e.right;t.fillStyle=R.valueOrDefault(n.fontColor,I.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(i=d+(f-d)/2,o=c+l,r=f-d):(i="left"===n.position?d+l:f-l,o=c+(h-c)/2,r=h-c,u=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(i,o),t.rotate(u),t.textAlign="center",t.textBaseline="middle";var p=n.text;if(R.isArray(p))for(var m=0,g=0;g<p.length;++g)t.fillText(p[g],0,m,r),m+=s;else t.fillText(p,0,0,r);t.restore()}}});function Lr(e,t){var n=new wr({ctx:e.ctx,options:t,chart:e});ct.configure(e,n,t),ct.addBox(e,n),e.titleBlock=n}var Mr={},kr=hr,xr=yr,Sr={id:"title",_element:wr,beforeInit:function(e){var t=e.options.title;t&&Lr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(R.mergeIf(t,I.global.title),n?(ct.configure(e,n,t),n.options=t):Lr(e,t)):n&&(ct.removeBox(e,n),delete e.titleBlock)}};for(var Tr in Mr.filler=kr,Mr.legend=xr,Mr.title=Sr,qt.helpers=R,function(){function e(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function t(e){return null!=e&&"none"!==e}function n(n,r,i){var o=document.defaultView,a=R._getParentNode(n),s=o.getComputedStyle(n)[r],l=o.getComputedStyle(a)[r],u=t(s),c=t(l),d=Number.POSITIVE_INFINITY;return u||c?Math.min(u?e(s,n,i):d,c?e(l,a,i):d):"none"}R.where=function(e,t){if(R.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return R.each(e,(function(e){t(e)&&n.push(e)})),n},R.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,i=e.length;r<i;++r)if(t.call(n,e[r],r,e))return r;return-1},R.findNextWhere=function(e,t,n){R.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var i=e[r];if(t(i))return i}},R.findPreviousWhere=function(e,t,n){R.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;r>=0;r--){var i=e[r];if(t(i))return i}},R.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},R.almostEquals=function(e,t,n){return Math.abs(e-t)<n},R.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e},R.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},R.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},R.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},R.toRadians=function(e){return e*(Math.PI/180)},R.toDegrees=function(e){return e*(180/Math.PI)},R._decimalPlaces=function(e){if(R.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},R.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},R.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},R.aliasPixel=function(e){return e%2==0?0:.5},R._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,i=n/2;return Math.round((t-i)*r)/r+i},R.splineCurve=function(e,t,n,r){var i=e.skip?t:e,o=t,a=n.skip?t:n,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),u=s/(s+l),c=l/(s+l),d=r*(u=isNaN(u)?0:u),h=r*(c=isNaN(c)?0:c);return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+h*(a.x-i.x),y:o.y+h*(a.y-i.y)}}},R.EPSILON=Number.EPSILON||1e-14,R.splineCurveMonotone=function(e){var t,n,r,i,o,a,s,l,u,c=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=c.length;for(t=0;t<d;++t)if(!(r=c[t]).model.skip){if(n=t>0?c[t-1]:null,(i=t<d-1?c[t+1]:null)&&!i.model.skip){var h=i.model.x-r.model.x;r.deltaK=0!==h?(i.model.y-r.model.y)/h:0}!n||n.model.skip?r.mK=r.deltaK:!i||i.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<d-1;++t)r=c[t],i=c[t+1],r.model.skip||i.model.skip||(R.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=i.mK=0:(o=r.mK/r.deltaK,a=i.mK/r.deltaK,(l=Math.pow(o,2)+Math.pow(a,2))<=9||(s=3/Math.sqrt(l),r.mK=o*s*r.deltaK,i.mK=a*s*r.deltaK)));for(t=0;t<d;++t)(r=c[t]).model.skip||(n=t>0?c[t-1]:null,i=t<d-1?c[t+1]:null,n&&!n.model.skip&&(u=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-u,r.model.controlPointPreviousY=r.model.y-u*r.mK),i&&!i.model.skip&&(u=(i.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+u,r.model.controlPointNextY=r.model.y+u*r.mK))},R.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},R.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},R.niceNum=function(e,t){var n=Math.floor(R.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},R.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},R.getRelativePosition=function(e,t){var n,r,i=e.originalEvent||e,o=e.target||e.srcElement,a=o.getBoundingClientRect(),s=i.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=i.clientX,r=i.clientY);var l=parseFloat(R.getStyle(o,"padding-left")),u=parseFloat(R.getStyle(o,"padding-top")),c=parseFloat(R.getStyle(o,"padding-right")),d=parseFloat(R.getStyle(o,"padding-bottom")),h=a.right-a.left-l-c,f=a.bottom-a.top-u-d;return{x:n=Math.round((n-a.left-l)/h*o.width/t.currentDevicePixelRatio),y:r=Math.round((r-a.top-u)/f*o.height/t.currentDevicePixelRatio)}},R.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},R.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},R._calculatePadding=function(e,t,n){return(t=R.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},R._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},R.getMaximumWidth=function(e){var t=R._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-R._calculatePadding(t,"padding-left",n)-R._calculatePadding(t,"padding-right",n),i=R.getConstraintWidth(e);return isNaN(i)?r:Math.min(r,i)},R.getMaximumHeight=function(e){var t=R._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-R._calculatePadding(t,"padding-top",n)-R._calculatePadding(t,"padding-bottom",n),i=R.getConstraintHeight(e);return isNaN(i)?r:Math.min(r,i)},R.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},R.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,i=e.height,o=e.width;r.height=i*n,r.width=o*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=o+"px")}},R.fontString=function(e,t,n){return t+" "+e+"px "+n},R.longestText=function(e,t,n,r){var i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.font=t;var a,s,l,u,c,d=0,h=n.length;for(a=0;a<h;a++)if(null!=(u=n[a])&&!0!==R.isArray(u))d=R.measureText(e,i,o,d,u);else if(R.isArray(u))for(s=0,l=u.length;s<l;s++)null==(c=u[s])||R.isArray(c)||(d=R.measureText(e,i,o,d,c));var f=o.length/2;if(f>n.length){for(a=0;a<f;a++)delete i[o[a]];o.splice(0,f)}return d},R.measureText=function(e,t,n,r,i){var o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r},R.numberOfLabelLines=function(e){var t=1;return R.each(e,(function(e){R.isArray(e)&&e.length>t&&(t=e.length)})),t},R.color=L?function(e){return e instanceof CanvasGradient&&(e=I.global.defaultColor),L(e)}:function(e){return console.error("Color.js not found!"),e},R.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:R.color(e).saturate(.5).darken(.1).rgbString()}}(),qt._adapters=Jt,qt.Animation=Z,qt.animationService=J,qt.controllers=qe,qt.DatasetController=te,qt.defaults=I,qt.Element=q,qt.elements=_e,qt.Interaction=et,qt.layouts=ct,qt.platform=xt,qt.plugins=St,qt.Scale=dn,qt.scaleService=Tt,qt.Ticks=Xt,qt.Tooltip=Bt,qt.helpers.each(nr,(function(e,t){qt.scaleService.registerScaleType(t,e,e._defaults)})),Mr)Mr.hasOwnProperty(Tr)&&qt.plugins.register(Mr[Tr]);qt.platform.initialize();var $r=qt;return"undefined"!=typeof window&&(window.Chart=qt),qt.Chart=qt,qt.Legend=Mr.legend._element,qt.Title=Mr.title._element,qt.pluginService=qt.plugins,qt.PluginBase=qt.Element.extend({}),qt.canvasHelpers=qt.helpers.canvas,qt.layoutService=qt.layouts,qt.LinearScaleBase=gn,qt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){qt[e]=function(t,n){return new qt(t,qt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),$r})),function(){function e(e,t,n){!1!==t?$.addEventListener(e,H[e],n):$.removeEventListener(e,H[e])}function t(e){var t=h(d(e.target));if(ionic.tap.requiresNativeClick(t)||A)return!1;var r=ionic.tap.pointerCoord(e);n("click",t,r.x,r.y),function(e){Y=null;var t=!1;"SELECT"==e.tagName?(n("mousedown",e,0,0),e.focus&&e.focus(),t=!0):u()===e?t=!0:/^(input|textarea|ion-label)$/i.test(e.tagName)||e.isContentEditable?(t=!0,e.focus&&e.focus(),e.value=e.value,C&&(Y=e)):function(){var e=u();e&&(/^(input|textarea|select)$/i.test(e.tagName)||e.isContentEditable)&&e.blur(),u(null)}(),t&&(u(e),ionic.trigger("ionic.focusin",{target:e},!0))}(t)}function n(e,t,n,r){var i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,0,0,n,r,!1,!1,!1,!1,0,null),i.isIonicTap=!0,t.dispatchEvent(i)}function r(t){!l(t)&&(A=!1,s(),P=ionic.tap.pointerCoord(t),e(I),ionic.activator.start(t),ionic.Platform.isIOS()&&ionic.tap.isLabelWithTextInput(t.target))&&h(d(t.target))!==D&&t.preventDefault()}function i(e){l(e)||(s(),c(e)||(t(e),f(e.target.tagName)&&e.preventDefault()),O=e.target,a())}function o(t){return c(t)?(A=!0,e(I,!1),ionic.activator.end(),!1):void 0}function a(){e(I,!1),ionic.activator.end(),A=!1}function s(){C=!0,clearTimeout(E),E=setTimeout((function(){C=!1}),600)}function l(e){return!!e.isTapHandled||(e.isTapHandled=!0,!!ionic.tap.isElementTapDisabled(e.target)||"SELECT"==e.target.tagName||(ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(e.target)?(e.preventDefault(),!0):void 0))}function u(e){return arguments.length&&(D=e),D||document.activeElement}function c(e){if(!e||1!==e.target.nodeType||!P||0===P.x&&0===P.y)return!1;var t=ionic.tap.pointerCoord(e),n=e.target.classList&&e.target.classList.contains&&"function"==typeof e.target.classList.contains&&e.target.classList.contains("button")?B:j;return Math.abs(P.x-t.x)>n||Math.abs(P.y-t.y)>n}function d(e,t){for(var n=e,r=0;6>r&&n;r++){if("LABEL"===n.tagName)return n;n=n.parentElement}return!1!==t?e:void 0}function h(e){if(e&&"LABEL"===e.tagName){if(e.control)return e.control;if(e.querySelector){var t=e.querySelector("input,textarea,select");if(t)return t}}return e}function f(e){return/^(select|option)$/i.test(e)}function p(){ionic.keyboard.isInitialized||(S()?(window.addEventListener("native.keyboardshow",X),window.addEventListener("native.keyboardhide",m)):document.body.addEventListener("focusout",m),document.body.addEventListener("ionic.focusin",J),document.body.addEventListener("focusin",J),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerDown",p):document.removeEventListener("touchstart",p),ionic.keyboard.isInitialized=!0)}function m(){clearTimeout(V),(ionic.keyboard.isOpen||ionic.keyboard.isOpening)&&(ionic.keyboard.isClosing=!0,ionic.keyboard.isOpening=!1),V=setTimeout((function(){ionic.requestAnimationFrame((function(){y(G?function(){M(),b()}:b,!1)}))}),50)}function g(){ionic.keyboard.isLandscape=!ionic.keyboard.isLandscape,ionic.Platform.isIOS()&&M(),ionic.Platform.isAndroid()&&(ionic.keyboard.isOpen&&S()?G=!0:y(M,!1))}function v(e){ionic.scroll.isScrolling&&_(e)}function _(e){"TEXTAREA"!==e.target.tagName&&e.preventDefault()}function y(e,t){clearInterval(F);var n,r=0,i=x(),o=i;return n=ionic.Platform.isAndroid()&&ionic.Platform.version()<4.4?30:ionic.Platform.isAndroid()?10:1,F=setInterval((function(){o=x(),(!(++r<n)||(function(e){return!!(!ionic.keyboard.isLandscape&&U&&Math.abs(U-e)<2)}(o)||function(e){return!!(ionic.keyboard.isLandscape&&q&&Math.abs(q-e)<2)}(o))&&ionic.keyboard.height)&&(S()||(ionic.keyboard.height=Math.abs(i-window.innerHeight)),ionic.keyboard.isOpen=t,clearInterval(F),e())}),50),n}function b(){clearTimeout(V),ionic.keyboard.isOpen=!1,ionic.keyboard.isClosing=!1,(N||R)&&ionic.trigger("resetScrollView",{target:N||R},!0),ionic.requestAnimationFrame((function(){document.body.classList.remove(Z)})),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerMove",_):document.removeEventListener("touchmove",_),document.removeEventListener("keydown",v),ionic.Platform.isAndroid()&&(S()&&cordova.plugins.Keyboard.close(),N&&N.blur()),N=null,R=null}function w(){ionic.keyboard.isOpen=!0,ionic.keyboard.isOpening=!1;var e={keyboardHeight:L(),viewportHeight:W};if(N){e.target=N;var t=N.getBoundingClientRect();e.elementTop=Math.round(t.top),e.elementBottom=Math.round(t.bottom),e.windowHeight=e.viewportHeight-e.keyboardHeight,e.isElementUnderKeyboard=e.elementBottom>e.windowHeight,ionic.trigger("scrollChildIntoView",e,!0)}return setTimeout((function(){document.body.classList.add(Z)}),400),e}function L(){if(ionic.keyboard.height)return ionic.keyboard.height;if(ionic.Platform.isAndroid()){if(ionic.Platform.isFullScreen)return 275;var e=window.innerHeight;return W>e?W-e:0}return ionic.Platform.isIOS()?ionic.keyboard.isLandscape?206:ionic.Platform.isWebView()?260:216:275}function M(){G=!1,W=x(),ionic.keyboard.isLandscape&&!q?q=W:ionic.keyboard.isLandscape||U||(U=W),N&&ionic.trigger("resetScrollView",{target:N},!0),ionic.keyboard.isOpen&&ionic.tap.isTextInput(N)&&w()}function k(){var e=x();e/window.innerWidth<1&&(ionic.keyboard.isLandscape=!0),W=e,ionic.keyboard.isLandscape&&!q?q=W:ionic.keyboard.isLandscape||U||(U=W)}function x(){var e=window.innerHeight;return ionic.Platform.isAndroid()&&ionic.Platform.isFullScreen||!ionic.keyboard.isOpen&&!ionic.keyboard.isOpening||ionic.keyboard.isClosing?e:e+L()}function S(){return!!(window.cordova&&cordova.plugins&&cordova.plugins.Keyboard)}function T(){var e=Q.width,t=Q.height,n=ionic.Platform,r=n.version(),i="device-height",o=ionic.viewport.orientation();delete Q.height,Q.width="device-width",n.isIPad()?r>7?delete Q.width:n.isWebView()?90==o?Q.height="0":7==r&&(Q.height=i):7>r&&(Q.height="0"):n.isIOS()&&(n.isWebView()?r>7?delete Q.width:7>r?t&&(Q.height="0"):7==r&&(Q.height=i):7>r&&t&&(Q.height="0")),(e!==Q.width||t!==Q.height)&&function(){var e,t=[];for(e in Q)Q[e]&&t.push(e+("_"==Q[e]?"":"="+Q[e]));K.content=t.join(", ")}()}window.ionic=window.ionic||{},window.ionic.views={},window.ionic.version="1.3.5",window.ionic.DelegateService=function(e){function t(){return!0}if(e.indexOf("$getByHandle")>-1)throw new Error("Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.");return["$log",function(n){function r(e,t){this._instances=e,this.handle=t}function i(){this._instances=[]}return e.forEach((function(e){r.prototype[e]=function(e){return function(){var t,r=this.handle,i=arguments,o=0;return this._instances.forEach((function(n){if((!r||r==n.$$delegateHandle)&&n.$$filterFn(n)){o++;var a=n[e].apply(n,i);1===o&&(t=a)}})),!o&&r?n.warn('Delegate for handle "'+r+'" could not find a corresponding element with delegate-handle="'+r+'"! '+e+"() was not called!\nPossible cause: If you are calling "+e+'() immediately, and your element with delegate-handle="'+r+'" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to '+e+"() and try again."):t}}(e)})),i.prototype=r.prototype,i.prototype._registerInstance=function(e,n,r){var i=this._instances;return e.$$delegateHandle=n,e.$$filterFn=r||t,i.push(e),function(){var t=i.indexOf(e);-1!==t&&i.splice(t,1)}},i.prototype.$getByHandle=function(e){return new r(this._instances,e)},new i}]},function(e,t,n){var r=[],i="complete"===t.readyState||"interactive"===t.readyState;i||t.addEventListener("DOMContentLoaded",(function e(){i=!0;for(var o=0;o<r.length;o++)n.requestAnimationFrame(r[o]);r=[],t.removeEventListener("DOMContentLoaded",e)})),e._rAF=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(t){e.setTimeout(t,16)};var o=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame;n.DomUtil={requestAnimationFrame:function(t){return e._rAF(t)},cancelAnimationFrame:function(e){o(e)},animationFrameThrottle:function(e){var t,r,i;return function(){t=arguments,i=this,r||(r=!0,n.requestAnimationFrame((function(){e.apply(i,t),r=!1})))}},contains:function(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}},getPositionInParent:function(e){return{left:e.offsetLeft,top:e.offsetTop}},getOffsetTop:function(e){var t=0;if(e.offsetParent){do{t+=e.offsetTop,e=e.offsetParent}while(e);return t}},ready:function(e){i?n.requestAnimationFrame(e):r.push(e)},getTextBounds:function(n){if(t.createRange){var r=t.createRange();if(r.selectNodeContents(n),r.getBoundingClientRect){var i=r.getBoundingClientRect();if(i){var o=e.scrollX,a=e.scrollY;return{top:i.top+a,left:i.left+o,right:i.left+o+i.width,bottom:i.top+a+i.height,width:i.width,height:i.height}}}}return null},getChildIndex:function(e,t){if(t)for(var n,r=e.parentNode.children,i=0,o=0,a=r.length;a>i;i++)if((n=r[i]).nodeName&&n.nodeName.toLowerCase()==t){if(n==e)return o;o++}return Array.prototype.slice.call(e.parentNode.children).indexOf(e)},swapNodes:function(e,t){t.parentNode.insertBefore(e,t)},elementIsDescendant:function(e,t,n){var r=e;do{if(r===t)return!0;r=r.parentNode}while(r&&r!==n);return!1},getParentWithClass:function(e,t,n){for(n=n||10;e.parentNode&&n--;){if(e.parentNode.classList&&e.parentNode.classList.contains(t))return e.parentNode;e=e.parentNode}return null},getParentOrSelfWithClass:function(e,t,n){for(n=n||10;e&&n--;){if(e.classList&&e.classList.contains(t))return e;e=e.parentNode}return null},rectContains:function(e,t,n,r,i,o){return!(n>e||e>i||r>t||t>o)},blurAll:function(){return t.activeElement&&t.activeElement!=t.body?(t.activeElement.blur(),t.activeElement):null},cachedAttr:function(e,t,n){if((e=e&&e.length&&e[0]||e)&&e.setAttribute){var r="$attr-"+t;return arguments.length>2?e[r]!==n&&(e.setAttribute(t,n),e[r]=n):void 0===e[r]&&(e[r]=e.getAttribute(t)),e[r]}},cachedStyles:function(e,t){if((e=e&&e.length&&e[0]||e)&&e.style)for(var n in t)e["$style-"+n]!==t[n]&&(e.style[n]=e["$style-"+n]=t[n])}},n.requestAnimationFrame=n.DomUtil.requestAnimationFrame,n.cancelAnimationFrame=n.DomUtil.cancelAnimationFrame,n.animationFrameThrottle=n.DomUtil.animationFrameThrottle}(window,document,ionic),function(e){e.CustomEvent=function(){if("function"==typeof window.CustomEvent)return CustomEvent;var e=function(e,t){var n;t=t||{bubbles:!1,cancelable:!1,detail:void 0};try{(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail)}catch(i){for(var r in n=document.createEvent("Event"),t)n[r]=t[r];n.initEvent(e,t.bubbles,t.cancelable)}return n};return e.prototype=window.Event.prototype,e}(),e.EventController={VIRTUALIZED_EVENTS:["tap","swipe","swiperight","swipeleft","drag","hold","release"],trigger:function(t,n,r,i){var o=new e.CustomEvent(t,{detail:n,bubbles:!!r,cancelable:!!i});n&&n.target&&n.target.dispatchEvent&&n.target.dispatchEvent(o)||window.dispatchEvent(o)},on:function(t,n,r){for(var i=r||window,o=0,a=this.VIRTUALIZED_EVENTS.length;a>o;o++)if(t==this.VIRTUALIZED_EVENTS[o]){var s=new e.Gesture(r);return s.on(t,n),s}i.addEventListener(t,n)},off:function(e,t,n){n.removeEventListener(e,t)},onGesture:function(t,n,r,i){var o=new e.Gesture(r,i);return o.on(t,n),o},offGesture:function(e,t,n){e&&e.off(t,n)},handlePopState:function(){}},e.on=function(){e.EventController.on.apply(e.EventController,arguments)},e.off=function(){e.EventController.off.apply(e.EventController,arguments)},e.trigger=e.EventController.trigger,e.onGesture=function(){return e.EventController.onGesture.apply(e.EventController.onGesture,arguments)},e.offGesture=function(){return e.EventController.offGesture.apply(e.EventController.offGesture,arguments)}}(window.ionic),function(e){e.Gesture=function(t,n){return new e.Gestures.Instance(t,n||{})},e.Gestures={},e.Gestures.defaults={stop_browser_behavior:"disable-user-behavior"},e.Gestures.HAS_POINTEREVENTS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,e.Gestures.HAS_TOUCHEVENTS="ontouchstart"in window,e.Gestures.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,e.Gestures.NO_MOUSEEVENTS=e.Gestures.HAS_TOUCHEVENTS&&window.navigator.userAgent.match(e.Gestures.MOBILE_REGEX),e.Gestures.EVENT_TYPES={},e.Gestures.DIRECTION_DOWN="down",e.Gestures.DIRECTION_LEFT="left",e.Gestures.DIRECTION_UP="up",e.Gestures.DIRECTION_RIGHT="right",e.Gestures.POINTER_MOUSE="mouse",e.Gestures.POINTER_TOUCH="touch",e.Gestures.POINTER_PEN="pen",e.Gestures.EVENT_START="start",e.Gestures.EVENT_MOVE="move",e.Gestures.EVENT_END="end",e.Gestures.DOCUMENT=window.document,e.Gestures.plugins={},e.Gestures.READY=!1,e.Gestures.Instance=function(t,n){var r=this;return null===t?this:(function(){if(!e.Gestures.READY){for(var t in e.Gestures.event.determineEventTypes(),e.Gestures.gestures)e.Gestures.gestures.hasOwnProperty(t)&&e.Gestures.detection.register(e.Gestures.gestures[t]);e.Gestures.event.onTouch(e.Gestures.DOCUMENT,e.Gestures.EVENT_MOVE,e.Gestures.detection.detect),e.Gestures.event.onTouch(e.Gestures.DOCUMENT,e.Gestures.EVENT_END,e.Gestures.detection.detect),e.Gestures.READY=!0}}(),this.element=t,this.enabled=!0,this.options=e.Gestures.utils.extend(e.Gestures.utils.extend({},e.Gestures.defaults),n||{}),this.options.stop_browser_behavior&&e.Gestures.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),e.Gestures.event.onTouch(t,e.Gestures.EVENT_START,(function(t){r.enabled&&e.Gestures.detection.startDetect(r,t)})),this)},e.Gestures.Instance.prototype={on:function(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)this.element.addEventListener(n[r],t,!1);return this},off:function(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)this.element.removeEventListener(n[r],t,!1);return this},trigger:function(t,n){var r=e.Gestures.DOCUMENT.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=n;var i=this.element;return e.Gestures.utils.hasParent(n.target,i)&&(i=n.target),i.dispatchEvent(r),this},enable:function(e){return this.enabled=e,this}};var t=null,n=!1,r=!1;e.Gestures.event={bindDom:function(e,t,n){for(var r=t.split(" "),i=0;i<r.length;i++)e.addEventListener(r[i],n,!1)},onTouch:function(i,o,a){var s=this;this.bindDom(i,e.Gestures.EVENT_TYPES[o],(function(l){var u=l.type.toLowerCase();if(!u.match(/mouse/)||!r){u.match(/touch/)||u.match(/pointerdown/)||u.match(/mouse/)&&1===l.which?n=!0:u.match(/mouse/)&&1!==l.which&&(n=!1),u.match(/touch|pointer/)&&(r=!0);var c=0;n&&(e.Gestures.HAS_POINTEREVENTS&&o!=e.Gestures.EVENT_END?c=e.Gestures.PointerEvent.updatePointer(o,l):u.match(/touch/)?c=l.touches.length:r||(c=u.match(/up/)?0:1),c>0&&o==e.Gestures.EVENT_END?o=e.Gestures.EVENT_MOVE:c||(o=e.Gestures.EVENT_END),(c||null===t)&&(t=l),a.call(e.Gestures.detection,s.collectEventData(i,o,s.getTouchList(t,o),l)),e.Gestures.HAS_POINTEREVENTS&&o==e.Gestures.EVENT_END&&(c=e.Gestures.PointerEvent.updatePointer(o,l))),c||(t=null,n=!1,r=!1,e.Gestures.PointerEvent.reset())}}))},determineEventTypes:function(){var t;t=e.Gestures.HAS_POINTEREVENTS?e.Gestures.PointerEvent.getEvents():e.Gestures.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_START]=t[0],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_MOVE]=t[1],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_END]=t[2]},getTouchList:function(t){return e.Gestures.HAS_POINTEREVENTS?e.Gestures.PointerEvent.getTouchList():t.touches?t.touches:(t.identifier=1,[t])},collectEventData:function(t,n,r,i){var o=e.Gestures.POINTER_TOUCH;return(i.type.match(/mouse/)||e.Gestures.PointerEvent.matchType(e.Gestures.POINTER_MOUSE,i))&&(o=e.Gestures.POINTER_MOUSE),{center:e.Gestures.utils.getCenter(r),timeStamp:(new Date).getTime(),target:i.target,touches:r,eventType:n,pointerType:o,srcEvent:i,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return e.Gestures.detection.stopDetect()}}}},e.Gestures.PointerEvent={pointers:{},getTouchList:function(){var e=this,t=[];return Object.keys(e.pointers).sort().forEach((function(n){t.push(e.pointers[n])})),t},updatePointer:function(t,n){return t==e.Gestures.EVENT_END?this.pointers={}:(n.identifier=n.pointerId,this.pointers[n.pointerId]=n),Object.keys(this.pointers).length},matchType:function(t,n){if(!n.pointerType)return!1;var r={};return r[e.Gestures.POINTER_MOUSE]=n.pointerType==n.MSPOINTER_TYPE_MOUSE||n.pointerType==e.Gestures.POINTER_MOUSE,r[e.Gestures.POINTER_TOUCH]=n.pointerType==n.MSPOINTER_TYPE_TOUCH||n.pointerType==e.Gestures.POINTER_TOUCH,r[e.Gestures.POINTER_PEN]=n.pointerType==n.MSPOINTER_TYPE_PEN||n.pointerType==e.Gestures.POINTER_PEN,r[t]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},e.Gestures.utils={extend:function(e,t,n){for(var r in t)void 0!==e[r]&&n||(e[r]=t[r]);return e},hasParent:function(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1},getCenter:function(e){for(var t=[],n=[],r=0,i=e.length;i>r;r++)t.push(e[r].pageX),n.push(e[r].pageY);return{pageX:(Math.min.apply(Math,t)+Math.max.apply(Math,t))/2,pageY:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2}},getVelocity:function(e,t,n){return{x:Math.abs(t/e)||0,y:Math.abs(n/e)||0}},getAngle:function(e,t){var n=t.pageY-e.pageY,r=t.pageX-e.pageX;return 180*Math.atan2(n,r)/Math.PI},getDirection:function(t,n){return Math.abs(t.pageX-n.pageX)>=Math.abs(t.pageY-n.pageY)?t.pageX-n.pageX>0?e.Gestures.DIRECTION_LEFT:e.Gestures.DIRECTION_RIGHT:t.pageY-n.pageY>0?e.Gestures.DIRECTION_UP:e.Gestures.DIRECTION_DOWN},getDistance:function(e,t){var n=t.pageX-e.pageX,r=t.pageY-e.pageY;return Math.sqrt(n*n+r*r)},getScale:function(e,t){return e.length>=2&&t.length>=2?this.getDistance(t[0],t[1])/this.getDistance(e[0],e[1]):1},getRotation:function(e,t){return e.length>=2&&t.length>=2?this.getAngle(t[1],t[0])-this.getAngle(e[1],e[0]):0},isVertical:function(t){return t==e.Gestures.DIRECTION_UP||t==e.Gestures.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(e,t){e&&e.classList&&(e.classList.add(t),e.onselectstart=function(){return!1})}},e.Gestures.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,n){this.current||(this.stopped=!1,this.current={inst:t,startEvent:e.Gestures.utils.extend({},n),lastEvent:!1,name:""},this.detect(n))},detect:function(t){if(!this.current||this.stopped)return null;t=this.extendEventData(t);for(var n=this.current.inst.options,r=0,i=this.gestures.length;i>r;r++){var o=this.gestures[r];if(!this.stopped&&!1!==n[o.name]&&!1===o.handler.call(o,t,this.current.inst)){this.stopDetect();break}}return this.current&&(this.current.lastEvent=t),t.eventType==e.Gestures.EVENT_END&&!t.touches.length-1&&this.stopDetect(),t},stopDetect:function(){this.previous=e.Gestures.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(t){var n=this.current.startEvent;if(n&&(t.touches.length!=n.touches.length||t.touches===n.touches)){n.touches=[];for(var r=0,i=t.touches.length;i>r;r++)n.touches.push(e.Gestures.utils.extend({},t.touches[r]))}var o=t.timeStamp-n.timeStamp,a=t.center.pageX-n.center.pageX,s=t.center.pageY-n.center.pageY,l=e.Gestures.utils.getVelocity(o,a,s);return e.Gestures.utils.extend(t,{deltaTime:o,deltaX:a,deltaY:s,velocityX:l.x,velocityY:l.y,distance:e.Gestures.utils.getDistance(n.center,t.center),angle:e.Gestures.utils.getAngle(n.center,t.center),direction:e.Gestures.utils.getDirection(n.center,t.center),scale:e.Gestures.utils.getScale(n.touches,t.touches),rotation:e.Gestures.utils.getRotation(n.touches,t.touches),startEvent:n}),t},register:function(t){var n=t.defaults||{};return void 0===n[t.name]&&(n[t.name]=!0),e.Gestures.utils.extend(e.Gestures.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort((function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})),this.gestures}},e.Gestures.gestures=e.Gestures.gestures||{},e.Gestures.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:9},timer:null,handler:function(t,n){switch(t.eventType){case e.Gestures.EVENT_START:clearTimeout(this.timer),e.Gestures.detection.current.name=this.name,this.timer=setTimeout((function(){"hold"==e.Gestures.detection.current.name&&(e.tap.cancelClick(),n.trigger("hold",t))}),n.options.hold_timeout);break;case e.Gestures.EVENT_MOVE:t.distance>n.options.hold_threshold&&clearTimeout(this.timer);break;case e.Gestures.EVENT_END:clearTimeout(this.timer)}}},e.Gestures.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(t,n){if(t.eventType==e.Gestures.EVENT_END&&"touchcancel"!=t.srcEvent.type){var r=e.Gestures.detection.previous,i=!1;if(t.deltaTime>n.options.tap_max_touchtime||t.distance>n.options.tap_max_distance)return;r&&"tap"==r.name&&t.timeStamp-r.lastEvent.timeStamp<n.options.doubletap_interval&&t.distance<n.options.doubletap_distance&&(n.trigger("doubletap",t),i=!0),(!i||n.options.tap_always)&&(e.Gestures.detection.current.name="tap",n.trigger("tap",t))}}},e.Gestures.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.4},handler:function(t,n){if(t.eventType==e.Gestures.EVENT_END){if(n.options.swipe_max_touches>0&&t.touches.length>n.options.swipe_max_touches)return;(t.velocityX>n.options.swipe_velocity||t.velocityY>n.options.swipe_velocity)&&(n.trigger(this.name,t),n.trigger(this.name+t.direction,t))}}},e.Gestures.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_lock_to_axis:!1,drag_lock_min_distance:25,prevent_default_directions:[]},triggered:!1,handler:function(t,n){if("touchstart"==t.srcEvent.type||"touchend"==t.srcEvent.type?this.preventedFirstMove=!1:this.preventedFirstMove||"touchmove"!=t.srcEvent.type||(n.options.prevent_default_directions.length>0&&-1!=n.options.prevent_default_directions.indexOf(t.direction)&&t.srcEvent.preventDefault(),this.preventedFirstMove=!0),e.Gestures.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),void(this.triggered=!1);if(!(n.options.drag_max_touches>0&&t.touches.length>n.options.drag_max_touches))switch(t.eventType){case e.Gestures.EVENT_START:this.triggered=!1;break;case e.Gestures.EVENT_MOVE:if(t.distance<n.options.drag_min_distance&&e.Gestures.detection.current.name!=this.name)return;if(e.Gestures.detection.current.name!=this.name&&(e.Gestures.detection.current.name=this.name,n.options.correct_for_drag_min_distance)){var r=Math.abs(n.options.drag_min_distance/t.distance);e.Gestures.detection.current.startEvent.center.pageX+=t.deltaX*r,e.Gestures.detection.current.startEvent.center.pageY+=t.deltaY*r,t=e.Gestures.detection.extendEventData(t)}(e.Gestures.detection.current.lastEvent.drag_locked_to_axis||n.options.drag_lock_to_axis&&n.options.drag_lock_min_distance<=t.distance)&&(t.drag_locked_to_axis=!0);var i=e.Gestures.detection.current.lastEvent.direction;t.drag_locked_to_axis&&i!==t.direction&&(e.Gestures.utils.isVertical(i)?t.direction=t.deltaY<0?e.Gestures.DIRECTION_UP:e.Gestures.DIRECTION_DOWN:t.direction=t.deltaX<0?e.Gestures.DIRECTION_LEFT:e.Gestures.DIRECTION_RIGHT),this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),n.trigger(this.name+t.direction,t),(n.options.drag_block_vertical&&e.Gestures.utils.isVertical(t.direction)||n.options.drag_block_horizontal&&!e.Gestures.utils.isVertical(t.direction))&&t.preventDefault();break;case e.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},e.Gestures.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(t,n){if(e.Gestures.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),void(this.triggered=!1);if(!(t.touches.length<2))switch(n.options.transform_always_block&&t.preventDefault(),t.eventType){case e.Gestures.EVENT_START:this.triggered=!1;break;case e.Gestures.EVENT_MOVE:var r=Math.abs(1-t.scale),i=Math.abs(t.rotation);if(r<n.options.transform_min_scale&&i<n.options.transform_min_rotation)return;e.Gestures.detection.current.name=this.name,this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),i>n.options.transform_min_rotation&&n.trigger("rotate",t),r>n.options.transform_min_scale&&(n.trigger("pinch",t),n.trigger("pinch"+(t.scale<1?"in":"out"),t));break;case e.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},e.Gestures.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(t,n){return n.options.prevent_mouseevents&&t.pointerType==e.Gestures.POINTER_MOUSE?void t.stopDetect():(n.options.prevent_default&&t.preventDefault(),void(t.eventType==e.Gestures.EVENT_START&&n.trigger(this.name,t)))}},e.Gestures.gestures.Release={name:"release",index:1/0,handler:function(t,n){t.eventType==e.Gestures.EVENT_END&&n.trigger(this.name,t)}}}(window.ionic),function(e,t,n){function r(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function i(){d.isWebView()?t.addEventListener("deviceready",o,!1):o(),a&&e.removeEventListener("load",i,!1)}function o(){d.isReady=!0,d.detect();for(var e=0;e<p.length;e++)p[e]();p=[],n.trigger("platformready",{target:t}),c((function(){t.body.classList.add("platform-ready")}))}var a,s="android",l="windowsphone",u="edge",c=n.requestAnimationFrame,d=n.Platform={navigator:e.navigator,isReady:!1,isFullScreen:!1,platforms:null,grade:null,ua:navigator.userAgent,ready:function(e){d.isReady?e():p.push(e)},detect:function(){d._checkPlatforms(),c((function(){for(var e=0;e<d.platforms.length;e++)t.body.classList.add("platform-"+d.platforms[e])}))},setGrade:function(e){var n=d.grade;d.grade=e,c((function(){n&&t.body.classList.remove("grade-"+n),t.body.classList.add("grade-"+e)}))},device:function(){return e.device||{}},_checkPlatforms:function(){d.platforms=[];var t="a";d.isWebView()?(d.platforms.push("webview"),e.cordova||e.PhoneGap||e.phonegap?d.platforms.push("cordova"):"object"==typeof e.forge&&d.platforms.push("trigger")):d.platforms.push("browser"),d.isIPad()&&d.platforms.push("ipad");var n=d.platform();if(n){d.platforms.push(n);var r=d.version();if(r){var i=r.toString();i.indexOf(".")>0?i=i.replace(".","_"):i+="_0",d.platforms.push(n+i.split("_")[0]),d.platforms.push(n+i),d.isAndroid()&&4.4>r?t=4>r?"c":"b":d.isWindowsPhone()&&(t="b")}}d.setGrade(t)},isWebView:function(){return!(!e.cordova&&!e.PhoneGap&&!e.phonegap&&"object"!==e.forge)},isIPad:function(){return!!/iPad/i.test(d.navigator.platform)||/iPad/i.test(d.ua)},isIOS:function(){return d.is("ios")},isAndroid:function(){return d.is(s)},isWindowsPhone:function(){return d.is(l)},isEdge:function(){return d.is(u)},isCrosswalk:function(){return d.is("crosswalk")},platform:function(){return null===h&&d.setPlatform(d.device().platform),h},setPlatform:function(e){h=null!=e&&e.length?e.toLowerCase():r("ionicplatform")?r("ionicplatform"):d.ua.indexOf("Edge")>-1?u:d.ua.indexOf("Windows Phone")>-1?l:d.ua.indexOf("Android")>0?s:/iPhone|iPad|iPod/.test(d.ua)?"ios":d.navigator.platform&&navigator.platform.toLowerCase().split(" ")[0]||""},version:function(){return null===f&&d.setVersion(d.device().version),f},setVersion:function(e){if(null==e||(e=e.split("."),e=parseFloat(e[0]+"."+(e.length>1?e[1]:0)),isNaN(e))){f=0;var t=d.platform(),n={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/,windowsphone:/Windows Phone (\d+).(\d+)?/};n[t]&&(e=d.ua.match(n[t]))&&e.length>2&&(f=parseFloat(e[1]+"."+e[2]))}else f=e},is:function(e){if(e=e.toLowerCase(),d.platforms)for(var t=0;t<d.platforms.length;t++)if(d.platforms[t]===e)return!0;var n=d.platform();return n?n===e.toLowerCase():d.ua.toLowerCase().indexOf(e)>=0},exitApp:function(){d.ready((function(){navigator.app&&navigator.app.exitApp&&navigator.app.exitApp()}))},showStatusBar:function(n){d._showStatusBar=n,d.ready((function(){c((function(){d._showStatusBar?(e.StatusBar&&e.StatusBar.show(),t.body.classList.remove("status-bar-hide")):(e.StatusBar&&e.StatusBar.hide(),t.body.classList.add("status-bar-hide"))}))}))},fullScreen:function(e,r){d.isFullScreen=!1!==e,n.DomUtil.ready((function(){c((function(){d.isFullScreen?t.body.classList.add("fullscreen"):t.body.classList.remove("fullscreen")})),d.showStatusBar(!0===r)}))}},h=null,f=null,p=[];setTimeout((function(){!d.isReady&&d.isWebView()}),2e3),"complete"===t.readyState?i():(a=!0,e.addEventListener("load",i,!1))}(window,document,ionic),function(e,t){"use strict";t.CSS={},t.CSS.TRANSITION=[],t.CSS.TRANSFORM=[],t.EVENTS={},function(){var n,r=["webkitTransform","transform","-webkit-transform","webkit-transform","-moz-transform","moz-transform","MozTransform","mozTransform","msTransform"];for(n=0;n<r.length;n++)if(void 0!==e.documentElement.style[r[n]]){t.CSS.TRANSFORM=r[n];break}for(r=["webkitTransition","mozTransition","msTransition","transition"],n=0;n<r.length;n++)if(void 0!==e.documentElement.style[r[n]]){t.CSS.TRANSITION=r[n];break}t.CSS.TRANSITION=t.CSS.TRANSITION||"transition";var i=t.CSS.TRANSITION.indexOf("webkit")>-1;t.CSS.TRANSITION_DURATION=(i?"-webkit-":"")+"transition-duration",t.CSS.TRANSITIONEND=(i?"webkitTransitionEnd ":"")+"transitionend"}(),function(){var e="touchstart",n="touchmove",r="touchend",i="touchcancel";window.navigator.pointerEnabled?(e="pointerdown",n="pointermove",r="pointerup",i="pointercancel"):window.navigator.msPointerEnabled&&(e="MSPointerDown",n="MSPointerMove",r="MSPointerUp",i="MSPointerCancel"),t.EVENTS.touchstart=e,t.EVENTS.touchmove=n,t.EVENTS.touchend=r,t.EVENTS.touchcancel=i}(),"classList"in e.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function e(e){return function(){var n,r=t.className.split(/\s+/);for(n=0;n<arguments.length;n++)e(r,r.indexOf(arguments[n]),arguments[n]);t.className=r.join(" ")}}var t=this;return{add:e((function(e,t,n){~t||e.push(n)})),remove:e((function(e,t){~t&&e.splice(t,1)})),toggle:e((function(e,t,n){~t?e.splice(t,1):e.push(n)})),contains:function(e){return!!~t.className.split(/\s+/).indexOf(e)},item:function(e){return t.className.split(/\s+/)[e]||null}}}})}(document,ionic);var $,D,C,E,A,P,Y,O,I="touchmove",j=12,B=50,H={click:function(e){return"submit"==e.target.type&&0===e.detail?null:ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(e.target)||!e.isIonicTap&&!ionic.tap.requiresNativeClick(e.target)?(e.stopPropagation(),ionic.tap.isLabelWithTextInput(e.target)||e.preventDefault(),!1):void 0},mousedown:function(t){return t.isIonicTap||l(t)?null:C?(t.stopPropagation(),ionic.Platform.isEdge()||ionic.tap.isTextInput(t.target)&&O===t.target||f(t.target.tagName)||t.target.isContentEditable||ionic.tap.isVideo(t.target)||t.preventDefault(),!1):(A=!1,P=ionic.tap.pointerCoord(t),e("mousemove"),void ionic.activator.start(t))},mouseup:function(n){return C?(n.stopPropagation(),n.preventDefault(),!1):!l(n)&&!f(n.target.tagName)&&(c(n)||t(n),e("mousemove",!1),ionic.activator.end(),void(A=!1))},mousemove:function(t){return c(t)?(e("mousemove",!1),ionic.activator.end(),A=!0,!1):void 0},touchstart:r,touchend:i,touchcancel:a,touchmove:o,pointerdown:r,pointerup:i,pointercancel:a,pointermove:o,MSPointerDown:r,MSPointerUp:i,MSPointerCancel:a,MSPointerMove:o,focusin:function(e){C&&ionic.tap.isTextInput(u())&&ionic.tap.isTextInput(Y)&&Y!==e.target&&(Y.focus(),Y=null),ionic.scroll.isScrolling=!1},focusout:function(){u(null)}};ionic.tap={register:function(t){return $=t,e("click",!0,!0),e("mouseup"),e("mousedown"),window.navigator.pointerEnabled?(e("pointerdown"),e("pointerup"),e("pointercancel"),I="pointermove"):window.navigator.msPointerEnabled?(e("MSPointerDown"),e("MSPointerUp"),e("MSPointerCancel"),I="MSPointerMove"):(e("touchstart"),e("touchend"),e("touchcancel")),e("focusin"),e("focusout"),function(){for(var t in H)e(t,!1);$=null,D=null,C=!1,A=!1,P=null}},ignoreScrollStart:function(e){return e.defaultPrevented||/^(file|range)$/i.test(e.target.type)||"true"==(e.target.dataset?e.target.dataset.preventScroll:e.target.getAttribute("data-prevent-scroll"))||!!/^(object|embed)$/i.test(e.target.tagName)||ionic.tap.isElementTapDisabled(e.target)},isTextInput:function(e){return!!e&&("TEXTAREA"==e.tagName||"true"===e.contentEditable||"INPUT"==e.tagName&&!/^(radio|checkbox|range|file|submit|reset|color|image|button)$/i.test(e.type))},isDateInput:function(e){return!!e&&"INPUT"==e.tagName&&/^(date|time|datetime-local|month|week)$/i.test(e.type)},isVideo:function(e){return!!e&&"VIDEO"==e.tagName},isKeyboardElement:function(e){return!ionic.Platform.isIOS()||ionic.Platform.isIPad()?ionic.tap.isTextInput(e)&&!ionic.tap.isDateInput(e):ionic.tap.isTextInput(e)||!!e&&"SELECT"==e.tagName},isLabelWithTextInput:function(e){var t=d(e,!1);return!!t&&ionic.tap.isTextInput(h(t))},containsOrIsTextInput:function(e){return ionic.tap.isTextInput(e)||ionic.tap.isLabelWithTextInput(e)},cloneFocusedInput:function(e){ionic.tap.hasCheckedClone||(ionic.tap.hasCheckedClone=!0,ionic.requestAnimationFrame((function(){var t=e.querySelector(":focus");if(ionic.tap.isTextInput(t)&&!ionic.tap.isDateInput(t)){var n=t.cloneNode(!0);n.value=t.value,n.classList.add("cloned-text-input"),n.readOnly=!0,t.isContentEditable&&(n.contentEditable=t.contentEditable,n.innerHTML=t.innerHTML),t.parentElement.insertBefore(n,t),t.classList.add("previous-input-focus"),n.scrollTop=t.scrollTop}})))},hasCheckedClone:!1,removeClonedInputs:function(e){ionic.tap.hasCheckedClone=!1,ionic.requestAnimationFrame((function(){var t,n=e.querySelectorAll(".cloned-text-input"),r=e.querySelectorAll(".previous-input-focus");for(t=0;t<n.length;t++)n[t].parentElement.removeChild(n[t]);for(t=0;t<r.length;t++)r[t].classList.remove("previous-input-focus"),r[t].style.top="",ionic.keyboard.isOpen&&!ionic.keyboard.isClosing&&r[t].focus()}))},requiresNativeClick:function(e){return!(!ionic.Platform.isWindowsPhone()||"A"!=e.tagName&&"BUTTON"!=e.tagName&&!e.hasAttribute("ng-click")&&("INPUT"!=e.tagName||"button"!=e.type&&"submit"!=e.type))||!!(!e||e.disabled||/^(file|range)$/i.test(e.type)||/^(object|video)$/i.test(e.tagName)||ionic.tap.isLabelContainingFileInput(e))||ionic.tap.isElementTapDisabled(e)},isLabelContainingFileInput:function(e){var t=d(e);if("LABEL"!==t.tagName)return!1;var n=t.querySelector("input[type=file]");return!(!n||!1!==n.disabled)},isElementTapDisabled:function(e){if(e&&1===e.nodeType)for(var t=e;t;){if(t.getAttribute&&"true"==t.getAttribute("data-tap-disabled"))return!0;t=t.parentElement}return!1},setTolerance:function(e,t){j=e,B=t},cancelClick:function(){A=!0},pointerCoord:function(e){var t={x:0,y:0};if(e){var n=e.touches&&e.touches.length?e.touches:[e],r=e.changedTouches&&e.changedTouches[0]||n[0];r&&(t.x=r.clientX||r.pageX||0,t.y=r.clientY||r.pageY||0)}return t}},ionic.DomUtil.ready((function(){var e="undefined"!=typeof angular?angular:null;(!e||e&&!e.scenario)&&ionic.tap.register(document)})),function(e,t){"use strict";function n(){o={},t.requestAnimationFrame(i)}function r(){for(var e in o)o[e]&&(o[e].classList.add(l),a[e]=o[e]);o={}}function i(){if(t.transition&&t.transition.isActive)setTimeout(i,400);else for(var e in a)a[e]&&(a[e].classList.remove(l),delete a[e])}var o={},a={},s=0,l="activated";t.activator={start:function(e){var n=t.tap.pointerCoord(e).x;n>0&&30>n||t.requestAnimationFrame((function(){if(!(t.scroll&&t.scroll.isScrolling||t.tap.requiresNativeClick(e.target))){for(var n,i=e.target,a=0;6>a&&i&&1===i.nodeType;a++){if(n&&i.classList&&i.classList.contains("item")){n=i;break}if("A"==i.tagName||"BUTTON"==i.tagName||i.hasAttribute("ng-click")){n=i;break}if(i.classList&&i.classList.contains("button")){n=i;break}if("ION-CONTENT"==i.tagName||i.classList&&i.classList.contains("pane")||"BODY"==i.tagName)break;i=i.parentElement}n&&(o[s]=n,t.requestAnimationFrame(r),s=s>29?0:s+1)}}))},end:function(){setTimeout(n,200)}}}(document,ionic),function(e){var t=0;e.Utils={arrayMove:function(e,t,n){if(n>=e.length)for(var r=n-e.length;1+r--;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e},proxy:function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}},debounce:function(e,t,n){var r,i,o,a,s;return function(){o=this,i=arguments,a=new Date;var l=function(){var u=new Date-a;t>u?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(o,i)))},u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(o,i)),s}},throttle:function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Date.now(),a=null,o=e.apply(r,i)};return function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return r=this,i=arguments,0>=c?(clearTimeout(a),a=null,s=u,o=e.apply(r,i)):a||!1===n.trailing||(a=setTimeout(l,c)),o}},inherit:function(t,n){var r,i=this;r=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},e.extend(r,i,n);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,t&&e.extend(r.prototype,t),r.__super__=i.prototype,r},extend:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){var r=t[n];if(r)for(var i in r)e[i]=r[i]}return e},nextUid:function(){return"ion"+t++},disconnectScope:function(e){if(e&&e.$root!==e){var t=e.$parent;e.$$disconnected=!0,e.$broadcast("$ionic.disconnectScope",e),t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e.$parent;e.$$disconnected=!1,e.$broadcast("$ionic.reconnectScope",e),e.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=e,t.$$childTail=e):t.$$childHead=t.$$childTail=e}},isScopeDisconnected:function(e){for(var t=e;t;){if(t.$$disconnected)return!0;t=t.$parent}return!1}},e.inherit=e.Utils.inherit,e.extend=e.Utils.extend,e.throttle=e.Utils.throttle,e.proxy=e.Utils.proxy,e.debounce=e.Utils.debounce}(window.ionic);var N,R,z,F,V,W=0,U=0,q=0,G=!1,Z="keyboard-open",J=ionic.debounce((function(e){return clearTimeout(V),e.target&&!e.target.readOnly&&ionic.tap.isKeyboardElement(e.target)&&(z=ionic.DomUtil.getParentWithClass(e.target,"scroll-content"))?(N=e.target,z.classList.contains("overflow-scroll")||(document.body.scrollTop=0,z.scrollTop=0,ionic.requestAnimationFrame((function(){document.body.scrollTop=0,z.scrollTop=0})),window.navigator.msPointerEnabled?document.addEventListener("MSPointerMove",_,!1):document.addEventListener("touchmove",_,!1)),(!ionic.keyboard.isOpen||ionic.keyboard.isClosing)&&(ionic.keyboard.isOpening=!0,ionic.keyboard.isClosing=!1),document.addEventListener("keydown",v,!1),void(ionic.keyboard.isOpen||S()?ionic.keyboard.isOpen&&w():y(w,!0))):(N&&(R=N),void(N=null))}),200,!0),X=ionic.debounce((function(e){clearTimeout(V),(!ionic.keyboard.isOpen||ionic.keyboard.isClosing)&&(ionic.keyboard.isOpening=!0,ionic.keyboard.isClosing=!1),ionic.keyboard.height=e.keyboardHeight,y(G?M:w,!0)}),100,!0);ionic.keyboard={isOpen:!1,isClosing:!1,isOpening:!1,height:0,isLandscape:!1,isInitialized:!1,hide:function(){S()&&cordova.plugins.Keyboard.close(),N&&N.blur()},show:function(){S()&&cordova.plugins.Keyboard.show()},disable:function(){S()?(window.removeEventListener("native.keyboardshow",X),window.removeEventListener("native.keyboardhide",m)):document.body.removeEventListener("focusout",m),document.body.removeEventListener("ionic.focusin",J),document.body.removeEventListener("focusin",J),window.removeEventListener("orientationchange",g),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerDown",p):document.removeEventListener("touchstart",p),ionic.keyboard.isInitialized=!1},enable:function(){p()}},W=x(),ionic.Platform.ready((function(){k(),window.addEventListener("orientationchange",g),setTimeout(k,999),window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",p,!1):document.addEventListener("touchstart",p,!1)}));var K,Q={};ionic.viewport={orientation:function(){return window.innerWidth>window.innerHeight?90:0}},ionic.Platform.ready((function(){(function(){var e;for(e=0;e<document.head.children.length;e++)if("viewport"==document.head.children[e].name){K=document.head.children[e];break}if(K){var t,n=K.content.toLowerCase().replace(/\s+/g,"").split(",");for(e=0;e<n.length;e++)n[e]&&(t=n[e].split("="),Q[t[0]]=t.length>1?t[1]:"_");T()}})(),window.addEventListener("orientationchange",(function(){setTimeout(T,1e3)}),!1)})),function(e){"use strict";e.views.View=function(){this.initialize.apply(this,arguments)},e.views.View.inherit=e.inherit,e.extend(e.views.View.prototype,{initialize:function(){}})}(window.ionic);var ee={effect:{}};!function(e){var t=Date.now||function(){return+new Date},n={},r=1;ee.effect.Animate={requestAnimationFrame:function(){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,n=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(n=!1),n)return function(e,n){t(e,n)};var r={},i=1,o=null,a=+new Date;return function(e){var t=i++;return r[t]=e,null===o&&(o=setInterval((function(){var e=+new Date,t=r;for(var n in r={},t)t.hasOwnProperty(n)&&(t[n](e),a=e);e-a>2500&&(clearInterval(o),o=null)}),1e3/60)),t}}(),stop:function(e){var t=null!=n[e];return t&&(n[e]=null),t},isRunning:function(e){return null!=n[e]},start:function(e,i,o,a,s,l){var u=t(),c=u,d=0,h=0,f=r++;if(l||(l=document.body),f%20==0){var p={};for(var m in n)p[m]=!0;n=p}var g=function(r){var p=!0!==r,m=t();if(!n[f]||i&&!i(f))return n[f]=null,void(o&&o(60-h/((m-u)/1e3),f,!1));if(p)for(var v=Math.round((m-c)/(1e3/60))-1,_=0;_<Math.min(v,4);_++)g(!0),h++;a&&(d=(m-u)/a)>1&&(d=1);var y=s?s(d):d;!1!==e(y,m,p)&&1!==d||!p?p&&(c=m,ee.effect.Animate.requestAnimationFrame(g,l)):(n[f]=null,o&&o(60-h/((m-u)/1e3),f,1===d||null==a))};return n[f]=!0,ee.effect.Animate.requestAnimationFrame(g,l),f}}}(window),function(e){var t=function(){},n=function(e){return Math.pow(e-1,3)+1},r=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)};e.views.Scroll=e.views.View.inherit({initialize:function(n){var r=this;for(var i in r.__container=n.el,r.__content=n.el.firstElementChild,setTimeout((function(){r.__container&&r.__content&&(r.__container.scrollTop=0,r.__content.scrollTop=0)})),r.options={scrollingX:!1,scrollbarX:!0,scrollingY:!0,scrollbarY:!0,startX:0,startY:0,wheelDampen:6,minScrollbarSizeX:5,minScrollbarSizeY:5,scrollbarsFade:!0,scrollbarFadeDelay:300,scrollbarResizeFadeDelay:1e3,animating:!0,animationDuration:250,decelVelocityThreshold:4,decelVelocityThresholdPaging:4,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,deceleration:.97,preventDefault:!1,scrollingComplete:t,penetrationDeceleration:.03,penetrationAcceleration:.08,scrollEventInterval:10,freeze:!1,getContentWidth:function(){return Math.max(r.__content.scrollWidth,r.__content.offsetWidth)},getContentHeight:function(){return Math.max(r.__content.scrollHeight,r.__content.offsetHeight+2*r.__content.offsetTop)}},n)r.options[i]=n[i];r.hintResize=e.debounce((function(){r.resize()}),1e3,!0),r.onScroll=function(){e.scroll.isScrolling?(clearTimeout(r.scrollTimer),r.scrollTimer=setTimeout(r.setScrollStop,80)):setTimeout(r.setScrollStart,50)},r.freeze=function(e){return arguments.length&&(r.options.freeze=e),r.options.freeze},r.freezeShut=r.freeze,r.setScrollStart=function(){e.scroll.isScrolling=Math.abs(e.scroll.lastTop-r.__scrollTop)>1,clearTimeout(r.scrollTimer),r.scrollTimer=setTimeout(r.setScrollStop,80)},r.setScrollStop=function(){e.scroll.isScrolling=!1,e.scroll.lastTop=r.__scrollTop},r.triggerScrollEvent=e.throttle((function(){r.onScroll(),e.trigger("scroll",{scrollTop:r.__scrollTop,scrollLeft:r.__scrollLeft,target:r.__container})}),r.options.scrollEventInterval),r.triggerScrollEndEvent=function(){e.trigger("scrollend",{scrollTop:r.__scrollTop,scrollLeft:r.__scrollLeft,target:r.__container})},r.__scrollLeft=r.options.startX,r.__scrollTop=r.options.startY,r.__callback=r.getRenderFn(),r.__initEventHandlers(),r.__createScrollbars()},run:function(){this.resize(),this.__fadeScrollbars("out",this.options.scrollbarResizeFadeDelay)},__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,__transformProperty:null,__perspectiveProperty:null,__indicatorX:null,__indicatorY:null,__scrollbarFadeTimeout:null,__didWaitForSize:null,__sizerTimeout:null,__initEventHandlers:function(){function t(e){return e.touches&&e.touches.length?e.touches:[{pageX:e.pageX,pageY:e.pageY}]}var n,r=this,i=r.__container;if(r.scrollChildIntoView=function(t){var o=i.getBoundingClientRect().bottom;n=i.offsetHeight;var a=r.isShrunkForKeyboard,s=i.parentNode.classList.contains("modal")&&window.innerWidth>=680;if(!a){if(e.Platform.isIOS()||e.Platform.isFullScreen||s){var l=t.detail.viewportHeight-o,u=Math.max(0,t.detail.keyboardHeight-l);e.requestAnimationFrame((function(){n-=u,i.style.height=n+"px",i.style.overflow="visible",r.resize()}))}r.isShrunkForKeyboard=!0}t.detail.isElementUnderKeyboard&&e.requestAnimationFrame((function(){i.scrollTop=0,r.isShrunkForKeyboard&&!a&&(o=i.getBoundingClientRect().bottom);var s=.5*n,l=(t.detail.elementBottom+t.detail.elementTop)/2-o+s;l>0&&(e.Platform.isIOS()&&e.tap.cloneFocusedInput(i,r),r.scrollBy(0,l,!0),r.onScroll())})),t.stopPropagation()},r.resetScrollView=function(){r.isShrunkForKeyboard&&(r.isShrunkForKeyboard=!1,i.style.height="",i.style.overflow=""),r.resize()},i.addEventListener("scrollChildIntoView",r.scrollChildIntoView),document.addEventListener("resetScrollView",r.resetScrollView),r.touchStart=function(n){if(r.startCoordinates=e.tap.pointerCoord(n),!e.tap.ignoreScrollStart(n)){if(r.__isDown=!0,e.tap.containsOrIsTextInput(n.target)||"SELECT"===n.target.tagName)return void(r.__hasStarted=!1);r.__isSelectable=!0,r.__enableScrollY=!0,r.__hasStarted=!0,r.doTouchStart(t(n),n.timeStamp),n.preventDefault()}},r.touchMove=function(n){if(!(r.options.freeze||!r.__isDown||!r.__isDown&&n.defaultPrevented||"TEXTAREA"===n.target.tagName&&n.target.parentElement.querySelector(":focus"))){if(!r.__hasStarted&&(e.tap.containsOrIsTextInput(n.target)||"SELECT"===n.target.tagName))return r.__hasStarted=!0,r.doTouchStart(t(n),n.timeStamp),void n.preventDefault();if(r.startCoordinates){var o=e.tap.pointerCoord(n);r.__isSelectable&&e.tap.isTextInput(n.target)&&Math.abs(r.startCoordinates.x-o.x)>20&&(r.__enableScrollY=!1,r.__isSelectable=!0),r.__enableScrollY&&Math.abs(r.startCoordinates.y-o.y)>10&&(r.__isSelectable=!1,e.tap.cloneFocusedInput(i,r))}r.doTouchMove(t(n),n.timeStamp,n.scale),r.__isDown=!0}},r.touchMoveBubble=function(e){r.__isDown&&r.options.preventDefault&&e.preventDefault()},r.touchEnd=function(t){r.__isDown&&(r.doTouchEnd(t,t.timeStamp),r.__isDown=!1,r.__hasStarted=!1,r.__isSelectable=!0,r.__enableScrollY=!0,r.__isDragging||r.__isDecelerating||r.__isAnimating||e.tap.removeClonedInputs(i,r))},r.mouseWheel=e.animationFrameThrottle((function(t){var n=e.DomUtil.getParentOrSelfWithClass(t.target,"ionic-scroll");r.options.freeze||n!==r.__container||(r.hintResize(),r.scrollBy((t.wheelDeltaX||t.deltaX||0)/r.options.wheelDampen,(-t.wheelDeltaY||t.deltaY||0)/r.options.wheelDampen),r.__fadeScrollbars("in"),clearTimeout(r.__wheelHideBarTimeout),r.__wheelHideBarTimeout=setTimeout((function(){r.__fadeScrollbars("out")}),100))})),"ontouchstart"in window)i.addEventListener("touchstart",r.touchStart,!1),r.options.preventDefault&&i.addEventListener("touchmove",r.touchMoveBubble,!1),document.addEventListener("touchmove",r.touchMove,!1),document.addEventListener("touchend",r.touchEnd,!1),document.addEventListener("touchcancel",r.touchEnd,!1),document.addEventListener("wheel",r.mouseWheel,!1);else if(window.navigator.pointerEnabled)i.addEventListener("pointerdown",r.touchStart,!1),r.options.preventDefault&&i.addEventListener("pointermove",r.touchMoveBubble,!1),document.addEventListener("pointermove",r.touchMove,!1),document.addEventListener("pointerup",r.touchEnd,!1),document.addEventListener("pointercancel",r.touchEnd,!1),document.addEventListener("wheel",r.mouseWheel,!1);else if(window.navigator.msPointerEnabled)i.addEventListener("MSPointerDown",r.touchStart,!1),r.options.preventDefault&&i.addEventListener("MSPointerMove",r.touchMoveBubble,!1),document.addEventListener("MSPointerMove",r.touchMove,!1),document.addEventListener("MSPointerUp",r.touchEnd,!1),document.addEventListener("MSPointerCancel",r.touchEnd,!1),document.addEventListener("wheel",r.mouseWheel,!1);else{var o=!1;r.mouseDown=function(n){e.tap.ignoreScrollStart(n)||"SELECT"===n.target.tagName||(r.doTouchStart(t(n),n.timeStamp),e.tap.isTextInput(n.target)||n.preventDefault(),o=!0)},r.mouseMove=function(e){r.options.freeze||!o||!o&&e.defaultPrevented||(r.doTouchMove(t(e),e.timeStamp),o=!0)},r.mouseMoveBubble=function(e){o&&r.options.preventDefault&&e.preventDefault()},r.mouseUp=function(e){o&&(r.doTouchEnd(e,e.timeStamp),o=!1)},i.addEventListener("mousedown",r.mouseDown,!1),r.options.preventDefault&&i.addEventListener("mousemove",r.mouseMoveBubble,!1),document.addEventListener("mousemove",r.mouseMove,!1),document.addEventListener("mouseup",r.mouseUp,!1),document.addEventListener("mousewheel",r.mouseWheel,!1),document.addEventListener("wheel",r.mouseWheel,!1)}},__cleanup:function(){var n=this,r=n.__container;r.removeEventListener("touchstart",n.touchStart),r.removeEventListener("touchmove",n.touchMoveBubble),document.removeEventListener("touchmove",n.touchMove),document.removeEventListener("touchend",n.touchEnd),document.removeEventListener("touchcancel",n.touchEnd),r.removeEventListener("pointerdown",n.touchStart),r.removeEventListener("pointermove",n.touchMoveBubble),document.removeEventListener("pointermove",n.touchMove),document.removeEventListener("pointerup",n.touchEnd),document.removeEventListener("pointercancel",n.touchEnd),r.removeEventListener("MSPointerDown",n.touchStart),r.removeEventListener("MSPointerMove",n.touchMoveBubble),document.removeEventListener("MSPointerMove",n.touchMove),document.removeEventListener("MSPointerUp",n.touchEnd),document.removeEventListener("MSPointerCancel",n.touchEnd),r.removeEventListener("mousedown",n.mouseDown),r.removeEventListener("mousemove",n.mouseMoveBubble),document.removeEventListener("mousemove",n.mouseMove),document.removeEventListener("mouseup",n.mouseUp),document.removeEventListener("mousewheel",n.mouseWheel),document.removeEventListener("wheel",n.mouseWheel),r.removeEventListener("scrollChildIntoView",n.scrollChildIntoView),document.removeEventListener("resetScrollView",n.resetScrollView),e.tap.removeClonedInputs(r,n),delete n.__container,delete n.__content,delete n.__indicatorX,delete n.__indicatorY,delete n.options.el,n.__callback=n.scrollChildIntoView=n.resetScrollView=t,n.mouseMove=n.mouseDown=n.mouseUp=n.mouseWheel=n.touchStart=n.touchMove=n.touchEnd=n.touchCancel=t,n.resize=n.scrollTo=n.zoomTo=n.__scrollingComplete=t,r=null},__createScrollbar:function(e){var t=document.createElement("div"),n=document.createElement("div");return n.className="scroll-bar-indicator scroll-bar-fade-out",t.className="h"==e?"scroll-bar scroll-bar-h":"scroll-bar scroll-bar-v",t.appendChild(n),t},__createScrollbars:function(){var e,t,n=this;n.options.scrollingX&&((e={el:n.__createScrollbar("h"),sizeRatio:1}).indicator=e.el.children[0],n.options.scrollbarX&&n.__container.appendChild(e.el),n.__indicatorX=e),n.options.scrollingY&&((t={el:n.__createScrollbar("v"),sizeRatio:1}).indicator=t.el.children[0],n.options.scrollbarY&&n.__container.appendChild(t.el),n.__indicatorY=t)},__resizeScrollbars:function(){var t=this;if(t.__indicatorX){var n=Math.max(Math.round(t.__clientWidth*t.__clientWidth/t.__contentWidth),20);n>t.__contentWidth&&(n=0),n!==t.__indicatorX.size&&e.requestAnimationFrame((function(){t.__indicatorX.indicator.style.width=n+"px"})),t.__indicatorX.size=n,t.__indicatorX.minScale=t.options.minScrollbarSizeX/n,t.__indicatorX.maxPos=t.__clientWidth-n,t.__indicatorX.sizeRatio=t.__maxScrollLeft?t.__indicatorX.maxPos/t.__maxScrollLeft:1}if(t.__indicatorY){var r=Math.max(Math.round(t.__clientHeight*t.__clientHeight/t.__contentHeight),20);r>t.__contentHeight&&(r=0),r!==t.__indicatorY.size&&e.requestAnimationFrame((function(){t.__indicatorY&&(t.__indicatorY.indicator.style.height=r+"px")})),t.__indicatorY.size=r,t.__indicatorY.minScale=t.options.minScrollbarSizeY/r,t.__indicatorY.maxPos=t.__clientHeight-r,t.__indicatorY.sizeRatio=t.__maxScrollTop?t.__indicatorY.maxPos/t.__maxScrollTop:1}},__repositionScrollbars:function(){var e,t,n,r,i,o,a=this,s=0,l=0;if(a.__indicatorX){a.__indicatorY&&(s=10),i=Math.round(a.__indicatorX.sizeRatio*a.__scrollLeft)||0,n=a.__scrollLeft-(a.__maxScrollLeft-s),a.__scrollLeft<0?(t=Math.max(a.__indicatorX.minScale,(a.__indicatorX.size-Math.abs(a.__scrollLeft))/a.__indicatorX.size),i=0,a.__indicatorX.indicator.style[a.__transformOriginProperty]="left center"):n>0?(t=Math.max(a.__indicatorX.minScale,(a.__indicatorX.size-n)/a.__indicatorX.size),i=a.__indicatorX.maxPos-s,a.__indicatorX.indicator.style[a.__transformOriginProperty]="right center"):(i=Math.min(a.__maxScrollLeft,Math.max(0,i)),t=1);var u="translate3d("+i+"px, 0, 0) scaleX("+t+")";a.__indicatorX.transformProp!==u&&(a.__indicatorX.indicator.style[a.__transformProperty]=u,a.__indicatorX.transformProp=u)}if(a.__indicatorY){o=Math.round(a.__indicatorY.sizeRatio*a.__scrollTop)||0,a.__indicatorX&&(l=10),r=a.__scrollTop-(a.__maxScrollTop-l),a.__scrollTop<0?(e=Math.max(a.__indicatorY.minScale,(a.__indicatorY.size-Math.abs(a.__scrollTop))/a.__indicatorY.size),o=0,"center top"!==a.__indicatorY.originProp&&(a.__indicatorY.indicator.style[a.__transformOriginProperty]="center top",a.__indicatorY.originProp="center top")):r>0?(e=Math.max(a.__indicatorY.minScale,(a.__indicatorY.size-r)/a.__indicatorY.size),o=a.__indicatorY.maxPos-l,"center bottom"!==a.__indicatorY.originProp&&(a.__indicatorY.indicator.style[a.__transformOriginProperty]="center bottom",a.__indicatorY.originProp="center bottom")):(o=Math.min(a.__maxScrollTop,Math.max(0,o)),e=1);var c="translate3d(0,"+o+"px, 0) scaleY("+e+")";a.__indicatorY.transformProp!==c&&(a.__indicatorY.indicator.style[a.__transformProperty]=c,a.__indicatorY.transformProp=c)}},__fadeScrollbars:function(e,t){var n=this;if(n.options.scrollbarsFade){var r="scroll-bar-fade-out";!0===n.options.scrollbarsFade&&(clearTimeout(n.__scrollbarFadeTimeout),"in"==e?(n.__indicatorX&&n.__indicatorX.indicator.classList.remove(r),n.__indicatorY&&n.__indicatorY.indicator.classList.remove(r)):n.__scrollbarFadeTimeout=setTimeout((function(){n.__indicatorX&&n.__indicatorX.indicator.classList.add(r),n.__indicatorY&&n.__indicatorY.indicator.classList.add(r)}),t||n.options.scrollbarFadeDelay))}},__scrollingComplete:function(){this.options.scrollingComplete(),e.tap.removeClonedInputs(this.__container,this),this.__fadeScrollbars("out")},resize:function(e){var t=this;t.__container&&t.options&&t.setDimensions(t.__container.clientWidth,t.__container.clientHeight,t.options.getContentWidth(),t.options.getContentHeight(),e)},getRenderFn:function(){var e,t=this,n=t.__content,r=document.documentElement.style;"MozAppearance"in r?e="gecko":"WebkitAppearance"in r?e="webkit":"string"==typeof navigator.cpuClass&&(e="trident");var i,o={trident:"ms",gecko:"Moz",webkit:"Webkit",presto:"O"}[e],a=document.createElement("div"),s=o+"Perspective",l=o+"Transform",u=o+"TransformOrigin";return t.__perspectiveProperty=l,t.__transformProperty=l,t.__transformOriginProperty=u,a.style[s]!==i?function(e,r,i,o){var a="translate3d("+-e+"px,"+-r+"px,0) scale("+i+")";a!==t.contentTransform&&(n.style[l]=a,t.contentTransform=a),t.__repositionScrollbars(),o||t.triggerScrollEvent()}:a.style[l]!==i?function(e,r,i,o){n.style[l]="translate("+-e+"px,"+-r+"px) scale("+i+")",t.__repositionScrollbars(),o||t.triggerScrollEvent()}:function(e,r,i,o){n.style.marginLeft=e?-e/i+"px":"",n.style.marginTop=r?-r/i+"px":"",n.style.zoom=i||"",t.__repositionScrollbars(),o||t.triggerScrollEvent()}},setDimensions:function(e,t,n,r,i){var o=this;(e||t||n||r)&&(e===+e&&(o.__clientWidth=e),t===+t&&(o.__clientHeight=t),n===+n&&(o.__contentWidth=n),r===+r&&(o.__contentHeight=r),o.__computeScrollMax(),o.__resizeScrollbars(),i||o.scrollTo(o.__scrollLeft,o.__scrollTop,!0,null,!0))},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(t,n){var r=this;r.__refreshHeight=t,r.__refreshActivate=function(){e.requestAnimationFrame(n.activate)},r.__refreshDeactivate=function(){e.requestAnimationFrame(n.deactivate)},r.__refreshStart=function(){e.requestAnimationFrame(n.start)},r.__refreshShow=function(){e.requestAnimationFrame(n.show)},r.__refreshHide=function(){e.requestAnimationFrame(n.hide)},r.__refreshTail=function(){e.requestAnimationFrame(n.tail)},r.__refreshTailTime=100,r.__minSpinTime=600},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0);var e=new Date;this.refreshStartTime=e.getTime(),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this,t=new Date,n=0;e.refreshStartTime+e.__minSpinTime>t.getTime()&&(n=e.refreshStartTime+e.__minSpinTime-t.getTime()),setTimeout((function(){e.__refreshTail&&e.__refreshTail(),setTimeout((function(){e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.__refreshHide&&e.__refreshHide(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)}),e.__refreshTailTime)}),n)},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,n,r){
-var i=this;if(!i.options.zooming)throw new Error("Zooming is not enabled!");i.__isDecelerating&&(ee.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1);var o=i.__zoomLevel;null==n&&(n=i.__clientWidth/2),null==r&&(r=i.__clientHeight/2),e=Math.max(Math.min(e,i.options.maxZoom),i.options.minZoom),i.__computeScrollMax(e);var a=(n+i.__scrollLeft)*e/o-n,s=(r+i.__scrollTop)*e/o-r;a>i.__maxScrollLeft?a=i.__maxScrollLeft:0>a&&(a=0),s>i.__maxScrollTop?s=i.__maxScrollTop:0>s&&(s=0),i.__publish(a,s,e,t)},zoomBy:function(e,t,n,r){this.zoomTo(this.__zoomLevel*e,t,n,r)},scrollTo:function(e,t,n,r,i){var o=this;if(o.__isDecelerating&&(ee.effect.Animate.stop(o.__isDecelerating),o.__isDecelerating=!1),null!=r&&r!==o.__zoomLevel){if(!o.options.zooming)throw new Error("Zooming is not enabled!");e*=r,t*=r,o.__computeScrollMax(r)}else r=o.__zoomLevel;o.options.scrollingX?o.options.paging?e=Math.round(e/o.__clientWidth)*o.__clientWidth:o.options.snapping&&(e=Math.round(e/o.__snapWidth)*o.__snapWidth):e=o.__scrollLeft,o.options.scrollingY?o.options.paging?t=Math.round(t/o.__clientHeight)*o.__clientHeight:o.options.snapping&&(t=Math.round(t/o.__snapHeight)*o.__snapHeight):t=o.__scrollTop,e=Math.max(Math.min(o.__maxScrollLeft,e),0),t=Math.max(Math.min(o.__maxScrollTop,t),0),e===o.__scrollLeft&&t===o.__scrollTop&&(n=!1),o.__publish(e,t,r,n,i)},scrollBy:function(e,t,n){var r=this,i=r.__isAnimating?r.__scheduledLeft:r.__scrollLeft,o=r.__isAnimating?r.__scheduledTop:r.__scrollTop;r.scrollTo(i+(e||0),o+(t||0),n)},doMouseZoom:function(e,t,n,r){var i=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*i,!1,n-this.__clientLeft,r-this.__clientTop)},doTouchStart:function(e,t){var n=this;n.__decStopped=!(!n.__isDecelerating&&!n.__isAnimating),n.hintResize(),t instanceof Date&&(t=t.valueOf()),"number"!=typeof t&&(t=Date.now()),n.__interruptedAnimation=!0,n.__isDecelerating&&(ee.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1,n.__interruptedAnimation=!0),n.__isAnimating&&(ee.effect.Animate.stop(n.__isAnimating),n.__isAnimating=!1,n.__interruptedAnimation=!0);var r,i,o=1===e.length;o?(r=e[0].pageX,i=e[0].pageY):(r=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),n.__initialTouchLeft=r,n.__initialTouchTop=i,n.__initialTouches=e,n.__zoomLevelStart=n.__zoomLevel,n.__lastTouchLeft=r,n.__lastTouchTop=i,n.__lastTouchMove=t,n.__lastScale=1,n.__enableScrollX=!o&&n.options.scrollingX,n.__enableScrollY=!o&&n.options.scrollingY,n.__isTracking=!0,n.__didDecelerationComplete=!1,n.__isDragging=!o,n.__isSingleTouch=o,n.__positions=[]},doTouchMove:function(e,t,n){t instanceof Date&&(t=t.valueOf()),"number"!=typeof t&&(t=Date.now());var r=this;if(r.__isTracking){var i,o;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2,!n&&r.options.zooming&&(n=r.__getScale(r.__initialTouches,e))):(i=e[0].pageX,o=e[0].pageY);var a=r.__positions;if(r.__isDragging){r.__decStopped=!1;var s=i-r.__lastTouchLeft,l=o-r.__lastTouchTop,u=r.__scrollLeft,c=r.__scrollTop,d=r.__zoomLevel;if(null!=n&&r.options.zooming){var h=d;if(d=d/r.__lastScale*n,h!==(d=Math.max(Math.min(d,r.options.maxZoom),r.options.minZoom))){var f=i-r.__clientLeft,p=o-r.__clientTop;u=(f+u)*d/h-f,c=(p+c)*d/h-p,r.__computeScrollMax(d)}}if(r.__enableScrollX){u-=s*r.options.speedMultiplier;var m=r.__maxScrollLeft;(u>m||0>u)&&(r.options.bouncing?u+=s/2*r.options.speedMultiplier:u=u>m?m:0)}if(r.__enableScrollY){c-=l*r.options.speedMultiplier;var g=r.__maxScrollTop;c>g||0>c?r.options.bouncing||r.__refreshHeight&&0>c?(c+=l/2*r.options.speedMultiplier,r.__enableScrollX||null==r.__refreshHeight||(0>c?(r.__refreshHidden=!1,r.__refreshShow()):(r.__refreshHide(),r.__refreshHidden=!0),!r.__refreshActive&&c<=-r.__refreshHeight?(r.__refreshActive=!0,r.__refreshActivate&&r.__refreshActivate()):r.__refreshActive&&c>-r.__refreshHeight&&(r.__refreshActive=!1,r.__refreshDeactivate&&r.__refreshDeactivate()))):c=c>g?g:0:r.__refreshHeight&&!r.__refreshHidden&&(r.__refreshHide(),r.__refreshHidden=!0)}a.length>60&&a.splice(0,30),a.push(u,c,t),r.__publish(u,c,d)}else{var v=r.options.locking?3:0,_=Math.abs(i-r.__initialTouchLeft),y=Math.abs(o-r.__initialTouchTop);r.__enableScrollX=r.options.scrollingX&&_>=v,r.__enableScrollY=r.options.scrollingY&&y>=v,a.push(r.__scrollLeft,r.__scrollTop,t),r.__isDragging=(r.__enableScrollX||r.__enableScrollY)&&(_>=5||y>=5),r.__isDragging&&(r.__interruptedAnimation=!1,r.__fadeScrollbars("in"))}r.__lastTouchLeft=i,r.__lastTouchTop=o,r.__lastTouchMove=t,r.__lastScale=n}},doTouchEnd:function(t,n){n instanceof Date&&(n=n.valueOf()),"number"!=typeof n&&(n=Date.now());var r=this;if(r.__isTracking){if(r.__isTracking=!1,r.__isDragging)if(r.__isDragging=!1,r.__isSingleTouch&&r.options.animating&&n-r.__lastTouchMove<=100){for(var i=r.__positions,o=i.length-1,a=o,s=o;s>0&&i[s]>r.__lastTouchMove-100;s-=3)a=s;if(a!==o){var l=i[o]-i[a],u=r.__scrollLeft-i[a-2],c=r.__scrollTop-i[a-1];r.__decelerationVelocityX=u/l*(1e3/60),r.__decelerationVelocityY=c/l*(1e3/60);var d=r.options.paging||r.options.snapping?r.options.decelVelocityThresholdPaging:r.options.decelVelocityThreshold;(Math.abs(r.__decelerationVelocityX)>d||Math.abs(r.__decelerationVelocityY)>d)&&(r.__refreshActive||r.__startDeceleration(n))}else r.__scrollingComplete()}else n-r.__lastTouchMove>100&&r.__scrollingComplete();else r.__decStopped&&(t.isTapHandled=!0,r.__decStopped=!1);if(!r.__isDecelerating)if(r.__refreshActive&&r.__refreshStart){r.__publish(r.__scrollLeft,-r.__refreshHeight,r.__zoomLevel,!0);var h=new Date;r.refreshStartTime=h.getTime(),r.__refreshStart&&r.__refreshStart(),e.Platform.isAndroid()||r.__startDeceleration()}else(r.__interruptedAnimation||r.__isDragging)&&r.__scrollingComplete(),r.scrollTo(r.__scrollLeft,r.__scrollTop,!0,r.__zoomLevel),r.__refreshActive&&(r.__refreshActive=!1,r.__refreshDeactivate&&r.__refreshDeactivate());r.__positions.length=0}},__publish:function(e,t,i,o,a){var s=this,l=s.__isAnimating;if(l&&(ee.effect.Animate.stop(l),s.__isAnimating=!1),o&&s.options.animating){s.__scheduledLeft=e,s.__scheduledTop=t,s.__scheduledZoom=i;var u=s.__scrollLeft,c=s.__scrollTop,d=s.__zoomLevel,h=e-u,f=t-c,p=i-d;s.__isAnimating=ee.effect.Animate.start((function(e,t,n){n&&(s.__scrollLeft=u+h*e,s.__scrollTop=c+f*e,s.__zoomLevel=d+p*e,s.__callback&&s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel,a))}),(function(e){return s.__isAnimating===e}),(function(e,t,n){t===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||n)&&s.__scrollingComplete(),s.options.zooming&&s.__computeScrollMax()}),s.options.animationDuration,l?n:r)}else s.__scheduledLeft=s.__scrollLeft=e,s.__scheduledTop=s.__scrollTop=t,s.__scheduledZoom=s.__zoomLevel=i,s.__callback&&s.__callback(e,t,i,a),s.options.zooming&&s.__computeScrollMax()},__computeScrollMax:function(e){var t=this;null==e&&(e=t.__zoomLevel),t.__maxScrollLeft=Math.max(t.__contentWidth*e-t.__clientWidth,0),t.__maxScrollTop=Math.max(t.__contentHeight*e-t.__clientHeight,0),t.__didWaitForSize||t.__maxScrollLeft||t.__maxScrollTop||(t.__didWaitForSize=!0,t.__waitForSize())},__waitForSize:function(){var e=this;clearTimeout(e.__sizerTimeout);var t=function(){e.resize(!0)};t(),e.__sizerTimeout=setTimeout(t,500)},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),n=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),r=e.__clientWidth,i=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/r)*r,e.__minDecelerationScrollTop=Math.floor(n/i)*i,e.__maxDecelerationScrollLeft=Math.ceil(t/r)*r,e.__maxDecelerationScrollTop=Math.ceil(n/i)*i}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop,e.__refreshActive&&(e.__minDecelerationScrollTop=-1*e.__refreshHeight);e.__minVelocityToKeepDecelerating=e.options.snapping?4:.1,e.__isDecelerating=ee.effect.Animate.start((function(t,n,r){e.__stepThroughDeceleration(r)}),(function(){var t=Math.abs(e.__decelerationVelocityX)>=e.__minVelocityToKeepDecelerating||Math.abs(e.__decelerationVelocityY)>=e.__minVelocityToKeepDecelerating;return t||(e.__didDecelerationComplete=!0,e.options.bouncing&&!e.__refreshActive&&e.scrollTo(Math.min(Math.max(e.__scrollLeft,0),e.__maxScrollLeft),Math.min(Math.max(e.__scrollTop,0),e.__maxScrollTop),e.__refreshActive)),t}),(function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollingComplete(),e.options.paging&&e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)}))},__stepThroughDeceleration:function(e){var t=this,n=t.__scrollLeft+t.__decelerationVelocityX,r=t.__scrollTop+t.__decelerationVelocityY;if(!t.options.bouncing){var i=Math.max(Math.min(t.__maxDecelerationScrollLeft,n),t.__minDecelerationScrollLeft);i!==n&&(n=i,t.__decelerationVelocityX=0);var o=Math.max(Math.min(t.__maxDecelerationScrollTop,r),t.__minDecelerationScrollTop);o!==r&&(r=o,t.__decelerationVelocityY=0)}if(e?t.__publish(n,r,t.__zoomLevel):(t.__scrollLeft=n,t.__scrollTop=r),!t.options.paging){var a=t.options.deceleration;t.__decelerationVelocityX*=a,t.__decelerationVelocityY*=a}if(t.options.bouncing){var s=0,l=0,u=t.options.penetrationDeceleration,c=t.options.penetrationAcceleration;if(n<t.__minDecelerationScrollLeft?s=t.__minDecelerationScrollLeft-n:n>t.__maxDecelerationScrollLeft&&(s=t.__maxDecelerationScrollLeft-n),r<t.__minDecelerationScrollTop?l=t.__minDecelerationScrollTop-r:r>t.__maxDecelerationScrollTop&&(l=t.__maxDecelerationScrollTop-r),0!==s){var d=s*t.__decelerationVelocityX<=t.__minDecelerationScrollLeft;d&&(t.__decelerationVelocityX+=s*u);var h=Math.abs(t.__decelerationVelocityX)<=t.__minVelocityToKeepDecelerating;(!d||h)&&(t.__decelerationVelocityX=s*c)}if(0!==l){var f=l*t.__decelerationVelocityY<=t.__minDecelerationScrollTop;f&&(t.__decelerationVelocityY+=l*u);var p=Math.abs(t.__decelerationVelocityY)<=t.__minVelocityToKeepDecelerating;(!f||p)&&(t.__decelerationVelocityY=l*c)}}},__getDistance:function(e,t){var n=t.pageX-e.pageX,r=t.pageY-e.pageY;return Math.sqrt(n*n+r*r)},__getScale:function(e,t){return e.length>=2&&t.length>=2?this.__getDistance(t[0],t[1])/this.__getDistance(e[0],e[1]):1}}),e.scroll={isScrolling:!1,lastTop:0}}(ionic),function(e){var t=function(){};e.views.ScrollNative=e.views.View.inherit({initialize:function(t){var n=this;for(var r in n.__container=n.el=t.el,n.__content=t.el.firstElementChild,n.__frozen=!1,n.isNative=!0,n.__scrollTop=n.el.scrollTop,n.__scrollLeft=n.el.scrollLeft,n.__clientHeight=n.__content.clientHeight,n.__clientWidth=n.__content.clientWidth,n.__maxScrollTop=Math.max(n.__contentHeight-n.__clientHeight,0),n.__maxScrollLeft=Math.max(n.__contentWidth-n.__clientWidth,0),(t.startY>=0||t.startX>=0)&&e.requestAnimationFrame((function(){n.__originalContainerHeight=n.el.getBoundingClientRect().height,n.el.scrollTop=t.startY||0,n.el.scrollLeft=t.startX||0,n.__scrollTop=n.el.scrollTop,n.__scrollLeft=n.el.scrollLeft})),n.options={freeze:!1,getContentWidth:function(){return Math.max(n.__content.scrollWidth,n.__content.offsetWidth)},getContentHeight:function(){return Math.max(n.__content.scrollHeight,n.__content.offsetHeight+2*n.__content.offsetTop)}},t)n.options[r]=t[r];n.onScroll=function(){e.scroll.isScrolling||(e.scroll.isScrolling=!0),clearTimeout(n.scrollTimer),n.scrollTimer=setTimeout((function(){e.scroll.isScrolling=!1}),80)},n.freeze=function(e){n.__frozen=e},n.freezeShut=function(e){n.__frozenShut=e},n.__initEventHandlers()},__callback:function(){},zoomTo:function(){},zoomBy:function(){},activatePullToRefresh:function(){},resize:function(e){var t=this;t.__container&&t.options&&t.setDimensions(t.__container.clientWidth,t.__container.clientHeight,t.options.getContentWidth(),t.options.getContentHeight(),e)},run:function(){this.resize()},getValues:function(){var e=this;return e.update(),{left:e.__scrollLeft,top:e.__scrollTop,zoom:1}},update:function(){var e=this;e.__scrollLeft=e.el.scrollLeft,e.__scrollTop=e.el.scrollTop},setDimensions:function(e,t,n,r){var i=this;(e||t||n||r)&&(e===+e&&(i.__clientWidth=e),t===+t&&(i.__clientHeight=t),n===+n&&(i.__contentWidth=n),r===+r&&(i.__contentHeight=r),i.__computeScrollMax())},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},scrollBy:function(e,t,n){var r=this;r.update();var i=r.__isAnimating?r.__scheduledLeft:r.__scrollLeft,o=r.__isAnimating?r.__scheduledTop:r.__scrollTop;r.scrollTo(i+(e||0),o+(t||0),n)},scrollTo:function(t,n,r){var i=this;if(!r)return i.el.scrollTop=n,i.el.scrollLeft=t,void i.resize();var o=i.el.style.overflowX,a=i.el.style.overflowY;clearTimeout(i.__scrollToCleanupTimeout),i.__scrollToCleanupTimeout=setTimeout((function(){i.el.style.overflowX=o,i.el.style.overflowY=a}),500),i.el.style.overflowY="hidden",i.el.style.overflowX="hidden",function(t,n){var r=Date.now(),s=i.el.scrollTop,l=i.el.scrollLeft;s===t&&l===n?(i.el.style.overflowX=o,i.el.style.overflowY=a,i.resize()):e.requestAnimationFrame((function u(){var c=Date.now(),d=Math.min(1,(c-r)/250),h=function(e){return--e*e*e+1}(d);s!=t&&(i.el.scrollTop=parseInt(h*(t-s)+s,10)),l!=n&&(i.el.scrollLeft=parseInt(h*(n-l)+l,10)),1>d?e.requestAnimationFrame(u):(e.tap.removeClonedInputs(i.__container,i),i.el.style.overflowX=o,i.el.style.overflowY=a,i.resize())}))}(n,t)},__waitForSize:function(){var e=this;clearTimeout(e.__sizerTimeout);var t=function(){e.resize(!0)};t(),e.__sizerTimeout=setTimeout(t,500)},__computeScrollMax:function(){var e=this;e.__maxScrollLeft=Math.max(e.__contentWidth-e.__clientWidth,0),e.__maxScrollTop=Math.max(e.__contentHeight-e.__clientHeight,0),e.__didWaitForSize||e.__maxScrollLeft||e.__maxScrollTop||(e.__didWaitForSize=!0,e.__waitForSize())},__initEventHandlers:function(){var t,n,r=this,i=r.__container;r.scrollChildIntoView=function(o){var a=i.getBoundingClientRect();r.__originalContainerHeight||(r.__originalContainerHeight=a.height),t=r.__originalContainerHeight;var s=r.isShrunkForKeyboard,l=i.parentNode.classList.contains("modal"),u=i.parentNode.classList.contains("popover"),c=l&&window.innerWidth>=680,d=n&&n!==o.detail.keyboardHeight;(!s||d)&&(!u&&(e.Platform.isIOS()||e.Platform.isFullScreen||c)&&e.requestAnimationFrame((function(){t=Math.max(0,Math.min(r.__originalContainerHeight,r.__originalContainerHeight-(o.detail.keyboardHeight-43))),i.style.height=t+"px",i.classList.add("keyboard-up"),r.resize()})),r.isShrunkForKeyboard=!0),n=o.detail.keyboardHeight,o.detail.isElementUnderKeyboard&&e.requestAnimationFrame((function(){var t=e.DomUtil.getOffsetTop(o.detail.target);setTimeout((function(){e.Platform.isIOS()&&e.tap.cloneFocusedInput(i,r),r.scrollTo(0,t-(a.top+100),!0),r.onScroll()}),32)})),o.stopPropagation()},r.resetScrollView=function(){r.isShrunkForKeyboard&&(r.isShrunkForKeyboard=!1,i.style.height="",r.__originalContainerHeight=i.getBoundingClientRect().height,e.Platform.isIOS()&&e.requestAnimationFrame((function(){i.classList.remove("keyboard-up")}))),r.resize()},r.handleTouchMove=function(e){return r.__frozenShut?(e.preventDefault(),e.stopPropagation(),!1):!r.__frozen||(e.preventDefault(),!1)},i.addEventListener("scroll",r.onScroll),i.addEventListener("scrollChildIntoView",r.scrollChildIntoView),i.addEventListener(e.EVENTS.touchstart,r.handleTouchMove),i.addEventListener(e.EVENTS.touchmove,r.handleTouchMove),document.addEventListener("resetScrollView",r.resetScrollView)},__cleanup:function(){var n=this,r=n.__container;r.removeEventListener("scroll",n.onScroll),r.removeEventListener("scrollChildIntoView",n.scrollChildIntoView),r.removeEventListener(e.EVENTS.touchstart,n.handleTouchMove),r.removeEventListener(e.EVENTS.touchmove,n.handleTouchMove),document.removeEventListener("resetScrollView",n.resetScrollView),e.tap.removeClonedInputs(r,n),delete n.__container,delete n.__content,delete n.__indicatorX,delete n.__indicatorY,delete n.options.el,n.resize=n.scrollTo=n.onScroll=n.resetScrollView=t,n.scrollChildIntoView=t,r=null}})}(ionic),function(e){"use strict";var t="item",n="item-content",r="item-reordering",i=function(){};i.prototype={start:function(){},drag:function(){},end:function(){},isSameItem:function(){return!1}};var o=function(e){this.dragThresholdX=e.dragThresholdX||10,this.el=e.el,this.item=e.item,this.canSwipe=e.canSwipe};(o.prototype=new i).start=function(r){var i,o,a,s;this.canSwipe()&&(i=r.target.classList.contains(n)?r.target:r.target.classList.contains(t)?r.target.querySelector("."+n):e.DomUtil.getParentWithClass(r.target,n))&&(i.classList.remove("item-sliding"),a=parseFloat(i.style[e.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,(o=i.parentNode.querySelector(".item-options"))&&(o.classList.remove("invisible"),s=o.offsetWidth,this._currentDrag={buttons:o,buttonsWidth:s,content:i,startOffsetX:a}))},o.prototype.isSameItem=function(e){return!(!e._lastDrag||!this._currentDrag)&&this._currentDrag.content==e._lastDrag.content},o.prototype.clean=function(t){function n(){r.buttons&&r.buttons.classList.add("invisible")}var r=this._lastDrag;r&&r.content&&(r.content.style[e.CSS.TRANSITION]="",r.content.style[e.CSS.TRANSFORM]="",t?(r.content.style[e.CSS.TRANSITION]="none",n(),e.requestAnimationFrame((function(){r.content.style[e.CSS.TRANSITION]=""}))):e.requestAnimationFrame((function(){setTimeout(n,250)})))},o.prototype.drag=e.animationFrameThrottle((function(t){var n;if(this._currentDrag&&(!this._isDragging&&(Math.abs(t.gesture.deltaX)>this.dragThresholdX||Math.abs(this._currentDrag.startOffsetX)>0)&&(this._isDragging=!0),this._isDragging)){n=this._currentDrag.buttonsWidth;var r=Math.min(0,this._currentDrag.startOffsetX+t.gesture.deltaX);-n>r&&(r=Math.min(-n,-n+.4*(t.gesture.deltaX+n))),this._currentDrag.content.$$ionicOptionsOpen=0!==r,this._currentDrag.content.style[e.CSS.TRANSFORM]="translate3d("+r+"px, 0, 0)",this._currentDrag.content.style[e.CSS.TRANSITION]="none"}})),o.prototype.end=function(t,n){var r=this;if(r._currentDrag){var i=-r._currentDrag.buttonsWidth;t.gesture.deltaX>-r._currentDrag.buttonsWidth/2&&("left"==t.gesture.direction&&Math.abs(t.gesture.velocityX)<.3?i=0:"right"==t.gesture.direction&&(i=0)),e.requestAnimationFrame((function(){if(0===i){r._currentDrag.content.style[e.CSS.TRANSFORM]="";var t=r._currentDrag.buttons;setTimeout((function(){t&&t.classList.add("invisible")}),250)}else r._currentDrag.content.style[e.CSS.TRANSFORM]="translate3d("+i+"px,0,0)";r._currentDrag.content.style[e.CSS.TRANSITION]="",r._lastDrag||(r._lastDrag={}),e.extend(r._lastDrag,r._currentDrag),r._currentDrag&&(r._currentDrag.buttons=null,r._currentDrag.content=null),r._currentDrag=null,n&&n()}))}else n&&n()};var a=function(e){var t=this;if(t.dragThresholdY=e.dragThresholdY||0,t.onReorder=e.onReorder,t.listEl=e.listEl,t.el=t.item=e.el,t.scrollEl=e.scrollEl,t.scrollView=e.scrollView,t.listElTrueTop=0,t.listEl.offsetParent){var n=t.listEl;do{t.listElTrueTop+=n.offsetTop,n=n.offsetParent}while(n)}};(a.prototype=new i)._moveElement=function(t){var n=t.gesture.center.pageY+this.scrollView.getValues().top-this._currentDrag.elementHeight/2-this.listElTrueTop;this.el.style[e.CSS.TRANSFORM]="translate3d(0, "+n+"px, 0)"},a.prototype.deregister=function(){this.listEl=this.el=this.scrollEl=this.scrollView=null},a.prototype.start=function(t){var n=e.DomUtil.getChildIndex(this.el,this.el.nodeName.toLowerCase()),i=this.el.scrollHeight,o=this.el.cloneNode(!0);o.classList.add("item-placeholder"),this.el.parentNode.insertBefore(o,this.el),this.el.classList.add(r),this._currentDrag={elementHeight:i,startIndex:n,placeholder:o,scrollHeight:scroll,list:o.parentNode},this._moveElement(t)},a.prototype.drag=e.animationFrameThrottle((function(t){var n=this;if(this._currentDrag){var r=0,i=t.gesture.center.pageY,o=this.listElTrueTop;if(this.scrollView){var a=this.scrollView.__container;r=this.scrollView.getValues().top;var s=a.offsetTop,l=s-i+this._currentDrag.elementHeight/2,u=i+this._currentDrag.elementHeight/2-s-a.offsetHeight;t.gesture.deltaY<0&&l>0&&r>0&&(this.scrollView.scrollBy(null,-l),e.requestAnimationFrame((function(){n.drag(t)}))),t.gesture.deltaY>0&&u>0&&r<this.scrollView.getScrollMax().top&&(this.scrollView.scrollBy(null,u),e.requestAnimationFrame((function(){n.drag(t)})))}!this._isDragging&&Math.abs(t.gesture.deltaY)>this.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(t),this._currentDrag.currentY=r+i-o)}})),a.prototype._getReorderIndex=function(){for(var e,t=this,n=Array.prototype.slice.call(t._currentDrag.placeholder.parentNode.children).filter((function(e){return e.nodeName===t.el.nodeName&&e!==t.el})),r=t._currentDrag.currentY,i=0,o=n.length;o>i;i++)if(e=n[i],i===o-1){if(r>e.offsetTop)return i}else if(0===i){if(r<e.offsetTop+e.offsetHeight)return i}else if(r>e.offsetTop-e.offsetHeight/2&&r<e.offsetTop+e.offsetHeight)return i;return t._currentDrag.startIndex},a.prototype.end=function(t,n){if(this._currentDrag){var i=this._currentDrag.placeholder,o=this._getReorderIndex();this.el.classList.remove(r),this.el.style[e.CSS.TRANSFORM]="",i.parentNode.insertBefore(this.el,i),i.parentNode.removeChild(i),this.onReorder&&this.onReorder(this.el,this._currentDrag.startIndex,o),this._currentDrag={placeholder:null,content:null},this._currentDrag=null,n&&n()}else n&&n()},e.views.ListView=e.views.View.inherit({initialize:function(t){var n=this;t=e.extend({onReorder:function(){},virtualRemoveThreshold:-200,virtualAddThreshold:200,canSwipe:function(){return!0}},t),e.extend(n,t),!n.itemHeight&&n.listEl&&(n.itemHeight=n.listEl.children[0]&&parseInt(n.listEl.children[0].style.height,10)),n.onRefresh=t.onRefresh||function(){},n.onRefreshOpening=t.onRefreshOpening||function(){},n.onRefreshHolding=t.onRefreshHolding||function(){};var r={};e.DomUtil.getParentOrSelfWithClass(n.el,"overflow-scroll")&&(r.prevent_default_directions=["left","right"]),window.ionic.onGesture("release",(function(e){n._handleEndDrag(e)}),n.el,r),window.ionic.onGesture("drag",(function(e){n._handleDrag(e)}),n.el,r),n._initDrag()},deregister:function(){this.el=this.listEl=this.scrollEl=this.scrollView=null,this.isScrollFreeze&&self.scrollView.freeze(!1)},stopRefreshing:function(){this.el.querySelector(".list-refresher").style.height="0"},didScroll:function(e){var t=this;if(t.isVirtual){var n=t.itemHeight,r=e.target.scrollHeight,i=t.el.parentNode.offsetHeight,o=Math.max(0,e.scrollTop+t.virtualRemoveThreshold),a=Math.min(r,Math.abs(e.scrollTop)+i+t.virtualAddThreshold),s=parseInt(Math.abs(o/n),10),l=parseInt(Math.abs(a/n),10);t._virtualItemsToRemove=Array.prototype.slice.call(t.listEl.children,0,s),t.renderViewport&&t.renderViewport(o,a,s,l)}},didStopScrolling:function(){if(this.isVirtual)for(var e=0;e<this._virtualItemsToRemove.length;e++)this.didHideItem&&this.didHideItem(e)},clearDragEffects:function(e){this._lastDragOp&&(this._lastDragOp.clean&&this._lastDragOp.clean(e),this._lastDragOp.deregister&&this._lastDragOp.deregister(),this._lastDragOp=null)},_initDrag:function(){this._lastDragOp&&this._lastDragOp.deregister&&this._lastDragOp.deregister(),this._lastDragOp=this._dragOp,this._dragOp=null},_getItem:function(e){for(;e;){if(e.classList&&e.classList.contains(t))return e;e=e.parentNode}return null},_startDrag:function(t){var n=this;n._isDragging=!1;var r,i=n._lastDragOp;n._didDragUpOrDown&&i instanceof o&&i.clean&&i.clean(),!e.DomUtil.getParentOrSelfWithClass(t.target,"item-reorder")||"up"!=t.gesture.direction&&"down"!=t.gesture.direction?!n._didDragUpOrDown&&("left"==t.gesture.direction||"right"==t.gesture.direction)&&Math.abs(t.gesture.deltaX)>5&&(r=n._getItem(t.target))&&r.querySelector(".item-options")&&(n._dragOp=new o({el:n.el,item:r,canSwipe:n.canSwipe}),n._dragOp.start(t),t.preventDefault(),n.isScrollFreeze=n.scrollView.freeze(!0)):(r=n._getItem(t.target))&&(n._dragOp=new a({listEl:n.el,el:r,scrollEl:n.scrollEl,scrollView:n.scrollView,onReorder:function(e,t,r){n.onReorder&&n.onReorder(e,t,r)}}),n._dragOp.start(t),t.preventDefault()),i&&n._dragOp&&!n._dragOp.isSameItem(i)&&t.defaultPrevented&&i.clean&&i.clean()},_handleEndDrag:function(e){var t=this;t.scrollView&&(t.isScrollFreeze=t.scrollView.freeze(!1)),t._didDragUpOrDown=!1,t._dragOp&&t._dragOp.end(e,(function(){t._initDrag()}))},_handleDrag:function(e){var t=this;Math.abs(e.gesture.deltaY)>5&&(t._didDragUpOrDown=!0),t.isDragging||t._dragOp||t._startDrag(e),t._dragOp&&(e.gesture.srcEvent.preventDefault(),t._dragOp.drag(e))}})}(ionic),function(e){"use strict";e.views.Modal=e.views.View.inherit({initialize:function(t){t=e.extend({focusFirstInput:!1,unfocusOnHide:!0,focusFirstDelay:600,backdropClickToClose:!0,hardwareBackButtonClose:!0},t),e.extend(this,t),this.el=t.el},show:function(){var e=this;e.focusFirstInput&&window.setTimeout((function(){var t=e.el.querySelector("input, textarea");t&&t.focus&&t.focus()}),e.focusFirstDelay)},hide:function(){if(this.unfocusOnHide){var e=this.el.querySelectorAll("input, textarea");window.setTimeout((function(){for(var t=0;t<e.length;t++)e[t].blur&&e[t].blur()}))}}})}(ionic),function(e){"use strict";e.views.SideMenu=e.views.View.inherit({initialize:function(e){this.el=e.el,this.isEnabled=void 0===e.isEnabled||e.isEnabled,this.setWidth(e.width)},getFullWidth:function(){return this.width},setWidth:function(e){this.width=e,this.el.style.width=e+"px"},setIsEnabled:function(e){this.isEnabled=e},bringUp:function(){"0"!==this.el.style.zIndex&&(this.el.style.zIndex="0")},pushDown:function(){"-1"!==this.el.style.zIndex&&(this.el.style.zIndex="-1")}}),e.views.SideMenuContent=e.views.View.inherit({initialize:function(t){e.extend(this,{animationClass:"menu-animated",onDrag:function(){},onEndDrag:function(){}},t),e.onGesture("drag",e.proxy(this._onDrag,this),this.el),e.onGesture("release",e.proxy(this._onEndDrag,this),this.el)},_onDrag:function(e){this.onDrag&&this.onDrag(e)},_onEndDrag:function(e){this.onEndDrag&&this.onEndDrag(e)},disableAnimation:function(){this.el.classList.remove(this.animationClass)},enableAnimation:function(){this.el.classList.add(this.animationClass)},getTranslateX:function(){return parseFloat(this.el.style[e.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])},setTranslateX:e.animationFrameThrottle((function(t){this.el.style[e.CSS.TRANSFORM]="translate3d("+t+"px, 0, 0)"}))})}(ionic),function(e){"use strict";e.views.Slider=e.views.View.inherit({initialize:function(e){function t(){if(y.offsetWidth){b=k.children,M=b.length,b.length<2&&(e.continuous=!1),_.transitions&&e.continuous&&b.length<3&&(k.appendChild(b[0].cloneNode(!0)),k.appendChild(k.children[1].cloneNode(!0)),b=k.children),w=new Array(b.length),L=y.offsetWidth||y.getBoundingClientRect().width,k.style.width=b.length*L+"px";for(var t=b.length;t--;){var n=b[t];n.style.width=L+"px",n.setAttribute("data-index",t),_.transitions&&(n.style.left=t*-L+"px",o(t,x>t?-L:t>x?L:0,0))}e.continuous&&_.transitions&&(o(r(x-1),-L,0),o(r(x+1),L,0)),_.transitions||(k.style.left=x*-L+"px"),y.style.visibility="visible",e.slidesChanged&&e.slidesChanged()}}function n(t){e.continuous?i(x+1,t):x<b.length-1&&i(x+1,t)}function r(e){return(b.length+e%b.length)%b.length}function i(t,n){if(x!=t){if(!b)return void(x=t);if(_.transitions){var i=Math.abs(x-t)/(x-t);if(e.continuous){var a=i;(i=-w[r(t)]/L)!==a&&(t=-i*b.length+t)}for(var l=Math.abs(x-t)-1;l--;)o(r((t>x?t:x)-l-1),L*i,0);t=r(t),o(x,L*i,n||S),o(t,0,n||S),e.continuous&&o(r(t-i),-L*i,0)}else t=r(t),function(t,n,r){if(r)var i=+new Date,o=setInterval((function(){var a=+new Date-i;return a>r?(k.style.left=n+"px",D&&s(),e.transitionEnd&&e.transitionEnd.call(event,x,b[x]),void clearInterval(o)):void(k.style.left=(n-t)*(Math.floor(a/r*100)/100)+t+"px")}),4);else k.style.left=n+"px"}(x*-L,t*-L,n||S);x=t,v(e.callback&&e.callback(x,b[x]))}}function o(e,t,n){a(e,t,n),w[e]=t}function a(e,t,n){var r=b[e],i=r&&r.style;i&&(i.webkitTransitionDuration=i.MozTransitionDuration=i.msTransitionDuration=i.OTransitionDuration=i.transitionDuration=n+"ms",i.webkitTransform="translate("+t+"px,0)translateZ(0)",i.msTransform=i.MozTransform=i.OTransform="translateX("+t+"px)")}function s(){T=setTimeout(n,D)}function l(){D=e.auto||0,clearTimeout(T)}var u,c,d,h=this;window.navigator.pointerEnabled?(u="pointerdown",c="pointermove",d="pointerup"):window.navigator.msPointerEnabled?(u="MSPointerDown",c="MSPointerMove",d="MSPointerUp"):(u="touchstart",c="touchmove",d="touchend");var f="mousedown",p="mousemove",m="mouseup",g=function(){},v=function(e){setTimeout(e||g,0)},_={addEventListener:!!window.addEventListener,transitions:function(e){var t=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in t)if(void 0!==e.style[t[n]])return!0;return!1}(document.createElement("swipe"))},y=e.el;if(y){var b,w,L,M,k=y.children[0];e=e||{};var x=parseInt(e.startSlide,10)||0,S=e.speed||300;e.continuous=void 0===e.continuous||e.continuous;var T,$,D=e.auto||0,C={},E={},A={handleEvent:function(n){switch(!n.touches&&n.pageX&&n.pageY&&(n.touches=[{pageX:n.pageX,pageY:n.pageY}]),n.type){case u:case f:this.start(n);break;case c:case p:this.touchmove(n);break;case d:case m:v(this.end(n));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":v(this.transitionEnd(n));break;case"resize":v(t)}e.stopPropagation&&n.stopPropagation()},start:function(e){if(e.touches){var t=e.touches[0];C={x:t.pageX,y:t.pageY,time:+new Date},$=void 0,E={},k.addEventListener(c,this,!1),k.addEventListener(p,this,!1),k.addEventListener(d,this,!1),k.addEventListener(m,this,!1),document.addEventListener(d,this,!1),document.addEventListener(m,this,!1)}},touchmove:function(t){if(!(!t.touches||t.touches.length>1||t.scale&&1!==t.scale||h.slideIsDisabled)){e.disableScroll&&t.preventDefault();var n=t.touches[0];E={x:n.pageX-C.x,y:n.pageY-C.y},void 0===$&&($=!!($||Math.abs(E.x)<Math.abs(E.y))),$||(t.preventDefault(),l(),e.continuous?(a(r(x-1),E.x+w[r(x-1)],0),a(x,E.x+w[x],0),a(r(x+1),E.x+w[r(x+1)],0)):(e.bouncing?E.x=E.x/(!x&&E.x>0||x==b.length-1&&E.x<0?Math.abs(E.x)/L+1:1):(L*x-E.x<0&&(E.x=Math.min(E.x,L*x)),Math.abs(E.x)>L*(b.length-x-1)&&(E.x=Math.max(-L*(b.length-x-1),E.x))),a(x-1,E.x+w[x-1],0),a(x,E.x+w[x],0),a(x+1,E.x+w[x+1],0)),e.onDrag&&e.onDrag())}},end:function(){var t=+new Date-C.time,n=Number(t)<250&&Math.abs(E.x)>20||Math.abs(E.x)>L/2,i=!x&&E.x>0||x==b.length-1&&E.x<0;e.continuous&&(i=!1);var a=E.x<0;$||(n&&!i?(a?(e.continuous?(o(r(x-1),-L,0),o(r(x+2),L,0)):o(x-1,-L,0),o(x,w[x]-L,S),o(r(x+1),w[r(x+1)]-L,S),x=r(x+1)):(e.continuous?(o(r(x+1),L,0),o(r(x-2),-L,0)):o(x+1,L,0),o(x,w[x]+L,S),o(r(x-1),w[r(x-1)]+L,S),x=r(x-1)),e.callback&&e.callback(x,b[x])):e.continuous?(o(r(x-1),-L,S),o(x,0,S),o(r(x+1),L,S)):(o(x-1,-L,S),o(x,0,S),o(x+1,L,S))),k.removeEventListener(c,A,!1),k.removeEventListener(p,A,!1),k.removeEventListener(d,A,!1),k.removeEventListener(m,A,!1),document.removeEventListener(d,A,!1),document.removeEventListener(m,A,!1),e.onDragEnd&&e.onDragEnd()},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)==x&&(D&&s(),e.transitionEnd&&e.transitionEnd.call(t,x,b[x]))}};this.update=function(){setTimeout(t)},this.setup=function(){t()},this.loop=function(t){return arguments.length&&(e.continuous=!!t),e.continuous},this.enableSlide=function(e){return arguments.length&&(this.slideIsDisabled=!e),!this.slideIsDisabled},this.slide=this.select=function(e,t){l(),i(e,t)},this.prev=this.previous=function(){l(),function(t){e.continuous?i(x-1,t):x&&i(x-1,t)}()},this.next=function(){l(),n()},this.stop=function(){l()},this.start=function(){s()},this.autoPlay=function(e){!D||0>D?l():(D=e,s())},this.currentIndex=this.selected=function(){return x},this.slidesCount=this.count=function(){return M},this.kill=function(){l(),k.style.width="",k.style.left="",b&&(b=[]),_.addEventListener?(k.removeEventListener(u,A,!1),k.removeEventListener(f,A,!1),k.removeEventListener("webkitTransitionEnd",A,!1),k.removeEventListener("msTransitionEnd",A,!1),k.removeEventListener("oTransitionEnd",A,!1),k.removeEventListener("otransitionend",A,!1),k.removeEventListener("transitionend",A,!1),window.removeEventListener("resize",A,!1)):window.onresize=null},this.load=function(){t(),D&&s(),_.addEventListener?(k.addEventListener(u,A,!1),k.addEventListener(f,A,!1),_.transitions&&(k.addEventListener("webkitTransitionEnd",A,!1),k.addEventListener("msTransitionEnd",A,!1),k.addEventListener("oTransitionEnd",A,!1),k.addEventListener("otransitionend",A,!1),k.addEventListener("transitionend",A,!1)),window.addEventListener("resize",A,!1)):window.onresize=function(){t()}}}}})}(ionic),function(){"use strict";function e(e){e.fn.swiper=function(t){var n;return e(this).each((function(){var e=new r(this,t);n||(n=e)})),n}}var t,n,r=function(e,n,o,a){function s(){return"horizontal"===M.params.direction}function l(e){return Math.floor(e)}function u(){M.autoplayTimeoutId=setTimeout((function(){M.params.loop?(M.fixLoop(),M._slideNext()):M.isEnd?n.autoplayStopOnLast?M.stopAutoplay():M._slideTo(0):M._slideNext()}),M.params.autoplay)}function c(e,n){var r=t(e.target);if(!r.is(n))if("string"==typeof n)r=r.parents(n);else if(n.nodeType){var i;return r.parents().each((function(e,t){t===n&&(i=n)})),i?n:void 0}return 0===r.length?void 0:r[0]}function d(e,t){t=t||{};var n=new(window.MutationObserver||window.WebkitMutationObserver)((function(e){e.forEach((function(e){M.onResize(!0),M.emit("onObserverUpdate",M,e)}))}));n.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),M.observers.push(n)}function h(e){e.originalEvent&&(e=e.originalEvent);var t=e.keyCode||e.charCode;if(!M.params.allowSwipeToNext&&(s()&&39===t||!s()&&40===t))return!1;if(!M.params.allowSwipeToPrev&&(s()&&37===t||!s()&&38===t))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===t||39===t||38===t||40===t){var n=!1;if(M.container.parents(".swiper-slide").length>0&&0===M.container.parents(".swiper-slide-active").length)return;var r={left:window.pageXOffset,top:window.pageYOffset},i=window.innerWidth,o=window.innerHeight,a=M.container.offset();M.rtl&&(a.left=a.left-M.container[0].scrollLeft);for(var l=[[a.left,a.top],[a.left+M.width,a.top],[a.left,a.top+M.height],[a.left+M.width,a.top+M.height]],u=0;u<l.length;u++){var c=l[u];c[0]>=r.left&&c[0]<=r.left+i&&c[1]>=r.top&&c[1]<=r.top+o&&(n=!0)}if(!n)return}s()?((37===t||39===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===t&&!M.rtl||37===t&&M.rtl)&&M.slideNext(),(37===t&&!M.rtl||39===t&&M.rtl)&&M.slidePrev()):((38===t||40===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),40===t&&M.slideNext(),38===t&&M.slidePrev())}}function f(e){e.originalEvent&&(e=e.originalEvent);var t=M.mousewheel.event,n=0,r=M.rtl?-1:1;if(e.detail)n=-e.detail;else if("mousewheel"===t)if(M.params.mousewheelForceToAxis)if(s()){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;n=e.wheelDeltaX*r}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;n=e.wheelDeltaY}else n=Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)?-e.wheelDeltaX*r:-e.wheelDeltaY;else if("DOMMouseScroll"===t)n=-e.detail;else if("wheel"===t)if(M.params.mousewheelForceToAxis)if(s()){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;n=-e.deltaX*r}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;n=-e.deltaY}else n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX*r:-e.deltaY;if(0!==n){if(M.params.mousewheelInvert&&(n=-n),M.params.freeMode){var i=M.getWrapperTranslate()+n*M.params.mousewheelSensitivity,o=M.isBeginning,a=M.isEnd;if(i>=M.minTranslate()&&(i=M.minTranslate()),i<=M.maxTranslate()&&(i=M.maxTranslate()),M.setWrapperTransition(0),M.setWrapperTranslate(i),M.updateProgress(),M.updateActiveIndex(),(!o&&M.isBeginning||!a&&M.isEnd)&&M.updateClasses(),M.params.freeModeSticky&&(clearTimeout(M.mousewheel.timeout),M.mousewheel.timeout=setTimeout((function(){M.slideReset()}),300)),0===i||i===M.maxTranslate())return}else{if((new window.Date).getTime()-M.mousewheel.lastScrollTime>60)if(0>n)if(M.isEnd&&!M.params.loop||M.animating){if(M.params.mousewheelReleaseOnEdges)return!0}else M.slideNext();else if(M.isBeginning&&!M.params.loop||M.animating){if(M.params.mousewheelReleaseOnEdges)return!0}else M.slidePrev();M.mousewheel.lastScrollTime=(new window.Date).getTime()}return M.params.autoplay&&M.stopAutoplay(),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function p(e,n){e=t(e);var r,i,o,a=M.rtl?-1:1;r=e.attr("data-swiper-parallax")||"0",i=e.attr("data-swiper-parallax-x"),o=e.attr("data-swiper-parallax-y"),i||o?(i=i||"0",o=o||"0"):s()?(i=r,o="0"):(o=r,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*n*a+"%":i*n*a+"px",o=o.indexOf("%")>=0?parseInt(o,10)*n+"%":o*n+"px",e.transform("translate3d("+i+", "+o+",0px)")}function m(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof r))return new r(e,n);var g={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,hashnav:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationHiddenClass:"swiper-pagination-hidden",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},v=n&&n.virtualTranslate;n=n||{};var _={};for(var y in n)if("object"!=typeof n[y]||n[y].nodeType||n[y]===window||n[y]===document||void 0!==i&&n[y]instanceof i||"undefined"!=typeof jQuery&&n[y]instanceof jQuery)_[y]=n[y];else for(var b in _[y]={},n[y])_[y][b]=n[y][b];for(var w in g)if(void 0===n[w])n[w]=g[w];else if("object"==typeof n[w])for(var L in g[w])void 0===n[w][L]&&(n[w][L]=g[w][L]);var M=this;if(M.params=n,M.originalParams=_,M.classNames=[],void 0!==t&&void 0!==i&&(t=i),(void 0!==t||(t=void 0===i?window.Dom7||window.Zepto||window.jQuery:i))&&(M.$=t,M.currentBreakpoint=void 0,M.getActiveBreakpoint=function(){if(!M.params.breakpoints)return!1;var e,t=!1,n=[];for(e in M.params.breakpoints)M.params.breakpoints.hasOwnProperty(e)&&n.push(e);n.sort((function(e,t){return parseInt(e,10)>parseInt(t,10)}));for(var r=0;r<n.length;r++)(e=n[r])>=window.innerWidth&&!t&&(t=e);return t||"max"},M.setBreakpoint=function(){var e=M.getActiveBreakpoint();if(e&&M.currentBreakpoint!==e){var t=e in M.params.breakpoints?M.params.breakpoints[e]:M.originalParams;for(var n in t)M.params[n]=t[n];M.currentBreakpoint=e}},M.params.breakpoints&&M.setBreakpoint(),M.container=t(e),0!==M.container.length)){if(M.container.length>1)return void M.container.each((function(){new r(this,n)}));M.container[0].swiper=M,M.container.data("swiper",M),M.classNames.push("swiper-container-"+M.params.direction),M.params.freeMode&&M.classNames.push("swiper-container-free-mode"),M.support.flexbox||(M.classNames.push("swiper-container-no-flexbox"),M.params.slidesPerColumn=1),M.params.autoHeight&&M.classNames.push("swiper-container-autoheight"),(M.params.parallax||M.params.watchSlidesVisibility)&&(M.params.watchSlidesProgress=!0),["cube","coverflow"].indexOf(M.params.effect)>=0&&(M.support.transforms3d?(M.params.watchSlidesProgress=!0,M.classNames.push("swiper-container-3d")):M.params.effect="slide"),"slide"!==M.params.effect&&M.classNames.push("swiper-container-"+M.params.effect),"cube"===M.params.effect&&(M.params.resistanceRatio=0,M.params.slidesPerView=1,M.params.slidesPerColumn=1,M.params.slidesPerGroup=1,M.params.centeredSlides=!1,M.params.spaceBetween=0,M.params.virtualTranslate=!0,M.params.setWrapperSize=!1),"fade"===M.params.effect&&(M.params.slidesPerView=1,M.params.slidesPerColumn=1,M.params.slidesPerGroup=1,M.params.watchSlidesProgress=!0,M.params.spaceBetween=0,void 0===v&&(M.params.virtualTranslate=!0)),M.params.grabCursor&&M.support.touch&&(M.params.grabCursor=!1),M.wrapper=M.container.children("."+M.params.wrapperClass),M.params.pagination&&(M.paginationContainer=t(M.params.pagination),M.params.paginationClickable&&M.paginationContainer.addClass("swiper-pagination-clickable")),M.rtl=s()&&("rtl"===M.container[0].dir.toLowerCase()||"rtl"===M.container.css("direction")),M.rtl&&M.classNames.push("swiper-container-rtl"),M.rtl&&(M.wrongRTL="-webkit-box"===M.wrapper.css("display")),M.params.slidesPerColumn>1&&M.classNames.push("swiper-container-multirow"),M.device.android&&M.classNames.push("swiper-container-android"),M.container.addClass(M.classNames.join(" ")),M.translate=0,M.progress=0,M.velocity=0,M.lockSwipeToNext=function(){M.params.allowSwipeToNext=!1},M.lockSwipeToPrev=function(){M.params.allowSwipeToPrev=!1},M.lockSwipes=function(){M.params.allowSwipeToNext=M.params.allowSwipeToPrev=!1},M.unlockSwipeToNext=function(){M.params.allowSwipeToNext=!0},M.unlockSwipeToPrev=function(){M.params.allowSwipeToPrev=!0},M.unlockSwipes=function(){M.params.allowSwipeToNext=M.params.allowSwipeToPrev=!0},M.params.grabCursor&&(M.container[0].style.cursor="move",M.container[0].style.cursor="-webkit-grab",M.container[0].style.cursor="-moz-grab",M.container[0].style.cursor="grab"),M.imagesToLoad=[],M.imagesLoaded=0,M.loadImage=function(e,t,n,r,i){function o(){i&&i()}var a;e.complete&&r?o():t?((a=new window.Image).onload=o,a.onerror=o,n&&(a.srcset=n),t&&(a.src=t)):o()},M.preloadImages=function(){function e(){null!=M&&(void 0!==M.imagesLoaded&&M.imagesLoaded++,M.imagesLoaded===M.imagesToLoad.length&&(M.params.updateOnImagesReady&&M.update(),M.emit("onImagesReady",M)))}M.imagesToLoad=M.container.find("img");for(var t=0;t<M.imagesToLoad.length;t++)M.loadImage(M.imagesToLoad[t],M.imagesToLoad[t].currentSrc||M.imagesToLoad[t].getAttribute("src"),M.imagesToLoad[t].srcset||M.imagesToLoad[t].getAttribute("srcset"),!0,e)},M.autoplayTimeoutId=void 0,M.autoplaying=!1,M.autoplayPaused=!1,M.startAutoplay=function(){return void 0===M.autoplayTimeoutId&&!!M.params.autoplay&&!M.autoplaying&&(M.autoplaying=!0,M.emit("onAutoplayStart",M),void u())},M.stopAutoplay=function(e){M.autoplayTimeoutId&&(M.autoplayTimeoutId&&clearTimeout(M.autoplayTimeoutId),M.autoplaying=!1,M.autoplayTimeoutId=void 0,M.emit("onAutoplayStop",M))},M.pauseAutoplay=function(e){M.autoplayPaused||(M.autoplayTimeoutId&&clearTimeout(M.autoplayTimeoutId),M.autoplayPaused=!0,0===e?(M.autoplayPaused=!1,u()):M.wrapper.transitionEnd((function(){M&&(M.autoplayPaused=!1,M.autoplaying?u():M.stopAutoplay())})))},M.minTranslate=function(){return-M.snapGrid[0]},M.maxTranslate=function(){return-M.snapGrid[M.snapGrid.length-1]},M.updateAutoHeight=function(){M.slides.eq(M.activeIndex)[0].offsetHeight&&M.wrapper.css("height",M.slides.eq(M.activeIndex)[0].offsetHeight+"px")},M.updateContainerSize=function(){var e,t;e=void 0!==M.params.width?M.params.width:M.container[0].clientWidth,t=void 0!==M.params.height?M.params.height:M.container[0].clientHeight,0===e&&s()||0===t&&!s()||(e=e-parseInt(M.container.css("padding-left"),10)-parseInt(M.container.css("padding-right"),10),t=t-parseInt(M.container.css("padding-top"),10)-parseInt(M.container.css("padding-bottom"),10),M.width=e,M.height=t,M.size=s()?M.width:M.height)},M.updateSlidesSize=function(){M.slides=M.wrapper.children("."+M.params.slideClass),M.snapGrid=[],M.slidesGrid=[],M.slidesSizesGrid=[];var e,t,n=M.params.spaceBetween,r=-M.params.slidesOffsetBefore,i=0,o=0;"string"==typeof n&&n.indexOf("%")>=0&&(n=parseFloat(n.replace("%",""))/100*M.size),M.virtualSize=-n,M.rtl?M.slides.css({marginLeft:"",marginTop:""}):M.slides.css({marginRight:"",marginBottom:""}),M.params.slidesPerColumn>1&&(t=Math.floor(M.slides.length/M.params.slidesPerColumn)===M.slides.length/M.params.slidesPerColumn?M.slides.length:Math.ceil(M.slides.length/M.params.slidesPerColumn)*M.params.slidesPerColumn,"auto"!==M.params.slidesPerView&&"row"===M.params.slidesPerColumnFill&&(t=Math.max(t,M.params.slidesPerView*M.params.slidesPerColumn)));var a,u,c=M.params.slidesPerColumn,d=t/c,h=d-(M.params.slidesPerColumn*d-M.slides.length);for(e=0;e<M.slides.length;e++){a=0;var f,p,m,g=M.slides.eq(e);M.params.slidesPerColumn>1&&("column"===M.params.slidesPerColumnFill?(m=e-(p=Math.floor(e/c))*c,(p>h||p===h&&m===c-1)&&++m>=c&&(m=0,p++),f=p+m*t/c,g.css({"-webkit-box-ordinal-group":f,"-moz-box-ordinal-group":f,"-ms-flex-order":f,"-webkit-order":f,order:f})):p=e-(m=Math.floor(e/d))*d,g.css({"margin-top":0!==m&&M.params.spaceBetween&&M.params.spaceBetween+"px"}).attr("data-swiper-column",p).attr("data-swiper-row",m)),"none"!==g.css("display")&&("auto"===M.params.slidesPerView?(a=s()?g.outerWidth(!0):g.outerHeight(!0),M.params.roundLengths&&(a=l(a))):(a=(M.size-(M.params.slidesPerView-1)*n)/M.params.slidesPerView,M.params.roundLengths&&(a=l(a)),s()?M.slides[e].style.width=a+"px":M.slides[e].style.height=a+"px"),M.slides[e].swiperSlideSize=a,M.slidesSizesGrid.push(a),M.params.centeredSlides?(r=r+a/2+i/2+n,0===e&&(r=r-M.size/2-n),Math.abs(r)<.001&&(r=0),o%M.params.slidesPerGroup==0&&M.snapGrid.push(r),M.slidesGrid.push(r)):(o%M.params.slidesPerGroup==0&&M.snapGrid.push(r),M.slidesGrid.push(r),r=r+a+n),M.virtualSize+=a+n,i=a,o++)}if(M.virtualSize=Math.max(M.virtualSize,M.size)+M.params.slidesOffsetAfter,M.rtl&&M.wrongRTL&&("slide"===M.params.effect||"coverflow"===M.params.effect)&&M.wrapper.css({width:M.virtualSize+M.params.spaceBetween+"px"}),(!M.support.flexbox||M.params.setWrapperSize)&&(s()?M.wrapper.css({width:M.virtualSize+M.params.spaceBetween+"px"}):M.wrapper.css({height:M.virtualSize+M.params.spaceBetween+"px"})),M.params.slidesPerColumn>1&&(M.virtualSize=(a+M.params.spaceBetween)*t,M.virtualSize=Math.ceil(M.virtualSize/M.params.slidesPerColumn)-M.params.spaceBetween,M.wrapper.css({width:M.virtualSize+M.params.spaceBetween+"px"}),M.params.centeredSlides)){for(u=[],e=0;e<M.snapGrid.length;e++)M.snapGrid[e]<M.virtualSize+M.snapGrid[0]&&u.push(M.snapGrid[e]);M.snapGrid=u}if(!M.params.centeredSlides){for(u=[],e=0;e<M.snapGrid.length;e++)M.snapGrid[e]<=M.virtualSize-M.size&&u.push(M.snapGrid[e]);M.snapGrid=u,Math.floor(M.virtualSize-M.size)>Math.floor(M.snapGrid[M.snapGrid.length-1])&&M.snapGrid.push(M.virtualSize-M.size)}0===M.snapGrid.length&&(M.snapGrid=[0]),0!==M.params.spaceBetween&&(s()?M.rtl?M.slides.css({marginLeft:n+"px"}):M.slides.css({marginRight:n+"px"}):M.slides.css({marginBottom:n+"px"})),M.params.watchSlidesProgress&&M.updateSlidesOffset()},M.updateSlidesOffset=function(){for(var e=0;e<M.slides.length;e++)M.slides[e].swiperSlideOffset=s()?M.slides[e].offsetLeft:M.slides[e].offsetTop},M.updateSlidesProgress=function(e){if(void 0===e&&(e=M.translate||0),0!==M.slides.length){void 0===M.slides[0].swiperSlideOffset&&M.updateSlidesOffset();var t=-e;M.rtl&&(t=e),M.slides.removeClass(M.params.slideVisibleClass);for(var n=0;n<M.slides.length;n++){var r=M.slides[n],i=(t-r.swiperSlideOffset)/(r.swiperSlideSize+M.params.spaceBetween);if(M.params.watchSlidesVisibility){var o=-(t-r.swiperSlideOffset),a=o+M.slidesSizesGrid[n];(o>=0&&o<M.size||a>0&&a<=M.size||0>=o&&a>=M.size)&&M.slides.eq(n).addClass(M.params.slideVisibleClass)}r.progress=M.rtl?-i:i}}},M.updateProgress=function(e){void 0===e&&(e=M.translate||0);var t=M.maxTranslate()-M.minTranslate(),n=M.isBeginning,r=M.isEnd;0===t?(M.progress=0,M.isBeginning=M.isEnd=!0):(M.progress=(e-M.minTranslate())/t,M.isBeginning=M.progress<=0,M.isEnd=M.progress>=1),M.isBeginning&&!n&&M.emit("onReachBeginning",M),M.isEnd&&!r&&M.emit("onReachEnd",M),M.params.watchSlidesProgress&&M.updateSlidesProgress(e),M.emit("onProgress",M,M.progress)},M.updateActiveIndex=function(){var e,t,n,r=M.rtl?M.translate:-M.translate;for(t=0;t<M.slidesGrid.length;t++)void 0!==M.slidesGrid[t+1]?r>=M.slidesGrid[t]&&r<M.slidesGrid[t+1]-(M.slidesGrid[t+1]-M.slidesGrid[t])/2?e=t:r>=M.slidesGrid[t]&&r<M.slidesGrid[t+1]&&(e=t+1):r>=M.slidesGrid[t]&&(e=t);(0>e||void 0===e)&&(e=0),(n=Math.floor(e/M.params.slidesPerGroup))>=M.snapGrid.length&&(n=M.snapGrid.length-1),e!==M.activeIndex&&(M.snapIndex=n,M.previousIndex=M.activeIndex,M.activeIndex=e,M.updateClasses())},M.updateClasses=function(){M.slides.removeClass(M.params.slideActiveClass+" "+M.params.slideNextClass+" "+M.params.slidePrevClass);var e,n=M.slides.eq(M.activeIndex);n.addClass(M.params.slideActiveClass),n.next("."+M.params.slideClass).addClass(M.params.slideNextClass),n.prev("."+M.params.slideClass).addClass(M.params.slidePrevClass),M.bullets&&M.bullets.length>0&&(M.bullets.removeClass(M.params.bulletActiveClass),M.params.loop?((e=Math.ceil(M.activeIndex-M.loopedSlides)/M.params.slidesPerGroup)>M.slides.length-1-2*M.loopedSlides&&(e-=M.slides.length-2*M.loopedSlides),e>M.bullets.length-1&&(e-=M.bullets.length)):e=void 0!==M.snapIndex?M.snapIndex:M.activeIndex||0,M.paginationContainer.length>1?M.bullets.each((function(){t(this).index()===e&&t(this).addClass(M.params.bulletActiveClass)})):M.bullets.eq(e).addClass(M.params.bulletActiveClass)),M.params.loop||(M.params.prevButton&&(M.isBeginning?(t(M.params.prevButton).addClass(M.params.buttonDisabledClass),M.params.a11y&&M.a11y&&M.a11y.disable(t(M.params.prevButton))):(t(M.params.prevButton).removeClass(M.params.buttonDisabledClass),M.params.a11y&&M.a11y&&M.a11y.enable(t(M.params.prevButton)))),M.params.nextButton&&(M.isEnd?(t(M.params.nextButton).addClass(M.params.buttonDisabledClass),M.params.a11y&&M.a11y&&M.a11y.disable(t(M.params.nextButton))):(t(M.params.nextButton).removeClass(M.params.buttonDisabledClass),M.params.a11y&&M.a11y&&M.a11y.enable(t(M.params.nextButton)))))},M.updatePagination=function(){if(M.params.pagination&&M.paginationContainer&&M.paginationContainer.length>0){for(var e="",t=M.params.loop?Math.ceil((M.slides.length-2*M.loopedSlides)/M.params.slidesPerGroup):M.snapGrid.length,n=0;t>n;n++)e+=M.params.paginationBulletRender?M.params.paginationBulletRender(n,M.params.bulletClass):"<"+M.params.paginationElement+' class="'+M.params.bulletClass+'"></'+M.params.paginationElement+">";M.paginationContainer.html(e),M.bullets=M.paginationContainer.find("."+M.params.bulletClass),M.params.paginationClickable&&M.params.a11y&&M.a11y&&M.a11y.initPagination()}},M.update=function(e){function t(){n=Math.min(Math.max(M.translate,M.maxTranslate()),M.minTranslate()),M.setWrapperTranslate(n),M.updateActiveIndex(),M.updateClasses()}var n;M.updateContainerSize(),M.updateSlidesSize(),M.updateProgress(),M.updatePagination(),M.updateClasses(),M.params.scrollbar&&M.scrollbar&&M.scrollbar.set(),e?(M.controller&&M.controller.spline&&(M.controller.spline=void 0),M.params.freeMode?(t(),M.params.autoHeight&&M.updateAutoHeight()):(("auto"===M.params.slidesPerView||M.params.slidesPerView>1)&&M.isEnd&&!M.params.centeredSlides?M.slideTo(M.slides.length-1,0,!1,!0):M.slideTo(M.activeIndex,0,!1,!0))||t()):M.params.autoHeight&&M.updateAutoHeight()},M.onResize=function(e){M.params.breakpoints&&M.setBreakpoint();var t=M.params.allowSwipeToPrev,n=M.params.allowSwipeToNext;if(M.params.allowSwipeToPrev=M.params.allowSwipeToNext=!0,M.updateContainerSize(),M.updateSlidesSize(),("auto"===M.params.slidesPerView||M.params.freeMode||e)&&M.updatePagination(),M.params.scrollbar&&M.scrollbar&&M.scrollbar.set(),M.controller&&M.controller.spline&&(M.controller.spline=void 0),M.params.freeMode){var r=Math.min(Math.max(M.translate,M.maxTranslate()),M.minTranslate());M.setWrapperTranslate(r),M.updateActiveIndex(),M.updateClasses(),M.params.autoHeight&&M.updateAutoHeight()}else M.updateClasses(),("auto"===M.params.slidesPerView||M.params.slidesPerView>1)&&M.isEnd&&!M.params.centeredSlides?M.slideTo(M.slides.length-1,0,!1,!0):M.slideTo(M.activeIndex,0,!1,!0);M.params.allowSwipeToPrev=t,M.params.allowSwipeToNext=n};var k=["mousedown","mousemove","mouseup"];window.navigator.pointerEnabled?k=["pointerdown","pointermove","pointerup"]:window.navigator.msPointerEnabled&&(k=["MSPointerDown","MSPointerMove","MSPointerUp"]),M.touchEvents={start:M.support.touch||!M.params.simulateTouch?"touchstart":k[0],move:M.support.touch||!M.params.simulateTouch?"touchmove":k[1],end:M.support.touch||!M.params.simulateTouch?"touchend":k[2]},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===M.params.touchEventsTarget?M.container:M.wrapper).addClass("swiper-wp8-"+M.params.direction),M.initEvents=function(e){var r=e?"off":"on",i=e?"removeEventListener":"addEventListener",o="container"===M.params.touchEventsTarget?M.container[0]:M.wrapper[0],a=M.support.touch?o:document,s=!!M.params.nested;M.browser.ie?(o[i](M.touchEvents.start,M.onTouchStart,!1),a[i](M.touchEvents.move,M.onTouchMove,s),a[i](M.touchEvents.end,M.onTouchEnd,!1)):(M.support.touch&&(o[i](M.touchEvents.start,M.onTouchStart,!1),o[i](M.touchEvents.move,M.onTouchMove,s),o[i](M.touchEvents.end,M.onTouchEnd,!1)),!n.simulateTouch||M.device.ios||M.device.android||(o[i]("mousedown",M.onTouchStart,!1),document[i]("mousemove",M.onTouchMove,s),document[i]("mouseup",M.onTouchEnd,!1))),window[i]("resize",M.onResize),M.params.nextButton&&(t(M.params.nextButton)[r]("click",M.onClickNext),M.params.a11y&&M.a11y&&t(M.params.nextButton)[r]("keydown",M.a11y.onEnterKey)),M.params.prevButton&&(t(M.params.prevButton)[r]("click",M.onClickPrev),M.params.a11y&&M.a11y&&t(M.params.prevButton)[r]("keydown",M.a11y.onEnterKey)),M.params.pagination&&M.params.paginationClickable&&(t(M.paginationContainer)[r]("click","."+M.params.bulletClass,M.onClickIndex),M.params.a11y&&M.a11y&&t(M.paginationContainer)[r]("keydown","."+M.params.bulletClass,M.a11y.onEnterKey)),(M.params.preventClicks||M.params.preventClicksPropagation)&&o[i]("click",M.preventClicks,!0)},M.attachEvents=function(e){M.initEvents()},M.detachEvents=function(){M.initEvents(!0)},M.allowClick=!0,M.preventClicks=function(e){M.allowClick||(M.params.preventClicks&&e.preventDefault(),M.params.preventClicksPropagation&&M.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},M.onClickNext=function(e){e.preventDefault(),(!M.isEnd||M.params.loop)&&M.slideNext()},M.onClickPrev=function(e){e.preventDefault(),(!M.isBeginning||M.params.loop)&&M.slidePrev()},M.onClickIndex=function(e){e.preventDefault();var n=t(this).index()*M.params.slidesPerGroup;M.params.loop&&(n+=M.loopedSlides),M.slideTo(n)},M.updateClickedSlide=function(e){var n=c(e,"."+M.params.slideClass),r=!1;if(n)for(var i=0;i<M.slides.length;i++)M.slides[i]===n&&(r=!0);if(!n||!r)return M.clickedSlide=void 0,void(M.clickedIndex=void 0);if(M.clickedSlide=n,M.clickedIndex=t(n).index(),M.params.slideToClickedSlide&&void 0!==M.clickedIndex&&M.clickedIndex!==M.activeIndex){var o,a=M.clickedIndex;if(M.params.loop){if(M.animating)return;o=t(M.clickedSlide).attr("data-swiper-slide-index"),M.params.centeredSlides?a<M.loopedSlides-M.params.slidesPerView/2||a>M.slides.length-M.loopedSlides+M.params.slidesPerView/2?(M.fixLoop(),a=M.wrapper.children("."+M.params.slideClass+'[data-swiper-slide-index="'+o+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout((function(){M.slideTo(a)}),0)):M.slideTo(a):a>M.slides.length-M.params.slidesPerView?(M.fixLoop(),a=M.wrapper.children("."+M.params.slideClass+'[data-swiper-slide-index="'+o+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout((function(){M.slideTo(a)}),0)):M.slideTo(a)}else M.slideTo(a)}};var x,S,T,$,D,C,E,A,P,Y,O,I,j="input, select, textarea, button",B=Date.now(),H=[];if(M.animating=!1,M.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0},M.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),(O="touchstart"===e.type)||!("which"in e)||3!==e.which){if(M.params.noSwiping&&c(e,"."+M.params.noSwipingClass))return void(M.allowClick=!0);if(!M.params.swipeHandler||c(e,M.params.swipeHandler)){var n=M.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,r=M.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(M.device.ios&&M.params.iOSEdgeSwipeDetection&&n<=M.params.iOSEdgeSwipeThreshold)){if(x=!0,S=!1,T=!0,D=void 0,I=void 0,M.touches.startX=n,M.touches.startY=r,$=Date.now(),M.allowClick=!0,M.updateContainerSize(),M.swipeDirection=void 0,M.params.threshold>0&&(A=!1),"touchstart"!==e.type){var i=!0;t(e.target).is(j)&&(i=!1),document.activeElement&&t(document.activeElement).is(j)&&document.activeElement.blur(),i&&e.preventDefault()}M.emit("onTouchStart",M,e)}}}},M.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!(O&&"mousemove"===e.type||e.preventedByNestedSwiper)){if(M.params.onlyExternal)return M.allowClick=!1,void(x&&(M.touches.startX=M.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,M.touches.startY=M.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,$=Date.now()));if(O&&document.activeElement&&e.target===document.activeElement&&t(e.target).is(j))return S=!0,void(M.allowClick=!1);if(T&&M.emit("onTouchMove",M,e),!(e.targetTouches&&e.targetTouches.length>1)){if(M.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,M.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,void 0===D){var r=180*Math.atan2(Math.abs(M.touches.currentY-M.touches.startY),Math.abs(M.touches.currentX-M.touches.startX))/Math.PI;D=s()?r>M.params.touchAngle:90-r>M.params.touchAngle}if(D&&M.emit("onTouchMoveOpposite",M,e),void 0===I&&M.browser.ieTouch&&(M.touches.currentX!==M.touches.startX||M.touches.currentY!==M.touches.startY)&&(I=!0),x){if(D)return void(x=!1);if(I||!M.browser.ieTouch){M.allowClick=!1,M.emit("onSliderMove",M,e),e.preventDefault(),M.params.touchMoveStopPropagation&&!M.params.nested&&e.stopPropagation(),S||(n.loop&&M.fixLoop(),E=M.getWrapperTranslate(),M.setWrapperTransition(0),M.animating&&M.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),M.params.autoplay&&M.autoplaying&&(M.params.autoplayDisableOnInteraction?M.stopAutoplay():M.pauseAutoplay()),Y=!1,M.params.grabCursor&&(M.container[0].style.cursor="move",M.container[0].style.cursor="-webkit-grabbing",M.container[0].style.cursor="-moz-grabbin",M.container[0].style.cursor="grabbing")),S=!0;var i=M.touches.diff=s()?M.touches.currentX-M.touches.startX:M.touches.currentY-M.touches.startY;i*=M.params.touchRatio,M.rtl&&(i=-i),M.swipeDirection=i>0?"prev":"next",C=i+E;var o=!0;if(i>0&&C>M.minTranslate()?(o=!1,M.params.resistance&&(C=M.minTranslate()-1+Math.pow(-M.minTranslate()+E+i,M.params.resistanceRatio))):0>i&&C<M.maxTranslate()&&(o=!1,M.params.resistance&&(C=M.maxTranslate()+1-Math.pow(M.maxTranslate()-E-i,M.params.resistanceRatio))),o&&(e.preventedByNestedSwiper=!0),!M.params.allowSwipeToNext&&"next"===M.swipeDirection&&E>C&&(C=E),!M.params.allowSwipeToPrev&&"prev"===M.swipeDirection&&C>E&&(C=E),M.params.followFinger){if(M.params.threshold>0){if(!(Math.abs(i)>M.params.threshold||A))return void(C=E);if(!A)return A=!0,M.touches.startX=M.touches.currentX,M.touches.startY=M.touches.currentY,C=E,void(M.touches.diff=s()?M.touches.currentX-M.touches.startX:M.touches.currentY-M.touches.startY)}(M.params.freeMode||M.params.watchSlidesProgress)&&M.updateActiveIndex(),M.params.freeMode&&(0===H.length&&H.push({position:M.touches[s()?"startX":"startY"],time:$}),H.push({position:M.touches[s()?"currentX":"currentY"],time:(new window.Date).getTime()})),M.updateProgress(C),M.setWrapperTranslate(C)}}}}}},M.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),T&&M.emit("onTouchEnd",M,e),T=!1,x){M.params.grabCursor&&S&&x&&(M.container[0].style.cursor="move",M.container[0].style.cursor="-webkit-grab",M.container[0].style.cursor="-moz-grab",M.container[0].style.cursor="grab");var n,r=Date.now(),i=r-$;if(M.allowClick&&(M.updateClickedSlide(e),M.emit("onTap",M,e),300>i&&r-B>300&&(P&&clearTimeout(P),P=setTimeout((function(){M&&(M.params.paginationHide&&M.paginationContainer.length>0&&!t(e.target).hasClass(M.params.bulletClass)&&M.paginationContainer.toggleClass(M.params.paginationHiddenClass),M.emit("onClick",M,e))}),300)),300>i&&300>r-B&&(P&&clearTimeout(P),M.emit("onDoubleTap",M,e))),B=Date.now(),setTimeout((function(){M&&(M.allowClick=!0)}),0),!x||!S||!M.swipeDirection||0===M.touches.diff||C===E)return void(x=S=!1);if(x=S=!1,n=M.params.followFinger?M.rtl?M.translate:-M.translate:-C,M.params.freeMode){if(n<-M.minTranslate())return void M.slideTo(M.activeIndex);if(n>-M.maxTranslate())return void(M.slides.length<M.snapGrid.length?M.slideTo(M.snapGrid.length-1):M.slideTo(M.slides.length-1));if(M.params.freeModeMomentum){if(H.length>1){var o=H.pop(),a=H.pop(),s=o.position-a.position,l=o.time-a.time;M.velocity=s/l,M.velocity=M.velocity/2,Math.abs(M.velocity)<M.params.freeModeMinimumVelocity&&(M.velocity=0),(l>150||(new window.Date).getTime()-o.time>300)&&(M.velocity=0)}else M.velocity=0;H.length=0;var u=1e3*M.params.freeModeMomentumRatio,c=M.velocity*u,d=M.translate+c;M.rtl&&(d=-d);var h,f=!1,p=20*Math.abs(M.velocity)*M.params.freeModeMomentumBounceRatio;if(d<M.maxTranslate())M.params.freeModeMomentumBounce?(d+M.maxTranslate()<-p&&(d=M.maxTranslate()-p),h=M.maxTranslate(),f=!0,Y=!0):d=M.maxTranslate();else if(d>M.minTranslate())M.params.freeModeMomentumBounce?(d-M.minTranslate()>p&&(d=M.minTranslate()+p),h=M.minTranslate(),f=!0,Y=!0):d=M.minTranslate();else if(M.params.freeModeSticky){var m,g=0;for(g=0;g<M.snapGrid.length;g+=1)if(M.snapGrid[g]>-d){m=g;break}d=Math.abs(M.snapGrid[m]-d)<Math.abs(M.snapGrid[m-1]-d)||"next"===M.swipeDirection?M.snapGrid[m]:M.snapGrid[m-1],M.rtl||(d=-d)}if(0!==M.velocity)u=M.rtl?Math.abs((-d-M.translate)/M.velocity):Math.abs((d-M.translate)/M.velocity);else if(M.params.freeModeSticky)return void M.slideReset();M.params.freeModeMomentumBounce&&f?(M.updateProgress(h),M.setWrapperTransition(u),M.setWrapperTranslate(d),M.onTransitionStart(),M.animating=!0,M.wrapper.transitionEnd((function(){M&&Y&&(M.emit("onMomentumBounce",M),M.setWrapperTransition(M.params.speed),M.setWrapperTranslate(h),M.wrapper.transitionEnd((function(){M&&M.onTransitionEnd()})))}))):M.velocity?(M.updateProgress(d),M.setWrapperTransition(u),M.setWrapperTranslate(d),M.onTransitionStart(),M.animating||(M.animating=!0,M.wrapper.transitionEnd((function(){M&&M.onTransitionEnd()})))):M.updateProgress(d),M.updateActiveIndex()}return void((!M.params.freeModeMomentum||i>=M.params.longSwipesMs)&&(M.updateProgress(),M.updateActiveIndex()))}var v,_=0,y=M.slidesSizesGrid[0];for(v=0;v<M.slidesGrid.length;v+=M.params.slidesPerGroup)void 0!==M.slidesGrid[v+M.params.slidesPerGroup]?n>=M.slidesGrid[v]&&n<M.slidesGrid[v+M.params.slidesPerGroup]&&(_=v,y=M.slidesGrid[v+M.params.slidesPerGroup]-M.slidesGrid[v]):n>=M.slidesGrid[v]&&(_=v,y=M.slidesGrid[M.slidesGrid.length-1]-M.slidesGrid[M.slidesGrid.length-2]);var b=(n-M.slidesGrid[_])/y;if(i>M.params.longSwipesMs){if(!M.params.longSwipes)return void M.slideTo(M.activeIndex);"next"===M.swipeDirection&&(b>=M.params.longSwipesRatio?M.slideTo(_+M.params.slidesPerGroup):M.slideTo(_)),"prev"===M.swipeDirection&&(b>1-M.params.longSwipesRatio?M.slideTo(_+M.params.slidesPerGroup):M.slideTo(_))}else{if(!M.params.shortSwipes)return void M.slideTo(M.activeIndex);"next"===M.swipeDirection&&M.slideTo(_+M.params.slidesPerGroup),"prev"===M.swipeDirection&&M.slideTo(_)}}},M._slideTo=function(e,t){return M.slideTo(e,t,!0,!0)},M.slideTo=function(e,t,n,r){void 0===n&&(n=!0),void 0===e&&(e=0),0>e&&(e=0),M.snapIndex=Math.floor(e/M.params.slidesPerGroup),M.snapIndex>=M.snapGrid.length&&(M.snapIndex=M.snapGrid.length-1);var i=-M.snapGrid[M.snapIndex];M.params.autoplay&&M.autoplaying&&(r||!M.params.autoplayDisableOnInteraction?M.pauseAutoplay(t):M.stopAutoplay()),M.updateProgress(i);for(var o=0;o<M.slidesGrid.length;o++)-Math.floor(100*i)>=Math.floor(100*M.slidesGrid[o])&&(e=o);return!(!M.params.allowSwipeToNext&&i<M.translate&&i<M.minTranslate()||!M.params.allowSwipeToPrev&&i>M.translate&&i>M.maxTranslate()&&(M.activeIndex||0)!==e||(void 0===t&&(t=M.params.speed),M.previousIndex=M.activeIndex||0,M.activeIndex=e,M.rtl&&-i===M.translate||!M.rtl&&i===M.translate?(M.params.autoHeight&&M.updateAutoHeight(),M.updateClasses(),"slide"!==M.params.effect&&M.setWrapperTranslate(i),1):(M.updateClasses(),M.onTransitionStart(n),0===t?(M.setWrapperTranslate(i),M.setWrapperTransition(0),M.onTransitionEnd(n)):(M.setWrapperTranslate(i),M.setWrapperTransition(t),M.animating||(M.animating=!0,M.wrapper.transitionEnd((function(){M&&M.onTransitionEnd(n)})))),0)))},M.onTransitionStart=function(e){void 0===e&&(e=!0),M.params.autoHeight&&M.updateAutoHeight(),M.lazy&&M.lazy.onTransitionStart(),e&&(M.emit("onTransitionStart",M),M.activeIndex!==M.previousIndex&&(M.emit("onSlideChangeStart",M),o.$emit("$ionicSlides.slideChangeStart",{slider:M,activeIndex:M.getSlideDataIndex(M.activeIndex),previousIndex:M.getSlideDataIndex(M.previousIndex)}),M.activeIndex>M.previousIndex?M.emit("onSlideNextStart",M):M.emit("onSlidePrevStart",M)))},M.onTransitionEnd=function(e){M.animating=!1,M.setWrapperTransition(0),void 0===e&&(e=!0),M.lazy&&M.lazy.onTransitionEnd(),e&&(M.emit("onTransitionEnd",M),M.activeIndex!==M.previousIndex&&(M.emit("onSlideChangeEnd",M),o.$emit("$ionicSlides.slideChangeEnd",{slider:M,activeIndex:M.getSlideDataIndex(M.activeIndex),previousIndex:M.getSlideDataIndex(M.previousIndex)}),M.activeIndex>M.previousIndex?M.emit("onSlideNextEnd",M):M.emit("onSlidePrevEnd",M))),M.params.hashnav&&M.hashnav&&M.hashnav.setHash()},M.slideNext=function(e,t,n){return M.params.loop?!M.animating&&(M.fixLoop(),M.container[0].clientLeft,M.slideTo(M.activeIndex+M.params.slidesPerGroup,t,e,n)):M.slideTo(M.activeIndex+M.params.slidesPerGroup,t,e,n)},M._slideNext=function(e){return M.slideNext(!0,e,!0)},M.slidePrev=function(e,t,n){return M.params.loop?!M.animating&&(M.fixLoop(),M.container[0].clientLeft,M.slideTo(M.activeIndex-1,t,e,n)):M.slideTo(M.activeIndex-1,t,e,n)},M._slidePrev=function(e){return M.slidePrev(!0,e,!0)},M.slideReset=function(e,t,n){return M.slideTo(M.activeIndex,t,e)},M.setWrapperTransition=function(e,t){M.wrapper.transition(e),"slide"!==M.params.effect&&M.effects[M.params.effect]&&M.effects[M.params.effect].setTransition(e),M.params.parallax&&M.parallax&&M.parallax.setTransition(e),M.params.scrollbar&&M.scrollbar&&M.scrollbar.setTransition(e),M.params.control&&M.controller&&M.controller.setTransition(e,t),M.emit("onSetTransition",M,e)},M.setWrapperTranslate=function(e,t,n){var r=0,i=0;s()?r=M.rtl?-e:e:i=e,M.params.roundLengths&&(r=l(r),i=l(i)),M.params.virtualTranslate||(M.support.transforms3d?M.wrapper.transform("translate3d("+r+"px, "+i+"px, 0px)"):M.wrapper.transform("translate("+r+"px, "+i+"px)")),M.translate=s()?r:i;var o=M.maxTranslate()-M.minTranslate();(0===o?0:(e-M.minTranslate())/o)!==M.progress&&M.updateProgress(e),t&&M.updateActiveIndex(),"slide"!==M.params.effect&&M.effects[M.params.effect]&&M.effects[M.params.effect].setTranslate(M.translate),M.params.parallax&&M.parallax&&M.parallax.setTranslate(M.translate),M.params.scrollbar&&M.scrollbar&&M.scrollbar.setTranslate(M.translate),M.params.control&&M.controller&&M.controller.setTranslate(M.translate,n),M.emit("onSetTranslate",M,M.translate)},M.getTranslate=function(e,t){var n,r,i,o;return void 0===t&&(t="x"),M.params.virtualTranslate?M.rtl?-M.translate:M.translate:(i=window.getComputedStyle(e,null),window.WebKitCSSMatrix?((r=i.transform||i.webkitTransform).split(",").length>6&&(r=r.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),o=new window.WebKitCSSMatrix("none"===r?"":r)):n=(o=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(r=window.WebKitCSSMatrix?o.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(r=window.WebKitCSSMatrix?o.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),M.rtl&&r&&(r=-r),r||0)},M.getWrapperTranslate=function(e){return void 0===e&&(e=s()?"x":"y"),M.getTranslate(M.wrapper[0],e)},M.observers=[],M.initObservers=function(){if(M.params.observeParents)for(var e=M.container.parents(),t=0;t<e.length;t++)d(e[t]);d(M.container[0],{childList:!1}),d(M.wrapper[0],{attributes:!1})},M.disconnectObservers=function(){for(var e=0;e<M.observers.length;e++)M.observers[e].disconnect();M.observers=[]},M.updateLoop=function(){var e=M.slides.eq(M.activeIndex);if(angular.element(e).hasClass(M.params.slideDuplicateClass)){for(var t=angular.element(e).attr("data-swiper-slide-index"),n=M.wrapper.children("."+M.params.slideClass),r=0;r<n.length;r++)if(!angular.element(n[r]).hasClass(M.params.slideDuplicateClass)&&angular.element(n[r]).attr("data-swiper-slide-index")===t){M.slideTo(r,0,!1,!0);break}setTimeout((function(){M.createLoop()}),50)}},M.getSlideDataIndex=function(e){var t=M.slides.eq(e),n=angular.element(t).attr("data-swiper-slide-index");return parseInt(n)},M.createLoop=function(){M.wrapper.children("."+M.params.slideClass+"."+M.params.slideDuplicateClass).remove();var e=M.wrapper.children("."+M.params.slideClass);"auto"!==M.params.slidesPerView||M.params.loopedSlides||(M.params.loopedSlides=e.length),M.loopedSlides=parseInt(M.params.loopedSlides||M.params.slidesPerView,10),M.loopedSlides=M.loopedSlides+M.params.loopAdditionalSlides,M.loopedSlides>e.length&&(M.loopedSlides=e.length);var n,r,i,o=[],s=[];for(e.each((function(n,r){var i=t(this);n<M.loopedSlides&&s.push(r),n<e.length&&n>=e.length-M.loopedSlides&&o.push(r),i.attr("data-swiper-slide-index",n)})),n=0;n<s.length;n++)(i=angular.element(s[n]).clone().addClass(M.params.slideDuplicateClass)).removeAttr("ng-transclude"),i.removeAttr("ng-repeat"),r=angular.element(s[n]).scope(),i=a(i)(r),angular.element(M.wrapper).append(i);for(n=o.length-1;n>=0;n--)(i=angular.element(o[n]).clone().addClass(M.params.slideDuplicateClass)).removeAttr("ng-transclude"),i.removeAttr("ng-repeat"),r=angular.element(o[n]).scope(),i=a(i)(r),angular.element(M.wrapper).prepend(i)},M.destroyLoop=function(){M.wrapper.children("."+M.params.slideClass+"."+M.params.slideDuplicateClass).remove(),M.slides.removeAttr("data-swiper-slide-index")},M.fixLoop=function(){var e;M.activeIndex<M.loopedSlides?(e=M.slides.length-3*M.loopedSlides+M.activeIndex,e+=M.loopedSlides,M.slideTo(e,0,!1,!0)):("auto"===M.params.slidesPerView&&M.activeIndex>=2*M.loopedSlides||M.activeIndex>M.slides.length-2*M.params.slidesPerView)&&(e=-M.slides.length+M.activeIndex+M.loopedSlides,e+=M.loopedSlides,M.slideTo(e,0,!1,!0))},M.appendSlide=function(e){if(M.params.loop&&M.destroyLoop(),"object"==typeof e&&e.length)for(var t=0;t<e.length;t++)e[t]&&M.wrapper.append(e[t]);else M.wrapper.append(e);M.params.loop&&M.createLoop(),M.params.observer&&M.support.observer||M.update(!0)},M.prependSlide=function(e){M.params.loop&&M.destroyLoop();var t=M.activeIndex+1;if("object"==typeof e&&e.length){for(var n=0;n<e.length;n++)e[n]&&M.wrapper.prepend(e[n]);t=M.activeIndex+e.length}else M.wrapper.prepend(e);M.params.loop&&M.createLoop(),M.params.observer&&M.support.observer||M.update(!0),M.slideTo(t,0,!1)},M.removeSlide=function(e){M.params.loop&&(M.destroyLoop(),M.slides=M.wrapper.children("."+M.params.slideClass));var t,n=M.activeIndex;if("object"==typeof e&&e.length){for(var r=0;r<e.length;r++)t=e[r],M.slides[t]&&M.slides.eq(t).remove(),n>t&&n--;n=Math.max(n,0)}else t=e,M.slides[t]&&M.slides.eq(t).remove(),n>t&&n--,n=Math.max(n,0);M.params.loop&&M.createLoop(),M.params.observer&&M.support.observer||M.update(!0),M.params.loop?M.slideTo(n+M.loopedSlides,0,!1):M.slideTo(n,0,!1)},M.removeAllSlides=function(){for(var e=[],t=0;t<M.slides.length;t++)e.push(t);M.removeSlide(e)},M.effects={fade:{setTranslate:function(){for(var e=0;e<M.slides.length;e++){var t=M.slides.eq(e),n=-t[0].swiperSlideOffset;M.params.virtualTranslate||(n-=M.translate);var r=0;s()||(r=n,n=0);var i=M.params.fade.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);t.css({opacity:i}).transform("translate3d("+n+"px, "+r+"px, 0px)")}},setTransition:function(e){if(M.slides.transition(e),M.params.virtualTranslate&&0!==e){var t=!1;M.slides.transitionEnd((function(){if(!t&&M){t=!0,M.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],n=0;n<e.length;n++)M.wrapper.trigger(e[n])}}))}}},cube:{setTranslate:function(){var e,n=0;M.params.cube.shadow&&(s()?(0===(e=M.wrapper.find(".swiper-cube-shadow")).length&&(e=t('<div class="swiper-cube-shadow"></div>'),M.wrapper.append(e)),e.css({height:M.width+"px"})):0===(e=M.container.find(".swiper-cube-shadow")).length&&(e=t('<div class="swiper-cube-shadow"></div>'),M.container.append(e)));for(var r=0;r<M.slides.length;r++){var i=M.slides.eq(r),o=90*r,a=Math.floor(o/360);M.rtl&&(o=-o,a=Math.floor(-o/360));var l=Math.max(Math.min(i[0].progress,1),-1),u=0,c=0,d=0;r%4==0?(u=4*-a*M.size,d=0):(r-1)%4==0?(u=0,d=4*-a*M.size):(r-2)%4==0?(u=M.size+4*a*M.size,d=M.size):(r-3)%4==0&&(u=-M.size,d=3*M.size+4*M.size*a),M.rtl&&(u=-u),s()||(c=u,u=0);var h="rotateX("+(s()?0:-o)+"deg) rotateY("+(s()?o:0)+"deg) translate3d("+u+"px, "+c+"px, "+d+"px)";if(1>=l&&l>-1&&(n=90*r+90*l,M.rtl&&(n=90*-r-90*l)),i.transform(h),M.params.cube.slideShadows){var f=s()?i.find(".swiper-slide-shadow-left"):i.find(".swiper-slide-shadow-top"),p=s()?i.find(".swiper-slide-shadow-right"):i.find(".swiper-slide-shadow-bottom");0===f.length&&(f=t('<div class="swiper-slide-shadow-'+(s()?"left":"top")+'"></div>'),i.append(f)),0===p.length&&(p=t('<div class="swiper-slide-shadow-'+(s()?"right":"bottom")+'"></div>'),i.append(p)),i[0].progress,f.length&&(f[0].style.opacity=-i[0].progress),p.length&&(p[0].style.opacity=i[0].progress)}}if(M.wrapper.css({"-webkit-transform-origin":"50% 50% -"+M.size/2+"px","-moz-transform-origin":"50% 50% -"+M.size/2+"px","-ms-transform-origin":"50% 50% -"+M.size/2+"px","transform-origin":"50% 50% -"+M.size/2+"px"}),M.params.cube.shadow)if(s())e.transform("translate3d(0px, "+(M.width/2+M.params.cube.shadowOffset)+"px, "+-M.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+M.params.cube.shadowScale+")");else{var m=Math.abs(n)-90*Math.floor(Math.abs(n)/90),g=1.5-(Math.sin(2*m*Math.PI/360)/2+Math.cos(2*m*Math.PI/360)/2),v=M.params.cube.shadowScale,_=M.params.cube.shadowScale/g,y=M.params.cube.shadowOffset;e.transform("scale3d("+v+", 1, "+_+") translate3d(0px, "+(M.height/2+y)+"px, "+-M.height/2/_+"px) rotateX(-90deg)")}var b=M.isSafari||M.isUiWebView?-M.size/2:0;M.wrapper.transform("translate3d(0px,0,"+b+"px) rotateX("+(s()?0:n)+"deg) rotateY("+(s()?-n:0)+"deg)")},setTransition:function(e){M.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),M.params.cube.shadow&&!s()&&M.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=M.translate,n=s()?-e+M.width/2:-e+M.height/2,r=s()?M.params.coverflow.rotate:-M.params.coverflow.rotate,i=M.params.coverflow.depth,o=0,a=M.slides.length;a>o;o++){var l=M.slides.eq(o),u=M.slidesSizesGrid[o],c=(n-l[0].swiperSlideOffset-u/2)/u*M.params.coverflow.modifier,d=s()?r*c:0,h=s()?0:r*c,f=-i*Math.abs(c),p=s()?0:M.params.coverflow.stretch*c,m=s()?M.params.coverflow.stretch*c:0;Math.abs(m)<.001&&(m=0),Math.abs(p)<.001&&(p=0),Math.abs(f)<.001&&(f=0),Math.abs(d)<.001&&(d=0),Math.abs(h)<.001&&(h=0);var g="translate3d("+m+"px,"+p+"px,"+f+"px)  rotateX("+h+"deg) rotateY("+d+"deg)";if(l.transform(g),l[0].style.zIndex=1-Math.abs(Math.round(c)),M.params.coverflow.slideShadows){var v=s()?l.find(".swiper-slide-shadow-left"):l.find(".swiper-slide-shadow-top"),_=s()?l.find(".swiper-slide-shadow-right"):l.find(".swiper-slide-shadow-bottom");0===v.length&&(v=t('<div class="swiper-slide-shadow-'+(s()?"left":"top")+'"></div>'),l.append(v)),0===_.length&&(_=t('<div class="swiper-slide-shadow-'+(s()?"right":"bottom")+'"></div>'),l.append(_)),v.length&&(v[0].style.opacity=c>0?c:0),_.length&&(_[0].style.opacity=-c>0?-c:0)}}M.browser.ie&&(M.wrapper[0].style.perspectiveOrigin=n+"px 50%")},setTransition:function(e){M.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},M.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,n){if(void 0!==e&&(void 0===n&&(n=!0),0!==M.slides.length)){var r=M.slides.eq(e),i=r.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)");!r.hasClass("swiper-lazy")||r.hasClass("swiper-lazy-loaded")||r.hasClass("swiper-lazy-loading")||(i=i.add(r[0])),0!==i.length&&i.each((function(){var e=t(this);e.addClass("swiper-lazy-loading");var i=e.attr("data-background"),o=e.attr("data-src"),a=e.attr("data-srcset");M.loadImage(e[0],o||i,a,!1,(function(){if(i?(e.css("background-image","url("+i+")"),e.removeAttr("data-background")):(a&&(e.attr("srcset",a),e.removeAttr("data-srcset")),o&&(e.attr("src",o),e.removeAttr("data-src"))),e.addClass("swiper-lazy-loaded").removeClass("swiper-lazy-loading"),r.find(".swiper-lazy-preloader, .preloader").remove(),M.params.loop&&n){var t=r.attr("data-swiper-slide-index");if(r.hasClass(M.params.slideDuplicateClass)){var s=M.wrapper.children('[data-swiper-slide-index="'+t+'"]:not(.'+M.params.slideDuplicateClass+")");M.lazy.loadImageInSlide(s.index(),!1)}else{var l=M.wrapper.children("."+M.params.slideDuplicateClass+'[data-swiper-slide-index="'+t+'"]');M.lazy.loadImageInSlide(l.index(),!1)}}M.emit("onLazyImageReady",M,r[0],e[0])})),M.emit("onLazyImageLoad",M,r[0],e[0])}))}},load:function(){var e;if(M.params.watchSlidesVisibility)M.wrapper.children("."+M.params.slideVisibleClass).each((function(){M.lazy.loadImageInSlide(t(this).index())}));else if(M.params.slidesPerView>1)for(e=M.activeIndex;e<M.activeIndex+M.params.slidesPerView;e++)M.slides[e]&&M.lazy.loadImageInSlide(e);else M.lazy.loadImageInSlide(M.activeIndex);if(M.params.lazyLoadingInPrevNext)if(M.params.slidesPerView>1){for(e=M.activeIndex+M.params.slidesPerView;e<M.activeIndex+M.params.slidesPerView+M.params.slidesPerView;e++)M.slides[e]&&M.lazy.loadImageInSlide(e);for(e=M.activeIndex-M.params.slidesPerView;e<M.activeIndex;e++)M.slides[e]&&M.lazy.loadImageInSlide(e)}else{var n=M.wrapper.children("."+M.params.slideNextClass);n.length>0&&M.lazy.loadImageInSlide(n.index());var r=M.wrapper.children("."+M.params.slidePrevClass);r.length>0&&M.lazy.loadImageInSlide(r.index())}},onTransitionStart:function(){M.params.lazyLoading&&(M.params.lazyLoadingOnTransitionStart||!M.params.lazyLoadingOnTransitionStart&&!M.lazy.initialImageLoaded)&&M.lazy.load()},onTransitionEnd:function(){M.params.lazyLoading&&!M.params.lazyLoadingOnTransitionStart&&M.lazy.load()}},M.scrollbar={isTouched:!1,setDragPosition:function(e){var t=M.scrollbar,n=(s()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY)-t.track.offset()[s()?"left":"top"]-t.dragSize/2,r=-M.minTranslate()*t.moveDivider,i=-M.maxTranslate()*t.moveDivider;r>n?n=r:n>i&&(n=i),n=-n/t.moveDivider,M.updateProgress(n),M.setWrapperTranslate(n,!0)},dragStart:function(e){var t=M.scrollbar;t.isTouched=!0,e.preventDefault(),e.stopPropagation(),t.setDragPosition(e),clearTimeout(t.dragTimeout),t.track.transition(0),M.params.scrollbarHide&&t.track.css("opacity",1),M.wrapper.transition(100),t.drag.transition(100),M.emit("onScrollbarDragStart",M)},dragMove:function(e){var t=M.scrollbar;t.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),M.wrapper.transition(0),t.track.transition(0),t.drag.transition(0),M.emit("onScrollbarDragMove",M))},dragEnd:function(e){var t=M.scrollbar;t.isTouched&&(t.isTouched=!1,M.params.scrollbarHide&&(clearTimeout(t.dragTimeout),t.dragTimeout=setTimeout((function(){t.track.css("opacity",0),t.track.transition(400)}),1e3)),M.emit("onScrollbarDragEnd",M),M.params.scrollbarSnapOnRelease&&M.slideReset())},enableDraggable:function(){var e=M.scrollbar,n=M.support.touch?e.track:document;t(e.track).on(M.touchEvents.start,e.dragStart),t(n).on(M.touchEvents.move,e.dragMove),t(n).on(M.touchEvents.end,e.dragEnd)},disableDraggable:function(){var e=M.scrollbar,n=M.support.touch?e.track:document;t(e.track).off(M.touchEvents.start,e.dragStart),t(n).off(M.touchEvents.move,e.dragMove),t(n).off(M.touchEvents.end,e.dragEnd)},set:function(){if(M.params.scrollbar){var e=M.scrollbar;e.track=t(M.params.scrollbar),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=t('<div class="swiper-scrollbar-drag"></div>'),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=s()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=M.size/M.virtualSize,e.moveDivider=e.divider*(e.trackSize/M.size),e.dragSize=e.trackSize*e.divider,s()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",M.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(M.params.scrollbar){var e,t=M.scrollbar,n=(M.translate,t.dragSize);e=(t.trackSize-t.dragSize)*M.progress,M.rtl&&s()?(e=-e)>0?(n=t.dragSize-e,e=0):-e+t.dragSize>t.trackSize&&(n=t.trackSize+e):0>e?(n=t.dragSize+e,e=0):e+t.dragSize>t.trackSize&&(n=t.trackSize-e),s()?(M.support.transforms3d?t.drag.transform("translate3d("+e+"px, 0, 0)"):t.drag.transform("translateX("+e+"px)"),t.drag[0].style.width=n+"px"):(M.support.transforms3d?t.drag.transform("translate3d(0px, "+e+"px, 0)"):t.drag.transform("translateY("+e+"px)"),t.drag[0].style.height=n+"px"),M.params.scrollbarHide&&(clearTimeout(t.timeout),t.track[0].style.opacity=1,t.timeout=setTimeout((function(){t.track[0].style.opacity=0,t.track.transition(400)}),1e3))}},setTransition:function(e){M.params.scrollbar&&M.scrollbar.drag.transition(e)}},M.controller={LinearSpline:function(e,t){var n,r;this.x=e,this.y=t,this.lastIndex=e.length-1,this.x.length,this.interpolate=function(e){return e?(r=i(this.x,e),n=r-1,(e-this.x[n])*(this.y[r]-this.y[n])/(this.x[r]-this.x[n])+this.y[n]):0};var i=function(){var e,t,n;return function(r,i){for(t=-1,e=r.length;e-t>1;)r[n=e+t>>1]<=i?t=n:e=n;return e}}()},getInterpolateFunction:function(e){M.controller.spline||(M.controller.spline=M.params.loop?new M.controller.LinearSpline(M.slidesGrid,e.slidesGrid):new M.controller.LinearSpline(M.snapGrid,e.snapGrid))},setTranslate:function(e,t){function n(t){e=t.rtl&&"horizontal"===t.params.direction?-M.translate:M.translate,"slide"===M.params.controlBy&&(M.controller.getInterpolateFunction(t),o=-M.controller.spline.interpolate(-e)),o&&"container"!==M.params.controlBy||(i=(t.maxTranslate()-t.minTranslate())/(M.maxTranslate()-M.minTranslate()),o=(e-M.minTranslate())*i+t.minTranslate()),M.params.controlInverse&&(o=t.maxTranslate()-o),t.updateProgress(o),t.setWrapperTranslate(o,!1,M),t.updateActiveIndex()}var i,o,a=M.params.control;if(M.isArray(a))for(var s=0;s<a.length;s++)a[s]!==t&&a[s]instanceof r&&n(a[s]);else a instanceof r&&t!==a&&n(a)},setTransition:function(e,t){function n(t){t.setWrapperTransition(e,M),0!==e&&(t.onTransitionStart(),t.wrapper.transitionEnd((function(){o&&(t.params.loop&&"slide"===M.params.controlBy&&t.fixLoop(),t.onTransitionEnd())})))}var i,o=M.params.control;if(M.isArray(o))for(i=0;i<o.length;i++)o[i]!==t&&o[i]instanceof r&&n(o[i]);else o instanceof r&&t!==o&&n(o)}},M.hashnav={init:function(){if(M.params.hashnav){M.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var t=0,n=M.slides.length;n>t;t++){var r=M.slides.eq(t);if(r.attr("data-hash")===e&&!r.hasClass(M.params.slideDuplicateClass)){var i=r.index();M.slideTo(i,0,M.params.runCallbacksOnInit,!0)}}}},setHash:function(){M.hashnav.initialized&&M.params.hashnav&&(document.location.hash=M.slides.eq(M.activeIndex).attr("data-hash")||"")}},M.disableKeyboardControl=function(){M.params.keyboardControl=!1,t(document).off("keydown",h)},M.enableKeyboardControl=function(){M.params.keyboardControl=!0,t(document).on("keydown",h)},M.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},M.params.mousewheelControl){try{new window.WheelEvent("wheel"),M.mousewheel.event="wheel"}catch(e){}M.mousewheel.event||void 0===document.onmousewheel||(M.mousewheel.event="mousewheel"),M.mousewheel.event||(M.mousewheel.event="DOMMouseScroll")}for(var N in M.disableMousewheelControl=function(){return!!M.mousewheel.event&&(M.container.off(M.mousewheel.event,f),!0)},M.enableMousewheelControl=function(){return!!M.mousewheel.event&&(M.container.on(M.mousewheel.event,f),!0)},M.parallax={setTranslate:function(){M.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){p(this,M.progress)})),M.slides.each((function(){var e=t(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){p(this,Math.min(Math.max(e[0].progress,-1),1))}))}))},setTransition:function(e){void 0===e&&(e=M.params.speed),M.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){var n=t(this),r=parseInt(n.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),n.transition(r)}))}},M._plugins=[],M.plugins){var R=M.plugins[N](M,M.params[N]);R&&M._plugins.push(R)}return M.callPlugins=function(e){for(var t=0;t<M._plugins.length;t++)e in M._plugins[t]&&M._plugins[t][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},M.emitterEventListeners={},M.emit=function(e){var t;if(M.params[e]&&M.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),M.emitterEventListeners[e])for(t=0;t<M.emitterEventListeners[e].length;t++)M.emitterEventListeners[e][t](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);M.callPlugins&&M.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},M.on=function(e,t){return e=m(e),M.emitterEventListeners[e]||(M.emitterEventListeners[e]=[]),M.emitterEventListeners[e].push(t),M},M.off=function(e,t){var n;if(e=m(e),void 0===t)return M.emitterEventListeners[e]=[],M;if(M.emitterEventListeners[e]&&0!==M.emitterEventListeners[e].length){for(n=0;n<M.emitterEventListeners[e].length;n++)M.emitterEventListeners[e][n]===t&&M.emitterEventListeners[e].splice(n,1);return M}},M.once=function(e,t){e=m(e);var n=function(){t(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),M.off(e,n)};return M.on(e,n),M},M.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,t){return e.attr("role",t),e},addLabel:function(e,t){return e.attr("aria-label",t),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){13===e.keyCode&&(t(e.target).is(M.params.nextButton)?(M.onClickNext(e),M.isEnd?M.a11y.notify(M.params.lastSlideMessage):M.a11y.notify(M.params.nextSlideMessage)):t(e.target).is(M.params.prevButton)&&(M.onClickPrev(e),M.isBeginning?M.a11y.notify(M.params.firstSlideMessage):M.a11y.notify(M.params.prevSlideMessage)),t(e.target).is("."+M.params.bulletClass)&&t(e.target)[0].click())},liveRegion:t('<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var t=M.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},init:function(){if(M.params.nextButton){var e=t(M.params.nextButton);M.a11y.makeFocusable(e),M.a11y.addRole(e,"button"),M.a11y.addLabel(e,M.params.nextSlideMessage)}if(M.params.prevButton){var n=t(M.params.prevButton);M.a11y.makeFocusable(n),M.a11y.addRole(n,"button"),M.a11y.addLabel(n,M.params.prevSlideMessage)}t(M.container).append(M.a11y.liveRegion)},initPagination:function(){M.params.pagination&&M.params.paginationClickable&&M.bullets&&M.bullets.length&&M.bullets.each((function(){var e=t(this);M.a11y.makeFocusable(e),M.a11y.addRole(e,"button"),M.a11y.addLabel(e,M.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))}))},destroy:function(){M.a11y.liveRegion&&M.a11y.liveRegion.length>0&&M.a11y.liveRegion.remove()}},M.init=function(){M.params.loop&&M.createLoop(),M.updateContainerSize(),M.updateSlidesSize(),M.updatePagination(),M.params.scrollbar&&M.scrollbar&&(M.scrollbar.set(),M.params.scrollbarDraggable&&M.scrollbar.enableDraggable()),"slide"!==M.params.effect&&M.effects[M.params.effect]&&(M.params.loop||M.updateProgress(),M.effects[M.params.effect].setTranslate()),M.params.loop?M.slideTo(M.params.initialSlide+M.loopedSlides,0,M.params.runCallbacksOnInit):(M.slideTo(M.params.initialSlide,0,M.params.runCallbacksOnInit),0===M.params.initialSlide&&(M.parallax&&M.params.parallax&&M.parallax.setTranslate(),M.lazy&&M.params.lazyLoading&&(M.lazy.load(),M.lazy.initialImageLoaded=!0))),M.attachEvents(),M.params.observer&&M.support.observer&&M.initObservers(),M.params.preloadImages&&!M.params.lazyLoading&&M.preloadImages(),M.params.autoplay&&M.startAutoplay(),M.params.keyboardControl&&M.enableKeyboardControl&&M.enableKeyboardControl(),M.params.mousewheelControl&&M.enableMousewheelControl&&M.enableMousewheelControl(),M.params.hashnav&&M.hashnav&&M.hashnav.init(),M.params.a11y&&M.a11y&&M.a11y.init(),M.emit("onInit",M)},M.cleanupStyles=function(){M.container.removeClass(M.classNames.join(" ")).removeAttr("style"),M.wrapper.removeAttr("style"),M.slides&&M.slides.length&&M.slides.removeClass([M.params.slideVisibleClass,M.params.slideActiveClass,M.params.slideNextClass,M.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),M.paginationContainer&&M.paginationContainer.length&&M.paginationContainer.removeClass(M.params.paginationHiddenClass),M.bullets&&M.bullets.length&&M.bullets.removeClass(M.params.bulletActiveClass),M.params.prevButton&&t(M.params.prevButton).removeClass(M.params.buttonDisabledClass),M.params.nextButton&&t(M.params.nextButton).removeClass(M.params.buttonDisabledClass),M.params.scrollbar&&M.scrollbar&&(M.scrollbar.track&&M.scrollbar.track.length&&M.scrollbar.track.removeAttr("style"),M.scrollbar.drag&&M.scrollbar.drag.length&&M.scrollbar.drag.removeAttr("style"))},M.destroy=function(e,t){M.detachEvents(),M.stopAutoplay(),M.params.scrollbar&&M.scrollbar&&M.params.scrollbarDraggable&&M.scrollbar.disableDraggable(),M.params.loop&&M.destroyLoop(),t&&M.cleanupStyles(),M.disconnectObservers(),M.params.keyboardControl&&M.disableKeyboardControl&&M.disableKeyboardControl(),M.params.mousewheelControl&&M.disableMousewheelControl&&M.disableMousewheelControl(),M.params.a11y&&M.a11y&&M.a11y.destroy(),M.emit("onDestroy"),!1!==e&&(M=null)},M.init(),M}};r.prototype={isSafari:function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1},device:function(){var e=navigator.userAgent,t=e.match(/(Android);?[\s\/]+([\d.]+)?/),n=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),i=!n&&e.match(/(iPhone\sOS)\s([\d_]+)/);return{ios:n||i||r,android:t}}(),support:{touch:window.Modernizr&&!0===Modernizr.touch||!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch),transforms3d:window.Modernizr&&!0===Modernizr.csstransforms3d||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),n=0;n<t.length;n++)if(t[n]in e)return!0}(),observer:"MutationObserver"in window||"WebkitMutationObserver"in window},plugins:{}};for(var i=function(){var e=function(e){var t=0;for(t=0;t<e.length;t++)this[t]=e[t];return this.length=e.length,this},t=function(t,n){var r=[],i=0;if(t&&!n&&t instanceof e)return t;if(t)if("string"==typeof t){var o,a,s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var l="div";for(0===s.indexOf("<li")&&(l="ul"),0===s.indexOf("<tr")&&(l="tbody"),(0===s.indexOf("<td")||0===s.indexOf("<th"))&&(l="tr"),0===s.indexOf("<tbody")&&(l="table"),0===s.indexOf("<option")&&(l="select"),(a=document.createElement(l)).innerHTML=t,i=0;i<a.childNodes.length;i++)r.push(a.childNodes[i])}else for(o=n||"#"!==t[0]||t.match(/[ .<>:~]/)?(n||document).querySelectorAll(t):[document.getElementById(t.split("#")[1])],i=0;i<o.length;i++)o[i]&&r.push(o[i])}else if(t.nodeType||t===window||t===document)r.push(t);else if(t.length>0&&t[0].nodeType)for(i=0;i<t.length;i++)r.push(t[i]);return new e(r)};return e.prototype={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),n=0;n<t.length;n++)for(var r=0;r<this.length;r++)this[r].classList.add(t[n]);return this},removeClass:function(e){for(var t=e.split(" "),n=0;n<t.length;n++)for(var r=0;r<this.length;r++)this[r].classList.remove(t[n]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),n=0;n<t.length;n++)for(var r=0;r<this.length;r++)this[r].classList.toggle(t[n]);return this},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n++)if(2===arguments.length)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this},removeAttr:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute(e);return this},data:function(e,t){if(void 0!==t){for(var n=0;n<this.length;n++){var r=this[n];r.dom7ElementDataStorage||(r.dom7ElementDataStorage={}),r.dom7ElementDataStorage[e]=t}return this}if(this[0])return this[0].getAttribute("data-"+e)||(this[0].dom7ElementDataStorage&&e in this[0].dom7ElementDataStorage?this[0].dom7ElementDataStorage[e]:void 0)},transform:function(e){for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransform=n.MsTransform=n.msTransform=n.MozTransform=n.OTransform=n.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransitionDuration=n.MsTransitionDuration=n.msTransitionDuration=n.MozTransitionDuration=n.OTransitionDuration=n.transitionDuration=e}return this},on:function(e,n,r,i){function o(e){var i=e.target;if(t(i).is(n))r.call(i,e);else for(var o=t(i).parents(),a=0;a<o.length;a++)t(o[a]).is(n)&&r.call(o[a],e)}var a,s,l=e.split(" ");for(a=0;a<this.length;a++)if("function"==typeof n||!1===n)for("function"==typeof n&&(r=arguments[1],i=arguments[2]||!1),s=0;s<l.length;s++)this[a].addEventListener(l[s],r,i);else for(s=0;s<l.length;s++)this[a].dom7LiveListeners||(this[a].dom7LiveListeners=[]),this[a].dom7LiveListeners.push({listener:r,liveListener:o}),this[a].addEventListener(l[s],o,i);return this},off:function(e,t,n,r){for(var i=e.split(" "),o=0;o<i.length;o++)for(var a=0;a<this.length;a++)if("function"==typeof t||!1===t)"function"==typeof t&&(n=arguments[1],r=arguments[2]||!1),this[a].removeEventListener(i[o],n,r);else if(this[a].dom7LiveListeners)for(var s=0;s<this[a].dom7LiveListeners.length;s++)this[a].dom7LiveListeners[s].listener===n&&this[a].removeEventListener(i[o],this[a].dom7LiveListeners[s].liveListener,r);return this},once:function(e,t,n,r){function i(a){n(a),o.off(e,t,i,r)}var o=this;"function"==typeof t&&(t=!1,n=arguments[1],r=arguments[2]),o.on(e,t,i,r)},trigger:function(e,t){for(var n=0;n<this.length;n++){var r;try{r=new window.CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(n){(r=document.createEvent("Event")).initEvent(e,!0,!0),r.detail=t}this[n].dispatchEvent(r)}return this},transitionEnd:function(e){function t(o){if(o.target===this)for(e.call(this,o),n=0;n<r.length;n++)i.off(r[n],t)}var n,r=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(n=0;n<r.length;n++)i.on(r[n],t);return this},width:function(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),n=document.body,r=e.clientTop||n.clientTop||0,i=e.clientLeft||n.clientLeft||0,o=window.pageYOffset||e.scrollTop,a=window.pageXOffset||e.scrollLeft;return{top:t.top+o-r,left:t.left+a-i}}return null},css:function(e,t){var n;if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n++)for(var r in e)this[n].style[r]=e[r];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n++)this[n].style[e]=t;return this}return this},each:function(e){for(var t=0;t<this.length;t++)e.call(this[t],t,this[t]);return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t++)this[t].innerHTML=e;return this},is:function(n){if(!this[0])return!1;var r,i;if("string"==typeof n){var o=this[0];if(o===document)return n===document;if(o===window)return n===window;if(o.matches)return o.matches(n);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector)return o.mozMatchesSelector(n);if(o.msMatchesSelector)return o.msMatchesSelector(n);for(r=t(n),i=0;i<r.length;i++)if(r[i]===this[0])return!0;return!1}if(n===document)return this[0]===document;if(n===window)return this[0]===window;if(n.nodeType||n instanceof e){for(r=n.nodeType?[n]:n,i=0;i<r.length;i++)if(r[i]===this[0])return!0;return!1}return!1},index:function(){if(this[0]){for(var e=this[0],t=0;null!==(e=e.previousSibling);)1===e.nodeType&&t++;return t}},eq:function(t){if(void 0===t)return this;var n,r=this.length;return new e(t>r-1?[]:0>t?0>(n=r+t)?[]:[this[n]]:[this[t]])},append:function(t){var n,r;for(n=0;n<this.length;n++)if("string"==typeof t){var i=document.createElement("div");for(i.innerHTML=t;i.firstChild;)this[n].appendChild(i.firstChild)}else if(t instanceof e)for(r=0;r<t.length;r++)this[n].appendChild(t[r]);else this[n].appendChild(t);return this},prepend:function(t){var n,r;for(n=0;n<this.length;n++)if("string"==typeof t){var i=document.createElement("div");for(i.innerHTML=t,r=i.childNodes.length-1;r>=0;r--)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(t instanceof e)for(r=0;r<t.length;r++)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},insertBefore:function(e){for(var n=t(e),r=0;r<this.length;r++)if(1===n.length)n[0].parentNode.insertBefore(this[r],n[0]);else if(n.length>1)for(var i=0;i<n.length;i++)n[i].parentNode.insertBefore(this[r].cloneNode(!0),n[i])},insertAfter:function(e){for(var n=t(e),r=0;r<this.length;r++)if(1===n.length)n[0].parentNode.insertBefore(this[r],n[0].nextSibling);else if(n.length>1)for(var i=0;i<n.length;i++)n[i].parentNode.insertBefore(this[r].cloneNode(!0),n[i].nextSibling)},next:function(n){return new e(this.length>0?n?this[0].nextElementSibling&&t(this[0].nextElementSibling).is(n)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(n){var r=[],i=this[0];if(!i)return new e([]);for(;i.nextElementSibling;){var o=i.nextElementSibling;n?t(o).is(n)&&r.push(o):r.push(o),i=o}return new e(r)},prev:function(n){return new e(this.length>0?n?this[0].previousElementSibling&&t(this[0].previousElementSibling).is(n)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(n){var r=[],i=this[0];if(!i)return new e([]);for(;i.previousElementSibling;){var o=i.previousElementSibling;n?t(o).is(n)&&r.push(o):r.push(o),i=o}return new e(r)},parent:function(e){for(var n=[],r=0;r<this.length;r++)e?t(this[r].parentNode).is(e)&&n.push(this[r].parentNode):n.push(this[r].parentNode);return t(t.unique(n))},parents:function(e){for(var n=[],r=0;r<this.length;r++)for(var i=this[r].parentNode;i;)e?t(i).is(e)&&n.push(i):n.push(i),i=i.parentNode;return t(t.unique(n))},find:function(t){for(var n=[],r=0;r<this.length;r++)for(var i=this[r].querySelectorAll(t),o=0;o<i.length;o++)n.push(i[o]);return new e(n)},children:function(n){for(var r=[],i=0;i<this.length;i++)for(var o=this[i].childNodes,a=0;a<o.length;a++)n?1===o[a].nodeType&&t(o[a]).is(n)&&r.push(o[a]):1===o[a].nodeType&&r.push(o[a]);return new e(t.unique(r))},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){var e,n,r=this;for(e=0;e<arguments.length;e++){var i=t(arguments[e]);for(n=0;n<i.length;n++)r[r.length]=i[n],r.length++}return r}},t.fn=e.prototype,t.unique=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t},t}(),o=["jQuery","Zepto","Dom7"],a=0;a<o.length;a++)window[o[a]]&&e(window[o[a]]);(n=void 0===i?window.Dom7||window.Zepto||window.jQuery:i)&&("transitionEnd"in n.fn||(n.fn.transitionEnd=function(e){function t(o){if(o.target===this)for(e.call(this,o),n=0;n<r.length;n++)i.off(r[n],t)}var n,r=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(n=0;n<r.length;n++)i.on(r[n],t);return this}),"transform"in n.fn||(n.fn.transform=function(e){for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransform=n.MsTransform=n.msTransform=n.MozTransform=n.OTransform=n.transform=e}return this}),"transition"in n.fn||(n.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransitionDuration=n.MsTransitionDuration=n.msTransitionDuration=n.MozTransitionDuration=n.OTransitionDuration=n.transitionDuration=e}return this})),ionic.views.Swiper=r}(),function(e){"use strict";e.views.Toggle=e.views.View.inherit({initialize:function(t){var n=this;this.el=t.el,this.checkbox=t.checkbox,this.track=t.track,this.handle=t.handle,this.openPercent=-1,this.onChange=t.onChange||function(){},this.triggerThreshold=t.triggerThreshold||20,this.dragStartHandler=function(e){n.dragStart(e)},this.dragHandler=function(e){n.drag(e)},this.holdHandler=function(e){n.hold(e)},this.releaseHandler=function(e){n.release(e)},this.dragStartGesture=e.onGesture("dragstart",this.dragStartHandler,this.el),this.dragGesture=e.onGesture("drag",this.dragHandler,this.el),this.dragHoldGesture=e.onGesture("hold",this.holdHandler,this.el),this.dragReleaseGesture=e.onGesture("release",this.releaseHandler,this.el)},destroy:function(){e.offGesture(this.dragStartGesture,"dragstart",this.dragStartGesture),e.offGesture(this.dragGesture,"drag",this.dragGesture),e.offGesture(this.dragHoldGesture,"hold",this.holdHandler),e.offGesture(this.dragReleaseGesture,"release",this.releaseHandler)},tap:function(){"disabled"!==this.el.getAttribute("disabled")&&this.val(!this.checkbox.checked)},dragStart:function(e){this.checkbox.disabled||(this._dragInfo={width:this.el.offsetWidth,left:this.el.offsetLeft,right:this.el.offsetLeft+this.el.offsetWidth,triggerX:this.el.offsetWidth/2,initialState:this.checkbox.checked},e.gesture.srcEvent.preventDefault(),this.hold(e))},drag:function(t){var n=this;this._dragInfo&&(t.gesture.srcEvent.preventDefault(),e.requestAnimationFrame((function(){if(n._dragInfo){var e=t.gesture.touches[0].pageX-n._dragInfo.left,r=n._dragInfo.width-n.triggerThreshold;n._dragInfo.initialState?e<n.triggerThreshold?n.setOpenPercent(0):e>n._dragInfo.triggerX&&n.setOpenPercent(100):e<n._dragInfo.triggerX?n.setOpenPercent(0):e>r&&n.setOpenPercent(100)}})))},endDrag:function(){this._dragInfo=null},hold:function(){this.el.classList.add("dragging")},release:function(e){this.el.classList.remove("dragging"),this.endDrag(e)},setOpenPercent:function(t){if(this.openPercent<0||t<this.openPercent-3||t>this.openPercent+3)if(this.openPercent=t,0===t)this.val(!1);else if(100===t)this.val(!0);else{var n=Math.round(t/100*this.track.offsetWidth-this.handle.offsetWidth);n=1>n?0:n,this.handle.style[e.CSS.TRANSFORM]="translate3d("+n+"px,0,0)"}},val:function(t){return(!0===t||!1===t)&&(""!==this.handle.style[e.CSS.TRANSFORM]&&(this.handle.style[e.CSS.TRANSFORM]=""),this.checkbox.checked=t,this.openPercent=t?100:0,this.onChange&&this.onChange()),this.checkbox.checked}})}(ionic)}(),function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,r=arguments[0];for(n="["+(e?e+":":"")+r+"] http://errors.angularjs.org/1.5.11/"+(e?e+"/":"")+r,r=1;r<arguments.length;r++){n=n+(1==r?"?":"&")+"p"+(r-1)+"=";var i,o=encodeURIComponent;n+=o(i="function"==typeof(i=arguments[r])?i.toString().replace(/ \{[\s\S]*$/,""):void 0===i?"undefined":"string"!=typeof i?JSON.stringify(i):i)}return new t(n)}}function n(e){if(null==e||k(e))return!1;if(Wn(e)||y(e)||Dn&&e instanceof Dn)return!0;var t="length"in Object(e)&&e.length;return b(t)&&(0<=t&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function r(e,t,i){var o,a;if(e)if(L(e))for(o in e)"prototype"===o||"length"===o||"name"===o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(i,e[o],o,e);else if(Wn(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(i,e[o],o,e)}else if(e.forEach&&e.forEach!==r)e.forEach(t,i,e);else if(_(e))for(o in e)t.call(i,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e);else for(o in e)Pn.call(e,o)&&t.call(i,e[o],o,e);return e}function i(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function o(e){return function(t,n){e(n,t)}}function a(){return++Fn}function s(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(v(a)||L(a))for(var l=Object.keys(a),u=0,c=l.length;u<c;u++){var d=l[u],h=a[d];n&&v(h)?w(h)?e[d]=new Date(h.valueOf()):M(h)?e[d]=new RegExp(h):h.nodeName?e[d]=h.cloneNode(!0):T(h)?e[d]=h.clone():(v(e[d])||(e[d]=Wn(h)?[]:{}),s(e[d],[h],!0)):e[d]=h}}return r?e.$$hashKey=r:delete e.$$hashKey,e}function l(e){return s(e,In.call(arguments,1),!1)}function u(e){return parseInt(e,10)}function c(e,t){return l(Object.create(e),t)}function d(){}function h(e){return e}function f(e){return function(){return e}}function p(e){return L(e.toString)&&e.toString!==Hn}function m(e){return void 0===e}function g(e){return void 0!==e}function v(e){return null!==e&&"object"==typeof e}function _(e){return null!==e&&"object"==typeof e&&!Nn(e)}function y(e){return"string"==typeof e}function b(e){return"number"==typeof e}function w(e){return"[object Date]"===Hn.call(e)}function L(e){return"function"==typeof e}function M(e){return"[object RegExp]"===Hn.call(e)}function k(e){return e&&e.window===e}function x(e){return e&&e.$evalAsync&&e.$watch}function S(e){return"boolean"==typeof e}function T(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function $(e){return Yn(e.nodeName||e[0]&&e[0].nodeName)}function D(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),n}function C(e,t){function n(e,t){var n,r=t.$$hashKey;if(Wn(e)){n=0;for(var o=e.length;n<o;n++)t.push(i(e[n]))}else if(_(e))for(n in e)t[n]=i(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));else for(n in e)Pn.call(e,n)&&(t[n]=i(e[n]));return r?t.$$hashKey=r:delete t.$$hashKey,t}function i(e){if(!v(e))return e;if(-1!==(t=a.indexOf(e)))return s[t];if(k(e)||x(e))throw Rn("cpws");var t=!1,r=o(e);return void 0===r&&(r=Wn(e)?[]:Object.create(Nn(e)),t=!0),a.push(e),s.push(r),t?n(e,r):r}function o(e){switch(Hn.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),e.byteOffset,e.length);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]":return(t=new RegExp(e.source,e.toString().match(/[^/]*$/)[0])).lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(L(e.cloneNode))return e.cloneNode(!0)}var a=[],s=[];if(t){if(function(e){return e&&b(e.length)&&Un.test(Hn.call(e))}(t)||"[object ArrayBuffer]"===Hn.call(t))throw Rn("cpta");if(e===t)throw Rn("cpi");return Wn(t)?t.length=0:r(t,(function(e,n){"$$hashKey"!==n&&delete t[n]})),a.push(e),s.push(t),n(e,t)}return i(e)}function E(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r=typeof e;if(r===typeof t&&"object"===r){if(!Wn(e)){if(w(e))return!!w(t)&&E(e.getTime(),t.getTime());if(M(e))return!!M(t)&&e.toString()===t.toString();if(x(e)||x(t)||k(e)||k(t)||Wn(t)||w(t)||M(t))return!1;for(n in r=K(),e)if("$"!==n.charAt(0)&&!L(e[n])){if(!E(e[n],t[n]))return!1;r[n]=!0}for(n in t)if(!(n in r)&&"$"!==n.charAt(0)&&g(t[n])&&!L(t[n]))return!1;return!0}if(!Wn(t))return!1;if((r=e.length)===t.length){for(n=0;n<r;n++)if(!E(e[n],t[n]))return!1;return!0}}return!1}function A(e,t,n){return e.concat(In.call(t,n))}function P(e,t){var n=2<arguments.length?In.call(arguments,2):[];return!L(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,A(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function Y(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:k(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":x(n)&&(r="$SCOPE"),r}function O(e,t){if(!m(e))return b(t)||(t=t?2:null),JSON.stringify(e,Y,t)}function I(e){return y(e)?JSON.parse(e):e}function j(e,t){e=e.replace(Xn,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return Vn(n)?t:n}function B(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset();return n*=(t=j(t,r))-r,(e=new Date(e.getTime())).setMinutes(e.getMinutes()+n),e}function H(e){e=Dn(e).clone();try{e.empty()}catch(e){}var t=Dn("<div>").append(e).html();try{return e[0].nodeType===nr?Yn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,(function(e,t){return"<"+Yn(t)}))}catch(e){return Yn(t)}}function N(e){try{return decodeURIComponent(e)}catch(e){}}function R(e){var t={};return r((e||"").split("&"),(function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),-1!==(n=e.indexOf("="))&&(r=e.substring(0,n),i=e.substring(n+1)),g(r=N(r))&&(i=!g(i)||N(i),Pn.call(t,r)?Wn(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))})),t}function z(e){var t=[];return r(e,(function(e,n){Wn(e)?r(e,(function(e){t.push(V(n,!0)+(!0===e?"":"="+V(e,!0)))})):t.push(V(n,!0)+(!0===e?"":"="+V(e,!0)))})),t.length?t.join("&"):""}function F(e){return V(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function V(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 W(t,n,i){v(i)||(i={}),i=l({strictDi:!1},i);var o=function(){if((t=Dn(t)).injector()){var r=t[0]===e.document?"document":H(t);throw Rn("btstrpd",r.replace(/</,"&lt;").replace(/>/,"&gt;"))}return(n=n||[]).unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng"),(r=Se(n,i.strictDi)).invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply((function(){t.data("$injector",r),n(t)(e)}))}]),r},a=/^NG_ENABLE_DEBUG_INFO!/,s=/^NG_DEFER_BOOTSTRAP!/;if(e&&a.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(a,"")),e&&!s.test(e.name))return o();e.name=e.name.replace(s,""),zn.resumeBootstrap=function(e){return r(e,(function(e){n.push(e)})),o()},L(zn.resumeDeferredBootstrap)&&zn.resumeDeferredBootstrap()}function U(e,t){return t=t||"_",e.replace(er,(function(e,n){return(n?t:"")+e.toLowerCase()}))}function q(e,t,n){if(!e)throw Rn("areq",t||"?",n||"required");return e}function G(e,t,n){return n&&Wn(e)&&(e=e[e.length-1]),q(L(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function Z(e,t){if("hasOwnProperty"===e)throw Rn("badname",t)}function J(e,t,n){if(!t)return e;for(var r,i=e,o=(t=t.split(".")).length,a=0;a<o;a++)r=t[a],e&&(e=(i=e)[r]);return!n&&L(e)?P(i,e):e}function X(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Dn(In.call(e,0,i))),t.push(n));return t||e}function K(){return Object.create(null)}function Q(e,t){if(Wn(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(v(e))for(n in t=t||{},e)"$"===n.charAt(0)&&"$"===n.charAt(1)||(t[n]=e[n]);return t||e}function ee(e){return e.replace(or,(function(e,t,n,r){return r?n.toUpperCase():n})).replace(ar,"Moz$1")}function te(e){return 1===(e=e.nodeType)||!e||9===e}function ne(e,t){var n,i,o=t.createDocumentFragment(),a=[];if(cr.test(e)){for(n=o.appendChild(t.createElement("div")),i=(dr.exec(e)||["",""])[1].toLowerCase(),i=fr[i]||fr._default,n.innerHTML=i[1]+e.replace(hr,"<$1></$2>")+i[2],i=i[0];i--;)n=n.lastChild;a=A(a,n.childNodes),(n=o.firstChild).textContent=""}else a.push(t.createTextNode(e));return o.textContent="",o.innerHTML="",r(a,(function(e){o.appendChild(e)})),o}function re(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function ie(t){if(t instanceof ie)return t;var n,r;if(y(t)&&(t=qn(t),n=!0),!(this instanceof ie)){if(n&&"<"!==t.charAt(0))throw lr("nosel");return new ie(t)}n&&(n=e.document,t=(r=ur.exec(t))?[n.createElement(r[1])]:(r=ne(t,n))?r.childNodes:[]),pe(this,t)}function oe(e){return e.cloneNode(!0)}function ae(e,t){if(t||le(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)le(n[r])}function se(e,t,n,i){if(g(i))throw lr("offargs");var o=(i=ue(e))&&i.events,a=i&&i.handle;if(a)if(t){var s=function(t){var r=o[t];g(n)&&D(r||[],n),g(n)&&r&&0<r.length||(e.removeEventListener(t,a,!1),delete o[t])};r(t.split(" "),(function(e){s(e),sr[e]&&s(sr[e])}))}else for(t in o)"$destroy"!==t&&e.removeEventListener(t,a,!1),delete o[t]}function le(e,t){var n=e.ng339,r=n&&rr[n];r&&(t?delete r.data[t]:(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),se(e)),delete rr[n],e.ng339=void 0))}function ue(e,t){var n=(n=e.ng339)&&rr[n];return t&&!n&&(e.ng339=n=++ir,n=rr[n]={events:{},data:{},handle:void 0}),n}function ce(e,t,n){if(te(e)){var r=g(n),i=!r&&t&&!v(t),o=!t;if(e=(e=ue(e,!i))&&e.data,r)e[t]=n;else{if(o)return e;if(i)return e&&e[t];l(e,t)}}}function de(e,t){return!!e.getAttribute&&-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")}function he(e,t){t&&e.setAttribute&&r(t.split(" "),(function(t){e.setAttribute("class",qn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+qn(t)+" "," ")))}))}function fe(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),(function(e){e=qn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")})),e.setAttribute("class",qn(n))}}function pe(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function me(e,t){return ge(e,"$"+(t||"ngController")+"Controller")}function ge(e,t,n){for(9===e.nodeType&&(e=e.documentElement),t=Wn(t)?t:[t];e;){for(var r=0,i=t.length;r<i;r++)if(g(n=Dn.data(e,t[r])))return n;e=e.parentNode||11===e.nodeType&&e.host}}function ve(e){for(ae(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function _e(e,t){t||ae(e);var n=e.parentNode;n&&n.removeChild(e)}function ye(e,t){var n=gr[t.toLowerCase()];return n&&vr[$(e)]&&n}function be(e,t,n){n.call(e,t)}function we(e,t,n){var r=t.relatedTarget;r&&(r===e||pr.call(e,r))||n.call(e,t)}function Le(){this.$get=function(){return l(ie,{hasClass:function(e,t){return e.attr&&(e=e[0]),de(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),fe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),he(e,t)}})}}function Me(e,t){var n=e&&e.$$hashKey;return n?("function"==typeof n&&(n=e.$$hashKey()),n):"function"==(n=typeof e)||"object"===n&&null!==e?e.$$hashKey=n+":"+(t||a)():n+":"+e}function ke(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function xe(e){return(e=(Function.prototype.toString.call(e)+" ").replace(kr,"")).match(br)||e.match(wr)}function Se(e,t){function n(e){return function(t,n){if(!v(t))return e(t,n);r(t,o(e))}}function i(e,t){if(Z(e,"service"),(L(t)||Wn(t))&&(t=p.instantiate(t)),!t.$get)throw xr("pget",e);return h[e+"Provider"]=t}function a(e,t){return function(){var n=b.invoke(t,this);if(m(n))throw xr("undef",e);return n}}function s(e,t,n){return i(e,{$get:!1!==n?a(e,t):t})}function l(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===u)throw xr("cdep",t+" <- "+c.join(" <- "));return e[t]}try{return c.unshift(t),e[t]=u,e[t]=n(t,r),e[t]}catch(n){throw e[t]===u&&delete e[t],n}finally{c.shift()}}function i(e,n,i){for(var o=[],a=0,s=(e=Se.$$annotate(e,t,i)).length;a<s;a++){var l=e[a];if("string"!=typeof l)throw xr("itkn",l);o.push(n&&n.hasOwnProperty(l)?n[l]:r(l,i))}return o}return{invoke:function(e,t,n,r){return"string"==typeof n&&(r=n,n=null),n=i(e,n,r),Wn(e)&&(e=e[e.length-1]),(r=!(11>=$n)&&"function"==typeof e&&/^(?:class\b|constructor\()/.test(Function.prototype.toString.call(e)+" "))?(n.unshift(null),new(Function.prototype.bind.apply(e,n))):e.apply(t,n)},instantiate:function(e,t,n){var r=Wn(e)?e[e.length-1]:e;return(e=i(e,t,n)).unshift(null),new(Function.prototype.bind.apply(r,e))},get:r,annotate:Se.$$annotate,
-has:function(t){return h.hasOwnProperty(t+"Provider")||e.hasOwnProperty(t)}}}t=!0===t;var u={},c=[],d=new ke([],!0),h={$provide:{provider:n(i),factory:n(s),service:n((function(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])})),value:n((function(e,t){return s(e,f(t),!1)})),constant:n((function(e,t){Z(e,"constant"),h[e]=t,g[e]=t})),decorator:function(e,t){var n=p.get(e+"Provider"),r=n.$get;n.$get=function(){var e=b.invoke(r,n);return b.invoke(t,null,{$delegate:e})}}}},p=h.$injector=l(h,(function(e,t){throw zn.isString(t)&&c.push(t),xr("unpr",c.join(" <- "))})),g={},_=l(g,(function(e,t){var n=p.get(e+"Provider",t);return b.invoke(n.$get,n,void 0,e)})),b=_;h.$injectorProvider={$get:f(_)};var w=function e(t){q(m(t)||Wn(t),"modulesToLoad","not an array");var n,i=[];return r(t,(function(t){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=p.get(r[0]);i[r[1]].apply(i,r[2])}}if(!d.get(t)){d.put(t,!0);try{y(t)?(n=En(t),i=i.concat(e(n.requires)).concat(n._runBlocks),r(n._invokeQueue),r(n._configBlocks)):L(t)?i.push(p.invoke(t)):Wn(t)?i.push(p.invoke(t)):G(t,"module")}catch(e){throw Wn(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),xr("modulerr",t,e.stack||e.message||e)}}})),i}(e);return(b=_.get("$injector")).strictDi=t,r(w,(function(e){e&&b.invoke(e)})),b}function Te(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(n,r,i){function o(e){var t;e?(e.scrollIntoView(),L(t=a.yOffset)?t=t():T(t)?(t=t[0],t="fixed"!==n.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom):b(t)||(t=0),t&&(e=e.getBoundingClientRect().top,n.scrollBy(0,e-t))):n.scrollTo(0,0)}function a(e){var t;(e=y(e)?e:b(e)?e.toString():r.hash())?(t=s.getElementById(e))?o(t):(t=function(e){var t=null;return Array.prototype.some.call(e,(function(e){if("a"===$(e))return t=e,!0})),t}(s.getElementsByName(e)))?o(t):"top"===e&&o(null):o(null)}var s=n.document;return t&&i.$watch((function(){return r.hash()}),(function(t,n){t===n&&""===t||function(t,n){"complete"===(n=n||e).document.readyState?n.setTimeout(t):Dn(n).on("load",t)}((function(){i.$evalAsync(a)}))})),a}]}function $e(e,t){return e||t?e?t?(Wn(e)&&(e=e.join(" ")),Wn(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function De(e){return v(e)?e:{}}function Ce(e,t,n,i){function o(e){try{e.apply(null,In.call(arguments,1))}finally{if(0==--v)for(;_.length;)try{_.pop()()}catch(e){n.error(e)}}}function a(){M=null,s(),l()}function s(){E(y=m(y=k())?null:y,T)&&(y=T),T=y}function l(){w===u.url()&&b===y||(w=u.url(),b=y,r(x,(function(e){e(u.url(),y)})))}var u=this,c=e.location,h=e.history,f=e.setTimeout,p=e.clearTimeout,g={};u.isMock=!1;var v=0,_=[];u.$$completeOutstandingRequest=o,u.$$incOutstandingRequestCount=function(){v++},u.notifyWhenNoOutstandingRequests=function(e){0===v?e():_.push(e)};var y,b,w=c.href,L=t.find("base"),M=null,k=i.history?function(){try{return h.state}catch(e){}}:d;s(),b=y,u.url=function(t,n,r){if(m(r)&&(r=null),c!==e.location&&(c=e.location),h!==e.history&&(h=e.history),t){var o=b===r;if(w===t&&(!i.history||o))return u;var a=w&&ot(w)===ot(t);return w=t,b=r,!i.history||a&&o?(a||(M=t),n?c.replace(t):a?(n=c,r=-1===(r=t.indexOf("#"))?"":t.substr(r),n.hash=r):c.href=t,c.href!==t&&(M=t)):(h[n?"replaceState":"pushState"](r,"",t),s(),b=y),M&&(M=t),u}return M||c.href.replace(/%27/g,"'")},u.state=function(){return y};var x=[],S=!1,T=null;u.onUrlChange=function(t){return S||(i.history&&Dn(e).on("popstate",a),Dn(e).on("hashchange",a),S=!0),x.push(t),t},u.$$applicationDestroyed=function(){Dn(e).off("hashchange popstate",a)},u.$$checkUrlChange=l,u.baseHref=function(){var e=L.attr("href");return e?e.replace(/^(https?:)?\/\/[^/]*/,""):""},u.defer=function(e,t){var n;return v++,n=f((function(){delete g[n],o(e)}),t||0),g[n]=!0,n},u.defer.cancel=function(e){return!!g[e]&&(delete g[e],p(e),o(d),!0)}}function Ee(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Ce(e,r,t,n)}]}function Ae(){this.$get=function(){function e(e,r){function i(e){e!==h&&(f?f===e&&(f=e.n):f=e,o(e.n,e.p),o(e,h),(h=e).n=null)}function o(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid",e);var a=0,s=l({},r,{id:e}),u=K(),c=r&&r.capacity||Number.MAX_VALUE,d=K(),h=null,f=null;return n[e]={put:function(e,t){if(!m(t))return c<Number.MAX_VALUE&&i(d[e]||(d[e]={key:e})),e in u||a++,u[e]=t,a>c&&this.remove(f.key),t},get:function(e){if(c<Number.MAX_VALUE){var t=d[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=d[e];if(!t)return;t===h&&(h=t.p),t===f&&(f=t.n),o(t.n,t.p),delete d[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=K(),a=0,d=K(),h=f=null},destroy:function(){d=s=u=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,(function(t,n){e[n]=t.info()})),e},e.get=function(e){return n[e]},e}}function Pe(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function Ye(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/,o=K();return r(e,(function(e,r){if(e in M)o[r]=M[e];else{var a=e.match(i);if(!a)throw Pr("iscp",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(M[e]=o[r])}})),o}function a(e){var t=e.require||e.controller&&e.name;return!Wn(t)&&v(t)&&r(t,(function(e,n){var r=e.match(b);e.substring(r[0].length)||(t[n]=r[0]+n)})),t}var s={},u=/^\s*directive:\s*([\w-]+)\s+(.*)$/,p=/(([\w-]+)(?::([^;]+))?;?)/,_=function(e){var t,n={};for(e=e.split(","),t=0;t<e.length;t++)n[e[t]]=!0;return n}("ngSrc,ngSrcset,src,srcset"),b=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,w=/^(on[a-z]+|formaction)$/,M=K();this.directive=function e(n,i){return q(n,"name"),Z(n,"directive"),y(n)?(function(e){var t=e.charAt(0);if(!t||t!==Yn(t))throw Pr("baddir",e);if(e!==e.trim())throw Pr("baddir",e)}(n),q(i,"directiveFactory"),s.hasOwnProperty(n)||(s[n]=[],t.factory(n+"Directive",["$injector","$exceptionHandler",function(e,t){var i=[];return r(s[n],(function(r,o){try{var s=e.invoke(r);L(s)?s={compile:f(s)}:!s.compile&&s.link&&(s.compile=f(s.link)),s.priority=s.priority||0,s.index=o,s.name=s.name||n,s.require=a(s);var l=s,u=s.restrict;if(u&&(!y(u)||!/[EACM]/.test(u)))throw Pr("badrestrict",u,n);l.restrict=u||"EA",s.$$moduleName=r.$$moduleName,i.push(s)}catch(e){t(e)}})),i}])),s[n].push(i)):r(n,o(e)),this},this.component=function(e,t){function n(e){function n(t){return L(t)||Wn(t)?function(n,r){return e.invoke(t,this,{$element:n,$attrs:r})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:i,controllerAs:He(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return r(t,(function(e,t){"$"===t.charAt(0)&&(a[t]=e)})),a}var i=t.controller||function(){};return r(t,(function(e,t){"$"===t.charAt(0)&&(n[t]=e,L(i)&&(i[t]=e))})),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return g(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return g(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var k=!0;this.debugInfoEnabled=function(e){return g(e)?(k=e,this):k};var T=!0;this.preAssignBindingsEnabled=function(e){return g(e)?(T=e,this):T};var C=10;this.onChangesTtl=function(e){return arguments.length?(C=e,this):C};var A=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(A=e,this):A};var Y=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(Y=e,this):Y},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,o,a,f,M,O,I,j,B){function N(){try{if(!--xe)throw be=void 0,Pr("infchng",C);O.$apply((function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(t){e.push(t)}if(be=void 0,e.length)throw e}))}finally{xe++}}function R(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)this[i=o[n]]=t[i]}else this.$attr={};this.$$element=e}function z(e,t){try{e.addClass(t)}catch(e){}}function F(t,n,r,i,o){t instanceof Dn||(t=Dn(t));for(var a=/\S+/,s=0,l=t.length;s<l;s++){var u=t[s];u.nodeType===nr&&u.nodeValue.match(a)&&re(u,t[s]=e.document.createElement("span"))}var c=V(t,n,t,r,i,o);F.$$addScopeClass(t);var d=null;return function(e,n,r){q(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new());var i=(r=r||{}).parentBoundTranscludeFn,a=r.transcludeControllers;if(r=r.futureParentElement,i&&i.$$boundTransclude&&(i=i.$$boundTransclude),d||(d=(r=r&&r[0])&&"foreignobject"!==$(r)&&Hn.call(r).match(/SVG/)?"svg":"html"),r="html"!==d?Dn(fe(d,Dn("<div>").append(t).html())):n?mr.clone.call(t):t,a)for(var s in a)r.data("$"+s+"Controller",a[s].instance);return F.$$addScopeInfo(r,e),n&&n(r,e),c&&c(e,r,r,i),r}}function V(e,t,n,r,i,o){for(var a,s,l,u,c,d=[],h=0;h<e.length;h++)a=new R,(o=(s=G(e[h],[],a,0===h?r:void 0,i)).length?ee(s,e[h],a,t,n,null,[],[],o):null)&&o.scope&&F.$$addScopeClass(a.$$element),a=o&&o.terminal||!(l=e[h].childNodes)||!l.length?null:V(l,o?(o.transcludeOnThisElement||!o.templateOnThisElement)&&o.transclude:t),(o||a)&&(d.push(h,o,a),u=!0,c=c||o),o=null;return u?function(e,n,r,i){var o,a,s,l,u,h;if(c)for(h=Array(n.length),l=0;l<d.length;l+=3)h[o=d[l]]=n[o];else h=n;for(l=0,u=d.length;l<u;)a=h[d[l++]],n=d[l++],o=d[l++],n?(n.scope?(s=e.$new(),F.$$addScopeInfo(Dn(a),s)):s=e,n(o,s,a,r,n.transcludeOnThisElement?W(e,n.transclude,i):!n.templateOnThisElement&&i?i:!i&&t?W(e,t):null)):o&&o(e,a.childNodes,void 0,i)}:null}function W(e,t,n){function r(r,i,o,a,s){return r||((r=e.$new(!1,s)).$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var i,o=r.$$slots=K();for(i in t.$$slots)o[i]=t.$$slots[i]?W(e,t.$$slots[i],n):null;return r}function G(e,t,n,r,i){var o,a=n.$attr;switch(e.nodeType){case 1:ae(t,Ie(o=$(e)),"E",r,i);for(var s,l,u,c,d=e.attributes,h=0,f=d&&d.length;h<f;h++){var m=!1,g=!1;l=(s=d[h]).name,u=qn(s.value),s=Ie(l),(c=De.test(s))&&(l=l.replace(Or,"").substr(8).replace(/_(.)/g,(function(e,t){return t.toUpperCase()}))),(s=s.match(Ce))&&se(s[1])&&(m=l,g=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6)),a[s=Ie(l.toLowerCase())]=l,!c&&n.hasOwnProperty(s)||(n[s]=u,ye(e,s)&&(n[s]=!0)),pe(e,t,u,s,c),ae(t,s,"A",r,i,m,g)}if("input"===o&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!ke)break;if(v(a=e.className)&&(a=a.animVal),y(a)&&""!==a)for(;e=p.exec(a);)ae(t,s=Ie(e[2]),"C",r,i)&&(n[s]=qn(e[3])),a=a.substr(e.index+e[0].length);break;case nr:if(11===$n)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===nr;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);he(t,e.nodeValue);break;case 8:if(!Me)break;Z(e,t,n,r,i)}return t.sort(ce),t}function Z(e,t,n,r,i){try{var o=u.exec(e.nodeValue);if(o){var a=Ie(o[1]);ae(t,a,"M",r,i)&&(n[a]=qn(o[2]))}}catch(e){}}function J(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw Pr("uterdir",t,n);1===e.nodeType&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i);else r.push(e);return Dn(r)}function X(e,t,n){return function(r,i,o,a,s){return i=J(i[0],t,n),e(r,i,o,a,s)}}function Q(e,t,n,r,i,o){var a;return e?F(t,n,r,i,o):function(){return a||(a=F(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function ee(e,t,n,i,a,s,u,c,d){function h(e,t,n,r){e&&(n&&(e=X(e,n,r)),e.require=p.require,e.directiveName=g,(S===p||p.$$isolateScope)&&(e=ge(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=X(t,n,r)),t.require=p.require,t.directiveName=g,(S===p||p.$$isolateScope)&&(t=ge(t,{isolateScope:!0})),c.push(t))}function f(e,i,a,s,d){var h,f,p,g,_,y,b,w;for(h in t===a?(s=n,w=n.$$element):s=new R(w=Dn(a),n),_=i,S?g=i.$new(!0):M&&(_=i.$parent),d&&((b=function(e,t,n,r){var i;if(x(e)||(r=n,n=t,t=e,e=void 0),Y&&(i=y),n||(n=Y?w.parent():w),!r)return d(e,t,i,n,E);var o=d.$$slots[r];if(o)return o(e,t,i,n,E);if(m(o))throw Pr("noslot",r,H(w))}).$$boundTransclude=d,b.isSlotFilled=function(e){return!!d.$$slots[e]}),k&&(y=ne(w,s,b,k,g,i,S)),S&&(F.$$addScopeInfo(w,g,!0,!(D&&(D===S||D===S.$$originalDirective))),F.$$addScopeClass(w,!0),g.$$isolateBindings=S.$$isolateBindings,(f=_e(i,s,g,g.$$isolateBindings,S)).removeWatches&&g.$on("$destroy",f.removeWatches)),y){f=k[h],p=y[h];var $=f.$$bindings.bindToController;if(T){p.bindingInfo=$?_e(_,s,p.instance,$,f):{};var C=p();C!==p.instance&&(p.instance=C,w.data("$"+f.name+"Controller",C),p.bindingInfo.removeWatches&&p.bindingInfo.removeWatches(),p.bindingInfo=_e(_,s,p.instance,$,f))}else p.instance=p(),w.data("$"+f.name+"Controller",p.instance),p.bindingInfo=_e(_,s,p.instance,$,f)}for(r(k,(function(e,t){var n=e.require;e.bindToController&&!Wn(n)&&v(n)&&l(y[t].instance,te(t,n,w,y))})),r(y,(function(e){var t=e.instance;if(L(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(e){o(e)}if(L(t.$onInit))try{t.$onInit()}catch(e){o(e)}L(t.$doCheck)&&(_.$watch((function(){t.$doCheck()})),t.$doCheck()),L(t.$onDestroy)&&_.$on("$destroy",(function(){t.$onDestroy()}))})),h=0,f=u.length;h<f;h++)ve(p=u[h],p.isolateScope?g:i,w,s,p.require&&te(p.directiveName,p.require,w,y),b);var E=i;for(S&&(S.template||null===S.templateUrl)&&(E=g),e&&e(E,a.childNodes,void 0,d),h=c.length-1;0<=h;h--)ve(p=c[h],p.isolateScope?g:i,w,s,p.require&&te(p.directiveName,p.require,w,y),b);r(y,(function(e){L((e=e.instance).$postLink)&&e.$postLink()}))}d=d||{};for(var p,g,_,y,b,w=-Number.MAX_VALUE,M=d.newScopeDirective,k=d.controllerDirectives,S=d.newIsolateScopeDirective,D=d.templateDirective,C=d.nonTlbTranscludeDirective,E=!1,A=!1,Y=d.hasElementTranscludeDirective,O=n.$$element=Dn(t),I=i,j=!1,B=!1,N=0,z=e.length;N<z;N++){var V=(p=e[N]).$$start,W=p.$$end;if(V&&(O=J(t,V,W)),_=void 0,w>p.priority)break;if((b=p.scope)&&(p.templateUrl||(v(b)?(de("new/isolated scope",S||M,p,O),S=p):de("new/isolated scope",S,p,O)),M=M||p),g=p.name,!j&&(p.replace&&(p.templateUrl||p.template)||p.transclude&&!p.$$tlb)){for(b=N+1;j=e[b++];)if(j.transclude&&!j.$$tlb||j.replace&&(j.templateUrl||j.template)){B=!0;break}j=!0}if(!p.templateUrl&&p.controller&&(k=k||K(),de("'"+g+"' controller",k[g],p,O),k[g]=p),b=p.transclude)if(E=!0,p.$$tlb||(de("transclusion",C,p,O),C=p),"element"===b)Y=!0,w=p.priority,_=O,O=n.$$element=Dn(F.$$createComment(g,n[g])),t=O[0],me(a,In.call(_,0),t),_[0].$$parentNode=_[0].parentNode,I=Q(B,_,i,w,s&&s.name,{nonTlbTranscludeDirective:C});else{var U=K();if(_=Dn(oe(t)).contents(),v(b)){_=[];var q=K(),Z=K();for(var ee in r(b,(function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,q[e]=t,U[t]=null,Z[t]=n})),r(O.contents(),(function(e){var t=q[Ie($(e))];t?(Z[t]=!0,U[t]=U[t]||[],U[t].push(e)):_.push(e)})),r(Z,(function(e,t){if(!e)throw Pr("reqslot",t)})),U)U[ee]&&(U[ee]=Q(B,U[ee],i))}O.empty(),(I=Q(B,_,i,void 0,void 0,{needsNewScope:p.$$isolateScope||p.$$newScope})).$$slots=U}if(p.template)if(A=!0,de("template",D,p,O),D=p,b=L(p.template)?p.template(O,n):p.template,b=$e(b),p.replace){if(s=p,_=cr.test(b)?Be(fe(p.templateNamespace,qn(b))):[],t=_[0],1!==_.length||1!==t.nodeType)throw Pr("tplrt",g,"");me(a,O,t),b=G(t,[],z={$attr:{}});var re=e.splice(N+1,e.length-(N+1));(S||M)&&ie(b,S,M),e=e.concat(b).concat(re),le(n,z),z=e.length}else O.html(b);if(p.templateUrl)A=!0,de("template",D,p,O),D=p,p.replace&&(s=p),f=ue(e.splice(N,e.length-N),O,n,a,E&&I,u,c,{controllerDirectives:k,newScopeDirective:M!==p&&M,newIsolateScopeDirective:S,templateDirective:D,nonTlbTranscludeDirective:C}),z=e.length;else if(p.compile)try{y=p.compile(O,n,I);var ae=p.$$originalDirective||p;L(y)?h(null,P(ae,y),V,W):y&&h(P(ae,y.pre),P(ae,y.post),V,W)}catch(e){o(e,H(O))}p.terminal&&(f.terminal=!0,w=Math.max(w,p.priority))}return f.scope=M&&!0===M.scope,f.transcludeOnThisElement=E,f.templateOnThisElement=A,f.transclude=I,d.hasElementTranscludeDirective=Y,f}function te(e,t,n,i){var o;if(y(t)){var a=t.match(b);t=t.substring(a[0].length);var s=a[1]||a[3];if(a="?"===a[2],"^^"===s?n=n.parent():o=(o=i&&i[t])&&o.instance,!o){var l="$"+t+"Controller";o=s?n.inheritedData(l):n.data(l)}if(!o&&!a)throw Pr("ctreq",t,e)}else if(Wn(t))for(o=[],s=0,a=t.length;s<a;s++)o[s]=te(e,t[s],n,i);else v(t)&&(o={},r(t,(function(t,r){o[r]=te(e,t,n,i)})));return o||null}function ne(e,t,n,r,i,o,a){var s,l=K();for(s in r){var u=r[s],c={$scope:u===a||u.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},d=u.controller;"@"===d&&(d=t[u.name]),c=M(d,c,!0,u.controllerAs),l[u.name]=c,e.data("$"+u.name+"Controller",c.instance)}return l}function ie(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=c(e[r],{$$isolateScope:t,$$newScope:n})}function ae(e,n,r,o,a,l,u){if(n===a)return null;var d=null;if(s.hasOwnProperty(n))for(var h=0,f=(a=t.get(n+"Directive")).length;h<f;h++)if(n=a[h],(m(o)||o>n.priority)&&-1!==n.restrict.indexOf(r)){if(l&&(n=c(n,{$$start:l,$$end:u})),!n.$$bindings){var p=d=n,g=n.name,_={isolateScope:null,bindToController:null};if(v(p.scope)&&(!0===p.bindToController?(_.bindToController=i(p.scope,g,!0),_.isolateScope={}):_.isolateScope=i(p.scope,g,!1)),v(p.bindToController)&&(_.bindToController=i(p.bindToController,g,!0)),_.bindToController&&!p.controller)throw Pr("noctrl",g);v((d=d.$$bindings=_).isolateScope)&&(n.$$isolateBindings=d.isolateScope)}e.push(n),d=n}return d}function se(e){if(s.hasOwnProperty(e))for(var n=t.get(e+"Directive"),r=0,i=n.length;r<i;r++)if((e=n[r]).multiElement)return!0;return!1}function le(e,t){var n=t.$attr,i=e.$attr;r(e,(function(r,i){"$"!==i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))})),r(t,(function(t,r){e.hasOwnProperty(r)||"$"===r.charAt(0)||(e[r]=t,"class"!==r&&"style"!==r&&(i[r]=n[r]))}))}function ue(e,t,n,i,o,s,l,u){var d,h,f=[],p=t[0],m=e.shift(),g=c(m,{templateUrl:null,transclude:null,replace:null,$$originalDirective:m}),_=L(m.templateUrl)?m.templateUrl(t,n):m.templateUrl,y=m.templateNamespace;return t.empty(),a(_).then((function(a){var c,b;if(a=$e(a),m.replace){if(a=cr.test(a)?Be(fe(y,qn(a))):[],c=a[0],1!==a.length||1!==c.nodeType)throw Pr("tplrt",m.name,_);a={$attr:{}},me(i,t,c);var w=G(c,[],a);v(m.scope)&&ie(w,!0),e=w.concat(e),le(n,a)}else c=p,t.html(a);for(e.unshift(g),d=ee(e,c,n,o,t,m,s,l,u),r(i,(function(e,n){e===c&&(i[n]=t[0])})),h=V(t[0].childNodes,o);f.length;){a=f.shift(),b=f.shift();var L=f.shift(),M=f.shift();if(w=t[0],!a.$$destroyed){if(b!==p){var k=b.className;u.hasElementTranscludeDirective&&m.replace||(w=oe(c)),me(L,Dn(b),w),z(Dn(w),k)}b=d.transcludeOnThisElement?W(a,d.transclude,M):M,d(h,a,w,i,b)}}f=null})),function(e,t,n,r,i){e=i,t.$$destroyed||(f?f.push(t,n,r,e):(d.transcludeOnThisElement&&(e=W(t,d.transclude,i)),d(h,t,n,r,e)))}}function ce(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function de(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Pr("multidir",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,H(r))}function he(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=!!(e=e.parent()).length;return t&&F.$$addBindingClass(e),function(e,n){var i=n.parent();t||F.$$addBindingClass(i),F.$$addBindingInfo(i,r.expressions),e.$watch(r,(function(e){n[0].nodeValue=e}))}}})}function fe(t,n){switch(t=Yn(t||"html")){case"svg":case"math":var r=e.document.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function pe(e,t,r,i,o){var a=function(e,t){if("srcdoc"===t)return I.HTML;var n=$(e);if("src"===t||"ngSrc"===t){if(-1===["img","video","audio","source","track"].indexOf(n))return I.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t)return I.RESOURCE_URL}(e,i),s=_[i]||o,l=n(r,!o,a,s);if(l){if("multiple"===i&&"select"===$(e))throw Pr("selmulti",H(e));t.push({priority:100,compile:function(){return{pre:function(e,t,o){if(t=o.$$observers||(o.$$observers=K()),w.test(i))throw Pr("nodomevents");var u=o[i];u!==r&&(l=u&&n(u,!0,a,s),r=u),l&&(o[i]=l(e),(t[i]||(t[i]=[])).$$inter=!0,(o.$$observers&&o.$$observers[i].$$scope||e).$watch(l,(function(e,t){"class"===i&&e!==t?o.$updateClass(e,t):o.$set(i,e)})))}}}})}}function me(t,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(t)for(i=0,o=t.length;i<o;i++)if(t[i]===a){t[i++]=r,o=i+s-1;for(var u=t.length;i<u;i++,o++)o<u?t[i]=t[o]:delete t[i];t.length-=s-1,t.context===a&&(t.context=r);break}for(l&&l.replaceChild(r,a),t=e.document.createDocumentFragment(),i=0;i<s;i++)t.appendChild(n[i]);for(Dn.hasData(a)&&(Dn.data(r,Dn.data(a)),Dn(a).off("$destroy")),Dn.cleanData(t.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function ge(e,t){return l((function(){return e.apply(null,arguments)}),e,t)}function ve(e,t,n,r,i,a){try{e(t,n,r,i,a)}catch(e){o(e,H(n))}}function _e(e,t,i,o,a){function s(t,n,r){!L(i.$onChanges)||n===r||n!=n&&r!=r||(be||(e.$$postDigest(N),be=[]),u||(u={},be.push(l)),u[t]&&(r=u[t].previousValue),u[t]=new Oe(r,n))}function l(){i.$onChanges(u),u=void 0}var u,c=[],h={};return r(o,(function(r,o){var l,u,p,m,g=r.attrName,v=r.optional;switch(r.mode){case"@":v||Pn.call(t,g)||(i[o]=t[g]=void 0),v=t.$observe(g,(function(e){(y(e)||S(e))&&(s(o,e,i[o]),i[o]=e)})),t.$$observers[g].$$scope=e,y(l=t[g])?i[o]=n(l)(e):S(l)&&(i[o]=l),h[o]=new Oe(Yr,i[o]),c.push(v);break;case"=":if(!Pn.call(t,g)){if(v)break;t[g]=void 0}if(v&&!t[g])break;u=f(t[g]),m=u.literal?E:function(e,t){return e===t||e!=e&&t!=t},p=u.assign||function(){throw l=i[o]=u(e),Pr("nonassign",t[g],g,a.name)},l=i[o]=u(e),(v=function(t){return m(t,i[o])||(m(t,l)?p(e,t=i[o]):i[o]=t),l=t}).$stateful=!0,v=r.collection?e.$watchCollection(t[g],v):e.$watch(f(t[g],v),null,u.literal),c.push(v);break;case"<":if(!Pn.call(t,g)){if(v)break;t[g]=void 0}if(v&&!t[g])break;var _=(u=f(t[g])).literal,b=i[o]=u(e);h[o]=new Oe(Yr,i[o]),v=e.$watch(u,(function(e,t){if(t===e){if(t===b||_&&E(t,b))return;t=b}s(o,e,t),i[o]=e}),_),c.push(v);break;case"&":if((u=t.hasOwnProperty(g)?f(t[g]):d)===d&&v)break;i[o]=function(t){return u(e,t)}}})),{initialChanges:h,removeWatches:c.length&&function(){for(var e=0,t=c.length;e<t;++e)c[e]()}}}var be,we=/^\w/,Le=e.document.createElement("div"),Me=A,ke=Y,xe=C;R.prototype={$normalize:Ie,$addClass:function(e){e&&0<e.length&&j.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&j.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=je(e,t);n&&n.length&&j.addClass(this.$$element,n),(n=je(t,e))&&n.length&&j.removeClass(this.$$element,n)},$set:function(e,t,n,i){var a=ye(this.$$element[0],e),s=_r[e],l=e;if(a?(this.$$element.prop(e,t),i=a):s&&(this[s]=t,l=s),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e])||(this.$attr[e]=i=U(e,"-")),"a"===(a=$(this.$$element))&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=B(t,"src"===e);else if("img"===a&&"srcset"===e&&g(t)){a="",s=qn(t);for(var u=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,c=(u=/\s/.test(s)?u:/(,)/,s=s.split(u),u=Math.floor(s.length/2),0);c<u;c++){var d=2*c;a=(a+=B(qn(s[d]),!0))+" "+qn(s[d+1])}s=qn(s[2*c]).split(/\s/),a+=B(qn(s[0]),!0),2===s.length&&(a+=" "+qn(s[1])),this[e]=t=a}!1!==n&&(null===t||m(t)?this.$$element.removeAttr(i):we.test(i)?this.$$element.attr(i,t):function(e,t,n){Le.innerHTML="<span "+t+">";var r=(t=Le.firstChild.attributes)[0];t.removeNamedItem(r.name),r.value=n,e.attributes.setNamedItem(r)}(this.$$element[0],i,t)),(e=this.$$observers)&&r(e[l],(function(e){try{e(t)}catch(e){o(e)}}))},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=K()),i=r[e]||(r[e]=[]);return i.push(t),O.$evalAsync((function(){i.$$inter||!n.hasOwnProperty(e)||m(n[e])||t(n[e])})),function(){D(i,t)}}};var Se=n.startSymbol(),Te=n.endSymbol(),$e="{{"===Se&&"}}"===Te?h:function(e){return e.replace(/\{\{/g,Se).replace(/}}/g,Te)},De=/^ngAttr[A-Z]/,Ce=/^(.+)Start$/;return F.$$addBindingInfo=k?function(e,t){var n=e.data("$binding")||[];Wn(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:d,F.$$addBindingClass=k?function(e){z(e,"ng-binding")}:d,F.$$addScopeInfo=k?function(e,t,n,r){e.data(n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope",t)}:d,F.$$addScopeClass=k?function(e,t){z(e,t?"ng-isolate-scope":"ng-scope")}:d,F.$$createComment=function(t,n){var r="";return k&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},F}]}function Oe(e,t){this.previousValue=e,this.currentValue=t}function Ie(e){return ee(e.replace(Or,""))}function je(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/),o=0;e:for(;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a===i[s])continue e;n+=(0<n.length?" ":"")+a}return n}function Be(e){var t=(e=Dn(e)).length;if(1>=t)return e;for(;t--;){var n=e[t];(8===n.nodeType||n.nodeType===nr&&""===n.nodeValue.trim())&&jn.call(e,t,1)}return e}function He(e,t){if(t&&y(t))return t;if(y(e)){var n=jr.exec(e);if(n)return n[3]}}function Ne(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){Z(t,"controller"),v(t)?l(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(r,i){function o(e,n,r,i){if(!e||!v(e.$scope))throw t("$controller")("noscp",i,n);e.$scope[n]=r}return function(t,a,s,u){var c,d,h;if(s=!0===s,u&&y(u)&&(h=u),y(t)){if(!(u=t.match(jr)))throw Ir("ctrlfmt",t);if(d=u[1],h=h||u[3],!(t=e.hasOwnProperty(d)?e[d]:J(a.$scope,d,!0)||(n?J(i,d,!0):void 0)))throw Ir("ctrlreg",d);G(t,d,!0)}return s?(s=(Wn(t)?t[t.length-1]:t).prototype,c=Object.create(s||null),h&&o(a,h,c,d||t.name),l((function(){var e=r.invoke(t,c,a,d);return e!==c&&(v(e)||L(e))&&(c=e,h&&o(a,h,c,d||t.name)),c}),{instance:c,identifier:h})):(c=r.instantiate(t,a,d),h&&o(a,h,c,d||t.name),c)}}]}function Re(){this.$get=["$window",function(e){return Dn(e.document)}]}function ze(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Fe(e){return v(e)?w(e)?e.toISOString():O(e):e}function Ve(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,(function(e,n){null===e||m(e)||(Wn(e)?r(e,(function(e){t.push(V(n)+"="+V(Fe(e)))})):t.push(V(n)+"="+V(Fe(e))))})),t.join("&")}}}function We(){this.$get=function(){return function(e){if(!e)return"";var t=[];return function e(n,o,a){null===n||m(n)||(Wn(n)?r(n,(function(t,n){e(t,o+"["+(v(t)?n:"")+"]")})):v(n)&&!w(n)?i(n,(function(t,n){e(t,o+(a?"":"[")+n+(a?"":"]"))})):t.push(V(o)+"="+V(Fe(n))))}(e,"",!0),t.join("&")}}}function Ue(e,t){if(y(e)){var n=e.replace(Fr,"").trim();if(n){var r=t("Content-Type");(r=r&&0===r.indexOf(Hr))||(r=(r=n.match(Rr))&&zr[r[0]].test(n)),r&&(e=I(n))}}return e}function qe(e){var t,n=K();return y(e)?r(e.split("\n"),(function(e){t=e.indexOf(":");var r=Yn(qn(e.substr(0,t)));e=qn(e.substr(t+1)),r&&(n[r]=n[r]?n[r]+", "+e:e)})):v(e)&&r(e,(function(e,t){var r=Yn(t),i=qn(e);r&&(n[r]=n[r]?n[r]+", "+i:i)})),n}function Ge(e){var t;return function(n){return t||(t=qe(e)),n?(void 0===(n=t[Yn(n)])&&(n=null),n):t}}function Ze(e,t,n,i){return L(i)?i(e,t,n):(r(i,(function(r){e=r(e,t,n)})),e)}function Je(){var e=this.defaults={transformResponse:[Ue],transformRequest:[function(e){return v(e)&&"[object File]"!==Hn.call(e)&&"[object Blob]"!==Hn.call(e)&&"[object FormData]"!==Hn.call(e)?O(e):e}],headers:{common:{Accept:"application/json, text/plain, */*"},post:Q(Nr),put:Q(Nr),patch:Q(Nr)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return g(e)?(n=!!e,this):n};var i=!0;this.useLegacyPromiseExtensions=function(e){return g(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,u,c,d,h){function f(n){function o(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],o=t[n++];e=e.then(i,o)}return t.length=0,e}function a(e){var t=l({},e);return t.data=Ze(e.data,e.headers,e.status,s.transformResponse),200<=(e=e.status)&&300>e?t:d.reject(t)}if(!v(n))throw t("$http")("badreq",n);if(!y(n.url))throw t("$http")("badreq",n.url);var s=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);s.headers=function(t){var n,i,o,a=e.headers,s=l({},t.headers);a=l({},a.common,a[Yn(t.method)]);e:for(n in a){for(o in i=Yn(n),s)if(Yn(o)===i)continue e;s[n]=a[n]}return function(e,t){var n,i={};return r(e,(function(e,r){L(e)?null!=(n=e(t))&&(i[r]=n):i[r]=e})),i}(s,Q(t))}(n),s.method=On(s.method),s.paramSerializer=y(s.paramSerializer)?h.get(s.paramSerializer):s.paramSerializer;var u=[],c=[],f=d.when(s);return r(b,(function(e){(e.request||e.requestError)&&u.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)})),f=(f=o(f,u)).then((function(t){var n=t.headers,i=Ze(t.data,Ge(n),void 0,t.transformRequest);return m(i)&&r(n,(function(e,t){"content-type"===Yn(t)&&delete n[t]})),m(t.withCredentials)&&!m(e.withCredentials)&&(t.withCredentials=e.withCredentials),p(t,i).then(a,a)})),f=o(f,c),i?(f.success=function(e){return G(e,"fn"),f.then((function(t){e(t.data,t.status,t.headers,s)})),f},f.error=function(e){return G(e,"fn"),f.then(null,(function(t){e(t.data,t.status,t.headers,s)})),f}):(f.success=Wr("success"),f.error=Wr("error")),f}function p(t,i){function o(e){if(e){var t={};return r(e,(function(e,r){t[r]=function(t){function r(){e(t)}n?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}})),t}}function l(e,n,r,i){(200<=(n=-1<=n?n:0)&&300>n?b.resolve:b.reject)({data:e,status:n,headers:Ge(r),config:t,statusText:i})}function u(e){l(e.data,e.status,Q(e.headers()),e.statusText)}function h(){var e=f.pendingRequests.indexOf(t);-1!==e&&f.pendingRequests.splice(e,1)}var p,y,b=d.defer(),w=b.promise,M=t.headers,k=function(e,t){return 0<t.length&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}(t.url,t.paramSerializer(t.params));return f.pendingRequests.push(t),w.then(h,h),!t.cache&&!e.cache||!1===t.cache||"GET"!==t.method&&"JSONP"!==t.method||(p=v(t.cache)?t.cache:v(e.cache)?e.cache:_),p&&(g(y=p.get(k))?y&&L(y.then)?y.then(u,u):Wn(y)?l(y[1],y[0],Q(y[2]),y[3]):l(y,200,{},"OK"):p.put(k,w)),m(y)&&((y=Wt(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0)&&(M[t.xsrfHeaderName||e.xsrfHeaderName]=y),a(t.method,k,i,(function(e,t,r,i){function o(){l(t,e,r,i)}p&&(200<=e&&300>e?p.put(k,[e,t,qe(r),i]):p.remove(k)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}),M,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))),w}var _=u("$http");e.paramSerializer=y(e.paramSerializer)?h.get(e.paramSerializer):e.paramSerializer;var b=[];return r(o,(function(e){b.unshift(y(e)?h.get(e):h.invoke(e))})),f.pendingRequests=[],function(e){r(arguments,(function(e){f[e]=function(t,n){return f(l({},n||{},{method:e,url:t}))}}))}("get","delete","head","jsonp"),function(e){r(arguments,(function(e){f[e]=function(t,n,r){return f(l({},r||{},{method:e,url:t,data:n}))}}))}("post","put","patch"),f.defaults=e,f}]}function Xe(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Ke(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,i){return function(e,t,n,i,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var r=o.createElement("script"),a=null;return r.type="text/javascript",r.src=e,r.async=!0,a=function(e){r.removeEventListener("load",a,!1),r.removeEventListener("error",a,!1),o.body.removeChild(r),r=null;var s=-1,l="unknown";e&&("load"!==e.type||i.wasCalled(t)||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},r.addEventListener("load",a,!1),r.addEventListener("error",a,!1),o.body.appendChild(r),a}return function(o,s,l,u,c,h,f,p,v,_){function y(){M&&M(),k&&k.abort()}function b(t,r,i,o,a){g(x)&&n.cancel(x),M=k=null,t(r,i,o,a),e.$$completeOutstandingRequest(d)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Yn(o))var w=i.createCallback(s),M=a(s,w,(function(e,t){var n=200===e&&i.getResponse(w);b(u,e,n,"",t),i.removeCallback(w)}));else{var k=t(o,s);if(k.open(o,s,!0),r(c,(function(e,t){g(e)&&k.setRequestHeader(t,e)})),k.onload=function(){var e=k.statusText||"",t="response"in k?k.response:k.responseText,n=1223===k.status?204:k.status;0===n&&(n=t?200:"file"===Vt(s).protocol?404:0),b(u,n,t,k.getAllResponseHeaders(),e)},o=function(){b(u,-1,null,null,"")},k.onerror=o,k.onabort=o,k.ontimeout=o,r(v,(function(e,t){k.addEventListener(t,e)})),r(_,(function(e,t){k.upload.addEventListener(t,e)})),f&&(k.withCredentials=!0),p)try{k.responseType=p}catch(e){if("json"!==p)throw e}k.send(m(l)?null:l)}if(0<h)var x=n(y,h);else h&&L(h.then)&&h.then(y)}}(e,i,e.defer,t,n[0])}]}function Qe(){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(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(h,e).replace(p,t)}function s(e,t,n,r){var i=e.$watch((function(e){return i(),r(e)}),t,n);return i}function u(o,u,h,p){function v(e){try{var t,n=e;if(e=h?i.getTrusted(h,n):i.valueOf(n),p&&!g(e))t=e;else if(null==e)t="";else{switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=O(e)}t=e}return t}catch(e){r(Ur.interr(o,e))}}var _;if(!o.length||-1===o.indexOf(e))return u||((_=f(u=a(o))).exp=o,_.expressions=[],_.$$watchDelegate=s),_;p=!!p;var y,b,w=0,M=[],k=[];_=o.length;for(var x=[],S=[];w<_;){if(-1===(y=o.indexOf(e,w))||-1===(b=o.indexOf(t,y+c))){w!==_&&x.push(a(o.substring(w)));break}w!==y&&x.push(a(o.substring(w,y))),w=o.substring(y+c,b),M.push(w),k.push(n(w,v)),w=b+d,S.push(x.length),x.push("")}if(h&&1<x.length&&Ur.throwNoconcat(o),!u||M.length){var T=function(e){for(var t=0,n=M.length;t<n;t++){if(p&&m(e[t]))return;x[S[t]]=e[t]}return x.join("")};return l((function(e){var t=0,n=M.length,i=Array(n);try{for(;t<n;t++)i[t]=k[t](e);return T(i)}catch(e){r(Ur.interr(o,e))}}),{exp:o,expressions:M,$$watchDelegate:function(e,t){var n;return e.$watchGroup(k,(function(r,i){var o=T(r);L(t)&&t.call(this,o,r!==i?n:o,e),n=o}))}})}}var c=e.length,d=t.length,h=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return u.startSymbol=function(){return e},u.endSymbol=function(){return t},u}]}function et(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,l,u){function c(){d?o.apply(null,h):o(m)}var d=4<arguments.length,h=d?In.call(arguments,4):[],f=t.setInterval,p=t.clearInterval,m=0,v=g(u)&&!u,_=(v?r:n).defer(),y=_.promise;return l=g(l)?l:0,y.$$intervalId=f((function(){v?i.defer(c):e.$evalAsync(c),_.notify(m++),0<l&&m>=l&&(_.resolve(m),p(y.$$intervalId),delete a[y.$$intervalId]),v||e.$apply()}),s),a[y.$$intervalId]=_,y}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function tt(e){for(var t=(e=e.split("/")).length;t--;)e[t]=F(e[t]);return e.join("/")}function nt(e,t){var n=Vt(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=u(n.port)||Zr[n.protocol]||null}function rt(e,t){if(Xr.test(e))throw Jr("badpath",e);var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Vt(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=R(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function it(e,t){if(t.slice(0,e.length)===e)return t.substr(e.length)}function ot(e){var t=e.indexOf("#");return-1===t?e:e.substr(0,t)}function at(e){return e.replace(/(#.+)|#$/,"$1")}function st(e,t,n){this.$$html5=!0,n=n||"",nt(e,this),this.$$parse=function(e){var n=it(t,e);if(!y(n))throw Jr("ipthprfx",e,t);rt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=z(this.$$search),n=this.$$hash?"#"+F(this.$$hash):"";this.$$url=tt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){return i&&"#"===i[0]?(this.hash(i.slice(1)),!0):(g(o=it(e,r))?(a=o,a=n&&g(o=it(n,o))?t+(it("/",o)||o):e+a):g(o=it(t,r))?a=t+o:t===r+"/"&&(a=t),a&&this.$$parse(a),!!a);var o,a}}function lt(e,t,n){nt(e,this),this.$$parse=function(r){var i;m(o=it(e,r)||it(t,r))||"#"!==o.charAt(0)?this.$$html5?i=o:(i="",m(o)&&(e=r,this.replace())):m(i=it(n,o))&&(i=o),rt(i,this),r=this.$$path;var o=e,a=/^\/[A-Z]:(\/.*)/;i.slice(0,o.length)===o&&(i=i.replace(o,"")),a.exec(i)||(r=(i=a.exec(r))?i[1]:r),this.$$path=r,this.$$compose()},this.$$compose=function(){var t=z(this.$$search),r=this.$$hash?"#"+F(this.$$hash):"";this.$$url=tt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return ot(e)===ot(t)&&(this.$$parse(t),!0)}}function ut(e,t,n){this.$$html5=!0,lt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){return i&&"#"===i[0]?(this.hash(i.slice(1)),!0):(e===ot(r)?o=r:(a=it(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o);var o,a},this.$$compose=function(){var t=z(this.$$search),r=this.$$hash?"#"+F(this.$$hash):"";this.$$url=tt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function ct(e){return function(){return this[e]}}function dt(e,t){return function(n){return m(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function ht(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return g(t)?(e=t,this):e},this.html5Mode=function(e){return S(e)?(t.enabled=e,this):v(e)?(S(e.enabled)&&(t.enabled=e.enabled),S(e.requireBase)&&(t.requireBase=e.requireBase),(S(e.rewriteLinks)||y(e.rewriteLinks))&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=u.url(),o=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(e){throw u.url(i),u.$$state=o,e}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c;c=r.baseHref();var d,h=r.url();if(t.enabled){if(!c&&t.requireBase)throw Jr("nobase");d=h.substring(0,h.indexOf("/",h.indexOf("//")+2))+(c||"/"),c=i.history?st:ut}else d=ot(h),c=lt;var f=d.substr(0,ot(d).lastIndexOf("/")+1);(u=new c(d,f,"#"+e)).$$parseLinkUrl(h,h),u.$$state=r.state();var p=/^\s*(javascript|mailto):/i;o.on("click",(function(e){if((s=t.rewriteLinks)&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var i=Dn(e.target);"a"!==$(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;if(!y(s)||!m(i.attr(s))){var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");v(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Vt(s.animVal).href),p.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||!u.$$parseLinkUrl(s,l)||(e.preventDefault(),u.absUrl()!==r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}})),at(u.absUrl())!==at(h)&&r.url(u.absUrl(),!0);var g=!0;return r.onUrlChange((function(e,t){m(it(f,e))?a.location.href=e:(n.$evalAsync((function(){var r,i=u.absUrl(),o=u.$$state;e=at(e),u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=o,s(i,!1,o)):(g=!1,l(i,o)))})),n.$$phase||n.$digest())})),n.$watch((function(){var e=at(r.url()),t=at(u.absUrl()),o=r.state(),a=u.$$replace,c=e!==t||u.$$html5&&i.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync((function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))}))),u.$$replace=!1})),u}]}function ft(){var e=!0,t=this;this.debugEnabled=function(t){return g(t)?(e=t,this):e},this.$get=["$window",function(n){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 o(e){var t=n.console||{},o=t[e]||t.log||d;e=!1;try{e=!!o.apply}catch(e){}return e?function(){var e=[];return r(arguments,(function(t){e.push(i(t))})),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function pt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Qr("isecfld",t);return e}function mt(e){return e+""}function gt(e,t){if(e){if(e.constructor===e)throw Qr("isecfn",t);if(e.window===e)throw Qr("isecwindow",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Qr("isecdom",t);if(e===Object)throw Qr("isecobj",t)}return e}function vt(e,t){if(e){if(e.constructor===e)throw Qr("isecfn",t);if(e===hi||e===fi||e===pi)throw Qr("isecff",t)}}function _t(e,t){if(e&&(e===ei||e===ti||e===ni||e===ri||e===ii||e===oi||e===ai||e===si||e===li||e===ui||e===ci||e===di))throw Qr("isecaf",t)}function yt(e,t){return void 0!==e?e:t}function bt(e,t){return void 0===e?t:void 0===t?e:e+t}function wt(e,t){var n,i,o;switch(e.type){case yi.Program:n=!0,r(e.body,(function(e){wt(e.expression,t),n=n&&e.expression.constant})),e.constant=n;break;case yi.Literal:e.constant=!0,e.toWatch=[];break;case yi.UnaryExpression:wt(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case yi.BinaryExpression:wt(e.left,t),wt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case yi.LogicalExpression:wt(e.left,t),wt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case yi.ConditionalExpression:wt(e.test,t),wt(e.alternate,t),wt(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case yi.Identifier:e.constant=!1,e.toWatch=[e];break;case yi.MemberExpression:wt(e.object,t),e.computed&&wt(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case yi.CallExpression:n=o=!!e.filter&&!t(e.callee.name).$stateful,i=[],r(e.arguments,(function(e){wt(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)})),e.constant=n,e.toWatch=o?i:[e];break;case yi.AssignmentExpression:wt(e.left,t),wt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case yi.ArrayExpression:n=!0,i=[],r(e.elements,(function(e){wt(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)})),e.constant=n,e.toWatch=i;break;case yi.ObjectExpression:n=!0,i=[],r(e.properties,(function(e){wt(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)})),e.constant=n,e.toWatch=i;break;case yi.ThisExpression:e.constant=!1,e.toWatch=[];break;case yi.LocalsExpression:e.constant=!1,e.toWatch=[]}}function Lt(e){if(1===e.length){var t=(e=e[0].expression).toWatch;return 1!==t.length?t:t[0]!==e?t:void 0}}function Mt(e){return e.type===yi.Identifier||e.type===yi.MemberExpression}function kt(e){if(1===e.body.length&&Mt(e.body[0].expression))return{type:yi.AssignmentExpression,left:e.body[0].expression,right:{type:yi.NGValueParameter},operator:"="}}function xt(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===yi.Literal||e.body[0].expression.type===yi.ArrayExpression||e.body[0].expression.type===yi.ObjectExpression)}function St(e,t){this.astBuilder=e,this.$filter=t}function Tt(e,t){this.astBuilder=e,this.$filter=t}function $t(e){return"constructor"===e}function Dt(e){return L(e.valueOf)?e.valueOf():mi.call(e)}function Ct(){var e,t,n=K(),i=K(),o={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(a){function s(e,t,r){var o,s,l;switch(r=r||y,typeof e){case"string":l=e=e.trim();var m=r?i:n;if(!(o=m[l])){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var g=new _i(o=r?_:v);(o=new bi(g,a,o).parse(e)).constant?o.$$watchDelegate=f:s?o.$$watchDelegate=o.literal?h:c:o.inputs&&(o.$$watchDelegate=u),r&&(o=function e(t){function n(e,n,r,i){var o=y;y=!0;try{return t(e,n,r,i)}finally{y=o}}if(!t)return t;n.$$watchDelegate=t.$$watchDelegate,n.assign=e(t.assign),n.constant=t.constant,n.literal=t.literal;for(var r=0;t.inputs&&r<t.inputs.length;++r)t.inputs[r]=e(t.inputs[r]);return n.inputs=t.inputs,n}(o)),m[l]=o}return p(o,t);case"function":return p(e,t);default:return p(d,t)}}function l(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=Dt(e)))&&(e===t||e!=e&&t!=t)}function u(e,t,n,r,i){var o;if(1===(s=r.inputs).length){var a=l,s=s[0];return e.$watch((function(e){var t=s(e);return l(t,a)||(o=r(e,void 0,void 0,[t]),a=t&&Dt(t)),o}),t,n,i)}for(var u=[],c=[],d=0,h=s.length;d<h;d++)u[d]=l,c[d]=null;return e.$watch((function(e){for(var t=!1,n=0,i=s.length;n<i;n++){var a=s[n](e);(t||(t=!l(a,u[n])))&&(c[n]=a,u[n]=a&&Dt(a))}return t&&(o=r(e,void 0,void 0,c)),o}),t,n,i)}function c(e,t,n,r){var i,o;return i=e.$watch((function(e){return r(e)}),(function(e,n,r){o=e,L(t)&&t.apply(this,arguments),g(e)&&r.$$postDigest((function(){g(o)&&i()}))}),n)}function h(e,t,n,i){function o(e){var t=!0;return r(e,(function(e){g(e)||(t=!1)})),t}var a,s;return a=e.$watch((function(e){return i(e)}),(function(e,n,r){s=e,L(t)&&t.call(this,e,n,r),o(e)&&r.$$postDigest((function(){o(s)&&a()}))}),n)}function f(e,t,n,r){var i=e.$watch((function(e){return i(),r(e)}),t,n);return i}function p(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1;return n=n!==h&&n!==c?function(n,i,o,a){return o=r&&a?a[0]:e(n,i,o,a),t(o,n,i)}:function(n,r,i,o){return i=e(n,r,i,o),n=t(i,n,r),g(i)?n:i},e.$$watchDelegate&&e.$$watchDelegate!==u?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=u,r=!e.inputs,n.inputs=e.inputs?e.inputs:[e]),n}var m=Zn().noUnsafeEval,v={csp:m,expensiveChecks:!1,literals:C(o),isIdentifierStart:L(e)&&e,isIdentifierContinue:L(t)&&t},_={csp:m,expensiveChecks:!0,literals:C(o),isIdentifierStart:L(e)&&e,isIdentifierContinue:L(t)&&t},y=!1;return s.$$runningExpensiveChecks=function(){return y},s}]}function Et(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Pt((function(t){e.$evalAsync(t)}),t)}]}function At(){this.$get=["$browser","$exceptionHandler",function(e,t){return Pt((function(t){e.defer(t)}),t)}]}function Pt(e,n){function i(){var e=new u;return e.resolve=a(e,e.resolve),e.reject=a(e,e.reject),e.notify=a(e,e.notify),e}function o(){this.$$state={status:0}}function a(e,t){return function(n){t.call(e,n)}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e((function(){var e,r,i;i=t.pending,t.processScheduled=!1,t.pending=void 0;for(var o=0,a=i.length;o<a;++o){r=i[o][0],e=i[o][t.status];try{L(e)?r.resolve(e(t.value)):1===t.status?r.resolve(t.value):r.reject(t.value)}catch(e){r.reject(e),n(e)}}})))}function u(){this.promise=new o}function c(e){var t=new u;return t.reject(e),t.promise}function d(e,t,n){var r=null;try{L(n)&&(r=n())}catch(e){return c(e)}return r&&L(r.then)?r.then((function(){return t(e)}),c):t(e)}function h(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)}function f(e){if(!L(e))throw p("norslvr",e);var t=new u;return e((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise}var p=t("$q",TypeError);l(o.prototype,{then:function(e,t,n){if(m(e)&&m(t)&&m(n))return this;var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),0<this.$$state.status&&s(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then((function(t){return d(t,g,e)}),(function(t){return d(t,c,e)}),t)}}),l(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){o||(o=!0,i.$$reject(e))}var r,i=this,o=!1;try{(v(e)||L(e))&&(r=e&&e.then),L(r)?(this.promise.$$state.status=-1,r.call(e,(function(e){o||(o=!0,i.$$resolve(e))}),t,a(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(e){t(e),n(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;0>=this.promise.$$state.status&&r&&r.length&&e((function(){for(var e,i,o=0,a=r.length;o<a;o++){i=r[o][0],e=r[o][3];try{i.notify(L(e)?e(t):t)}catch(e){n(e)}}}))}});var g=h;return f.prototype=o.prototype,f.defer=i,f.reject=c,f.when=h,f.resolve=g,f.all=function(e){var t=new u,n=0,i=Wn(e)?[]:{};return r(e,(function(e,r){n++,h(e).then((function(e){i[r]=e,--n||t.resolve(i)}),(function(e){t.reject(e)}))})),0===n&&t.resolve(i),t.promise},f.race=function(e){var t=i();return r(e,(function(e){h(e).then(t.resolve,t.reject)})),t.promise},f}function Yt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Ot(){var e=10,i=t("$rootScope"),o=null,a=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$exceptionHandler","$parse","$browser",function(t,s,l){function u(e){e.currentScope.$$destroyed=!0}function c(){this.$id=++Fn,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 h(e){if(y.$$phase)throw i("inprog",y.$$phase);y.$$phase=e}function f(e,t){do{e.$$watchersCount+=t}while(e=e.$parent)}function p(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function g(){}function _(){for(;M.length;)try{M.shift()()}catch(e){t(e)}a=null}c.prototype={constructor:c,$new:function(e,t){var n;return t=t||this,e?(n=new c).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=++Fn,this.$$ChildScope=null}return t.prototype=e,t}(this)),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!==this)&&n.$on("$destroy",u),n},$watch:function(e,t,n,r){var i=s(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var a=this,l=a.$$watchers,u={fn:t,last:g,get:i,exp:r||e,eq:!!n};return o=null,L(t)||(u.fn=d),l||((l=a.$$watchers=[]).$$digestWatchIndex=-1),l.unshift(u),l.$$digestWatchIndex++,f(this,1),function(){var e=D(l,u);0<=e&&(f(a,-1),e<l.$$digestWatchIndex&&l.$$digestWatchIndex--),o=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(o,o,s)):t(o,i,s)}var i=Array(e.length),o=Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync((function(){c&&t(o,o,s)})),function(){c=!1}}return 1===e.length?this.$watch(e[0],(function(e,n,r){o[0]=e,i[0]=n,t(o,e===n?o:i,r)})):(r(e,(function(e,t){var r=s.$watch(e,(function(e,r){o[t]=e,i[t]=r,l||(l=!0,s.$evalAsync(n))}));a.push(r)})),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function r(e){var t,r,a;if(!m(i=e)){if(v(i))if(n(i))for(o!==h&&(g=(o=h).length=0,c++),e=i.length,g!==e&&(c++,o.length=g=e),t=0;t<e;t++)a=o[t],r=i[t],a!=a&&r!=r||a===r||(c++,o[t]=r);else{for(t in o!==f&&(o=f={},g=0,c++),e=0,i)Pn.call(i,t)&&(e++,r=i[t],a=o[t],t in o?a!=a&&r!=r||a===r||(c++,o[t]=r):(g++,o[t]=r,c++));if(g>e)for(t in c++,o)Pn.call(i,t)||(g--,delete o[t])}else o!==i&&(o=i,c++);return c}}r.$stateful=!0;var i,o,a,l=this,u=1<t.length,c=0,d=s(e,r),h=[],f={},p=!0,g=0;return this.$watch(d,(function(){if(p?(p=!1,t(i,i,l)):t(i,a,l),u)if(v(i))if(n(i)){a=Array(i.length);for(var e=0;e<i.length;e++)a[e]=i[e]}else for(e in a={},i)Pn.call(i,e)&&(a[e]=i[e]);else a=i}))},$digest:function(){var n,r,s,u,c,d,f,p,m=e,v=[];h("$digest"),l.$$checkUrlChange(),this===y&&null!==a&&(l.defer.cancel(a),_()),o=null;do{for(c=!1,d=this,u=0;u<b.length;u++){try{(p=b[u]).scope.$eval(p.expression,p.locals)}catch(e){t(e)}o=null}b.length=0;e:do{if(u=d.$$watchers)for(u.$$digestWatchIndex=u.length;u.$$digestWatchIndex--;)try{if(n=u[u.$$digestWatchIndex])if((r=(0,n.get)(d))===(s=n.last)||(n.eq?E(r,s):Vn(r)&&Vn(s))){if(n===o){c=!1;break e}}else c=!0,o=n,n.last=n.eq?C(r,null):r,(0,n.fn)(r,s===g?r:s,d),5>m&&(v[f=4-m]||(v[f]=[]),v[f].push({msg:L(n.exp)?"fn: "+(n.exp.name||n.exp.toString()):n.exp,newVal:r,oldVal:s}))}catch(e){t(e)}if(!(u=d.$$watchersCount&&d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(u=d.$$nextSibling);)d=d.$parent}while(d=u);if((c||b.length)&&!m--)throw y.$$phase=null,i("infdig",e,v)}while(c||b.length);for(y.$$phase=null;k<w.length;)try{w[k++]()}catch(e){t(e)}w.length=k=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;for(var t in this.$broadcast("$destroy"),this.$$destroyed=!0,this===y&&l.$$applicationDestroyed(),f(this,-this.$$watchersCount),this.$$listenerCount)p(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=d,this.$on=this.$watch=this.$watchGroup=function(){return d},this.$$listeners={},this.$$nextSibling=null,function e(t){9===$n&&(t.$$childHead&&e(t.$$childHead),t.$$nextSibling&&e(t.$$nextSibling)),t.$parent=t.$$nextSibling=t.$$prevSibling=t.$$childHead=t.$$childTail=t.$root=t.$$watchers=null}(this)}},$eval:function(e,t){return s(e)(this,t)},$evalAsync:function(e,t){y.$$phase||b.length||l.defer((function(){b.length&&y.$digest()})),b.push({scope:this,expression:s(e),locals:t})},$$postDigest:function(e){w.push(e)},$apply:function(e){try{h("$apply");try{return this.$eval(e)}finally{y.$$phase=null}}catch(e){t(e)}finally{try{y.$digest()}catch(e){throw t(e),e}}},$applyAsync:function(e){var t=this;e&&M.push((function(){t.$eval(e)})),e=s(e),null===a&&(a=l.defer((function(){y.$apply(_)})))},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do{r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++}while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,p(i,1,e))}},$emit:function(e,n){var r,i,o,a=[],s=this,l=!1,u={name:e,targetScope:s,stopPropagation:function(){l=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},c=A([u],arguments,1);do{for(r=s.$$listeners[e]||a,u.currentScope=s,i=0,o=r.length;i<o;i++)if(r[i])try{r[i].apply(null,c)}catch(e){t(e)}else r.splice(i,1),i--,o--;if(l)return u.currentScope=null,u;s=s.$parent}while(s);return u.currentScope=null,u},$broadcast:function(e,n){var r=this,i=this,o={name:e,targetScope:this,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[e])return o;for(var a,s,l=A([o],arguments,1);r=i;){for(o.currentScope=r,a=0,s=(i=r.$$listeners[e]||[]).length;a<s;a++)if(i[a])try{i[a].apply(null,l)}catch(e){t(e)}else i.splice(a,1),a--,s--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==this&&r.$$nextSibling))for(;r!==this&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var y=new c,b=y.$$asyncQueue=[],w=y.$$postDigestQueue=[],M=y.$$applyAsyncQueue=[],k=0;return y}]}function It(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return g(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return g(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return""===(i=Vt(n).href)||i.match(o)?n:"unsafe:"+i}}}function jt(e){var t=[];return g(e)&&r(e,(function(e){t.push(function(e){if("self"===e)return e;if(y(e)){if(-1<e.indexOf("***"))throw wi("iwcard",e);return e=Gn(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(M(e))return new RegExp("^"+e.source+"$");throw wi("imatcher")}(e))})),t}function Bt(){this.SCE_CONTEXTS=Li;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=jt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=jt(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?Wt(t):!!e.exec(t.href)}function i(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 wi("unsafe")};n.has("$sanitize")&&(o=n.get("$sanitize"));var a=i(),s={};return s[Li.HTML]=i(a),s[Li.CSS]=i(a),s[Li.URL]=i(a),s[Li.JS]=i(a),s[Li.RESOURCE_URL]=i(s[Li.URL]),{trustAs:function(e,t){var n=s.hasOwnProperty(e)?s[e]:null;if(!n)throw wi("icontext",e,t);if(null===t||m(t)||""===t)return t;if("string"!=typeof t)throw wi("itype",e);return new n(t)},getTrusted:function(n,i){if(null===i||m(i)||""===i)return i;if((u=s.hasOwnProperty(n)?s[n]:null)&&i instanceof u)return i.$$unwrapTrustedValue();if(n===Li.RESOURCE_URL){var a,l,u=Vt(i.toString()),c=!1;for(a=0,l=e.length;a<l;a++)if(r(e[a],u)){c=!0;break}if(c)for(a=0,l=t.length;a<l;a++)if(r(t[a],u)){c=!1;break}if(c)return i;throw wi("insecurl",i.toString())}if(n===Li.HTML)return o(i);throw wi("unsafe")},valueOf:function(e){return e instanceof a?e.$$unwrapTrustedValue():e}}}]}function Ht(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>$n)throw wi("iequirks");var i=Q(Li);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=h),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,(function(t){return i.getTrusted(e,t)}))};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return r(Li,(function(e,t){var n=Yn(t);i[ee("parse_as_"+n)]=function(t){return o(e,t)},i[ee("get_trusted_"+n)]=function(t){return a(e,t)},i[ee("trust_as_"+n)]=function(t){return s(e,t)}})),i}]}function Nt(){this.$get=["$window","$document",function(e,t){var n,r={},i=!(e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id))&&e.history&&e.history.pushState,o=u((/android (\d+)/.exec(Yn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,d=!1,h=!1;if(c){for(var f in c)if(d=l.exec(f)){n=(n=d[0])[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),d=!!("transition"in c||n+"Transition"in c),h=!!("animation"in c||n+"Animation"in c),!o||d&&h||(d=y(c.webkitTransition),h=y(c.webkitAnimation))}return{history:!(!i||4>o||a),hasEvent:function(e){if("input"===e&&11>=$n)return!1;if(m(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:Zn(),vendorPrefix:n,transitions:d,animations:h,android:o}}]}function Rt(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,r,i){function o(a,s){o.totalPendingRequests++,y(a)&&!m(t.get(a))||(a=i.getTrustedResourceUrl(a));var u=n.defaults&&n.defaults.transformResponse;return Wn(u)?u=u.filter((function(e){return e!==Ue})):u===Ue&&(u=null),n.get(a,l({cache:t,transformResponse:u},e)).finally((function(){o.totalPendingRequests--})).then((function(e){return t.put(a,e.data),e.data}),(function(e){if(!s)throw Mi("tpload",a,e.status,e.statusText);return r.reject(e)}))}return o.totalPendingRequests=0,o}]}function zt(){this.$get=["$rootScope","$browser","$location",function(e,t,n){return{findBindings:function(e,t,n){e=e.getElementsByClassName("ng-binding");var i=[];return r(e,(function(e){var o=zn.element(e).data("$binding");o&&r(o,(function(r){n?new RegExp("(^|\\s)"+Gn(t)+"(\\s|\\||$)").test(r)&&i.push(e):-1!==r.indexOf(t)&&i.push(e)}))})),i},findModels:function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=e.querySelectorAll("["+r[i]+"model"+(n?"=":"*=")+'"'+t+'"]');if(o.length)return o}},getLocation:function(){return n.url()},setLocation:function(t){t!==n.url()&&(n.url(t),e.$digest())},whenStable:function(e){t.notifyWhenNoOutstandingRequests(e)}}}]}function Ft(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,s,l){L(o)||(l=s,s=o,o=d);var u,c=In.call(arguments,3),h=g(l)&&!l,f=(h?r:n).defer(),p=f.promise;return u=t.defer((function(){try{f.resolve(o.apply(null,c))}catch(e){f.reject(e),i(e)}finally{delete a[p.$$timeoutId]}h||e.$apply()}),s),p.$$timeoutId=u,a[u]=f,p}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Vt(e){return $n&&(ki.setAttribute("href",e),e=ki.href),ki.setAttribute("href",e),{href:ki.href,protocol:ki.protocol?ki.protocol.replace(/:$/,""):"",host:ki.host,search:ki.search?ki.search.replace(/^\?/,""):"",hash:ki.hash?ki.hash.replace(/^#/,""):"",hostname:ki.hostname,port:ki.port,pathname:"/"===ki.pathname.charAt(0)?ki.pathname:"/"+ki.pathname}}function Wt(e){return(e=y(e)?Vt(e):e).protocol===xi.protocol&&e.host===xi.host}function Ut(){this.$get=f(e)}function qt(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,o,a,s,l;try{e=n.cookie||""}catch(t){e=""}if(e!==i)for(e=(i=e).split("; "),r={},a=0;a<e.length;a++)0<(s=(o=e[a]).indexOf("="))&&(l=t(o.substring(0,s)),m(r[l])&&(r[l]=t(o.substring(s+1))));return r}}function Gt(){this.$get=qt}function Zt(e){function t(n,i){if(v(n)){var o={};return r(n,(function(e,n){o[n]=t(n,e)})),o}return e.factory(n+"Filter",i)}this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+"Filter")}}],t("currency",Qt),t("date",un),t("filter",Jt),t("json",cn),t("limitTo",dn),t("lowercase",Ai),t("number",en),t("orderBy",fn),t("uppercase",Pi)}function Jt(){return function(e,r,i,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray",e)}var a;switch(o=o||"$",Kt(r)){case"function":break;case"boolean":case"null":case"number":case"string":a=!0;case"object":r=function(e,t,n,r){var i=v(e)&&n in e;return!0===t?t=E:L(t)||(t=function(e,t){return!(m(e)||(null===e||null===t?e!==t:v(t)||v(e)&&!p(e)||(e=Yn(""+e),t=Yn(""+t),-1===e.indexOf(t))))}),function(o){return i&&!v(o)?Xt(o,e[n],t,n,!1):Xt(o,e,t,n,r)}}(r,i,o,a);break;default:return e}return Array.prototype.filter.call(e,r)}}function Xt(e,t,n,r,i,o){var a=Kt(e),s=Kt(t);if("string"===s&&"!"===t.charAt(0))return!Xt(e,t.substring(1),n,r,i);if(Wn(e))return e.some((function(e){return Xt(e,t,n,r,i)}));switch(a){case"object":var l;if(i){for(l in e)if("$"!==l.charAt(0)&&Xt(e[l],t,n,r,!0))return!0;return!o&&Xt(e,t,n,r,!1)}if("object"===s){for(l in t)if(!L(o=t[l])&&!m(o)&&!Xt((a=l===r)?e:e[l],o,n,r,a,a))return!1;return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Kt(e){return null===e?"null":typeof e}function Qt(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return m(n)&&(n=t.CURRENCY_SYM),m(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:tn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function en(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:tn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function tn(e,t,n,r,i){if(!y(e)&&!b(e)||isNaN(e))return"";var o=!isFinite(e),a=!1,s=Math.abs(e)+"",l="";if(o)l="∞";else{for(function(e,t,n,r){var i=e.d,o=i.length-e.i;if(r=i[n=(t=m(t)?Math.min(Math.max(n,o),r):+t)+e.i],0<n){i.splice(Math.max(e.i,n));for(var a=n;a<i.length;a++)i[a]=0}else for(o=Math.max(0,o),e.i=1,i.length=Math.max(1,n=t+1),i[0]=0,a=1;a<n;a++)i[a]=0;if(5<=r)if(0>n-1){for(r=0;r>n;r--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[n-1]++;for(;o<Math.max(0,t);o++)i.push(0);(t=i.reduceRight((function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)}),0))&&(i.unshift(t),e.i++)}(a=function(e){var t,n,r,i,o,a=0;for(-1<(n=e.indexOf(Ti))&&(e=e.replace(Ti,"")),0<(r=e.search(/e/i))?(0>n&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):0>n&&(n=e.length),r=0;e.charAt(r)===$i;r++);if(r===(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)===$i;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>Si&&(t=t.splice(0,Si-1),a=n-1,n=1),{d:t,e:a,i:n}}(s),i,t.minFrac,t.maxFrac),l=a.d,s=a.i,i=a.e,o=[],a=l.reduce((function(e,t){return e&&!t}),!0);0>s;)l.unshift(0),s++;for(0<s?o=l.splice(s,l.length):(o=l,l=[0]),s=[],l.length>=t.lgSize&&s.unshift(l.splice(-t.lgSize,l.length).join(""));l.length>t.gSize;)s.unshift(l.splice(-t.gSize,l.length).join(""));l.length&&s.unshift(l.join("")),l=s.join(n),o.length&&(l+=r+o.join("")),i&&(l+="e+"+i)}return 0>e&&!a?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function nn(e,t,n,r){var i="";for((0>e||r&&0>=e)&&(r?e=1-e:(e=-e,i="-")),e=""+e;e.length<t;)e=$i+e;return n&&(e=e.substr(e.length-t)),i+e}function rn(e,t,n,r,i){return n=n||0,function(o){return o=o["get"+e](),(0<n||o>-n)&&(o+=n),0===o&&-12===n&&(o=12),nn(o,t,r,i)}}function on(e,t,n){return function(r,i){var o=r["get"+e]();return i[On((n?"STANDALONE":"")+(t?"SHORT":"")+e)][o]}}function an(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function sn(e){return function(t){var n=an(t.getFullYear());return t=+new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))-+n,nn(t=1+Math.round(t/6048e5),e)}}function ln(e,t){return 0>=e.getFullYear()?t.ERAS[0]:t.ERAS[1]}function un(e){function t(e){var t;if(t=e.match(n)){e=new Date(0);var r=0,i=0,o=t[8]?e.setUTCFullYear:e.setFullYear,a=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=u(t[9]+t[10]),i=u(t[9]+t[11])),o.call(e,u(t[1]),u(t[2])-1,u(t[3])),r=u(t[4]||0)-r,i=u(t[5]||0)-i,o=u(t[6]||0),t=Math.round(1e3*parseFloat("0."+(t[7]||0))),a.call(e,r,i,o,t)}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,l="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,y(n)&&(n=Ei.test(n)?u(n):t(n)),b(n)&&(n=new Date(n)),!w(n)||!isFinite(n.getTime()))return n;for(;i;)(s=Ci.exec(i))?i=(c=A(c,s,1)).pop():(c.push(i),i=null);var d=n.getTimezoneOffset();return o&&(d=j(o,d),n=B(n,o,!0)),r(c,(function(t){a=Di[t],l+=a?a(n,e.DATETIME_FORMATS,d):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")})),l}}function cn(){return function(e,t){return m(t)&&(t=2),O(e,t)}}function dn(){return function(e,t,r){return t=1/0===Math.abs(Number(t))?Number(t):u(t),Vn(t)?e:(b(e)&&(e=e.toString()),n(e)?(r=0>(r=!r||isNaN(r)?0:u(r))?Math.max(0,e.length+r):r,0<=t?hn(e,r,r+t):0===r?hn(e,t,e.length):hn(e,Math.max(0,r+t),r)):e)}}function hn(e,t,n){return y(e)?e.slice(t,n):In.call(e,t,n)}function fn(e){function r(t){return t.map((function(t){var n=1,r=h;if(L(t))r=t;else if(y(t)&&("+"!==t.charAt(0)&&"-"!==t.charAt(0)||(n="-"===t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t)).constant)){var i=r();r=function(e){return e[i]}}return{get:r,descending:n}}))}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e,t){var n=0,r=e.type;if(r===(i=t.type)){var i=e.value,o=t.value;"string"===r?(i=i.toLowerCase(),o=o.toLowerCase()):"object"===r&&(v(i)&&(i=e.index),v(o)&&(o=t.index)),i!==o&&(n=i<o?-1:1)}else n=r<i?-1:1;return n}return function(e,a,s,l){if(null==e)return e;if(!n(e))throw t("orderBy")("notarray",e);Wn(a)||(a=[a]),0===a.length&&(a=["+"]);var u=r(a),c=s?-1:1,d=L(l)?l:o;return(e=Array.prototype.map.call(e,(function(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:u.map((function(n){var r=n.get(e);return n=typeof r,null===r?(n="string",r="null"):"object"===n&&(L(r.valueOf)&&i(r=r.valueOf())||p(r)&&i(r=r.toString())),{value:r,type:n,index:t}}))}}))).sort((function(e,t){for(var n=0,r=u.length;n<r;n++){var i=d(e.predicateValues[n],t.predicateValues[n]);if(i)return i*u[n].descending*c}return d(e.tieBreaker,t.tieBreaker)*c})),e.map((function(e){return e.value}))}}function pn(e){return L(e)&&(e={link:e}),e.restrict=e.restrict||"AC",f(e)}function mn(e,t,n,i,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Ii,a.$rollbackViewValue=function(){r(s,(function(e){e.$rollbackViewValue()}))},a.$commitViewValue=function(){r(s,(function(e){e.$commitViewValue()}))},a.$addControl=function(e){Z(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],r(a.$pending,(function(t,n){a.$setValidity(n,null,e)})),r(a.$error,(function(t,n){a.$setValidity(n,null,e)})),r(a.$$success,(function(t,n){a.$setValidity(n,null,e)})),D(s,e),e.$$parentForm=Ii},Sn({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];r?-1===r.indexOf(n)&&r.push(n):e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(D(r,n),0===r.length&&delete e[t])},$animate:i}),a.$setDirty=function(){i.removeClass(e,yo),i.addClass(e,bo),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){i.setClass(e,yo,bo+" ng-submitted"),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,r(s,(function(e){e.$setPristine()}))},a.$setUntouched=function(){r(s,(function(e){e.$setUntouched()}))},a.$setSubmitted=function(){i.addClass(e,"ng-submitted"),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function gn(e){e.$formatters.push((function(t){return e.$isEmpty(t)?t:t.toString()}))}function vn(e,t,n,r,i,o){var a=Yn(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",(function(){s=!0})),t.on("compositionend",(function(){s=!1,u()}))}var l,u=function(e){if(l&&(o.defer.cancel(l),l=null),!s){var i=t.val();e=e&&e.type,"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=qn(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,e)}};if(i.hasEvent("input"))t.on("input",u);else{var c=function(e,t,n){l||(l=o.defer((function(){l=null,t&&t.value===n||u(e)})))};t.on("keydown",(function(e){var t=e.keyCode;91===t||15<t&&19>t||37<=t&&40>=t||c(e,this,this.value)})),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",u),Zi[a]&&r.$$hasNativeValidators&&a===n.type&&t.on("keydown wheel mousedown",(function(e){if(!l){var t=this.validity,n=t.badInput,r=t.typeMismatch;l=o.defer((function(){l=null,t.badInput===n&&t.typeMismatch===r||u(e)}))}})),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function _n(e,t){return function(n,i){var o,a;if(w(n))return n;if(y(n)){if('"'===n.charAt(0)&&'"'===n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Ni.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=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},r(o,(function(e,n){n<t.length&&(a[t[n]]=+e)})),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function yn(e,t,n,r){return function(i,o,a,s,l,u,c){function d(e){return e&&!(e.getTime&&e.getTime()!=e.getTime())}function h(e){return g(e)&&!w(e)?n(e)||void 0:e}bn(0,o,0,s),vn(0,o,a,s,l,u);var f,p,v,_=s&&s.$options&&s.$options.timezone;s.$$parserName=e,s.$parsers.push((function(e){return s.$isEmpty(e)?null:t.test(e)?(e=n(e,f),_&&(e=B(e,_)),e):void 0})),s.$formatters.push((function(e){if(e&&!w(e))throw Lo("datefmt",e);return d(e)?((f=e)&&_&&(f=B(f,_,!0)),c("date")(e,r,_)):(f=null,"")})),(g(a.min)||a.ngMin)&&(s.$validators.min=function(e){return!d(e)||m(p)||n(e)>=p},a.$observe("min",(function(e){p=h(e),s.$validate()}))),(g(a.max)||a.ngMax)&&(s.$validators.max=function(e){return!d(e)||m(v)||n(e)<=v},a.$observe("max",(function(e){v=h(e),s.$validate()})))}}function bn(e,t,n,r){(r.$$hasNativeValidators=v(t[0].validity))&&r.$parsers.push((function(e){var n=t.prop("validity")||{};return n.badInput||n.typeMismatch?void 0:e}))}function wn(e){e.$$parserName="number",e.$parsers.push((function(t){return e.$isEmpty(t)?null:Fi.test(t)?parseFloat(t):void 0})),e.$formatters.push((function(t){if(!e.$isEmpty(t)){if(!b(t))throw Lo("numfmt",t);t=t.toString()}return t}))}function Ln(e){return g(e)&&!b(e)&&(e=parseFloat(e)),Vn(e)?void 0:e}function Mn(e){var t=e.toString(),n=t.indexOf(".");return-1===n?-1<e&&1>e&&(e=/e-(\d+)$/.exec(t))?Number(e[1]):0:t.length-n-1}function kn(e,t,n,r,i){if(g(r)){if(!(e=e(r)).constant)throw Lo("constexpr",n,r);return e(t)}return i}function xn(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[],r=0;e:for(;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i===t[o])continue e;n.push(i)}return n}function o(e){var t=[];return Wn(e)?(r(e,(function(e){t=t.concat(o(e))})),t):y(e)?e.split(" "):v(e)?(r(e,(function(e,n){e&&(t=t.concat(n.split(" ")))})),t):e}return{restrict:"AC",link:function(a,s,l){function u(e){e=c(e,1),l.$addClass(e)}function c(e,t){var n=s.data("$classCounts")||K(),i=[];return r(e,(function(e){(0<t||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(0<t)&&i.push(e))})),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);r=c(r,1),o=c(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function h(e){if(!0===t||(1&a.$index)===t){var n=o(e||[]);f?E(e,f)||d(o(f),n):u(n)}f=Wn(e)?e.map((function(e){return Q(e)})):Q(e)}var f;l.$observe("class",(function(t){h(a.$eval(l[e]))})),"ngClass"!==e&&a.$watch("$index",(function(e,n){var r=1&e;if(r!==(1&n)){var i=o(f);r===t?u(i):(r=c(i,-1),l.$removeClass(r))}})),a.$watch(l[e],h,!0)}}}]}function Sn(e){function t(e,t){t&&!o[e]?(l.addClass(i,e),o[e]=!0):!t&&o[e]&&(l.removeClass(i,e),o[e]=!1)}function n(e,n){e=e?"-"+U(e,"-"):"",t(vo+e,!0===n),t(_o+e,!1===n)}var r=e.ctrl,i=e.$element,o={},a=e.set,s=e.unset,l=e.$animate;o[_o]=!(o[vo]=i.hasClass(vo)),r.$setValidity=function(e,i,o){m(i)?(r.$pending||(r.$pending={}),a(r.$pending,e,o)):(r.$pending&&s(r.$pending,e,o),Tn(r.$pending)&&(r.$pending=void 0)),S(i)?i?(s(r.$error,e,o),a(r.$$success,e,o)):(a(r.$error,e,o),s(r.$$success,e,o)):(s(r.$error,e,o),s(r.$$success,e,o)),r.$pending?(t(wo,!0),r.$valid=r.$invalid=void 0,n("",null)):(t(wo,!1),r.$valid=Tn(r.$error),r.$invalid=!r.$valid,n("",r.$valid)),n(e,i=r.$pending&&r.$pending[e]?void 0:!r.$error[e]&&(!!r.$$success[e]||null)),r.$$parentForm.$setValidity(e,i,r)}}function Tn(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var $n,Dn,Cn,En,An=/^\/(.+)\/([a-z]*)$/,Pn=Object.prototype.hasOwnProperty,Yn=function(e){return y(e)?e.toLowerCase():e},On=function(e){return y(e)?e.toUpperCase():e},In=[].slice,jn=[].splice,Bn=[].push,Hn=Object.prototype.toString,Nn=Object.getPrototypeOf,Rn=t("ng"),zn=e.angular||(e.angular={}),Fn=0;$n=e.document.documentMode;var Vn=Number.isNaN||function(e){return e!=e};d.$inject=[],h.$inject=[];var Wn=Array.isArray,Un=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,qn=function(e){return y(e)?e.trim():e},Gn=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Zn=function(){if(!g(Zn.rules)){var t=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(t){var n=t.getAttribute("ng-csp")||t.getAttribute("data-ng-csp");Zn.rules={noUnsafeEval:!n||-1!==n.indexOf("no-unsafe-eval"),noInlineStyle:!n||-1!==n.indexOf("no-inline-style")}}else{t=Zn;try{new Function(""),n=!1}catch(e){n=!0}t.rules={noUnsafeEval:n,noInlineStyle:!1}}}return Zn.rules},Jn=function(){if(g(Jn.name_))return Jn.name_;var t,n,r,i,o=Kn.length;for(n=0;n<o;++n)if(r=Kn[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return Jn.name_=i},Xn=/:/g,Kn=["ng-","data-ng-","ng:","x-ng-"],Qn=function(e){var t;if(!(t=(t=e.currentScript)&&t.getAttribute("src")))return!0;var n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}(e.document),er=/[A-Z]/g,tr=!1,nr=3;ie.expando="ng339";var rr=ie.cache={},ir=1;ie._data=function(e){return this.cache[e[this.expando]]||{}};var or=/([:\-_]+(.))/g,ar=/^moz([A-Z])/,sr={mouseleave:"mouseout",mouseenter:"mouseover"},lr=t("jqLite"),ur=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,cr=/<|&#?\w+;/,dr=/<([\w:-]+)/,hr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,fr={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,"",""]};fr.optgroup=fr.option,fr.tbody=fr.tfoot=fr.colgroup=fr.caption=fr.thead,fr.th=fr.td;var pr=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},mr=ie.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),ie(e).on("load",n))},toString:function(){var e=[];return r(this,(function(t){e.push(""+t)})),"["+e.join(", ")+"]"},eq:function(e){return Dn(0<=e?this[e]:this[this.length+e])},length:0,push:Bn,sort:[].sort,splice:[].splice},gr={};r("multiple selected checked disabled readOnly required open".split(" "),(function(e){gr[Yn(e)]=e}));var vr={};r("input select option textarea button form details".split(" "),(function(e){vr[e]=!0}));var _r={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:ce,removeData:le,hasData:function(e){for(var t in rr[e.ng339])return!0;return!1},cleanData:function(e){for(var t=0,n=e.length;t<n;t++)le(e[t])}},(function(e,t){ie[t]=e})),r({data:ce,inheritedData:ge,scope:function(e){return Dn.data(e,"$scope")||ge(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Dn.data(e,"$isolateScope")||Dn.data(e,"$isolateScopeNoTemplate")},controller:me,injector:function(e){return ge(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:de,css:function(e,t,n){if(t=ee(t),!g(n))return e.style[t];e.style[t]=n},attr:function(e,t,n){var r=e.nodeType;if(r!==nr&&2!==r&&8!==r)if(r=Yn(t),gr[r]){if(!g(n))return e[t]||(e.attributes.getNamedItem(t)||d).specified?r:void 0;n?(e[t]=!0,e.setAttribute(t,r)):(e[t]=!1,e.removeAttribute(r))}else if(g(n))e.setAttribute(t,n);else if(e.getAttribute)return null===(e=e.getAttribute(t,2))?void 0:e},prop:function(e,t,n){if(!g(n))return e[t];e[t]=n},text:function(){function e(e,t){if(m(t)){var n=e.nodeType;return 1===n||n===nr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(m(t)){if(e.multiple&&"select"===$(e)){var n=[];return r(e.options,(function(e){e.selected&&n.push(e.value||e.text)})),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(m(t))return e.innerHTML;ae(e,!0),e.innerHTML=t},empty:ve},(function(e,t){ie.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==ve&&m(2===e.length&&e!==de&&e!==me?t:n)){if(v(t)){for(r=0;r<o;r++)if(e===ce)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(o=m(r=e.$dv)?Math.min(o,1):o,i=0;i<o;i++){var a=e(this[i],t,n);r=r?r+a:a}return r}for(r=0;r<o;r++)e(this[r],t,n);return this}})),r({removeData:le,on:function(e,t,n,r){if(g(r))throw lr("onargs");if(te(e)){var i=(r=ue(e,!0)).events,o=r.handle;o||(o=r.handle=function(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped};var s=i.specialHandlerWrapper||be;1<o&&(i=Q(i));for(var l=0;l<o;l++)n.isImmediatePropagationStopped()||s(e,n,i[l])}};return n.elem=e,n}(e,i));for(var a=(r=0<=t.indexOf(" ")?t.split(" "):[t]).length,s=function(t,r,a){var s=i[t];s||((s=i[t]=[]).specialHandlerWrapper=r,"$destroy"===t||a||e.addEventListener(t,o,!1)),s.push(n)};a--;)t=r[a],sr[t]?(s(sr[t],we),s(t,void 0,!0)):s(t)}},off:se,one:function(e,t,n){(e=Dn(e)).on(t,(function r(){e.off(t,n),e.off(t,r)})),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;ae(e),r(new ie(t),(function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t}))},children:function(e){var t=[];return r(e.childNodes,(function(e){1===e.nodeType&&t.push(e)})),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){if(1===(n=e.nodeType)||11===n)for(var n=0,r=(t=new ie(t)).length;n<r;n++)e.appendChild(t[n])},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;r(new ie(t),(function(t){e.insertBefore(t,n)}))}},wrap:function(e,t){re(e,Dn(t).eq(0).clone()[0])},remove:_e,detach:function(e){_e(e,!0)},after:function(e,t){var n=e,r=e.parentNode;if(r)for(var i=0,o=(t=new ie(t)).length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:fe,removeClass:he,toggleClass:function(e,t,n){t&&r(t.split(" "),(function(t){var r=n;m(r)&&(r=!de(e,t)),(r?fe:he)(e,t)}))},parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:oe,triggerHandler:function(e,t,n){var i,o,a=t.type||t,s=ue(e);(s=(s=s&&s.events)&&s[a])&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:d,type:a,target:e},t.type&&(i=l(i,t)),t=Q(s),o=n?[i].concat(n):[i],r(t,(function(t){i.isImmediatePropagationStopped()||t.apply(e,o)})))}},(function(e,t){ie.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)m(i)?g(i=e(this[o],t,n,r))&&(i=Dn(i)):pe(i,e(this[o],t,n,r));return g(i)?i:this}})),ie.prototype.bind=ie.prototype.on,ie.prototype.unbind=ie.prototype.off,ke.prototype={put:function(e,t){this[Me(e,this.nextUid)]=t},get:function(e){return this[Me(e,this.nextUid)]},remove:function(e){var t=this[e=Me(e,this.nextUid)];return delete this[e],t}};var yr=[function(){this.$get=[function(){return ke}]}],br=/^([^(]+?)=>/,wr=/^[^(]*\(\s*([^)]*)\)/m,Lr=/,/,Mr=/^\s*(_?)(\S+?)\1\s*$/,kr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,xr=t("$injector");Se.$$annotate=function(e,t,n){var i;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw y(n)&&n||(n=e.name||function(e){return(e=xe(e))?"function("+(e[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}(e)),xr("strictdi",n);r((t=xe(e))[1].split(Lr),(function(e){e.replace(Mr,(function(e,t,n){i.push(n)}))}))}e.$inject=i}}else Wn(e)?(G(e[t=e.length-1],"fn"),i=e.slice(0,t)):G(e,"fn",!0);return i};var Sr=t("$animate"),Tr=function(){this.$get=d},$r=function(){var e=new ke,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&r(t=y(t)?t.split(" "):Wn(t)?t:[],(function(t){t&&(i=!0,e[t]=n)})),i}function a(){r(t,(function(t){var n=e.get(t);if(n){var i=function(e){y(e)&&(e=e.split(" "));var t=K();return r(e,(function(e){e.length&&(t[e]=!0)})),t}(t.attr("class")),o="",a="";r(n,(function(e,t){e!==!!i[t]&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)})),r(t,(function(e){o&&fe(e,o),a&&he(e,a)})),e.remove(t)}})),t.length=0}return{enabled:d,on:d,off:d,pin:d,push:function(r,s,l,u){return u&&u(),(l=l||{}).from&&r.css(l.from),l.to&&r.css(l.to),(l.addClass||l.removeClass)&&(s=l.addClass,u=l.removeClass,s=o(l=e.get(r)||{},s,!0),u=o(l,u,!1),(s||u)&&(e.put(r,l),t.push(r),1===t.length&&i.$$postDigest(a))),(r=new n).complete(),r}}}]},Dr=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Sr("notcsel",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Sr("nongcls","ng-animate");return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r;e:{for(r=0;r<n.length;r++){var i=n[r];if(1===i.nodeType){r=i;break e}}r=void 0}!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.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(n,r,i,o){return r=r&&Dn(r),i=i&&Dn(i),t(n,r=r||i.parent(),i),e.push(n,"enter",De(o))},move:function(n,r,i,o){return r=r&&Dn(r),i=i&&Dn(i),t(n,r=r||i.parent(),i),e.push(n,"move",De(o))},leave:function(t,n){return e.push(t,"leave",De(n),(function(){t.remove()}))},addClass:function(t,n,r){return(r=De(r)).addClass=$e(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return(r=De(r)).removeClass=$e(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return(i=De(i)).addClass=$e(i.addClass,n),i.removeClass=$e(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return(o=De(o)).from=o.from?l(o.from,n):n,o.to=o.to?l(o.to,r):r,o.tempClasses=$e(o.tempClasses,i||"ng-inline-animate"),e.push(t,"animate",o)}}}]}],Cr=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),1<n.length||e((function(){for(var e=0;e<n.length;e++)n[e]();n=[]}))}var n=[];return function(){var e=!1;return t((function(){e=!0})),function(n){e?n():t(n)}}}]},Er=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,i,o){function a(e){this.setHost(e);var t=n();this._doneCallbacks=[],this._tick=function(e){var n=i[0];n&&n.hidden?o(e,0,!1):t(e)},this._state=0}return a.chain=function(e,t){var n=0;!function r(){n===e.length?t(!0):e[n]((function(e){!1===e?t(!1):(n++,r())}))}()},a.all=function(e,t){function n(n){o=o&&n,++i===e.length&&t(o)}var i=0,o=!0;r(e,(function(e){e.done(n)}))},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:d,getPromise:function(){if(!this.promise){var t=this;this.promise=e((function(e,n){t.done((function(t){!1===t?n():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&&(r(this._doneCallbacks,(function(t){t(e)})),this._doneCallbacks.length=0,this._state=2)}},a}]},Ar=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,r){function i(){return e((function(){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),a||s.complete(),a=!0})),s}var o=r||{};o.$$prepared||(o=C(o)),o.cleanupStyles&&(o.from=o.to=null),o.from&&(t.css(o.from),o.from=null);var a,s=new n;return{start:i,end:i}}}]},Pr=t("$compile"),Yr=new function(){};Ye.$inject=["$provide","$$sanitizeUriProvider"],Oe.prototype.isFirstChange=function(){return this.previousValue===Yr};var Or=/^((?:x|data)[:\-_])/i,Ir=t("$controller"),jr=/^(\S+)(\s+as\s+([\w$]+))?$/,Br=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Dn&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Hr="application/json",Nr={"Content-Type":Hr+";charset=utf-8"},Rr=/^\[|^\{(?!\{)/,zr={"[":/]$/,"{":/}$/},Fr=/^\)]\}',?\n/,Vr=t("$http"),Wr=function(e){return function(){throw Vr("legacy",e)}},Ur=zn.$interpolateMinErr=t("$interpolate");Ur.throwNoconcat=function(e){throw Ur("noconcat",e)},Ur.interr=function(e,t){return Ur("interr",e,t.toString())};var qr=function(){this.$get=["$window",function(e){var t=e.angular.callbacks,n={};return{createCallback:function(e){var r="angular.callbacks."+(e="_"+(t.$$counter++).toString(36)),i=function(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}(e);return n[r]=t[e]=i,r},wasCalled:function(e){return n[e].called},getResponse:function(e){return n[e].data},removeCallback:function(e){delete t[n[e].id],delete n[e]}}}]},Gr=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Zr={http:80,https:443,ftp:21},Jr=t("$location"),Xr=/^\s*[\\/]{2,}/,Kr={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:ct("$$absUrl"),url:function(e){if(m(e))return this.$$url;var t=Gr.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:ct("$$protocol"),host:ct("$$host"),port:ct("$$port"),path:dt("$$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(y(e)||b(e))e=e.toString(),this.$$search=R(e);else{if(!v(e))throw Jr("isrcharg");r(e=C(e,{}),(function(t,n){null==t&&delete e[n]})),this.$$search=e}break;default:m(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:dt("$$hash",(function(e){return null!==e?e.toString():""})),replace:function(){return this.$$replace=!0,this}};r([ut,lt,st],(function(e){e.prototype=Object.create(Kr),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==st||!this.$$html5)throw Jr("nostate");return this.$$state=m(t)?null:t,this}}));var Qr=t("$parse"),ei=[].constructor,ti=(!1).constructor,ni=Function.constructor,ri=(0).constructor,ii={}.constructor,oi="".constructor,ai=ei.prototype,si=ti.prototype,li=ni.prototype,ui=ri.prototype,ci=ii.prototype,di=oi.prototype,hi=li.call,fi=li.apply,pi=li.bind,mi=ci.valueOf,gi=K();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),(function(e){gi[e]=!0}));var vi={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},_i=function(e){this.options=e};_i.prototype={constructor:_i,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;)if('"'===(e=this.text.charAt(this.index))||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var t=e+this.peek(),n=t+this.peek(2),r=gi[t],i=gi[n];gi[e]||r||i?(e=i?n:r?t:e,this.tokens.push({index:this.index,text:e,operator:!0}),this.index+=e.length):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){return e=e||1,this.index+e<this.text.length&&this.text.charAt(this.index+e)},isNumber:function(e){return"0"<=e&&"9">=e&&"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&&"z">=e||"A"<=e&&"Z">=e||"_"===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 n=e.charCodeAt(0),r=t.charCodeAt(0);return 55296<=n&&56319>=n&&56320<=r&&57343>=r?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){throw n=n||this.index,t=g(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n,Qr("lexerr",e,t,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Yn(this.text.charAt(this.index));if("."===n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"===n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"===e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"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 n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i)"u"===o?((i=this.text.substring(this.index+1,this.index+5)).match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+i+"]"),this.index+=4,n+=String.fromCharCode(parseInt(i,16))):n+=vi[o]||o,i=!1;else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var yi=function(e,t){this.lexer=e,this.options=t};yi.Program="Program",yi.ExpressionStatement="ExpressionStatement",yi.AssignmentExpression="AssignmentExpression",yi.ConditionalExpression="ConditionalExpression",yi.LogicalExpression="LogicalExpression",yi.BinaryExpression="BinaryExpression",yi.UnaryExpression="UnaryExpression",yi.CallExpression="CallExpression",yi.MemberExpression="MemberExpression",yi.Identifier="Identifier",yi.Literal="Literal",yi.ArrayExpression="ArrayExpression",yi.Property="Property",yi.ObjectExpression="ObjectExpression",yi.ThisExpression="ThisExpression",yi.LocalsExpression="LocalsExpression",yi.NGValueParameter="NGValueParameter",yi.prototype={ast:function(e){return this.text=e,this.tokens=this.lexer.lex(e),e=this.program(),0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e},program:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:yi.Program,body:e}},expressionStatement:function(){return{type:yi.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();if(this.expect("=")){if(!Mt(e))throw Qr("lval");e={type:yi.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:yi.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:yi.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:yi.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:yi.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:yi.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:yi.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:yi.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:yi.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e,t;for(this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=C(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:yi.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());t=this.expect("(","[",".");)"("===t.text?(e={type:yi.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:yi.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:yi.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){e=[e];for(var t={type:yi.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return t},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do{e.push(this.filterChain())}while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:yi.Identifier,name:e.text}},constant:function(){return{type:yi.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:yi.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:yi.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:yi.ObjectExpression,properties:t}},throwError:function(e,t){throw Qr("syntax",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Qr("ueoe",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 Qr("ueoe",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=(e=this.tokens[e]).text;if(o===t||o===n||o===r||o===i||!(t||n||r||i))return e}return!1},expect:function(e,t,n,r){return!!(e=this.peek(e,t,n,r))&&(this.tokens.shift(),e)},selfReferential:{this:{type:yi.ThisExpression},$locals:{type:yi.LocalsExpression}}},St.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},wt(i,n.$filter);var o,a="";return this.stage="assign",(o=kt(i))&&(this.state.computing="assign",a=this.nextId(),this.recurse(o,a),this.return_(a),a="fn.assign="+this.generateFunction("assign","s,v,l")),o=Lt(i.body),n.stage="inputs",r(o,(function(e,t){var r="fn"+t;n.state[r]={vars:[],body:[],own:{}},n.state.computing=r;var i=n.nextId();n.recurse(e,i),n.return_(i),n.state.inputs.push(r),e.watchId=t})),this.state.computing="fn",this.stage="main",this.recurse(i),a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",a=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",a)(this.$filter,pt,gt,vt,mt,_t,yt,bt,e),this.state=this.stage=void 0,a.literal=xt(i),a.constant=i.constant,a},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return r(t,(function(t){e.push("var "+t+"="+n.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 r(this.state.filters,(function(n,r){e.push(n+"=$filter("+t.escape(r)+")")})),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,n,i,o,a){var s,l,u,c,h,f=this;if(i=i||d,!a&&g(e.watchId))t=t||this.nextId(),this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,i,o,!0));else switch(e.type){case yi.Program:r(e.body,(function(t,n){f.recurse(t.expression,void 0,void 0,(function(e){l=e})),n!==e.body.length-1?f.current().body.push(l,";"):f.return_(l)}));break;case yi.Literal:c=this.escape(e.value),this.assign(t,c),i(c);break;case yi.UnaryExpression:this.recurse(e.argument,void 0,void 0,(function(e){l=e})),c=e.operator+"("+this.ifDefined(l,0)+")",this.assign(t,c),i(c);break;case yi.BinaryExpression:this.recurse(e.left,void 0,void 0,(function(e){s=e})),this.recurse(e.right,void 0,void 0,(function(e){l=e})),c="+"===e.operator?this.plus(s,l):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(l,0):"("+s+")"+e.operator+"("+l+")",this.assign(t,c),i(c);break;case yi.LogicalExpression:t=t||this.nextId(),f.recurse(e.left,t),f.if_("&&"===e.operator?t:f.not(t),f.lazyRecurse(e.right,t)),i(t);break;case yi.ConditionalExpression:t=t||this.nextId(),f.recurse(e.test,t),f.if_(t,f.lazyRecurse(e.alternate,t),f.lazyRecurse(e.consequent,t)),i(t);break;case yi.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===f.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),pt(e.name),f.if_("inputs"===f.stage||f.not(f.getHasOwnProperty("l",e.name)),(function(){f.if_("inputs"===f.stage||"s",(function(){o&&1!==o&&f.if_(f.not(f.nonComputedMember("s",e.name)),f.lazyAssign(f.nonComputedMember("s",e.name),"{}")),f.assign(t,f.nonComputedMember("s",e.name))}))}),t&&f.lazyAssign(t,f.nonComputedMember("l",e.name))),(f.state.expensiveChecks||$t(e.name))&&f.addEnsureSafeObject(t),i(t);break;case yi.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),f.recurse(e.object,s,void 0,(function(){f.if_(f.notNull(s),(function(){o&&1!==o&&f.addEnsureSafeAssignContext(s),e.computed?(l=f.nextId(),f.recurse(e.property,l),f.getStringValue(l),f.addEnsureSafeMemberName(l),o&&1!==o&&f.if_(f.not(f.computedMember(s,l)),f.lazyAssign(f.computedMember(s,l),"{}")),c=f.ensureSafeObject(f.computedMember(s,l)),f.assign(t,c),n&&(n.computed=!0,n.name=l)):(pt(e.property.name),o&&1!==o&&f.if_(f.not(f.nonComputedMember(s,e.property.name)),f.lazyAssign(f.nonComputedMember(s,e.property.name),"{}")),c=f.nonComputedMember(s,e.property.name),(f.state.expensiveChecks||$t(e.property.name))&&(c=f.ensureSafeObject(c)),f.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))}),(function(){f.assign(t,"undefined")})),i(t)}),!!o);break;case yi.CallExpression:t=t||this.nextId(),e.filter?(l=f.filter(e.callee.name),u=[],r(e.arguments,(function(e){var t=f.nextId();f.recurse(e,t),u.push(t)})),c=l+"("+u.join(",")+")",f.assign(t,c),i(t)):(l=f.nextId(),s={},u=[],f.recurse(e.callee,l,s,(function(){f.if_(f.notNull(l),(function(){f.addEnsureSafeFunction(l),r(e.arguments,(function(e){f.recurse(e,f.nextId(),void 0,(function(e){u.push(f.ensureSafeObject(e))}))})),s.name?(f.state.expensiveChecks||f.addEnsureSafeObject(s.context),c=f.member(s.context,s.name,s.computed)+"("+u.join(",")+")"):c=l+"("+u.join(",")+")",c=f.ensureSafeObject(c),f.assign(t,c)}),(function(){f.assign(t,"undefined")})),i(t)})));break;case yi.AssignmentExpression:l=this.nextId(),s={},this.recurse(e.left,void 0,s,(function(){f.if_(f.notNull(s.context),(function(){f.recurse(e.right,l),f.addEnsureSafeObject(f.member(s.context,s.name,s.computed)),f.addEnsureSafeAssignContext(s.context),c=f.member(s.context,s.name,s.computed)+e.operator+l,f.assign(t,c),i(t||c)}))}),1);break;case yi.ArrayExpression:u=[],r(e.elements,(function(e){f.recurse(e,f.nextId(),void 0,(function(e){u.push(e)}))})),c="["+u.join(",")+"]",this.assign(t,c),i(c);break;case yi.ObjectExpression:u=[],h=!1,r(e.properties,(function(e){e.computed&&(h=!0)})),h?(t=t||this.nextId(),this.assign(t,"{}"),r(e.properties,(function(e){e.computed?(s=f.nextId(),f.recurse(e.key,s)):s=e.key.type===yi.Identifier?e.key.name:""+e.key.value,l=f.nextId(),f.recurse(e.value,l),f.assign(f.member(t,s,e.computed),l)}))):(r(e.properties,(function(t){f.recurse(t.value,e.constant?void 0:f.nextId(),void 0,(function(e){u.push(f.escape(t.key.type===yi.Identifier?t.key.name:""+t.key.value)+":"+e)}))})),c="{"+u.join(",")+"}",this.assign(t,c)),i(t||c);break;case yi.ThisExpression:this.assign(t,"s"),i("s");break;case yi.LocalsExpression:this.assign(t,"l"),i("l");break;case yi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},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,n){if(!0===e)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?e+"."+t:e+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?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,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.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(y(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(b(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 Qr("esc")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},Tt.prototype={compile:function(e,t){var n,i,o,a=this,s=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,wt(s,a.$filter),(n=kt(s))&&(i=this.recurse(n)),(n=Lt(s.body))&&(o=[],r(n,(function(e,t){var n=a.recurse(e);e.input=n,o.push(n),e.watchId=t})));var l=[];return r(s.body,(function(e){l.push(a.recurse(e.expression))})),n=0===s.body.length?d:1===s.body.length?l[0]:function(e,t){var n;return r(l,(function(r){n=r(e,t)})),n},i&&(n.assign=function(e,t,n){return i(e,n,t)}),o&&(n.inputs=o),n.literal=xt(s),n.constant=s.constant,n},recurse:function(e,t,n){var i,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case yi.Literal:return this.value(e.value,t);case yi.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case yi.BinaryExpression:case yi.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case yi.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case yi.Identifier:return pt(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||$t(e.name),t,n,s.expression);case yi.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(pt(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n,s.expression):this.nonComputedMember(i,o,s.expensiveChecks,t,n,s.expression);case yi.CallExpression:return a=[],r(e.arguments,(function(e){a.push(s.recurse(e))})),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,r,i){for(var s=[],l=0;l<a.length;++l)s.push(a[l](e,n,r,i));return e=o.apply(void 0,s,i),t?{context:void 0,name:void 0,value:e}:e}:function(e,n,r,i){var l,u=o(e,n,r,i);if(null!=u.value){gt(u.context,s.expression),vt(u.value,s.expression),l=[];for(var c=0;c<a.length;++c)l.push(gt(a[c](e,n,r,i),s.expression));l=gt(u.value.apply(u.context,l),s.expression)}return t?{value:l}:l};case yi.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var l=i(e,n,r,a);return e=o(e,n,r,a),gt(l.value,s.expression),_t(l.context),l.context[l.name]=e,t?{value:e}:e};case yi.ArrayExpression:return a=[],r(e.elements,(function(e){a.push(s.recurse(e))})),function(e,n,r,i){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,r,i));return t?{value:o}:o};case yi.ObjectExpression:return a=[],r(e.properties,(function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===yi.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})})),function(e,n,r,i){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,r,i)]=a[s].value(e,n,r,i):o[a[s].key]=a[s].value(e,n,r,i);return t?{value:o}:o};case yi.ThisExpression:return function(e){return t?{value:e}:e};case yi.LocalsExpression:return function(e,n){return t?{value:n}:n};case yi.NGValueParameter:return function(e,n,r){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,o){return n=g(n=e(n,r,i,o))?+n:0,t?{value:n}:n}},"unary-":function(e,t){return function(n,r,i,o){return n=g(n=e(n,r,i,o))?-n:0,t?{value:n}:n}},"unary!":function(e,t){return function(n,r,i,o){return n=!e(n,r,i,o),t?{value:n}:n}},"binary+":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a);return s=bt(s,r=t(r,i,o,a)),n?{value:s}:s}},"binary-":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a);return r=t(r,i,o,a),s=(g(s)?s:0)-(g(r)?r:0),n?{value:s}:s}},"binary*":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)*t(r,i,o,a),n?{value:r}:r}},"binary/":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)/t(r,i,o,a),n?{value:r}:r}},"binary%":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)%t(r,i,o,a),n?{value:r}:r}},"binary===":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)===t(r,i,o,a),n?{value:r}:r}},"binary!==":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)!==t(r,i,o,a),n?{value:r}:r}},"binary==":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)==t(r,i,o,a),n?{value:r}:r}},"binary!=":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)!=t(r,i,o,a),n?{value:r}:r}},"binary<":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)<t(r,i,o,a),n?{value:r}:r}},"binary>":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)>t(r,i,o,a),n?{value:r}:r}},"binary<=":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)<=t(r,i,o,a),n?{value:r}:r}},"binary>=":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)>=t(r,i,o,a),n?{value:r}:r}},"binary&&":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)&&t(r,i,o,a),n?{value:r}:r}},"binary||":function(e,t,n){return function(r,i,o,a){return r=e(r,i,o,a)||t(r,i,o,a),n?{value:r}:r}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){return i=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s),r?{value:i}:i}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,r,i){return function(o,a,s,l){return o=a&&e in a?a:o,r&&1!==r&&o&&!o[e]&&(o[e]={}),a=o?o[e]:void 0,t&&gt(a,i),n?{context:o,name:e,value:a}:a}},computedMember:function(e,t,n,r,i){return function(o,a,s,l){var u,c,d=e(o,a,s,l);return null!=d&&(u=t(o,a,s,l),pt(u+="",i),r&&1!==r&&(_t(d),d&&!d[u]&&(d[u]={})),gt(c=d[u],i)),n?{context:d,name:u,value:c}:c}},nonComputedMember:function(e,t,n,r,i,o){return function(a,s,l,u){return a=e(a,s,l,u),i&&1!==i&&(_t(a),a&&!a[t]&&(a[t]={})),s=null!=a?a[t]:void 0,(n||$t(t))&&gt(s,o),r?{context:a,name:t,value:s}:s}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var bi=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new yi(e,n),this.astCompiler=n.csp?new Tt(this.ast,t):new St(this.ast,t)};bi.prototype={constructor:bi,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var wi=t("$sce"),Li={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Mi=t("$compile"),ki=e.document.createElement("a"),xi=Vt(e.location.href);qt.$inject=["$document"],Zt.$inject=["$provide"];var Si=22,Ti=".",$i="0";Qt.$inject=["$locale"],en.$inject=["$locale"];var Di={yyyy:rn("FullYear",4,0,!1,!0),yy:rn("FullYear",2,0,!0,!0),y:rn("FullYear",1,0,!1,!0),MMMM:on("Month"),MMM:on("Month",!0),MM:rn("Month",2,1),M:rn("Month",1,1),LLLL:on("Month",!1,!0),dd:rn("Date",2),d:rn("Date",1),HH:rn("Hours",2),H:rn("Hours",1),hh:rn("Hours",2,-12),h:rn("Hours",1,-12),mm:rn("Minutes",2),m:rn("Minutes",1),ss:rn("Seconds",2),s:rn("Seconds",1),sss:rn("Milliseconds",3),EEEE:on("Day"),EEE:on("Day",!0),a:function(e,t){return 12>e.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,n){return(0<=(e=-1*n)?"+":"")+(nn(Math[0<e?"floor":"ceil"](e/60),2)+nn(Math.abs(e%60),2))},ww:sn(2),w:sn(1),G:ln,GG:ln,GGG:ln,GGGG:function(e,t){return 0>=e.getFullYear()?t.ERANAMES[0]:t.ERANAMES[1]}},Ci=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ei=/^-?\d+$/;un.$inject=["$locale"];var Ai=f(Yn),Pi=f(On);fn.$inject=["$parse"];var Yi=f({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Hn.call(t.prop("href"))?"xlink:href":"href";t.on("click",(function(e){t.attr(n)||e.preventDefault()}))}}}}),Oi={};r(gr,(function(e,t){function n(e,n,i){e.$watch(i[r],(function(e){i.$set(t,!!e)}))}if("multiple"!==e){var r=Ie("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,0,i)}),Oi[r]=function(){return{restrict:"A",priority:100,link:i}}}})),r(_r,(function(e,t){Oi[t]=function(){return{priority:100,link:function(e,n,r){"ngPattern"===t&&"/"===r.ngPattern.charAt(0)&&(n=r.ngPattern.match(An))?r.$set("ngPattern",new RegExp(n[1],n[2])):e.$watch(r[t],(function(e){r.$set(t,e)}))}}}})),r(["src","srcset","href"],(function(e){var t=Ie("ng-"+e);Oi[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Hn.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,(function(t){t?(i.$set(a,t),$n&&o&&r.prop(o,i[a])):"href"===e&&i.$set(a,null)}))}}}}));var Ii={$addControl:d,$$renameControl:function(e,t){e.$name=t},$removeControl:d,$setValidity:d,$setDirty:d,$setPristine:d,$setSubmitted:d};mn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ji=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||d}return{name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:mn,compile:function(n,i){n.addClass(yo).addClass(vo);var o=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,n,i,a){var s=a[0];if(!("action"in i)){var u=function(t){e.$apply((function(){s.$commitViewValue(),s.$setSubmitted()})),t.preventDefault()};n[0].addEventListener("submit",u,!1),n.on("$destroy",(function(){t((function(){n[0].removeEventListener("submit",u,!1)}),0,!1)}))}(a[1]||s.$$parentForm).$addControl(s);var c=o?r(s.$name):d;o&&(c(e,s),i.$observe(o,(function(t){s.$name!==t&&(c(e,void 0),s.$$parentForm.$$renameControl(s,t),(c=r(s.$name))(e,s))}))),n.on("$destroy",(function(){s.$$parentForm.$removeControl(s),c(e,void 0),l(s,Ii)}))}}}}}]},Bi=ji(),Hi=ji(!0),Ni=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Ri=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,zi=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Fi=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Vi=/^(\d{4,})-(\d{2})-(\d{2})$/,Wi=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ui=/^(\d{4,})-W(\d\d)$/,qi=/^(\d{4,})-(\d\d)$/,Gi=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zi=K();r(["date","datetime-local","month","time","week"],(function(e){Zi[e]=!0}));var Ji={text:function(e,t,n,r,i,o){vn(0,t,n,r,i,o),gn(r)},date:yn("date",Vi,_n(Vi,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":yn("datetimelocal",Wi,_n(Wi,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:yn("time",Gi,_n(Gi,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:yn("week",Ui,(function(e,t){if(w(e))return e;if(y(e)){Ui.lastIndex=0;var n=Ui.exec(e);if(n){var r=+n[1],i=+n[2],o=n=0,a=0,s=0,l=an(r);return i=7*(i-1),t&&(n=t.getHours(),o=t.getMinutes(),a=t.getSeconds(),s=t.getMilliseconds()),new Date(r,0,l.getDate()+i,n,o,a,s)}}return NaN}),"yyyy-Www"),month:yn("month",qi,_n(qi,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,n,r,i,o){var a,s;bn(0,t,0,r),vn(0,t,n,r,i,o),wn(r),(g(n.min)||n.ngMin)&&(r.$validators.min=function(e){return r.$isEmpty(e)||m(a)||e>=a},n.$observe("min",(function(e){a=Ln(e),r.$validate()}))),(g(n.max)||n.ngMax)&&(r.$validators.max=function(e){return r.$isEmpty(e)||m(s)||e<=s},n.$observe("max",(function(e){s=Ln(e),r.$validate()})))},url:function(e,t,n,r,i,o){vn(0,t,n,r,i,o),gn(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||Ri.test(n)}},email:function(e,t,n,r,i,o){vn(0,t,n,r,i,o),gn(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||zi.test(n)}},radio:function(e,t,n,r){m(n.name)&&t.attr("name",++Fn),t.on("click",(function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)})),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},range:function(e,t,n,r,i,o){function a(e,r){t.attr(e,n[e]),n.$observe(e,r)}bn(0,t,0,r),wn(r),vn(0,t,n,r,i,o);var s=r.$$hasNativeValidators&&"range"===t[0].type,l=s?0:void 0,u=s?100:void 0,c=s?1:void 0,d=t[0].validity;e=g(n.min),i=g(n.max),o=g(n.step);var h=r.$render
-;r.$render=s&&g(d.rangeUnderflow)&&g(d.rangeOverflow)?function(){h(),r.$setViewValue(t.val())}:h,e&&(r.$validators.min=s?function(){return!0}:function(e,t){return r.$isEmpty(t)||m(l)||t>=l},a("min",(function(e){l=Ln(e),Vn(r.$modelValue)||(s?(e=t.val(),l>e&&(e=l,t.val(e)),r.$setViewValue(e)):r.$validate())}))),i&&(r.$validators.max=s?function(){return!0}:function(e,t){return r.$isEmpty(t)||m(u)||t<=u},a("max",(function(e){u=Ln(e),Vn(r.$modelValue)||(s?(e=t.val(),u<e&&(t.val(u),e=u<l?l:u),r.$setViewValue(e)):r.$validate())}))),o&&(r.$validators.step=s?function(){return!d.stepMismatch}:function(e,t){var n;if(!(n=r.$isEmpty(t)||m(c))){n=l||0;var i=c;if((0|(a=Number(t)))!==a||(0|n)!==n||(0|i)!==i){var o=Math.max(Mn(a),Mn(n),Mn(i)),a=a*(o=Math.pow(10,o));n*=o,i*=o}n=0==(a-n)%i}return n},a("step",(function(e){c=Ln(e),Vn(r.$modelValue)||(s&&r.$viewValue!==t.val()?r.$setViewValue(t.val()):r.$validate())})))},checkbox:function(e,t,n,r,i,o,a,s){var l=kn(s,e,"ngTrueValue",n.ngTrueValue,!0),u=kn(s,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",(function(e){r.$setViewValue(t[0].checked,e&&e.type)})),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return!1===e},r.$formatters.push((function(e){return E(e,l)})),r.$parsers.push((function(e){return e?l:u}))},hidden:d,button:d,submit:d,reset:d,file:d},Xi=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){if(s[0]){var l=Yn(a.type);"range"!==l||a.hasOwnProperty("ngInputRange")||(l="text"),(Ji[l]||Ji.text)(i,o,a,s[0],t,e,n,r)}}}}}],Ki=/^(true|false|\d+)$/,Qi=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ki.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,(function(e){n.$set("value",e)}))}}}},eo=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,(function(e){n.textContent=m(e)?"":e}))}}}}],to=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){n=e(r.attr(i.$attr.ngBindTemplate)),t.$$addBindingInfo(r,n.expressions),r=r[0],i.$observe("ngBindTemplate",(function(e){r.textContent=m(e)?"":e}))}}}}],no=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,(function(t){return e.valueOf(t)}));return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,(function(){var n=o(t);r.html(e.getTrustedHtml(n)||"")}))}}}}],ro=f({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push((function(){e.$eval(n.ngChange)}))}}),io=xn("",!0),oo=xn("Odd",0),ao=xn("Even",1),so=pn({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),lo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],uo={},co={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),(function(e){var t=Ie("ng-"+e);uo[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,(function(n){var i=function(){a(t,{$event:n})};co[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)}))}}}}]}));var ho=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,u;n.$watch(i.ngIf,(function(n){n?l||a((function(n,o){l=o,n[n.length++]=t.$$createComment("end ngIf",i.ngIf),s={clone:n},e.enter(n,r.parent(),r)})):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=X(s.clone),e.leave(u).done((function(e){!1!==e&&(u=null)})),s=null))}))}}}],fo=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:zn.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,l,u,c){var d,h,f,p=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),f&&(n.leave(f).done((function(e){!1!==e&&(h=null)})),h=f,f=null)};r.$watch(o,(function(o){var l=function(e){!1===e||!g(s)||s&&!r.$eval(s)||t()},h=++p;o?(e(o,!0).then((function(e){if(!r.$$destroyed&&h===p){var t=r.$new();u.template=e,e=c(t,(function(e){m(),n.enter(e,null,i).done(l)})),f=e,(d=t).$emit("$includeContentLoaded",o),r.$eval(a)}}),(function(){r.$$destroyed||h!==p||(m(),r.$emit("$includeContentError",o))})),r.$emit("$includeContentRequested",o)):(m(),u.template=null)}))}}}}],po=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){Hn.call(r[0]).match(/SVG/)?(r.empty(),t(ne(o.template,e.document).childNodes)(n,(function(e){r.append(e)}),{futureParentElement:r})):(r.html(o.template),t(r.contents())(n))}}}],mo=pn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),go=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?qn(o):o;i.$parsers.push((function(e){if(!m(e)){var t=[];return e&&r(e.split(s),(function(e){e&&t.push(a?qn(e):e)})),t}})),i.$formatters.push((function(e){if(Wn(e))return e.join(o)})),i.$isEmpty=function(e){return!e||!e.length}}}},vo="ng-valid",_o="ng-invalid",yo="ng-pristine",bo="ng-dirty",wo="ng-pending",Lo=t("ngModel"),Mo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,i,o,a,s,l,u,c){this.$modelValue=this.$viewValue=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=c(n.name||"",!1)(e),this.$$parentForm=Ii;var h,f=o(n.ngModel),p=f.assign,v=f,_=p,y=null,w=this;this.$$setOptions=function(e){if((w.$options=e)&&e.getterSetter){var t=o(n.ngModel+"()"),r=o(n.ngModel+"($$$p)");v=function(e){var n=f(e);return L(n)&&(n=t(e)),n},_=function(e,t){L(f(e))?r(e,{$$$p:t}):p(e,t)}}else if(!f.assign)throw Lo("nonassign",n.ngModel,H(i))},this.$render=d,this.$isEmpty=function(e){return m(e)||""===e||null===e||e!=e},this.$$updateEmptyClasses=function(e){w.$isEmpty(e)?(a.removeClass(i,"ng-not-empty"),a.addClass(i,"ng-empty")):(a.removeClass(i,"ng-empty"),a.addClass(i,"ng-not-empty"))};var M=0;Sn({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){w.$dirty=!1,w.$pristine=!0,a.removeClass(i,bo),a.addClass(i,yo)},this.$setDirty=function(){w.$dirty=!0,w.$pristine=!1,a.removeClass(i,yo),a.addClass(i,bo),w.$$parentForm.$setDirty()},this.$setUntouched=function(){w.$touched=!1,w.$untouched=!0,a.setClass(i,"ng-untouched","ng-touched")},this.$setTouched=function(){w.$touched=!0,w.$untouched=!1,a.setClass(i,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){s.cancel(y),w.$viewValue=w.$$lastCommittedViewValue,w.$render()},this.$validate=function(){if(!Vn(w.$modelValue)){var e=w.$$rawModelValue,t=w.$valid,n=w.$modelValue,r=w.$options&&w.$options.allowInvalid;w.$$runValidators(e,w.$$lastCommittedViewValue,(function(i){r||t===i||(w.$modelValue=i?e:void 0,w.$modelValue!==n&&w.$$writeModelToScope())}))}},this.$$runValidators=function(e,t,n){function i(e,t){a===M&&w.$setValidity(e,t)}function o(e){a===M&&n(e)}var a=++M;!function(){var e=w.$$parserName||"parse";return m(h)?(i(e,null),!0):(h||(r(w.$validators,(function(e,t){i(t,null)})),r(w.$asyncValidators,(function(e,t){i(t,null)}))),i(e,h),h)}()?o(!1):function(){var n=!0;return r(w.$validators,(function(r,o){var a=r(e,t);n=n&&a,i(o,a)})),!!n||(r(w.$asyncValidators,(function(e,t){i(t,null)})),!1)}()?function(){var n=[],a=!0;r(w.$asyncValidators,(function(r,o){var s=r(e,t);if(!s||!L(s.then))throw Lo("nopromise",s);i(o,void 0),n.push(s.then((function(){i(o,!0)}),(function(){a=!1,i(o,!1)})))})),n.length?u.all(n).then((function(){o(a)}),d):o(!0)}():o(!1)},this.$commitViewValue=function(){var e=w.$viewValue;s.cancel(y),(w.$$lastCommittedViewValue!==e||""===e&&w.$$hasNativeValidators)&&(w.$$updateEmptyClasses(e),w.$$lastCommittedViewValue=e,w.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var t=w.$$lastCommittedViewValue;if(h=!m(t)||void 0)for(var n=0;n<w.$parsers.length;n++)if(m(t=w.$parsers[n](t))){h=!1;break}Vn(w.$modelValue)&&(w.$modelValue=v(e));var r=w.$modelValue,i=w.$options&&w.$options.allowInvalid;w.$$rawModelValue=t,i&&(w.$modelValue=t,w.$modelValue!==r&&w.$$writeModelToScope()),w.$$runValidators(t,w.$$lastCommittedViewValue,(function(e){i||(w.$modelValue=e?t:void 0,w.$modelValue!==r&&w.$$writeModelToScope())}))},this.$$writeModelToScope=function(){_(e,w.$modelValue),r(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 n=0,r=w.$options;r&&g(r.debounce)&&(b(r=r.debounce)?n=r:b(r[t])?n=r[t]:b(r.default)&&(n=r.default)),s.cancel(y),n?y=s((function(){w.$commitViewValue()}),n):l.$$phase?w.$commitViewValue():e.$apply((function(){w.$commitViewValue()}))},e.$watch((function(){var t=v(e);if(t!==w.$modelValue&&(w.$modelValue==w.$modelValue||t==t)){w.$modelValue=w.$$rawModelValue=t,h=void 0;for(var n=w.$formatters,r=n.length,i=t;r--;)i=n[r](i);w.$viewValue!==i&&(w.$$updateEmptyClasses(i),w.$viewValue=w.$$lastCommittedViewValue=i,w.$render(),w.$$runValidators(w.$modelValue,w.$viewValue,d))}return t}))}],ko=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Mo,priority:1,compile:function(t){return t.addClass(yo).addClass("ng-untouched").addClass(vo),{pre:function(e,t,n,r){var i=r[0];t=r[1]||i.$$parentForm,i.$$setOptions(r[2]&&r[2].$options),t.$addControl(i),n.$observe("name",(function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)})),e.$on("$destroy",(function(){i.$$parentForm.$removeControl(i)}))},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,(function(e){o.$$debounceViewValueCommit(e&&e.type)})),n.on("blur",(function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))}))}}}}}],xo=/(\s+|^)default(\s+|$)/,So=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=C(e.$eval(t.ngModelOptions)),g(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=qn(this.$options.updateOn.replace(xo,(function(){return n.$options.updateOnDefault=!0," "})))):this.$options.updateOnDefault=!0}]}},To=pn({terminal:!0,priority:1e3}),$o=t("ngOptions"),Do=/^\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]+?))?$/,Co=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!u&&n(e))t=e;else for(var r in t=[],e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r);return t}var s=e.match(Do);if(!s)throw $o("iexp",e,H(t));var l=s[5]||s[7],u=s[6];e=/ as /.test(s[0])&&s[1];var c=s[9];t=o(s[2]?s[1]:l);var d=e&&o(e)||t,h=c&&o(c),f=c?function(e,t){return h(r,t)}:function(e){return Me(e)},p=function(e,t){return f(e,b(e,t))},m=o(s[2]||s[1]),g=o(s[3]||""),v=o(s[4]||""),_=o(s[8]),y={},b=u?function(e,t){return y[u]=t,y[l]=e,y}:function(e){return y[l]=e,y};return{trackBy:c,getTrackByValue:p,getWatchables:o(_,(function(e){for(var t=[],n=a(e=e||[]),i=n.length,o=0;o<i;o++){var l=e[u=e===n?o:n[o]],u=b(l,u);l=f(l,u),t.push(l),(s[2]||s[1])&&(l=m(r,u),t.push(l)),s[4]&&(u=v(r,u),t.push(u))}return t})),getOptions:function(){for(var e=[],t={},n=_(r)||[],o=a(n),s=o.length,l=0;l<s;l++){var u=n===o?l:o[l],h=b(n[u],u),y=d(r,h);y=new i(u=f(y,h),y,m(r,h),g(r,h),h=v(r,h)),e.push(y),t[u]=y}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[p(e)]},getViewValueFromOption:function(e){return c?C(e.viewValue):e.viewValue}}}}}var s=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=d},post:function(e,n,o,u){function c(){var e=w&&h.readValue();if(w)for(var t=w.items.length-1;0<=t;t--){var r=w.items[t];g(r.group)?_e(r.element.parentNode):_e(r.element)}w=L.getOptions();var i={};_&&n.prepend(d),w.items.forEach((function(e){var t;if(g(e.group)){(t=i[e.group])||(t=l.cloneNode(!1),M.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t);var n=s.cloneNode(!1)}else t=M,n=s.cloneNode(!1);t.appendChild(n),function(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),t.value=e.selectValue}(e,n)})),n[0].appendChild(M),f.$render(),f.$isEmpty(e)||(t=h.readValue(),(L.trackBy||p?E(e,t):e===t)||(f.$setViewValue(t),f.$render()))}var d,h=u[0],f=u[1],p=o.multiple;u=0;for(var m=n.children(),v=m.length;u<v;u++)if(""===m[u].value){d=m.eq(u);break}var _=!!d,y=!1,b=Dn(s.cloneNode(!1));b.val("?");var w,L=a(o.ngOptions,n,e),M=i[0].createDocumentFragment(),k=function(){_?y&&d.removeAttr("selected"):d.remove()};p?(f.$isEmpty=function(e){return!e||0===e.length},h.writeValue=function(e){w.items.forEach((function(e){e.element.selected=!1})),e&&e.forEach((function(e){(e=w.getOptionFromViewValue(e))&&(e.element.selected=!0)}))},h.readValue=function(){var e=n.val()||[],t=[];return r(e,(function(e){(e=w.selectValueMap[e])&&!e.disabled&&t.push(w.getViewValueFromOption(e))})),t},L.trackBy&&e.$watchCollection((function(){if(Wn(f.$viewValue))return f.$viewValue.map((function(e){return L.getTrackByValue(e)}))}),(function(){f.$render()}))):(h.writeValue=function(e){var t=w.selectValueMap[n.val()],r=w.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),r?(n[0].value!==r.selectValue&&(b.remove(),k(),n[0].value=r.selectValue,r.element.selected=!0),r.element.setAttribute("selected","selected")):null===e||_?(b.remove(),_||n.prepend(d),n.val(""),y&&(d.prop("selected",!0),d.attr("selected",!0))):(k(),n.prepend(b),n.val("?"),b.prop("selected",!0),b.attr("selected",!0))},h.readValue=function(){var e=w.selectValueMap[n.val()];return e&&!e.disabled?(k(),b.remove(),w.getViewValueFromOption(e)):null},L.trackBy&&e.$watch((function(){return L.getTrackByValue(f.$viewValue)}),(function(){f.$render()}))),_?(d.remove(),t(d)(e),8===d[0].nodeType?(y=!1,h.registerOption=function(e,t){""===t.val()&&(y=!0,(d=t).removeClass("ng-scope"),f.$render(),t.on("$destroy",(function(){d=void 0,y=!1})))}):(d.removeClass("ng-scope"),y=!0)):d=Dn(s.cloneNode(!1)),n.empty(),c(),e.$watchCollection(L.getWatchables,c)}}}}],Eo=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,l){function u(e){s.text(e||"")}var c,h=l.count,f=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,g=a.$eval(f)||{},v={},_=t.startSymbol(),y=t.endSymbol(),b=_+h+"-"+p+y,w=zn.noop;r(l,(function(e,t){var n=o.exec(t);n&&(n=(n[1]?"-":"")+Yn(n[2]),g[n]=s.attr(l.$attr[t]))})),r(g,(function(e,n){v[n]=t(e.replace(i,b))})),a.$watch(h,(function(t){var r=parseFloat(t),i=Vn(r);i||r in g||(r=e.pluralCat(r-p)),r===c||i&&Vn(c)||(w(),m(i=v[r])?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+f),w=d,u()):w=a.$watch(i,u),c=r)}))}}}],Ao=["$parse","$animate","$compile",function(e,i,o){var a=t("ngRepeat"),s=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,l){var u=l.ngRepeat,c=o.$$createComment("end ngRepeat",u);if(!(d=u.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/)))throw a("iexp",u);var d,h=d[1],f=d[2],p=d[3],m=d[4];if(!(d=h.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw a("iidexp",h);var g=d[3]||d[1],v=d[2];if(p&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(p)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(p)))throw a("badident",p);var _,y,b,w,L={$id:Me};return m?_=e(m):(b=function(e,t){return Me(t)},w=function(e){return e}),function(e,t,o,l,d){_&&(y=function(t,n,r){return v&&(L[v]=t),L[g]=n,L.$index=r,_(e,L)});var h=K();e.$watchCollection(f,(function(o){var l,f,m,_,L,M,k,x,S,T,$=t[0],D=K();if(p&&(e[p]=o),n(o))x=o,f=y||b;else for(T in f=y||w,x=[],o)Pn.call(o,T)&&"$"!==T.charAt(0)&&x.push(T);for(_=x.length,T=Array(_),l=0;l<_;l++)if(L=o===x?l:x[l],M=o[L],k=f(L,M,l),h[k])S=h[k],delete h[k],D[k]=S,T[l]=S;else{if(D[k])throw r(T,(function(e){e&&e.scope&&(h[e.id]=e)})),a("dupes",u,k,M);T[l]={id:k,scope:void 0,clone:void 0},D[k]=!0}for(m in h){if(k=X((S=h[m]).clone),i.leave(k),k[0].parentNode)for(l=0,f=k.length;l<f;l++)k[l].$$NG_REMOVED=!0;S.scope.$destroy()}for(l=0;l<_;l++)if(L=o===x?l:x[l],M=o[L],(S=T[l]).scope){m=$;do{m=m.nextSibling}while(m&&m.$$NG_REMOVED);S.clone[0]!==m&&i.move(X(S.clone),null,$),$=S.clone[S.clone.length-1],s(S.scope,l,g,M,v,L,_)}else d((function(e,t){S.scope=t;var n=c.cloneNode(!1);e[e.length++]=n,i.enter(e,null,$),$=n,S.clone=e,D[S.id]=S,s(S.scope,l,g,M,v,L,_)}));h=D}))}}}}],Po=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,(function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})}))}}}],Yo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,(function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})}))}}}],Oo=pn((function(e,t,n){e.$watch(n.ngStyle,(function(e,n){n&&e!==n&&r(n,(function(e,n){t.css(n,"")})),e&&t.css(e)}),!0)})),Io=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,o,a){var s=[],l=[],u=[],c=[],d=function(e,t){return function(n){!1!==n&&e.splice(t,1)}};n.$watch(o.ngSwitch||o.on,(function(n){for(var i,o;u.length;)e.cancel(u.pop());for(i=0,o=c.length;i<o;++i){var h=X(l[i].clone);c[i].$destroy(),(u[i]=e.leave(h)).done(d(u,i))}l.length=0,c.length=0,(s=a.cases["!"+n]||a.cases["?"])&&r(s,(function(n){n.transclude((function(r,i){c.push(i);var o=n.element;r[r.length++]=t.$$createComment("end ngSwitchWhen"),l.push({clone:r}),e.enter(r,o.parent(),o)}))}))}))}}}],jo=pn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,o){r(n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter((function(e,t,n){return n[t-1]!==e})),(function(e){i.cases["!"+e]=i.cases["!"+e]||[],i.cases["!"+e].push({transclude:o,element:t})}))}}),Bo=pn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Ho=t("ngTransclude"),No=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,r,i,o){function a(){n(e,(function(e){t.append(e)}))}if(!o)throw Ho("orphan",H(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude=""),o((function(e,n){e.length?t.append(e):(a(),n.$destroy())}),null,r=r.ngTransclude||r.ngTranscludeSlot),r&&!o.isSlotFilled(r)&&a()}}}}],Ro=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){"text/ng-template"===n.type&&e.put(n.id,t[0].text)}}}],zo={$setViewValue:d,$render:d},Fo=["$element","$scope",function(t,n){var r=this,i=new ke;r.ngModelCtrl=zo,r.unknownOption=Dn(e.document.createElement("option")),r.renderUnknownOption=function(e){e="? "+Me(e)+" ?",r.unknownOption.val(e),t.prepend(r.unknownOption),t.val(e)},n.$on("$destroy",(function(){r.renderUnknownOption=d})),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),t.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),t.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){if(8!==t[0].nodeType){Z(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1),r.ngModelCtrl.$render(),t[0].hasAttribute("selected")&&(t[0].selected=!0)}},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=void 0)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)},r.registerOption=function(e,t,n,i,o){var a;i?n.$observe("value",(function(e){g(a)&&r.removeOption(a),a=e,r.addOption(e,t)})):o?e.$watch(o,(function(e,i){n.$set("value",e),i!==e&&r.removeOption(i),r.addOption(e,t)})):r.addOption(n.value,t),t.on("$destroy",(function(){r.removeOption(n.value),r.ngModelCtrl.$render()}))}}],Vo=function(){return{restrict:"E",require:["select","?ngModel"],controller:Fo,priority:1,link:{pre:function(e,t,n,i){var o=i[1];if(o){var a=i[0];if(a.ngModelCtrl=o,t.on("change",(function(){e.$apply((function(){o.$setViewValue(a.readValue())}))})),n.multiple){a.readValue=function(){var e=[];return r(t.find("option"),(function(t){t.selected&&e.push(t.value)})),e},a.writeValue=function(e){var n=new ke(e);r(t.find("option"),(function(e){e.selected=g(n.get(e.value))}))};var s,l=NaN;e.$watch((function(){l!==o.$viewValue||E(s,o.$viewValue)||(s=Q(o.$viewValue),o.$render()),l=o.$viewValue})),o.$isEmpty=function(e){return!e||0===e.length}}}},post:function(e,t,n,r){var i=r[1];if(i){var o=r[0];i.$render=function(){o.writeValue(i.$viewValue)}}}}}},Wo=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){var r,i;return g(n.ngValue)?r=!0:g(n.value)?r=e(n.value,!0):(i=e(t.text(),!0))||n.$set("value",t.text()),function(e,t,n){var o=t.parent();(o=o.data("$selectController")||o.parent().data("$selectController"))&&o.registerOption(e,t,n,r,i)}}}}],Uo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",(function(){r.$validate()})))}}},qo=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,r,i){if(i){var o,a=r.ngPattern||r.pattern;r.$observe("pattern",(function(e){if(y(e)&&0<e.length&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp",a,e,H(n));o=e||void 0,i.$validate()})),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||m(o)||o.test(t)}}}}},Go=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",(function(e){e=u(e),i=Vn(e)?-1:e,r.$validate()})),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},Zo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",(function(e){i=u(e)||0,r.$validate()})),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};e.angular.bootstrap?e.console&&alert("WARNING: Tried to load angular more than once."):(function(){var t;if(!tr){var n=Jn();(Cn=m(n)?e.jQuery:n?e[n]:void 0)&&Cn.fn.on?(Dn=Cn,l(Cn.fn,{scope:mr.scope,isolateScope:mr.isolateScope,controller:mr.controller,injector:mr.injector,inheritedData:mr.inheritedData}),t=Cn.cleanData,Cn.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)(n=Cn._data(r,"events"))&&n.$destroy&&Cn(r).triggerHandler("$destroy");t(e)}):Dn=ie,zn.element=Dn,tr=!0}}(),l(zn,{bootstrap:W,copy:C,extend:l,merge:function(e){return s(e,In.call(arguments,1),!0)},equals:E,element:Dn,forEach:r,injector:Se,noop:d,bind:P,toJson:O,fromJson:I,identity:h,isUndefined:m,isDefined:g,isString:y,isFunction:L,isObject:v,isNumber:b,isElement:T,isArray:Wn,version:{full:"1.5.11",major:1,minor:5,dot:11,codeName:"princely-quest"},isDate:w,lowercase:Yn,uppercase:On,callbacks:{$$counter:0},getTestability:function(e){if(!(e=zn.element(e).injector()))throw Rn("test");return e.get("$$testability")},$$minErr:t,$$csp:Zn,reloadWithDebugInfo:function(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}}),(En=function(e){function n(e,t,n){return e[t]||(e[t]=n())}var r=t("$injector"),i=t("ng");return(e=n(e,"angular",Object)).$$minErr=e.$$minErr||t,n(e,"module",(function(){var e={};return function(t,o,a){if("hasOwnProperty"===t)throw i("badname","module");return o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,(function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(r,o){return o&&L(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),c}}if(!o)throw r("nomod",t);var i=[],s=[],l=[],u=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:l,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:u,run:function(e){return l.push(e),this}};return a&&u(a),c}))}}))}(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:It}),e.provider("$compile",Ye).directive({a:Yi,input:Xi,textarea:Xi,form:Bi,script:Ro,select:Vo,option:Wo,ngBind:eo,ngBindHtml:no,ngBindTemplate:to,ngClass:io,ngClassEven:ao,ngClassOdd:oo,ngCloak:so,ngController:lo,ngForm:Hi,ngHide:Yo,ngIf:ho,ngInclude:fo,ngInit:mo,ngNonBindable:To,ngPluralize:Eo,ngRepeat:Ao,ngShow:Po,ngStyle:Oo,ngSwitch:Io,ngSwitchWhen:jo,ngSwitchDefault:Bo,ngOptions:Co,ngTransclude:No,ngModel:ko,ngList:go,ngChange:ro,pattern:qo,ngPattern:qo,required:Uo,ngRequired:Uo,minlength:Zo,ngMinlength:Zo,maxlength:Go,ngMaxlength:Go,ngValue:Qi,ngModelOptions:So}).directive({ngInclude:po}).directive(Oi).directive(uo),e.provider({$anchorScroll:Te,$animate:Dr,$animateCss:Ar,$$animateJs:Tr,$$animateQueue:$r,$$AnimateRunner:Er,$$animateAsyncRun:Cr,$browser:Ee,$cacheFactory:Ae,$controller:Ne,$document:Re,$exceptionHandler:ze,$filter:Zt,$$forceReflow:Br,$interpolate:Qe,$interval:et,$http:Je,$httpParamSerializer:Ve,$httpParamSerializerJQLike:We,$httpBackend:Ke,$xhrFactory:Xe,$jsonpCallbacks:qr,$location:ht,$log:ft,$parse:Ct,$rootScope:Ot,$q:Et,$$q:At,$sce:Ht,$sceDelegate:Bt,$sniffer:Nt,$templateCache:Pe,$templateRequest:Rt,$$testability:zt,$timeout:Ft,$window:Ut,$$rAF:Yt,$$jqLite:Le,$$HashMap:yr,$$cookieReader:Gt})}]),zn.module("ngLocale",[],["$provide",function(e){e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),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 n=0|e,r=t;return void 0===r&&(r=Math.min(function(e){var t=(e+="").indexOf(".");return-1==t?0:e.length-t-1}(e),3)),Math.pow(10,r),1==n&&0==r?"one":"other"}})}]),Dn(e.document).ready((function(){!function(t,n){var i,o,a={};r(Kn,(function(e){e+="app",!i&&t.hasAttribute&&t.hasAttribute(e)&&(i=t,o=t.getAttribute(e))})),r(Kn,(function(e){var n;e+="app",!i&&(n=t.querySelector("["+e.replace(":","\\:")+"]"))&&(i=n,o=n.getAttribute(e))})),i&&(Qn?(a.strictDi=null!==function(e,t){var n,r,i=Kn.length;for(r=0;r<i;++r)if(n=Kn[r]+"strict-di",y(n=e.getAttribute(n)))return n;return null}(i),n(i,o?[o]:[],a)):e.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}(e.document,W)})))}(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 n(e,t,n){if(!e)throw z("areq",t||"?",n||"required");return e}function r(e,t){return e||t?e?t?(D(e)&&(e=e.join(" ")),D(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function i(e,t,n){var r="";return e=D(e)?e:e&&Y(e)&&e.length?e.split(/\s+/):[],$(e,(function(e,i){e&&0<e.length&&(r+=0<i?" ":"",r+=n?t+e:e+t)})),r}function o(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(1===n.nodeType)return n}}function a(e){return function(t,n){n.addClass&&(function(e,t,n){$(t,(function(t){e.addClass(t,n)}))}(e,t,n.addClass),n.addClass=null),n.removeClass&&(function(e,t,n){$(t,(function(t){e.removeClass(t,n)}))}(e,t,n.removeClass),n.removeClass=null)}}function s(e){if(!(e=e||{}).$$prepared){var t=e.domOperation||j;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=j},e.$$prepared=!0}return e}function l(e,t){u(e,t),c(e,t)}function u(e,t){t.from&&(e.css(t.from),t.from=null)}function c(e,t){t.to&&(e.css(t.to),t.to=null)}function d(e,t,n){var r=t.options||{};n=n.options||{};var i=(r.addClass||"")+" "+(n.addClass||""),o=(r.removeClass||"")+" "+(n.removeClass||"");return e=function(e,t,n){function r(e){Y(e)&&(e=e.split(" "));var t={};return $(e,(function(e){e.length&&(t[e]=!0)})),t}var i={};e=r(e),t=r(t),$(t,(function(e,t){i[t]=1})),n=r(n),$(n,(function(e,t){i[t]=1===i[t]?null:-1}));var o={addClass:"",removeClass:""};return $(i,(function(t,n){var r,i;1===t?(r="addClass",i=!e[n]||e[n+"-remove"]):-1===t&&(r="removeClass",i=e[n]||e[n+"-add"]),i&&(o[r].length&&(o[r]+=" "),o[r]+=n)})),o}(e.attr("class"),i,o),n.preparationClasses&&(r.preparationClasses=g(n.preparationClasses,r.preparationClasses),delete n.preparationClasses),i=r.domOperation!==j?r.domOperation:null,T(r,n),i&&(r.domOperation=i),r.addClass=e.addClass?e.addClass:null,r.removeClass=e.removeClass?e.removeClass:null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function h(e){return e instanceof I?e[0]:e}function f(e,t){var n=t?"-"+t+"s":"";return m(e,[N,n]),[N,n]}function p(e,t){var n=t?"paused":"",r=k+"PlayState";return m(e,[r,n]),[r,n]}function m(e,t){e.style[t[0]]=t[1]}function g(e,t){return e?t?e+" "+t:e:t}function v(e,t,n){var r=Object.create(null),i=e.getComputedStyle(t)||{};return $(n,(function(e,t){var n=i[e];if(n){var o=n.charAt(0);("-"===o||"+"===o||0<=o)&&(n=function(e){var t=0;return e=e.split(/\s*,\s*/),$(e,(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}(n)),0===n&&(n=null),r[t]=n}})),r}function _(e){return 0===e||null!=e}function y(e,t){var n=L,r=e+"s";return t?n+="Duration":r+=" linear all",[n,r]}function b(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){return(t=e[t])?t.total:0},get:function(t){return(t=e[t])&&t.value},put:function(t,n){e[t]?e[t].total++:e[t]={total:1,value:n}}}}function w(e,t,n){$(n,(function(n){e[n]=C(e[n])?e[n]:t.style.getPropertyValue(n)}))}var L,M,k,x;void 0===e.ontransitionend&&void 0!==e.onwebkittransitionend?(L="WebkitTransition",M="webkitTransitionEnd transitionend"):(L="transition",M="transitionend"),void 0===e.onanimationend&&void 0!==e.onwebkitanimationend?(k="WebkitAnimation",x="webkitAnimationEnd animationend"):(k="animation",x="animationend");var S,T,$,D,C,E,A,P,Y,O,I,j,B=k+"Delay",H=k+"Duration",N=L+"Delay",R=L+"Duration",z=t.$$minErr("ng"),F={transitionDuration:R,transitionDelay:N,transitionProperty:L+"Property",animationDuration:H,animationDelay:B,animationIterationCount:k+"IterationCount"},V={transitionDuration:R,transitionDelay:N,animationDuration:H,animationDelay:B};t.module("ngAnimate",[],(function(){j=t.noop,S=t.copy,T=t.extend,I=t.element,$=t.forEach,D=t.isArray,Y=t.isString,P=t.isObject,O=t.isUndefined,C=t.isDefined,A=t.isFunction,E=t.isElement})).directive("ngAnimateSwap",["$animate","$rootScope",function(e,t){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,n,r,i,o){var a,s;t.$watchCollection(r.ngAnimateSwap||r.for,(function(r){a&&e.leave(a),s&&(s.$destroy(),s=null),(r||0===r)&&(s=t.$new(),o(s,(function(t){a=t,e.enter(t,null,n)})))}))}}}]).directive("ngAnimateChildren",["$interpolate",function(e){return{link:function(t,n,r){function i(e){n.data("$$ngAnimateChildren","on"===e||"true"===e)}var o=r.ngAnimateChildren;Y(o)&&0===o.length?n.data("$$ngAnimateChildren",!0):(i(e(o)(t)),r.$observe("ngAnimateChildren",i))}}}]).factory("$$rAFScheduler",["$$rAF",function(e){function t(e){r=r.concat(e),n()}function n(){if(r.length){for(var t=r.shift(),o=0;o<t.length;o++)t[o]();i||e((function(){i||n()}))}}var r,i;return r=t.queue=[],t.waitUntilQuiet=function(t){i&&i(),i=e((function(){i=null,t(),n()}))},t}]).provider("$$animateQueue",["$animateProvider",function(t){function r(e,t){if(e&&t){var n=function(e){if(!e)return null;e=e.split(" ");var t=Object.create(null);return $(e,(function(e){t[e]=!0})),t}(t);return e.split(" ").some((function(e){return n[e]}))}}function u(e,t,n,r){return f[e].some((function(e){return e(t,n,r)}))}function c(e,t){var n=0<(e.addClass||"").length,r=0<(e.removeClass||"").length;return t?n&&r:n||r}var f=this.rules={skip:[],cancel:[],join:[]};f.join.push((function(e,t,n){return!t.structural&&c(t)})),f.skip.push((function(e,t,n){return!t.structural&&!c(t)})),f.skip.push((function(e,t,n){return"leave"===n.event&&t.structural})),f.skip.push((function(e,t,n){return n.structural&&2===n.state&&!t.structural})),f.cancel.push((function(e,t,n){return n.structural&&t.structural})),f.cancel.push((function(e,t,n){return 2===n.state&&t.structural})),f.cancel.push((function(e,t,n){if(n.structural)return!1;e=t.addClass,t=t.removeClass;var i=n.addClass;return n=n.removeClass,!(O(e)&&O(t)||O(i)&&O(n))&&(r(e,n)||r(t,i))})),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(r,f,p,m,v,_,y,b,w,L){function M(e,t,n){var r=h(t),i=h(e),o=[];return(e=V[n])&&$(e,(function(e){G.call(e.node,r)?o.push(e.callback):"leave"===n&&G.call(e.node,i)&&o.push(e.callback)})),o}function k(e,t,n){var r=o(t);return e.filter((function(e){return!(e.node===r&&(!n||e.callback===n))}))}function x(e,t,n){function a(t,n,i,o){k((function(){var t=M(b,e,n);t.length?r((function(){$(t,(function(t){t(e,i,o)})),"close"!==i||e[0].parentNode||Z.off(e)})):"close"!==i||e[0].parentNode||Z.off(e)})),t.progress(n,i,o)}function p(t){var n=e,r=w;r.preparationClasses&&(n.removeClass(r.preparationClasses),r.preparationClasses=null),r.activeClasses&&(n.removeClass(r.activeClasses),r.activeClasses=null),q(e,w),l(e,w),w.domOperation(),L.complete(!t)}var v,b,w=S(n);(e=function(e){if(e instanceof I)switch(e.length){case 0:return e;case 1:if(1===e[0].nodeType)return e;break;default:return I(o(e))}if(1===e.nodeType)return I(e)}(e))&&(v=h(e),b=e.parent()),w=s(w);var L=new y,k=function(){var e=!1;return function(t){e?t():f.$$postDigest((function(){e=!0,t()}))}}();if(D(w.addClass)&&(w.addClass=w.addClass.join(" ")),w.addClass&&!Y(w.addClass)&&(w.addClass=null),D(w.removeClass)&&(w.removeClass=w.removeClass.join(" ")),w.removeClass&&!Y(w.removeClass)&&(w.removeClass=null),w.from&&!P(w.from)&&(w.from=null),w.to&&!P(w.to)&&(w.to=null),!v)return p(),L;if(n=[v.className,w.addClass,w.removeClass].join(" "),!U(n))return p(),L;var x=0<=["enter","move","leave"].indexOf(t),T=m[0].hidden,C=!z||T||R.get(v),E=!!(n=!C&&N.get(v)||{}).state;if(C||E&&1===n.state||(C=!B(e,b,t)),C)return T&&a(L,t,"start"),p(),T&&a(L,t,"close"),L;if(x&&function(e){e=h(e).querySelectorAll("[data-ng-animate]"),$(e,(function(e){var t=parseInt(e.getAttribute("data-ng-animate"),10),n=N.get(e);if(n)switch(t){case 2:n.runner.end();case 1:N.remove(e)}}))}(e),T={structural:x,element:e,event:t,addClass:w.addClass,removeClass:w.removeClass,close:p,options:w,runner:L},E){if(u("skip",e,T,n))return 2===n.state?(p(),L):(d(e,n,T),n.runner);if(u("cancel",e,T,n))if(2===n.state)n.runner.end();else{if(!n.structural)return d(e,n,T),n.runner;n.close()}else if(u("join",e,T,n)){if(2!==n.state)return function(e,t,n){var r="";t&&(r=i(t,"ng-",!0)),n.addClass&&(r=g(r,i(n.addClass,"-add"))),n.removeClass&&(r=g(r,i(n.removeClass,"-remove"))),r.length&&(n.preparationClasses=r,e.addClass(r))}(e,x?t:null,w),t=T.event=n.event,w=d(e,n,T),n.runner;d(e,T,{})}}else d(e,T,{});if((E=T.structural)||(E="animate"===T.event&&0<Object.keys(T.options.to||{}).length||c(T)),!E)return p(),A(e),L;var O=(n.counter||0)+1;return T.counter=O,H(e,1,T),f.$$postDigest((function(){var n=!(r=N.get(v)),r=r||{},i=0<(e.parent()||[]).length&&("animate"===r.event||r.structural||c(r));n||r.counter!==O||!i?(n&&(q(e,w),l(e,w)),(n||x&&r.event!==t)&&(w.domOperation(),L.end()),i||A(e)):(t=!r.structural&&c(r,!0)?"setClass":r.event,H(e,2),r=_(e,t,r.options),L.setHost(r),a(L,t,"start",{}),r.done((function(n){p(!n),(n=N.get(v))&&n.counter===O&&A(h(e)),a(L,t,"close",{})})))})),L}function A(e){(e=h(e)).removeAttribute("data-ng-animate"),N.remove(e)}function j(e,t){return h(e)===h(t)}function B(e,t,n){var r,i=j(e,n=I(m[0].body))||"HTML"===e[0].nodeName,o=j(e,p),a=!1,s=R.get(h(e));for((e=I.data(e[0],"$ngAnimatePin"))&&(t=e),t=h(t);t&&(o||(o=j(t,p)),1===t.nodeType);){if(e=N.get(t)||{},!a){var l=R.get(t);if(!0===l&&!1!==s){s=!0;break}!1===l&&(s=!1),a=e.structural}if((O(r)||!0===r)&&(e=I.data(t,"$$ngAnimateChildren"),C(e)&&(r=e)),a&&!1===r)break;if(i||(i=j(t,n)),i&&o)break;t=o||!(e=I.data(t,"$ngAnimatePin"))?t.parentNode:h(e)}return(!a||r)&&!0!==s&&o&&i}function H(e,t,n){(n=n||{}).state=t,(e=h(e)).setAttribute("data-ng-animate",t),n=(t=N.get(e))?T(t,n):n,N.put(e,n)}var N=new v,R=new v,z=null,F=f.$watch((function(){return 0===b.totalPendingRequests}),(function(e){e&&(F(),f.$$postDigest((function(){f.$$postDigest((function(){null===z&&(z=!0)}))})))})),V=Object.create(null),W=t.classNameFilter(),U=W?function(e){return W.test(e)}:function(){return!0},q=a(w),G=e.Node.prototype.contains||function(e){return this===e||!!(16&this.compareDocumentPosition(e))},Z={on:function(e,t,n){var r=o(t);V[e]=V[e]||[],V[e].push({node:r,callback:n}),I(t).on("$destroy",(function(){N.get(r)||Z.off(e,t,n)}))},off:function(e,t,n){if(1!==arguments.length||Y(arguments[0])){var r=V[e];r&&(V[e]=1===arguments.length?null:k(r,t,n))}else for(r in t=arguments[0],V)V[r]=k(V[r],t)},pin:function(e,t){n(E(e),"element","not an element"),n(E(t),"parentElement","not an element"),e.data("$ngAnimatePin",t)},push:function(e,t,n,r){return(n=n||{}).domOperation=r,x(e,t,n)},enabled:function(e,t){var n=arguments.length;if(0===n)t=!!z;else if(E(e)){var r=h(e);1===n?t=!R.get(r):R.put(r,!t)}else t=z=!!e;return t}};return Z}]}]).provider("$$animation",["$animateProvider",function(e){var t=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,n,i,o,u,c){function d(e){function t(e){if(e.processed)return e;e.processed=!0;var n,o=e.domNode,a=o.parentNode;for(i.put(o,e);a;){if(n=i.get(a)){n.processed||(n=t(n));break}a=a.parentNode}return(n||r).children.push(e),e}var n,r={children:[]},i=new u;for(n=0;n<e.length;n++){var o=e[n];i.put(o.domNode,e[n]={domNode:o.domNode,fn:o.fn,children:[]})}for(n=0;n<e.length;n++)t(e[n]);return function(e){var t,n=[],r=[];for(t=0;t<e.children.length;t++)r.push(e.children[t]);e=r.length;var i=0,o=[];for(t=0;t<r.length;t++){var a=r[t];0>=e&&(e=i,i=0,n.push(o),o=[]),o.push(a.fn),a.children.forEach((function(e){i++,r.push(e)})),e--}return o.length&&n.push(o),n}(r)}var f=[],p=a(e);return function(a,u,m){function g(e,t){e=e.split(" "),t=t.split(" ");for(var n=[],r=0;r<e.length;r++){var i=e[r];if("ng-"!==i.substring(0,3))for(var o=0;o<t.length;o++)if(i===t[o]){n.push(i);break}}return n.join(" ")}function v(e){for(var n=t.length-1;0<=n;n--){var r=i.get(t[n])(e);if(r)return r}}function _(){var e=a.data("$$animationRunner");!e||"leave"===u&&m.$$domOperationFired||e.end()}function y(t){a.off("$destroy",_),a.removeData("$$animationRunner"),p(a,m),l(a,m),m.domOperation(),k&&e.removeClass(a,k),a.removeClass("ng-animate"),w.complete(!t)}m=s(m);var b=0<=["enter","move","leave"].indexOf(u),w=new o({end:function(){y()},cancel:function(){y(!0)}});if(!t.length)return y(),w;a.data("$$animationRunner",w);var L,M=r(a.attr("class"),r(m.addClass,m.removeClass)),k=m.tempClasses;return k&&(M+=" "+k,m.tempClasses=null),b&&(L="ng-"+u+"-prepare",e.addClass(a,L)),f.push({element:a,classes:M,event:u,structural:b,options:m,beforeStart:function(){a.addClass("ng-animate"),k&&e.addClass(a,k),L&&(e.removeClass(a,L),L=null)},close:y}),a.on("$destroy",_),1<f.length?w:(n.$$postDigest((function(){var e=[];$(f,(function(t){t.element.data("$$animationRunner")?e.push(t):t.close()})),f.length=0;var t=function(e){var t=[],n={};$(e,(function(e,r){var i=h(e.element),o=0<=["enter","move"].indexOf(e.event);if((i=e.structural?function(e){e=e.hasAttribute("ng-animate-ref")?[e]:e.querySelectorAll("[ng-animate-ref]");var t=[];return $(e,(function(e){var n=e.getAttribute("ng-animate-ref");n&&n.length&&t.push(e)})),t}(i):[]).length){var a=o?"to":"from";$(i,(function(e){var t=e.getAttribute("ng-animate-ref");n[t]=n[t]||{},n[t][a]={animationID:r,element:I(e)}}))}else t.push(e)}));var r={},i={};return $(n,(function(n,o){var a=n.from,s=n.to;if(a&&s){var l=e[a.animationID],u=e[s.animationID],c=a.animationID.toString();if(!i[c]){var d=i[c]={structural:!0,beforeStart:function(){l.beforeStart(),u.beforeStart()},close:function(){l.close(),u.close()},classes:g(l.classes,u.classes),from:l,to:u,anchors:[]};d.classes.length?t.push(d):(t.push(l),t.push(u))}i[c].anchors.push({out:a.element,in:s.element})}else s=(a=a?a.animationID:s.animationID).toString(),r[s]||(r[s]=!0,t.push(e[a]))})),t}(e),n=[];$(t,(function(e){n.push({domNode:h(e.from?e.from.element:e.element),fn:function(){e.beforeStart();var t,n=e.close;if((e.anchors?e.from.element||e.to.element:e.element).data("$$animationRunner")){var r=v(e);r&&(t=r.start)}t?((t=t()).done((function(e){n(!e)})),function(e,t){function n(e){(e=e.data("$$animationRunner"))&&e.setHost(t)}e.from&&e.to?(n(e.from.element),n(e.to.element)):n(e.element)}(e,t)):n()}})})),c(d(n))})),w)}}]}]).provider("$animateCss",["$animateProvider",function(e){var t=b(),n=b();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(e,r,o,d,g,b,T,C){function E(e,t){var n=e.parentNode;return(n.$$ngAnimateParentKey||(n.$$ngAnimateParentKey=++I))+"-"+e.getAttribute("class")+"-"+t}function A(o,a,s,l){var u;return 0<t.count(s)&&((u=n.get(s))||(a=i(a,"-stagger"),r.addClass(o,a),(u=v(e,o,l)).animationDuration=Math.max(u.animationDuration,0),u.transitionDuration=Math.max(u.transitionDuration,0),r.removeClass(o,a),n.put(s,u))),u||{}}function P(e){R.push(e),T.waitUntilQuiet((function(){t.flush(),n.flush();for(var e=g(),r=0;r<R.length;r++)R[r](e);R.length=0}))}function Y(n,r,i){return(r=t.get(i))||"infinite"===(r=v(e,n,F)).animationIterationCount&&(r.animationIterationCount=1),t.put(i,r),i=(n=r).animationDelay,r=n.transitionDelay,n.maxDelay=i&&r?Math.max(i,r):i||r,n.maxDuration=Math.max(n.animationDuration*n.animationIterationCount,n.transitionDuration),n}var O=a(r),I=0,R=[];return function(e,n){function a(){v()}function g(){v(!0)}function v(t){if(!(q||Z&&G)){q=!0,G=!1,F.$$skipPreparationClasses||r.removeClass(e,he),r.removeClass(e,pe),p(U,!1),f(U,!1),$(re,(function(e){U.style[e[0]]=""})),O(e,F),l(e,F),Object.keys(W).length&&$(W,(function(e,t){e?U.style.setProperty(t,e):U.style.removeProperty(t)})),F.onDone&&F.onDone(),ae&&ae.length&&e.off(ae.join(" "),R);var n=e.data("$$animateCss");n&&(d.cancel(n[0].timer),e.removeData("$$animateCss")),J&&J.complete(!t)}}function T(e){ye.blockTransition&&f(U,e),ye.blockKeyframeAnimation&&p(U,!!e)}function I(){return J=new o({end:a,cancel:g}),P(j),v(),{$$willAnimate:!1,start:function(){return J},end:a}}function R(e){e.stopPropagation();var t=e.originalEvent||e;e=t.$manualTimeStamp||Date.now(),t=parseFloat(t.elapsedTime.toFixed(3)),Math.max(e-ne,0)>=Q&&t>=ee&&(Z=!0,v())}function z(){function t(){if(!q){if(T(!1),$(re,(function(e){U.style[e[0]]=e[1]})),O(e,F),r.addClass(e,pe),ye.recalculateTimingStyles){if(fe=U.className+" "+he,ce=E(U,fe),ge=Y(U,fe,ce),ve=ge.maxDelay,K=Math.max(ve,0),0===(ee=ge.maxDuration))return void v();ye.hasTransitions=0<ge.transitionDuration,ye.hasAnimations=0<ge.animationDuration}if(ye.applyAnimationDelay&&(ve="boolean"!=typeof F.delay&&_(F.delay)?parseFloat(F.delay):ve,K=Math.max(ve,0),ge.animationDelay=ve,_e=[B,ve+"s"],re.push(_e),U.style[_e[0]]=_e[1]),Q=1e3*K,te=1e3*ee,F.easing){var t,i=F.easing;ye.hasTransitions&&(t=L+"TimingFunction",re.push([t,i]),U.style[t]=i),ye.hasAnimations&&(t=k+"TimingFunction",re.push([t,i]),U.style[t]=i)}ge.transitionDuration&&ae.push(M),ge.animationDuration&&ae.push(x),ne=Date.now();var o=Q+1.5*te;t=ne+o;var a=!0;if((i=e.data("$$animateCss")||[]).length){var s=i[0];(a=t>s.expectedEndTime)?d.cancel(s.timer):i.push(v)}a&&(o=d(n,o,!1),i[0]={timer:o,expectedEndTime:t},i.push(v),e.data("$$animateCss",i)),ae.length&&e.on(ae.join(" "),R),F.to&&(F.cleanupStyles&&w(W,U,Object.keys(F.to)),c(e,F))}}function n(){var t=e.data("$$animateCss");if(t){for(var n=1;n<t.length;n++)t[n]();e.removeData("$$animateCss")}}if(!q)if(U.parentNode){var i=function(e){if(Z)G&&e&&(G=!1,v());else if(G=!e,ge.animationDuration)if(e=p(U,G),G)re.push(e);else{var t=re,n=t.indexOf(e);0<=e&&t.splice(n,1)}},o=0<me&&(ge.transitionDuration&&0===de.transitionDuration||ge.animationDuration&&0===de.animationDuration)&&Math.max(de.animationDelay,de.transitionDelay);o?d(t,Math.floor(o*me*1e3),!1):t(),X.resume=function(){i(!0)},X.pause=function(){i(!1)}}else v()}var F=n||{};F.$$prepared||(F=s(S(F)));var W={},U=h(e);if(!U||!U.parentNode||!C.enabled())return I();var q,G,Z,J,X,K,Q,ee,te,ne,re=[],ie=e.attr("class"),oe=function(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}(F),ae=[];if(0===F.duration||!b.animations&&!b.transitions)return I();var se=F.event&&D(F.event)?F.event.join(" "):F.event,le="",ue="";se&&F.structural?le=i(se,"ng-",!0):se&&(le=se),F.addClass&&(ue+=i(F.addClass,"-add")),F.removeClass&&(ue.length&&(ue+=" "),ue+=i(F.removeClass,"-remove")),F.applyClassesEarly&&ue.length&&O(e,F);var ce,de,he=[le,ue].join(" ").trim(),fe=ie+" "+he,pe=i(he,"-active");if(ie=oe.to&&0<Object.keys(oe.to).length,!(0<(F.keyframeStyle||"").length||ie||he))return I();0<F.stagger?(oe=parseFloat(F.stagger),de={transitionDelay:oe,animationDelay:oe,transitionDuration:0,animationDuration:0}):(ce=E(U,fe),de=A(U,he,ce,V)),F.$$skipPreparationClasses||r.addClass(e,he),F.transitionStyle&&(oe=[L,F.transitionStyle],m(U,oe),re.push(oe)),0<=F.duration&&(oe=0<U.style[L].length,oe=y(F.duration,oe),m(U,oe),re.push(oe)),F.keyframeStyle&&(oe=[k,F.keyframeStyle],m(U,oe),re.push(oe));var me=de?0<=F.staggerIndex?F.staggerIndex:t.count(ce):0;(se=0===me)&&!F.skipBlocking&&f(U,9999);var ge=Y(U,fe,ce),ve=ge.maxDelay;K=Math.max(ve,0),ee=ge.maxDuration;var _e,ye={};return ye.hasTransitions=0<ge.transitionDuration,ye.hasAnimations=0<ge.animationDuration,ye.hasTransitionAll=ye.hasTransitions&&"all"===ge.transitionProperty,ye.applyTransitionDuration=ie&&(ye.hasTransitions&&!ye.hasTransitionAll||ye.hasAnimations&&!ye.hasTransitions),ye.applyAnimationDuration=F.duration&&ye.hasAnimations,ye.applyTransitionDelay=_(F.delay)&&(ye.applyTransitionDuration||ye.hasTransitions),ye.applyAnimationDelay=_(F.delay)&&ye.hasAnimations,ye.recalculateTimingStyles=0<ue.length,(ye.applyTransitionDuration||ye.applyAnimationDuration)&&(ee=F.duration?parseFloat(F.duration):ee,ye.applyTransitionDuration&&(ye.hasTransitions=!0,ge.transitionDuration=ee,oe=0<U.style[L+"Property"].length,re.push(y(ee,oe))),ye.applyAnimationDuration&&(ye.hasAnimations=!0,ge.animationDuration=ee,re.push([H,ee+"s"]))),0!==ee||ye.recalculateTimingStyles?(null!=F.delay&&("boolean"!=typeof F.delay&&(_e=parseFloat(F.delay),K=Math.max(_e,0)),ye.applyTransitionDelay&&re.push([N,_e+"s"]),ye.applyAnimationDelay&&re.push([B,_e+"s"])),null==F.duration&&0<ge.transitionDuration&&(ye.recalculateTimingStyles=ye.recalculateTimingStyles||se),Q=1e3*K,te=1e3*ee,F.skipBlocking||(ye.blockTransition=0<ge.transitionDuration,ye.blockKeyframeAnimation=0<ge.animationDuration&&0<de.animationDelay&&0===de.animationDuration),F.from&&(F.cleanupStyles&&w(W,U,Object.keys(F.from)),u(e,F)),ye.blockTransition||ye.blockKeyframeAnimation?T(ee):F.skipBlocking||f(U,!1),{$$willAnimate:!0,end:a,start:function(){if(!q)return J=new o(X={end:a,cancel:g,resume:null,pause:null}),P(z),J}}):I()}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(e){e.drivers.push("$$animateCssDriver"),this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(e,t,n,r,i,o,a){function s(e){return e.replace(/\bng-\S+\b/g,"")}function l(e,t){return Y(e)&&(e=e.split(" ")),Y(t)&&(t=t.split(" ")),e.filter((function(e){return-1===t.indexOf(e)})).join(" ")}function u(t,r,i){function o(e){var t={},n=h(e).getBoundingClientRect();return $(["width","height","top","left"],(function(e){var r=n[e];switch(e){case"top":r+=d.scrollTop;break;case"left":r+=d.scrollLeft}t[e]=Math.floor(r)+"px"})),t}function a(){var t=l(n=s(i.attr("class")||""),m),n=l(m,n);return(t=e(p,{to:o(i),addClass:"ng-anchor-in "+t,removeClass:"ng-anchor-out "+n,delay:!0})).$$willAnimate?t:null}function u(){p.remove(),r.removeClass("ng-animate-shim"),i.removeClass("ng-animate-shim")}var c,p=I(h(r).cloneNode(!0)),m=s(p.attr("class")||"");if(r.addClass("ng-animate-shim"),i.addClass("ng-animate-shim"),p.addClass("ng-anchor"),f.append(p),!(t=function(){var t=e(p,{addClass:"ng-anchor-out",delay:!0,from:o(r)});return t.$$willAnimate?t:null}())&&!(c=a()))return u();var g=t||c;return{start:function(){function e(){r&&r.end()}var t,r=g.start();return r.done((function(){if(r=null,!c&&(c=a()))return(r=c.start()).done((function(){r=null,u(),t.complete()})),r;u(),t.complete()})),t=new n({end:e,cancel:e})}}}function c(t){var n=t.element,r=t.options||{};return t.structural&&(r.event=t.event,r.structural=!0,r.applyClassesEarly=!0,"leave"===t.event&&(r.onDone=r.domOperation)),r.preparationClasses&&(r.event=g(r.event,r.preparationClasses)),(t=e(n,r)).$$willAnimate?t:null}if(!i.animations&&!i.transitions)return j;var d=a[0].body;t=h(r);var f=I(t.parentNode&&11===t.parentNode.nodeType||d.contains(t)?t:d);return function(e){return e.from&&e.to?function(e,t,r,i){var o=c(e),a=c(t),s=[];if($(i,(function(e){(e=u(r,e.out,e.in))&&s.push(e)})),o||a||0!==s.length)return{start:function(){function e(){$(t,(function(e){e.end()}))}var t=[];o&&t.push(o.start()),a&&t.push(a.start()),$(s,(function(e){t.push(e.start())}));var r=new n({end:e,cancel:e});return n.all(t,(function(e){r.complete(e)})),r}}}(e.from,e.to,e.classes,e.anchors):c(e)}}]}]).provider("$$animateJs",["$animateProvider",function(e){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,n,r){function i(n){n=D(n)?n:n.split(" ");for(var r=[],i={},o=0;o<n.length;o++){var a=n[o],s=e.$$registeredAnimations[a];s&&!i[a]&&(r.push(t.get(s)),i[a]=!0)}return r}var o=a(r);return function(e,t,r,a){function u(){a.domOperation(),o(e,a)}function c(e,t,r,i,o){switch(r){case"animate":t=[t,i.from,i.to,o];break;case"setClass":t=[t,y,b,o];break;case"addClass":t=[t,y,o];break;case"removeClass":t=[t,b,o];break;default:t=[t,o]}if(t.push(i),e=e.apply(e,t))if(A(e.start)&&(e=e.start()),e instanceof n)e.done(o);else if(A(e))return e;return j}function d(e,t,r,i,o){var a=[];return $(i,(function(i){var s=i[o];s&&a.push((function(){var i,o,a=!1,l=function(e){a||(a=!0,(o||j)(e),i.complete(!e))};return i=new n({end:function(){l()},cancel:function(){l(!0)}}),o=c(s,e,t,r,(function(e){l(!1===e)})),i}))})),a}function h(e,t,r,i,o){var a,s,l=d(e,t,r,i,o);if(0===l.length&&("beforeSetClass"===o?(a=d(e,"removeClass",r,i,"beforeRemoveClass"),s=d(e,"addClass",r,i,"beforeAddClass")):"setClass"===o&&(a=d(e,"removeClass",r,i,"removeClass"),s=d(e,"addClass",r,i,"addClass")),a&&(l=l.concat(a)),s&&(l=l.concat(s))),0!==l.length)return function(e){var t=[];return l.length&&$(l,(function(e){t.push(e())})),t.length?n.all(t,e):e(),function(e){$(t,(function(t){e?t.cancel():t.end()}))}}}var f=!1;3===arguments.length&&P(r)&&(a=r,r=null),a=s(a),r||(r=e.attr("class")||"",a.addClass&&(r+=" "+a.addClass),a.removeClass&&(r+=" "+a.removeClass));var p,m,g,v,_,y=a.addClass,b=a.removeClass,w=i(r);if(w.length&&("leave"===t?(v="leave",g="afterLeave"):(v="before"+t.charAt(0).toUpperCase()+t.substr(1),g=t),"enter"!==t&&"move"!==t&&(p=h(e,t,a,w,v)),m=h(e,t,a,w,g)),p||m)return{$$willAnimate:!0,end:function(){return _?_.end():(f=!0,u(),l(e,a),(_=new n).complete(!0)),_},start:function(){function t(t){f=!0,u(),l(e,a),_.complete(t)}if(_)return _;_=new n;var r,i=[];return p&&i.push((function(e){r=p(e)})),i.length?i.push((function(e){u(),e(!0)})):u(),m&&i.push((function(e){r=m(e)})),_.setHost({end:function(){f||((r||j)(void 0),t(void 0))},cancel:function(){f||((r||j)(!0),t(!0))}}),n.chain(i,t),_}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(e,t){function n(t){return e(t.element,t.event,t.classes,t.options)}return function(e){if(!e.from||!e.to)return n(e);var r=n(e.from),i=n(e.to);return r||i?{start:function(){function e(){return function(){$(n,(function(e){e.end()}))}}var n=[];r&&n.push(r.start()),i&&n.push(i.start()),t.all(n,(function(e){o.complete(e)}));var o=new t({end:e(),cancel:e()});return o}}:void 0}}]}])}(window,window.angular),function(e,t){"use strict";function n(e){var t=[];return c(t,l).chars(e),t.join("")}var r,i,o,a,s,l,u,c,d=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",(function(){function n(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?s(i[n]):i[n]]=!0;return r}function h(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function f(e){return e.replace(/&/g,"&amp;").replace(v,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+((e=e.charCodeAt(1))-56320)+65536)+";"})).replace(_,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(t){for(;t;){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),r--,i--)}(n=t.firstChild)&&p(n),t=t.nextSibling}}var m=!1;this.$get=["$$sanitizeUri",function(e){return m&&i(x,M),function(t){var n=[];return u(t,c(n,(function(t,n){return!/^unsafe:/.test(e(t,n))}))),n.join("")}}],this.enableSvg=function(e){return a(e)?(m=e,this):m},r=t.bind,i=t.extend,o=t.forEach,a=t.isDefined,s=t.lowercase,l=t.noop,u=function(t,n){null==t?t="":"string"!=typeof t&&(t=""+t),g.innerHTML=t;var r=5;do{if(0===r)throw d("uinput");r--,e.document.documentMode&&p(g),t=g.innerHTML,g.innerHTML=t}while(t!==g.innerHTML);for(r=g.firstChild;r;){switch(r.nodeType){case 1:n.start(r.nodeName.toLowerCase(),h(r.attributes));break;case 3:n.chars(r.textContent)}var i;if(!((i=r.firstChild)||(1===r.nodeType&&n.end(r.nodeName.toLowerCase()),i=r.nextSibling)))for(;null==i&&(r=r.parentNode)!==g;)i=r.nextSibling,1===r.nodeType&&n.end(r.nodeName.toLowerCase());r=i}for(;r=g.firstChild;)g.removeChild(r)},c=function(e,t){var n=!1,i=r(e,e.push);return{start:function(e,r){e=s(e),!n&&k[e]&&(n=e),n||!0!==x[e]||(i("<"),i(e),o(r,(function(n,r){var o=s(r),a="img"===e&&"src"===o||"background"===o;!0!==T[o]||!0===S[o]&&!t(n,a)||(i(" "),i(r),i('="'),i(f(n)),i('"'))})),i(">"))},end:function(e){e=s(e),n||!0!==x[e]||!0===y[e]||(i("</"),i(e),i(">")),e==n&&(n=!1)},chars:function(e){n||i(f(e))}}};var g,v=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_=/([^#-~ |!])/g,y=n("area,br,col,hr,img,wbr"),b=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),w=n("rp,rt"),L=i({},w,b),M=(b=i({},b,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")),w=i({},w,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")),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")),k=n("script,style"),x=i({},y,b,w,L),S=n("background,cite,href,longdesc,src,xlink:href"),T=(L=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"),w=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),i({},S,w,L));!function(e){if(!e.document||!e.document.implementation)throw d("noinert");var t=((e=e.document.implementation.createHTMLDocument("inert")).documentElement||e.getDocumentElement()).getElementsByTagName("body");1===t.length?g=t[0]:(t=e.createElement("html"),g=e.createElement("body"),t.appendChild(g),e.appendChild(t))}(e)})),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var r=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,l=t.isObject,u=t.isString;return function(t,c,d){function h(e){e&&_.push(n(e))}function f(e,t){var n,r=g(e);for(n in _.push("<a "),r)_.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||_.push('target="',c,'" '),_.push('href="',e.replace(/"/g,"&quot;"),'">'),h(t),_.push("</a>")}if(null==t||""===t)return t;if(!u(t))throw o("notstring",t);for(var p,m,g=s(d)?d:l(d)?function(){return d}:function(){return{}},v=t,_=[];t=v.match(r);)p=t[0],t[2]||t[4]||(p=(t[3]?"http://":"mailto:")+p),m=t.index,h(v.substr(0,m)),f(p,t[0].replace(i,"")),v=v.substring(m+t[0].length);return h(v),e(_.join(""))}}])}(window,window.angular),
+(function(root) {
+    "use strict";
+
+    function checkInt(value) {
+        return (parseInt(value) === value);
+    }
+
+    function checkInts(arrayish) {
+        if (!checkInt(arrayish.length)) { return false; }
+
+        for (var i = 0; i < arrayish.length; i++) {
+            if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    function coerceArray(arg, copy) {
+
+        // ArrayBuffer view
+        if (arg.buffer && arg.name === 'Uint8Array') {
+
+            if (copy) {
+                if (arg.slice) {
+                    arg = arg.slice();
+                } else {
+                    arg = Array.prototype.slice.call(arg);
+                }
+            }
+
+            return arg;
+        }
+
+        // It's an array; check it is a valid representation of a byte
+        if (Array.isArray(arg)) {
+            if (!checkInts(arg)) {
+                throw new Error('Array contains invalid value: ' + arg);
+            }
+
+            return new Uint8Array(arg);
+        }
+
+        // Something else, but behaves like an array (maybe a Buffer? Arguments?)
+        if (checkInt(arg.length) && checkInts(arg)) {
+            return new Uint8Array(arg);
+        }
+
+        throw new Error('unsupported array-like object');
+    }
+
+    function createArray(length) {
+        return new Uint8Array(length);
+    }
+
+    function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {
+        if (sourceStart != null || sourceEnd != null) {
+            if (sourceArray.slice) {
+                sourceArray = sourceArray.slice(sourceStart, sourceEnd);
+            } else {
+                sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);
+            }
+        }
+        targetArray.set(sourceArray, targetStart);
+    }
+
+
+
+    var convertUtf8 = (function() {
+        function toBytes(text) {
+            var result = [], i = 0;
+            text = encodeURI(text);
+            while (i < text.length) {
+                var c = text.charCodeAt(i++);
+
+                // if it is a % sign, encode the following 2 bytes as a hex value
+                if (c === 37) {
+                    result.push(parseInt(text.substr(i, 2), 16))
+                    i += 2;
+
+                // otherwise, just the actual byte
+                } else {
+                    result.push(c)
+                }
+            }
+
+            return coerceArray(result);
+        }
+
+        function fromBytes(bytes) {
+            var result = [], i = 0;
+
+            while (i < bytes.length) {
+                var c = bytes[i];
+
+                if (c < 128) {
+                    result.push(String.fromCharCode(c));
+                    i++;
+                } else if (c > 191 && c < 224) {
+                    result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));
+                    i += 2;
+                } else {
+                    result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));
+                    i += 3;
+                }
+            }
+
+            return result.join('');
+        }
+
+        return {
+            toBytes: toBytes,
+            fromBytes: fromBytes,
+        }
+    })();
+
+    var convertHex = (function() {
+        function toBytes(text) {
+            var result = [];
+            for (var i = 0; i < text.length; i += 2) {
+                result.push(parseInt(text.substr(i, 2), 16));
+            }
+
+            return result;
+        }
+
+        // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html
+        var Hex = '0123456789abcdef';
+
+        function fromBytes(bytes) {
+                var result = [];
+                for (var i = 0; i < bytes.length; i++) {
+                    var v = bytes[i];
+                    result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);
+                }
+                return result.join('');
+        }
+
+        return {
+            toBytes: toBytes,
+            fromBytes: fromBytes,
+        }
+    })();
+
+
+    // Number of rounds by keysize
+    var numberOfRounds = {16: 10, 24: 12, 32: 14}
+
+    // Round constant words
+    var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];
+
+    // S-box and Inverse S-box (S is for Substitution)
+    var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16];
+    var Si =[0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];
+
+    // Transformations for encryption
+    var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];
+    var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];
+    var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];
+    var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];
+
+    // Transformations for decryption
+    var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];
+    var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];
+    var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];
+    var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];
+
+    // Transformations for decryption key expansion
+    var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];
+    var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];
+    var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];
+    var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];
+
+    function convertToInt32(bytes) {
+        var result = [];
+        for (var i = 0; i < bytes.length; i += 4) {
+            result.push(
+                (bytes[i    ] << 24) |
+                (bytes[i + 1] << 16) |
+                (bytes[i + 2] <<  8) |
+                 bytes[i + 3]
+            );
+        }
+        return result;
+    }
+
+    var AES = function(key) {
+        if (!(this instanceof AES)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        Object.defineProperty(this, 'key', {
+            value: coerceArray(key, true)
+        });
+
+        this._prepare();
+    }
+
+
+    AES.prototype._prepare = function() {
+
+        var rounds = numberOfRounds[this.key.length];
+        if (rounds == null) {
+            throw new Error('invalid key size (must be 16, 24 or 32 bytes)');
+        }
+
+        // encryption round keys
+        this._Ke = [];
+
+        // decryption round keys
+        this._Kd = [];
+
+        for (var i = 0; i <= rounds; i++) {
+            this._Ke.push([0, 0, 0, 0]);
+            this._Kd.push([0, 0, 0, 0]);
+        }
+
+        var roundKeyCount = (rounds + 1) * 4;
+        var KC = this.key.length / 4;
+
+        // convert the key into ints
+        var tk = convertToInt32(this.key);
+
+        // copy values into round key arrays
+        var index;
+        for (var i = 0; i < KC; i++) {
+            index = i >> 2;
+            this._Ke[index][i % 4] = tk[i];
+            this._Kd[rounds - index][i % 4] = tk[i];
+        }
+
+        // key expansion (fips-197 section 5.2)
+        var rconpointer = 0;
+        var t = KC, tt;
+        while (t < roundKeyCount) {
+            tt = tk[KC - 1];
+            tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^
+                      (S[(tt >>  8) & 0xFF] << 16) ^
+                      (S[ tt        & 0xFF] <<  8) ^
+                       S[(tt >> 24) & 0xFF]        ^
+                      (rcon[rconpointer] << 24));
+            rconpointer += 1;
+
+            // key expansion (for non-256 bit)
+            if (KC != 8) {
+                for (var i = 1; i < KC; i++) {
+                    tk[i] ^= tk[i - 1];
+                }
+
+            // key expansion for 256-bit keys is "slightly different" (fips-197)
+            } else {
+                for (var i = 1; i < (KC / 2); i++) {
+                    tk[i] ^= tk[i - 1];
+                }
+                tt = tk[(KC / 2) - 1];
+
+                tk[KC / 2] ^= (S[ tt        & 0xFF]        ^
+                              (S[(tt >>  8) & 0xFF] <<  8) ^
+                              (S[(tt >> 16) & 0xFF] << 16) ^
+                              (S[(tt >> 24) & 0xFF] << 24));
+
+                for (var i = (KC / 2) + 1; i < KC; i++) {
+                    tk[i] ^= tk[i - 1];
+                }
+            }
+
+            // copy values into round key arrays
+            var i = 0, r, c;
+            while (i < KC && t < roundKeyCount) {
+                r = t >> 2;
+                c = t % 4;
+                this._Ke[r][c] = tk[i];
+                this._Kd[rounds - r][c] = tk[i++];
+                t++;
+            }
+        }
+
+        // inverse-cipher-ify the decryption round key (fips-197 section 5.3)
+        for (var r = 1; r < rounds; r++) {
+            for (var c = 0; c < 4; c++) {
+                tt = this._Kd[r][c];
+                this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^
+                                  U2[(tt >> 16) & 0xFF] ^
+                                  U3[(tt >>  8) & 0xFF] ^
+                                  U4[ tt        & 0xFF]);
+            }
+        }
+    }
+
+    AES.prototype.encrypt = function(plaintext) {
+        if (plaintext.length != 16) {
+            throw new Error('invalid plaintext size (must be 16 bytes)');
+        }
+
+        var rounds = this._Ke.length - 1;
+        var a = [0, 0, 0, 0];
+
+        // convert plaintext to (ints ^ key)
+        var t = convertToInt32(plaintext);
+        for (var i = 0; i < 4; i++) {
+            t[i] ^= this._Ke[0][i];
+        }
+
+        // apply round transforms
+        for (var r = 1; r < rounds; r++) {
+            for (var i = 0; i < 4; i++) {
+                a[i] = (T1[(t[ i         ] >> 24) & 0xff] ^
+                        T2[(t[(i + 1) % 4] >> 16) & 0xff] ^
+                        T3[(t[(i + 2) % 4] >>  8) & 0xff] ^
+                        T4[ t[(i + 3) % 4]        & 0xff] ^
+                        this._Ke[r][i]);
+            }
+            t = a.slice();
+        }
+
+        // the last round is special
+        var result = createArray(16), tt;
+        for (var i = 0; i < 4; i++) {
+            tt = this._Ke[rounds][i];
+            result[4 * i    ] = (S[(t[ i         ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;
+            result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;
+            result[4 * i + 2] = (S[(t[(i + 2) % 4] >>  8) & 0xff] ^ (tt >>  8)) & 0xff;
+            result[4 * i + 3] = (S[ t[(i + 3) % 4]        & 0xff] ^  tt       ) & 0xff;
+        }
+
+        return result;
+    }
+
+    AES.prototype.decrypt = function(ciphertext) {
+        if (ciphertext.length != 16) {
+            throw new Error('invalid ciphertext size (must be 16 bytes)');
+        }
+
+        var rounds = this._Kd.length - 1;
+        var a = [0, 0, 0, 0];
+
+        // convert plaintext to (ints ^ key)
+        var t = convertToInt32(ciphertext);
+        for (var i = 0; i < 4; i++) {
+            t[i] ^= this._Kd[0][i];
+        }
+
+        // apply round transforms
+        for (var r = 1; r < rounds; r++) {
+            for (var i = 0; i < 4; i++) {
+                a[i] = (T5[(t[ i          ] >> 24) & 0xff] ^
+                        T6[(t[(i + 3) % 4] >> 16) & 0xff] ^
+                        T7[(t[(i + 2) % 4] >>  8) & 0xff] ^
+                        T8[ t[(i + 1) % 4]        & 0xff] ^
+                        this._Kd[r][i]);
+            }
+            t = a.slice();
+        }
+
+        // the last round is special
+        var result = createArray(16), tt;
+        for (var i = 0; i < 4; i++) {
+            tt = this._Kd[rounds][i];
+            result[4 * i    ] = (Si[(t[ i         ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;
+            result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;
+            result[4 * i + 2] = (Si[(t[(i + 2) % 4] >>  8) & 0xff] ^ (tt >>  8)) & 0xff;
+            result[4 * i + 3] = (Si[ t[(i + 1) % 4]        & 0xff] ^  tt       ) & 0xff;
+        }
+
+        return result;
+    }
+
+
+    /**
+     *  Mode Of Operation - Electonic Codebook (ECB)
+     */
+    var ModeOfOperationECB = function(key) {
+        if (!(this instanceof ModeOfOperationECB)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        this.description = "Electronic Code Block";
+        this.name = "ecb";
+
+        this._aes = new AES(key);
+    }
+
+    ModeOfOperationECB.prototype.encrypt = function(plaintext) {
+        plaintext = coerceArray(plaintext);
+
+        if ((plaintext.length % 16) !== 0) {
+            throw new Error('invalid plaintext size (must be multiple of 16 bytes)');
+        }
+
+        var ciphertext = createArray(plaintext.length);
+        var block = createArray(16);
+
+        for (var i = 0; i < plaintext.length; i += 16) {
+            copyArray(plaintext, block, 0, i, i + 16);
+            block = this._aes.encrypt(block);
+            copyArray(block, ciphertext, i);
+        }
+
+        return ciphertext;
+    }
+
+    ModeOfOperationECB.prototype.decrypt = function(ciphertext) {
+        ciphertext = coerceArray(ciphertext);
+
+        if ((ciphertext.length % 16) !== 0) {
+            throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');
+        }
+
+        var plaintext = createArray(ciphertext.length);
+        var block = createArray(16);
+
+        for (var i = 0; i < ciphertext.length; i += 16) {
+            copyArray(ciphertext, block, 0, i, i + 16);
+            block = this._aes.decrypt(block);
+            copyArray(block, plaintext, i);
+        }
+
+        return plaintext;
+    }
+
+
+    /**
+     *  Mode Of Operation - Cipher Block Chaining (CBC)
+     */
+    var ModeOfOperationCBC = function(key, iv) {
+        if (!(this instanceof ModeOfOperationCBC)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        this.description = "Cipher Block Chaining";
+        this.name = "cbc";
+
+        if (!iv) {
+            iv = createArray(16);
+
+        } else if (iv.length != 16) {
+            throw new Error('invalid initialation vector size (must be 16 bytes)');
+        }
+
+        this._lastCipherblock = coerceArray(iv, true);
+
+        this._aes = new AES(key);
+    }
+
+    ModeOfOperationCBC.prototype.encrypt = function(plaintext) {
+        plaintext = coerceArray(plaintext);
+
+        if ((plaintext.length % 16) !== 0) {
+            throw new Error('invalid plaintext size (must be multiple of 16 bytes)');
+        }
+
+        var ciphertext = createArray(plaintext.length);
+        var block = createArray(16);
+
+        for (var i = 0; i < plaintext.length; i += 16) {
+            copyArray(plaintext, block, 0, i, i + 16);
+
+            for (var j = 0; j < 16; j++) {
+                block[j] ^= this._lastCipherblock[j];
+            }
+
+            this._lastCipherblock = this._aes.encrypt(block);
+            copyArray(this._lastCipherblock, ciphertext, i);
+        }
+
+        return ciphertext;
+    }
+
+    ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {
+        ciphertext = coerceArray(ciphertext);
+
+        if ((ciphertext.length % 16) !== 0) {
+            throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');
+        }
+
+        var plaintext = createArray(ciphertext.length);
+        var block = createArray(16);
+
+        for (var i = 0; i < ciphertext.length; i += 16) {
+            copyArray(ciphertext, block, 0, i, i + 16);
+            block = this._aes.decrypt(block);
+
+            for (var j = 0; j < 16; j++) {
+                plaintext[i + j] = block[j] ^ this._lastCipherblock[j];
+            }
+
+            copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);
+        }
+
+        return plaintext;
+    }
+
+
+    /**
+     *  Mode Of Operation - Cipher Feedback (CFB)
+     */
+    var ModeOfOperationCFB = function(key, iv, segmentSize) {
+        if (!(this instanceof ModeOfOperationCFB)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        this.description = "Cipher Feedback";
+        this.name = "cfb";
+
+        if (!iv) {
+            iv = createArray(16);
+
+        } else if (iv.length != 16) {
+            throw new Error('invalid initialation vector size (must be 16 size)');
+        }
+
+        if (!segmentSize) { segmentSize = 1; }
+
+        this.segmentSize = segmentSize;
+
+        this._shiftRegister = coerceArray(iv, true);
+
+        this._aes = new AES(key);
+    }
+
+    ModeOfOperationCFB.prototype.encrypt = function(plaintext) {
+        if ((plaintext.length % this.segmentSize) != 0) {
+            throw new Error('invalid plaintext size (must be segmentSize bytes)');
+        }
+
+        var encrypted = coerceArray(plaintext, true);
+
+        var xorSegment;
+        for (var i = 0; i < encrypted.length; i += this.segmentSize) {
+            xorSegment = this._aes.encrypt(this._shiftRegister);
+            for (var j = 0; j < this.segmentSize; j++) {
+                encrypted[i + j] ^= xorSegment[j];
+            }
+
+            // Shift the register
+            copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
+            copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
+        }
+
+        return encrypted;
+    }
+
+    ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {
+        if ((ciphertext.length % this.segmentSize) != 0) {
+            throw new Error('invalid ciphertext size (must be segmentSize bytes)');
+        }
+
+        var plaintext = coerceArray(ciphertext, true);
+
+        var xorSegment;
+        for (var i = 0; i < plaintext.length; i += this.segmentSize) {
+            xorSegment = this._aes.encrypt(this._shiftRegister);
+
+            for (var j = 0; j < this.segmentSize; j++) {
+                plaintext[i + j] ^= xorSegment[j];
+            }
+
+            // Shift the register
+            copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
+            copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
+        }
+
+        return plaintext;
+    }
+
+    /**
+     *  Mode Of Operation - Output Feedback (OFB)
+     */
+    var ModeOfOperationOFB = function(key, iv) {
+        if (!(this instanceof ModeOfOperationOFB)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        this.description = "Output Feedback";
+        this.name = "ofb";
+
+        if (!iv) {
+            iv = createArray(16);
+
+        } else if (iv.length != 16) {
+            throw new Error('invalid initialation vector size (must be 16 bytes)');
+        }
+
+        this._lastPrecipher = coerceArray(iv, true);
+        this._lastPrecipherIndex = 16;
+
+        this._aes = new AES(key);
+    }
+
+    ModeOfOperationOFB.prototype.encrypt = function(plaintext) {
+        var encrypted = coerceArray(plaintext, true);
+
+        for (var i = 0; i < encrypted.length; i++) {
+            if (this._lastPrecipherIndex === 16) {
+                this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);
+                this._lastPrecipherIndex = 0;
+            }
+            encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];
+        }
+
+        return encrypted;
+    }
+
+    // Decryption is symetric
+    ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;
+
+
+    /**
+     *  Counter object for CTR common mode of operation
+     */
+    var Counter = function(initialValue) {
+        if (!(this instanceof Counter)) {
+            throw Error('Counter must be instanitated with `new`');
+        }
+
+        // We allow 0, but anything false-ish uses the default 1
+        if (initialValue !== 0 && !initialValue) { initialValue = 1; }
+
+        if (typeof(initialValue) === 'number') {
+            this._counter = createArray(16);
+            this.setValue(initialValue);
+
+        } else {
+            this.setBytes(initialValue);
+        }
+    }
+
+    Counter.prototype.setValue = function(value) {
+        if (typeof(value) !== 'number' || parseInt(value) != value) {
+            throw new Error('invalid counter value (must be an integer)');
+        }
+
+        // We cannot safely handle numbers beyond the safe range for integers
+        if (value > Number.MAX_SAFE_INTEGER) {
+            throw new Error('integer value out of safe range');
+        }
+
+        for (var index = 15; index >= 0; --index) {
+            this._counter[index] = value % 256;
+            value = parseInt(value / 256);
+        }
+    }
+
+    Counter.prototype.setBytes = function(bytes) {
+        bytes = coerceArray(bytes, true);
+
+        if (bytes.length != 16) {
+            throw new Error('invalid counter bytes size (must be 16 bytes)');
+        }
+
+        this._counter = bytes;
+    };
+
+    Counter.prototype.increment = function() {
+        for (var i = 15; i >= 0; i--) {
+            if (this._counter[i] === 255) {
+                this._counter[i] = 0;
+            } else {
+                this._counter[i]++;
+                break;
+            }
+        }
+    }
+
+
+    /**
+     *  Mode Of Operation - Counter (CTR)
+     */
+    var ModeOfOperationCTR = function(key, counter) {
+        if (!(this instanceof ModeOfOperationCTR)) {
+            throw Error('AES must be instanitated with `new`');
+        }
+
+        this.description = "Counter";
+        this.name = "ctr";
+
+        if (!(counter instanceof Counter)) {
+            counter = new Counter(counter)
+        }
+
+        this._counter = counter;
+
+        this._remainingCounter = null;
+        this._remainingCounterIndex = 16;
+
+        this._aes = new AES(key);
+    }
+
+    ModeOfOperationCTR.prototype.encrypt = function(plaintext) {
+        var encrypted = coerceArray(plaintext, true);
+
+        for (var i = 0; i < encrypted.length; i++) {
+            if (this._remainingCounterIndex === 16) {
+                this._remainingCounter = this._aes.encrypt(this._counter._counter);
+                this._remainingCounterIndex = 0;
+                this._counter.increment();
+            }
+            encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];
+        }
+
+        return encrypted;
+    }
+
+    // Decryption is symetric
+    ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;
+
+
+    ///////////////////////
+    // Padding
+
+    // See:https://tools.ietf.org/html/rfc2315
+    function pkcs7pad(data) {
+        data = coerceArray(data, true);
+        var padder = 16 - (data.length % 16);
+        var result = createArray(data.length + padder);
+        copyArray(data, result);
+        for (var i = data.length; i < result.length; i++) {
+            result[i] = padder;
+        }
+        return result;
+    }
+
+    function pkcs7strip(data) {
+        data = coerceArray(data, true);
+        if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }
+
+        var padder = data[data.length - 1];
+        if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }
+
+        var length = data.length - padder;
+        for (var i = 0; i < padder; i++) {
+            if (data[length + i] !== padder) {
+                throw new Error('PKCS#7 invalid padding byte');
+            }
+        }
+
+        var result = createArray(length);
+        copyArray(data, result, 0, 0, length);
+        return result;
+    }
+
+    ///////////////////////
+    // Exporting
+
+
+    // The block cipher
+    var aesjs = {
+        AES: AES,
+        Counter: Counter,
+
+        ModeOfOperation: {
+            ecb: ModeOfOperationECB,
+            cbc: ModeOfOperationCBC,
+            cfb: ModeOfOperationCFB,
+            ofb: ModeOfOperationOFB,
+            ctr: ModeOfOperationCTR
+        },
+
+        utils: {
+            hex: convertHex,
+            utf8: convertUtf8
+        },
+
+        padding: {
+            pkcs7: {
+                pad: pkcs7pad,
+                strip: pkcs7strip
+            }
+        },
+
+        _arrayTest: {
+            coerceArray: coerceArray,
+            createArray: createArray,
+            copyArray: copyArray,
+        }
+    };
+
+
+    // node.js
+    if (typeof exports !== 'undefined') {
+        module.exports = aesjs
+
+    // RequireJS/AMD
+    // http://www.requirejs.org/docs/api.html
+    // https://github.com/amdjs/amdjs-api/wiki/AMD
+    } else if (typeof(define) === 'function' && define.amd) {
+        define([], function() { return aesjs; });
+
+    // Web Browsers
+    } else {
+
+        // If there was an existing library at "aesjs" make sure it's still available
+        if (root.aesjs) {
+            aesjs._aesjs = root.aesjs;
+        }
+
+        root.aesjs = aesjs;
+    }
+
+
+})(this);
+
+!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function l(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[];for(t=0;t<e.length;++t)s.push(a(e[t],t));return s}function h(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function L(e,a){for(var t in a)h(a,t)&&(e[t]=a[t]);return h(a,"toString")&&(e.toString=a.toString),h(a,"valueOf")&&(e.valueOf=a.valueOf),e}function c(e,a,t,s){return Sa(e,a,t,s,!0).utc()}function Y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var a=Y(e),t=n.call(a.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&a.overflow<0&&!a.empty&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&t);if(e._strict&&(s=s&&0===a.charsLeftOver&&0===a.unusedTokens.length&&void 0===a.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function f(e){var a=c(NaN);return null!=e?L(Y(a),e):Y(a).userInvalidated=!0,a}n=Array.prototype.some?Array.prototype.some:function(e){for(var a=Object(this),t=a.length>>>0,s=0;s<t;s++)if(s in a&&e.call(this,a[s],s,a))return!0;return!1};var d=l.momentProperties=[];function k(e,a){var t,s,n;if(o(a._isAMomentObject)||(e._isAMomentObject=a._isAMomentObject),o(a._i)||(e._i=a._i),o(a._f)||(e._f=a._f),o(a._l)||(e._l=a._l),o(a._strict)||(e._strict=a._strict),o(a._tzm)||(e._tzm=a._tzm),o(a._isUTC)||(e._isUTC=a._isUTC),o(a._offset)||(e._offset=a._offset),o(a._pf)||(e._pf=Y(a)),o(a._locale)||(e._locale=a._locale),0<d.length)for(t=0;t<d.length;t++)o(n=a[s=d[t]])||(e[s]=n);return e}var a=!1;function p(e){k(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===a&&(a=!0,l.updateOffset(this),a=!1)}function D(e){return e instanceof p||null!=e&&null!=e._isAMomentObject}function T(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var a=+e,t=0;return 0!==a&&isFinite(a)&&(t=T(a)),t}function r(e,a,t){var s,n=Math.min(e.length,a.length),d=Math.abs(e.length-a.length),r=0;for(s=0;s<n;s++)(t&&e[s]!==a[s]||!t&&g(e[s])!==g(a[s]))&&r++;return r+d}function w(e){!1===l.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function t(n,d){var r=!0;return L(function(){if(null!=l.deprecationHandler&&l.deprecationHandler(null,n),r){for(var e,a=[],t=0;t<arguments.length;t++){if(e="","object"==typeof arguments[t]){for(var s in e+="\n["+t+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[t];a.push(e)}w(n+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),r=!1}return d.apply(this,arguments)},d)}var s,v={};function S(e,a){null!=l.deprecationHandler&&l.deprecationHandler(e,a),v[e]||(w(a),v[e]=!0)}function H(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,a){var t,s=L({},e);for(t in a)h(a,t)&&(i(e[t])&&i(a[t])?(s[t]={},L(s[t],e[t]),L(s[t],a[t])):null!=a[t]?s[t]=a[t]:delete s[t]);for(t in e)h(e,t)&&!h(a,t)&&i(e[t])&&(s[t]=L({},s[t]));return s}function j(e){null!=e&&this.set(e)}l.suppressDeprecationWarnings=!1,l.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var a,t=[];for(a in e)h(e,a)&&t.push(a);return t};var x={};function O(e,a){var t=e.toLowerCase();x[t]=x[t+"s"]=x[a]=e}function P(e){return"string"==typeof e?x[e]||x[e.toLowerCase()]:void 0}function W(e){var a,t,s={};for(t in e)h(e,t)&&(a=P(t))&&(s[a]=e[t]);return s}var A={};function E(e,a){A[e]=a}function F(e,a,t){var s=""+Math.abs(e),n=a-s.length;return(0<=e?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,J=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},R={};function C(e,a,t,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(R[e]=n),a&&(R[a[0]]=function(){return F(n.apply(this,arguments),a[1],a[2])}),t&&(R[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function I(e,a){return e.isValid()?(a=U(a,e.localeData()),N[a]=N[a]||function(s){var e,n,a,d=s.match(z);for(e=0,n=d.length;e<n;e++)R[d[e]]?d[e]=R[d[e]]:d[e]=(a=d[e]).match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"");return function(e){var a,t="";for(a=0;a<n;a++)t+=H(d[a])?d[a].call(e,s):d[a];return t}}(a),N[a](e)):e.localeData().invalidDate()}function U(e,a){var t=5;function s(e){return a.longDateFormat(e)||e}for(J.lastIndex=0;0<=t&&J.test(e);)e=e.replace(J,s),J.lastIndex=0,t-=1;return e}var G=/\d/,V=/\d\d/,K=/\d{3}/,Z=/\d{4}/,$=/[+-]?\d{6}/,B=/\d\d?/,q=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,X=/\d{1,3}/,ee=/\d{1,4}/,ae=/[+-]?\d{1,6}/,te=/\d+/,se=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,re=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,_e={};function ie(e,t,s){_e[e]=H(t)?t:function(e,a){return e&&s?s:t}}function oe(e,a){return h(_e,e)?_e[e](a._strict,a._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,a,t,s,n){return a||t||s||n})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ue={};function le(e,t){var a,s=t;for("string"==typeof e&&(e=[e]),m(t)&&(s=function(e,a){a[t]=g(e)}),a=0;a<e.length;a++)ue[e[a]]=s}function Me(e,n){le(e,function(e,a,t,s){t._w=t._w||{},n(e,t._w,t,s)})}var he=0,Le=1,ce=2,Ye=3,ye=4,fe=5,ke=6,pe=7,De=8;function Te(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}C("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),O("year","y"),E("year",1),ie("Y",se),ie("YY",B,V),ie("YYYY",ee,Z),ie("YYYYY",ae,$),ie("YYYYYY",ae,$),le(["YYYYY","YYYYYY"],he),le("YYYY",function(e,a){a[he]=2===e.length?l.parseTwoDigitYear(e):g(e)}),le("YY",function(e,a){a[he]=l.parseTwoDigitYear(e)}),le("Y",function(e,a){a[he]=parseInt(e,10)}),l.parseTwoDigitYear=function(e){return g(e)+(68<g(e)?1900:2e3)};var we,ve=Se("FullYear",!0);function Se(a,t){return function(e){return null!=e?(be(this,a,e),l.updateOffset(this,t),this):He(this,a)}}function He(e,a){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+a]():NaN}function be(e,a,t){e.isValid()&&!isNaN(t)&&("FullYear"===a&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+a](t,e.month(),je(t,e.month())):e._d["set"+(e._isUTC?"UTC":"")+a](t))}function je(e,a){if(isNaN(e)||isNaN(a))return NaN;var t,s=(a%(t=12)+t)%t;return e+=(a-s)/12,1===s?ge(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var a;for(a=0;a<this.length;++a)if(this[a]===e)return a;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),O("month","M"),E("month",8),ie("M",B),ie("MM",B,V),ie("MMM",function(e,a){return a.monthsShortRegex(e)}),ie("MMMM",function(e,a){return a.monthsRegex(e)}),le(["M","MM"],function(e,a){a[Le]=g(e)-1}),le(["MMM","MMMM"],function(e,a,t,s){var n=t._locale.monthsParse(e,s,t._strict);null!=n?a[Le]=n:Y(t).invalidMonth=e});var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Pe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function We(e,a){var t;if(!e.isValid())return e;if("string"==typeof a)if(/^\d+$/.test(a))a=g(a);else if(!m(a=e.localeData().monthsParse(a)))return e;return t=Math.min(e.date(),je(e.year(),a)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](a,t),e}function Ae(e){return null!=e?(We(this,e),l.updateOffset(this,!0),this):He(this,"Month")}var Ee=re;var Fe=re;function ze(){function e(e,a){return a.length-e.length}var a,t,s=[],n=[],d=[];for(a=0;a<12;a++)t=c([2e3,a]),s.push(this.monthsShort(t,"")),n.push(this.months(t,"")),d.push(this.months(t,"")),d.push(this.monthsShort(t,""));for(s.sort(e),n.sort(e),d.sort(e),a=0;a<12;a++)s[a]=me(s[a]),n[a]=me(n[a]);for(a=0;a<24;a++)d[a]=me(d[a]);this._monthsRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Je(e){var a;if(e<100&&0<=e){var t=Array.prototype.slice.call(arguments);t[0]=e+400,a=new Date(Date.UTC.apply(null,t)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(e)}else a=new Date(Date.UTC.apply(null,arguments));return a}function Ne(e,a,t){var s=7+a-t;return-((7+Je(e,0,s).getUTCDay()-a)%7)+s-1}function Re(e,a,t,s,n){var d,r,_=1+7*(a-1)+(7+t-s)%7+Ne(e,s,n);return r=_<=0?Te(d=e-1)+_:_>Te(e)?(d=e+1,_-Te(e)):(d=e,_),{year:d,dayOfYear:r}}function Ce(e,a,t){var s,n,d=Ne(e.year(),a,t),r=Math.floor((e.dayOfYear()-d-1)/7)+1;return r<1?s=r+Ie(n=e.year()-1,a,t):r>Ie(e.year(),a,t)?(s=r-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function Ie(e,a,t){var s=Ne(e,a,t),n=Ne(e+1,a,t);return(Te(e)-s+n)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),E("week",5),E("isoWeek",5),ie("w",B),ie("ww",B,V),ie("W",B),ie("WW",B,V),Me(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=g(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),E("day",11),E("weekday",11),E("isoWeekday",11),ie("d",B),ie("e",B),ie("E",B),ie("dd",function(e,a){return a.weekdaysMinRegex(e)}),ie("ddd",function(e,a){return a.weekdaysShortRegex(e)}),ie("dddd",function(e,a){return a.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e}),Me(["d","e","E"],function(e,a,t,s){a[s]=g(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=re;var $e=re;var Be=re;function qe(){function e(e,a){return a.length-e.length}var a,t,s,n,d,r=[],_=[],i=[],o=[];for(a=0;a<7;a++)t=c([2e3,1]).day(a),s=this.weekdaysMin(t,""),n=this.weekdaysShort(t,""),d=this.weekdays(t,""),r.push(s),_.push(n),i.push(d),o.push(s),o.push(n),o.push(d);for(r.sort(e),_.sort(e),i.sort(e),o.sort(e),a=0;a<7;a++)_[a]=me(_[a]),i[a]=me(i[a]),o[a]=me(o[a]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Qe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),O("hour","h"),E("hour",13),ie("a",ea),ie("A",ea),ie("H",B),ie("h",B),ie("k",B),ie("HH",B,V),ie("hh",B,V),ie("kk",B,V),ie("hmm",q),ie("hmmss",Q),ie("Hmm",q),ie("Hmmss",Q),le(["H","HH"],Ye),le(["k","kk"],function(e,a,t){var s=g(e);a[Ye]=24===s?0:s}),le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),le(["h","hh"],function(e,a,t){a[Ye]=g(e),Y(t).bigHour=!0}),le("hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s)),Y(t).bigHour=!0}),le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n)),Y(t).bigHour=!0}),le("Hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s))}),le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n))});var aa,ta=Se("Hours",!0),sa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Oe,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ke,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},da={};function ra(e){return e?e.toLowerCase().replace("_","-"):e}function _a(e){var a=null;if(!na[e]&&"undefined"!=typeof module&&module&&module.exports)try{a=aa._abbr,require("./locale/"+e),ia(a)}catch(e){}return na[e]}function ia(e,a){var t;return e&&((t=o(a)?ma(e):oa(e,a))?aa=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),aa._abbr}function oa(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=_a(a.parentLocale)))return da[a.parentLocale]||(da[a.parentLocale]=[]),da[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new j(b(s,a)),da[e]&&da[e].forEach(function(e){oa(e.name,e.config)}),ia(e),na[e]}function ma(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return aa;if(!_(e)){if(a=_a(e))return a;e=[e]}return function(e){for(var a,t,s,n,d=0;d<e.length;){for(a=(n=ra(e[d]).split("-")).length,t=(t=ra(e[d+1]))?t.split("-"):null;0<a;){if(s=_a(n.slice(0,a).join("-")))return s;if(t&&t.length>=a&&r(n,t,!0)>=a-1)break;a--}d++}return aa}(e)}function ua(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Le]<0||11<t[Le]?Le:t[ce]<1||t[ce]>je(t[he],t[Le])?ce:t[Ye]<0||24<t[Ye]||24===t[Ye]&&(0!==t[ye]||0!==t[fe]||0!==t[ke])?Ye:t[ye]<0||59<t[ye]?ye:t[fe]<0||59<t[fe]?fe:t[ke]<0||999<t[ke]?ke:-1,Y(e)._overflowDayOfYear&&(a<he||ce<a)&&(a=ce),Y(e)._overflowWeeks&&-1===a&&(a=pe),Y(e)._overflowWeekday&&-1===a&&(a=De),Y(e).overflow=a),e}function la(e,a,t){return null!=e?e:null!=a?a:t}function Ma(e){var a,t,s,n,d,r=[];if(!e._d){var _,i;for(_=e,i=new Date(l.now()),s=_._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[ce]&&null==e._a[Le]&&function(e){var a,t,s,n,d,r,_,i;if(null!=(a=e._w).GG||null!=a.W||null!=a.E)d=1,r=4,t=la(a.GG,e._a[he],Ce(Ha(),1,4).year),s=la(a.W,1),((n=la(a.E,1))<1||7<n)&&(i=!0);else{d=e._locale._week.dow,r=e._locale._week.doy;var o=Ce(Ha(),d,r);t=la(a.gg,e._a[he],o.year),s=la(a.w,o.week),null!=a.d?((n=a.d)<0||6<n)&&(i=!0):null!=a.e?(n=a.e+d,(a.e<0||6<a.e)&&(i=!0)):n=d}s<1||s>Ie(t,d,r)?Y(e)._overflowWeeks=!0:null!=i?Y(e)._overflowWeekday=!0:(_=Re(t,s,n,d,r),e._a[he]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(d=la(e._a[he],s[he]),(e._dayOfYear>Te(d)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=Je(d,0,e._dayOfYear),e._a[Le]=t.getUTCMonth(),e._a[ce]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=r[a]=s[a];for(;a<7;a++)e._a[a]=r[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[Ye]&&0===e._a[ye]&&0===e._a[fe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?Je:function(e,a,t,s,n,d,r){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,d,r),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,d,r),_}).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(Y(e).weekdayMismatch=!0)}}var ha=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,La=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ca=/Z|[+-]\d\d(?::?\d\d)?/,Ya=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ya=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fa=/^\/?Date\((\-?\d+)/i;function ka(e){var a,t,s,n,d,r,_=e._i,i=ha.exec(_)||La.exec(_);if(i){for(Y(e).iso=!0,a=0,t=Ya.length;a<t;a++)if(Ya[a][1].exec(i[1])){n=Ya[a][0],s=!1!==Ya[a][2];break}if(null==n)return void(e._isValid=!1);if(i[3]){for(a=0,t=ya.length;a<t;a++)if(ya[a][1].exec(i[3])){d=(i[2]||" ")+ya[a][0];break}if(null==d)return void(e._isValid=!1)}if(!s&&null!=d)return void(e._isValid=!1);if(i[4]){if(!ca.exec(i[4]))return void(e._isValid=!1);r="Z"}e._f=n+(d||"")+(r||""),wa(e)}else e._isValid=!1}var pa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Da(e,a,t,s,n,d){var r=[function(e){var a=parseInt(e,10);{if(a<=49)return 2e3+a;if(a<=999)return 1900+a}return a}(e),Pe.indexOf(a),parseInt(t,10),parseInt(s,10),parseInt(n,10)];return d&&r.push(parseInt(d,10)),r}var Ta={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ga(e){var a,t,s,n=pa.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(n){var d=Da(n[4],n[3],n[2],n[5],n[6],n[7]);if(a=n[1],t=d,s=e,a&&Ve.indexOf(a)!==new Date(t[0],t[1],t[2]).getDay()&&(Y(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=d,e._tzm=function(e,a,t){if(e)return Ta[e];if(a)return 0;var s=parseInt(t,10),n=s%100;return(s-n)/100*60+n}(n[8],n[9],n[10]),e._d=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Y(e).rfc2822=!0}else e._isValid=!1}function wa(e){if(e._f!==l.ISO_8601)if(e._f!==l.RFC_2822){e._a=[],Y(e).empty=!0;var a,t,s,n,d,r,_,i,o=""+e._i,m=o.length,u=0;for(s=U(e._f,e._locale).match(z)||[],a=0;a<s.length;a++)n=s[a],(t=(o.match(oe(n,e))||[])[0])&&(0<(d=o.substr(0,o.indexOf(t))).length&&Y(e).unusedInput.push(d),o=o.slice(o.indexOf(t)+t.length),u+=t.length),R[n]?(t?Y(e).empty=!1:Y(e).unusedTokens.push(n),r=n,i=e,null!=(_=t)&&h(ue,r)&&ue[r](_,i._a,i,r)):e._strict&&!t&&Y(e).unusedTokens.push(n);Y(e).charsLeftOver=m-u,0<o.length&&Y(e).unusedInput.push(o),e._a[Ye]<=12&&!0===Y(e).bigHour&&0<e._a[Ye]&&(Y(e).bigHour=void 0),Y(e).parsedDateParts=e._a.slice(0),Y(e).meridiem=e._meridiem,e._a[Ye]=function(e,a,t){var s;if(null==t)return a;return null!=e.meridiemHour?e.meridiemHour(a,t):(null!=e.isPM&&((s=e.isPM(t))&&a<12&&(a+=12),s||12!==a||(a=0)),a)}(e._locale,e._a[Ye],e._meridiem),Ma(e),ua(e)}else ga(e);else ka(e)}function va(e){var a,t,s,n,d=e._i,r=e._f;return e._locale=e._locale||ma(e._l),null===d||void 0===r&&""===d?f({nullInput:!0}):("string"==typeof d&&(e._i=d=e._locale.preparse(d)),D(d)?new p(ua(d)):(u(d)?e._d=d:_(r)?function(e){var a,t,s,n,d;if(0===e._f.length)return Y(e).invalidFormat=!0,e._d=new Date(NaN);for(n=0;n<e._f.length;n++)d=0,a=k({},e),null!=e._useUTC&&(a._useUTC=e._useUTC),a._f=e._f[n],wa(a),y(a)&&(d+=Y(a).charsLeftOver,d+=10*Y(a).unusedTokens.length,Y(a).score=d,(null==s||d<s)&&(s=d,t=a));L(e,t||a)}(e):r?wa(e):o(t=(a=e)._i)?a._d=new Date(l.now()):u(t)?a._d=new Date(t.valueOf()):"string"==typeof t?(s=a,null===(n=fa.exec(s._i))?(ka(s),!1===s._isValid&&(delete s._isValid,ga(s),!1===s._isValid&&(delete s._isValid,l.createFromInputFallback(s)))):s._d=new Date(+n[1])):_(t)?(a._a=M(t.slice(0),function(e){return parseInt(e,10)}),Ma(a)):i(t)?function(e){if(!e._d){var a=W(e._i);e._a=M([a.year,a.month,a.day||a.date,a.hour,a.minute,a.second,a.millisecond],function(e){return e&&parseInt(e,10)}),Ma(e)}}(a):m(t)?a._d=new Date(t):l.createFromInputFallback(a),y(e)||(e._d=null),e))}function Sa(e,a,t,s,n){var d,r={};return!0!==t&&!1!==t||(s=t,t=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var a;for(a in e)if(e.hasOwnProperty(a))return!1;return!0}(e)||_(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=t,r._i=e,r._f=a,r._strict=s,(d=new p(ua(va(r))))._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function Ha(e,a,t,s){return Sa(e,a,t,s,!1)}l.createFromInputFallback=t("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),l.ISO_8601=function(){},l.RFC_2822=function(){};var ba=t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()}),ja=t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:f()});function xa(e,a){var t,s;if(1===a.length&&_(a[0])&&(a=a[0]),!a.length)return Ha();for(t=a[0],s=1;s<a.length;++s)a[s].isValid()&&!a[s][e](t)||(t=a[s]);return t}var Oa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pa(e){var a=W(e),t=a.year||0,s=a.quarter||0,n=a.month||0,d=a.week||a.isoWeek||0,r=a.day||0,_=a.hour||0,i=a.minute||0,o=a.second||0,m=a.millisecond||0;this._isValid=function(e){for(var a in e)if(-1===we.call(Oa,a)||null!=e[a]&&isNaN(e[a]))return!1;for(var t=!1,s=0;s<Oa.length;++s)if(e[Oa[s]]){if(t)return!1;parseFloat(e[Oa[s]])!==g(e[Oa[s]])&&(t=!0)}return!0}(a),this._milliseconds=+m+1e3*o+6e4*i+1e3*_*60*60,this._days=+r+7*d,this._months=+n+3*s+12*t,this._data={},this._locale=ma(),this._bubble()}function Wa(e){return e instanceof Pa}function Aa(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ea(e,t){C(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+F(~~(e/60),2)+t+F(~~e%60,2)})}Ea("Z",":"),Ea("ZZ",""),ie("Z",de),ie("ZZ",de),le(["Z","ZZ"],function(e,a,t){t._useUTC=!0,t._tzm=za(de,e)});var Fa=/([\+\-]|\d\d)/gi;function za(e,a){var t=(a||"").match(e);if(null===t)return null;var s=((t[t.length-1]||[])+"").match(Fa)||["-",0,0],n=60*s[1]+g(s[2]);return 0===n?0:"+"===s[0]?n:-n}function Ja(e,a){var t,s;return a._isUTC?(t=a.clone(),s=(D(e)||u(e)?e.valueOf():Ha(e).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+s),l.updateOffset(t,!1),t):Ha(e).local()}function Na(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ra(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}l.updateOffset=function(){};var Ca=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ia=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ua(e,a){var t,s,n,d=e,r=null;return Wa(e)?d={ms:e._milliseconds,d:e._days,M:e._months}:m(e)?(d={},a?d[a]=e:d.milliseconds=e):(r=Ca.exec(e))?(t="-"===r[1]?-1:1,d={y:0,d:g(r[ce])*t,h:g(r[Ye])*t,m:g(r[ye])*t,s:g(r[fe])*t,ms:g(Aa(1e3*r[ke]))*t}):(r=Ia.exec(e))?(t="-"===r[1]?-1:1,d={y:Ga(r[2],t),M:Ga(r[3],t),w:Ga(r[4],t),d:Ga(r[5],t),h:Ga(r[6],t),m:Ga(r[7],t),s:Ga(r[8],t)}):null==d?d={}:"object"==typeof d&&("from"in d||"to"in d)&&(n=function(e,a){var t;if(!e.isValid()||!a.isValid())return{milliseconds:0,months:0};a=Ja(a,e),e.isBefore(a)?t=Va(e,a):((t=Va(a,e)).milliseconds=-t.milliseconds,t.months=-t.months);return t}(Ha(d.from),Ha(d.to)),(d={}).ms=n.milliseconds,d.M=n.months),s=new Pa(d),Wa(e)&&h(e,"_locale")&&(s._locale=e._locale),s}function Ga(e,a){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*a}function Va(e,a){var t={};return t.months=a.month()-e.month()+12*(a.year()-e.year()),e.clone().add(t.months,"M").isAfter(a)&&--t.months,t.milliseconds=+a-+e.clone().add(t.months,"M"),t}function Ka(s,n){return function(e,a){var t;return null===a||isNaN(+a)||(S(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=e,e=a,a=t),Za(this,Ua(e="string"==typeof e?+e:e,a),s),this}}function Za(e,a,t,s){var n=a._milliseconds,d=Aa(a._days),r=Aa(a._months);e.isValid()&&(s=null==s||s,r&&We(e,He(e,"Month")+r*t),d&&be(e,"Date",He(e,"Date")+d*t),n&&e._d.setTime(e._d.valueOf()+n*t),s&&l.updateOffset(e,d||r))}Ua.fn=Pa.prototype,Ua.invalid=function(){return Ua(NaN)};var $a=Ka(1,"add"),Ba=Ka(-1,"subtract");function qa(e,a){var t=12*(a.year()-e.year())+(a.month()-e.month()),s=e.clone().add(t,"months");return-(t+(a-s<0?(a-s)/(s-e.clone().add(t-1,"months")):(a-s)/(e.clone().add(t+1,"months")-s)))||0}function Qa(e){var a;return void 0===e?this._locale._abbr:(null!=(a=ma(e))&&(this._locale=a),this)}l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xa=t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function et(){return this._locale}var at=126227808e5;function tt(e,a){return(e%a+a)%a}function st(e,a,t){return e<100&&0<=e?new Date(e+400,a,t)-at:new Date(e,a,t).valueOf()}function nt(e,a,t){return e<100&&0<=e?Date.UTC(e+400,a,t)-at:Date.UTC(e,a,t)}function dt(e,a){C(0,[e,e.length],0,a)}function rt(e,a,t,s,n){var d;return null==e?Ce(this,s,n).year:((d=Ie(e,s,n))<a&&(a=d),function(e,a,t,s,n){var d=Re(e,a,t,s,n),r=Je(d.year,0,d.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}.call(this,e,a,t,s,n))}C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dt("gggg","weekYear"),dt("ggggg","weekYear"),dt("GGGG","isoWeekYear"),dt("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),E("weekYear",1),E("isoWeekYear",1),ie("G",se),ie("g",se),ie("GG",B,V),ie("gg",B,V),ie("GGGG",ee,Z),ie("gggg",ee,Z),ie("GGGGG",ae,$),ie("ggggg",ae,$),Me(["gggg","ggggg","GGGG","GGGGG"],function(e,a,t,s){a[s.substr(0,2)]=g(e)}),Me(["gg","GG"],function(e,a,t,s){a[s]=l.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),O("quarter","Q"),E("quarter",7),ie("Q",G),le("Q",function(e,a){a[Le]=3*(g(e)-1)}),C("D",["DD",2],"Do","date"),O("date","D"),E("date",9),ie("D",B),ie("DD",B,V),ie("Do",function(e,a){return e?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),le(["D","DD"],ce),le("Do",function(e,a){a[ce]=g(e.match(B)[0])});var _t=Se("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),E("dayOfYear",4),ie("DDD",X),ie("DDDD",K),le(["DDD","DDDD"],function(e,a,t){t._dayOfYear=g(e)}),C("m",["mm",2],0,"minute"),O("minute","m"),E("minute",14),ie("m",B),ie("mm",B,V),le(["m","mm"],ye);var it=Se("Minutes",!1);C("s",["ss",2],0,"second"),O("second","s"),E("second",15),ie("s",B),ie("ss",B,V),le(["s","ss"],fe);var ot,mt=Se("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),O("millisecond","ms"),E("millisecond",16),ie("S",X,G),ie("SS",X,V),ie("SSS",X,K),ot="SSSS";ot.length<=9;ot+="S")ie(ot,te);function ut(e,a){a[ke]=g(1e3*("0."+e))}for(ot="S";ot.length<=9;ot+="S")le(ot,ut);var lt=Se("Milliseconds",!1);C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var Mt=p.prototype;function ht(e){return e}Mt.add=$a,Mt.calendar=function(e,a){var t=e||Ha(),s=Ja(t,this).startOf("day"),n=l.calendarFormat(this,s)||"sameElse",d=a&&(H(a[n])?a[n].call(this,t):a[n]);return this.format(d||this.localeData().calendar(n,this,Ha(t)))},Mt.clone=function(){return new p(this)},Mt.diff=function(e,a,t){var s,n,d;if(!this.isValid())return NaN;if(!(s=Ja(e,this)).isValid())return NaN;switch(n=6e4*(s.utcOffset()-this.utcOffset()),a=P(a)){case"year":d=qa(this,s)/12;break;case"month":d=qa(this,s);break;case"quarter":d=qa(this,s)/3;break;case"second":d=(this-s)/1e3;break;case"minute":d=(this-s)/6e4;break;case"hour":d=(this-s)/36e5;break;case"day":d=(this-s-n)/864e5;break;case"week":d=(this-s-n)/6048e5;break;default:d=this-s}return t?d:T(d)},Mt.endOf=function(e){var a;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var t=this._isUTC?nt:st;switch(e){case"year":a=t(this.year()+1,0,1)-1;break;case"quarter":a=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=t(this.year(),this.month()+1,1)-1;break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=36e5-tt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":a=this._d.valueOf(),a+=6e4-tt(a,6e4)-1;break;case"second":a=this._d.valueOf(),a+=1e3-tt(a,1e3)-1;break}return this._d.setTime(a),l.updateOffset(this,!0),this},Mt.format=function(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var a=I(this,e);return this.localeData().postformat(a)},Mt.from=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ua({to:this,from:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},Mt.fromNow=function(e){return this.from(Ha(),e)},Mt.to=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ua({from:this,to:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},Mt.toNow=function(e){return this.to(Ha(),e)},Mt.get=function(e){return H(this[e=P(e)])?this[e]():this},Mt.invalidAt=function(){return Y(this).overflow},Mt.isAfter=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(a).valueOf())},Mt.isBefore=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()<t.valueOf():this.clone().endOf(a).valueOf()<t.valueOf())},Mt.isBetween=function(e,a,t,s){var n=D(e)?e:Ha(e),d=D(a)?a:Ha(a);return!!(this.isValid()&&n.isValid()&&d.isValid())&&("("===(s=s||"()")[0]?this.isAfter(n,t):!this.isBefore(n,t))&&(")"===s[1]?this.isBefore(d,t):!this.isAfter(d,t))},Mt.isSame=function(e,a){var t,s=D(e)?e:Ha(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()===s.valueOf():(t=s.valueOf(),this.clone().startOf(a).valueOf()<=t&&t<=this.clone().endOf(a).valueOf()))},Mt.isSameOrAfter=function(e,a){return this.isSame(e,a)||this.isAfter(e,a)},Mt.isSameOrBefore=function(e,a){return this.isSame(e,a)||this.isBefore(e,a)},Mt.isValid=function(){return y(this)},Mt.lang=Xa,Mt.locale=Qa,Mt.localeData=et,Mt.max=ja,Mt.min=ba,Mt.parsingFlags=function(){return L({},Y(this))},Mt.set=function(e,a){if("object"==typeof e)for(var t=function(e){var a=[];for(var t in e)a.push({unit:t,priority:A[t]});return a.sort(function(e,a){return e.priority-a.priority}),a}(e=W(e)),s=0;s<t.length;s++)this[t[s].unit](e[t[s].unit]);else if(H(this[e=P(e)]))return this[e](a);return this},Mt.startOf=function(e){var a;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var t=this._isUTC?nt:st;switch(e){case"year":a=t(this.year(),0,1);break;case"quarter":a=t(this.year(),this.month()-this.month()%3,1);break;case"month":a=t(this.year(),this.month(),1);break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=t(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=tt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":a=this._d.valueOf(),a-=tt(a,6e4);break;case"second":a=this._d.valueOf(),a-=tt(a,1e3);break}return this._d.setTime(a),l.updateOffset(this,!0),this},Mt.subtract=Ba,Mt.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Mt.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Mt.toDate=function(){return new Date(this.valueOf())},Mt.toISOString=function(e){if(!this.isValid())return null;var a=!0!==e,t=a?this.clone().utc():this;return t.year()<0||9999<t.year()?I(t,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):H(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",I(t,"Z")):I(t,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Mt.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",a="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z");var t="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=a+'[")]';return this.format(t+s+"-MM-DD[T]HH:mm:ss.SSS"+n)},Mt.toJSON=function(){return this.isValid()?this.toISOString():null},Mt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Mt.unix=function(){return Math.floor(this.valueOf()/1e3)},Mt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Mt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Mt.year=ve,Mt.isLeapYear=function(){return ge(this.year())},Mt.weekYear=function(e){return rt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Mt.isoWeekYear=function(e){return rt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Mt.quarter=Mt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Mt.month=Ae,Mt.daysInMonth=function(){return je(this.year(),this.month())},Mt.week=Mt.weeks=function(e){var a=this.localeData().week(this);return null==e?a:this.add(7*(e-a),"d")},Mt.isoWeek=Mt.isoWeeks=function(e){var a=Ce(this,1,4).week;return null==e?a:this.add(7*(e-a),"d")},Mt.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},Mt.isoWeeksInYear=function(){return Ie(this.year(),1,4)},Mt.date=_t,Mt.day=Mt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var a,t,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(a=e,t=this.localeData(),e="string"!=typeof a?a:isNaN(a)?"number"==typeof(a=t.weekdaysParse(a))?a:null:parseInt(a,10),this.add(e-s,"d")):s},Mt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return null==e?a:this.add(e-a,"d")},Mt.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var a,t,s=(a=e,t=this.localeData(),"string"==typeof a?t.weekdaysParse(a)%7||7:isNaN(a)?null:a);return this.day(this.day()%7?s:s-7)},Mt.dayOfYear=function(e){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?a:this.add(e-a,"d")},Mt.hour=Mt.hours=ta,Mt.minute=Mt.minutes=it,Mt.second=Mt.seconds=mt,Mt.millisecond=Mt.milliseconds=lt,Mt.utcOffset=function(e,a,t){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?n:Na(this);if("string"==typeof e){if(null===(e=za(de,e)))return this}else Math.abs(e)<16&&!t&&(e*=60);return!this._isUTC&&a&&(s=Na(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!a||this._changeInProgress?Za(this,Ua(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this},Mt.utc=function(e){return this.utcOffset(0,e)},Mt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Na(this),"m")),this},Mt.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=za(ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Mt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ha(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Mt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Mt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Mt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Mt.isUtc=Ra,Mt.isUTC=Ra,Mt.zoneAbbr=function(){return this._isUTC?"UTC":""},Mt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Mt.dates=t("dates accessor is deprecated. Use date instead.",_t),Mt.months=t("months accessor is deprecated. Use month instead",Ae),Mt.years=t("years accessor is deprecated. Use year instead",ve),Mt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),Mt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(k(e,this),(e=va(e))._a){var a=e._isUTC?c(e._a):Ha(e._a);this._isDSTShifted=this.isValid()&&0<r(e._a,a.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var Lt=j.prototype;function ct(e,a,t,s){var n=ma(),d=c().set(s,a);return n[t](d,e)}function Yt(e,a,t){if(m(e)&&(a=e,e=void 0),e=e||"",null!=a)return ct(e,a,t,"month");var s,n=[];for(s=0;s<12;s++)n[s]=ct(e,s,t,"month");return n}function yt(e,a,t,s){a=("boolean"==typeof e?m(a)&&(t=a,a=void 0):(a=e,e=!1,m(t=a)&&(t=a,a=void 0)),a||"");var n,d=ma(),r=e?d._week.dow:0;if(null!=t)return ct(a,(t+r)%7,s,"day");var _=[];for(n=0;n<7;n++)_[n]=ct(a,(n+r)%7,s,"day");return _}Lt.calendar=function(e,a,t){var s=this._calendar[e]||this._calendar.sameElse;return H(s)?s.call(a,t):s},Lt.longDateFormat=function(e){var a=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return a||!t?a:(this._longDateFormat[e]=t.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Lt.invalidDate=function(){return this._invalidDate},Lt.ordinal=function(e){return this._ordinal.replace("%d",e)},Lt.preparse=ht,Lt.postformat=ht,Lt.relativeTime=function(e,a,t,s){var n=this._relativeTime[t];return H(n)?n(e,a,t,s):n.replace(/%d/i,e)},Lt.pastFuture=function(e,a){var t=this._relativeTime[0<e?"future":"past"];return H(t)?t(a):t.replace(/%s/i,a)},Lt.set=function(e){var a,t;for(t in e)H(a=e[t])?this[t]=a:this["_"+t]=a;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Lt.months=function(e,a){return e?_(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(a)?"format":"standalone"][e.month()]:_(this._months)?this._months:this._months.standalone},Lt.monthsShort=function(e,a){return e?_(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(a)?"format":"standalone"][e.month()]:_(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Lt.monthsParse=function(e,a,t){var s,n,d;if(this._monthsParseExact)return function(e,a,t){var s,n,d,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)d=c([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(d,"").toLocaleLowerCase();return t?"MMM"===a?-1!==(n=we.call(this._shortMonthsParse,r))?n:null:-1!==(n=we.call(this._longMonthsParse,r))?n:null:"MMM"===a?-1!==(n=we.call(this._shortMonthsParse,r))?n:-1!==(n=we.call(this._longMonthsParse,r))?n:null:-1!==(n=we.call(this._longMonthsParse,r))?n:-1!==(n=we.call(this._shortMonthsParse,r))?n:null}.call(this,e,a,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=c([2e3,s]),t&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),t||this._monthsParse[s]||(d="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(d.replace(".",""),"i")),t&&"MMMM"===a&&this._longMonthsParse[s].test(e))return s;if(t&&"MMM"===a&&this._shortMonthsParse[s].test(e))return s;if(!t&&this._monthsParse[s].test(e))return s}},Lt.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||ze.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Lt.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||ze.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Lt.week=function(e){return Ce(e,this._week.dow,this._week.doy).week},Lt.firstDayOfYear=function(){return this._week.doy},Lt.firstDayOfWeek=function(){return this._week.dow},Lt.weekdays=function(e,a){var t=_(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(a)?"format":"standalone"];return!0===e?Ue(t,this._week.dow):e?t[e.day()]:t},Lt.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Lt.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Lt.weekdaysParse=function(e,a,t){var s,n,d;if(this._weekdaysParseExact)return function(e,a,t){var s,n,d,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)d=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(d,"").toLocaleLowerCase();return t?"dddd"===a?-1!==(n=we.call(this._weekdaysParse,r))?n:null:"ddd"===a?-1!==(n=we.call(this._shortWeekdaysParse,r))?n:null:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:"dddd"===a?-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._shortWeekdaysParse,r))?n:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:"ddd"===a?-1!==(n=we.call(this._shortWeekdaysParse,r))?n:-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:-1!==(n=we.call(this._minWeekdaysParse,r))?n:-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._shortWeekdaysParse,r))?n:null}.call(this,e,a,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=c([2e3,1]).day(s),t&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(d="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(d.replace(".",""),"i")),t&&"dddd"===a&&this._fullWeekdaysParse[s].test(e))return s;if(t&&"ddd"===a&&this._shortWeekdaysParse[s].test(e))return s;if(t&&"dd"===a&&this._minWeekdaysParse[s].test(e))return s;if(!t&&this._weekdaysParse[s].test(e))return s}},Lt.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Lt.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Lt.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Lt.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Lt.meridiem=function(e,a,t){return 11<e?t?"pm":"PM":t?"am":"AM"},ia("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1===g(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.lang=t("moment.lang is deprecated. Use moment.locale instead.",ia),l.langData=t("moment.langData is deprecated. Use moment.localeData instead.",ma);var ft=Math.abs;function kt(e,a,t,s){var n=Ua(a,t);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function pt(e){return e<0?Math.floor(e):Math.ceil(e)}function Dt(e){return 4800*e/146097}function Tt(e){return 146097*e/4800}function gt(e){return function(){return this.as(e)}}var wt=gt("ms"),vt=gt("s"),St=gt("m"),Ht=gt("h"),bt=gt("d"),jt=gt("w"),xt=gt("M"),Ot=gt("Q"),Pt=gt("y");function Wt(e){return function(){return this.isValid()?this._data[e]:NaN}}var At=Wt("milliseconds"),Et=Wt("seconds"),Ft=Wt("minutes"),zt=Wt("hours"),Jt=Wt("days"),Nt=Wt("months"),Rt=Wt("years");var Ct=Math.round,It={ss:44,s:45,m:45,h:22,d:26,M:11};var Ut=Math.abs;function Gt(e){return(0<e)-(e<0)||+e}function Vt(){if(!this.isValid())return this.localeData().invalidDate();var e,a,t=Ut(this._milliseconds)/1e3,s=Ut(this._days),n=Ut(this._months);a=T((e=T(t/60))/60),t%=60,e%=60;var d=T(n/12),r=n%=12,_=s,i=a,o=e,m=t?t.toFixed(3).replace(/\.?0+$/,""):"",u=this.asSeconds();if(!u)return"P0D";var l=u<0?"-":"",M=Gt(this._months)!==Gt(u)?"-":"",h=Gt(this._days)!==Gt(u)?"-":"",L=Gt(this._milliseconds)!==Gt(u)?"-":"";return l+"P"+(d?M+d+"Y":"")+(r?M+r+"M":"")+(_?h+_+"D":"")+(i||o||m?"T":"")+(i?L+i+"H":"")+(o?L+o+"M":"")+(m?L+m+"S":"")}var Kt=Pa.prototype;Kt.isValid=function(){return this._isValid},Kt.abs=function(){var e=this._data;return this._milliseconds=ft(this._milliseconds),this._days=ft(this._days),this._months=ft(this._months),e.milliseconds=ft(e.milliseconds),e.seconds=ft(e.seconds),e.minutes=ft(e.minutes),e.hours=ft(e.hours),e.months=ft(e.months),e.years=ft(e.years),this},Kt.add=function(e,a){return kt(this,e,a,1)},Kt.subtract=function(e,a){return kt(this,e,a,-1)},Kt.as=function(e){if(!this.isValid())return NaN;var a,t,s=this._milliseconds;if("month"===(e=P(e))||"quarter"===e||"year"===e)switch(a=this._days+s/864e5,t=this._months+Dt(a),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(a=this._days+Math.round(Tt(this._months)),e){case"week":return a/7+s/6048e5;case"day":return a+s/864e5;case"hour":return 24*a+s/36e5;case"minute":return 1440*a+s/6e4;case"second":return 86400*a+s/1e3;case"millisecond":return Math.floor(864e5*a)+s;default:throw new Error("Unknown unit "+e)}},Kt.asMilliseconds=wt,Kt.asSeconds=vt,Kt.asMinutes=St,Kt.asHours=Ht,Kt.asDays=bt,Kt.asWeeks=jt,Kt.asMonths=xt,Kt.asQuarters=Ot,Kt.asYears=Pt,Kt.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},Kt._bubble=function(){var e,a,t,s,n,d=this._milliseconds,r=this._days,_=this._months,i=this._data;return 0<=d&&0<=r&&0<=_||d<=0&&r<=0&&_<=0||(d+=864e5*pt(Tt(_)+r),_=r=0),i.milliseconds=d%1e3,e=T(d/1e3),i.seconds=e%60,a=T(e/60),i.minutes=a%60,t=T(a/60),i.hours=t%24,_+=n=T(Dt(r+=T(t/24))),r-=pt(Tt(n)),s=T(_/12),_%=12,i.days=r,i.months=_,i.years=s,this},Kt.clone=function(){return Ua(this)},Kt.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Kt.milliseconds=At,Kt.seconds=Et,Kt.minutes=Ft,Kt.hours=zt,Kt.days=Jt,Kt.weeks=function(){return T(this.days()/7)},Kt.months=Nt,Kt.years=Rt,Kt.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var a,t,s,n,d,r,_,i,o,m,u,l=this.localeData(),M=(t=!e,s=l,n=Ua(a=this).abs(),d=Ct(n.as("s")),r=Ct(n.as("m")),_=Ct(n.as("h")),i=Ct(n.as("d")),o=Ct(n.as("M")),m=Ct(n.as("y")),(u=d<=It.ss&&["s",d]||d<It.s&&["ss",d]||r<=1&&["m"]||r<It.m&&["mm",r]||_<=1&&["h"]||_<It.h&&["hh",_]||i<=1&&["d"]||i<It.d&&["dd",i]||o<=1&&["M"]||o<It.M&&["MM",o]||m<=1&&["y"]||["yy",m])[2]=t,u[3]=0<+a,u[4]=s,function(e,a,t,s,n){return n.relativeTime(a||1,!!t,e,s)}.apply(null,u));return e&&(M=l.pastFuture(+this,M)),l.postformat(M)},Kt.toISOString=Vt,Kt.toString=Vt,Kt.toJSON=Vt,Kt.locale=Qa,Kt.localeData=et,Kt.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vt),Kt.lang=Xa,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ie("x",se),ie("X",/[+-]?\d+(\.\d{1,3})?/),le("X",function(e,a,t){t._d=new Date(1e3*parseFloat(e,10))}),le("x",function(e,a,t){t._d=new Date(g(e))}),l.version="2.24.0",e=Ha,l.fn=Mt,l.min=function(){return xa("isBefore",[].slice.call(arguments,0))},l.max=function(){return xa("isAfter",[].slice.call(arguments,0))},l.now=function(){return Date.now?Date.now():+new Date},l.utc=c,l.unix=function(e){return Ha(1e3*e)},l.months=function(e,a){return Yt(e,a,"months")},l.isDate=u,l.locale=ia,l.invalid=f,l.duration=Ua,l.isMoment=D,l.weekdays=function(e,a,t){return yt(e,a,t,"weekdays")},l.parseZone=function(){return Ha.apply(null,arguments).parseZone()},l.localeData=ma,l.isDuration=Wa,l.monthsShort=function(e,a){return Yt(e,a,"monthsShort")},l.weekdaysMin=function(e,a,t){return yt(e,a,t,"weekdaysMin")},l.defineLocale=oa,l.updateLocale=function(e,a){if(null!=a){var t,s,n=sa;null!=(s=_a(e))&&(n=s._config),(t=new j(a=b(n,a))).parentLocale=na[e],na[e]=t,ia(e)}else null!=na[e]&&(null!=na[e].parentLocale?na[e]=na[e].parentLocale:null!=na[e]&&delete na[e]);return na[e]},l.locales=function(){return s(na)},l.weekdaysShort=function(e,a,t){return yt(e,a,t,"weekdaysShort")},l.normalizeUnits=P,l.relativeTimeRounding=function(e){return void 0===e?Ct:"function"==typeof e&&(Ct=e,!0)},l.relativeTimeThreshold=function(e,a){return void 0!==It[e]&&(void 0===a?It[e]:(It[e]=a,"s"===e&&(It.ss=a-1),!0))},l.calendarFormat=function(e,a){var t=e.diff(a,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},l.prototype=Mt,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"vm":"VM":t?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),l.defineLocale("ar-dz",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u0623\u062d_\u0625\u062b_\u062b\u0644\u0627_\u0623\u0631_\u062e\u0645_\u062c\u0645_\u0633\u0628".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:4}}),l.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});var Zt={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},$t=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},Bt={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},qt=function(r){return function(e,a,t,s){var n=$t(e),d=Bt[r][$t(e)];return 2===n&&(d=d[a?0:1]),d.replace(/%d/i,e)}},Qt=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];l.defineLocale("ar-ly",{months:Qt,monthsShort:Qt,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:qt("s"),ss:qt("s"),m:qt("m"),mm:qt("m"),h:qt("h"),hh:qt("h"),d:qt("d"),dd:qt("d"),M:qt("M"),MM:qt("M"),y:qt("y"),yy:qt("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Zt[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),l.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:6,doy:12}});var Xt={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},es={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};l.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return es[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Xt[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),l.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});var as={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},ts={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},ss=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},ns={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},ds=function(r){return function(e,a,t,s){var n=ss(e),d=ns[r][ss(e)];return 2===n&&(d=d[a?0:1]),d.replace(/%d/i,e)}},rs=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];l.defineLocale("ar",{months:rs,monthsShort:rs,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:ds("s"),ss:ds("s"),m:ds("m"),mm:ds("m"),h:ds("h"),hh:ds("h"),d:ds("d"),dd:ds("d"),M:ds("M"),MM:ds("M"),y:ds("y"),yy:ds("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return ts[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return as[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var _s={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function is(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===t?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}l.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"birne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,t){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(_s[a]||_s[e%100-a]||_s[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:is,mm:is,h:is,hh:is,d:"\u0434\u0437\u0435\u043d\u044c",dd:is,M:"\u043c\u0435\u0441\u044f\u0446",MM:is,y:"\u0433\u043e\u0434",yy:is},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),l.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0440_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u043d\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0===t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1===a?e+"-\u0432\u0438":2===a?e+"-\u0440\u0438":7===a||8===a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),l.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var os={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},ms={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};l.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09c0_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2_\u0986\u0997_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u0983_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return ms[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return os[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var us={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},ls={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function Ms(e,a,t){var s,n,d;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[t],2!==e?s:void 0!==(d={m:"v",b:"v",d:"z"})[(n=s).charAt(0)]?d[n.charAt(0)]+n.substring(1):n)}function hs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}l.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return ls[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return us[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}}),l.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:Ms,h:"un eur",hh:"%d eur",d:"un devezh",dd:Ms,M:"ur miz",MM:Ms,y:"ur bloaz",yy:function(e){switch(function e(a){return 9<a?e(a%10):a}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4}}),l.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:hs,m:hs,mm:hs,h:hs,hh:hs,d:"dan",dd:hs,M:"mjesec",MM:hs,y:"godinu",yy:hs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,a){var t=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==a&&"W"!==a||(t="a"),e+t},week:{dow:1,doy:4}});var Ls="leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),cs="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),Ys=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],ys=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function fs(e){return 1<e&&e<5&&1!=~~(e/10)}function ks(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return a||s?n+(fs(e)?"sekundy":"sekund"):n+"sekundami";break;case"m":return a?"minuta":s?"minutu":"minutou";case"mm":return a||s?n+(fs(e)?"minuty":"minut"):n+"minutami";break;case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(fs(e)?"hodiny":"hodin"):n+"hodinami";break;case"d":return a||s?"den":"dnem";case"dd":return a||s?n+(fs(e)?"dny":"dn\xed"):n+"dny";break;case"M":return a||s?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return a||s?n+(fs(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):n+"m\u011bs\xedci";break;case"y":return a||s?"rok":"rokem";case"yy":return a||s?n+(fs(e)?"roky":"let"):n+"lety";break}}function ps(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function Ds(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function Ts(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}l.defineLocale("cs",{months:Ls,monthsShort:cs,monthsRegex:ys,monthsShortRegex:ys,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:Ys,longMonthsParse:Ys,shortMonthsParse:Ys,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:ks,ss:ks,m:ks,mm:ks,h:ks,hh:ks,d:ks,dd:ks,M:ks,MM:ks,y:ks,yy:ks},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}}),l.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var a="";return 20<e?a=40===e||50===e||60===e||80===e||100===e?"fed":"ain":0<e&&(a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+a},week:{dow:1,doy:4}}),l.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:ps,mm:"%d Minuten",h:ps,hh:"%d Stunden",d:ps,dd:ps,M:ps,MM:ps,y:ps,yy:ps},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Ds,mm:"%d Minuten",h:Ds,hh:"%d Stunden",d:Ds,dd:Ds,M:Ds,MM:Ds,y:Ds,yy:Ds},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:Ts,mm:"%d Minuten",h:Ts,hh:"%d Stunden",d:Ts,dd:Ts,M:Ts,MM:Ts,y:Ts,yy:Ts},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var gs=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],ws=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];l.defineLocale("dv",{months:gs,monthsShort:gs,weekdays:ws,weekdaysShort:ws,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,a,t){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}}),l.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,a){return e?"string"==typeof a&&/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,a,t){return 11<e?t?"\u03bc\u03bc":"\u039c\u039c":t?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,a){var t=this._calendarEl[e],s=a&&a.hours();return H(t)&&(t=t.apply(a)),t.replace("{}",s%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}}),l.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_a\u016dg_sep_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"p.t.m.":"P.T.M.":t?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var vs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Ss="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Hs=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],bs=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;l.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Ss[e.month()]:vs[e.month()]:vs},monthsRegex:bs,monthsShortRegex:bs,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Hs,longMonthsParse:Hs,shortMonthsParse:Hs,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var js="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),xs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Os=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Ps=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;l.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?xs[e.month()]:js[e.month()]:js},monthsRegex:Ps,monthsShortRegex:Ps,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Os,longMonthsParse:Os,shortMonthsParse:Os,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}});var Ws="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),As="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Es=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Fs=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;function zs(e,a,t,s){var n={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return a?n[t][2]?n[t][2]:n[t][1]:s?n[t][0]:n[t][1]}l.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?As[e.month()]:Ws[e.month()]:Ws},monthsRegex:Fs,monthsShortRegex:Fs,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:Es,longMonthsParse:Es,shortMonthsParse:Es,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:zs,ss:zs,m:zs,mm:zs,h:zs,hh:zs,d:zs,dd:"%d p\xe4eva",M:zs,MM:zs,y:zs,yy:zs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Js={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},Ns={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};l.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,a,t){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"\u062b\u0627\u0646\u06cc\u0647 d%",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,function(e){return Ns[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Js[e]}).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}});var Rs="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),Cs=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",Rs[7],Rs[8],Rs[9]];function Is(e,a,t,s){var n,d,r="";switch(t){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":return s?"sekunnin":"sekuntia";case"m":return s?"minuutin":"minuutti";case"mm":r=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":r=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":r=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":r=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":r=s?"vuoden":"vuotta";break}return d=s,r=((n=e)<10?d?Cs[n]:Rs[n]:n)+" "+r}l.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:Is,ss:Is,m:Is,mm:Is,h:Is,hh:Is,d:Is,dd:Is,M:Is,MM:Is,y:Is,yy:Is},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),l.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}}),l.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,a){switch(a){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var Us="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Gs="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");l.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Gs[e.month()]:Us[e.month()]:Us},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});l.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","M\xe9itheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deaireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean\xe1","Feab","M\xe1rt","Aibr","Beal","M\xe9it","I\xfail","L\xfana","Me\xe1n","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Satharn"],weekdaysShort:["Dom","Lua","M\xe1i","C\xe9a","D\xe9a","hAo","Sat"],weekdaysMin:["Do","Lu","M\xe1","Ce","D\xe9","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xed",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}});function Vs(e,a,t,s){var n={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return a?n[t][0]:n[t][1]}l.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),l.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:Vs,ss:Vs,m:Vs,mm:Vs,h:Vs,hh:Vs,d:Vs,dd:Vs,M:Vs,MM:Vs,y:Vs,yy:Vs},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,a){switch(a){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,a){return 12===e&&(e=0),"rati"===a?e<4?e:e+12:"sokalli"===a?e:"donparam"===a?12<e?e:e+12:"sanje"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});var Ks={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},Zs={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};l.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ac7\u0ab9\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(e){return Zs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ks[e]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===a?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===a?e:"\u0aac\u0aaa\u0acb\u0ab0"===a?10<=e?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}}),l.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,a,t){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?t?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?t?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}});var $s={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},Bs={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function qs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}l.defineLocale("hi",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Bs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return $s[e]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924"===a?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===a?e:"\u0926\u094b\u092a\u0939\u0930"===a?10<=e?e:e+12:"\u0936\u093e\u092e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}}),l.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:qs,m:qs,mm:qs,h:qs,hh:qs,d:"dan",dd:qs,M:"mjesec",MM:qs,y:"godinu",yy:qs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Qs="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function Xs(e,a,t,s){var n=e;switch(t){case"s":return s||a?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return n+(s||a)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(s||a?" perc":" perce");case"mm":return n+(s||a?" perc":" perce");case"h":return"egy"+(s||a?" \xf3ra":" \xf3r\xe1ja");case"hh":return n+(s||a?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(s||a?" nap":" napja");case"dd":return n+(s||a?" nap":" napja");case"M":return"egy"+(s||a?" h\xf3nap":" h\xf3napja");case"MM":return n+(s||a?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(s||a?" \xe9v":" \xe9ve");case"yy":return n+(s||a?" \xe9v":" \xe9ve")}return""}function en(e){return(e?"":"[m\xfalt] ")+"["+Qs[this.day()]+"] LT[-kor]"}function an(e){return e%100==11||e%10!=1}function tn(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return an(e)?n+(a||s?"sek\xfandur":"sek\xfandum"):n+"sek\xfanda";case"m":return a?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return an(e)?n+(a||s?"m\xedn\xfatur":"m\xedn\xfatum"):a?n+"m\xedn\xfata":n+"m\xedn\xfatu";case"hh":return an(e)?n+(a||s?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return a?"dagur":s?"dag":"degi";case"dd":return an(e)?a?n+"dagar":n+(s?"daga":"d\xf6gum"):a?n+"dagur":n+(s?"dag":"degi");case"M":return a?"m\xe1nu\xf0ur":s?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return an(e)?a?n+"m\xe1nu\xf0ir":n+(s?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):a?n+"m\xe1nu\xf0ur":n+(s?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return a||s?"\xe1r":"\xe1ri";case"yy":return an(e)?n+(a||s?"\xe1r":"\xe1rum"):n+(a||s?"\xe1r":"\xe1ri")}}l.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan_feb_m\xe1rc_\xe1pr_m\xe1j_j\xfan_j\xfal_aug_szept_okt_nov_dec".split("_"),weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,a,t){return e<12?!0===t?"de":"DE":!0===t?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return en.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return en.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:Xs,ss:Xs,m:Xs,mm:Xs,h:Xs,hh:Xs,d:Xs,dd:Xs,M:Xs,MM:Xs,y:Xs,yy:Xs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,a){switch(a){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}}),l.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?11<=e?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),l.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:tn,ss:tn,m:tn,mm:tn,h:"klukkustund",hh:tn,d:tn,dd:tn,M:tn,MM:tn,y:tn,yy:tn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("ja",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,a,t){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()<this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()<e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}}),l.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,a){return 12===e&&(e=0),"enjing"===a?e:"siyang"===a?11<=e?e:e+12:"sonten"===a||"ndalu"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),l.defineLocale("ka",{months:{standalone:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),format:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10e1_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10e1_\u10db\u10d0\u10e0\u10e2\u10e1_\u10d0\u10de\u10e0\u10d8\u10da\u10d8\u10e1_\u10db\u10d0\u10d8\u10e1\u10e1_\u10d8\u10d5\u10dc\u10d8\u10e1\u10e1_\u10d8\u10d5\u10da\u10d8\u10e1\u10e1_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10e1_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10e1_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10e1_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10e1_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10e1".split("_")},monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10ec\u10d4\u10da\u10d8)/.test(e)?e.replace(/\u10d8$/,"\u10e8\u10d8"):e+"\u10e8\u10d8"},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):void 0},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}});var sn={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};l.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(sn[e]||sn[e%10]||sn[100<=e?100:null])},week:{dow:1,doy:7}});var nn={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},dn={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};l.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,a,t){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,function(e){return dn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return nn[e]})},week:{dow:1,doy:4}});var rn={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},_n={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};l.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(e){return _n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return rn[e]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===a?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===a?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===a?10<=e?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}}),l.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,a,t){return e<12?"\uc624\uc804":"\uc624\ud6c4"}});var on={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},mn={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},un=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];l.defineLocale("ku",{months:un,monthsShort:un,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,a,t){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return mn[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return on[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var ln={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};function Mn(e,a,t,s){var n={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return a?n[t][0]:n[t][1]}function hn(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var a=e%10;return hn(0===a?e/10:a)}if(e<1e4){for(;10<=e;)e/=10;return hn(e)}return hn(e/=1e3)}l.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(ln[e]||ln[e%10]||ln[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return hn(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return hn(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:Mn,mm:"%d Minutten",h:Mn,hh:"%d Stonnen",d:Mn,dd:"%d Deeg",M:Mn,MM:"%d M\xe9int",y:Mn,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,a,t){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}});var Ln={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function cn(e,a,t,s){return a?yn(t)[0]:s?yn(t)[1]:yn(t)[2]}function Yn(e){return e%10==0||10<e&&e<20}function yn(e){return Ln[e].split("_")}function fn(e,a,t,s){var n=e+" ";return 1===e?n+cn(0,a,t[0],s):a?n+(Yn(e)?yn(t)[1]:yn(t)[0]):s?n+yn(t)[1]:n+(Yn(e)?yn(t)[1]:yn(t)[2])}l.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,a,t,s){return a?"kelios sekund\u0117s":s?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:fn,m:cn,mm:fn,h:cn,hh:fn,d:cn,dd:fn,M:cn,MM:fn,y:cn,yy:fn},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var kn={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function pn(e,a,t){return t?a%10==1&&a%100!=11?e[2]:e[3]:a%10==1&&a%100!=11?e[0]:e[1]}function Dn(e,a,t){return e+" "+pn(kn[t],e,a)}function Tn(e,a,t){return pn(kn[t],e,a)}l.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,a){return a?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:Dn,m:Tn,mm:Dn,h:Tn,hh:Dn,d:Tn,dd:Dn,M:Tn,MM:Dn,y:Tn,yy:Dn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var gn={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=gn.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+gn.correctGrammaticalCase(e,s)}};function wn(e,a,t,s){switch(t){case"s":return a?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(a?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(a?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(a?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(a?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(a?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(a?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}l.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:gn.translate,m:gn.translate,mm:gn.translate,h:gn.translate,hh:gn.translate,d:"dan",dd:gn.translate,M:"mjesec",MM:gn.translate,y:"godinu",yy:gn.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u043e\u0441\u043b\u0435 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0===t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1===a?e+"-\u0432\u0438":2===a?e+"-\u0440\u0438":7===a||8===a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),l.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===a&&4<=e||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===a||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}}),l.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,a,t){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:wn,ss:wn,m:wn,mm:wn,h:wn,hh:wn,d:wn,dd:wn,M:wn,MM:wn,y:wn,yy:wn},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}});var vn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},Sn={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function Hn(e,a,t,s){var n="";if(a)switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":n="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":n="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":n="%d \u0924\u093e\u0938";break;case"d":n="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":n="%d \u0926\u093f\u0935\u0938";break;case"M":n="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":n="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u0947";break}else switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":n="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":n="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":n="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":n="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":n="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":n="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":n="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u093e\u0902";break}return n.replace(/%d/i,e)}l.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:Hn,ss:Hn,m:Hn,mm:Hn,h:Hn,hh:Hn,d:Hn,dd:Hn,M:Hn,MM:Hn,y:Hn,yy:Hn},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Sn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return vn[e]})},meridiemParse:/\u0930\u093e\u0924\u094d\u0930\u0940|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u094d\u0930\u0940"===a?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940"===a?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===a?10<=e?e:e+12:"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924\u094d\u0930\u0940":e<10?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}}),l.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),l.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),l.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var bn={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},jn={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};l.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(e){return jn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return bn[e]})},week:{dow:1,doy:4}}),l.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var xn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},On={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};l.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return On[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return xn[e]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===a?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===a?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===a?10<=e?e:e+12:"\u0938\u093e\u0901\u091d"===a?e+12:void 0},meridiem:function(e,a,t){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}});var Pn="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),Wn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),An=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],En=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;l.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Wn[e.month()]:Pn[e.month()]:Pn},monthsRegex:En,monthsShortRegex:En,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:An,longMonthsParse:An,shortMonthsParse:An,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});var Fn="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),zn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Jn=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Nn=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;l.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?zn[e.month()]:Fn[e.month()]:Fn},monthsRegex:Nn,monthsShortRegex:Nn,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Jn,longMonthsParse:Jn,shortMonthsParse:Jn,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),l.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_m\xe5n_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Rn={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},Cn={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};l.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(e){return Cn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Rn[e]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===a?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===a?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===a?10<=e?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}});var In="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),Un="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_");function Gn(e){return e%10<5&&1<e%10&&~~(e/10)%10!=1}function Vn(e,a,t){var s=e+" ";switch(t){case"ss":return s+(Gn(e)?"sekundy":"sekund");case"m":return a?"minuta":"minut\u0119";case"mm":return s+(Gn(e)?"minuty":"minut");case"h":return a?"godzina":"godzin\u0119";case"hh":return s+(Gn(e)?"godziny":"godzin");case"MM":return s+(Gn(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return s+(Gn(e)?"lata":"lat")}}function Kn(e,a,t){var s=" ";return(20<=e%100||100<=e&&e%100==0)&&(s=" de "),e+s+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[t]}function Zn(e,a,t){var s,n;return"m"===t?a?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}l.defineLocale("pl",{months:function(e,a){return e?""===a?"("+Un[e.month()]+"|"+In[e.month()]+")":/D MMMM/.test(a)?Un[e.month()]:In[e.month()]:In},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:Vn,m:Vn,mm:Vn,h:Vn,hh:Vn,d:"1 dzie\u0144",dd:"%d dni",M:"miesi\u0105c",MM:Vn,y:"rok",yy:Vn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Mar\xe7o_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba"}),l.defineLocale("pt",{months:"Janeiro_Fevereiro_Mar\xe7o_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:Kn,m:"un minut",mm:Kn,h:"o or\u0103",hh:Kn,d:"o zi",dd:Kn,M:"o lun\u0103",MM:Kn,y:"un an",yy:Kn},week:{dow:1,doy:7}});var $n=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];l.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?\] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:$n,longMonthsParse:$n,shortMonthsParse:$n,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:Zn,m:Zn,mm:Zn,h:"\u0447\u0430\u0441",hh:Zn,d:"\u0434\u0435\u043d\u044c",dd:Zn,M:"\u043c\u0435\u0441\u044f\u0446",MM:Zn,y:"\u0433\u043e\u0434",yy:Zn},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}});var Bn=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],qn=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];l.defineLocale("sd",{months:Bn,monthsShort:Bn,weekdays:qn,weekdaysShort:qn,weekdaysMin:qn,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),l.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,a,t){return 11<e?t?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":t?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}});var Qn="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),Xn="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function ed(e){return 1<e&&e<5}function ad(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return a||s?n+(ed(e)?"sekundy":"sek\xfand"):n+"sekundami";break;case"m":return a?"min\xfata":s?"min\xfatu":"min\xfatou";case"mm":return a||s?n+(ed(e)?"min\xfaty":"min\xfat"):n+"min\xfatami";break;case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(ed(e)?"hodiny":"hod\xedn"):n+"hodinami";break;case"d":return a||s?"de\u0148":"d\u0148om";case"dd":return a||s?n+(ed(e)?"dni":"dn\xed"):n+"d\u0148ami";break;case"M":return a||s?"mesiac":"mesiacom";case"MM":return a||s?n+(ed(e)?"mesiace":"mesiacov"):n+"mesiacmi";break;case"y":return a||s?"rok":"rokom";case"yy":return a||s?n+(ed(e)?"roky":"rokov"):n+"rokmi";break}}function td(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?a?"sekundo":"sekundi":2===e?a||s?"sekundi":"sekundah":e<5?a||s?"sekunde":"sekundah":"sekund";case"m":return a?"ena minuta":"eno minuto";case"mm":return n+=1===e?a?"minuta":"minuto":2===e?a||s?"minuti":"minutama":e<5?a||s?"minute":"minutami":a||s?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return n+=1===e?a?"ura":"uro":2===e?a||s?"uri":"urama":e<5?a||s?"ure":"urami":a||s?"ur":"urami";case"d":return a||s?"en dan":"enim dnem";case"dd":return n+=1===e?a||s?"dan":"dnem":2===e?a||s?"dni":"dnevoma":a||s?"dni":"dnevi";case"M":return a||s?"en mesec":"enim mesecem";case"MM":return n+=1===e?a||s?"mesec":"mesecem":2===e?a||s?"meseca":"mesecema":e<5?a||s?"mesece":"meseci":a||s?"mesecev":"meseci";case"y":return a||s?"eno leto":"enim letom";case"yy":return n+=1===e?a||s?"leto":"letom":2===e?a||s?"leti":"letoma":e<5?a||s?"leta":"leti":a||s?"let":"leti"}}l.defineLocale("sk",{months:Qn,monthsShort:Xn,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:ad,ss:ad,m:ad,mm:ad,h:ad,hh:ad,d:ad,dd:ad,M:ad,MM:ad,y:ad,yy:ad},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:td,ss:td,m:td,mm:td,h:td,hh:td,d:td,dd:td,M:td,MM:td,y:td,yy:td},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,a,t){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var sd={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u0435 \u043c\u0438\u043d\u0443\u0442\u0435"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0435","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],yy:["\u0433\u043e\u0434\u0438\u043d\u0430","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=sd.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+sd.correctGrammaticalCase(e,s)}};l.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:sd.translate,m:sd.translate,mm:sd.translate,h:sd.translate,hh:sd.translate,d:"\u0434\u0430\u043d",dd:sd.translate,M:"\u043c\u0435\u0441\u0435\u0446",MM:sd.translate,y:"\u0433\u043e\u0434\u0438\u043d\u0443",yy:sd.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var nd={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=nd.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+nd.correctGrammaticalCase(e,s)}};l.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:nd.translate,m:nd.translate,mm:nd.translate,h:nd.translate,hh:nd.translate,d:"dan",dd:nd.translate,M:"mesec",MM:nd.translate,y:"godinu",yy:nd.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,a,t){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,a){return 12===e&&(e=0),"ekuseni"===a?e:"emini"===a?11<=e?e:e+12:"entsambama"===a||"ebusuku"===a?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),l.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"e":1===a?"a":2===a?"a":"e")},week:{dow:1,doy:4}}),l.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var dd={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},rd={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};l.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(e){return rd[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return dd[e]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,a,t){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,a){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===a?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===a||"\u0b95\u0bbe\u0bb2\u0bc8"===a?e:"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===a&&10<=e?e:e+12},week:{dow:0,doy:6}}),l.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===a?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===a?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===a?10<=e?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}}),l.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}});var _d={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};l.defineLocale("tg",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u041f\u0430\u0433\u043e\u04b3 \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0448\u0430\u0431"===a?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===a?e:"\u0440\u04ef\u0437"===a?11<=e?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(_d[e]||_d[e%10]||_d[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,a,t){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}}),l.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var id="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function od(e,a,t,s){var n=function(e){var a=Math.floor(e%1e3/100),t=Math.floor(e%100/10),s=e%10,n="";0<a&&(n+=id[a]+"vatlh");0<t&&(n+=(""!==n?" ":"")+id[t]+"maH");0<s&&(n+=(""!==n?" ":"")+id[s]);return""===n?"pagh":n}(e);switch(t){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}l.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"leS":-1!==e.indexOf("jar")?a.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?a.slice(0,-3)+"nem":a+" pIq"},past:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?a.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?a.slice(0,-3)+"ben":a+" ret"},s:"puS lup",ss:od,m:"wa\u2019 tup",mm:od,h:"wa\u2019 rep",hh:od,d:"wa\u2019 jaj",dd:od,M:"wa\u2019 jar",MM:od,y:"wa\u2019 DIS",yy:od},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var md={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};function ud(e,a,t,s){var n={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s?n[t][0]:a?n[t][0]:n[t][1]}function ld(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===t?a?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:a?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}function Md(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}l.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xc7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'\u0131nc\u0131";var t=e%10;return e+(md[t]||md[e%100-t]||md[100<=e?100:null])}},week:{dow:1,doy:7}}),l.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"d'o":"D'O":t?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:ud,ss:ud,m:ud,mm:ud,h:ud,hh:ud,d:ud,dd:ud,M:ud,MM:ud,y:ud,yy:ud},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),l.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}}),l.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===a||"\u0633\u06d5\u06be\u06d5\u0631"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===a?e:"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"===a||"\u0643\u06d5\u0686"===a?e+12:11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":s<900?"\u0633\u06d5\u06be\u06d5\u0631":s<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":s<1230?"\u0686\u06c8\u0634":s<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}}),l.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,a){var t={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?t.nominative.slice(1,7).concat(t.nominative.slice(0,1)):e?t[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(a)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(a)?"genitive":"nominative"][e.day()]:t.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:Md("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:Md("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:Md("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:Md("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return Md("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return Md("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:ld,m:ld,mm:ld,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:ld,d:"\u0434\u0435\u043d\u044c",dd:ld,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:ld,y:"\u0440\u0456\u043a",yy:ld},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}});var hd=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],Ld=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];return l.defineLocale("ur",{months:hd,monthsShort:hd,weekdays:Ld,weekdaysShort:Ld,weekdaysMin:Ld,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),l.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),l.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}}),l.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n r\u1ed3i l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),l.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}}),l.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}}),l.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),l.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),l.locale("en"),l});
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t,e){"object"===("undefined"==typeof t?"undefined":i(t))&&(e=t,t=void 0),e=e||{};var r,n=s(t),a=n.source,p=n.id,f=n.path,l=h[p]&&f in h[p].nsps,d=e.forceNew||e["force new connection"]||!1===e.multiplex||l;return d?(u("ignoring socket cache for %s",a),r=c(a,e)):(h[p]||(u("new io instance for %s",a),h[p]=c(a,e)),r=h[p]),n.query&&!e.query?e.query=n.query:e&&"object"===i(e.query)&&(e.query=o(e.query)),r.socket(n.path,e)}function o(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e.join("&")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(1),a=r(7),c=r(17),u=r(3)("socket.io-client");t.exports=e=n;var h=e.managers={};e.protocol=a.protocol,e.connect=n,e.Manager=r(17),e.Socket=r(44)},function(t,e,r){(function(e){"use strict";function n(t,r){var n=t;r=r||e.location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof r?r.protocol+"//"+t:"https://"+t),i("parse %s",t),n=o(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var s=n.host.indexOf(":")!==-1,a=s?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}var o=r(2),i=r(3)("socket.io-client:url");t.exports=n}).call(e,function(){return this}())},function(t,e){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");o!=-1&&i!=-1&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=r.exec(t||""),a={},c=14;c--;)a[n[c]]=s[c]||"";return o!=-1&&i!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e,r){(function(n){function o(){return"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var t=arguments,r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,n),t}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function c(){try{return e.storage.debug}catch(t){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function u(){try{return window.localStorage}catch(t){}}e=t.exports=r(5),e.log=s,e.formatArgs=i,e.save=a,e.load=c,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(c())}).call(e,r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(h===setTimeout)return setTimeout(t,0);if((h===r||!h)&&setTimeout)return h=setTimeout,setTimeout(t,0);try{return h(t,0)}catch(e){try{return h.call(null,t,0)}catch(e){return h.call(this,t,0)}}}function i(t){if(p===clearTimeout)return clearTimeout(t);if((p===n||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function s(){y&&l&&(y=!1,l.length?d=l.concat(d):g=-1,d.length&&a())}function a(){if(!y){var t=o(s);y=!0;for(var e=d.length;e;){for(l=d,d=[];++g<e;)l&&l[g].run();g=-1,e=d.length}l=null,y=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var h,p,f=t.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:r}catch(t){h=r}try{p="function"==typeof clearTimeout?clearTimeout:n}catch(t){p=n}}();var l,d=[],y=!1,g=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new c(t,e)),1!==d.length||y||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,r){function n(){return e.colors[h++%e.colors.length]}function o(t){function r(){}function o(){var t=o,r=+new Date,i=r-(u||r);t.diff=i,t.prev=u,t.curr=r,u=r,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var c=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;c++;var o=e.formatters[n];if("function"==typeof o){var i=s[c];r=o.call(t,i),s.splice(c,1),c--}return r}),s=e.formatArgs.apply(t,s);var h=o.log||e.log||console.log.bind(console);h.apply(t,s)}r.enabled=!1,o.enabled=!0;var i=e.enabled(t)?o:r;return i.namespace=t,i}function i(t){e.save(t);for(var r=(t||"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&(t=r[o].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o.debug=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=r(6),e.names=[],e.skips=[],e.formatters={};var u,h=0},function(t,e){function r(t){if(t=String(t),!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*h;case"days":case"day":case"d":return r*u;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(t){return t>=u?Math.round(t/u)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,u,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,h=365.25*u;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return r(t);if("number"===i&&isNaN(t)===!1)return e.long?o(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){function n(){}function o(t){var r="",n=!1;return r+=t.type,e.BINARY_EVENT!=t.type&&e.BINARY_ACK!=t.type||(r+=t.attachments,r+="-"),t.nsp&&"/"!=t.nsp&&(n=!0,r+=t.nsp),null!=t.id&&(n&&(r+=",",n=!1),r+=t.id),null!=t.data&&(n&&(r+=","),r+=f.stringify(t.data)),p("encoded %j as %s",t,r),r}function i(t,e){function r(t){var r=d.deconstructPacket(t),n=o(r.packet),i=r.buffers;i.unshift(n),e(i)}d.removeBlobs(t,r)}function s(){this.reconstructor=null}function a(t){var r={},n=0;if(r.type=Number(t.charAt(0)),null==e.types[r.type])return h();if(e.BINARY_EVENT==r.type||e.BINARY_ACK==r.type){for(var o="";"-"!=t.charAt(++n)&&(o+=t.charAt(n),n!=t.length););if(o!=Number(o)||"-"!=t.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"==t.charAt(n+1))for(r.nsp="";++n;){var i=t.charAt(n);if(","==i)break;if(r.nsp+=i,n==t.length)break}else r.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(r.id="";++n;){var i=t.charAt(n);if(null==i||Number(i)!=i){--n;break}if(r.id+=t.charAt(n),n==t.length)break}r.id=Number(r.id)}return t.charAt(++n)&&(r=c(r,t.substr(n))),p("decoded %s as %j",t,r),r}function c(t,e){try{t.data=f.parse(e)}catch(t){return h()}return t}function u(t){this.reconPack=t,this.buffers=[]}function h(t){return{type:e.ERROR,data:"parser error"}}var p=r(8)("socket.io-parser"),f=r(11),l=r(13),d=r(14),y=r(16);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=n,e.Decoder=s,n.prototype.encode=function(t,r){if(p("encoding packet %j",t),e.BINARY_EVENT==t.type||e.BINARY_ACK==t.type)i(t,r);else{var n=o(t);r([n])}},l(s.prototype),s.prototype.add=function(t){var r;if("string"==typeof t)r=a(t),e.BINARY_EVENT==r.type||e.BINARY_ACK==r.type?(this.reconstructor=new u(r),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",r)):this.emit("decoded",r);else{if(!y(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,this.emit("decoded",r))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},u.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length==this.reconPack.attachments){var e=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},u.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,n),t}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function a(){var t;try{t=e.storage.debug}catch(t){}return t}function c(){try{return window.localStorage}catch(t){}}e=t.exports=r(9),e.log=i,e.formatArgs=o,e.save=s,e.load=a,e.useColors=n,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},function(t,e,r){function n(){return e.colors[h++%e.colors.length]}function o(t){function r(){}function o(){var t=o,r=+new Date,i=r-(u||r);t.diff=i,t.prev=u,t.curr=r,u=r,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());var s=Array.prototype.slice.call(arguments);s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;a++;var o=e.formatters[n];if("function"==typeof o){var i=s[a];r=o.call(t,i),s.splice(a,1),a--}return r}),"function"==typeof e.formatArgs&&(s=e.formatArgs.apply(t,s));var c=o.log||e.log||console.log.bind(console);c.apply(t,s)}r.enabled=!1,o.enabled=!0;var i=e.enabled(t)?o:r;return i.namespace=t,i}function i(t){e.save(t);for(var r=(t||"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&(t=r[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=r(10),e.names=[],e.skips=[],e.formatters={};var u,h=0},function(t,e){function r(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*h;case"days":case"day":case"d":return r*u;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(t){return t>=u?Math.round(t/u)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,u,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,h=365.25*u;t.exports=function(t,e){return e=e||{},"string"==typeof t?r(t):e.long?o(t):n(t)}},function(t,e,r){(function(t,r){var n=!1;(function(){function o(t,e){function r(t){if(r[t]!==g)return r[t];var o;if("bug-string-char-index"==t)o="a"!="a"[0];else if("json"==t)o=r("json-stringify")&&r("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var c=e.stringify,h="function"==typeof c&&b;if(h){(s=function(){return 1}).toJSON=s;try{h="0"===c(0)&&"0"===c(new n)&&'""'==c(new i)&&c(v)===g&&c(g)===g&&c()===g&&"1"===c(s)&&"[1]"==c([s])&&"[null]"==c([g])&&"null"==c(null)&&"[null,null,null]"==c([g,v,null])&&c({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===c(null,s)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==c(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==c(new u(-1))}catch(t){h=!1}}o=h}if("json-parse"==t){var p=e.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){s=p(a);var f=5==s.a.length&&1===s.a[0];if(f){try{f=!p('"\t"')}catch(t){}if(f)try{f=1!==p("01")}catch(t){}if(f)try{f=1!==p("1.")}catch(t){}}}}catch(t){f=!1}o=f}}return r[t]=!!o}t||(t=c.Object()),e||(e=c.Object());var n=t.Number||c.Number,i=t.String||c.String,a=t.Object||c.Object,u=t.Date||c.Date,h=t.SyntaxError||c.SyntaxError,p=t.TypeError||c.TypeError,f=t.Math||c.Math,l=t.JSON||c.JSON;"object"==typeof l&&l&&(e.stringify=l.stringify,e.parse=l.parse);var d,y,g,m=a.prototype,v=m.toString,b=new u(-0xc782b5b800cec);try{b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(t){}if(!r("json")){var w="[object Function]",k="[object Date]",x="[object Number]",A="[object String]",C="[object Array]",B="[object Boolean]",S=r("bug-string-char-index");if(!b)var T=f.floor,E=[0,31,59,90,120,151,181,212,243,273,304,334],_=function(t,e){return E[e]+365*(t-1970)+T((t-1969+(e=+(e>1)))/4)-T((t-1901+e)/100)+T((t-1601+e)/400)};if((d=m.hasOwnProperty)||(d=function(t){var e,r={};return(r.__proto__=null,r.__proto__={toString:1},r).toString!=v?d=function(t){var e=this.__proto__,r=t in(this.__proto__=null,this);return this.__proto__=e,r}:(e=r.constructor,d=function(t){var r=(this.constructor||e).prototype;return t in this&&!(t in r&&this[t]===r[t])}),r=null,d.call(this,t)}),y=function(t,e){var r,n,o,i=0;(r=function(){this.valueOf=0}).prototype.valueOf=0,n=new r;for(o in n)d.call(n,o)&&i++;return r=n=null,i?y=2==i?function(t,e){var r,n={},o=v.call(t)==w;for(r in t)o&&"prototype"==r||d.call(n,r)||!(n[r]=1)||!d.call(t,r)||e(r)}:function(t,e){var r,n,o=v.call(t)==w;for(r in t)o&&"prototype"==r||!d.call(t,r)||(n="constructor"===r)||e(r);(n||d.call(t,r="constructor"))&&e(r)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],y=function(t,e){var r,o,i=v.call(t)==w,a=!i&&"function"!=typeof t.constructor&&s[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(r in t)i&&"prototype"==r||!a.call(t,r)||e(r);for(o=n.length;r=n[--o];a.call(t,r)&&e(r));}),y(t,e)},!r("json-stringify")){var N={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j="000000",O=function(t,e){return(j+(e||0)).slice(-t)},P="\\u00",R=function(t){for(var e='"',r=0,n=t.length,o=!S||n>10,i=o&&(S?t.split(""):t);r<n;r++){var s=t.charCodeAt(r);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=N[s];break;default:if(s<32){e+=P+O(2,s.toString(16));break}e+=o?i[r]:t.charAt(r)}}return e+'"'},D=function(t,e,r,n,o,i,s){var a,c,u,h,f,l,m,b,w,S,E,N,j,P,q,U;try{a=e[t]}catch(t){}if("object"==typeof a&&a)if(c=v.call(a),c!=k||d.call(a,"toJSON"))"function"==typeof a.toJSON&&(c!=x&&c!=A&&c!=C||d.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&a<1/0){if(_){for(f=T(a/864e5),u=T(f/365.2425)+1970-1;_(u+1,0)<=f;u++);for(h=T((f-_(u,0))/30.42);_(u,h+1)<=f;h++);f=1+f-_(u,h),l=(a%864e5+864e5)%864e5,m=T(l/36e5)%24,b=T(l/6e4)%60,w=T(l/1e3)%60,S=l%1e3}else u=a.getUTCFullYear(),h=a.getUTCMonth(),f=a.getUTCDate(),m=a.getUTCHours(),b=a.getUTCMinutes(),w=a.getUTCSeconds(),S=a.getUTCMilliseconds();a=(u<=0||u>=1e4?(u<0?"-":"+")+O(6,u<0?-u:u):O(4,u))+"-"+O(2,h+1)+"-"+O(2,f)+"T"+O(2,m)+":"+O(2,b)+":"+O(2,w)+"."+O(3,S)+"Z"}else a=null;if(r&&(a=r.call(e,t,a)),null===a)return"null";if(c=v.call(a),c==B)return""+a;if(c==x)return a>-1/0&&a<1/0?""+a:"null";if(c==A)return R(""+a);if("object"==typeof a){for(P=s.length;P--;)if(s[P]===a)throw p();if(s.push(a),E=[],q=i,i+=o,c==C){for(j=0,P=a.length;j<P;j++)N=D(j,a,r,n,o,i,s),E.push(N===g?"null":N);U=E.length?o?"[\n"+i+E.join(",\n"+i)+"\n"+q+"]":"["+E.join(",")+"]":"[]"}else y(n||a,function(t){var e=D(t,a,r,n,o,i,s);e!==g&&E.push(R(t)+":"+(o?" ":"")+e)}),U=E.length?o?"{\n"+i+E.join(",\n"+i)+"\n"+q+"}":"{"+E.join(",")+"}":"{}";return s.pop(),U}};e.stringify=function(t,e,r){var n,o,i,a;if(s[typeof e]&&e)if((a=v.call(e))==w)o=e;else if(a==C){i={};for(var c,u=0,h=e.length;u<h;c=e[u++],a=v.call(c),(a==A||a==x)&&(i[c]=1));}if(r)if((a=v.call(r))==x){if((r-=r%1)>0)for(n="",r>10&&(r=10);n.length<r;n+=" ");}else a==A&&(n=r.length<=10?r:r.slice(0,10));return D("",(c={},c[""]=t,c),o,i,n,"",[])}}if(!r("json-parse")){var q,U,M=i.fromCharCode,L={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},I=function(){throw q=U=null,h()},H=function(){for(var t,e,r,n,o,i=U,s=i.length;q<s;)switch(o=i.charCodeAt(q)){case 9:case 10:case 13:case 32:q++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=S?i.charAt(q):i[q],q++,t;case 34:for(t="@",q++;q<s;)if(o=i.charCodeAt(q),o<32)I();else if(92==o)switch(o=i.charCodeAt(++q)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=L[o],q++;break;case 117:for(e=++q,r=q+4;q<r;q++)o=i.charCodeAt(q),o>=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||I();t+=M("0x"+i.slice(e,q));break;default:I()}else{if(34==o)break;for(o=i.charCodeAt(q),e=q;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++q);t+=i.slice(e,q)}if(34==i.charCodeAt(q))return q++,t;I();default:if(e=q,45==o&&(n=!0,o=i.charCodeAt(++q)),o>=48&&o<=57){for(48==o&&(o=i.charCodeAt(q+1),o>=48&&o<=57)&&I(),n=!1;q<s&&(o=i.charCodeAt(q),o>=48&&o<=57);q++);if(46==i.charCodeAt(q)){for(r=++q;r<s&&(o=i.charCodeAt(r),o>=48&&o<=57);r++);r==q&&I(),q=r}if(o=i.charCodeAt(q),101==o||69==o){for(o=i.charCodeAt(++q),43!=o&&45!=o||q++,r=q;r<s&&(o=i.charCodeAt(r),o>=48&&o<=57);r++);r==q&&I(),q=r}return+i.slice(e,q)}if(n&&I(),"true"==i.slice(q,q+4))return q+=4,!0;if("false"==i.slice(q,q+5))return q+=5,!1;if("null"==i.slice(q,q+4))return q+=4,null;I()}return"$"},z=function(t){var e,r;if("$"==t&&I(),"string"==typeof t){if("@"==(S?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=H(),"]"!=t;r||(r=!0))r&&(","==t?(t=H(),"]"==t&&I()):I()),","==t&&I(),e.push(z(t));return e}if("{"==t){for(e={};t=H(),"}"!=t;r||(r=!0))r&&(","==t?(t=H(),"}"==t&&I()):I()),","!=t&&"string"==typeof t&&"@"==(S?t.charAt(0):t[0])&&":"==H()||I(),e[t.slice(1)]=z(H());return e}I()}return t},J=function(t,e,r){var n=X(t,e,r);n===g?delete t[e]:t[e]=n},X=function(t,e,r){var n,o=t[e];if("object"==typeof o&&o)if(v.call(o)==C)for(n=o.length;n--;)J(o,n,r);else y(o,function(t){J(o,t,r)});return r.call(t,e,o)};e.parse=function(t,e){var r,n;return q=0,U=""+t,r=z(H()),"$"!=H()&&I(),q=U=null,e&&v.call(e)==w?X((n={},n[""]=r,n),"",e):r}}}return e.runInContext=o,e}var i="function"==typeof n&&n.amd,s={function:!0,object:!0},a=s[typeof e]&&e&&!e.nodeType&&e,c=s[typeof window]&&window||this,u=a&&s[typeof t]&&t&&!t.nodeType&&"object"==typeof r&&r;if(!u||u.global!==u&&u.window!==u&&u.self!==u||(c=u),a&&!i)o(c,a);else{var h=c.JSON,p=c.JSON3,f=!1,l=o(c,c.JSON3={noConflict:function(){return f||(f=!0,c.JSON=h,c.JSON3=p,h=p=null),l}});c.JSON={parse:l.parse,stringify:l.stringify}}i&&n(function(){return l})}).call(this)}).call(e,r(12)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function r(t){if(t)return n(t)}function n(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},r.prototype.once=function(t,e){function r(){n.off(t,r),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},r.fn=e,this.on(t,r),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks[t];if(!r)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks[t];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,r){(function(t){var n=r(15),o=r(16);e.deconstructPacket=function(t){function e(t){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:r.length};return r.push(t),i}if(n(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a]);return s}if("object"==typeof t&&!(t instanceof Date)){var s={};for(var c in t)s[c]=e(t[c]);return s}return t}var r=[],i=t.data,s=t;return s.data=e(i),s.attachments=r.length,{packet:s,buffers:r}},e.reconstructPacket=function(t,e){function r(t){if(t&&t._placeholder){var o=e[t.num];return o}if(n(t)){for(var i=0;i<t.length;i++)t[i]=r(t[i]);return t}if(t&&"object"==typeof t){for(var s in t)t[s]=r(t[s]);return t}return t}return t.data=r(t.data),t.attachments=void 0,t},e.removeBlobs=function(e,r){function i(e,c,u){if(!e)return e;if(t.Blob&&e instanceof Blob||t.File&&e instanceof File){s++;var h=new FileReader;h.onload=function(){u?u[c]=this.result:a=this.result,--s||r(a)},h.readAsArrayBuffer(e)}else if(n(e))for(var p=0;p<e.length;p++)i(e[p],p,e);else if(e&&"object"==typeof e&&!o(e))for(var f in e)i(e[f],f,e)}var s=0,a=e;i(a),s||r(a)}}).call(e,function(){return this}())},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){(function(e){function r(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=r}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t,e){return this instanceof n?(t&&"object"===("undefined"==typeof t?"undefined":o(t))&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new c.Encoder,this.decoder=new c.Decoder,this.autoConnect=e.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(t,e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(18),s=r(44),a=r(35),c=r(7),u=r(46),h=r(47),p=r(3)("socket.io-client:manager"),f=r(42),l=r(48),d=Object.prototype.hasOwnProperty;t.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)d.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},n.prototype.updateSocketIds=function(){for(var t in this.nsps)d.call(this.nsps,t)&&(this.nsps[t].id=this.engine.id)},a(n.prototype),n.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},n.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},n.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},n.prototype.open=n.prototype.connect=function(t,e){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=i(this.uri,this.opts);var r=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var o=u(r,"open",function(){n.onopen(),t&&t()}),s=u(r,"error",function(e){if(p("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var r=new Error("Connection error");r.data=e,t(r)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;p("connect attempt will timeout after %d",a);var c=setTimeout(function(){p("connect attempt timed out after %d",a),o.destroy(),r.close(),r.emit("error","timeout"),n.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(s),this},n.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(u(t,"data",h(this,"ondata"))),this.subs.push(u(t,"ping",h(this,"onping"))),this.subs.push(u(t,"pong",h(this,"onpong"))),this.subs.push(u(t,"error",h(this,"onerror"))),this.subs.push(u(t,"close",h(this,"onclose"))),this.subs.push(u(this.decoder,"decoded",h(this,"ondecoded")))},n.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},n.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},n.prototype.ondata=function(t){this.decoder.add(t)},n.prototype.ondecoded=function(t){this.emit("packet",t)},n.prototype.onerror=function(t){p("error",t),this.emitAll("error",t)},n.prototype.socket=function(t,e){function r(){~f(o.connecting,n)||o.connecting.push(n)}var n=this.nsps[t];if(!n){n=new s(this,t,e),this.nsps[t]=n;var o=this;n.on("connecting",r),n.on("connect",function(){n.id=o.engine.id}),this.autoConnect&&r()}return n},n.prototype.destroy=function(t){var e=f(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},n.prototype.packet=function(t){p("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(r){for(var n=0;n<r.length;n++)e.engine.write(r[n],t.options);e.encoding=!1,e.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},n.prototype.cleanup=function(){p("cleanup");for(var t=this.subs.length,e=0;e<t;e++){var r=this.subs.shift();r.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){p("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(t){p("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();p("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var r=setTimeout(function(){t.skipReconnect||(p("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(p("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(p("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(r)}})}},n.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,r){t.exports=r(19)},function(t,e,r){t.exports=r(20),t.exports.parser=r(27)},function(t,e,r){(function(e){function n(t,r){if(!(this instanceof n))return new n(t,r);r=r||{},t&&"object"==typeof t&&(r=t,t=null),t?(t=h(t),r.hostname=t.host,r.secure="https"===t.protocol||"wss"===t.protocol,r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=h(r.host).host),
+this.secure=null!=r.secure?r.secure:e.location&&"https:"===location.protocol,r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.agent=r.agent||!1,this.hostname=r.hostname||(e.location?location.hostname:"localhost"),this.port=r.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=r.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==r.upgrade,this.path=(r.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!r.forceJSONP,this.jsonp=!1!==r.jsonp,this.forceBase64=!!r.forceBase64,this.enablesXDR=!!r.enablesXDR,this.timestampParam=r.timestampParam||"t",this.timestampRequests=r.timestampRequests,this.transports=r.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=r.policyPort||843,this.rememberUpgrade=r.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=r.onlyBinaryUpgrades,this.perMessageDeflate=!1!==r.perMessageDeflate&&(r.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=r.pfx||null,this.key=r.key||null,this.passphrase=r.passphrase||null,this.cert=r.cert||null,this.ca=r.ca||null,this.ciphers=r.ciphers||null,this.rejectUnauthorized=void 0===r.rejectUnauthorized?null:r.rejectUnauthorized,this.forceNode=!!r.forceNode;var o="object"==typeof e&&e;o.global===o&&(r.extraHeaders&&Object.keys(r.extraHeaders).length>0&&(this.extraHeaders=r.extraHeaders),r.localAddress&&(this.localAddress=r.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function o(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}var i=r(21),s=r(35),a=r(3)("engine.io-client:socket"),c=r(42),u=r(27),h=r(2),p=r(43),f=r(36);t.exports=n,n.priorWebsocketSuccess=!1,s(n.prototype),n.protocol=u.protocol,n.Socket=n,n.Transport=r(26),n.transports=r(21),n.parser=r(27),n.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=u.protocol,e.transport=t,this.id&&(e.sid=this.id);var r=new i[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:e,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders,forceNode:this.forceNode,localAddress:this.localAddress});return r},n.prototype.open=function(){var t;if(this.rememberUpgrade&&n.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},n.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},n.prototype.probe=function(t){function e(){if(f.onlyBinaryUpgrades){var e=!this.supportsBinary&&f.transport.supportsBinary;p=p||e}p||(a('probe transport "%s" opened',t),h.send([{type:"ping",data:"probe"}]),h.once("packet",function(e){if(!p)if("pong"===e.type&&"probe"===e.data){if(a('probe transport "%s" pong',t),f.upgrading=!0,f.emit("upgrading",h),!h)return;n.priorWebsocketSuccess="websocket"===h.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!==f.readyState&&(a("changing transport and sending upgrade packet"),u(),f.setTransport(h),h.send([{type:"upgrade"}]),f.emit("upgrade",h),h=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',t);var r=new Error("probe error");r.transport=h.name,f.emit("upgradeError",r)}}))}function r(){p||(p=!0,u(),h.close(),h=null)}function o(e){var n=new Error("probe error: "+e);n.transport=h.name,r(),a('probe transport "%s" failed because of error: %s',t,e),f.emit("upgradeError",n)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){h&&t.name!==h.name&&(a('"%s" works - aborting "%s"',t.name,h.name),r())}function u(){h.removeListener("open",e),h.removeListener("error",o),h.removeListener("close",i),f.removeListener("close",s),f.removeListener("upgrading",c)}a('probing transport "%s"',t);var h=this.createTransport(t,{probe:1}),p=!1,f=this;n.priorWebsocketSuccess=!1,h.once("open",e),h.once("error",o),h.once("close",i),this.once("close",s),this.once("upgrading",c),h.open()},n.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},n.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(p(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},n.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},n.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},n.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},n.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},n.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},n.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},n.prototype.write=n.prototype.send=function(t,e,r){return this.sendPacket("message",t,e,r),this},n.prototype.sendPacket=function(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){r=r||{},r.compress=!1!==r.compress;var o={type:t,data:e,options:r};this.emit("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}},n.prototype.close=function(){function t(){n.onClose("forced close"),a("socket closing - telling transport to close"),n.transport.close()}function e(){n.removeListener("upgrade",e),n.removeListener("upgradeError",e),t()}function r(){n.once("upgrade",e),n.once("upgradeError",e)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var n=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():t()}):this.upgrading?r():t()}return this},n.prototype.onError=function(t){a("socket error %j",t),n.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},n.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);var r=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),r.writeBuffer=[],r.prevBufferLen=0}},n.prototype.filterUpgrades=function(t){for(var e=[],r=0,n=t.length;r<n;r++)~c(this.transports,t[r])&&e.push(t[r]);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t){function n(e){var r,n=!1,a=!1,c=!1!==e.jsonp;if(t.location){var u="https:"===location.protocol,h=location.port;h||(h=u?443:80),n=e.hostname!==location.hostname||h!==e.port,a=e.secure!==u}if(e.xdomain=n,e.xscheme=a,r=new o(e),"open"in r&&!e.forceJSONP)return new i(e);if(!c)throw new Error("JSONP disabled");return new s(e)}var o=r(22),i=r(24),s=r(39),a=r(40);e.polling=n,e.websocket=a}).call(e,function(){return this}())},function(t,e,r){(function(e){var n=r(23);t.exports=function(t){var r=t.xdomain,o=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!r||n))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(t){}if(!r)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(e,function(){return this}())},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,r){(function(e){function n(){}function o(t){if(c.call(this,t),this.requestTimeout=t.requestTimeout,e.location){var r="https:"===location.protocol,n=location.port;n||(n=r?443:80),this.xd=t.hostname!==e.location.hostname||n!==t.port,this.xs=t.secure!==r}else this.extraHeaders=t.extraHeaders}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=r(22),c=r(25),u=r(35),h=r(37),p=r(3)("engine.io-client:polling-xhr");t.exports=o,t.exports.Request=i,h(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new i(t)},o.prototype.doWrite=function(t,e){var r="string"!=typeof t&&void 0!==t,n=this.request({method:"POST",data:t,isBinary:r}),o=this;n.on("success",e),n.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=n},o.prototype.doPoll=function(){p("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},u(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var r=this.xhr=new a(t),n=this;try{p("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,this.async);try{if(this.extraHeaders){r.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.extraHeaders[o])}}catch(t){}if(this.supportsBinary&&(r.responseType="arraybuffer"),"POST"===this.method)try{this.isBinary?r.setRequestHeader("Content-type","application/octet-stream"):r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in r&&(r.withCredentials=!0),this.requestTimeout&&(r.timeout=this.requestTimeout),this.hasXDR()?(r.onload=function(){n.onLoad()},r.onerror=function(){n.onError(r.responseText)}):r.onreadystatechange=function(){4===r.readyState&&(200===r.status||1223===r.status?n.onLoad():setTimeout(function(){n.onError(r.status)},0))},p("xhr data %s",this.data),r.send(this.data)}catch(t){return void setTimeout(function(){n.onError(t)},0)}e.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=n:this.xhr.onreadystatechange=n,t)try{this.xhr.abort()}catch(t){}e.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(t){}if("application/octet-stream"===e)t=this.xhr.response||this.xhr.responseText;else if(this.supportsBinary)try{t=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(e){for(var r=new Uint8Array(this.xhr.response),n=[],o=0,i=r.length;o<i;o++)n.push(r[o]);t=String.fromCharCode.apply(null,n)}else t=this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof e.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},i.requestsCount=0,i.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",s):e.addEventListener&&e.addEventListener("beforeunload",s,!1))}).call(e,function(){return this}())},function(t,e,r){function n(t){var e=t&&t.forceBase64;h&&!e||(this.supportsBinary=!1),o.call(this,t)}var o=r(26),i=r(36),s=r(27),a=r(37),c=r(38),u=r(3)("engine.io-client:polling");t.exports=n;var h=function(){var t=r(22),e=new t({xdomain:!1});return null!=e.responseType}();a(n,o),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(t){function e(){u("paused"),r.readyState="paused",t()}var r=this;if(this.readyState="pausing",this.polling||!this.writable){var n=0;this.polling&&(u("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){u("pre-pause polling complete"),--n||e()})),this.writable||(u("we are currently writing - waiting to pause"),n++,this.once("drain",function(){u("pre-pause writing complete"),--n||e()}))}else e()},n.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(t){var e=this;u("polling got data %s",t);var r=function(t,r,n){return"opening"===e.readyState&&e.onOpen(),"close"===t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,r),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function t(){u("writing close packet"),e.write([{type:"close"}])}var e=this;"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},n.prototype.write=function(t){var e=this;this.writable=!1;var r=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,r)})},n.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",r="";!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(r=":"+this.port),t.length&&(t="?"+t);var n=this.hostname.indexOf(":")!==-1;return e+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+t}},function(t,e,r){function n(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}var o=r(27),i=r(35);t.exports=n,i(n.prototype),n.prototype.onError=function(t,e){var r=new Error(t);return r.type="TransportError",r.description=e,this.emit("error",r),this},n.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},n.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},n.prototype.onPacket=function(t){this.emit("packet",t)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,r){(function(t){function n(t,r){var n="b"+e.packets[t.type]+t.data.data;return r(n)}function o(t,r,n){if(!r)return e.encodeBase64Packet(t,n);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=v[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return n(s.buffer)}function i(t,r,n){if(!r)return e.encodeBase64Packet(t,n);var o=new FileReader;return o.onload=function(){t.data=o.result,e.encodePacket(t,r,!0,n)},o.readAsArrayBuffer(t.data)}function s(t,r,n){if(!r)return e.encodeBase64Packet(t,n);if(m)return i(t,r,n);var o=new Uint8Array(1);o[0]=v[t.type];var s=new k([o.buffer,t.data]);return n(s)}function a(t){try{t=d.decode(t)}catch(t){return!1}return t}function c(t,e,r){for(var n=new Array(t.length),o=l(t.length,r),i=function(t,r,o){e(r,function(e,r){n[t]=r,o(e,n)})},s=0;s<t.length;s++)i(s,t[s],o)}var u,h=r(28),p=r(29),f=r(30),l=r(31),d=r(32);t&&t.ArrayBuffer&&(u=r(33));var y="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),g="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),m=y||g;e.protocol=3;var v=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=h(v),w={type:"error",data:"parser error"},k=r(34);e.encodePacket=function(e,r,i,a){"function"==typeof r&&(a=r,r=!1),"function"==typeof i&&(a=i,i=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return o(e,r,a);if(k&&c instanceof t.Blob)return s(e,r,a);if(c&&c.base64)return n(e,a);var u=v[e.type];return void 0!==e.data&&(u+=i?d.encode(String(e.data)):String(e.data)),a(""+u)},e.encodeBase64Packet=function(r,n){var o="b"+e.packets[r.type];if(k&&r.data instanceof t.Blob){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n(o+t)},i.readAsDataURL(r.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(r.data))}catch(t){for(var a=new Uint8Array(r.data),c=new Array(a.length),u=0;u<a.length;u++)c[u]=a[u];s=String.fromCharCode.apply(null,c)}return o+=t.btoa(s),n(o)},e.decodePacket=function(t,r,n){if(void 0===t)return w;if("string"==typeof t){if("b"==t.charAt(0))return e.decodeBase64Packet(t.substr(1),r);if(n&&(t=a(t),t===!1))return w;var o=t.charAt(0);return Number(o)==o&&b[o]?t.length>1?{type:b[o],data:t.substring(1)}:{type:b[o]}:w}var i=new Uint8Array(t),o=i[0],s=f(t,1);return k&&"blob"===r&&(s=new k([s])),{type:b[o],data:s}},e.decodeBase64Packet=function(t,e){var r=b[t.charAt(0)];if(!u)return{type:r,data:{base64:!0,data:t.substr(1)}};var n=u.decode(t.substr(1));return"blob"===e&&k&&(n=new k([n])),{type:r,data:n}},e.encodePayload=function(t,r,n){function o(t){return t.length+":"+t}function i(t,n){e.encodePacket(t,!!s&&r,!0,function(t){n(null,o(t))})}"function"==typeof r&&(n=r,r=null);var s=p(t);return r&&s?k&&!m?e.encodePayloadAsBlob(t,n):e.encodePayloadAsArrayBuffer(t,n):t.length?void c(t,i,function(t,e){return n(e.join(""))}):n("0:")},e.decodePayload=function(t,r,n){if("string"!=typeof t)return e.decodePayloadAsBinary(t,r,n);"function"==typeof r&&(n=r,r=null);var o;if(""==t)return n(w,0,1);for(var i,s,a="",c=0,u=t.length;c<u;c++){var h=t.charAt(c);if(":"!=h)a+=h;else{if(""==a||a!=(i=Number(a)))return n(w,0,1);if(s=t.substr(c+1,i),a!=s.length)return n(w,0,1);if(s.length){if(o=e.decodePacket(s,r,!0),w.type==o.type&&w.data==o.data)return n(w,0,1);var p=n(o,c+i,u);if(!1===p)return}c+=i,a=""}}return""!=a?n(w,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,r){function n(t,r){e.encodePacket(t,!0,!0,function(t){return r(null,t)})}return t.length?void c(t,n,function(t,e){var n=e.reduce(function(t,e){var r;return r="string"==typeof e?e.length:e.byteLength,t+r.toString().length+r+2},0),o=new Uint8Array(n),i=0;return e.forEach(function(t){var e="string"==typeof t,r=t;if(e){for(var n=new Uint8Array(t.length),s=0;s<t.length;s++)n[s]=t.charCodeAt(s);r=n.buffer}e?o[i++]=0:o[i++]=1;for(var a=r.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(var n=new Uint8Array(r),s=0;s<n.length;s++)o[i++]=n[s]}),r(o.buffer)}):r(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,r){function n(t,r){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var n=new Uint8Array(t.length),o=0;o<t.length;o++)n[o]=t.charCodeAt(o);t=n.buffer,e[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,k){var c=new k([e.buffer,a.buffer,t]);r(null,c)}})}c(t,n,function(t,e){return r(new k(e))})},e.decodePayloadAsBinary=function(t,r,n){"function"==typeof r&&(n=r,r=null);for(var o=t,i=[],s=!1;o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",h=1;255!=a[h];h++){if(u.length>310){s=!0;break}u+=a[h]}if(s)return n(w,0,1);o=f(o,2+u.length),u=parseInt(u);var p=f(o,0,u);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(t){var l=new Uint8Array(p);p="";for(var h=0;h<l.length;h++)p+=String.fromCharCode(l[h])}i.push(p),o=f(o,u)}var d=i.length;i.forEach(function(t,o){n(e.decodePacket(t,r,!0),o,d)})}}).call(e,function(){return this}())},function(t,e){t.exports=Object.keys||function(t){var e=[],r=Object.prototype.hasOwnProperty;for(var n in t)r.call(t,n)&&e.push(n);return e}},function(t,e,r){(function(e){function n(t){function r(t){if(!t)return!1;if(e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer||e.Blob&&t instanceof Blob||e.File&&t instanceof File)return!0;if(o(t)){for(var n=0;n<t.length;n++)if(r(t[n]))return!0}else if(t&&"object"==typeof t){t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON());for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r(t[i]))return!0}return!1}return r(t)}var o=r(15);t.exports=n}).call(e,function(){return this}())},function(t,e){t.exports=function(t,e,r){var n=t.byteLength;if(e=e||0,r=r||n,t.slice)return t.slice(e,r);if(e<0&&(e+=n),r<0&&(r+=n),r>n&&(r=n),e>=n||e>=r||0===n)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(r-e),s=e,a=0;s<r;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function r(t,e,r){function o(t,n){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(i=!0,e(t),e=r):0!==o.count||i||e(null,n)}var i=!1;return r=r||n,o.count=t,0===t?e():o}function n(){}t.exports=r},function(t,e,r){var n;(function(t,o){!function(i){function s(t){for(var e,r,n=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(r=t.charCodeAt(o++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--)):n.push(e);return n}function a(t){for(var e,r=t.length,n=-1,o="";++n<r;)e=t[n],e>65535&&(e-=65536,o+=b(e>>>10&1023|55296),e=56320|1023&e),o+=b(e);return o}function c(t,e){return b(t>>e&63|128)}function u(t){if(0==(4294967168&t))return b(t);var e="";return 0==(4294965248&t)?e=b(t>>6&31|192):0==(4294901760&t)?(e=b(t>>12&15|224),e+=c(t,6)):0==(4292870144&t)&&(e=b(t>>18&7|240),e+=c(t,12),e+=c(t,6)),e+=b(63&t|128)}function h(t){for(var e,r=s(t),n=r.length,o=-1,i="";++o<n;)e=r[o],i+=u(e);return i}function p(){if(v>=m)throw Error("Invalid byte index");var t=255&g[v];if(v++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,e,r,n,o;if(v>m)throw Error("Invalid byte index");if(v==m)return!1;if(t=255&g[v],v++,0==(128&t))return t;if(192==(224&t)){var e=p();if(o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=p(),r=p(),o=(15&t)<<12|e<<6|r,o>=2048)return o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=p(),r=p(),n=p(),o=(15&t)<<18|e<<12|r<<6|n,o>=65536&&o<=1114111))return o;throw Error("Invalid WTF-8 detected")}function l(t){g=s(t),m=g.length,v=0;for(var e,r=[];(e=f())!==!1;)r.push(e);return a(r)}var d="object"==typeof e&&e,y=("object"==typeof t&&t&&t.exports==d&&t,"object"==typeof o&&o);y.global!==y&&y.window!==y||(i=y);var g,m,v,b=String.fromCharCode,w={version:"1.0.0",encode:h,decode:l};n=function(){return w}.call(e,r,e,t),!(void 0!==n&&(t.exports=n))}(this)}).call(e,r(12)(t),function(){return this}())},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;e.encode=function(e){var r,n=new Uint8Array(e),o=n.length,i="";for(r=0;r<o;r+=3)i+=t[n[r]>>2],i+=t[(3&n[r])<<4|n[r+1]>>4],i+=t[(15&n[r+1])<<2|n[r+2]>>6],i+=t[63&n[r+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,n,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),p=new Uint8Array(h);for(e=0;e<c;e+=4)n=r[t.charCodeAt(e)],o=r[t.charCodeAt(e+1)],i=r[t.charCodeAt(e+2)],s=r[t.charCodeAt(e+3)],p[u++]=n<<2|o>>4,p[u++]=(15&o)<<4|i>>2,p[u++]=(3&i)<<6|63&s;return h}}()},function(t,e){(function(e){function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(r.buffer instanceof ArrayBuffer){var n=r.buffer;if(r.byteLength!==n.byteLength){var o=new Uint8Array(r.byteLength);o.set(new Uint8Array(n,r.byteOffset,r.byteLength)),n=o.buffer}t[e]=n}}}function n(t,e){e=e||{};var n=new i;r(t);for(var o=0;o<t.length;o++)n.append(t[o]);return e.type?n.getBlob(e.type):n.getBlob()}function o(t,e){return r(t),new Blob(t,e||{})}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(t){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(t){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return s?a?e.Blob:o:c?n:void 0}()}).call(e,function(){return this}())},function(t,e,r){function n(t){if(t)return o(t)}function o(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks["$"+t];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){e.encode=function(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e},e.decode=function(t){for(var e={},r=t.split("&"),n=0,o=r.length;n<o;n++){var i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){"use strict";function r(t){var e="";do e=s[t%a]+e,t=Math.floor(t/a);while(t>0);return e}function n(t){var e=0;for(h=0;h<t.length;h++)e=e*a+c[t.charAt(h)];return e}function o(){var t=r(+new Date);return t!==i?(u=0,i=t):t+"."+r(u++)}for(var i,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,c={},u=0,h=0;h<a;h++)c[s[h]]=h;o.encode=r,o.decode=n,t.exports=o},function(t,e,r){(function(e){function n(){}function o(t){i.call(this,t),this.query=this.query||{},a||(e.___eio||(e.___eio=[]),a=e.___eio),this.index=a.length;var r=this;a.push(function(t){r.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){r.script&&(r.script.onerror=n)},!1)}var i=r(25),s=r(37);t.exports=o;var a,c=/\n/g,u=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(e,r):(document.head||document.body).appendChild(e),this.script=e;var n="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function r(){n(),e()}function n(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(t)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),h=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=h,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),n(),t=t.replace(u,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&r();
+}:this.iframe.onload=r}}).call(e,function(){return this}())},function(t,e,r){(function(e){function n(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=p&&!t.forceNode,this.usingBrowserWebSocket||(f=o),i.call(this,t)}var o,i=r(26),s=r(27),a=r(36),c=r(37),u=r(38),h=r(3)("engine.io-client:websocket"),p=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{o=r(41)}catch(t){}var f=p;f||"undefined"!=typeof window||(f=o),t.exports=n,c(n,i),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=void 0,r={agent:this.agent,perMessageDeflate:this.perMessageDeflate};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?new f(t):new f(t,e,r)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},n.prototype.write=function(t){function r(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}var n=this;this.writable=!1;for(var o=t.length,i=0,a=o;i<a;i++)!function(t){s.encodePacket(t,n.supportsBinary,function(i){if(!n.usingBrowserWebSocket){var s={};if(t.options&&(s.compress=t.options.compress),n.perMessageDeflate){var a="string"==typeof i?e.Buffer.byteLength(i):i.length;a<n.perMessageDeflate.threshold&&(s.compress=!1)}}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,s)}catch(t){h("websocket closed before onclose event")}--o||r()})}(t[i])},n.prototype.onClose=function(){i.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",r="";this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(r=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=u()),this.supportsBinary||(t.b64=1),t=a.encode(t),t.length&&(t="?"+t);var n=this.hostname.indexOf(":")!==-1;return e+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+t},n.prototype.check=function(){return!(!f||"__initialize"in f&&this.name===n.prototype.name)}}).call(e,function(){return this}())},function(t,e){},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){(function(e){var r=/^[\],:{}\s]*$/,n=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(s,"").replace(a,""),e.JSON&&JSON.parse?JSON.parse(t):r.test(t.replace(n,"@").replace(o,"]").replace(i,""))?new Function("return "+t)():void 0):null}}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t,e,r){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,r&&r.query&&(this.query=r.query),this.io.autoConnect&&this.open()}var o=r(7),i=r(35),s=r(45),a=r(46),c=r(47),u=r(3)("socket.io-client:socket"),h=r(29);t.exports=e=n;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=i.prototype.emit;i(n.prototype),n.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",c(this,"onopen")),a(t,"packet",c(this,"onpacket")),a(t,"close",c(this,"onclose"))]}},n.prototype.open=n.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},n.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},n.prototype.emit=function(t){if(p.hasOwnProperty(t))return f.apply(this,arguments),this;var e=s(arguments),r=o.EVENT;h(e)&&(r=o.BINARY_EVENT);var n={type:r,data:e};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},n.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},n.prototype.onopen=function(){u("transport is open - connecting"),"/"!==this.nsp&&(this.query?this.packet({type:o.CONNECT,query:this.query}):this.packet({type:o.CONNECT}))},n.prototype.onclose=function(t){u("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},n.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(t);break;case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:this.onack(t);break;case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},n.prototype.onevent=function(t){var e=t.data||[];u("emitting event %j",e),null!=t.id&&(u("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},n.prototype.ack=function(t){var e=this,r=!1;return function(){if(!r){r=!0;var n=s(arguments);u("sending ack %j",n);var i=h(n)?o.BINARY_ACK:o.ACK;e.packet({type:i,id:t,data:n})}}},n.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(u("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):u("bad ack %s",t.id)},n.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},n.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},n.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},n.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},n.prototype.close=n.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},n.prototype.compress=function(t){return this.flags=this.flags||{},this.flags.compress=t,this}},function(t,e){function r(t,e){var r=[];e=e||0;for(var n=e||0;n<t.length;n++)r[n-e]=t[n];return r}t.exports=r},function(t,e){"use strict";function r(t,e,r){return t.on(e,r),{destroy:function(){t.removeListener(e,r)}}}t.exports=r},function(t,e){var r=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var n=r.call(arguments,2);return function(){return e.apply(t,n.concat(r.call(arguments)))}}},function(t,e){function r(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=r,r.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}return 0|Math.min(t,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(t){this.ms=t},r.prototype.setMax=function(t){this.max=t},r.prototype.setJitter=function(t){this.jitter=t}}])});
+//     Underscore.js 1.9.1
+//     http://underscorejs.org
+//     (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Underscore may be freely distributed under the MIT license.
+!function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},r=n._,e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,c=e.slice,p=o.toString,i=o.hasOwnProperty,t=Array.isArray,a=Object.keys,l=Object.create,f=function(){},h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"==typeof exports||exports.nodeType?n._=h:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=h),exports._=h),h.VERSION="1.9.1";var v,y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,r,t){return u.call(i,n,r,t)};case 4:return function(n,r,t,e){return u.call(i,n,r,t,e)}}return function(){return u.apply(i,arguments)}},d=function(n,r,t){return h.iteratee!==v?h.iteratee(n,r):null==n?h.identity:h.isFunction(n)?y(n,r,t):h.isObject(n)&&!h.isArray(n)?h.matcher(n):h.property(n)};h.iteratee=v=function(n,r){return d(n,r,1/0)};var g=function(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t<n;t++)r[t]=arguments[t+i];switch(i){case 0:return u.call(this,r);case 1:return u.call(this,arguments[0],r);case 2:return u.call(this,arguments[0],arguments[1],r)}var e=Array(i+1);for(t=0;t<i;t++)e[t]=arguments[t];return e[i]=r,u.apply(this,e)}},m=function(n){if(!h.isObject(n))return{};if(l)return l(n);f.prototype=n;var r=new f;return f.prototype=null,r},b=function(r){return function(n){return null==n?void 0:n[r]}},j=function(n,r){return null!=n&&i.call(n,r)},x=function(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0},_=Math.pow(2,53)-1,A=b("length"),w=function(n){var r=A(n);return"number"==typeof r&&0<=r&&r<=_};h.each=h.forEach=function(n,r,t){var e,u;if(r=y(r,t),w(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;e<u;e++)r(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=r(n[a],a,n)}return i};var O=function(c){return function(n,r,t,e){var u=3<=arguments.length;return function(n,r,t,e){var u=!w(n)&&h.keys(n),i=(u||n).length,o=0<c?0:i-1;for(e||(t=n[u?u[o]:o],o+=c);0<=o&&o<i;o+=c){var a=u?u[o]:o;t=r(t,n[a],a,n)}return t}(n,y(r,e,4),t,u)}};h.reduce=h.foldl=h.inject=O(1),h.reduceRight=h.foldr=O(-1),h.find=h.detect=function(n,r,t){var e=(w(n)?h.findIndex:h.findKey)(n,r,t);if(void 0!==e&&-1!==e)return n[e]},h.filter=h.select=function(n,e,r){var u=[];return e=d(e,r),h.each(n,function(n,r,t){e(n,r,t)&&u.push(n)}),u},h.reject=function(n,r,t){return h.filter(n,h.negate(d(r)),t)},h.every=h.all=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!r(n[o],o,n))return!1}return!0},h.some=h.any=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(r(n[o],o,n))return!0}return!1},h.contains=h.includes=h.include=function(n,r,t,e){return w(n)||(n=h.values(n)),("number"!=typeof t||e)&&(t=0),0<=h.indexOf(n,r,t)},h.invoke=g(function(n,t,e){var u,i;return h.isFunction(t)?i=t:h.isArray(t)&&(u=t.slice(0,-1),t=t[t.length-1]),h.map(n,function(n){var r=i;if(!r){if(u&&u.length&&(n=x(n,u)),null==n)return;r=n[t]}return null==r?r:r.apply(n,e)})}),h.pluck=function(n,r){return h.map(n,h.property(r))},h.where=function(n,r){return h.filter(n,h.matcher(r))},h.findWhere=function(n,r){return h.find(n,h.matcher(r))},h.max=function(n,e,r){var t,u,i=-1/0,o=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&i<t&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){u=e(n,r,t),(o<u||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},h.min=function(n,e,r){var t,u,i=1/0,o=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&t<i&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){((u=e(n,r,t))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},h.shuffle=function(n){return h.sample(n,1/0)},h.sample=function(n,r,t){if(null==r||t)return w(n)||(n=h.values(n)),n[h.random(n.length-1)];var e=w(n)?h.clone(n):h.values(n),u=A(e);r=Math.max(Math.min(r,u),0);for(var i=u-1,o=0;o<r;o++){var a=h.random(o,i),c=e[o];e[o]=e[a],e[a]=c}return e.slice(0,r)},h.sortBy=function(n,e,r){var u=0;return e=d(e,r),h.pluck(h.map(n,function(n,r,t){return{value:n,index:u++,criteria:e(n,r,t)}}).sort(function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(e<t||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index}),"value")};var k=function(o,r){return function(e,u,n){var i=r?[[],[]]:{};return u=d(u,n),h.each(e,function(n,r){var t=u(n,r,e);o(i,n,t)}),i}};h.groupBy=k(function(n,r,t){j(n,t)?n[t].push(r):n[t]=[r]}),h.indexBy=k(function(n,r,t){n[t]=r}),h.countBy=k(function(n,r,t){j(n,t)?n[t]++:n[t]=1});var S=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;h.toArray=function(n){return n?h.isArray(n)?c.call(n):h.isString(n)?n.match(S):w(n)?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:w(n)?n.length:h.keys(n).length},h.partition=k(function(n,r,t){n[t?0:1].push(r)},!0),h.first=h.head=h.take=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[0]:h.initial(n,n.length-r)},h.initial=function(n,r,t){return c.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))},h.last=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[n.length-1]:h.rest(n,Math.max(0,n.length-r))},h.rest=h.tail=h.drop=function(n,r,t){return c.call(n,null==r||t?1:r)},h.compact=function(n){return h.filter(n,Boolean)};var M=function(n,r,t,e){for(var u=(e=e||[]).length,i=0,o=A(n);i<o;i++){var a=n[i];if(w(a)&&(h.isArray(a)||h.isArguments(a)))if(r)for(var c=0,l=a.length;c<l;)e[u++]=a[c++];else M(a,r,t,e),u=e.length;else t||(e[u++]=a)}return e};h.flatten=function(n,r){return M(n,r,!1)},h.without=g(function(n,r){return h.difference(n,r)}),h.uniq=h.unique=function(n,r,t,e){h.isBoolean(r)||(e=t,t=r,r=!1),null!=t&&(t=d(t,e));for(var u=[],i=[],o=0,a=A(n);o<a;o++){var c=n[o],l=t?t(c,o,n):c;r&&!t?(o&&i===l||u.push(c),i=l):t?h.contains(i,l)||(i.push(l),u.push(c)):h.contains(u,c)||u.push(c)}return u},h.union=g(function(n){return h.uniq(M(n,!0,!0))}),h.intersection=function(n){for(var r=[],t=arguments.length,e=0,u=A(n);e<u;e++){var i=n[e];if(!h.contains(r,i)){var o;for(o=1;o<t&&h.contains(arguments[o],i);o++);o===t&&r.push(i)}}return r},h.difference=g(function(n,r){return r=M(r,!0,!0),h.filter(n,function(n){return!h.contains(r,n)})}),h.unzip=function(n){for(var r=n&&h.max(n,A).length||0,t=Array(r),e=0;e<r;e++)t[e]=h.pluck(n,e);return t},h.zip=g(h.unzip),h.object=function(n,r){for(var t={},e=0,u=A(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t};var F=function(i){return function(n,r,t){r=d(r,t);for(var e=A(n),u=0<i?0:e-1;0<=u&&u<e;u+=i)if(r(n[u],u,n))return u;return-1}};h.findIndex=F(1),h.findLastIndex=F(-1),h.sortedIndex=function(n,r,t,e){for(var u=(t=d(t,e,1))(r),i=0,o=A(n);i<o;){var a=Math.floor((i+o)/2);t(n[a])<u?i=a+1:o=a}return i};var E=function(i,o,a){return function(n,r,t){var e=0,u=A(n);if("number"==typeof t)0<i?e=0<=t?t:Math.max(t+u,e):u=0<=t?Math.min(t+1,u):t+u+1;else if(a&&t&&u)return n[t=a(n,r)]===r?t:-1;if(r!=r)return 0<=(t=o(c.call(n,e,u),h.isNaN))?t+e:-1;for(t=0<i?e:u-1;0<=t&&t<u;t+=i)if(n[t]===r)return t;return-1}};h.indexOf=E(1,h.findIndex,h.sortedIndex),h.lastIndexOf=E(-1,h.findLastIndex),h.range=function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),i=0;i<e;i++,n+=t)u[i]=n;return u},h.chunk=function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(c.call(n,e,e+=r));return t};var N=function(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var i=m(n.prototype),o=n.apply(i,u);return h.isObject(o)?o:i};h.bind=g(function(r,t,e){if(!h.isFunction(r))throw new TypeError("Bind must be called on a function");var u=g(function(n){return N(r,u,t,this,e.concat(n))});return u}),h.partial=g(function(u,i){var o=h.partial.placeholder,a=function(){for(var n=0,r=i.length,t=Array(r),e=0;e<r;e++)t[e]=i[e]===o?arguments[n++]:i[e];for(;n<arguments.length;)t.push(arguments[n++]);return N(u,a,this,this,t)};return a}),(h.partial.placeholder=h).bindAll=g(function(n,r){var t=(r=M(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=h.bind(n[e],n)}}),h.memoize=function(e,u){var i=function(n){var r=i.cache,t=""+(u?u.apply(this,arguments):n);return j(r,t)||(r[t]=e.apply(this,arguments)),r[t]};return i.cache={},i},h.delay=g(function(n,r,t){return setTimeout(function(){return n.apply(null,t)},r)}),h.defer=h.partial(h.delay,h,1),h.throttle=function(t,e,u){var i,o,a,c,l=0;u||(u={});var f=function(){l=!1===u.leading?0:h.now(),i=null,c=t.apply(o,a),i||(o=a=null)},n=function(){var n=h.now();l||!1!==u.leading||(l=n);var r=e-(n-l);return o=this,a=arguments,r<=0||e<r?(i&&(clearTimeout(i),i=null),l=n,c=t.apply(o,a),i||(o=a=null)):i||!1===u.trailing||(i=setTimeout(f,r)),c};return n.cancel=function(){clearTimeout(i),l=0,i=o=a=null},n},h.debounce=function(t,e,u){var i,o,a=function(n,r){i=null,r&&(o=t.apply(n,r))},n=g(function(n){if(i&&clearTimeout(i),u){var r=!i;i=setTimeout(a,e),r&&(o=t.apply(this,n))}else i=h.delay(a,e,this,n);return o});return n.cancel=function(){clearTimeout(i),i=null},n},h.wrap=function(n,r){return h.partial(r,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},h.after=function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},h.before=function(n,r){var t;return function(){return 0<--n&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}},h.once=h.partial(h.before,2),h.restArguments=g;var I=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(n,r){var t=T.length,e=n.constructor,u=h.isFunction(e)&&e.prototype||o,i="constructor";for(j(n,i)&&!h.contains(r,i)&&r.push(i);t--;)(i=T[t])in n&&n[i]!==u[i]&&!h.contains(r,i)&&r.push(i)};h.keys=function(n){if(!h.isObject(n))return[];if(a)return a(n);var r=[];for(var t in n)j(n,t)&&r.push(t);return I&&B(n,r),r},h.allKeys=function(n){if(!h.isObject(n))return[];var r=[];for(var t in n)r.push(t);return I&&B(n,r),r},h.values=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e},h.mapObject=function(n,r,t){r=d(r,t);for(var e=h.keys(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=r(n[a],a,n)}return i},h.pairs=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},h.invert=function(n){for(var r={},t=h.keys(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r},h.functions=h.methods=function(n){var r=[];for(var t in n)h.isFunction(n[t])&&r.push(t);return r.sort()};var R=function(c,l){return function(n){var r=arguments.length;if(l&&(n=Object(n)),r<2||null==n)return n;for(var t=1;t<r;t++)for(var e=arguments[t],u=c(e),i=u.length,o=0;o<i;o++){var a=u[o];l&&void 0!==n[a]||(n[a]=e[a])}return n}};h.extend=R(h.allKeys),h.extendOwn=h.assign=R(h.keys),h.findKey=function(n,r,t){r=d(r,t);for(var e,u=h.keys(n),i=0,o=u.length;i<o;i++)if(r(n[e=u[i]],e,n))return e};var q,K,z=function(n,r,t){return r in t};h.pick=g(function(n,r){var t={},e=r[0];if(null==n)return t;h.isFunction(e)?(1<r.length&&(e=y(e,r[1])),r=h.allKeys(n)):(e=z,r=M(r,!1,!1),n=Object(n));for(var u=0,i=r.length;u<i;u++){var o=r[u],a=n[o];e(a,o,n)&&(t[o]=a)}return t}),h.omit=g(function(n,t){var r,e=t[0];return h.isFunction(e)?(e=h.negate(e),1<t.length&&(r=t[1])):(t=h.map(M(t,!1,!1),String),e=function(n,r){return!h.contains(t,r)}),h.pick(n,e,r)}),h.defaults=R(h.allKeys,!0),h.create=function(n,r){var t=m(n);return r&&h.extendOwn(t,r),t},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,r){return r(n),n},h.isMatch=function(n,r){var t=h.keys(r),e=t.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=t[i];if(r[o]!==u[o]||!(o in u))return!1}return!0},q=function(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var u=typeof n;return("function"===u||"object"===u||"object"==typeof r)&&K(n,r,t,e)},K=function(n,r,t,e){n instanceof h&&(n=n._wrapped),r instanceof h&&(r=r._wrapped);var u=p.call(n);if(u!==p.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+r;case"[object Number]":return+n!=+n?+r!=+r:0==+n?1/+n==1/r:+n==+r;case"[object Date]":case"[object Boolean]":return+n==+r;case"[object Symbol]":return s.valueOf.call(n)===s.valueOf.call(r)}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof r)return!1;var o=n.constructor,a=r.constructor;if(o!==a&&!(h.isFunction(o)&&o instanceof o&&h.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in r)return!1}e=e||[];for(var c=(t=t||[]).length;c--;)if(t[c]===n)return e[c]===r;if(t.push(n),e.push(r),i){if((c=n.length)!==r.length)return!1;for(;c--;)if(!q(n[c],r[c],t,e))return!1}else{var l,f=h.keys(n);if(c=f.length,h.keys(r).length!==c)return!1;for(;c--;)if(l=f[c],!j(r,l)||!q(n[l],r[l],t,e))return!1}return t.pop(),e.pop(),!0},h.isEqual=function(n,r){return q(n,r)},h.isEmpty=function(n){return null==n||(w(n)&&(h.isArray(n)||h.isString(n)||h.isArguments(n))?0===n.length:0===h.keys(n).length)},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=t||function(n){return"[object Array]"===p.call(n)},h.isObject=function(n){var r=typeof n;return"function"===r||"object"===r&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(r){h["is"+r]=function(n){return p.call(n)==="[object "+r+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return j(n,"callee")});var D=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof D&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return!h.isSymbol(n)&&isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&isNaN(n)},h.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"===p.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return void 0===n},h.has=function(n,r){if(!h.isArray(r))return j(n,r);for(var t=r.length,e=0;e<t;e++){var u=r[e];if(null==n||!i.call(n,u))return!1;n=n[u]}return!!t},h.noConflict=function(){return n._=r,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(r){return h.isArray(r)?function(n){return x(n,r)}:b(r)},h.propertyOf=function(r){return null==r?function(){}:function(n){return h.isArray(n)?x(r,n):r[n]}},h.matcher=h.matches=function(r){return r=h.extendOwn({},r),function(n){return h.isMatch(n,r)}},h.times=function(n,r,t){var e=Array(Math.max(0,n));r=y(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},h.random=function(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=h.invert(L),W=function(r){var t=function(n){return r[n]},n="(?:"+h.keys(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u<e;u++){var i=null==n?void 0:n[r[u]];void 0===i&&(i=t,u=e),n=h.isFunction(i)?i.call(n):i}return n};var C=0;h.uniqueId=function(n){var r=++C+"";return n?n+r:r},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,$=function(n){return"\\"+U[n]};h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}var u=function(n){return t.call(this,n,h)},c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};var G=function(n,r){return n._chain?h(r).chain():r};h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}();
+/*!
+ * Chart.js v2.9.3
+ * https://www.chartjs.org
+ * (c) 2019 Chart.js Contributors
+ * Released under the MIT License
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:n[t].channels}),Object.defineProperty(o[t],"labels",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=y);var _,k=y,w={noop:function(){},uid:(_=0,function(){return _++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return w.valueOrDefault(w.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(w.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(w.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!w.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(w.isArray(t))return t.map(w.clone);if(w.isObject(t)){for(var e={},n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=w.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){var a=e[t],r=n[t];w.isObject(a)&&w.isObject(r)?w.merge(a,r,i):e[t]=w.clone(r)},_mergerIf:function(t,e,n){var i=e[t],a=n[t];w.isObject(i)&&w.isObject(a)?w.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=w.clone(a))},merge:function(t,e,n){var i,a,r,o,s,l=w.isArray(e)?e:[e],u=l.length;if(!w.isObject(t))return t;for(i=(n=n||{}).merger||w._merger,a=0;a<u;++a)if(e=l[a],w.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return w.merge(t,e,{merger:w._mergerIf})},extend:Object.assign||function(t){return w.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=w.inherits,t&&w.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},M=w;w.callCallback=w.callback,w.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},w.getValueOrDefault=w.valueOrDefault,w.getValueAtIndexOrDefault=w.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},C={effects:S};M.easingEffects=S;var P=Math.PI,A=P/180,D=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-P,-T),t.arc(u,l,o,-T,0),t.arc(u,d,o,0,T),t.arc(s,d,o,T,P)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-T,T),t.arc(s,l,o,T,P+T)):l<d?(t.arc(s,l,o,-P,0),t.arc(s,d,o,0,P)):t.arc(s,l,o,-P,P),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*A;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,D),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+I)*u,l=Math.sin(h+I)*u,t.arc(i-s,a-l,d,h-P,h-T),t.arc(i+l,a-s,d,h-T,h),t.arc(i+s,a+l,d,h,h+T),t.arc(i-l,a+s,d,h+T,h+P),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=I;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=I;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=I,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},O=L;M.clear=L.clear,M.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var R={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var z=R,N=M.valueOrDefault;var B={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return M.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=z.global,n=N(t.fontSize,e.defaultFontSize),i={family:N(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(N(t.lineHeight,e.defaultLineHeight),n),size:n,style:N(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&M.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},E={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},W=E;M.log10=E.log10;var V=M,H=C,j=O,q=B,U=W,Y={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};V.easing=H,V.canvas=j,V.options=q,V.math=U,V.rtl=Y;var G=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=V.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if("string"===d){if((h=k(l)).valid&&(c=k(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(V.isFinite(l)&&V.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=V.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return V.isNumber(this._model.x)&&V.isNumber(this._model.y)}}),G.extend=V.inherits;var X=G,K=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=K;Object.defineProperty(K.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(K.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),z._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var $={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=V.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=V.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),V.callback(t.render,[e,t],e),V.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},J=V.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(Q.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};V.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&tt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Q.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return V.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=V.merge({},[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&V._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:V.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=J([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},V.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=J([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=J([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){V.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=J([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=J([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=J([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),et.extend=V.inherits;var nt=et,it=2*Math.PI;function at(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+it,at(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=it,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+it,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+it),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&at(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}z._set("global",{elements:{arc:{backgroundColor:z.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ot=X.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=V.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=it;for(;a>s;)a-=it;for(;a<o;)a+=it;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/it)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+it,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%it}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&rt(e,n,a),e.restore()}}),st=V.valueOrDefault,lt=z.global.defaultColor;z._set("global",{elements:{line:{tension:.4,backgroundColor:lt,borderWidth:3,borderColor:lt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ut=X.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=z.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=V.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=st(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=st(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?V.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):V.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),dt=V.valueOrDefault,ht=z.global.defaultColor;function ct(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}z._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ft=X.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ct,inXRange:ct,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=z.global,u=l.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=dt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,V.canvas.drawPoint(n,i,r,o,s,a))}}),gt=z.global.defaultColor;function pt(t){return t&&void 0!==t.width}function mt(t){var e,n,i,a,r;return pt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function vt(t,e,n){return t===e?n:t===n?e:t}function bt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=vt(e,"left","right")):t.base<t.y&&(e=vt(e,"bottom","top")),n[e]=!0,n):n}(t);return V.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&mt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}z._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var yt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,i=e.bottom-e.top,a=bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return pt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},kt=ot,wt=ut,Mt=ft,St=yt;_t.Arc=kt,_t.Line=wt,_t.Point=Mt,_t.Rectangle=St;var Ct=V._deprecated,Pt=V.valueOrDefault;function At(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}z._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),z._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Ct("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ct("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ct("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ct("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ct("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},V.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):At(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(Pt(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(V.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}V.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},nt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=Pt(n.barPercentage,e.barPercentage),e.barThickness=Pt(n.barThickness,e.barThickness),e.categoryPercentage=Pt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Pt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Pt(i.minBarLength,e.minBarLength),e}}),Tt=V.valueOrDefault,It=V.options.resolve;z._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ft=nt.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;V.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Tt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Tt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Tt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=nt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=V.extend({},s)),s.radius=It([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=V.valueOrDefault,Ot=Math.PI,Rt=2*Ot,zt=Ot/2;z._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-zt,circumference:Rt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Nt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<Rt){var b=l.rotation%Rt,x=(b+=b>=Ot?-Rt:b<-Ot?Rt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Rt,S=b<=zt&&x>=zt||x>=Rt+zt,C=b<=-zt&&x>=-zt||x>=Ot+zt,P=b===-Ot||x>=Ot?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Rt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:V.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return V.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});z._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),z._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Bt=Dt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Et=V.valueOrDefault,Wt=V.options.resolve,Vt=V.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function jt(t,e,n){var i=n/2,a=Ht(t,i),r=Ht(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function qt(t){var e,n,i,a;return V.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}z._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ut=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Et(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Et(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=nt.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Et(n.spanGaps,a.spanGaps),o.tension=Et(n.lineTension,r.tension),o.steppedLine=Wt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=qt(Et(n.clip,jt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)V.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=V.splineCurve(V.previousItem(l,t)._model,n,V.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Vt(n,s)&&(t>0&&Vt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Vt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,V.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),V.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Et(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Et(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Et(n.hoverBorderWidth,n.borderWidth),e.radius=Et(n.hoverRadius,n.radius)}}),Yt=V.options.resolve;z._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Gt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:V.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Yt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});z._set("pie",V.clone(z.doughnut)),z._set("pie",{cutoutPercentage:0});var Xt=Nt,Kt=V.valueOrDefault;z._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:V.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Kt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=nt.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Kt(e.spanGaps,n.spanGaps),i.tension=Kt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=V.splineCurve(V.previousItem(o,t,!0)._model,n,V.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth),e.radius=Kt(n.hoverRadius,n.radius)}});z._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),z._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:Dt,bubble:Ft,doughnut:Nt,horizontalBar:Bt,line:Ut,polarArea:Gt,pie:Xt,radar:Zt,scatter:Ut};function Jt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function Qt(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function te(t,e){var n=[];return Qt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ee(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return Qt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ne(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ie(t,e,n){var i=Jt(e,t);n.axis=n.axis||"x";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var ae={modes:{single:function(t,e){var n=Jt(e,t),i=[];return Qt(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ie,index:ie,dataset:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},re=V.extend;function oe(t,e){return V.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),ue(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&he(u,e,n)||l}function ce(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}z._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var fe,ge={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=V.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=se(oe(e,"left"),!0),i=se(oe(e,"right")),a=se(oe(e,"top"),!0),r=se(oe(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:oe(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=re({maxPadding:re({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),he(l,h,d),he(u,h,d)&&he(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),ce(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ce(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},V.each(s.chartArea,(function(e){var n=e.box;re(n,t.chartArea),n.update(h.w,h.h)}))}}},pe=(fe=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Ce("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,V.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[me]||(t[me]={}),i=n.renderProxy=function(t){t.animationName===xe&&e()};V.each(ye,(function(e){Me(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(be)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function De(t){var e=t[me]||{},n=e.resizer;delete e.resizer,function(t){var e=t[me]||{},n=e.renderProxy;n&&(V.each(ye,(function(e){Se(t,e,n)})),delete e.renderProxy),t.classList.remove(be)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Te={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[me]||(t[me]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,pe)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[me]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ke(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ke(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[me]){var n=e[me].initial;["height","width"].forEach((function(t){var i=n[t];V.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),V.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[me]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[me]||(n[me]={});Me(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=_e[t.type]||t.type,i=V.getRelativePosition(t,e);return Ce(n,e,i.x,i.y,t)}(e,t))})}else Ae(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[me]||{}).proxies||{})[t.id+"_"+e];a&&Se(i,e,a)}else De(i)}};V.addEvent=Me,V.removeEvent=Se;var Ie=Te._enabled?Te:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Fe=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);z._set("global",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=V.clone(z.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Oe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=V.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?V.merge({},[z.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=V.extend(this.defaults[t],e))},addScalesToLayout:function(t){V.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ge.addBox(t,e)}))}},Re=V.valueOrDefault,ze=V.rtl.getRtlAdapter;z._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:V.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:V.noop,beforeBody:V.noop,beforeLabel:V.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),V.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:V.noop,afterBody:V.noop,beforeFooter:V.noop,footer:V.noop,afterFooter:V.noop}}});var Ne={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=V.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Be(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ee(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function We(t){var e=z.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Be(o,Ee(i)),o=Be(o,Ee(a)),o=Be(o,Ee(r))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ee(n)),r=Be(r,Ee(i)),r=Be(r,Ee(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),V.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=V.fontString(u,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(d,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,V.each(r,(function(t){V.each(t.before,f),V.each(t.lines,f),V.each(t.after,f)})),c=0,n.font=V.fontString(h,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?Ve(e,"left"):0,b=ze(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,y),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,V.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}V.each(i.after,x)}m=0,V.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=V.valueOrDefault;function Ge(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ye(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?V.merge(e[t][a],[Oe.getScaleDefaults(r),o]):V.merge(e[t][a],o)}else V._merger(t,e,n,i)}})}function Xe(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=V.merge(a,[Oe.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ke(t){var e=t.options;V.each(t.scales,(function(e){ge.removeBox(t,e)})),e=Xe(z.global,z[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function $e(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qe=function(t,e){return this.construct(t,e),this};V.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(z.global,z[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);$e(i.position)!==$e(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;V.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ke(i),Le._invalidate(i),!1!==Le.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&V.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,"afterUpdate"),i._layers.sort(Je("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,"beforeLayout")&&(ge.update(this,this.width,this.height),t._layers=[],V.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,"afterScaleUpdate"),Le.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Le.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Le.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ye(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,"beforeRender")){var r=function(t){Le.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new Z({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=V.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});$.addAnimation(e,o,i,a)}else e.draw(),r(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),V.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Je("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),V.canvas.clear(n),Fe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,"destroy"),delete Qe.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};V.each(t.options.events,(function(i){Fe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Fe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,V.each(e,(function(e,n){Fe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),V.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!V.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Qe.instances={};var tn=Qe;Qe.Controller=Qe,Qe.types={},V.configMerge=Xe,V.scaleMerge=Ge;function en(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function nn(t){this.options=t||{}}V.extend(nn.prototype,{formats:en,parse:en,format:en,add:en,diff:en,startOf:en,endOf:en,_create:function(t){return t}}),nn.override=function(t){V.extend(nn.prototype,t)};var an={_date:nn},rn={formatters:{values:function(t){return V.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=V.isArray,sn=V.isNullOrUndef,ln=V.valueOrDefault,un=V.valueAtIndexOrDefault;function dn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function hn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[];for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,sn(s)||on(s)){if(on(s))for(r=0,o=s.length;r<o;++r)g=s[r],sn(g)||on(g)||(c=V.measureText(t,d.data,d.gc,c,g),f+=h)}else c=V.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2)}function _(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){V.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(Math.max.apply(null,b)),m=x.indexOf(Math.max.apply(null,x)),{first:_(0),last:_(v-1),widest:_(p),highest:_(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function fn(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function gn(t,e){return V.extend(V.options._parseFont({fontFamily:ln(e.fontFamily,t.fontFamily),fontSize:ln(e.fontSize,t.fontSize),fontStyle:ln(e.fontStyle,t.fontStyle),lineHeight:ln(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,z.global.defaultFontColor])})}function pn(t){var e=gn(t,t.minor);return{minor:e,major:t.major.enabled?gn(t,t.major):e}}function mn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function vn(t,e,n,i){var a,r,o,s,l=ln(n,0),u=Math.min(ln(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}z._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:rn.formatters.values,minor:{},major:{}}});var bn=X.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){V.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=V.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){V.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){V.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){V.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){V.callback(this.options.beforeDataLimits,[this])},determineDataLimits:V.noop,afterDataLimits:function(){V.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){V.callback(this.options.beforeBuildTicks,[this])},buildTicks:V.noop,afterBuildTicks:function(t){var e=this;return on(t)&&t.length?V.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=V.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){V.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){V.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){V.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-u.padding-fn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+fn(r)),u?s&&(e.height=cn(o)+fn(r)):e.height=t.maxHeight,a.display&&s){var d=pn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=V.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(sn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=hn(t.ctx,pn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return on(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:V.noop,getPixelForValue:V.noop,getValueForPixel:V.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),mn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=V.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)vn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,vn(t,i,V.isNullOrUndef(a)?0:d-a,d),vn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),mn(t)}return vn(t,i),mn(t)},_tickSize:function(){var t=this.options.ticks,e=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=cn(_),A=[],D=_.drawBorder?un(_.lineWidth,0,0):0,T=D/2,I=V._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},sn(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=un(_.lineWidth,n,1),p=un(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=dn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=pn(g),y=g.padding,_=cn(f.gridLines),k=-V.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,sn(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=on(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=V._alignPixel,h=n.drawBorder?un(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=un(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=un(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,on(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=ln(i.fontColor,z.global.defaultFontColor),s=V.options._parseFont(i),l=V.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});bn.prototype._draw=bn.prototype.draw;var xn=bn,yn=V.isNullOrUndef,_n=xn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;xn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),kn={position:"bottom"};_n._defaults=kn;var wn=V.noop,Mn=V.isNullOrUndef;var Sn=xn.extend({getRightValue:function(t){return"string"==typeof t?+t:xn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&Mn(d)&&Mn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(r*p/u/l)*l),s||Mn(c)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Mn(d)&&V.almostWhole(d/p,p/1e3)&&(i=d),!Mn(h)&&V.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=V.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Mn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Mn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=V.max(a),t.min=V.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),xn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;xn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Cn={position:"left",ticks:{callback:rn.formatters.linear}};function Pn(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function An(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Dn=Sn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?Pn(a,u,e,n):An(a,e,n);V.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(i)),a.max=Math.max(a.max,V.max(i))})),a.min=V.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=V.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=V.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Tn=Cn;Dn._defaults=Tn;var In=V.valueOrDefault,Fn=V.math.log10;var Ln={position:"left",ticks:{callback:rn.formatters.logarithmic}};function On(t,e){return V.isFinite(t)&&t>=0?t:e}var Rn=xn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}V.each(f,(function(t){if(t.length>0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=V.isFinite(o.min)?o.min:null,o.max=V.isFinite(o.max)?o.max:null,o.minNotZero=V.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=On(e.min,t.min),t.max=On(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Fn(t.min))-1),t.max=Math.pow(10,Math.floor(Fn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Fn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Fn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Fn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Fn(e.min)))),o=Math.floor(Fn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Fn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Fn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=In(t.max,r);return a.push(u),a}(i,t);t.max=V.max(a),t.min=V.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),xn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Fn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;xn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,z.global.defaultFontSize)/t._length),t._startValue=Fn(e),t._valueOffset=n,t._valueRange=(Fn(t.max)-Fn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Fn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),zn=Ln;Rn._defaults=zn;var Nn=V.valueOrDefault,Bn=V.valueAtIndexOrDefault,En=V.options.resolve,Wn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,z.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Un(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Gn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=V.isArray(u)?{w:V.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=V.toDegrees(h)%360,f=Hn(c,i.x,n.w,0,180),g=Hn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Yn(a),r=Yn(r),o=Yn(o),s=Yn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,o.lineWidth),u=Nn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Bn(i.fontColor,s,z.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=V.toDegrees(h);e.textAlign=jn(c),Un(c,t._pointLabelSizes[s],u),qn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,i-1),u=Bn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(En([s.borderDash,o.borderDash,[]])),a.lineDashOffset=En([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=Nn(n.fontColor,z.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop}),Xn=Wn;Gn._defaults=Xn;var Kn=V._deprecated,Zn=V.options.resolve,$n=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,ti={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ei=Object.keys(ti);function ni(t,e){return t-e}function ii(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function oi(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function si(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=oi(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function li(t,e,n,i){var a,r,o,s=ei.length;for(a=ei.indexOf(t);a<s-1;++a)if(o=(r=ti[ei[a]]).steps?r.steps:Qn,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ei[a];return ei[s-1]}function ui(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var di=xn.extend({initialize:function(){this.mergeTicksOptions(),xn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new an._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),xn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),xn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Qn,f=Jn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(si(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,V.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=si(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ni):g.sort(ni),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=si(s,ii(d))||c,f=si(s,ai(d))||f,c=c===Qn?+u.startOf(Date.now(),h):c,f=f===Jn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||li(s.minUnit,e,n,i),u=Zn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=si(i,ii(o))||a,r=si(i,ai(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?li(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ei.length-1;r>=ei.indexOf(n);r--)if(o=ei[r],ti[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ei[n?ei.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ei.indexOf(t)+1,n=ei.length;e<n;++e)if(ti[ei[e]].common)return ei[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=ri(t,"time",e[0],"pos"),s=1===e.length?1-r:(ri(t,"time",e[1],"pos")-r)/2,o=ri(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-ri(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),ui(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return V.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(oi(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(oi(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=Zn([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=ri(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=si(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=ri(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=V.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=$n(e.fontSize,z.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,ui(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),hi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};di._defaults=hi;var ci={category:_n,linear:Dn,logarithmic:Rn,radialLinear:Gn,time:di},fi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};an._date.override("function"==typeof t?{_id:"moment",formats:function(){return fi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),z._set("global",{plugins:{filler:{propagate:!0}}});var gi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return V.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function pi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function mi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(V.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function vi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function bi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),gi[n](t))}function xi(t){return t&&!t.skip}function yi(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)V.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _i(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=xi(u),c=xi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(yi(t,m,v,b,x),b=x=0,m=[],v=[]));yi(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var ki={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof _t.Line&&(r={visible:t.isDatasetVisible(i),fill:pi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=vi(l,i,s),r.boundary=mi(r),r.mapper=bi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||z.global.defaultColor,o&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),_i(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},wi=V.rtl.getRtlAdapter,Mi=V.noop,Si=V.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Pi=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Mi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Mi,beforeSetDimensions:Mi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Mi,beforeBuildLabels:Mi,buildLabels:function(){var t=this,e=t.options.labels||{},n=V.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Mi,beforeFit:Mi,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=V.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=z.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=wi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Si(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Si(i.lineWidth,r.borderWidth);if(c.fillStyle=Si(i.fillStyle,a),c.lineCap=Si(i.lineCap,r.borderCapStyle),c.lineDashOffset=Si(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Si(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Si(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Si(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;V.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Ai(t,e){var n=new Pi({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Di={id:"legend",_element:Pi,beforeInit:function(t){var e=t.options.legend;e&&Ai(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,z.global.legend),n?(ge.configure(t,n,e),n.options=e):Ai(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ti=V.noop;z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ti,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ti,beforeSetDimensions:Ti,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ti,beforeBuildLabels:Ti,buildLabels:Ti,afterBuildLabels:Ti,beforeFit:Ti,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ti,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,z.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Fi(t,e){var n=new Ii({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.titleBlock=n}var Li={},Oi=ki,Ri=Di,zi={id:"title",_element:Ii,beforeInit:function(t){var e=t.options.title;e&&Fi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,z.global.title),n?(ge.configure(t,n,e),n.options=e):Fi(t,e)):n&&(ge.removeBox(t,n),delete t.titleBlock)}};for(var Ni in Li.filler=Oi,Li.legend=Ri,Li.title=zi,tn.helpers=V,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=V._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}V.where=function(t,e){if(V.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return V.each(t,(function(t){e(t)&&n.push(t)})),n},V.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)<n},V.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(V.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},V.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==V.isArray(u))h=V.measureText(t,a,r,h,u);else if(V.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||V.isArray(d)||(h=V.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},V.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=k?function(t){return t instanceof CanvasGradient&&(t=z.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=Z,tn.animationService=$,tn.controllers=$t,tn.DatasetController=nt,tn.defaults=z,tn.Element=X,tn.elements=_t,tn.Interaction=ae,tn.layouts=ge,tn.platform=Fe,tn.plugins=Le,tn.Scale=xn,tn.scaleService=Oe,tn.Ticks=rn,tn.Tooltip=Ue,tn.helpers.each(ci,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Ni)&&tn.plugins.register(Li[Ni]);tn.platform.initialize();var Bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=Li.legend._element,tn.Title=Li.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=Sn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bi}));
+
+/*!
+ * Copyright 2015 Drifty Co.
+ * http://drifty.com/
+ *
+ * Ionic, v1.3.5
+ * A powerful HTML5 mobile app framework.
+ * http://ionicframework.com/
+ *
+ * By @maxlynch, @benjsperry, @adamdbradley <3
+ *
+ * Licensed under the MIT license. Please see LICENSE for more information.
+ *
+ */
+
+!function(){function e(e,t,n){t!==!1?X.addEventListener(e,J[e],n):X.removeEventListener(e,J[e])}function t(e){var t=w(e.target),i=T(t);if(ionic.tap.requiresNativeClick(i)||$)return!1;var r=ionic.tap.pointerCoord(e);n("click",i,r.x,r.y),h(i)}function n(e,t,n,i){var r=document.createEvent("MouseEvents");r.initMouseEvent(e,!0,!0,window,1,0,0,n,i,!1,!1,!1,!1,0,null),r.isIonicTap=!0,t.dispatchEvent(r)}function i(e){return"submit"==e.target.type&&0===e.detail?null:ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(e.target)||!e.isIonicTap&&!ionic.tap.requiresNativeClick(e.target)?(e.stopPropagation(),ionic.tap.isLabelWithTextInput(e.target)||e.preventDefault(),!1):void 0}function r(t){return t.isIonicTap||p(t)?null:B?(t.stopPropagation(),ionic.Platform.isEdge()||ionic.tap.isTextInput(t.target)&&K===t.target||b(t.target.tagName)||t.target.isContentEditable||ionic.tap.isVideo(t.target)||t.preventDefault(),!1):($=!1,q=ionic.tap.pointerCoord(t),e("mousemove"),void ionic.activator.start(t))}function a(n){return B?(n.stopPropagation(),n.preventDefault(),!1):p(n)||b(n.target.tagName)?!1:(_(n)||t(n),e("mousemove",!1),ionic.activator.end(),void($=!1))}function o(t){return _(t)?(e("mousemove",!1),ionic.activator.end(),$=!0,!1):void 0}function s(t){if(!p(t)&&($=!1,u(),q=ionic.tap.pointerCoord(t),e(j),ionic.activator.start(t),ionic.Platform.isIOS()&&ionic.tap.isLabelWithTextInput(t.target))){var n=T(w(t.target));n!==F&&t.preventDefault()}}function l(e){p(e)||(u(),_(e)||(t(e),b(e.target.tagName)&&e.preventDefault()),K=e.target,d())}function c(t){return _(t)?($=!0,e(j,!1),ionic.activator.end(),!1):void 0}function d(){e(j,!1),ionic.activator.end(),$=!1}function u(){B=!0,clearTimeout(W),W=setTimeout(function(){B=!1},600)}function p(e){return e.isTapHandled?!0:(e.isTapHandled=!0,ionic.tap.isElementTapDisabled(e.target)?!0:"SELECT"==e.target.tagName?!0:ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(e.target)?(e.preventDefault(),!0):void 0)}function h(e){U=null;var t=!1;"SELECT"==e.tagName?(n("mousedown",e,0,0),e.focus&&e.focus(),t=!0):v()===e?t=!0:/^(input|textarea|ion-label)$/i.test(e.tagName)||e.isContentEditable?(t=!0,e.focus&&e.focus(),e.value=e.value,B&&(U=e)):f(),t&&(v(e),ionic.trigger("ionic.focusin",{target:e},!0))}function f(){var e=v();e&&(/^(input|textarea|select)$/i.test(e.tagName)||e.isContentEditable)&&e.blur(),v(null)}function m(e){B&&ionic.tap.isTextInput(v())&&ionic.tap.isTextInput(U)&&U!==e.target&&(U.focus(),U=null),ionic.scroll.isScrolling=!1}function g(){v(null)}function v(e){return arguments.length&&(F=e),F||document.activeElement}function _(e){if(!e||1!==e.target.nodeType||!q||0===q.x&&0===q.y)return!1;var t=ionic.tap.pointerCoord(e),n=!(!e.target.classList||!e.target.classList.contains||"function"!=typeof e.target.classList.contains),i=n&&e.target.classList.contains("button")?Q:Z;return Math.abs(q.x-t.x)>i||Math.abs(q.y-t.y)>i}function w(e,t){for(var n=e,i=0;6>i&&n;i++){if("LABEL"===n.tagName)return n;n=n.parentElement}return t!==!1?e:void 0}function T(e){if(e&&"LABEL"===e.tagName){if(e.control)return e.control;if(e.querySelector){var t=e.querySelector("input,textarea,select");if(t)return t}}return e}function b(e){return/^(select|option)$/i.test(e)}function S(){ionic.keyboard.isInitialized||(V()?(window.addEventListener("native.keyboardshow",pe),window.addEventListener("native.keyboardhide",x)):document.body.addEventListener("focusout",x),document.body.addEventListener("ionic.focusin",ue),document.body.addEventListener("focusin",ue),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerDown",S):document.removeEventListener("touchstart",S),ionic.keyboard.isInitialized=!0)}function y(e){clearTimeout(re),(!ionic.keyboard.isOpen||ionic.keyboard.isClosing)&&(ionic.keyboard.isOpening=!0,ionic.keyboard.isClosing=!1),ionic.keyboard.height=e.keyboardHeight,le?L(O,!0):L(I,!0)}function E(e){return clearTimeout(re),e.target&&!e.target.readOnly&&ionic.tap.isKeyboardElement(e.target)&&(ne=ionic.DomUtil.getParentWithClass(e.target,de))?(ee=e.target,ne.classList.contains("overflow-scroll")||(document.body.scrollTop=0,ne.scrollTop=0,ionic.requestAnimationFrame(function(){document.body.scrollTop=0,ne.scrollTop=0}),window.navigator.msPointerEnabled?document.addEventListener("MSPointerMove",C,!1):document.addEventListener("touchmove",C,!1)),(!ionic.keyboard.isOpen||ionic.keyboard.isClosing)&&(ionic.keyboard.isOpening=!0,ionic.keyboard.isClosing=!1),document.addEventListener("keydown",M,!1),void(ionic.keyboard.isOpen||V()?ionic.keyboard.isOpen&&I():L(I,!0))):(ee&&(te=ee),void(ee=null))}function x(){clearTimeout(re),(ionic.keyboard.isOpen||ionic.keyboard.isOpening)&&(ionic.keyboard.isClosing=!0,ionic.keyboard.isOpening=!1),re=setTimeout(function(){ionic.requestAnimationFrame(function(){le?L(function(){O(),P()},!1):L(P,!1)})},50)}function D(){ionic.keyboard.isLandscape=!ionic.keyboard.isLandscape,ionic.Platform.isIOS()&&O(),ionic.Platform.isAndroid()&&(ionic.keyboard.isOpen&&V()?le=!0:L(O,!1))}function M(e){ionic.scroll.isScrolling&&C(e)}function C(e){"TEXTAREA"!==e.target.tagName&&e.preventDefault()}function L(e,t){clearInterval(ie);var n,i=0,r=G(),a=r;return n=ionic.Platform.isAndroid()&&ionic.Platform.version()<4.4?30:ionic.Platform.isAndroid()?10:1,ie=setInterval(function(){a=G(),(!(++i<n)||(N(a)||z(a))&&ionic.keyboard.height)&&(V()||(ionic.keyboard.height=Math.abs(r-window.innerHeight)),ionic.keyboard.isOpen=t,clearInterval(ie),e())},50),n}function P(){clearTimeout(re),ionic.keyboard.isOpen=!1,ionic.keyboard.isClosing=!1,(ee||te)&&ionic.trigger("resetScrollView",{target:ee||te},!0),ionic.requestAnimationFrame(function(){document.body.classList.remove(ce)}),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerMove",C):document.removeEventListener("touchmove",C),document.removeEventListener("keydown",M),ionic.Platform.isAndroid()&&(V()&&cordova.plugins.Keyboard.close(),ee&&ee.blur()),ee=null,te=null}function I(){ionic.keyboard.isOpen=!0,ionic.keyboard.isOpening=!1;var e={keyboardHeight:k(),viewportHeight:ae};if(ee){e.target=ee;var t=ee.getBoundingClientRect();e.elementTop=Math.round(t.top),e.elementBottom=Math.round(t.bottom),e.windowHeight=e.viewportHeight-e.keyboardHeight,e.isElementUnderKeyboard=e.elementBottom>e.windowHeight,ionic.trigger("scrollChildIntoView",e,!0)}return setTimeout(function(){document.body.classList.add(ce)},400),e}function k(){if(ionic.keyboard.height)return ionic.keyboard.height;if(ionic.Platform.isAndroid()){if(ionic.Platform.isFullScreen)return 275;var e=window.innerHeight;return ae>e?ae-e:0}return ionic.Platform.isIOS()?ionic.keyboard.isLandscape?206:ionic.Platform.isWebView()?260:216:275}function N(e){return!!(!ionic.keyboard.isLandscape&&oe&&Math.abs(oe-e)<2)}function z(e){return!!(ionic.keyboard.isLandscape&&se&&Math.abs(se-e)<2)}function O(){le=!1,ae=G(),ionic.keyboard.isLandscape&&!se?se=ae:ionic.keyboard.isLandscape||oe||(oe=ae),ee&&ionic.trigger("resetScrollView",{target:ee},!0),ionic.keyboard.isOpen&&ionic.tap.isTextInput(ee)&&I()}function A(){var e=G();e/window.innerWidth<1&&(ionic.keyboard.isLandscape=!0),ae=e,ionic.keyboard.isLandscape&&!se?se=ae:ionic.keyboard.isLandscape||oe||(oe=ae)}function G(){var e=window.innerHeight;return ionic.Platform.isAndroid()&&ionic.Platform.isFullScreen||!ionic.keyboard.isOpen&&!ionic.keyboard.isOpening||ionic.keyboard.isClosing?e:e+k()}function V(){return!!(window.cordova&&cordova.plugins&&cordova.plugins.Keyboard)}function R(){var e;for(e=0;e<document.head.children.length;e++)if("viewport"==document.head.children[e].name){he=document.head.children[e];break}if(he){var t,n=he.content.toLowerCase().replace(/\s+/g,"").split(",");for(e=0;e<n.length;e++)n[e]&&(t=n[e].split("="),fe[t[0]]=t.length>1?t[1]:"_");H()}}function H(){var e=fe.width,t=fe.height,n=ionic.Platform,i=n.version(),r="device-width",a="device-height",o=ionic.viewport.orientation();delete fe.height,fe.width=r,n.isIPad()?i>7?delete fe.width:n.isWebView()?90==o?fe.height="0":7==i&&(fe.height=a):7>i&&(fe.height="0"):n.isIOS()&&(n.isWebView()?i>7?delete fe.width:7>i?t&&(fe.height="0"):7==i&&(fe.height=a):7>i&&t&&(fe.height="0")),(e!==fe.width||t!==fe.height)&&Y()}function Y(){var e,t=[];for(e in fe)fe[e]&&t.push(e+("_"==fe[e]?"":"="+fe[e]));he.content=t.join(", ")}window.ionic=window.ionic||{},window.ionic.views={},window.ionic.version="1.3.5",function(e){e.DelegateService=function(e){function t(){return!0}if(e.indexOf("$getByHandle")>-1)throw new Error("Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.");return["$log",function(n){function i(e,t){this._instances=e,this.handle=t}function r(){this._instances=[]}function a(e){return function(){var t,i=this.handle,r=arguments,a=0;return this._instances.forEach(function(n){if((!i||i==n.$$delegateHandle)&&n.$$filterFn(n)){a++;var o=n[e].apply(n,r);1===a&&(t=o)}}),!a&&i?n.warn('Delegate for handle "'+i+'" could not find a corresponding element with delegate-handle="'+i+'"! '+e+"() was not called!\nPossible cause: If you are calling "+e+'() immediately, and your element with delegate-handle="'+i+'" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to '+e+"() and try again."):t}}return e.forEach(function(e){i.prototype[e]=a(e)}),r.prototype=i.prototype,r.prototype._registerInstance=function(e,n,i){var r=this._instances;return e.$$delegateHandle=n,e.$$filterFn=i||t,r.push(e),function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}},r.prototype.$getByHandle=function(e){return new i(this._instances,e)},new r}]}}(window.ionic),function(e,t,n){function i(){a=!0;for(var e=0;e<r.length;e++)n.requestAnimationFrame(r[e]);r=[],t.removeEventListener("DOMContentLoaded",i)}var r=[],a="complete"===t.readyState||"interactive"===t.readyState;a||t.addEventListener("DOMContentLoaded",i),e._rAF=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(t){e.setTimeout(t,16)}}();var o=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame;n.DomUtil={requestAnimationFrame:function(t){return e._rAF(t)},cancelAnimationFrame:function(e){o(e)},animationFrameThrottle:function(e){var t,i,r;return function(){t=arguments,r=this,i||(i=!0,n.requestAnimationFrame(function(){e.apply(r,t),i=!1}))}},contains:function(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}},getPositionInParent:function(e){return{left:e.offsetLeft,top:e.offsetTop}},getOffsetTop:function(e){var t=0;if(e.offsetParent){do t+=e.offsetTop,e=e.offsetParent;while(e);return t}},ready:function(e){a?n.requestAnimationFrame(e):r.push(e)},getTextBounds:function(n){if(t.createRange){var i=t.createRange();if(i.selectNodeContents(n),i.getBoundingClientRect){var r=i.getBoundingClientRect();if(r){var a=e.scrollX,o=e.scrollY;return{top:r.top+o,left:r.left+a,right:r.left+a+r.width,bottom:r.top+o+r.height,width:r.width,height:r.height}}}}return null},getChildIndex:function(e,t){if(t)for(var n,i=e.parentNode.children,r=0,a=0,o=i.length;o>r;r++)if(n=i[r],n.nodeName&&n.nodeName.toLowerCase()==t){if(n==e)return a;a++}return Array.prototype.slice.call(e.parentNode.children).indexOf(e)},swapNodes:function(e,t){t.parentNode.insertBefore(e,t)},elementIsDescendant:function(e,t,n){var i=e;do{if(i===t)return!0;i=i.parentNode}while(i&&i!==n);return!1},getParentWithClass:function(e,t,n){for(n=n||10;e.parentNode&&n--;){if(e.parentNode.classList&&e.parentNode.classList.contains(t))return e.parentNode;e=e.parentNode}return null},getParentOrSelfWithClass:function(e,t,n){for(n=n||10;e&&n--;){if(e.classList&&e.classList.contains(t))return e;e=e.parentNode}return null},rectContains:function(e,t,n,i,r,a){return n>e||e>r?!1:i>t||t>a?!1:!0},blurAll:function(){return t.activeElement&&t.activeElement!=t.body?(t.activeElement.blur(),t.activeElement):null},cachedAttr:function(e,t,n){if(e=e&&e.length&&e[0]||e,e&&e.setAttribute){var i="$attr-"+t;return arguments.length>2?e[i]!==n&&(e.setAttribute(t,n),e[i]=n):"undefined"==typeof e[i]&&(e[i]=e.getAttribute(t)),e[i]}},cachedStyles:function(e,t){if(e=e&&e.length&&e[0]||e,e&&e.style)for(var n in t)e["$style-"+n]!==t[n]&&(e.style[n]=e["$style-"+n]=t[n])}},n.requestAnimationFrame=n.DomUtil.requestAnimationFrame,n.cancelAnimationFrame=n.DomUtil.cancelAnimationFrame,n.animationFrameThrottle=n.DomUtil.animationFrameThrottle}(window,document,ionic),function(e){e.CustomEvent=function(){if("function"==typeof window.CustomEvent)return CustomEvent;var e=function(e,t){var n;t=t||{bubbles:!1,cancelable:!1,detail:void 0};try{n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail)}catch(i){n=document.createEvent("Event");for(var r in t)n[r]=t[r];n.initEvent(e,t.bubbles,t.cancelable)}return n};return e.prototype=window.Event.prototype,e}(),e.EventController={VIRTUALIZED_EVENTS:["tap","swipe","swiperight","swipeleft","drag","hold","release"],trigger:function(t,n,i,r){var a=new e.CustomEvent(t,{detail:n,bubbles:!!i,cancelable:!!r});n&&n.target&&n.target.dispatchEvent&&n.target.dispatchEvent(a)||window.dispatchEvent(a)},on:function(t,n,i){for(var r=i||window,a=0,o=this.VIRTUALIZED_EVENTS.length;o>a;a++)if(t==this.VIRTUALIZED_EVENTS[a]){var s=new e.Gesture(i);return s.on(t,n),s}r.addEventListener(t,n)},off:function(e,t,n){n.removeEventListener(e,t)},onGesture:function(t,n,i,r){var a=new e.Gesture(i,r);return a.on(t,n),a},offGesture:function(e,t,n){e&&e.off(t,n)},handlePopState:function(){}},e.on=function(){e.EventController.on.apply(e.EventController,arguments)},e.off=function(){e.EventController.off.apply(e.EventController,arguments)},e.trigger=e.EventController.trigger,e.onGesture=function(){return e.EventController.onGesture.apply(e.EventController.onGesture,arguments)},e.offGesture=function(){return e.EventController.offGesture.apply(e.EventController.offGesture,arguments)}}(window.ionic),function(e){function t(){if(!e.Gestures.READY){e.Gestures.event.determineEventTypes();for(var t in e.Gestures.gestures)e.Gestures.gestures.hasOwnProperty(t)&&e.Gestures.detection.register(e.Gestures.gestures[t]);e.Gestures.event.onTouch(e.Gestures.DOCUMENT,e.Gestures.EVENT_MOVE,e.Gestures.detection.detect),e.Gestures.event.onTouch(e.Gestures.DOCUMENT,e.Gestures.EVENT_END,e.Gestures.detection.detect),e.Gestures.READY=!0}}e.Gesture=function(t,n){return new e.Gestures.Instance(t,n||{})},e.Gestures={},e.Gestures.defaults={stop_browser_behavior:"disable-user-behavior"},e.Gestures.HAS_POINTEREVENTS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,e.Gestures.HAS_TOUCHEVENTS="ontouchstart"in window,e.Gestures.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,e.Gestures.NO_MOUSEEVENTS=e.Gestures.HAS_TOUCHEVENTS&&window.navigator.userAgent.match(e.Gestures.MOBILE_REGEX),e.Gestures.EVENT_TYPES={},e.Gestures.DIRECTION_DOWN="down",e.Gestures.DIRECTION_LEFT="left",e.Gestures.DIRECTION_UP="up",e.Gestures.DIRECTION_RIGHT="right",e.Gestures.POINTER_MOUSE="mouse",e.Gestures.POINTER_TOUCH="touch",e.Gestures.POINTER_PEN="pen",e.Gestures.EVENT_START="start",e.Gestures.EVENT_MOVE="move",e.Gestures.EVENT_END="end",e.Gestures.DOCUMENT=window.document,e.Gestures.plugins={},e.Gestures.READY=!1,e.Gestures.Instance=function(n,i){var r=this;return null===n?this:(t(),this.element=n,this.enabled=!0,this.options=e.Gestures.utils.extend(e.Gestures.utils.extend({},e.Gestures.defaults),i||{}),this.options.stop_browser_behavior&&e.Gestures.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),e.Gestures.event.onTouch(n,e.Gestures.EVENT_START,function(t){r.enabled&&e.Gestures.detection.startDetect(r,t)}),this)},e.Gestures.Instance.prototype={on:function(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)this.element.addEventListener(n[i],t,!1);return this},off:function(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)this.element.removeEventListener(n[i],t,!1);return this},trigger:function(t,n){var i=e.Gestures.DOCUMENT.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=n;var r=this.element;return e.Gestures.utils.hasParent(n.target,r)&&(r=n.target),r.dispatchEvent(i),this},enable:function(e){return this.enabled=e,this}};var n=null,i=!1,r=!1;e.Gestures.event={bindDom:function(e,t,n){for(var i=t.split(" "),r=0;r<i.length;r++)e.addEventListener(i[r],n,!1)},onTouch:function(t,a,o){var s=this;this.bindDom(t,e.Gestures.EVENT_TYPES[a],function(l){var c=l.type.toLowerCase();if(!c.match(/mouse/)||!r){c.match(/touch/)||c.match(/pointerdown/)||c.match(/mouse/)&&1===l.which?i=!0:c.match(/mouse/)&&1!==l.which&&(i=!1),c.match(/touch|pointer/)&&(r=!0);var d=0;i&&(e.Gestures.HAS_POINTEREVENTS&&a!=e.Gestures.EVENT_END?d=e.Gestures.PointerEvent.updatePointer(a,l):c.match(/touch/)?d=l.touches.length:r||(d=c.match(/up/)?0:1),d>0&&a==e.Gestures.EVENT_END?a=e.Gestures.EVENT_MOVE:d||(a=e.Gestures.EVENT_END),(d||null===n)&&(n=l),o.call(e.Gestures.detection,s.collectEventData(t,a,s.getTouchList(n,a),l)),e.Gestures.HAS_POINTEREVENTS&&a==e.Gestures.EVENT_END&&(d=e.Gestures.PointerEvent.updatePointer(a,l))),d||(n=null,i=!1,r=!1,e.Gestures.PointerEvent.reset())}})},determineEventTypes:function(){var t;t=e.Gestures.HAS_POINTEREVENTS?e.Gestures.PointerEvent.getEvents():e.Gestures.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_START]=t[0],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_MOVE]=t[1],e.Gestures.EVENT_TYPES[e.Gestures.EVENT_END]=t[2]},getTouchList:function(t){return e.Gestures.HAS_POINTEREVENTS?e.Gestures.PointerEvent.getTouchList():t.touches?t.touches:(t.identifier=1,[t])},collectEventData:function(t,n,i,r){var a=e.Gestures.POINTER_TOUCH;return(r.type.match(/mouse/)||e.Gestures.PointerEvent.matchType(e.Gestures.POINTER_MOUSE,r))&&(a=e.Gestures.POINTER_MOUSE),{center:e.Gestures.utils.getCenter(i),timeStamp:(new Date).getTime(),target:r.target,touches:i,eventType:n,pointerType:a,srcEvent:r,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return e.Gestures.detection.stopDetect()}}}},e.Gestures.PointerEvent={pointers:{},getTouchList:function(){var e=this,t=[];return Object.keys(e.pointers).sort().forEach(function(n){t.push(e.pointers[n])}),t},updatePointer:function(t,n){return t==e.Gestures.EVENT_END?this.pointers={}:(n.identifier=n.pointerId,this.pointers[n.pointerId]=n),Object.keys(this.pointers).length},matchType:function(t,n){if(!n.pointerType)return!1;var i={};return i[e.Gestures.POINTER_MOUSE]=n.pointerType==n.MSPOINTER_TYPE_MOUSE||n.pointerType==e.Gestures.POINTER_MOUSE,i[e.Gestures.POINTER_TOUCH]=n.pointerType==n.MSPOINTER_TYPE_TOUCH||n.pointerType==e.Gestures.POINTER_TOUCH,i[e.Gestures.POINTER_PEN]=n.pointerType==n.MSPOINTER_TYPE_PEN||n.pointerType==e.Gestures.POINTER_PEN,i[t]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},e.Gestures.utils={extend:function(e,t,n){for(var i in t)void 0!==e[i]&&n||(e[i]=t[i]);return e},hasParent:function(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1},getCenter:function(e){for(var t=[],n=[],i=0,r=e.length;r>i;i++)t.push(e[i].pageX),n.push(e[i].pageY);return{pageX:(Math.min.apply(Math,t)+Math.max.apply(Math,t))/2,pageY:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2}},getVelocity:function(e,t,n){return{x:Math.abs(t/e)||0,y:Math.abs(n/e)||0}},getAngle:function(e,t){var n=t.pageY-e.pageY,i=t.pageX-e.pageX;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,n){var i=Math.abs(t.pageX-n.pageX),r=Math.abs(t.pageY-n.pageY);return i>=r?t.pageX-n.pageX>0?e.Gestures.DIRECTION_LEFT:e.Gestures.DIRECTION_RIGHT:t.pageY-n.pageY>0?e.Gestures.DIRECTION_UP:e.Gestures.DIRECTION_DOWN},getDistance:function(e,t){var n=t.pageX-e.pageX,i=t.pageY-e.pageY;return Math.sqrt(n*n+i*i)},getScale:function(e,t){return e.length>=2&&t.length>=2?this.getDistance(t[0],t[1])/this.getDistance(e[0],e[1]):1},getRotation:function(e,t){return e.length>=2&&t.length>=2?this.getAngle(t[1],t[0])-this.getAngle(e[1],e[0]):0},isVertical:function(t){return t==e.Gestures.DIRECTION_UP||t==e.Gestures.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(e,t){e&&e.classList&&(e.classList.add(t),e.onselectstart=function(){return!1})}},e.Gestures.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,n){this.current||(this.stopped=!1,this.current={inst:t,startEvent:e.Gestures.utils.extend({},n),lastEvent:!1,name:""},this.detect(n))},detect:function(t){if(!this.current||this.stopped)return null;t=this.extendEventData(t);for(var n=this.current.inst.options,i=0,r=this.gestures.length;r>i;i++){var a=this.gestures[i];if(!this.stopped&&n[a.name]!==!1&&a.handler.call(a,t,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=t),t.eventType==e.Gestures.EVENT_END&&!t.touches.length-1&&this.stopDetect(),t},stopDetect:function(){this.previous=e.Gestures.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(t){var n=this.current.startEvent;if(n&&(t.touches.length!=n.touches.length||t.touches===n.touches)){n.touches=[];for(var i=0,r=t.touches.length;r>i;i++)n.touches.push(e.Gestures.utils.extend({},t.touches[i]))}var a=t.timeStamp-n.timeStamp,o=t.center.pageX-n.center.pageX,s=t.center.pageY-n.center.pageY,l=e.Gestures.utils.getVelocity(a,o,s);return e.Gestures.utils.extend(t,{deltaTime:a,deltaX:o,deltaY:s,velocityX:l.x,velocityY:l.y,distance:e.Gestures.utils.getDistance(n.center,t.center),angle:e.Gestures.utils.getAngle(n.center,t.center),direction:e.Gestures.utils.getDirection(n.center,t.center),scale:e.Gestures.utils.getScale(n.touches,t.touches),rotation:e.Gestures.utils.getRotation(n.touches,t.touches),startEvent:n}),t},register:function(t){var n=t.defaults||{};return void 0===n[t.name]&&(n[t.name]=!0),e.Gestures.utils.extend(e.Gestures.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0}),this.gestures}},e.Gestures.gestures=e.Gestures.gestures||{},e.Gestures.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:9},timer:null,handler:function(t,n){switch(t.eventType){case e.Gestures.EVENT_START:clearTimeout(this.timer),e.Gestures.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==e.Gestures.detection.current.name&&(e.tap.cancelClick(),n.trigger("hold",t))},n.options.hold_timeout);break;case e.Gestures.EVENT_MOVE:t.distance>n.options.hold_threshold&&clearTimeout(this.timer);break;case e.Gestures.EVENT_END:clearTimeout(this.timer)}}},e.Gestures.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(t,n){if(t.eventType==e.Gestures.EVENT_END&&"touchcancel"!=t.srcEvent.type){var i=e.Gestures.detection.previous,r=!1;if(t.deltaTime>n.options.tap_max_touchtime||t.distance>n.options.tap_max_distance)return;i&&"tap"==i.name&&t.timeStamp-i.lastEvent.timeStamp<n.options.doubletap_interval&&t.distance<n.options.doubletap_distance&&(n.trigger("doubletap",t),r=!0),(!r||n.options.tap_always)&&(e.Gestures.detection.current.name="tap",n.trigger("tap",t))}}},e.Gestures.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.4},handler:function(t,n){if(t.eventType==e.Gestures.EVENT_END){if(n.options.swipe_max_touches>0&&t.touches.length>n.options.swipe_max_touches)return;(t.velocityX>n.options.swipe_velocity||t.velocityY>n.options.swipe_velocity)&&(n.trigger(this.name,t),n.trigger(this.name+t.direction,t))}}},e.Gestures.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_lock_to_axis:!1,drag_lock_min_distance:25,prevent_default_directions:[]},triggered:!1,handler:function(t,n){if("touchstart"==t.srcEvent.type||"touchend"==t.srcEvent.type?this.preventedFirstMove=!1:this.preventedFirstMove||"touchmove"!=t.srcEvent.type||(n.options.prevent_default_directions.length>0&&-1!=n.options.prevent_default_directions.indexOf(t.direction)&&t.srcEvent.preventDefault(),this.preventedFirstMove=!0),e.Gestures.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),void(this.triggered=!1);if(!(n.options.drag_max_touches>0&&t.touches.length>n.options.drag_max_touches))switch(t.eventType){case e.Gestures.EVENT_START:this.triggered=!1;break;case e.Gestures.EVENT_MOVE:if(t.distance<n.options.drag_min_distance&&e.Gestures.detection.current.name!=this.name)return;if(e.Gestures.detection.current.name!=this.name&&(e.Gestures.detection.current.name=this.name,n.options.correct_for_drag_min_distance)){var i=Math.abs(n.options.drag_min_distance/t.distance);e.Gestures.detection.current.startEvent.center.pageX+=t.deltaX*i,e.Gestures.detection.current.startEvent.center.pageY+=t.deltaY*i,t=e.Gestures.detection.extendEventData(t)}(e.Gestures.detection.current.lastEvent.drag_locked_to_axis||n.options.drag_lock_to_axis&&n.options.drag_lock_min_distance<=t.distance)&&(t.drag_locked_to_axis=!0);var r=e.Gestures.detection.current.lastEvent.direction;t.drag_locked_to_axis&&r!==t.direction&&(e.Gestures.utils.isVertical(r)?t.direction=t.deltaY<0?e.Gestures.DIRECTION_UP:e.Gestures.DIRECTION_DOWN:t.direction=t.deltaX<0?e.Gestures.DIRECTION_LEFT:e.Gestures.DIRECTION_RIGHT),this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),n.trigger(this.name+t.direction,t),(n.options.drag_block_vertical&&e.Gestures.utils.isVertical(t.direction)||n.options.drag_block_horizontal&&!e.Gestures.utils.isVertical(t.direction))&&t.preventDefault();break;case e.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},e.Gestures.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(t,n){if(e.Gestures.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),void(this.triggered=!1);if(!(t.touches.length<2))switch(n.options.transform_always_block&&t.preventDefault(),t.eventType){case e.Gestures.EVENT_START:this.triggered=!1;break;case e.Gestures.EVENT_MOVE:var i=Math.abs(1-t.scale),r=Math.abs(t.rotation);if(i<n.options.transform_min_scale&&r<n.options.transform_min_rotation)return;e.Gestures.detection.current.name=this.name,this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),r>n.options.transform_min_rotation&&n.trigger("rotate",t),i>n.options.transform_min_scale&&(n.trigger("pinch",t),n.trigger("pinch"+(t.scale<1?"in":"out"),t));break;case e.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},e.Gestures.gestures.Touch={name:"touch",index:-(1/0),defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(t,n){return n.options.prevent_mouseevents&&t.pointerType==e.Gestures.POINTER_MOUSE?void t.stopDetect():(n.options.prevent_default&&t.preventDefault(),void(t.eventType==e.Gestures.EVENT_START&&n.trigger(this.name,t)))}},e.Gestures.gestures.Release={name:"release",index:1/0,handler:function(t,n){t.eventType==e.Gestures.EVENT_END&&n.trigger(this.name,t)}}}(window.ionic),function(e,t,n){function i(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function r(){setTimeout(function(){!f.isReady&&f.isWebView()},_)}function a(){f.isWebView()?t.addEventListener("deviceready",o,!1):o(),s&&e.removeEventListener("load",a,!1)}function o(){f.isReady=!0,f.detect();for(var e=0;e<v.length;e++)v[e]();v=[],n.trigger("platformready",{target:t}),h(function(){t.body.classList.add("platform-ready")})}var s,l="ios",c="android",d="windowsphone",u="edge",p="crosswalk",h=n.requestAnimationFrame,f=n.Platform={navigator:e.navigator,isReady:!1,isFullScreen:!1,platforms:null,grade:null,ua:navigator.userAgent,ready:function(e){f.isReady?e():v.push(e)},detect:function(){f._checkPlatforms(),h(function(){for(var e=0;e<f.platforms.length;e++)t.body.classList.add("platform-"+f.platforms[e])})},setGrade:function(e){var n=f.grade;f.grade=e,h(function(){n&&t.body.classList.remove("grade-"+n),t.body.classList.add("grade-"+e)})},device:function(){return e.device||{}},_checkPlatforms:function(){f.platforms=[];var t="a";f.isWebView()?(f.platforms.push("webview"),e.cordova||e.PhoneGap||e.phonegap?f.platforms.push("cordova"):"object"==typeof e.forge&&f.platforms.push("trigger")):f.platforms.push("browser"),f.isIPad()&&f.platforms.push("ipad");var n=f.platform();if(n){f.platforms.push(n);var i=f.version();if(i){var r=i.toString();r.indexOf(".")>0?r=r.replace(".","_"):r+="_0",f.platforms.push(n+r.split("_")[0]),f.platforms.push(n+r),f.isAndroid()&&4.4>i?t=4>i?"c":"b":f.isWindowsPhone()&&(t="b")}}f.setGrade(t)},isWebView:function(){return!(!e.cordova&&!e.PhoneGap&&!e.phonegap&&"object"!==e.forge)},isIPad:function(){return/iPad/i.test(f.navigator.platform)?!0:/iPad/i.test(f.ua)},isIOS:function(){return f.is(l)},isAndroid:function(){return f.is(c)},isWindowsPhone:function(){return f.is(d)},isEdge:function(){return f.is(u)},isCrosswalk:function(){return f.is(p)},platform:function(){return null===m&&f.setPlatform(f.device().platform),m},setPlatform:function(e){m="undefined"!=typeof e&&null!==e&&e.length?e.toLowerCase():i("ionicplatform")?i("ionicplatform"):f.ua.indexOf("Edge")>-1?u:f.ua.indexOf("Windows Phone")>-1?d:f.ua.indexOf("Android")>0?c:/iPhone|iPad|iPod/.test(f.ua)?l:f.navigator.platform&&navigator.platform.toLowerCase().split(" ")[0]||""},version:function(){return null===g&&f.setVersion(f.device().version),g},setVersion:function(e){if("undefined"!=typeof e&&null!==e&&(e=e.split("."),e=parseFloat(e[0]+"."+(e.length>1?e[1]:0)),!isNaN(e)))return void(g=e);g=0;var t=f.platform(),n={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/,windowsphone:/Windows Phone (\d+).(\d+)?/};n[t]&&(e=f.ua.match(n[t]),e&&e.length>2&&(g=parseFloat(e[1]+"."+e[2])))},is:function(e){if(e=e.toLowerCase(),f.platforms)for(var t=0;t<f.platforms.length;t++)if(f.platforms[t]===e)return!0;var n=f.platform();return n?n===e.toLowerCase():f.ua.toLowerCase().indexOf(e)>=0},exitApp:function(){f.ready(function(){navigator.app&&navigator.app.exitApp&&navigator.app.exitApp()})},showStatusBar:function(n){f._showStatusBar=n,f.ready(function(){h(function(){f._showStatusBar?(e.StatusBar&&e.StatusBar.show(),t.body.classList.remove("status-bar-hide")):(e.StatusBar&&e.StatusBar.hide(),t.body.classList.add("status-bar-hide"))})})},fullScreen:function(e,i){f.isFullScreen=e!==!1,n.DomUtil.ready(function(){h(function(){f.isFullScreen?t.body.classList.add("fullscreen"):t.body.classList.remove("fullscreen")}),f.showStatusBar(i===!0)})}},m=null,g=null,v=[],_=2e3;r(),"complete"===t.readyState?a():(s=!0,e.addEventListener("load",a,!1))}(window,document,ionic),function(e,t){"use strict";t.CSS={},t.CSS.TRANSITION=[],t.CSS.TRANSFORM=[],t.EVENTS={},function(){var n,i=["webkitTransform","transform","-webkit-transform","webkit-transform","-moz-transform","moz-transform","MozTransform","mozTransform","msTransform"];for(n=0;n<i.length;n++)if(void 0!==e.documentElement.style[i[n]]){t.CSS.TRANSFORM=i[n];break}for(i=["webkitTransition","mozTransition","msTransition","transition"],n=0;n<i.length;n++)if(void 0!==e.documentElement.style[i[n]]){t.CSS.TRANSITION=i[n];break}t.CSS.TRANSITION=t.CSS.TRANSITION||"transition";var r=t.CSS.TRANSITION.indexOf("webkit")>-1;t.CSS.TRANSITION_DURATION=(r?"-webkit-":"")+"transition-duration",t.CSS.TRANSITIONEND=(r?"webkitTransitionEnd ":"")+"transitionend"}(),function(){var e="touchstart",n="touchmove",i="touchend",r="touchcancel";
+window.navigator.pointerEnabled?(e="pointerdown",n="pointermove",i="pointerup",r="pointercancel"):window.navigator.msPointerEnabled&&(e="MSPointerDown",n="MSPointerMove",i="MSPointerUp",r="MSPointerCancel"),t.EVENTS.touchstart=e,t.EVENTS.touchmove=n,t.EVENTS.touchend=i,t.EVENTS.touchcancel=r}(),"classList"in e.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function e(e){return function(){var n,i=t.className.split(/\s+/);for(n=0;n<arguments.length;n++)e(i,i.indexOf(arguments[n]),arguments[n]);t.className=i.join(" ")}}var t=this;return{add:e(function(e,t,n){~t||e.push(n)}),remove:e(function(e,t){~t&&e.splice(t,1)}),toggle:e(function(e,t,n){~t?e.splice(t,1):e.push(n)}),contains:function(e){return!!~t.className.split(/\s+/).indexOf(e)},item:function(e){return t.className.split(/\s+/)[e]||null}}}})}(document,ionic);var X,F,B,W,$,q,U,K,j="touchmove",Z=12,Q=50,J={click:i,mousedown:r,mouseup:a,mousemove:o,touchstart:s,touchend:l,touchcancel:d,touchmove:c,pointerdown:s,pointerup:l,pointercancel:d,pointermove:c,MSPointerDown:s,MSPointerUp:l,MSPointerCancel:d,MSPointerMove:c,focusin:m,focusout:g};ionic.tap={register:function(t){return X=t,e("click",!0,!0),e("mouseup"),e("mousedown"),window.navigator.pointerEnabled?(e("pointerdown"),e("pointerup"),e("pointercancel"),j="pointermove"):window.navigator.msPointerEnabled?(e("MSPointerDown"),e("MSPointerUp"),e("MSPointerCancel"),j="MSPointerMove"):(e("touchstart"),e("touchend"),e("touchcancel")),e("focusin"),e("focusout"),function(){for(var t in J)e(t,!1);X=null,F=null,B=!1,$=!1,q=null}},ignoreScrollStart:function(e){return e.defaultPrevented||/^(file|range)$/i.test(e.target.type)||"true"==(e.target.dataset?e.target.dataset.preventScroll:e.target.getAttribute("data-prevent-scroll"))||!!/^(object|embed)$/i.test(e.target.tagName)||ionic.tap.isElementTapDisabled(e.target)},isTextInput:function(e){return!!e&&("TEXTAREA"==e.tagName||"true"===e.contentEditable||"INPUT"==e.tagName&&!/^(radio|checkbox|range|file|submit|reset|color|image|button)$/i.test(e.type))},isDateInput:function(e){return!!e&&"INPUT"==e.tagName&&/^(date|time|datetime-local|month|week)$/i.test(e.type)},isVideo:function(e){return!!e&&"VIDEO"==e.tagName},isKeyboardElement:function(e){return!ionic.Platform.isIOS()||ionic.Platform.isIPad()?ionic.tap.isTextInput(e)&&!ionic.tap.isDateInput(e):ionic.tap.isTextInput(e)||!!e&&"SELECT"==e.tagName},isLabelWithTextInput:function(e){var t=w(e,!1);return!!t&&ionic.tap.isTextInput(T(t))},containsOrIsTextInput:function(e){return ionic.tap.isTextInput(e)||ionic.tap.isLabelWithTextInput(e)},cloneFocusedInput:function(e){ionic.tap.hasCheckedClone||(ionic.tap.hasCheckedClone=!0,ionic.requestAnimationFrame(function(){var t=e.querySelector(":focus");if(ionic.tap.isTextInput(t)&&!ionic.tap.isDateInput(t)){var n=t.cloneNode(!0);n.value=t.value,n.classList.add("cloned-text-input"),n.readOnly=!0,t.isContentEditable&&(n.contentEditable=t.contentEditable,n.innerHTML=t.innerHTML),t.parentElement.insertBefore(n,t),t.classList.add("previous-input-focus"),n.scrollTop=t.scrollTop}}))},hasCheckedClone:!1,removeClonedInputs:function(e){ionic.tap.hasCheckedClone=!1,ionic.requestAnimationFrame(function(){var t,n=e.querySelectorAll(".cloned-text-input"),i=e.querySelectorAll(".previous-input-focus");for(t=0;t<n.length;t++)n[t].parentElement.removeChild(n[t]);for(t=0;t<i.length;t++)i[t].classList.remove("previous-input-focus"),i[t].style.top="",ionic.keyboard.isOpen&&!ionic.keyboard.isClosing&&i[t].focus()})},requiresNativeClick:function(e){return ionic.Platform.isWindowsPhone()&&("A"==e.tagName||"BUTTON"==e.tagName||e.hasAttribute("ng-click")||"INPUT"==e.tagName&&("button"==e.type||"submit"==e.type))?!0:!e||e.disabled||/^(file|range)$/i.test(e.type)||/^(object|video)$/i.test(e.tagName)||ionic.tap.isLabelContainingFileInput(e)?!0:ionic.tap.isElementTapDisabled(e)},isLabelContainingFileInput:function(e){var t=w(e);if("LABEL"!==t.tagName)return!1;var n=t.querySelector("input[type=file]");return n&&n.disabled===!1?!0:!1},isElementTapDisabled:function(e){if(e&&1===e.nodeType)for(var t=e;t;){if(t.getAttribute&&"true"==t.getAttribute("data-tap-disabled"))return!0;t=t.parentElement}return!1},setTolerance:function(e,t){Z=e,Q=t},cancelClick:function(){$=!0},pointerCoord:function(e){var t={x:0,y:0};if(e){var n=e.touches&&e.touches.length?e.touches:[e],i=e.changedTouches&&e.changedTouches[0]||n[0];i&&(t.x=i.clientX||i.pageX||0,t.y=i.clientY||i.pageY||0)}return t}},ionic.DomUtil.ready(function(){var e="undefined"!=typeof angular?angular:null;(!e||e&&!e.scenario)&&ionic.tap.register(document)}),function(e,t){"use strict";function n(){a={},t.requestAnimationFrame(r)}function i(){for(var e in a)a[e]&&(a[e].classList.add(l),o[e]=a[e]);a={}}function r(){if(t.transition&&t.transition.isActive)return void setTimeout(r,400);for(var e in o)o[e]&&(o[e].classList.remove(l),delete o[e])}var a={},o={},s=0,l="activated";t.activator={start:function(e){var n=t.tap.pointerCoord(e).x;n>0&&30>n||t.requestAnimationFrame(function(){if(!(t.scroll&&t.scroll.isScrolling||t.tap.requiresNativeClick(e.target))){for(var n,r=e.target,o=0;6>o&&(r&&1===r.nodeType);o++){if(n&&r.classList&&r.classList.contains("item")){n=r;break}if("A"==r.tagName||"BUTTON"==r.tagName||r.hasAttribute("ng-click")){n=r;break}if(r.classList&&r.classList.contains("button")){n=r;break}if("ION-CONTENT"==r.tagName||r.classList&&r.classList.contains("pane")||"BODY"==r.tagName)break;r=r.parentElement}n&&(a[s]=n,t.requestAnimationFrame(i),s=s>29?0:s+1)}})},end:function(){setTimeout(n,200)}}}(document,ionic),function(e){var t=0;e.Utils={arrayMove:function(e,t,n){if(n>=e.length)for(var i=n-e.length;i--+1;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e},proxy:function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}},debounce:function(e,t,n){var i,r,a,o,s;return function(){a=this,r=arguments,o=new Date;var l=function(){var c=new Date-o;t>c?i=setTimeout(l,t-c):(i=null,n||(s=e.apply(a,r)))},c=n&&!i;return i||(i=setTimeout(l,t)),c&&(s=e.apply(a,r)),s}},throttle:function(e,t,n){var i,r,a,o=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:Date.now(),o=null,a=e.apply(i,r)};return function(){var c=Date.now();s||n.leading!==!1||(s=c);var d=t-(c-s);return i=this,r=arguments,0>=d?(clearTimeout(o),o=null,s=c,a=e.apply(i,r)):o||n.trailing===!1||(o=setTimeout(l,d)),a}},inherit:function(t,n){var i,r=this;i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return r.apply(this,arguments)},e.extend(i,r,n);var a=function(){this.constructor=i};return a.prototype=r.prototype,i.prototype=new a,t&&e.extend(i.prototype,t),i.__super__=r.prototype,i},extend:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){var i=t[n];if(i)for(var r in i)e[r]=i[r]}return e},nextUid:function(){return"ion"+t++},disconnectScope:function(e){if(e&&e.$root!==e){var t=e.$parent;e.$$disconnected=!0,e.$broadcast("$ionic.disconnectScope",e),t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e.$parent;e.$$disconnected=!1,e.$broadcast("$ionic.reconnectScope",e),e.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=e,t.$$childTail=e):t.$$childHead=t.$$childTail=e}},isScopeDisconnected:function(e){for(var t=e;t;){if(t.$$disconnected)return!0;t=t.$parent}return!1}},e.inherit=e.Utils.inherit,e.extend=e.Utils.extend,e.throttle=e.Utils.throttle,e.proxy=e.Utils.proxy,e.debounce=e.Utils.debounce}(window.ionic);var ee,te,ne,ie,re,ae=0,oe=0,se=0,le=!1,ce="keyboard-open",de="scroll-content",ue=ionic.debounce(E,200,!0),pe=ionic.debounce(y,100,!0);ionic.keyboard={isOpen:!1,isClosing:!1,isOpening:!1,height:0,isLandscape:!1,isInitialized:!1,hide:function(){V()&&cordova.plugins.Keyboard.close(),ee&&ee.blur()},show:function(){V()&&cordova.plugins.Keyboard.show()},disable:function(){V()?(window.removeEventListener("native.keyboardshow",pe),window.removeEventListener("native.keyboardhide",x)):document.body.removeEventListener("focusout",x),document.body.removeEventListener("ionic.focusin",ue),document.body.removeEventListener("focusin",ue),window.removeEventListener("orientationchange",D),window.navigator.msPointerEnabled?document.removeEventListener("MSPointerDown",S):document.removeEventListener("touchstart",S),ionic.keyboard.isInitialized=!1},enable:function(){S()}},ae=G(),ionic.Platform.ready(function(){A(),window.addEventListener("orientationchange",D),setTimeout(A,999),window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",S,!1):document.addEventListener("touchstart",S,!1)});var he,fe={};ionic.viewport={orientation:function(){return window.innerWidth>window.innerHeight?90:0}},ionic.Platform.ready(function(){R(),window.addEventListener("orientationchange",function(){setTimeout(H,1e3)},!1)}),function(e){"use strict";e.views.View=function(){this.initialize.apply(this,arguments)},e.views.View.inherit=e.inherit,e.extend(e.views.View.prototype,{initialize:function(){}})}(window.ionic);var me={effect:{}};!function(e){var t=Date.now||function(){return+new Date},n=60,i=1e3,r={},a=1;me.effect.Animate={requestAnimationFrame:function(){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,n=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(n=!1),n)return function(e,n){t(e,n)};var i=60,r={},a=0,o=1,s=null,l=+new Date;return function(e){var t=o++;return r[t]=e,a++,null===s&&(s=setInterval(function(){var e=+new Date,t=r;r={},a=0;for(var n in t)t.hasOwnProperty(n)&&(t[n](e),l=e);e-l>2500&&(clearInterval(s),s=null)},1e3/i)),t}}(),stop:function(e){var t=null!=r[e];return t&&(r[e]=null),t},isRunning:function(e){return null!=r[e]},start:function(e,o,s,l,c,d){var u=t(),p=u,h=0,f=0,m=a++;if(d||(d=document.body),m%20===0){var g={};for(var v in r)g[v]=!0;r=g}var _=function(a){var g=a!==!0,v=t();if(!r[m]||o&&!o(m))return r[m]=null,void(s&&s(n-f/((v-u)/i),m,!1));if(g)for(var w=Math.round((v-p)/(i/n))-1,T=0;T<Math.min(w,4);T++)_(!0),f++;l&&(h=(v-u)/l,h>1&&(h=1));var b=c?c(h):h;e(b,v,g)!==!1&&1!==h||!g?g&&(p=v,me.effect.Animate.requestAnimationFrame(_,d)):(r[m]=null,s&&s(n-f/((v-u)/i),m,1===h||null==l))};return r[m]=!0,me.effect.Animate.requestAnimationFrame(_,d),m}}}(window),function(e){var t=function(){},n=function(e){return Math.pow(e-1,3)+1},i=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)};e.views.Scroll=e.views.View.inherit({initialize:function(n){var i=this;i.__container=n.el,i.__content=n.el.firstElementChild,setTimeout(function(){i.__container&&i.__content&&(i.__container.scrollTop=0,i.__content.scrollTop=0)}),i.options={scrollingX:!1,scrollbarX:!0,scrollingY:!0,scrollbarY:!0,startX:0,startY:0,wheelDampen:6,minScrollbarSizeX:5,minScrollbarSizeY:5,scrollbarsFade:!0,scrollbarFadeDelay:300,scrollbarResizeFadeDelay:1e3,animating:!0,animationDuration:250,decelVelocityThreshold:4,decelVelocityThresholdPaging:4,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,deceleration:.97,preventDefault:!1,scrollingComplete:t,penetrationDeceleration:.03,penetrationAcceleration:.08,scrollEventInterval:10,freeze:!1,getContentWidth:function(){return Math.max(i.__content.scrollWidth,i.__content.offsetWidth)},getContentHeight:function(){return Math.max(i.__content.scrollHeight,i.__content.offsetHeight+2*i.__content.offsetTop)}};for(var r in n)i.options[r]=n[r];i.hintResize=e.debounce(function(){i.resize()},1e3,!0),i.onScroll=function(){e.scroll.isScrolling?(clearTimeout(i.scrollTimer),i.scrollTimer=setTimeout(i.setScrollStop,80)):setTimeout(i.setScrollStart,50)},i.freeze=function(e){return arguments.length&&(i.options.freeze=e),i.options.freeze},i.freezeShut=i.freeze,i.setScrollStart=function(){e.scroll.isScrolling=Math.abs(e.scroll.lastTop-i.__scrollTop)>1,clearTimeout(i.scrollTimer),i.scrollTimer=setTimeout(i.setScrollStop,80)},i.setScrollStop=function(){e.scroll.isScrolling=!1,e.scroll.lastTop=i.__scrollTop},i.triggerScrollEvent=e.throttle(function(){i.onScroll(),e.trigger("scroll",{scrollTop:i.__scrollTop,scrollLeft:i.__scrollLeft,target:i.__container})},i.options.scrollEventInterval),i.triggerScrollEndEvent=function(){e.trigger("scrollend",{scrollTop:i.__scrollTop,scrollLeft:i.__scrollLeft,target:i.__container})},i.__scrollLeft=i.options.startX,i.__scrollTop=i.options.startY,i.__callback=i.getRenderFn(),i.__initEventHandlers(),i.__createScrollbars()},run:function(){this.resize(),this.__fadeScrollbars("out",this.options.scrollbarResizeFadeDelay)},__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,__transformProperty:null,__perspectiveProperty:null,__indicatorX:null,__indicatorY:null,__scrollbarFadeTimeout:null,__didWaitForSize:null,__sizerTimeout:null,__initEventHandlers:function(){function t(e){return e.touches&&e.touches.length?e.touches:[{pageX:e.pageX,pageY:e.pageY}]}var n,i=this,r=i.__container;if(i.scrollChildIntoView=function(t){var a=r.getBoundingClientRect().bottom;n=r.offsetHeight;var o=i.isShrunkForKeyboard,s=r.parentNode.classList.contains("modal"),l=s&&window.innerWidth>=680;if(!o){if(e.Platform.isIOS()||e.Platform.isFullScreen||l){var c=t.detail.viewportHeight-a,d=Math.max(0,t.detail.keyboardHeight-c);e.requestAnimationFrame(function(){n-=d,r.style.height=n+"px",r.style.overflow="visible",i.resize()})}i.isShrunkForKeyboard=!0}t.detail.isElementUnderKeyboard&&e.requestAnimationFrame(function(){r.scrollTop=0,i.isShrunkForKeyboard&&!o&&(a=r.getBoundingClientRect().bottom);var s=.5*n,l=(t.detail.elementBottom+t.detail.elementTop)/2,c=l-a,d=c+s;d>0&&(e.Platform.isIOS()&&e.tap.cloneFocusedInput(r,i),i.scrollBy(0,d,!0),i.onScroll())}),t.stopPropagation()},i.resetScrollView=function(){i.isShrunkForKeyboard&&(i.isShrunkForKeyboard=!1,r.style.height="",r.style.overflow=""),i.resize()},r.addEventListener("scrollChildIntoView",i.scrollChildIntoView),document.addEventListener("resetScrollView",i.resetScrollView),i.touchStart=function(n){if(i.startCoordinates=e.tap.pointerCoord(n),!e.tap.ignoreScrollStart(n)){if(i.__isDown=!0,e.tap.containsOrIsTextInput(n.target)||"SELECT"===n.target.tagName)return void(i.__hasStarted=!1);i.__isSelectable=!0,i.__enableScrollY=!0,i.__hasStarted=!0,i.doTouchStart(t(n),n.timeStamp),n.preventDefault()}},i.touchMove=function(n){if(!(i.options.freeze||!i.__isDown||!i.__isDown&&n.defaultPrevented||"TEXTAREA"===n.target.tagName&&n.target.parentElement.querySelector(":focus"))){if(!i.__hasStarted&&(e.tap.containsOrIsTextInput(n.target)||"SELECT"===n.target.tagName))return i.__hasStarted=!0,i.doTouchStart(t(n),n.timeStamp),void n.preventDefault();if(i.startCoordinates){var a=e.tap.pointerCoord(n);i.__isSelectable&&e.tap.isTextInput(n.target)&&Math.abs(i.startCoordinates.x-a.x)>20&&(i.__enableScrollY=!1,i.__isSelectable=!0),i.__enableScrollY&&Math.abs(i.startCoordinates.y-a.y)>10&&(i.__isSelectable=!1,e.tap.cloneFocusedInput(r,i))}i.doTouchMove(t(n),n.timeStamp,n.scale),i.__isDown=!0}},i.touchMoveBubble=function(e){i.__isDown&&i.options.preventDefault&&e.preventDefault()},i.touchEnd=function(t){i.__isDown&&(i.doTouchEnd(t,t.timeStamp),i.__isDown=!1,i.__hasStarted=!1,i.__isSelectable=!0,i.__enableScrollY=!0,i.__isDragging||i.__isDecelerating||i.__isAnimating||e.tap.removeClonedInputs(r,i))},i.mouseWheel=e.animationFrameThrottle(function(t){var n=e.DomUtil.getParentOrSelfWithClass(t.target,"ionic-scroll");i.options.freeze||n!==i.__container||(i.hintResize(),i.scrollBy((t.wheelDeltaX||t.deltaX||0)/i.options.wheelDampen,(-t.wheelDeltaY||t.deltaY||0)/i.options.wheelDampen),i.__fadeScrollbars("in"),clearTimeout(i.__wheelHideBarTimeout),i.__wheelHideBarTimeout=setTimeout(function(){i.__fadeScrollbars("out")},100))}),"ontouchstart"in window)r.addEventListener("touchstart",i.touchStart,!1),i.options.preventDefault&&r.addEventListener("touchmove",i.touchMoveBubble,!1),document.addEventListener("touchmove",i.touchMove,!1),document.addEventListener("touchend",i.touchEnd,!1),document.addEventListener("touchcancel",i.touchEnd,!1),document.addEventListener("wheel",i.mouseWheel,!1);else if(window.navigator.pointerEnabled)r.addEventListener("pointerdown",i.touchStart,!1),i.options.preventDefault&&r.addEventListener("pointermove",i.touchMoveBubble,!1),document.addEventListener("pointermove",i.touchMove,!1),document.addEventListener("pointerup",i.touchEnd,!1),document.addEventListener("pointercancel",i.touchEnd,!1),document.addEventListener("wheel",i.mouseWheel,!1);else if(window.navigator.msPointerEnabled)r.addEventListener("MSPointerDown",i.touchStart,!1),i.options.preventDefault&&r.addEventListener("MSPointerMove",i.touchMoveBubble,!1),document.addEventListener("MSPointerMove",i.touchMove,!1),document.addEventListener("MSPointerUp",i.touchEnd,!1),document.addEventListener("MSPointerCancel",i.touchEnd,!1),document.addEventListener("wheel",i.mouseWheel,!1);else{var a=!1;i.mouseDown=function(n){e.tap.ignoreScrollStart(n)||"SELECT"===n.target.tagName||(i.doTouchStart(t(n),n.timeStamp),e.tap.isTextInput(n.target)||n.preventDefault(),a=!0)},i.mouseMove=function(e){i.options.freeze||!a||!a&&e.defaultPrevented||(i.doTouchMove(t(e),e.timeStamp),a=!0)},i.mouseMoveBubble=function(e){a&&i.options.preventDefault&&e.preventDefault()},i.mouseUp=function(e){a&&(i.doTouchEnd(e,e.timeStamp),a=!1)},r.addEventListener("mousedown",i.mouseDown,!1),i.options.preventDefault&&r.addEventListener("mousemove",i.mouseMoveBubble,!1),document.addEventListener("mousemove",i.mouseMove,!1),document.addEventListener("mouseup",i.mouseUp,!1),document.addEventListener("mousewheel",i.mouseWheel,!1),document.addEventListener("wheel",i.mouseWheel,!1)}},__cleanup:function(){var n=this,i=n.__container;i.removeEventListener("touchstart",n.touchStart),i.removeEventListener("touchmove",n.touchMoveBubble),document.removeEventListener("touchmove",n.touchMove),document.removeEventListener("touchend",n.touchEnd),document.removeEventListener("touchcancel",n.touchEnd),i.removeEventListener("pointerdown",n.touchStart),i.removeEventListener("pointermove",n.touchMoveBubble),document.removeEventListener("pointermove",n.touchMove),document.removeEventListener("pointerup",n.touchEnd),document.removeEventListener("pointercancel",n.touchEnd),i.removeEventListener("MSPointerDown",n.touchStart),i.removeEventListener("MSPointerMove",n.touchMoveBubble),document.removeEventListener("MSPointerMove",n.touchMove),document.removeEventListener("MSPointerUp",n.touchEnd),document.removeEventListener("MSPointerCancel",n.touchEnd),i.removeEventListener("mousedown",n.mouseDown),i.removeEventListener("mousemove",n.mouseMoveBubble),document.removeEventListener("mousemove",n.mouseMove),document.removeEventListener("mouseup",n.mouseUp),document.removeEventListener("mousewheel",n.mouseWheel),document.removeEventListener("wheel",n.mouseWheel),i.removeEventListener("scrollChildIntoView",n.scrollChildIntoView),document.removeEventListener("resetScrollView",n.resetScrollView),e.tap.removeClonedInputs(i,n),delete n.__container,delete n.__content,delete n.__indicatorX,delete n.__indicatorY,delete n.options.el,n.__callback=n.scrollChildIntoView=n.resetScrollView=t,n.mouseMove=n.mouseDown=n.mouseUp=n.mouseWheel=n.touchStart=n.touchMove=n.touchEnd=n.touchCancel=t,n.resize=n.scrollTo=n.zoomTo=n.__scrollingComplete=t,i=null},__createScrollbar:function(e){var t=document.createElement("div"),n=document.createElement("div");return n.className="scroll-bar-indicator scroll-bar-fade-out","h"==e?t.className="scroll-bar scroll-bar-h":t.className="scroll-bar scroll-bar-v",t.appendChild(n),t},__createScrollbars:function(){var e,t,n=this;n.options.scrollingX&&(e={el:n.__createScrollbar("h"),sizeRatio:1},e.indicator=e.el.children[0],n.options.scrollbarX&&n.__container.appendChild(e.el),n.__indicatorX=e),n.options.scrollingY&&(t={el:n.__createScrollbar("v"),sizeRatio:1},t.indicator=t.el.children[0],n.options.scrollbarY&&n.__container.appendChild(t.el),n.__indicatorY=t)},__resizeScrollbars:function(){var t=this;if(t.__indicatorX){var n=Math.max(Math.round(t.__clientWidth*t.__clientWidth/t.__contentWidth),20);n>t.__contentWidth&&(n=0),n!==t.__indicatorX.size&&e.requestAnimationFrame(function(){t.__indicatorX.indicator.style.width=n+"px"}),t.__indicatorX.size=n,t.__indicatorX.minScale=t.options.minScrollbarSizeX/n,t.__indicatorX.maxPos=t.__clientWidth-n,t.__indicatorX.sizeRatio=t.__maxScrollLeft?t.__indicatorX.maxPos/t.__maxScrollLeft:1}if(t.__indicatorY){var i=Math.max(Math.round(t.__clientHeight*t.__clientHeight/t.__contentHeight),20);i>t.__contentHeight&&(i=0),i!==t.__indicatorY.size&&e.requestAnimationFrame(function(){t.__indicatorY&&(t.__indicatorY.indicator.style.height=i+"px")}),t.__indicatorY.size=i,t.__indicatorY.minScale=t.options.minScrollbarSizeY/i,t.__indicatorY.maxPos=t.__clientHeight-i,t.__indicatorY.sizeRatio=t.__maxScrollTop?t.__indicatorY.maxPos/t.__maxScrollTop:1}},__repositionScrollbars:function(){var e,t,n,i,r,a,o=this,s=0,l=0;if(o.__indicatorX){o.__indicatorY&&(s=10),r=Math.round(o.__indicatorX.sizeRatio*o.__scrollLeft)||0,n=o.__scrollLeft-(o.__maxScrollLeft-s),o.__scrollLeft<0?(t=Math.max(o.__indicatorX.minScale,(o.__indicatorX.size-Math.abs(o.__scrollLeft))/o.__indicatorX.size),r=0,o.__indicatorX.indicator.style[o.__transformOriginProperty]="left center"):n>0?(t=Math.max(o.__indicatorX.minScale,(o.__indicatorX.size-n)/o.__indicatorX.size),r=o.__indicatorX.maxPos-s,o.__indicatorX.indicator.style[o.__transformOriginProperty]="right center"):(r=Math.min(o.__maxScrollLeft,Math.max(0,r)),t=1);var c="translate3d("+r+"px, 0, 0) scaleX("+t+")";o.__indicatorX.transformProp!==c&&(o.__indicatorX.indicator.style[o.__transformProperty]=c,o.__indicatorX.transformProp=c)}if(o.__indicatorY){a=Math.round(o.__indicatorY.sizeRatio*o.__scrollTop)||0,o.__indicatorX&&(l=10),i=o.__scrollTop-(o.__maxScrollTop-l),o.__scrollTop<0?(e=Math.max(o.__indicatorY.minScale,(o.__indicatorY.size-Math.abs(o.__scrollTop))/o.__indicatorY.size),a=0,"center top"!==o.__indicatorY.originProp&&(o.__indicatorY.indicator.style[o.__transformOriginProperty]="center top",o.__indicatorY.originProp="center top")):i>0?(e=Math.max(o.__indicatorY.minScale,(o.__indicatorY.size-i)/o.__indicatorY.size),a=o.__indicatorY.maxPos-l,"center bottom"!==o.__indicatorY.originProp&&(o.__indicatorY.indicator.style[o.__transformOriginProperty]="center bottom",o.__indicatorY.originProp="center bottom")):(a=Math.min(o.__maxScrollTop,Math.max(0,a)),e=1);var d="translate3d(0,"+a+"px, 0) scaleY("+e+")";o.__indicatorY.transformProp!==d&&(o.__indicatorY.indicator.style[o.__transformProperty]=d,o.__indicatorY.transformProp=d)}},__fadeScrollbars:function(e,t){var n=this;if(n.options.scrollbarsFade){var i="scroll-bar-fade-out";n.options.scrollbarsFade===!0&&(clearTimeout(n.__scrollbarFadeTimeout),"in"==e?(n.__indicatorX&&n.__indicatorX.indicator.classList.remove(i),n.__indicatorY&&n.__indicatorY.indicator.classList.remove(i)):n.__scrollbarFadeTimeout=setTimeout(function(){n.__indicatorX&&n.__indicatorX.indicator.classList.add(i),n.__indicatorY&&n.__indicatorY.indicator.classList.add(i)},t||n.options.scrollbarFadeDelay))}},__scrollingComplete:function(){this.options.scrollingComplete(),e.tap.removeClonedInputs(this.__container,this),this.__fadeScrollbars("out")},resize:function(e){var t=this;t.__container&&t.options&&t.setDimensions(t.__container.clientWidth,t.__container.clientHeight,t.options.getContentWidth(),t.options.getContentHeight(),e)},getRenderFn:function(){var e,t=this,n=t.__content,i=document.documentElement.style;"MozAppearance"in i?e="gecko":"WebkitAppearance"in i?e="webkit":"string"==typeof navigator.cpuClass&&(e="trident");var r,a={trident:"ms",gecko:"Moz",webkit:"Webkit",presto:"O"}[e],o=document.createElement("div"),s=a+"Perspective",l=a+"Transform",c=a+"TransformOrigin";return t.__perspectiveProperty=l,t.__transformProperty=l,t.__transformOriginProperty=c,o.style[s]!==r?function(e,i,r,a){var o="translate3d("+-e+"px,"+-i+"px,0) scale("+r+")";o!==t.contentTransform&&(n.style[l]=o,t.contentTransform=o),t.__repositionScrollbars(),a||t.triggerScrollEvent()}:o.style[l]!==r?function(e,i,r,a){n.style[l]="translate("+-e+"px,"+-i+"px) scale("+r+")",t.__repositionScrollbars(),a||t.triggerScrollEvent()}:function(e,i,r,a){n.style.marginLeft=e?-e/r+"px":"",n.style.marginTop=i?-i/r+"px":"",n.style.zoom=r||"",t.__repositionScrollbars(),a||t.triggerScrollEvent()}},setDimensions:function(e,t,n,i,r){var a=this;(e||t||n||i)&&(e===+e&&(a.__clientWidth=e),t===+t&&(a.__clientHeight=t),n===+n&&(a.__contentWidth=n),i===+i&&(a.__contentHeight=i),a.__computeScrollMax(),a.__resizeScrollbars(),r||a.scrollTo(a.__scrollLeft,a.__scrollTop,!0,null,!0))},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(t,n){var i=this;i.__refreshHeight=t,i.__refreshActivate=function(){e.requestAnimationFrame(n.activate)},i.__refreshDeactivate=function(){e.requestAnimationFrame(n.deactivate)},i.__refreshStart=function(){e.requestAnimationFrame(n.start)},i.__refreshShow=function(){e.requestAnimationFrame(n.show)},i.__refreshHide=function(){e.requestAnimationFrame(n.hide)},i.__refreshTail=function(){e.requestAnimationFrame(n.tail)},i.__refreshTailTime=100,i.__minSpinTime=600},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0);var e=new Date;this.refreshStartTime=e.getTime(),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this,t=new Date,n=0;e.refreshStartTime+e.__minSpinTime>t.getTime()&&(n=e.refreshStartTime+e.__minSpinTime-t.getTime()),setTimeout(function(){e.__refreshTail&&e.__refreshTail(),setTimeout(function(){e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.__refreshHide&&e.__refreshHide(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},e.__refreshTailTime)},n)},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,n,i){var r=this;if(!r.options.zooming)throw new Error("Zooming is not enabled!");r.__isDecelerating&&(me.effect.Animate.stop(r.__isDecelerating),r.__isDecelerating=!1);var a=r.__zoomLevel;null==n&&(n=r.__clientWidth/2),null==i&&(i=r.__clientHeight/2),e=Math.max(Math.min(e,r.options.maxZoom),r.options.minZoom),r.__computeScrollMax(e);var o=(n+r.__scrollLeft)*e/a-n,s=(i+r.__scrollTop)*e/a-i;o>r.__maxScrollLeft?o=r.__maxScrollLeft:0>o&&(o=0),s>r.__maxScrollTop?s=r.__maxScrollTop:0>s&&(s=0),r.__publish(o,s,e,t)},zoomBy:function(e,t,n,i){this.zoomTo(this.__zoomLevel*e,t,n,i)},scrollTo:function(e,t,n,i,r){var a=this;if(a.__isDecelerating&&(me.effect.Animate.stop(a.__isDecelerating),a.__isDecelerating=!1),null!=i&&i!==a.__zoomLevel){if(!a.options.zooming)throw new Error("Zooming is not enabled!");e*=i,t*=i,a.__computeScrollMax(i)}else i=a.__zoomLevel;a.options.scrollingX?a.options.paging?e=Math.round(e/a.__clientWidth)*a.__clientWidth:a.options.snapping&&(e=Math.round(e/a.__snapWidth)*a.__snapWidth):e=a.__scrollLeft,a.options.scrollingY?a.options.paging?t=Math.round(t/a.__clientHeight)*a.__clientHeight:a.options.snapping&&(t=Math.round(t/a.__snapHeight)*a.__snapHeight):t=a.__scrollTop,e=Math.max(Math.min(a.__maxScrollLeft,e),0),t=Math.max(Math.min(a.__maxScrollTop,t),0),e===a.__scrollLeft&&t===a.__scrollTop&&(n=!1),a.__publish(e,t,i,n,r)},scrollBy:function(e,t,n){var i=this,r=i.__isAnimating?i.__scheduledLeft:i.__scrollLeft,a=i.__isAnimating?i.__scheduledTop:i.__scrollTop;i.scrollTo(r+(e||0),a+(t||0),n)},doMouseZoom:function(e,t,n,i){var r=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*r,!1,n-this.__clientLeft,i-this.__clientTop)},doTouchStart:function(e,t){var n=this;n.__decStopped=!(!n.__isDecelerating&&!n.__isAnimating),n.hintResize(),t instanceof Date&&(t=t.valueOf()),"number"!=typeof t&&(t=Date.now()),n.__interruptedAnimation=!0,n.__isDecelerating&&(me.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1,n.__interruptedAnimation=!0),n.__isAnimating&&(me.effect.Animate.stop(n.__isAnimating),n.__isAnimating=!1,n.__interruptedAnimation=!0);var i,r,a=1===e.length;a?(i=e[0].pageX,r=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,r=Math.abs(e[0].pageY+e[1].pageY)/2),n.__initialTouchLeft=i,n.__initialTouchTop=r,n.__initialTouches=e,n.__zoomLevelStart=n.__zoomLevel,n.__lastTouchLeft=i,n.__lastTouchTop=r,n.__lastTouchMove=t,n.__lastScale=1,n.__enableScrollX=!a&&n.options.scrollingX,n.__enableScrollY=!a&&n.options.scrollingY,n.__isTracking=!0,n.__didDecelerationComplete=!1,n.__isDragging=!a,n.__isSingleTouch=a,n.__positions=[]},doTouchMove:function(e,t,n){t instanceof Date&&(t=t.valueOf()),"number"!=typeof t&&(t=Date.now());var i=this;if(i.__isTracking){var r,a;2===e.length?(r=Math.abs(e[0].pageX+e[1].pageX)/2,a=Math.abs(e[0].pageY+e[1].pageY)/2,!n&&i.options.zooming&&(n=i.__getScale(i.__initialTouches,e))):(r=e[0].pageX,a=e[0].pageY);var o=i.__positions;if(i.__isDragging){i.__decStopped=!1;var s=r-i.__lastTouchLeft,l=a-i.__lastTouchTop,c=i.__scrollLeft,d=i.__scrollTop,u=i.__zoomLevel;if(null!=n&&i.options.zooming){var p=u;if(u=u/i.__lastScale*n,u=Math.max(Math.min(u,i.options.maxZoom),i.options.minZoom),p!==u){var h=r-i.__clientLeft,f=a-i.__clientTop;c=(h+c)*u/p-h,d=(f+d)*u/p-f,i.__computeScrollMax(u)}}if(i.__enableScrollX){c-=s*i.options.speedMultiplier;var m=i.__maxScrollLeft;(c>m||0>c)&&(i.options.bouncing?c+=s/2*i.options.speedMultiplier:c=c>m?m:0)}if(i.__enableScrollY){d-=l*i.options.speedMultiplier;var g=i.__maxScrollTop;d>g||0>d?i.options.bouncing||i.__refreshHeight&&0>d?(d+=l/2*i.options.speedMultiplier,i.__enableScrollX||null==i.__refreshHeight||(0>d?(i.__refreshHidden=!1,i.__refreshShow()):(i.__refreshHide(),i.__refreshHidden=!0),!i.__refreshActive&&d<=-i.__refreshHeight?(i.__refreshActive=!0,i.__refreshActivate&&i.__refreshActivate()):i.__refreshActive&&d>-i.__refreshHeight&&(i.__refreshActive=!1,i.__refreshDeactivate&&i.__refreshDeactivate()))):d=d>g?g:0:i.__refreshHeight&&!i.__refreshHidden&&(i.__refreshHide(),i.__refreshHidden=!0)}o.length>60&&o.splice(0,30),o.push(c,d,t),i.__publish(c,d,u)}else{var v=i.options.locking?3:0,_=5,w=Math.abs(r-i.__initialTouchLeft),T=Math.abs(a-i.__initialTouchTop);i.__enableScrollX=i.options.scrollingX&&w>=v,i.__enableScrollY=i.options.scrollingY&&T>=v,o.push(i.__scrollLeft,i.__scrollTop,t),i.__isDragging=(i.__enableScrollX||i.__enableScrollY)&&(w>=_||T>=_),i.__isDragging&&(i.__interruptedAnimation=!1,i.__fadeScrollbars("in"))}i.__lastTouchLeft=r,i.__lastTouchTop=a,i.__lastTouchMove=t,i.__lastScale=n}},doTouchEnd:function(t,n){n instanceof Date&&(n=n.valueOf()),"number"!=typeof n&&(n=Date.now());var i=this;if(i.__isTracking){if(i.__isTracking=!1,i.__isDragging)if(i.__isDragging=!1,i.__isSingleTouch&&i.options.animating&&n-i.__lastTouchMove<=100){for(var r=i.__positions,a=r.length-1,o=a,s=a;s>0&&r[s]>i.__lastTouchMove-100;s-=3)o=s;
+if(o!==a){var l=r[a]-r[o],c=i.__scrollLeft-r[o-2],d=i.__scrollTop-r[o-1];i.__decelerationVelocityX=c/l*(1e3/60),i.__decelerationVelocityY=d/l*(1e3/60);var u=i.options.paging||i.options.snapping?i.options.decelVelocityThresholdPaging:i.options.decelVelocityThreshold;(Math.abs(i.__decelerationVelocityX)>u||Math.abs(i.__decelerationVelocityY)>u)&&(i.__refreshActive||i.__startDeceleration(n))}else i.__scrollingComplete()}else n-i.__lastTouchMove>100&&i.__scrollingComplete();else i.__decStopped&&(t.isTapHandled=!0,i.__decStopped=!1);if(!i.__isDecelerating)if(i.__refreshActive&&i.__refreshStart){i.__publish(i.__scrollLeft,-i.__refreshHeight,i.__zoomLevel,!0);var p=new Date;i.refreshStartTime=p.getTime(),i.__refreshStart&&i.__refreshStart(),e.Platform.isAndroid()||i.__startDeceleration()}else(i.__interruptedAnimation||i.__isDragging)&&i.__scrollingComplete(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0,i.__zoomLevel),i.__refreshActive&&(i.__refreshActive=!1,i.__refreshDeactivate&&i.__refreshDeactivate());i.__positions.length=0}},__publish:function(e,t,r,a,o){var s=this,l=s.__isAnimating;if(l&&(me.effect.Animate.stop(l),s.__isAnimating=!1),a&&s.options.animating){s.__scheduledLeft=e,s.__scheduledTop=t,s.__scheduledZoom=r;var c=s.__scrollLeft,d=s.__scrollTop,u=s.__zoomLevel,p=e-c,h=t-d,f=r-u,m=function(e,t,n){n&&(s.__scrollLeft=c+p*e,s.__scrollTop=d+h*e,s.__zoomLevel=u+f*e,s.__callback&&s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel,o))},g=function(e){return s.__isAnimating===e},v=function(e,t,n){t===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||n)&&s.__scrollingComplete(),s.options.zooming&&s.__computeScrollMax()};s.__isAnimating=me.effect.Animate.start(m,g,v,s.options.animationDuration,l?n:i)}else s.__scheduledLeft=s.__scrollLeft=e,s.__scheduledTop=s.__scrollTop=t,s.__scheduledZoom=s.__zoomLevel=r,s.__callback&&s.__callback(e,t,r,o),s.options.zooming&&s.__computeScrollMax()},__computeScrollMax:function(e){var t=this;null==e&&(e=t.__zoomLevel),t.__maxScrollLeft=Math.max(t.__contentWidth*e-t.__clientWidth,0),t.__maxScrollTop=Math.max(t.__contentHeight*e-t.__clientHeight,0),t.__didWaitForSize||t.__maxScrollLeft||t.__maxScrollTop||(t.__didWaitForSize=!0,t.__waitForSize())},__waitForSize:function(){var e=this;clearTimeout(e.__sizerTimeout);var t=function(){e.resize(!0)};t(),e.__sizerTimeout=setTimeout(t,500)},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),n=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),i=e.__clientWidth,r=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/i)*i,e.__minDecelerationScrollTop=Math.floor(n/r)*r,e.__maxDecelerationScrollLeft=Math.ceil(t/i)*i,e.__maxDecelerationScrollTop=Math.ceil(n/r)*r}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop,e.__refreshActive&&(e.__minDecelerationScrollTop=-1*e.__refreshHeight);var a=function(t,n,i){e.__stepThroughDeceleration(i)};e.__minVelocityToKeepDecelerating=e.options.snapping?4:.1;var o=function(){var t=Math.abs(e.__decelerationVelocityX)>=e.__minVelocityToKeepDecelerating||Math.abs(e.__decelerationVelocityY)>=e.__minVelocityToKeepDecelerating;return t||(e.__didDecelerationComplete=!0,e.options.bouncing&&!e.__refreshActive&&e.scrollTo(Math.min(Math.max(e.__scrollLeft,0),e.__maxScrollLeft),Math.min(Math.max(e.__scrollTop,0),e.__maxScrollTop),e.__refreshActive)),t},s=function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollingComplete(),e.options.paging&&e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)};e.__isDecelerating=me.effect.Animate.start(a,o,s)},__stepThroughDeceleration:function(e){var t=this,n=t.__scrollLeft+t.__decelerationVelocityX,i=t.__scrollTop+t.__decelerationVelocityY;if(!t.options.bouncing){var r=Math.max(Math.min(t.__maxDecelerationScrollLeft,n),t.__minDecelerationScrollLeft);r!==n&&(n=r,t.__decelerationVelocityX=0);var a=Math.max(Math.min(t.__maxDecelerationScrollTop,i),t.__minDecelerationScrollTop);a!==i&&(i=a,t.__decelerationVelocityY=0)}if(e?t.__publish(n,i,t.__zoomLevel):(t.__scrollLeft=n,t.__scrollTop=i),!t.options.paging){var o=t.options.deceleration;t.__decelerationVelocityX*=o,t.__decelerationVelocityY*=o}if(t.options.bouncing){var s=0,l=0,c=t.options.penetrationDeceleration,d=t.options.penetrationAcceleration;if(n<t.__minDecelerationScrollLeft?s=t.__minDecelerationScrollLeft-n:n>t.__maxDecelerationScrollLeft&&(s=t.__maxDecelerationScrollLeft-n),i<t.__minDecelerationScrollTop?l=t.__minDecelerationScrollTop-i:i>t.__maxDecelerationScrollTop&&(l=t.__maxDecelerationScrollTop-i),0!==s){var u=s*t.__decelerationVelocityX<=t.__minDecelerationScrollLeft;u&&(t.__decelerationVelocityX+=s*c);var p=Math.abs(t.__decelerationVelocityX)<=t.__minVelocityToKeepDecelerating;(!u||p)&&(t.__decelerationVelocityX=s*d)}if(0!==l){var h=l*t.__decelerationVelocityY<=t.__minDecelerationScrollTop;h&&(t.__decelerationVelocityY+=l*c);var f=Math.abs(t.__decelerationVelocityY)<=t.__minVelocityToKeepDecelerating;(!h||f)&&(t.__decelerationVelocityY=l*d)}}},__getDistance:function(e,t){var n=t.pageX-e.pageX,i=t.pageY-e.pageY;return Math.sqrt(n*n+i*i)},__getScale:function(e,t){return e.length>=2&&t.length>=2?this.__getDistance(t[0],t[1])/this.__getDistance(e[0],e[1]):1}}),e.scroll={isScrolling:!1,lastTop:0}}(ionic),function(e){var t=function(){},n=function(e){};e.views.ScrollNative=e.views.View.inherit({initialize:function(t){var n=this;n.__container=n.el=t.el,n.__content=t.el.firstElementChild,n.__frozen=!1,n.isNative=!0,n.__scrollTop=n.el.scrollTop,n.__scrollLeft=n.el.scrollLeft,n.__clientHeight=n.__content.clientHeight,n.__clientWidth=n.__content.clientWidth,n.__maxScrollTop=Math.max(n.__contentHeight-n.__clientHeight,0),n.__maxScrollLeft=Math.max(n.__contentWidth-n.__clientWidth,0),(t.startY>=0||t.startX>=0)&&e.requestAnimationFrame(function(){n.__originalContainerHeight=n.el.getBoundingClientRect().height,n.el.scrollTop=t.startY||0,n.el.scrollLeft=t.startX||0,n.__scrollTop=n.el.scrollTop,n.__scrollLeft=n.el.scrollLeft}),n.options={freeze:!1,getContentWidth:function(){return Math.max(n.__content.scrollWidth,n.__content.offsetWidth)},getContentHeight:function(){return Math.max(n.__content.scrollHeight,n.__content.offsetHeight+2*n.__content.offsetTop)}};for(var i in t)n.options[i]=t[i];n.onScroll=function(){e.scroll.isScrolling||(e.scroll.isScrolling=!0),clearTimeout(n.scrollTimer),n.scrollTimer=setTimeout(function(){e.scroll.isScrolling=!1},80)},n.freeze=function(e){n.__frozen=e},n.freezeShut=function(e){n.__frozenShut=e},n.__initEventHandlers()},__callback:function(){n("__callback")},zoomTo:function(){n("zoomTo")},zoomBy:function(){n("zoomBy")},activatePullToRefresh:function(){n("activatePullToRefresh")},resize:function(e){var t=this;t.__container&&t.options&&t.setDimensions(t.__container.clientWidth,t.__container.clientHeight,t.options.getContentWidth(),t.options.getContentHeight(),e)},run:function(){this.resize()},getValues:function(){var e=this;return e.update(),{left:e.__scrollLeft,top:e.__scrollTop,zoom:1}},update:function(){var e=this;e.__scrollLeft=e.el.scrollLeft,e.__scrollTop=e.el.scrollTop},setDimensions:function(e,t,n,i){var r=this;(e||t||n||i)&&(e===+e&&(r.__clientWidth=e),t===+t&&(r.__clientHeight=t),n===+n&&(r.__contentWidth=n),i===+i&&(r.__contentHeight=i),r.__computeScrollMax())},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},scrollBy:function(e,t,n){var i=this;i.update();var r=i.__isAnimating?i.__scheduledLeft:i.__scrollLeft,a=i.__isAnimating?i.__scheduledTop:i.__scrollTop;i.scrollTo(r+(e||0),a+(t||0),n)},scrollTo:function(t,n,i){function r(t,n){function i(e){return--e*e*e+1}function r(){var p=Date.now(),h=Math.min(1,(p-l)/c),f=i(h);d!=t&&(a.el.scrollTop=parseInt(f*(t-d)+d,10)),u!=n&&(a.el.scrollLeft=parseInt(f*(n-u)+u,10)),1>h?e.requestAnimationFrame(r):(e.tap.removeClonedInputs(a.__container,a),a.el.style.overflowX=o,a.el.style.overflowY=s,a.resize())}var l=Date.now(),c=250,d=a.el.scrollTop,u=a.el.scrollLeft;return d===t&&u===n?(a.el.style.overflowX=o,a.el.style.overflowY=s,void a.resize()):void e.requestAnimationFrame(r)}var a=this;if(!i)return a.el.scrollTop=n,a.el.scrollLeft=t,void a.resize();var o=a.el.style.overflowX,s=a.el.style.overflowY;clearTimeout(a.__scrollToCleanupTimeout),a.__scrollToCleanupTimeout=setTimeout(function(){a.el.style.overflowX=o,a.el.style.overflowY=s},500),a.el.style.overflowY="hidden",a.el.style.overflowX="hidden",r(n,t)},__waitForSize:function(){var e=this;clearTimeout(e.__sizerTimeout);var t=function(){e.resize(!0)};t(),e.__sizerTimeout=setTimeout(t,500)},__computeScrollMax:function(){var e=this;e.__maxScrollLeft=Math.max(e.__contentWidth-e.__clientWidth,0),e.__maxScrollTop=Math.max(e.__contentHeight-e.__clientHeight,0),e.__didWaitForSize||e.__maxScrollLeft||e.__maxScrollTop||(e.__didWaitForSize=!0,e.__waitForSize())},__initEventHandlers:function(){var t,n,i=this,r=i.__container;i.scrollChildIntoView=function(a){var o=r.getBoundingClientRect();i.__originalContainerHeight||(i.__originalContainerHeight=o.height),t=i.__originalContainerHeight;var s=i.isShrunkForKeyboard,l=r.parentNode.classList.contains("modal"),c=r.parentNode.classList.contains("popover"),d=l&&window.innerWidth>=680,u=n&&n!==a.detail.keyboardHeight;(!s||u)&&(!c&&(e.Platform.isIOS()||e.Platform.isFullScreen||d)&&e.requestAnimationFrame(function(){t=Math.max(0,Math.min(i.__originalContainerHeight,i.__originalContainerHeight-(a.detail.keyboardHeight-43))),r.style.height=t+"px",r.classList.add("keyboard-up"),i.resize()}),i.isShrunkForKeyboard=!0),n=a.detail.keyboardHeight,a.detail.isElementUnderKeyboard&&e.requestAnimationFrame(function(){var t=e.DomUtil.getOffsetTop(a.detail.target);setTimeout(function(){e.Platform.isIOS()&&e.tap.cloneFocusedInput(r,i),i.scrollTo(0,t-(o.top+100),!0),i.onScroll()},32)}),a.stopPropagation()},i.resetScrollView=function(){i.isShrunkForKeyboard&&(i.isShrunkForKeyboard=!1,r.style.height="",i.__originalContainerHeight=r.getBoundingClientRect().height,e.Platform.isIOS()&&e.requestAnimationFrame(function(){r.classList.remove("keyboard-up")})),i.resize()},i.handleTouchMove=function(e){return i.__frozenShut?(e.preventDefault(),e.stopPropagation(),!1):i.__frozen?(e.preventDefault(),!1):!0},r.addEventListener("scroll",i.onScroll),r.addEventListener("scrollChildIntoView",i.scrollChildIntoView),r.addEventListener(e.EVENTS.touchstart,i.handleTouchMove),r.addEventListener(e.EVENTS.touchmove,i.handleTouchMove),document.addEventListener("resetScrollView",i.resetScrollView)},__cleanup:function(){var n=this,i=n.__container;i.removeEventListener("scroll",n.onScroll),i.removeEventListener("scrollChildIntoView",n.scrollChildIntoView),i.removeEventListener(e.EVENTS.touchstart,n.handleTouchMove),i.removeEventListener(e.EVENTS.touchmove,n.handleTouchMove),document.removeEventListener("resetScrollView",n.resetScrollView),e.tap.removeClonedInputs(i,n),delete n.__container,delete n.__content,delete n.__indicatorX,delete n.__indicatorY,delete n.options.el,n.resize=n.scrollTo=n.onScroll=n.resetScrollView=t,n.scrollChildIntoView=t,i=null}})}(ionic),function(e){"use strict";var t="item",n="item-content",i="item-sliding",r="item-options",a="item-placeholder",o="item-reordering",s="item-reorder",l=function(){};l.prototype={start:function(){},drag:function(){},end:function(){},isSameItem:function(){return!1}};var c=function(e){this.dragThresholdX=e.dragThresholdX||10,this.el=e.el,this.item=e.item,this.canSwipe=e.canSwipe};c.prototype=new l,c.prototype.start=function(a){var o,s,l,c;this.canSwipe()&&(o=a.target.classList.contains(n)?a.target:a.target.classList.contains(t)?a.target.querySelector("."+n):e.DomUtil.getParentWithClass(a.target,n),o&&(o.classList.remove(i),l=parseFloat(o.style[e.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,s=o.parentNode.querySelector("."+r),s&&(s.classList.remove("invisible"),c=s.offsetWidth,this._currentDrag={buttons:s,buttonsWidth:c,content:o,startOffsetX:l})))},c.prototype.isSameItem=function(e){return e._lastDrag&&this._currentDrag?this._currentDrag.content==e._lastDrag.content:!1},c.prototype.clean=function(t){function n(){i.buttons&&i.buttons.classList.add("invisible")}var i=this._lastDrag;i&&i.content&&(i.content.style[e.CSS.TRANSITION]="",i.content.style[e.CSS.TRANSFORM]="",t?(i.content.style[e.CSS.TRANSITION]="none",n(),e.requestAnimationFrame(function(){i.content.style[e.CSS.TRANSITION]=""})):e.requestAnimationFrame(function(){setTimeout(n,250)}))},c.prototype.drag=e.animationFrameThrottle(function(t){var n;if(this._currentDrag&&(!this._isDragging&&(Math.abs(t.gesture.deltaX)>this.dragThresholdX||Math.abs(this._currentDrag.startOffsetX)>0)&&(this._isDragging=!0),this._isDragging)){n=this._currentDrag.buttonsWidth;var i=Math.min(0,this._currentDrag.startOffsetX+t.gesture.deltaX);-n>i&&(i=Math.min(-n,-n+.4*(t.gesture.deltaX+n))),this._currentDrag.content.$$ionicOptionsOpen=0!==i,this._currentDrag.content.style[e.CSS.TRANSFORM]="translate3d("+i+"px, 0, 0)",this._currentDrag.content.style[e.CSS.TRANSITION]="none"}}),c.prototype.end=function(t,n){var i=this;if(!i._currentDrag)return void(n&&n());var r=-i._currentDrag.buttonsWidth;t.gesture.deltaX>-(i._currentDrag.buttonsWidth/2)&&("left"==t.gesture.direction&&Math.abs(t.gesture.velocityX)<.3?r=0:"right"==t.gesture.direction&&(r=0)),e.requestAnimationFrame(function(){if(0===r){i._currentDrag.content.style[e.CSS.TRANSFORM]="";var t=i._currentDrag.buttons;setTimeout(function(){t&&t.classList.add("invisible")},250)}else i._currentDrag.content.style[e.CSS.TRANSFORM]="translate3d("+r+"px,0,0)";i._currentDrag.content.style[e.CSS.TRANSITION]="",i._lastDrag||(i._lastDrag={}),e.extend(i._lastDrag,i._currentDrag),i._currentDrag&&(i._currentDrag.buttons=null,i._currentDrag.content=null),i._currentDrag=null,n&&n()})};var d=function(e){var t=this;if(t.dragThresholdY=e.dragThresholdY||0,t.onReorder=e.onReorder,t.listEl=e.listEl,t.el=t.item=e.el,t.scrollEl=e.scrollEl,t.scrollView=e.scrollView,t.listElTrueTop=0,t.listEl.offsetParent){var n=t.listEl;do t.listElTrueTop+=n.offsetTop,n=n.offsetParent;while(n)}};d.prototype=new l,d.prototype._moveElement=function(t){var n=t.gesture.center.pageY+this.scrollView.getValues().top-this._currentDrag.elementHeight/2-this.listElTrueTop;this.el.style[e.CSS.TRANSFORM]="translate3d(0, "+n+"px, 0)"},d.prototype.deregister=function(){this.listEl=this.el=this.scrollEl=this.scrollView=null},d.prototype.start=function(t){var n=e.DomUtil.getChildIndex(this.el,this.el.nodeName.toLowerCase()),i=this.el.scrollHeight,r=this.el.cloneNode(!0);r.classList.add(a),this.el.parentNode.insertBefore(r,this.el),this.el.classList.add(o),this._currentDrag={elementHeight:i,startIndex:n,placeholder:r,scrollHeight:scroll,list:r.parentNode},this._moveElement(t)},d.prototype.drag=e.animationFrameThrottle(function(t){var n=this;if(this._currentDrag){var i=0,r=t.gesture.center.pageY,a=this.listElTrueTop;if(this.scrollView){var o=this.scrollView.__container;i=this.scrollView.getValues().top;var s=o.offsetTop,l=s-r+this._currentDrag.elementHeight/2,c=r+this._currentDrag.elementHeight/2-s-o.offsetHeight;t.gesture.deltaY<0&&l>0&&i>0&&(this.scrollView.scrollBy(null,-l),e.requestAnimationFrame(function(){n.drag(t)})),t.gesture.deltaY>0&&c>0&&i<this.scrollView.getScrollMax().top&&(this.scrollView.scrollBy(null,c),e.requestAnimationFrame(function(){n.drag(t)}))}!this._isDragging&&Math.abs(t.gesture.deltaY)>this.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(t),this._currentDrag.currentY=i+r-a)}}),d.prototype._getReorderIndex=function(){for(var e,t=this,n=Array.prototype.slice.call(t._currentDrag.placeholder.parentNode.children).filter(function(e){return e.nodeName===t.el.nodeName&&e!==t.el}),i=t._currentDrag.currentY,r=0,a=n.length;a>r;r++)if(e=n[r],r===a-1){if(i>e.offsetTop)return r}else if(0===r){if(i<e.offsetTop+e.offsetHeight)return r}else if(i>e.offsetTop-e.offsetHeight/2&&i<e.offsetTop+e.offsetHeight)return r;return t._currentDrag.startIndex},d.prototype.end=function(t,n){if(!this._currentDrag)return void(n&&n());var i=this._currentDrag.placeholder,r=this._getReorderIndex();this.el.classList.remove(o),this.el.style[e.CSS.TRANSFORM]="",i.parentNode.insertBefore(this.el,i),i.parentNode.removeChild(i),this.onReorder&&this.onReorder(this.el,this._currentDrag.startIndex,r),this._currentDrag={placeholder:null,content:null},this._currentDrag=null,n&&n()},e.views.ListView=e.views.View.inherit({initialize:function(t){var n=this;t=e.extend({onReorder:function(){},virtualRemoveThreshold:-200,virtualAddThreshold:200,canSwipe:function(){return!0}},t),e.extend(n,t),!n.itemHeight&&n.listEl&&(n.itemHeight=n.listEl.children[0]&&parseInt(n.listEl.children[0].style.height,10)),n.onRefresh=t.onRefresh||function(){},n.onRefreshOpening=t.onRefreshOpening||function(){},n.onRefreshHolding=t.onRefreshHolding||function(){};var i={};e.DomUtil.getParentOrSelfWithClass(n.el,"overflow-scroll")&&(i.prevent_default_directions=["left","right"]),window.ionic.onGesture("release",function(e){n._handleEndDrag(e)},n.el,i),window.ionic.onGesture("drag",function(e){n._handleDrag(e)},n.el,i),n._initDrag()},deregister:function(){this.el=this.listEl=this.scrollEl=this.scrollView=null,this.isScrollFreeze&&self.scrollView.freeze(!1)},stopRefreshing:function(){var e=this.el.querySelector(".list-refresher");e.style.height="0"},didScroll:function(e){var t=this;if(t.isVirtual){var n=t.itemHeight,i=e.target.scrollHeight,r=t.el.parentNode.offsetHeight,a=Math.max(0,e.scrollTop+t.virtualRemoveThreshold),o=Math.min(i,Math.abs(e.scrollTop)+r+t.virtualAddThreshold),s=parseInt(Math.abs(a/n),10),l=parseInt(Math.abs(o/n),10);t._virtualItemsToRemove=Array.prototype.slice.call(t.listEl.children,0,s),t.renderViewport&&t.renderViewport(a,o,s,l)}},didStopScrolling:function(){if(this.isVirtual)for(var e=0;e<this._virtualItemsToRemove.length;e++)this.didHideItem&&this.didHideItem(e)},clearDragEffects:function(e){this._lastDragOp&&(this._lastDragOp.clean&&this._lastDragOp.clean(e),this._lastDragOp.deregister&&this._lastDragOp.deregister(),this._lastDragOp=null)},_initDrag:function(){this._lastDragOp&&this._lastDragOp.deregister&&this._lastDragOp.deregister(),this._lastDragOp=this._dragOp,this._dragOp=null},_getItem:function(e){for(;e;){if(e.classList&&e.classList.contains(t))return e;e=e.parentNode}return null},_startDrag:function(t){var n=this;n._isDragging=!1;var i,r=n._lastDragOp;n._didDragUpOrDown&&r instanceof c&&r.clean&&r.clean(),!e.DomUtil.getParentOrSelfWithClass(t.target,s)||"up"!=t.gesture.direction&&"down"!=t.gesture.direction?!n._didDragUpOrDown&&("left"==t.gesture.direction||"right"==t.gesture.direction)&&Math.abs(t.gesture.deltaX)>5&&(i=n._getItem(t.target),i&&i.querySelector(".item-options")&&(n._dragOp=new c({el:n.el,item:i,canSwipe:n.canSwipe}),n._dragOp.start(t),t.preventDefault(),n.isScrollFreeze=n.scrollView.freeze(!0))):(i=n._getItem(t.target),i&&(n._dragOp=new d({listEl:n.el,el:i,scrollEl:n.scrollEl,scrollView:n.scrollView,onReorder:function(e,t,i){n.onReorder&&n.onReorder(e,t,i)}}),n._dragOp.start(t),t.preventDefault())),r&&n._dragOp&&!n._dragOp.isSameItem(r)&&t.defaultPrevented&&r.clean&&r.clean()},_handleEndDrag:function(e){var t=this;t.scrollView&&(t.isScrollFreeze=t.scrollView.freeze(!1)),t._didDragUpOrDown=!1,t._dragOp&&t._dragOp.end(e,function(){t._initDrag()})},_handleDrag:function(e){var t=this;Math.abs(e.gesture.deltaY)>5&&(t._didDragUpOrDown=!0),t.isDragging||t._dragOp||t._startDrag(e),t._dragOp&&(e.gesture.srcEvent.preventDefault(),t._dragOp.drag(e))}})}(ionic),function(e){"use strict";e.views.Modal=e.views.View.inherit({initialize:function(t){t=e.extend({focusFirstInput:!1,unfocusOnHide:!0,focusFirstDelay:600,backdropClickToClose:!0,hardwareBackButtonClose:!0},t),e.extend(this,t),this.el=t.el},show:function(){var e=this;e.focusFirstInput&&window.setTimeout(function(){var t=e.el.querySelector("input, textarea");t&&t.focus&&t.focus()},e.focusFirstDelay)},hide:function(){if(this.unfocusOnHide){var e=this.el.querySelectorAll("input, textarea");window.setTimeout(function(){for(var t=0;t<e.length;t++)e[t].blur&&e[t].blur()})}}})}(ionic),function(e){"use strict";e.views.SideMenu=e.views.View.inherit({initialize:function(e){this.el=e.el,this.isEnabled="undefined"==typeof e.isEnabled?!0:e.isEnabled,this.setWidth(e.width)},getFullWidth:function(){return this.width},setWidth:function(e){this.width=e,this.el.style.width=e+"px"},setIsEnabled:function(e){this.isEnabled=e},bringUp:function(){"0"!==this.el.style.zIndex&&(this.el.style.zIndex="0")},pushDown:function(){"-1"!==this.el.style.zIndex&&(this.el.style.zIndex="-1")}}),e.views.SideMenuContent=e.views.View.inherit({initialize:function(t){e.extend(this,{animationClass:"menu-animated",onDrag:function(){},onEndDrag:function(){}},t),e.onGesture("drag",e.proxy(this._onDrag,this),this.el),e.onGesture("release",e.proxy(this._onEndDrag,this),this.el)},_onDrag:function(e){this.onDrag&&this.onDrag(e)},_onEndDrag:function(e){this.onEndDrag&&this.onEndDrag(e)},disableAnimation:function(){this.el.classList.remove(this.animationClass)},enableAnimation:function(){this.el.classList.add(this.animationClass)},getTranslateX:function(){return parseFloat(this.el.style[e.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])},setTranslateX:e.animationFrameThrottle(function(t){this.el.style[e.CSS.TRANSFORM]="translate3d("+t+"px, 0, 0)"})})}(ionic),function(e){"use strict";e.views.Slider=e.views.View.inherit({initialize:function(e){function t(){if(b.offsetWidth){S=D.children,x=S.length,S.length<2&&(e.continuous=!1),T.transitions&&e.continuous&&S.length<3&&(D.appendChild(S[0].cloneNode(!0)),D.appendChild(D.children[1].cloneNode(!0)),S=D.children),y=new Array(S.length),E=b.offsetWidth||b.getBoundingClientRect().width,D.style.width=S.length*E+"px";for(var t=S.length;t--;){var n=S[t];n.style.width=E+"px",n.setAttribute("data-index",t),T.transitions&&(n.style.left=t*-E+"px",o(t,M>t?-E:t>M?E:0,0))}e.continuous&&T.transitions&&(o(r(M-1),-E,0),o(r(M+1),E,0)),T.transitions||(D.style.left=M*-E+"px"),b.style.visibility="visible",e.slidesChanged&&e.slidesChanged()}}function n(t){e.continuous?a(M-1,t):M&&a(M-1,t)}function i(t){e.continuous?a(M+1,t):M<S.length-1&&a(M+1,t)}function r(e){return(S.length+e%S.length)%S.length}function a(t,n){if(M!=t){if(!S)return void(M=t);if(T.transitions){var i=Math.abs(M-t)/(M-t);if(e.continuous){var a=i;i=-y[r(t)]/E,i!==a&&(t=-i*S.length+t)}for(var s=Math.abs(M-t)-1;s--;)o(r((t>M?t:M)-s-1),E*i,0);t=r(t),o(M,E*i,n||C),o(t,0,n||C),e.continuous&&o(r(t-i),-(E*i),0)}else t=r(t),l(M*-E,t*-E,n||C);M=t,w(e.callback&&e.callback(M,S[M]))}}function o(e,t,n){s(e,t,n),y[e]=t}function s(e,t,n){var i=S[e],r=i&&i.style;r&&(r.webkitTransitionDuration=r.MozTransitionDuration=r.msTransitionDuration=r.OTransitionDuration=r.transitionDuration=n+"ms",r.webkitTransform="translate("+t+"px,0)translateZ(0)",r.msTransform=r.MozTransform=r.OTransform="translateX("+t+"px)")}function l(t,n,i){if(!i)return void(D.style.left=n+"px");var r=+new Date,a=setInterval(function(){var o=+new Date-r;return o>i?(D.style.left=n+"px",I&&c(),e.transitionEnd&&e.transitionEnd.call(event,M,S[M]),void clearInterval(a)):void(D.style.left=(n-t)*(Math.floor(o/i*100)/100)+t+"px")},4)}function c(){L=setTimeout(i,I)}function d(){I=e.auto||0,clearTimeout(L)}var u,p,h,f=this;window.navigator.pointerEnabled?(u="pointerdown",p="pointermove",h="pointerup"):window.navigator.msPointerEnabled?(u="MSPointerDown",p="MSPointerMove",h="MSPointerUp"):(u="touchstart",p="touchmove",h="touchend");var m="mousedown",g="mousemove",v="mouseup",_=function(){},w=function(e){setTimeout(e||_,0)},T={addEventListener:!!window.addEventListener,transitions:function(e){var t=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in t)if(void 0!==e.style[t[n]])return!0;return!1}(document.createElement("swipe"))},b=e.el;if(b){var S,y,E,x,D=b.children[0];e=e||{};var M=parseInt(e.startSlide,10)||0,C=e.speed||300;e.continuous=void 0!==e.continuous?e.continuous:!0;var L,P,I=e.auto||0,k={},N={},z={handleEvent:function(n){switch(!n.touches&&n.pageX&&n.pageY&&(n.touches=[{pageX:n.pageX,pageY:n.pageY}]),n.type){case u:this.start(n);break;case m:this.start(n);break;case p:this.touchmove(n);break;case g:this.touchmove(n);break;case h:w(this.end(n));break;case v:w(this.end(n));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":w(this.transitionEnd(n));break;case"resize":w(t)}e.stopPropagation&&n.stopPropagation()},start:function(e){if(e.touches){var t=e.touches[0];k={x:t.pageX,y:t.pageY,time:+new Date},P=void 0,N={},D.addEventListener(p,this,!1),D.addEventListener(g,this,!1),D.addEventListener(h,this,!1),D.addEventListener(v,this,!1),document.addEventListener(h,this,!1),document.addEventListener(v,this,!1)}},touchmove:function(t){if(!(!t.touches||t.touches.length>1||t.scale&&1!==t.scale||f.slideIsDisabled)){e.disableScroll&&t.preventDefault();var n=t.touches[0];N={x:n.pageX-k.x,y:n.pageY-k.y},"undefined"==typeof P&&(P=!!(P||Math.abs(N.x)<Math.abs(N.y))),P||(t.preventDefault(),d(),e.continuous?(s(r(M-1),N.x+y[r(M-1)],0),s(M,N.x+y[M],0),s(r(M+1),N.x+y[r(M+1)],0)):(e.bouncing?N.x=N.x/(!M&&N.x>0||M==S.length-1&&N.x<0?Math.abs(N.x)/E+1:1):(E*M-N.x<0&&(N.x=Math.min(N.x,E*M)),Math.abs(N.x)>E*(S.length-M-1)&&(N.x=Math.max(-E*(S.length-M-1),N.x))),s(M-1,N.x+y[M-1],0),s(M,N.x+y[M],0),s(M+1,N.x+y[M+1],0)),e.onDrag&&e.onDrag())}},end:function(){var t=+new Date-k.time,n=Number(t)<250&&Math.abs(N.x)>20||Math.abs(N.x)>E/2,i=!M&&N.x>0||M==S.length-1&&N.x<0;e.continuous&&(i=!1);var a=N.x<0;P||(n&&!i?(a?(e.continuous?(o(r(M-1),-E,0),o(r(M+2),E,0)):o(M-1,-E,0),o(M,y[M]-E,C),o(r(M+1),y[r(M+1)]-E,C),M=r(M+1)):(e.continuous?(o(r(M+1),E,0),o(r(M-2),-E,0)):o(M+1,E,0),o(M,y[M]+E,C),o(r(M-1),y[r(M-1)]+E,C),M=r(M-1)),e.callback&&e.callback(M,S[M])):e.continuous?(o(r(M-1),-E,C),o(M,0,C),o(r(M+1),E,C)):(o(M-1,-E,C),o(M,0,C),o(M+1,E,C))),D.removeEventListener(p,z,!1),D.removeEventListener(g,z,!1),D.removeEventListener(h,z,!1),D.removeEventListener(v,z,!1),document.removeEventListener(h,z,!1),document.removeEventListener(v,z,!1),e.onDragEnd&&e.onDragEnd()},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)==M&&(I&&c(),e.transitionEnd&&e.transitionEnd.call(t,M,S[M]))}};this.update=function(){setTimeout(t)},this.setup=function(){t()},this.loop=function(t){return arguments.length&&(e.continuous=!!t),e.continuous},this.enableSlide=function(e){return arguments.length&&(this.slideIsDisabled=!e),!this.slideIsDisabled},this.slide=this.select=function(e,t){d(),a(e,t)},this.prev=this.previous=function(){d(),n()},this.next=function(){d(),i()},this.stop=function(){d()},this.start=function(){c()},this.autoPlay=function(e){!I||0>I?d():(I=e,c())},this.currentIndex=this.selected=function(){return M},this.slidesCount=this.count=function(){return x},this.kill=function(){d(),D.style.width="",D.style.left="",S&&(S=[]),T.addEventListener?(D.removeEventListener(u,z,!1),D.removeEventListener(m,z,!1),D.removeEventListener("webkitTransitionEnd",z,!1),D.removeEventListener("msTransitionEnd",z,!1),D.removeEventListener("oTransitionEnd",z,!1),D.removeEventListener("otransitionend",z,!1),D.removeEventListener("transitionend",z,!1),window.removeEventListener("resize",z,!1)):window.onresize=null},this.load=function(){t(),I&&c(),T.addEventListener?(D.addEventListener(u,z,!1),D.addEventListener(m,z,!1),T.transitions&&(D.addEventListener("webkitTransitionEnd",z,!1),D.addEventListener("msTransitionEnd",z,!1),D.addEventListener("oTransitionEnd",z,!1),D.addEventListener("otransitionend",z,!1),D.addEventListener("transitionend",z,!1)),window.addEventListener("resize",z,!1)):window.onresize=function(){t()}}}}})}(ionic),function(){"use strict";function e(e){e.fn.swiper=function(t){var i;return e(this).each(function(){var e=new n(this,t);i||(i=e)}),i}}var t,n=function(e,r,a,o){function s(){return"horizontal"===y.params.direction}function l(e){return Math.floor(e)}function c(){y.autoplayTimeoutId=setTimeout(function(){y.params.loop?(y.fixLoop(),y._slideNext()):y.isEnd?r.autoplayStopOnLast?y.stopAutoplay():y._slideTo(0):y._slideNext()},y.params.autoplay)}function d(e,n){var i=t(e.target);if(!i.is(n))if("string"==typeof n)i=i.parents(n);else if(n.nodeType){var r;return i.parents().each(function(e,t){t===n&&(r=n)}),r?n:void 0}return 0===i.length?void 0:i[0]}function u(e,t){t=t||{};var n=window.MutationObserver||window.WebkitMutationObserver,i=new n(function(e){e.forEach(function(e){y.onResize(!0),y.emit("onObserverUpdate",y,e)})});i.observe(e,{attributes:"undefined"==typeof t.attributes?!0:t.attributes,childList:"undefined"==typeof t.childList?!0:t.childList,characterData:"undefined"==typeof t.characterData?!0:t.characterData}),y.observers.push(i)}function p(e){e.originalEvent&&(e=e.originalEvent);var t=e.keyCode||e.charCode;if(!y.params.allowSwipeToNext&&(s()&&39===t||!s()&&40===t))return!1;if(!y.params.allowSwipeToPrev&&(s()&&37===t||!s()&&38===t))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===t||39===t||38===t||40===t){var n=!1;if(y.container.parents(".swiper-slide").length>0&&0===y.container.parents(".swiper-slide-active").length)return;var i={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,a=window.innerHeight,o=y.container.offset();y.rtl&&(o.left=o.left-y.container[0].scrollLeft);for(var l=[[o.left,o.top],[o.left+y.width,o.top],[o.left,o.top+y.height],[o.left+y.width,o.top+y.height]],c=0;c<l.length;c++){var d=l[c];d[0]>=i.left&&d[0]<=i.left+r&&d[1]>=i.top&&d[1]<=i.top+a&&(n=!0)}if(!n)return}s()?((37===t||39===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===t&&!y.rtl||37===t&&y.rtl)&&y.slideNext(),(37===t&&!y.rtl||39===t&&y.rtl)&&y.slidePrev()):((38===t||40===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),40===t&&y.slideNext(),38===t&&y.slidePrev())}}function h(e){e.originalEvent&&(e=e.originalEvent);var t=y.mousewheel.event,n=0,i=y.rtl?-1:1;if(e.detail)n=-e.detail;else if("mousewheel"===t)if(y.params.mousewheelForceToAxis)if(s()){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;n=e.wheelDeltaX*i}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;n=e.wheelDeltaY}else n=Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)?-e.wheelDeltaX*i:-e.wheelDeltaY;else if("DOMMouseScroll"===t)n=-e.detail;else if("wheel"===t)if(y.params.mousewheelForceToAxis)if(s()){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;n=-e.deltaX*i}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;n=-e.deltaY}else n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX*i:-e.deltaY;if(0!==n){if(y.params.mousewheelInvert&&(n=-n),y.params.freeMode){var r=y.getWrapperTranslate()+n*y.params.mousewheelSensitivity,a=y.isBeginning,o=y.isEnd;if(r>=y.minTranslate()&&(r=y.minTranslate()),r<=y.maxTranslate()&&(r=y.maxTranslate()),y.setWrapperTransition(0),y.setWrapperTranslate(r),y.updateProgress(),y.updateActiveIndex(),(!a&&y.isBeginning||!o&&y.isEnd)&&y.updateClasses(),y.params.freeModeSticky&&(clearTimeout(y.mousewheel.timeout),y.mousewheel.timeout=setTimeout(function(){y.slideReset()},300)),0===r||r===y.maxTranslate())return}else{if((new window.Date).getTime()-y.mousewheel.lastScrollTime>60)if(0>n)if(y.isEnd&&!y.params.loop||y.animating){if(y.params.mousewheelReleaseOnEdges)return!0}else y.slideNext();else if(y.isBeginning&&!y.params.loop||y.animating){if(y.params.mousewheelReleaseOnEdges)return!0}else y.slidePrev();y.mousewheel.lastScrollTime=(new window.Date).getTime()}return y.params.autoplay&&y.stopAutoplay(),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function f(e,n){e=t(e);var i,r,a,o=y.rtl?-1:1;i=e.attr("data-swiper-parallax")||"0",
+r=e.attr("data-swiper-parallax-x"),a=e.attr("data-swiper-parallax-y"),r||a?(r=r||"0",a=a||"0"):s()?(r=i,a="0"):(a=i,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*n*o+"%":r*n*o+"px",a=a.indexOf("%")>=0?parseInt(a,10)*n+"%":a*n+"px",e.transform("translate3d("+r+", "+a+",0px)")}function m(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof n))return new n(e,r);var g={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,hashnav:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationHiddenClass:"swiper-pagination-hidden",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},v=r&&r.virtualTranslate;r=r||{};var _={};for(var w in r)if("object"!=typeof r[w]||(r[w].nodeType||r[w]===window||r[w]===document||"undefined"!=typeof i&&r[w]instanceof i||"undefined"!=typeof jQuery&&r[w]instanceof jQuery))_[w]=r[w];else{_[w]={};for(var T in r[w])_[w][T]=r[w][T]}for(var b in g)if("undefined"==typeof r[b])r[b]=g[b];else if("object"==typeof r[b])for(var S in g[b])"undefined"==typeof r[b][S]&&(r[b][S]=g[b][S]);var y=this;if(y.params=r,y.originalParams=_,y.classNames=[],"undefined"!=typeof t&&"undefined"!=typeof i&&(t=i),("undefined"!=typeof t||(t="undefined"==typeof i?window.Dom7||window.Zepto||window.jQuery:i))&&(y.$=t,y.currentBreakpoint=void 0,y.getActiveBreakpoint=function(){if(!y.params.breakpoints)return!1;var e,t=!1,n=[];for(e in y.params.breakpoints)y.params.breakpoints.hasOwnProperty(e)&&n.push(e);n.sort(function(e,t){return parseInt(e,10)>parseInt(t,10)});for(var i=0;i<n.length;i++)e=n[i],e>=window.innerWidth&&!t&&(t=e);return t||"max"},y.setBreakpoint=function(){var e=y.getActiveBreakpoint();if(e&&y.currentBreakpoint!==e){var t=e in y.params.breakpoints?y.params.breakpoints[e]:y.originalParams;for(var n in t)y.params[n]=t[n];y.currentBreakpoint=e}},y.params.breakpoints&&y.setBreakpoint(),y.container=t(e),0!==y.container.length)){if(y.container.length>1)return void y.container.each(function(){new n(this,r)});y.container[0].swiper=y,y.container.data("swiper",y),y.classNames.push("swiper-container-"+y.params.direction),y.params.freeMode&&y.classNames.push("swiper-container-free-mode"),y.support.flexbox||(y.classNames.push("swiper-container-no-flexbox"),y.params.slidesPerColumn=1),y.params.autoHeight&&y.classNames.push("swiper-container-autoheight"),(y.params.parallax||y.params.watchSlidesVisibility)&&(y.params.watchSlidesProgress=!0),["cube","coverflow"].indexOf(y.params.effect)>=0&&(y.support.transforms3d?(y.params.watchSlidesProgress=!0,y.classNames.push("swiper-container-3d")):y.params.effect="slide"),"slide"!==y.params.effect&&y.classNames.push("swiper-container-"+y.params.effect),"cube"===y.params.effect&&(y.params.resistanceRatio=0,y.params.slidesPerView=1,y.params.slidesPerColumn=1,y.params.slidesPerGroup=1,y.params.centeredSlides=!1,y.params.spaceBetween=0,y.params.virtualTranslate=!0,y.params.setWrapperSize=!1),"fade"===y.params.effect&&(y.params.slidesPerView=1,y.params.slidesPerColumn=1,y.params.slidesPerGroup=1,y.params.watchSlidesProgress=!0,y.params.spaceBetween=0,"undefined"==typeof v&&(y.params.virtualTranslate=!0)),y.params.grabCursor&&y.support.touch&&(y.params.grabCursor=!1),y.wrapper=y.container.children("."+y.params.wrapperClass),y.params.pagination&&(y.paginationContainer=t(y.params.pagination),y.params.paginationClickable&&y.paginationContainer.addClass("swiper-pagination-clickable")),y.rtl=s()&&("rtl"===y.container[0].dir.toLowerCase()||"rtl"===y.container.css("direction")),y.rtl&&y.classNames.push("swiper-container-rtl"),y.rtl&&(y.wrongRTL="-webkit-box"===y.wrapper.css("display")),y.params.slidesPerColumn>1&&y.classNames.push("swiper-container-multirow"),y.device.android&&y.classNames.push("swiper-container-android"),y.container.addClass(y.classNames.join(" ")),y.translate=0,y.progress=0,y.velocity=0,y.lockSwipeToNext=function(){y.params.allowSwipeToNext=!1},y.lockSwipeToPrev=function(){y.params.allowSwipeToPrev=!1},y.lockSwipes=function(){y.params.allowSwipeToNext=y.params.allowSwipeToPrev=!1},y.unlockSwipeToNext=function(){y.params.allowSwipeToNext=!0},y.unlockSwipeToPrev=function(){y.params.allowSwipeToPrev=!0},y.unlockSwipes=function(){y.params.allowSwipeToNext=y.params.allowSwipeToPrev=!0},y.params.grabCursor&&(y.container[0].style.cursor="move",y.container[0].style.cursor="-webkit-grab",y.container[0].style.cursor="-moz-grab",y.container[0].style.cursor="grab"),y.imagesToLoad=[],y.imagesLoaded=0,y.loadImage=function(e,t,n,i,r){function a(){r&&r()}var o;e.complete&&i?a():t?(o=new window.Image,o.onload=a,o.onerror=a,n&&(o.srcset=n),t&&(o.src=t)):a()},y.preloadImages=function(){function e(){"undefined"!=typeof y&&null!==y&&(void 0!==y.imagesLoaded&&y.imagesLoaded++,y.imagesLoaded===y.imagesToLoad.length&&(y.params.updateOnImagesReady&&y.update(),y.emit("onImagesReady",y)))}y.imagesToLoad=y.container.find("img");for(var t=0;t<y.imagesToLoad.length;t++)y.loadImage(y.imagesToLoad[t],y.imagesToLoad[t].currentSrc||y.imagesToLoad[t].getAttribute("src"),y.imagesToLoad[t].srcset||y.imagesToLoad[t].getAttribute("srcset"),!0,e)},y.autoplayTimeoutId=void 0,y.autoplaying=!1,y.autoplayPaused=!1,y.startAutoplay=function(){return"undefined"!=typeof y.autoplayTimeoutId?!1:y.params.autoplay?y.autoplaying?!1:(y.autoplaying=!0,y.emit("onAutoplayStart",y),void c()):!1},y.stopAutoplay=function(e){y.autoplayTimeoutId&&(y.autoplayTimeoutId&&clearTimeout(y.autoplayTimeoutId),y.autoplaying=!1,y.autoplayTimeoutId=void 0,y.emit("onAutoplayStop",y))},y.pauseAutoplay=function(e){y.autoplayPaused||(y.autoplayTimeoutId&&clearTimeout(y.autoplayTimeoutId),y.autoplayPaused=!0,0===e?(y.autoplayPaused=!1,c()):y.wrapper.transitionEnd(function(){y&&(y.autoplayPaused=!1,y.autoplaying?c():y.stopAutoplay())}))},y.minTranslate=function(){return-y.snapGrid[0]},y.maxTranslate=function(){return-y.snapGrid[y.snapGrid.length-1]},y.updateAutoHeight=function(){var e=y.slides.eq(y.activeIndex)[0].offsetHeight;e&&y.wrapper.css("height",y.slides.eq(y.activeIndex)[0].offsetHeight+"px")},y.updateContainerSize=function(){var e,t;e="undefined"!=typeof y.params.width?y.params.width:y.container[0].clientWidth,t="undefined"!=typeof y.params.height?y.params.height:y.container[0].clientHeight,0===e&&s()||0===t&&!s()||(e=e-parseInt(y.container.css("padding-left"),10)-parseInt(y.container.css("padding-right"),10),t=t-parseInt(y.container.css("padding-top"),10)-parseInt(y.container.css("padding-bottom"),10),y.width=e,y.height=t,y.size=s()?y.width:y.height)},y.updateSlidesSize=function(){y.slides=y.wrapper.children("."+y.params.slideClass),y.snapGrid=[],y.slidesGrid=[],y.slidesSizesGrid=[];var e,t=y.params.spaceBetween,n=-y.params.slidesOffsetBefore,i=0,r=0;"string"==typeof t&&t.indexOf("%")>=0&&(t=parseFloat(t.replace("%",""))/100*y.size),y.virtualSize=-t,y.rtl?y.slides.css({marginLeft:"",marginTop:""}):y.slides.css({marginRight:"",marginBottom:""});var a;y.params.slidesPerColumn>1&&(a=Math.floor(y.slides.length/y.params.slidesPerColumn)===y.slides.length/y.params.slidesPerColumn?y.slides.length:Math.ceil(y.slides.length/y.params.slidesPerColumn)*y.params.slidesPerColumn,"auto"!==y.params.slidesPerView&&"row"===y.params.slidesPerColumnFill&&(a=Math.max(a,y.params.slidesPerView*y.params.slidesPerColumn)));var o,c=y.params.slidesPerColumn,d=a/c,u=d-(y.params.slidesPerColumn*d-y.slides.length);for(e=0;e<y.slides.length;e++){o=0;var p=y.slides.eq(e);if(y.params.slidesPerColumn>1){var h,f,m;"column"===y.params.slidesPerColumnFill?(f=Math.floor(e/c),m=e-f*c,(f>u||f===u&&m===c-1)&&++m>=c&&(m=0,f++),h=f+m*a/c,p.css({"-webkit-box-ordinal-group":h,"-moz-box-ordinal-group":h,"-ms-flex-order":h,"-webkit-order":h,order:h})):(m=Math.floor(e/d),f=e-m*d),p.css({"margin-top":0!==m&&y.params.spaceBetween&&y.params.spaceBetween+"px"}).attr("data-swiper-column",f).attr("data-swiper-row",m)}"none"!==p.css("display")&&("auto"===y.params.slidesPerView?(o=s()?p.outerWidth(!0):p.outerHeight(!0),y.params.roundLengths&&(o=l(o))):(o=(y.size-(y.params.slidesPerView-1)*t)/y.params.slidesPerView,y.params.roundLengths&&(o=l(o)),s()?y.slides[e].style.width=o+"px":y.slides[e].style.height=o+"px"),y.slides[e].swiperSlideSize=o,y.slidesSizesGrid.push(o),y.params.centeredSlides?(n=n+o/2+i/2+t,0===e&&(n=n-y.size/2-t),Math.abs(n)<.001&&(n=0),r%y.params.slidesPerGroup===0&&y.snapGrid.push(n),y.slidesGrid.push(n)):(r%y.params.slidesPerGroup===0&&y.snapGrid.push(n),y.slidesGrid.push(n),n=n+o+t),y.virtualSize+=o+t,i=o,r++)}y.virtualSize=Math.max(y.virtualSize,y.size)+y.params.slidesOffsetAfter;var g;if(y.rtl&&y.wrongRTL&&("slide"===y.params.effect||"coverflow"===y.params.effect)&&y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}),(!y.support.flexbox||y.params.setWrapperSize)&&(s()?y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}):y.wrapper.css({height:y.virtualSize+y.params.spaceBetween+"px"})),y.params.slidesPerColumn>1&&(y.virtualSize=(o+y.params.spaceBetween)*a,y.virtualSize=Math.ceil(y.virtualSize/y.params.slidesPerColumn)-y.params.spaceBetween,y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}),y.params.centeredSlides)){for(g=[],e=0;e<y.snapGrid.length;e++)y.snapGrid[e]<y.virtualSize+y.snapGrid[0]&&g.push(y.snapGrid[e]);y.snapGrid=g}if(!y.params.centeredSlides){for(g=[],e=0;e<y.snapGrid.length;e++)y.snapGrid[e]<=y.virtualSize-y.size&&g.push(y.snapGrid[e]);y.snapGrid=g,Math.floor(y.virtualSize-y.size)>Math.floor(y.snapGrid[y.snapGrid.length-1])&&y.snapGrid.push(y.virtualSize-y.size)}0===y.snapGrid.length&&(y.snapGrid=[0]),0!==y.params.spaceBetween&&(s()?y.rtl?y.slides.css({marginLeft:t+"px"}):y.slides.css({marginRight:t+"px"}):y.slides.css({marginBottom:t+"px"})),y.params.watchSlidesProgress&&y.updateSlidesOffset()},y.updateSlidesOffset=function(){for(var e=0;e<y.slides.length;e++)y.slides[e].swiperSlideOffset=s()?y.slides[e].offsetLeft:y.slides[e].offsetTop},y.updateSlidesProgress=function(e){if("undefined"==typeof e&&(e=y.translate||0),0!==y.slides.length){"undefined"==typeof y.slides[0].swiperSlideOffset&&y.updateSlidesOffset();var t=-e;y.rtl&&(t=e),y.slides.removeClass(y.params.slideVisibleClass);for(var n=0;n<y.slides.length;n++){var i=y.slides[n],r=(t-i.swiperSlideOffset)/(i.swiperSlideSize+y.params.spaceBetween);if(y.params.watchSlidesVisibility){var a=-(t-i.swiperSlideOffset),o=a+y.slidesSizesGrid[n],s=a>=0&&a<y.size||o>0&&o<=y.size||0>=a&&o>=y.size;s&&y.slides.eq(n).addClass(y.params.slideVisibleClass)}i.progress=y.rtl?-r:r}}},y.updateProgress=function(e){"undefined"==typeof e&&(e=y.translate||0);var t=y.maxTranslate()-y.minTranslate(),n=y.isBeginning,i=y.isEnd;0===t?(y.progress=0,y.isBeginning=y.isEnd=!0):(y.progress=(e-y.minTranslate())/t,y.isBeginning=y.progress<=0,y.isEnd=y.progress>=1),y.isBeginning&&!n&&y.emit("onReachBeginning",y),y.isEnd&&!i&&y.emit("onReachEnd",y),y.params.watchSlidesProgress&&y.updateSlidesProgress(e),y.emit("onProgress",y,y.progress)},y.updateActiveIndex=function(){var e,t,n,i=y.rtl?y.translate:-y.translate;for(t=0;t<y.slidesGrid.length;t++)"undefined"!=typeof y.slidesGrid[t+1]?i>=y.slidesGrid[t]&&i<y.slidesGrid[t+1]-(y.slidesGrid[t+1]-y.slidesGrid[t])/2?e=t:i>=y.slidesGrid[t]&&i<y.slidesGrid[t+1]&&(e=t+1):i>=y.slidesGrid[t]&&(e=t);(0>e||"undefined"==typeof e)&&(e=0),n=Math.floor(e/y.params.slidesPerGroup),n>=y.snapGrid.length&&(n=y.snapGrid.length-1),e!==y.activeIndex&&(y.snapIndex=n,y.previousIndex=y.activeIndex,y.activeIndex=e,y.updateClasses())},y.updateClasses=function(){y.slides.removeClass(y.params.slideActiveClass+" "+y.params.slideNextClass+" "+y.params.slidePrevClass);var e=y.slides.eq(y.activeIndex);if(e.addClass(y.params.slideActiveClass),e.next("."+y.params.slideClass).addClass(y.params.slideNextClass),e.prev("."+y.params.slideClass).addClass(y.params.slidePrevClass),y.bullets&&y.bullets.length>0){y.bullets.removeClass(y.params.bulletActiveClass);var n;y.params.loop?(n=Math.ceil(y.activeIndex-y.loopedSlides)/y.params.slidesPerGroup,n>y.slides.length-1-2*y.loopedSlides&&(n-=y.slides.length-2*y.loopedSlides),n>y.bullets.length-1&&(n-=y.bullets.length)):n="undefined"!=typeof y.snapIndex?y.snapIndex:y.activeIndex||0,y.paginationContainer.length>1?y.bullets.each(function(){t(this).index()===n&&t(this).addClass(y.params.bulletActiveClass)}):y.bullets.eq(n).addClass(y.params.bulletActiveClass)}y.params.loop||(y.params.prevButton&&(y.isBeginning?(t(y.params.prevButton).addClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.disable(t(y.params.prevButton))):(t(y.params.prevButton).removeClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.enable(t(y.params.prevButton)))),y.params.nextButton&&(y.isEnd?(t(y.params.nextButton).addClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.disable(t(y.params.nextButton))):(t(y.params.nextButton).removeClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.enable(t(y.params.nextButton)))))},y.updatePagination=function(){if(y.params.pagination&&y.paginationContainer&&y.paginationContainer.length>0){for(var e="",t=y.params.loop?Math.ceil((y.slides.length-2*y.loopedSlides)/y.params.slidesPerGroup):y.snapGrid.length,n=0;t>n;n++)e+=y.params.paginationBulletRender?y.params.paginationBulletRender(n,y.params.bulletClass):"<"+y.params.paginationElement+' class="'+y.params.bulletClass+'"></'+y.params.paginationElement+">";y.paginationContainer.html(e),y.bullets=y.paginationContainer.find("."+y.params.bulletClass),y.params.paginationClickable&&y.params.a11y&&y.a11y&&y.a11y.initPagination()}},y.update=function(e){function t(){i=Math.min(Math.max(y.translate,y.maxTranslate()),y.minTranslate()),y.setWrapperTranslate(i),y.updateActiveIndex(),y.updateClasses()}if(y.updateContainerSize(),y.updateSlidesSize(),y.updateProgress(),y.updatePagination(),y.updateClasses(),y.params.scrollbar&&y.scrollbar&&y.scrollbar.set(),e){var n,i;y.controller&&y.controller.spline&&(y.controller.spline=void 0),y.params.freeMode?(t(),y.params.autoHeight&&y.updateAutoHeight()):(n=("auto"===y.params.slidesPerView||y.params.slidesPerView>1)&&y.isEnd&&!y.params.centeredSlides?y.slideTo(y.slides.length-1,0,!1,!0):y.slideTo(y.activeIndex,0,!1,!0),n||t())}else y.params.autoHeight&&y.updateAutoHeight()},y.onResize=function(e){y.params.breakpoints&&y.setBreakpoint();var t=y.params.allowSwipeToPrev,n=y.params.allowSwipeToNext;if(y.params.allowSwipeToPrev=y.params.allowSwipeToNext=!0,y.updateContainerSize(),y.updateSlidesSize(),("auto"===y.params.slidesPerView||y.params.freeMode||e)&&y.updatePagination(),y.params.scrollbar&&y.scrollbar&&y.scrollbar.set(),y.controller&&y.controller.spline&&(y.controller.spline=void 0),y.params.freeMode){var i=Math.min(Math.max(y.translate,y.maxTranslate()),y.minTranslate());y.setWrapperTranslate(i),y.updateActiveIndex(),y.updateClasses(),y.params.autoHeight&&y.updateAutoHeight()}else y.updateClasses(),("auto"===y.params.slidesPerView||y.params.slidesPerView>1)&&y.isEnd&&!y.params.centeredSlides?y.slideTo(y.slides.length-1,0,!1,!0):y.slideTo(y.activeIndex,0,!1,!0);y.params.allowSwipeToPrev=t,y.params.allowSwipeToNext=n};var E=["mousedown","mousemove","mouseup"];window.navigator.pointerEnabled?E=["pointerdown","pointermove","pointerup"]:window.navigator.msPointerEnabled&&(E=["MSPointerDown","MSPointerMove","MSPointerUp"]),y.touchEvents={start:y.support.touch||!y.params.simulateTouch?"touchstart":E[0],move:y.support.touch||!y.params.simulateTouch?"touchmove":E[1],end:y.support.touch||!y.params.simulateTouch?"touchend":E[2]},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===y.params.touchEventsTarget?y.container:y.wrapper).addClass("swiper-wp8-"+y.params.direction),y.initEvents=function(e){var n=e?"off":"on",i=e?"removeEventListener":"addEventListener",a="container"===y.params.touchEventsTarget?y.container[0]:y.wrapper[0],o=y.support.touch?a:document,s=y.params.nested?!0:!1;y.browser.ie?(a[i](y.touchEvents.start,y.onTouchStart,!1),o[i](y.touchEvents.move,y.onTouchMove,s),o[i](y.touchEvents.end,y.onTouchEnd,!1)):(y.support.touch&&(a[i](y.touchEvents.start,y.onTouchStart,!1),a[i](y.touchEvents.move,y.onTouchMove,s),a[i](y.touchEvents.end,y.onTouchEnd,!1)),!r.simulateTouch||y.device.ios||y.device.android||(a[i]("mousedown",y.onTouchStart,!1),document[i]("mousemove",y.onTouchMove,s),document[i]("mouseup",y.onTouchEnd,!1))),window[i]("resize",y.onResize),y.params.nextButton&&(t(y.params.nextButton)[n]("click",y.onClickNext),y.params.a11y&&y.a11y&&t(y.params.nextButton)[n]("keydown",y.a11y.onEnterKey)),y.params.prevButton&&(t(y.params.prevButton)[n]("click",y.onClickPrev),y.params.a11y&&y.a11y&&t(y.params.prevButton)[n]("keydown",y.a11y.onEnterKey)),y.params.pagination&&y.params.paginationClickable&&(t(y.paginationContainer)[n]("click","."+y.params.bulletClass,y.onClickIndex),y.params.a11y&&y.a11y&&t(y.paginationContainer)[n]("keydown","."+y.params.bulletClass,y.a11y.onEnterKey)),(y.params.preventClicks||y.params.preventClicksPropagation)&&a[i]("click",y.preventClicks,!0)},y.attachEvents=function(e){y.initEvents()},y.detachEvents=function(){y.initEvents(!0)},y.allowClick=!0,y.preventClicks=function(e){y.allowClick||(y.params.preventClicks&&e.preventDefault(),y.params.preventClicksPropagation&&y.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},y.onClickNext=function(e){e.preventDefault(),(!y.isEnd||y.params.loop)&&y.slideNext()},y.onClickPrev=function(e){e.preventDefault(),(!y.isBeginning||y.params.loop)&&y.slidePrev()},y.onClickIndex=function(e){e.preventDefault();var n=t(this).index()*y.params.slidesPerGroup;y.params.loop&&(n+=y.loopedSlides),y.slideTo(n)},y.updateClickedSlide=function(e){var n=d(e,"."+y.params.slideClass),i=!1;if(n)for(var r=0;r<y.slides.length;r++)y.slides[r]===n&&(i=!0);if(!n||!i)return y.clickedSlide=void 0,void(y.clickedIndex=void 0);if(y.clickedSlide=n,y.clickedIndex=t(n).index(),y.params.slideToClickedSlide&&void 0!==y.clickedIndex&&y.clickedIndex!==y.activeIndex){var a,o=y.clickedIndex;if(y.params.loop){if(y.animating)return;a=t(y.clickedSlide).attr("data-swiper-slide-index"),y.params.centeredSlides?o<y.loopedSlides-y.params.slidesPerView/2||o>y.slides.length-y.loopedSlides+y.params.slidesPerView/2?(y.fixLoop(),o=y.wrapper.children("."+y.params.slideClass+'[data-swiper-slide-index="'+a+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout(function(){y.slideTo(o)},0)):y.slideTo(o):o>y.slides.length-y.params.slidesPerView?(y.fixLoop(),o=y.wrapper.children("."+y.params.slideClass+'[data-swiper-slide-index="'+a+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout(function(){y.slideTo(o)},0)):y.slideTo(o)}else y.slideTo(o)}};var x,D,M,C,L,P,I,k,N,z,O="input, select, textarea, button",A=Date.now(),G=[];y.animating=!1,y.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var V,R;if(y.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),V="touchstart"===e.type,V||!("which"in e)||3!==e.which){if(y.params.noSwiping&&d(e,"."+y.params.noSwipingClass))return void(y.allowClick=!0);if(!y.params.swipeHandler||d(e,y.params.swipeHandler)){var n=y.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i=y.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(y.device.ios&&y.params.iOSEdgeSwipeDetection&&n<=y.params.iOSEdgeSwipeThreshold)){if(x=!0,D=!1,M=!0,L=void 0,R=void 0,y.touches.startX=n,y.touches.startY=i,C=Date.now(),y.allowClick=!0,y.updateContainerSize(),y.swipeDirection=void 0,y.params.threshold>0&&(k=!1),"touchstart"!==e.type){var r=!0;t(e.target).is(O)&&(r=!1),document.activeElement&&t(document.activeElement).is(O)&&document.activeElement.blur(),r&&e.preventDefault()}y.emit("onTouchStart",y,e)}}}},y.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!(V&&"mousemove"===e.type||e.preventedByNestedSwiper)){if(y.params.onlyExternal)return y.allowClick=!1,void(x&&(y.touches.startX=y.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,y.touches.startY=y.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,C=Date.now()));if(V&&document.activeElement&&e.target===document.activeElement&&t(e.target).is(O))return D=!0,void(y.allowClick=!1);if(M&&y.emit("onTouchMove",y,e),!(e.targetTouches&&e.targetTouches.length>1)){if(y.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,y.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof L){var n=180*Math.atan2(Math.abs(y.touches.currentY-y.touches.startY),Math.abs(y.touches.currentX-y.touches.startX))/Math.PI;L=s()?n>y.params.touchAngle:90-n>y.params.touchAngle}if(L&&y.emit("onTouchMoveOpposite",y,e),"undefined"==typeof R&&y.browser.ieTouch&&(y.touches.currentX!==y.touches.startX||y.touches.currentY!==y.touches.startY)&&(R=!0),x){if(L)return void(x=!1);if(R||!y.browser.ieTouch){y.allowClick=!1,y.emit("onSliderMove",y,e),e.preventDefault(),y.params.touchMoveStopPropagation&&!y.params.nested&&e.stopPropagation(),D||(r.loop&&y.fixLoop(),I=y.getWrapperTranslate(),y.setWrapperTransition(0),y.animating&&y.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),y.params.autoplay&&y.autoplaying&&(y.params.autoplayDisableOnInteraction?y.stopAutoplay():y.pauseAutoplay()),z=!1,y.params.grabCursor&&(y.container[0].style.cursor="move",y.container[0].style.cursor="-webkit-grabbing",y.container[0].style.cursor="-moz-grabbin",y.container[0].style.cursor="grabbing")),D=!0;var i=y.touches.diff=s()?y.touches.currentX-y.touches.startX:y.touches.currentY-y.touches.startY;i*=y.params.touchRatio,y.rtl&&(i=-i),y.swipeDirection=i>0?"prev":"next",P=i+I;var a=!0;if(i>0&&P>y.minTranslate()?(a=!1,y.params.resistance&&(P=y.minTranslate()-1+Math.pow(-y.minTranslate()+I+i,y.params.resistanceRatio))):0>i&&P<y.maxTranslate()&&(a=!1,y.params.resistance&&(P=y.maxTranslate()+1-Math.pow(y.maxTranslate()-I-i,y.params.resistanceRatio))),a&&(e.preventedByNestedSwiper=!0),!y.params.allowSwipeToNext&&"next"===y.swipeDirection&&I>P&&(P=I),!y.params.allowSwipeToPrev&&"prev"===y.swipeDirection&&P>I&&(P=I),y.params.followFinger){if(y.params.threshold>0){if(!(Math.abs(i)>y.params.threshold||k))return void(P=I);if(!k)return k=!0,y.touches.startX=y.touches.currentX,y.touches.startY=y.touches.currentY,P=I,void(y.touches.diff=s()?y.touches.currentX-y.touches.startX:y.touches.currentY-y.touches.startY)}(y.params.freeMode||y.params.watchSlidesProgress)&&y.updateActiveIndex(),y.params.freeMode&&(0===G.length&&G.push({position:y.touches[s()?"startX":"startY"],time:C}),G.push({position:y.touches[s()?"currentX":"currentY"],time:(new window.Date).getTime()})),y.updateProgress(P),y.setWrapperTranslate(P)}}}}}},y.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),M&&y.emit("onTouchEnd",y,e),M=!1,x){y.params.grabCursor&&D&&x&&(y.container[0].style.cursor="move",y.container[0].style.cursor="-webkit-grab",y.container[0].style.cursor="-moz-grab",y.container[0].style.cursor="grab");var n=Date.now(),i=n-C;if(y.allowClick&&(y.updateClickedSlide(e),y.emit("onTap",y,e),300>i&&n-A>300&&(N&&clearTimeout(N),N=setTimeout(function(){y&&(y.params.paginationHide&&y.paginationContainer.length>0&&!t(e.target).hasClass(y.params.bulletClass)&&y.paginationContainer.toggleClass(y.params.paginationHiddenClass),y.emit("onClick",y,e))},300)),300>i&&300>n-A&&(N&&clearTimeout(N),y.emit("onDoubleTap",y,e))),A=Date.now(),setTimeout(function(){y&&(y.allowClick=!0)},0),!x||!D||!y.swipeDirection||0===y.touches.diff||P===I)return void(x=D=!1);x=D=!1;var r;if(r=y.params.followFinger?y.rtl?y.translate:-y.translate:-P,y.params.freeMode){if(r<-y.minTranslate())return void y.slideTo(y.activeIndex);if(r>-y.maxTranslate())return void(y.slides.length<y.snapGrid.length?y.slideTo(y.snapGrid.length-1):y.slideTo(y.slides.length-1));if(y.params.freeModeMomentum){if(G.length>1){var a=G.pop(),o=G.pop(),s=a.position-o.position,l=a.time-o.time;y.velocity=s/l,y.velocity=y.velocity/2,Math.abs(y.velocity)<y.params.freeModeMinimumVelocity&&(y.velocity=0),(l>150||(new window.Date).getTime()-a.time>300)&&(y.velocity=0)}else y.velocity=0;G.length=0;var c=1e3*y.params.freeModeMomentumRatio,d=y.velocity*c,u=y.translate+d;y.rtl&&(u=-u);var p,h=!1,f=20*Math.abs(y.velocity)*y.params.freeModeMomentumBounceRatio;if(u<y.maxTranslate())y.params.freeModeMomentumBounce?(u+y.maxTranslate()<-f&&(u=y.maxTranslate()-f),p=y.maxTranslate(),h=!0,z=!0):u=y.maxTranslate();else if(u>y.minTranslate())y.params.freeModeMomentumBounce?(u-y.minTranslate()>f&&(u=y.minTranslate()+f),p=y.minTranslate(),h=!0,z=!0):u=y.minTranslate();else if(y.params.freeModeSticky){var m,g=0;for(g=0;g<y.snapGrid.length;g+=1)if(y.snapGrid[g]>-u){m=g;break}u=Math.abs(y.snapGrid[m]-u)<Math.abs(y.snapGrid[m-1]-u)||"next"===y.swipeDirection?y.snapGrid[m]:y.snapGrid[m-1],y.rtl||(u=-u)}if(0!==y.velocity)c=y.rtl?Math.abs((-u-y.translate)/y.velocity):Math.abs((u-y.translate)/y.velocity);else if(y.params.freeModeSticky)return void y.slideReset();y.params.freeModeMomentumBounce&&h?(y.updateProgress(p),y.setWrapperTransition(c),y.setWrapperTranslate(u),y.onTransitionStart(),y.animating=!0,y.wrapper.transitionEnd(function(){y&&z&&(y.emit("onMomentumBounce",y),y.setWrapperTransition(y.params.speed),y.setWrapperTranslate(p),y.wrapper.transitionEnd(function(){y&&y.onTransitionEnd()}))})):y.velocity?(y.updateProgress(u),y.setWrapperTransition(c),y.setWrapperTranslate(u),y.onTransitionStart(),y.animating||(y.animating=!0,y.wrapper.transitionEnd(function(){y&&y.onTransitionEnd()}))):y.updateProgress(u),y.updateActiveIndex()}return void((!y.params.freeModeMomentum||i>=y.params.longSwipesMs)&&(y.updateProgress(),y.updateActiveIndex()))}var v,_=0,w=y.slidesSizesGrid[0];for(v=0;v<y.slidesGrid.length;v+=y.params.slidesPerGroup)"undefined"!=typeof y.slidesGrid[v+y.params.slidesPerGroup]?r>=y.slidesGrid[v]&&r<y.slidesGrid[v+y.params.slidesPerGroup]&&(_=v,w=y.slidesGrid[v+y.params.slidesPerGroup]-y.slidesGrid[v]):r>=y.slidesGrid[v]&&(_=v,w=y.slidesGrid[y.slidesGrid.length-1]-y.slidesGrid[y.slidesGrid.length-2]);var T=(r-y.slidesGrid[_])/w;if(i>y.params.longSwipesMs){if(!y.params.longSwipes)return void y.slideTo(y.activeIndex);"next"===y.swipeDirection&&(T>=y.params.longSwipesRatio?y.slideTo(_+y.params.slidesPerGroup):y.slideTo(_)),"prev"===y.swipeDirection&&(T>1-y.params.longSwipesRatio?y.slideTo(_+y.params.slidesPerGroup):y.slideTo(_))}else{if(!y.params.shortSwipes)return void y.slideTo(y.activeIndex);"next"===y.swipeDirection&&y.slideTo(_+y.params.slidesPerGroup),"prev"===y.swipeDirection&&y.slideTo(_)}}},y._slideTo=function(e,t){return y.slideTo(e,t,!0,!0)},y.slideTo=function(e,t,n,i){"undefined"==typeof n&&(n=!0),"undefined"==typeof e&&(e=0),0>e&&(e=0),y.snapIndex=Math.floor(e/y.params.slidesPerGroup),y.snapIndex>=y.snapGrid.length&&(y.snapIndex=y.snapGrid.length-1);var r=-y.snapGrid[y.snapIndex];y.params.autoplay&&y.autoplaying&&(i||!y.params.autoplayDisableOnInteraction?y.pauseAutoplay(t):y.stopAutoplay()),y.updateProgress(r);for(var a=0;a<y.slidesGrid.length;a++)-Math.floor(100*r)>=Math.floor(100*y.slidesGrid[a])&&(e=a);return!y.params.allowSwipeToNext&&r<y.translate&&r<y.minTranslate()?!1:!y.params.allowSwipeToPrev&&r>y.translate&&r>y.maxTranslate()&&(y.activeIndex||0)!==e?!1:("undefined"==typeof t&&(t=y.params.speed),y.previousIndex=y.activeIndex||0,y.activeIndex=e,y.rtl&&-r===y.translate||!y.rtl&&r===y.translate?(y.params.autoHeight&&y.updateAutoHeight(),y.updateClasses(),"slide"!==y.params.effect&&y.setWrapperTranslate(r),!1):(y.updateClasses(),y.onTransitionStart(n),0===t?(y.setWrapperTranslate(r),y.setWrapperTransition(0),y.onTransitionEnd(n)):(y.setWrapperTranslate(r),y.setWrapperTransition(t),y.animating||(y.animating=!0,y.wrapper.transitionEnd(function(){y&&y.onTransitionEnd(n)}))),!0))},y.onTransitionStart=function(e){"undefined"==typeof e&&(e=!0),y.params.autoHeight&&y.updateAutoHeight(),y.lazy&&y.lazy.onTransitionStart(),e&&(y.emit("onTransitionStart",y),y.activeIndex!==y.previousIndex&&(y.emit("onSlideChangeStart",y),a.$emit("$ionicSlides.slideChangeStart",{slider:y,activeIndex:y.getSlideDataIndex(y.activeIndex),previousIndex:y.getSlideDataIndex(y.previousIndex)}),y.activeIndex>y.previousIndex?y.emit("onSlideNextStart",y):y.emit("onSlidePrevStart",y)))},y.onTransitionEnd=function(e){y.animating=!1,y.setWrapperTransition(0),"undefined"==typeof e&&(e=!0),y.lazy&&y.lazy.onTransitionEnd(),e&&(y.emit("onTransitionEnd",y),y.activeIndex!==y.previousIndex&&(y.emit("onSlideChangeEnd",y),a.$emit("$ionicSlides.slideChangeEnd",{slider:y,activeIndex:y.getSlideDataIndex(y.activeIndex),previousIndex:y.getSlideDataIndex(y.previousIndex)}),y.activeIndex>y.previousIndex?y.emit("onSlideNextEnd",y):y.emit("onSlidePrevEnd",y))),y.params.hashnav&&y.hashnav&&y.hashnav.setHash()},y.slideNext=function(e,t,n){if(y.params.loop){if(y.animating)return!1;y.fixLoop();y.container[0].clientLeft;return y.slideTo(y.activeIndex+y.params.slidesPerGroup,t,e,n)}return y.slideTo(y.activeIndex+y.params.slidesPerGroup,t,e,n)},y._slideNext=function(e){return y.slideNext(!0,e,!0)},y.slidePrev=function(e,t,n){if(y.params.loop){if(y.animating)return!1;y.fixLoop();y.container[0].clientLeft;return y.slideTo(y.activeIndex-1,t,e,n)}return y.slideTo(y.activeIndex-1,t,e,n)},y._slidePrev=function(e){return y.slidePrev(!0,e,!0)},y.slideReset=function(e,t,n){return y.slideTo(y.activeIndex,t,e)},y.setWrapperTransition=function(e,t){y.wrapper.transition(e),"slide"!==y.params.effect&&y.effects[y.params.effect]&&y.effects[y.params.effect].setTransition(e),y.params.parallax&&y.parallax&&y.parallax.setTransition(e),y.params.scrollbar&&y.scrollbar&&y.scrollbar.setTransition(e),y.params.control&&y.controller&&y.controller.setTransition(e,t),y.emit("onSetTransition",y,e)},y.setWrapperTranslate=function(e,t,n){var i=0,r=0,a=0;s()?i=y.rtl?-e:e:r=e,
+y.params.roundLengths&&(i=l(i),r=l(r)),y.params.virtualTranslate||(y.support.transforms3d?y.wrapper.transform("translate3d("+i+"px, "+r+"px, "+a+"px)"):y.wrapper.transform("translate("+i+"px, "+r+"px)")),y.translate=s()?i:r;var o,c=y.maxTranslate()-y.minTranslate();o=0===c?0:(e-y.minTranslate())/c,o!==y.progress&&y.updateProgress(e),t&&y.updateActiveIndex(),"slide"!==y.params.effect&&y.effects[y.params.effect]&&y.effects[y.params.effect].setTranslate(y.translate),y.params.parallax&&y.parallax&&y.parallax.setTranslate(y.translate),y.params.scrollbar&&y.scrollbar&&y.scrollbar.setTranslate(y.translate),y.params.control&&y.controller&&y.controller.setTranslate(y.translate,n),y.emit("onSetTranslate",y,y.translate)},y.getTranslate=function(e,t){var n,i,r,a;return"undefined"==typeof t&&(t="x"),y.params.virtualTranslate?y.rtl?-y.translate:y.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(i=r.transform||r.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),a=new window.WebKitCSSMatrix("none"===i?"":i)):(a=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=a.toString().split(",")),"x"===t&&(i=window.WebKitCSSMatrix?a.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(i=window.WebKitCSSMatrix?a.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),y.rtl&&i&&(i=-i),i||0)},y.getWrapperTranslate=function(e){return"undefined"==typeof e&&(e=s()?"x":"y"),y.getTranslate(y.wrapper[0],e)},y.observers=[],y.initObservers=function(){if(y.params.observeParents)for(var e=y.container.parents(),t=0;t<e.length;t++)u(e[t]);u(y.container[0],{childList:!1}),u(y.wrapper[0],{attributes:!1})},y.disconnectObservers=function(){for(var e=0;e<y.observers.length;e++)y.observers[e].disconnect();y.observers=[]},y.updateLoop=function(){var e=y.slides.eq(y.activeIndex);if(angular.element(e).hasClass(y.params.slideDuplicateClass)){for(var t=angular.element(e).attr("data-swiper-slide-index"),n=y.wrapper.children("."+y.params.slideClass),i=0;i<n.length;i++)if(!angular.element(n[i]).hasClass(y.params.slideDuplicateClass)&&angular.element(n[i]).attr("data-swiper-slide-index")===t){y.slideTo(i,0,!1,!0);break}setTimeout(function(){y.createLoop()},50)}},y.getSlideDataIndex=function(e){var t=y.slides.eq(e),n=angular.element(t).attr("data-swiper-slide-index");return parseInt(n)},y.createLoop=function(){y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass).remove();var e=y.wrapper.children("."+y.params.slideClass);"auto"!==y.params.slidesPerView||y.params.loopedSlides||(y.params.loopedSlides=e.length),y.loopedSlides=parseInt(y.params.loopedSlides||y.params.slidesPerView,10),y.loopedSlides=y.loopedSlides+y.params.loopAdditionalSlides,y.loopedSlides>e.length&&(y.loopedSlides=e.length);var n,i,r,a=[],s=[];for(e.each(function(n,i){var r=t(this);n<y.loopedSlides&&s.push(i),n<e.length&&n>=e.length-y.loopedSlides&&a.push(i),r.attr("data-swiper-slide-index",n)}),n=0;n<s.length;n++)r=angular.element(s[n]).clone().addClass(y.params.slideDuplicateClass),r.removeAttr("ng-transclude"),r.removeAttr("ng-repeat"),i=angular.element(s[n]).scope(),r=o(r)(i),angular.element(y.wrapper).append(r);for(n=a.length-1;n>=0;n--)r=angular.element(a[n]).clone().addClass(y.params.slideDuplicateClass),r.removeAttr("ng-transclude"),r.removeAttr("ng-repeat"),i=angular.element(a[n]).scope(),r=o(r)(i),angular.element(y.wrapper).prepend(r)},y.destroyLoop=function(){y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass).remove(),y.slides.removeAttr("data-swiper-slide-index")},y.fixLoop=function(){var e;y.activeIndex<y.loopedSlides?(e=y.slides.length-3*y.loopedSlides+y.activeIndex,e+=y.loopedSlides,y.slideTo(e,0,!1,!0)):("auto"===y.params.slidesPerView&&y.activeIndex>=2*y.loopedSlides||y.activeIndex>y.slides.length-2*y.params.slidesPerView)&&(e=-y.slides.length+y.activeIndex+y.loopedSlides,e+=y.loopedSlides,y.slideTo(e,0,!1,!0))},y.appendSlide=function(e){if(y.params.loop&&y.destroyLoop(),"object"==typeof e&&e.length)for(var t=0;t<e.length;t++)e[t]&&y.wrapper.append(e[t]);else y.wrapper.append(e);y.params.loop&&y.createLoop(),y.params.observer&&y.support.observer||y.update(!0)},y.prependSlide=function(e){y.params.loop&&y.destroyLoop();var t=y.activeIndex+1;if("object"==typeof e&&e.length){for(var n=0;n<e.length;n++)e[n]&&y.wrapper.prepend(e[n]);t=y.activeIndex+e.length}else y.wrapper.prepend(e);y.params.loop&&y.createLoop(),y.params.observer&&y.support.observer||y.update(!0),y.slideTo(t,0,!1)},y.removeSlide=function(e){y.params.loop&&(y.destroyLoop(),y.slides=y.wrapper.children("."+y.params.slideClass));var t,n=y.activeIndex;if("object"==typeof e&&e.length){for(var i=0;i<e.length;i++)t=e[i],y.slides[t]&&y.slides.eq(t).remove(),n>t&&n--;n=Math.max(n,0)}else t=e,y.slides[t]&&y.slides.eq(t).remove(),n>t&&n--,n=Math.max(n,0);y.params.loop&&y.createLoop(),y.params.observer&&y.support.observer||y.update(!0),y.params.loop?y.slideTo(n+y.loopedSlides,0,!1):y.slideTo(n,0,!1)},y.removeAllSlides=function(){for(var e=[],t=0;t<y.slides.length;t++)e.push(t);y.removeSlide(e)},y.effects={fade:{setTranslate:function(){for(var e=0;e<y.slides.length;e++){var t=y.slides.eq(e),n=t[0].swiperSlideOffset,i=-n;y.params.virtualTranslate||(i-=y.translate);var r=0;s()||(r=i,i=0);var a=y.params.fade.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);t.css({opacity:a}).transform("translate3d("+i+"px, "+r+"px, 0px)")}},setTransition:function(e){if(y.slides.transition(e),y.params.virtualTranslate&&0!==e){var t=!1;y.slides.transitionEnd(function(){if(!t&&y){t=!0,y.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],n=0;n<e.length;n++)y.wrapper.trigger(e[n])}})}}},cube:{setTranslate:function(){var e,n=0;y.params.cube.shadow&&(s()?(e=y.wrapper.find(".swiper-cube-shadow"),0===e.length&&(e=t('<div class="swiper-cube-shadow"></div>'),y.wrapper.append(e)),e.css({height:y.width+"px"})):(e=y.container.find(".swiper-cube-shadow"),0===e.length&&(e=t('<div class="swiper-cube-shadow"></div>'),y.container.append(e))));for(var i=0;i<y.slides.length;i++){var r=y.slides.eq(i),a=90*i,o=Math.floor(a/360);y.rtl&&(a=-a,o=Math.floor(-a/360));var l=Math.max(Math.min(r[0].progress,1),-1),c=0,d=0,u=0;i%4===0?(c=4*-o*y.size,u=0):(i-1)%4===0?(c=0,u=4*-o*y.size):(i-2)%4===0?(c=y.size+4*o*y.size,u=y.size):(i-3)%4===0&&(c=-y.size,u=3*y.size+4*y.size*o),y.rtl&&(c=-c),s()||(d=c,c=0);var p="rotateX("+(s()?0:-a)+"deg) rotateY("+(s()?a:0)+"deg) translate3d("+c+"px, "+d+"px, "+u+"px)";if(1>=l&&l>-1&&(n=90*i+90*l,y.rtl&&(n=90*-i-90*l)),r.transform(p),y.params.cube.slideShadows){var h=s()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),f=s()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===h.length&&(h=t('<div class="swiper-slide-shadow-'+(s()?"left":"top")+'"></div>'),r.append(h)),0===f.length&&(f=t('<div class="swiper-slide-shadow-'+(s()?"right":"bottom")+'"></div>'),r.append(f));r[0].progress;h.length&&(h[0].style.opacity=-r[0].progress),f.length&&(f[0].style.opacity=r[0].progress)}}if(y.wrapper.css({"-webkit-transform-origin":"50% 50% -"+y.size/2+"px","-moz-transform-origin":"50% 50% -"+y.size/2+"px","-ms-transform-origin":"50% 50% -"+y.size/2+"px","transform-origin":"50% 50% -"+y.size/2+"px"}),y.params.cube.shadow)if(s())e.transform("translate3d(0px, "+(y.width/2+y.params.cube.shadowOffset)+"px, "+-y.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+y.params.cube.shadowScale+")");else{var m=Math.abs(n)-90*Math.floor(Math.abs(n)/90),g=1.5-(Math.sin(2*m*Math.PI/360)/2+Math.cos(2*m*Math.PI/360)/2),v=y.params.cube.shadowScale,_=y.params.cube.shadowScale/g,w=y.params.cube.shadowOffset;e.transform("scale3d("+v+", 1, "+_+") translate3d(0px, "+(y.height/2+w)+"px, "+-y.height/2/_+"px) rotateX(-90deg)")}var T=y.isSafari||y.isUiWebView?-y.size/2:0;y.wrapper.transform("translate3d(0px,0,"+T+"px) rotateX("+(s()?0:n)+"deg) rotateY("+(s()?-n:0)+"deg)")},setTransition:function(e){y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),y.params.cube.shadow&&!s()&&y.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=y.translate,n=s()?-e+y.width/2:-e+y.height/2,i=s()?y.params.coverflow.rotate:-y.params.coverflow.rotate,r=y.params.coverflow.depth,a=0,o=y.slides.length;o>a;a++){var l=y.slides.eq(a),c=y.slidesSizesGrid[a],d=l[0].swiperSlideOffset,u=(n-d-c/2)/c*y.params.coverflow.modifier,p=s()?i*u:0,h=s()?0:i*u,f=-r*Math.abs(u),m=s()?0:y.params.coverflow.stretch*u,g=s()?y.params.coverflow.stretch*u:0;Math.abs(g)<.001&&(g=0),Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(p)<.001&&(p=0),Math.abs(h)<.001&&(h=0);var v="translate3d("+g+"px,"+m+"px,"+f+"px)  rotateX("+h+"deg) rotateY("+p+"deg)";if(l.transform(v),l[0].style.zIndex=-Math.abs(Math.round(u))+1,y.params.coverflow.slideShadows){var _=s()?l.find(".swiper-slide-shadow-left"):l.find(".swiper-slide-shadow-top"),w=s()?l.find(".swiper-slide-shadow-right"):l.find(".swiper-slide-shadow-bottom");0===_.length&&(_=t('<div class="swiper-slide-shadow-'+(s()?"left":"top")+'"></div>'),l.append(_)),0===w.length&&(w=t('<div class="swiper-slide-shadow-'+(s()?"right":"bottom")+'"></div>'),l.append(w)),_.length&&(_[0].style.opacity=u>0?u:0),w.length&&(w[0].style.opacity=-u>0?-u:0)}}if(y.browser.ie){var T=y.wrapper[0].style;T.perspectiveOrigin=n+"px 50%"}},setTransition:function(e){y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},y.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,n){if("undefined"!=typeof e&&("undefined"==typeof n&&(n=!0),0!==y.slides.length)){var i=y.slides.eq(e),r=i.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)");!i.hasClass("swiper-lazy")||i.hasClass("swiper-lazy-loaded")||i.hasClass("swiper-lazy-loading")||(r=r.add(i[0])),0!==r.length&&r.each(function(){var e=t(this);e.addClass("swiper-lazy-loading");var r=e.attr("data-background"),a=e.attr("data-src"),o=e.attr("data-srcset");y.loadImage(e[0],a||r,o,!1,function(){if(r?(e.css("background-image","url("+r+")"),e.removeAttr("data-background")):(o&&(e.attr("srcset",o),e.removeAttr("data-srcset")),a&&(e.attr("src",a),e.removeAttr("data-src"))),e.addClass("swiper-lazy-loaded").removeClass("swiper-lazy-loading"),i.find(".swiper-lazy-preloader, .preloader").remove(),y.params.loop&&n){var t=i.attr("data-swiper-slide-index");if(i.hasClass(y.params.slideDuplicateClass)){var s=y.wrapper.children('[data-swiper-slide-index="'+t+'"]:not(.'+y.params.slideDuplicateClass+")");y.lazy.loadImageInSlide(s.index(),!1)}else{var l=y.wrapper.children("."+y.params.slideDuplicateClass+'[data-swiper-slide-index="'+t+'"]');y.lazy.loadImageInSlide(l.index(),!1)}}y.emit("onLazyImageReady",y,i[0],e[0])}),y.emit("onLazyImageLoad",y,i[0],e[0])})}},load:function(){var e;if(y.params.watchSlidesVisibility)y.wrapper.children("."+y.params.slideVisibleClass).each(function(){y.lazy.loadImageInSlide(t(this).index())});else if(y.params.slidesPerView>1)for(e=y.activeIndex;e<y.activeIndex+y.params.slidesPerView;e++)y.slides[e]&&y.lazy.loadImageInSlide(e);else y.lazy.loadImageInSlide(y.activeIndex);if(y.params.lazyLoadingInPrevNext)if(y.params.slidesPerView>1){for(e=y.activeIndex+y.params.slidesPerView;e<y.activeIndex+y.params.slidesPerView+y.params.slidesPerView;e++)y.slides[e]&&y.lazy.loadImageInSlide(e);for(e=y.activeIndex-y.params.slidesPerView;e<y.activeIndex;e++)y.slides[e]&&y.lazy.loadImageInSlide(e)}else{var n=y.wrapper.children("."+y.params.slideNextClass);n.length>0&&y.lazy.loadImageInSlide(n.index());var i=y.wrapper.children("."+y.params.slidePrevClass);i.length>0&&y.lazy.loadImageInSlide(i.index())}},onTransitionStart:function(){y.params.lazyLoading&&(y.params.lazyLoadingOnTransitionStart||!y.params.lazyLoadingOnTransitionStart&&!y.lazy.initialImageLoaded)&&y.lazy.load()},onTransitionEnd:function(){y.params.lazyLoading&&!y.params.lazyLoadingOnTransitionStart&&y.lazy.load()}},y.scrollbar={isTouched:!1,setDragPosition:function(e){var t=y.scrollbar,n=s()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,i=n-t.track.offset()[s()?"left":"top"]-t.dragSize/2,r=-y.minTranslate()*t.moveDivider,a=-y.maxTranslate()*t.moveDivider;r>i?i=r:i>a&&(i=a),i=-i/t.moveDivider,y.updateProgress(i),y.setWrapperTranslate(i,!0)},dragStart:function(e){var t=y.scrollbar;t.isTouched=!0,e.preventDefault(),e.stopPropagation(),t.setDragPosition(e),clearTimeout(t.dragTimeout),t.track.transition(0),y.params.scrollbarHide&&t.track.css("opacity",1),y.wrapper.transition(100),t.drag.transition(100),y.emit("onScrollbarDragStart",y)},dragMove:function(e){var t=y.scrollbar;t.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),y.wrapper.transition(0),t.track.transition(0),t.drag.transition(0),y.emit("onScrollbarDragMove",y))},dragEnd:function(e){var t=y.scrollbar;t.isTouched&&(t.isTouched=!1,y.params.scrollbarHide&&(clearTimeout(t.dragTimeout),t.dragTimeout=setTimeout(function(){t.track.css("opacity",0),t.track.transition(400)},1e3)),y.emit("onScrollbarDragEnd",y),y.params.scrollbarSnapOnRelease&&y.slideReset())},enableDraggable:function(){var e=y.scrollbar,n=y.support.touch?e.track:document;t(e.track).on(y.touchEvents.start,e.dragStart),t(n).on(y.touchEvents.move,e.dragMove),t(n).on(y.touchEvents.end,e.dragEnd)},disableDraggable:function(){var e=y.scrollbar,n=y.support.touch?e.track:document;t(e.track).off(y.touchEvents.start,e.dragStart),t(n).off(y.touchEvents.move,e.dragMove),t(n).off(y.touchEvents.end,e.dragEnd)},set:function(){if(y.params.scrollbar){var e=y.scrollbar;e.track=t(y.params.scrollbar),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=t('<div class="swiper-scrollbar-drag"></div>'),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=s()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=y.size/y.virtualSize,e.moveDivider=e.divider*(e.trackSize/y.size),e.dragSize=e.trackSize*e.divider,s()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",y.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(y.params.scrollbar){var e,t=y.scrollbar,n=(y.translate||0,t.dragSize);e=(t.trackSize-t.dragSize)*y.progress,y.rtl&&s()?(e=-e,e>0?(n=t.dragSize-e,e=0):-e+t.dragSize>t.trackSize&&(n=t.trackSize+e)):0>e?(n=t.dragSize+e,e=0):e+t.dragSize>t.trackSize&&(n=t.trackSize-e),s()?(y.support.transforms3d?t.drag.transform("translate3d("+e+"px, 0, 0)"):t.drag.transform("translateX("+e+"px)"),t.drag[0].style.width=n+"px"):(y.support.transforms3d?t.drag.transform("translate3d(0px, "+e+"px, 0)"):t.drag.transform("translateY("+e+"px)"),t.drag[0].style.height=n+"px"),y.params.scrollbarHide&&(clearTimeout(t.timeout),t.track[0].style.opacity=1,t.timeout=setTimeout(function(){t.track[0].style.opacity=0,t.track.transition(400)},1e3))}},setTransition:function(e){y.params.scrollbar&&y.scrollbar.drag.transition(e)}},y.controller={LinearSpline:function(e,t){this.x=e,this.y=t,this.lastIndex=e.length-1;var n,i;this.x.length;this.interpolate=function(e){return e?(i=r(this.x,e),n=i-1,(e-this.x[n])*(this.y[i]-this.y[n])/(this.x[i]-this.x[n])+this.y[n]):0};var r=function(){var e,t,n;return function(i,r){for(t=-1,e=i.length;e-t>1;)i[n=e+t>>1]<=r?t=n:e=n;return e}}()},getInterpolateFunction:function(e){y.controller.spline||(y.controller.spline=y.params.loop?new y.controller.LinearSpline(y.slidesGrid,e.slidesGrid):new y.controller.LinearSpline(y.snapGrid,e.snapGrid))},setTranslate:function(e,t){function i(t){e=t.rtl&&"horizontal"===t.params.direction?-y.translate:y.translate,"slide"===y.params.controlBy&&(y.controller.getInterpolateFunction(t),a=-y.controller.spline.interpolate(-e)),a&&"container"!==y.params.controlBy||(r=(t.maxTranslate()-t.minTranslate())/(y.maxTranslate()-y.minTranslate()),a=(e-y.minTranslate())*r+t.minTranslate()),y.params.controlInverse&&(a=t.maxTranslate()-a),t.updateProgress(a),t.setWrapperTranslate(a,!1,y),t.updateActiveIndex()}var r,a,o=y.params.control;if(y.isArray(o))for(var s=0;s<o.length;s++)o[s]!==t&&o[s]instanceof n&&i(o[s]);else o instanceof n&&t!==o&&i(o)},setTransition:function(e,t){function i(t){t.setWrapperTransition(e,y),0!==e&&(t.onTransitionStart(),t.wrapper.transitionEnd(function(){a&&(t.params.loop&&"slide"===y.params.controlBy&&t.fixLoop(),t.onTransitionEnd())}))}var r,a=y.params.control;if(y.isArray(a))for(r=0;r<a.length;r++)a[r]!==t&&a[r]instanceof n&&i(a[r]);else a instanceof n&&t!==a&&i(a)}},y.hashnav={init:function(){if(y.params.hashnav){y.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var t=0,n=0,i=y.slides.length;i>n;n++){var r=y.slides.eq(n),a=r.attr("data-hash");if(a===e&&!r.hasClass(y.params.slideDuplicateClass)){var o=r.index();y.slideTo(o,t,y.params.runCallbacksOnInit,!0)}}}},setHash:function(){y.hashnav.initialized&&y.params.hashnav&&(document.location.hash=y.slides.eq(y.activeIndex).attr("data-hash")||"")}},y.disableKeyboardControl=function(){y.params.keyboardControl=!1,t(document).off("keydown",p)},y.enableKeyboardControl=function(){y.params.keyboardControl=!0,t(document).on("keydown",p)},y.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},y.params.mousewheelControl){try{new window.WheelEvent("wheel"),y.mousewheel.event="wheel"}catch(H){}y.mousewheel.event||void 0===document.onmousewheel||(y.mousewheel.event="mousewheel"),y.mousewheel.event||(y.mousewheel.event="DOMMouseScroll")}y.disableMousewheelControl=function(){return y.mousewheel.event?(y.container.off(y.mousewheel.event,h),!0):!1},y.enableMousewheelControl=function(){return y.mousewheel.event?(y.container.on(y.mousewheel.event,h),!0):!1},y.parallax={setTranslate:function(){y.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){f(this,y.progress)}),y.slides.each(function(){var e=t(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=Math.min(Math.max(e[0].progress,-1),1);f(this,t)})})},setTransition:function(e){"undefined"==typeof e&&(e=y.params.speed),y.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var n=t(this),i=parseInt(n.attr("data-swiper-parallax-duration"),10)||e;0===e&&(i=0),n.transition(i)})}},y._plugins=[];for(var Y in y.plugins){var X=y.plugins[Y](y,y.params[Y]);X&&y._plugins.push(X)}return y.callPlugins=function(e){for(var t=0;t<y._plugins.length;t++)e in y._plugins[t]&&y._plugins[t][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},y.emitterEventListeners={},y.emit=function(e){y.params[e]&&y.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var t;if(y.emitterEventListeners[e])for(t=0;t<y.emitterEventListeners[e].length;t++)y.emitterEventListeners[e][t](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);y.callPlugins&&y.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},y.on=function(e,t){return e=m(e),y.emitterEventListeners[e]||(y.emitterEventListeners[e]=[]),y.emitterEventListeners[e].push(t),y},y.off=function(e,t){var n;if(e=m(e),"undefined"==typeof t)return y.emitterEventListeners[e]=[],y;if(y.emitterEventListeners[e]&&0!==y.emitterEventListeners[e].length){for(n=0;n<y.emitterEventListeners[e].length;n++)y.emitterEventListeners[e][n]===t&&y.emitterEventListeners[e].splice(n,1);return y}},y.once=function(e,t){e=m(e);var n=function(){t(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),y.off(e,n)};return y.on(e,n),y},y.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,t){return e.attr("role",t),e},addLabel:function(e,t){return e.attr("aria-label",t),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){13===e.keyCode&&(t(e.target).is(y.params.nextButton)?(y.onClickNext(e),y.isEnd?y.a11y.notify(y.params.lastSlideMessage):y.a11y.notify(y.params.nextSlideMessage)):t(e.target).is(y.params.prevButton)&&(y.onClickPrev(e),y.isBeginning?y.a11y.notify(y.params.firstSlideMessage):y.a11y.notify(y.params.prevSlideMessage)),t(e.target).is("."+y.params.bulletClass)&&t(e.target)[0].click())},liveRegion:t('<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var t=y.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},init:function(){if(y.params.nextButton){var e=t(y.params.nextButton);y.a11y.makeFocusable(e),y.a11y.addRole(e,"button"),y.a11y.addLabel(e,y.params.nextSlideMessage)}if(y.params.prevButton){var n=t(y.params.prevButton);y.a11y.makeFocusable(n),y.a11y.addRole(n,"button"),y.a11y.addLabel(n,y.params.prevSlideMessage)}t(y.container).append(y.a11y.liveRegion)},initPagination:function(){y.params.pagination&&y.params.paginationClickable&&y.bullets&&y.bullets.length&&y.bullets.each(function(){var e=t(this);y.a11y.makeFocusable(e),y.a11y.addRole(e,"button"),y.a11y.addLabel(e,y.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){y.a11y.liveRegion&&y.a11y.liveRegion.length>0&&y.a11y.liveRegion.remove()}},y.init=function(){y.params.loop&&y.createLoop(),y.updateContainerSize(),y.updateSlidesSize(),y.updatePagination(),y.params.scrollbar&&y.scrollbar&&(y.scrollbar.set(),y.params.scrollbarDraggable&&y.scrollbar.enableDraggable()),"slide"!==y.params.effect&&y.effects[y.params.effect]&&(y.params.loop||y.updateProgress(),y.effects[y.params.effect].setTranslate()),y.params.loop?y.slideTo(y.params.initialSlide+y.loopedSlides,0,y.params.runCallbacksOnInit):(y.slideTo(y.params.initialSlide,0,y.params.runCallbacksOnInit),0===y.params.initialSlide&&(y.parallax&&y.params.parallax&&y.parallax.setTranslate(),y.lazy&&y.params.lazyLoading&&(y.lazy.load(),y.lazy.initialImageLoaded=!0))),y.attachEvents(),y.params.observer&&y.support.observer&&y.initObservers(),y.params.preloadImages&&!y.params.lazyLoading&&y.preloadImages(),y.params.autoplay&&y.startAutoplay(),y.params.keyboardControl&&y.enableKeyboardControl&&y.enableKeyboardControl(),y.params.mousewheelControl&&y.enableMousewheelControl&&y.enableMousewheelControl(),y.params.hashnav&&y.hashnav&&y.hashnav.init(),y.params.a11y&&y.a11y&&y.a11y.init(),y.emit("onInit",y)},y.cleanupStyles=function(){y.container.removeClass(y.classNames.join(" ")).removeAttr("style"),y.wrapper.removeAttr("style"),y.slides&&y.slides.length&&y.slides.removeClass([y.params.slideVisibleClass,y.params.slideActiveClass,y.params.slideNextClass,y.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),y.paginationContainer&&y.paginationContainer.length&&y.paginationContainer.removeClass(y.params.paginationHiddenClass),y.bullets&&y.bullets.length&&y.bullets.removeClass(y.params.bulletActiveClass),y.params.prevButton&&t(y.params.prevButton).removeClass(y.params.buttonDisabledClass),y.params.nextButton&&t(y.params.nextButton).removeClass(y.params.buttonDisabledClass),y.params.scrollbar&&y.scrollbar&&(y.scrollbar.track&&y.scrollbar.track.length&&y.scrollbar.track.removeAttr("style"),y.scrollbar.drag&&y.scrollbar.drag.length&&y.scrollbar.drag.removeAttr("style"))},y.destroy=function(e,t){y.detachEvents(),y.stopAutoplay(),y.params.scrollbar&&y.scrollbar&&y.params.scrollbarDraggable&&y.scrollbar.disableDraggable(),y.params.loop&&y.destroyLoop(),t&&y.cleanupStyles(),y.disconnectObservers(),y.params.keyboardControl&&y.disableKeyboardControl&&y.disableKeyboardControl(),y.params.mousewheelControl&&y.disableMousewheelControl&&y.disableMousewheelControl(),y.params.a11y&&y.a11y&&y.a11y.destroy(),y.emit("onDestroy"),e!==!1&&(y=null)},y.init(),y}};n.prototype={isSafari:function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1},device:function(){var e=navigator.userAgent,t=e.match(/(Android);?[\s\/]+([\d.]+)?/),n=e.match(/(iPad).*OS\s([\d_]+)/),i=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!n&&e.match(/(iPhone\sOS)\s([\d_]+)/);return{ios:n||r||i,android:t}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),n=0;n<t.length;n++)if(t[n]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}()},plugins:{}};for(var i=(function(){var e=function(e){var t=this,n=0;for(n=0;n<e.length;n++)t[n]=e[n];return t.length=e.length,this},t=function(t,n){var i=[],r=0;if(t&&!n&&t instanceof e)return t;if(t)if("string"==typeof t){var a,o,s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var l="div";for(0===s.indexOf("<li")&&(l="ul"),0===s.indexOf("<tr")&&(l="tbody"),(0===s.indexOf("<td")||0===s.indexOf("<th"))&&(l="tr"),0===s.indexOf("<tbody")&&(l="table"),0===s.indexOf("<option")&&(l="select"),o=document.createElement(l),o.innerHTML=t,r=0;r<o.childNodes.length;r++)i.push(o.childNodes[r])}else for(a=n||"#"!==t[0]||t.match(/[ .<>:~]/)?(n||document).querySelectorAll(t):[document.getElementById(t.split("#")[1])],r=0;r<a.length;r++)a[r]&&i.push(a[r])}else if(t.nodeType||t===window||t===document)i.push(t);else if(t.length>0&&t[0].nodeType)for(r=0;r<t.length;r++)i.push(t[r]);return new e(i)};return e.prototype={addClass:function(e){if("undefined"==typeof e)return this;for(var t=e.split(" "),n=0;n<t.length;n++)for(var i=0;i<this.length;i++)this[i].classList.add(t[n]);return this},removeClass:function(e){for(var t=e.split(" "),n=0;n<t.length;n++)for(var i=0;i<this.length;i++)this[i].classList.remove(t[n]);return this},hasClass:function(e){return this[0]?this[0].classList.contains(e):!1},toggleClass:function(e){for(var t=e.split(" "),n=0;n<t.length;n++)for(var i=0;i<this.length;i++)this[i].classList.toggle(t[n]);return this},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n++)if(2===arguments.length)this[n].setAttribute(e,t);else for(var i in e)this[n][i]=e[i],this[n].setAttribute(i,e[i]);return this},removeAttr:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute(e);return this},data:function(e,t){if("undefined"==typeof t){if(this[0]){var n=this[0].getAttribute("data-"+e);return n?n:this[0].dom7ElementDataStorage&&e in this[0].dom7ElementDataStorage?this[0].dom7ElementDataStorage[e]:void 0}return void 0}for(var i=0;i<this.length;i++){var r=this[i];r.dom7ElementDataStorage||(r.dom7ElementDataStorage={}),r.dom7ElementDataStorage[e]=t}return this},transform:function(e){for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransform=n.MsTransform=n.msTransform=n.MozTransform=n.OTransform=n.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransitionDuration=n.MsTransitionDuration=n.msTransitionDuration=n.MozTransitionDuration=n.OTransitionDuration=n.transitionDuration=e}return this},on:function(e,n,i,r){function a(e){var r=e.target;if(t(r).is(n))i.call(r,e);else for(var a=t(r).parents(),o=0;o<a.length;o++)t(a[o]).is(n)&&i.call(a[o],e)}var o,s,l=e.split(" ");for(o=0;o<this.length;o++)if("function"==typeof n||n===!1)for("function"==typeof n&&(i=arguments[1],r=arguments[2]||!1),s=0;s<l.length;s++)this[o].addEventListener(l[s],i,r);else for(s=0;s<l.length;s++)this[o].dom7LiveListeners||(this[o].dom7LiveListeners=[]),this[o].dom7LiveListeners.push({listener:i,liveListener:a}),this[o].addEventListener(l[s],a,r);return this},off:function(e,t,n,i){for(var r=e.split(" "),a=0;a<r.length;a++)for(var o=0;o<this.length;o++)if("function"==typeof t||t===!1)"function"==typeof t&&(n=arguments[1],i=arguments[2]||!1),this[o].removeEventListener(r[a],n,i);else if(this[o].dom7LiveListeners)for(var s=0;s<this[o].dom7LiveListeners.length;s++)this[o].dom7LiveListeners[s].listener===n&&this[o].removeEventListener(r[a],this[o].dom7LiveListeners[s].liveListener,i);return this},once:function(e,t,n,i){function r(o){n(o),a.off(e,t,r,i)}var a=this;"function"==typeof t&&(t=!1,n=arguments[1],i=arguments[2]),a.on(e,t,r,i)},trigger:function(e,t){for(var n=0;n<this.length;n++){var i;try{i=new window.CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(r){i=document.createEvent("Event"),i.initEvent(e,!0,!0),i.detail=t}this[n].dispatchEvent(i)}return this},transitionEnd:function(e){function t(a){if(a.target===this)for(e.call(this,a),n=0;n<i.length;n++)r.off(i[n],t)}var n,i=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(n=0;n<i.length;n++)r.on(i[n],t);return this},width:function(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),n=document.body,i=e.clientTop||n.clientTop||0,r=e.clientLeft||n.clientLeft||0,a=window.pageYOffset||e.scrollTop,o=window.pageXOffset||e.scrollLeft;return{top:t.top+a-i,left:t.left+o-r}}return null},css:function(e,t){var n;if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n++)for(var i in e)this[n].style[i]=e[i];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n++)this[n].style[e]=t;return this}return this},each:function(e){for(var t=0;t<this.length;t++)e.call(this[t],t,this[t]);return this},html:function(e){if("undefined"==typeof e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t++)this[t].innerHTML=e;return this},is:function(n){if(!this[0])return!1;var i,r;if("string"==typeof n){var a=this[0];if(a===document)return n===document;if(a===window)return n===window;if(a.matches)return a.matches(n);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(n);if(a.mozMatchesSelector)return a.mozMatchesSelector(n);if(a.msMatchesSelector)return a.msMatchesSelector(n);for(i=t(n),r=0;r<i.length;r++)if(i[r]===this[0])return!0;return!1}if(n===document)return this[0]===document;if(n===window)return this[0]===window;if(n.nodeType||n instanceof e){for(i=n.nodeType?[n]:n,r=0;r<i.length;r++)if(i[r]===this[0])return!0;
+return!1}return!1},index:function(){if(this[0]){for(var e=this[0],t=0;null!==(e=e.previousSibling);)1===e.nodeType&&t++;return t}return void 0},eq:function(t){if("undefined"==typeof t)return this;var n,i=this.length;return t>i-1?new e([]):0>t?(n=i+t,new e(0>n?[]:[this[n]])):new e([this[t]])},append:function(t){var n,i;for(n=0;n<this.length;n++)if("string"==typeof t){var r=document.createElement("div");for(r.innerHTML=t;r.firstChild;)this[n].appendChild(r.firstChild)}else if(t instanceof e)for(i=0;i<t.length;i++)this[n].appendChild(t[i]);else this[n].appendChild(t);return this},prepend:function(t){var n,i;for(n=0;n<this.length;n++)if("string"==typeof t){var r=document.createElement("div");for(r.innerHTML=t,i=r.childNodes.length-1;i>=0;i--)this[n].insertBefore(r.childNodes[i],this[n].childNodes[0])}else if(t instanceof e)for(i=0;i<t.length;i++)this[n].insertBefore(t[i],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},insertBefore:function(e){for(var n=t(e),i=0;i<this.length;i++)if(1===n.length)n[0].parentNode.insertBefore(this[i],n[0]);else if(n.length>1)for(var r=0;r<n.length;r++)n[r].parentNode.insertBefore(this[i].cloneNode(!0),n[r])},insertAfter:function(e){for(var n=t(e),i=0;i<this.length;i++)if(1===n.length)n[0].parentNode.insertBefore(this[i],n[0].nextSibling);else if(n.length>1)for(var r=0;r<n.length;r++)n[r].parentNode.insertBefore(this[i].cloneNode(!0),n[r].nextSibling)},next:function(n){return new e(this.length>0?n?this[0].nextElementSibling&&t(this[0].nextElementSibling).is(n)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(n){var i=[],r=this[0];if(!r)return new e([]);for(;r.nextElementSibling;){var a=r.nextElementSibling;n?t(a).is(n)&&i.push(a):i.push(a),r=a}return new e(i)},prev:function(n){return new e(this.length>0?n?this[0].previousElementSibling&&t(this[0].previousElementSibling).is(n)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(n){var i=[],r=this[0];if(!r)return new e([]);for(;r.previousElementSibling;){var a=r.previousElementSibling;n?t(a).is(n)&&i.push(a):i.push(a),r=a}return new e(i)},parent:function(e){for(var n=[],i=0;i<this.length;i++)e?t(this[i].parentNode).is(e)&&n.push(this[i].parentNode):n.push(this[i].parentNode);return t(t.unique(n))},parents:function(e){for(var n=[],i=0;i<this.length;i++)for(var r=this[i].parentNode;r;)e?t(r).is(e)&&n.push(r):n.push(r),r=r.parentNode;return t(t.unique(n))},find:function(t){for(var n=[],i=0;i<this.length;i++)for(var r=this[i].querySelectorAll(t),a=0;a<r.length;a++)n.push(r[a]);return new e(n)},children:function(n){for(var i=[],r=0;r<this.length;r++)for(var a=this[r].childNodes,o=0;o<a.length;o++)n?1===a[o].nodeType&&t(a[o]).is(n)&&i.push(a[o]):1===a[o].nodeType&&i.push(a[o]);return new e(t.unique(i))},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){var e,n,i=this;for(e=0;e<arguments.length;e++){var r=t(arguments[e]);for(n=0;n<r.length;n++)i[i.length]=r[n],i.length++}return i}},t.fn=e.prototype,t.unique=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t},t}()),r=["jQuery","Zepto","Dom7"],a=0;a<r.length;a++)window[r[a]]&&e(window[r[a]]);var o;o="undefined"==typeof i?window.Dom7||window.Zepto||window.jQuery:i,o&&("transitionEnd"in o.fn||(o.fn.transitionEnd=function(e){function t(a){if(a.target===this)for(e.call(this,a),n=0;n<i.length;n++)r.off(i[n],t)}var n,i=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(n=0;n<i.length;n++)r.on(i[n],t);return this}),"transform"in o.fn||(o.fn.transform=function(e){for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransform=n.MsTransform=n.msTransform=n.MozTransform=n.OTransform=n.transform=e}return this}),"transition"in o.fn||(o.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t++){var n=this[t].style;n.webkitTransitionDuration=n.MsTransitionDuration=n.msTransitionDuration=n.MozTransitionDuration=n.OTransitionDuration=n.transitionDuration=e}return this})),ionic.views.Swiper=n}(),function(e){"use strict";e.views.Toggle=e.views.View.inherit({initialize:function(t){var n=this;this.el=t.el,this.checkbox=t.checkbox,this.track=t.track,this.handle=t.handle,this.openPercent=-1,this.onChange=t.onChange||function(){},this.triggerThreshold=t.triggerThreshold||20,this.dragStartHandler=function(e){n.dragStart(e)},this.dragHandler=function(e){n.drag(e)},this.holdHandler=function(e){n.hold(e)},this.releaseHandler=function(e){n.release(e)},this.dragStartGesture=e.onGesture("dragstart",this.dragStartHandler,this.el),this.dragGesture=e.onGesture("drag",this.dragHandler,this.el),this.dragHoldGesture=e.onGesture("hold",this.holdHandler,this.el),this.dragReleaseGesture=e.onGesture("release",this.releaseHandler,this.el)},destroy:function(){e.offGesture(this.dragStartGesture,"dragstart",this.dragStartGesture),e.offGesture(this.dragGesture,"drag",this.dragGesture),e.offGesture(this.dragHoldGesture,"hold",this.holdHandler),e.offGesture(this.dragReleaseGesture,"release",this.releaseHandler)},tap:function(){"disabled"!==this.el.getAttribute("disabled")&&this.val(!this.checkbox.checked)},dragStart:function(e){this.checkbox.disabled||(this._dragInfo={width:this.el.offsetWidth,left:this.el.offsetLeft,right:this.el.offsetLeft+this.el.offsetWidth,triggerX:this.el.offsetWidth/2,initialState:this.checkbox.checked},e.gesture.srcEvent.preventDefault(),this.hold(e))},drag:function(t){var n=this;this._dragInfo&&(t.gesture.srcEvent.preventDefault(),e.requestAnimationFrame(function(){if(n._dragInfo){var e=t.gesture.touches[0].pageX-n._dragInfo.left,i=n._dragInfo.width-n.triggerThreshold;n._dragInfo.initialState?e<n.triggerThreshold?n.setOpenPercent(0):e>n._dragInfo.triggerX&&n.setOpenPercent(100):e<n._dragInfo.triggerX?n.setOpenPercent(0):e>i&&n.setOpenPercent(100)}}))},endDrag:function(){this._dragInfo=null},hold:function(){this.el.classList.add("dragging")},release:function(e){this.el.classList.remove("dragging"),this.endDrag(e)},setOpenPercent:function(t){if(this.openPercent<0||t<this.openPercent-3||t>this.openPercent+3)if(this.openPercent=t,0===t)this.val(!1);else if(100===t)this.val(!0);else{var n=Math.round(t/100*this.track.offsetWidth-this.handle.offsetWidth);n=1>n?0:n,this.handle.style[e.CSS.TRANSFORM]="translate3d("+n+"px,0,0)"}},val:function(t){return(t===!0||t===!1)&&(""!==this.handle.style[e.CSS.TRANSFORM]&&(this.handle.style[e.CSS.TRANSFORM]=""),this.checkbox.checked=t,this.openPercent=t?100:0,this.onChange&&this.onChange()),this.checkbox.checked}})}(ionic)}();
+/*
+ AngularJS v1.5.11
+ (c) 2010-2017 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(y){'use strict';function G(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.5.11/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var f=encodeURIComponent,e;e=arguments[d];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;c+=f(e)}return new b(c)}}function la(a){if(null==a||Ya(a))return!1;if(I(a)||D(a)||F&&a instanceof
+F)return!0;var b="length"in Object(a)&&a.length;return ba(b)&&(0<=b&&(b-1 in a||a instanceof Array)||"function"===typeof a.item)}function q(a,b,d){var c,f;if(a)if(C(a))for(c in a)"prototype"===c||"length"===c||"name"===c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(I(a)||la(a)){var e="object"!==typeof a;c=0;for(f=a.length;c<f;c++)(e||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==q)a.forEach(b,d,a);else if(xc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===
+typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ua.call(a,c)&&b.call(d,a[c],c,a);return a}function yc(a,b,d){for(var c=Object.keys(a).sort(),f=0;f<c.length;f++)b.call(d,a[c[f]],c[f]);return c}function zc(a){return function(b,d){a(d,b)}}function ke(){return++sb}function Rb(a,b,d){for(var c=a.$$hashKey,f=0,e=b.length;f<e;++f){var g=b[f];if(E(g)||C(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],n=g[m];d&&E(n)?ja(n)?a[m]=new Date(n.valueOf()):
+Za(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):Sb(n)?a[m]=n.clone():(E(a[m])||(a[m]=I(n)?[]:{}),Rb(a[m],[n],!0)):a[m]=n}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function R(a){return Rb(a,va.call(arguments,1),!1)}function le(a){return Rb(a,va.call(arguments,1),!0)}function Z(a){return parseInt(a,10)}function Tb(a,b){return R(Object.create(a),b)}function w(){}function $a(a){return a}function ha(a){return function(){return a}}function Ac(a){return C(a.toString)&&a.toString!==ma}function z(a){return"undefined"===
+typeof a}function x(a){return"undefined"!==typeof a}function E(a){return null!==a&&"object"===typeof a}function xc(a){return null!==a&&"object"===typeof a&&!Bc(a)}function D(a){return"string"===typeof a}function ba(a){return"number"===typeof a}function ja(a){return"[object Date]"===ma.call(a)}function C(a){return"function"===typeof a}function Za(a){return"[object RegExp]"===ma.call(a)}function Ya(a){return a&&a.window===a}function ab(a){return a&&a.$evalAsync&&a.$watch}function Ka(a){return"boolean"===
+typeof a}function me(a){return a&&ba(a.length)&&ne.test(ma.call(a))}function Sb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function oe(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function wa(a){return Q(a.nodeName||a[0]&&a[0].nodeName)}function bb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function sa(a,b){function d(a,b){var d=b.$$hashKey,e;if(I(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(xc(a))for(e in a)b[e]=c(a[e]);else if(a&&
+"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&(b[e]=c(a[e]));else for(e in a)ua.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!E(a))return a;var b=e.indexOf(a);if(-1!==b)return g[b];if(Ya(a)||ab(a))throw xa("cpws");var b=!1,c=f(a);void 0===c&&(c=I(a)?[]:Object.create(Bc(a)),b=!0);e.push(a);g.push(c);return b?d(a,c):c}function f(a){switch(ma.call(a)){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 a.constructor(c(a.buffer),
+a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(C(a.cloneNode))return a.cloneNode(!0)}
+var e=[],g=[];if(b){if(me(b)||"[object ArrayBuffer]"===ma.call(b))throw xa("cpta");if(a===b)throw xa("cpi");I(b)?b.length=0:q(b,function(a,d){"$$hashKey"!==d&&delete b[d]});e.push(a);g.push(b);return d(a,b)}return c(a)}function na(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(I(a)){if(!I(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!na(a[c],b[c]))return!1;return!0}}else{if(ja(a))return ja(b)?na(a.getTime(),
+b.getTime()):!1;if(Za(a))return Za(b)?a.toString()===b.toString():!1;if(ab(a)||ab(b)||Ya(a)||Ya(b)||I(b)||ja(b)||Za(b))return!1;d=V();for(c in a)if("$"!==c.charAt(0)&&!C(a[c])){if(!na(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&x(b[c])&&!C(b[c]))return!1;return!0}return!1}function cb(a,b,d){return a.concat(va.call(b,d))}function db(a,b){var d=2<arguments.length?va.call(arguments,2):[];return!C(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,
+cb(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function pe(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:Ya(b)?d="$WINDOW":b&&y.document===b?d="$DOCUMENT":ab(b)&&(d="$SCOPE");return d}function eb(a,b){if(!z(a))return ba(b)||(b=b?2:null),JSON.stringify(a,pe,b)}function Cc(a){return D(a)?JSON.parse(a):a}function Dc(a,b){a=a.replace(qe,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return ia(d)?b:d}function Ub(a,
+b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=Dc(b,c);d*=b-c;a=new Date(a.getTime());a.setMinutes(a.getMinutes()+d);return a}function ya(a){a=F(a).clone();try{a.empty()}catch(b){}var d=F("<div>").append(a).html();try{return a[0].nodeType===La?Q(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+Q(b)})}catch(c){return Q(d)}}function Ec(a){try{return decodeURIComponent(a)}catch(b){}}function Fc(a){var b={};q((a||"").split("&"),function(a){var c,f,e;a&&(f=a=a.replace(/\+/g,"%20"),
+c=a.indexOf("="),-1!==c&&(f=a.substring(0,c),e=a.substring(c+1)),f=Ec(f),x(f)&&(e=x(e)?Ec(e):!0,ua.call(b,f)?I(b[f])?b[f].push(e):b[f]=[b[f],e]:b[f]=e))});return b}function Vb(a){var b=[];q(a,function(a,c){I(a)?q(a,function(a){b.push(oa(c,!0)+(!0===a?"":"="+oa(a,!0)))}):b.push(oa(c,!0)+(!0===a?"":"="+oa(a,!0)))});return b.length?b.join("&"):""}function tb(a){return oa(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function oa(a,b){return encodeURIComponent(a).replace(/%40/gi,
+"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function re(a,b){var d,c,f=Oa.length;for(c=0;c<f;++c)if(d=Oa[c]+b,D(d=a.getAttribute(d)))return d;return null}function se(a,b){var d,c,f={};q(Oa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});q(Oa,function(b){b+="app";var f;!d&&(f=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=f,c=f.getAttribute(b))});d&&(te?(f.strictDi=null!==re(d,"strict-di"),
+b(d,c?[c]:[],f)):y.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Gc(a,b,d){E(d)||(d={});d=R({strictDi:!1},d);var c=function(){a=F(a);if(a.injector()){var c=a[0]===y.document?"document":ya(a);throw xa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);
+b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},f=/^NG_ENABLE_DEBUG_INFO!/,e=/^NG_DEFER_BOOTSTRAP!/;y&&f.test(y.name)&&(d.debugInfoEnabled=!0,y.name=y.name.replace(f,""));if(y&&!e.test(y.name))return c();y.name=y.name.replace(e,"");$.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};C($.resumeDeferredBootstrap)&&$.resumeDeferredBootstrap()}function ue(){y.name=
+"NG_ENABLE_DEBUG_INFO!"+y.name;y.location.reload()}function ve(a){a=$.element(a).injector();if(!a)throw xa("test");return a.get("$$testability")}function Hc(a,b){b=b||"_";return a.replace(we,function(a,c){return(c?b:"")+a.toLowerCase()})}function xe(){var a;if(!Ic){var b=ub();(za=z(b)?y.jQuery:b?y[b]:void 0)&&za.fn.on?(F=za,R(za.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=za.cleanData,za.cleanData=function(b){for(var c,
+f=0,e;null!=(e=b[f]);f++)(c=za._data(e,"events"))&&c.$destroy&&za(e).triggerHandler("$destroy");a(b)}):F=W;$.element=F;Ic=!0}}function gb(a,b,d){if(!a)throw xa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);gb(C(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw xa("badname",b);}function Jc(a,b,d){if(!b)return a;b=b.split(".");for(var c,f=a,e=b.length,g=0;g<e;g++)c=
+b[g],a&&(a=(f=a)[c]);return!d&&C(a)?db(f,a):a}function vb(a){for(var b=a[0],d=a[a.length-1],c,f=1;b!==d&&(b=b.nextSibling);f++)if(c||a[f]!==b)c||(c=F(va.call(a,0,f))),c.push(b);return c||a}function V(){return Object.create(null)}function ye(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=G("$injector"),c=G("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||G;return b(a,"module",function(){var a={};return function(e,g,h){if("hasOwnProperty"===e)throw c("badname","module");g&&a.hasOwnProperty(e)&&
+(a[e]=null);return b(a,e,function(){function a(b,d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return H}}function b(a,d){return function(b,f){f&&C(f)&&(f.$$moduleName=e);c.push([a,d,arguments]);return H}}if(!g)throw d("nomod",e);var c=[],f=[],r=[],s=a("$injector","invoke","push",f),H={_invokeQueue:c,_configBlocks:f,_runBlocks:r,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide",
+"constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:s,run:function(a){r.push(a);return this}};h&&s(h);return H})}})}function ka(a,b){if(I(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(E(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];
+return b||a}function ze(a){R(a,{bootstrap:Gc,copy:sa,extend:R,merge:le,equals:na,element:F,forEach:q,injector:fb,noop:w,bind:db,toJson:eb,fromJson:Cc,identity:$a,isUndefined:z,isDefined:x,isString:D,isFunction:C,isObject:E,isNumber:ba,isElement:Sb,isArray:I,version:Ae,isDate:ja,lowercase:Q,uppercase:wb,callbacks:{$$counter:0},getTestability:ve,$$minErr:G,$$csp:da,reloadWithDebugInfo:ue});Wb=ye(y);Wb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Be});a.provider("$compile",Kc).directive({a:Ce,
+input:Lc,textarea:Lc,form:De,script:Ee,select:Fe,option:Ge,ngBind:He,ngBindHtml:Ie,ngBindTemplate:Je,ngClass:Ke,ngClassEven:Le,ngClassOdd:Me,ngCloak:Ne,ngController:Oe,ngForm:Pe,ngHide:Qe,ngIf:Re,ngInclude:Se,ngInit:Te,ngNonBindable:Ue,ngPluralize:Ve,ngRepeat:We,ngShow:Xe,ngStyle:Ye,ngSwitch:Ze,ngSwitchWhen:$e,ngSwitchDefault:af,ngOptions:bf,ngTransclude:cf,ngModel:df,ngList:ef,ngChange:ff,pattern:Mc,ngPattern:Mc,required:Nc,ngRequired:Nc,minlength:Oc,ngMinlength:Oc,maxlength:Pc,ngMaxlength:Pc,ngValue:gf,
+ngModelOptions:hf}).directive({ngInclude:jf}).directive(xb).directive(Qc);a.provider({$anchorScroll:kf,$animate:lf,$animateCss:mf,$$animateJs:nf,$$animateQueue:of,$$AnimateRunner:pf,$$animateAsyncRun:qf,$browser:rf,$cacheFactory:sf,$controller:tf,$document:uf,$exceptionHandler:vf,$filter:Rc,$$forceReflow:wf,$interpolate:xf,$interval:yf,$http:zf,$httpParamSerializer:Af,$httpParamSerializerJQLike:Bf,$httpBackend:Cf,$xhrFactory:Df,$jsonpCallbacks:Ef,$location:Ff,$log:Gf,$parse:Hf,$rootScope:If,$q:Jf,
+$$q:Kf,$sce:Lf,$sceDelegate:Mf,$sniffer:Nf,$templateCache:Of,$templateRequest:Pf,$$testability:Qf,$timeout:Rf,$window:Sf,$$rAF:Tf,$$jqLite:Uf,$$HashMap:Vf,$$cookieReader:Wf})}])}function hb(a){return a.replace(Xf,function(a,d,c,f){return f?c.toUpperCase():c}).replace(Yf,"Moz$1")}function Sc(a){a=a.nodeType;return 1===a||!a||9===a}function Tc(a,b){var d,c,f=b.createDocumentFragment(),e=[];if(Xb.test(a)){d=f.appendChild(b.createElement("div"));c=(Zf.exec(a)||["",""])[1].toLowerCase();c=pa[c]||pa._default;
+d.innerHTML=c[1]+a.replace($f,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;e=cb(e,d.childNodes);d=f.firstChild;d.textContent=""}else e.push(b.createTextNode(a));f.textContent="";f.innerHTML="";q(e,function(a){f.appendChild(a)});return f}function Uc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)}function W(a){if(a instanceof W)return a;var b;D(a)&&(a=Y(a),b=!0);if(!(this instanceof W)){if(b&&"<"!==a.charAt(0))throw Yb("nosel");return new W(a)}if(b){b=y.document;var d;a=(d=ag.exec(a))?
+[b.createElement(d[1])]:(d=Tc(a,b))?d.childNodes:[]}Vc(this,a)}function Zb(a){return a.cloneNode(!0)}function yb(a,b){b||ib(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,f=d.length;c<f;c++)ib(d[c])}function Wc(a,b,d,c){if(x(c))throw Yb("offargs");var f=(c=zb(a))&&c.events,e=c&&c.handle;if(e)if(b){var g=function(b){var c=f[b];x(d)&&bb(c||[],d);x(d)&&c&&0<c.length||(a.removeEventListener(b,e,!1),delete f[b])};q(b.split(" "),function(a){g(a);Ab[a]&&g(Ab[a])})}else for(b in f)"$destroy"!==
+b&&a.removeEventListener(b,e,!1),delete f[b]}function ib(a,b){var d=a.ng339,c=d&&jb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Wc(a)),delete jb[d],a.ng339=void 0))}function zb(a,b){var d=a.ng339,d=d&&jb[d];b&&!d&&(a.ng339=d=++bg,d=jb[d]={events:{},data:{},handle:void 0});return d}function $b(a,b,d){if(Sc(a)){var c=x(d),f=!c&&b&&!E(b),e=!b;a=(a=zb(a,!f))&&a.data;if(c)a[b]=d;else{if(e)return a;if(f)return a&&a[b];R(a,b)}}}function Bb(a,b){return a.getAttribute?
+-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Cb(a,b){b&&a.setAttribute&&q(b.split(" "),function(b){a.setAttribute("class",Y((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Y(b)+" "," ")))})}function Db(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(b.split(" "),function(a){a=Y(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",Y(d))}}function Vc(a,b){if(b)if(b.nodeType)a[a.length++]=
+b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Xc(a,b){return Eb(a,"$"+(b||"ngController")+"Controller")}function Eb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=I(b)?b:[b];a;){for(var c=0,f=b.length;c<f;c++)if(x(d=F.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function Yc(a){for(yb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Fb(a,b){b||yb(a);var d=a.parentNode;d&&d.removeChild(a)}
+function cg(a,b){b=b||y;if("complete"===b.document.readyState)b.setTimeout(a);else F(b).on("load",a)}function Zc(a,b){var d=Gb[b.toLowerCase()];return d&&$c[wa(a)]&&d}function dg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],g=e?e.length:0;if(g){if(z(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=
+function(){return!0===c.immediatePropagationStopped};var k=e.specialHandlerWrapper||eg;1<g&&(e=ka(e));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,e[l])}};d.elem=a;return d}function eg(a,b,d){d.call(a,b)}function fg(a,b,d){var c=b.relatedTarget;c&&(c===a||gg.call(a,c))||d.call(a,b)}function Uf(){this.$get=function(){return R(W,{hasClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);
+return Cb(a,b)}})}}function Aa(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||ke)():d+":"+a}function Sa(a,b){if(b){var d=0;this.nextUid=function(){return++d}}q(a,this.put,this)}function ad(a){a=(Function.prototype.toString.call(a)+" ").replace(hg,"");return a.match(ig)||a.match(jg)}function kg(a){return(a=ad(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,
+c){if(E(b))q(b,zc(a));else return a(b,c)}}function c(a,b){Ra(a,"service");if(C(b)||I(b))b=r.instantiate(b);if(!b.$get)throw Ba("pget",a);return n[a+"Provider"]=b}function f(a,b){return function(){var c=u.invoke(b,this);if(z(c))throw Ba("undef",a);return c}}function e(a,b,d){return c(a,{$get:!1!==d?f(a,b):b})}function g(a){gb(z(a)||I(a),"modulesToLoad","not an array");var b=[],c;q(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=r.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,
+!0);try{D(a)?(c=Wb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):C(a)?b.push(r.invoke(a)):I(a)?b.push(r.invoke(a)):Qa(a,"module")}catch(e){throw I(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ba("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===k)throw Ba("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=
+c(b,e),a[b]}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ba("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);I(a)&&(a=a[a.length-1]);d=11>=Ia?!1:"function"===typeof a&&/^(?:class\b|constructor\()/.test(Function.prototype.toString.call(a)+" ");return d?(c.unshift(null),new (Function.prototype.bind.apply(a,
+c))):a.apply(b,c)},instantiate:function(a,b,c){var d=I(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return n.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Sa([],!0),n={$provide:{provider:d(c),factory:d(e),service:d(function(a,b){return e(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return e(a,ha(b),!1)}),constant:d(function(a,b){Ra(a,"constant");
+n[a]=b;s[a]=b}),decorator:function(a,b){var c=r.get(a+"Provider"),d=c.$get;c.$get=function(){var a=u.invoke(d,c);return u.invoke(b,null,{$delegate:a})}}}},r=n.$injector=h(n,function(a,b){$.isString(b)&&l.push(b);throw Ba("unpr",l.join(" <- "));}),s={},H=h(s,function(a,b){var c=r.get(a+"Provider",b);return u.invoke(c.$get,c,void 0,a)}),u=H;n.$injectorProvider={$get:ha(H)};var p=g(a),u=H.get("$injector");u.strictDi=b;q(p,function(a){a&&u.invoke(a)});return u}function kf(){var a=!0;this.disableAutoScrolling=
+function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function f(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===wa(a))return b=a,!0});return b}function e(a){if(a){a.scrollIntoView();var c;c=g.yOffset;C(c)?c=c():Sb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):ba(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=D(a)?a:ba(a)?a.toString():d.hash();var b;a?(b=h.getElementById(a))?
+e(b):(b=f(h.getElementsByName(a)))?e(b):"top"===a&&e(null):e(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||cg(function(){c.$evalAsync(g)})});return g}]}function kb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;I(a)&&(a=a.join(" "));I(b)&&(b=b.join(" "));return a+" "+b}function lg(a){D(a)&&(a=a.split(" "));var b=V();q(a,function(a){a.length&&(b[a]=!0)});return b}function Ca(a){return E(a)?a:{}}function mg(a,b,d,c){function f(a){try{a.apply(null,
+va.call(arguments,1))}finally{if(H--,0===H)for(;u.length;)try{u.pop()()}catch(b){d.error(b)}}}function e(){N=null;g();h()}function g(){p=L();p=z(p)?null:p;na(p,J)&&(p=J);J=p}function h(){if(A!==k.url()||K!==p)A=k.url(),K=p,q(O,function(a){a(k.url(),p)})}var k=this,l=a.location,m=a.history,n=a.setTimeout,r=a.clearTimeout,s={};k.isMock=!1;var H=0,u=[];k.$$completeOutstandingRequest=f;k.$$incOutstandingRequestCount=function(){H++};k.notifyWhenNoOutstandingRequests=function(a){0===H?a():u.push(a)};var p,
+K,A=l.href,v=b.find("base"),N=null,L=c.history?function(){try{return m.state}catch(a){}}:w;g();K=p;k.url=function(b,d,e){z(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=K===e;if(A===b&&(!c.history||f))return k;var h=A&&Ga(A)===Ga(b);A=b;K=e;!c.history||h&&f?(h||(N=b),d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b,l.href!==b&&(N=b)):(m[d?"replaceState":"pushState"](e,"",b),g(),K=p);N&&(N=b);return k}return N||l.href.replace(/%27/g,
+"'")};k.state=function(){return p};var O=[],M=!1,J=null;k.onUrlChange=function(b){if(!M){if(c.history)F(a).on("popstate",e);F(a).on("hashchange",e);M=!0}O.push(b);return b};k.$$applicationDestroyed=function(){F(a).off("hashchange popstate",e)};k.$$checkUrlChange=h;k.baseHref=function(){var a=v.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};k.defer=function(a,b){var c;H++;c=n(function(){delete s[c];f(a)},b||0);s[c]=!0;return c};k.defer.cancel=function(a){return s[a]?(delete s[a],r(a),
+f(w),!0):!1}}function rf(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new mg(a,c,b,d)}]}function sf(){this.$get=function(){function a(a,c){function f(a){a!==n&&(r?r===a&&(r=a.n):r=a,e(a.n,a.p),e(a,n),n=a,n.n=null)}function e(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw G("$cacheFactory")("iid",a);var g=0,h=R({},c,{id:a}),k=V(),l=c&&c.capacity||Number.MAX_VALUE,m=V(),n=null,r=null;return b[a]={put:function(a,b){if(!z(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]=
+{key:a});f(c)}a in k||g++;k[a]=b;g>l&&this.remove(r.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;f(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===n&&(n=b.p);b===r&&(r=b.n);e(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=V();g=0;m=V();n=r=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return R({},h,{size:g})}}}var b={};a.info=function(){var a={};q(b,function(b,f){a[f]=b.info()});return a};
+a.get=function(a){return b[a]};return a}}function Of(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Kc(a,b){function d(a,b,c){var d=/^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/,e=V();q(a,function(a,f){if(a in n)e[f]=n[a];else{var g=a.match(d);if(!g)throw fa("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(n[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||
+b!==Q(b))throw fa("baddir",a);if(a!==a.trim())throw fa("baddir",a);}function f(a){var b=a.require||a.controller&&a.name;!I(b)&&E(b)&&q(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var e={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,h=/(([\w-]+)(?::([^;]+))?;?)/,k=oe("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,n=V();this.directive=function A(b,d){gb(b,"name");Ra(b,"directive");D(b)?(c(b),gb(d,"directiveFactory"),e.hasOwnProperty(b)||
+(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];q(e[b],function(e,g){try{var h=a.invoke(e);C(h)?h={compile:ha(h)}:!h.compile&&h.link&&(h.compile=ha(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=f(h);var k=h,l=h.restrict;if(l&&(!D(l)||!/[EACM]/.test(l)))throw fa("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=e.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),e[b].push(d)):q(b,zc(A));return this};this.component=function(a,b){function c(a){function e(b){return C(b)||
+I(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:ng(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};q(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}var d=b.controller||function(){};q(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,C(d)&&(d[b]=a))});c.$inject=["$injector"];
+return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return x(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return x(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var r=!0;this.debugInfoEnabled=function(a){return x(a)?(r=a,this):r};var s=!0;this.preAssignBindingsEnabled=function(a){return x(a)?(s=a,this):s};var H=10;this.onChangesTtl=function(a){return arguments.length?(H=a,this):
+H};var u=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(u=a,this):u};var p=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?(p=a,this):p};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(a,b,c,f,n,M,J,B,T,S){function P(){try{if(!--xa)throw da=void 0,fa("infchng",H);J.$apply(function(){for(var a=[],b=0,c=da.length;b<c;++b)try{da[b]()}catch(d){a.push(d)}da=
+void 0;if(a.length)throw a;})}finally{xa++}}function t(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function qa(a,b,c){ta.innerHTML="<span "+b+">";b=ta.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function Ja(a,b){try{a.addClass(b)}catch(c){}}function ca(a,b,c,d,e){a instanceof F||(a=F(a));for(var f=/\S+/,g=0,h=a.length;g<h;g++){var k=a[g];k.nodeType===La&&k.nodeValue.match(f)&&
+Uc(k,a[g]=y.document.createElement("span"))}var l=Ma(a,b,a,c,d,e);ca.$$addScopeClass(a);var m=null;return function(b,c,d){gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var f=d.parentBoundTranscludeFn,g=d.transcludeControllers;d=d.futureParentElement;f&&f.$$boundTransclude&&(f=f.$$boundTransclude);m||(m=(d=d&&d[0])?"foreignobject"!==wa(d)&&ma.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==m?F(ha(m,F("<div>").append(a).html())):c?Pa.clone.call(a):a;if(g)for(var h in g)d.data("$"+
+h+"Controller",g[h].instance);ca.$$addScopeInfo(d,b);c&&c(d,b);l&&l(b,d,d,f);return d}}function Ma(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,n,s,A;if(p)for(A=Array(c.length),m=0;m<h.length;m+=3)f=h[m],A[f]=c[f];else A=c;m=0;for(n=h.length;m<n;)k=A[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),ca.$$addScopeInfo(F(k),l)):l=a,s=c.transcludeOnThisElement?G(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?G(a,b):null,c(f,l,k,d,s)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k,l,m,n,p,s=0;s<a.length;s++){k=
+new t;l=cc(a[s],[],k,0===s?d:void 0,e);(f=l.length?W(l,a[s],k,b,c,null,[],[],f):null)&&f.scope&&ca.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[s].childNodes)||!m.length?null:Ma(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(s,f,k),n=!0,p=p||f;f=null}return n?g:null}function G(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=V(),
+f;for(f in b.$$slots)e[f]=b.$$slots[f]?G(a,b.$$slots[f],c):null;return d}function cc(a,b,c,d,e){var f=c.$attr,g;switch(a.nodeType){case 1:g=wa(a);U(b,Da(g),"E",d,e);for(var k,l,m,n,p=a.attributes,s=0,A=p&&p.length;s<A;s++){var r=!1,u=!1;k=p[s];l=k.name;m=Y(k.value);k=Da(l);(n=Ga.test(k))&&(l=l.replace(bd,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));(k=k.match(Ha))&&Z(k[1])&&(r=l,u=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));k=Da(l.toLowerCase());f[k]=l;if(n||!c.hasOwnProperty(k))c[k]=
+m,Zc(a,k)&&(c[k]=!0);pa(a,b,m,k,n);U(b,k,"A",d,e,r,u)}"input"===g&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Fa)break;f=a.className;E(f)&&(f=f.animVal);if(D(f)&&""!==f)for(;a=h.exec(f);)k=Da(a[2]),U(b,k,"C",d,e)&&(c[k]=Y(a[3])),f=f.substr(a.index+a[0].length);break;case La:if(11===Ia)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===La;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ka(b,a.nodeValue);break;case 8:if(!Ea)break;
+Ta(a,b,c,d,e)}b.sort(ja);return b}function Ta(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=Da(f[1]);U(b,h,"M",d,e)&&(c[h]=Y(f[2]))}}catch(k){}}function cd(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw fa("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return F(d)}function dd(a,b,c){return function(d,e,f,g,h){e=cd(e[0],b,c);return a(d,e,f,g,h)}}function dc(a,b,c,d,e,f){var g;return a?
+ca(b,c,d,e,f):function(){g||(g=ca(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function W(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=dd(a,c,d));a.require=v.require;a.directiveName=S;if(u===v||v.$$isolateScope)a=ra(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=dd(b,c,d));b.require=v.require;b.directiveName=S;if(u===v||v.$$isolateScope)b=ra(b,{isolateScope:!0});k.push(b)}}function n(a,e,f,g,l){function m(a,b,c,d){var e;ab(a)||(d=c,c=b,b=a,a=void 0);H&&(e=J);c||(c=H?P.parent():P);if(d){var f=
+l.$$slots[d];if(f)return f(a,b,e,c,qa);if(z(f))throw fa("noslot",d,ya(P));}else return l(a,b,e,c,qa)}var p,v,B,M,T,J,S,P;b===f?(g=d,P=d.$$element):(P=F(f),g=new t(P,d));T=e;u?M=e.$new(!0):A&&(T=e.$parent);l&&(S=m,S.$$boundTransclude=l,S.isSlotFilled=function(a){return!!l.$$slots[a]});r&&(J=ba(P,g,S,r,M,e,u));u&&(ca.$$addScopeInfo(P,M,!0,!(O&&(O===u||O===u.$$originalDirective))),ca.$$addScopeClass(P,!0),M.$$isolateBindings=u.$$isolateBindings,v=la(e,g,M,M.$$isolateBindings,u),v.removeWatches&&M.$on("$destroy",
+v.removeWatches));for(p in J){v=r[p];B=J[p];var L=v.$$bindings.bindToController;if(s){B.bindingInfo=L?la(T,g,B.instance,L,v):{};var ac=B();ac!==B.instance&&(B.instance=ac,P.data("$"+v.name+"Controller",ac),B.bindingInfo.removeWatches&&B.bindingInfo.removeWatches(),B.bindingInfo=la(T,g,B.instance,L,v))}else B.instance=B(),P.data("$"+v.name+"Controller",B.instance),B.bindingInfo=la(T,g,B.instance,L,v)}q(r,function(a,b){var c=a.require;a.bindToController&&!I(c)&&E(c)&&R(J[b].instance,X(b,c,P,J))});q(J,
+function(a){var b=a.instance;if(C(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(C(b.$onInit))try{b.$onInit()}catch(e){c(e)}C(b.$doCheck)&&(T.$watch(function(){b.$doCheck()}),b.$doCheck());C(b.$onDestroy)&&T.$on("$destroy",function(){b.$onDestroy()})});p=0;for(v=h.length;p<v;p++)B=h[p],sa(B,B.isolateScope?M:e,P,g,B.require&&X(B.directiveName,B.require,P,J),S);var qa=e;u&&(u.template||null===u.templateUrl)&&(qa=M);a&&a(qa,f.childNodes,void 0,l);for(p=k.length-1;0<=p;p--)B=
+k[p],sa(B,B.isolateScope?M:e,P,g,B.require&&X(B.directiveName,B.require,P,J),S);q(J,function(a){a=a.instance;C(a.$postLink)&&a.$postLink()})}l=l||{};for(var p=-Number.MAX_VALUE,A=l.newScopeDirective,r=l.controllerDirectives,u=l.newIsolateScopeDirective,O=l.templateDirective,M=l.nonTlbTranscludeDirective,T=!1,J=!1,H=l.hasElementTranscludeDirective,B=d.$$element=F(b),v,S,P,L=e,qa,x=!1,Ja=!1,w,y=0,D=a.length;y<D;y++){v=a[y];var Ta=v.$$start,Ma=v.$$end;Ta&&(B=cd(b,Ta,Ma));P=void 0;if(p>v.priority)break;
+if(w=v.scope)v.templateUrl||(E(w)?($("new/isolated scope",u||A,v,B),u=v):$("new/isolated scope",u,v,B)),A=A||v;S=v.name;if(!x&&(v.replace&&(v.templateUrl||v.template)||v.transclude&&!v.$$tlb)){for(w=y+1;x=a[w++];)if(x.transclude&&!x.$$tlb||x.replace&&(x.templateUrl||x.template)){Ja=!0;break}x=!0}!v.templateUrl&&v.controller&&(r=r||V(),$("'"+S+"' controller",r[S],v,B),r[S]=v);if(w=v.transclude)if(T=!0,v.$$tlb||($("transclusion",M,v,B),M=v),"element"===w)H=!0,p=v.priority,P=B,B=d.$$element=F(ca.$$createComment(S,
+d[S])),b=B[0],ga(f,va.call(P,0),b),P[0].$$parentNode=P[0].parentNode,L=dc(Ja,P,e,p,g&&g.name,{nonTlbTranscludeDirective:M});else{var G=V();P=F(Zb(b)).contents();if(E(w)){P=[];var Q=V(),bc=V();q(w,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Q[a]=b;G[b]=null;bc[b]=c});q(B.contents(),function(a){var b=Q[Da(wa(a))];b?(bc[b]=!0,G[b]=G[b]||[],G[b].push(a)):P.push(a)});q(bc,function(a,b){if(!a)throw fa("reqslot",b);});for(var U in G)G[U]&&(G[U]=dc(Ja,G[U],e))}B.empty();L=dc(Ja,P,e,void 0,
+void 0,{needsNewScope:v.$$isolateScope||v.$$newScope});L.$$slots=G}if(v.template)if(J=!0,$("template",O,v,B),O=v,w=C(v.template)?v.template(B,d):v.template,w=Ca(w),v.replace){g=v;P=Xb.test(w)?ed(ha(v.templateNamespace,Y(w))):[];b=P[0];if(1!==P.length||1!==b.nodeType)throw fa("tplrt",S,"");ga(f,B,b);D={$attr:{}};w=cc(b,[],D);var og=a.splice(y+1,a.length-(y+1));(u||A)&&aa(w,u,A);a=a.concat(w).concat(og);ea(d,D);D=a.length}else B.html(w);if(v.templateUrl)J=!0,$("template",O,v,B),O=v,v.replace&&(g=v),
+n=ia(a.splice(y,a.length-y),B,d,f,T&&L,h,k,{controllerDirectives:r,newScopeDirective:A!==v&&A,newIsolateScopeDirective:u,templateDirective:O,nonTlbTranscludeDirective:M}),D=a.length;else if(v.compile)try{qa=v.compile(B,d,L);var Z=v.$$originalDirective||v;C(qa)?m(null,db(Z,qa),Ta,Ma):qa&&m(db(Z,qa.pre),db(Z,qa.post),Ta,Ma)}catch(da){c(da,ya(B))}v.terminal&&(n.terminal=!0,p=Math.max(p,v.priority))}n.scope=A&&!0===A.scope;n.transcludeOnThisElement=T;n.templateOnThisElement=J;n.transclude=L;l.hasElementTranscludeDirective=
+H;return n}function X(a,b,c,d){var e;if(D(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw fa("ctreq",b,a);}else if(I(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else E(b)&&(e={},q(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ba(a,b,c,d,e,f,g){var h=V(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,
+$attrs:b,$transclude:c},n=l.controller;"@"===n&&(n=b[l.name]);m=M(n,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Tb(a[d],{$$isolateScope:b,$$newScope:c})}function U(b,c,f,g,h,k,l){if(c===h)return null;var m=null;if(e.hasOwnProperty(c)){h=a.get(c+"Directive");for(var n=0,p=h.length;n<p;n++)if(c=h[n],(z(g)||g>c.priority)&&-1!==c.restrict.indexOf(f)){k&&(c=Tb(c,{$$start:k,$$end:l}));if(!c.$$bindings){var s=
+m=c,r=c.name,v={isolateScope:null,bindToController:null};E(s.scope)&&(!0===s.bindToController?(v.bindToController=d(s.scope,r,!0),v.isolateScope={}):v.isolateScope=d(s.scope,r,!1));E(s.bindToController)&&(v.bindToController=d(s.bindToController,r,!0));if(v.bindToController&&!s.controller)throw fa("noctrl",r);m=m.$$bindings=v;E(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function Z(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=
+c[d],b.multiElement)return!0;return!1}function ea(a,b){var c=b.$attr,d=a.$attr;q(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ia(a,b,c,d,e,g,h,k){var l=[],m,n,p=b[0],s=a.shift(),A=Tb(s,{templateUrl:null,transclude:null,replace:null,$$originalDirective:s}),r=C(s.templateUrl)?s.templateUrl(b,c):s.templateUrl,v=s.templateNamespace;
+b.empty();f(r).then(function(f){var u,B;f=Ca(f);if(s.replace){f=Xb.test(f)?ed(ha(v,Y(f))):[];u=f[0];if(1!==f.length||1!==u.nodeType)throw fa("tplrt",s.name,r);f={$attr:{}};ga(d,b,u);var O=cc(u,[],f);E(s.scope)&&aa(O,!0);a=O.concat(a);ea(c,f)}else u=p,b.html(f);a.unshift(A);m=W(a,u,c,e,b,s,g,h,k);q(d,function(a,c){a===u&&(d[c]=b[0])});for(n=Ma(b[0].childNodes,e);l.length;){f=l.shift();B=l.shift();var M=l.shift(),T=l.shift(),O=b[0];if(!f.$$destroyed){if(B!==p){var J=B.className;k.hasElementTranscludeDirective&&
+s.replace||(O=Zb(u));ga(M,F(B),O);Ja(F(O),J)}B=m.transcludeOnThisElement?G(f,m.transclude,T):T;m(n,f,O,d,B)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=G(b,m.transclude,e)),m(n,b,c,d,a)))}}function ja(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function $(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw fa("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),
+a,ya(d));}function ka(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&ca.$$addBindingClass(a);return function(a,c){var e=c.parent();b||ca.$$addBindingClass(e);ca.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ha(a,b){a=Q(a||"html");switch(a){case "svg":case "math":var c=y.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===
+b)return B.HTML;var c=wa(a);if("src"===b||"ngSrc"===b){if(-1===["img","video","audio","source","track"].indexOf(c))return B.RESOURCE_URL}else if("xlinkHref"===b||"form"===c&&"action"===b)return B.RESOURCE_URL}function pa(a,c,d,e,f){var g=oa(a,e),h=k[e]||f,l=b(d,!f,g,h);if(l){if("multiple"===e&&"select"===wa(a))throw fa("selmulti",ya(a));c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=V());if(m.test(e))throw fa("nodomevents");var k=f[e];k!==d&&(l=
+k&&b(k,!0,g,h),d=k);l&&(f[e]=l(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(l,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function ga(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=y.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);
+F.hasData(d)&&(F.data(c,F.data(d)),F(d).off("$destroy"));F.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function ra(a,b){return R(function(){return a.apply(null,arguments)},a,b)}function sa(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ya(d))}}function la(a,c,d,e,f){function g(b,c,e){!C(d.$onChanges)||c===e||c!==c&&e!==e||(da||(a.$$postDigest(P),da=[]),m||(m={},da.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Hb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],
+l={},m;q(e,function(e,h){var m=e.attrName,p=e.optional,s,A,r,u;switch(e.mode){case "@":p||ua.call(c,m)||(d[h]=c[m]=void 0);p=c.$observe(m,function(a){if(D(a)||Ka(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;s=c[m];D(s)?d[h]=b(s)(a):Ka(s)&&(d[h]=s);l[h]=new Hb(ec,d[h]);k.push(p);break;case "=":if(!ua.call(c,m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;A=n(c[m]);u=A.literal?na:function(a,b){return a===b||a!==a&&b!==b};r=A.assign||function(){s=d[h]=A(a);throw fa("nonassign",c[m],m,f.name);};s=
+d[h]=A(a);p=function(b){u(b,d[h])||(u(b,s)?r(a,b=d[h]):d[h]=b);return s=b};p.$stateful=!0;p=e.collection?a.$watchCollection(c[m],p):a.$watch(n(c[m],p),null,A.literal);k.push(p);break;case "<":if(!ua.call(c,m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;A=n(c[m]);var B=A.literal,M=d[h]=A(a);l[h]=new Hb(ec,d[h]);p=a.$watch(A,function(a,b){if(b===a){if(b===M||B&&na(b,M))return;b=M}g(h,a,b);d[h]=a},B);k.push(p);break;case "&":A=c.hasOwnProperty(m)?n(c[m]):w;if(A===w&&p)break;d[h]=function(b){return A(a,
+b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var za=/^\w/,ta=y.document.createElement("div"),Ea=u,Fa=p,xa=H,da;t.prototype={$normalize:Da,$addClass:function(a){a&&0<a.length&&T.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&T.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=fd(a,b);c&&c.length&&T.addClass(this.$$element,c);(c=fd(b,a))&&c.length&&T.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=
+Zc(this.$$element[0],a),g=gd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Hc(a,"-"));f=wa(this.$$element);if("a"===f&&("href"===a||"xlinkHref"===a)||"img"===f&&"src"===a)this[a]=b=S(b,"src"===a);else if("img"===f&&"srcset"===a&&x(b)){for(var f="",g=Y(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<k;l++)var m=2*l,f=f+S(Y(g[m]),!0),f=f+(" "+Y(g[m+1]));g=Y(g[2*
+l]).split(/\s/);f+=S(Y(g[0]),!0);2===g.length&&(f+=" "+Y(g[1]));this[a]=b=f}!1!==d&&(null===b||z(b)?this.$$element.removeAttr(e):za.test(e)?this.$$element.attr(e,b):qa(this.$$element[0],e,b));(a=this.$$observers)&&q(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=V()),e=d[a]||(d[a]=[]);e.push(b);J.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||z(c[a])||b(c[a])});return function(){bb(e,b)}}};var Aa=b.startSymbol(),Ba=b.endSymbol(),
+Ca="{{"===Aa&&"}}"===Ba?$a:function(a){return a.replace(/\{\{/g,Aa).replace(/}}/g,Ba)},Ga=/^ngAttr[A-Z]/,Ha=/^(.+)Start$/;ca.$$addBindingInfo=r?function(a,b){var c=a.data("$binding")||[];I(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:w;ca.$$addBindingClass=r?function(a){Ja(a,"ng-binding")}:w;ca.$$addScopeInfo=r?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:w;ca.$$addScopeClass=r?function(a,b){Ja(a,b?"ng-isolate-scope":"ng-scope")}:w;ca.$$createComment=function(a,
+b){var c="";r&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return y.document.createComment(c)};return ca}]}function Hb(a,b){this.previousValue=a;this.currentValue=b}function Da(a){return hb(a.replace(bd,""))}function fd(a,b){var d="",c=a.split(/\s+/),f=b.split(/\s+/),e=0;a:for(;e<c.length;e++){for(var g=c[e],h=0;h<f.length;h++)if(g===f[h])continue a;d+=(0<d.length?" ":"")+g}return d}function ed(a){a=F(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===La&&""===d.nodeValue.trim())&&
+pg.call(a,b,1)}return a}function ng(a,b){if(b&&D(b))return b;if(D(a)){var d=hd.exec(a);if(d)return d[3]}}function tf(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,c){Ra(b,"controller");E(b)?R(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function f(a,b,c,d){if(!a||!E(a.$scope))throw G("$controller")("noscp",d,b);a.$scope[b]=c}return function(e,g,h,k){var l,m,n;h=!0===h;k&&D(k)&&(n=k);if(D(e)){k=e.match(hd);
+if(!k)throw id("ctrlfmt",e);m=k[1];n=n||k[3];e=a.hasOwnProperty(m)?a[m]:Jc(g.$scope,m,!0)||(b?Jc(c,m,!0):void 0);if(!e)throw id("ctrlreg",m);Qa(e,m,!0)}if(h)return h=(I(e)?e[e.length-1]:e).prototype,l=Object.create(h||null),n&&f(g,n,l,m||e.name),R(function(){var a=d.invoke(e,l,g,m);a!==l&&(E(a)||C(a))&&(l=a,n&&f(g,n,l,m||e.name));return l},{instance:l,identifier:n});l=d.instantiate(e,g,m);n&&f(g,n,l,m||e.name);return l}}]}function uf(){this.$get=["$window",function(a){return F(a.document)}]}function vf(){this.$get=
+["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function fc(a){return E(a)?ja(a)?a.toISOString():eb(a):a}function Af(){this.$get=function(){return function(a){if(!a)return"";var b=[];yc(a,function(a,c){null===a||z(a)||(I(a)?q(a,function(a){b.push(oa(c)+"="+oa(fc(a)))}):b.push(oa(c)+"="+oa(fc(a))))});return b.join("&")}}}function Bf(){this.$get=function(){return function(a){function b(a,f,e){null===a||z(a)||(I(a)?q(a,function(a,c){b(a,f+"["+(E(a)?c:"")+"]")}):E(a)&&!ja(a)?yc(a,
+function(a,c){b(a,f+(e?"":"[")+c+(e?"":"]"))}):d.push(oa(f)+"="+oa(fc(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function gc(a,b){if(D(a)){var d=a.replace(qg,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(jd))||(c=(c=d.match(rg))&&sg[c[0]].test(d));c&&(a=Cc(d))}}return a}function kd(a){var b=V(),d;D(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var f=Q(Y(a.substr(0,d)));a=Y(a.substr(d+1));f&&(b[f]=b[f]?b[f]+", "+a:a)}):E(a)&&q(a,function(a,d){var e=Q(d),g=Y(a);e&&
+(b[e]=b[e]?b[e]+", "+g:g)});return b}function ld(a){var b;return function(d){b||(b=kd(a));return d?(d=b[Q(d)],void 0===d&&(d=null),d):b}}function md(a,b,d,c){if(C(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function zf(){var a=this.defaults={transformResponse:[gc],transformRequest:[function(a){return E(a)&&"[object File]"!==ma.call(a)&&"[object Blob]"!==ma.call(a)&&"[object FormData]"!==ma.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ka(hc),put:ka(hc),
+patch:ka(hc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return x(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return x(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(f,e,g,h,k,l){function m(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;
+return a}function e(a,b){var c,d={};q(a,function(a,e){C(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}function f(a){var b=R({},a);b.data=md(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:k.reject(b)}if(!E(b))throw G("$http")("badreq",b);if(!D(b.url))throw G("$http")("badreq",b.url);var g=R({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);g.headers=function(b){var c=a.headers,d=R({},b.headers),
+f,g,h,c=R({},c.common,c[Q(b.method)]);a:for(f in c){g=Q(f);for(h in d)if(Q(h)===g)continue a;d[f]=c[f]}return e(d,ka(b))}(b);g.method=wb(g.method);g.paramSerializer=D(g.paramSerializer)?l.get(g.paramSerializer):g.paramSerializer;var h=[],m=[],s=k.when(g);q(H,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&m.push(a.response,a.responseError)});s=c(s,h);s=s.then(function(b){var c=b.headers,d=md(b.data,ld(c),void 0,b.transformRequest);z(d)&&
+q(c,function(a,b){"content-type"===Q(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return n(b,d).then(f,f)});s=c(s,m);d?(s.success=function(a){Qa(a,"fn");s.then(function(b){a(b.data,b.status,b.headers,g)});return s},s.error=function(a){Qa(a,"fn");s.then(null,function(b){a(b.data,b.status,b.headers,g)});return s}):(s.success=nd("success"),s.error=nd("error"));return s}function n(c,d){function g(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}
+b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function l(a,c,d,e){function f(){n(c,a,d,e)}J&&(200<=a&&300>a?J.put(S,[a,c,kd(d),e]):J.remove(S));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function n(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?O.resolve:O.reject)({data:a,status:b,headers:ld(d),config:c,statusText:e})}function H(a){n(a.data,a.status,ka(a.headers()),a.statusText)}function L(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var O=k.defer(),M=O.promise,
+J,B,T=c.headers,S=r(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);M.then(L,L);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=E(c.cache)?c.cache:E(a.cache)?a.cache:s);J&&(B=J.get(S),x(B)?B&&C(B.then)?B.then(H,H):I(B)?n(B[1],B[0],ka(B[2]),B[3]):n(B,200,{},"OK"):J.put(S,M));z(B)&&((B=od(c.url)?e()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(T[c.xsrfHeaderName||a.xsrfHeaderName]=B),f(c.method,S,d,l,T,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),
+g(c.uploadEventHandlers)));return M}function r(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?"?":"&")+b);return a}var s=g("$http");a.paramSerializer=D(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var H=[];q(c,function(a){H.unshift(D(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){q(arguments,function(a){m[a]=function(b,c){return m(R({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){m[a]=function(b,c,d){return m(R({},d||{},
+{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function Df(){this.$get=function(){return function(){return new y.XMLHttpRequest}}}function Cf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return tg(a,c,a.defer,b,d[0])}]}function tg(a,b,d,c,f){function e(a,b,d){a=a.replace("JSON_CALLBACK",b);var e=f.createElement("script"),m=null;e.type="text/javascript";e.src=a;e.async=!0;m=function(a){e.removeEventListener("load",m,!1);e.removeEventListener("error",
+m,!1);f.body.removeChild(e);e=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};e.addEventListener("load",m,!1);e.addEventListener("error",m,!1);f.body.appendChild(e);return m}return function(f,h,k,l,m,n,r,s,H,u){function p(){v&&v();N&&N.abort()}function K(b,c,e,f,g){x(O)&&d.cancel(O);v=N=null;b(c,e,f,g);a.$$completeOutstandingRequest(w)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"===Q(f))var A=c.createCallback(h),
+v=e(h,A,function(a,b){var d=200===a&&c.getResponse(A);K(l,a,d,"",b);c.removeCallback(A)});else{var N=b(f,h);N.open(f,h,!0);q(m,function(a,b){x(a)&&N.setRequestHeader(b,a)});N.onload=function(){var a=N.statusText||"",b="response"in N?N.response:N.responseText,c=1223===N.status?204:N.status;0===c&&(c=b?200:"file"===ta(h).protocol?404:0);K(l,c,b,N.getAllResponseHeaders(),a)};f=function(){K(l,-1,null,null,"")};N.onerror=f;N.onabort=f;N.ontimeout=f;q(H,function(a,b){N.addEventListener(b,a)});q(u,function(a,
+b){N.upload.addEventListener(b,a)});r&&(N.withCredentials=!0);if(s)try{N.responseType=s}catch(L){if("json"!==s)throw L;}N.send(z(k)?null:k)}if(0<n)var O=d(p,n);else n&&C(n.then)&&n.then(p)}}function xf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,f){function e(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(r,b)}function h(a,b,c,d){var e=a.$watch(function(a){e();
+return d(a)},b,c);return e}function k(e,k,n,p){function r(a){try{var b=a;a=n?f.getTrusted(n,b):f.valueOf(b);var d;if(p&&!x(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=eb(a)}d=a}return d}catch(g){c(Ha.interr(e,g))}}if(!e.length||-1===e.indexOf(a)){var A;k||(k=g(e),A=ha(k),A.exp=e,A.expressions=[],A.$$watchDelegate=h);return A}p=!!p;var v,q,L=0,O=[],M=[];A=e.length;for(var J=[],B=[];L<A;)if(-1!==(v=e.indexOf(a,L))&&-1!==(q=e.indexOf(b,v+
+l)))L!==v&&J.push(g(e.substring(L,v))),L=e.substring(v+l,q),O.push(L),M.push(d(L,r)),L=q+m,B.push(J.length),J.push("");else{L!==A&&J.push(g(e.substring(L)));break}n&&1<J.length&&Ha.throwNoconcat(e);if(!k||O.length){var T=function(a){for(var b=0,c=O.length;b<c;b++){if(p&&z(a[b]))return;J[B[b]]=a[b]}return J.join("")};return R(function(a){var b=0,d=O.length,f=Array(d);try{for(;b<d;b++)f[b]=M[b](a);return T(f)}catch(g){c(Ha.interr(e,g))}},{exp:e,expressions:O,$$watchDelegate:function(a,b){var c;return a.$watchGroup(M,
+function(d,e){var f=T(d);C(b)&&b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,e),"g"),r=new RegExp(b.replace(/./g,e),"g");k.startSymbol=function(){return a};k.endSymbol=function(){return b};return k}]}function yf(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,d,c,f){function e(e,k,l,m){function n(){r?e.apply(null,s):e(p)}var r=4<arguments.length,s=r?va.call(arguments,4):[],H=b.setInterval,u=b.clearInterval,p=0,K=x(m)&&!m,A=(K?c:d).defer(),
+v=A.promise;l=x(l)?l:0;v.$$intervalId=H(function(){K?f.defer(n):a.$evalAsync(n);A.notify(p++);0<l&&p>=l&&(A.resolve(p),u(v.$$intervalId),delete g[v.$$intervalId]);K||a.$apply()},k);g[v.$$intervalId]=A;return v}var g={};e.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1};return e}]}function ic(a){a=a.split("/");for(var b=a.length;b--;)a[b]=tb(a[b]);return a.join("/")}function pd(a,b){var d=ta(a);b.$$protocol=
+d.protocol;b.$$host=d.hostname;b.$$port=Z(d.port)||ug[d.protocol]||null}function qd(a,b){if(vg.test(a))throw lb("badpath",a);var d="/"!==a.charAt(0);d&&(a="/"+a);var c=ta(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=Fc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function ra(a,b){if(b.slice(0,a.length)===a)return b.substr(a.length)}function Ga(a){var b=a.indexOf("#");return-1===
+b?a:a.substr(0,b)}function mb(a){return a.replace(/(#.+)|#$/,"$1")}function jc(a,b,d){this.$$html5=!0;d=d||"";pd(a,this);this.$$parse=function(a){var d=ra(b,a);if(!D(d))throw lb("ipthprfx",a,b);qd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Vb(this.$$search),d=this.$$hash?"#"+tb(this.$$hash):"";this.$$url=ic(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,f){if(f&&"#"===f[0])return this.hash(f.slice(1)),
+!0;var e,g;x(e=ra(a,c))?(g=e,g=d&&x(e=ra(d,e))?b+(ra("/",e)||e):a+g):x(e=ra(b,c))?g=b+e:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function kc(a,b,d){pd(a,this);this.$$parse=function(c){var f=ra(a,c)||ra(b,c),e;z(f)||"#"!==f.charAt(0)?this.$$html5?e=f:(e="",z(f)&&(a=c,this.replace())):(e=ra(d,f),z(e)&&(e=f));qd(e,this);c=this.$$path;var f=a,g=/^\/[A-Z]:(\/.*)/;e.slice(0,f.length)===f&&(e=e.replace(f,""));g.exec(e)||(c=(e=g.exec(c))?e[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=
+Vb(this.$$search),f=this.$$hash?"#"+tb(this.$$hash):"";this.$$url=ic(this.$$path)+(b?"?"+b:"")+f;this.$$absUrl=a+(this.$$url?d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Ga(a)===Ga(b)?(this.$$parse(b),!0):!1}}function rd(a,b,d){this.$$html5=!0;kc.apply(this,arguments);this.$$parseLinkUrl=function(c,f){if(f&&"#"===f[0])return this.hash(f.slice(1)),!0;var e,g;a===Ga(c)?e=c:(g=ra(b,c))?e=a+d+g:b===c+"/"&&(e=b);e&&this.$$parse(e);return!!e};this.$$compose=function(){var b=Vb(this.$$search),
+f=this.$$hash?"#"+tb(this.$$hash):"";this.$$url=ic(this.$$path)+(b?"?"+b:"")+f;this.$$absUrl=a+d+this.$$url}}function Ib(a){return function(){return this[a]}}function sd(a,b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Ff(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return x(b)?(a=b,this):a};this.html5Mode=function(a){if(Ka(a))return b.enabled=a,this;if(E(a)){Ka(a.enabled)&&(b.enabled=a.enabled);Ka(a.requireBase)&&
+(b.requireBase=a.requireBase);if(Ka(a.rewriteLinks)||D(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,f,e,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var n=c.url(),r;if(b.enabled){if(!m&&b.requireBase)throw lb("nobase");
+r=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=f.history?jc:rd}else r=Ga(n),m=kc;var s=r.substr(0,Ga(r).lastIndexOf("/")+1);l=new m(r,s,"#"+a);l.$$parseLinkUrl(n,n);l.$$state=c.state();var H=/^\s*(javascript|mailto):/i;e.on("click",function(a){var f=b.rewriteLinks;if(f&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var h=F(a.target);"a"!==wa(h[0]);)if(h[0]===e[0]||!(h=h.parent())[0])return;if(!D(f)||!z(h.attr(f))){var f=h.prop("href"),k=h.attr("href")||h.attr("xlink:href");
+E(f)&&"[object SVGAnimatedString]"===f.toString()&&(f=ta(f.animVal).href);H.test(f)||!f||h.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(f,k)||(a.preventDefault(),l.absUrl()!==c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}});mb(l.absUrl())!==mb(n)&&c.url(l.absUrl(),!0);var u=!0;c.onUrlChange(function(a,b){z(ra(s,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=mb(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;
+l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(u=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=mb(c.url()),b=mb(l.absUrl()),e=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&f.history&&e!==l.$$state;if(u||m)u=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,e).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=e):(m&&h(b,g,e===l.$$state?null:l.$$state),k(a,e)))});l.$$replace=!1});return l}]}function Gf(){var a=!0,b=
+this;this.debugEnabled=function(b){return x(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function f(a){var b=d.console||{},f=b[a]||b.log||w;a=!1;try{a=!!f.apply}catch(k){}return a?function(){var a=[];q(arguments,function(b){a.push(c(b))});return f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),
+info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Ua(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ea("isecfld",b);return a}function wg(a){return a+""}function Ea(a,b){if(a){if(a.constructor===a)throw ea("isecfn",b);if(a.window===a)throw ea("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ea("isecdom",b);if(a===
+Object)throw ea("isecobj",b);}return a}function td(a,b){if(a){if(a.constructor===a)throw ea("isecfn",b);if(a===xg||a===yg||a===zg)throw ea("isecff",b);}}function Jb(a,b){if(a&&(a===ud||a===vd||a===wd||a===xd||a===yd||a===zd||a===Ag||a===Bg||a===Kb||a===Cg||a===Ad||a===Dg))throw ea("isecaf",b);}function Eg(a,b){return"undefined"!==typeof a?a:b}function Bd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function X(a,b){var d,c,f;switch(a.type){case t.Program:d=!0;q(a.body,function(a){X(a.expression,
+b);d=d&&a.expression.constant});a.constant=d;break;case t.Literal:a.constant=!0;a.toWatch=[];break;case t.UnaryExpression:X(a.argument,b);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case t.BinaryExpression:X(a.left,b);X(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case t.LogicalExpression:X(a.left,b);X(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case t.ConditionalExpression:X(a.test,
+b);X(a.alternate,b);X(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case t.Identifier:a.constant=!1;a.toWatch=[a];break;case t.MemberExpression:X(a.object,b);a.computed&&X(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case t.CallExpression:d=f=a.filter?!b(a.callee.name).$stateful:!1;c=[];q(a.arguments,function(a){X(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});
+a.constant=d;a.toWatch=f?c:[a];break;case t.AssignmentExpression:X(a.left,b);X(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case t.ArrayExpression:d=!0;c=[];q(a.elements,function(a){X(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case t.ObjectExpression:d=!0;c=[];q(a.properties,function(a){X(a.value,b);d=d&&a.value.constant&&!a.computed;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case t.ThisExpression:a.constant=
+!1;a.toWatch=[];break;case t.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Cd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Dd(a){return a.type===t.Identifier||a.type===t.MemberExpression}function Ed(a){if(1===a.body.length&&Dd(a.body[0].expression))return{type:t.AssignmentExpression,left:a.body[0].expression,right:{type:t.NGValueParameter},operator:"="}}function Fd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===
+t.Literal||a.body[0].expression.type===t.ArrayExpression||a.body[0].expression.type===t.ObjectExpression)}function Gd(a,b){this.astBuilder=a;this.$filter=b}function Hd(a,b){this.astBuilder=a;this.$filter=b}function Lb(a){return"constructor"===a}function lc(a){return C(a.valueOf)?a.valueOf():Fg.call(a)}function Hf(){var a=V(),b=V(),d={"true":!0,"false":!1,"null":null,undefined:void 0},c,f;this.addLiteral=function(a,b){d[a]=b};this.setIdentifierFns=function(a,b){c=a;f=b;return this};this.$get=["$filter",
+function(e){function g(c,d,f){var g,k,H;f=f||K;switch(typeof c){case "string":H=c=c.trim();var q=f?b:a;g=q[H];if(!g){":"===c.charAt(0)&&":"===c.charAt(1)&&(k=!0,c=c.substring(2));g=f?p:u;var B=new mc(g);g=(new nc(B,e,g)).parse(c);g.constant?g.$$watchDelegate=r:k?g.$$watchDelegate=g.literal?n:m:g.inputs&&(g.$$watchDelegate=l);f&&(g=h(g));q[H]=g}return s(g,d);case "function":return s(c,d);default:return s(w,d)}}function h(a){function b(c,d,e,f){var g=K;K=!0;try{return a(c,d,e,f)}finally{K=g}}if(!a)return a;
+b.$$watchDelegate=a.$$watchDelegate;b.assign=h(a.assign);b.constant=a.constant;b.literal=a.literal;for(var c=0;a.inputs&&c<a.inputs.length;++c)a.inputs[c]=h(a.inputs[c]);b.inputs=a.inputs;return b}function k(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=lc(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function l(a,b,c,d,e){var f=d.inputs,g;if(1===f.length){var h=k,f=f[0];return a.$watch(function(a){var b=f(a);k(b,h)||(g=d(a,void 0,void 0,[b]),h=b&&lc(b));return g},b,c,e)}for(var l=[],
+m=[],n=0,s=f.length;n<s;n++)l[n]=k,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var h=f[c](a);if(b||(b=!k(h,l[c])))m[c]=h,l[c]=h&&lc(h)}b&&(g=d(a,void 0,void 0,m));return g},b,c,e)}function m(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;C(b)&&b.apply(this,arguments);x(a)&&d.$$postDigest(function(){x(f)&&e()})},c)}function n(a,b,c,d){function e(a){var b=!0;q(a,function(a){x(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},
+function(a,c,d){g=a;C(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function r(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function s(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==n&&c!==m?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return x(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==l?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=l,d=!a.inputs,c.inputs=a.inputs?
+a.inputs:[a]);return c}var H=da().noUnsafeEval,u={csp:H,expensiveChecks:!1,literals:sa(d),isIdentifierStart:C(c)&&c,isIdentifierContinue:C(f)&&f},p={csp:H,expensiveChecks:!0,literals:sa(d),isIdentifierStart:C(c)&&c,isIdentifierContinue:C(f)&&f},K=!1;g.$$runningExpensiveChecks=function(){return K};return g}]}function Jf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return Id(function(b){a.$evalAsync(b)},b)}]}function Kf(){this.$get=["$browser","$exceptionHandler",function(a,b){return Id(function(b){a.defer(b)},
+b)}]}function Id(a,b){function d(){var a=new g;a.resolve=f(a,a.resolve);a.reject=f(a,a.reject);a.notify=f(a,a.notify);return a}function c(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function e(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,d,e;e=c.pending;c.processScheduled=!1;c.pending=void 0;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{C(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),
+b(h)}}}))}function g(){this.promise=new c}function h(a){var b=new g;b.reject(a);return b.promise}function k(a,b,c){var d=null;try{C(c)&&(d=c())}catch(e){return h(e)}return d&&C(d.then)?d.then(function(){return b(a)},h):b(a)}function l(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)}function m(a){if(!C(a))throw n("norslvr",a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise}var n=G("$q",TypeError);R(c.prototype,{then:function(a,b,c){if(z(a)&&z(b)&&z(c))return this;
+var d=new g;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&e(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return k(b,r,a)},function(b){return k(b,h,a)},b)}});R(g.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(n("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){function c(a){k||(k=!0,h.$$resolve(a))}function d(a){k||
+(k=!0,h.$$reject(a))}var g,h=this,k=!1;try{if(E(a)||C(a))g=a&&a.then;C(g)?(this.promise.$$state.status=-1,g.call(a,c,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,e(this.promise.$$state))}catch(l){d(l),b(l)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;e(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&
+d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(C(a)?a(c):c)}catch(h){b(h)}}})}});var r=l;m.prototype=c.prototype;m.defer=d;m.reject=h;m.when=l;m.resolve=r;m.all=function(a){var b=new g,c=0,d=I(a)?[]:{};q(a,function(a,e){c++;l(a).then(function(a){d[e]=a;--c||b.resolve(d)},function(a){b.reject(a)})});0===c&&b.resolve(d);return b.promise};m.race=function(a){var b=d();q(a,function(a){l(a).then(b.resolve,b.reject)});return b.promise};return m}function Tf(){this.$get=
+["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,f=!!d,e=f?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};e.supported=f;return e}]}function If(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=
+0;this.$id=++sb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=G("$rootScope"),c=null,f=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(e,g,h){function k(a){a.currentScope.$$destroyed=!0}function l(a){9===Ia&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++sb;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 n(a){if(K.$$phase)throw d("inprog",K.$$phase);K.$$phase=a}function r(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function H(){}function u(){for(;t.length;)try{t.shift()()}catch(a){e(a)}f=
+null}function p(){null===f&&(f=h.defer(function(){K.$apply(u)}))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",k);return d},$watch:function(a,b,d,e){var f=g(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,
+f,a);var h=this,k=h.$$watchers,l={fn:b,last:H,get:f,exp:e||a,eq:!!d};c=null;C(b)||(l.fn=w);k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);k.$$digestWatchIndex++;r(this,1);return function(){var a=bb(k,l);0<=a&&(r(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=
+!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});q(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!z(e)){if(E(e))if(la(e))for(f!==n&&(f=n,s=f.length=0,l++),a=e.length,s!==a&&(l++,f.length=s=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==r&&(f=r={},s=0,l++);a=0;for(b in e)ua.call(e,
+b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(s++,f[b]=g,l++));if(s>a)for(b in l++,f)ua.call(e,b)||(s--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],r={},p=!0,s=0;return this.$watch(m,function(){p?(p=!1,b(e,e,d)):b(e,h,d);if(k)if(E(e))if(la(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ua.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,k,l,m,r,p,s=b,q,t=[],N,x;n("$digest");
+h.$$checkUrlChange();this===K&&null!==f&&(h.defer.cancel(f),u());c=null;do{p=!1;q=this;for(r=0;r<A.length;r++){try{x=A[r],x.scope.$eval(x.expression,x.locals)}catch(z){e(z)}c=null}A.length=0;a:do{if(r=q.$$watchers)for(r.$$digestWatchIndex=r.length;r.$$digestWatchIndex--;)try{if(a=r[r.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(k=a.last)&&!(a.eq?na(g,k):ia(g)&&ia(k)))p=!0,c=a,a.last=a.eq?sa(g,null):g,l=a.fn,l(g,k===H?g:k,q),5>s&&(N=4-s,t[N]||(t[N]=[]),t[N].push({msg:C(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
+a.exp,newVal:g,oldVal:k}));else if(a===c){p=!1;break a}}catch(w){e(w)}if(!(r=q.$$watchersCount&&q.$$childHead||q!==this&&q.$$nextSibling))for(;q!==this&&!(r=q.$$nextSibling);)q=q.$parent}while(q=r);if((p||A.length)&&!s--)throw K.$$phase=null,d("infdig",b,t);}while(p||A.length);for(K.$$phase=null;L<v.length;)try{v[L++]()}catch(y){e(y)}v.length=L=0},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===K&&h.$$applicationDestroyed();r(this,
+-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$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=w;this.$on=this.$watch=this.$watchGroup=function(){return w};this.$$listeners=
+{};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){K.$$phase||A.length||h.defer(function(){A.length&&K.$digest()});A.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){v.push(a)},$apply:function(a){try{n("$apply");try{return this.$eval(a)}finally{K.$$phase=null}}catch(b){e(b)}finally{try{K.$digest()}catch(c){throw e(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&t.push(b);a=g(a);p()},$on:function(a,b){var c=
+this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,s(e,1,a))}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=f.$$listeners[a]||c;h.currentScope=f;l=0;for(m=d.length;l<
+m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){e(n)}else d.splice(l,1),l--,m--;if(g)return h.currentScope=null,h;f=f.$parent}while(f);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return f;for(var g=cb([f],arguments,1),h,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){e(l)}else d.splice(h,
+1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}f.currentScope=null;return f}};var K=new m,A=K.$$asyncQueue=[],v=K.$$postDigestQueue=[],t=K.$$applyAsyncQueue=[],L=0;return K}]}function Be(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return x(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return x(a)?(b=a,this):b};
+this.$get=function(){return function(d,c){var f=c?b:a,e;e=ta(d).href;return""===e||e.match(f)?d:"unsafe:"+e}}}function Gg(a){if("self"===a)return a;if(D(a)){if(-1<a.indexOf("***"))throw Fa("iwcard",a);a=Jd(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Za(a))return new RegExp("^"+a.source+"$");throw Fa("imatcher");}function Kd(a){var b=[];x(a)&&q(a,function(a){b.push(Gg(a))});return b}function Mf(){this.SCE_CONTEXTS=ga;var a=["self"],b=[];this.resourceUrlWhitelist=
+function(b){arguments.length&&(a=Kd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Kd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?od(b):!!a.exec(b.href)}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw Fa("unsafe");
+};d.has("$sanitize")&&(e=d.get("$sanitize"));var g=f(),h={};h[ga.HTML]=f(g);h[ga.CSS]=f(g);h[ga.URL]=f(g);h[ga.JS]=f(g);h[ga.RESOURCE_URL]=f(h[ga.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Fa("icontext",a,b);if(null===b||z(b)||""===b)return b;if("string"!==typeof b)throw Fa("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||z(f)||""===f)return f;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&f instanceof g)return f.$$unwrapTrustedValue();if(d===ga.RESOURCE_URL){var g=
+ta(f.toString()),n,r,s=!1;n=0;for(r=a.length;n<r;n++)if(c(a[n],g)){s=!0;break}if(s)for(n=0,r=b.length;n<r;n++)if(c(b[n],g)){s=!1;break}if(s)return f;throw Fa("insecurl",f.toString());}if(d===ga.HTML)return e(f);throw Fa("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Lf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ia)throw Fa("iequirks");var c=ka(ga);c.isEnabled=function(){return a};
+c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=$a);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var f=c.parseAs,e=c.getTrusted,g=c.trustAs;q(ga,function(a,b){var d=Q(b);c[hb("parse_as_"+d)]=function(b){return f(a,b)};c[hb("get_trusted_"+d)]=function(b){return e(a,b)};c[hb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function Nf(){this.$get=["$window",
+"$document",function(a,b){var d={},c=!(a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,f=Z((/android (\d+)/.exec(Q((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h,k=/^(Moz|webkit|ms)(?=[A-Z])/,l=g.body&&g.body.style,m=!1,n=!1;if(l){for(var r in l)if(m=k.exec(r)){h=m[0];h=h[0].toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");m=!!("transition"in l||
+h+"Transition"in l);n=!!("animation"in l||h+"Animation"in l);!f||m&&n||(m=D(l.webkitTransition),n=D(l.webkitAnimation))}return{history:!(!c||4>f||e),hasEvent:function(a){if("input"===a&&11>=Ia)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:da(),vendorPrefix:h,transitions:m,animations:n,android:f}}]}function Pf(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,f){function e(g,h){e.totalPendingRequests++;
+if(!D(g)||z(b.get(g)))g=f.getTrustedResourceUrl(g);var k=d.defaults&&d.defaults.transformResponse;I(k)?k=k.filter(function(a){return a!==gc}):k===gc&&(k=null);return d.get(g,R({cache:b,transformResponse:k},a))["finally"](function(){e.totalPendingRequests--}).then(function(a){b.put(g,a.data);return a.data},function(a){if(!h)throw Hg("tpload",g,a.status,a.statusText);return c.reject(a)})}e.totalPendingRequests=0;return e}]}function Qf(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,
+b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=$.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+Jd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},
+whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function Rf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,f){function e(e,k,l){C(e)||(l=k,k=e,e=w);var m=va.call(arguments,3),n=x(l)&&!l,r=(n?c:d).defer(),s=r.promise,q;q=b.defer(function(){try{r.resolve(e.apply(null,m))}catch(b){r.reject(b),f(b)}finally{delete g[s.$$timeoutId]}n||a.$apply()},k);s.$$timeoutId=q;g[q]=r;return s}var g={};e.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),
+delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return e}]}function ta(a){Ia&&(aa.setAttribute("href",a),a=aa.href);aa.setAttribute("href",a);return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:aa.hostname,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function od(a){a=D(a)?ta(a):a;return a.protocol===Ld.protocol&&a.host===Ld.host}
+function Sf(){this.$get=ha(y)}function Md(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},f="";return function(){var a,g,h,k,l;try{a=d.cookie||""}catch(m){a=""}if(a!==f)for(f=a,a=f.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),z(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function Wf(){this.$get=Md}function Rc(a){function b(d,c){if(E(d)){var f={};q(d,function(a,c){f[c]=b(c,a)});return f}return a.factory(d+"Filter",
+c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Nd);b("date",Od);b("filter",Ig);b("json",Jg);b("limitTo",Kg);b("lowercase",Lg);b("number",Pd);b("orderBy",Qd);b("uppercase",Mg)}function Ig(){return function(a,b,d,c){if(!la(a)){if(null==a)return a;throw G("filter")("notarray",a);}c=c||"$";var f;switch(oc(b)){case "function":break;case "boolean":case "null":case "number":case "string":f=!0;case "object":b=Ng(b,d,c,f);break;default:return a}return Array.prototype.filter.call(a,
+b)}}function Ng(a,b,d,c){var f=E(a)&&d in a;!0===b?b=na:C(b)||(b=function(a,b){if(z(a))return!1;if(null===a||null===b)return a===b;if(E(b)||E(a)&&!Ac(a))return!1;a=Q(""+a);b=Q(""+b);return-1!==a.indexOf(b)});return function(e){return f&&!E(e)?Na(e,a[d],b,d,!1):Na(e,a,b,d,c)}}function Na(a,b,d,c,f,e){var g=oc(a),h=oc(b);if("string"===h&&"!"===b.charAt(0))return!Na(a,b.substring(1),d,c,f);if(I(a))return a.some(function(a){return Na(a,b,d,c,f)});switch(g){case "object":var k;if(f){for(k in a)if("$"!==
+k.charAt(0)&&Na(a[k],b,d,c,!0))return!0;return e?!1:Na(a,b,d,c,!1)}if("object"===h){for(k in b)if(e=b[k],!C(e)&&!z(e)&&(g=k===c,!Na(g?a:a[k],e,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function oc(a){return null===a?"null":typeof a}function Nd(a){var b=a.NUMBER_FORMATS;return function(a,c,f){z(c)&&(c=b.CURRENCY_SYM);z(f)&&(f=b.PATTERNS[1].maxFrac);return null==a?a:Rd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,f).replace(/\u00A4/g,c)}}function Pd(a){var b=
+a.NUMBER_FORMATS;return function(a,c){return null==a?a:Rd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Og(a){var b=0,d,c,f,e,g;-1<(c=a.indexOf(Sd))&&(a=a.replace(Sd,""));0<(f=a.search(/e/i))?(0>c&&(c=f),c+=+a.slice(f+1),a=a.substring(0,f)):0>c&&(c=a.length);for(f=0;a.charAt(f)===pc;f++);if(f===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===pc;)g--;c-=f;d=[];for(e=0;f<=g;f++,e++)d[e]=+a.charAt(f)}c>Td&&(d=d.splice(0,Td-1),b=c-1,c=1);return{d:d,e:b,i:c}}function Pg(a,b,d,c){var f=a.d,e=
+f.length-a.i;b=z(b)?Math.min(Math.max(d,e),c):+b;d=b+a.i;c=f[d];if(0<d){f.splice(Math.max(a.i,d));for(var g=d;g<f.length;g++)f[g]=0}else for(e=Math.max(0,e),a.i=1,f.length=Math.max(1,d=b+1),f[0]=0,g=1;g<d;g++)f[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)f.unshift(0),a.i++;f.unshift(1);a.i++}else f[d-1]++;for(;e<Math.max(0,b);e++)f.push(0);if(b=f.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))f.unshift(b),a.i++}function Rd(a,b,d,c,f){if(!D(a)&&!ba(a)||isNaN(a))return"";var e=
+!isFinite(a),g=!1,h=Math.abs(a)+"",k="";if(e)k="\u221e";else{g=Og(h);Pg(g,f,b.minFrac,b.maxFrac);k=g.d;h=g.i;f=g.e;e=[];for(g=k.reduce(function(a,b){return a&&!b},!0);0>h;)k.unshift(0),h++;0<h?e=k.splice(h,k.length):(e=k,k=[0]);h=[];for(k.length>=b.lgSize&&h.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);e.length&&(k+=c+e.join(""));f&&(k+="e+"+f)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+
+k+b.posSuf}function Mb(a,b,d,c){var f="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,f="-");for(a=""+a;a.length<b;)a=pc+a;d&&(a=a.substr(a.length-b));return f+a}function U(a,b,d,c,f){d=d||0;return function(e){e=e["get"+a]();if(0<d||e>-d)e+=d;0===e&&-12===d&&(e=12);return Mb(e,b,c,f)}}function nb(a,b,d){return function(c,f){var e=c["get"+a](),g=wb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return f[g][e]}}function Ud(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Vd(a){return function(b){var d=
+Ud(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Mb(b,a)}}function qc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Od(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var e=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(e=Z(b[9]+b[10]),g=Z(b[9]+b[11]));h.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));e=Z(b[4]||0)-e;g=Z(b[5]||0)-g;h=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||
+0)));k.call(a,e,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;D(c)&&(c=Qg.test(c)?Z(c):b(c));ba(c)&&(c=new Date(c));if(!ja(c)||!isFinite(c.getTime()))return c;for(;d;)(l=Rg.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();e&&(m=Dc(e,m),c=Ub(c,e,!0));q(h,function(b){k=Sg[b];g+=k?k(c,a.DATETIME_FORMATS,m):
+"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Jg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Kg(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):Z(b);if(ia(b))return a;ba(a)&&(a=a.toString());if(!la(a))return a;d=!d||isNaN(d)?0:Z(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?rc(a,d,d+b):0===d?rc(a,b,a.length):rc(a,Math.max(0,d+b),d)}}function rc(a,b,d){return D(a)?a.slice(b,d):va.call(a,b,d)}function Qd(a){function b(b){return b.map(function(b){var c=
+1,d=$a;if(C(b))d=b;else if(D(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var f=d(),d=function(a){return a[f]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,k=b.type;if(d===k){var k=a.value,l=b.value;"string"===d?(k=k.toLowerCase(),l=l.toLowerCase()):"object"===d&&(E(k)&&(k=a.index),E(l)&&(l=b.index));k!==l&&(c=
+k<l?-1:1)}else c=d<k?-1:1;return c}return function(a,e,g,h){if(null==a)return a;if(!la(a))throw G("orderBy")("notarray",a);I(e)||(e=[e]);0===e.length&&(e=["+"]);var k=b(e),l=g?-1:1,m=C(h)?h:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:k.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("object"===c)a:{if(C(e.valueOf)&&(e=e.valueOf(),d(e)))break a;Ac(e)&&(e=e.toString(),d(e))}return{value:e,type:c,
+index:b}})}});a.sort(function(a,b){for(var c=0,d=k.length;c<d;c++){var e=m(a.predicateValues[c],b.predicateValues[c]);if(e)return e*k[c].descending*l}return m(a.tieBreaker,b.tieBreaker)*l});return a=a.map(function(a){return a.value})}}function Va(a){C(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ha(a)}function Wd(a,b,d,c,f){var e=this,g=[];e.$error={};e.$$success={};e.$pending=void 0;e.$name=f(b.name||b.ngForm||"")(d);e.$dirty=!1;e.$pristine=!0;e.$valid=!0;e.$invalid=!1;e.$submitted=!1;e.$$parentForm=
+Nb;e.$rollbackViewValue=function(){q(g,function(a){a.$rollbackViewValue()})};e.$commitViewValue=function(){q(g,function(a){a.$commitViewValue()})};e.$addControl=function(a){Ra(a.$name,"input");g.push(a);a.$name&&(e[a.$name]=a);a.$$parentForm=e};e.$$renameControl=function(a,b){var c=a.$name;e[c]===a&&delete e[c];e[b]=a;a.$name=b};e.$removeControl=function(a){a.$name&&e[a.$name]===a&&delete e[a.$name];q(e.$pending,function(b,c){e.$setValidity(c,null,a)});q(e.$error,function(b,c){e.$setValidity(c,null,
+a)});q(e.$$success,function(b,c){e.$setValidity(c,null,a)});bb(g,a);a.$$parentForm=Nb};Xd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(bb(d,c),0===d.length&&delete a[b])},$animate:c});e.$setDirty=function(){c.removeClass(a,Wa);c.addClass(a,Ob);e.$dirty=!0;e.$pristine=!1;e.$$parentForm.$setDirty()};e.$setPristine=function(){c.setClass(a,Wa,Ob+" ng-submitted");e.$dirty=!1;e.$pristine=!0;e.$submitted=!1;q(g,function(a){a.$setPristine()})};
+e.$setUntouched=function(){q(g,function(a){a.$setUntouched()})};e.$setSubmitted=function(){c.addClass(a,"ng-submitted");e.$submitted=!0;e.$$parentForm.$setSubmitted()}}function sc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Xa(a,b,d,c,f,e){var g=Q(b[0].type);if(!f.android){var h=!1;b.on("compositionstart",function(){h=!0});b.on("compositionend",function(){h=!1;l()})}var k,l=function(a){k&&(e.defer.cancel(k),k=null);if(!h){var f=b.val();a=a&&a.type;"password"===
+g||d.ngTrim&&"false"===d.ngTrim||(f=Y(f));(c.$viewValue!==f||""===f&&c.$$hasNativeValidators)&&c.$setViewValue(f,a)}};if(f.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){k||(k=e.defer(function(){k=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(f.hasEvent("paste"))b.on("paste cut",m)}b.on("change",l);if(Yd[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=
+this.validity,c=b.badInput,d=b.typeMismatch;k=e.defer(function(){k=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Pb(a,b){return function(d,c){var f,e;if(ja(d))return d;if(D(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(Tg.test(d))return new Date(d);a.lastIndex=0;if(f=a.exec(d))return f.shift(),e=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),
+mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(f,function(a,c){c<b.length&&(e[b[c]]=+a)}),new Date(e.yyyy,e.MM-1,e.dd,e.HH,e.mm,e.ss||0,1E3*e.sss||0)}return NaN}}function ob(a,b,d,c){return function(f,e,g,h,k,l,m){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function r(a){return x(a)&&!ja(a)?d(a)||void 0:a}tc(f,e,g,h);Xa(f,e,g,h,k,l);var s=h&&h.$options&&h.$options.timezone,q;h.$$parserName=a;h.$parsers.push(function(a){if(h.$isEmpty(a))return null;
+if(b.test(a))return a=d(a,q),s&&(a=Ub(a,s)),a});h.$formatters.push(function(a){if(a&&!ja(a))throw pb("datefmt",a);if(n(a))return(q=a)&&s&&(q=Ub(q,s,!0)),m("date")(a,c,s);q=null;return""});if(x(g.min)||g.ngMin){var u;h.$validators.min=function(a){return!n(a)||z(u)||d(a)>=u};g.$observe("min",function(a){u=r(a);h.$validate()})}if(x(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!n(a)||z(p)||d(a)<=p};g.$observe("max",function(a){p=r(a);h.$validate()})}}}function tc(a,b,d,c){(c.$$hasNativeValidators=
+E(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function Zd(a){a.$$parserName="number";a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(Ug.test(b))return parseFloat(b)});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!ba(b))throw pb("numfmt",b);b=b.toString()}return b})}function qb(a){x(a)&&!ba(a)&&(a=parseFloat(a));return ia(a)?void 0:a}function uc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>
+a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function $d(a,b,d,c,f){if(x(c)){a=a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return f}function vc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var f=a[d],m=0;m<b.length;m++)if(f===b[m])continue a;c.push(f)}return c}function f(a){var b=[];return I(a)?(q(a,function(a){b=b.concat(f(a))}),b):D(a)?a.split(" "):E(a)?(q(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",
+link:function(e,g,h){function k(a){a=l(a,1);h.$addClass(a)}function l(a,b){var c=g.data("$classCounts")||V(),d=[];q(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function m(a,b){var e=c(b,a),f=c(a,b),e=l(e,1),f=l(f,-1);e&&e.length&&d.addClass(g,e);f&&f.length&&d.removeClass(g,f)}function n(a){if(!0===b||(e.$index&1)===b){var c=f(a||[]);if(!r)k(c);else if(!na(a,r)){var d=f(r);m(d,c)}}r=I(a)?a.map(function(a){return ka(a)}):ka(a)}
+var r;h.$observe("class",function(b){n(e.$eval(h[a]))});"ngClass"!==a&&e.$watch("$index",function(a,c){var d=a&1;if(d!==(c&1)){var e=f(r);d===b?k(e):(d=l(e,-1),h.$removeClass(d))}});e.$watch(h[a],n,!0)}}}]}function Xd(a){function b(a,b){b&&!e[a]?(k.addClass(f,a),e[a]=!0):!b&&e[a]&&(k.removeClass(f,a),e[a]=!1)}function d(a,c){a=a?"-"+Hc(a,"-"):"";b(rb+a,!0===c);b(ae+a,!1===c)}var c=a.ctrl,f=a.$element,e={},g=a.set,h=a.unset,k=a.$animate;e[ae]=!(e[rb]=f.hasClass(rb));c.$setValidity=function(a,e,f){z(e)?
+(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&h(c.$pending,a,f),be(c.$pending)&&(c.$pending=void 0));Ka(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(ce,!0),c.$valid=c.$invalid=void 0,d("",null)):(b(ce,!1),c.$valid=be(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?void 0:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function be(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;
+return!0}var Vg=/^\/(.+)\/([a-z]*)$/,ua=Object.prototype.hasOwnProperty,Q=function(a){return D(a)?a.toLowerCase():a},wb=function(a){return D(a)?a.toUpperCase():a},Ia,F,za,va=[].slice,pg=[].splice,Wg=[].push,ma=Object.prototype.toString,Bc=Object.getPrototypeOf,xa=G("ng"),$=y.angular||(y.angular={}),Wb,sb=0;Ia=y.document.documentMode;var ia=Number.isNaN||function(a){return a!==a};w.$inject=[];$a.$inject=[];var I=Array.isArray,ne=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,
+Y=function(a){return D(a)?a.trim():a},Jd=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},da=function(){if(!x(da.rules)){var a=y.document.querySelector("[ng-csp]")||y.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");da.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=da;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,
+noInlineStyle:!1}}}return da.rules},ub=function(){if(x(ub.name_))return ub.name_;var a,b,d=Oa.length,c,f;for(b=0;b<d;++b)if(c=Oa[b],a=y.document.querySelector("["+c.replace(":","\\:")+"jq]")){f=a.getAttribute(c+"jq");break}return ub.name_=f},qe=/:/g,Oa=["ng-","data-ng-","ng:","x-ng-"],te=function(a){var b=a.currentScript,b=b&&b.getAttribute("src");if(!b)return!0;var d=a.createElement("a");d.href=b;if(a.location.origin===d.origin)return!0;switch(d.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;
+default:return!1}}(y.document),we=/[A-Z]/g,Ic=!1,La=3,Ae={full:"1.5.11",major:1,minor:5,dot:11,codeName:"princely-quest"};W.expando="ng339";var jb=W.cache={},bg=1;W._data=function(a){return this.cache[a[this.expando]]||{}};var Xf=/([:\-_]+(.))/g,Yf=/^moz([A-Z])/,Ab={mouseleave:"mouseout",mouseenter:"mouseover"},Yb=G("jqLite"),ag=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Xb=/<|&#?\w+;/,Zf=/<([\w:-]+)/,$f=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,pa={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,"",""]};pa.optgroup=pa.option;pa.tbody=pa.tfoot=pa.colgroup=pa.caption=pa.thead;pa.th=pa.td;var gg=y.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Pa=W.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===y.document.readyState?y.setTimeout(b):
+(this.on("DOMContentLoaded",b),W(y).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?F(this[a]):F(this[this.length+a])},length:0,push:Wg,sort:[].sort,splice:[].splice},Gb={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Gb[Q(a)]=a});var $c={};q("input select option textarea button form details".split(" "),function(a){$c[a]=!0});var gd={ngMinlength:"minlength",ngMaxlength:"maxlength",
+ngMin:"min",ngMax:"max",ngPattern:"pattern"};q({data:$b,removeData:ib,hasData:function(a){for(var b in jb[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)ib(a[b])}},function(a,b){W[b]=a});q({data:$b,inheritedData:Eb,scope:function(a){return F.data(a,"$scope")||Eb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return F.data(a,"$isolateScope")||F.data(a,"$isolateScopeNoTemplate")},controller:Xc,injector:function(a){return Eb(a,"$injector")},removeAttr:function(a,
+b){a.removeAttribute(b)},hasClass:Bb,css:function(a,b,d){b=hb(b);if(x(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==La&&2!==c&&8!==c)if(c=Q(b),Gb[c])if(x(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||w).specified?c:void 0;else if(x(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?void 0:a},prop:function(a,b,d){if(x(d))a[b]=d;else return a[b]},text:function(){function a(a,
+d){if(z(d)){var c=a.nodeType;return 1===c||c===La?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(z(b)){if(a.multiple&&"select"===wa(a)){var d=[];q(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(z(b))return a.innerHTML;yb(a,!0);a.innerHTML=b},empty:Yc},function(a,b){W.prototype[b]=function(b,c){var f,e,g=this.length;if(a!==Yc&&z(2===a.length&&a!==Bb&&a!==Xc?b:c)){if(E(b)){for(f=0;f<g;f++)if(a===
+$b)a(this[f],b);else for(e in b)a(this[f],e,b[e]);return this}f=a.$dv;g=z(f)?Math.min(g,1):g;for(e=0;e<g;e++){var h=a(this[e],b,c);f=f?f+h:h}return f}for(f=0;f<g;f++)a(this[f],b,c);return this}});q({removeData:ib,on:function(a,b,d,c){if(x(c))throw Yb("onargs");if(Sc(a)){c=zb(a,!0);var f=c.events,e=c.handle;e||(e=c.handle=dg(a,f));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,e,!1));
+h.push(d)};g--;)b=c[g],Ab[b]?(h(Ab[b],fg),h(b,void 0,!0)):h(b)}},off:Wc,one:function(a,b,d){a=F(a);a.on(b,function f(){a.off(b,d);a.off(b,f)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;yb(a);q(new W(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];q(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===
+d){b=new W(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;q(new W(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){Uc(a,F(b).eq(0).clone()[0])},remove:Fb,detach:function(a){Fb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new W(b);for(var f=0,e=b.length;f<e;f++){var g=b[f];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Db,removeClass:Cb,toggleClass:function(a,b,d){b&&q(b.split(" "),function(b){var f=d;z(f)&&
+(f=!Bb(a,b));(f?Db:Cb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Zb,triggerHandler:function(a,b,d){var c,f,e=b.type||b,g=zb(a);if(g=(g=g&&g.events)&&g[e])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=
+!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:w,type:e,target:a},b.type&&(c=R(c,b)),b=ka(g),f=d?[c].concat(d):[c],q(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,f)})}},function(a,b){W.prototype[b]=function(b,c,f){for(var e,g=0,h=this.length;g<h;g++)z(e)?(e=a(this[g],b,c,f),x(e)&&(e=F(e))):Vc(e,a(this[g],b,c,f));return x(e)?e:this}});W.prototype.bind=W.prototype.on;W.prototype.unbind=W.prototype.off;Sa.prototype={put:function(a,
+b){this[Aa(a,this.nextUid)]=b},get:function(a){return this[Aa(a,this.nextUid)]},remove:function(a){var b=this[a=Aa(a,this.nextUid)];delete this[a];return b}};var Vf=[function(){this.$get=[function(){return Sa}]}],ig=/^([^(]+?)=>/,jg=/^[^(]*\(\s*([^)]*)\)/m,Xg=/,/,Yg=/^\s*(_?)(\S+?)\1\s*$/,hg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=G("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw D(d)&&d||(d=a.name||kg(a)),Ba("strictdi",d);b=
+ad(a);q(b[1].split(Xg),function(a){a.replace(Yg,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,Qa(a[b],"fn"),c=a.slice(0,b)):Qa(a,"fn",!0);return c};var de=G("$animate"),nf=function(){this.$get=w},of=function(){var a=new Sa,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function f(a,b,c){var d=!1;b&&(b=D(b)?b.split(" "):I(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function e(){q(b,function(b){var c=a.get(b);if(c){var d=lg(b.attr("class")),e="",f="";q(c,
+function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.remove(b)}});b.length=0}return{enabled:w,on:w,off:w,pin:w,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=f(k,h,!0),l=f(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(e);g=new d;g.complete();return g}}}]},lf=["$provide",function(a){var b=this;this.$$registeredAnimations=
+Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw de("notcsel",d);var f=d+"-animation";b.$$registeredAnimations[d.substr(1)]=f;a.factory(f,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw de("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=
+d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(f,e,g,h){e=e&&F(e);g=g&&F(g);e=e||g.parent();b(f,e,g);return a.push(f,"enter",Ca(h))},move:function(f,e,g,h){e=e&&F(e);g=g&&F(g);e=e||g.parent();b(f,e,g);return a.push(f,"move",Ca(h))},leave:function(b,c){return a.push(b,"leave",Ca(c),function(){b.remove()})},addClass:function(b,
+c,g){g=Ca(g);g.addClass=kb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ca(g);g.removeClass=kb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ca(h);h.addClass=kb(h.addClass,c);h.removeClass=kb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ca(k);k.from=k.from?R(k.from,c):c;k.to=k.to?R(k.to,g):g;k.tempClasses=kb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],qf=function(){this.$get=
+["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},pf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(a,b,d,c,f){function e(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){var d=c[0];d&&d.hidden?f(a,0,!1):b(a)};this._state=0}e.chain=function(a,b){function c(){if(d===a.length)b(!0);
+else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};e.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;q(a,function(a){a.done(c)})};e.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:w,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},
+"finally":function(a){return this.getPromise()["finally"](a)},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(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=
+0,this._state=2)}};return e}]},mf=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,f){function e(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);h||k.complete();h=!0});return k}var g=f||{};g.$$prepared||(g=sa(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var h,k=new d;return{start:e,end:e}}}]},fa=G("$compile"),ec=new function(){};
+Kc.$inject=["$provide","$$sanitizeUriProvider"];Hb.prototype.isFirstChange=function(){return this.previousValue===ec};var bd=/^((?:x|data)[:\-_])/i,id=G("$controller"),hd=/^(\S+)(\s+as\s+([\w$]+))?$/,wf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof F&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},jd="application/json",hc={"Content-Type":jd+";charset=utf-8"},rg=/^\[|^\{(?!\{)/,sg={"[":/]$/,"{":/}$/},qg=/^\)]\}',?\n/,Zg=G("$http"),nd=function(a){return function(){throw Zg("legacy",
+a);}},Ha=$.$interpolateMinErr=G("$interpolate");Ha.throwNoconcat=function(a){throw Ha("noconcat",a);};Ha.interr=function(a,b){return Ha("interr",a,b.toString())};var Ef=function(){this.$get=["$window",function(a){function b(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var d=a.angular.callbacks,c={};return{createCallback:function(a){a="_"+(d.$$counter++).toString(36);var e="angular.callbacks."+a,g=b(a);c[e]=d[a]=g;return e},wasCalled:function(a){return c[a].called},getResponse:function(a){return c[a].data},
+removeCallback:function(a){delete d[c[a].id];delete c[a]}}}]},$g=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,ug={http:80,https:443,ftp:21},lb=G("$location"),vg=/^\s*[\\/]{2,}/,ah={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Ib("$$absUrl"),url:function(a){if(z(a))return this.$$url;var b=$g.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Ib("$$protocol"),host:Ib("$$host"),port:Ib("$$port"),path:sd("$$path",function(a){a=
+null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(D(a)||ba(a))a=a.toString(),this.$$search=Fc(a);else if(E(a))a=sa(a,{}),q(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw lb("isrcharg");break;default:z(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:sd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};
+q([rd,kc,jc],function(a){a.prototype=Object.create(ah);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==jc||!this.$$html5)throw lb("nostate");this.$$state=z(b)?null:b;return this}});var ea=G("$parse"),ud=[].constructor,vd=(!1).constructor,wd=Function.constructor,xd=(0).constructor,yd={}.constructor,zd="".constructor,Ag=ud.prototype,Bg=vd.prototype,Kb=wd.prototype,Cg=xd.prototype,Ad=yd.prototype,Dg=zd.prototype,xg=Kb.call,yg=Kb.apply,zg=Kb.bind,Fg=Ad.valueOf,Qb=V();q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),
+function(a){Qb[a]=!0});var bh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},mc=function(a){this.options=a};mc.prototype={constructor:mc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,
+text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Qb[b],f=Qb[d];Qb[a]||c||f?(a=f?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===
+typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},
+isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=
+x(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ea("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=Q(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,
+text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,f=!1;this.index<this.text.length;){var e=this.text.charAt(this.index),c=c+e;if(f)"u"===e?(f=this.text.substring(this.index+
+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d+=bh[e]||e,f=!1;else if("\\"===e)f=!0;else{if(e===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=e}this.index++}this.throwError("Unterminated quote",b)}};var t=function(a,b){this.lexer=a;this.options=b};t.Program="Program";t.ExpressionStatement="ExpressionStatement";t.AssignmentExpression="AssignmentExpression";t.ConditionalExpression=
+"ConditionalExpression";t.LogicalExpression="LogicalExpression";t.BinaryExpression="BinaryExpression";t.UnaryExpression="UnaryExpression";t.CallExpression="CallExpression";t.MemberExpression="MemberExpression";t.Identifier="Identifier";t.Literal="Literal";t.ArrayExpression="ArrayExpression";t.Property="Property";t.ObjectExpression="ObjectExpression";t.ThisExpression="ThisExpression";t.LocalsExpression="LocalsExpression";t.NGValueParameter="NGValueParameter";t.prototype={ast:function(a){this.text=
+a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:t.Program,body:a}},expressionStatement:function(){return{type:t.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},
+expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Dd(a))throw ea("lval");a={type:t.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:t.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:t.LogicalExpression,
+operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:t.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:t.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:t.BinaryExpression,operator:b.text,
+left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:t.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:t.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:t.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},
+primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=sa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:t.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",
+this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:t.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:t.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:t.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:t.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());
+return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:t.Identifier,name:a.text}},constant:function(){return{type:t.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");
+return{type:t.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:t.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),
+b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:t.ObjectExpression,properties:a}},throwError:function(a,b){throw ea("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ea("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ea("ueoe",
+this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,f){if(this.tokens.length>a){a=this.tokens[a];var e=a.text;if(e===b||e===d||e===c||e===f||!(b||d||c||f))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:t.ThisExpression},$locals:{type:t.LocalsExpression}}};Gd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},
+expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};X(c,d.$filter);var f="",e;this.stage="assign";if(e=Ed(c))this.state.computing="assign",f=this.nextId(),this.recurse(e,f),this.return_(f),f="fn.assign="+this.generateFunction("assign","s,v,l");e=Cd(c.body);d.stage="inputs";q(e,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing=
+"fn";this.stage="main";this.recurse(c);f='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+f+this.watchFns()+"return fn;";f=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",f))(this.$filter,Ua,Ea,td,wg,Jb,Eg,Bd,a);this.state=this.stage=void 0;f.literal=Fd(c);f.constant=c.constant;return f},USE:"use",STRICT:"strict",watchFns:function(){var a=
+[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;q(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+
+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,f,e){var g,h,k=this,l,m,n;c=c||w;if(!e&&x(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,f,!0));else switch(a.type){case t.Program:q(a.body,function(b,c){k.recurse(b.expression,void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case t.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;
+case t.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});m=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,m);c(m);break;case t.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case t.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);
+k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case t.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case t.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Ua(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||
+"s",function(){f&&1!==f&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Lb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case t.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){f&&1!==f&&k.addEnsureSafeAssignContext(g);if(a.computed)h=
+k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),f&&1!==f&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Ua(a.property.name);f&&1!==f&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Lb(a.property.name))m=k.ensureSafeObject(m);
+k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!f);break;case t.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);q(a.arguments,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(k.ensureSafeObject(a))})});
+g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},function(){k.assign(b,"undefined")});c(b)}));break;case t.AssignmentExpression:h=this.nextId();g={};this.recurse(a.left,void 0,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,
+g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case t.ArrayExpression:l=[];q(a.elements,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case t.ObjectExpression:l=[];n=!1;q(a.properties,function(a){a.computed&&(n=!0)});n?(b=b||this.nextId(),this.assign(b,"{}"),q(a.properties,function(a){a.computed?(g=k.nextId(),k.recurse(a.key,g)):g=a.key.type===t.Identifier?a.key.name:""+a.key.value;h=k.nextId();k.recurse(a.value,
+h);k.assign(k.member(b,g,a.computed),h)})):(q(a.properties,function(b){k.recurse(b.value,a.constant?void 0:k.nextId(),void 0,function(a){l.push(k.escape(b.key.type===t.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case t.ThisExpression:this.assign(b,"s");c("s");break;case t.LocalsExpression:this.assign(b,"l");c("l");break;case t.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||
+(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;
+c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),
+";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},
+getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,d,c,f,e){var g=this;return function(){g.recurse(a,b,d,c,f,e)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(D(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+
+"'";if(ba(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw ea("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Hd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;X(c,d.$filter);var f,e;if(f=Ed(c))e=this.recurse(f);f=Cd(c.body);
+var g;f&&(g=[],q(f,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];q(c.body,function(a){h.push(d.recurse(a.expression))});f=0===c.body.length?w:1===c.body.length?h[0]:function(a,b){var c;q(h,function(d){c=d(a,b)});return c};e&&(f.assign=function(a,b,c){return e(a,c,b)});g&&(f.inputs=g);f.literal=Fd(c);f.constant=c.constant;return f},recurse:function(a,b,d){var c,f,e=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case t.Literal:return this.value(a.value,
+b);case t.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case t.BinaryExpression:return c=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](c,f,b);case t.LogicalExpression:return c=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](c,f,b);case t.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case t.Identifier:return Ua(a.name,e.expression),e.identifier(a.name,
+e.expensiveChecks||Lb(a.name),b,d,e.expression);case t.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Ua(a.property.name,e.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(c,f,b,d,e.expression):this.nonComputedMember(c,f,e.expensiveChecks,b,d,e.expression);case t.CallExpression:return g=[],q(a.arguments,function(a){g.push(e.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?
+function(a,c,d,e){for(var n=[],r=0;r<g.length;++r)n.push(g[r](a,c,d,e));a=f.apply(void 0,n,e);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,m){var n=f(a,c,d,m),r;if(null!=n.value){Ea(n.context,e.expression);td(n.value,e.expression);r=[];for(var s=0;s<g.length;++s)r.push(Ea(g[s](a,c,d,m),e.expression));r=Ea(n.value.apply(n.context,r),e.expression)}return b?{value:r}:r};case t.AssignmentExpression:return c=this.recurse(a.left,!0,1),f=this.recurse(a.right),function(a,d,g,m){var n=c(a,
+d,g,m);a=f(a,d,g,m);Ea(n.value,e.expression);Jb(n.context);n.context[n.name]=a;return b?{value:a}:a};case t.ArrayExpression:return g=[],q(a.elements,function(a){g.push(e.recurse(a))}),function(a,c,d,e){for(var f=[],r=0;r<g.length;++r)f.push(g[r](a,c,d,e));return b?{value:f}:f};case t.ObjectExpression:return g=[],q(a.properties,function(a){a.computed?g.push({key:e.recurse(a.key),computed:!0,value:e.recurse(a.value)}):g.push({key:a.key.type===t.Identifier?a.key.name:""+a.key.value,computed:!1,value:e.recurse(a.value)})}),
+function(a,c,d,e){for(var f={},r=0;r<g.length;++r)g[r].computed?f[g[r].key(a,c,d,e)]=g[r].value(a,c,d,e):f[g[r].key]=g[r].value(a,c,d,e);return b?{value:f}:f};case t.ThisExpression:return function(a){return b?{value:a}:a};case t.LocalsExpression:return function(a,c){return b?{value:c}:c};case t.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,f,e){d=a(d,c,f,e);d=x(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,f,
+e){d=a(d,c,f,e);d=x(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,f,e){d=!a(d,c,f,e);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,f,e,g){var h=a(c,f,e,g);c=b(c,f,e,g);h=Bd(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,f,e,g){var h=a(c,f,e,g);c=b(c,f,e,g);h=(x(h)?h:0)-(x(c)?c:0);return d?{value:h}:h}},"binary*":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)*b(c,f,e,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,
+f,e,g){c=a(c,f,e,g)/b(c,f,e,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)%b(c,f,e,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)===b(c,f,e,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)!==b(c,f,e,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)==b(c,f,e,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,
+f,e,g){c=a(c,f,e,g)!=b(c,f,e,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)<b(c,f,e,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)>b(c,f,e,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)<=b(c,f,e,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)>=b(c,f,e,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,f,e,g){c=
+a(c,f,e,g)&&b(c,f,e,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,f,e,g){c=a(c,f,e,g)||b(c,f,e,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(f,e,g,h){f=a(f,e,g,h)?b(f,e,g,h):d(f,e,g,h);return c?{value:f}:f}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d,c,f){return function(e,g,h,k){e=g&&a in g?g:e;c&&1!==c&&e&&!e[a]&&(e[a]={});g=e?e[a]:void 0;b&&Ea(g,f);return d?{context:e,name:a,
+value:g}:g}},computedMember:function(a,b,d,c,f){return function(e,g,h,k){var l=a(e,g,h,k),m,n;null!=l&&(m=b(e,g,h,k),m+="",Ua(m,f),c&&1!==c&&(Jb(l),l&&!l[m]&&(l[m]={})),n=l[m],Ea(n,f));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,f,e){return function(g,h,k,l){g=a(g,h,k,l);f&&1!==f&&(Jb(g),g&&!g[b]&&(g[b]={}));h=null!=g?g[b]:void 0;(d||Lb(b))&&Ea(h,e);return c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,f,e){return e?e[b]:a(d,c,f)}}};var nc=
+function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new t(a,d);this.astCompiler=d.csp?new Hd(this.ast,b):new Gd(this.ast,b)};nc.prototype={constructor:nc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var Fa=G("$sce"),ga={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Hg=G("$compile"),aa=y.document.createElement("a"),Ld=ta(y.location.href);Md.$inject=["$document"];Rc.$inject=["$provide"];var Td=22,Sd=".",pc="0";Nd.$inject=["$locale"];
+Pd.$inject=["$locale"];var Sg={yyyy:U("FullYear",4,0,!1,!0),yy:U("FullYear",2,0,!0,!0),y:U("FullYear",1,0,!1,!0),MMMM:nb("Month"),MMM:nb("Month",!0),MM:U("Month",2,1),M:U("Month",1,1),LLLL:nb("Month",!1,!0),dd:U("Date",2),d:U("Date",1),HH:U("Hours",2),H:U("Hours",1),hh:U("Hours",2,-12),h:U("Hours",1,-12),mm:U("Minutes",2),m:U("Minutes",1),ss:U("Seconds",2),s:U("Seconds",1),sss:U("Milliseconds",3),EEEE:nb("Day"),EEE:nb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,
+b,d){a=-1*d;return a=(0<=a?"+":"")+(Mb(Math[0<a?"floor":"ceil"](a/60),2)+Mb(Math.abs(a%60),2))},ww:Vd(2),w:Vd(1),G:qc,GG:qc,GGG:qc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},Rg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Qg=/^-?\d+$/;Od.$inject=["$locale"];var Lg=ha(Q),Mg=ha(wb);Qd.$inject=["$parse"];var Ce=ha({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var f=
+"[object SVGAnimatedString]"===ma.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(f)||a.preventDefault()})}}}}),xb={};q(Gb,function(a,b){function d(a,d,f){a.$watch(f[c],function(a){f.$set(b,!!a)})}if("multiple"!==a){var c=Da("ng-"+b),f=d;"checked"===a&&(f=function(a,b,f){f.ngModel!==f[c]&&d(a,b,f)});xb[c]=function(){return{restrict:"A",priority:100,link:f}}}});q(gd,function(a,b){xb[b]=function(){return{priority:100,link:function(a,c,f){if("ngPattern"===b&&"/"===f.ngPattern.charAt(0)&&
+(c=f.ngPattern.match(Vg))){f.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(f[b],function(a){f.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=Da("ng-"+a);xb[b]=function(){return{priority:99,link:function(d,c,f){var e=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ma.call(c.prop("href"))&&(g="xlinkHref",f.$attr[g]="xlink:href",e=null);f.$observe(b,function(b){b?(f.$set(g,b),Ia&&e&&c.prop(e,f[g])):"href"===a&&f.$set(g,null)})}}}});var Nb={$addControl:w,$$renameControl:function(a,
+b){a.$name=b},$removeControl:w,$setValidity:w,$setDirty:w,$setPristine:w,$setSubmitted:w};Wd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ee=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||w}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Wd,compile:function(d,e){d.addClass(Wa).addClass(rb);var g=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in
+e)){var r=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",r,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",r,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):w;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,void 0),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);s(a,void 0);R(n,Nb)})}}}}}]},De=
+ee(),Pe=ee(!0),Tg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,ch=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,dh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Ug=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,fe=/^(\d{4,})-(\d{2})-(\d{2})$/,ge=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,
+wc=/^(\d{4,})-W(\d\d)$/,he=/^(\d{4,})-(\d\d)$/,ie=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Yd=V();q(["date","datetime-local","month","time","week"],function(a){Yd[a]=!0});var je={text:function(a,b,d,c,f,e){Xa(a,b,d,c,f,e);sc(c)},date:ob("date",fe,Pb(fe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",ge,Pb(ge,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",ie,Pb(ie,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",wc,function(a,b){if(ja(a))return a;
+if(D(a)){wc.lastIndex=0;var d=wc.exec(a);if(d){var c=+d[1],f=+d[2],e=d=0,g=0,h=0,k=Ud(c),f=7*(f-1);b&&(d=b.getHours(),e=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+f,d,e,g,h)}}return NaN},"yyyy-Www"),month:ob("month",he,Pb(he,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,f,e){tc(a,b,d,c);Xa(a,b,d,c,f,e);Zd(c);var g,h;if(x(d.min)||d.ngMin)c.$validators.min=function(a){return c.$isEmpty(a)||z(g)||a>=g},d.$observe("min",function(a){g=qb(a);c.$validate()});
+if(x(d.max)||d.ngMax)c.$validators.max=function(a){return c.$isEmpty(a)||z(h)||a<=h},d.$observe("max",function(a){h=qb(a);c.$validate()})},url:function(a,b,d,c,f,e){Xa(a,b,d,c,f,e);sc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||ch.test(d)}},email:function(a,b,d,c,f,e){Xa(a,b,d,c,f,e);sc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||dh.test(d)}},radio:function(a,b,d,c){z(d.name)&&b.attr("name",++sb);b.on("click",
+function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,f,e){function g(a,c){b.attr(a,d[a]);d.$observe(a,c)}function h(a){n=qb(a);ia(c.$modelValue)||(m?(a=b.val(),n>a&&(a=n,b.val(a)),c.$setViewValue(a)):c.$validate())}function k(a){r=qb(a);ia(c.$modelValue)||(m?(a=b.val(),r<a&&(b.val(r),a=r<n?n:r),c.$setViewValue(a)):c.$validate())}function l(a){s=qb(a);ia(c.$modelValue)||(m&&c.$viewValue!==
+b.val()?c.$setViewValue(b.val()):c.$validate())}tc(a,b,d,c);Zd(c);Xa(a,b,d,c,f,e);var m=c.$$hasNativeValidators&&"range"===b[0].type,n=m?0:void 0,r=m?100:void 0,s=m?1:void 0,q=b[0].validity;a=x(d.min);f=x(d.max);e=x(d.step);var u=c.$render;c.$render=m&&x(q.rangeUnderflow)&&x(q.rangeOverflow)?function(){u();c.$setViewValue(b.val())}:u;a&&(c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b>=n},g("min",h));f&&(c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||
+z(r)||b<=r},g("max",k));e&&(c.$validators.step=m?function(){return!q.stepMismatch}:function(a,b){var d;if(!(d=c.$isEmpty(b)||z(s))){d=n||0;var e=s,f=Number(b);if((f|0)!==f||(d|0)!==d||(e|0)!==e){var g=Math.max(uc(f),uc(d),uc(e)),g=Math.pow(10,g),f=f*g;d*=g;e*=g}d=0===(f-d)%e}return d},g("step",l))},checkbox:function(a,b,d,c,f,e,g,h){var k=$d(h,a,"ngTrueValue",d.ngTrueValue,!0),l=$d(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=
+c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return na(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:w,button:w,submit:w,reset:w,file:w},Lc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,e,g,h){if(h[0]){var k=Q(g.type);"range"!==k||g.hasOwnProperty("ngInputRange")||(k="text");(je[k]||je.text)(f,e,g,h[0],b,a,d,c)}}}}}],eh=/^(true|false|\d+)$/,gf=function(){return{restrict:"A",
+priority:100,compile:function(a,b){return eh.test(b.ngValue)?function(a,b,f){f.$set("value",a.$eval(f.ngValue))}:function(a,b,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},He=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,f){a.$$addBindingInfo(c,f.ngBind);c=c[0];b.$watch(f.ngBind,function(a){c.textContent=z(a)?"":a})}}}}],Je=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,
+d,e){c=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];e.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Ie=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,f){var e=b(f.ngBindHtml),g=b(f.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,f){d.$$addBindingInfo(c,f.ngBindHtml);b.$watch(g,function(){var d=e(b);c.html(a.getTrustedHtml(d)||"")})}}}}],ff=ha({restrict:"A",require:"ngModel",
+link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ke=vc("",!0),Me=vc("Odd",0),Le=vc("Even",1),Ne=Va({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Oe=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Qc={},fh={blur:!0,focus:!0};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=Da("ng-"+a);
+Qc[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(f,e){var g=d(e[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};fh[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var Re=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,f,e,g){var h,k,l;d.$watch(f.ngIf,function(d){d?k||g(function(d,e){k=e;d[d.length++]=b.$$createComment("end ngIf",
+f.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l=vb(h.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),h=null))})}}}],Se=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:$.noop,compile:function(c,f){var e=f.ngInclude||f.src,g=f.onload||"",h=f.autoscroll;return function(c,f,m,n,r){var q=0,t,u,p,z=function(){u&&(u.remove(),u=null);t&&(t.$destroy(),t=null);
+p&&(d.leave(p).done(function(a){!1!==a&&(u=null)}),u=p,p=null)};c.$watch(e,function(e){var m=function(a){!1===a||!x(h)||h&&!c.$eval(h)||b()},u=++q;e?(a(e,!0).then(function(a){if(!c.$$destroyed&&u===q){var b=c.$new();n.template=a;a=r(b,function(a){z();d.enter(a,null,f).done(m)});t=b;p=a;t.$emit("$includeContentLoaded",e);c.$eval(g)}},function(){c.$$destroyed||u!==q||(z(),c.$emit("$includeContentError",e))}),c.$emit("$includeContentRequested",e)):(z(),n.template=null)})}}}}],jf=["$compile",function(a){return{restrict:"ECA",
+priority:-400,require:"ngInclude",link:function(b,d,c,f){ma.call(d[0]).match(/SVG/)?(d.empty(),a(Tc(f.template,y.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(b))}}}],Te=Va({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),ef=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var f=b.attr(d.$attr.ngList)||", ",e="false"!==d.ngTrim,g=e?Y(f):f;c.$parsers.push(function(a){if(!z(a)){var b=
+[];a&&q(a.split(g),function(a){a&&b.push(e?Y(a):a)});return b}});c.$formatters.push(function(a){if(I(a))return a.join(f)});c.$isEmpty=function(a){return!a||!a.length}}}},rb="ng-valid",ae="ng-invalid",Wa="ng-pristine",Ob="ng-dirty",ce="ng-pending",pb=G("ngModel"),gh=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,f,e,g,h,k,l){this.$modelValue=this.$viewValue=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=l(d.name||"",!1)(a);this.$$parentForm=Nb;var m=f(d.ngModel),n=m.assign,r=m,s=n,t=null,u,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=f(d.ngModel+"()"),e=f(d.ngModel+"($$$p)");r=function(a){var c=m(a);C(c)&&(c=b(a));
+return c};s=function(a,b){C(m(a))?e(a,{$$$p:b}):n(a,b)}}else if(!m.assign)throw pb("nonassign",d.ngModel,ya(c));};this.$render=w;this.$isEmpty=function(a){return z(a)||""===a||null===a||a!==a};this.$$updateEmptyClasses=function(a){p.$isEmpty(a)?(e.removeClass(c,"ng-not-empty"),e.addClass(c,"ng-empty")):(e.removeClass(c,"ng-empty"),e.addClass(c,"ng-not-empty"))};var y=0;Xd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:e});this.$setPristine=function(){p.$dirty=
+!1;p.$pristine=!0;e.removeClass(c,Ob);e.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;e.removeClass(c,Wa);e.addClass(c,Ob);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;e.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;e.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(t);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!ia(p.$modelValue)){var a=
+p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:void 0,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=!0;q(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(q(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!C(h.then))throw pb("nopromise",
+h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},w):g(!0)}function f(a,b){h===y&&p.$setValidity(a,b)}function g(a){h===y&&c(a)}y++;var h=y;(function(){var a=p.$$parserName||"parse";if(z(u))f(a,null);else return u||(q(p.$validators,function(a,b){f(b,null)}),q(p.$asyncValidators,function(a,b){f(b,null)})),f(a,u),u;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(t);if(p.$$lastCommittedViewValue!==
+a||""===a&&p.$$hasNativeValidators)p.$$updateEmptyClasses(a),p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(u=z(b)?void 0:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),z(b)){u=!1;break}ia(p.$modelValue)&&(p.$modelValue=r(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,
+p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:void 0,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);q(p.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&x(d.debounce)&&(d=d.debounce,ba(d)?c=d:ba(d[b])?c=d[b]:ba(d["default"])&&(c=d["default"]));
+g.cancel(t);c?t=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=r(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;u=void 0;for(var c=p.$formatters,d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$$updateEmptyClasses(e),p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(p.$modelValue,p.$viewValue,w))}return b})}],df=["$rootScope",function(a){return{restrict:"A",
+require:["ngModel","^?form","^?ngModelOptions"],controller:gh,priority:1,compile:function(b){b.addClass(Wa).addClass("ng-untouched").addClass(rb);return{pre:function(a,b,f,e){var g=e[0];b=e[1]||g.$$parentForm;g.$$setOptions(e[2]&&e[2].$options);b.$addControl(g);f.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,f,e){var g=e[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,
+function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],hh=/(\s+|^)default(\s+|$)/,hf=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=sa(a.$eval(b.ngModelOptions));x(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Y(this.$options.updateOn.replace(hh,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=
+!0}]}},Ue=Va({terminal:!0,priority:1E3}),ih=G("ngOptions"),jh=/^\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]+?))?$/,bf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!q&&la(a))b=a;else{b=
+[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var n=a.match(jh);if(!n)throw ih("iexp",a,ya(b));var r=n[5]||n[7],q=n[6];a=/ as /.test(n[0])&&n[1];var t=n[9];b=d(n[2]?n[1]:r);var u=a&&d(a)||b,p=t&&d(t),x=t?function(a,b){return p(c,b)}:function(a){return Aa(a)},A=function(a,b){return x(a,C(a,b))},v=d(n[2]||n[1]),z=d(n[3]||""),L=d(n[4]||""),w=d(n[8]),y={},C=q?function(a,b){y[q]=b;y[r]=a;return y}:function(a){y[r]=a;return y};return{trackBy:t,getTrackByValue:A,getWatchables:d(w,
+function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var h=a===d?g:d[g],l=a[h],h=C(l,h),l=x(l,h);b.push(l);if(n[2]||n[1])l=v(c,h),b.push(l);n[4]&&(h=L(c,h),b.push(h))}return b}),getOptions:function(){for(var a=[],b={},d=w(c)||[],g=f(d),h=g.length,n=0;n<h;n++){var p=d===g?n:g[n],r=C(d[p],p),q=u(c,r),p=x(q,r),s=v(c,r),y=z(c,r),r=L(c,r),q=new e(p,q,s,y,r);a.push(q);b[p]=q}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[A(a)]},getViewValueFromOption:function(a){return t?
+sa(a.viewValue):a.viewValue}}}}}var f=y.document.createElement("option"),e=y.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=w},post:function(d,h,k,l){function m(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}function n(){var a=w&&r.readValue();if(w)for(var b=w.items.length-1;0<=b;b--){var c=w.items[b];x(c.group)?Fb(c.element.parentNode):
+Fb(c.element)}w=C.getOptions();var d={};A&&h.prepend(u);w.items.forEach(function(a){var b;if(x(a.group)){b=d[a.group];b||(b=e.cloneNode(!1),D.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=f.cloneNode(!1)}else b=D,c=f.cloneNode(!1);b.appendChild(c);m(a,c)});h[0].appendChild(D);s.$render();s.$isEmpty(a)||(b=r.readValue(),(C.trackBy||t?na(a,b):a===b)||(s.$setViewValue(b),s.$render()))}var r=l[0],s=l[1],t=k.multiple,u;l=0;for(var p=h.children(),z=p.length;l<z;l++)if(""===p[l].value){u=
+p.eq(l);break}var A=!!u,v=!1,y=F(f.cloneNode(!1));y.val("?");var w,C=c(k.ngOptions,h,d),D=b[0].createDocumentFragment(),E=function(){A?v&&u.removeAttr("selected"):u.remove()};t?(s.$isEmpty=function(a){return!a||0===a.length},r.writeValue=function(a){w.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){if(a=w.getOptionFromViewValue(a))a.element.selected=!0})},r.readValue=function(){var a=h.val()||[],b=[];q(a,function(a){(a=w.selectValueMap[a])&&!a.disabled&&b.push(w.getViewValueFromOption(a))});
+return b},C.trackBy&&d.$watchCollection(function(){if(I(s.$viewValue))return s.$viewValue.map(function(a){return C.getTrackByValue(a)})},function(){s.$render()})):(r.writeValue=function(a){var b=w.selectValueMap[h.val()],c=w.getOptionFromViewValue(a);b&&b.element.removeAttribute("selected");c?(h[0].value!==c.selectValue&&(y.remove(),E(),h[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):null===a||A?(y.remove(),A||h.prepend(u),h.val(""),v&&(u.prop("selected",
+!0),u.attr("selected",!0))):(E(),h.prepend(y),h.val("?"),y.prop("selected",!0),y.attr("selected",!0))},r.readValue=function(){var a=w.selectValueMap[h.val()];return a&&!a.disabled?(E(),y.remove(),w.getViewValueFromOption(a)):null},C.trackBy&&d.$watch(function(){return C.getTrackByValue(s.$viewValue)},function(){s.$render()}));A?(u.remove(),a(u)(d),8===u[0].nodeType?(v=!1,r.registerOption=function(a,b){""===b.val()&&(v=!0,u=b,u.removeClass("ng-scope"),s.$render(),b.on("$destroy",function(){u=void 0;
+v=!1}))}):(u.removeClass("ng-scope"),v=!0)):u=F(f.cloneNode(!1));h.empty();n();d.$watchCollection(C.getWatchables,n)}}}}],Ve=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(e,g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),n=h.offset||0,r=e.$eval(m)||{},s={},t=b.startSymbol(),u=b.endSymbol(),p=t+l+"-"+n+u,x=$.noop,A;q(h,function(a,b){var c=f.exec(b);c&&(c=(c[1]?"-":"")+Q(c[2]),r[c]=g.attr(h.$attr[b]))});q(r,
+function(a,d){s[d]=b(a.replace(c,p))});e.$watch(l,function(b){var c=parseFloat(b),f=ia(c);f||c in r||(c=a.pluralCat(c-n));c===A||f&&ia(A)||(x(),f=s[c],z(f)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),x=w,k()):x=e.$watch(f,k),A=c)})}}}],We=["$parse","$animate","$compile",function(a,b,d){var c=G("ngRepeat"),f=function(a,b,c,d,f,m,n){a[c]=d;f&&(a[f]=m);a.$index=b;a.$first=0===b;a.$last=b===n-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,
+transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(e,g){var h=g.ngRepeat,k=d.$$createComment("end ngRepeat",h),l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!l)throw c("iexp",h);var m=l[1],n=l[2],r=l[3],s=l[4],l=m.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!l)throw c("iidexp",m);var t=l[3]||l[1],u=l[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw c("badident",
+r);var p,x,A,v,w={$id:Aa};s?p=a(s):(A=function(a,b){return Aa(b)},v=function(a){return a});return function(a,d,e,g,l){p&&(x=function(b,c,d){u&&(w[u]=b);w[t]=c;w.$index=d;return p(a,w)});var m=V();a.$watchCollection(n,function(e){var g,n,p=d[0],s,w=V(),z,y,C,D,F,E,G;r&&(a[r]=e);if(la(e))F=e,n=x||A;else for(G in n=x||v,F=[],e)ua.call(e,G)&&"$"!==G.charAt(0)&&F.push(G);z=F.length;G=Array(z);for(g=0;g<z;g++)if(y=e===F?g:F[g],C=e[y],D=n(y,C,g),m[D])E=m[D],delete m[D],w[D]=E,G[g]=E;else{if(w[D])throw q(G,
+function(a){a&&a.scope&&(m[a.id]=a)}),c("dupes",h,D,C);G[g]={id:D,scope:void 0,clone:void 0};w[D]=!0}for(s in m){E=m[s];D=vb(E.clone);b.leave(D);if(D[0].parentNode)for(g=0,n=D.length;g<n;g++)D[g].$$NG_REMOVED=!0;E.scope.$destroy()}for(g=0;g<z;g++)if(y=e===F?g:F[g],C=e[y],E=G[g],E.scope){s=p;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);E.clone[0]!==s&&b.move(vb(E.clone),null,p);p=E.clone[E.clone.length-1];f(E.scope,g,t,C,u,y,z)}else l(function(a,c){E.scope=c;var d=k.cloneNode(!1);a[a.length++]=d;b.enter(a,
+null,p);p=d;E.clone=a;w[E.id]=E;f(E.scope,g,t,C,u,y,z)});m=w})}}}}],Xe=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Qe=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ye=Va(function(a,b,d){a.$watch(d.ngStyle,function(a,
+d){d&&a!==d&&q(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Ze=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,f,e){var g=[],h=[],k=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(f.ngSwitch||f.on,function(c){for(var d,f;k.length;)a.cancel(k.pop());d=0;for(f=l.length;d<f;++d){var t=vb(h[d].clone);l[d].$destroy();(k[d]=a.leave(t)).done(m(k,d))}h.length=0;l.length=0;(g=e.cases["!"+c]||e.cases["?"])&&
+q(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],$e=Va({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,f){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});q(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:f,element:b})})}}),af=Va({transclude:"element",
+priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,f){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:f,element:b})}}),kh=G("ngTransclude"),cf=["$compile",function(a){return{restrict:"EAC",terminal:!0,compile:function(b){var d=a(b.contents());b.empty();return function(a,b,e,g,h){function k(){d(a,function(a){b.append(a)})}if(!h)throw kh("orphan",ya(b));e.ngTransclude===e.$attr.ngTransclude&&(e.ngTransclude="");e=e.ngTransclude||e.ngTranscludeSlot;h(function(a,c){a.length?
+b.append(a):(k(),c.$destroy())},null,e);e&&!h.isSlotFilled(e)&&k()}}}}],Ee=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],lh={$setViewValue:w,$render:w},mh=["$element","$scope",function(a,b){var d=this,c=new Sa;d.ngModelCtrl=lh;d.unknownOption=F(y.document.createElement("option"));d.renderUnknownOption=function(b){b="? "+Aa(b)+" ?";d.unknownOption.val(b);a.prepend(d.unknownOption);a.val(b)};b.$on("$destroy",
+function(){d.renderUnknownOption=w});d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()};d.readValue=function(){d.removeUnknownOption();return a.val()};d.writeValue=function(b){d.hasOption(b)?(d.removeUnknownOption(),a.val(b),""===b&&d.emptyOption.prop("selected",!0)):null==b&&d.emptyOption?(d.removeUnknownOption(),a.val("")):d.renderUnknownOption(b)};d.addOption=function(a,b){if(8!==b[0].nodeType){Ra(a,'"option value"');""===a&&(d.emptyOption=b);var g=c.get(a)||0;
+c.put(a,g+1);d.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=!0)}};d.removeOption=function(a){var b=c.get(a);b&&(1===b?(c.remove(a),""===a&&(d.emptyOption=void 0)):c.put(a,b-1))};d.hasOption=function(a){return!!c.get(a)};d.registerOption=function(a,b,c,h,k){if(h){var l;c.$observe("value",function(a){x(l)&&d.removeOption(l);l=a;d.addOption(a,b)})}else k?a.$watch(k,function(a,f){c.$set("value",a);f!==a&&d.removeOption(f);d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",
+function(){d.removeOption(c.value);d.ngModelCtrl.$render()})}}],Fe=function(){return{restrict:"E",require:["select","?ngModel"],controller:mh,priority:1,link:{pre:function(a,b,d,c){var f=c[1];if(f){var e=c[0];e.ngModelCtrl=f;b.on("change",function(){a.$apply(function(){f.$setViewValue(e.readValue())})});if(d.multiple){e.readValue=function(){var a=[];q(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};e.writeValue=function(a){var c=new Sa(a);q(b.find("option"),function(a){a.selected=
+x(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==f.$viewValue||na(g,f.$viewValue)||(g=ka(f.$viewValue),f.$render());h=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}},post:function(a,b,d,c){var f=c[1];if(f){var e=c[0];f.$render=function(){e.writeValue(f.$viewValue)}}}}}},Ge=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,f;x(d.ngValue)?c=!0:x(d.value)?c=a(d.value,!0):(f=a(b.text(),!0))||d.$set("value",b.text());return function(a,b,d){var k=
+b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,f)}}}}],Nc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Mc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var f,e=d.ngPattern||d.pattern;d.$observe("pattern",function(a){D(a)&&0<a.length&&(a=
+new RegExp("^"+a+"$"));if(a&&!a.test)throw G("ngPattern")("noregexp",e,a,ya(b));f=a||void 0;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||z(f)||f.test(b)}}}}},Pc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var f=-1;d.$observe("maxlength",function(a){a=Z(a);f=ia(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>f||c.$isEmpty(b)||b.length<=f}}}}},Oc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,
+d,c){if(c){var f=0;d.$observe("minlength",function(a){f=Z(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=f}}}}};y.angular.bootstrap?y.console&&console.log("WARNING: Tried to load angular more than once."):(xe(),ze($),$.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),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:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var f=a|0,e=c;void 0===e&&(e=Math.min(b(a),3));Math.pow(10,e);return 1==f&&0==
+e?"one":"other"}})}]),F(y.document).ready(function(){se(y.document,Gc)}))})(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>');
+//# sourceMappingURL=angular.min.js.map
+
+/*
+ AngularJS v1.5.11
+ (c) 2010-2017 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(R,B){'use strict';function Da(a,b,c){if(!a)throw Ma("areq",b||"?",c||"required");return a}function Ea(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Na(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function Y(a,b,c){var d="";a=X(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,l){a&&0<a.length&&(d+=0<l?" ":"",d+=c?b+a:a+b)});return d}function Oa(a){if(a instanceof F)switch(a.length){case 0:return a;
+case 1:if(1===a[0].nodeType)return a;break;default:return F(ta(a))}if(1===a.nodeType)return F(a)}function ta(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Pa(a,b,c){s(b,function(b){a.addClass(b,c)})}function Qa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function Z(a){return function(b,c){c.addClass&&(Pa(a,b,c.addClass),c.addClass=null);c.removeClass&&(Qa(a,b,c.removeClass),c.removeClass=null)}}function oa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
+P;a.domOperation=function(){a.$$domOperationFired=!0;b();b=P};a.$$prepared=!0}return a}function ha(a,b){Fa(a,b);Ga(a,b)}function Fa(a,b){b.from&&(a.css(b.from),b.from=null)}function Ga(a,b){b.to&&(a.css(b.to),b.to=null)}function V(a,b,c){var d=b.options||{};c=c.options||{};var e=(d.addClass||"")+" "+(c.addClass||""),l=(d.removeClass||"")+" "+(c.removeClass||"");a=Ra(a.attr("class"),e,l);c.preparationClasses&&(d.preparationClasses=$(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);
+e=d.domOperation!==P?d.domOperation:null;ua(d,c);e&&(d.domOperation=e);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ra(a,b,c){function d(a){G(a)&&(a=a.split(" "));var b={};s(a,function(a){a.length&&(b[a]=!0)});return b}var e={};a=d(a);b=d(b);s(b,function(a,b){e[b]=1});c=d(c);s(c,function(a,b){e[b]=1===e[b]?null:-1});var l={addClass:"",removeClass:""};s(e,function(b,c){var d,e;1===b?(d="addClass",
+e=!a[c]||a[c+"-remove"]):-1===b&&(d="removeClass",e=a[c]||a[c+"-add"]);e&&(l[d].length&&(l[d]+=" "),l[d]+=c)});return l}function y(a){return a instanceof F?a[0]:a}function Sa(a,b,c){var d="";b&&(d=Y(b,"ng-",!0));c.addClass&&(d=$(d,Y(c.addClass,"-add")));c.removeClass&&(d=$(d,Y(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function pa(a,b){var c=b?"-"+b+"s":"";la(a,[ma,c]);return[ma,c]}function va(a,b){var c=b?"paused":"",d=aa+"PlayState";la(a,[d,c]);return[d,c]}function la(a,
+b){a.style[b[0]]=b[1]}function $(a,b){return a?b?a+" "+b:a:b}function Ha(a,b,c){var d=Object.create(null),e=a.getComputedStyle(b)||{};s(c,function(a,b){var c=e[a];if(c){var g=c.charAt(0);if("-"===g||"+"===g||0<=g)c=Ta(c);0===c&&(c=null);d[b]=c}});return d}function Ta(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function wa(a){return 0===a||null!=a}function Ia(a,b){var c=S,d=a+"s";b?c+="Duration":
+d+=" linear all";return[c,d]}function Ja(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ka(a,b,c){s(c,function(c){a[c]=xa(a[c])?a[c]:b.style.getPropertyValue(c)})}var S,ya,aa,za;void 0===R.ontransitionend&&void 0!==R.onwebkittransitionend?(S="WebkitTransition",ya="webkitTransitionEnd transitionend"):(S="transition",ya=
+"transitionend");void 0===R.onanimationend&&void 0!==R.onwebkitanimationend?(aa="WebkitAnimation",za="webkitAnimationEnd animationend"):(aa="animation",za="animationend");var qa=aa+"Delay",Aa=aa+"Duration",ma=S+"Delay",La=S+"Duration",Ma=B.$$minErr("ng"),Ua={transitionDuration:La,transitionDelay:ma,transitionProperty:S+"Property",animationDuration:Aa,animationDelay:qa,animationIterationCount:aa+"IterationCount"},Va={transitionDuration:La,transitionDelay:ma,animationDuration:Aa,animationDelay:qa},
+Ba,ua,s,X,xa,ea,Ca,ba,G,J,F,P;B.module("ngAnimate",[],function(){P=B.noop;Ba=B.copy;ua=B.extend;F=B.element;s=B.forEach;X=B.isArray;G=B.isString;ba=B.isObject;J=B.isUndefined;xa=B.isDefined;Ca=B.isFunction;ea=B.isElement}).directive("ngAnimateSwap",["$animate","$rootScope",function(a,b){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(b,d,e,l,n){var I,g;b.$watchCollection(e.ngAnimateSwap||e["for"],function(e){I&&a.leave(I);g&&(g.$destroy(),g=null);if(e||0===e)g=b.$new(),
+n(g,function(b){I=b;a.enter(b,null,d)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function e(a){c.data("$$ngAnimateChildren","on"===a||"true"===a)}var l=d.ngAnimateChildren;G(l)&&0===l.length?c.data("$$ngAnimateChildren",!0):(e(a(l)(b)),d.$observe("ngAnimateChildren",e))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),n=0;n<b.length;n++)b[n]();e||a(function(){e||c()})}}
+var d,e;d=b.queue=[];b.waitUntilQuiet=function(b){e&&e();e=a(function(){e=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function c(a,c){if(a&&c){var d=b(c);return a.split(" ").some(function(a){return d[a]})}}function d(a,b,c,d){return l[a].some(function(a){return a(b,c,d)})}function e(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;
+return b?c&&d:c||d}var l=this.rules={skip:[],cancel:[],join:[]};l.join.push(function(a,b,c){return!b.structural&&e(b)});l.skip.push(function(a,b,c){return!b.structural&&!e(b)});l.skip.push(function(a,b,c){return"leave"===c.event&&b.structural});l.skip.push(function(a,b,c){return c.structural&&2===c.state&&!b.structural});l.cancel.push(function(a,b,c){return c.structural&&b.structural});l.cancel.push(function(a,b,c){return 2===c.state&&b.structural});l.cancel.push(function(a,b,d){if(d.structural)return!1;
+a=b.addClass;b=b.removeClass;var e=d.addClass;d=d.removeClass;return J(a)&&J(b)||J(e)&&J(d)?!1:c(a,d)||c(b,e)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(b,c,g,l,C,Wa,Q,t,H,T){function O(){var a=!1;return function(b){a?b():c.$$postDigest(function(){a=!0;b()})}}function x(a,b,c){var f=y(b),d=y(a),N=[];(a=h[c])&&s(a,function(a){w.call(a.node,f)?N.push(a.callback):"leave"===c&&w.call(a.node,
+d)&&N.push(a.callback)});return N}function r(a,b,c){var f=ta(b);return a.filter(function(a){return!(a.node===f&&(!c||a.callback===c))})}function p(a,h,v){function r(c,f,d,h){sa(function(){var c=x(T,a,f);c.length?b(function(){s(c,function(b){b(a,d,h)});"close"!==d||a[0].parentNode||ra.off(a)}):"close"!==d||a[0].parentNode||ra.off(a)});c.progress(f,d,h)}function k(b){var c=a,f=m;f.preparationClasses&&(c.removeClass(f.preparationClasses),f.preparationClasses=null);f.activeClasses&&(c.removeClass(f.activeClasses),
+f.activeClasses=null);E(a,m);ha(a,m);m.domOperation();A.complete(!b)}var m=Ba(v),p,T;if(a=Oa(a))p=y(a),T=a.parent();var m=oa(m),A=new Q,sa=O();X(m.addClass)&&(m.addClass=m.addClass.join(" "));m.addClass&&!G(m.addClass)&&(m.addClass=null);X(m.removeClass)&&(m.removeClass=m.removeClass.join(" "));m.removeClass&&!G(m.removeClass)&&(m.removeClass=null);m.from&&!ba(m.from)&&(m.from=null);m.to&&!ba(m.to)&&(m.to=null);if(!p)return k(),A;v=[p.className,m.addClass,m.removeClass].join(" ");if(!Xa(v))return k(),
+A;var g=0<=["enter","move","leave"].indexOf(h),w=l[0].hidden,t=!f||w||N.get(p);v=!t&&z.get(p)||{};var H=!!v.state;t||H&&1===v.state||(t=!M(a,T,h));if(t)return w&&r(A,h,"start"),k(),w&&r(A,h,"close"),A;g&&K(a);w={structural:g,element:a,event:h,addClass:m.addClass,removeClass:m.removeClass,close:k,options:m,runner:A};if(H){if(d("skip",a,w,v)){if(2===v.state)return k(),A;V(a,v,w);return v.runner}if(d("cancel",a,w,v))if(2===v.state)v.runner.end();else if(v.structural)v.close();else return V(a,v,w),v.runner;
+else if(d("join",a,w,v))if(2===v.state)V(a,w,{});else return Sa(a,g?h:null,m),h=w.event=v.event,m=V(a,v,w),v.runner}else V(a,w,{});(H=w.structural)||(H="animate"===w.event&&0<Object.keys(w.options.to||{}).length||e(w));if(!H)return k(),ka(a),A;var C=(v.counter||0)+1;w.counter=C;L(a,1,w);c.$$postDigest(function(){var b=z.get(p),c=!b,b=b||{},f=0<(a.parent()||[]).length&&("animate"===b.event||b.structural||e(b));if(c||b.counter!==C||!f){c&&(E(a,m),ha(a,m));if(c||g&&b.event!==h)m.domOperation(),A.end();
+f||ka(a)}else h=!b.structural&&e(b,!0)?"setClass":b.event,L(a,2),b=Wa(a,h,b.options),A.setHost(b),r(A,h,"start",{}),b.done(function(b){k(!b);(b=z.get(p))&&b.counter===C&&ka(y(a));r(A,h,"close",{})})});return A}function K(a){a=y(a).querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=z.get(a);if(c)switch(b){case 2:c.runner.end();case 1:z.remove(a)}})}function ka(a){a=y(a);a.removeAttribute("data-ng-animate");z.remove(a)}function k(a,b){return y(a)===
+y(b)}function M(a,b,c){c=F(l[0].body);var f=k(a,c)||"HTML"===a[0].nodeName,d=k(a,g),h=!1,r,e=N.get(y(a));(a=F.data(a[0],"$ngAnimatePin"))&&(b=a);for(b=y(b);b;){d||(d=k(b,g));if(1!==b.nodeType)break;a=z.get(b)||{};if(!h){var p=N.get(b);if(!0===p&&!1!==e){e=!0;break}else!1===p&&(e=!1);h=a.structural}if(J(r)||!0===r)a=F.data(b,"$$ngAnimateChildren"),xa(a)&&(r=a);if(h&&!1===r)break;f||(f=k(b,c));if(f&&d)break;if(!d&&(a=F.data(b,"$ngAnimatePin"))){b=y(a);continue}b=b.parentNode}return(!h||r)&&!0!==e&&
+d&&f}function L(a,b,c){c=c||{};c.state=b;a=y(a);a.setAttribute("data-ng-animate",b);c=(b=z.get(a))?ua(b,c):c;z.put(a,c)}var z=new C,N=new C,f=null,A=c.$watch(function(){return 0===t.totalPendingRequests},function(a){a&&(A(),c.$$postDigest(function(){c.$$postDigest(function(){null===f&&(f=!0)})}))}),h=Object.create(null),sa=a.classNameFilter(),Xa=sa?function(a){return sa.test(a)}:function(){return!0},E=Z(H),w=R.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&
+16)},ra={on:function(a,b,c){var f=ta(b);h[a]=h[a]||[];h[a].push({node:f,callback:c});F(b).on("$destroy",function(){z.get(f)||ra.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var f=h[a];f&&(h[a]=1===arguments.length?null:r(f,b,c))}else for(f in b=arguments[0],h)h[f]=r(h[f],b)},pin:function(a,b){Da(ea(a),"element","not an element");Da(ea(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return p(a,b,c)},enabled:function(a,
+b){var c=arguments.length;if(0===c)b=!!f;else if(ea(a)){var d=y(a);1===c?b=!N.get(d):N.put(d,!b)}else b=f=!!a;return b}};return ra}]}]).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,d,e,l,n,I){function g(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,p=d.parentNode;e.put(d,a);for(var K;p;){if(K=e.get(p)){K.processed||(K=b(K));break}p=p.parentNode}(K||
+c).children.push(a);return a}var c={children:[]},d,e=new n;for(d=0;d<a.length;d++){var g=a[d];e.put(g.domNode,a[d]={domNode:g.domNode,fn:g.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var e=0,k=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=e,e=0,b.push(k),k=[]);k.push(g.fn);g.children.forEach(function(a){e++;c.push(a)});a--}k.length&&b.push(k);return b}(c)}var u=[],C=Z(a);return function(n,Q,t){function H(a){a=
+a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function T(a){var b=[],c={};s(a,function(a,d){var h=y(a.element),e=0<=["enter","move"].indexOf(a.event),h=a.structural?H(h):[];if(h.length){var k=e?"to":"from";s(h,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][k]={animationID:d,element:F(a)}})}else b.push(a)});var d={},e={};s(c,function(c,k){var r=c.from,
+p=c.to;if(r&&p){var z=a[r.animationID],g=a[p.animationID],A=r.animationID.toString();if(!e[A]){var n=e[A]={structural:!0,beforeStart:function(){z.beforeStart();g.beforeStart()},close:function(){z.close();g.close()},classes:O(z.classes,g.classes),from:z,to:g,anchors:[]};n.classes.length?b.push(n):(b.push(z),b.push(g))}e[A].anchors.push({out:r.element,"in":p.element})}else r=r?r.animationID:p.animationID,p=r.toString(),d[p]||(d[p]=!0,b.push(a[r]))});return b}function O(a,b){a=a.split(" ");b=b.split(" ");
+for(var c=[],d=0;d<a.length;d++){var e=a[d];if("ng-"!==e.substring(0,3))for(var r=0;r<b.length;r++)if(e===b[r]){c.push(e);break}}return c.join(" ")}function x(a){for(var c=b.length-1;0<=c;c--){var d=e.get(b[c])(a);if(d)return d}}function r(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function p(){var a=n.data("$$animationRunner");!a||"leave"===Q&&t.$$domOperationFired||a.end()}function K(b){n.off("$destroy",p);n.removeData("$$animationRunner");
+C(n,t);ha(n,t);t.domOperation();L&&a.removeClass(n,L);n.removeClass("ng-animate");k.complete(!b)}t=oa(t);var ka=0<=["enter","move","leave"].indexOf(Q),k=new l({end:function(){K()},cancel:function(){K(!0)}});if(!b.length)return K(),k;n.data("$$animationRunner",k);var M=Ea(n.attr("class"),Ea(t.addClass,t.removeClass)),L=t.tempClasses;L&&(M+=" "+L,t.tempClasses=null);var z;ka&&(z="ng-"+Q+"-prepare",a.addClass(n,z));u.push({element:n,classes:M,event:Q,structural:ka,options:t,beforeStart:function(){n.addClass("ng-animate");
+L&&a.addClass(n,L);z&&(a.removeClass(n,z),z=null)},close:K});n.on("$destroy",p);if(1<u.length)return k;d.$$postDigest(function(){var a=[];s(u,function(b){b.element.data("$$animationRunner")?a.push(b):b.close()});u.length=0;var b=T(a),c=[];s(b,function(a){c.push({domNode:y(a.from?a.from.element:a.element),fn:function(){a.beforeStart();var b,c=a.close;if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var d=x(a);d&&(b=d.start)}b?(b=b(),b.done(function(a){c(!a)}),r(a,b)):
+c()}})});I(g(c))});return k}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Ja(),c=Ja();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,e,l,n,I,g,u,C){function B(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||(c.$$ngAnimateParentKey=++O))+"-"+a.getAttribute("class")+"-"+b}function Q(r,p,g,n){var k;0<b.count(g)&&(k=c.get(g),k||(p=Y(p,"-stagger"),e.addClass(r,p),k=Ha(a,r,n),k.animationDuration=
+Math.max(k.animationDuration,0),k.transitionDuration=Math.max(k.transitionDuration,0),e.removeClass(r,p),c.put(g,k)));return k||{}}function t(a){x.push(a);u.waitUntilQuiet(function(){b.flush();c.flush();for(var a=I(),d=0;d<x.length;d++)x[d](a);x.length=0})}function H(c,e,g){e=b.get(g);e||(e=Ha(a,c,Ua),"infinite"===e.animationIterationCount&&(e.animationIterationCount=1));b.put(g,e);c=e;g=c.animationDelay;e=c.transitionDelay;c.maxDelay=g&&e?Math.max(g,e):g||e;c.maxDuration=Math.max(c.animationDuration*
+c.animationIterationCount,c.transitionDuration);return c}var T=Z(e),O=0,x=[];return function(a,c){function d(){k()}function u(){k(!0)}function k(b){if(!(w||F&&O)){w=!0;O=!1;f.$$skipPreparationClasses||e.removeClass(a,ga);e.removeClass(a,ea);va(h,!1);pa(h,!1);s(x,function(a){h.style[a[0]]=""});T(a,f);ha(a,f);Object.keys(A).length&&s(A,function(a,b){a?h.style.setProperty(b,a):h.style.removeProperty(b)});if(f.onDone)f.onDone();fa&&fa.length&&a.off(fa.join(" "),z);var c=a.data("$$animateCss");c&&(n.cancel(c[0].timer),
+a.removeData("$$animateCss"));G&&G.complete(!b)}}function M(a){q.blockTransition&&pa(h,a);q.blockKeyframeAnimation&&va(h,!!a)}function L(){G=new l({end:d,cancel:u});t(P);k();return{$$willAnimate:!1,start:function(){return G},end:d}}function z(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-Z,0)>=R&&b>=m&&(F=!0,k())}function N(){function b(){if(!w){M(!1);s(x,function(a){h.style[a[0]]=a[1]});T(a,f);e.addClass(a,ea);if(q.recalculateTimingStyles){na=
+h.className+" "+ga;ia=B(h,na);D=H(h,na,ia);ca=D.maxDelay;J=Math.max(ca,0);m=D.maxDuration;if(0===m){k();return}q.hasTransitions=0<D.transitionDuration;q.hasAnimations=0<D.animationDuration}q.applyAnimationDelay&&(ca="boolean"!==typeof f.delay&&wa(f.delay)?parseFloat(f.delay):ca,J=Math.max(ca,0),D.animationDelay=ca,da=[qa,ca+"s"],x.push(da),h.style[da[0]]=da[1]);R=1E3*J;V=1E3*m;if(f.easing){var d,g=f.easing;q.hasTransitions&&(d=S+"TimingFunction",x.push([d,g]),h.style[d]=g);q.hasAnimations&&(d=aa+
+"TimingFunction",x.push([d,g]),h.style[d]=g)}D.transitionDuration&&fa.push(ya);D.animationDuration&&fa.push(za);Z=Date.now();var p=R+1.5*V;d=Z+p;var g=a.data("$$animateCss")||[],N=!0;if(g.length){var l=g[0];(N=d>l.expectedEndTime)?n.cancel(l.timer):g.push(k)}N&&(p=n(c,p,!1),g[0]={timer:p,expectedEndTime:d},g.push(k),a.data("$$animateCss",g));if(fa.length)a.on(fa.join(" "),z);f.to&&(f.cleanupStyles&&Ka(A,h,Object.keys(f.to)),Ga(a,f))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;d<b.length;d++)b[d]();
+a.removeData("$$animateCss")}}if(!w)if(h.parentNode){var d=function(a){if(F)O&&a&&(O=!1,k());else if(O=!a,D.animationDuration)if(a=va(h,O),O)x.push(a);else{var b=x,c=b.indexOf(a);0<=a&&b.splice(c,1)}},g=0<ba&&(D.transitionDuration&&0===W.transitionDuration||D.animationDuration&&0===W.animationDuration)&&Math.max(W.animationDelay,W.transitionDelay);g?n(b,Math.floor(g*ba*1E3),!1):b();v.resume=function(){d(!0)};v.pause=function(){d(!1)}}else k()}var f=c||{};f.$$prepared||(f=oa(Ba(f)));var A={},h=y(a);
+if(!h||!h.parentNode||!C.enabled())return L();var x=[],I=a.attr("class"),E=Na(f),w,O,F,G,v,J,R,m,V,Z,fa=[];if(0===f.duration||!g.animations&&!g.transitions)return L();var ja=f.event&&X(f.event)?f.event.join(" "):f.event,$="",U="";ja&&f.structural?$=Y(ja,"ng-",!0):ja&&($=ja);f.addClass&&(U+=Y(f.addClass,"-add"));f.removeClass&&(U.length&&(U+=" "),U+=Y(f.removeClass,"-remove"));f.applyClassesEarly&&U.length&&T(a,f);var ga=[$,U].join(" ").trim(),na=I+" "+ga,ea=Y(ga,"-active"),I=E.to&&0<Object.keys(E.to).length;
+if(!(0<(f.keyframeStyle||"").length||I||ga))return L();var ia,W;0<f.stagger?(E=parseFloat(f.stagger),W={transitionDelay:E,animationDelay:E,transitionDuration:0,animationDuration:0}):(ia=B(h,na),W=Q(h,ga,ia,Va));f.$$skipPreparationClasses||e.addClass(a,ga);f.transitionStyle&&(E=[S,f.transitionStyle],la(h,E),x.push(E));0<=f.duration&&(E=0<h.style[S].length,E=Ia(f.duration,E),la(h,E),x.push(E));f.keyframeStyle&&(E=[aa,f.keyframeStyle],la(h,E),x.push(E));var ba=W?0<=f.staggerIndex?f.staggerIndex:b.count(ia):
+0;(ja=0===ba)&&!f.skipBlocking&&pa(h,9999);var D=H(h,na,ia),ca=D.maxDelay;J=Math.max(ca,0);m=D.maxDuration;var q={};q.hasTransitions=0<D.transitionDuration;q.hasAnimations=0<D.animationDuration;q.hasTransitionAll=q.hasTransitions&&"all"===D.transitionProperty;q.applyTransitionDuration=I&&(q.hasTransitions&&!q.hasTransitionAll||q.hasAnimations&&!q.hasTransitions);q.applyAnimationDuration=f.duration&&q.hasAnimations;q.applyTransitionDelay=wa(f.delay)&&(q.applyTransitionDuration||q.hasTransitions);q.applyAnimationDelay=
+wa(f.delay)&&q.hasAnimations;q.recalculateTimingStyles=0<U.length;if(q.applyTransitionDuration||q.applyAnimationDuration)m=f.duration?parseFloat(f.duration):m,q.applyTransitionDuration&&(q.hasTransitions=!0,D.transitionDuration=m,E=0<h.style[S+"Property"].length,x.push(Ia(m,E))),q.applyAnimationDuration&&(q.hasAnimations=!0,D.animationDuration=m,x.push([Aa,m+"s"]));if(0===m&&!q.recalculateTimingStyles)return L();if(null!=f.delay){var da;"boolean"!==typeof f.delay&&(da=parseFloat(f.delay),J=Math.max(da,
+0));q.applyTransitionDelay&&x.push([ma,da+"s"]);q.applyAnimationDelay&&x.push([qa,da+"s"])}null==f.duration&&0<D.transitionDuration&&(q.recalculateTimingStyles=q.recalculateTimingStyles||ja);R=1E3*J;V=1E3*m;f.skipBlocking||(q.blockTransition=0<D.transitionDuration,q.blockKeyframeAnimation=0<D.animationDuration&&0<W.animationDelay&&0===W.animationDuration);f.from&&(f.cleanupStyles&&Ka(A,h,Object.keys(f.from)),Fa(a,f));q.blockTransition||q.blockKeyframeAnimation?M(m):f.skipBlocking||pa(h,!1);return{$$willAnimate:!0,
+end:d,start:function(){if(!w)return v={end:d,cancel:u,resume:null,pause:null},G=new l(v),t(N),G}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,e,l,n,I){function g(a){return a.replace(/\bng-\S+\b/g,"")}function u(a,b){G(a)&&(a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}
+function C(c,e,n){function l(a){var b={},c=y(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=t.scrollTop;break;case "left":d+=t.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function p(){var c=g(n.attr("class")||""),d=u(c,k),c=u(k,c),d=a(C,{to:l(n),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function I(){C.remove();e.removeClass("ng-animate-shim");n.removeClass("ng-animate-shim")}var C=
+F(y(e).cloneNode(!0)),k=g(C.attr("class")||"");e.addClass("ng-animate-shim");n.addClass("ng-animate-shim");C.addClass("ng-anchor");H.append(C);var M;c=function(){var c=a(C,{addClass:"ng-anchor-out",delay:!0,from:l(e)});return c.$$willAnimate?c:null}();if(!c&&(M=p(),!M))return I();var L=c||M;return{start:function(){function a(){c&&c.end()}var b,c=L.start();c.done(function(){c=null;if(!M&&(M=p()))return c=M.start(),c.done(function(){c=null;I();b.complete()}),c;I();b.complete()});return b=new d({end:a,
+cancel:a})}}}function B(a,b,c,e){var g=Q(a,P),n=Q(b,P),l=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&l.push(a)});if(g||n||0!==l.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];g&&b.push(g.start());n&&b.push(n.start());s(l,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function Q(c){var d=c.element,e=c.options||{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=
+e.domOperation));e.preparationClasses&&(e.event=$(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!l.animations&&!l.transitions)return P;var t=I[0].body;c=y(e);var H=F(c.parentNode&&11===c.parentNode.nodeType||t.contains(c)?c:t);return function(a){return a.from&&a.to?B(a.from,a.to,a.classes,a.anchors):Q(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function e(c){c=X(c)?c:c.split(" ");for(var d=
+[],e={},l=0;l<c.length;l++){var s=c[l],B=a.$$registeredAnimations[s];B&&!e[s]&&(d.push(b.get(B)),e[s]=!0)}return d}var l=Z(d);return function(a,b,d,u){function C(){u.domOperation();l(a,u)}function B(a,b,d,e,f){switch(d){case "animate":b=[b,e.from,e.to,f];break;case "setClass":b=[b,F,G,f];break;case "addClass":b=[b,F,f];break;case "removeClass":b=[b,G,f];break;default:b=[b,f]}b.push(e);if(a=a.apply(a,b))if(Ca(a.start)&&(a=a.start()),a instanceof c)a.done(f);else if(Ca(a))return a;return P}function y(a,
+b,d,e,f){var g=[];s(e,function(e){var k=e[f];k&&g.push(function(){var e,f,g=!1,h=function(a){g||(g=!0,(f||P)(a),e.complete(!a))};e=new c({end:function(){h()},cancel:function(){h(!0)}});f=B(k,a,b,d,function(a){h(!1===a)});return e})});return g}function t(a,b,d,e,f){var g=y(a,b,d,e,f);if(0===g.length){var h,k;"beforeSetClass"===f?(h=y(a,"removeClass",d,e,"beforeRemoveClass"),k=y(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(h=y(a,"removeClass",d,e,"removeClass"),k=y(a,"addClass",d,e,"addClass"));
+h&&(g=g.concat(h));k&&(g=g.concat(k))}if(0!==g.length)return function(a){var b=[];g.length&&s(g,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var H=!1;3===arguments.length&&ba(d)&&(u=d,d=null);u=oa(u);d||(d=a.attr("class")||"",u.addClass&&(d+=" "+u.addClass),u.removeClass&&(d+=" "+u.removeClass));var F=u.addClass,G=u.removeClass,x=e(d),r,p;if(x.length){var K,J;"leave"===b?(J="leave",K="afterLeave"):(J="before"+b.charAt(0).toUpperCase()+
+b.substr(1),K=b);"enter"!==b&&"move"!==b&&(r=t(a,b,u,x,J));p=t(a,b,u,x,K)}if(r||p){var k;return{$$willAnimate:!0,end:function(){k?k.end():(H=!0,C(),ha(a,u),k=new c,k.complete(!0));return k},start:function(){function b(c){H=!0;C();ha(a,u);k.complete(c)}if(k)return k;k=new c;var d,e=[];r&&e.push(function(a){d=r(a)});e.length?e.push(function(a){C();a(!0)}):C();p&&e.push(function(a){d=p(a)});k.setHost({end:function(){H||((d||P)(void 0),b(void 0))},cancel:function(){H||((d||P)(!0),b(!0))}});c.chain(e,
+b);return k}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),n=d(a.to);if(b||n)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());n&&d.push(n.start());c.all(d,function(a){e.complete(a)});var e=new c({end:a(),cancel:a()});
+return e}}}else return d(a)}}]}])})(window,window.angular);
+//# sourceMappingURL=angular-animate.min.js.map
+
+/*
+ AngularJS v1.5.11
+ (c) 2010-2017 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(s,g){'use strict';function H(g){var l=[];t(l,A).chars(g);return l.join("")}var B=g.$$minErr("$sanitize"),C,l,D,E,q,A,F,t;g.module("ngSanitize",[]).provider("$sanitize",function(){function k(a,e){var b={},c=a.split(","),h;for(h=0;h<c.length;h++)b[e?q(c[h]):c[h]]=!0;return b}function I(a){for(var e={},b=0,c=a.length;b<c;b++){var h=a[b];e[h.name]=h.value}return e}function G(a){return a.replace(/&/g,"&amp;").replace(J,function(a){var b=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(b-55296)+
+(a-56320)+65536)+";"}).replace(K,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function x(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,b=0,c=e.length;b<c;b++){var h=e[b],d=h.name.toLowerCase();if("xmlns:ns1"===d||0===d.lastIndexOf("ns1:",0))a.removeAttributeNode(h),b--,c--}(e=a.firstChild)&&x(e);a=a.nextSibling}}var u=!1;this.$get=["$$sanitizeUri",function(a){u&&l(v,w);return function(e){var b=[];F(e,t(b,function(b,h){return!/^unsafe:/.test(a(b,
+h))}));return b.join("")}}];this.enableSvg=function(a){return E(a)?(u=a,this):u};C=g.bind;l=g.extend;D=g.forEach;E=g.isDefined;q=g.lowercase;A=g.noop;F=function(a,e){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);f.innerHTML=a;var b=5;do{if(0===b)throw B("uinput");b--;s.document.documentMode&&x(f);a=f.innerHTML;f.innerHTML=a}while(a!==f.innerHTML);for(b=f.firstChild;b;){switch(b.nodeType){case 1:e.start(b.nodeName.toLowerCase(),I(b.attributes));break;case 3:e.chars(b.textContent)}var c;if(!(c=
+b.firstChild)&&(1===b.nodeType&&e.end(b.nodeName.toLowerCase()),c=b.nextSibling,!c))for(;null==c;){b=b.parentNode;if(b===f)break;c=b.nextSibling;1===b.nodeType&&e.end(b.nodeName.toLowerCase())}b=c}for(;b=f.firstChild;)f.removeChild(b)};t=function(a,e){var b=!1,c=C(a,a.push);return{start:function(a,d){a=q(a);!b&&z[a]&&(b=a);b||!0!==v[a]||(c("<"),c(a),D(d,function(b,d){var f=q(d),g="img"===a&&"src"===f||"background"===f;!0!==m[f]||!0===n[f]&&!e(b,g)||(c(" "),c(d),c('="'),c(G(b)),c('"'))}),c(">"))},
+end:function(a){a=q(a);b||!0!==v[a]||!0===y[a]||(c("</"),c(a),c(">"));a==b&&(b=!1)},chars:function(a){b||c(G(a))}}};var J=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,K=/([^#-~ |!])/g,y=k("area,br,col,hr,img,wbr"),d=k("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=k("rp,rt"),p=l({},r,d),d=l({},d,k("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")),r=l({},r,k("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")),
+w=k("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"),z=k("script,style"),v=l({},y,d,r,p),n=k("background,cite,href,longdesc,src,xlink:href"),p=k("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"),
+r=k("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),m=l({},n,r,p),f;(function(a){if(a.document&&a.document.implementation)a=a.document.implementation.createHTMLDocument("inert");else throw B("noinert");var e=(a.documentElement||a.getDocumentElement()).getElementsByTagName("body");1===e.length?f=e[0]:(e=a.createElement("html"),f=a.createElement("body"),e.appendChild(f),a.appendChild(e))})(s)});g.module("ngSanitize").filter("linky",["$sanitize",function(k){var l=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
+q=/^mailto:/i,x=g.$$minErr("linky"),u=g.isDefined,s=g.isFunction,t=g.isObject,y=g.isString;return function(d,g,p){function w(a){a&&m.push(H(a))}function z(a,b){var c,d=v(a);m.push("<a ");for(c in d)m.push(c+'="'+d[c]+'" ');!u(g)||"target"in d||m.push('target="',g,'" ');m.push('href="',a.replace(/"/g,"&quot;"),'">');w(b);m.push("</a>")}if(null==d||""===d)return d;if(!y(d))throw x("notstring",d);for(var v=s(p)?p:t(p)?function(){return p}:function(){return{}},n=d,m=[],f,a;d=n.match(l);)f=d[0],d[2]||
+d[4]||(f=(d[3]?"http://":"mailto:")+f),a=d.index,w(n.substr(0,a)),z(f,d[0].replace(q,"")),n=n.substring(a+d[0].length);w(n);return k(m.join(""))}}])})(window,window.angular);
+//# sourceMappingURL=angular-sanitize.min.js.map
+
 /**
  * State-based routing for AngularJS
  * @version v0.2.18
  * @link http://angular-ui.github.com/
  * @license MIT License, http://www.opensource.org/licenses/MIT
  */
-"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(e,t,n){"use strict";function r(e,t){return N(new(N((function(){}),{prototype:e})),t)}function i(e){return H(arguments,(function(t){t!==e&&H(t,(function(t,n){e.hasOwnProperty(n)||(e[n]=t)}))})),e}function o(e){if(Object.keys)return Object.keys(e);var t=[];return H(e,(function(e,n){t.push(n)})),t}function a(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,r=Number(arguments[2])||0;for(0>(r=0>r?Math.ceil(r):Math.floor(r))&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function s(e,t,n,r){var i,s=function(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}(n,r),l={},u=[];for(var c in s)if(s[c]&&s[c].params&&(i=o(s[c].params)).length)for(var d in i)a(u,i[d])>=0||(u.push(i[d]),l[i[d]]=e[i[d]]);return N({},l,t)}function l(e,t,n){if(!n)for(var r in n=[],e)n.push(r);for(var i=0;i<n.length;i++){var o=n[i];if(e[o]!=t[o])return!1}return!0}function u(e,t){var n={};return H(e,(function(e){n[e]=t[e]})),n}function c(e){var t={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return H(n,(function(n){n in e&&(t[n]=e[n])})),t}function d(e){var t={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in e)-1==a(n,r)&&(t[r]=e[r]);return t}function h(e,t){var n=B(e),r=n?[]:{};return H(e,(function(e,i){t(e,i)&&(r[n?r.length:i]=e)})),r}function f(e,t){var n=B(e)?[]:{};return H(e,(function(e,r){n[r]=t(e,r)})),n}function p(e,t){var r={},s=[],l=r,u=N(e.when(r),{$$promises:r,$$values:r});this.study=function(r){function c(e){return j(e)&&e.then&&e.$$promises}if(!j(r))throw new Error("'invocables' must be an object");var h=o(r||{}),f=[],p=[],m={};return H(r,(function e(n,i){if(2!==m[i]){if(p.push(i),1===m[i])throw p.splice(0,a(p,i)),new Error("Cyclic dependency: "+p.join(" -> "));if(m[i]=1,I(n))f.push(i,[function(){return t.get(n)}],s);else{var o=t.annotate(n);H(o,(function(t){t!==i&&r.hasOwnProperty(t)&&e(r[t],t)})),f.push(i,n,o)}p.pop(),m[i]=2}})),r=p=m=null,function(r,o,a){function s(){--b||(w||i(y,o.$$values),v.$$values=y,v.$$promises=v.$$promises||!0,delete v.$$inheritedValues,g.resolve(y))}function p(e){v.$$failure=e,g.reject(e)}function m(n,i,o){function l(e){c.reject(e),p(e)}function u(){if(!Y(v.$$failure))try{c.resolve(t.invoke(i,a,y)),c.promise.then((function(e){y[n]=e,s()}),l)}catch(e){l(e)}}var c=e.defer(),d=0;H(o,(function(e){_.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(d++,_[e].then((function(t){y[e]=t,--d||u()}),l))})),d||u(),_[n]=c.promise}if(c(r)&&a===n&&(a=o,o=r,r=null),r){if(!j(r))throw new Error("'locals' must be an object")}else r=l;if(o){if(!c(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=u;var g=e.defer(),v=g.promise,_=v.$$promises={},y=N({},r),b=1+f.length/3,w=!1;if(Y(o.$$failure))return p(o.$$failure),v;o.$$inheritedValues&&i(y,d(o.$$inheritedValues,h)),N(_,o.$$promises),o.$$values?(w=i(y,d(o.$$values,h)),v.$$inheritedValues=d(o.$$values,h),s()):(o.$$inheritedValues&&(v.$$inheritedValues=d(o.$$inheritedValues,h)),o.then(s,p));for(var L=0,M=f.length;M>L;L+=3)r.hasOwnProperty(f[L])?s():m(f[L],f[L+1],f[L+2]);return v}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function m(e,t,n){this.fromConfig=function(e,t,n){return Y(e.template)?this.fromString(e.template,t):Y(e.templateUrl)?this.fromUrl(e.templateUrl,t):Y(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return O(e)?e(t):e},this.fromUrl=function(n,r){return O(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then((function(e){return e.data}))},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function g(e,t,i){function o(t,n,r,i){if(y.push(t),v[t])return v[t];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(_[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return _[t]=new P.Param(t,n,r,i),_[t]}function a(e,t,n,r){var i=["",""],o=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:o=o.replace(/\/$/,""),i=["(?:/(",")|/)?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+t+i[1]}function s(i,o){var a,s,l,u,c;return a=i[2]||i[3],c=t.params[a],l=e.substring(m,i.index),(s=o?i[4]:i[4]||("*"==i[1]?".*":null))&&(u=P.type(s)||r(P.type("string"),{pattern:new RegExp(s,t.caseInsensitive?"i":n)})),{id:a,regexp:s,segment:l,type:u,cfg:c}}t=N({params:{}},j(t)?t:{});var l,u,c,d,h=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p="^",m=0,g=this.segments=[],v=i?i.params:{},_=this.params=i?i.params.$$new():new P.ParamSet,y=[];for(this.source=e;(l=h.exec(e))&&!((u=s(l,!1)).segment.indexOf("?")>=0);)c=o(u.id,u.type,u.cfg,"path"),p+=a(u.segment,c.type.pattern.source,c.squash,c.isOptional),g.push(u.segment),m=h.lastIndex;var b=(d=e.substring(m)).indexOf("?");if(b>=0){var w=this.sourceSearch=d.substring(b);if(d=d.substring(0,b),this.sourcePath=e.substring(0,m+b),w.length>0)for(m=0;l=f.exec(w);)c=o((u=s(l,!0)).id,u.type,u.cfg,"search"),m=h.lastIndex}else this.sourcePath=e,this.sourceSearch="";p+=a(d)+(!1===t.strict?"/?":"")+"$",g.push(d),this.regexp=new RegExp(p,t.caseInsensitive?"i":n),this.prefix=g[0],this.$$paramNames=y}function v(e){N(this,e)}function _(e,r){function i(e){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(e.source);return null!=t?t[1].replace(/\\(.)/g,"$1"):""}function o(e,t,n){if(!n)return!1;var r=e.invoke(t,t,{$match:n});return!Y(r)||r}function a(r,i,o,a,d){function h(e){function t(e){var t=e(o,r);return!!t&&(I(t)&&r.replace().url(t),!0)}if(!e||!e.defaultPrevented){p&&r.url(),p=n;var i,a=l.length;for(i=0;a>i;i++)if(t(l[i]))return;u&&t(u)}}function f(){return s=s||i.$on("$locationChangeSuccess",h)}var p,m=a.baseHref(),g=r.url();return c||f(),{sync:function(){h()},listen:function(){return f()},update:function(e){return e?void(g=r.url()):void(r.url()!==g&&(r.url(g),r.replace()))},push:function(e,t,i){var o=e.format(t||{});null!==o&&t&&t["#"]&&(o+="#"+t["#"]),r.url(o),p=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=e.html5Mode();t.isObject(a)&&(a=a.enabled),a=a&&d.history;var s=n.format(i);if(o=o||{},a||null===s||(s="#"+e.hashPrefix()+s),null!==s&&i&&i["#"]&&(s+="#"+i["#"]),s=function(e,t,n){return"/"===m?e:t?m.slice(0,-1)+e:n?m.slice(1)+e:e}(s,a,o.absolute),!o.absolute||!s)return s;var l=!a&&s?"/":"",u=r.port();return u=80===u||443===u?"":":"+u,[r.protocol(),"://",r.host(),u,l,s].join("")}}}var s,l=[],u=null,c=!1;this.rule=function(e){if(!O(e))throw new Error("'rule' must be a function");return l.push(e),this},this.otherwise=function(e){if(I(e)){var t=e;e=function(){return t}}else if(!O(e))throw new Error("'rule' must be a function");return u=e,this},this.when=function(e,t){var n,a=I(t);if(I(e)&&(e=r.compile(e)),!a&&!O(t)&&!B(t))throw new Error("invalid 'handler' in when()");var s={matcher:function(e,t){return a&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),N((function(n,r){return o(n,t,e.exec(r.path(),r.search()))}),{prefix:I(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return a&&(n=t,t=["$match",function(e){return function(e,t){return e.replace(/\$(\$|\d{1,2})/,(function(e,n){return t["$"===n?0:Number(n)]}))}(n,e)}]),N((function(n,r){return o(n,t,e.exec(r.path()))}),{prefix:i(e)})}},l={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var u in l)if(l[u])return this.rule(s[u](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),c=e},this.$get=a,a.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function y(e,i){function d(e,t){if(!e)return n;var r=I(e),i=r?e:e.name;if(function(e){return 0===e.indexOf(".")||0===e.indexOf("^")}(i)){if(!t)throw new Error("No reference point given for path '"+i+"'");t=d(t);for(var o=i.split("."),a=0,s=o.length,l=t;s>a;a++)if(""!==o[a]||0!==a){if("^"!==o[a])break;if(!l.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");l=l.parent}else l=t;o=o.slice(a).join("."),i=l.name+(l.name&&o?".":"")+o}var u=y[i];return!u||!r&&(r||u!==e&&u.self!==e)?n:u}function h(t){var n=(t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}})).name;if(!I(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(y.hasOwnProperty(n))throw new Error("State '"+n+"' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):I(t.parent)?t.parent:j(t.parent)&&I(t.parent.name)?t.parent.name:"";if(i&&!y[i])return function(e,t){b[e]||(b[e]=[]),b[e].push(t)}(i,t.self);for(var o in L)O(L[o])&&(t[o]=L[o](t,L.$delegates[o]));return y[n]=t,!t[w]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){_.$current.navigable==t&&l(e,n)||_.transitionTo(t,e,{inherit:!0,location:!1})}]),function(e){for(var t=b[e]||[];t.length;)h(t.shift())}(n),t}function p(e){for(var t=e.split("."),n=_.$current.name.split("."),r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return"**"===t[0]&&(n=n.slice(a(n,t[1]))).unshift("**"),"**"===t[t.length-1]&&(n.splice(a(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length==n.length&&n.join("")===t.join("")}function m(e,i,a,c,h,m,b,L,M){function k(t,n,r,o){var a=e.$broadcast("$stateNotFound",t,n,r);if(a.defaultPrevented)return b.update(),$;if(!a.retry)return null;if(o.$retry)return b.update(),D;var s=_.transition=i.when(a.retry);return s.then((function(){return s!==_.transition?S:(t.options.$retry=!0,_.transitionTo(t.to,t.toParams,t.options))}),(function(){return $})),b.update(),s}function x(e,n,r,o,s,l){var d=r?n:u(e.params.$$keys(),n),f={$stateParams:d};s.resolve=h.resolve(e.resolve,f,s.resolve,e);var p=[s.resolve.then((function(e){s.globals=e}))];return o&&p.push(o),i.all(p).then((function(){var n=[];return H(e.views,(function(r,i){var o=r.resolve&&r.resolve!==e.resolve?r.resolve:{};o.$template=[function(){return a.load(i,{view:r,locals:s.globals,params:d,notify:l.notify})||""}],n.push(h.resolve(o,s.globals,s.resolve,e).then((function(n){if(O(r.controllerProvider)||B(r.controllerProvider)){var a=t.extend({},o,s.globals);n.$$controller=c.invoke(r.controllerProvider,null,a)}else n.$$controller=r.controller;n.$$state=e,n.$$controllerAs=r.controllerAs,s[i]=n})))})),i.all(n).then((function(){return s.globals}))})).then((function(e){return s}))}var S=i.reject(new Error("transition superseded")),T=i.reject(new Error("transition prevented")),$=i.reject(new Error("transition aborted")),D=i.reject(new Error("transition failed"));return v.locals={resolve:null,globals:{$stateParams:{}}},(_={params:{},current:v.self,$current:v,transition:null}).reload=function(e){return _.transitionTo(_.current,m,{reload:e||!0,inherit:!1,notify:!0})},_.go=function(e,t,n){return _.transitionTo(e,t,N({inherit:!0,relative:_.$current},n))},_.transitionTo=function(t,n,o){n=n||{},o=N({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a=_.$current,l=_.params,h=a.path,f=d(t,o.relative),p=n["#"];if(!Y(f)){var y={to:t,toParams:n,options:o},L=k(y,a.self,l,o);if(L)return L;if(n=y.toParams,f=d(t=y.to,(o=y.options).relative),!Y(f)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(f[w])throw new Error("Cannot transition to abstract state '"+t+"'");if(o.inherit&&(n=s(m,n||{},_.$current,f)),!f.params.$$validates(n))return D;n=f.params.$$values(n);var M=(t=f).path,$=0,C=M[$],E=v.locals,A=[];if(o.reload){if(I(o.reload)||j(o.reload)){if(j(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var P=!0===o.reload?h[0]:d(o.reload);if(o.reload&&!P)throw new Error("No such reload state '"+(I(o.reload)?o.reload:o.reload.name)+"'");for(;C&&C===h[$]&&C!==P;)E=A[$]=C.locals,$++,C=M[$]}}else for(;C&&C===h[$]&&C.ownParams.$$equals(n,l);)E=A[$]=C.locals,$++,C=M[$];if(g(t,n,a,l,E,o))return p&&(n["#"]=p),_.params=n,R(_.params,m),R(u(t.params.$$keys(),m),t.locals.globals.$stateParams),o.location&&t.navigable&&t.navigable.url&&(b.push(t.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),b.update(!0)),_.transition=null,i.when(_.current);if(n=u(t.params.$$keys(),n||{}),p&&(n["#"]=p),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,a.self,l,o).defaultPrevented)return e.$broadcast("$stateChangeCancel",t.self,n,a.self,l),null==_.transition&&b.update(),T;for(var O=i.when(E),B=$;B<M.length;B++,C=M[B])E=A[B]=r(E),O=x(C,n,C===t,O,E,o);var H=_.transition=O.then((function(){var r,i,s;if(_.transition!==H)return S;for(r=h.length-1;r>=$;r--)(s=h[r]).self.onExit&&c.invoke(s.self.onExit,s.self,s.locals.globals),s.locals=null;for(r=$;r<M.length;r++)(i=M[r]).locals=A[r],i.self.onEnter&&c.invoke(i.self.onEnter,i.self,i.locals.globals);return _.transition!==H?S:(_.$current=t,_.current=t.self,_.params=n,R(_.params,m),_.transition=null,o.location&&t.navigable&&b.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&e.$broadcast("$stateChangeSuccess",t.self,n,a.self,l),b.update(!0),_.current)}),(function(r){return _.transition!==H?S:(_.transition=null,e.$broadcast("$stateChangeError",t.self,n,a.self,l,r).defaultPrevented||b.update(),i.reject(r))}));return H},_.is=function(e,t,r){var i=d(e,(r=N({relative:_.$current},r||{})).relative);return Y(i)?_.$current===i&&(!t||l(i.params.$$values(t),m)):n},_.includes=function(e,t,r){if(r=N({relative:_.$current},r||{}),I(e)&&function(e){return e.indexOf("*")>-1}(e)){if(!p(e))return!1;e=_.$current.name}var i=d(e,r.relative);return Y(i)?!!Y(_.$current.includes[i.name])&&(!t||l(i.params.$$values(t),m,o(t))):n},_.href=function(e,t,r){var i=d(e,(r=N({lossy:!0,inherit:!0,absolute:!1,relative:_.$current},r||{})).relative);if(!Y(i))return null;r.inherit&&(t=s(m,t||{},_.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==n&&null!==o.url?b.href(o.url,u(i.params.$$keys().concat("#"),t||{}),{absolute:r.absolute}):null},_.get=function(e,t){if(0===arguments.length)return f(o(y),(function(e){return y[e].self}));var n=d(e,t||_.$current);return n&&n.self?n.self:null},_}function g(e,t,n,r,i,o){return!(o.reload||e!==n||!(i===n.locals||!1===e.self.reloadOnSearch&&function(e,t,n){var r=e.params.$$keys().filter((function(t){return"search"!=e.params[t].location})),i=c.apply({},[e.params].concat(r));return new P.ParamSet(i).$$equals(t,n)}(n,r,t)))||void 0}var v,_,y={},b={},w="abstract",L={parent:function(e){if(Y(e.parent)&&e.parent)return d(e.parent);var t=/^(.+)\.[^.]+$/.exec(e.name);return t?d(t[1]):v},data:function(e){return e.parent&&e.parent.data&&(e.data=e.self.data=r(e.parent.data,e.data)),e.data},url:function(e){var t=e.url,n={params:e.params||{}};if(I(t))return"^"==t.charAt(0)?i.compile(t.substring(1),n):(e.parent.navigable||v).url.concat(t,n);if(!t||i.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+e+"'")},navigable:function(e){return e.url?e:e.parent?e.parent.navigable:null},ownParams:function(e){var t=e.url&&e.url.params||new P.ParamSet;return H(e.params||{},(function(e,n){t[n]||(t[n]=new P.Param(n,null,e,"config"))})),t},params:function(e){var t=c(e.ownParams,e.ownParams.$$keys());return e.parent&&e.parent.params?N(e.parent.params.$$new(),t):new P.ParamSet},views:function(e){var t={};return H(Y(e.views)?e.views:{"":e},(function(n,r){r.indexOf("@")<0&&(r+="@"+e.parent.name),t[r]=n})),t},path:function(e){return e.parent?e.parent.path.concat(e):[]},includes:function(e){var t=e.parent?N({},e.parent.includes):{};return t[e.name]=!0,t},$delegates:{}};(v=h({name:"",url:"^",views:null,abstract:!0})).navigable=null,this.decorator=function(e,t){return I(e)&&!Y(t)?L[e]:O(t)&&I(e)?(L[e]&&!L.$delegates[e]&&(L.$delegates[e]=L[e]),L[e]=t,this):this},this.state=function(e,t){return j(e)?t=e:t.name=e,h(t),this},this.$get=m,m.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function b(){function e(e,t){return{load:function(e,n){var r;return(n=N({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},n)).view&&(r=t.fromConfig(n.view,n.params,n.locals)),r}}}this.$get=e,e.$inject=["$rootScope","$templateFactory"]}function w(e,n,r,i){function o(e,n){function r(e){return 1===F&&V>=4?!!l.enabled(e):1===F&&V>=2?!!l.enabled():!!s}var i={enter:function(e,t,n){t.after(e),n()},leave:function(e,t){e.remove(),t()}};if(e.noanimation)return i;if(l)return{enter:function(e,n,o){r(e)?t.version.minor>2?l.enter(e,null,n).then(o):l.enter(e,null,n,o):i.enter(e,n,o)},leave:function(e,n){r(e)?t.version.minor>2?l.leave(e).then(n):l.leave(e,n):i.leave(e,n)}};if(s){var o=s&&s(n,e);return{enter:function(e,t,n){o.enter(e,null,t),n()},leave:function(e,t){o.leave(e),t()}}}return i}var a=n.has?function(e){return n.has(e)?n.get(e):null}:function(e){try{return n.get(e)}catch(e){return null}},s=a("$animator"),l=a("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,a,s){return function(n,a,l){function u(){function e(){t&&t.remove(),n&&n.$destroy()}var t=d,n=f;n&&(n._willBeDestroyed=!0),h?(v.leave(h,(function(){e(),d=null})),d=h):(e(),d=null),h=null,f=null}function c(o){var c,d=M(n,l,a,i),_=d&&e.$current&&e.$current.locals[d];if((o||_!==p)&&!n._willBeDestroyed){c=n.$new(),p=e.$current.locals[d],c.$emit("$viewContentLoading",d);var y=s(c,(function(e){v.enter(e,a,(function(){f&&f.$emit("$viewContentAnimationEnded"),(t.isDefined(g)&&!g||n.$eval(g))&&r(e)})),u()}));h=y,(f=c).$emit("$viewContentLoaded",d),f.$eval(m)}}var d,h,f,p,m=l.onload||"",g=l.autoscroll,v=o(l,n);n.$on("$stateChangeSuccess",(function(){c(!1)})),c(!0)}}}}function L(e,t,n,r){return{restrict:"ECA",priority:-400,compile:function(i){var o=i.html();return function(i,a,s){var l=n.$current,u=M(i,s,a,r),c=l&&l.locals[u];if(c){a.data("$uiView",{name:u,state:c.$$state}),a.html(c.$template?c.$template:o);var d=e(a.contents());if(c.$$controller){c.$scope=i,c.$element=a;var h=t(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=h),a.data("$ngControllerController",h),a.children().data("$ngControllerController",h)}d(i)}}}}}function M(e,t,n,r){var i=r(t.uiView||t.name||"")(e),o=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function k(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),!(n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function x(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function S(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),n="FORM"===e[0].nodeName;return{attr:n?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!n}}function T(e,t,n,r,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||e.attr("target"))){var l=n((function(){t.go(s.state,s.params,s.options)}));o.preventDefault();var u=r.isAnchor&&!s.href?1:0;o.preventDefault=function(){u--<=0&&n.cancel(l)}}}}function $(e,n){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,o,a){var s=k(o.uiSref,e.current.name),l={state:s.state,href:null,params:null},u=S(i),c=a[1]||a[0];l.options=N(function(e,t){return{relative:x(e)||t.$current,inherit:!0}}(i,e),o.uiSrefOpts?r.$eval(o.uiSrefOpts):{});var d=function(n){n&&(l.params=t.copy(n)),l.href=e.href(s.state,l.params,l.options),c&&c.$$addStateInfo(s.state,l.params),null!==l.href&&o.$set(u.attr,l.href)};s.paramExpr&&(r.$watch(s.paramExpr,(function(e){e!==l.params&&d(e)}),!0),l.params=t.copy(r.$eval(s.paramExpr))),d(),u.clickable&&i.bind("click",T(i,e,n,u,(function(){return l})))}}}function D(e,t){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,o){function a(t){c.state=t[0],c.params=t[1],c.options=t[2],c.href=e.href(c.state,c.params,c.options),l&&l.$$addStateInfo(c.state,c.params),c.href&&i.$set(s.attr,c.href)}var s=S(r),l=o[1]||o[0],u="["+[i.uiState,i.uiStateParams||null,i.uiStateOpts||null].map((function(e){return e||"null"})).join(", ")+"]",c={state:null,params:null,options:null,href:null};n.$watch(u,a,!0),a(n.$eval(u)),s.clickable&&r.bind("click",T(r,e,t,s,(function(){return c})))}}}function C(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(t,r,i,o){function a(t,n,i){var o=e.get(t,x(r)),a=s(t,n);m.push({state:o||{name:t},params:n,hash:a}),g[a]=i}function s(e,n){if(!I(e))throw new Error("state should be a string");return j(n)?e+z(n):(n=t.$eval(n),j(n)?e+z(n):e)}function l(){for(var e=0;e<m.length;e++)d(m[e].state,m[e].params)?u(r,g[m[e].hash]):c(r,g[m[e].hash]),h(m[e].state,m[e].params)?u(r,f):c(r,f)}function u(e,t){o((function(){e.addClass(t)}))}function c(e,t){e.removeClass(t)}function d(t,n){return e.includes(t.name,n)}function h(t,n){return e.is(t.name,n)}var f,p,m=[],g={};f=n(i.uiSrefActiveEq||"",!1)(t);try{p=t.$eval(i.uiSrefActive)}catch(e){}p=p||n(i.uiSrefActive||"",!1)(t),j(p)&&H(p,(function(n,r){if(I(n)){var i=k(n,e.current.name);a(i.state,t.$eval(i.paramExpr),r)}})),this.$$addStateInfo=function(e,t){j(p)&&m.length>0||(a(e,t,p),l())},t.$on("$stateChangeSuccess",l),l()}]}}function E(e){var t=function(t,n){return e.is(t,n)};return t.$stateful=!0,t}function A(e){var t=function(t,n,r){return e.includes(t,n,r)};return t.$stateful=!0,t}var P,Y=t.isDefined,O=t.isFunction,I=t.isString,j=t.isObject,B=t.isArray,H=t.forEach,N=t.extend,R=t.copy,z=t.toJson;t.module("ui.router.util",["ng"]),t.module("ui.router.router",["ui.router.util"]),t.module("ui.router.state",["ui.router.router","ui.router.util"]),t.module("ui.router",["ui.router.state"]),t.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],t.module("ui.router.util").service("$resolve",p),m.$inject=["$http","$templateCache","$injector"],t.module("ui.router.util").service("$templateFactory",m),g.prototype.concat=function(e,t){var n={caseInsensitive:P.caseInsensitive(),strict:P.strictMode(),squash:P.defaultSquashPolicy()};return new g(this.sourcePath+e+this.sourceSearch,N(n,t),this)},g.prototype.toString=function(){return this.source},g.prototype.exec=function(e,t){function n(e){function t(e){return e.split("").reverse().join("")}var n=f(t(e).split(/-(?!\\)/),t);return f(n,(function(e){return e.replace(/\\-/g,"-")})).reverse()}var r=this.regexp.exec(e);if(!r)return null;t=t||{};var i,o,a,s,l,u=this.parameters(),c=u.length,d=this.segments.length-1,h={};if(d!==r.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;d>i;i++){for(a=u[i],s=this.params[a],l=r[i+1],o=0;o<s.replace.length;o++)s.replace[o].from===l&&(l=s.replace[o].to);l&&!0===s.array&&(l=n(l)),Y(l)&&(l=s.type.decode(l)),h[a]=s.value(l)}for(;c>i;i++){for(h[a=u[i]]=this.params[a].value(t[a]),s=this.params[a],l=t[a],o=0;o<s.replace.length;o++)s.replace[o].from===l&&(l=s.replace[o].to);Y(l)&&(l=s.type.decode(l)),h[a]=s.value(l)}return h},g.prototype.parameters=function(e){return Y(e)?this.params[e]||null:this.$$paramNames},g.prototype.validates=function(e){return this.params.$$validates(e)},g.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,(function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()}))}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var o,a=!1,s=n.length-1,l=r.length,u=n[0];for(o=0;l>o;o++){var c=s>o,d=r[o],h=i[d],p=h.value(e[d]),m=h.isOptional&&h.type.equals(h.value(),p),g=!!m&&h.squash,v=h.type.encode(p);if(c){var _=n[o+1],y=o+1===s;if(!1===g)null!=v&&(u+=B(v)?f(v,t).join("-"):encodeURIComponent(v)),u+=_;else if(!0===g){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=_.match(b)[1]}else I(g)&&(u+=g+_);y&&!0===h.squash&&"/"===u.slice(-1)&&(u=u.slice(0,-1))}else{if(null==v||m&&!1!==g)continue;if(B(v)||(v=[v]),0===v.length)continue;u+=(a?"&":"?")+d+"="+(v=f(v,encodeURIComponent).join("&"+d+"=")),a=!0}}return u},v.prototype.is=function(e,t){return!0},v.prototype.encode=function(e,t){return e},v.prototype.decode=function(e,t){return e},v.prototype.equals=function(e,t){return e==t},v.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},v.prototype.pattern=/.*/,v.prototype.toString=function(){return"{Type:"+this.name+"}"},v.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},v.prototype.$asArray=function(e,t){if(!e)return this;if("auto"===e&&!t)throw new Error("'auto' array mode is for query parameters only");return new function(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return B(e)?e:Y(e)?[e]:[]}function o(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function a(e){return!e}function s(e,t){return function(n){if(B(n)&&0===n.length)return n;var r=f(n=i(n),e);return!0===t?0===h(r,a).length:o(r)}}this.encode=s(r(e,"encode")),this.decode=s(r(e,"decode")),this.is=s(r(e,"is"),!0),this.equals=function(e){return function(t,n){var r=i(t),o=i(n);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!e(r[a],o[a]))return!1;return!0}}(r(e,"equals")),this.pattern=e.pattern,this.$normalize=s(r(e,"$normalize")),this.name=e.name,this.$arrayMode=t}(this,e)},t.module("ui.router.util").provider("$urlMatcherFactory",(function e(){function i(e){return null!=e?e.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):e}function s(e){return O(e)||B(e)&&O(e[e.length-1])}function l(){for(;b.length;){var e=b.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(_[e.name],c.invoke(e.def))}}function u(e){N(this,e||{})}P=this;var c,d=!1,p=!0,m=!1,_={},y=!0,b=[],w={string:{encode:i,decode:function(e){return null!=e?e.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):e},is:function(e){return null==e||!Y(e)||"string"==typeof e},pattern:/[^\/]*/},int:{encode:i,decode:function(e){return parseInt(e,10)},is:function(e){return Y(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return!0===e||!1===e},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^\/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};e.$$getDefaultValue=function(e){if(!s(e.value))return e.value;if(!c)throw new Error("Injectable functions cannot be called at configuration time");return c.invoke(e.value)},this.caseInsensitive=function(e){return Y(e)&&(d=e),d},this.strictMode=function(e){return Y(e)&&(p=e),p},this.defaultSquashPolicy=function(e){if(!Y(e))return m;if(!0!==e&&!1!==e&&!I(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return m=e,e},this.compile=function(e,t){return new g(e,N({strict:p,caseInsensitive:d},t))},this.isMatcher=function(e){if(!j(e))return!1;var t=!0;return H(g.prototype,(function(n,r){O(n)&&(t=t&&Y(e[r])&&O(e[r]))})),t},this.type=function(e,t,n){if(!Y(t))return _[e];if(_.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return _[e]=new v(N({name:e},t)),n&&(b.push({name:e,def:n}),y||l()),this},H(w,(function(e,t){_[t]=new v(N({name:t},e))})),_=r(_,{}),this.$get=["$injector",function(e){return c=e,y=!1,l(),H(w,(function(e,t){_[t]||(_[t]=new v(e))})),this}],this.Param=function(e,r,i,l){var u=this;i=function(e){var t=j(e)?o(e):[];return-1===a(t,"value")&&-1===a(t,"type")&&-1===a(t,"squash")&&-1===a(t,"array")&&(e={value:e}),e.$$fn=s(e.value)?e.value:function(){return e.value},e}(i),r=function(n,r,i){if(n.type&&r)throw new Error("Param '"+e+"' has two type configurations.");return r||(n.type?t.isString(n.type)?_[n.type]:n.type instanceof v?n.type:new v(n.type):"config"===i?_.any:_.string)}(i,r,l);var d=function(){var t={array:"search"===l&&"auto"},n=e.match(/\[\]$/)?{array:!0}:{};return N(t,n,i).array}();"string"!==(r=d?r.$asArray(d,"search"===l):r).name||d||"path"!==l||i.value!==n||(i.value="");var p=i.value!==n,g=function(e,t){var n=e.squash;if(!t||!1===n)return!1;if(!Y(n)||null==n)return m;if(!0===n||I(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}(i,p),y=function(e,t,r,i){var o,s,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return o=B(e.replace)?e.replace:[],I(i)&&o.push({from:i,to:n}),s=f(o,(function(e){return e.from})),h(l,(function(e){return-1===a(s,e.from)})).concat(o)}(i,d,p,g);N(this,{id:e,type:r,location:l,array:d,squash:g,replace:y,isOptional:p,value:function(e){return e=function(e){var t=f(h(u.replace,function(e){return function(t){return t.from===e}}(e)),(function(e){return e.to}));return t.length?t[0]:e}(e),Y(e)?u.type.$normalize(e):function(){if(!c)throw new Error("Injectable functions cannot be called at configuration time");var e=c.invoke(i.$$fn);if(null!==e&&e!==n&&!u.type.is(e))throw new Error("Default value ("+e+") for parameter '"+u.id+"' is not an instance of Type ("+u.type.name+")");return e}()},dynamic:n,config:i,toString:function(){return"{Param:"+e+" "+r+" squash: '"+g+"' optional: "+p+"}"}})},u.prototype={$$new:function(){return r(this,N(new u,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=o(u.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),H(t,(function(t){H(o(t),(function(t){-1===a(e,t)&&-1===a(r,t)&&e.push(t)}))})),e},$$values:function(e){var t={},n=this;return H(n.$$keys(),(function(r){t[r]=n[r].value(e&&e[r])})),t},$$equals:function(e,t){var n=!0,r=this;return H(r.$$keys(),(function(i){var o=e&&e[i],a=t&&t[i];r[i].type.equals(o,a)||(n=!1)})),n},$$validates:function(e){var r,i,o,a,s,l=this.$$keys();for(r=0;r<l.length&&(i=this[l[r]],(o=e[l[r]])!==n&&null!==o||!i.isOptional);r++){if(a=i.type.$normalize(o),!i.type.is(a))return!1;if(s=i.type.encode(a),t.isString(s)&&!i.type.pattern.exec(s))return!1}return!0},$$parent:n},this.ParamSet=u})),t.module("ui.router.util").run(["$urlMatcherFactory",function(e){}]),_.$inject=["$locationProvider","$urlMatcherFactoryProvider"],t.module("ui.router.router").provider("$urlRouter",_),y.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],t.module("ui.router.state").factory("$stateParams",(function(){return{}})).provider("$state",y),b.$inject=[],t.module("ui.router.state").provider("$view",b),t.module("ui.router.state").provider("$uiViewScroll",(function(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,n){return e?t:function(e){return n((function(){e[0].scrollIntoView()}),0,!1)}}]}));var F=t.version.major,V=t.version.minor;w.$inject=["$state","$injector","$uiViewScroll","$interpolate"],L.$inject=["$compile","$controller","$state","$interpolate"],t.module("ui.router.state").directive("uiView",w),t.module("ui.router.state").directive("uiView",L),$.$inject=["$state","$timeout"],D.$inject=["$state","$timeout"],C.$inject=["$state","$stateParams","$interpolate"],t.module("ui.router.state").directive("uiSref",$).directive("uiSrefActive",C).directive("uiSrefActiveEq",C).directive("uiState",D),E.$inject=["$state"],A.$inject=["$state"],t.module("ui.router.state").filter("isState",E).filter("includedByState",A)}(window,window.angular),function(){function e(e,t,n,r,i,o){return{restrict:"A",priority:1e3,transclude:"element",$$tlb:!0,require:"^^$ionicScroll",link:function(r,a,l,u,c){function d(){Y.resizeRequiresRefresh(g.__clientWidth,g.__clientHeight)&&f()}function h(){return w||(w=new e({afterItemsNode:P[0],containerNode:_,heightData:x,widthData:S,forceRefreshImages:!(!s(l.forceRefreshImages)||"false"===l.forceRefreshImages),keyExpression:L,renderBuffer:C,scope:r,scrollView:u.scrollView,transclude:c}))}function f(){var e=$.length>0;if(e&&(x.computed||S.computed)&&function(){O||c(I=r.$new(),(function(e){e[0].removeAttribute("collection-repeat"),O=e[0]})),I[L]=(k(r)||[])[0],i.$$phase||I.$digest(),_.appendChild(O);var e=n.getComputedStyle(O);T.width=parseInt(e.width),T.height=parseInt(e.height),_.removeChild(O)}(),e&&x.computed){if(x.value=T.height,!x.value)throw new Error('collection-repeat tried to compute the height of repeated elements "'+y+'", but was unable to. Please provide the "item-height" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!x.dynamic&&x.getValue&&(x.value=x.getValue());if(e&&S.computed){if(S.value=T.width,!S.value)throw new Error('collection-repeat tried to compute the width of repeated elements "'+y+'", but was unable to. Please provide the "item-width" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!S.dynamic&&S.getValue&&(S.value=S.getValue());h().refreshLayout()}function p(e,n){if(e){var r;try{r=t(e)}catch(n){e.trim().match(/\d+(px|%)$/)&&(e='"'+e+'"'),r=t(e)}var i=e.replace(/(\'|\"|px|%)/g,"").trim(),o=i.length&&!/([a-zA-Z]|\$|:|\?)/.test(i);if(n.attrValue=e,o)if(e.indexOf("%")>-1){var a=parseFloat(r())/100;n.getValue=n===x?function(){return Math.floor(a*g.__clientHeight)}:function(){return Math.floor(a*g.__clientWidth)}}else n.value=parseInt(r());else n.dynamic=!0,n.getValue=n===x?function(e,t){var n=r(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*g.__clientHeight):parseInt(n)}:function(e,t){var n=r(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*g.__clientWidth):parseInt(n)}}}var g=u.scrollView,v=a[0],_=angular.element('<div class="collection-repeat-container">')[0];if(v.parentNode.replaceChild(_,v),g.options.scrollingX&&g.options.scrollingY)throw new Error("collection-repeat expected a parent x or y scrollView, not an xy scrollView.");var y=l.collectionRepeat,b=y.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!b)throw new Error("collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '"+l.collectionRepeat+"'.");var w,L=b[1],M=b[2],k=t(M),x={},S={},T={},$=[],D=l.itemRenderBuffer||l.collectionBufferSize,C=angular.isDefined(D)?parseInt(D):m,E=l.itemHeight||l.collectionItemHeight,A=l.itemWidth||l.collectionItemWidth,P=function(){var e=angular.element(g.__content.querySelector(".collection-repeat-after-container"));if(!e.length){var t=!1,n=[].filter.call(g.__content.childNodes,(function(e){return ionic.DomUtil.contains(e,_)?(t=!0,!1):t}));e=angular.element('<span class="collection-repeat-after-container">'),g.options.scrollingX&&e.addClass("horizontal"),e.append(n),g.__content.appendChild(e[0])}return e}(),Y=function(){var e;return e={dataLength:0,width:0,height:0,resizeRequiresRefresh:function(t,n){var r=e.dataLength&&t&&n&&(t!==e.width||n!==e.height);return e.width=t,e.height=n,!!r},dataChangeRequiresRefresh:function(t){var n=t.length>0||t.length<e.dataLength;return e.dataLength=t.length,!!n}}}();E?p(E,x):x.computed=!0,A?p(A,S):S.computed=!0,u.$element.on("scroll-resize",f),angular.element(n).on("resize",d);var O,I,j=i.$on("$ionicExposeAside",ionic.animationFrameThrottle((function(){u.scrollView.resize(),d()})));o(f,0,!1),r.$watchCollection(k,(function(e){if($=e||(e=[]),!angular.isArray(e))throw new Error("collection-repeat expected an array for '"+M+"', but got a "+typeof value);r.$$postDigest((function(){h().setData($),Y.dataChangeRequiresRefresh($)&&f()}))})),r.$on("$destroy",(function(){angular.element(n).off("resize",d),j(),u.$element&&u.$element.off("scroll-resize",f),O&&O.parentNode&&O.parentNode.removeChild(O),I&&I.$destroy(),I=O=null,w&&w.destroy(),w=null}))}}}function t(e,t,n){var r={primaryPos:0,secondaryPos:0,primarySize:0,secondarySize:0,rowPrimarySize:0};return function(i){function o(){return a(!0)}function a(t){if(!a.destroyed){var n,i,o,u,c,h=G.getScrollValue(),g=h+G.scrollPrimarySize;for(n in G.updateRenderRange(h,g),B=Math.max(0,B-y),H=Math.min(M.length-1,H+y),W)(B>n||n>H)&&(o=W[n],delete W[n],F.push(o),o.isShown=!1);for(n=B;H>=n;n++)n>=M.length||W[n]&&!t||(o=W[n]||(W[n]=F.length?F.pop():z.length?z.shift():new l),V.push(o),o.isShown=!0,(c=o.scope).$index=n,c[_]=M[n],c.$first=0===n,c.$last=n===M.length-1,c.$middle=!(c.$first||c.$last),c.$odd=!(c.$even=0==(1&n)),c.$$disconnected&&ionic.Utils.reconnectScope(o.scope),u=G.getDimensions(n),(o.secondaryPos!==u.secondaryPos||o.primaryPos!==u.primaryPos)&&(o.node.style[ionic.CSS.TRANSFORM]=Y.replace(A,o.primaryPos=u.primaryPos).replace(P,o.secondaryPos=u.secondaryPos)),(o.secondarySize!==u.secondarySize||o.primarySize!==u.primarySize)&&(o.node.style.cssText=o.node.style.cssText.replace(p,O.replace(A,(o.primarySize=u.primarySize)+1).replace(P,o.secondarySize=u.secondarySize))));for(H===M.length-1&&(u=G.getDimensions(M.length-1)||r,d.style[ionic.CSS.TRANSFORM]=Y.replace(A,u.primaryPos+u.primarySize).replace(P,0));F.length;)(o=F.pop()).scope.$broadcast("$collectionRepeatLeave"),ionic.Utils.disconnectScope(o.scope),z.push(o),o.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",o.primaryPos=o.secondaryPos=null;if(m)for(n=0,i=V.length;i>n&&(o=V[n]);n++)if(o.images)for(var v,b=0,w=o.images.length;w>b&&(v=o.images[b]);b++){var L=v.src;v.src=f,v.src=L}if(t)for(var k=e.$$phase;V.length;)o=V.pop(),k||o.scope.$digest();else s()}}function s(){var t;s.running||(s.running=!0,n((function(){for(var n=e.$$phase;V.length;)(t=V.pop()).isShown&&(n||t.scope.$digest());s.running=!1})))}function l(){var e=this;this.scope=b.$new(),this.id="item"+U++,L(this.scope,(function(t){e.element=t,e.element.data("$$collectionRepeatItem",e),e.node=t[0],e.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",e.node.style.cssText+=" height: 0px; width: 0px;",ionic.Utils.disconnectScope(e.scope),h.appendChild(e.node),e.images=t[0].getElementsByTagName("img")}))}var u,c,d=i.afterItemsNode,h=i.containerNode,m=i.forceRefreshImages,g=i.heightData,v=i.widthData,_=i.keyExpression,y=i.renderBuffer,b=i.scope,w=i.scrollView,L=i.transclude,M=[],k={},x=g.getValue||function(){return g.value},S=function(e,t){return k[_]=t,k.$index=e,x(b,k)},T=v.getValue||function(){return v.value},$=function(e,t){return k[_]=t,k.$index=e,T(b,k)},D=!!w.options.scrollingY,C=D?v.dynamic||v.value!==w.__clientWidth:g.dynamic||g.value!==w.__clientHeight,E=!g.dynamic&&!v.dynamic,A="PRIMARY",P="SECONDARY",Y=D?"translate3d(SECONDARYpx,PRIMARYpx,0)":"translate3d(PRIMARYpx,SECONDARYpx,0)",O=D?"height: PRIMARYpx; width: SECONDARYpx;":"height: SECONDARYpx; width: PRIMARYpx;",I=0,j=0,B=-1,H=-1,N=-1,R=-1,z=[],F=[],V=[],W={},U=0,q=D?function(){w.setDimensions(null,null,null,G.getContentSize(),!0)}:function(){w.setDimensions(null,null,G.getContentSize(),null,!0)},G=D?new function(){this.getItemPrimarySize=S,this.getItemSecondarySize=$,this.getScrollValue=function(){return Math.max(0,Math.min(w.__scrollTop-I,w.__maxScrollTop-I-j))},this.refreshDirection=function(){this.scrollPrimarySize=w.__clientHeight,this.scrollSecondarySize=w.__clientWidth,this.estimatedPrimarySize=u,this.estimatedSecondarySize=c,this.estimatedItemsAcross=C&&Math.floor(w.__clientWidth/c)||1}}:new function(){this.getItemPrimarySize=$,this.getItemSecondarySize=S,this.getScrollValue=function(){return Math.max(0,Math.min(w.__scrollLeft-I,w.__maxScrollLeft-I-j))},this.refreshDirection=function(){this.scrollPrimarySize=w.__clientWidth,this.scrollSecondarySize=w.__clientHeight,this.estimatedPrimarySize=c,this.estimatedSecondarySize=u,this.estimatedItemsAcross=C&&Math.floor(w.__clientHeight/u)||1}};(C?function(){this.getEstimatedSecondaryPos=function(e){return e%this.estimatedItemsAcross*this.estimatedSecondarySize},this.getEstimatedPrimaryPos=function(e){return Math.floor(e/this.estimatedItemsAcross)*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)*this.estimatedItemsAcross}}:function(){this.getEstimatedSecondaryPos=function(){return 0},this.getEstimatedPrimaryPos=function(e){return e*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)}}).call(G),(E?function(){this.getContentSize=function(){return this.getEstimatedPrimaryPos(M.length-1)+this.estimatedPrimarySize+I+j};var e={};this.getDimensions=function(t){return e.primaryPos=this.getEstimatedPrimaryPos(t),e.secondaryPos=this.getEstimatedSecondaryPos(t),e.primarySize=this.estimatedPrimarySize,e.secondarySize=this.estimatedSecondarySize,e},this.updateRenderRange=function(e,t){B=Math.max(0,this.getEstimatedIndex(e)),H=Math.min(M.length-1,this.getEstimatedIndex(t)+this.estimatedItemsAcross-1),R=Math.max(0,this.getEstimatedPrimaryPos(B)),N=this.getEstimatedPrimaryPos(H)+this.estimatedPrimarySize}}:function(){var e,t=this,n=ionic.debounce(q,25,!0),i=C?function(n){var i,a,s;for(i=Math.max(e,0);n>=i&&(s=o[i]);i++)a=o[i-1]||r,s.secondarySize=Math.min(t.getItemSecondarySize(i,M[i]),t.scrollSecondarySize),s.secondaryPos=a.secondaryPos+a.secondarySize,0===i||s.secondaryPos+s.secondarySize>t.scrollSecondarySize?(s.secondaryPos=0,s.primarySize=t.getItemPrimarySize(i,M[i]),s.primaryPos=a.primaryPos+a.rowPrimarySize,s.rowStartIndex=i,s.rowPrimarySize=s.primarySize):(s.primarySize=t.getItemPrimarySize(i,M[i]),s.primaryPos=a.primaryPos,s.rowStartIndex=a.rowStartIndex,o[s.rowStartIndex].rowPrimarySize=s.rowPrimarySize=Math.max(o[s.rowStartIndex].rowPrimarySize,s.primarySize),s.rowPrimarySize=Math.max(s.primarySize,s.rowPrimarySize))}:function(n){var i,a,s;for(i=Math.max(0,e);n>=i&&(s=o[i]);i++)a=o[i-1]||r,s.primarySize=t.getItemPrimarySize(i,M[i]),s.secondarySize=t.scrollSecondarySize,s.primaryPos=a.primaryPos+a.primarySize,s.secondaryPos=0},o=[];this.getContentSize=function(){var t=o[e]||r;return(t.primaryPos+t.primarySize||0)+this.getEstimatedPrimaryPos(M.length-e-1)+I+j},this.onDestroy=function(){o.length=0},this.onRefreshData=function(){var t,n;for(t=o.length,n=M.length;n>t;t++)o.push({});e=-1},this.onRefreshLayout=function(){e=-1},this.getDimensions=function(t){return(t=Math.min(t,M.length-1))>e&&(t>.9*M.length?(i(M.length-1),e=M.length-1,q()):(i(t),e=t,n())),o[t]};var a=-1,s=-1;this.updateRenderRange=function(e,t){var n,r,i,o;if(this.getDimensions(2*this.getEstimatedIndex(t)),-1===a||0===e)n=0;else if(e>=s)for(n=a,r=M.length;r>n&&!((i=this.getDimensions(n))&&i.primaryPos+i.rowPrimarySize>=e);n++);else for(n=a;n>=0;n--)if((i=this.getDimensions(n))&&i.primaryPos<=e){n=C?i.rowStartIndex:n;break}for(B=Math.min(Math.max(0,n),M.length-1),R=-1!==B?this.getDimensions(B).primaryPos:-1,n=B+1,r=M.length;r>n;n++)if((i=this.getDimensions(n))&&i.primaryPos+i.rowPrimarySize>t){if(C)for(o=i;r-1>n&&(i=this.getDimensions(n+1)).primaryPos===o.primaryPos;)n++;break}H=Math.min(n,M.length-1),N=-1!==H?(i=this.getDimensions(H)).primaryPos+(i.rowPrimarySize||i.primarySize):-1,s=e,a=B}}).call(G);var Z=D?"getContentHeight":"getContentWidth",J=w.options[Z];w.options[Z]=angular.bind(G,G.getContentSize),w.__$callback=w.__callback,w.__callback=function(e,t,n,r){var i=G.getScrollValue();(-1===B||i+G.scrollPrimarySize>N||R>i)&&a(),w.__$callback(e,t,n,r)};var X=!1,K=!1;this.refreshLayout=function(){M.length?(u=S(0,M[0]),c=$(0,M[0])):(u=100,c=100);var e=getComputedStyle(d)||{},n=d.firstElementChild&&getComputedStyle(d.firstElementChild)||{},r=d.lastElementChild&&getComputedStyle(d.lastElementChild)||{};j=(parseInt(e[D?"height":"width"])||0)+(n&&parseInt(n[D?"marginTop":"marginLeft"])||0)+(r&&parseInt(r[D?"marginBottom":"marginRight"])||0),I=0;var i=h;do{I+=i[D?"offsetTop":"offsetLeft"]}while(ionic.DomUtil.contains(w.__content,i=i.offsetParent));var a=h.previousElementSibling,s=a?t.getComputedStyle(a):{},f=parseInt(s[D?"marginBottom":"marginRight"]||0);if(h.style[ionic.CSS.TRANSFORM]=Y.replace(A,-f).replace(P,0),I-=f,w.__clientHeight&&w.__clientWidth||(w.__clientWidth=w.__container.clientWidth,w.__clientHeight=w.__container.clientHeight),(G.onRefreshLayout||angular.noop)(),G.refreshDirection(),q(),!X)for(var p=Math.max(20,3*y),m=0;p>m;m++)z.push(new l);(X=!0)&&K&&((w.__scrollLeft>w.__maxScrollLeft||w.__scrollTop>w.__maxScrollTop)&&w.resize(),o())},this.setData=function(e){M=e,(G.onRefreshData||angular.noop)(),K=!0},this.destroy=function(){a.destroyed=!0,z.forEach((function(e){e.scope.$destroy(),e.scope=e.element=e.node=e.images=null})),z.length=V.length=F.length=0,W={},w.options[Z]=J,w.__callback=w.__$callback,w.resize(),(G.onDestroy||angular.noop)()}}}function n(e){return["$document","$timeout",function(t,n){return{restrict:"E",controller:"$ionicHeaderBar",compile:function(r){return r.addClass(e?"bar bar-header":"bar bar-footer"),n((function(){e&&t[0].getElementsByClassName("tabs-top").length&&r.addClass("has-tabs-top")})),{pre:function(t,n,r,i){e?(t.$watch((function(){return n[0].className}),(function(e){var n=-1===e.indexOf("ng-hide"),r=-1!==e.indexOf("bar-subheader");t.$hasHeader=n&&!r,t.$hasSubheader=n&&r,t.$emit("$ionicSubheader",t.$hasSubheader)})),t.$on("$destroy",(function(){delete t.$hasHeader,delete t.$hasSubheader})),i.align(),t.$on("$ionicHeader.align",(function(){ionic.requestAnimationFrame((function(){i.align()}))}))):(t.$watch((function(){return n[0].className}),(function(e){var n=-1===e.indexOf("ng-hide"),r=-1!==e.indexOf("bar-subfooter");t.$hasFooter=n&&!r,t.$hasSubfooter=n&&r})),t.$on("$destroy",(function(){delete t.$hasFooter,delete t.$hasSubfooter})),t.$watch("$hasTabs",(function(e){n.toggleClass("has-tabs",!!e)})),i.align(),t.$on("$ionicFooter.align",(function(){ionic.requestAnimationFrame((function(){i.align()}))})))}}}}}]}function r(e){e.stopPropagation()}var i=angular.module("ionic",["ngAnimate","ngSanitize","ui.router","ngIOS9UIWebViewPatch"]),o=angular.extend,a=angular.forEach,s=angular.isDefined,l=angular.isNumber,u=angular.isString,c=angular.element,d=angular.noop;i.factory("$ionicActionSheet",["$rootScope","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform","$ionicBody","IONIC_BACK_PRIORITY",function(e,t,n,r,i,a,s,l){return{show:function(i){function u(e){e&&/icon/.test(e)&&(h.$actionSheetHasIcon=!0)}var h=e.$new(!0);o(h,{cancel:d,destructiveButtonClicked:d,buttonClicked:d,$deregisterBackButton:d,buttons:[],cancelOnStateChange:!0},i||{});for(var f=0;f<h.buttons.length;f++)u(h.buttons[f].text);u(h.cancelText),u(h.destructiveText);var p=h.element=t('<ion-action-sheet ng-class="cssClass" buttons="buttons"></ion-action-sheet>')(h),m=c(p[0].querySelector(".action-sheet-wrapper")),g=h.cancelOnStateChange?e.$on("$stateChangeSuccess",(function(){h.cancel()})):d;return h.removeSheet=function(e){h.removed||(h.removed=!0,m.removeClass("action-sheet-up"),r((function(){s.removeClass("action-sheet-open")}),400),h.$deregisterBackButton(),g(),n.removeClass(p,"active").then((function(){h.$destroy(),p.remove(),h.cancel.$scope=m=null,(e||d)(i.buttons)})))},h.showSheet=function(e){h.removed||(s.append(p).addClass("action-sheet-open"),n.addClass(p,"active").then((function(){h.removed||(e||d)()})),r((function(){h.removed||m.addClass("action-sheet-up")}),20,!1))},h.$deregisterBackButton=a.registerBackButtonAction((function(){r(h.cancel)}),l.actionSheet),h.cancel=function(){h.removeSheet(i.cancel)},h.buttonClicked=function(e){!0===i.buttonClicked(e,i.buttons[e])&&h.removeSheet()},h.destructiveButtonClicked=function(){!0===i.destructiveButtonClicked()&&h.removeSheet()},h.showSheet(),h.cancel.$scope=h,h.cancel}}}]),c.prototype.addClass=function(e){var t,n,r,i,o,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t<this.length;t++)if((i=this[t]).setAttribute)if(e.indexOf(" ")<0&&i.classList.add)i.classList.add(e);else{for(a=(" "+(i.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),o=e.split(" "),n=0;n<o.length;n++)r=o[n].trim(),-1===a.indexOf(" "+r+" ")&&(a+=r+" ");i.setAttribute("class",a.trim())}return this},c.prototype.removeClass=function(e){var t,n,r,i,o;if(e)for(t=0;t<this.length;t++)if((o=this[t]).getAttribute)if(e.indexOf(" ")<0&&o.classList.remove)o.classList.remove(e);else for(r=e.split(" "),n=0;n<r.length;n++)i=r[n],o.setAttribute("class",(" "+(o.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+i.trim()+" "," ").trim());return this},i.factory("$ionicBackdrop",["$document","$timeout","$$rAF","$rootScope",function(e,t,n,r){var i=c('<div class="backdrop">'),o=0;return e[0].body.appendChild(i[0]),{retain:function(){1==++o&&(i.addClass("visible"),r.$broadcast("backdrop.shown"),n((function(){o>=1&&i.addClass("active")})))},release:function(){1===o&&(i.removeClass("active"),r.$broadcast("backdrop.hidden"),t((function(){0===o&&i.removeClass("visible")}),400,!1)),o=Math.max(0,o-1)},getElement:function(){return i},_element:i}}]),i.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(r,i,o){a(o||{},(function(o,a){var s,l,u=o.match(n)||[],c=u[3]||a;switch(u[1]){case"@":if(!i[c])return;i.$observe(c,(function(e){r[a]=e})),i[c]&&(r[a]=t(i[c])(r));break;case"=":if(!i[c])return;l=r.$watch(i[c],(function(e){r[a]=e})),r.$on("$destroy",l);break;case"&":if(i[c]&&i[c].match(RegExp(a+"(.*?)")))throw new Error('& expression binding "'+a+'" looks like it will recursively call "'+i[c]+'" and cause a stack overflow! Please choose a different scopeName.');s=e(i[c]),r[a]=function(e){return s(r,e)}}}))}}]),i.factory("$ionicBody",["$document",function(e){return{addClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.add(arguments[t]);return this},removeClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.remove(arguments[t]);return this},enableClass:function(e){var t=Array.prototype.slice.call(arguments).slice(1);return e?this.addClass.apply(this,t):this.removeClass.apply(this,t),this},append:function(t){return e[0].body.appendChild(t.length?t[0]:t),this},get:function(){return e[0].body}}}]),i.factory("$ionicClickBlock",["$document","$ionicBody","$timeout",function(e,t,n){function r(e){e.preventDefault(),e.stopPropagation()}function i(){s&&(o?o.classList.remove(l):((o=e[0].createElement("div")).className="click-block",t.append(o),o.addEventListener("touchstart",r),o.addEventListener("mousedown",r)),s=!1)}var o,a,s,l="click-block-hide";return{show:function(e){s=!0,n.cancel(a),a=n(this.hide,e||310,!1),i()},hide:function(){s=!1,n.cancel(a),o&&o.classList.add(l)}}}]),i.factory("$ionicGesture",[function(){return{on:function(e,t,n,r){return window.ionic.onGesture(e,t,n[0],r)},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]),i.factory("$ionicHistory",["$rootScope","$state","$location","$window","$timeout","$ionicViewSwitcher","$ionicNavViewDelegate",function(e,t,n,r,i,a,l){function u(e){return e?E.views[e]:null}function c(e){return e?u(e.backViewId):null}function d(e){return e?E.histories[e]:null}function h(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}}function f(e){E.currentView=u(e),E.backView=c(E.currentView),E.forwardView=function(e){return e?u(e.forwardViewId):null}(E.currentView)}function p(){var e;if(t&&t.current&&t.current.name){if(e=t.current.name,t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&t.params[n]&&(e+="_"+n+"="+t.params[n]);return e}return ionic.Utils.nextUid()}function m(){var e;if(t&&t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&((e=e||{})[n]=t.params[n]);return e}function g(e){return e&&e.length&&/ion-side-menus|ion-tabs/i.test(e[0].tagName)}function v(e,t){if(t&&t.$$state&&!1===t.$$state.self.canSwipeBack)return!1;if(e&&"false"===e.attr("can-swipe-back"))return!1;var n=e.find("ion-view");return!n||"false"!==n.attr("can-swipe-back")}var _,y,b,w,L,M="moveBack",k="back",x="forward",S="enter",T="exit",$="swap",D="none",C=0,E={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null},A=function(){};return A.prototype.initialize=function(e){if(e){for(var t in e)this[t]=e[t];return this}return null},A.prototype.go=function(){if(this.stateName)return t.go(this.stateName,this.stateParams);if(this.url&&this.url!==n.url()){if(E.backView===this)return r.history.go(-1);if(E.forwardView===this)return r.history.go(1);n.url(this.url)}return null},A.prototype.destroy=function(){this.scope&&(this.scope.$destroy&&this.scope.$destroy(),this.scope=null)},{register:function(e,t){var r,o,s,l=p(),g=function(e){var t=h(e);return E.histories[t.historyId]||(E.histories[t.historyId]={historyId:t.historyId,parentHistoryId:h(t.scope.$parent).historyId,stack:[],cursor:-1}),d(t.historyId)}(e),A=E.currentView,P=E.backView,Y=E.forwardView,O=null,I=null,j=D,B=g.historyId,H=n.url();if(_!==l&&(_=l,C++),L)O=L.viewId,I=L.action,j=L.direction,L=null;else if(P&&P.stateId===l)O=P.viewId,B=P.historyId,I=M,P.historyId===A.historyId?j=k:A&&(j=T,(r=d(P.historyId))&&r.parentHistoryId===A.historyId?j=S:(r=d(A.historyId))&&r.parentHistoryId===g.parentHistoryId&&(j=$));else if(Y&&Y.stateId===l)O=Y.viewId,B=Y.historyId,I="moveForward",Y.historyId===A.historyId?j=x:A&&(j=T,A.historyId===g.parentHistoryId?j=S:(r=d(A.historyId))&&r.parentHistoryId===g.parentHistoryId&&(j=$)),r=h(e),Y.historyId&&r.scope&&(r.scope.$historyId=Y.historyId,B=Y.historyId);else if(A&&A.historyId!==B&&g.cursor>-1&&g.stack.length>0&&g.cursor<g.stack.length&&g.stack[g.cursor].stateId===l){var N=g.stack[g.cursor];O=N.viewId,B=N.historyId,I=M,j=$,(r=d(A.historyId))&&r.parentHistoryId===B?j=T:(r=d(B))&&r.parentHistoryId===A.historyId&&(j=S),(r=u(N.backViewId))&&N.historyId!==r.historyId&&(Object.keys(E.views).forEach((function(e){var t=E.views[e];t.backViewId===N.viewId&&t.historyId!==N.historyId&&(t.backViewId=null)})),g.stack[g.cursor].backViewId=A.viewId)}else{if(s=a.createViewEle(t),this.isAbstractEle(s,t))return{action:"abstractView",direction:D,ele:s};if(O=ionic.Utils.nextUid(),A){if(A.forwardViewId=O,I="newView",Y&&A.stateId!==Y.stateId&&A.historyId===Y.historyId&&(r=d(Y.historyId))){for(o=r.stack.length-1;o>=Y.index;o--){var R=r.stack[o];R&&R.destroy&&R.destroy(),r.stack.splice(o)}B=Y.historyId}g.historyId===A.historyId?j=x:A.historyId!==g.historyId&&(j=S,(r=d(A.historyId))&&r.parentHistoryId===g.parentHistoryId?j=$:(r=d(r.parentHistoryId))&&r.historyId===g.historyId&&(j=T))}else I="initialView";2>C&&(j=D),E.views[O]=this.createView({viewId:O,index:g.stack.length,historyId:g.historyId,backViewId:A&&A.viewId?A.viewId:null,forwardViewId:null,stateId:l,stateName:this.currentStateName(),stateParams:m(),url:H,canSwipeBack:v(s,t)}),g.stack.push(E.views[O])}if(b&&b(),i.cancel(w),y){if(y.disableAnimate&&(j=D),y.disableBack&&(E.views[O].backViewId=null),y.historyRoot){for(o=0;o<g.stack.length;o++)g.stack[o].viewId===O?(g.stack[o].index=0,g.stack[o].backViewId=g.stack[o].forwardViewId=null):delete E.views[g.stack[o].viewId];g.stack=[E.views[O]]}y=null}if(f(O),E.backView&&B==E.backView.historyId&&l==E.backView.stateId&&H==E.backView.url)for(o=0;o<g.stack.length;o++)if(g.stack[o].viewId==O){I="dupNav",j=D,o>0&&(g.stack[o-1].forwardViewId=null),E.forwardView=null,E.currentView.index=E.backView.index,E.currentView.backViewId=E.backView.backViewId,E.backView=c(E.backView),g.stack.splice(o,1);break}return g.cursor=E.currentView.index,{viewId:O,action:I,direction:j,historyId:B,enableBack:this.enabledBack(E.currentView),isHistoryRoot:0===E.currentView.index,ele:s}},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){return(new A).initialize(e)},getViewById:u,viewHistory:function(){return E},currentView:function(e){return arguments.length&&(E.currentView=e),E.currentView},currentHistoryId:function(){return E.currentView?E.currentView.historyId:null},currentTitle:function(e){return E.currentView?(arguments.length&&(E.currentView.title=e),E.currentView.title):void 0},backView:function(e){return arguments.length&&(E.backView=e),E.backView},backTitle:function(e){var t=e&&u(e.backViewId)||E.backView;return t&&t.title},forwardView:function(e){return arguments.length&&(E.forwardView=e),E.forwardView},currentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return!!(t&&t.current&&t.current.views&&t.current.views[e])},goToHistoryRoot:function(e){if(e){var t=d(e);if(t&&t.stack.length){if(E.currentView&&E.currentView.viewId===t.stack[0].viewId)return;L={viewId:t.stack[0].viewId,action:M,direction:k},t.stack[0].go()}}},goBack:function(e){if(s(e)&&-1!==e){if(e>-1)return;var t=E.histories[this.currentHistoryId()],n=t.cursor+e+1;1>n&&(n=1),t.cursor=n,f(t.stack[n].viewId);for(var r=n-1,o=[],a=u(t.stack[r].forwardViewId);a&&(o.push(a.stateId||a.viewId),!(++r>=t.stack.length));)a=u(t.stack[r].forwardViewId);var l=this;o.length&&i((function(){l.clearCache(o)}),300)}E.backView&&E.backView.go()},removeBackView:function(){var e=E.histories[this.currentHistoryId()],t=e.cursor,n=e.stack[t],r=e.stack[t-1],i=e.stack[t-2];r&&i&&(e.stack.splice(t-1,1),this.clearCache([r.viewId]),n.backViewId=i.viewId,n.index=n.index-1,i.forwardViewId=n.viewId,E.backView=i,e.currentCursor+=-1)},enabledBack:function(e){var t=c(e);return!(!t||t.historyId!==e.historyId)},clearHistory:function(){var e=E.histories,t=E.currentView;if(e)for(var n in e)e[n].stack&&(e[n].stack=[],e[n].cursor=-1),t&&t.historyId===n?(t.backViewId=t.forwardViewId=null,e[n].stack.push(t)):e[n].destroy&&e[n].destroy();for(var r in E.views)r!==t.viewId&&delete E.views[r];t&&f(t.viewId)},clearCache:function(e){return i((function(){l._instances.forEach((function(t){t.clearCache(e)}))}))},nextViewOptions:function(t){return b&&b(),arguments.length&&(i.cancel(w),null===t?y=t:(o(y=y||{},t),y.expire&&(b=e.$on("$stateChangeSuccess",(function(){w=i((function(){y=null}),y.expire)}))))),y},isAbstractEle:function(e,t){return!!(t&&t.$$state&&t.$$state.self.abstract)||!(!e||!g(e)&&!g(e.children()))},isActiveScope:function(e){if(!e)return!1;for(var t,n=e,r=this.currentHistoryId();n;){if(n.$$disconnected)return!1;if(!t&&n.hasOwnProperty("$historyId")&&(t=!0),r){if(n.hasOwnProperty("$historyId")&&r==n.$historyId)return!0;if(n.hasOwnProperty("$activeHistoryId")&&r==n.$activeHistoryId){if(n.hasOwnProperty("$historyId"))return!0;if(!t)return!0}}t&&n.hasOwnProperty("$activeHistoryId")&&(t=!1),n=n.$parent}return!r||"root"==r}}}]).run(["$rootScope","$state","$location","$document","$ionicPlatform","$ionicHistory","IONIC_BACK_PRIORITY",function(e,t,n,r,i,o,a){e.$on("$ionicView.beforeEnter",(function(){ionic.keyboard&&ionic.keyboard.hide&&ionic.keyboard.hide()})),e.$on("$ionicHistory.change",(function(e,r){if(!r)return null;var i=o.viewHistory(),a=r.historyId?i.histories[r.historyId]:null;if(a&&a.cursor>-1&&a.cursor<a.stack.length)return a.stack[a.cursor].go(r);!r.url&&r.uiSref&&(r.url=t.href(r.uiSref)),r.url&&(0===r.url.indexOf("#")&&(r.url=r.url.replace("#","")),r.url!==n.url()&&n.url(r.url))})),e.$ionicGoBack=function(e){o.goBack(e)},e.$on("$ionicView.afterEnter",(function(e,t){t&&t.title&&(r[0].title=t.title)})),i.registerBackButtonAction((function(e){var t=o.backView();return t?t.go():ionic.Platform.exitApp(),e.preventDefault(),!1}),a.view)}]),i.provider("$ionicConfig",(function(){function e(e,n){o.platform[e]=n,r.platform[e]={},function e(t,n){for(var r in t)r!=i&&t.hasOwnProperty(r)&&(angular.isObject(t[r])?(s(n[r])||(n[r]={}),e(t[r],n[r])):s(n[r])||(n[r]=null))}(o,o.platform[e]),t(o.platform[e],r.platform[e],"")}function t(e,r,s){a(e,(function(a,l){angular.isObject(e[l])?(r[l]={},t(e[l],r[l],s+"."+l)):r[l]=function(t){if(arguments.length)return e[l]=t,r;if(e[l]==i){var a=n(o.platform,ionic.Platform.platform()+s+"."+l);return a||!1===a?a:n(o.platform,"default"+s+"."+l)}return e[l]}}))}function n(e,t){t=t.split(".");for(var n=0;n<t.length;n++){if(!e||!s(e[t[n]]))return null;e=e[t[n]]}return e}var r=this;r.platform={};var i="platform",o={views:{maxCache:i,forwardCache:i,transition:i,swipeBackEnabled:i,swipeBackHitWidth:i},navBar:{alignTitle:i,positionPrimaryButtons:i,positionSecondaryButtons:i,transition:i},backButton:{icon:i,text:i,previousTitleText:i},form:{checkbox:i,toggle:i},scrolling:{jsScrolling:i},spinner:{icon:i},tabs:{style:i,position:i},templates:{maxPrefetch:i},platform:{}};t(o,r,""),e("default",{views:{maxCache:10,forwardCache:!1,transition:"ios",swipeBackEnabled:!0,swipeBackHitWidth:45},navBar:{alignTitle:"center",positionPrimaryButtons:"left",positionSecondaryButtons:"right",transition:"view"},backButton:{icon:"ion-ios-arrow-back",text:"Back",previousTitleText:!0},form:{checkbox:"circle",toggle:"large"},scrolling:{jsScrolling:!0},spinner:{icon:"ios"},tabs:{style:"standard",position:"bottom"},templates:{maxPrefetch:30}}),e("ios",{}),e("android",{views:{transition:"android",swipeBackEnabled:!1},navBar:{alignTitle:"left",positionPrimaryButtons:"right",positionSecondaryButtons:"right"},backButton:{icon:"ion-android-arrow-back",text:!1,previousTitleText:!1},form:{checkbox:"square",toggle:"small"},spinner:{icon:"android"},tabs:{style:"striped",position:"top"},scrolling:{jsScrolling:!1}}),e("windowsphone",{spinner:{icon:"android"}}),r.transitions={views:{},navBar:{}},r.transitions.views.ios=function(e,t,n,r){function i(e,t,n,r){var i={};i[ionic.CSS.TRANSITION_DURATION]=o.shouldAnimate?"":0,i.opacity=t,r>-1&&(i.boxShadow="0 0 10px rgba(0,0,0,"+(o.shouldAnimate?.45*r:.3)+")"),i[ionic.CSS.TRANSFORM]="translate3d("+n+"%,0,0)",ionic.DomUtil.cachedStyles(e,i)}var o={run:function(r){"forward"==n?(i(e,1,99*(1-r),1-r),i(t,1-.1*r,-33*r,-1)):"back"==n?(i(e,1-.1*(1-r),-33*(1-r),-1),i(t,1,100*r,1-r)):(i(e,1,0,-1),i(t,0,0,-1))},shouldAnimate:r&&("forward"==n||"back"==n)};return o},r.transitions.navBar.ios=function(e,t,n,r){function i(e,t,n,r){var i={};i[ionic.CSS.TRANSITION_DURATION]=s.shouldAnimate?"":"0ms",i.opacity=1===t?"":t,e.setCss("buttons-left",i),e.setCss("buttons-right",i),e.setCss("back-button",i),i[ionic.CSS.TRANSFORM]="translate3d("+r+"px,0,0)",e.setCss("back-text",i),i[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e.setCss("title",i)}function o(e,t,n){if(e&&t){var r=(e.titleTextX()+e.titleWidth())*(1-n),o=t&&(t.titleTextX()-e.backButtonTextLeft())*(1-n)||0;i(e,n,r,o)}}function a(e,t,n){if(e&&t){var r=(-(e.titleTextX()-t.backButtonTextLeft())-e.titleLeftRight())*n;i(e,1-n,r,0)}}var s={run:function(n){var r=e.controller(),i=t&&t.controller();"back"==s.direction?(a(r,i,1-n),o(i,r,1-n)):(o(r,i,n),a(i,r,n))},direction:n,shouldAnimate:r&&("forward"==n||"back"==n)};return s},r.transitions.views.android=function(e,t,n,r){function i(e,t,n){var r={};r[ionic.CSS.TRANSITION_DURATION]=o.shouldAnimate?"":0,r[ionic.CSS.TRANSFORM]="translate3d("+t+"%,0,0)",r.opacity=n,ionic.DomUtil.cachedStyles(e,r)}var o={run:function(r){"forward"==n?(i(e,99*(1-r),1),i(t,-100*r,1)):"back"==n?(i(e,-100*(1-r),1),i(t,100*r,1)):(i(e,0,1),i(t,0,0))},shouldAnimate:r=r&&("forward"==n||"back"==n)};return o},r.transitions.navBar.android=function(e,t,n,r){function i(e,t){if(e){var n={};n.opacity=1===t?"":t,e.setCss("buttons-left",n),e.setCss("buttons-right",n),e.setCss("back-button",n),e.setCss("back-text",n),e.setCss("title",n)}}return{run:function(n){i(e.controller(),n),i(t&&t.controller(),1-n)},shouldAnimate:r&&("forward"==n||"back"==n)}},r.transitions.views.none=function(e,t){return{run:function(n){r.transitions.views.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},r.transitions.navBar.none=function(e,t){return{run:function(n){r.transitions.navBar.ios(e,t,!1,!1).run(n),r.transitions.navBar.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},r.setPlatformConfig=e,r.$get=function(){return r}})).config(["$compileProvider",function(e){e.aHrefSanitizationWhitelist(/^\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0):/),e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0):|data:image\//)}]);var h='<div class="loading-container"><div class="loading"></div></div>';i.constant("$ionicLoadingConfig",{template:"<ion-spinner></ion-spinner>"}).factory("$ionicLoading",["$ionicLoadingConfig","$ionicBody","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform","$rootScope","IONIC_BACK_PRIORITY",function(e,t,n,r,i,a,s,l,u,c,f){function p(){return g||(g=n.compile({template:h,appendTo:t.get()}).then((function(e){return e.show=function(o){var s=o.templateUrl?n.load(o.templateUrl):a.when(o.template||o.content||"");e.scope=o.scope||e.scope,e.isShown||(e.hasBackdrop=!o.noBackdrop&&!1!==o.showBackdrop,e.hasBackdrop&&(r.retain(),r.getElement().addClass("backdrop-loading"))),o.duration&&(i.cancel(e.durationTimeout),e.durationTimeout=i(angular.bind(e,e.hide),+o.duration)),v(),v=u.registerBackButtonAction(d,f.loading),s.then((function(n){if(n){var r=e.element.children();r.html(n),l(r.contents())(e.scope)}e.isShown&&(e.element.addClass("visible"),ionic.requestAnimationFrame((function(){e.isShown&&(e.element.addClass("active"),t.addClass("loading-active"))})))})),e.isShown=!0},e.hide=function(){v(),e.isShown&&(e.hasBackdrop&&(r.release(),r.getElement().removeClass("backdrop-loading")),e.element.removeClass("active"),t.removeClass("loading-active"),e.element.removeClass("visible"),ionic.requestAnimationFrame((function(){!e.isShown&&e.element.removeClass("visible")}))),i.cancel(e.durationTimeout),e.isShown=!1,e.element.children().html("")},e}))),g}function m(){return _(),y(),i.cancel(b),p().then((function(e){return e.hide()}))}var g,v=d,_=d,y=d,b=a.when();return{show:function(t){var n=(t=o({},e||{},t||{})).delay||t.showDelay||0;return _(),y(),t.hideOnStateChange&&(_=c.$on("$stateChangeSuccess",m),y=c.$on("$stateChangeError",m)),i.cancel(b),(b=i(d,n)).then(p).then((function(e){return e.show(t)}))},hide:m,_getLoader:p}}]),i.factory("$ionicModal",["$rootScope","$ionicBody","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$$q","$log","$ionicClickBlock","$window","IONIC_BACK_PRIORITY",function(e,t,n,r,i,a,s,l,u,h,f){var p=ionic.views.Modal.inherit({initialize:function(e){ionic.views.Modal.prototype.initialize.call(this,e),this.animation=e.animation||"slide-in-up"},show:function(e){var n=this;if(n.scope.$$destroyed)return l.error("Cannot call "+n.viewType+".show() after remove(). Please create a new "+n.viewType+" instance."),s.when();u.show(600),v.add(n);var o=c(n.modalEl);n.el.classList.remove("hide"),r((function(){n._isShown&&t.addClass(n.viewType+"-open")}),400,!1),n.el.parentElement||(o.addClass(n.animation),t.append(n.el));var a=o.data("$$ionicScrollController");return a&&a.resize(),e&&n.positionView&&(n.positionView(e,o),n._onWindowResize=function(){n._isShown&&n.positionView(e,o)},ionic.on("resize",n._onWindowResize,window)),o.addClass("ng-enter active").removeClass("ng-leave ng-leave-active"),n._isShown=!0,n._deregisterBackButton=i.registerBackButtonAction(n.hardwareBackButtonClose?angular.bind(n,n.hide):d,f.modal),ionic.views.Modal.prototype.show.call(n),r((function(){n._isShown&&(o.addClass("ng-enter-active"),ionic.trigger("resize"),n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".shown",n),n.el.classList.add("active"),n.scope.$broadcast("$ionicHeader.align"),n.scope.$broadcast("$ionicFooter.align"),n.scope.$broadcast("$ionic.modalPresented"))}),20),r((function(){n._isShown&&(n.$el.on("touchmove",(function(e){ionic.DomUtil.getParentOrSelfWithClass(e.target,"scroll")||e.preventDefault()})),n.$el.on("click",(function(e){n.backdropClickToClose&&e.target===n.el&&v.isHighest(n)&&n.hide()})))}),400)},hide:function(){var e=this,n=c(e.modalEl);return u.show(600),v.remove(e),e.el.classList.remove("active"),n.addClass("ng-leave"),r((function(){e._isShown||(n.addClass("ng-leave-active").removeClass("ng-enter ng-enter-active active"),e.scope.$broadcast("$ionic.modalRemoved"))}),20,!1),e.$el.off("click"),e._isShown=!1,e.scope.$parent&&e.scope.$parent.$broadcast(e.viewType+".hidden",e),e._deregisterBackButton&&e._deregisterBackButton(),ionic.views.Modal.prototype.hide.call(e),e.positionView&&ionic.off("resize",e._onWindowResize,window),r((function(){g.length||t.removeClass(e.viewType+"-open"),e.el.classList.add("hide")}),e.hideDelay||320)},remove:function(){var e,t,n=this;return n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".removed",n),n._isShown?t=n.hide():((e=s.defer()).resolve(),t=e.promise),t.then((function(){n.scope.$destroy(),n.$el.remove()}))},isShown:function(){return!!this._isShown}}),m=function(t,r){var i=r.scope&&r.scope.$new()||e.$new(!0);r.viewType=r.viewType||"modal",o(i,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var a=n("<ion-"+r.viewType+">"+t+"</ion-"+r.viewType+">")(i);r.$el=a,r.el=a[0],r.modalEl=r.el.querySelector("."+r.viewType);var s=new p(r);return s.scope=i,r.scope||(i[r.viewType]=s),s},g=[],v={add:function(e){g.push(e)},remove:function(e){var t=g.indexOf(e);t>-1&&t<g.length&&g.splice(t,1)},isHighest:function(e){var t=g.indexOf(e);return t>-1&&t===g.length-1}};return{fromTemplate:function(e,t){return m(e,t||{})},fromTemplateUrl:function(e,t,n){var r;return angular.isFunction(t)&&(r=t,t=n),a.load(e).then((function(e){var n=m(e,t||{});return r&&r(n),n}))},stack:v}}]),i.service("$ionicNavBarDelegate",ionic.DelegateService(["align","showBackButton","showBar","title","changeTitle","setTitle","getTitle","back","getPreviousTitle"])),i.service("$ionicNavViewDelegate",ionic.DelegateService(["clearCache"])),i.constant("IONIC_BACK_PRIORITY",{view:100,sideMenu:150,modal:200,actionSheet:300,popup:400,loading:500}).provider("$ionicPlatform",(function(){return{$get:["$q","$ionicScrollDelegate",function(e,t){var n={onHardwareBackButton:function(e){ionic.Platform.ready((function(){document.addEventListener("backbutton",e,!1)}))},offHardwareBackButton:function(e){ionic.Platform.ready((function(){document.removeEventListener("backbutton",e)}))},$backButtonActions:{},registerBackButtonAction:function(e,t,r){n._hasBackButtonHandler||(n.$backButtonActions={},n.onHardwareBackButton(n.hardwareBackButtonClick),n._hasBackButtonHandler=!0);var i={id:r||ionic.Utils.nextUid(),priority:t||0,fn:e};return n.$backButtonActions[i.id]=i,function(){delete n.$backButtonActions[i.id]}},hardwareBackButtonClick:function(e){var t,r;for(r in n.$backButtonActions)(!t||n.$backButtonActions[r].priority>=t.priority)&&(t=n.$backButtonActions[r]);return t?(t.fn(e),t):void 0},is:function(e){return ionic.Platform.is(e)},on:function(e,t){return ionic.Platform.ready((function(){document.addEventListener(e,t,!1)})),function(){ionic.Platform.ready((function(){document.removeEventListener(e,t)}))}},ready:function(n){var r=e.defer();return ionic.Platform.ready((function(){window.addEventListener("statusTap",(function(){t.scrollTop(!0)})),r.resolve(),n&&n()})),r.promise}};return n}]}})),i.factory("$ionicPopover",["$ionicModal","$ionicPosition","$document","$window",function(e,t,n,r){var i={viewType:"popover",hideDelay:1,animation:"none",positionView:function(e,n){var i=c(e.target||e),o=t.offset(i),a=n.prop("offsetWidth"),s=n.prop("offsetHeight"),l=r.innerWidth,u=r.innerHeight,d={left:o.left+o.width/2-a/2},h=c(n[0].querySelector(".popover-arrow"));d.left<6?d.left=6:d.left+a+6>l&&(d.left=l-a-6),o.top+o.height+s>u&&o.top-s>0?(d.top=o.top-s,n.addClass("popover-bottom")):(d.top=o.top+o.height,n.removeClass("popover-bottom")),h.css({left:o.left+o.width/2-h.prop("offsetWidth")/2-d.left+"px"}),n.css({top:d.top+"px",left:d.left+"px",marginLeft:"0",opacity:"1"})}};return{fromTemplate:function(t,n){return e.fromTemplate(t,ionic.Utils.extend({},i,n))},fromTemplateUrl:function(t,n){return e.fromTemplateUrl(t,ionic.Utils.extend({},i,n))}}}]);i.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$ionicBody","$compile","$ionicPlatform","$ionicModal","IONIC_BACK_PRIORITY",function(e,t,n,r,i,a,s,l,u,h){function f(){var e=g[g.length-1];e&&e.responseDeferred.resolve()}function p(e){var n=v._createPopup(e),i=0;return g.length>0?(i=m.stackPushDelay,r(g[g.length-1].hide,i,!1)):(a.addClass("popup-open"),t.retain(),v._backButtonActionDone=l.registerBackButtonAction(f,h.popup)),n.responseDeferred.promise.close=function(e){n.removed||n.responseDeferred.resolve(e)},n.responseDeferred.notify({close:n.responseDeferred.close}),g.push(n),r(n.show,i,!1),n.responseDeferred.promise.then((function(e){var i=g.indexOf(n);return-1!==i&&g.splice(i,1),n.remove(),g.length>0?g[g.length-1].show():(t.release(),r((function(){g.length||a.removeClass("popup-open")}),400,!1),(v._backButtonActionDone||d)()),e})),n.responseDeferred.promise}var m={stackPushDelay:75},g=[],v={show:p,alert:function(e){return p(o({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))},confirm:function(e){return p(o({buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){return!1}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))},prompt:function(e){var t=i.$new(!0);t.data={},t.data.fieldtype=e.inputType?e.inputType:"text",t.data.response=e.defaultText?e.defaultText:"",t.data.placeholder=e.inputPlaceholder?e.inputPlaceholder:"",t.data.maxlength=e.maxLength?parseInt(e.maxLength):"";var n="";return e.template&&!1===/<[a-z][\s\S]*>/i.test(e.template)&&(n="<span>"+e.template+"</span>",delete e.template),p(o({template:n+'<input ng-model="data.response" type="{{ data.fieldtype }}"maxlength="{{ data.maxlength }}"placeholder="{{ data.placeholder }}">',scope:t,buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return t.data.response||""}}]},e||{}))},_createPopup:function(t){t=o({scope:null,title:"",buttons:[]},t||{});var l={};return l.scope=(t.scope||i).$new(),l.element=c('<div class="popup-container" ng-class="cssClass"><div class="popup"><div class="popup-head"><h3 class="popup-title" ng-bind-html="title"></h3><h5 class="popup-sub-title" ng-bind-html="subTitle" ng-if="subTitle"></h5></div><div class="popup-body"></div><div class="popup-buttons" ng-show="buttons.length"><button ng-repeat="button in buttons" ng-click="$buttonTapped(button, $event)" class="button" ng-class="button.type || \'button-default\'" ng-bind-html="button.text"></button></div></div></div>'),l.responseDeferred=n.defer(),a.get().appendChild(l.element[0]),s(l.element)(l.scope),o(l.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,cssClass:t.cssClass,$buttonTapped:function(e,t){var n=(e.onTap||d).apply(l,[t]);(t=t.originalEvent||t).defaultPrevented||l.responseDeferred.resolve(n)}}),n.when(t.templateUrl?e.load(t.templateUrl):t.template||t.content||"").then((function(e){var t=c(l.element[0].querySelector(".popup-body"));e?(t.html(e),s(t.contents())(l.scope)):t.remove()})),l.show=function(){l.isShown||l.removed||(u.stack.add(l),l.isShown=!0,ionic.requestAnimationFrame((function(){l.isShown&&(l.element.removeClass("popup-hidden"),l.element.addClass("popup-showing active"),function(e){var t=e[0].querySelector("[autofocus]");t&&t.focus()}(l.element))})))},l.hide=function(e){return e=e||d,l.isShown?(u.stack.remove(l),l.isShown=!1,l.element.removeClass("active"),l.element.addClass("popup-hidden"),void r(e,250,!1)):e()},l.remove=function(){l.removed||(l.hide((function(){l.element.remove(),l.scope.$destroy()})),l.removed=!0)},l},_popupStack:g};return v}]),i.factory("$ionicPosition",["$document","$window",function(e,t){function n(e){return"static"===(function(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}(e,"position")||"static")}var r=function(t){for(var r=e[0],i=t.offsetParent||r;i&&i!==r&&n(i);)i=i.offsetParent;return i||r};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&((i=this.offset(c(o))).top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var r=n[0].getBoundingClientRect();return{width:r.width||n.prop("offsetWidth"),height:r.height||n.prop("offsetHeight"),top:r.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:r.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}}]),i.service("$ionicScrollDelegate",ionic.DelegateService(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","zoomTo","zoomBy","getScrollPosition","anchorScroll","freezeScroll","freezeAllScrolls","getScrollView"])),i.service("$ionicSideMenuDelegate",ionic.DelegateService(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent","edgeDragThreshold"])),i.service("$ionicSlideBoxDelegate",ionic.DelegateService(["update","slide","select","enableSlide","previous","next","stop","autoPlay","start","currentIndex","selected","slidesCount","count","loop"])),i.service("$ionicTabsDelegate",ionic.DelegateService(["select","selectedIndex","showBar"])),function(){var e=[];i.factory("$ionicTemplateCache",["$http","$templateCache","$timeout",function(t,n,r){function i(e){return void 0===e?o():(u(e)&&(e=[e]),a(e,(function(e){l.push(e)})),void(s&&o()))}function o(){var e;if(i._runCount++,s=!0,0!==l.length){for(var a=0;4>a&&(e=l.pop());)u(e)&&t.get(e,{cache:n}),a++;l.length&&r(o,1e3)}}var s,l=e;return i._runCount=0,i}]).config(["$stateProvider","$ionicConfigProvider",function(t,n){var r=t.state;t.state=function(i,o){if("object"==typeof o){var a=!1!==o.prefetchTemplate&&e.length<n.templates.maxPrefetch();if(a&&u(o.templateUrl)&&e.push(o.templateUrl),angular.isObject(o.views))for(var s in o.views)(a=!1!==o.views[s].prefetchTemplate&&e.length<n.templates.maxPrefetch())&&u(o.views[s].templateUrl)&&e.push(o.views[s].templateUrl)}return r.call(t,i,o)}}]).run(["$ionicTemplateCache",function(e){e()}])}(),i.factory("$ionicTemplateLoader",["$compile","$controller","$http","$q","$rootScope","$templateCache",function(e,t,n,r,i,a){return{load:function(e){return n.get(e,{cache:a}).then((function(e){return e.data&&e.data.trim()}))},compile:function(n){return((n=o({template:"",templateUrl:"",scope:null,controller:null,locals:{},appendTo:null},n||{})).templateUrl?this.load(n.templateUrl):r.when(n.template)).then((function(r){var a,s=n.scope||i.$new(),l=c("<div>").html(r).contents();return n.controller&&(a=t(n.controller,o(n.locals,{$scope:s})),l.children().data("$ngControllerController",a)),n.appendTo&&c(n.appendTo).append(l),e(l)(s),{element:l,scope:s}}))}}}]),i.factory("$ionicViewService",["$ionicHistory","$log",function(e,t){function n(e,n){t.warn("$ionicViewService"+e+" is deprecated, please use $ionicHistory"+n+" instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/")}n("","");var r={getCurrentView:"currentView",getBackView:"backView",getForwardView:"forwardView",getCurrentStateName:"currentStateName",nextViewOptions:"nextViewOptions",clearHistory:"clearHistory"};return a(r,(function(t,i){r[i]=function(){return n("."+i,"."+t),e[t].apply(this,arguments)}})),r}]),i.factory("$ionicViewSwitcher",["$timeout","$document","$q","$ionicClickBlock","$ionicConfig","$ionicNavBarDelegate",function(e,t,n,r,i,l){function u(e,t){return d(e).abstract?d(e).name:t?t.stateId||t.viewId:ionic.Utils.nextUid()}function d(e){return e&&e.$$state&&e.$$state.self||{}}function h(e,t,n,r){var a=d(e),s=_||P(t,"view-transition")||a.viewTransition||i.views.transition()||"ios",l=i.navBar.transition();return n=y||P(t,"view-direction")||a.viewDirection||n||"none",o(f(r),{transition:s,navBarTransition:"view"===l?s:l,direction:n,shouldAnimate:"none"!==s&&"none"!==n})}function f(e){return{viewId:(e=e||{}).viewId,historyId:e.historyId,stateId:e.stateId,stateName:e.stateName,stateParams:e.stateParams}}function p(e,t){return arguments.length>1?void P(e,T,t):P(e,T)}function m(e){if(e&&e.length){var t=e.scope();t&&(t.$emit("$ionicView.unloaded",e.data(S)),t.$destroy()),e.remove()}}function g(e,t){var n=e.lastIndexOf("."),r=t.lastIndexOf(".");return!(0>n||0>r)&&e.substring(0,n)===t.substring(0,r)}function v(e,t){if(!e)return null;var n=angular.element(e).attr("abstract"),r=angular.element(e).attr("state");if("true"!==n)return r===t.stateName?angular.element(e).scope():null;for(var i=function(e){for(var t=[],n=angular.element(e).find("ion-nav-view"),r=0;r<n.length;r++){for(var i=angular.element(n[r]).children(),o=[],a=0;a<i.length;a++)o=o.concat(i[a]);t=t.concat(o)}return t}(e),o=0;o<i.length;o++)if(angular.element(i[o]).attr("state")===t.stateName)return t.abstractView=!0,angular.element(i[o]).scope();return null}var _,y,b="webkitTransitionEnd transitionend",w="$noCache",L="$destroyEle",M="$eleId",k="$accessed",x="$fallbackTimer",S="$viewData",T="nav-view",$="active",D="cached",C="stage",E=0;ionic.transition=ionic.transition||{},ionic.transition.isActive=!1;var A,P=ionic.DomUtil.cachedAttr,Y=[],O=1100,I={create:function(t,a,c,T,A,j){var B,H,N,R=++E,z={init:function(e,t){I.isTransitioning(!0),z.loadViewElements(e),z.render(e,(function(){t&&t()}))},loadViewElements:function(e){var n,r,i,o=t.getViewElements(),l=u(a,c),d=t.activeEleId();for(n=0,r=o.length;r>n&&((i=o.eq(n)).data(M)===l?i.data(w)?(i.data(M,l+ionic.Utils.nextUid()),i.data(L,!0)):B=i:s(d)&&i.data(M)===d&&(H=i),!B||!H);n++);(N=!!B)||(B=e.ele||I.createViewEle(a)).data(M,l),j&&t.activeEleId(l),e.ele=null},render:function(e,n){if(N)ionic.Utils.reconnectScope(B.scope());else{p(B,C);var r=h(a,B,e.direction,c);(i.transitions.views[r.transition]||i.transitions.views.none)(B,null,r.direction,!0).run(0),B.data(S,{viewId:r.viewId,historyId:r.historyId,stateName:r.stateName,stateParams:r.stateParams}),(!1===d(a).cache||"false"===d(a).cache||"false"==B.attr("cache-view")||0===i.views.maxCache())&&B.data(w,!0);var o=t.appendViewElement(B,a);delete r.direction,delete r.transition,o.$emit("$ionicView.loaded",r)}B.data(k,Date.now()),n&&n()},transition:function(s,u,d){function m(){p(B,F.shouldAnimate?"entering":$),p(H,F.shouldAnimate?"leaving":D),F.run(1),l._instances.forEach((function(e){e.triggerTransitionStart(R)})),F.shouldAnimate||v()}function g(e){e.target===this&&v()}function v(){v.x||(v.x=!0,B.off(b,g),e.cancel(B.data(x)),H&&e.cancel(H.data(x)),M&&M.resolve(t),R===E&&(n.all(Y).then(I.transitionEnd),z.emit("after",k,S),z.cleanup(k)),l._instances.forEach((function(e){e.triggerTransitionEnd()})),_=y=c=T=B=H=null)}function w(e){e.target===this&&L()}function L(){p(B,D),p(H,$),B.off(b,w),e.cancel(B.data(x)),I.transitionEnd([t])}var M,k=h(a,B,s,c),S=o(o({},k),f(T));k.transitionId=S.transitionId=R,k.fromCache=!!N,k.enableBack=!!u,k.renderStart=A,k.renderEnd=j,P(B.parent(),"nav-view-transition",k.transition),P(B.parent(),"nav-view-direction",k.direction),e.cancel(B.data(x));var F=(i.transitions.views[k.transition]||i.transitions.views.none)(B,H,k.direction,k.shouldAnimate&&d&&j);if(F.shouldAnimate&&(B.on(b,g),B.data(x,e(v,O)),r.show(O)),A&&(z.emit("before",k,S),p(B,C),F.run(0)),j&&(M=n.defer(),Y.push(M.promise)),A&&j)e((function(){ionic.requestAnimationFrame(m)}));else{if(!j)return p(B,"entering"),p(H,"leaving"),{run:F.run,cancel:function(t){t?(B.on(b,w),B.data(x,e(L,O)),r.show(O)):L(),F.shouldAnimate=t,F.run(0),F=null}};j&&m()}},emit:function(e,t,n){var r=v(B,t),i=v(H,n);!t.viewId||t.abstractView?i&&(i.$emit("$ionicView.beforeLeave",n),i.$emit("$ionicView.leave",n),i.$emit("$ionicView.afterLeave",n),i.$broadcast("$ionicParentView.beforeLeave",n),i.$broadcast("$ionicParentView.leave",n),i.$broadcast("$ionicParentView.afterLeave",n)):("after"==e&&(r&&(r.$emit("$ionicView.enter",t),r.$broadcast("$ionicParentView.enter",t)),i?(i.$emit("$ionicView.leave",n),i.$broadcast("$ionicParentView.leave",n)):r&&n&&n.viewId&&t.stateName!==n.stateName&&g(t.stateName,n.stateName)&&r.$emit("$ionicNavView.leave",n)),r&&(r.$emit("$ionicView."+e+"Enter",t),r.$broadcast("$ionicParentView."+e+"Enter",t)),i?(i.$emit("$ionicView."+e+"Leave",n),i.$broadcast("$ionicParentView."+e+"Leave",n)):r&&n&&n.viewId&&t.stateName!==n.stateName&&g(t.stateName,n.stateName)&&r.$emit("$ionicNavView."+e+"Leave",n))},cleanup:function(e){H&&"back"==e.direction&&!i.views.forwardCache()&&m(H);var n,r,o,a=t.getViewElements(),s=a.length,l=s-1>i.views.maxCache(),u=Date.now();for(n=0;s>n;n++)r=a.eq(n),l&&r.data(k)<u?(u=r.data(k),o=a.eq(n)):r.data(L)&&p(r)!=$&&m(r);m(o),B.data(w)&&B.data(L,!0)},enteringEle:function(){return B},leavingEle:function(){return H}};return z},transitionEnd:function(e){a(e,(function(e){e.transitionEnd()})),I.isTransitioning(!1),r.hide(),Y=[]},nextTransition:function(e){_=e},nextDirection:function(e){y=e},isTransitioning:function(t){return arguments.length&&(ionic.transition.isActive=!!t,e.cancel(A),t&&(A=e((function(){I.isTransitioning(!1)}),999))),ionic.transition.isActive},createViewEle:function(e){var n=t[0].createElement("div");return e&&e.$template&&(n.innerHTML=e.$template,1===n.children.length)?(n.children[0].classList.add("pane"),e.$$state&&e.$$state.self&&e.$$state.self.abstract?angular.element(n.children[0]).attr("abstract","true"):e.$$state&&e.$$state.self&&angular.element(n.children[0]).attr("state",e.$$state.self.name),c(n.children[0])):(n.className="pane",c(n))},viewEleIsActive:function(e,t){p(e,t?$:D)},getTransitionData:h,navViewAttr:p,destroyViewEle:m};return I}]),angular.module("ngIOS9UIWebViewPatch",["ng"]).config(["$provide",function(e){"use strict";e.decorator("$browser",["$delegate","$window",function(e,t){return function(e){return/(iPhone|iPad|iPod).* OS 9_\d/.test(e)&&!/Version\/9\./.test(e)}(t.navigator.userAgent)?function(e){function t(){n=null}var n=null,r=e.url;return e.url=function(){return arguments.length?(n=arguments[0],r.apply(e,arguments)):n||r.apply(e,arguments)},window.addEventListener("popstate",t,!1),window.addEventListener("hashchange",t,!1),e}(e):e}])}]),i.config(["$provide",function(e){e.decorator("$compile",["$delegate",function(e){return e.$$addScopeInfo=function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)},e}])}]),i.config(["$provide",function(e){e.decorator("$location",["$delegate","$timeout",function(e,t){return e.__hash=e.hash,e.hash=function(n){return s(n)&&n.length>0&&t((function(){var e=document.querySelector(".scroll-content");e&&(e.scrollTop=0)}),0,!1),e.__hash(n)},e}])}]),i.controller("$ionicHeaderBar",["$scope","$element","$attrs","$q","$ionicConfig","$ionicHistory",function(e,t,n,r,i,o){function a(e){return M[e]||(M[e]=t[0].querySelector("."+e)),M[e]}var s="title",l="back-text",u="back-button",c="default-title",d="previous-title",h="hide",f=this,p="",m="",g=0,v=0,_="",y=!1,b=!0,w=!0,L=!1;f.beforeEnter=function(t){e.$broadcast("$ionicView.beforeEnter",t)},f.title=function(e){return arguments.length&&e!==p&&(a(s).innerHTML=e,p=e),p},f.enableBack=function(e,t){return arguments.length&&(y=e,t||f.updateBackButton()),y},f.showBack=function(e,t){return arguments.length&&(b=e,t||f.updateBackButton()),b},f.showNavBack=function(e){w=e,f.updateBackButton()},f.updateBackButton=function(){var e;(b&&w&&y)!==L&&(L=b&&w&&y,(e=a(u))&&e.classList[L?"remove":"add"](h)),y&&(e=e||a(u))&&(f.backButtonIcon!==i.backButton.icon()&&(e=a(u+" .icon"))&&(f.backButtonIcon=i.backButton.icon(),e.className="icon "+f.backButtonIcon),f.backButtonText!==i.backButton.text()&&(e=a(u+" .back-text"))&&(e.textContent=f.backButtonText=i.backButton.text()))},f.titleTextWidth=function(){var e=a(s);if(e)for(var t=angular.element(e).children(),n=0;n<t.length;n++)if(angular.element(t[n]).hasClass("nav-bar-title")){e=t[n];break}var r=ionic.DomUtil.getTextBounds(e);return Math.min(r&&r.width||30)},f.titleWidth=function(){var e=f.titleTextWidth(),t=a(s).offsetWidth;return e>t&&(e=t+(g-v-5)),e},f.titleTextX=function(){return t[0].offsetWidth/2-f.titleWidth()/2},f.titleLeftRight=function(){return g-v},f.backButtonTextLeft=function(){for(var e=0,t=a(l);t;)e+=t.offsetLeft,t=t.parentElement;return e},f.resetBackButton=function(e){if(i.backButton.previousTitleText()){var t=a(d);if(t){t.classList.remove(h);var n=e&&o.getViewById(e.viewId),r=o.backTitle(n);r!==m&&(m=t.innerHTML=r)}var s=a(c);s&&s.classList.remove(h)}},f.align=function(e){var r=a(s);e=e||n.alignTitle||i.navBar.alignTitle();var o=f.calcWidths(e,!1);if(b&&m&&i.backButton.previousTitleText()){var l=f.calcWidths(e,!0),u=t[0].offsetWidth-l.titleLeft-l.titleRight;f.titleTextWidth()<=u&&(o=l)}return f.updatePositions(r,o.titleLeft,o.titleRight,o.buttonsLeft,o.buttonsRight,o.css,o.showPrevTitle)},f.calcWidths=function(e,n){var r,i,o,f,p,m,g,v,_,y=a(s),w=a(u),L=t[0].childNodes,M=0,k=0,x=0,S=0,T="",$=0;for(r=0;r<L.length;r++){if(g=0,1==(p=L[r]).nodeType){if(p===y){_=!0;continue}if(p.classList.contains(h))continue;if(b&&p===w){for(i=0;i<p.childNodes.length;i++)if(1==(f=p.childNodes[i]).nodeType)if(f.classList.contains(l))for(o=0;o<f.children.length;o++)if(m=f.children[o],n){if(m.classList.contains(c))continue;$+=m.offsetWidth}else{if(m.classList.contains(d))continue;$+=m.offsetWidth}else $+=f.offsetWidth;else 3==f.nodeType&&f.nodeValue.trim()&&($+=(v=ionic.DomUtil.getTextBounds(f))&&v.width||0);g=$||p.offsetWidth}else g=p.offsetWidth}else 3==p.nodeType&&p.nodeValue.trim()&&(g=(v=ionic.DomUtil.getTextBounds(p))&&v.width||0);_?k+=g:M+=g}if("left"==e)T="title-left",M&&(x=M+15),k&&(S=k+15);else if("right"==e)T="title-right",M&&(x=M+15),k&&(S=k+15);else{var D=Math.max(M,k)+10;D>10&&(x=S=D)}return{backButtonWidth:$,buttonsLeft:M,buttonsRight:k,titleLeft:x,titleRight:S,showPrevTitle:n,css:T}},f.updatePositions=function(e,n,o,s,l,u,p){var m=r.defer();if(e&&(n!==g&&(e.style.left=n?n+"px":"",g=n),o!==v&&(e.style.right=o?o+"px":"",v=o),u!==_&&(u&&e.classList.add(u),_&&e.classList.remove(_),_=u)),i.backButton.previousTitleText()){var y=a(d),b=a(c);y&&y.classList[p?"remove":"add"](h),b&&b.classList[p?"add":"remove"](h)}return ionic.requestAnimationFrame((function(){if(e&&e.offsetWidth+10<e.scrollWidth){var n=l+5,r=t[0].offsetWidth-g-f.titleTextWidth()-20;(o=n>r?n:r)!==v&&(e.style.right=o+"px",v=o)}m.resolve()})),m.promise},f.setCss=function(e,t){ionic.DomUtil.cachedStyles(a(e),t)};var M={};e.$on("$destroy",(function(){for(var e in M)M[e]=null}))}]),i.controller("$ionInfiniteScroll",["$scope","$attrs","$element","$timeout",function(e,t,n,r){function i(){ionic.requestAnimationFrame((function(){n[0].classList.add("active")})),l.isLoading=!0,e.$parent&&e.$parent.$apply(t.onInfinite||"")}function o(){ionic.requestAnimationFrame((function(){n[0].classList.remove("active")})),r((function(){l.jsScrolling&&l.scrollView.resize(),(l.jsScrolling&&l.scrollView.__container&&l.scrollView.__container.offsetHeight>0||!l.jsScrolling)&&l.checkBounds()}),30,!1),l.isLoading=!1}function a(e){var n=(t.distance||"2.5%").trim();return-1!==n.indexOf("%")?e*(1-parseFloat(n)/100):e-parseFloat(n)}var l=this;l.isLoading=!1,e.icon=function(){return s(t.icon)?t.icon:"ion-load-d"},e.spinner=function(){return s(t.spinner)?t.spinner:""},e.$on("scroll.infiniteScrollComplete",(function(){o()})),e.$on("$destroy",(function(){l.scrollCtrl&&l.scrollCtrl.$element&&l.scrollCtrl.$element.off("scroll",l.checkBounds),l.scrollEl&&l.scrollEl.removeEventListener&&l.scrollEl.removeEventListener("scroll",l.checkBounds)})),l.checkBounds=ionic.Utils.throttle((function(){if(!l.isLoading){var e={};if(l.jsScrolling){e=l.getJSMaxScroll();var t=l.scrollView.getValues();(-1!==e.left&&t.left>=e.left||-1!==e.top&&t.top>=e.top)&&i()}else(-1!==(e=l.getNativeMaxScroll()).left&&l.scrollEl.scrollLeft>=e.left-l.scrollEl.clientWidth||-1!==e.top&&l.scrollEl.scrollTop>=e.top-l.scrollEl.clientHeight)&&i()}}),300),l.getJSMaxScroll=function(){var e=l.scrollView.getScrollMax();return{left:l.scrollView.options.scrollingX?a(e.left):-1,top:l.scrollView.options.scrollingY?a(e.top):-1}},l.getNativeMaxScroll=function(){var e={left:l.scrollEl.scrollWidth,top:l.scrollEl.scrollHeight},t=window.getComputedStyle(l.scrollEl)||{};return{left:!e.left||"scroll"!==t.overflowX&&"auto"!==t.overflowX&&"scroll"!==l.scrollEl.style["overflow-x"]?-1:a(e.left),top:!e.top||"scroll"!==t.overflowY&&"auto"!==t.overflowY&&"scroll"!==l.scrollEl.style["overflow-y"]?-1:a(e.top)}},l.__finishInfiniteScroll=o}]),i.service("$ionicListDelegate",ionic.DelegateService(["showReorder","showDelete","canSwipeItems","closeOptionButtons"])).controller("$ionicList",["$scope","$attrs","$ionicListDelegate","$ionicHistory",function(e,t,n,r){var i=this,o=!0,a=!1,s=!1,l=n._registerInstance(i,t.delegateHandle,(function(){return r.isActiveScope(e)}));e.$on("$destroy",l),i.showReorder=function(e){return arguments.length&&(a=!!e),a},i.showDelete=function(e){return arguments.length&&(s=!!e),s},i.canSwipeItems=function(e){return arguments.length&&(o=!!e),o},i.closeOptionButtons=function(){i.listView&&i.listView.clearDragEffects()}}]),i.controller("$ionicNavBar",["$scope","$element","$attrs","$compile","$timeout","$ionicNavBarDelegate","$ionicConfig","$ionicHistory",function(e,t,n,r,i,o,l,u){function d(e,t){var n=console.warn||alert;n&&n.call(console,"navBarController."+e+" is deprecated, please use "+t+" instead")}function h(e){return T[e]?c(T[e]):void 0}function f(){for(var e=0;e<S.length;e++)if(S[e].isActive)return S[e]}function p(e,t){e&&ionic.DomUtil.cachedAttr(e.containerEle(),"nav-bar",t)}function m(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}var g,v,_,y="hide",b="$ionNavBarController",w="primaryButtons",L="secondaryButtons",M="backButton",k="primaryButtons secondaryButtons leftButtons rightButtons title".split(" "),x=this,S=[],T={},$=!0;t.parent().data(b,x);var D=n.delegateHandle||"navBar"+ionic.Utils.nextUid(),C=o._registerInstance(x,D);x.init=function(){t.addClass("nav-bar-container"),ionic.DomUtil.cachedAttr(t,"nav-bar-transition",l.views.transition()),x.createHeaderBar(!1),x.createHeaderBar(!0),e.$emit("ionNavBar.init",D)},x.createHeaderBar=function(i){function o(e,t){e&&("title"===t?g.append(e):"rightButtons"==t||t==L&&"left"!=l.navBar.positionSecondaryButtons()||t==w&&"right"==l.navBar.positionPrimaryButtons()?(m||(m=c('<div class="buttons buttons-right">'),f.append(m)),t==L?m.append(e):m.prepend(e)):(p||(p=c('<div class="buttons buttons-left">'),v[M]?v[M].after(p):f.prepend(p)),t==L?p.append(e):p.prepend(e)))}var u=c('<div class="nav-bar-block">');ionic.DomUtil.cachedAttr(u,"nav-bar",i?"active":"cached");var d=n.alignTitle||l.navBar.alignTitle(),f=c("<ion-header-bar>").addClass(n.class).attr("align-title",d);s(n.noTapScroll)&&f.attr("no-tap-scroll",n.noTapScroll);var p,m,g=c('<div class="title title-'+d+'">'),v={},_={};v[M]=h(M),v[M]&&f.append(v[M]),f.append(g),a(k,(function(e){v[e]=h(e),o(v[e],e)}));for(var b=0;b<f[0].children.length;b++)f[0].children[b].classList.add("header-item");u.append(f),t.append(r(u)(e.$new()));var x=f.data("$ionHeaderBarController");x.backButtonIcon=l.backButton.icon(),x.backButtonText=l.backButton.text();var T={isActive:i,title:function(e){x.title(e)},setItem:function(e,t){T.removeItem(t),e?("title"===t&&T.title(""),o(e,t),v[t]&&v[t].addClass(y),_[t]=e):v[t]&&v[t].removeClass(y)},removeItem:function(e){_[e]&&(_[e].scope().$destroy(),_[e].remove(),_[e]=null)},containerEle:function(){return u},headerBarEle:function(){return f},afterLeave:function(){a(k,(function(e){T.removeItem(e)})),x.resetBackButton()},controller:function(){return x},destroy:function(){for(var e in a(k,(function(e){T.removeItem(e)})),u.scope().$destroy(),v)v[e]&&(v[e].removeData(),v[e]=null);p&&p.removeData(),m&&m.removeData(),g.removeData(),f.removeData(),u.remove(),u=f=g=p=m=null}};return S.push(T),T},x.navElement=function(e,t){return s(t)&&(T[e]=t),T[e]},x.update=function(e){var t=!e.hasHeaderBar&&e.showNavBar;e.transition=l.views.transition(),t||(e.direction="none"),x.enable(t);var n=x.isInitialized?function(){for(var e=0;e<S.length;e++)if(!S[e].isActive)return S[e]}():f(),r=x.isInitialized?f():null,i=n.controller();i.enableBack(e.enableBack,!0),i.showBack(e.showBack,!0),i.updateBackButton(),x.title(e.title,n),x.showBar(t),e.navBarItems&&a(k,(function(t){n.setItem(e.navBarItems[t],t)})),x.transition(n,r,e),x.isInitialized=!0,m("")},x.transition=function(e,n,r){function o(){for(var t=0;t<S.length;t++)S[t].isActive=!1;e.isActive=!0,p(e,"active"),p(n,"cached"),x.activeTransition=c=v=null}var a=e.controller(),s=l.transitions.navBar[r.navBarTransition]||l.transitions.navBar.none,u=r.transitionId;a.beforeEnter(r);var c=s(e,n,r.direction,r.shouldAnimate&&x.isInitialized);ionic.DomUtil.cachedAttr(t,"nav-bar-transition",r.navBarTransition),ionic.DomUtil.cachedAttr(t,"nav-bar-direction",r.direction),c.shouldAnimate&&r.renderEnd?p(e,"stage"):(p(e,"entering"),p(n,"leaving")),a.resetBackButton(r),c.run(0),x.activeTransition={run:function(e){c.shouldAnimate=!1,c.direction="back",c.run(e)},cancel:function(t,r,i){m(r),p(n,"active"),p(e,"cached"),c.shouldAnimate=t,c.run(0),x.activeTransition=c=null,i.showBar!==x.showBar()&&x.showBar(i.showBar),i.showBackButton!==x.showBackButton()&&x.showBackButton(i.showBackButton)},complete:function(e,t){m(t),c.shouldAnimate=e,c.run(1),v=o}},i(a.align,16),(g=function(){_===u&&(p(e,"entering"),p(n,"leaving"),c.run(1),v=function(){_!=u&&c.shouldAnimate||o()},g=null)})()},x.triggerTransitionStart=function(e){_=e,g&&g()},x.triggerTransitionEnd=function(){v&&v()},x.showBar=function(t){return arguments.length&&(x.visibleBar(t),e.$parent.$hasHeader=!!t),!!e.$parent.$hasHeader},x.visibleBar=function(e){e&&!$?(t.removeClass(y),x.align()):!e&&$&&t.addClass(y),$=e},x.enable=function(e){x.visibleBar(e);for(var t=0;t<o._instances.length;t++)o._instances[t]!==x&&o._instances[t].visibleBar(!1)},x.showBackButton=function(t){if(arguments.length){for(var n=0;n<S.length;n++)S[n].controller().showNavBack(!!t);e.$isBackButtonShown=!!t}return e.$isBackButtonShown},x.showActiveBackButton=function(e){var t=f();return t?arguments.length?t.controller().showBack(e):t.controller().showBack():void 0},x.title=function(t,n){return s(t)&&(t=t||"",(n=n||f())&&n.title(t),e.$title=t,u.currentTitle(t)),e.$title},x.align=function(e,t){(t=t||f())&&t.controller().align(e)},x.hasTabsTop=function(e){t[e?"addClass":"removeClass"]("nav-bar-tabs-top")},x.hasBarSubheader=function(e){t[e?"addClass":"removeClass"]("nav-bar-has-subheader")},x.changeTitle=function(e){d("changeTitle(val)","title(val)"),x.title(e)},x.setTitle=function(e){d("setTitle(val)","title(val)"),x.title(e)},x.getTitle=function(){return d("getTitle()","title()"),x.title()},x.back=function(){d("back()","$ionicHistory.goBack()"),u.goBack()},x.getPreviousTitle=function(){d("getPreviousTitle()","$ionicHistory.backTitle()"),u.goBack()},e.$on("$destroy",(function(){e.$parent.$hasHeader=!1,t.parent().removeData(b);for(var n=0;n<S.length;n++)S[n].destroy();t.remove(),t=S=null,C()}))}]),i.controller("$ionicNavView",["$scope","$element","$attrs","$compile","$controller","$ionicNavBarDelegate","$ionicNavViewDelegate","$ionicHistory","$ionicViewSwitcher","$ionicConfig","$ionicScrollDelegate","$ionicSideMenuDelegate",function(e,t,n,r,i,a,s,l,u,c,d,h){function f(e,n){for(var r,i,o=t.children(),a=0,s=o.length;s>a;a++)if(r=o.eq(a),D(r)==x){(i=r.scope())&&i.$emit(e.name.replace("Tabs","View"),n),i&&i.$broadcast(e.name.replace("Tabs","ParentView"),n);break}}function p(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}function m(e,t){var n=v();n&&n.hasTabsTop(t)}function g(e,t){var n=v();n&&n.hasBarSubheader(t)}function v(){if(y)for(var e=0;e<a._instances.length;e++)if(a._instances[e].$$delegateHandle==y)return a._instances[e];return t.inheritedData("$ionNavBarController")}var _,y,b,w,L,M="$eleId",k="$destroyEle",x="active",S="cached",T=this,$=!1,D=u.navViewAttr;T.scope=e,T.element=t,T.init=function(){var r=n.name||"",i=t.parent().inheritedData("$uiView"),o=i&&i.state?i.state.name:"";r.indexOf("@")<0&&(r=r+"@"+o);var a={name:r,state:null};t.data("$uiView",a);var l=s._registerInstance(T,n.delegateHandle);return e.$on("$destroy",(function(){l(),T.isSwipeFreeze&&d.freezeAllScrolls(!1)})),e.$on("$ionicHistory.deselect",T.cacheCleanup),e.$on("$ionicTabs.top",m),e.$on("$ionicSubheader",g),e.$on("$ionicTabs.beforeLeave",f),e.$on("$ionicTabs.afterLeave",f),e.$on("$ionicTabs.leave",f),ionic.Platform.ready((function(){ionic.Platform.isWebView()&&ionic.Platform.isIOS()&&T.initSwipeBack()})),a},T.register=function(t){var n=o({},l.currentView()),r=l.register(e,t);T.update(r);var i=l.getViewById(r.viewId)||{},a=w!==r.viewId;T.render(r,t,i,n,a,!0)},T.update=function(e){$=!0,_=e.direction;var n=t.parent().inheritedData("$ionNavViewController");n&&(n.isPrimary(!1),("enter"===_||"exit"===_)&&(n.direction(_),"enter"===_&&(_="none")))},T.render=function(e,t,n,r,i,o){var a=u.create(T,t,n,r,i,o);a.init(e,(function(){a.transition(T.direction(),e.enableBack,!L),w=L=null}))},T.beforeEnter=function(e){if($){y=e.navBarDelegate;var t=v();t&&t.update(e),p("")}},T.activeEleId=function(e){return arguments.length&&(b=e),b},T.transitionEnd=function(){var e,n,r,i=t.children();for(e=0,n=i.length;n>e;e++)(r=i.eq(e)).data(M)===b?D(r,x):("leaving"===D(r)||D(r)===x||D(r)===S)&&(r.data(k)||r.data("$noCache")?u.destroyViewEle(r):(D(r,S),ionic.Utils.disconnectScope(r.scope())));p(""),T.isSwipeFreeze&&d.freezeAllScrolls(!1)},T.cacheCleanup=function(){for(var e=t.children(),n=0,r=e.length;r>n;n++)e.eq(n).data(k)&&u.destroyViewEle(e.eq(n))},T.clearCache=function(e){var n,r,i,o,a,s,l=t.children();for(i=0,o=l.length;o>i;i++)if(n=l.eq(i),e)for(s=n.data(M),a=0;a<e.length;a++)s===e[a]&&u.destroyViewEle(n);else D(n)==S?u.destroyViewEle(n):D(n)==x&&(r=n.scope())&&r.$broadcast("$ionicView.clearCache")},T.getViewElements=function(){return t.children()},T.appendViewElement=function(n,o){var a=r(n);t.append(n);var s=e.$new();if(o&&o.$$controller){o.$scope=s;var l=i(o.$$controller,o);o.$$controllerAs&&(s[o.$$controllerAs]=l),t.children().data("$ngControllerController",l)}return a(s),s},T.title=function(e){var t=v();t&&t.title(e)},T.enableBackButton=function(e){var t=v();t&&t.enableBackButton(e)},T.showBackButton=function(e){var t=v();return!t||(arguments.length?t.showActiveBackButton(e):t.showActiveBackButton())},T.showBar=function(e){var t=v();return!t||(arguments.length?t.showBar(e):t.showBar())},T.isPrimary=function(e){return arguments.length&&($=e),$},T.direction=function(e){return arguments.length&&(_=e),_},T.initSwipeBack=function(){function n(e){if($&&c.views.swipeBackEnabled()&&!h.isOpenRight()&&!((M=o(e))>x)){m=l.backView();var n=l.currentView();if(m&&m.historyId===n.historyId&&!1!==n.canSwipeBack){b||(b=window.innerWidth),T.isSwipeFreeze=d.freezeAllScrolls(!0);var a={direction:"back"};k=[],S={showBar:T.showBar(),showBackButton:T.showBackButton()};var p=u.create(T,a,m,n,!0,!1);p.loadViewElements(a),p.render(a),s=p.transition("back",l.enabledBack(m),!0),f=v(),_=ionic.onGesture("drag",r,t[0]),y=ionic.onGesture("release",i,t[0])}}}function r(e){if($&&s){var t=o(e);if(k.push({t:Date.now(),x:t}),t>=b-15)i(e);else{var n=Math.min(Math.max(a(t),0),1);s.run(n),f&&f.activeTransition&&f.activeTransition.run(n)}}}function i(e){if($&&s&&k&&k.length>1){for(var t=Date.now(),n=o(e),l=k[k.length-1],u=k.length-2;u>=0&&!(t-l.t>200);u--)l=k[u];var c=n>=k[k.length-2].x,h=a(n),g=Math.abs(l.x-n)/(t-l.t);if(w=m.viewId,L=.03>h||h>.97,c&&(h>.5||g>.1)){var v=g>.5||.05>g||n>b-45?"fast":"slow";p(L?"":v),m.go(),f&&f.activeTransition&&f.activeTransition.complete(!L,v)}else p(L?"":"fast"),w=null,s.cancel(!L),f&&f.activeTransition&&f.activeTransition.cancel(!L,"fast",S),L=null}ionic.offGesture(_,"drag",r),ionic.offGesture(y,"release",i),b=s=k=null,T.isSwipeFreeze=d.freezeAllScrolls(!1)}function o(e){return ionic.tap.pointerCoord(e.gesture.srcEvent).x}function a(e){return(e-M)/b}var s,f,m,g,_,y,b,M,k,x=c.views.swipeBackHitWidth(),S={};g=ionic.onGesture("dragstart",n,t[0]),e.$on("$destroy",(function(){ionic.offGesture(g,"dragstart",n),ionic.offGesture(_,"drag",r),ionic.offGesture(y,"release",i),T.element=s=f=null}))}}]),i.controller("$ionicRefresher",["$scope","$attrs","$element","$ionicBind","$timeout",function(e,t,n,r,i){function o(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],Y=Math.floor(e.touches[0].screenY)}function a(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],Y=e.touches[0].screenY}function l(){Y=null,(I||T)&&(T?(T=!1,D=0,C>E?(v(),f(E,P)):(f(0,P,g),$=!1)):(D=0,$=!1,h(!1)))}function u(e){if(e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],(Y||"mousemove"!=e.type)&&I&&!(e.touches.length>1)){if(null===Y&&(Y=e.touches[0].screenY),O=e.touches[0].screenY-Y,ionic.Platform.isAndroid()&&4.4===ionic.Platform.version()&&!ionic.Platform.isCrosswalk()&&0===w.scrollTop&&O>0&&(T=!0,e.preventDefault()),0>=O-D||0!==w.scrollTop)return $&&($=!1,h(!1)),T&&function(e,t){e.scrollTop=t;var n=document.createEvent("UIEvents");n.initUIEvent("scroll",!0,!0,window,1),e.dispatchEvent(n)}(w,O- -1*D),void(0!==C&&d(0));O>0&&0===w.scrollTop&&!$&&(D=O),e.preventDefault(),$||($=!0,h(!0)),T=!0,d((O-D)/3),!A&&C>E?(A=!0,ionic.requestAnimationFrame(m)):A&&E>C&&(A=!1,ionic.requestAnimationFrame(g))}}function c(e){I=0===e.target.scrollTop||T}function d(e){L.style[ionic.CSS.TRANSFORM]="translate3d(0px, "+e+"px, 0px)",C=e}function h(e){e?ionic.requestAnimationFrame((function(){L.classList.add("overscroll"),_()})):ionic.requestAnimationFrame((function(){L.classList.remove("overscroll"),y(),g()}))}function f(e,t,n){var r=Date.now(),i=C;return i===e?void n():void ionic.requestAnimationFrame((function o(){var a=Date.now(),s=Math.min(1,(a-r)/t),l=function(e){return--e*e*e+1}(s);d(Math.floor(l*(e-i)+i)),1>s?ionic.requestAnimationFrame(o):(5>e&&e>-5&&($=!1,h(!1)),n&&n())}))}function p(){L&&(ionic.off(M,a,L),ionic.off(k,u,L),ionic.off(x,l,L),ionic.off("mousedown",o,L),ionic.off("mousemove",u,L),ionic.off("mouseup",l,L)),w&&ionic.off("scroll",c,w),w=null,L=null}function m(){n[0].classList.add("active"),e.$onPulling()}function g(){i((function(){n.removeClass("active refreshing refreshing-tail"),A&&(A=!1)}),150)}function v(){n[0].classList.add("refreshing");var t=e.$onRefresh();t&&t.then&&t.finally((function(){e.$broadcast("scroll.refreshComplete")}))}function _(){n[0].classList.remove("invisible")}function y(){n[0].classList.add("invisible")}function b(){n[0].classList.add("refreshing-tail")}var w,L,M,k,x,S=this,T=!1,$=!1,D=0,C=0,E=60,A=!1,P=500,Y=null,O=null,I=!0;s(t.pullingIcon)||t.$set("pullingIcon","ion-android-arrow-down"),e.showSpinner=!s(t.refreshingIcon)&&"none"!=t.spinner,e.showIcon=s(t.refreshingIcon),r(e,t,{pullingIcon:"@",pullingText:"@",refreshingIcon:"@",refreshingText:"@",spinner:"@",disablePullingRotation:"@",$onRefresh:"&onRefresh",$onPulling:"&onPulling"}),e.$on("scroll.refreshComplete",(function(){i((function(){ionic.requestAnimationFrame(b),f(0,P,g),i((function(){$&&($=!1,h(!1))}),P)}),P)})),window.navigator.pointerEnabled?(M="pointerdown",k="pointermove",x="pointerup"):window.navigator.msPointerEnabled?(M="MSPointerDown",k="MSPointerMove",x="MSPointerUp"):(M="touchstart",k="touchmove",x="touchend"),S.init=function(){if(w=n.parent().parent()[0],L=n.parent()[0],!(w&&w.classList.contains("ionic-scroll")&&L&&L.classList.contains("scroll")))throw new Error("Refresher must be immediate child of ion-content or ion-scroll");ionic.on(M,a,L),ionic.on(k,u,L),ionic.on(x,l,L),ionic.on("mousedown",o,L),ionic.on("mousemove",u,L),ionic.on("mouseup",l,L),ionic.on("scroll",c,w),e.$on("$destroy",p)},S.getRefresherDomMethods=function(){return{activate:m,deactivate:g,start:v,show:_,hide:y,tail:b}},S.__handleTouchmove=u,S.__getScrollChild=function(){return L},S.__getScrollParent=function(){return w}}]),i.controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$location","$document","$ionicScrollDelegate","$ionicHistory",function(e,t,n,r,i,o,a,l){var u=this;u.__timeout=n,u._scrollViewOptions=t,u.isNative=function(){return!!t.nativeScrolling};var d,h=u.element=t.el,f=u.$element=c(h);d=u.isNative()?u.scrollView=new ionic.views.ScrollNative(t):u.scrollView=new ionic.views.Scroll(t),(f.parent().length?f.parent():f).data("$$ionicScrollController",u);var p=a._registerInstance(u,t.delegateHandle,(function(){return l.isActiveScope(e)}));s(t.bouncing)||ionic.Platform.ready((function(){d&&d.options&&(d.options.bouncing=!0,ionic.Platform.isAndroid()&&(d.options.bouncing=!1,d.options.deceleration=.95))}));var m=angular.bind(d,d.resize);angular.element(r).on("resize",m);var g=function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})};f.on("scroll",g),e.$on("$destroy",(function(){p(),d&&d.__cleanup&&d.__cleanup(),angular.element(r).off("resize",m),f&&f.off("scroll",g),u._scrollViewOptions&&(u._scrollViewOptions.el=null),t&&(t.el=null),d=u.scrollView=t=u._scrollViewOptions=h=u.$element=f=null})),n((function(){d&&d.run&&d.run()})),u.getScrollView=function(){return d},u.getScrollPosition=function(){return d.getValues()},u.resize=function(){return n(m,0,!1).then((function(){f&&f.triggerHandler("scroll-resize")}))},u.scrollTop=function(e){u.resize().then((function(){d&&d.scrollTo(0,0,!!e)}))},u.scrollBottom=function(e){u.resize().then((function(){if(d){var t=d.getScrollMax();d.scrollTo(t.left,t.top,!!e)}}))},u.scrollTo=function(e,t,n){u.resize().then((function(){d&&d.scrollTo(e,t,!!n)}))},u.zoomTo=function(e,t,n,r){u.resize().then((function(){d&&d.zoomTo(e,!!t,n,r)}))},u.zoomBy=function(e,t,n,r){u.resize().then((function(){d&&d.zoomBy(e,!!t,n,r)}))},u.scrollBy=function(e,t,n){u.resize().then((function(){d&&d.scrollBy(e,t,!!n)}))},u.anchorScroll=function(e){u.resize().then((function(){if(d){var t=i.hash(),n=t&&o[0].getElementById(t);if(!t||!n)return void d.scrollTo(0,0,!!e);var r=n,a=0,s=0;do{null!==r&&(a+=r.offsetLeft),null!==r&&(s+=r.offsetTop),r=r.offsetParent}while(r.attributes!=u.element.attributes&&r.offsetParent);d.scrollTo(a,s,!!e)}}))},u.freezeScroll=d.freeze,u.freezeScrollShut=d.freezeShut,u.freezeAllScrolls=function(e){for(var t=0;t<a._instances.length;t++)a._instances[t].freezeScroll(e)},u._setRefresher=function(e,t,n){u.refresher=t;var r=u.refresher.clientHeight||60;d.activatePullToRefresh(r,n)}}]),i.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform","$ionicBody","$ionicHistory","$ionicScrollDelegate","IONIC_BACK_PRIORITY","$rootScope",function(e,t,n,r,i,o,a,s,u){var c,h,f,p,m,g,v,_=this,y=!0;_.$scope=e,_.initialize=function(e){_.left=e.left,_.right=e.right,_.setContent(e.content),_.dragThresholdX=e.dragThresholdX||10,o.registerHistory(_.$scope)},_.setContent=function(e){e&&(_.content=e,_.content.onDrag=function(e){_._handleDrag(e)},_.content.endDrag=function(e){_._endDrag(e)})},_.isOpenLeft=function(){return _.getOpenAmount()>0},_.isOpenRight=function(){return _.getOpenAmount()<0},_.toggleLeft=function(e){if(!v&&_.left.isEnabled){var t=_.getOpenAmount();0===arguments.length&&(e=0>=t),_.content.enableAnimation(),e?(_.openPercentage(100),u.$emit("$ionicSideMenuOpen","left")):(_.openPercentage(0),u.$emit("$ionicSideMenuClose","left"))}},_.toggleRight=function(e){if(!v&&_.right.isEnabled){var t=_.getOpenAmount();0===arguments.length&&(e=t>=0),_.content.enableAnimation(),e?(_.openPercentage(-100),u.$emit("$ionicSideMenuOpen","right")):(_.openPercentage(0),u.$emit("$ionicSideMenuClose","right"))}},_.toggle=function(e){"right"==e?_.toggleRight():_.toggleLeft()},_.close=function(){_.openPercentage(0),u.$emit("$ionicSideMenuClose","left"),u.$emit("$ionicSideMenuClose","right")},_.getOpenAmount=function(){return _.content&&_.content.getTranslateX()||0},_.getOpenRatio=function(){var e=_.getOpenAmount();return e>=0?e/_.left.width:e/_.right.width},_.isOpen=function(){return 0!==_.getOpenAmount()},_.getOpenPercentage=function(){return 100*_.getOpenRatio()},_.openPercentage=function(e){var t=e/100;_.left&&e>=0?_.openAmount(_.left.width*t):_.right&&0>e&&_.openAmount(_.right.width*t),i.enableClass(0!==e,"menu-open"),_.content.setCanScroll(0==e)},_.openAmount=function(e){var t=_.left&&_.left.width||0,n=_.right&&_.right.width||0;return(!_.left||!_.left.isEnabled)&&e>0||(!_.right||!_.right.isEnabled)&&0>e?void _.content.setTranslateX(0):h&&e>t?void _.content.setTranslateX(t):c&&-n>e?void _.content.setTranslateX(-n):(_.content.setTranslateX(e),h=e>0,c=0>e,void(e>0?(_.right&&_.right.pushDown&&_.right.pushDown(),_.left&&_.left.bringUp&&_.left.bringUp()):(_.right&&_.right.bringUp&&_.right.bringUp(),_.left&&_.left.pushDown&&_.left.pushDown())))},_.snapToRest=function(e){_.content.enableAnimation(),f=!1;var t=_.getOpenRatio();if(0!==t){var n=.3,r=e.gesture.velocityX,i=e.gesture.direction;t>0&&.5>t&&"right"==i&&n>r?_.openPercentage(0):t>.5&&"left"==i&&n>r?_.openPercentage(100):0>t&&t>-.5&&"left"==i&&n>r?_.openPercentage(0):.5>t&&"right"==i&&n>r?_.openPercentage(-100):"right"==i&&t>=0&&(t>=.5||r>n)?_.openPercentage(100):"left"==i&&0>=t&&(-.5>=t||r>n)?_.openPercentage(-100):_.openPercentage(0)}else _.openPercentage(0)},_.enableMenuWithBackViews=function(e){return arguments.length&&(y=!!e),y},_.isAsideExposed=function(){return!!v},_.exposeAside=function(e){(_.left&&_.left.isEnabled||_.right&&_.right.isEnabled)&&(_.close(),v=e,_.left&&_.left.isEnabled&&_.right&&_.right.isEnabled?_.content.setMarginLeftAndRight(v?_.left.width:0,v?_.right.width:0):_.left&&_.left.isEnabled?_.content.setMarginLeft(v?_.left.width:0):_.right&&_.right.isEnabled&&_.content.setMarginRight(v?_.right.width:0),_.$scope.$emit("$ionicExposeAside",v))},_.activeAsideResizing=function(e){i.enableClass(e,"aside-resizing")},_._endDrag=function(e){v||(f&&_.snapToRest(e),p=null,m=null,g=null)},_._handleDrag=function(t){!v&&e.dragContent&&(p?m=t.gesture.touches[0].pageX:(p=t.gesture.touches[0].pageX,m=p),!f&&Math.abs(m-p)>_.dragThresholdX&&(p=m,f=!0,_.content.disableAnimation(),g=_.getOpenAmount()),f&&_.openAmount(g+(m-p)))},_.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},_.edgeThreshold=25,_.edgeThresholdEnabled=!1,_.edgeDragThreshold=function(e){return arguments.length&&(l(e)&&e>0?(_.edgeThreshold=e,_.edgeThresholdEnabled=!0):_.edgeThresholdEnabled=!!e),_.edgeThresholdEnabled},_.isDraggableTarget=function(t){var n=_.edgeThresholdEnabled&&!_.isOpen(),r=t.gesture.startEvent&&t.gesture.startEvent.center&&t.gesture.startEvent.center.pageX,i=!n||r<=_.edgeThreshold||r>=_.content.element.offsetWidth-_.edgeThreshold,a=o.backView(),s=!!y||!a;if(!s){var l=o.currentView()||{};return i&&a.historyId!==l.historyId}return(e.dragContent||_.isOpen())&&i&&!t.gesture.srcEvent.defaultPrevented&&s&&!t.target.tagName.match(/input|textarea|select|object|embed/i)&&!t.target.isContentEditable&&!(t.target.dataset?t.target.dataset.preventScroll:"true"==t.target.getAttribute("data-prevent-scroll"))},e.sideMenuContentTranslateX=0;var b=d,w=angular.bind(_,_.close);e.$watch((function(){return 0!==_.getOpenAmount()}),(function(e){b(),e&&(b=r.registerBackButtonAction(w,s.sideMenu))}));var L=n._registerInstance(_,t.delegateHandle,(function(){return o.isActiveScope(e)}));e.$on("$destroy",(function(){L(),b(),_.$scope=null,_.content&&(_.content.setCanScroll(!0),_.content.element=null,_.content=null)})),_.initialize({left:{width:275},right:{width:275}})}]),function(e){function t(e,r,i,o){var a,s,l,u=document.createElement(d[e]||e);for(a in r)if(angular.isArray(r[a]))for(s=0;s<r[a].length;s++)if(r[a][s].fn)for(l=0;l<r[a][s].t;l++)t(a,r[a][s].fn(l,o),u,o);else t(a,r[a][s],u,o);else n(u,a,r[a]);i.appendChild(u)}function n(e,t,n){e.setAttribute(d[t]||t,n)}function r(e,t){var n=e.split(";"),r=n.slice(t),i=n.slice(0,n.length-r.length);return(n=r.concat(i).reverse()).join(";")+";"+n[0]}var o="translate(32,32)",a="stroke-opacity",s="round",l="indefinite",u="750ms",c="none",d={a:"animate",an:"attributeName",at:"animateTransform",c:"circle",da:"stroke-dasharray",os:"stroke-dashoffset",f:"fill",lc:"stroke-linecap",rc:"repeatCount",sw:"stroke-width",t:"transform",v:"values"},h={v:"0,32,32;360,32,32",an:"transform",type:"rotate",rc:l,dur:u},f={sw:4,lc:s,line:[{fn:function(e,t){return{y1:"ios"==t?17:12,y2:"ios"==t?29:20,t:o+" rotate("+(30*e+(6>e?180:-180))+")",a:[{fn:function(){return{an:a,dur:u,v:r("0;.1;.15;.25;.35;.45;.55;.65;.7;.85;1",e),rc:l}},t:1}]}},t:12}]},p={android:{c:[{sw:6,da:128,os:82,r:26,cx:32,cy:32,f:c}]},ios:f,"ios-small":f,bubbles:{sw:0,c:[{fn:function(e){return{cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:o,a:[{fn:function(){return{an:"r",dur:u,v:r("1;2;3;4;5;6;7;8",e),rc:l}},t:1}]}},t:8}]},circles:{c:[{fn:function(e){return{r:5,cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:o,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:r(".3;.3;.3;.4;.7;.85;.9;1",e),rc:l}},t:1}]}},t:8}]},crescent:{c:[{sw:4,da:128,os:82,r:26,cx:32,cy:32,f:c,at:[h]}]},dots:{c:[{fn:function(e){return{cx:16+16*e,cy:32,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:r(".5;.6;.8;1;.8;.6;.5",e),rc:l}},t:1},{fn:function(){return{an:"r",dur:u,v:r("4;5;6;5;4;3;3",e),rc:l}},t:1}]}},t:3}]},lines:{sw:7,lc:s,line:[{fn:function(e){return{x1:10+14*e,x2:10+14*e,a:[{fn:function(){return{an:"y1",dur:u,v:r("16;18;28;18;16",e),rc:l}},t:1},{fn:function(){return{an:"y2",dur:u,v:r("48;44;36;46;48",e),rc:l}},t:1},{fn:function(){return{an:a,dur:u,v:r("1;.8;.5;.4;1",e),rc:l}},t:1}]}},t:4}]},ripple:{f:c,"fill-rule":"evenodd",sw:3,circle:[{fn:function(e){return{cx:32,cy:32,a:[{fn:function(){return{an:"r",begin:-1*e+"s",dur:"2s",v:"0;24",keyTimes:"0;1",keySplines:"0.1,0.2,0.3,1",calcMode:"spline",rc:l}},t:1},{fn:function(){return{an:a,begin:-1*e+"s",dur:"2s",v:".2;1;.2;0",rc:l}},t:1}]}},t:2}]},spiral:{defs:[{linearGradient:[{id:"sGD",gradientUnits:"userSpaceOnUse",x1:55,y1:46,x2:2,y2:46,stop:[{offset:.1,class:"stop1"},{offset:1,class:"stop2"}]}]}],g:[{sw:4,lc:s,f:c,path:[{stroke:"url(#sGD)",d:"M4,32 c0,15,12,28,28,28c8,0,16-4,21-9"},{d:"M60,32 C60,16,47.464,4,32,4S4,16,4,32"}],at:[h]}]}},m={android:function(t){function r(){if(!i.stop){var t=function(e,t){return 1>(e/=325)?.5*e*e*e:.5*((e-=2)*e*e+2)}(Date.now()-o),c=1,d=0,h=188-58*t,f=182-182*t;a%2&&(c=-1,d=-64,h=128- -58*t,f=182*t);var p=[0,-101,-90,-11,-180,79,-270,-191][a];n(u,"da",Math.max(Math.min(h,188),128)),n(u,"os",Math.max(Math.min(f,182),0)),n(u,"t","scale("+c+",1) translate("+d+",0) rotate("+p+",32,32)"),(s+=4.1)>359&&(s=0),n(l,"t","rotate("+s+",32,32)"),t>=1&&(++a>7&&(a=0),o=Date.now()),e.requestAnimationFrame(r)}}var i={};this.stop=!1;var o,a=0,s=0,l=t.querySelector("g"),u=t.querySelector("circle");return function(){return o=Date.now(),r(),i}}};i.controller("$ionicSpinner",["$element","$attrs","$ionicConfig",function(e,n,r){var i,o;this.init=function(){i=n.icon||r.spinner.icon();var o=document.createElement("div");return t("svg",{viewBox:"0 0 64 64",g:[p[i]]},o,i),e.html(o.innerHTML),this.start(),i},this.start=function(){m[i]&&(o=m[i](e[0])())},this.stop=function(){m[i]&&(o.stop=!0)}}])}(ionic),i.controller("$ionicTab",["$scope","$ionicHistory","$attrs","$location","$state",function(e,t,n,r,i){this.$scope=e,this.hrefMatchesState=function(){return n.href&&0===r.path().indexOf(n.href.replace(/^#/,"").replace(/\/$/,""))},this.srefMatchesState=function(){return n.uiSref&&i.includes(n.uiSref.split("(")[0])},this.navNameMatchesState=function(){return this.navViewName&&t.isCurrentStateNavView(this.navViewName)},this.tabMatchesState=function(){return this.hrefMatchesState()||this.srefMatchesState()||this.navNameMatchesState()}}]),i.controller("$ionicTabs",["$scope","$element","$ionicHistory",function(e,t,n){var r,i=this,o=null,s=null,u=!0;i.tabs=[],i.selectedIndex=function(){return i.tabs.indexOf(o)},i.selectedTab=function(){return o},i.previousSelectedTab=function(){return s},i.add=function(e){
-n.registerHistory(e),i.tabs.push(e)},i.remove=function(e){var t=i.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(i.deselect(e),1===i.tabs.length);else{var n=t===i.tabs.length-1?t-1:t+1;i.select(i.tabs[n])}i.tabs.splice(t,1)}},i.deselect=function(e){e.$tabSelected&&(s=o,o=r=null,e.$tabSelected=!1,(e.onDeselect||d)(),e.$broadcast&&e.$broadcast("$ionicHistory.deselect"))},i.select=function(t,s){var u;if(l(t)){if((u=t)>=i.tabs.length)return;t=i.tabs[u]}else u=i.tabs.indexOf(t);1===arguments.length&&(s=!(!t.navViewName&&!t.uiSref)),o&&o.$historyId==t.$historyId?s&&n.goToHistoryRoot(t.$historyId):r!==u&&(a(i.tabs,(function(e){i.deselect(e)})),o=t,r=u,i.$scope&&i.$scope.$parent&&(i.$scope.$parent.$activeHistoryId=t.$historyId),t.$tabSelected=!0,(t.onSelect||d)(),s&&e.$emit("$ionicHistory.change",{type:"tab",tabIndex:u,historyId:t.$historyId,navViewName:t.navViewName,hasNavView:!!t.navViewName,title:t.title,url:t.href,uiSref:t.uiSref}),e.$broadcast("tabSelected",{selectedTab:t,selectedTabIndex:u}))},i.hasActiveScope=function(){for(var e=0;e<i.tabs.length;e++)if(n.isActiveScope(i.tabs[e]))return!0;return!1},i.showBar=function(e){return arguments.length&&(e?t.removeClass("tabs-item-hide"):t.addClass("tabs-item-hide"),u=!!e),u}}]),i.controller("$ionicView",["$scope","$element","$attrs","$compile","$rootScope",function(e,t,n,r,i){function a(){var t=s(n.viewTitle)?"viewTitle":s(n.title)&&"title";t&&(l(n[t]),v.push(n.$observe(t,l))),s(n.hideBackButton)&&v.push(e.$watch(n.hideBackButton,(function(e){h.showBackButton(!e)}))),s(n.hideNavBar)&&v.push(e.$watch(n.hideNavBar,(function(e){h.showBar(!e)})))}function l(e){s(e)&&e!==p&&(p=e,h.title(p))}function u(){for(var e=0;e<v.length;e++)v[e]();v=[]}function c(t){return t?r(t)(e.$new()):void 0}function d(t){return!!e.$eval(n[t])}var h,f,p,m=this,g={},v=[],_=e.$on("ionNavBar.init",(function(e,t){e.stopPropagation(),f=t}));m.init=function(){_();var n=t.inheritedData("$ionModalController");(h=t.inheritedData("$ionNavViewController"))&&!n&&(e.$on("$ionicView.beforeEnter",m.beforeEnter),e.$on("$ionicView.afterEnter",a),e.$on("$ionicView.beforeLeave",u))},m.beforeEnter=function(t,r){if(r&&!r.viewNotified){r.viewNotified=!0,i.$$phase||e.$digest(),p=s(n.viewTitle)?n.viewTitle:n.title;var a={};for(var l in g)a[l]=c(g[l]);h.beforeEnter(o(r,{title:p,showBack:!d("hideBackButton"),navBarItems:a,navBarDelegate:f||null,showNavBar:!d("hideNavBar"),hasHeaderBar:!1})),u()}},m.navElement=function(e,t){g[e]=t}}]),i.directive("ionActionSheet",["$document",function(e){return{restrict:"E",scope:!0,replace:!0,link:function(t,n){var r=function(e){27==e.which&&(t.cancel(),t.$apply())};t.$on("$destroy",(function(){n.remove(),e.unbind("keyup",r)})),e.bind("keyup",r),n.bind("click",(function(e){e.target==n[0]&&(t.cancel(),t.$apply())}))},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper"><div class="action-sheet" ng-class="{\'action-sheet-has-icons\': $actionSheetHasIcon}"><div class="action-sheet-group action-sheet-options"><div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div><button class="button action-sheet-option" ng-click="buttonClicked($index)" ng-class="b.className" ng-repeat="b in buttons" ng-bind-html="b.text"></button><button class="button destructive action-sheet-destructive" ng-if="destructiveText" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button></div><div class="action-sheet-group action-sheet-cancel" ng-if="cancelText"><button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button></div></div></div></div>'}}]),i.directive("ionCheckbox",["$ionicConfig",function(e){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-checkbox"><div class="checkbox checkbox-input-hidden disable-pointer-events"><input type="checkbox"><i class="checkbox-icon"></i></div><div class="item-content disable-pointer-events" ng-transclude></div></label>',compile:function(t,n){var r=t.find("input");a({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},(function(e,t){s(e)&&r.attr(t,e)})),t[0].querySelector(".checkbox").classList.add("checkbox-"+e.form.checkbox())}}}]),i.directive("collectionRepeat",e).factory("$ionicCollectionManager",t);var f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",p=/height:.*?px;\s*width:.*?px/,m=3;e.$inject=["$ionicCollectionManager","$parse","$window","$$rAF","$rootScope","$timeout"],t.$inject=["$rootScope","$window","$$rAF"],i.directive("ionContent",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,r){return{restrict:"E",require:"^?ionNavView",scope:!0,priority:800,compile:function(e,i){var o,a;e.addClass("scroll-content ionic-scroll"),"false"!=i.scroll?((o=c('<div class="scroll"></div>')).append(e.contents()),e.append(o)):e.addClass("scroll-content-false");var l="false"!==i.overflowScroll&&("true"===i.overflowScroll||!r.scrolling.jsScrolling());return l&&(l=!e[0].querySelector("[collection-repeat]")),{pre:function(e,r,u){var c=e.$parent;if(e.$watch((function(){return(c.$hasHeader?" has-header":"")+(c.$hasSubheader?" has-subheader":"")+(c.$hasFooter?" has-footer":"")+(c.$hasSubfooter?" has-subfooter":"")+(c.$hasTabs?" has-tabs":"")+(c.$hasTabsTop?" has-tabs-top":"")}),(function(e,t){r.removeClass(t),r.addClass(e)})),e.$hasHeader=e.$hasSubheader=e.$hasFooter=e.$hasSubfooter=e.$hasTabs=e.$hasTabsTop=!1,n(e,u,{$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",hasBouncing:"@",padding:"@",direction:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),e.direction=e.direction||"y",s(u.padding)&&e.$watch(u.padding,(function(e){(o||r).toggleClass("padding",!!e)})),"false"===u.scroll);else{var h={};l?(r.addClass("overflow-scroll"),h={el:r[0],delegateHandle:i.delegateHandle,startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,nativeScrolling:!0}):h={el:r[0],delegateHandle:i.delegateHandle,locking:"true"===(i.locking||"true"),bouncing:e.$eval(e.hasBouncing),startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,scrollbarX:!1!==e.$eval(e.scrollbarX),scrollbarY:!1!==e.$eval(e.scrollbarY),scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,scrollEventInterval:parseInt(e.scrollEventInterval,10)||10,scrollingComplete:function(){e.$onScrollComplete({scrollTop:a.scrollView.__scrollTop,scrollLeft:a.scrollView.__scrollLeft})}},a=t("$ionicScroll",{$scope:e,scrollViewOptions:h}),e.scrollCtrl=a,e.$on("$destroy",(function(){h&&(h.scrollingComplete=d,delete h.el),o=null,r=null,i.$$element=null}))}}}}}}]),i.directive("exposeAsideWhen",["$window",function(e){return{restrict:"A",require:"^ionSideMenus",link:function(t,n,r,i){function o(){var t="large"==r.exposeAsideWhen?"(min-width:768px)":r.exposeAsideWhen;i.exposeAside(e.matchMedia(t).matches),i.activeAsideResizing(!1)}var a=e.innerWidth,s=e.innerHeight;ionic.on("resize",(function(){(a!==e.innerWidth||s!==e.innerHeight)&&(a=e.innerWidth,s=e.innerHeight,i.activeAsideResizing(!0),l())}),e);var l=ionic.debounce((function(){t.$apply(o)}),300,!1);t.$evalAsync(o)}}}]),"onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft".split(" ").forEach((function(e){i.directive(e,function(e){return["$ionicGesture","$parse",function(t,n){var r=e.substr(2).toLowerCase();return function(i,o,a){var s=n(a[e]),l=function(e){i.$apply((function(){s(i,{$event:e})}))},u=t.on(r,l,o);i.$on("$destroy",(function(){t.off(u,r,l)}))}}]}(e))})),i.directive("ionHeaderBar",n(!0)).directive("ionFooterBar",n(!1)),i.directive("ionInfiniteScroll",["$timeout",function(e){return{restrict:"E",require:["?^$ionicScroll","ionInfiniteScroll"],template:function(e,t){return t.icon?'<i class="icon {{icon()}} icon-refreshing {{scrollingType}}"></i>':'<ion-spinner icon="{{spinner()}}"></ion-spinner>'},scope:!0,controller:"$ionInfiniteScroll",link:function(t,n,r,i){var o=i[1],a=o.scrollCtrl=i[0];if(o.jsScrolling=!a.isNative())o.scrollView=a.scrollView,t.scrollingType="js-scrolling",a.$element.on("scroll",o.checkBounds);else{var l=ionic.DomUtil.getParentOrSelfWithClass(n[0].parentNode,"overflow-scroll");if(o.scrollEl=l,!l)throw"Infinite scroll must be used inside a scrollable div";o.scrollEl.addEventListener("scroll",o.checkBounds)}(!s(r.immediateCheck)||t.$eval(r.immediateCheck))&&e((function(){o.checkBounds()}))}}}]);var g=-1;i.directive("ionInput",[function(){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t,this.setInputAriaLabeledBy=function(e){var n=t[0].querySelectorAll("input,textarea");n.length&&n[0].setAttribute("aria-labelledby",e)},this.focus=function(){var e=t[0].querySelectorAll("input,textarea");e.length&&e[0].focus()}}]}}]),i.directive("ionLabel",[function(){return{restrict:"E",require:"?^ionInput",compile:function(){return function(e,t,n,r){var i=t[0];t.addClass("input-label"),t.attr("aria-label",t.text());var o=i.id||"_label-"+ ++g;i.id||t.attr("id",o),r&&(r.setInputAriaLabeledBy(o),t.on("click",(function(){r.focus()})))}}}}]),i.directive("inputLabel",[function(){return{restrict:"C",require:"?^ionInput",compile:function(){return function(e,t,n,r){var i=t[0];t.attr("aria-label",t.text());var o=i.id||"_label-"+ ++g;i.id||t.attr("id",o),r&&r.setInputAriaLabeledBy(o)}}}}]),i.directive("ionItem",["$$rAF",function(e){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],scope:!0,compile:function(t,n){var r=s(n.href)||s(n.ngHref)||s(n.uiSref);if(r||/ion-(delete|option|reorder)-button/i.test(t.html())){var i=c(r?"<a></a>":"<div></div>");i.addClass("item-content"),(s(n.href)||s(n.ngHref))&&(i.attr("ng-href","{{$href()}}"),s(n.target)&&i.attr("target","{{$target()}}")),i.append(t.contents()),t.addClass("item item-complex").append(i)}else t.addClass("item");return function(t,n,r){t.$href=function(){return r.href||r.ngHref},t.$target=function(){return r.target};var i=n[0].querySelector(".item-content");i&&t.$on("$collectionRepeatLeave",(function(){i&&i.$$ionicOptionsOpen&&(i.style[ionic.CSS.TRANSFORM]="",i.style[ionic.CSS.TRANSITION]="none",e((function(){i.style[ionic.CSS.TRANSITION]=""})),i.$$ionicOptionsOpen=!1)}))}}}}]),i.directive("ionDeleteButton",(function(){function e(e){e.stopPropagation()}return{restrict:"E",require:["^^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n.class||"")+" button icon button-icon",!0),function(t,n,r,i){function o(){(s=s||n.controller("ionList"))&&s.showDelete()&&l.addClass("visible active")}var a=i[0],s=i[1],l=c('<div class="item-left-edit item-delete enable-pointer-events"></div>');l.append(n),a.$element.append(l).addClass("item-left-editable"),n.on("click",e),o(),t.$on("$ionic.reconnectScope",o)}}}})),i.directive("itemFloatingLabel",(function(){return{restrict:"C",link:function(e,t){var n=t[0],r=n.querySelector("input, textarea"),i=n.querySelector(".input-label");if(r&&i){var o=function(){r.value?i.classList.add("has-input"):i.classList.remove("has-input")};r.addEventListener("input",o);var a=c(r).controller("ngModel");a&&(a.$render=function(){r.value=a.$viewValue||"",o()}),e.$on("$destroy",(function(){r.removeEventListener("input",o)}))}}}})),i.directive("ionOptionButton",[function(){function e(e){e.stopPropagation()}return{restrict:"E",require:"^ionItem",priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n.class||"")+" button",!0),function(t,n,r,i){i.optionsContainer||(i.optionsContainer=c('<div class="item-options invisible"></div>'),i.$element.prepend(i.optionsContainer)),i.optionsContainer.prepend(n),i.$element.addClass("item-right-editable"),n.on("click",e)}}}}]),i.directive("ionReorderButton",["$parse",function(e){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n.class||"")+" button icon button-icon",!0),t[0].setAttribute("data-prevent-scroll",!0),function(t,n,r,i){var o=i[0],a=i[1],s=e(r.onReorder);t.$onReorder=function(e,n){s(t,{$fromIndex:e,$toIndex:n})},r.ngClick||r.onClick||r.onclick||(n[0].onclick=function(e){return e.stopPropagation(),!1});var l=c('<div data-prevent-scroll="true" class="item-right-edit item-reorder enable-pointer-events"></div>');l.append(n),o.$element.append(l).addClass("item-right-editable"),a&&a.showReorder()&&l.addClass("visible active")}}}}]),i.directive("keyboardAttach",(function(){return function(e,t){function n(e){if(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen){var n=e.keyboardHeight||e.detail&&e.detail.keyboardHeight;t.css("bottom",n+"px"),(i=t.controller("$ionicScroll"))&&(i.scrollView.__container.style.bottom=n+function(e){return e.clientHeight}(t[0])+"px")}}function r(){(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen)&&(t.css("bottom",""),i&&(i.scrollView.__container.style.bottom=""))}var i;ionic.on("native.keyboardshow",n,window),ionic.on("native.keyboardhide",r,window),ionic.on("native.showkeyboard",n,window),ionic.on("native.hidekeyboard",r,window),e.$on("$destroy",(function(){ionic.off("native.keyboardshow",n,window),ionic.off("native.keyboardhide",r,window),ionic.off("native.showkeyboard",n,window),ionic.off("native.hidekeyboard",r,window)}))}})),i.directive("ionList",["$timeout",function(e){return{restrict:"E",require:["ionList","^?$ionicScroll"],controller:"$ionicList",compile:function(t,n){var r=c('<div class="list">').append(t.contents()).addClass(n.type);return t.append(r),function(t,r,i,o){var a=o[0],l=o[1];e((function(){function i(e,t){t()&&e.addClass("visible")||e.removeClass("active"),ionic.requestAnimationFrame((function(){t()&&e.addClass("active")||e.removeClass("visible")}))}var o=a.listView=new ionic.views.ListView({el:r[0],listEl:r.children()[0],scrollEl:l&&l.element,scrollView:l&&l.scrollView,onReorder:function(t,n,r){var i=c(t).scope();i&&i.$onReorder&&e((function(){i.$onReorder(n,r)}))},canSwipe:function(){return a.canSwipeItems()}});t.$on("$destroy",(function(){o&&(o.deregister&&o.deregister(),o=null)})),s(n.canSwipe)&&t.$watch("!!("+n.canSwipe+")",(function(e){a.canSwipeItems(e)})),s(n.showDelete)&&t.$watch("!!("+n.showDelete+")",(function(e){a.showDelete(e)})),s(n.showReorder)&&t.$watch("!!("+n.showReorder+")",(function(e){a.showReorder(e)})),t.$watch((function(){return a.showDelete()}),(function(e,t){(e||t)&&(e&&a.closeOptionButtons(),a.canSwipeItems(!e),r.children().toggleClass("list-left-editing",e),r.toggleClass("disable-pointer-events",e),i(c(r[0].getElementsByClassName("item-delete")),a.showDelete))})),t.$watch((function(){return a.showReorder()}),(function(e,t){(e||t)&&(e&&a.closeOptionButtons(),a.canSwipeItems(!e),r.children().toggleClass("list-right-editing",e),r.toggleClass("disable-pointer-events",e),i(c(r[0].getElementsByClassName("item-reorder")),a.showReorder))}))}))}}}}]),i.directive("menuClose",["$ionicHistory","$timeout",function(e,t){return{restrict:"AC",link:function(n,r){r.bind("click",(function(){var n=r.inheritedData("$ionSideMenusController");n&&(e.nextViewOptions({historyRoot:!0,disableAnimate:!0,expire:300}),t((function(){e.nextViewOptions({historyRoot:!1,disableAnimate:!1})}),300),n.close())}))}}}]),i.directive("menuToggle",(function(){return{restrict:"AC",link:function(e,t,n){e.$on("$ionicView.beforeEnter",(function(e,n){n.enableBack?t.inheritedData("$ionSideMenusController").enableMenuWithBackViews()||t.addClass("hide"):t.removeClass("hide")})),t.bind("click",(function(){var e=t.inheritedData("$ionSideMenusController");e&&e.toggle(n.menuToggle)}))}}})),i.directive("ionModal",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="modal-backdrop"><div class="modal-backdrop-bg"></div><div class="modal-wrapper" ng-transclude></div></div>'}}]),i.directive("ionModalView",(function(){return{restrict:"E",compile:function(e){e.addClass("modal")}}})),i.directive("ionNavBackButton",["$ionicConfig","$document",function(e,t){return{restrict:"E",require:"^ionNavBar",compile:function(n,r){function i(e){return/ion-|icon/.test(e.className)}var o=t[0].createElement("button");for(var a in r.$attr)o.setAttribute(r.$attr[a],r[a]);r.ngClick||o.setAttribute("ng-click","$ionicGoBack()"),o.className="button back-button hide buttons "+(n.attr("class")||""),o.innerHTML=n.html()||"";for(var s,l,u,c,d=i(n[0]),h=0;h<n[0].childNodes.length;h++)1===(s=n[0].childNodes[h]).nodeType?i(s)?d=!0:s.classList.contains("default-title")?u=!0:s.classList.contains("previous-title")&&(c=!0):l||3!==s.nodeType||(l=!!s.nodeValue.trim());var f=e.backButton.icon();if(!d&&f&&"none"!==f&&(o.innerHTML='<i class="icon '+f+'"></i> '+o.innerHTML,o.className+=" button-clear"),!l){var p=t[0].createElement("span");p.className="back-text",!u&&e.backButton.text()&&(p.innerHTML+='<span class="default-title">'+e.backButton.text()+"</span>"),!c&&e.backButton.previousTitleText()&&(p.innerHTML+='<span class="previous-title"></span>'),o.appendChild(p)}return n.attr("class","hide"),n.empty(),{pre:function(e,t,n,r){r.navElement("backButton",o.outerHTML),o=null}}}}}]),i.directive("ionNavBar",(function(){return{restrict:"E",controller:"$ionicNavBar",scope:!0,link:function(e,t,n,r){r.init()}}})),i.directive("ionNavButtons",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var r="left";/^primary|secondary|right$/i.test(n.side||"")&&(r=n.side.toLowerCase());var i=e[0].createElement("span");i.className=r+"-buttons",i.innerHTML=t.html();var o=r+"Buttons";return t.attr("class","hide"),t.empty(),{pre:function(e,t,n,r){var a=t.parent().data("$ionViewController");a?a.navElement(o,i.outerHTML):r.navElement(o,i.outerHTML),i=null}}}}}]),i.directive("navDirection",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,r){n.bind("click",(function(){e.nextDirection(r.navDirection)}))}}}]),i.directive("ionNavTitle",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var r="title",i=e[0].createElement("span");for(var o in n.$attr)i.setAttribute(n.$attr[o],n[o]);return i.classList.add("nav-bar-title"),i.innerHTML=t.html(),t.attr("class","hide"),t.empty(),{pre:function(e,t,n,o){var a=t.parent().data("$ionViewController");a?a.navElement(r,i.outerHTML):o.navElement(r,i.outerHTML),i=null}}}}}]),i.directive("navTransition",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,r){n.bind("click",(function(){e.nextTransition(r.navTransition)}))}}}]),i.directive("ionNavView",["$state","$ionicConfig",function(e,t){return{restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:"$ionicNavView",compile:function(n,r,i){return n.addClass("view-container"),ionic.DomUtil.cachedAttr(n,"nav-view-transition",t.views.transition()),function(t,n,r,o){function a(t){var n=e.$current&&e.$current.locals[l.name];n&&(t||n!==s)&&(s=n,l.state=n.$$state,o.register(n))}var s;i(t,(function(e){n.append(e)}));var l=o.init();t.$on("$stateChangeSuccess",(function(){a(!1)})),t.$on("$viewContentLoading",(function(){a(!1)})),a(!0)}}}}]),i.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]).factory("$ionicNgClick",["$parse",function(e){return function(t,n,r){var i=angular.isFunction(r)?r:e(r);n.on("click",(function(e){t.$apply((function(){i(t,{$event:e})}))})),n.onclick=d}}]).directive("ngClick",["$ionicNgClick",function(e){return function(t,n,r){e(t,n,r.ngClick)}}]).directive("ionStopEvent",(function(){return{restrict:"A",link:function(e,t,n){t.bind(n.ionStopEvent,r)}}})),i.directive("ionPane",(function(){return{restrict:"E",link:function(e,t){t.addClass("pane")}}})),i.directive("ionPopover",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="popover-backdrop"><div class="popover-wrapper" ng-transclude></div></div>'}}]),i.directive("ionPopoverView",(function(){return{restrict:"E",compile:function(e){e.append(c('<div class="popover-arrow">')),e.addClass("popover")}}})),i.directive("ionRadio",(function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-radio"><input type="radio" name="radio-group"><div class="radio-content"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></div></label>',compile:function(e,t){t.icon&&e.find("i").removeClass("ion-checkmark").addClass(t.icon);var n=e.find("input");return a({name:t.name,value:t.value,disabled:t.disabled,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-disabled":t.ngDisabled,"ng-change":t.ngChange,"ng-required":t.ngRequired,required:t.required},(function(e,t){s(e)&&n.attr(t,e)})),function(e,t,n){e.getValue=function(){return e.ngValue||n.value}}}}})),i.directive("ionRefresher",[function(){return{restrict:"E",replace:!0,require:["?^$ionicScroll","ionRefresher"],controller:"$ionicRefresher",template:'<div class="scroll-refresher invisible" collection-repeat-ignore><div class="ionic-refresher-content" ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}"><div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}"><i class="icon {{pullingIcon}}"></i></div><div class="text-pulling" ng-bind-html="pullingText"></div><div class="icon-refreshing"><ion-spinner ng-if="showSpinner" icon="{{spinner}}"></ion-spinner><i ng-if="showIcon" class="icon {{refreshingIcon}}"></i></div><div class="text-refreshing" ng-bind-html="refreshingText"></div></div></div>',link:function(e,t,n,r){var i=r[0],o=r[1];!i||i.isNative()?o.init():(t[0].classList.add("js-scrolling"),i._setRefresher(e,t[0],o.getRefresherDomMethods()),e.$on("scroll.refreshComplete",(function(){e.$evalAsync((function(){i.scrollView&&i.scrollView.finishPullToRefresh()}))})))}}}]),i.directive("ionScroll",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,r){return{restrict:"E",scope:!0,controller:function(){},compile:function(e,i){e.addClass("scroll-view ionic-scroll");var o=c('<div class="scroll"></div>');o.append(e.contents()),e.append(o);var a="false"!==i.overflowScroll&&("true"===i.overflowScroll||!r.scrolling.jsScrolling());return{pre:function(e,r,i){n(e,i,{direction:"@",paging:"@",$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",scroll:"@",scrollbarX:"@",scrollbarY:"@",zooming:"@",minZoom:"@",maxZoom:"@"}),e.direction=e.direction||"y",s(i.padding)&&e.$watch(i.padding,(function(e){o.toggleClass("padding",!!e)})),!0===e.$eval(e.paging)&&o.addClass("scroll-paging"),e.direction||(e.direction="y");var l=!0===e.$eval(e.paging);a&&r.addClass("overflow-scroll"),r.addClass("scroll-"+e.direction);var u={el:r[0],delegateHandle:i.delegateHandle,locking:"true"===(i.locking||"true"),bouncing:e.$eval(i.hasBouncing),paging:l,scrollbarX:!1!==e.$eval(e.scrollbarX),scrollbarY:!1!==e.$eval(e.scrollbarY),scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,zooming:!0===e.$eval(e.zooming),maxZoom:e.$eval(e.maxZoom)||3,minZoom:e.$eval(e.minZoom)||.5,preventDefault:!0,nativeScrolling:a,scrollingComplete:function(){e.$onScrollComplete&&e.$onScrollComplete({scrollTop:c.scrollView.__scrollTop,scrollLeft:c.scrollView.__scrollLeft})}};l&&(u.speedMultiplier=.8,u.bouncing=!1);var c=t("$ionicScroll",{$scope:e,scrollViewOptions:u})}}}}}]),i.directive("ionSideMenu",(function(){return{restrict:"E",require:"^ionSideMenus",scope:!0,compile:function(e,t){return angular.isUndefined(t.isEnabled)&&t.$set("isEnabled","true"),angular.isUndefined(t.width)&&t.$set("width","275"),e.addClass("menu menu-"+t.side),function(e,n,r,i){e.side=r.side||"left";var o=i[e.side]=new ionic.views.SideMenu({width:t.width,el:n[0],isEnabled:!0});e.$watch(r.width,(function(e){var t=+e;t&&t==e&&o.setWidth(+e)})),e.$watch(r.isEnabled,(function(e){o.setIsEnabled(!!e)}))}}}})),i.directive("ionSideMenuContent",["$timeout","$ionicGesture","$window",function(e,t,n){return{restrict:"EA",require:"^ionSideMenus",scope:!0,compile:function(r,i){return r.addClass("menu-content pane"),{pre:function(o,a,l,u){function c(e){0!==u.getOpenAmount()?(u.close(),e.gesture.srcEvent.preventDefault(),m=null,g=null):m||(m=ionic.tap.pointerCoord(e.gesture.srcEvent))}function d(e){u.isDraggableTarget(e)&&"x"==p(e)&&(u._handleDrag(e),e.gesture.srcEvent.preventDefault())}function h(e){"x"==p(e)&&e.gesture.srcEvent.preventDefault()}function f(e){u._endDrag(e),m=null,g=null}function p(e){if(g)return g;if(e&&e.gesture){if(m){var t=ionic.tap.pointerCoord(e.gesture.srcEvent),n=Math.abs(t.x-m.x),r=Math.abs(t.y-m.y),i=r>n?"y":"x";return Math.max(n,r)>30&&(g=i),i}m=ionic.tap.pointerCoord(e.gesture.srcEvent)}return"y"}var m=null,g=null;s(i.dragContent)?o.$watch(i.dragContent,(function(e){u.canDragContent(e)})):u.canDragContent(!0),s(i.edgeDragThreshold)&&o.$watch(i.edgeDragThreshold,(function(e){u.edgeDragThreshold(e)}));var v={element:r[0],onDrag:function(){},endDrag:function(){},setCanScroll:function(e){var t=a[0].querySelector(".scroll");if(t){var n=angular.element(t.parentElement);if(n){var r=n.scope();r.scrollCtrl&&r.scrollCtrl.freezeScrollShut(!e)}}},getTranslateX:function(){return o.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle((function(t){var n=v.offsetX+t;a[0].style[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e((function(){o.sideMenuContentTranslateX=t}))})),setMarginLeft:ionic.animationFrameThrottle((function(e){e?(e=parseInt(e,10),a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-e+"px",v.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",v.offsetX=0)})),setMarginRight:ionic.animationFrameThrottle((function(e){e?(e=parseInt(e,10),a[0].style.width=n.innerWidth-e+"px",v.offsetX=e):(a[0].style.width="",v.offsetX=0),a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)"})),setMarginLeftAndRight:ionic.animationFrameThrottle((function(e,t){var r=(e=e&&parseInt(e,10)||0)+(t=t&&parseInt(t,10)||0);r>0?(a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-r+"px",v.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",v.offsetX=0)})),enableAnimation:function(){o.animationEnabled=!0,a[0].classList.add("menu-animated")},disableAnimation:function(){o.animationEnabled=!1,a[0].classList.remove("menu-animated")},offsetX:0};u.setContent(v);var _={stop_browser_behavior:!1,prevent_default_directions:["left","right"]},y=t.on("tap",c,a,_),b=t.on("dragright",d,a,_),w=t.on("dragleft",d,a,_),L=t.on("dragup",h,a,_),M=t.on("dragdown",h,a,_),k=t.on("release",f,a,_);o.$on("$destroy",(function(){v&&(v.element=null,v=null),t.off(w,"dragleft",d),t.off(b,"dragright",d),t.off(L,"dragup",h),t.off(M,"dragdown",h),t.off(k,"release",f),t.off(y,"tap",c)}))}}}}}]),i.directive("ionSideMenus",["$ionicBody",function(e){return{restrict:"ECA",controller:"$ionicSideMenus",compile:function(t,n){return n.$set("class",(n.class||"")+" view"),{pre:function(t,n,r,i){i.enableMenuWithBackViews(t.$eval(r.enableMenuWithBackViews)),t.$on("$ionicExposeAside",(function(n,r){t.$exposeAside||(t.$exposeAside={}),t.$exposeAside.active=r,e.enableClass(r,"aside-open")})),t.$on("$ionicView.beforeEnter",(function(e,n){n.historyId&&(t.$activeHistoryId=n.historyId)})),t.$on("$destroy",(function(){e.removeClass("menu-open","aside-open")}))}}}}}]),i.directive("ionSlideBox",["$animate","$timeout","$compile","$ionicSlideBoxDelegate","$ionicHistory","$ionicScrollDelegate",function(e,t,n,r,i,o){return{restrict:"E",replace:!0,transclude:!0,scope:{autoPlay:"=",doesContinue:"@",slideInterval:"@",showPager:"@",pagerClick:"&",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?",bounce:"@"},controller:["$scope","$element","$attrs",function(e,n,a){function l(e){e&&!u.isScrollFreeze?o.freezeAllScrolls(e):!e&&u.isScrollFreeze&&o.freezeAllScrolls(!1),u.isScrollFreeze=e}var u=this,c=!0===e.$eval(e.doesContinue),d=!1!==e.$eval(e.bounce),h=s(a.autoPlay)&&e.autoPlay?e.$eval(e.slideInterval)||4e3:0,f=new ionic.views.Slider({el:n[0],auto:h,continuous:c,startSlide:e.activeSlide,bouncing:d,slidesChanged:function(){e.currentSlide=f.currentIndex(),t((function(){}))},callback:function(n){e.currentSlide=n,e.onSlideChanged({index:e.currentSlide,$index:e.currentSlide}),e.$parent.$broadcast("slideBox.slideChanged",n),e.activeSlide=n,t((function(){}))},onDrag:function(){l(!0)},onDragEnd:function(){l(!1)}});f.enableSlide(!0!==e.$eval(a.disableScroll)),e.$watch("activeSlide",(function(e){s(e)&&f.slide(e)})),e.$on("slideBox.nextSlide",(function(){f.next()})),e.$on("slideBox.prevSlide",(function(){f.prev()})),e.$on("slideBox.setSlide",(function(e,t){f.slide(t)})),this.__slider=f;var p=r._registerInstance(f,a.delegateHandle,(function(){return i.isActiveScope(e)}));e.$on("$destroy",(function(){p(),f.kill()})),this.slidesCount=function(){return f.slidesCount()},this.onPagerClick=function(t){e.pagerClick({index:t})},t((function(){f.load()}))}],template:'<div class="slider"><div class="slider-slides" ng-transclude></div></div>',link:function(t,r,i){function o(){if(!a){var e=t.$new();a=c("<ion-pager></ion-pager>"),r.append(a),a=n(a)(e)}return a}var a;e.enabled(r,!1),s(i.showPager)||(t.showPager=!0,o().toggleClass("hide",!1)),i.$observe("showPager",(function(e){void 0!==e&&(e=t.$eval(e),o().toggleClass("hide",!e))}))}}}]).directive("ionSlide",(function(){return{restrict:"E",require:"?^ionSlideBox",compile:function(e){e.addClass("slider-slide")}}})).directive("ionPager",(function(){return{restrict:"E",replace:!0,require:"^ionSlideBox",template:'<div class="slider-pager"><span class="slider-pager-page" ng-repeat="slide in numSlides() track by $index" ng-class="{active: $index == currentSlide}" ng-click="pagerClick($index)"><i class="icon ion-record"></i></span></div>',link:function(e,t,n,r){e.pagerClick=function(e){r.onPagerClick(e)},e.numSlides=function(){return new Array(r.slidesCount())},e.$watch("currentSlide",(function(e){!function(e){for(var n=t[0].children,r=n.length,i=0;r>i;i++)i==e?n[i].classList.add("active"):n[i].classList.remove("active")}(e)}))}}})),i.directive("ionSlides",["$animate","$timeout","$compile",function(e,t,n){return{restrict:"E",transclude:!0,scope:{options:"=",slider:"="},template:'<div class="swiper-container"><div class="swiper-wrapper" ng-transclude></div><div ng-hide="!showPager" class="swiper-pagination"></div></div>',controller:["$scope","$element",function(e,r){var i=this;this.update=function(){t((function(){if(i.__slider){i.__slider.update(),i._options.loop&&i.__slider.createLoop();var t=i.__slider.slides.length;t>10&&(e.showPager=!1),i.__slider.activeIndex>t-1&&i.__slider.slideTo(t-1)}}))},this.rapidUpdate=ionic.debounce((function(){i.update()}),50),this.getSlider=function(){return i.__slider};var o=e.options||{},a=angular.extend({pagination:r.children().children()[1],paginationClickable:!0,lazyLoading:!0,preloadImages:!1},o);this._options=a,t((function(){var t=new ionic.views.Swiper(r.children()[0],a,e,n);e.$emit("$ionicSlides.sliderInitialized",{slider:t}),i.__slider=t,e.slider=i.__slider,e.$on("$destroy",(function(){t.destroy(),i.__slider=null}))})),t((function(){i.rapidUpdate()}),200)}],link:function(e){e.showPager=!0}}}]).directive("ionSlidePage",[function(){return{restrict:"E",require:"?^ionSlides",transclude:!0,replace:!0,template:'<div class="swiper-slide" ng-transclude></div>',link:function(e,t,n,r){r.rapidUpdate(),e.$on("$destroy",(function(){r.rapidUpdate()}))}}}]),i.directive("ionSpinner",(function(){return{restrict:"E",controller:"$ionicSpinner",link:function(e,t,n,r){var i=r.init();t.addClass("spinner spinner-"+i),t.on("$destroy",(function(){r.stop()}))}}})),i.directive("ionTab",["$compile","$ionicConfig","$ionicBind","$ionicViewSwitcher",function(e,t,n,r){function i(e,t){return s(t)?" "+e+'="'+t+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],controller:"$ionicTab",scope:!0,compile:function(o,a){for(var s="<ion-tab-nav"+i("ng-click",a.ngClick)+i("title",a.title)+i("icon",a.icon)+i("icon-on",a.iconOn)+i("icon-off",a.iconOff)+i("badge",a.badge)+i("badge-style",a.badgeStyle)+i("hidden",a.hidden)+i("disabled",a.disabled)+i("class",a.class)+"></ion-tab-nav>",l=document.createElement("div"),u=0;u<o[0].children.length;u++)l.appendChild(o[0].children[u].cloneNode(!0));var d,h,f=l.childElementCount;return o.empty(),f&&("ION-NAV-VIEW"===l.children[0].tagName&&(d=l.children[0].getAttribute("name"),l.children[0].classList.add("view-container"),h=!0),1===f&&(l=l.children[0]),h||l.classList.add("pane"),l.classList.add("tab-content")),function(i,o,a,u){function h(){_.tabMatchesState()&&v.select(i,!1)}function p(){m&&m.$destroy(),y&&g&&g.remove(),l.innerHTML="",y=m=g=null}var m,g,v=u[0],_=u[1],y=!1;i.$tabSelected=!1,n(i,a,{onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),v.add(i),i.$on("$destroy",(function(){i.$tabsDestroy||v.remove(i),b.isolateScope().$destroy(),b.remove(),b=l=g=null})),o[0].removeAttribute("title"),d&&(_.navViewName=i.navViewName=d),i.$on("$stateChangeSuccess",h),h();var b=c(s);b.data("$ionTabsController",v),b.data("$ionTabController",_),v.$tabsElement.append(e(b)(i)),i.$watch("$tabSelected",(function(n){n&&f?(y||(m=i.$new(),g=c(l),r.viewEleIsActive(g,!0),v.$element.append(g),e(g)(m),y=!0),r.viewEleIsActive(g,!0)):y&&g&&(t.views.maxCache()>0?r.viewEleIsActive(g,!1):p())})),i.$on("$ionicView.afterEnter",(function(){r.viewEleIsActive(g,i.$tabSelected)})),i.$on("$ionicView.clearCache",(function(){i.$tabSelected||p()}))}}}}]),i.directive("ionTabNav",[function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:"<a ng-class=\"{'has-badge':badge, 'tab-hidden':isHidden(), 'tab-item-active': isTabActive()}\" "+' ng-disabled="disabled()" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{getIcon()}}" ng-if="getIcon()"></i><span class="tab-title" ng-bind-html="title"></span></a>',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",hidden:"@",disabled:"&",badgeStyle:"@",class:"@"},link:function(e,t,n,r){var i=r[0],o=r[1];t[0].removeAttribute("title"),e.selectTab=function(e){e.preventDefault(),i.select(o.$scope,!0)},n.ngClick||t.on("click",(function(t){e.$apply((function(){e.selectTab(t)}))})),e.isHidden=function(){return"true"===n.hidden||!0===n.hidden},e.getIconOn=function(){return e.iconOn||e.icon},e.getIconOff=function(){return e.iconOff||e.icon},e.isTabActive=function(){return i.selectedTab()===o.$scope},e.getIcon=function(){return i.selectedTab()===o.$scope?e.iconOn||e.icon:e.iconOff||e.icon}}}}]),i.directive("ionTabs",["$ionicTabsDelegate","$ionicConfig",function(e,t){return{restrict:"E",scope:!0,controller:"$ionicTabs",compile:function(n){var r=c('<div class="tab-nav tabs">');return r.append(n.contents()),n.append(r).addClass("tabs-"+t.tabs.position()+" tabs-"+t.tabs.style()),{pre:function(t,n,i,o){function a(e,t){e.stopPropagation();var n=o.previousSelectedTab();n&&n.$broadcast(e.name.replace("NavView","Tabs"),t)}var s=e._registerInstance(o,i.delegateHandle,o.hasActiveScope);o.$scope=t,o.$element=n,o.$tabsElement=c(n[0].querySelector(".tabs")),t.$watch((function(){return n[0].className}),(function(e){var n=-1!==e.indexOf("tabs-top"),r=-1!==e.indexOf("tabs-item-hide");t.$hasTabs=!n&&!r,t.$hasTabsTop=n&&!r,t.$emit("$ionicTabs.top",t.$hasTabsTop)})),t.$on("$ionicNavView.beforeLeave",a),t.$on("$ionicNavView.afterLeave",a),t.$on("$ionicNavView.leave",a),t.$on("$destroy",(function(){t.$tabsDestroy=!0,s(),o.$tabsElement=o.$element=o.$scope=r=null,delete t.$hasTabs,delete t.$hasTabsTop}))},post:function(e,t,n,r){r.selectedTab()||r.select(0)}}}}}]),i.directive("ionTitle",[function(){return{restrict:"E",compile:function(e){e.addClass("title")}}}]),i.directive("ionToggle",["$timeout","$ionicConfig",function(e,t){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<div class="item item-toggle"><div ng-transclude></div><label class="toggle"><input type="checkbox"><div class="track"><div class="handle"></div></div></label></div>',compile:function(e,n){var r=e.find("input");return a({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},(function(e,t){s(e)&&r.attr(t,e)})),n.toggleClass&&e[0].getElementsByTagName("label")[0].classList.add(n.toggleClass),e.addClass("toggle-"+t.form.toggle()),function(e,t){var n=t[0].getElementsByTagName("label")[0],r=n.children[0],i=n.children[1],o=i.children[0],a=c(r).controller("ngModel");e.toggle=new ionic.views.Toggle({el:n,track:i,checkbox:r,handle:o,onChange:function(){a&&(a.$setViewValue(r.checked),e.$apply())}}),e.$on("$destroy",(function(){e.toggle.destroy()}))}}}}]),i.directive("ionView",(function(){return{restrict:"EA",priority:1e3,controller:"$ionicView",compile:function(e){return e.addClass("pane"),e[0].removeAttribute("title"),function(e,t,n,r){r.init()}}}}))}(),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("angular")}catch(e){}}()):"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?exports.ionicMaterial=t(function(){try{return require("angular")}catch(e){}}()):e.ionicMaterial=t(e.angular)}(this,(function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports=function(){var e;try{e=n(1)}catch(e){}if(e&&e.version||(e=window.angular),!e||!e.version)throw new Error("ionic-material could not load angular module :(");var t=e.module("ionic-material",["ionic"]);return n(2)(t),n(3)(t),"ionic-material"}()},function(t,n,r){if(void 0===e){var i=new Error('Cannot find module "angular"');throw i.code="MODULE_NOT_FOUND",i}t.exports=e},function(e,t,n){"use strict";
+"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return Q(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return Q(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=P(a),d=c?[]:{};return Q(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=P(a)?[]:{};return Q(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=R(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return L(d)?d:!0}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return b?(N(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K<z.length;K++,F=z[K])G=H[K]=d(G),J=v(F,c,F===b,J,G,f);var M=y.transition=J.then(function(){var d,e,g;if(y.transition!==M)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=H[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return y.transition!==M?A:(y.$current=b,y.current=b.self,y.params=c,S(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)},function(d){return y.transition!==M?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return M},y.is=function(a,b,d){d=R({relative:y.$current},d||{});var e=m(a,d.relative);return L(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=R({relative:y.$current},d||{}),N(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return L(e)?L(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=R({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!L(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new U.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(L(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(N(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new U.ParamSet;return Q(a.params||{},function(a,c){b[c]||(b[c]=new U.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?R(a.parent.params.$$new(),b):new U.ParamSet},views:function(a){var b={};return Q(L(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?R({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=R(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e){function f(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function g(a,c){function d(a){return 1===V&&W>=4?!!j.enabled(a):1===V&&W>=2?!!j.enabled():!!i}var e={enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}};if(a.noanimation)return e;if(j)return{enter:function(a,c,f){d(a)?b.version.minor>2?j.enter(a,null,c).then(f):j.enter(a,null,c,f):e.enter(a,c,f)},leave:function(a,c){d(a)?b.version.minor>2?j.leave(a).then(c):j.leave(a,c):e.leave(a,c)}};if(i){var f=i&&i(c,a);return{enter:function(a,b,c){f.enter(a,null,b),c()},leave:function(a,b){f.leave(a),b()}}}return e}var h=f(),i=h("$animator"),j=h("$animate"),k={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,f,h){return function(c,f,i){function j(){function a(){b&&b.remove(),c&&c.$destroy()}var b=l,c=n;c&&(c._willBeDestroyed=!0),m?(r.leave(m,function(){a(),l=null}),l=m):(a(),l=null),m=null,n=null}function k(g){var k,l=A(c,i,f,e),s=l&&a.$current&&a.$current.locals[l];if((g||s!==o)&&!c._willBeDestroyed){k=c.$new(),o=a.$current.locals[l],k.$emit("$viewContentLoading",l);var t=h(k,function(a){r.enter(a,f,function(){n&&n.$emit("$viewContentAnimationEnded"),(b.isDefined(q)&&!q||c.$eval(q))&&d(a)}),j()});m=t,n=k,n.$emit("$viewContentLoaded",l),n.$eval(p)}}var l,m,n,o,p=i.onload||"",q=i.autoscroll,r=g(i,c);c.$on("$stateChangeSuccess",function(){k(!1)}),k(!0)}}};return k}function z(a,b,c,d){return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return function(e,g,h){var i=c.$current,j=A(e,h,g,d),k=i&&i.locals[j];if(k){g.data("$uiView",{name:j,state:k.$$state}),g.html(k.$template?k.$template:f);var l=a(g.contents());if(k.$$controller){k.$scope=e,k.$element=g;var m=b(k.$$controller,k);k.$$controllerAs&&(e[k.$$controllerAs]=m),g.data("$ngControllerController",m),g.children().data("$ngControllerController",m)}l(e)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h=B(f.uiSref,a.current.name),i={state:h.state,href:null,params:null},j=D(e),k=g[1]||g[0];i.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var l=function(c){c&&(i.params=b.copy(c)),i.href=a.href(h.state,i.params,i.options),k&&k.$$addStateInfo(h.state,i.params),null!==i.href&&f.$set(j.attr,i.href)};h.paramExpr&&(d.$watch(h.paramExpr,function(a){a!==i.params&&l(a)},!0),i.params=b.copy(d.$eval(h.paramExpr))),l(),j.clickable&&e.bind("click",E(e,a,c,j,function(){return i}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){l.state=b[0],l.params=b[1],l.options=b[2],l.href=a.href(l.state,l.params,l.options),i&&i.$$addStateInfo(l.state,l.params),l.href&&e.$set(h.attr,l.href)}var h=D(d),i=f[1]||f[0],j=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],k="["+j.map(function(a){return a||"null"}).join(", ")+"]",l={state:null,params:null,options:null,href:null};c.$watch(k,g,!0),g(c.$eval(k)),h.clickable&&d.bind("click",E(d,a,b,h,function(){return l}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c);p.push({state:f||{name:b},params:c,hash:g}),q[g]=e}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(r){}o=o||c(e.uiSrefActive||"",!1)(b),O(o)&&Q(o,function(c,d){if(N(c)){var e=B(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){O(o)&&p.length>0||(g(a,b,o),i())},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;i>e;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},r.prototype.parameters=function(a){return L(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).provider("$state",v),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x);var V=b.version.major,W=b.version.minor;y.$inject=["$state","$injector","$uiViewScroll","$interpolate"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),G.$inject=["$state","$timeout"],H.$inject=["$state","$timeout"],I.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",G).directive("uiSrefActive",I).directive("uiSrefActiveEq",I).directive("uiState",H),
+J.$inject=["$state"],K.$inject=["$state"],b.module("ui.router.state").filter("isState",J).filter("includedByState",K)}(window,window.angular);
 /*!
+ * Copyright 2015 Drifty Co.
+ * http://drifty.com/
+ *
+ * Ionic, v1.3.5
+ * A powerful HTML5 mobile app framework.
+ * http://ionicframework.com/
+ *
+ * By @maxlynch, @benjsperry, @adamdbradley <3
+ *
+ * Licensed under the MIT license. Please see LICENSE for more information.
+ *
+ */
+
+!function(){function e(e,t,n,i,o,r){function a(i,a,c,s,u){function d(){N.resizeRequiresRefresh(b.__clientWidth,b.__clientHeight)&&g()}function f(){var e;return e={dataLength:0,width:0,height:0,resizeRequiresRefresh:function(t,n){var i=e.dataLength&&t&&n&&(t!==e.width||n!==e.height);return e.width=t,e.height=n,!!i},dataChangeRequiresRefresh:function(t){var n=t.length>0||t.length<e.dataLength;return e.dataLength=t.length,!!n}}}function h(){return T||(T=new e({afterItemsNode:M[0],containerNode:S,heightData:A,widthData:V,forceRefreshImages:!(!l(c.forceRefreshImages)||"false"===c.forceRefreshImages),keyExpression:I,renderBuffer:D,scope:i,scrollView:s.scrollView,transclude:u}))}function p(){var e=angular.element(b.__content.querySelector(".collection-repeat-after-container"));if(!e.length){var t=!1,n=[].filter.call(b.__content.childNodes,function(e){return ionic.DomUtil.contains(e,S)?(t=!0,!1):t});e=angular.element('<span class="collection-repeat-after-container">'),b.options.scrollingX&&e.addClass("horizontal"),e.append(n),b.__content.appendChild(e[0])}return e}function v(){L?m(L,A):A.computed=!0,R?m(R,V):V.computed=!0}function g(){var e=P.length>0;if(e&&(A.computed||V.computed)&&w(),e&&A.computed){if(A.value=E.height,!A.value)throw new Error('collection-repeat tried to compute the height of repeated elements "'+k+'", but was unable to. Please provide the "item-height" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!A.dynamic&&A.getValue&&(A.value=A.getValue());if(e&&V.computed){if(V.value=E.width,!V.value)throw new Error('collection-repeat tried to compute the width of repeated elements "'+k+'", but was unable to. Please provide the "item-width" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!V.dynamic&&V.getValue&&(V.value=V.getValue());h().refreshLayout()}function m(e,n){if(e){var i;try{i=t(e)}catch(o){e.trim().match(/\d+(px|%)$/)&&(e='"'+e+'"'),i=t(e)}var r=e.replace(/(\'|\"|px|%)/g,"").trim(),a=r.length&&!/([a-zA-Z]|\$|:|\?)/.test(r);if(n.attrValue=e,a)if(e.indexOf("%")>-1){var c=parseFloat(i())/100;n.getValue=n===A?function(){return Math.floor(c*b.__clientHeight)}:function(){return Math.floor(c*b.__clientWidth)}}else n.value=parseInt(i());else n.dynamic=!0,n.getValue=n===A?function(e,t){var n=i(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*b.__clientHeight):parseInt(n)}:function(e,t){var n=i(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*b.__clientWidth):parseInt(n)}}}function w(){O||u(H=i.$new(),function(e){e[0].removeAttribute("collection-repeat"),O=e[0]}),H[I]=(x(i)||[])[0],o.$$phase||H.$digest(),S.appendChild(O);var e=n.getComputedStyle(O);E.width=parseInt(e.width),E.height=parseInt(e.height),S.removeChild(O)}var b=s.scrollView,y=a[0],S=angular.element('<div class="collection-repeat-container">')[0];if(y.parentNode.replaceChild(S,y),b.options.scrollingX&&b.options.scrollingY)throw new Error("collection-repeat expected a parent x or y scrollView, not an xy scrollView.");var k=c.collectionRepeat,C=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!C)throw new Error("collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '"+c.collectionRepeat+"'.");var T,I=C[1],B=C[2],x=t(B),A={},V={},E={},P=[],_=c.itemRenderBuffer||c.collectionBufferSize,D=angular.isDefined(_)?parseInt(_):$,L=c.itemHeight||c.collectionItemHeight,R=c.itemWidth||c.collectionItemWidth,M=p(),N=f();v(),s.$element.on("scroll-resize",g),angular.element(n).on("resize",d);var z=o.$on("$ionicExposeAside",ionic.animationFrameThrottle(function(){s.scrollView.resize(),d()}));r(g,0,!1),i.$watchCollection(x,function(e){if(P=e||(e=[]),!angular.isArray(e))throw new Error("collection-repeat expected an array for '"+B+"', but got a "+typeof value);i.$$postDigest(function(){h().setData(P),N.dataChangeRequiresRefresh(P)&&g()})}),i.$on("$destroy",function(){angular.element(n).off("resize",d),z(),s.$element&&s.$element.off("scroll-resize",g),O&&O.parentNode&&O.parentNode.removeChild(O),H&&H.$destroy(),H=O=null,T&&T.destroy(),T=null});var O,H}return{restrict:"A",priority:1e3,transclude:"element",$$tlb:!0,require:"^^$ionicScroll",link:a}}function t(e,t,n){var i={primaryPos:0,secondaryPos:0,primarySize:0,secondarySize:0,rowPrimarySize:0};return function(o){function r(){return a(!0)}function a(t){if(!a.destroyed){var n,o,r,l,u,d=ee.getScrollValue(),f=d+ee.scrollPrimarySize;ee.updateRenderRange(d,f),F=Math.max(0,F-T),W=Math.min(A.length-1,W+T);for(n in Z)(F>n||n>W)&&(r=Z[n],delete Z[n],G.push(r),r.isShown=!1);for(n=F;W>=n;n++)n>=A.length||Z[n]&&!t||(r=Z[n]||(Z[n]=G.length?G.pop():j.length?j.shift():new s),K.push(r),r.isShown=!0,u=r.scope,u.$index=n,u[C]=A[n],u.$first=0===n,u.$last=n===A.length-1,u.$middle=!(u.$first||u.$last),u.$odd=!(u.$even=0===(1&n)),u.$$disconnected&&ionic.Utils.reconnectScope(r.scope),l=ee.getDimensions(n),(r.secondaryPos!==l.secondaryPos||r.primaryPos!==l.primaryPos)&&(r.node.style[ionic.CSS.TRANSFORM]=O.replace(N,r.primaryPos=l.primaryPos).replace(z,r.secondaryPos=l.secondaryPos)),(r.secondarySize!==l.secondarySize||r.primarySize!==l.primarySize)&&(r.node.style.cssText=r.node.style.cssText.replace(m,H.replace(N,(r.primarySize=l.primarySize)+1).replace(z,r.secondarySize=l.secondarySize))));for(W===A.length-1&&(l=ee.getDimensions(A.length-1)||i,w.style[ionic.CSS.TRANSFORM]=O.replace(N,l.primaryPos+l.primarySize).replace(z,0));G.length;)r=G.pop(),r.scope.$broadcast("$collectionRepeatLeave"),ionic.Utils.disconnectScope(r.scope),j.push(r),r.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",r.primaryPos=r.secondaryPos=null;if(y)for(n=0,o=K.length;o>n&&(r=K[n]);n++)if(r.images)for(var h,p=0,v=r.images.length;v>p&&(h=r.images[p]);p++){var $=h.src;h.src=g,h.src=$}if(t)for(var b=e.$$phase;K.length;)r=K.pop(),b||r.scope.$digest();else c()}}function c(){var t;c.running||(c.running=!0,n(function(){for(var n=e.$$phase;K.length;)t=K.pop(),t.isShown&&(n||t.scope.$digest());c.running=!1}))}function s(){var e=this;this.scope=I.$new(),this.id="item"+J++,x(this.scope,function(t){e.element=t,e.element.data("$$collectionRepeatItem",e),e.node=t[0],e.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",e.node.style.cssText+=" height: 0px; width: 0px;",ionic.Utils.disconnectScope(e.scope),b.appendChild(e.node),e.images=t[0].getElementsByTagName("img")})}function l(){this.getItemPrimarySize=P,this.getItemSecondarySize=D,this.getScrollValue=function(){return Math.max(0,Math.min(B.__scrollTop-q,B.__maxScrollTop-q-U))},this.refreshDirection=function(){this.scrollPrimarySize=B.__clientHeight,this.scrollSecondarySize=B.__clientWidth,this.estimatedPrimarySize=v,this.estimatedSecondarySize=$,this.estimatedItemsAcross=R&&Math.floor(B.__clientWidth/$)||1}}function u(){this.getItemPrimarySize=D,this.getItemSecondarySize=P,this.getScrollValue=function(){return Math.max(0,Math.min(B.__scrollLeft-q,B.__maxScrollLeft-q-U))},this.refreshDirection=function(){this.scrollPrimarySize=B.__clientWidth,this.scrollSecondarySize=B.__clientHeight,this.estimatedPrimarySize=$,this.estimatedSecondarySize=v,this.estimatedItemsAcross=R&&Math.floor(B.__clientHeight/v)||1}}function d(){this.getEstimatedSecondaryPos=function(e){return e%this.estimatedItemsAcross*this.estimatedSecondarySize},this.getEstimatedPrimaryPos=function(e){return Math.floor(e/this.estimatedItemsAcross)*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)*this.estimatedItemsAcross}}function f(){this.getEstimatedSecondaryPos=function(){return 0},this.getEstimatedPrimaryPos=function(e){return e*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)}}function h(){this.getContentSize=function(){return this.getEstimatedPrimaryPos(A.length-1)+this.estimatedPrimarySize+q+U};var e={};this.getDimensions=function(t){return e.primaryPos=this.getEstimatedPrimaryPos(t),e.secondaryPos=this.getEstimatedSecondaryPos(t),e.primarySize=this.estimatedPrimarySize,e.secondarySize=this.estimatedSecondarySize,e},this.updateRenderRange=function(e,t){F=Math.max(0,this.getEstimatedIndex(e)),W=Math.min(A.length-1,this.getEstimatedIndex(t)+this.estimatedItemsAcross-1),Y=Math.max(0,this.getEstimatedPrimaryPos(F)),X=this.getEstimatedPrimaryPos(W)+this.estimatedPrimarySize}}function p(){function e(e){var t,r,a;for(t=Math.max(0,n);e>=t&&(a=c[t]);t++)r=c[t-1]||i,a.primarySize=o.getItemPrimarySize(t,A[t]),a.secondarySize=o.scrollSecondarySize,a.primaryPos=r.primaryPos+r.primarySize,a.secondaryPos=0}function t(e){var t,r,a;for(t=Math.max(n,0);e>=t&&(a=c[t]);t++)r=c[t-1]||i,a.secondarySize=Math.min(o.getItemSecondarySize(t,A[t]),o.scrollSecondarySize),a.secondaryPos=r.secondaryPos+r.secondarySize,0===t||a.secondaryPos+a.secondarySize>o.scrollSecondarySize?(a.secondaryPos=0,a.primarySize=o.getItemPrimarySize(t,A[t]),a.primaryPos=r.primaryPos+r.rowPrimarySize,a.rowStartIndex=t,a.rowPrimarySize=a.primarySize):(a.primarySize=o.getItemPrimarySize(t,A[t]),a.primaryPos=r.primaryPos,a.rowStartIndex=r.rowStartIndex,c[a.rowStartIndex].rowPrimarySize=a.rowPrimarySize=Math.max(c[a.rowStartIndex].rowPrimarySize,a.primarySize),a.rowPrimarySize=Math.max(a.primarySize,a.rowPrimarySize))}var n,o=this,r=ionic.debounce(Q,25,!0),a=R?t:e,c=[];this.getContentSize=function(){var e=c[n]||i;return(e.primaryPos+e.primarySize||0)+this.getEstimatedPrimaryPos(A.length-n-1)+q+U},this.onDestroy=function(){c.length=0},this.onRefreshData=function(){var e,t;for(e=c.length,t=A.length;t>e;e++)c.push({});n=-1},this.onRefreshLayout=function(){n=-1},this.getDimensions=function(e){return e=Math.min(e,A.length-1),e>n&&(e>.9*A.length?(a(A.length-1),n=A.length-1,Q()):(a(e),n=e,r())),c[e]};var s=-1,l=-1;this.updateRenderRange=function(e,t){var n,i,o;if(this.getDimensions(2*this.getEstimatedIndex(t)),-1===s||0===e)n=0;else if(e>=l)for(n=s,i=A.length;i>n&&!((o=this.getDimensions(n))&&o.primaryPos+o.rowPrimarySize>=e);n++);else for(n=s;n>=0;n--)if((o=this.getDimensions(n))&&o.primaryPos<=e){n=R?o.rowStartIndex:n;break}F=Math.min(Math.max(0,n),A.length-1),Y=-1!==F?this.getDimensions(F).primaryPos:-1;var r;for(n=F+1,i=A.length;i>n;n++)if((o=this.getDimensions(n))&&o.primaryPos+o.rowPrimarySize>t){if(R)for(r=o;i-1>n&&(o=this.getDimensions(n+1)).primaryPos===r.primaryPos;)n++;break}W=Math.min(n,A.length-1),X=-1!==W?(o=this.getDimensions(W)).primaryPos+(o.rowPrimarySize||o.primarySize):-1,l=e,s=F}}var v,$,w=o.afterItemsNode,b=o.containerNode,y=o.forceRefreshImages,S=o.heightData,k=o.widthData,C=o.keyExpression,T=o.renderBuffer,I=o.scope,B=o.scrollView,x=o.transclude,A=[],V={},E=S.getValue||function(){return S.value},P=function(e,t){return V[C]=t,V.$index=e,E(I,V)},_=k.getValue||function(){return k.value},D=function(e,t){return V[C]=t,V.$index=e,_(I,V)},L=!!B.options.scrollingY,R=L?k.dynamic||k.value!==B.__clientWidth:S.dynamic||S.value!==B.__clientHeight,M=!S.dynamic&&!k.dynamic,N="PRIMARY",z="SECONDARY",O=L?"translate3d(SECONDARYpx,PRIMARYpx,0)":"translate3d(PRIMARYpx,SECONDARYpx,0)",H=L?"height: PRIMARYpx; width: SECONDARYpx;":"height: SECONDARYpx; width: PRIMARYpx;",q=0,U=0,F=-1,W=-1,X=-1,Y=-1,j=[],G=[],K=[],Z={},J=0,Q=L?function(){B.setDimensions(null,null,null,ee.getContentSize(),!0)}:function(){B.setDimensions(null,null,ee.getContentSize(),null,!0)},ee=L?new l:new u;(R?d:f).call(ee),(M?h:p).call(ee);var te=L?"getContentHeight":"getContentWidth",ne=B.options[te];B.options[te]=angular.bind(ee,ee.getContentSize),B.__$callback=B.__callback,B.__callback=function(e,t,n,i){var o=ee.getScrollValue();(-1===F||o+ee.scrollPrimarySize>X||Y>o)&&a(),B.__$callback(e,t,n,i)};var ie=!1,oe=!1;this.refreshLayout=function(){A.length?(v=P(0,A[0]),$=D(0,A[0])):(v=100,$=100);var e=getComputedStyle(w)||{},n=w.firstElementChild&&getComputedStyle(w.firstElementChild)||{},i=w.lastElementChild&&getComputedStyle(w.lastElementChild)||{};U=(parseInt(e[L?"height":"width"])||0)+(n&&parseInt(n[L?"marginTop":"marginLeft"])||0)+(i&&parseInt(i[L?"marginBottom":"marginRight"])||0),q=0;var o=b;do q+=o[L?"offsetTop":"offsetLeft"];while(ionic.DomUtil.contains(B.__content,o=o.offsetParent));var a=b.previousElementSibling,c=a?t.getComputedStyle(a):{},l=parseInt(c[L?"marginBottom":"marginRight"]||0);if(b.style[ionic.CSS.TRANSFORM]=O.replace(N,-l).replace(z,0),q-=l,B.__clientHeight&&B.__clientWidth||(B.__clientWidth=B.__container.clientWidth,B.__clientHeight=B.__container.clientHeight),(ee.onRefreshLayout||angular.noop)(),ee.refreshDirection(),Q(),!ie)for(var u=Math.max(20,3*T),d=0;u>d;d++)j.push(new s);ie=!0,ie&&oe&&((B.__scrollLeft>B.__maxScrollLeft||B.__scrollTop>B.__maxScrollTop)&&B.resize(),r(!0))},this.setData=function(e){A=e,(ee.onRefreshData||angular.noop)(),oe=!0},this.destroy=function(){a.destroyed=!0,j.forEach(function(e){e.scope.$destroy(),e.scope=e.element=e.node=e.images=null}),j.length=K.length=G.length=0,Z={},B.options[te]=ne,B.__callback=B.__$callback,B.resize(),(ee.onDestroy||angular.noop)()}}}function n(e){return["$ionicGesture","$parse",function(t,n){var i=e.substr(2).toLowerCase();return function(o,r,a){var c=n(a[e]),s=function(e){o.$apply(function(){c(o,{$event:e})})},l=t.on(i,s,r);o.$on("$destroy",function(){t.off(l,i,s)})}}]}function i(e){return["$document","$timeout",function(t,n){return{restrict:"E",controller:"$ionicHeaderBar",compile:function(i){function o(t,n,i,o){e?(t.$watch(function(){return n[0].className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subheader");t.$hasHeader=n&&!i,t.$hasSubheader=n&&i,t.$emit("$ionicSubheader",t.$hasSubheader)}),t.$on("$destroy",function(){delete t.$hasHeader,delete t.$hasSubheader}),o.align(),t.$on("$ionicHeader.align",function(){ionic.requestAnimationFrame(function(){o.align()})})):(t.$watch(function(){return n[0].className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subfooter");t.$hasFooter=n&&!i,t.$hasSubfooter=n&&i}),t.$on("$destroy",function(){delete t.$hasFooter,delete t.$hasSubfooter}),t.$watch("$hasTabs",function(e){n.toggleClass("has-tabs",!!e)}),o.align(),t.$on("$ionicFooter.align",function(){ionic.requestAnimationFrame(function(){o.align()})}))}return i.addClass(e?"bar bar-header":"bar bar-footer"),n(function(){e&&t[0].getElementsByClassName("tabs-top").length&&i.addClass("has-tabs-top")}),{pre:o}}}}]}function o(e){return e.clientHeight}function r(e){e.stopPropagation()}var a=angular.module("ionic",["ngAnimate","ngSanitize","ui.router","ngIOS9UIWebViewPatch"]),c=angular.extend,s=angular.forEach,l=angular.isDefined,u=angular.isNumber,d=angular.isString,f=angular.element,h=angular.noop;a.factory("$ionicActionSheet",["$rootScope","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform","$ionicBody","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s){function l(o){function l(e){e&&/icon/.test(e)&&(u.$actionSheetHasIcon=!0)}var u=e.$new(!0);c(u,{cancel:h,destructiveButtonClicked:h,buttonClicked:h,$deregisterBackButton:h,buttons:[],cancelOnStateChange:!0},o||{});for(var d=0;d<u.buttons.length;d++)l(u.buttons[d].text);l(u.cancelText),l(u.destructiveText);var p=u.element=t('<ion-action-sheet ng-class="cssClass" buttons="buttons"></ion-action-sheet>')(u),v=f(p[0].querySelector(".action-sheet-wrapper")),g=u.cancelOnStateChange?e.$on("$stateChangeSuccess",function(){u.cancel()}):h;return u.removeSheet=function(e){u.removed||(u.removed=!0,v.removeClass("action-sheet-up"),i(function(){a.removeClass("action-sheet-open")},400),u.$deregisterBackButton(),g(),n.removeClass(p,"active").then(function(){u.$destroy(),p.remove(),u.cancel.$scope=v=null,(e||h)(o.buttons)}))},u.showSheet=function(e){u.removed||(a.append(p).addClass("action-sheet-open"),n.addClass(p,"active").then(function(){u.removed||(e||h)()}),i(function(){u.removed||v.addClass("action-sheet-up")},20,!1))},u.$deregisterBackButton=r.registerBackButtonAction(function(){i(u.cancel)},s.actionSheet),u.cancel=function(){u.removeSheet(o.cancel)},u.buttonClicked=function(e){o.buttonClicked(e,o.buttons[e])===!0&&u.removeSheet()},u.destructiveButtonClicked=function(){o.destructiveButtonClicked()===!0&&u.removeSheet()},u.showSheet(),u.cancel.$scope=u,u.cancel}return{show:l}}]),f.prototype.addClass=function(e){var t,n,i,o,r,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t<this.length;t++)if(o=this[t],o.setAttribute)if(e.indexOf(" ")<0&&o.classList.add)o.classList.add(e);else{for(a=(" "+(o.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=e.split(" "),n=0;n<r.length;n++)i=r[n].trim(),-1===a.indexOf(" "+i+" ")&&(a+=i+" ");o.setAttribute("class",a.trim())}return this},f.prototype.removeClass=function(e){var t,n,i,o,r;if(e)for(t=0;t<this.length;t++)if(r=this[t],r.getAttribute)if(e.indexOf(" ")<0&&r.classList.remove)r.classList.remove(e);else for(i=e.split(" "),n=0;n<i.length;n++)o=i[n],r.setAttribute("class",(" "+(r.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+o.trim()+" "," ").trim());return this},a.factory("$ionicBackdrop",["$document","$timeout","$$rAF","$rootScope",function(e,t,n,i){function o(){s++,1===s&&(c.addClass("visible"),i.$broadcast("backdrop.shown"),n(function(){s>=1&&c.addClass("active")}))}function r(){1===s&&(c.removeClass("active"),i.$broadcast("backdrop.hidden"),t(function(){0===s&&c.removeClass("visible")},400,!1)),s=Math.max(0,s-1)}function a(){return c}var c=f('<div class="backdrop">'),s=0;return e[0].body.appendChild(c[0]),{retain:o,release:r,getElement:a,_element:c}}]),a.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,o,r){s(r||{},function(r,a){var c,s,l=r.match(n)||[],u=l[3]||a,d=l[1];switch(d){case"@":if(!o[u])return;o.$observe(u,function(e){i[a]=e}),o[u]&&(i[a]=t(o[u])(i));break;case"=":if(!o[u])return;s=i.$watch(o[u],function(e){i[a]=e}),i.$on("$destroy",s);break;case"&":if(o[u]&&o[u].match(RegExp(a+"(.*?)")))throw new Error('& expression binding "'+a+'" looks like it will recursively call "'+o[u]+'" and cause a stack overflow! Please choose a different scopeName.');c=e(o[u]),i[a]=function(e){return c(i,e)}}})}}]),a.factory("$ionicBody",["$document",function(e){return{addClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.add(arguments[t]);return this},removeClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.remove(arguments[t]);return this},enableClass:function(e){var t=Array.prototype.slice.call(arguments).slice(1);return e?this.addClass.apply(this,t):this.removeClass.apply(this,t),this},append:function(t){return e[0].body.appendChild(t.length?t[0]:t),this},get:function(){return e[0].body}}}]),a.factory("$ionicClickBlock",["$document","$ionicBody","$timeout",function(e,t,n){function i(e){e.preventDefault(),e.stopPropagation()}function o(){s&&(a?a.classList.remove(l):(a=e[0].createElement("div"),a.className="click-block",t.append(a),a.addEventListener("touchstart",i),a.addEventListener("mousedown",i)),s=!1)}function r(){a&&a.classList.add(l)}var a,c,s,l="click-block-hide";return{show:function(e){s=!0,n.cancel(c),c=n(this.hide,e||310,!1),o()},hide:function(){s=!1,n.cancel(c),r()}}}]),a.factory("$ionicGesture",[function(){return{on:function(e,t,n,i){return window.ionic.onGesture(e,t,n[0],i)},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]),a.factory("$ionicHistory",["$rootScope","$state","$location","$window","$timeout","$ionicViewSwitcher","$ionicNavViewDelegate",function(e,t,n,i,o,r,a){function s(e){return e?R.views[e]:null}function u(e){return e?s(e.backViewId):null}function d(e){return e?s(e.forwardViewId):null}function f(e){return e?R.histories[e]:null}function h(e){var t=p(e);return R.histories[t.historyId]||(R.histories[t.historyId]={historyId:t.historyId,parentHistoryId:p(t.scope.$parent).historyId,stack:[],cursor:-1}),f(t.historyId)}function p(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}}function v(e){R.currentView=s(e),R.backView=u(R.currentView),R.forwardView=d(R.currentView)}function g(){var e;if(t&&t.current&&t.current.name){if(e=t.current.name,t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&t.params[n]&&(e+="_"+n+"="+t.params[n]);return e}return ionic.Utils.nextUid()}function m(){var e;if(t&&t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&(e=e||{},e[n]=t.params[n]);return e}function $(e){return e&&e.length&&/ion-side-menus|ion-tabs/i.test(e[0].tagName)}function w(e,t){if(t&&t.$$state&&t.$$state.self.canSwipeBack===!1)return!1;if(e&&"false"===e.attr("can-swipe-back"))return!1;var n=e.find("ion-view");return n&&"false"===n.attr("can-swipe-back")?!1:!0}var b,y,S,k,C,T="initialView",I="newView",B="moveBack",x="moveForward",A="back",V="forward",E="enter",P="exit",_="swap",D="none",L=0,R={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null},M=function(){};return M.prototype.initialize=function(e){if(e){for(var t in e)this[t]=e[t];return this}return null},M.prototype.go=function(){if(this.stateName)return t.go(this.stateName,this.stateParams);if(this.url&&this.url!==n.url()){if(R.backView===this)return i.history.go(-1);if(R.forwardView===this)return i.history.go(1);n.url(this.url)}return null},M.prototype.destroy=function(){this.scope&&(this.scope.$destroy&&this.scope.$destroy(),this.scope=null)},{register:function(e,t){var i,a,c,l=g(),d=h(e),$=R.currentView,M=R.backView,N=R.forwardView,z=null,O=null,H=D,q=d.historyId,U=n.url();if(b!==l&&(b=l,L++),C)z=C.viewId,O=C.action,H=C.direction,C=null;else if(M&&M.stateId===l)z=M.viewId,q=M.historyId,O=B,M.historyId===$.historyId?H=A:$&&(H=P,i=f(M.historyId),i&&i.parentHistoryId===$.historyId?H=E:(i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId&&(H=_)));else if(N&&N.stateId===l)z=N.viewId,q=N.historyId,O=x,N.historyId===$.historyId?H=V:$&&(H=P,$.historyId===d.parentHistoryId?H=E:(i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId&&(H=_))),i=p(e),N.historyId&&i.scope&&(i.scope.$historyId=N.historyId,q=N.historyId);else if($&&$.historyId!==q&&d.cursor>-1&&d.stack.length>0&&d.cursor<d.stack.length&&d.stack[d.cursor].stateId===l){var F=d.stack[d.cursor];if(z=F.viewId,q=F.historyId,O=B,H=_,i=f($.historyId),i&&i.parentHistoryId===q?H=P:(i=f(q),i&&i.parentHistoryId===$.historyId&&(H=E)),i=s(F.backViewId),i&&F.historyId!==i.historyId){var W=Object.keys(R.views);W.forEach(function(e){var t=R.views[e];t.backViewId===F.viewId&&t.historyId!==F.historyId&&(t.backViewId=null)}),d.stack[d.cursor].backViewId=$.viewId}}else{if(c=r.createViewEle(t),this.isAbstractEle(c,t))return{action:"abstractView",direction:D,ele:c};if(z=ionic.Utils.nextUid(),$){if($.forwardViewId=z,O=I,N&&$.stateId!==N.stateId&&$.historyId===N.historyId&&(i=f(N.historyId))){for(a=i.stack.length-1;a>=N.index;a--){var X=i.stack[a];X&&X.destroy&&X.destroy(),i.stack.splice(a)}q=N.historyId}d.historyId===$.historyId?H=V:$.historyId!==d.historyId&&(H=E,i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId?H=_:(i=f(i.parentHistoryId),i&&i.historyId===d.historyId&&(H=P)))}else O=T;2>L&&(H=D),R.views[z]=this.createView({viewId:z,index:d.stack.length,historyId:d.historyId,backViewId:$&&$.viewId?$.viewId:null,forwardViewId:null,stateId:l,stateName:this.currentStateName(),stateParams:m(),url:U,canSwipeBack:w(c,t)}),d.stack.push(R.views[z])}if(S&&S(),o.cancel(k),y){if(y.disableAnimate&&(H=D),y.disableBack&&(R.views[z].backViewId=null),y.historyRoot){for(a=0;a<d.stack.length;a++)d.stack[a].viewId===z?(d.stack[a].index=0,d.stack[a].backViewId=d.stack[a].forwardViewId=null):delete R.views[d.stack[a].viewId];d.stack=[R.views[z]]}y=null}if(v(z),R.backView&&q==R.backView.historyId&&l==R.backView.stateId&&U==R.backView.url)for(a=0;a<d.stack.length;a++)if(d.stack[a].viewId==z){O="dupNav",H=D,a>0&&(d.stack[a-1].forwardViewId=null),R.forwardView=null,R.currentView.index=R.backView.index,R.currentView.backViewId=R.backView.backViewId,R.backView=u(R.backView),d.stack.splice(a,1);break}return d.cursor=R.currentView.index,{viewId:z,action:O,direction:H,historyId:q,enableBack:this.enabledBack(R.currentView),isHistoryRoot:0===R.currentView.index,ele:c}},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){var t=new M;return t.initialize(e)},getViewById:s,viewHistory:function(){return R},currentView:function(e){return arguments.length&&(R.currentView=e),R.currentView},currentHistoryId:function(){return R.currentView?R.currentView.historyId:null},currentTitle:function(e){return R.currentView?(arguments.length&&(R.currentView.title=e),R.currentView.title):void 0},backView:function(e){return arguments.length&&(R.backView=e),R.backView},backTitle:function(e){var t=e&&s(e.backViewId)||R.backView;return t&&t.title},forwardView:function(e){return arguments.length&&(R.forwardView=e),R.forwardView},currentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return!!(t&&t.current&&t.current.views&&t.current.views[e])},goToHistoryRoot:function(e){if(e){var t=f(e);if(t&&t.stack.length){if(R.currentView&&R.currentView.viewId===t.stack[0].viewId)return;C={viewId:t.stack[0].viewId,action:B,direction:A},t.stack[0].go()}}},goBack:function(e){if(l(e)&&-1!==e){if(e>-1)return;var t=R.histories[this.currentHistoryId()],n=t.cursor+e+1;1>n&&(n=1),t.cursor=n,v(t.stack[n].viewId);for(var i=n-1,r=[],a=s(t.stack[i].forwardViewId);a&&(r.push(a.stateId||a.viewId),i++,!(i>=t.stack.length));)a=s(t.stack[i].forwardViewId);var c=this;r.length&&o(function(){c.clearCache(r)},300)}R.backView&&R.backView.go()},removeBackView:function(){var e=this,t=R.histories[this.currentHistoryId()],n=t.cursor,i=t.stack[n],o=t.stack[n-1],r=t.stack[n-2];o&&r&&(t.stack.splice(n-1,1),e.clearCache([o.viewId]),i.backViewId=r.viewId,i.index=i.index-1,r.forwardViewId=i.viewId,R.backView=r,t.currentCursor+=-1)},enabledBack:function(e){var t=u(e);return!(!t||t.historyId!==e.historyId)},clearHistory:function(){var e=R.histories,t=R.currentView;if(e)for(var n in e)e[n].stack&&(e[n].stack=[],e[n].cursor=-1),t&&t.historyId===n?(t.backViewId=t.forwardViewId=null,e[n].stack.push(t)):e[n].destroy&&e[n].destroy();for(var i in R.views)i!==t.viewId&&delete R.views[i];t&&v(t.viewId)},clearCache:function(e){return o(function(){a._instances.forEach(function(t){t.clearCache(e)})})},nextViewOptions:function(t){return S&&S(),arguments.length&&(o.cancel(k),null===t?y=t:(y=y||{},c(y,t),y.expire&&(S=e.$on("$stateChangeSuccess",function(){k=o(function(){y=null},y.expire)})))),y},isAbstractEle:function(e,t){return t&&t.$$state&&t.$$state.self["abstract"]?!0:!(!e||!$(e)&&!$(e.children()))},isActiveScope:function(e){if(!e)return!1;for(var t,n=e,i=this.currentHistoryId();n;){if(n.$$disconnected)return!1;if(!t&&n.hasOwnProperty("$historyId")&&(t=!0),i){if(n.hasOwnProperty("$historyId")&&i==n.$historyId)return!0;if(n.hasOwnProperty("$activeHistoryId")&&i==n.$activeHistoryId){if(n.hasOwnProperty("$historyId"))return!0;if(!t)return!0}}t&&n.hasOwnProperty("$activeHistoryId")&&(t=!1),n=n.$parent}return i?"root"==i:!0}}}]).run(["$rootScope","$state","$location","$document","$ionicPlatform","$ionicHistory","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a){function c(e){var t=r.backView();return t?t.go():ionic.Platform.exitApp(),e.preventDefault(),!1}e.$on("$ionicView.beforeEnter",function(){ionic.keyboard&&ionic.keyboard.hide&&ionic.keyboard.hide()}),e.$on("$ionicHistory.change",function(e,i){if(!i)return null;var o=r.viewHistory(),a=i.historyId?o.histories[i.historyId]:null;if(a&&a.cursor>-1&&a.cursor<a.stack.length){var c=a.stack[a.cursor];return c.go(i)}!i.url&&i.uiSref&&(i.url=t.href(i.uiSref)),i.url&&(0===i.url.indexOf("#")&&(i.url=i.url.replace("#","")),i.url!==n.url()&&n.url(i.url))}),e.$ionicGoBack=function(e){r.goBack(e)},e.$on("$ionicView.afterEnter",function(e,t){t&&t.title&&(i[0].title=t.title)}),o.registerBackButtonAction(c,a.view)}]),a.provider("$ionicConfig",function(){function e(e,i){a.platform[e]=i,o.platform[e]={},t(a,a.platform[e]),n(a.platform[e],o.platform[e],"")}function t(e,n){for(var i in e)i!=r&&e.hasOwnProperty(i)&&(angular.isObject(e[i])?(l(n[i])||(n[i]={}),t(e[i],n[i])):l(n[i])||(n[i]=null))}function n(e,t,o){s(e,function(c,s){angular.isObject(e[s])?(t[s]={},n(e[s],t[s],o+"."+s)):t[s]=function(n){if(arguments.length)return e[s]=n,t;if(e[s]==r){var c=i(a.platform,ionic.Platform.platform()+o+"."+s);return c||c===!1?c:i(a.platform,"default"+o+"."+s)}return e[s]}})}function i(e,t){t=t.split(".");for(var n=0;n<t.length;n++){if(!e||!l(e[t[n]]))return null;e=e[t[n]]}return e}var o=this;o.platform={};var r="platform",a={views:{maxCache:r,forwardCache:r,transition:r,swipeBackEnabled:r,swipeBackHitWidth:r},navBar:{alignTitle:r,positionPrimaryButtons:r,positionSecondaryButtons:r,transition:r},backButton:{icon:r,text:r,previousTitleText:r},form:{checkbox:r,toggle:r},scrolling:{jsScrolling:r},spinner:{icon:r},tabs:{style:r,position:r},templates:{maxPrefetch:r},platform:{}};n(a,o,""),e("default",{views:{maxCache:10,forwardCache:!1,transition:"ios",swipeBackEnabled:!0,swipeBackHitWidth:45},navBar:{alignTitle:"center",positionPrimaryButtons:"left",positionSecondaryButtons:"right",transition:"view"},backButton:{icon:"ion-ios-arrow-back",text:"Back",previousTitleText:!0},form:{checkbox:"circle",toggle:"large"},scrolling:{jsScrolling:!0},spinner:{icon:"ios"},tabs:{style:"standard",position:"bottom"},templates:{maxPrefetch:30}}),e("ios",{}),e("android",{views:{transition:"android",swipeBackEnabled:!1},navBar:{alignTitle:"left",positionPrimaryButtons:"right",positionSecondaryButtons:"right"},backButton:{icon:"ion-android-arrow-back",text:!1,previousTitleText:!1},form:{checkbox:"square",toggle:"small"},spinner:{icon:"android"},tabs:{style:"striped",position:"top"},scrolling:{jsScrolling:!1}}),e("windowsphone",{spinner:{icon:"android"}}),o.transitions={views:{},navBar:{}},o.transitions.views.ios=function(e,t,n,i){function o(e,t,n,i){var o={};o[ionic.CSS.TRANSITION_DURATION]=r.shouldAnimate?"":0,o.opacity=t,i>-1&&(o.boxShadow="0 0 10px rgba(0,0,0,"+(r.shouldAnimate?.45*i:.3)+")"),o[ionic.CSS.TRANSFORM]="translate3d("+n+"%,0,0)",ionic.DomUtil.cachedStyles(e,o)}var r={run:function(i){"forward"==n?(o(e,1,99*(1-i),1-i),o(t,1-.1*i,-33*i,-1)):"back"==n?(o(e,1-.1*(1-i),-33*(1-i),-1),o(t,1,100*i,1-i)):(o(e,1,0,-1),o(t,0,0,-1))},shouldAnimate:i&&("forward"==n||"back"==n)};return r},o.transitions.navBar.ios=function(e,t,n,i){function o(e,t,n,i){var o={};o[ionic.CSS.TRANSITION_DURATION]=c.shouldAnimate?"":"0ms",o.opacity=1===t?"":t,e.setCss("buttons-left",o),e.setCss("buttons-right",o),e.setCss("back-button",o),o[ionic.CSS.TRANSFORM]="translate3d("+i+"px,0,0)",e.setCss("back-text",o),o[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e.setCss("title",o)}function r(e,t,n){if(e&&t){var i=(e.titleTextX()+e.titleWidth())*(1-n),r=t&&(t.titleTextX()-e.backButtonTextLeft())*(1-n)||0;o(e,n,i,r)}}function a(e,t,n){if(e&&t){var i=(-(e.titleTextX()-t.backButtonTextLeft())-e.titleLeftRight())*n;o(e,1-n,i,0)}}var c={run:function(n){var i=e.controller(),o=t&&t.controller();"back"==c.direction?(a(i,o,1-n),r(o,i,1-n)):(r(i,o,n),a(o,i,n))},direction:n,shouldAnimate:i&&("forward"==n||"back"==n)};return c},o.transitions.views.android=function(e,t,n,i){function o(e,t,n){var i={};i[ionic.CSS.TRANSITION_DURATION]=r.shouldAnimate?"":0,i[ionic.CSS.TRANSFORM]="translate3d("+t+"%,0,0)",i.opacity=n,ionic.DomUtil.cachedStyles(e,i)}i=i&&("forward"==n||"back"==n);var r={run:function(i){"forward"==n?(o(e,99*(1-i),1),o(t,-100*i,1)):"back"==n?(o(e,-100*(1-i),1),o(t,100*i,1)):(o(e,0,1),o(t,0,0))},shouldAnimate:i};return r},o.transitions.navBar.android=function(e,t,n,i){function o(e,t){if(e){var n={};n.opacity=1===t?"":t,e.setCss("buttons-left",n),e.setCss("buttons-right",n),e.setCss("back-button",n),e.setCss("back-text",n),e.setCss("title",n)}}return{run:function(n){o(e.controller(),n),o(t&&t.controller(),1-n)},shouldAnimate:i&&("forward"==n||"back"==n)
+}},o.transitions.views.none=function(e,t){return{run:function(n){o.transitions.views.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},o.transitions.navBar.none=function(e,t){return{run:function(n){o.transitions.navBar.ios(e,t,!1,!1).run(n),o.transitions.navBar.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},o.setPlatformConfig=e,o.$get=function(){return o}}).config(["$compileProvider",function(e){e.aHrefSanitizationWhitelist(/^\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0):/),e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0):|data:image\//)}]);var p='<div class="loading-container"><div class="loading"></div></div>';a.constant("$ionicLoadingConfig",{template:"<ion-spinner></ion-spinner>"}).factory("$ionicLoading",["$ionicLoadingConfig","$ionicBody","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform","$rootScope","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u,d){function f(){return m||(m=n.compile({template:p,appendTo:t.get()}).then(function(e){return e.show=function(a){var c=a.templateUrl?n.load(a.templateUrl):r.when(a.template||a.content||"");e.scope=a.scope||e.scope,e.isShown||(e.hasBackdrop=!a.noBackdrop&&a.showBackdrop!==!1,e.hasBackdrop&&(i.retain(),i.getElement().addClass("backdrop-loading"))),a.duration&&(o.cancel(e.durationTimeout),e.durationTimeout=o(angular.bind(e,e.hide),+a.duration)),$(),$=l.registerBackButtonAction(h,d.loading),c.then(function(n){if(n){var i=e.element.children();i.html(n),s(i.contents())(e.scope)}e.isShown&&(e.element.addClass("visible"),ionic.requestAnimationFrame(function(){e.isShown&&(e.element.addClass("active"),t.addClass("loading-active"))}))}),e.isShown=!0},e.hide=function(){$(),e.isShown&&(e.hasBackdrop&&(i.release(),i.getElement().removeClass("backdrop-loading")),e.element.removeClass("active"),t.removeClass("loading-active"),e.element.removeClass("visible"),ionic.requestAnimationFrame(function(){!e.isShown&&e.element.removeClass("visible")})),o.cancel(e.durationTimeout),e.isShown=!1;var n=e.element.children();n.html("")},e})),m}function v(t){t=c({},e||{},t||{});var n=t.delay||t.showDelay||0;return w(),b(),t.hideOnStateChange&&(w=u.$on("$stateChangeSuccess",g),b=u.$on("$stateChangeError",g)),o.cancel(y),y=o(h,n),y.then(f).then(function(e){return e.show(t)})}function g(){return w(),b(),o.cancel(y),f().then(function(e){return e.hide()})}var m,$=h,w=h,b=h,y=r.when();return{show:v,hide:g,_getLoader:f}}]),a.factory("$ionicModal",["$rootScope","$ionicBody","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$$q","$log","$ionicClickBlock","$window","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u,d){var p=ionic.views.Modal.inherit({initialize:function(e){ionic.views.Modal.prototype.initialize.call(this,e),this.animation=e.animation||"slide-in-up"},show:function(e){var n=this;if(n.scope.$$destroyed)return s.error("Cannot call "+n.viewType+".show() after remove(). Please create a new "+n.viewType+" instance."),a.when();l.show(600),m.add(n);var r=f(n.modalEl);n.el.classList.remove("hide"),i(function(){n._isShown&&t.addClass(n.viewType+"-open")},400,!1),n.el.parentElement||(r.addClass(n.animation),t.append(n.el));var c=r.data("$$ionicScrollController");return c&&c.resize(),e&&n.positionView&&(n.positionView(e,r),n._onWindowResize=function(){n._isShown&&n.positionView(e,r)},ionic.on("resize",n._onWindowResize,window)),r.addClass("ng-enter active").removeClass("ng-leave ng-leave-active"),n._isShown=!0,n._deregisterBackButton=o.registerBackButtonAction(n.hardwareBackButtonClose?angular.bind(n,n.hide):h,d.modal),ionic.views.Modal.prototype.show.call(n),i(function(){n._isShown&&(r.addClass("ng-enter-active"),ionic.trigger("resize"),n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".shown",n),n.el.classList.add("active"),n.scope.$broadcast("$ionicHeader.align"),n.scope.$broadcast("$ionicFooter.align"),n.scope.$broadcast("$ionic.modalPresented"))},20),i(function(){n._isShown&&(n.$el.on("touchmove",function(e){var t=ionic.DomUtil.getParentOrSelfWithClass(e.target,"scroll");t||e.preventDefault()}),n.$el.on("click",function(e){n.backdropClickToClose&&e.target===n.el&&m.isHighest(n)&&n.hide()}))},400)},hide:function(){var e=this,n=f(e.modalEl);return l.show(600),m.remove(e),e.el.classList.remove("active"),n.addClass("ng-leave"),i(function(){e._isShown||(n.addClass("ng-leave-active").removeClass("ng-enter ng-enter-active active"),e.scope.$broadcast("$ionic.modalRemoved"))},20,!1),e.$el.off("click"),e._isShown=!1,e.scope.$parent&&e.scope.$parent.$broadcast(e.viewType+".hidden",e),e._deregisterBackButton&&e._deregisterBackButton(),ionic.views.Modal.prototype.hide.call(e),e.positionView&&ionic.off("resize",e._onWindowResize,window),i(function(){g.length||t.removeClass(e.viewType+"-open"),e.el.classList.add("hide")},e.hideDelay||320)},remove:function(){var e,t,n=this;return n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".removed",n),n._isShown?t=n.hide():(e=a.defer(),e.resolve(),t=e.promise),t.then(function(){n.scope.$destroy(),n.$el.remove()})},isShown:function(){return!!this._isShown}}),v=function(t,i){var o=i.scope&&i.scope.$new()||e.$new(!0);i.viewType=i.viewType||"modal",c(o,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var r=n("<ion-"+i.viewType+">"+t+"</ion-"+i.viewType+">")(o);i.$el=r,i.el=r[0],i.modalEl=i.el.querySelector("."+i.viewType);var a=new p(i);return a.scope=o,i.scope||(o[i.viewType]=a),a},g=[],m={add:function(e){g.push(e)},remove:function(e){var t=g.indexOf(e);t>-1&&t<g.length&&g.splice(t,1)},isHighest:function(e){var t=g.indexOf(e);return t>-1&&t===g.length-1}};return{fromTemplate:function(e,t){var n=v(e,t||{});return n},fromTemplateUrl:function(e,t,n){var i;return angular.isFunction(t)&&(i=t,t=n),r.load(e).then(function(e){var n=v(e,t||{});return i&&i(n),n})},stack:m}}]),a.service("$ionicNavBarDelegate",ionic.DelegateService(["align","showBackButton","showBar","title","changeTitle","setTitle","getTitle","back","getPreviousTitle"])),a.service("$ionicNavViewDelegate",ionic.DelegateService(["clearCache"])),a.constant("IONIC_BACK_PRIORITY",{view:100,sideMenu:150,modal:200,actionSheet:300,popup:400,loading:500}).provider("$ionicPlatform",function(){return{$get:["$q","$ionicScrollDelegate",function(e,t){var n={onHardwareBackButton:function(e){ionic.Platform.ready(function(){document.addEventListener("backbutton",e,!1)})},offHardwareBackButton:function(e){ionic.Platform.ready(function(){document.removeEventListener("backbutton",e)})},$backButtonActions:{},registerBackButtonAction:function(e,t,i){n._hasBackButtonHandler||(n.$backButtonActions={},n.onHardwareBackButton(n.hardwareBackButtonClick),n._hasBackButtonHandler=!0);var o={id:i?i:ionic.Utils.nextUid(),priority:t?t:0,fn:e};return n.$backButtonActions[o.id]=o,function(){delete n.$backButtonActions[o.id]}},hardwareBackButtonClick:function(e){var t,i;for(i in n.$backButtonActions)(!t||n.$backButtonActions[i].priority>=t.priority)&&(t=n.$backButtonActions[i]);return t?(t.fn(e),t):void 0},is:function(e){return ionic.Platform.is(e)},on:function(e,t){return ionic.Platform.ready(function(){document.addEventListener(e,t,!1)}),function(){ionic.Platform.ready(function(){document.removeEventListener(e,t)})}},ready:function(n){var i=e.defer();return ionic.Platform.ready(function(){window.addEventListener("statusTap",function(){t.scrollTop(!0)}),i.resolve(),n&&n()}),i.promise}};return n}]}}),a.factory("$ionicPopover",["$ionicModal","$ionicPosition","$document","$window",function(e,t,n,i){function o(e,n){var o=f(e.target||e),a=t.offset(o),c=n.prop("offsetWidth"),s=n.prop("offsetHeight"),l=i.innerWidth,u=i.innerHeight,d={left:a.left+a.width/2-c/2},h=f(n[0].querySelector(".popover-arrow"));d.left<r?d.left=r:d.left+c+r>l&&(d.left=l-c-r),a.top+a.height+s>u&&a.top-s>0?(d.top=a.top-s,n.addClass("popover-bottom")):(d.top=a.top+a.height,n.removeClass("popover-bottom")),h.css({left:a.left+a.width/2-h.prop("offsetWidth")/2-d.left+"px"}),n.css({top:d.top+"px",left:d.left+"px",marginLeft:"0",opacity:"1"})}var r=6,a={viewType:"popover",hideDelay:1,animation:"none",positionView:o};return{fromTemplate:function(t,n){return e.fromTemplate(t,ionic.Utils.extend({},a,n))},fromTemplateUrl:function(t,n){return e.fromTemplateUrl(t,ionic.Utils.extend({},a,n))}}}]);var v='<div class="popup-container" ng-class="cssClass"><div class="popup"><div class="popup-head"><h3 class="popup-title" ng-bind-html="title"></h3><h5 class="popup-sub-title" ng-bind-html="subTitle" ng-if="subTitle"></h5></div><div class="popup-body"></div><div class="popup-buttons" ng-show="buttons.length"><button ng-repeat="button in buttons" ng-click="$buttonTapped(button, $event)" class="button" ng-class="button.type || \'button-default\'" ng-bind-html="button.text"></button></div></div></div>';a.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$ionicBody","$compile","$ionicPlatform","$ionicModal","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u){function d(t){t=c({scope:null,title:"",buttons:[]},t||{});var s={};return s.scope=(t.scope||o).$new(),s.element=f(v),s.responseDeferred=n.defer(),r.get().appendChild(s.element[0]),a(s.element)(s.scope),c(s.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,cssClass:t.cssClass,$buttonTapped:function(e,t){var n=(e.onTap||h).apply(s,[t]);t=t.originalEvent||t,t.defaultPrevented||s.responseDeferred.resolve(n)}}),n.when(t.templateUrl?e.load(t.templateUrl):t.template||t.content||"").then(function(e){var t=f(s.element[0].querySelector(".popup-body"));e?(t.html(e),a(t.contents())(s.scope)):t.remove()}),s.show=function(){s.isShown||s.removed||(l.stack.add(s),s.isShown=!0,ionic.requestAnimationFrame(function(){s.isShown&&(s.element.removeClass("popup-hidden"),s.element.addClass("popup-showing active"),m(s.element))}))},s.hide=function(e){return e=e||h,s.isShown?(l.stack.remove(s),s.isShown=!1,s.element.removeClass("active"),s.element.addClass("popup-hidden"),void i(e,250,!1)):e()},s.remove=function(){s.removed||(s.hide(function(){s.element.remove(),s.scope.$destroy()}),s.removed=!0)},s}function p(){var e=S[S.length-1];e&&e.responseDeferred.resolve()}function g(e){function n(){S.push(o),i(o.show,a,!1),o.responseDeferred.promise.then(function(e){var n=S.indexOf(o);return-1!==n&&S.splice(n,1),o.remove(),S.length>0?S[S.length-1].show():(t.release(),i(function(){S.length||r.removeClass("popup-open")},400,!1),(k._backButtonActionDone||h)()),e})}var o=k._createPopup(e),a=0;return S.length>0?(a=y.stackPushDelay,i(S[S.length-1].hide,a,!1)):(r.addClass("popup-open"),t.retain(),k._backButtonActionDone=s.registerBackButtonAction(p,u.popup)),o.responseDeferred.promise.close=function(e){o.removed||o.responseDeferred.resolve(e)},o.responseDeferred.notify({close:o.responseDeferred.close}),n(),o.responseDeferred.promise}function m(e){var t=e[0].querySelector("[autofocus]");t&&t.focus()}function $(e){return g(c({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function w(e){return g(c({buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){return!1}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function b(e){var t=o.$new(!0);t.data={},t.data.fieldtype=e.inputType?e.inputType:"text",t.data.response=e.defaultText?e.defaultText:"",t.data.placeholder=e.inputPlaceholder?e.inputPlaceholder:"",t.data.maxlength=e.maxLength?parseInt(e.maxLength):"";var n="";return e.template&&/<[a-z][\s\S]*>/i.test(e.template)===!1&&(n="<span>"+e.template+"</span>",delete e.template),g(c({template:n+'<input ng-model="data.response" type="{{ data.fieldtype }}"maxlength="{{ data.maxlength }}"placeholder="{{ data.placeholder }}">',scope:t,buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return t.data.response||""}}]},e||{}))}var y={stackPushDelay:75},S=[],k={show:g,alert:$,confirm:w,prompt:b,_createPopup:d,_popupStack:S};return k}]),a.factory("$ionicPosition",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var o=function(t){for(var n=e[0],o=t.offsetParent||n;o&&o!==n&&i(o);)o=o.offsetParent;return o||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},r=o(t[0]);r!=e[0]&&(i=this.offset(f(r)),i.top+=r.clientTop-r.scrollTop,i.left+=r.clientLeft-r.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}}]),a.service("$ionicScrollDelegate",ionic.DelegateService(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","zoomTo","zoomBy","getScrollPosition","anchorScroll","freezeScroll","freezeAllScrolls","getScrollView"])),a.service("$ionicSideMenuDelegate",ionic.DelegateService(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent","edgeDragThreshold"])),a.service("$ionicSlideBoxDelegate",ionic.DelegateService(["update","slide","select","enableSlide","previous","next","stop","autoPlay","start","currentIndex","selected","slidesCount","count","loop"])),a.service("$ionicTabsDelegate",ionic.DelegateService(["select","selectedIndex","showBar"])),function(){var e=[];a.factory("$ionicTemplateCache",["$http","$templateCache","$timeout",function(t,n,i){function o(e){return"undefined"==typeof e?r():(d(e)&&(e=[e]),s(e,function(e){c.push(e)}),void(a&&r()))}function r(){var e;if(o._runCount++,a=!0,0!==c.length){for(var s=0;4>s&&(e=c.pop());)d(e)&&t.get(e,{cache:n}),s++;c.length&&i(r,1e3)}}var a,c=e;return o._runCount=0,o}]).config(["$stateProvider","$ionicConfigProvider",function(t,n){var i=t.state;t.state=function(o,r){if("object"==typeof r){var a=r.prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch();if(a&&d(r.templateUrl)&&e.push(r.templateUrl),angular.isObject(r.views))for(var c in r.views)a=r.views[c].prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch(),a&&d(r.views[c].templateUrl)&&e.push(r.views[c].templateUrl)}return i.call(t,o,r)}}]).run(["$ionicTemplateCache",function(e){e()}])}(),a.factory("$ionicTemplateLoader",["$compile","$controller","$http","$q","$rootScope","$templateCache",function(e,t,n,i,o,r){function a(e){return n.get(e,{cache:r}).then(function(e){return e.data&&e.data.trim()})}function s(n){n=c({template:"",templateUrl:"",scope:null,controller:null,locals:{},appendTo:null},n||{});var r=n.templateUrl?this.load(n.templateUrl):i.when(n.template);return r.then(function(i){var r,a=n.scope||o.$new(),s=f("<div>").html(i).contents();return n.controller&&(r=t(n.controller,c(n.locals,{$scope:a})),s.children().data("$ngControllerController",r)),n.appendTo&&f(n.appendTo).append(s),e(s)(a),{element:s,scope:a}})}return{load:a,compile:s}}]),a.factory("$ionicViewService",["$ionicHistory","$log",function(e,t){function n(e,n){t.warn("$ionicViewService"+e+" is deprecated, please use $ionicHistory"+n+" instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/")}n("","");var i={getCurrentView:"currentView",getBackView:"backView",getForwardView:"forwardView",getCurrentStateName:"currentStateName",nextViewOptions:"nextViewOptions",clearHistory:"clearHistory"};return s(i,function(t,o){i[o]=function(){return n("."+o,"."+t),e[t].apply(this,arguments)}}),i}]),a.factory("$ionicViewSwitcher",["$timeout","$document","$q","$ionicClickBlock","$ionicConfig","$ionicNavBarDelegate",function(e,t,n,i,o,r){function a(e,t){return u(e)["abstract"]?u(e).name:t?t.stateId||t.viewId:ionic.Utils.nextUid()}function u(e){return e&&e.$$state&&e.$$state.self||{}}function d(e,t,n,i){var r=u(e),a=w||D(t,"view-transition")||r.viewTransition||o.views.transition()||"ios",s=o.navBar.transition();return n=b||D(t,"view-direction")||r.viewDirection||n||"none",c(h(i),{transition:a,navBarTransition:"view"===s?a:s,direction:n,shouldAnimate:"none"!==a&&"none"!==n})}function h(e){return e=e||{},{viewId:e.viewId,historyId:e.historyId,stateId:e.stateId,stateName:e.stateName,stateParams:e.stateParams}}function p(e,t){return arguments.length>1?void D(e,x,t):D(e,x)}function v(e){if(e&&e.length){var t=e.scope();t&&(t.$emit("$ionicView.unloaded",e.data(B)),t.$destroy()),e.remove()}}function g(e,t){var n=e.lastIndexOf("."),i=t.lastIndexOf(".");if(0>n||0>i)return!1;var o=e.substring(0,n),r=t.substring(0,i);return o===r}function m(e,t){if(!e)return null;var n=angular.element(e).attr("abstract"),i=angular.element(e).attr("state");if("true"!==n)return i===t.stateName?angular.element(e).scope():null;for(var o=$(e),r=0;r<o.length;r++){var a=angular.element(o[r]).attr("state");if(a===t.stateName)return t.abstractView=!0,angular.element(o[r]).scope()}return null}function $(e){for(var t=[],n=angular.element(e).find("ion-nav-view"),i=0;i<n.length;i++){for(var o=angular.element(n[i]).children(),r=[],a=0;a<o.length;a++)r=r.concat(o[a]);t=t.concat(r)}return t}var w,b,y="webkitTransitionEnd transitionend",S="$noCache",k="$destroyEle",C="$eleId",T="$accessed",I="$fallbackTimer",B="$viewData",x="nav-view",A="active",V="cached",E="stage",P=0;ionic.transition=ionic.transition||{},ionic.transition.isActive=!1;var _,D=ionic.DomUtil.cachedAttr,L=[],R=1100,M={create:function(t,s,f,$,x,_){var N,z,O,H=++P,q={init:function(e,t){M.isTransitioning(!0),q.loadViewElements(e),q.render(e,function(){t&&t()})},loadViewElements:function(e){var n,i,o,r=t.getViewElements(),c=a(s,f),u=t.activeEleId();for(n=0,i=r.length;i>n&&(o=r.eq(n),o.data(C)===c?o.data(S)?(o.data(C,c+ionic.Utils.nextUid()),o.data(k,!0)):N=o:l(u)&&o.data(C)===u&&(z=o),!N||!z);n++);O=!!N,O||(N=e.ele||M.createViewEle(s),N.data(C,c)),_&&t.activeEleId(c),e.ele=null},render:function(e,n){if(O)ionic.Utils.reconnectScope(N.scope());else{p(N,E);var i=d(s,N,e.direction,f),r=o.transitions.views[i.transition]||o.transitions.views.none;r(N,null,i.direction,!0).run(0),N.data(B,{viewId:i.viewId,historyId:i.historyId,stateName:i.stateName,stateParams:i.stateParams}),(u(s).cache===!1||"false"===u(s).cache||"false"==N.attr("cache-view")||0===o.views.maxCache())&&N.data(S,!0);var a=t.appendViewElement(N,s);delete i.direction,delete i.transition,a.$emit("$ionicView.loaded",i)}N.data(T,Date.now()),n&&n()},transition:function(a,l,u){function v(){p(N,F.shouldAnimate?"entering":A),p(z,F.shouldAnimate?"leaving":V),F.run(1),r._instances.forEach(function(e){e.triggerTransitionStart(H)}),F.shouldAnimate||m()}function g(e){e.target===this&&m()}function m(){m.x||(m.x=!0,N.off(y,g),e.cancel(N.data(I)),z&&e.cancel(z.data(I)),C&&C.resolve(t),H===P&&(n.all(L).then(M.transitionEnd),q.emit("after",T,B),q.cleanup(T)),r._instances.forEach(function(e){e.triggerTransitionEnd()}),w=b=f=$=N=z=null)}function S(e){e.target===this&&k()}function k(){p(N,V),p(z,A),N.off(y,S),e.cancel(N.data(I)),M.transitionEnd([t])}var C,T=d(s,N,a,f),B=c(c({},T),h($));T.transitionId=B.transitionId=H,T.fromCache=!!O,T.enableBack=!!l,T.renderStart=x,T.renderEnd=_,D(N.parent(),"nav-view-transition",T.transition),D(N.parent(),"nav-view-direction",T.direction),e.cancel(N.data(I));var U=o.transitions.views[T.transition]||o.transitions.views.none,F=U(N,z,T.direction,T.shouldAnimate&&u&&_);if(F.shouldAnimate&&(N.on(y,g),N.data(I,e(m,R)),i.show(R)),x&&(q.emit("before",T,B),p(N,E),F.run(0)),_&&(C=n.defer(),L.push(C.promise)),x&&_)e(function(){ionic.requestAnimationFrame(v)});else{if(!_)return p(N,"entering"),p(z,"leaving"),{run:F.run,cancel:function(t){t?(N.on(y,S),N.data(I,e(k,R)),i.show(R)):k(),F.shouldAnimate=t,F.run(0),F=null}};_&&v()}},emit:function(e,t,n){var i,o=m(N,t),r=m(z,n);!t.viewId||t.abstractView?r&&(r.$emit("$ionicView.beforeLeave",n),r.$emit("$ionicView.leave",n),r.$emit("$ionicView.afterLeave",n),r.$broadcast("$ionicParentView.beforeLeave",n),r.$broadcast("$ionicParentView.leave",n),r.$broadcast("$ionicParentView.afterLeave",n)):("after"==e&&(o&&(o.$emit("$ionicView.enter",t),o.$broadcast("$ionicParentView.enter",t)),r?(r.$emit("$ionicView.leave",n),r.$broadcast("$ionicParentView.leave",n)):o&&n&&n.viewId&&t.stateName!==n.stateName&&(i=g(t.stateName,n.stateName),i&&o.$emit("$ionicNavView.leave",n))),o&&(o.$emit("$ionicView."+e+"Enter",t),o.$broadcast("$ionicParentView."+e+"Enter",t)),r?(r.$emit("$ionicView."+e+"Leave",n),r.$broadcast("$ionicParentView."+e+"Leave",n)):o&&n&&n.viewId&&t.stateName!==n.stateName&&(i=g(t.stateName,n.stateName),i&&o.$emit("$ionicNavView."+e+"Leave",n)))},cleanup:function(e){z&&"back"==e.direction&&!o.views.forwardCache()&&v(z);var n,i,r,a=t.getViewElements(),c=a.length,s=c-1>o.views.maxCache(),l=Date.now();for(n=0;c>n;n++)i=a.eq(n),s&&i.data(T)<l?(l=i.data(T),r=a.eq(n)):i.data(k)&&p(i)!=A&&v(i);v(r),N.data(S)&&N.data(k,!0)},enteringEle:function(){return N},leavingEle:function(){return z}};return q},transitionEnd:function(e){s(e,function(e){e.transitionEnd()}),M.isTransitioning(!1),i.hide(),L=[]},nextTransition:function(e){w=e},nextDirection:function(e){b=e},isTransitioning:function(t){return arguments.length&&(ionic.transition.isActive=!!t,e.cancel(_),t&&(_=e(function(){M.isTransitioning(!1)},999))),ionic.transition.isActive},createViewEle:function(e){var n=t[0].createElement("div");return e&&e.$template&&(n.innerHTML=e.$template,1===n.children.length)?(n.children[0].classList.add("pane"),e.$$state&&e.$$state.self&&e.$$state.self["abstract"]?angular.element(n.children[0]).attr("abstract","true"):e.$$state&&e.$$state.self&&angular.element(n.children[0]).attr("state",e.$$state.self.name),f(n.children[0])):(n.className="pane",f(n))},viewEleIsActive:function(e,t){p(e,t?A:V)},getTransitionData:d,navViewAttr:p,destroyViewEle:v};return M}]),angular.module("ngIOS9UIWebViewPatch",["ng"]).config(["$provide",function(e){"use strict";e.decorator("$browser",["$delegate","$window",function(e,t){function n(e){return/(iPhone|iPad|iPod).* OS 9_\d/.test(e)&&!/Version\/9\./.test(e)}function i(e){function t(){n=null}var n=null,i=e.url;return e.url=function(){return arguments.length?(n=arguments[0],i.apply(e,arguments)):n||i.apply(e,arguments)},window.addEventListener("popstate",t,!1),window.addEventListener("hashchange",t,!1),e}return n(t.navigator.userAgent)?i(e):e}])}]),a.config(["$provide",function(e){e.decorator("$compile",["$delegate",function(e){return e.$$addScopeInfo=function(e,t,n,i){var o=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(o,t)},e}])}]),a.config(["$provide",function(e){function t(e,t){return e.__hash=e.hash,e.hash=function(n){return l(n)&&n.length>0&&t(function(){var e=document.querySelector(".scroll-content");e&&(e.scrollTop=0)},0,!1),e.__hash(n)},e}e.decorator("$location",["$delegate","$timeout",t])}]),a.controller("$ionicHeaderBar",["$scope","$element","$attrs","$q","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r){function a(e){return C[e]||(C[e]=t[0].querySelector("."+e)),C[e]}var c="title",s="back-text",l="back-button",u="default-title",d="previous-title",f="hide",h=this,p="",v="",g=0,m=0,$="",w=!1,b=!0,y=!0,S=!1,k=0;h.beforeEnter=function(t){e.$broadcast("$ionicView.beforeEnter",t)},h.title=function(e){return arguments.length&&e!==p&&(a(c).innerHTML=e,p=e,k=0),p},h.enableBack=function(e,t){return arguments.length&&(w=e,t||h.updateBackButton()),w},h.showBack=function(e,t){return arguments.length&&(b=e,t||h.updateBackButton()),b},h.showNavBack=function(e){y=e,h.updateBackButton()},h.updateBackButton=function(){var e;(b&&y&&w)!==S&&(S=b&&y&&w,e=a(l),e&&e.classList[S?"remove":"add"](f)),w&&(e=e||a(l),e&&(h.backButtonIcon!==o.backButton.icon()&&(e=a(l+" .icon"),e&&(h.backButtonIcon=o.backButton.icon(),e.className="icon "+h.backButtonIcon)),h.backButtonText!==o.backButton.text()&&(e=a(l+" .back-text"),e&&(e.textContent=h.backButtonText=o.backButton.text()))))},h.titleTextWidth=function(){var e=a(c);if(e)for(var t=angular.element(e).children(),n=0;n<t.length;n++)if(angular.element(t[n]).hasClass("nav-bar-title")){e=t[n];break}var i=ionic.DomUtil.getTextBounds(e);return k=Math.min(i&&i.width||30)},h.titleWidth=function(){var e=h.titleTextWidth(),t=a(c).offsetWidth;return e>t&&(e=t+(g-m-5)),e},h.titleTextX=function(){return t[0].offsetWidth/2-h.titleWidth()/2},h.titleLeftRight=function(){return g-m},h.backButtonTextLeft=function(){for(var e=0,t=a(s);t;)e+=t.offsetLeft,t=t.parentElement;return e},h.resetBackButton=function(e){if(o.backButton.previousTitleText()){var t=a(d);if(t){t.classList.remove(f);var n=e&&r.getViewById(e.viewId),i=r.backTitle(n);i!==v&&(v=t.innerHTML=i)}var c=a(u);c&&c.classList.remove(f)}},h.align=function(e){var i=a(c);e=e||n.alignTitle||o.navBar.alignTitle();var r=h.calcWidths(e,!1);if(b&&v&&o.backButton.previousTitleText()){var s=h.calcWidths(e,!0),l=t[0].offsetWidth-s.titleLeft-s.titleRight;h.titleTextWidth()<=l&&(r=s)}return h.updatePositions(i,r.titleLeft,r.titleRight,r.buttonsLeft,r.buttonsRight,r.css,r.showPrevTitle)},h.calcWidths=function(e,n){var i,o,r,h,p,v,g,m,$,w=a(c),y=a(l),S=t[0].childNodes,k=0,C=0,T=0,I=0,B="",x=0;for(i=0;i<S.length;i++){if(p=S[i],g=0,1==p.nodeType){if(p===w){$=!0;continue}if(p.classList.contains(f))continue;if(b&&p===y){for(o=0;o<p.childNodes.length;o++)if(h=p.childNodes[o],1==h.nodeType)if(h.classList.contains(s))for(r=0;r<h.children.length;r++)if(v=h.children[r],n){if(v.classList.contains(u))continue;x+=v.offsetWidth}else{if(v.classList.contains(d))continue;x+=v.offsetWidth}else x+=h.offsetWidth;else 3==h.nodeType&&h.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(h),x+=m&&m.width||0);g=x||p.offsetWidth}else g=p.offsetWidth}else 3==p.nodeType&&p.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(p),g=m&&m.width||0);$?C+=g:k+=g}if("left"==e)B="title-left",k&&(T=k+15),C&&(I=C+15);else if("right"==e)B="title-right",k&&(T=k+15),C&&(I=C+15);else{var A=Math.max(k,C)+10;A>10&&(T=I=A)}return{backButtonWidth:x,buttonsLeft:k,buttonsRight:C,titleLeft:T,titleRight:I,showPrevTitle:n,css:B}},h.updatePositions=function(e,n,r,c,s,l,p){var v=i.defer();if(e&&(n!==g&&(e.style.left=n?n+"px":"",g=n),r!==m&&(e.style.right=r?r+"px":"",m=r),l!==$&&(l&&e.classList.add(l),$&&e.classList.remove($),$=l)),o.backButton.previousTitleText()){var w=a(d),b=a(u);w&&w.classList[p?"remove":"add"](f),b&&b.classList[p?"add":"remove"](f)}return ionic.requestAnimationFrame(function(){if(e&&e.offsetWidth+10<e.scrollWidth){var n=s+5,i=t[0].offsetWidth-g-h.titleTextWidth()-20;r=n>i?n:i,r!==m&&(e.style.right=r+"px",m=r)}v.resolve()}),v.promise},h.setCss=function(e,t){ionic.DomUtil.cachedStyles(a(e),t)};var C={};e.$on("$destroy",function(){for(var e in C)C[e]=null})}]),a.controller("$ionInfiniteScroll",["$scope","$attrs","$element","$timeout",function(e,t,n,i){function o(){ionic.requestAnimationFrame(function(){n[0].classList.add("active")}),s.isLoading=!0,e.$parent&&e.$parent.$apply(t.onInfinite||"")}function r(){ionic.requestAnimationFrame(function(){n[0].classList.remove("active")}),i(function(){s.jsScrolling&&s.scrollView.resize(),(s.jsScrolling&&s.scrollView.__container&&s.scrollView.__container.offsetHeight>0||!s.jsScrolling)&&s.checkBounds()},30,!1),s.isLoading=!1}function a(){if(!s.isLoading){var e={};if(s.jsScrolling){e=s.getJSMaxScroll();var t=s.scrollView.getValues();(-1!==e.left&&t.left>=e.left||-1!==e.top&&t.top>=e.top)&&o()}else e=s.getNativeMaxScroll(),(-1!==e.left&&s.scrollEl.scrollLeft>=e.left-s.scrollEl.clientWidth||-1!==e.top&&s.scrollEl.scrollTop>=e.top-s.scrollEl.clientHeight)&&o()}}function c(e){var n=(t.distance||"2.5%").trim(),i=-1!==n.indexOf("%");return i?e*(1-parseFloat(n)/100):e-parseFloat(n)}var s=this;s.isLoading=!1,e.icon=function(){return l(t.icon)?t.icon:"ion-load-d"},e.spinner=function(){return l(t.spinner)?t.spinner:""},e.$on("scroll.infiniteScrollComplete",function(){r()}),e.$on("$destroy",function(){s.scrollCtrl&&s.scrollCtrl.$element&&s.scrollCtrl.$element.off("scroll",s.checkBounds),s.scrollEl&&s.scrollEl.removeEventListener&&s.scrollEl.removeEventListener("scroll",s.checkBounds)}),s.checkBounds=ionic.Utils.throttle(a,300),s.getJSMaxScroll=function(){var e=s.scrollView.getScrollMax();return{left:s.scrollView.options.scrollingX?c(e.left):-1,top:s.scrollView.options.scrollingY?c(e.top):-1}},s.getNativeMaxScroll=function(){var e={left:s.scrollEl.scrollWidth,top:s.scrollEl.scrollHeight},t=window.getComputedStyle(s.scrollEl)||{};return{left:!e.left||"scroll"!==t.overflowX&&"auto"!==t.overflowX&&"scroll"!==s.scrollEl.style["overflow-x"]?-1:c(e.left),top:!e.top||"scroll"!==t.overflowY&&"auto"!==t.overflowY&&"scroll"!==s.scrollEl.style["overflow-y"]?-1:c(e.top)}},s.__finishInfiniteScroll=r}]),a.service("$ionicListDelegate",ionic.DelegateService(["showReorder","showDelete","canSwipeItems","closeOptionButtons"])).controller("$ionicList",["$scope","$attrs","$ionicListDelegate","$ionicHistory",function(e,t,n,i){var o=this,r=!0,a=!1,c=!1,s=n._registerInstance(o,t.delegateHandle,function(){return i.isActiveScope(e)});e.$on("$destroy",s),o.showReorder=function(e){return arguments.length&&(a=!!e),a},o.showDelete=function(e){return arguments.length&&(c=!!e),c},o.canSwipeItems=function(e){return arguments.length&&(r=!!e),r},o.closeOptionButtons=function(){o.listView&&o.listView.clearDragEffects()}}]),a.controller("$ionicNavBar",["$scope","$element","$attrs","$compile","$timeout","$ionicNavBarDelegate","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r,a,c){function u(e,t){var n=console.warn||console.log;n&&n.call(console,"navBarController."+e+" is deprecated, please use "+t+" instead")}function d(e){return x[e]?f(x[e]):void 0}function h(){for(var e=0;e<B.length;e++)if(B[e].isActive)return B[e]}function p(){for(var e=0;e<B.length;e++)if(!B[e].isActive)return B[e]}function v(e,t){e&&ionic.DomUtil.cachedAttr(e.containerEle(),"nav-bar",t)}function g(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}var m,$,w,b="hide",y="$ionNavBarController",S="primaryButtons",k="secondaryButtons",C="backButton",T="primaryButtons secondaryButtons leftButtons rightButtons title".split(" "),I=this,B=[],x={},A=!0;t.parent().data(y,I);var V=n.delegateHandle||"navBar"+ionic.Utils.nextUid(),E=r._registerInstance(I,V);I.init=function(){t.addClass("nav-bar-container"),ionic.DomUtil.cachedAttr(t,"nav-bar-transition",a.views.transition()),I.createHeaderBar(!1),I.createHeaderBar(!0),e.$emit("ionNavBar.init",V)},I.createHeaderBar=function(o){function r(e,t){e&&("title"===t?g.append(e):"rightButtons"==t||t==k&&"left"!=a.navBar.positionSecondaryButtons()||t==S&&"right"==a.navBar.positionPrimaryButtons()?(v||(v=f('<div class="buttons buttons-right">'),h.append(v)),t==k?v.append(e):v.prepend(e)):(p||(p=f('<div class="buttons buttons-left">'),m[C]?m[C].after(p):h.prepend(p)),t==k?p.append(e):p.prepend(e)))}var c=f('<div class="nav-bar-block">');ionic.DomUtil.cachedAttr(c,"nav-bar",o?"active":"cached");var u=n.alignTitle||a.navBar.alignTitle(),h=f("<ion-header-bar>").addClass(n["class"]).attr("align-title",u);l(n.noTapScroll)&&h.attr("no-tap-scroll",n.noTapScroll);var p,v,g=f('<div class="title title-'+u+'">'),m={},$={};m[C]=d(C),m[C]&&h.append(m[C]),h.append(g),s(T,function(e){m[e]=d(e),r(m[e],e)});for(var w=0;w<h[0].children.length;w++)h[0].children[w].classList.add("header-item");c.append(h),t.append(i(c)(e.$new()));var y=h.data("$ionHeaderBarController");y.backButtonIcon=a.backButton.icon(),y.backButtonText=a.backButton.text();var I={isActive:o,title:function(e){y.title(e)},setItem:function(e,t){I.removeItem(t),e?("title"===t&&I.title(""),r(e,t),m[t]&&m[t].addClass(b),$[t]=e):m[t]&&m[t].removeClass(b)},removeItem:function(e){$[e]&&($[e].scope().$destroy(),$[e].remove(),$[e]=null)},containerEle:function(){return c},headerBarEle:function(){return h},afterLeave:function(){
+s(T,function(e){I.removeItem(e)}),y.resetBackButton()},controller:function(){return y},destroy:function(){s(T,function(e){I.removeItem(e)}),c.scope().$destroy();for(var e in m)m[e]&&(m[e].removeData(),m[e]=null);p&&p.removeData(),v&&v.removeData(),g.removeData(),h.removeData(),c.remove(),c=h=g=p=v=null}};return B.push(I),I},I.navElement=function(e,t){return l(t)&&(x[e]=t),x[e]},I.update=function(e){var t=!e.hasHeaderBar&&e.showNavBar;e.transition=a.views.transition(),t||(e.direction="none"),I.enable(t);var n=I.isInitialized?p():h(),i=I.isInitialized?h():null,o=n.controller();o.enableBack(e.enableBack,!0),o.showBack(e.showBack,!0),o.updateBackButton(),I.title(e.title,n),I.showBar(t),e.navBarItems&&s(T,function(t){n.setItem(e.navBarItems[t],t)}),I.transition(n,i,e),I.isInitialized=!0,g("")},I.transition=function(n,i,r){function c(){for(var e=0;e<B.length;e++)B[e].isActive=!1;n.isActive=!0,v(n,"active"),v(i,"cached"),I.activeTransition=d=$=null}var s=n.controller(),l=a.transitions.navBar[r.navBarTransition]||a.transitions.navBar.none,u=r.transitionId;s.beforeEnter(r);var d=l(n,i,r.direction,r.shouldAnimate&&I.isInitialized);ionic.DomUtil.cachedAttr(t,"nav-bar-transition",r.navBarTransition),ionic.DomUtil.cachedAttr(t,"nav-bar-direction",r.direction),d.shouldAnimate&&r.renderEnd?v(n,"stage"):(v(n,"entering"),v(i,"leaving")),s.resetBackButton(r),d.run(0),I.activeTransition={run:function(e){d.shouldAnimate=!1,d.direction="back",d.run(e)},cancel:function(t,o,r){g(o),v(i,"active"),v(n,"cached"),d.shouldAnimate=t,d.run(0),I.activeTransition=d=null;var a;r.showBar!==I.showBar()&&I.showBar(r.showBar),r.showBackButton!==I.showBackButton()&&I.showBackButton(r.showBackButton),a&&e.$apply()},complete:function(e,t){g(t),d.shouldAnimate=e,d.run(1),$=c}},o(s.align,16),(m=function(){w===u&&(v(n,"entering"),v(i,"leaving"),d.run(1),$=function(){w!=u&&d.shouldAnimate||c()},m=null)})()},I.triggerTransitionStart=function(e){w=e,m&&m()},I.triggerTransitionEnd=function(){$&&$()},I.showBar=function(t){return arguments.length&&(I.visibleBar(t),e.$parent.$hasHeader=!!t),!!e.$parent.$hasHeader},I.visibleBar=function(e){e&&!A?(t.removeClass(b),I.align()):!e&&A&&t.addClass(b),A=e},I.enable=function(e){I.visibleBar(e);for(var t=0;t<r._instances.length;t++)r._instances[t]!==I&&r._instances[t].visibleBar(!1)},I.showBackButton=function(t){if(arguments.length){for(var n=0;n<B.length;n++)B[n].controller().showNavBack(!!t);e.$isBackButtonShown=!!t}return e.$isBackButtonShown},I.showActiveBackButton=function(e){var t=h();return t?arguments.length?t.controller().showBack(e):t.controller().showBack():void 0},I.title=function(t,n){return l(t)&&(t=t||"",n=n||h(),n&&n.title(t),e.$title=t,c.currentTitle(t)),e.$title},I.align=function(e,t){t=t||h(),t&&t.controller().align(e)},I.hasTabsTop=function(e){t[e?"addClass":"removeClass"]("nav-bar-tabs-top")},I.hasBarSubheader=function(e){t[e?"addClass":"removeClass"]("nav-bar-has-subheader")},I.changeTitle=function(e){u("changeTitle(val)","title(val)"),I.title(e)},I.setTitle=function(e){u("setTitle(val)","title(val)"),I.title(e)},I.getTitle=function(){return u("getTitle()","title()"),I.title()},I.back=function(){u("back()","$ionicHistory.goBack()"),c.goBack()},I.getPreviousTitle=function(){u("getPreviousTitle()","$ionicHistory.backTitle()"),c.goBack()},e.$on("$destroy",function(){e.$parent.$hasHeader=!1,t.parent().removeData(y);for(var n=0;n<B.length;n++)B[n].destroy();t.remove(),t=B=null,E()})}]),a.controller("$ionicNavView",["$scope","$element","$attrs","$compile","$controller","$ionicNavBarDelegate","$ionicNavViewDelegate","$ionicHistory","$ionicViewSwitcher","$ionicConfig","$ionicScrollDelegate","$ionicSideMenuDelegate",function(e,t,n,i,o,r,a,s,l,u,d,f){function h(e,n){for(var i,o,r=t.children(),a=0,c=r.length;c>a;a++)if(i=r.eq(a),V(i)==I){o=i.scope(),o&&o.$emit(e.name.replace("Tabs","View"),n),o&&o.$broadcast(e.name.replace("Tabs","ParentView"),n);break}}function p(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}function v(e,t){var n=m();n&&n.hasTabsTop(t)}function g(e,t){var n=m();n&&n.hasBarSubheader(t)}function m(){if(w)for(var e=0;e<r._instances.length;e++)if(r._instances[e].$$delegateHandle==w)return r._instances[e];return t.inheritedData("$ionNavBarController")}var $,w,b,y,S,k="$eleId",C="$destroyEle",T="$noCache",I="active",B="cached",x=this,A=!1,V=l.navViewAttr;x.scope=e,x.element=t,x.init=function(){var i=n.name||"",o=t.parent().inheritedData("$uiView"),r=o&&o.state?o.state.name:"";i.indexOf("@")<0&&(i=i+"@"+r);var c={name:i,state:null};t.data("$uiView",c);var s=a._registerInstance(x,n.delegateHandle);return e.$on("$destroy",function(){s(),x.isSwipeFreeze&&d.freezeAllScrolls(!1)}),e.$on("$ionicHistory.deselect",x.cacheCleanup),e.$on("$ionicTabs.top",v),e.$on("$ionicSubheader",g),e.$on("$ionicTabs.beforeLeave",h),e.$on("$ionicTabs.afterLeave",h),e.$on("$ionicTabs.leave",h),ionic.Platform.ready(function(){ionic.Platform.isWebView()&&ionic.Platform.isIOS()&&x.initSwipeBack()}),c},x.register=function(t){var n=c({},s.currentView()),i=s.register(e,t);x.update(i);var o=s.getViewById(i.viewId)||{},r=y!==i.viewId;x.render(i,t,o,n,r,!0)},x.update=function(e){A=!0,$=e.direction;var n=t.parent().inheritedData("$ionNavViewController");n&&(n.isPrimary(!1),("enter"===$||"exit"===$)&&(n.direction($),"enter"===$&&($="none")))},x.render=function(e,t,n,i,o,r){var a=l.create(x,t,n,i,o,r);a.init(e,function(){a.transition(x.direction(),e.enableBack,!S),y=S=null})},x.beforeEnter=function(e){if(A){w=e.navBarDelegate;var t=m();t&&t.update(e),p("")}},x.activeEleId=function(e){return arguments.length&&(b=e),b},x.transitionEnd=function(){var e,n,i,o=t.children();for(e=0,n=o.length;n>e;e++)i=o.eq(e),i.data(k)===b?V(i,I):("leaving"===V(i)||V(i)===I||V(i)===B)&&(i.data(C)||i.data(T)?l.destroyViewEle(i):(V(i,B),ionic.Utils.disconnectScope(i.scope())));p(""),x.isSwipeFreeze&&d.freezeAllScrolls(!1)},x.cacheCleanup=function(){for(var e=t.children(),n=0,i=e.length;i>n;n++)e.eq(n).data(C)&&l.destroyViewEle(e.eq(n))},x.clearCache=function(e){var n,i,o,r,a,c,s=t.children();for(o=0,r=s.length;r>o;o++)if(n=s.eq(o),e)for(c=n.data(k),a=0;a<e.length;a++)c===e[a]&&l.destroyViewEle(n);else V(n)==B?l.destroyViewEle(n):V(n)==I&&(i=n.scope(),i&&i.$broadcast("$ionicView.clearCache"))},x.getViewElements=function(){return t.children()},x.appendViewElement=function(n,r){var a=i(n);t.append(n);var c=e.$new();if(r&&r.$$controller){r.$scope=c;var s=o(r.$$controller,r);r.$$controllerAs&&(c[r.$$controllerAs]=s),t.children().data("$ngControllerController",s)}return a(c),c},x.title=function(e){var t=m();t&&t.title(e)},x.enableBackButton=function(e){var t=m();t&&t.enableBackButton(e)},x.showBackButton=function(e){var t=m();return t?arguments.length?t.showActiveBackButton(e):t.showActiveBackButton():!0},x.showBar=function(e){var t=m();return t?arguments.length?t.showBar(e):t.showBar():!0},x.isPrimary=function(e){return arguments.length&&(A=e),A},x.direction=function(e){return arguments.length&&($=e),$},x.initSwipeBack=function(){function n(e){if(A&&u.views.swipeBackEnabled()&&!f.isOpenRight()&&(k=r(e),!(k>T))){v=s.backView();var n=s.currentView();if(v&&v.historyId===n.historyId&&n.canSwipeBack!==!1){b||(b=window.innerWidth),x.isSwipeFreeze=d.freezeAllScrolls(!0);var a={direction:"back"};C=[],I={showBar:x.showBar(),showBackButton:x.showBackButton()};var p=l.create(x,a,v,n,!0,!1);p.loadViewElements(a),p.render(a),c=p.transition("back",s.enabledBack(v),!0),h=m(),$=ionic.onGesture("drag",i,t[0]),w=ionic.onGesture("release",o,t[0])}}}function i(e){if(A&&c){var t=r(e);if(C.push({t:Date.now(),x:t}),t>=b-15)o(e);else{var n=Math.min(Math.max(a(t),0),1);c.run(n),h&&h.activeTransition&&h.activeTransition.run(n)}}}function o(e){if(A&&c&&C&&C.length>1){for(var t=Date.now(),n=r(e),s=C[C.length-1],l=C.length-2;l>=0&&!(t-s.t>200);l--)s=C[l];var u=n>=C[C.length-2].x,f=a(n),g=Math.abs(s.x-n)/(t-s.t);if(y=v.viewId,S=.03>f||f>.97,u&&(f>.5||g>.1)){var m=g>.5||.05>g||n>b-45?"fast":"slow";p(S?"":m),v.go(),h&&h.activeTransition&&h.activeTransition.complete(!S,m)}else p(S?"":"fast"),y=null,c.cancel(!S),h&&h.activeTransition&&h.activeTransition.cancel(!S,"fast",I),S=null}ionic.offGesture($,"drag",i),ionic.offGesture(w,"release",o),b=c=C=null,x.isSwipeFreeze=d.freezeAllScrolls(!1)}function r(e){return ionic.tap.pointerCoord(e.gesture.srcEvent).x}function a(e){return(e-k)/b}var c,h,v,g,$,w,b,k,C,T=u.views.swipeBackHitWidth(),I={};g=ionic.onGesture("dragstart",n,t[0]),e.$on("$destroy",function(){ionic.offGesture(g,"dragstart",n),ionic.offGesture($,"drag",i),ionic.offGesture(w,"release",o),x.element=c=h=null})}}]),a.controller("$ionicRefresher",["$scope","$attrs","$element","$ionicBind","$timeout",function(e,t,n,i,o){function r(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],P=Math.floor(e.touches[0].screenY)}function a(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],P=e.touches[0].screenY}function c(){P=null,(D||T)&&(T?(T=!1,B=0,x>A?($(),p(A,E)):(p(0,E,m),I=!1)):(B=0,I=!1,h(!1)))}function s(e){if(e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],(P||"mousemove"!=e.type)&&D&&!(e.touches.length>1)){if(null===P&&(P=e.touches[0].screenY),_=e.touches[0].screenY-P,ionic.Platform.isAndroid()&&4.4===ionic.Platform.version()&&!ionic.Platform.isCrosswalk()&&0===S.scrollTop&&_>0&&(T=!0,e.preventDefault()),0>=_-B||0!==S.scrollTop)return I&&(I=!1,h(!1)),T&&f(S,_- -1*B),void(0!==x&&d(0));_>0&&0===S.scrollTop&&!I&&(B=_),e.preventDefault(),I||(I=!0,h(!0)),T=!0,d((_-B)/3),!V&&x>A?(V=!0,ionic.requestAnimationFrame(g)):V&&A>x&&(V=!1,ionic.requestAnimationFrame(m))}}function u(e){D=0===e.target.scrollTop||T}function d(e){k.style[ionic.CSS.TRANSFORM]="translate3d(0px, "+e+"px, 0px)",x=e}function f(e,t){e.scrollTop=t;var n=document.createEvent("UIEvents");n.initUIEvent("scroll",!0,!0,window,1),e.dispatchEvent(n)}function h(e){e?ionic.requestAnimationFrame(function(){k.classList.add("overscroll"),w()}):ionic.requestAnimationFrame(function(){k.classList.remove("overscroll"),b(),m()})}function p(e,t,n){function i(e){return--e*e*e+1}function o(){var c=Date.now(),s=Math.min(1,(c-r)/t),l=i(s);d(Math.floor(l*(e-a)+a)),1>s?ionic.requestAnimationFrame(o):(5>e&&e>-5&&(I=!1,h(!1)),n&&n())}var r=Date.now(),a=x;return a===e?void n():void ionic.requestAnimationFrame(o)}function v(){k&&(ionic.off(L,a,k),ionic.off(R,s,k),ionic.off(M,c,k),ionic.off("mousedown",r,k),ionic.off("mousemove",s,k),ionic.off("mouseup",c,k)),S&&ionic.off("scroll",u,S),S=null,k=null}function g(){n[0].classList.add("active"),e.$onPulling()}function m(){o(function(){n.removeClass("active refreshing refreshing-tail"),V&&(V=!1)},150)}function $(){n[0].classList.add("refreshing");var t=e.$onRefresh();t&&t.then&&t["finally"](function(){e.$broadcast("scroll.refreshComplete")})}function w(){n[0].classList.remove("invisible")}function b(){n[0].classList.add("invisible")}function y(){n[0].classList.add("refreshing-tail")}var S,k,C=this,T=!1,I=!1,B=0,x=0,A=60,V=!1,E=500,P=null,_=null,D=!0;l(t.pullingIcon)||t.$set("pullingIcon","ion-android-arrow-down"),e.showSpinner=!l(t.refreshingIcon)&&"none"!=t.spinner,e.showIcon=l(t.refreshingIcon),i(e,t,{pullingIcon:"@",pullingText:"@",refreshingIcon:"@",refreshingText:"@",spinner:"@",disablePullingRotation:"@",$onRefresh:"&onRefresh",$onPulling:"&onPulling"}),e.$on("scroll.refreshComplete",function(){o(function(){ionic.requestAnimationFrame(y),p(0,E,m),o(function(){I&&(I=!1,h(!1))},E)},E)});var L,R,M;window.navigator.pointerEnabled?(L="pointerdown",R="pointermove",M="pointerup"):window.navigator.msPointerEnabled?(L="MSPointerDown",R="MSPointerMove",M="MSPointerUp"):(L="touchstart",R="touchmove",M="touchend"),C.init=function(){if(S=n.parent().parent()[0],k=n.parent()[0],!(S&&S.classList.contains("ionic-scroll")&&k&&k.classList.contains("scroll")))throw new Error("Refresher must be immediate child of ion-content or ion-scroll");ionic.on(L,a,k),ionic.on(R,s,k),ionic.on(M,c,k),ionic.on("mousedown",r,k),ionic.on("mousemove",s,k),ionic.on("mouseup",c,k),ionic.on("scroll",u,S),e.$on("$destroy",v)},C.getRefresherDomMethods=function(){return{activate:g,deactivate:m,start:$,show:w,hide:b,tail:y}},C.__handleTouchmove=s,C.__getScrollChild=function(){return k},C.__getScrollParent=function(){return S}}]),a.controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$location","$document","$ionicScrollDelegate","$ionicHistory",function(e,t,n,i,o,r,a,c){var s=this;s.__timeout=n,s._scrollViewOptions=t,s.isNative=function(){return!!t.nativeScrolling};var u,d=s.element=t.el,h=s.$element=f(d);u=s.isNative()?s.scrollView=new ionic.views.ScrollNative(t):s.scrollView=new ionic.views.Scroll(t),(h.parent().length?h.parent():h).data("$$ionicScrollController",s);var p=a._registerInstance(s,t.delegateHandle,function(){return c.isActiveScope(e)});l(t.bouncing)||ionic.Platform.ready(function(){u&&u.options&&(u.options.bouncing=!0,ionic.Platform.isAndroid()&&(u.options.bouncing=!1,u.options.deceleration=.95))});var v=angular.bind(u,u.resize);angular.element(i).on("resize",v);var g=function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})};h.on("scroll",g),e.$on("$destroy",function(){p(),u&&u.__cleanup&&u.__cleanup(),angular.element(i).off("resize",v),h&&h.off("scroll",g),s._scrollViewOptions&&(s._scrollViewOptions.el=null),t&&(t.el=null),u=s.scrollView=t=s._scrollViewOptions=d=s.$element=h=null}),n(function(){u&&u.run&&u.run()}),s.getScrollView=function(){return u},s.getScrollPosition=function(){return u.getValues()},s.resize=function(){return n(v,0,!1).then(function(){h&&h.triggerHandler("scroll-resize")})},s.scrollTop=function(e){s.resize().then(function(){u&&u.scrollTo(0,0,!!e)})},s.scrollBottom=function(e){s.resize().then(function(){if(u){var t=u.getScrollMax();u.scrollTo(t.left,t.top,!!e)}})},s.scrollTo=function(e,t,n){s.resize().then(function(){u&&u.scrollTo(e,t,!!n)})},s.zoomTo=function(e,t,n,i){s.resize().then(function(){u&&u.zoomTo(e,!!t,n,i)})},s.zoomBy=function(e,t,n,i){s.resize().then(function(){u&&u.zoomBy(e,!!t,n,i)})},s.scrollBy=function(e,t,n){s.resize().then(function(){u&&u.scrollBy(e,t,!!n)})},s.anchorScroll=function(e){s.resize().then(function(){if(u){var t=o.hash(),n=t&&r[0].getElementById(t);if(!t||!n)return void u.scrollTo(0,0,!!e);var i=n,a=0,c=0;do null!==i&&(a+=i.offsetLeft),null!==i&&(c+=i.offsetTop),i=i.offsetParent;while(i.attributes!=s.element.attributes&&i.offsetParent);u.scrollTo(a,c,!!e)}})},s.freezeScroll=u.freeze,s.freezeScrollShut=u.freezeShut,s.freezeAllScrolls=function(e){for(var t=0;t<a._instances.length;t++)a._instances[t].freezeScroll(e)},s._setRefresher=function(e,t,n){s.refresher=t;var i=s.refresher.clientHeight||60;u.activatePullToRefresh(i,n)}}]),a.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform","$ionicBody","$ionicHistory","$ionicScrollDelegate","IONIC_BACK_PRIORITY","$rootScope",function(e,t,n,i,o,r,a,c,s){var l,d,f,p,v,g,m,$=this,w=!0;$.$scope=e,$.initialize=function(e){$.left=e.left,$.right=e.right,$.setContent(e.content),$.dragThresholdX=e.dragThresholdX||10,r.registerHistory($.$scope)},$.setContent=function(e){e&&($.content=e,$.content.onDrag=function(e){$._handleDrag(e)},$.content.endDrag=function(e){$._endDrag(e)})},$.isOpenLeft=function(){return $.getOpenAmount()>0},$.isOpenRight=function(){return $.getOpenAmount()<0},$.toggleLeft=function(e){if(!m&&$.left.isEnabled){var t=$.getOpenAmount();0===arguments.length&&(e=0>=t),$.content.enableAnimation(),e?($.openPercentage(100),s.$emit("$ionicSideMenuOpen","left")):($.openPercentage(0),s.$emit("$ionicSideMenuClose","left"))}},$.toggleRight=function(e){if(!m&&$.right.isEnabled){var t=$.getOpenAmount();0===arguments.length&&(e=t>=0),$.content.enableAnimation(),e?($.openPercentage(-100),s.$emit("$ionicSideMenuOpen","right")):($.openPercentage(0),s.$emit("$ionicSideMenuClose","right"))}},$.toggle=function(e){"right"==e?$.toggleRight():$.toggleLeft()},$.close=function(){$.openPercentage(0),s.$emit("$ionicSideMenuClose","left"),s.$emit("$ionicSideMenuClose","right")},$.getOpenAmount=function(){return $.content&&$.content.getTranslateX()||0},$.getOpenRatio=function(){var e=$.getOpenAmount();return e>=0?e/$.left.width:e/$.right.width},$.isOpen=function(){return 0!==$.getOpenAmount()},$.getOpenPercentage=function(){return 100*$.getOpenRatio()},$.openPercentage=function(e){var t=e/100;$.left&&e>=0?$.openAmount($.left.width*t):$.right&&0>e&&$.openAmount($.right.width*t),o.enableClass(0!==e,"menu-open"),$.content.setCanScroll(0==e)},$.openAmount=function(e){var t=$.left&&$.left.width||0,n=$.right&&$.right.width||0;return($.left&&$.left.isEnabled||!(e>0))&&($.right&&$.right.isEnabled||!(0>e))?d&&e>t?void $.content.setTranslateX(t):l&&-n>e?void $.content.setTranslateX(-n):($.content.setTranslateX(e),d=e>0,l=0>e,void(e>0?($.right&&$.right.pushDown&&$.right.pushDown(),$.left&&$.left.bringUp&&$.left.bringUp()):($.right&&$.right.bringUp&&$.right.bringUp(),$.left&&$.left.pushDown&&$.left.pushDown()))):void $.content.setTranslateX(0)},$.snapToRest=function(e){$.content.enableAnimation(),f=!1;var t=$.getOpenRatio();if(0===t)return void $.openPercentage(0);var n=.3,i=e.gesture.velocityX,o=e.gesture.direction;t>0&&.5>t&&"right"==o&&n>i?$.openPercentage(0):t>.5&&"left"==o&&n>i?$.openPercentage(100):0>t&&t>-.5&&"left"==o&&n>i?$.openPercentage(0):.5>t&&"right"==o&&n>i?$.openPercentage(-100):"right"==o&&t>=0&&(t>=.5||i>n)?$.openPercentage(100):"left"==o&&0>=t&&(-.5>=t||i>n)?$.openPercentage(-100):$.openPercentage(0)},$.enableMenuWithBackViews=function(e){return arguments.length&&(w=!!e),w},$.isAsideExposed=function(){return!!m},$.exposeAside=function(e){($.left&&$.left.isEnabled||$.right&&$.right.isEnabled)&&($.close(),m=e,$.left&&$.left.isEnabled&&$.right&&$.right.isEnabled?$.content.setMarginLeftAndRight(m?$.left.width:0,m?$.right.width:0):$.left&&$.left.isEnabled?$.content.setMarginLeft(m?$.left.width:0):$.right&&$.right.isEnabled&&$.content.setMarginRight(m?$.right.width:0),$.$scope.$emit("$ionicExposeAside",m))},$.activeAsideResizing=function(e){o.enableClass(e,"aside-resizing")},$._endDrag=function(e){m||(f&&$.snapToRest(e),p=null,v=null,g=null)},$._handleDrag=function(t){!m&&e.dragContent&&(p?v=t.gesture.touches[0].pageX:(p=t.gesture.touches[0].pageX,v=p),!f&&Math.abs(v-p)>$.dragThresholdX&&(p=v,f=!0,$.content.disableAnimation(),g=$.getOpenAmount()),f&&$.openAmount(g+(v-p)))},$.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},$.edgeThreshold=25,$.edgeThresholdEnabled=!1,$.edgeDragThreshold=function(e){return arguments.length&&(u(e)&&e>0?($.edgeThreshold=e,$.edgeThresholdEnabled=!0):$.edgeThresholdEnabled=!!e),$.edgeThresholdEnabled},$.isDraggableTarget=function(t){var n=$.edgeThresholdEnabled&&!$.isOpen(),i=t.gesture.startEvent&&t.gesture.startEvent.center&&t.gesture.startEvent.center.pageX,o=!n||i<=$.edgeThreshold||i>=$.content.element.offsetWidth-$.edgeThreshold,a=r.backView(),c=w?!0:!a;if(!c){var s=r.currentView()||{};return o&&a.historyId!==s.historyId}return(e.dragContent||$.isOpen())&&o&&!t.gesture.srcEvent.defaultPrevented&&c&&!t.target.tagName.match(/input|textarea|select|object|embed/i)&&!t.target.isContentEditable&&!(t.target.dataset?t.target.dataset.preventScroll:"true"==t.target.getAttribute("data-prevent-scroll"))},e.sideMenuContentTranslateX=0;var b=h,y=angular.bind($,$.close);e.$watch(function(){return 0!==$.getOpenAmount()},function(e){b(),e&&(b=i.registerBackButtonAction(y,c.sideMenu))});var S=n._registerInstance($,t.delegateHandle,function(){return r.isActiveScope(e)});e.$on("$destroy",function(){S(),b(),$.$scope=null,$.content&&($.content.setCanScroll(!0),$.content.element=null,$.content=null)}),$.initialize({left:{width:275},right:{width:275}})}]),function(e){function t(e,i,o,r){var a,c,s,l=document.createElement(f[e]||e);for(a in i)if(angular.isArray(i[a]))for(c=0;c<i[a].length;c++)if(i[a][c].fn)for(s=0;s<i[a][c].t;s++)t(a,i[a][c].fn(s,r),l,r);else t(a,i[a][c],l,r);else n(l,a,i[a]);o.appendChild(l)}function n(e,t,n){e.setAttribute(f[t]||t,n)}function i(e,t){var n=e.split(";"),i=n.slice(t),o=n.slice(0,n.length-i.length);return n=i.concat(o).reverse(),n.join(";")+";"+n[0]}function o(e,t){return e/=t/2,1>e?.5*e*e*e:(e-=2,.5*(e*e*e+2))}var r="translate(32,32)",c="stroke-opacity",s="round",l="indefinite",u="750ms",d="none",f={a:"animate",an:"attributeName",at:"animateTransform",c:"circle",da:"stroke-dasharray",os:"stroke-dashoffset",f:"fill",lc:"stroke-linecap",rc:"repeatCount",sw:"stroke-width",t:"transform",v:"values"},h={v:"0,32,32;360,32,32",an:"transform",type:"rotate",rc:l,dur:u},p={sw:4,lc:s,line:[{fn:function(e,t){return{y1:"ios"==t?17:12,y2:"ios"==t?29:20,t:r+" rotate("+(30*e+(6>e?180:-180))+")",a:[{fn:function(){return{an:c,dur:u,v:i("0;.1;.15;.25;.35;.45;.55;.65;.7;.85;1",e),rc:l}},t:1}]}},t:12}]},v={android:{c:[{sw:6,da:128,os:82,r:26,cx:32,cy:32,f:d}]},ios:p,"ios-small":p,bubbles:{sw:0,c:[{fn:function(e){return{cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:r,a:[{fn:function(){return{an:"r",dur:u,v:i("1;2;3;4;5;6;7;8",e),rc:l}},t:1}]}},t:8}]},circles:{c:[{fn:function(e){return{r:5,cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:r,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:i(".3;.3;.3;.4;.7;.85;.9;1",e),rc:l}},t:1}]}},t:8}]},crescent:{c:[{sw:4,da:128,os:82,r:26,cx:32,cy:32,f:d,at:[h]}]},dots:{c:[{fn:function(e){return{cx:16+16*e,cy:32,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:i(".5;.6;.8;1;.8;.6;.5",e),rc:l}},t:1},{fn:function(){return{an:"r",dur:u,v:i("4;5;6;5;4;3;3",e),rc:l}},t:1}]}},t:3}]},lines:{sw:7,lc:s,line:[{fn:function(e){return{x1:10+14*e,x2:10+14*e,a:[{fn:function(){return{an:"y1",dur:u,v:i("16;18;28;18;16",e),rc:l}},t:1},{fn:function(){return{an:"y2",dur:u,v:i("48;44;36;46;48",e),rc:l}},t:1},{fn:function(){return{an:c,dur:u,v:i("1;.8;.5;.4;1",e),rc:l}},t:1}]}},t:4}]},ripple:{f:d,"fill-rule":"evenodd",sw:3,circle:[{fn:function(e){return{cx:32,cy:32,a:[{fn:function(){return{an:"r",begin:-1*e+"s",dur:"2s",v:"0;24",keyTimes:"0;1",keySplines:"0.1,0.2,0.3,1",calcMode:"spline",rc:l}},t:1},{fn:function(){return{an:c,begin:-1*e+"s",dur:"2s",v:".2;1;.2;0",rc:l}},t:1}]}},t:2}]},spiral:{defs:[{linearGradient:[{id:"sGD",gradientUnits:"userSpaceOnUse",x1:55,y1:46,x2:2,y2:46,stop:[{offset:.1,"class":"stop1"},{offset:1,"class":"stop2"}]}]}],g:[{sw:4,lc:s,f:d,path:[{stroke:"url(#sGD)",d:"M4,32 c0,15,12,28,28,28c8,0,16-4,21-9"},{d:"M60,32 C60,16,47.464,4,32,4S4,16,4,32"}],at:[h]}]}},g={android:function(t){function i(){if(!r.stop){var t=o(Date.now()-a,650),d=1,f=0,h=188-58*t,p=182-182*t;c%2&&(d=-1,f=-64,h=128- -58*t,p=182*t);var v=[0,-101,-90,-11,-180,79,-270,-191][c];n(u,"da",Math.max(Math.min(h,188),128)),n(u,"os",Math.max(Math.min(p,182),0)),n(u,"t","scale("+d+",1) translate("+f+",0) rotate("+v+",32,32)"),s+=4.1,s>359&&(s=0),n(l,"t","rotate("+s+",32,32)"),t>=1&&(c++,c>7&&(c=0),a=Date.now()),e.requestAnimationFrame(i)}}var r={};this.stop=!1;var a,c=0,s=0,l=t.querySelector("g"),u=t.querySelector("circle");return function(){return a=Date.now(),i(),r}}};a.controller("$ionicSpinner",["$element","$attrs","$ionicConfig",function(e,n,i){var o,r;this.init=function(){o=n.icon||i.spinner.icon();var r=document.createElement("div");return t("svg",{viewBox:"0 0 64 64",g:[v[o]]},r,o),e.html(r.innerHTML),this.start(),o},this.start=function(){g[o]&&(r=g[o](e[0])())},this.stop=function(){g[o]&&(r.stop=!0)}}])}(ionic),a.controller("$ionicTab",["$scope","$ionicHistory","$attrs","$location","$state",function(e,t,n,i,o){this.$scope=e,this.hrefMatchesState=function(){return n.href&&0===i.path().indexOf(n.href.replace(/^#/,"").replace(/\/$/,""))},this.srefMatchesState=function(){return n.uiSref&&o.includes(n.uiSref.split("(")[0])},this.navNameMatchesState=function(){return this.navViewName&&t.isCurrentStateNavView(this.navViewName)},this.tabMatchesState=function(){return this.hrefMatchesState()||this.srefMatchesState()||this.navNameMatchesState()}}]),a.controller("$ionicTabs",["$scope","$element","$ionicHistory",function(e,t,n){var i,o=this,r=null,a=null,c=!0;o.tabs=[],o.selectedIndex=function(){return o.tabs.indexOf(r)},o.selectedTab=function(){return r},o.previousSelectedTab=function(){return a},o.add=function(e){n.registerHistory(e),o.tabs.push(e)},o.remove=function(e){var t=o.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(o.deselect(e),1===o.tabs.length);else{var n=t===o.tabs.length-1?t-1:t+1;o.select(o.tabs[n])}o.tabs.splice(t,1)}},o.deselect=function(e){e.$tabSelected&&(a=r,r=i=null,e.$tabSelected=!1,(e.onDeselect||h)(),e.$broadcast&&e.$broadcast("$ionicHistory.deselect"))},o.select=function(t,a){var c;if(u(t)){if(c=t,c>=o.tabs.length)return;t=o.tabs[c]}else c=o.tabs.indexOf(t);1===arguments.length&&(a=!(!t.navViewName&&!t.uiSref)),r&&r.$historyId==t.$historyId?a&&n.goToHistoryRoot(t.$historyId):i!==c&&(s(o.tabs,function(e){o.deselect(e)}),r=t,i=c,o.$scope&&o.$scope.$parent&&(o.$scope.$parent.$activeHistoryId=t.$historyId),t.$tabSelected=!0,(t.onSelect||h)(),a&&e.$emit("$ionicHistory.change",{type:"tab",tabIndex:c,historyId:t.$historyId,navViewName:t.navViewName,hasNavView:!!t.navViewName,title:t.title,url:t.href,uiSref:t.uiSref}),e.$broadcast("tabSelected",{selectedTab:t,selectedTabIndex:c}))},o.hasActiveScope=function(){for(var e=0;e<o.tabs.length;e++)if(n.isActiveScope(o.tabs[e]))return!0;return!1},o.showBar=function(e){return arguments.length&&(e?t.removeClass("tabs-item-hide"):t.addClass("tabs-item-hide"),c=!!e),c}}]),a.controller("$ionicView",["$scope","$element","$attrs","$compile","$rootScope",function(e,t,n,i,o){function r(){var t=l(n.viewTitle)&&"viewTitle"||l(n.title)&&"title";t&&(a(n[t]),$.push(n.$observe(t,a))),l(n.hideBackButton)&&$.push(e.$watch(n.hideBackButton,function(e){f.showBackButton(!e)})),l(n.hideNavBar)&&$.push(e.$watch(n.hideNavBar,function(e){f.showBar(!e)}))}function a(e){l(e)&&e!==v&&(v=e,f.title(v))}function s(){for(var e=0;e<$.length;e++)$[e]();$=[]}function u(t){return t?i(t)(e.$new()):void 0}function d(t){return!!e.$eval(n[t])}var f,h,p,v,g=this,m={},$=[],w=e.$on("ionNavBar.init",function(e,t){e.stopPropagation(),h=t});g.init=function(){w();var n=t.inheritedData("$ionModalController");f=t.inheritedData("$ionNavViewController"),f&&!n&&(e.$on("$ionicView.beforeEnter",g.beforeEnter),e.$on("$ionicView.afterEnter",r),e.$on("$ionicView.beforeLeave",s))},g.beforeEnter=function(t,i){if(i&&!i.viewNotified){i.viewNotified=!0,o.$$phase||e.$digest(),v=l(n.viewTitle)?n.viewTitle:n.title;var r={};for(var a in m)r[a]=u(m[a]);f.beforeEnter(c(i,{title:v,showBack:!d("hideBackButton"),navBarItems:r,navBarDelegate:h||null,showNavBar:!d("hideNavBar"),hasHeaderBar:!!p})),s()}},g.navElement=function(e,t){m[e]=t}}]),a.directive("ionActionSheet",["$document",function(e){return{restrict:"E",scope:!0,replace:!0,link:function(t,n){var i=function(e){27==e.which&&(t.cancel(),t.$apply())},o=function(e){e.target==n[0]&&(t.cancel(),t.$apply())};t.$on("$destroy",function(){n.remove(),e.unbind("keyup",i)}),e.bind("keyup",i),n.bind("click",o)},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper"><div class="action-sheet" ng-class="{\'action-sheet-has-icons\': $actionSheetHasIcon}"><div class="action-sheet-group action-sheet-options"><div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div><button class="button action-sheet-option" ng-click="buttonClicked($index)" ng-class="b.className" ng-repeat="b in buttons" ng-bind-html="b.text"></button><button class="button destructive action-sheet-destructive" ng-if="destructiveText" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button></div><div class="action-sheet-group action-sheet-cancel" ng-if="cancelText"><button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button></div></div></div></div>'}}]),a.directive("ionCheckbox",["$ionicConfig",function(e){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-checkbox"><div class="checkbox checkbox-input-hidden disable-pointer-events"><input type="checkbox"><i class="checkbox-icon"></i></div><div class="item-content disable-pointer-events" ng-transclude></div></label>',compile:function(t,n){var i=t.find("input");s({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},function(e,t){l(e)&&i.attr(t,e)});var o=t[0].querySelector(".checkbox");o.classList.add("checkbox-"+e.form.checkbox())}}}]),a.directive("collectionRepeat",e).factory("$ionicCollectionManager",t);var g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",m=/height:.*?px;\s*width:.*?px/,$=3;e.$inject=["$ionicCollectionManager","$parse","$window","$$rAF","$rootScope","$timeout"],t.$inject=["$rootScope","$window","$$rAF"],a.directive("ionContent",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,i){return{restrict:"E",require:"^?ionNavView",scope:!0,priority:800,compile:function(e,o){function r(e,i,r){function u(){e.$onScrollComplete({scrollTop:c.scrollView.__scrollTop,scrollLeft:c.scrollView.__scrollLeft})}var d=e.$parent;if(e.$watch(function(){return(d.$hasHeader?" has-header":"")+(d.$hasSubheader?" has-subheader":"")+(d.$hasFooter?" has-footer":"")+(d.$hasSubfooter?" has-subfooter":"")+(d.$hasTabs?" has-tabs":"")+(d.$hasTabsTop?" has-tabs-top":"")},function(e,t){i.removeClass(t),i.addClass(e)}),e.$hasHeader=e.$hasSubheader=e.$hasFooter=e.$hasSubfooter=e.$hasTabs=e.$hasTabsTop=!1,n(e,r,{$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",hasBouncing:"@",padding:"@",direction:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),e.direction=e.direction||"y",l(r.padding)&&e.$watch(r.padding,function(e){(a||i).toggleClass("padding",!!e)}),"false"===r.scroll);else{var f={};s?(i.addClass("overflow-scroll"),f={el:i[0],delegateHandle:o.delegateHandle,startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,nativeScrolling:!0}):f={el:i[0],delegateHandle:o.delegateHandle,locking:"true"===(o.locking||"true"),bouncing:e.$eval(e.hasBouncing),startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,scrollEventInterval:parseInt(e.scrollEventInterval,10)||10,scrollingComplete:u},c=t("$ionicScroll",{$scope:e,scrollViewOptions:f}),e.scrollCtrl=c,e.$on("$destroy",function(){f&&(f.scrollingComplete=h,delete f.el),a=null,i=null,o.$$element=null})}}var a,c;e.addClass("scroll-content ionic-scroll"),"false"!=o.scroll?(a=f('<div class="scroll"></div>'),a.append(e.contents()),e.append(a)):e.addClass("scroll-content-false");var s="false"!==o.overflowScroll&&("true"===o.overflowScroll||!i.scrolling.jsScrolling());return s&&(s=!e[0].querySelector("[collection-repeat]")),{pre:r}}}}]),a.directive("exposeAsideWhen",["$window",function(e){return{restrict:"A",require:"^ionSideMenus",link:function(t,n,i,o){function r(){var t="large"==i.exposeAsideWhen?"(min-width:768px)":i.exposeAsideWhen;o.exposeAside(e.matchMedia(t).matches),o.activeAsideResizing(!1)}function a(){o.activeAsideResizing(!0),l()}var c=e.innerWidth,s=e.innerHeight;ionic.on("resize",function(){(c!==e.innerWidth||s!==e.innerHeight)&&(c=e.innerWidth,s=e.innerHeight,a())},e);var l=ionic.debounce(function(){t.$apply(r)},300,!1);t.$evalAsync(r)}}}]);var w="onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft".split(" ");w.forEach(function(e){a.directive(e,n(e))}),a.directive("ionHeaderBar",i(!0)).directive("ionFooterBar",i(!1)),a.directive("ionInfiniteScroll",["$timeout",function(e){return{restrict:"E",require:["?^$ionicScroll","ionInfiniteScroll"],
+template:function(e,t){return t.icon?'<i class="icon {{icon()}} icon-refreshing {{scrollingType}}"></i>':'<ion-spinner icon="{{spinner()}}"></ion-spinner>'},scope:!0,controller:"$ionInfiniteScroll",link:function(t,n,i,o){var r=o[1],a=r.scrollCtrl=o[0],c=r.jsScrolling=!a.isNative();if(c)r.scrollView=a.scrollView,t.scrollingType="js-scrolling",a.$element.on("scroll",r.checkBounds);else{var s=ionic.DomUtil.getParentOrSelfWithClass(n[0].parentNode,"overflow-scroll");if(r.scrollEl=s,!s)throw"Infinite scroll must be used inside a scrollable div";r.scrollEl.addEventListener("scroll",r.checkBounds)}var u=l(i.immediateCheck)?t.$eval(i.immediateCheck):!0;u&&e(function(){r.checkBounds()})}}}]);var b=-1;a.directive("ionInput",[function(){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t,this.setInputAriaLabeledBy=function(e){var n=t[0].querySelectorAll("input,textarea");n.length&&n[0].setAttribute("aria-labelledby",e)},this.focus=function(){var e=t[0].querySelectorAll("input,textarea");e.length&&e[0].focus()}}]}}]),a.directive("ionLabel",[function(){return{restrict:"E",require:"?^ionInput",compile:function(){return function(e,t,n,i){var o=t[0];t.addClass("input-label"),t.attr("aria-label",t.text());var r=o.id||"_label-"+ ++b;o.id||t.attr("id",r),i&&(i.setInputAriaLabeledBy(r),t.on("click",function(){i.focus()}))}}}}]),a.directive("inputLabel",[function(){return{restrict:"C",require:"?^ionInput",compile:function(){return function(e,t,n,i){var o=t[0];t.attr("aria-label",t.text());var r=o.id||"_label-"+ ++b;o.id||t.attr("id",r),i&&i.setInputAriaLabeledBy(r)}}}}]),a.directive("ionItem",["$$rAF",function(e){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],scope:!0,compile:function(t,n){var i=l(n.href)||l(n.ngHref)||l(n.uiSref),o=i||/ion-(delete|option|reorder)-button/i.test(t.html());if(o){var r=f(i?"<a></a>":"<div></div>");r.addClass("item-content"),(l(n.href)||l(n.ngHref))&&(r.attr("ng-href","{{$href()}}"),l(n.target)&&r.attr("target","{{$target()}}")),r.append(t.contents()),t.addClass("item item-complex").append(r)}else t.addClass("item");return function(t,n,i){t.$href=function(){return i.href||i.ngHref},t.$target=function(){return i.target};var o=n[0].querySelector(".item-content");o&&t.$on("$collectionRepeatLeave",function(){o&&o.$$ionicOptionsOpen&&(o.style[ionic.CSS.TRANSFORM]="",o.style[ionic.CSS.TRANSITION]="none",e(function(){o.style[ionic.CSS.TRANSITION]=""}),o.$$ionicOptionsOpen=!1)})}}}}]);var y='<div class="item-left-edit item-delete enable-pointer-events"></div>';a.directive("ionDeleteButton",function(){function e(e){e.stopPropagation()}return{restrict:"E",require:["^^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),function(t,n,i,o){function r(){c=c||n.controller("ionList"),c&&c.showDelete()&&s.addClass("visible active")}var a=o[0],c=o[1],s=f(y);s.append(n),a.$element.append(s).addClass("item-left-editable"),n.on("click",e),r(),t.$on("$ionic.reconnectScope",r)}}}}),a.directive("itemFloatingLabel",function(){return{restrict:"C",link:function(e,t){var n=t[0],i=n.querySelector("input, textarea"),o=n.querySelector(".input-label");if(i&&o){var r=function(){i.value?o.classList.add("has-input"):o.classList.remove("has-input")};i.addEventListener("input",r);var a=f(i).controller("ngModel");a&&(a.$render=function(){i.value=a.$viewValue||"",r()}),e.$on("$destroy",function(){i.removeEventListener("input",r)})}}}});var S='<div class="item-options invisible"></div>';a.directive("ionOptionButton",[function(){function e(e){e.stopPropagation()}return{restrict:"E",require:"^ionItem",priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button",!0),function(t,n,i,o){o.optionsContainer||(o.optionsContainer=f(S),o.$element.prepend(o.optionsContainer)),o.optionsContainer.prepend(n),o.$element.addClass("item-right-editable"),n.on("click",e)}}}}]);var k='<div data-prevent-scroll="true" class="item-right-edit item-reorder enable-pointer-events"></div>';a.directive("ionReorderButton",["$parse",function(e){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),t[0].setAttribute("data-prevent-scroll",!0),function(t,n,i,o){var r=o[0],a=o[1],c=e(i.onReorder);t.$onReorder=function(e,n){c(t,{$fromIndex:e,$toIndex:n})},i.ngClick||i.onClick||i.onclick||(n[0].onclick=function(e){return e.stopPropagation(),!1});var s=f(k);s.append(n),r.$element.append(s).addClass("item-right-editable"),a&&a.showReorder()&&s.addClass("visible active")}}}}]),a.directive("keyboardAttach",function(){return function(e,t){function n(e){if(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen){var n=e.keyboardHeight||e.detail&&e.detail.keyboardHeight;t.css("bottom",n+"px"),r=t.controller("$ionicScroll"),r&&(r.scrollView.__container.style.bottom=n+o(t[0])+"px")}}function i(){(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen)&&(t.css("bottom",""),r&&(r.scrollView.__container.style.bottom=""))}ionic.on("native.keyboardshow",n,window),ionic.on("native.keyboardhide",i,window),ionic.on("native.showkeyboard",n,window),ionic.on("native.hidekeyboard",i,window);var r;e.$on("$destroy",function(){ionic.off("native.keyboardshow",n,window),ionic.off("native.keyboardhide",i,window),ionic.off("native.showkeyboard",n,window),ionic.off("native.hidekeyboard",i,window)})}}),a.directive("ionList",["$timeout",function(e){return{restrict:"E",require:["ionList","^?$ionicScroll"],controller:"$ionicList",compile:function(t,n){var i=f('<div class="list">').append(t.contents()).addClass(n.type);return t.append(i),function(t,i,o,r){function a(){function o(e,t){t()&&e.addClass("visible")||e.removeClass("active"),ionic.requestAnimationFrame(function(){t()&&e.addClass("active")||e.removeClass("visible")})}var r=c.listView=new ionic.views.ListView({el:i[0],listEl:i.children()[0],scrollEl:s&&s.element,scrollView:s&&s.scrollView,onReorder:function(t,n,i){var o=f(t).scope();o&&o.$onReorder&&e(function(){o.$onReorder(n,i)})},canSwipe:function(){return c.canSwipeItems()}});t.$on("$destroy",function(){r&&(r.deregister&&r.deregister(),r=null)}),l(n.canSwipe)&&t.$watch("!!("+n.canSwipe+")",function(e){c.canSwipeItems(e)}),l(n.showDelete)&&t.$watch("!!("+n.showDelete+")",function(e){c.showDelete(e)}),l(n.showReorder)&&t.$watch("!!("+n.showReorder+")",function(e){c.showReorder(e)}),t.$watch(function(){return c.showDelete()},function(e,t){if(e||t){e&&c.closeOptionButtons(),c.canSwipeItems(!e),i.children().toggleClass("list-left-editing",e),i.toggleClass("disable-pointer-events",e);var n=f(i[0].getElementsByClassName("item-delete"));o(n,c.showDelete)}}),t.$watch(function(){return c.showReorder()},function(e,t){if(e||t){e&&c.closeOptionButtons(),c.canSwipeItems(!e),i.children().toggleClass("list-right-editing",e),i.toggleClass("disable-pointer-events",e);var n=f(i[0].getElementsByClassName("item-reorder"));o(n,c.showReorder)}})}var c=r[0],s=r[1];e(a)}}}}]),a.directive("menuClose",["$ionicHistory","$timeout",function(e,t){return{restrict:"AC",link:function(n,i){i.bind("click",function(){var n=i.inheritedData("$ionSideMenusController");n&&(e.nextViewOptions({historyRoot:!0,disableAnimate:!0,expire:300}),t(function(){e.nextViewOptions({historyRoot:!1,disableAnimate:!1})},300),n.close())})}}}]),a.directive("menuToggle",function(){return{restrict:"AC",link:function(e,t,n){e.$on("$ionicView.beforeEnter",function(e,n){if(n.enableBack){var i=t.inheritedData("$ionSideMenusController");i.enableMenuWithBackViews()||t.addClass("hide")}else t.removeClass("hide")}),t.bind("click",function(){var e=t.inheritedData("$ionSideMenusController");e&&e.toggle(n.menuToggle)})}}}),a.directive("ionModal",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="modal-backdrop"><div class="modal-backdrop-bg"></div><div class="modal-wrapper" ng-transclude></div></div>'}}]),a.directive("ionModalView",function(){return{restrict:"E",compile:function(e){e.addClass("modal")}}}),a.directive("ionNavBackButton",["$ionicConfig","$document",function(e,t){return{restrict:"E",require:"^ionNavBar",compile:function(n,i){function o(e){return/ion-|icon/.test(e.className)}var r=t[0].createElement("button");for(var a in i.$attr)r.setAttribute(i.$attr[a],i[a]);i.ngClick||r.setAttribute("ng-click","$ionicGoBack()"),r.className="button back-button hide buttons "+(n.attr("class")||""),r.innerHTML=n.html()||"";for(var c,s,l,u,d=o(n[0]),f=0;f<n[0].childNodes.length;f++)c=n[0].childNodes[f],1===c.nodeType?o(c)?d=!0:c.classList.contains("default-title")?l=!0:c.classList.contains("previous-title")&&(u=!0):s||3!==c.nodeType||(s=!!c.nodeValue.trim());var h=e.backButton.icon();if(!d&&h&&"none"!==h&&(r.innerHTML='<i class="icon '+h+'"></i> '+r.innerHTML,r.className+=" button-clear"),!s){var p=t[0].createElement("span");p.className="back-text",!l&&e.backButton.text()&&(p.innerHTML+='<span class="default-title">'+e.backButton.text()+"</span>"),!u&&e.backButton.previousTitleText()&&(p.innerHTML+='<span class="previous-title"></span>'),r.appendChild(p)}return n.attr("class","hide"),n.empty(),{pre:function(e,t,n,i){i.navElement("backButton",r.outerHTML),r=null}}}}}]),a.directive("ionNavBar",function(){return{restrict:"E",controller:"$ionicNavBar",scope:!0,link:function(e,t,n,i){i.init()}}}),a.directive("ionNavButtons",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="left";/^primary|secondary|right$/i.test(n.side||"")&&(i=n.side.toLowerCase());var o=e[0].createElement("span");o.className=i+"-buttons",o.innerHTML=t.html();var r=i+"Buttons";return t.attr("class","hide"),t.empty(),{pre:function(e,t,n,i){var a=t.parent().data("$ionViewController");a?a.navElement(r,o.outerHTML):i.navElement(r,o.outerHTML),o=null}}}}}]),a.directive("navDirection",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextDirection(i.navDirection)})}}}]),a.directive("ionNavTitle",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="title",o=e[0].createElement("span");for(var r in n.$attr)o.setAttribute(n.$attr[r],n[r]);return o.classList.add("nav-bar-title"),o.innerHTML=t.html(),t.attr("class","hide"),t.empty(),{pre:function(e,t,n,r){var a=t.parent().data("$ionViewController");a?a.navElement(i,o.outerHTML):r.navElement(i,o.outerHTML),o=null}}}}}]),a.directive("navTransition",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextTransition(i.navTransition)})}}}]),a.directive("ionNavView",["$state","$ionicConfig",function(e,t){return{restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:"$ionicNavView",compile:function(n,i,o){return n.addClass("view-container"),ionic.DomUtil.cachedAttr(n,"nav-view-transition",t.views.transition()),function(t,n,i,r){function a(t){var n=e.$current&&e.$current.locals[s.name];n&&(t||n!==c)&&(c=n,s.state=n.$$state,r.register(n))}var c;o(t,function(e){n.append(e)});var s=r.init();t.$on("$stateChangeSuccess",function(){a(!1)}),t.$on("$viewContentLoading",function(){a(!1)}),a(!0)}}}}]),a.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]).factory("$ionicNgClick",["$parse",function(e){return function(t,n,i){var o=angular.isFunction(i)?i:e(i);n.on("click",function(e){t.$apply(function(){o(t,{$event:e})})}),n.onclick=h}}]).directive("ngClick",["$ionicNgClick",function(e){return function(t,n,i){e(t,n,i.ngClick)}}]).directive("ionStopEvent",function(){return{restrict:"A",link:function(e,t,n){t.bind(n.ionStopEvent,r)}}}),a.directive("ionPane",function(){return{restrict:"E",link:function(e,t){t.addClass("pane")}}}),a.directive("ionPopover",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="popover-backdrop"><div class="popover-wrapper" ng-transclude></div></div>'}}]),a.directive("ionPopoverView",function(){return{restrict:"E",compile:function(e){e.append(f('<div class="popover-arrow">')),e.addClass("popover")}}}),a.directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-radio"><input type="radio" name="radio-group"><div class="radio-content"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></div></label>',compile:function(e,t){if(t.icon){var n=e.find("i");n.removeClass("ion-checkmark").addClass(t.icon)}var i=e.find("input");return s({name:t.name,value:t.value,disabled:t.disabled,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-disabled":t.ngDisabled,"ng-change":t.ngChange,"ng-required":t.ngRequired,required:t.required},function(e,t){l(e)&&i.attr(t,e)}),function(e,t,n){e.getValue=function(){return e.ngValue||n.value}}}}}),a.directive("ionRefresher",[function(){return{restrict:"E",replace:!0,require:["?^$ionicScroll","ionRefresher"],controller:"$ionicRefresher",template:'<div class="scroll-refresher invisible" collection-repeat-ignore><div class="ionic-refresher-content" ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}"><div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}"><i class="icon {{pullingIcon}}"></i></div><div class="text-pulling" ng-bind-html="pullingText"></div><div class="icon-refreshing"><ion-spinner ng-if="showSpinner" icon="{{spinner}}"></ion-spinner><i ng-if="showIcon" class="icon {{refreshingIcon}}"></i></div><div class="text-refreshing" ng-bind-html="refreshingText"></div></div></div>',link:function(e,t,n,i){var o=i[0],r=i[1];!o||o.isNative()?r.init():(t[0].classList.add("js-scrolling"),o._setRefresher(e,t[0],r.getRefresherDomMethods()),e.$on("scroll.refreshComplete",function(){e.$evalAsync(function(){o.scrollView&&o.scrollView.finishPullToRefresh()})}))}}}]),a.directive("ionScroll",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,i){return{restrict:"E",scope:!0,controller:function(){},compile:function(e,o){function r(e,i,o){function r(){e.$onScrollComplete&&e.$onScrollComplete({scrollTop:d.scrollView.__scrollTop,scrollLeft:d.scrollView.__scrollLeft})}n(e,o,{direction:"@",paging:"@",$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",scroll:"@",scrollbarX:"@",scrollbarY:"@",zooming:"@",minZoom:"@",maxZoom:"@"}),e.direction=e.direction||"y",l(o.padding)&&e.$watch(o.padding,function(e){a.toggleClass("padding",!!e)}),e.$eval(e.paging)===!0&&a.addClass("scroll-paging"),e.direction||(e.direction="y");var s=e.$eval(e.paging)===!0;c&&i.addClass("overflow-scroll"),i.addClass("scroll-"+e.direction);var u={el:i[0],delegateHandle:o.delegateHandle,locking:"true"===(o.locking||"true"),bouncing:e.$eval(o.hasBouncing),paging:s,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,zooming:e.$eval(e.zooming)===!0,maxZoom:e.$eval(e.maxZoom)||3,minZoom:e.$eval(e.minZoom)||.5,preventDefault:!0,nativeScrolling:c,scrollingComplete:r};s&&(u.speedMultiplier=.8,u.bouncing=!1);var d=t("$ionicScroll",{$scope:e,scrollViewOptions:u})}e.addClass("scroll-view ionic-scroll");var a=f('<div class="scroll"></div>');a.append(e.contents()),e.append(a);var c="false"!==o.overflowScroll&&("true"===o.overflowScroll||!i.scrolling.jsScrolling());return{pre:r}}}}]),a.directive("ionSideMenu",function(){return{restrict:"E",require:"^ionSideMenus",scope:!0,compile:function(e,t){return angular.isUndefined(t.isEnabled)&&t.$set("isEnabled","true"),angular.isUndefined(t.width)&&t.$set("width","275"),e.addClass("menu menu-"+t.side),function(e,n,i,o){e.side=i.side||"left";var r=o[e.side]=new ionic.views.SideMenu({width:t.width,el:n[0],isEnabled:!0});e.$watch(i.width,function(e){var t=+e;t&&t==e&&r.setWidth(+e)}),e.$watch(i.isEnabled,function(e){r.setIsEnabled(!!e)})}}}}),a.directive("ionSideMenuContent",["$timeout","$ionicGesture","$window",function(e,t,n){return{restrict:"EA",require:"^ionSideMenus",scope:!0,compile:function(i,o){function r(r,a,c,s){function u(e){0!==s.getOpenAmount()?(s.close(),e.gesture.srcEvent.preventDefault(),v=null,g=null):v||(v=ionic.tap.pointerCoord(e.gesture.srcEvent))}function d(e){s.isDraggableTarget(e)&&"x"==p(e)&&(s._handleDrag(e),e.gesture.srcEvent.preventDefault())}function f(e){"x"==p(e)&&e.gesture.srcEvent.preventDefault()}function h(e){s._endDrag(e),v=null,g=null}function p(e){if(g)return g;if(e&&e.gesture){if(v){var t=ionic.tap.pointerCoord(e.gesture.srcEvent),n=Math.abs(t.x-v.x),i=Math.abs(t.y-v.y),o=i>n?"y":"x";return Math.max(n,i)>30&&(g=o),o}v=ionic.tap.pointerCoord(e.gesture.srcEvent)}return"y"}var v=null,g=null;l(o.dragContent)?r.$watch(o.dragContent,function(e){s.canDragContent(e)}):s.canDragContent(!0),l(o.edgeDragThreshold)&&r.$watch(o.edgeDragThreshold,function(e){s.edgeDragThreshold(e)});var m={element:i[0],onDrag:function(){},endDrag:function(){},setCanScroll:function(e){var t=a[0].querySelector(".scroll");if(t){var n=angular.element(t.parentElement);if(n){var i=n.scope();i.scrollCtrl&&i.scrollCtrl.freezeScrollShut(!e)}}},getTranslateX:function(){return r.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(t){var n=m.offsetX+t;a[0].style[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e(function(){r.sideMenuContentTranslateX=t})}),setMarginLeft:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",m.offsetX=0)}),setMarginRight:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style.width="",m.offsetX=0),a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)"}),setMarginLeftAndRight:ionic.animationFrameThrottle(function(e,t){e=e&&parseInt(e,10)||0,t=t&&parseInt(t,10)||0;var i=e+t;i>0?(a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-i+"px",m.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",m.offsetX=0)}),enableAnimation:function(){r.animationEnabled=!0,a[0].classList.add("menu-animated")},disableAnimation:function(){r.animationEnabled=!1,a[0].classList.remove("menu-animated")},offsetX:0};s.setContent(m);var $={stop_browser_behavior:!1};$.prevent_default_directions=["left","right"];var w=t.on("tap",u,a,$),b=t.on("dragright",d,a,$),y=t.on("dragleft",d,a,$),S=t.on("dragup",f,a,$),k=t.on("dragdown",f,a,$),C=t.on("release",h,a,$);r.$on("$destroy",function(){m&&(m.element=null,m=null),t.off(y,"dragleft",d),t.off(b,"dragright",d),t.off(S,"dragup",f),t.off(k,"dragdown",f),t.off(C,"release",h),t.off(w,"tap",u)})}return i.addClass("menu-content pane"),{pre:r}}}}]),a.directive("ionSideMenus",["$ionicBody",function(e){return{restrict:"ECA",controller:"$ionicSideMenus",compile:function(t,n){function i(t,n,i,o){o.enableMenuWithBackViews(t.$eval(i.enableMenuWithBackViews)),t.$on("$ionicExposeAside",function(n,i){t.$exposeAside||(t.$exposeAside={}),t.$exposeAside.active=i,e.enableClass(i,"aside-open")}),t.$on("$ionicView.beforeEnter",function(e,n){n.historyId&&(t.$activeHistoryId=n.historyId)}),t.$on("$destroy",function(){e.removeClass("menu-open","aside-open")})}return n.$set("class",(n["class"]||"")+" view"),{pre:i}}}}]),a.directive("ionSlideBox",["$animate","$timeout","$compile","$ionicSlideBoxDelegate","$ionicHistory","$ionicScrollDelegate",function(e,t,n,i,o,r){return{restrict:"E",replace:!0,transclude:!0,scope:{autoPlay:"=",doesContinue:"@",slideInterval:"@",showPager:"@",pagerClick:"&",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?",bounce:"@"},controller:["$scope","$element","$attrs",function(e,n,a){function c(e){e&&!s.isScrollFreeze?r.freezeAllScrolls(e):!e&&s.isScrollFreeze&&r.freezeAllScrolls(!1),s.isScrollFreeze=e}var s=this,u=e.$eval(e.doesContinue)===!0,d=e.$eval(e.bounce)!==!1,f=l(a.autoPlay)?!!e.autoPlay:!1,h=f?e.$eval(e.slideInterval)||4e3:0,p=new ionic.views.Slider({el:n[0],auto:h,continuous:u,startSlide:e.activeSlide,bouncing:d,slidesChanged:function(){e.currentSlide=p.currentIndex(),t(function(){})},callback:function(n){e.currentSlide=n,e.onSlideChanged({index:e.currentSlide,$index:e.currentSlide}),e.$parent.$broadcast("slideBox.slideChanged",n),e.activeSlide=n,t(function(){})},onDrag:function(){c(!0)},onDragEnd:function(){c(!1)}});p.enableSlide(e.$eval(a.disableScroll)!==!0),e.$watch("activeSlide",function(e){l(e)&&p.slide(e)}),e.$on("slideBox.nextSlide",function(){p.next()}),e.$on("slideBox.prevSlide",function(){p.prev()}),e.$on("slideBox.setSlide",function(e,t){p.slide(t)}),this.__slider=p;var v=i._registerInstance(p,a.delegateHandle,function(){return o.isActiveScope(e)});e.$on("$destroy",function(){v(),p.kill()}),this.slidesCount=function(){return p.slidesCount()},this.onPagerClick=function(t){e.pagerClick({index:t})},t(function(){p.load()})}],template:'<div class="slider"><div class="slider-slides" ng-transclude></div></div>',link:function(t,i,o){function r(){if(!a){var e=t.$new();a=f("<ion-pager></ion-pager>"),i.append(a),a=n(a)(e)}return a}e.enabled(i,!1),l(o.showPager)||(t.showPager=!0,r().toggleClass("hide",!1)),o.$observe("showPager",function(e){void 0!==e&&(e=t.$eval(e),r().toggleClass("hide",!e))});var a}}}]).directive("ionSlide",function(){return{restrict:"E",require:"?^ionSlideBox",compile:function(e){e.addClass("slider-slide")}}}).directive("ionPager",function(){return{restrict:"E",replace:!0,require:"^ionSlideBox",template:'<div class="slider-pager"><span class="slider-pager-page" ng-repeat="slide in numSlides() track by $index" ng-class="{active: $index == currentSlide}" ng-click="pagerClick($index)"><i class="icon ion-record"></i></span></div>',link:function(e,t,n,i){var o=function(e){for(var n=t[0].children,i=n.length,o=0;i>o;o++)o==e?n[o].classList.add("active"):n[o].classList.remove("active")};e.pagerClick=function(e){i.onPagerClick(e)},e.numSlides=function(){return new Array(i.slidesCount())},e.$watch("currentSlide",function(e){o(e)})}}}),a.directive("ionSlides",["$animate","$timeout","$compile",function(e,t,n){return{restrict:"E",transclude:!0,scope:{options:"=",slider:"="},template:'<div class="swiper-container"><div class="swiper-wrapper" ng-transclude></div><div ng-hide="!showPager" class="swiper-pagination"></div></div>',controller:["$scope","$element",function(e,i){var o=this;this.update=function(){t(function(){if(o.__slider){o.__slider.update(),o._options.loop&&o.__slider.createLoop();var t=o.__slider.slides.length;t>10&&(e.showPager=!1),o.__slider.activeIndex>t-1&&o.__slider.slideTo(t-1)}})},this.rapidUpdate=ionic.debounce(function(){o.update()},50),this.getSlider=function(){return o.__slider};var r=e.options||{},a=angular.extend({pagination:i.children().children()[1],paginationClickable:!0,lazyLoading:!0,preloadImages:!1},r);this._options=a,t(function(){var t=new ionic.views.Swiper(i.children()[0],a,e,n);e.$emit("$ionicSlides.sliderInitialized",{slider:t}),o.__slider=t,e.slider=o.__slider,e.$on("$destroy",function(){t.destroy(),o.__slider=null})}),t(function(){o.rapidUpdate()},200)}],link:function(e){e.showPager=!0}}}]).directive("ionSlidePage",[function(){return{restrict:"E",require:"?^ionSlides",transclude:!0,replace:!0,template:'<div class="swiper-slide" ng-transclude></div>',link:function(e,t,n,i){i.rapidUpdate(),e.$on("$destroy",function(){i.rapidUpdate()})}}}]),a.directive("ionSpinner",function(){return{restrict:"E",controller:"$ionicSpinner",link:function(e,t,n,i){var o=i.init();t.addClass("spinner spinner-"+o),t.on("$destroy",function(){i.stop()})}}}),a.directive("ionTab",["$compile","$ionicConfig","$ionicBind","$ionicViewSwitcher",function(e,t,n,i){function o(e,t){return l(t)?" "+e+'="'+t+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],controller:"$ionicTab",scope:!0,compile:function(r,a){for(var c="<ion-tab-nav"+o("ng-click",a.ngClick)+o("title",a.title)+o("icon",a.icon)+o("icon-on",a.iconOn)+o("icon-off",a.iconOff)+o("badge",a.badge)+o("badge-style",a.badgeStyle)+o("hidden",a.hidden)+o("disabled",a.disabled)+o("class",a["class"])+"></ion-tab-nav>",s=document.createElement("div"),l=0;l<r[0].children.length;l++)s.appendChild(r[0].children[l].cloneNode(!0));var u=s.childElementCount;r.empty();var d,h;return u&&("ION-NAV-VIEW"===s.children[0].tagName&&(d=s.children[0].getAttribute("name"),s.children[0].classList.add("view-container"),h=!0),1===u&&(s=s.children[0]),h||s.classList.add("pane"),s.classList.add("tab-content")),function(o,r,a,l){function h(){w.tabMatchesState()&&$.select(o,!1)}function p(n){n&&u?(b||(g=o.$new(),m=f(s),i.viewEleIsActive(m,!0),$.$element.append(m),e(m)(g),b=!0),i.viewEleIsActive(m,!0)):b&&m&&(t.views.maxCache()>0?i.viewEleIsActive(m,!1):v())}function v(){g&&g.$destroy(),b&&m&&m.remove(),s.innerHTML="",b=g=m=null}var g,m,$=l[0],w=l[1],b=!1;o.$tabSelected=!1,n(o,a,{onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),$.add(o),o.$on("$destroy",function(){o.$tabsDestroy||$.remove(o),y.isolateScope().$destroy(),y.remove(),y=s=m=null}),r[0].removeAttribute("title"),d&&(w.navViewName=o.navViewName=d),o.$on("$stateChangeSuccess",h),h();var y=f(c);y.data("$ionTabsController",$),y.data("$ionTabController",w),$.$tabsElement.append(e(y)(o)),o.$watch("$tabSelected",p),o.$on("$ionicView.afterEnter",function(){i.viewEleIsActive(m,o.$tabSelected)}),o.$on("$ionicView.clearCache",function(){o.$tabSelected||v()})}}}}]),a.directive("ionTabNav",[function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:"<a ng-class=\"{'has-badge':badge, 'tab-hidden':isHidden(), 'tab-item-active': isTabActive()}\" "+' ng-disabled="disabled()" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{getIcon()}}" ng-if="getIcon()"></i><span class="tab-title" ng-bind-html="title"></span></a>',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",hidden:"@",disabled:"&",badgeStyle:"@","class":"@"},link:function(e,t,n,i){var o=i[0],r=i[1];t[0].removeAttribute("title"),e.selectTab=function(e){e.preventDefault(),o.select(r.$scope,!0)},n.ngClick||t.on("click",function(t){e.$apply(function(){e.selectTab(t)})}),e.isHidden=function(){return"true"===n.hidden||n.hidden===!0?!0:!1},e.getIconOn=function(){return e.iconOn||e.icon},e.getIconOff=function(){return e.iconOff||e.icon},e.isTabActive=function(){return o.selectedTab()===r.$scope},e.getIcon=function(){return o.selectedTab()===r.$scope?e.iconOn||e.icon:e.iconOff||e.icon}}}}]),a.directive("ionTabs",["$ionicTabsDelegate","$ionicConfig",function(e,t){return{restrict:"E",scope:!0,controller:"$ionicTabs",compile:function(n){function i(t,n,i,o){function a(e,t){e.stopPropagation();var n=o.previousSelectedTab();n&&n.$broadcast(e.name.replace("NavView","Tabs"),t)}var c=e._registerInstance(o,i.delegateHandle,o.hasActiveScope);o.$scope=t,o.$element=n,o.$tabsElement=f(n[0].querySelector(".tabs")),t.$watch(function(){return n[0].className},function(e){var n=-1!==e.indexOf("tabs-top"),i=-1!==e.indexOf("tabs-item-hide");t.$hasTabs=!n&&!i,t.$hasTabsTop=n&&!i,t.$emit("$ionicTabs.top",t.$hasTabsTop)}),t.$on("$ionicNavView.beforeLeave",a),t.$on("$ionicNavView.afterLeave",a),t.$on("$ionicNavView.leave",a),t.$on("$destroy",function(){t.$tabsDestroy=!0,c(),o.$tabsElement=o.$element=o.$scope=r=null,delete t.$hasTabs,delete t.$hasTabsTop})}function o(e,t,n,i){i.selectedTab()||i.select(0)}var r=f('<div class="tab-nav tabs">');return r.append(n.contents()),n.append(r).addClass("tabs-"+t.tabs.position()+" tabs-"+t.tabs.style()),{pre:i,post:o}}}}]),a.directive("ionTitle",[function(){return{restrict:"E",compile:function(e){e.addClass("title")}}}]),a.directive("ionToggle",["$timeout","$ionicConfig",function(e,t){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<div class="item item-toggle"><div ng-transclude></div><label class="toggle"><input type="checkbox"><div class="track"><div class="handle"></div></div></label></div>',compile:function(e,n){var i=e.find("input");return s({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},function(e,t){l(e)&&i.attr(t,e)}),n.toggleClass&&e[0].getElementsByTagName("label")[0].classList.add(n.toggleClass),e.addClass("toggle-"+t.form.toggle()),function(e,t){var n=t[0].getElementsByTagName("label")[0],i=n.children[0],o=n.children[1],r=o.children[0],a=f(i).controller("ngModel");e.toggle=new ionic.views.Toggle({el:n,track:o,checkbox:i,handle:r,onChange:function(){a&&(a.$setViewValue(i.checked),e.$apply())}}),e.$on("$destroy",function(){e.toggle.destroy()})}}}}]),a.directive("ionView",function(){return{restrict:"EA",priority:1e3,controller:"$ionicView",compile:function(e){return e.addClass("pane"),e[0].removeAttribute("title"),function(e,t,n,i){i.init()}}}})}();
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("angular")}catch(e){}}()):"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?exports.ionicMaterial=t(function(){try{return require("angular")}catch(e){}}()):e.ionicMaterial=t(e.angular)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports=function(){var e;try{e=n(1)}catch(t){}if(e&&e.version||(e=window.angular),!e||!e.version)throw new Error("ionic-material could not load angular module :(");var r=e.module("ionic-material",["ionic"]);return n(2)(r),n(3)(r),"ionic-material"}()},function(t,n,r){if("undefined"==typeof e){var i=new Error('Cannot find module "angular"');throw i.code="MODULE_NOT_FOUND",i}t.exports=e},function(e,t,n){"use strict";/*!
 	 * Fork by Zach Fitzgerald and other contributors of Ionic Material
 	 *
 	 * Waves v0.5.4
@@ -65,8 +4630,2886 @@ n.registerHistory(e),i.tabs.push(e)},i.remove=function(e){var t=i.tabs.indexOf(e
 	 * Released under the MIT license
 	 * https://github.com/fians/Waves/blob/master/LICENSE
 	 *
-	 */e.exports=function(e){function t(){function e(e){var t,n,r={top:0,left:0},i=e&&e.ownerDocument;return t=i.documentElement,void 0!==e.getBoundingClientRect&&(r=e.getBoundingClientRect()),n=function(e){return function(e){return null!==e&&e===e.window}(e)?e:9===e.nodeType&&e.defaultView}(i),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}}function t(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}var n,r=r||{};if(document&&document.querySelectorAll&&document.querySelectorAll.bind)try{n=document.querySelectorAll.bind(document)}catch(e){}else if(window&&window.angular&&window.angular.element)n=window.angular.element;else{var i=function(e,t,n){var r=e.length;t=null==t?0:0>t?Math.max(r+t,0):Math.min(t,r),n=null==n?r:0>n?Math.max(r+n,0):Math.min(n,r);for(var i=[];n>t;)i.push(e[t++]);return i};n=function(e,t,n){var r=i(arguments,2);return function(){return e.apply(t,r.concat(i(arguments)))}}(document.querySelectorAll,document)}if(!n)throw new Error("ionic material ink module could not create reference of DOM nodes");var o={duration:500,show:function(n){if(2===n.button)return!1;var r=this,i=document.createElement("div"),a=this.dataset.inkColor,s=this.dataset.inkOpacity,l=a||s;i.className="ink-ripple",r.appendChild(i);var u=e(r),c=n.pageY-u.top,d=n.pageX-u.left,h="scale("+r.clientWidth/100*2.5+")";"touches"in n&&(c=n.touches[0].pageY-u.top,d=n.touches[0].pageX-u.left),i.setAttribute("data-hold",Date.now()),i.setAttribute("data-scale",h),i.setAttribute("data-x",d),i.setAttribute("data-y",c);var f={top:c+"px",left:d+"px"};if(i.className=i.className+" ink-notransition",l){var p;if(a){var m=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}(a);p=m.r+","+m.g+","+m.b}else p="0,0,0";s||(s=.2);var g="rgba("+p+","+s+")";f["background-color"]=g}i.setAttribute("style",t(f)),i.className=i.className.replace("ink-notransition",""),f["-webkit-transform"]=h,f["-moz-transform"]=h,f["-ms-transform"]=h,f["-o-transform"]=h,f.transform=h,f.opacity="1",f["-webkit-transition-duration"]=o.duration+"ms",f["-moz-transition-duration"]=o.duration+"ms",f["-o-transition-duration"]=o.duration+"ms",f["transition-duration"]=o.duration+"ms",i.setAttribute("style",t(f))},hide:function(){for(var e=this,n=(e.clientWidth,null),r=e.children.length,i=0;r>i;i++)-1===e.children[i].className.indexOf("ink-ripple")||(n=e.children[i]);if(!n)return!1;var a=n.getAttribute("data-x"),s=n.getAttribute("data-y"),l=n.getAttribute("data-scale"),u=500-(Date.now()-Number(n.getAttribute("data-hold")));0>u&&(u=0),setTimeout((function(){var r={top:s+"px",left:a+"px",opacity:"0","-webkit-transition-duration":o.duration+"ms","-moz-transition-duration":o.duration+"ms","-o-transition-duration":o.duration+"ms","transition-duration":o.duration+"ms","-webkit-transform":l,"-moz-transform":l,"-ms-transform":l,"-o-transform":l,transform:l};n.setAttribute("style",t(r)),setTimeout((function(){try{e.removeChild(n)}catch(e){return!1}}),o.duration)}),u)},wrapInput:function(e){for(var t=0;t<e.length;t++){var n=e[t];if("input"===n.tagName.toLowerCase()){var r=n.parentNode;if("i"===r.tagName.toLowerCase()&&-1!==r.className.indexOf("ink")&&-1!==r.className.indexOf("tab-item")&&-1!==r.className.indexOf("button-fab")&&-1!==r.className.indexOf("button-raised")&&-1!==r.className.indexOf("button-flat")&&-1!==r.className.indexOf("button-clear")&&-1!==r.className.indexOf("button")&&-1!==r.className.indexOf("item"))return!1;var i=document.createElement("i");i.className=n.className+" ink-input-wrapper";var o=n.getAttribute("style");o||(o=""),i.setAttribute("style",o),n.className="ink-button-input",n.removeAttribute("style"),r.replaceChild(i,n),i.appendChild(n)}}}};return r.displayEffect=function(e){"duration"in(e=e||{})&&(o.duration=e.duration);var t=".ink,.tab-item,.button-fab,.button-raised,.button-flat,.button-clear,a.item,.popup .button";o.wrapInput(n(t)),Array.prototype.forEach.call(n(t),(function(e){"ontouchstart"in window?(e.addEventListener("touchstart",o.show,!1),e.addEventListener("touchend",o.hide,!1),e.addEventListener("touchcancel",o.hide,!1)):(e.addEventListener("mousedown",o.show,!1),e.addEventListener("mouseup",o.hide,!1),e.addEventListener("mouseleave",o.hide,!1))}))},r}e.factory("ionicMaterialInk",t),t.inject=[]}},function(e,t,n){e.exports=function(e){function t(){"use strict";function e(){return window.innerHeight}function t(e,t){for(var n=0;t>n;n++){var r=e[n];r.className+=" in",r.className+=" done"}}return{blinds:function(n){if(void 0===n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||2,n.finishSpeedPercent=n.finishSpeedPercent||.5,n.leftOffsetPercentage=n.leftOffsetPercentage||.8,n.startVelocity=n.startVelocity||1100,void 0===n.selector&&(n.selector=".animate-blinds .item"),void 0===n.selector||""===n.selector)return alert("invalid blinds selector"),!1;for(var r=document.querySelectorAll(n.selector),i=r.length,o=0,a=e(),s=0;i>s&&r[s].offsetTop<a;s++)o+=1;var l=n.startVelocity;for(s=0;o>s;s++){var u=r[s],c=u.getBoundingClientRect(),d=c.left*n.leftOffsetPercentage+c.top,h=parseFloat(d/l).toFixed(2);u.style.webkitTransitionDelay=h+"s",u.style.transitionDelay=h+"s",u.className+=" in"}setTimeout((function(){for(var e=0;o>e;e++){var t=r[e].getBoundingClientRect(),i=t.left*n.leftOffsetPercentage+t.top;parseFloat(i/l/n.finishDelayThrottle).toFixed(2),r[e].className+=" done"}}),l*n.finishSpeedPercent),t(r,i)},fadeSlideIn:function(n){if(void 0===n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||2,n.finishSpeedPercent=n.finishSpeedPercent||.72,n.leftOffsetPercentage=n.leftOffsetPercentage||.8,n.startVelocity=n.startVelocity||1100,void 0===n.selector&&(n.selector=".animate-fade-slide-in .item"),void 0===n.selector||""===n.selector)return alert("invalid fadeSlideIn selector"),!1;for(var r=document.querySelectorAll(n.selector),i=r.length,o=0,a=e(),s=0;i>s&&r[s].offsetTop<a;s++)o+=1;var l=n.startVelocity;for(s=0;o>s;s++){var u=r[s],c=u.getBoundingClientRect(),d=c.left*n.leftOffsetPercentage+c.top,h=parseFloat(d/l).toFixed(2);u.style.webkitTransitionDelay=h+"s",u.style.transitionDelay=h+"s",u.className+=" in"}setTimeout((function(){for(var e=0;o>e;e++){var t=r[e].getBoundingClientRect(),i=(t.left*n.leftOffsetPercentage+t.top)/l/n.finishDelayThrottle;parseFloat(i).toFixed(2)}r[0].className+=" done"}),l*n.finishSpeedPercent),t(r,i)},fadeSlideInRight:function(n){if(void 0===n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||2,n.finishSpeedPercent=n.finishSpeedPercent||.72,n.leftOffsetPercentage=n.leftOffsetPercentage||.8,n.startVelocity=n.startVelocity||1100,void 0===n.selector&&(n.selector=".animate-fade-slide-in-right .item"),void 0===n.selector||""===n.selector)return alert("invalid fadeSlideInRight selector"),!1;for(var r=document.querySelectorAll(n.selector),i=r.length,o=0,a=e(),s=0;i>s&&r[s].offsetTop<a;s++)o+=1;var l=n.startVelocity;for(s=0;o>s;s++){var u=r[s],c=u.getBoundingClientRect(),d=c.left*n.leftOffsetPercentage+c.top,h=parseFloat(d/l).toFixed(2);u.style.webkitTransitionDelay=h+"s",u.style.transitionDelay=h+"s",u.className+=" in"}setTimeout((function(){for(var e=0;o>e;e++){var t=r[e].getBoundingClientRect(),i=(t.left*n.leftOffsetPercentage+t.top)/l/n.finishDelayThrottle;parseFloat(i).toFixed(2)}r[0].className+=" done"}),l*n.finishSpeedPercent),t(r,i)},panInLeft:function(e){if("string"==typeof e&&(e={selector:e}),void 0===e.selector||""===e.selector)return alert("invalid pushDown selector"),!1;for(var t=document.querySelectorAll(e.selector),n=t.length,r=0;n>r;r++){var i=t[r],o=i.className.lastIndexOf("animate-pan-in-left");i.className=i.className.substr(0,o)}},pushDown:function(e){if("string"==typeof e&&(e={selector:e}),void 0===e.selector||""===e.selector)return alert("invalid pushDown selector"),!1;for(var t=document.querySelectorAll(e.selector),n=t.length,r=0;n>r;r++){var i=t[r],o=e.selector.split(".")[1],a=i.className.lastIndexOf(o);i.className=i.className.substr(0,a)}},ripple:function(n){if(void 0===n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||2,n.finishSpeedPercent=n.finishSpeedPercent||.72,n.leftOffsetPercentage=n.leftOffsetPercentage||.8,n.startVelocity=n.startVelocity||1100,void 0===n.selector&&(n.selector=".animate-ripple .item"),void 0===n.selector||""===n.selector)return alert("invalid ripple selector"),!1;for(var r=document.querySelectorAll(n.selector),i=r.length,o=0,a=e(),s=0;s<r.length&&r[s].offsetTop<a;s++)o+=1;var l=n.startVelocity;for(s=0;o>s;s++){var u=r[s],c=u.getBoundingClientRect(),d=c.left*n.leftOffsetPercentage+c.top,h=parseFloat(d/l).toFixed(2);u.style.webkitTransitionDelay=h+"s",u.style.transitionDelay=h+"s",u.className+=" in"}setTimeout((function(){for(var e=0;o>e;e++){var t=r[e].getBoundingClientRect(),i=(t.left*n.leftOffsetPercentage+t.top)/l/n.finishDelayThrottle;parseFloat(i).toFixed(2)}r[0].className+=" done"}),l*n.finishSpeedPercent),t(r,i)},slideUp:function(e){if("string"==typeof e&&(e={selector:e}),void 0===e.selector||""===e.selector)return alert("invalid pushDown selector"),!1;for(var t=document.querySelectorAll(e.selector),n=t.length,r=0;n>r;r++){var i=t[r],o=e.selector.split(".")[1],a=i.className.lastIndexOf(o);i.className=i.className.substr(0,a)}}}}e.factory("ionicMaterialMotion",t),t.$inject=[]}}])})),function(e,t){"use strict";function n(e,n){for(var r in n=n||{},t.forEach(n,(function(e,t){delete n[t]})),e)!e.hasOwnProperty(r)||"$"===r.charAt(0)&&"$"===r.charAt(1)||(n[r]=e[r]);return n}var r=t.$$minErr("$resource"),i=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;t.module("ngResource",["ng"]).provider("$resource",(function(){var e=/^https?:\/\/[^/]*/,o=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$log","$q","$timeout",function(a,s,l,u){function c(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function d(e,t){this.template=e,this.defaults=p({},o.defaults,t),this.urlParams={}}var h=t.noop,f=t.forEach,p=t.extend,m=t.copy,g=t.isArray,v=t.isDefined,_=t.isFunction,y=t.isNumber;return d.prototype={setUrlParams:function(t,n,i){var o,a,s=this,l=i||s.template,u="",d=s.urlParams={};f(l.split(/\W/),(function(e){if("hasOwnProperty"===e)throw r("badname");!/^\d+$/.test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(l)&&(d[e]={isQueryParamValue:new RegExp("\\?.*=:"+e+"(?:\\W|$)").test(l)})})),l=(l=l.replace(/\\:/g,":")).replace(e,(function(e){return u=e,""})),n=n||{},f(s.urlParams,(function(e,t){o=n.hasOwnProperty(t)?n[t]:s.defaults[t],v(o)&&null!==o?(a=e.isQueryParamValue?c(o,!0):c(o,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),l=l.replace(new RegExp(":"+t+"(\\W|$)","g"),(function(e,t){return a+t}))):l=l.replace(new RegExp("(/?):"+t+"(\\W|$)","g"),(function(e,t,n){return"/"===n.charAt(0)?n:t+n}))})),s.defaults.stripTrailingSlashes&&(l=l.replace(/\/+$/,"")||"/"),l=l.replace(/\/\.(?=\w+($|\?))/,"."),t.url=u+l.replace(/\/\\\./,"/."),f(n,(function(e,n){s.urlParams[n]||(t.params=t.params||{},t.params[n]=e)}))}},function e(c,b,w,L){function M(e,n){var o={};return n=p({},b,n),f(n,(function(n,a){var s;if(_(n)&&(n=n(e)),n&&n.charAt&&"@"===n.charAt(0)){if(s=e,null==(l=n.substr(1))||""===l||"hasOwnProperty"===l||!i.test("."+l))throw r("badmember",l);for(var l,u=0,c=(l=l.split(".")).length;u<c&&t.isDefined(s);u++){var d=l[u];s=null!==s?s[d]:void 0}}else s=n;o[a]=s})),o}function k(e){return e.resource}function x(e){n(e||{},this)}var S=new d(c,L);return w=p({},o.defaults.actions,w),x.prototype.toJSON=function(){var e=p({},this);return delete e.$promise,delete e.$resolved,delete e.$cancelRequest,e},f(w,(function(e,t){var i=/^(POST|PUT|PATCH)$/i.test(e.method),o=e.timeout,c=v(e.cancellable)?e.cancellable:S.defaults.cancellable;o&&!y(o)&&(s.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete e.timeout,o=null),x[t]=function(s,d,v,y){var b,w,L,T={};switch(arguments.length){case 4:L=y,w=v;case 3:case 2:if(!_(d)){T=s,b=d,w=v;break}if(_(s)){w=s,L=d;break}w=d,L=v;case 1:_(s)?w=s:i?b=s:T=s;break;case 0:break;default:throw r("badargs",arguments.length)}var $,D,C=this instanceof x,E=C?b:e.isArray?[]:new x(b),A={},P=e.interceptor&&e.interceptor.response||k,Y=e.interceptor&&e.interceptor.responseError||void 0;return f(e,(function(e,t){switch(t){default:A[t]=m(e);case"params":case"isArray":case"interceptor":case"cancellable":}})),!C&&c&&($=l.defer(),A.timeout=$.promise,o&&(D=u($.resolve,o))),i&&(A.data=b),S.setUrlParams(A,p({},M(b,e.params||{}),T),e.url),(T=a(A).then((function(i){var o=i.data;if(o){if(g(o)!==!!e.isArray)throw r("badcfg",t,e.isArray?"array":"object",g(o)?"array":"object",A.method,A.url);if(e.isArray)E.length=0,f(o,(function(e){"object"==typeof e?E.push(new x(e)):E.push(e)}));else{var a=E.$promise;n(o,E),E.$promise=a}}return i.resource=E,i}),(function(e){return(L||h)(e),l.reject(e)}))).finally((function(){E.$resolved=!0,!C&&c&&(E.$cancelRequest=h,u.cancel(D),$=D=A.timeout=null)})),T=T.then((function(e){var t=P(e);return(w||h)(t,e.headers,e.status,e.statusText),t}),Y),C?T:(E.$promise=T,E.$resolved=!1,c&&(E.$cancelRequest=$.resolve),E)},x.prototype["$"+t]=function(e,n,r){return _(e)&&(r=n,n=e,e={}),(e=x[t].call(this,e,this,n,r)).$promise||e}})),x.bind=function(t){return t=p({},b,t),e(c,t,w,L)},x}}]}))}(window,window.angular),function(e,t){"function"==typeof define&&define.amd?define([],(function(){return t()})):"object"==typeof module&&module.exports?module.exports=t():t()}(0,(function(){function e(e){"use strict";var t=e.storageKey(),n=e.storage(),r=function(){var r=e.preferredLanguage();angular.isString(r)?e.use(r):n.put(t,e.use())};r.displayName="fallbackFromIncorrectStorageValue",n?n.get(t)?e.use(n.get(t)).catch(r):r():angular.isString(e.preferredLanguage())&&e.use(e.preferredLanguage())}function t(e,t,n,r){"use strict";var i,o,a,s,l,u,c,d,h,f,p,m,g,v,_,y,b={},w=[],L=e,M=[],k="translate-cloak",x=!1,S=!1,T=".",$=!1,D=!1,C=0,E=!0,A="default",P={default:function(e){return(e||"").split("-").join("_")},java:function(e){var t=(e||"").split("-").join("_"),n=t.split("_");return 1<n.length?n[0].toLowerCase()+"_"+n[1].toUpperCase():t},bcp47:function(e){var t=(e||"").split("_").join("-"),n=t.split("-");switch(n.length){case 1:n[0]=n[0].toLowerCase();break;case 2:n[0]=n[0].toLowerCase(),4===n[1].length?n[1]=n[1].charAt(0).toUpperCase()+n[1].slice(1).toLowerCase():n[1]=n[1].toUpperCase();break;case 3:n[0]=n[0].toLowerCase(),n[1]=n[1].charAt(0).toUpperCase()+n[1].slice(1).toLowerCase(),n[2]=n[2].toUpperCase();break;default:return t}return n.join("-")},"iso639-1":function(e){return(e||"").split("_").join("-").split("-")[0].toLowerCase()}},Y=function(){if(angular.isFunction(r.getLocale))return r.getLocale();var e,n,i=t.$get().navigator,o=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(i.languages))for(e=0;e<i.languages.length;e++)if((n=i.languages[e])&&n.length)return n;for(e=0;e<o.length;e++)if((n=i[o[e]])&&n.length)return n;return null};Y.displayName="angular-translate/service: getFirstBrowserLanguage";var O=function(){var e=Y()||"";return P[A]&&(e=P[A](e)),e};O.displayName="angular-translate/service: getLocale";var I=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j=function(){return this.toString().replace(/^\s+|\s+$/g,"")},B=function(e){return angular.isString(e)?e.toLowerCase():e},H=function(e){if(e){for(var t,n=[],r=B(e),i=0,a=w.length;i<a;i++)n.push(B(w[i]));if(-1<(i=I(n,r)))return w[i];if(o)for(var s in o)if(o.hasOwnProperty(s)){var l=!1,u=Object.prototype.hasOwnProperty.call(o,s)&&B(s)===B(e);if("*"===s.slice(-1)&&(l=B(s.slice(0,-1))===B(e.slice(0,s.length-1))),(u||l)&&(t=o[s],-1<I(n,B(t))))return t}var c=e.split("_");return 1<c.length&&-1<I(n,B(c[0]))?c[0]:void 0}},N=function(e,t){if(!e&&!t)return b;if(e&&!t){if(angular.isString(e))return b[e]}else angular.isObject(b[e])||(b[e]={}),angular.extend(b[e],R(t));return this};this.translations=N,this.cloakClassName=function(e){return e?(k=e,this):k},this.nestedObjectDelimeter=function(e){return e?(T=e,this):T};var R=function(e,t,n,r){var i,o,a;for(i in t||(t=[]),n||(n={}),e)Object.prototype.hasOwnProperty.call(e,i)&&(a=e[i],angular.isObject(a)?R(a,t.concat(i),n,i):(o=t.length?""+t.join(T)+T+i:i,t.length&&i===r&&(n[""+t.join(T)]="@:"+o),n[o]=a));return n};R.displayName="flatObject",this.addInterpolation=function(e){return M.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return f=e,this},this.useSanitizeValueStrategy=function(e){return n.useStrategy(e),this},this.preferredLanguage=function(e){return e?(z(e),this):i};var z=function(e){return e&&(i=e),i};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(g=e,this):g},this.translationNotFoundIndicatorRight=function(e){return e?(v=e,this):v},this.fallbackLanguage=function(e){return F(e),this};var F=function(e){return e?(angular.isString(e)?(s=!0,a=[e]):angular.isArray(e)&&(s=!1,a=e),angular.isString(i)&&I(a,i)<0&&a.push(i),this):s?a[0]:a};this.use=function(e){if(e){if(!b[e]&&!p)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return l=e,this}return l},this.resolveClientLocale=function(){return O()};var V=function(e){return e?(L=e,this):d?d+L:L};this.storageKey=V,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return p=e,m=t||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return c=e,this},this.storagePrefix=function(e){return e?(d=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return h=e,this},this.usePostCompiling=function(e){return x=!!e,this},this.forceAsyncReload=function(e){return S=!!e,this},this.uniformLanguageTag=function(e){return e?angular.isString(e)&&(e={standard:e}):e={},A=e.standard,this},this.determinePreferredLanguage=function(e){var t=e&&angular.isFunction(e)?e():O();return i=w.length&&H(t)||t,this},this.registerAvailableLanguageKeys=function(e,t){return e?(w=e,t&&(o=t),this):w},this.useLoaderCache=function(e){return!1===e?_=void 0:!0===e?_=!0:void 0===e?_="$translationCache":e&&(_=e),this},this.directivePriority=function(e){return void 0===e?C:(C=e,this)},this.statefulFilter=function(e){return void 0===e?E:(E=e,this)},this.postProcess=function(e){return y=e||void 0,this},this.keepContent=function(e){return D=!!e,this},this.$get=["$log","$injector","$rootScope","$q",function(e,t,n,r){var o,d,A,P=t.get(f||"$translateDefaultInterpolation"),Y=!1,B={},W={},U=function(e,t,n,s,u,h){!l&&i&&(l=i);var f=u&&u!==l?H(u)||u:l;if(u&&oe(u),angular.isArray(e))return function(e){for(var i={},o=[],a=function(e){var o=r.defer(),a=function(t){i[e]=t,o.resolve([e,t])};return U(e,t,n,s,u,h).then(a,a),o.promise},l=0,c=e.length;l<c;l++)o.push(a(e[l]));return r.all(o).then((function(){return i}))}(e);var p=r.defer();e&&(e=j.apply(e));var m=function(){var e=W[f]||W[i];if(d=0,c&&!e){var t=o.get(L);if(e=W[t],a&&a.length){var n=I(a,t);d=0===n?1:0,I(a,i)<0&&a.push(i)}}return e}();if(m){var g=function(){u||(f=l),ne(e,t,n,s,f,h).then(p.resolve,p.reject)};g.displayName="promiseResolved",m.finally(g).catch(angular.noop)}else ne(e,t,n,s,f,h).then(p.resolve,p.reject);return p.promise},q=function(e){return g&&(e=[g,e].join(" ")),v&&(e=[e,v].join(" ")),e},G=function(e){l=e,c&&o.put(U.storageKey(),l),n.$emit("$translateChangeSuccess",{language:e}),P.setLocale(l);var t=function(e,t){B[t].setLocale(l)};t.displayName="eachInterpolatorLocaleSetter",angular.forEach(B,t),n.$emit("$translateChangeEnd",{language:e})},Z=function(e){if(!e)throw"No language key specified for loading.";var i=r.defer();n.$emit("$translateLoadingStart",{language:e}),Y=!0;var o=_;"string"==typeof o&&(o=t.get(o));var a=angular.extend({},m,{key:e,$http:angular.extend({},{cache:o},m.$http)}),s=function(t){var r={};n.$emit("$translateLoadingSuccess",{language:e}),angular.isArray(t)?angular.forEach(t,(function(e){angular.extend(r,R(e))})):angular.extend(r,R(t)),Y=!1,i.resolve({key:e,table:r}),n.$emit("$translateLoadingEnd",{language:e})};s.displayName="onLoaderSuccess";var l=function(e){n.$emit("$translateLoadingError",{language:e}),i.reject(e),n.$emit("$translateLoadingEnd",{language:e})};return l.displayName="onLoaderError",t.get(p)(a).then(s,l),i.promise};if(c&&(!(o=t.get(c)).get||!o.put))throw new Error("Couldn't use storage '"+c+"', missing get() or put() method!");if(M.length){var J=function(e){var n=t.get(e);n.setLocale(i||l),B[n.getInterpolationIdentifier()]=n};J.displayName="interpolationFactoryAdder",angular.forEach(M,J)}var X=function(e,t,n,i,o){var a=r.defer(),s=function(r){if(Object.prototype.hasOwnProperty.call(r,t)&&null!==r[t]){i.setLocale(e);var s=r[t];if("@:"===s.substr(0,2))X(e,s.substr(2),n,i,o).then(a.resolve,a.reject);else{var u=i.interpolate(r[t],n,"service",o,t);u=ie(t,r[t],u,n,e),a.resolve(u)}i.setLocale(l)}else a.reject()};return s.displayName="fallbackTranslationResolver",function(e){var t=r.defer();if(Object.prototype.hasOwnProperty.call(b,e))t.resolve(b[e]);else if(W[e]){var n=function(e){N(e.key,e.table),t.resolve(e.table)};n.displayName="translationTableResolver",W[e].then(n,t.reject)}else t.reject();return t.promise}(e).then(s,a.reject),a.promise},K=function(e,t,n,r,i){var o,a=b[e];if(a&&Object.prototype.hasOwnProperty.call(a,t)&&null!==a[t]){if(r.setLocale(e),o=r.interpolate(a[t],n,"filter",i,t),o=ie(t,a[t],o,n,e,i),!angular.isString(o)&&angular.isFunction(o.$$unwrapTrustedValue)){var s=o.$$unwrapTrustedValue();if("@:"===s.substr(0,2))return K(e,s.substr(2),n,r,i)}else if("@:"===o.substr(0,2))return K(e,o.substr(2),n,r,i);r.setLocale(l)}return o},Q=function(e,n,r,i){return h?t.get(h)(e,l,n,r,i):e},ee=function(e,t,n,i,o,s){var l=r.defer();if(e<a.length){var u=a[e];X(u,t,n,i,s).then((function(e){l.resolve(e)}),(function(){return ee(e+1,t,n,i,o,s).then(l.resolve,l.reject)}))}else if(o)l.resolve(o);else{var c=Q(t,n,o);h&&c?l.resolve(c):l.reject(q(t))}return l.promise},te=function(e,t,n,r,i){var o;if(e<a.length){var s=a[e];(o=K(s,t,n,r,i))||""===o||(o=te(e+1,t,n,r))}return o},ne=function(e,t,n,i,o,s){var l,u,c,f,p,m=r.defer(),g=o?b[o]:b,v=n?B[n]:P;if(g&&Object.prototype.hasOwnProperty.call(g,e)&&null!==g[e]){var _=g[e];if("@:"===_.substr(0,2))U(_.substr(2),t,n,i,o,s).then(m.resolve,m.reject);else{var y=v.interpolate(_,t,"service",s,e);y=ie(e,_,y,t,o),m.resolve(y)}}else{var w;h&&!Y&&(w=Q(e,t,i)),o&&a&&a.length?(l=e,u=t,c=v,f=i,p=s,ee(0<A?A:d,l,u,c,f,p)).then((function(e){m.resolve(e)}),(function(e){m.reject(q(e))})):h&&!Y&&w?i?m.resolve(i):m.resolve(w):i?m.resolve(i):m.reject(q(e))}return m.promise},re=function(e,t,n,r,i){var o,s=r?b[r]:b,l=P;if(B&&Object.prototype.hasOwnProperty.call(B,n)&&(l=B[n]),s&&Object.prototype.hasOwnProperty.call(s,e)&&null!==s[e]){var u=s[e];"@:"===u.substr(0,2)?o=re(u.substr(2),t,n,r,i):(o=l.interpolate(u,t,"filter",i,e),o=ie(e,u,o,t,r,i))}else{var c;h&&!Y&&(c=Q(e,t,i)),o=r&&a&&a.length?te((d=0)<A?A:d,e,t,l,i):h&&!Y&&c?c:q(e)}return o},ie=function(e,n,r,i,o,a){var s=y;return s&&("string"==typeof s&&(s=t.get(s)),s)?s(e,n,r,i,o,a):r},oe=function(e){b[e]||!p||W[e]||(W[e]=Z(e).then((function(e){return N(e.key,e.table),e})))};U.preferredLanguage=function(e){return e&&z(e),i},U.cloakClassName=function(){return k},U.nestedObjectDelimeter=function(){return T},U.fallbackLanguage=function(e){if(null!=e){if(F(e),p&&a&&a.length)for(var t=0,n=a.length;t<n;t++)W[a[t]]||(W[a[t]]=Z(a[t]));U.use(U.use())}return s?a[0]:a},U.useFallbackLanguage=function(e){if(null!=e)if(e){var t=I(a,e);-1<t&&(A=t)}else A=0},U.proposedLanguage=function(){return u},U.storage=function(){return o},U.negotiateLocale=H,U.use=function(e){if(!e)return l;var t=r.defer();t.promise.then(null,angular.noop),n.$emit("$translateChangeStart",{language:e});var i=H(e);return 0<w.length&&!i?r.reject(e):(i&&(e=i),u=e,!S&&b[e]||!p||W[e]?W[e]?W[e].then((function(e){return u===e.key&&G(e.key),t.resolve(e.key),e}),(function(e){return!l&&a&&0<a.length&&a[0]!==e?U.use(a[0]).then(t.resolve,t.reject):t.reject(e)})):(t.resolve(e),G(e)):(W[e]=Z(e).then((function(n){return N(n.key,n.table),t.resolve(n.key),u===e&&G(n.key),n}),(function(e){return n.$emit("$translateChangeError",{language:e}),t.reject(e),n.$emit("$translateChangeEnd",{language:e}),r.reject(e)})),W[e].finally((function(){var t;u===(t=e)&&(u=void 0),W[t]=void 0})).catch(angular.noop)),t.promise)},U.resolveClientLocale=function(){return O()},U.storageKey=function(){return V()},U.isPostCompilingEnabled=function(){return x},U.isForceAsyncReloadEnabled=function(){return S},U.isKeepContent=function(){return D},U.refresh=function(e){if(!p)throw new Error("Couldn't refresh translation table, no loader registered!");n.$emit("$translateRefreshStart",{language:e});var t=r.defer(),i={};function o(e){var t=Z(e);return(W[e]=t).then((function(t){b[e]={},N(e,t.table),i[e]=!0}),angular.noop),t}if(t.promise.then((function(){for(var e in b)b.hasOwnProperty(e)&&(e in i||delete b[e]);l&&G(l)}),angular.noop).finally((function(){n.$emit("$translateRefreshEnd",{language:e})})),e)b[e]?o(e).then(t.resolve,t.reject):t.reject();else{var s=a&&a.slice()||[];l&&-1===s.indexOf(l)&&s.push(l),r.all(s.map(o)).then(t.resolve,t.reject)}return t.promise},U.instant=function(e,t,n,r,o){var s=r&&r!==l?H(r)||r:l;if(null===e||angular.isUndefined(e))return e;if(r&&oe(r),angular.isArray(e)){for(var u={},c=0,d=e.length;c<d;c++)u[e[c]]=U.instant(e[c],t,n,r,o);return u}if(angular.isString(e)&&e.length<1)return e;e&&(e=j.apply(e));var f,p,m=[];i&&m.push(i),s&&m.push(s),a&&a.length&&(m=m.concat(a));for(var _=0,y=m.length;_<y;_++){var w=m[_];if(b[w]&&void 0!==b[w][e]&&(f=re(e,t,n,s,o)),void 0!==f)break}return f||""===f||(g||v?f=q(e):(f=P.interpolate(e,t,"filter",o),h&&!Y&&(p=Q(e,t,o)),h&&!Y&&p&&(f=p))),f},U.versionInfo=function(){return"2.18.1"},U.loaderCache=function(){return _},U.directivePriority=function(){return C},U.statefulFilter=function(){return E},U.isReady=function(){return $};var ae=r.defer();ae.promise.then((function(){$=!0})),U.onReady=function(e){var t=r.defer();return angular.isFunction(e)&&t.promise.then(e),$?t.resolve():ae.promise.then(t.resolve),t.promise},U.getAvailableLanguageKeys=function(){return 0<w.length?w:null},U.getTranslationTable=function(e){return(e=e||U.use())&&b[e]?angular.copy(b[e]):null};var se=n.$on("$translateReady",(function(){ae.resolve(),se(),se=null})),le=n.$on("$translateChangeEnd",(function(){ae.resolve(),le(),le=null}));if(p){if(angular.equals(b,{})&&U.use()&&U.use(U.use()),a&&a.length)for(var ue=function(e){return N(e.key,e.table),n.$emit("$translateChangeEnd",{language:e.key}),e},ce=0,de=a.length;ce<de;ce++){var he=a[ce];!S&&b[he]||(W[he]=Z(he).then(ue))}}else n.$emit("$translateReady",{language:U.use()});return U}]}function n(e,t){"use strict";return{setLocale:function(e){},getInterpolationIdentifier:function(){return"default"},useSanitizeValueStrategy:function(e){return t.useStrategy(e),this},interpolate:function(n,r,i,o,a){var s;return r=r||{},r=t.sanitize(r,"params",o,i),angular.isNumber(n)?s=""+n:angular.isString(n)?(s=e(n)(r),s=t.sanitize(s,"text",o,i)):s="",s}}}function r(e,t,n,r,i){"use strict";var o=function(e){return angular.isString(e)?e.toLowerCase():e};return{restrict:"AE",scope:!0,priority:e.directivePriority(),compile:function(a,s){var l=s.translateValues?s.translateValues:void 0,u=s.translateInterpolation?s.translateInterpolation:void 0,c=s.translateSanitizeStrategy?s.translateSanitizeStrategy:void 0,d=a[0].outerHTML.match(/translate-value-+/i),h="^(.*)("+t.startSymbol()+".*"+t.endSymbol()+")(.*)",f="^(.*)"+t.startSymbol()+"(.*)"+t.endSymbol()+"(.*)";return function(a,p,m){a.interpolateParams={},a.preText="",a.postText="",a.translateNamespace=function e(t){return t.translateNamespace?t.translateNamespace:t.$parent?e(t.$parent):void 0}(a);var g={},v=function(e){if(angular.isFunction(v._unwatchOld)&&(v._unwatchOld(),v._unwatchOld=void 0),angular.equals(e,"")||!angular.isDefined(e)){var n=function(){return this.toString().replace(/^\s+|\s+$/g,"")}.apply(p.text()),r=n.match(h);if(angular.isArray(r)){a.preText=r[1],a.postText=r[3],g.translate=t(r[2])(a.$parent);var i=n.match(f);angular.isArray(i)&&i[2]&&i[2].length&&(v._unwatchOld=a.$watch(i[2],(function(e){g.translate=e,M()})))}else g.translate=n||void 0}else g.translate=e;M()},_=function(e){m.$observe(e,(function(t){g[e]=t,M()}))};!function(e,t,n){if(t.translateValues&&angular.extend(e,r(t.translateValues)(a.$parent)),d)for(var i in n)Object.prototype.hasOwnProperty.call(t,i)&&"translateValue"===i.substr(0,14)&&"translateValues"!==i&&(e[o(i.substr(14,1))+i.substr(15)]=n[i])}(a.interpolateParams,m,s);var y=!0;for(var b in m.$observe("translate",(function(e){void 0===e?v(""):""===e&&y||(g.translate=e,M()),y=!1})),m)m.hasOwnProperty(b)&&"translateAttr"===b.substr(0,13)&&13<b.length&&_(b);if(m.$observe("translateDefault",(function(e){a.defaultText=e,M()})),c&&m.$observe("translateSanitizeStrategy",(function(e){a.sanitizeStrategy=r(e)(a.$parent),M()})),l&&m.$observe("translateValues",(function(e){e&&a.$parent.$watch((function(){angular.extend(a.interpolateParams,r(e)(a.$parent))}))})),d){var w=function(e){m.$observe(e,(function(t){var n=o(e.substr(14,1))+e.substr(15);a.interpolateParams[n]=t}))};for(var L in m)Object.prototype.hasOwnProperty.call(m,L)&&"translateValue"===L.substr(0,14)&&"translateValues"!==L&&w(L)}var M=function(){for(var e in g)g.hasOwnProperty(e)&&void 0!==g[e]&&k(e,g[e],a,a.interpolateParams,a.defaultText,a.translateNamespace)},k=function(t,n,r,i,o,a){n?(a&&"."===n.charAt(0)&&(n=a+n),e(n,i,u,o,r.translateLanguage,r.sanitizeStrategy).then((function(e){x(e,r,!0,t)}),(function(e){x(e,r,!1,t)}))):x(n,r,!1,t)},x=function(t,r,i,o){if(i||void 0!==r.defaultText&&(t=r.defaultText),"translate"===o){(i||!i&&!e.isKeepContent()&&void 0===m.translateKeepContent)&&p.empty().append(r.preText+t+r.postText);var a=e.isPostCompilingEnabled(),l=void 0!==s.translateCompile,u=l&&"false"!==s.translateCompile;(a&&!l||u)&&n(p.contents())(r)}else{var c=m.$attr[o];"data-"===c.substr(0,5)&&(c=c.substr(5)),c=c.substr(15),p.attr(c,t)}};(l||d||m.translateDefault)&&a.$watch("interpolateParams",M,!0),a.$on("translateLanguageChanged",M);var S=i.$on("$translateChangeSuccess",M);p.text().length?m.translate?v(m.translate):v(""):m.translate&&v(m.translate),M(),a.$on("$destroy",S)}}}}function i(e,t){"use strict";return{restrict:"A",priority:e.directivePriority(),link:function(n,r,i){var a,s,l,u={},c=function(){angular.forEach(a,(function(t,o){t&&(u[o]=!0,n.translateNamespace&&"."===t.charAt(0)&&(t=n.translateNamespace+t),e(t,s,i.translateInterpolation,void 0,n.translateLanguage,l).then((function(e){r.attr(o,e)}),(function(e){r.attr(o,e)})))})),angular.forEach(u,(function(e,t){a[t]||(r.removeAttr(t),delete u[t])}))};o(n,i.translateAttr,(function(e){a=e}),c),o(n,i.translateValues,(function(e){s=e}),c),o(n,i.translateSanitizeStrategy,(function(e){l=e}),c),i.translateValues&&n.$watch(i.translateValues,c,!0),n.$on("translateLanguageChanged",c);var d=t.$on("$translateChangeSuccess",c);c(),n.$on("$destroy",d)}}}function o(e,t,n,r){"use strict";t&&("::"===t.substr(0,2)?t=t.substr(2):e.$watch(t,(function(e){n(e),r()}),!0),n(e.$eval(t)))}function a(e,t){"use strict";return{compile:function(n){var r=function(t){t.addClass(e.cloakClassName())};return r(n),function(n,i,o){var a=function(t){t.removeClass(e.cloakClassName())}.bind(this,i),s=r.bind(this,i);o.translateCloak&&o.translateCloak.length?(o.$observe("translateCloak",(function(t){e(t).then(a,s)})),t.$on("$translateChangeSuccess",(function(){e(o.translateCloak).then(a,s)}))):e.onReady(a)}}}}function s(){"use strict";return{restrict:"A",scope:!0,compile:function(){return{pre:function(e,t,n){e.translateNamespace=function e(t){return t.translateNamespace?t.translateNamespace:t.$parent?e(t.$parent):void 0}(e),e.translateNamespace&&"."===n.translateNamespace.charAt(0)?e.translateNamespace+=n.translateNamespace:e.translateNamespace=n.translateNamespace}}}}}function l(){"use strict";return{restrict:"A",scope:!0,compile:function(){return function(e,t,n){n.$observe("translateLanguage",(function(t){e.translateLanguage=t})),e.$watch("translateLanguage",(function(){e.$broadcast("translateLanguageChanged")}))}}}}function u(e,t){"use strict";var n=function(n,r,i,o){if(!angular.isObject(r)){var a=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};r=e(r)(a)}return t.instant(n,r,i,o)};return t.statefulFilter()&&(n.$stateful=!0),n}function c(e){"use strict";return e("translations")}return e.$inject=["$translate"],t.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],n.$inject=["$interpolate","$translateSanitization"],r.$inject=["$translate","$interpolate","$compile","$parse","$rootScope"],i.$inject=["$translate","$rootScope"],a.$inject=["$translate","$rootScope"],u.$inject=["$parse","$translate"],c.$inject=["$cacheFactory"],angular.module("pascalprecht.translate",["ng"]).run(e),e.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",(function(){"use strict";var e,t,n,r=null,i=!1,o=!1;(n={sanitize:function(e,t){return"text"===t&&(e=s(e)),e},escape:function(e,t){return"text"===t&&(e=a(e)),e},sanitizeParameters:function(e,t){return"params"===t&&(e=u(e,s)),e},escapeParameters:function(e,t){return"params"===t&&(e=u(e,a)),e},sce:function(e,t,n){return"text"===t?e=l(e):"params"===t&&"filter"!==n&&(e=u(e,a)),e},sceParameters:function(e,t){return"params"===t&&(e=u(e,l)),e}}).escaped=n.escapeParameters,this.addStrategy=function(e,t){return n[e]=t,this},this.removeStrategy=function(e){return delete n[e],this},this.useStrategy=function(e){return i=!0,r=e,this},this.$get=["$injector","$log",function(a,s){var l,u={};return a.has("$sanitize")&&(e=a.get("$sanitize")),a.has("$sce")&&(t=a.get("$sce")),{useStrategy:(l=this,function(e){l.useStrategy(e)}),sanitize:function(e,t,l,c){if(r||i||o||(s.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),o=!0),l||null===l||(l=r),!l)return e;c||(c="service");var d,h,f,p,m=angular.isArray(l)?l:[l];return d=e,h=t,f=c,p=m,angular.forEach(p,(function(e){if(angular.isFunction(e))d=e(d,h,f);else if(angular.isFunction(n[e]))d=n[e](d,h,f);else{if(!angular.isString(n[e]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+e+"'");if(!u[n[e]])try{u[n[e]]=a.get(n[e])}catch(t){throw u[n[e]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+e+"'")}d=u[n[e]](d,h,f)}})),d}}}];var a=function(e){var t=angular.element("<div></div>");return t.text(e),t.html()},s=function(t){if(!e)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return e(t)},l=function(e){if(!t)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sce service.");return t.trustAsHtml(e)},u=function(e,t,n){if(angular.isDate(e))return e;if(angular.isObject(e)){var r=angular.isArray(e)?[]:{};if(n){if(-1<n.indexOf(e))throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else n=[];return n.push(e),angular.forEach(e,(function(e,i){angular.isFunction(e)||(r[i]=u(e,t,n))})),n.splice(-1,1),r}return angular.isNumber(e)?e:!0===e||!1===e?e:angular.isUndefined(e)||null===e?e:t(e)}})),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",t),t.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",n),n.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",r),r.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateAttr",i),i.displayName="translateAttrDirective",angular.module("pascalprecht.translate").directive("translateCloak",a),a.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",s),s.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").directive("translateLanguage",l),l.displayName="translateLanguageDirective",angular.module("pascalprecht.translate").filter("translate",u),u.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",c),c.displayName="$translationCache","pascalprecht.translate"})),function(e,t){"use strict";function n(){return["$animate",function(e){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(t,n,r,o,a){var s,l,u,c=n[0],d=r.ngMessage||r.when,h=function(e){s=e?i(e)?e:e.split(/[\s,]+/):null,o.reRender()};(r=r.ngMessageExp||r.whenExp)?(h(t.$eval(r)),t.$watchCollection(r,h)):h(d),o.register(c,u={test:function(e){var t=s;return t?i(t)?0<=t.indexOf(e):t.hasOwnProperty(e):void 0},attach:function(){l||a((function(t,r){e.enter(t,null,n);var i=(l=t).$$attachId=o.getAttachId();l.on("$destroy",(function(){l&&l.$$attachId===i&&(o.deregister(c),u.detach()),r.$destroy()}))}))},detach:function(){if(l){var t=l;l=null,e.leave(t)}}})}}}]}var r,i,o,a;t.module("ngMessages",[],(function(){r=t.forEach,i=t.isArray,o=t.isString,a=t.element})).directive("ngMessages",["$animate",function(e){function t(e,t){return o(t)&&0===t.length||n(e.$eval(t))}function n(e){return o(e)?e.length:!!e}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,o,a){function s(e,t){for(var n=t,r=[];n&&n!==e;){var i=n.$$ngMessageNode;if(i&&i.length)return f[i];n.childNodes.length&&-1===r.indexOf(n)?(r.push(n),n=n.childNodes[n.childNodes.length-1]):n.previousSibling?n=n.previousSibling:(n=n.parentNode,r.push(n))}}var l=this,u=0,c=0;this.getAttachId=function(){return c++};var d,h,f=this.messages={};this.render=function(s){d=!1,h=s=s||{};for(var u=t(o,a.ngMessagesMultiple)||t(o,a.multiple),c=[],f={},p=l.head,m=!1,g=0;null!=p;){g++;var v=p.message,_=!1;m||r(s,(function(e,t){!_&&n(e)&&v.test(t)&&!f[t]&&(_=f[t]=!0,v.attach())})),_?m=!u:c.push(v),p=p.next}r(c,(function(e){e.detach()})),c.length!==g?e.setClass(i,"ng-active","ng-inactive"):e.setClass(i,"ng-inactive","ng-active")},o.$watchCollection(a.ngMessages||a.for,l.render),i.on("$destroy",(function(){r(f,(function(e){e.message.detach()}))})),this.reRender=function(){d||(d=!0,o.$evalAsync((function(){d&&h&&l.render(h)})))},this.register=function(e,t){var n=u.toString();f[n]={message:t};var r=i[0],o=f[n];l.head?(r=s(r,e))?(o.next=r.next,r.next=o):(o.next=l.head,l.head=o):l.head=o,e.$$ngMessageNode=n,u++,l.reRender()},this.deregister=function(e){var t=e.$$ngMessageNode;delete e.$$ngMessageNode;var n=f[t];(e=s(i[0],e))?e.next=n.next:l.head=n.next,delete f[t],l.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(e,t,n){function r(e,r){var i=n.$$createComment?n.$$createComment("ngMessagesInclude",r):t[0].createComment(" ngMessagesInclude: "+r+" ");i=a(i),e.after(i),e.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(t,i,a){var s=a.ngMessagesInclude||a.src;e(s).then((function(e){t.$$destroyed||(o(e)&&!e.trim()?r(i,s):n(e)(t,(function(e){i.after(e),r(i,s)})))}))}}}]).directive("ngMessage",n()).directive("ngMessageExp",n())}(window,window.angular),function(e,t,n){"use strict";t.module("ngApi",[]).factory("Api",["$q","$rootScope",function(e,n){var r=function(e,t){this.gantt=e,this.apiId=t,this.eventListeners=[]};function i(e,t,r,i){return n.$on(e,(function(){var e=Array.prototype.slice.call(arguments);e.splice(0,1),t.apply(i||r,e)}))}return r.prototype.suppressEvents=function(e,n){var r=this,o=t.isArray(e)?e:[e],a=[];o.forEach((function(e){a=r.eventListeners.filter((function(t){return e===t.handler}))})),a.forEach((function(e){e.dereg()})),n(),a.forEach((function(e){e.dereg=i(e.eventId,e.handler,r.gantt,e._this)}))},r.prototype.registerEvent=function(t,r){var o=this;o[t]||(o[t]={});var a=o[t];a.on||(a.on={},a.raise={},a.raisePromise={});var s="event:api:"+this.apiId+":"+t+":"+r;a.raise[r]=function(){n.$emit.apply(n,[s].concat(Array.prototype.slice.call(arguments)))},a.raisePromise[r]=function(){var t=n.$$listenerCount[s];if(!t)return e.when();var r=e.defer();t>1&&((r={promise:r.promise,notify:r.notify,raw:r,count:0,errors:[],results:[]}).checkFinish=function(){r.count<t||(r.count=0,r.errors.length?(1==r.errors.length?r.raw.reject(r.errors[0]):r.raw.reject(r.errors),r.errors=[]):(r.raw.resolve(r.results),r.results=[]))},r.resolve=function(e){r.results.push(e),r.count++,r.checkFinish()},r.reject=function(e){r.errors.push(e),r.count++,r.checkFinish()});var i=[s].concat(Array.prototype.slice.call(arguments)).concat([r]);return n.$emit.apply(n,i),r.promise},a.on[r]=function(e,t,n){var r={handler:t,dereg:i(s,t,o.gantt,n),eventId:s,scope:e,_this:n};o.eventListeners.push(r);var a=function(){r.dereg();var e=o.eventListeners.indexOf(r);o.eventListeners.splice(e,1)};return e.$on("$destroy",(function(){a()})),a}},r.prototype.hasListeners=function(e,n){var r=this,o=t.isArray(e)?e:[e],a=[];o.forEach((function(e){a=r.eventListeners.filter((function(t){return e===t.handler}))})),a.forEach((function(e){e.dereg()})),n(),a.forEach((function(e){e.dereg=i(e.eventId,e.handler,r.gantt,e._this)}))},r.prototype.registerMethod=function(e,t,n,r){this[e]||(this[e]={}),this[e][t]=function(){n.apply(r||this.app,arguments)}},r}])}(window,window.angular),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t("undefined"==typeof angular?require("angular"):angular):"function"==typeof define&&define.amd?define("angular-cache",["angular"],t):e.angularCacheModuleName=t(e.angular)}(this,(function(e){"use strict";function t(e,t){if(e||(e=function(e){return e}),t||(t=function(e,t){return e===t}),"function"!=typeof e)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "weightFunc" must be a function!');if("function"!=typeof t)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "compareFunc" must be a function!');this.weightFunc=e,this.compareFunc=t,this.heap=[]}function n(e){var t=[],n=void 0;if(!f.isObject(e))return t;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t}function r(e){return e&&"function"==typeof e.then}function i(e){return f.isNumber(e)?e.toString():e}function o(e){var t={},n=void 0;if(!f.isObject(e))return t;for(n in e)e.hasOwnProperty(n)&&(t[n]=n);return t}function a(e,a){if(e in m)throw new Error(e+" already exists!");if(!f.isString(e))throw new Error("cacheId must be a string!");var s={},u={},c=null,d=new t((function(e){return e.expires}),f.equals),h=new t((function(e){return e.accessed}),f.equals),g=m[e]={$$id:e,destroy:function(){clearInterval(this.$$cacheFlushIntervalId),clearInterval(this.$$recycleFreqId),this.removeAll(),c&&(c().removeItem(this.$$prefix+".keys"),c().removeItem(this.$$prefix)),c=null,s=null,h=null,d=null,this.$$prefix=null,delete m[this.$$id]},disable:function(){this.$$disabled=!0},enable:function(){delete this.$$disabled},get:function(e,t){var n=this;if(Array.isArray(e)){var r=function(){var r=[];return e.forEach((function(e){var i=n.get(e,t);null!=i&&r.push(i)})),{v:r}}();if("object"===(void 0===r?"undefined":l.typeof(r)))return r.v}else if(e=i(e),this.$$disabled)return;if(t=t||{},!f.isString(e))throw new Error("key must be a string!");if(t&&!f.isObject(t))throw new Error("options must be an object!");if(t.onExpire&&!f.isFunction(t.onExpire))throw new Error("options.onExpire must be a function!");var o=void 0;if(c){if(u[e])return u[e];var a=c().getItem(this.$$prefix+".data."+e);if(!a)return;o=f.fromJson(a)}else if(f.isObject(s)){if(!(e in s))return;o=s[e]}var d=o.value,p=(new Date).getTime();return c?(h.remove({key:e,accessed:o.accessed}),o.accessed=p,h.push({key:e,accessed:p})):(h.remove(o),o.accessed=p,h.push(o)),"passive"===this.$$deleteOnExpire&&"expires"in o&&o.expires<p?(this.remove(e),this.$$onExpire?this.$$onExpire(e,o.value,t.onExpire):t.onExpire&&t.onExpire.call(this,e,o.value),d=void 0):c&&c().setItem(this.$$prefix+".data."+e,JSON.stringify(o)),d},info:function(e){if(e){var t=void 0;if(c){var n=c().getItem(this.$$prefix+".data."+e);return n?{created:(t=f.fromJson(n)).created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}:void 0}return f.isObject(s)&&e in s?{created:(t=s[e]).created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}:void 0}return{id:this.$$id,capacity:this.$$capacity,maxAge:this.$$maxAge,deleteOnExpire:this.$$deleteOnExpire,onExpire:this.$$onExpire,cacheFlushInterval:this.$$cacheFlushInterval,recycleFreq:this.$$recycleFreq,storageMode:this.$$storageMode,storageImpl:c?c():void 0,disabled:!!this.$$disabled,size:h&&h.size()||0}},keys:function(){if(c){var e=c().getItem(this.$$prefix+".keys");return e?f.fromJson(e):[]}return n(s)},keySet:function(){if(c){var e=c().getItem(this.$$prefix+".keys"),t={};if(e)for(var n=f.fromJson(e),r=0;r<n.length;r++)t[n[r]]=n[r];return t}return o(s)},put:function(e,t,n){var o=this;n||(n={});var a="storeOnResolve"in n?!!n.storeOnResolve:this.$$storeOnResolve,l="storeOnReject"in n?!!n.storeOnReject:this.$$storeOnReject,p=function(t,n){return function(r){if(t&&(delete u[e],f.isObject(r)&&"status"in r&&"data"in r?(r=[r.status,r.data,r.headers(),r.statusText],o.put(e,r)):o.put(e,r)),n){if(f.Promise)return f.Promise.reject(r);throw r}return r}};if(!this.$$disabled&&f.isObject(s)&&null!=t){if(e=i(e),!f.isString(e))throw new Error("key must be a string!");var m=(new Date).getTime(),g={key:e,value:r(t)?t.then(p(a,!1),p(l,!0)):t,created:void 0===n.created?m:n.created,accessed:void 0===n.accessed?m:n.accessed};if(n.maxAge&&(g.maxAge=n.maxAge),void 0===n.expires?g.expires=g.created+(g.maxAge||this.$$maxAge):g.expires=n.expires,c){if(r(g.value))return u[e]=g.value,u[e];var v=c().getItem(this.$$prefix+".keys"),_=v?f.fromJson(v):[];c().getItem(this.$$prefix+".data."+e)&&this.remove(e),d.push({key:e,expires:g.expires}),h.push({key:e,accessed:g.accessed}),c().setItem(this.$$prefix+".data."+e,JSON.stringify(g));for(var y=!1,b=0;b<_.length;b++)if(_[b]===e){y=!0;break}y||_.push(e),c().setItem(this.$$prefix+".keys",JSON.stringify(_))}else s[e]&&this.remove(e),d.push(g),h.push(g),s[e]=g,delete u[e];return h.size()>this.$$capacity&&this.remove(h.peek().key),t}},remove:function(e){if(delete u[e+=""],c){var t=c().getItem(this.$$prefix+".data."+e);if(t){var n=f.fromJson(t);h.remove({key:e,accessed:n.accessed}),d.remove({key:e,expires:n.expires}),c().removeItem(this.$$prefix+".data."+e);var r=c().getItem(this.$$prefix+".keys"),i=r?f.fromJson(r):[],o=i.indexOf(e);return o>=0&&i.splice(o,1),c().setItem(this.$$prefix+".keys",JSON.stringify(i)),n.value}}else if(f.isObject(s)){var a=s[e]?s[e].value:void 0;return h.remove(s[e]),d.remove(s[e]),s[e]=null,delete s[e],a}},removeAll:function(){if(c){h.removeAll(),d.removeAll();var e=c().getItem(this.$$prefix+".keys");if(e)for(var t=f.fromJson(e),n=0;n<t.length;n++)this.remove(t[n]);c().setItem(this.$$prefix+".keys",JSON.stringify([]))}else if(f.isObject(s)){for(var r in h.removeAll(),d.removeAll(),s)s[r]=null;s={}}else h.removeAll(),d.removeAll(),s={};u={}},removeExpired:function(){for(var e=(new Date).getTime(),t={},n=void 0,r=void 0;(r=d.peek())&&r.expires<=e;)t[r.key]=r.value?r.value:null,d.pop();if(c)for(n in t){var i=c().getItem(this.$$prefix+".data."+n);i&&(t[n]=f.fromJson(i).value,this.remove(n))}else for(n in t)this.remove(n);if(this.$$onExpire)for(n in t)this.$$onExpire(n,t[n]);return t},setCacheFlushInterval:function(e){var t=this;if(null===e)delete t.$$cacheFlushInterval;else{if(!f.isNumber(e))throw new Error("cacheFlushInterval must be a number!");if(0>e)throw new Error("cacheFlushInterval must be greater than zero!");e!==t.$$cacheFlushInterval&&(t.$$cacheFlushInterval=e,clearInterval(t.$$cacheFlushIntervalId),t.$$cacheFlushIntervalId=setInterval((function(){t.removeAll()}),t.$$cacheFlushInterval))}},setCapacity:function(e){if(null===e)delete this.$$capacity;else{if(!f.isNumber(e))throw new Error("capacity must be a number!");if(0>e)throw new Error("capacity must be greater than zero!");this.$$capacity=e}for(var t={};h.size()>this.$$capacity;)t[h.peek().key]=this.remove(h.peek().key);return t},setDeleteOnExpire:function(e,t){if(null===e)delete this.$$deleteOnExpire;else{if(!f.isString(e))throw new Error("deleteOnExpire must be a string!");if("none"!==e&&"passive"!==e&&"aggressive"!==e)throw new Error('deleteOnExpire must be "none", "passive" or "aggressive"!');this.$$deleteOnExpire=e}!1!==t&&this.setRecycleFreq(this.$$recycleFreq)},setMaxAge:function(e){if(null===e)this.$$maxAge=Number.MAX_VALUE;else{if(!f.isNumber(e))throw new Error("maxAge must be a number!");if(0>e)throw new Error("maxAge must be greater than zero!");this.$$maxAge=e}var t=void 0,r=void 0,i=void 0;if(d.removeAll(),c){var o=c().getItem(this.$$prefix+".keys");for(r=o?f.fromJson(o):[],t=0;t<r.length;t++){i=r[t];var a=c().getItem(this.$$prefix+".data."+i);if(a){var l=f.fromJson(a);this.$$maxAge===Number.MAX_VALUE?l.expires=Number.MAX_VALUE:l.expires=l.created+(l.maxAge||this.$$maxAge),d.push({key:i,expires:l.expires})}}}else for(r=n(s),t=0;t<r.length;t++)i=r[t],this.$$maxAge===Number.MAX_VALUE?s[i].expires=Number.MAX_VALUE:s[i].expires=s[i].created+(s[i].maxAge||this.$$maxAge),d.push(s[i]);return"aggressive"===this.$$deleteOnExpire?this.removeExpired():{}},setOnExpire:function(e){if(null===e)delete this.$$onExpire;else{if(!f.isFunction(e))throw new Error("onExpire must be a function!");this.$$onExpire=e}},setOptions:function(e,t){if(e=e||{},t=!!t,!f.isObject(e))throw new Error("cacheOptions must be an object!");"storagePrefix"in e?this.$$storagePrefix=e.storagePrefix:t&&(this.$$storagePrefix=p.storagePrefix),this.$$prefix=this.$$storagePrefix+this.$$id,"disabled"in e?this.$$disabled=!!e.disabled:t&&(this.$$disabled=p.disabled),"deleteOnExpire"in e?this.setDeleteOnExpire(e.deleteOnExpire,!1):t&&this.setDeleteOnExpire(p.deleteOnExpire,!1),"recycleFreq"in e?this.setRecycleFreq(e.recycleFreq):t&&this.setRecycleFreq(p.recycleFreq),"maxAge"in e?this.setMaxAge(e.maxAge):t&&this.setMaxAge(p.maxAge),"storeOnResolve"in e?this.$$storeOnResolve=!!e.storeOnResolve:t&&(this.$$storeOnResolve=p.storeOnResolve),"storeOnReject"in e?this.$$storeOnReject=!!e.storeOnReject:t&&(this.$$storeOnReject=p.storeOnReject),"capacity"in e?this.setCapacity(e.capacity):t&&this.setCapacity(p.capacity),"cacheFlushInterval"in e?this.setCacheFlushInterval(e.cacheFlushInterval):t&&this.setCacheFlushInterval(p.cacheFlushInterval),"onExpire"in e?this.setOnExpire(e.onExpire):t&&this.setOnExpire(p.onExpire),"storageMode"in e||"storageImpl"in e?this.setStorageMode(e.storageMode||p.storageMode,e.storageImpl||p.storageImpl):t&&this.setStorageMode(p.storageMode,p.storageImpl)},setRecycleFreq:function(e){if(null===e)delete this.$$recycleFreq;else{if(!f.isNumber(e))throw new Error("recycleFreq must be a number!");if(0>e)throw new Error("recycleFreq must be greater than zero!");this.$$recycleFreq=e}clearInterval(this.$$recycleFreqId),"aggressive"===this.$$deleteOnExpire?function(e){e.$$recycleFreqId=setInterval((function(){e.removeExpired()}),e.$$recycleFreq)}(this):delete this.$$recycleFreqId},setStorageMode:function(e,t){function n(e,t){var n=this.keys(),r=n.length;if(r){for(var i=void 0,s=f.isObject(t),l=0;r>l;l++){if(i=n[l],e){var u=e().getItem(this.$$prefix+".data."+i);u&&(a[i]=f.fromJson(u))}else s&&(a[i]=t[i]);this.remove(i)}o=!0}}if(!f.isString(e))throw new Error("storageMode must be a string!");if("memory"!==e&&"localStorage"!==e&&"sessionStorage"!==e)throw new Error('storageMode must be "memory", "localStorage" or "sessionStorage"!');var r=c,i=s,o=!1,a={};if(this.$$initializing||n.call(this,r,i),this.$$storageMode=e,t){if(!f.isObject(t))throw new Error("storageImpl must be an object!");if(!("setItem"in t&&"function"==typeof t.setItem))throw new Error('storageImpl must implement "setItem(key, value)"!');if(!("getItem"in t&&"function"==typeof t.getItem))throw new Error('storageImpl must implement "getItem(key)"!');if(!("removeItem"in t)||"function"!=typeof t.removeItem)throw new Error('storageImpl must implement "removeItem(key)"!');c=function(){return t}}else if("localStorage"===this.$$storageMode)try{localStorage.setItem("cachefactory","cachefactory"),localStorage.removeItem("cachefactory"),c=function(){return localStorage}}catch(e){c=null,this.$$storageMode="memory"}else if("sessionStorage"===this.$$storageMode)try{sessionStorage.setItem("cachefactory","cachefactory"),sessionStorage.removeItem("cachefactory"),c=function(){return sessionStorage}}catch(e){c=null,this.$$storageMode="memory"}else c=null,this.$$storageMode="memory";if(this.$$initializing&&n.call(this,c,s),o){var l=void 0;for(var u in a)l=a[u],this.put(u,l.value,{created:l.created,accessed:l.accessed,expires:l.expires})}},touch:function(e,t){var n=this;if(e){var r=this.get(e,{onExpire:function(e,t){return n.put(e,t)}});r&&this.put(e,r,t)}else for(var i=this.keys(),o=0;o<i.length;o++)this.touch(i[o],t)},values:function(){for(var e=this.keys(),t=[],n=0;n<e.length;n++)t.push(this.get(e[n]));return t}};return g.$$initializing=!0,g.setOptions(a,!0),g.$$initializing=!1,g}function s(e,t){return a(e,t)}e="default"in e?e.default:e;var l={};l.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var u=function(e,t,n){for(var r=e[n],i=t(r);n>0;){var o=Math.floor((n+1)/2)-1,a=e[o];if(i>=t(a))break;e[o]=r,e[n]=a,n=o}},c=function(e,t,n){for(var r=e.length,i=e[n],o=t(i);;){var a=2*(n+1),s=a-1,l=null;if(r>s&&o>t(e[s])&&(l=s),r>a&&t(e[a])<(null===l?o:t(e[s]))&&(l=a),null===l)break;e[n]=e[l],e[l]=i,n=l}},d=t.prototype;d.push=function(e){this.heap.push(e),u(this.heap,this.weightFunc,this.heap.length-1)},d.peek=function(){return this.heap[0]},d.pop=function(){var e=this.heap[0],t=this.heap.pop();return this.heap.length>0&&(this.heap[0]=t,c(this.heap,this.weightFunc,0)),e},d.remove=function(e){for(var t=this.heap.length,n=0;t>n;n++)if(this.compareFunc(this.heap[n],e)){var r=this.heap[n],i=this.heap.pop();return n!==t-1&&(this.heap[n]=i,u(this.heap,this.weightFunc,n),c(this.heap,this.weightFunc,n)),r}return null},d.removeAll=function(){this.heap=[]},d.size=function(){return this.heap.length};var h=null;try{h=window.Promise}catch(e){}var f={isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isObject:function(e){return null!==e&&"object"===(void 0===e?"undefined":l.typeof(e))},isFunction:function(e){return"function"==typeof e},fromJson:function(e){return JSON.parse(e)},equals:function(e,t){return e===t},Promise:h},p={capacity:Number.MAX_VALUE,maxAge:Number.MAX_VALUE,deleteOnExpire:"none",onExpire:null,cacheFlushInterval:null,recycleFreq:1e3,storageMode:"memory",storageImpl:null,disabled:!1,storagePrefix:"cachefactory.caches.",storeOnResolve:!1,storeOnReject:!1},m={};return s.createCache=a,s.defaults=p,s.info=function(){var e=n(m),t={size:e.length,caches:{}};for(var r in p)p.hasOwnProperty(r)&&(t[r]=p[r]);for(var i=0;i<e.length;i++){var o=e[i];t.caches[o]=m[o].info()}return t},s.get=function(e){return m[e]},s.keySet=function(){return o(m)},s.keys=function(){return n(m)},s.destroy=function(e){m[e]&&(m[e].destroy(),delete m[e])},s.destroyAll=function(){for(var e in m)m[e].destroy();m={}},s.clearAll=function(){for(var e in m)m[e].removeAll()},s.removeExpiredFromAll=function(){var e={};for(var t in m)e[t]=m[t].removeExpired();return e},s.enableAll=function(){for(var e in m)m[e].$$disabled=!1},s.disableAll=function(){for(var e in m)m[e].$$disabled=!0},s.touchAll=function(){for(var e in m)m[e].touch()},s.utils=f,s.BinaryHeap=t,s.utils.equals=e.equals,s.utils.isObject=e.isObject,s.utils.fromJson=e.fromJson,e.module("angular-cache",[]).provider("BinaryHeap",(function(){this.$get=function(){return s.BinaryHeap}})).provider("CacheFactory",(function(){this.defaults=s.defaults,this.defaults.storagePrefix="angular-cache.caches.",this.$get=["$q",function(e){return s.utils.Promise=e,s}]})),"angular-cache"})),function(){"use strict";function e(e,t,n,r,i){function o(e){return angular.isString(e)?(e=e.split(/\s*,\s*/)).some((function(e){return!!t.matchMedia(d[e]).matches||void 0})):void 0}var a=i.config.rules,s=i.config.extraRules||{},l=i.config.nobind||!1,u=i.config.debounce||250,c={bootstrap:{lg:"(min-width: 1200px)",md:"(min-width: 992px) and (max-width: 1199px)",sm:"(min-width: 768px) and (max-width: 991px)",xs:"(max-width: 767px)"},matchmedia:{print:"print",screen:"screen",phone:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 991px)",desktop:"(min-width: 992px)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"}},d={},h={is:o,bind:function(t,n){var r=null,i=o(t),a={active:i,unbind:null};if(!l){var s=(n=n||e).$on("screenmatch::resize",(function(){r=i,i=o(t),r!==i&&(a.active=i)}));a.unbind=function(){s()}}return a},once:function(t,n,i){var a=!1,s=null,u=o(t);if(angular.isFunction(n)&&(u&&(a=!0,r((function(){n()}))),!l&&!a))var c=(i=i||e).$on("screenmatch::resize",(function(){s=u,(u=o(t))&&s!==u&&(a=!0,r((function(){n()}))),a&&c()}))},when:function(t,n,i,a){var s=null,u=o(t);if(angular.isUndefined(a)&&!angular.isUndefined(i)&&(angular.isFunction(i)||(a=i,i=void 0)),angular.isFunction(n)&&(angular.isFunction(i)||angular.isUndefined(i))&&(u?r((function(){n()})):i&&r((function(){i()})),!l))return{cancel:(a=a||e).$on("screenmatch::resize",(function(){s=u,u=o(t),s!==u&&(u?r((function(){n()})):i&&r((function(){i()})))}))}}};return function(){if(d=angular.isObject(a)&&!angular.equals({},a)?a:c[a]||c.bootstrap,!angular.equals({},s)&&angular.isObject(s)){var e={};angular.forEach(s,(function(t,n){angular.isString(t)&&(e[n]=t)})),angular.extend(d,e)}}(),l||function(){var r=angular.element(t),i=!1;r.on("resize",(function(){if(!i)var t=n((function(){e.$broadcast("screenmatch::resize",!0),i&&(n.cancel(t),i=!1)}),u);i=!0}))}(),h}function t(e,t){var n=e[0];return{link:function(e,r,i){var o=i.asmScreen,a=t.bind(o,e);i.ngIf=function(){return a.active},n.link.apply(n,arguments)},terminal:n.terminal,transclude:n.transclude,priority:n.priority,restrict:n.restrict}}function n(e){(angular.isUndefined(e.matchMedia)||!angular.isFunction(e.matchMedia("all").addListener))&&(e.matchMedia=function(){var t=e.styleMedia||e.media;if(!t){var n,r=document.createElement("style"),i=document.getElementsByTagName("script")[0];r.type="text/css",r.id="matchmediajs-test",i.parentNode.insertBefore(r,i),n="getComputedStyle"in e&&e.getComputedStyle(r,null)||r.currentStyle,t={matchMedium:function(e){var t="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return r.styleSheet?r.styleSheet.cssText=t:r.textContent=t,"1px"===n.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}())}angular.module("angular.screenmatch",[]).run(n).provider("screenmatchConfig",(function(){this.config={},this.$get=function(){return{config:this.config}}})).factory("screenmatch",e).directive("asmScreen",t),e.$inject=["$rootScope","$window","$interval","$timeout","screenmatchConfig"],t.$inject=["ngIfDirective","screenmatch"],n.$inject=["$window"]}(),function(){"use strict";function e(e,t){function n(t,n,r){n!==r&&e.$broadcast("$$rebind::"+t)}Object.keys(t).forEach((function(r){e.$watch(t[r],n.bind(null,r),"object"==typeof e[t[r]])}))}function t(e){function t(e,t,n){return function(e,r,i){var o,a,s,l,u;if("string"!=typeof r||!t.test(r))return e.call(this,r,i);for(o=r.split(":"),u=[];o.length;)if((a=o.shift())&&a.trim()){if(!n.test(a)){l=[a].concat(o).join(":");break}u.push(a)}return l||(l=u.splice(-1,1)[0]),(s=e.call(this,"::"+l,i)).$$watchDelegate=function(e,t){function n(e,n){t.forEach((function(t){e.$on("$$rebind::"+t,n)}))}if(e.$$watchDelegate.wrapped)return e.$$watchDelegate;var r=function(e,t,r,i,o){var a=e.bind(this,t,r,i,o);return n(t,a),a()}.bind(this,e.$$watchDelegate);return r.wrapped=!0,r}(s,u),s}.bind(null,e)}t.$inject=["$delegate","bindNotifierRegex","bindNotifierKeyRegex"],e.decorator("$parse",t)}t.$inject=["$provide"],angular.module("angular.bind.notifier",[]).constant("bindNotifierKeyRegex",/^[a-zA-Z0-9][\w-]*$/).constant("bindNotifierRegex",/^[\s]*:([a-zA-Z0-9][\w-]*):(.+\n?)+$/).factory("$Notifier",(function(){return function(t,n){if(!t)throw new Error("No $scope given");if(!n)throw new Error("No notifier object given");e(t,n)}})).directive("bindNotifier",(function(){return{restrict:"A",scope:!0,compile:function(t,n){var r={};return n.bindNotifier.replace(/[\{\}\s]/g,"").split(",").forEach((function(e){var t=e.split(":");r[t[0]]=t[1]})),function(t){e(t,r)}}}})).config(t)}(),n=function(e,t,n){var r=e,i=t||0,o=0;this.getRawData=function(){return r},"string"==typeof e?(o=n||r.length,this.getByteAt=function(e){return 255&r.charCodeAt(e+i)},this.getBytesAt=function(e,t){for(var n=[],o=0;o<t;o++)n[o]=255&r.charCodeAt(e+o+i);return n}):"unknown"==typeof e&&(o=n||IEBinary_getLength(r),this.getByteAt=function(e){return IEBinary_getByteAt(r,e+i)},this.getBytesAt=function(e,t){return new VBArray(IEBinary_getBytesAt(r,e+i,t)).toArray()}),this.getLength=function(){return o},this.getSByteAt=function(e){var t=this.getByteAt(e);return t>127?t-256:t},this.getShortAt=function(e,t){var n=t?(this.getByteAt(e)<<8)+this.getByteAt(e+1):(this.getByteAt(e+1)<<8)+this.getByteAt(e);return n<0&&(n+=65536),n},this.getSShortAt=function(e,t){var n=this.getShortAt(e,t);return n>32767?n-65536:n},this.getLongAt=function(e,t){var n=this.getByteAt(e),r=this.getByteAt(e+1),i=this.getByteAt(e+2),o=this.getByteAt(e+3),a=t?(((n<<8)+r<<8)+i<<8)+o:(((o<<8)+i<<8)+r<<8)+n;return a<0&&(a+=4294967296),a},this.getSLongAt=function(e,t){var n=this.getLongAt(e,t);return n>2147483647?n-4294967296:n},this.getStringAt=function(e,t){for(var n=[],r=this.getBytesAt(e,t),i=0;i<t;i++)n[i]=String.fromCharCode(r[i]);return n.join("")},this.getCharAt=function(e){return String.fromCharCode(this.getByteAt(e))},this.toBase64=function(){return window.btoa(r)},this.fromBase64=function(e){r=window.atob(e)}},r=function(){var e=!1,t={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},n={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},r={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},i={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function o(e){return!!e.exifdata}function a(t){if(255!=t.getByteAt(0)||216!=t.getByteAt(1))return!1;for(var n,r=2,i=t.getLength();r<i;){if(255!=t.getByteAt(r))return e&&alert("Not a valid marker at offset "+r+", found: "+t.getByteAt(r)),!1;if(22400==(n=t.getByteAt(r+1)))return e&&alert("Found 0xFFE1 marker"),u(t,r+4,t.getShortAt(r+2,!0));if(225==n)return e&&alert("Found 0xFFE1 marker"),u(t,r+4,t.getShortAt(r+2,!0));r+=2+t.getShortAt(r+2,!0)}}function s(t,n,r,i,o){var a,s,u,c=t.getShortAt(r,o),d={};for(u=0;u<c;u++)a=r+12*u+2,!(s=i[t.getShortAt(a,o)])&&e&&alert("Unknown tag: "+t.getShortAt(a,o)),d[s]=l(t,a,n,0,o);return d}function l(e,t,n,r,i){var o,a,s,l,u,c=e.getShortAt(t+2,i),d=e.getLongAt(t+4,i),h=e.getLongAt(t+8,i)+n;switch(c){case 1:case 7:if(1==d)return e.getByteAt(t+8,i);for(o=d>4?h:t+8,a=[],f=0;f<d;f++)a[f]=e.getByteAt(o+f);return a;case 2:return o=d>4?h:t+8,e.getStringAt(o,d-1);case 3:if(1==d)return e.getShortAt(t+8,i);for(o=d>2?h:t+8,a=[],f=0;f<d;f++)a[f]=e.getShortAt(o+2*f,i);return a;case 4:if(1==d)return e.getLongAt(t+8,i);a=[];for(var f=0;f<d;f++)a[f]=e.getLongAt(h+4*f,i);return a;case 5:if(1==d)return l=e.getLongAt(h,i),u=e.getLongAt(h+4,i),(s=new Number(l/u)).numerator=l,s.denominator=u,s;for(a=[],f=0;f<d;f++)l=e.getLongAt(h+8*f,i),u=e.getLongAt(h+4+8*f,i),a[f]=new Number(l/u),a[f].numerator=l,a[f].denominator=u;return a;case 9:if(1==d)return e.getSLongAt(t+8,i);for(a=[],f=0;f<d;f++)a[f]=e.getSLongAt(h+4*f,i);return a;case 10:if(1==d)return e.getSLongAt(h,i)/e.getSLongAt(h+4,i);for(a=[],f=0;f<d;f++)a[f]=e.getSLongAt(h+8*f,i)/e.getSLongAt(h+4+8*f,i);return a}}function u(o,a){if("Exif"!=o.getStringAt(a,4))return e&&alert("Not valid EXIF data! "+o.getStringAt(a,4)),!1;var l,u,c,d,h,f=a+6;if(18761==o.getShortAt(f))l=!1;else{if(19789!=o.getShortAt(f))return e&&alert("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;l=!0}if(42!=o.getShortAt(f+2,l))return e&&alert("Not valid TIFF data! (no 0x002A)"),!1;if(8!=o.getLongAt(f+4,l))return e&&alert("Not valid TIFF data! (First offset not 8)",o.getShortAt(f+4,l)),!1;if((u=s(o,f,f+8,n,l)).ExifIFDPointer)for(c in d=s(o,f,f+u.ExifIFDPointer,t,l)){switch(c){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":d[c]=i[c][d[c]];break;case"ExifVersion":case"FlashpixVersion":d[c]=String.fromCharCode(d[c][0],d[c][1],d[c][2],d[c][3]);break;case"ComponentsConfiguration":d[c]=i.Components[d[c][0]]+i.Components[d[c][1]]+i.Components[d[c][2]]+i.Components[d[c][3]]}u[c]=d[c]}if(u.GPSInfoIFDPointer)for(c in h=s(o,f,f+u.GPSInfoIFDPointer,r,l)){switch(c){case"GPSVersionID":h[c]=h[c][0]+"."+h[c][1]+"."+h[c][2]+"."+h[c][3]}u[c]=h[c]}return u}return{readFromBinaryFile:function(e){return a(e)},pretty:function(e){if(!o(e))return"";var t,n=e.exifdata,r="";for(t in n)n.hasOwnProperty(t)&&("object"==typeof n[t]?n[t]instanceof Number?r+=t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":r+=t+" : ["+n[t].length+" values]\r\n":r+=t+" : "+n[t]+"\r\n");return r},getTag:function(e,t){if(o(e))return e.exifdata[t]},getAllTags:function(e){if(!o(e))return{};var t,n=e.exifdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},getData:function(e,t){return!!e.complete&&(o(e)?t&&t.call(e):function(e,t){BinaryAjax(e.src,(function(n){var r=a(n.binaryResponse);e.exifdata=r||{},t&&t.call(e)}))}(e,t),!0)},Tags:t,TiffTags:n,GPSTags:r,StringValues:i}}(),angular.module("ImageCropper",[]).directive("imageCrop",(function(){return{template:'<div id="image-crop-{{ rand }}" class="ng-image-crop ng-image-crop--{{ shape }}" ng-style="moduleStyles"><section ng-style="sectionStyles" ng-show="step==1"></section><section ng-style="sectionStyles" ng-show="step==2"><canvas class="cropping-canvas" width="{{ canvasWidth }}" height="{{ canvasHeight }}" ng-mousemove="onCanvasMouseMove($event)" ng-mousedown="onCanvasMouseDown($event)"></canvas><div ng-style="croppingGuideStyles" class="cropping-guide"></div><div class="zoom-handle" ng-mousemove="onHandleMouseMove($event)" ng-mousedown="onHandleMouseDown($event)" ng-mouseup="onHandleMouseUp($event)"><span>&larr; zoom &rarr;</span></div></section><section ng-style="sectionStyles" class="image-crop-section-final" ng-show="step==3"><img class="image-crop-final" ng-src="{{ croppedDataUri }}" /></section></div>',replace:!0,restrict:"AE",scope:{crop:"=",width:"@",height:"@",shape:"@",src:"=",resultBlob:"=",result:"=",step:"=",padding:"@",maxSize:"@"},link:function(e,t,i){var o=e.padding?Number(e.padding):200;e.rand=Math.round(99999*Math.random()),e.step=e.step||1,e.shape=e.shape||"circle",e.width=parseInt(e.width,10)||300,e.height=parseInt(e.height,10)||300,e.canvasWidth=e.width+o,e.canvasHeight=e.height+o;var a=t[0],s=a.getElementsByClassName("cropping-canvas")[0],l=a.getElementsByClassName("zoom-handle")[0],u=a.getElementsByClassName("image-crop-final")[0],c=new Image,d=new FileReader,h=0,f=0,p=0,m=0,g=!1,v=0,_=0,y=!1,b=h,w=f,L=0,M=0,k=1,x=0,S=0,T=2,$=0,D=o/2,C=0,E=o/2,A=e.maxSize?Number(e.maxSize):null,P=s.getContext("2d"),Y=null;function O(e){var t=atob(e.split(",")[1]),i=new n(t,0,t.length);Y=r.readFromBinaryFile(i),function(e){return new Promise((function(t,n){if(!A)return t(e);var r=new Image;r.src=e,r.onload=function(){var n=r.height,i=r.width;if(n<=A&&i<=A)return t(e);var o=i/n;o>1?(i=A,n=A/o):(i=A*o,n=A),i=Math.round(i),n=Math.round(n);var a=document.createElement("canvas");a.width=i,a.height=n;var s=a.getContext("2d");s.drawImage(r,0,0,r.width,r.height,0,0,a.width,a.height),s.save();var l=a.toDataURL();t(l)}}))}(e).then((function(e){return Y&&Y.Orientation&&Y.Orientation>1?function(e,t){return new Promise((function(n,r){var i=new Image;i.src=e,i.onload=function(){var e=document.createElement("canvas");t.Orientation>=5?(e.width=i.height,e.height=i.width):(e.width=i.width,e.height=i.height);var r=e.getContext("2d");switch(t.Orientation){case 1:break;case 2:r.translate(i.width,0),r.scale(-1,1);break;case 3:r.translate(i.width,i.height),r.rotate(Math.PI);break;case 4:r.translate(0,i.height),r.scale(1,-1);break;case 5:r.rotate(.5*Math.PI),r.scale(1,-1);break;case 6:r.rotate(.5*Math.PI),r.translate(0,-i.height);break;case 7:r.rotate(.5*Math.PI),r.translate(i.width,-i.height),r.scale(-1,1);break;case 8:r.rotate(-.5*Math.PI),r.translate(-i.width,0)}r.drawImage(i,0,0),r.save();var o=e.toDataURL();n(o)}}))}(e,Y):e})).then((function(e){c.src=e})).catch((function(e){alert(e)}))}function I(e,t){return L=e=(e=e<$?$:e)>D?D:e,M=t=(t=t<C?C:t)>E?E:t,P.clearRect(0,0,s.width,s.height),P.drawImage(c,e,t,b,w),e==$||e==D||t==C||t==E}function j(e){return Math.round(1e3*e)/1e3}function B(){$=s.width-c.width*k-o/2,C=s.height-c.height*k-o/2}function H(e){if(e){var t=j(k+e);if(!(t<S||t>T)){k=t,B(),b=c.width*k,w=c.height*k;var n=p*k,r=m*k;n<$?n=$:n>D&&(n=D),r<C?r=C:r>E&&(r=E),P.clearRect(0,0,s.width,s.height),P.drawImage(c,n,r,b,w)}}}function N(e,t){document.documentElement.addEventListener(e,t,!1)}function R(e,t){document.documentElement.removeEventListener(e,t)}e.moduleStyles={width:e.width+o+"px",height:e.height+o+"px"},e.sectionStyles={width:e.width+o+"px",height:e.height+o+"px"},e.croppingGuideStyles={width:e.width+"px",height:e.height+"px",top:o/2+"px",left:o/2+"px"},d.onload=function(e){O(this.resultBlob)},c.onload=function(){e.step=2,e.$apply(),P.drawImage(c,0,0),h=c.width,f=c.height,e.width,this.width,e.height,this.height,b=h,w=f,S=h>=f?(s.height-o)/f:(s.width-o)/h,x=j(Math.sqrt(Math.pow(s.width,2)+Math.pow(s.height,2))),B(),I(Math.round(($+D)/2),Math.round((C+E)/2))},e.$watch("src",(function(){e.src?3!=e.step&&("Blob"==typeof e.src?d.readAsDataURL(e.src):O(e.src)):(e.step=1,k=1,p=0,m=0,g=!1,v=0,_=0,y=!1,P.clearRect(0,0,s.width,s.height),c.src="")})),e.$watch("crop",(function(){e.crop&&(e.doCrop(),e.crop=!1)})),u.onload=function(){var t=document.createElement("canvas");t.width=this.width-o,t.height=this.height-o,t.style.display="none",t.getContext("2d").drawImage(u,-o/2,-o/2),a.getElementsByClassName("image-crop-section-final")[0].appendChild(t);var n=t.toDataURL();e.result=n,e.resultBlob=function(e){var t,n;t=-1!==e.split(",")[0].indexOf("base64")?atob(e.split(",")[1]):decodeURI(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0];for(var r=new Array,i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new Blob([new Uint8Array(r)],{type:n})}(n),e.$apply()},e.doCrop=function(){e.croppedDataUri=s.toDataURL(),e.step=3},e.onCanvasMouseUp=function(t){g&&(t.preventDefault(),t.stopPropagation(),v=0,_=0,g=!1,p=L,m=M,R("mouseup",e.onCanvasMouseUp),R("touchend",e.onCanvasMouseUp),R("mousemove",e.onCanvasMouseMove),R("touchmove",e.onCanvasMouseMove))},s.addEventListener("touchend",e.onCanvasMouseUp,!1),e.onCanvasMouseDown=function(t){v="touchstart"===t.type?t.changedTouches[0].clientX:t.clientX,_="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,y=!1,g=!0,N("mouseup",e.onCanvasMouseUp),N("mousemove",e.onCanvasMouseMove)},s.addEventListener("touchstart",e.onCanvasMouseDown,!1),e.onHandleMouseDown=function(t){t.preventDefault(),t.stopPropagation(),v=z="touchstart"===t.type?t.changedTouches[0].clientX:t.clientX,_=F="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,g=!1,y=!0,N("mouseup",e.onHandleMouseUp),N("touchend",e.onHandleMouseUp),N("mousemove",e.onHandleMouseMove),N("touchmove",e.onHandleMouseMove)},l.addEventListener("touchstart",e.onHandleMouseDown,!1),e.onHandleMouseUp=function(t){y&&(t.preventDefault(),t.stopPropagation(),v=0,_=0,y=!1,p=L,m=M,R("mouseup",e.onHandleMouseUp),R("touchend",e.onHandleMouseUp),R("mousemove",e.onHandleMouseMove),R("touchmove",e.onHandleMouseMove))},l.addEventListener("touchend",e.onHandleMouseUp,!1),e.onCanvasMouseMove=function(e){if(e.preventDefault(),e.stopPropagation(),g){var t=v-("touchmove"===e.type?e.changedTouches[0].clientX:e.clientX),n=_-("touchmove"===e.type?e.changedTouches[0].clientY:e.clientY);I(p-t,m-n)}},s.addEventListener("touchmove",e.onCanvasMouseMove,!1);var z=null,F=null;e.onHandleMouseMove=function(e){if(e.stopPropagation(),e.preventDefault(),!y)return!1;var t=z-("touchmove"===e.type?e.changedTouches[0].clientX:e.clientX),n=F-("touchmove"===e.type?e.changedTouches[0].clientY:e.clientY);z="touchmove"===e.type?e.changedTouches[0].clientX:e.clientX,F="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,H(function(e,t){var n=j(Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/x),r=j((T-S)*n*.6);return e>0?-r:r}(t,n))},l.addEventListener("touchmove",e.onHandleMouseMove,!1),e.onHandleMouseWheel=function(e){e.preventDefault(),H(e.deltaY>0?-.05:.05)},s.addEventListener("mousewheel",e.onHandleMouseWheel),l.addEventListener("mousewheel",e.onHandleMouseWheel)}}})),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports="ngFileSaver",angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",n(1)]).factory("FileSaverUtils",[n(2)]).factory("Blob",["$window",n(3)]).factory("SaveAs",[n(5)])},function(e,t){"use strict";e.exports=function(e,t,n){function r(e,r,i){try{t(e,r,i)}catch(e){n.handleErrors(e.message)}}return{saveAs:function(e,t,i){return n.isBlobInstance(e)||n.handleErrors("Data argument should be a blob instance"),n.isString(t)||n.handleErrors("Filename argument should be a string"),r(e,t,i)}}}},function(e,t){"use strict";e.exports=function(){return{handleErrors:function(e){throw new Error(e)},isString:function(e){return"string"==typeof e||e instanceof String},isUndefined:function(e){return void 0===e},isBlobInstance:function(e){return e instanceof Blob}}}},function(e,t,n){"use strict";n(4),e.exports=function(e){return e.Blob}},function(e,t){!function(e){"use strict";if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{return void new Blob}catch(e){}var t=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(e){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},r=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},i=n.prototype,o=r.prototype,a=e.FileReaderSync,s=function(e){this.code=this[this.name=e]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),u=l.length,c=e.URL||e.webkitURL||e,d=c.createObjectURL,h=c.revokeObjectURL,f=c,p=e.btoa,m=e.atob,g=e.ArrayBuffer,v=e.Uint8Array,_=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(r.fake=o.fake=!0;u--;)s.prototype[l[u]]=u+1;return c.createObjectURL||(f=e.URL=function(e){var t,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=e,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(t=e.match(_),n.origin=t&&t[1])),n}),f.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof r?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):p?t+";base64,"+p(e.data):t+","+encodeURIComponent(e.data)):d?d.call(c,e):void 0},f.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&h&&h.call(c,e)},i.append=function(e){var n=this.data;if(v&&(e instanceof g||e instanceof v)){for(var i="",o=new v(e),l=0,u=o.length;l<u;l++)i+=String.fromCharCode(o[l]);n.push(i)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var c=new a;n.push(c.readAsBinaryString(e))}else e instanceof r?"base64"===e.encoding&&m?n.push(m(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},i.getBlob=function(e){return arguments.length||(e=null),new r(this.data.join(""),e,"raw")},i.toString=function(){return"[object BlobBuilder]"},o.slice=function(e,t,n){var i=arguments.length;return i<3&&(n=null),new r(this.data.slice(e,i>1?t:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,n){var r=n&&n.type||"",i=new t;if(e)for(var o=0,a=e.length;o<a;o++)Uint8Array&&e[o]instanceof Uint8Array?i.append(e[o].buffer):i.append(e[o]);var s=i.getBlob(r);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=n(new e.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},function(e,t,n){"use strict";e.exports=function(){return n(6).saveAs||function(){}}},function(e,t,n){var r,i=i||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,o=/constructor/i.test(e.HTMLElement)||e.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},l=function(e){setTimeout((function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},u=function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var i=e["on"+t[r]];if("function"==typeof i)try{i.call(e,n||e)}catch(e){s(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},d=function(t,s,d){d||(t=c(t));var h,f=this,p="application/octet-stream"===t.type,m=function(){u(f,"writestart progress write writeend".split(" "))};return f.readyState=f.INIT,i?(h=n().createObjectURL(t),void setTimeout((function(){r.href=h,r.download=s,function(e){var t=new MouseEvent("click");e.dispatchEvent(t)}(r),m(),l(h),f.readyState=f.DONE}))):void function(){if((a||p&&o)&&e.FileReader){var r=new FileReader;return r.onloadend=function(){var t=a?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,f.readyState=f.DONE,m()},r.readAsDataURL(t),void(f.readyState=f.INIT)}h||(h=n().createObjectURL(t)),p?e.location.href=h:e.open(h,"_blank")||(e.location.href=h),f.readyState=f.DONE,m(),l(h)}()},h=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=c(e)),navigator.msSaveOrOpenBlob(e,t)}:(h.abort=function(){},h.readyState=h.INIT=0,h.WRITING=1,h.DONE=2,h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null,function(e,t,n){return new d(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==e&&e.exports?e.exports.saveAs=i:null!==n(7)&&null!==n(8)&&(void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(t,{})}])})),function(e,t,n){"use strict";t.module("ngIdle",["ngIdle.keepalive","ngIdle.idle","ngIdle.countdown","ngIdle.title","ngIdle.localStorage"]),t.module("ngIdle.keepalive",[]).provider("Keepalive",(function(){var e={http:null,interval:600};this.http=function(n){if(!n)throw new Error("Argument must be a string containing a URL, or an object containing the HTTP request configuration.");t.isString(n)&&(n={url:n,method:"GET"}),n.cache=!1,e.http=n};var n=this.interval=function(t){if(t=parseInt(t),isNaN(t)||0>=t)throw new Error("Interval must be expressed in seconds and be greater than 0.");e.interval=t};this.$get=["$rootScope","$log","$interval","$http",function(r,i,o,a){function s(e){r.$broadcast("KeepaliveResponse",e.data,e.status)}function l(){r.$broadcast("Keepalive"),t.isObject(e.http)&&a(e.http).then(s).catch(s)}var u={ping:null};return{_options:function(){return e},setInterval:n,start:function(){return o.cancel(u.ping),u.ping=o(l,1e3*e.interval),u.ping},stop:function(){o.cancel(u.ping)},ping:function(){l()}}}]})),t.module("ngIdle.idle",["ngIdle.keepalive","ngIdle.localStorage"]).provider("Idle",(function(){var e={idle:1200,timeout:30,autoResume:"idle",interrupt:"mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll",windowInterrupt:null,keepalive:!0},n=this.timeout=function(n){if(!1===n)e.timeout=0;else{if(!(t.isNumber(n)&&n>=0))throw new Error("Timeout must be zero or false to disable the feature, or a positive integer (in seconds) to enable it.");e.timeout=n}};this.interrupt=function(t){e.interrupt=t},this.windowInterrupt=function(t){e.windowInterrupt=t};var r=this.idle=function(t){if(0>=t)throw new Error("Idle must be a value in seconds, greater than 0.");e.idle=t};this.autoResume=function(t){e.autoResume=!0===t?"idle":!1===t?"off":t},this.keepalive=function(t){e.keepalive=!0===t},this.$get=["$interval","$log","$rootScope","$document","Keepalive","IdleLocalStorage","$window",function(i,o,a,s,l,u,c){function d(){e.keepalive&&(_.running&&l.ping(),l.start())}function h(){e.keepalive&&l.stop()}function f(){_.idling=!_.idling;var t=_.idling?"IdleStart":"IdleEnd";_.idling?(a.$broadcast(t),h(),e.timeout&&(_.countdown=e.timeout,p(),_.timeout=i(p,1e3,e.timeout,!1))):(d(),a.$broadcast(t)),i.cancel(_.idle)}function p(){if(_.idling){if(_.countdown<=0)return void m();a.$broadcast("IdleWarn",_.countdown),_.countdown--}}function m(){h(),i.cancel(_.idle),i.cancel(_.timeout),_.idling=!0,_.running=!1,_.countdown=0,a.$broadcast("IdleTimeout")}function g(e,t,n){var r=e.running();e.unwatch(),t(n),r&&e.watch()}function v(e){e?u.set("expiry",{id:y,time:e}):u.remove("expiry")}var _={idle:null,timeout:null,idling:!1,running:!1,countdown:null},y=(new Date).getTime(),b={_options:function(){return e},_getNow:function(){return new Date},getIdle:function(){return e.idle},getTimeout:function(){return e.timeout},setIdle:function(e){g(this,r,e)},setTimeout:function(e){g(this,n,e)},isExpired:function(){var e=function(){var e=u.get("expiry");return e&&e.time?new Date(e.time):null}();return null!==e&&e<=this._getNow()},running:function(){return _.running},idling:function(){return _.idling},watch:function(t){i.cancel(_.idle),i.cancel(_.timeout);var n=e.timeout?e.timeout:0;t||v(new Date((new Date).getTime()+1e3*(e.idle+n))),_.idling?f():_.running||d(),_.running=!0,_.idle=i(f,1e3*e.idle,0,!1)},unwatch:function(){i.cancel(_.idle),i.cancel(_.timeout),_.idling=!1,_.running=!1,v(null),h()},interrupt:function(t){if(_.running){if(e.timeout&&this.isExpired())return void m();(function(e){a.$broadcast("IdleInterrupt",e)})(t),(t||"idle"===e.autoResume||"notIdle"===e.autoResume&&!_.idling)&&this.watch(t)}}},w={clientX:null,clientY:null,swap:function(e){var t={clientX:this.clientX,clientY:this.clientY};return this.clientX=e.clientX,this.clientY=e.clientY,t},hasMoved:function(e){var t=this.swap(e);return!(null!==this.clientX&&!e.movementX&&!e.movementY)||t.clientX!=e.clientX||t.clientY!=e.clientY}};if(s.find("html").on(e.interrupt,(function(e){"mousemove"===e.type&&e.originalEvent&&0===e.originalEvent.movementX&&0===e.originalEvent.movementY||("mousemove"!==e.type||w.hasMoved(e))&&b.interrupt()})),e.windowInterrupt)for(var L=e.windowInterrupt.split(" "),M=function(){b.interrupt()},k=0;k<L.length;k++)c.addEventListener?c.addEventListener(L[k],M,!1):c.attachEvent(L[k],M);var x=function(e){if("ngIdle.expiry"===e.key&&e.newValue&&e.newValue!==e.oldValue){if(t.fromJson(e.newValue).id===y)return;b.interrupt(!0)}};return c.addEventListener?c.addEventListener("storage",x,!1):c.attachEvent&&c.attachEvent("onstorage",x),b}]})),t.module("ngIdle.countdown",["ngIdle.idle"]).directive("idleCountdown",["Idle",function(e){return{restrict:"A",scope:{value:"=idleCountdown"},link:function(t){t.value=e.getTimeout(),t.$on("IdleWarn",(function(e,n){t.$evalAsync((function(){t.value=n}))})),t.$on("IdleTimeout",(function(){t.$evalAsync((function(){t.value=0}))}))}}}]),t.module("ngIdle.title",[]).provider("Title",(function(){var e={enabled:!0},n=this.enabled=function(t){e.enabled=!0===t};this.$get=["$document","$interpolate",function(r,i){var o={original:null,idle:"{{minutes}}:{{seconds}} until your session times out!",timedout:"Your session has expired."};return{setEnabled:n,isEnabled:function(){return e.enabled},original:function(e){return t.isUndefined(e)?o.original:void(o.original=e)},store:function(e){(e||!o.original)&&(o.original=this.value())},value:function(e){return t.isUndefined(e)?r[0].title:void(r[0].title=e)},idleMessage:function(e){return t.isUndefined(e)?o.idle:void(o.idle=e)},timedOutMessage:function(e){return t.isUndefined(e)?o.timedout:void(o.timedout=e)},setAsIdle:function(e){this.store();var t={totalSeconds:e};t.minutes=Math.floor(e/60),t.seconds=function(e,t,n){return new Array(2-String(e).length+1).join("0")+e}(e-60*t.minutes),this.value(i(this.idleMessage())(t))},setAsTimedOut:function(){this.store(),this.value(this.timedOutMessage())},restore:function(){this.original()&&this.value(this.original())}}}]})).directive("title",["Title",function(e){return{restrict:"E",link:function(t,n,r){e.isEnabled()&&!r.idleDisabled&&(e.store(!0),t.$on("IdleStart",(function(){e.original(n[0].innerText)})),t.$on("IdleWarn",(function(t,n){e.setAsIdle(n)})),t.$on("IdleEnd",(function(){e.restore()})),t.$on("IdleTimeout",(function(){e.setAsTimedOut()})))}}}]),t.module("ngIdle.localStorage",[]).service("IdleStorageAccessor",["$window",function(e){return{get:function(){return e.localStorage}}}]).service("IdleLocalStorage",["IdleStorageAccessor",function(e){function r(){var e={};this.setItem=function(t,n){e[t]=n},this.getItem=function(t){return void 0!==e[t]?e[t]:null},this.removeItem=function(t){e[t]=n}}var i=function(){try{var t=e.get();return t.setItem("ngIdleStorage",""),t.removeItem("ngIdleStorage"),t}catch(e){return new r}}();return{set:function(e,n){i.setItem("ngIdle."+e,t.toJson(n))},get:function(e){return t.fromJson(i.getItem("ngIdle."+e))},remove:function(e){i.removeItem("ngIdle."+e)},_wrapped:function(){return i}}}])}(window,window.angular),function(e,t){t.module("nemLogging",[]),t.module("nemLogging").provider("nemDebug",(function(){return this.$get=function(){return null},this.debug=null,this}));var n=function(e,t){return function(){return e.apply(t,arguments)}},r=[].slice;t.module("nemLogging").provider("nemSimpleLogger",["nemDebugProvider",function(e){var t,i,o,a,s,l,u,c,d,h,f,p;for(f=e.debug,o={},t={},d=c=0,h=(a=["debug","info","warn","error","log"]).length;h>c;d=++c)p=a[d],t[p]=d;return l=function(e,t,n){return e>=t?n():void 0},s=function(e){var t,n,r;if(t=!1,!e)return t;for(n=0,r=a.length;r>n&&(t=null!=e[p=a[n]]&&"function"==typeof e[p]);n++);return t},u=function(e,t){var n,r,i,s;for(null==o[e]&&(o[e]=f(e)),n=o[e],s={},r=0,i=a.length;i>r;r++)s[p=a[r]]="debug"===p?n:t[p];return s},i=function(){function e(e){var i,o,u,c;if(this.$log=e,this.spawn=n(this.spawn,this),!this.$log)throw"internalLogger undefined";if(!s(this.$log))throw"@$log is invalid";for(this.doLog=!0,c={},i=function(e){return function(n){return c[n]=function(){var i;return i=1<=arguments.length?r.call(arguments,0):[],e.doLog?l(t[n],e.currentLevel,(function(){var t;return(t=e.$log)[n].apply(t,i)})):void 0},e[n]=c[n]}}(this),o=0,u=a.length;u>o;o++)i(a[o]);this.LEVELS=t,this.currentLevel=t.error}return e.prototype.spawn=function(t){if("string"==typeof t){if(!s(this.$log))throw"@$log is invalid";if(!f)throw"nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!";return u(t,this.$log)}return new e(t||this.$log)},e}(),this.decorator=["$log",function(e){var n;return(n=new i(e)).currentLevel=t.debug,n}],this.$get=["$log",function(e){return new i(e)}],this}])}(window,angular),function(e){"use strict";e.module("ui-leaflet",["nemLogging"]).directive("leaflet",["$q","leafletData","leafletMapDefaults","leafletHelpers","leafletMapEvents",function(e,t,n,r,i){return{restrict:"EA",replace:!0,scope:{center:"=",lfCenter:"=",defaults:"=",maxbounds:"=",bounds:"=",markers:"=",legend:"=",geojson:"=",paths:"=",tiles:"=",layers:"=",controls:"=",decorations:"=",eventBroadcast:"=",watchOptions:"=",id:"@"},transclude:!0,template:'<div class="angular-leaflet-map"><div ng-transclude></div></div>',controller:["$scope",function(t){this._leafletMap=e.defer(),this.getMap=function(){return this._leafletMap.promise},this.getLeafletScope=function(){return t}}],link:function(e,o,a,s){function l(){isNaN(a.width)?o.css("width",a.width):o.css("width",a.width+"px")}function u(){isNaN(a.height)?o.css("height",a.height):o.css("height",a.height+"px")}var c=r.isDefined,d=n.setDefaults(e.defaults,a.id),h=i.getAvailableMapEvents(),f=i.addEvents;e.mapId=a.id,t.setDirectiveControls({},a.id);var p=new L.Map(o[0],n.getMapCreationDefaults(a.id));if(s._leafletMap.resolve(p),c(a.width)&&(l(),e.$watch((function(){return o[0].getAttribute("width")}),(function(){l(),p.invalidateSize()}))),c(a.height)&&(u(),e.$watch((function(){return o[0].getAttribute("height")}),(function(){u(),p.invalidateSize()}))),c(a.center)||c(a.lfCenter)||p.setView([d.center.lat,d.center.lng],d.center.zoom),!c(a.tiles)&&!c(a.layers)){var m=L.tileLayer(d.tileLayer,d.tileLayerOptions);m.addTo(p),t.setTiles(m,a.id)}c(p.zoomControl)&&c(d.zoomControlPosition)&&p.zoomControl.setPosition(d.zoomControlPosition),c(p.zoomControl)&&!1===d.zoomControl&&p.zoomControl.removeFrom(p),c(p.zoomsliderControl)&&c(d.zoomsliderControl)&&!1===d.zoomsliderControl&&p.zoomsliderControl.removeFrom(p),c(a.eventBroadcast)||f(p,a.id,h,"eventName",e,"broadcast"),p.whenReady((function(){t.setMap(p,a.id)})),e.$on("$destroy",(function(){n.reset(),p.remove(),t.unresolveMap(a.id)})),e.$on("invalidateSize",(function(){p.invalidateSize()}))}}}]),e.module("ui-leaflet").factory("eventManager",[function(){var e=function(){this.listeners={}};return e.prototype={addEventListener:function(e,t,n){for(var r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);r=r.length>3?r.splice(3,r.length-1):[],void 0!==this.listeners[e]?this.listeners[e].push({scope:n,callback:t,args:r}):this.listeners[e]=[{scope:n,callback:t,args:r}]},removeEventListener:function(e,t,n){if(void 0!==this.listeners[e]){for(var r=this.listeners[e].length,i=[],o=0;o<r;o++){var a=this.listeners[e][o];a.scope===n&&a.callback===t||i.push(a)}this.listeners[e]=i}},hasEventListener:function(e,t,n){if(void 0!==this.listeners[e]){var r=this.listeners[e].length;if(void 0===t&&void 0===n)return r>0;for(var i=0;i<r;i++){var o=this.listeners[e][i];if((!n||o.scope===n)&&o.callback===t)return!0}}return!1},dispatch:function(e,t){for(var n={type:e,target:t},r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(r=r.length>2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[e])for(var a=this.listeners[e].length,s=0;s<a;s++){var l=this.listeners[e][s];if(l&&l.callback){var u=r.concat(l.args);l.callback.apply(l.scope,u)}}},getEvents:function(){var e="";for(var t in this.listeners)for(var n=this.listeners[t].length,r=0;r<n;r++){var i=this.listeners[t][r];e+=i.scope&&i.scope.className?i.scope.className:"anonymous",e+=" listen for '"+t+"'\n"}return e}},e}]).service("eventManager",["EventManager",function(e){return new e}]),e.module("ui-leaflet").factory("leafletBoundsHelpers",["leafletLogger","leafletHelpers",function(t,n){function r(t){return e.isDefined(t)&&e.isDefined(t.southWest)&&e.isDefined(t.northEast)&&e.isNumber(t.southWest.lat)&&e.isNumber(t.southWest.lng)&&e.isNumber(t.northEast.lat)&&e.isNumber(t.northEast.lng)}var i=n.isArray,o=n.isNumber,a=n.isFunction,s=n.isDefined,l=t;return{createLeafletBounds:function(e){if(r(e))return L.latLngBounds([e.southWest.lat,e.southWest.lng],[e.northEast.lat,e.northEast.lng])},isValidBounds:r,createBoundsFromArray:function(e){return i(e)&&2===e.length&&i(e[0])&&i(e[1])&&2===e[0].length&&2===e[1].length&&o(e[0][0])&&o(e[0][1])&&o(e[1][0])&&o(e[1][1])?{northEast:{lat:e[0][0],lng:e[0][1]},southWest:{lat:e[1][0],lng:e[1][1]}}:void l.error("[AngularJS - Leaflet] The bounds array is not valid.")},createBoundsFromLeaflet:function(e){if(s(e)&&a(e.getNorthEast)&&a(e.getSouthWest)){var t=e.getNorthEast(),n=e.getSouthWest();return{northEast:{lat:t.lat,lng:t.lng},southWest:{lat:n.lat,lng:n.lng}}}l.error("[AngularJS - Leaflet] The leaflet bounds is not valid object.")}}}]),e.module("ui-leaflet").factory("leafletControlHelpers",["$rootScope","leafletLogger","leafletHelpers","leafletLayerHelpers","leafletMapDefaults",function(t,n,r,i,o){var a=r.isDefined,s=r.isObject,l=i.createLayer,u={},c=r.errorHeader+" [Controls] ",d=n,h=function(e,t,n){if(!o.getDefaults(n).controls.layers.visible)return!1;var r=!1;return s(e)&&Object.keys(e).forEach((function(t){var n=e[t];a(n.layerOptions)&&!1===n.layerOptions.showOnSelector||(r=!0)})),s(t)&&Object.keys(t).forEach((function(e){var n=t[e];a(n.layerParams)&&!1===n.layerParams.showOnSelector||(r=!0)})),r},f=function(t){var n=o.getDefaults(t),r={collapsed:n.controls.layers.collapsed,position:n.controls.layers.position,autoZIndex:!1};return e.extend(r,n.controls.layers.options),n.controls.layers&&a(n.controls.layers.control)?n.controls.layers.control.apply(this,[[],[],r]):new L.control.layers([],[],r)},p={draw:{isPluginLoaded:function(){return!!e.isDefined(L.Control.Draw)||(d.error(c+" Draw plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Draw(e)}},scale:{isPluginLoaded:function(){return!0},checkValidParams:function(){return!0},createControl:function(e){return new L.control.scale(e)}},fullscreen:{isPluginLoaded:function(){return!!e.isDefined(L.Control.Fullscreen)||(d.error(c+" Fullscreen plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Fullscreen(e)}},search:{isPluginLoaded:function(){return!!e.isDefined(L.Control.Search)||(d.error(c+" Search plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Search(e)}},custom:{},minimap:{isPluginLoaded:function(){return!!e.isDefined(L.Control.MiniMap)||(d.error(c+" Minimap plugin is not loaded."),!1)},checkValidParams:function(e){return!!a(e.layer)||(d.warn(c+' minimap "layer" option should be defined.'),!1)},createControl:function(e){var t=l(e.layer);return a(t)?new L.Control.MiniMap(t,e):void d.warn(c+' minimap control "layer" could not be created.')}}};return{layersControlMustBeVisible:h,isValidControlType:function(e){return-1!==Object.keys(p).indexOf(e)},createControl:function(e,t){if(p[e].checkValidParams(t))return p[e].createControl(t)},updateLayersControl:function(e,t,n,r,i,o){var s,l=u[t],c=h(r,i,t);if(a(l)&&n){for(s in o.baselayers)l.removeLayer(o.baselayers[s]);for(s in o.overlays)l.removeLayer(o.overlays[s]);e.removeControl(l),delete u[t]}if(c){for(s in l=f(t),u[t]=l,r)(!a(r[s].layerOptions)||!1!==r[s].layerOptions.showOnSelector)&&a(o.baselayers[s])&&l.addBaseLayer(o.baselayers[s],r[s].name);for(s in i)(!a(i[s].layerParams)||!1!==i[s].layerParams.showOnSelector)&&a(o.overlays[s])&&l.addOverlay(o.overlays[s],i[s].name);e.addControl(l)}return c},destroyMapLayersControl:function(e){delete u[e]}}}]),e.module("ui-leaflet").service("leafletData",["leafletLogger","$q","leafletHelpers",function(e,t,n){var r=n.getDefer,i=n.getUnresolvedDefer,o=n.setResolvedDefer,a={},s=this,l=["map","tiles","layers","paths","markers","geoJSON","UTFGrid","decorations","directiveControls"];l.forEach((function(e){a[e]={}})),this.unresolveMap=function(e){var t=n.obtainEffectiveMapId(a.map,e);l.forEach((function(e){a[e][t]=void 0}))},l.forEach((function(e){var t=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(e);s["set"+t]=function(t,n){i(a[e],n).resolve(t),o(a[e],n)},s["get"+t]=function(t){return r(a[e],t).promise}}))}]),e.module("ui-leaflet").service("leafletDirectiveControlsHelpers",["leafletLogger","leafletData","leafletHelpers",function(t,n,r){var i=r.isDefined,o=r.isString,a=r.isObject,s=r.errorHeader,l=t,u=s+"[leafletDirectiveControlsHelpers";return{extend:function(t,r,s,c){var d=u+".extend] ",h={};if(i(r)){if(o(r)&&i(s)&&i(c))h[r]={create:s,clean:c};else{if(!a(r)||i(s)||i(c))return void l.error(d+"incorrect arguments");h=r}n.getDirectiveControls().then((function(r){e.extend(r,h),n.setDirectiveControls(r,t)}))}else l.error(d+"thingToAddName cannot be undefined")}}}]),e.module("ui-leaflet").service("leafletGeoJsonHelpers",["leafletHelpers","leafletIterators",function(t,n){var r=t,i=n,o=function(e,t){return this.lat=e,this.lng=t,this},a=function(e){if(r.isUndefined(e))return!1;if(r.isArray(e)){if(2===e.length&&r.isNumber(e[0])&&r.isNumber(e[1]))return!0}else if(r.isDefined(e.type)&&"Point"===e.type&&r.isArray(e.coordinates)&&2===e.coordinates.length&&r.isNumber(e.coordinates[0])&&r.isNumber(e.coordinates[1]))return!0;return i.all(["lat","lng"],(function(t){return r.isDefined(e[t])&&r.isNumber(e[t])}))};return{getLat:function(e){return Array.isArray(e)&&2===e.length?e[1]:r.isDefined(e.type)&&"Point"===e.type?+e.coordinates[1]:+e.lat},getLng:function(e){return Array.isArray(e)&&2===e.length?e[0]:r.isDefined(e.type)&&"Point"===e.type?+e.coordinates[0]:+e.lng},validateCoords:a,getCoords:function(t){if(t&&a(t)){var n=null;if(Array.isArray(t)&&2===t.length)n=new o(t[1],t[0]);else{if(!r.isDefined(t.type)||"Point"!==t.type)return t;n=new o(t.coordinates[1],t.coordinates[0])}return e.extend(t,n)}}}}]),e.module("ui-leaflet").service("leafletHelpers",["$q","$log","$timeout",function(t,n,r){function i(t,r){var i,o;if(e.isDefined(r))i=r;else if(0===Object.keys(t).length)i="main";else if(Object.keys(t).length>=1)for(o in t)t.hasOwnProperty(o)&&(i=o);else n.error(a+"- You have more than 1 map on the DOM, you must provide the map ID to the leafletData.getXXX call");return i}function o(n,r){var o,a=i(n,r);return e.isDefined(n[a])&&!0!==n[a].resolvedDefer?o=n[a].defer:(o=t.defer(),n[a]={defer:o,resolvedDefer:!1}),o}var a="[ui-leaflet] ",s=e.copy,l=function(t){return e.isDefined(t)&&null!==t},u=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/,d=/^((?:x|data)[\:\-_])/i,h=function(e){return e.replace(u,(function(e,t,n,r){return r?n.toUpperCase():n})).replace(c,"Moz$1")};return{watchTrapDelayMilliSec:10,modelChangeInDirective:function(e,t,n){if(!e)throw new Error(a+"trapObj is undefined");if(!t)throw new Error(a+"trapField is undefined");e[t]=!0;var i=n();return r((function(){e[t]=!1}),10),i},camelCase:h,directiveNormalize:function(e){return h(e.replace(d,""))},copy:s,clone:s,errorHeader:a,getObjectValue:function(t,n){var r;if(t&&e.isObject(t))return null!==n&&e.isString(n)?(r=t,n.split(".").forEach((function(e){r&&(r=r[e])})),r):n},getObjectArrayPath:function(e){return e.split(".").reduce((function(e,t){return e+'["'+t+'"]'}))},getObjectDotPath:function(e){return e.reduce((function(e,t){return e+"."+t}))},defaultTo:function(e,t){return l(e)?e:t},isTruthy:function(e){return"true"===e||!0===e},isEmpty:function(e){return 0===Object.keys(e).length},isUndefinedOrEmpty:function(t){return e.isUndefined(t)||null===t||0===Object.keys(t).length},isDefined:l,isUndefined:function(e){return!l(e)},isNumber:e.isNumber,isString:e.isString,isArray:e.isArray,isObject:e.isObject,isFunction:e.isFunction,equals:e.equals,isValidCenter:function(t){return e.isDefined(t)&&e.isNumber(t.lat)&&e.isNumber(t.lng)&&e.isNumber(t.zoom)},isValidPoint:function(t){return!!e.isDefined(t)&&(e.isArray(t)?2===t.length&&e.isNumber(t[0])&&e.isNumber(t[1]):e.isNumber(t.lat)&&e.isNumber(t.lng))},isSameCenterOnMap:function(e,t){var n=t.getCenter(),r=t.getZoom();return!(!e.lat||!e.lng||n.lat.toFixed(4)!==e.lat.toFixed(4)||n.lng.toFixed(4)!==e.lng.toFixed(4)||r!==e.zoom)},safeApply:function(e,t){var n=e.$root.$$phase;"$apply"===n||"$digest"===n?e.$eval(t):e.$evalAsync(t)},obtainEffectiveMapId:i,getDefer:function(t,n){var r=i(t,n);return e.isDefined(t[r])&&!1!==t[r].resolvedDefer?t[r].defer:o(t,n)},getUnresolvedDefer:o,setResolvedDefer:function(e,t){e[i(e,t)].resolvedDefer=!0},rangeIsSupported:function(){var e=document.createElement("input");return e.setAttribute("type","range"),"range"===e.type},FullScreenControlPlugin:{isLoaded:function(){return e.isDefined(L.Control.Fullscreen)}},MiniMapControlPlugin:{isLoaded:function(){return e.isDefined(L.Control.MiniMap)}},AwesomeMarkersPlugin:{isLoaded:function(){return e.isDefined(L.AwesomeMarkers)&&e.isDefined(L.AwesomeMarkers.Icon)},is:function(e){return!!this.isLoaded()&&e instanceof L.AwesomeMarkers.Icon},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},VectorMarkersPlugin:{isLoaded:function(){return e.isDefined(L.VectorMarkers)&&e.isDefined(L.VectorMarkers.Icon)},is:function(e){return!!this.isLoaded()&&e instanceof L.VectorMarkers.Icon},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},DomMarkersPlugin:{isLoaded:function(){return!(!e.isDefined(L.DomMarkers)||!e.isDefined(L.DomMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.DomMarkers.Icon},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},PolylineDecoratorPlugin:{isLoaded:function(){return!!e.isDefined(L.PolylineDecorator)},is:function(e){return!!this.isLoaded()&&e instanceof L.PolylineDecorator},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},MakiMarkersPlugin:{isLoaded:function(){return!(!e.isDefined(L.MakiMarkers)||!e.isDefined(L.MakiMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.MakiMarkers.Icon},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},ExtraMarkersPlugin:{isLoaded:function(){return!(!e.isDefined(L.ExtraMarkers)||!e.isDefined(L.ExtraMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.ExtraMarkers.Icon},equal:function(t,n){return!!this.isLoaded()&&!!this.is(t)&&e.equals(t,n)}},LabelPlugin:{isLoaded:function(){return e.isDefined(L.Label)},is:function(e){return!!this.isLoaded()&&e instanceof L.MarkerClusterGroup}},MarkerClusterPlugin:{isLoaded:function(){return e.isDefined(L.MarkerClusterGroup)},is:function(e){return!!this.isLoaded()&&e instanceof L.MarkerClusterGroup}},GeoJSONPlugin:{isLoaded:function(){return e.isDefined(L.TileLayer.GeoJSON)},is:function(e){return!!this.isLoaded()&&e instanceof L.TileLayer.GeoJSON}},CartoDB:{isLoaded:function(){return cartodb},is:function(){return!0}},Leaflet:{DivIcon:{is:function(e){return e instanceof L.DivIcon},equal:function(t,n){return!!this.is(t)&&e.equals(t,n)}},Icon:{is:function(e){return e instanceof L.Icon},equal:function(t,n){return!!this.is(t)&&e.equals(t,n)}}},watchOptions:{type:"watchDeep",individual:{type:"watchDeep"}}}}]),e.module("ui-leaflet").service("leafletIterators",["leafletLogger","leafletHelpers",function(e,t){var n,r,i=t,o=t.errorHeader+"leafletIterators: ",a=Object.keys,s=i.isFunction,l=i.isObject,u=e,c=Math.pow(2,53)-1,d=function(e){var t=null!==e&&e.length;return i.isNumber(t)&&t>=0&&t<=c},h=function(e){return e};n=function(e,t){return function(t){var n=arguments.length;if(n<2||null===t)return t;for(var r=1;r<n;r++)for(var i=arguments[r],o=e(i),a=o.length,s=0;s<a;s++){var l=o[s];t[l]=i[l]}return t}}(a),r=function(e){return e=n({},e),function(t){return function(e,t){var n=a(t),r=n.length;if(null===e)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0}(t,e)}};var f,p,m=function(e,t,n){return null===e?h:s(e)?function(e,t,n){if(void 0===t)return e;switch(null===n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}(e,t,n):l(e)?r(e):function(e){return function(t){return null===t?void 0:t[e]}}(e)};f=p=function(e,t,n){t=m(t,n);for(var r=!d(e)&&a(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0};var g=function(e,t,n,r){return!(n||i.isDefined(e)&&i.isDefined(t))||!i.isFunction(t)&&(r=i.defaultTo(t,"cb"),u.error(o+r+" is not a function"),!0)},v=function(e,t){!function(e,t,n){if(!g(void 0,n,!0,"internalCb")&&!g(e,t))for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)}(e,t,(function(e,n){t(e,n)}))};return{each:v,forEach:v,every:f,all:p}}]),e.module("ui-leaflet").factory("leafletLayerHelpers",["$rootScope","$q","leafletLogger","leafletHelpers","leafletIterators",function(t,n,r,i,o){function a(e){if(function(e){return l(e.type)?-1===Object.keys(g).indexOf(e.type)?(p.error("[AngularJS - Leaflet] A layer must have a valid type: "+Object.keys(g)),!1):g[e.type].mustHaveUrl&&!l(e.url)?(p.error("[AngularJS - Leaflet] A base layer must have an url"),!1):g[e.type].mustHaveData&&!d(e.data)?(p.error('[AngularJS - Leaflet] The base layer must have a "data" array attribute'),!1):g[e.type].mustHaveLayer&&!d(e.layer)?(p.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have an layer defined"),!1):g[e.type].mustHaveBounds&&!d(e.bounds)?(p.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have bounds defined"),!1):!(g[e.type].mustHaveKey&&!d(e.key)&&(p.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have key defined"),1)):(p.error("[AngularJS - Leaflet] A layer must have a valid type defined."),!1)}(e)){if(!l(e.name))return void p.error("[AngularJS - Leaflet] A base layer must have a name");for(var t in u(e.layerParams)||(e.layerParams={}),u(e.layerOptions)||(e.layerOptions={}),e.layerParams)e.layerOptions[t]=e.layerParams[t];var n={url:e.url,data:e.data,options:e.layerOptions,layer:e.layer,icon:e.icon,type:e.layerType,bounds:e.bounds,key:e.key,apiKey:e.apiKey,pluginOptions:e.pluginOptions,user:e.user,$parent:e};return g[e.type].createLayer(n)}}var s=i,l=i.isString,u=i.isObject,c=i.isArray,d=i.isDefined,h=i.errorHeader,f=o,p=r,m=function(n){if(s.UTFGridPlugin.isLoaded()){var r=new L.UtfGrid(n.url,n.pluginOptions),i={model:n.$parent};return r.on("mouseover",(function(n){e.extend(i,{leafletEvent:n,leafletObject:n.target}),t.$broadcast("leafletDirectiveMap.utfgridMouseover",i)})),r.on("mouseout",(function(n){e.extend(i,{leafletEvent:n,leafletObject:n.target}),t.$broadcast("leafletDirectiveMap.utfgridMouseout",i)})),r.on("click",(function(n){e.extend(i,{leafletEvent:n,leafletObject:n.target}),t.$broadcast("leafletDirectiveMap.utfgridClick",i)})),r.on("mousemove",(function(n){e.extend(i,{leafletEvent:n,leafletObject:n.target}),t.$broadcast("leafletDirectiveMap.utfgridMousemove",i)})),r}p.error("[AngularJS - Leaflet] The UTFGrid plugin is not loaded.")},g={xyz:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer(e.url,e.options)}},geoJSON:{mustHaveUrl:!0,createLayer:function(e){if(s.GeoJSONPlugin.isLoaded())return new L.TileLayer.GeoJSON(e.url,e.pluginOptions,e.options)}},geoJSONShape:{mustHaveUrl:!1,createLayer:function(e){return new L.GeoJSON(e.data,e.options)}},geoJSONAwesomeMarker:{mustHaveUrl:!1,createLayer:function(e){return new L.geoJson(e.data,{pointToLayer:function(t,n){return L.marker(n,{icon:L.AwesomeMarkers.icon(e.icon)})}})}},geoJSONVectorMarker:{mustHaveUrl:!1,createLayer:function(e){return new L.geoJson(e.data,{pointToLayer:function(t,n){return L.marker(n,{icon:L.VectorMarkers.icon(e.icon)})}})}},cartodbTiles:{mustHaveKey:!0,createLayer:function(e){var t=d(e.url)?e.url+"/"+e.user:"//"+e.user+".cartodb.com";return t+="/api/v1/map/"+e.key+"/{z}/{x}/{y}.png",L.tileLayer(t,e.options)}},cartodbUTFGrid:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(e){var t=d(e.url)?e.url+"/"+e.user:"//"+e.user+".cartodb.com";return e.url=t+"/api/v1/map/"+e.key+"/"+e.layer+"/{z}/{x}/{y}.grid.json",m(e)}},cartodbInteractive:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(t){var n=d(t.url)?t.url+"/"+t.user:"//"+t.user+".cartodb.com",r=n+"/api/v1/map/"+t.key+"/{z}/{x}/{y}.png",i=[L.tileLayer(r,t.options)],o=function(t,r,i){var o=e.copy(r);o.url=n+"/api/v1/map/"+o.key+"/"+i+"/{z}/{x}/{y}.grid.json",t.push(m(o))};if(c(t.layer))for(var a=0;a<t.layer.length;a++)o(i,t,t.layer[a]);else o(i,t,t.layer);return L.layerGroup(i)}},wms:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.wms(e.url,e.options)}},wmts:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.wmts(e.url,e.options)}},group:{mustHaveUrl:!1,createLayer:function(e){var t=[];return f.each(e.options.layers,(function(e){t.push(a(e))})),e.options.loadedDefer=function(){var t=[];if(d(e.options.layers))for(var n=0;n<e.options.layers.length;n++){var r=e.options.layers[n].layerOptions.loadedDefer;d(r)&&t.push(r)}return t},L.layerGroup(t)}},featureGroup:{mustHaveUrl:!1,createLayer:function(){return L.featureGroup()}},markercluster:{mustHaveUrl:!1,createLayer:function(e){return s.MarkerClusterPlugin.isLoaded()?new L.MarkerClusterGroup(e.options):void p.warn(h+" The markercluster plugin is not loaded.")}},imageOverlay:{mustHaveUrl:!0,mustHaveBounds:!0,createLayer:function(e){return L.imageOverlay(e.url,e.bounds,e.options)}},iip:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.iip(e.url,e.options)}},custom:{createLayer:function(t){return t.layer instanceof L.Class?e.copy(t.layer):void p.error("[AngularJS - Leaflet] A custom layer must be a leaflet Class")}},cartodb:{mustHaveUrl:!0,createLayer:function(e){return cartodb.createLayer(e.map,e.url)}}};return{createLayer:a,layerTypes:g,safeAddLayer:function(e,t){t&&"function"==typeof t.addTo?t.addTo(e):e.addLayer(t)},safeRemoveLayer:function(t,n,r){if(d(r)&&d(r.loadedDefer))if(e.isFunction(r.loadedDefer)){var i=r.loadedDefer();p.debug("Loaded Deferred",i);var o=i.length;if(o>0)for(var a=function(){0==--o&&t.removeLayer(n)},s=0;s<i.length;s++)i[s].promise.then(a);else t.removeLayer(n)}else r.loadedDefer.promise.then((function(){t.removeLayer(n)}));else t.removeLayer(n)},changeOpacityListener:function(e){return function(t){d(t.setOpacity)&&t.setOpacity(e)}}}}]),e.module("ui-leaflet").factory("leafletLegendHelpers",["$http","$q","$log","leafletHelpers",function(e,t,n,r){var i={},o=r.isDefined,a=function t(n){var r=i[n],o=r[0];e(o.c).then((function(e){r.shift(),o.d.resolve(e),r.length>0&&t(n)}),(function(e){r.shift(),o.d.reject(e),r.length>0&&t(n)}))},s=function(e,t,n,r){if(e.innerHTML="",t.error)e.innerHTML+='<div class="info-title alert alert-danger">'+t.error.message+"</div>";else if("arcgis"===n)for(var i=0;i<t.layers.length;i++){var o=t.layers[i];e.innerHTML+='<div class="info-title" data-layerid="'+o.layerId+'">'+o.layerName+"</div>";for(var a=0;a<o.legend.length;a++){var s=o.legend[a];e.innerHTML+='<div class="inline" data-layerid="'+o.layerId+'"><img src="data:'+s.contentType+";base64,"+s.imageData+'" /></div><div class="info-label" data-layerid="'+o.layerId+'">'+s.label+"</div>"}}else"image"===n&&(e.innerHTML='<img src="'+r+'"/>')};return{getOnAddLegend:function(e,t,n,r){return function(){var i=L.DomUtil.create("div",t);return L.Browser.touch?L.DomEvent.on(i,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(i),L.DomEvent.on(i,"mousewheel",L.DomEvent.stopPropagation)),s(i,e,n,r),i}},getOnAddArrayLegend:function(e,t){return function(){for(var n=L.DomUtil.create("div",t),r=0;r<e.colors.length;r++)n.innerHTML+='<div class="outline"><i style="background:'+e.colors[r]+'"></i></div><div class="info-label">'+e.labels[r]+"</div>";return L.Browser.touch?L.DomEvent.on(n,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"mousewheel",L.DomEvent.stopPropagation)),n}},updateLegend:s,addLegendURL:function(e,n){var r=t.defer();return o(i[e])||(i[e]=[]),i[e].push({c:n,d:r}),1===i[e].length&&a(e),r.promise}}}]),e.module("ui-leaflet").factory("leafletMapDefaults",["$q","leafletHelpers",function(t,n){var r=n.isDefined,i=n.isObject,o=n.obtainEffectiveMapId,a={};return{reset:function(){a={}},getDefaults:function(e){var t=o(a,e);return a[t]},getMapCreationDefaults:function(e){var t=o(a,e),n=a[t],i={maxZoom:n.maxZoom,keyboard:n.keyboard,dragging:n.dragging,zoomControl:n.zoomControl,doubleClickZoom:n.doubleClickZoom,scrollWheelZoom:n.scrollWheelZoom,tap:n.tap,touchZoom:n.touchZoom,attributionControl:n.attributionControl,worldCopyJump:n.worldCopyJump,crs:n.crs,trackResize:n.trackResize};if(r(n.minZoom)&&(i.minZoom=n.minZoom),r(n.zoomAnimation)&&(i.zoomAnimation=n.zoomAnimation),r(n.fadeAnimation)&&(i.fadeAnimation=n.fadeAnimation),r(n.markerZoomAnimation)&&(i.markerZoomAnimation=n.markerZoomAnimation),n.map)for(var s in n.map)i[s]=n.map[s];return i},setDefaults:function(t,n){var s={keyboard:!0,dragging:!0,worldCopyJump:!1,doubleClickZoom:!0,scrollWheelZoom:!0,tap:!0,touchZoom:!0,zoomControl:!0,zoomsliderControl:!1,zoomControlPosition:"topleft",attributionControl:!0,controls:{layers:{visible:!0,position:"topright",collapsed:!0}},nominatim:{server:" http://nominatim.openstreetmap.org/search"},crs:L.CRS.EPSG3857,tileLayer:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileLayerOptions:{
-attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},path:{weight:10,opacity:1,color:"#0000ff"},center:{lat:0,lng:0,zoom:1},trackResize:!0};r(t)&&(s.doubleClickZoom=r(t.doubleClickZoom)?t.doubleClickZoom:s.doubleClickZoom,s.scrollWheelZoom=r(t.scrollWheelZoom)?t.scrollWheelZoom:s.doubleClickZoom,s.tap=r(t.tap)?t.tap:s.tap,s.touchZoom=r(t.touchZoom)?t.touchZoom:s.doubleClickZoom,s.zoomControl=r(t.zoomControl)?t.zoomControl:s.zoomControl,s.zoomsliderControl=r(t.zoomsliderControl)?t.zoomsliderControl:s.zoomsliderControl,s.attributionControl=r(t.attributionControl)?t.attributionControl:s.attributionControl,s.tileLayer=r(t.tileLayer)?t.tileLayer:s.tileLayer,s.zoomControlPosition=r(t.zoomControlPosition)?t.zoomControlPosition:s.zoomControlPosition,s.keyboard=r(t.keyboard)?t.keyboard:s.keyboard,s.dragging=r(t.dragging)?t.dragging:s.dragging,s.trackResize=r(t.trackResize)?t.trackResize:s.trackResize,r(t.controls)&&e.extend(s.controls,t.controls),i(t.crs)?s.crs=t.crs:r(L.CRS[t.crs])&&(s.crs=L.CRS[t.crs]),r(t.center)&&e.copy(t.center,s.center),r(t.tileLayerOptions)&&e.copy(t.tileLayerOptions,s.tileLayerOptions),r(t.maxZoom)&&(s.maxZoom=t.maxZoom),r(t.minZoom)&&(s.minZoom=t.minZoom),r(t.zoomAnimation)&&(s.zoomAnimation=t.zoomAnimation),r(t.fadeAnimation)&&(s.fadeAnimation=t.fadeAnimation),r(t.markerZoomAnimation)&&(s.markerZoomAnimation=t.markerZoomAnimation),r(t.worldCopyJump)&&(s.worldCopyJump=t.worldCopyJump),r(t.map)&&(s.map=t.map),r(t.path)&&(s.path=t.path));var l=o(a,n);return a[l]=s,s}}}]),e.module("ui-leaflet").service("leafletMarkersHelpers",["$rootScope","$timeout","leafletHelpers","leafletLogger","$compile","leafletGeoJsonHelpers","leafletWatchHelpers",function(t,n,r,i,o,a,s){var l=r.isDefined,u=r.defaultTo,c=r.MarkerClusterPlugin,d=r.AwesomeMarkersPlugin,h=r.VectorMarkersPlugin,f=r.MakiMarkersPlugin,p=r.ExtraMarkersPlugin,m=r.DomMarkersPlugin,g=r.safeApply,v=r,_=r.isString,y=r.isNumber,b=r.isObject,w={},M=a,k=r.errorHeader,x=s.maybeWatch,S=i,T=function(e){var t="";return["_icon","_latlng","_leaflet_id","_map","_shadow"].forEach((function(n){t+=n+": "+u(e[n],"undefined")+" \n"})),"[leafletMarker] : \n"+t},$=function(t){return e.element(w[t]._map._container).parent().length>0},D=function(n){if(l(n)&&l(n.type)&&"awesomeMarker"===n.type)return d.isLoaded()||S.error(k+" The AwesomeMarkers Plugin is not loaded."),new L.AwesomeMarkers.icon(n);if(l(n)&&l(n.type)&&"vectorMarker"===n.type)return h.isLoaded()||S.error(k+" The VectorMarkers Plugin is not loaded."),new L.VectorMarkers.icon(n);if(l(n)&&l(n.type)&&"makiMarker"===n.type)return f.isLoaded()||S.error(k+"The MakiMarkers Plugin is not loaded."),new L.MakiMarkers.icon(n);if(l(n)&&l(n.type)&&"extraMarker"===n.type)return p.isLoaded()||S.error(k+"The ExtraMarkers Plugin is not loaded."),new L.ExtraMarkers.icon(n);if(l(n)&&l(n.type)&&"div"===n.type)return new L.divIcon(n);if(l(n)&&l(n.type)&&"dom"===n.type){m.isLoaded()||S.error(k+"The DomMarkers Plugin is not loaded.");var r=e.isFunction(n.getMarkerScope)?n.getMarkerScope().$new():t,i=o(n.template)(r),a=e.copy(n);return a.ngElement=i,a.element=i[0],e.isFunction(n.getMarkerScope)&&(a.scope=r),new L.DomMarkers.icon(a)}return l(n)&&l(n.type)&&"icon"===n.type?n.icon:l(n)&&l(n.iconUrl)?new L.Icon(n):new L.Icon.Default({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13RCmsoBwEqzGcZsxsvCSy/9wJKf7UWf1mEY8JWfewc67UUoDbDjQC+FqK4QqLVMGGR9d2wurKzqBk3nqIT/9zLxRRjgZ9bqQgub+DdoeCC03Q8j+0QhFhBHR/eP3U/zCln7Uu+hihJ1+bBNffLIvmkyP0gpBZWYXhKussK6mBz5HT6M1Nqpcp+mBCPXosYQfrekGvrjewd59/GvKCE7TbK/04/ZV5QZYVWmDwH1mF3xa2Q3ra3DBC5vBT1oP7PTj4C0+CcL8c7C2CtejqhuCnuIQHaKHzvcRfZpnylFfXsYJx3pNLwhKzRAwAhEqG0SpusBHfAKkxw3w4627MPhoCH798z7s0ZnBJ/MEJbZSbXPhER2ih7p2ok/zSj2cEJDd4CAe+5WYnBCgR2uruyEw6zRoW6/DWJ/OeAP8pd/BGtzOZKpG8oke0SX6GMmRk6GFlyAc59K32OTEinILRJRchah8HQwND8N435Z9Z0FY1EqtxUg+0SO6RJ/mmXz4VuS+DpxXC3gXmZwIL7dBSH4zKE50wESf8qwVgrP1EIlTO5JP9Igu0aexdh28F1lmAEGJGfh7jE6ElyM5Rw/FDcYJjWhbeiBYoYNIpc2FT/SILivp0F1ipDWk4BIEo2VuodEJUifhbiltnNBIXPUFCMpthtAyqws/BPlEF/VbaIxErdxPphsU7rcCp8DohC+GvBIPJS/tW2jtvTmmAeuNO8BNOYQeG8G/2OzCJ3q+soYB5i6NhMaKr17FSal7GIHheuV3uSCY8qYVuEm1cOzqdWr7ku/R0BDoTT+DT+ohCM6/CCvKLKO4RI+dXPeAuaMqksaKrZ7L3FE5FIFbkIceeOZ2OcHO6wIhTkNo0ffgjRGxEqogXHYUPHfWAC/lADpwGcLRY3aeK4/oRGCKYcZXPVoeX/kelVYY8dUGf8V5EBRbgJXT5QIPhP9ePJi428JKOiEYhYXFBqou2Guh+p/mEB1/RfMw6rY7cxcjTrneI1FrDyuzUSRm9miwEJx8E/gUmqlyvHGkneiwErR21F3tNOK5Tf0yXaT+O7DgCvALTUBXdM4YhC/IawPU+2PduqMvuaR6eoxSwUk75ggqsYJ7VicsnwGIkZBSXKOUww73WGXyqP+J2/b9c+gi1YAg/xpwck3gJuucNrh5JvDPvQr0WFXf0piyt8f8/WI0hV4pRxxkQZdJDfDJNOAmM0Ag8jyT6hz0WGXWuP94Yh2jcfjmXAGvHCMslRimDHYuHuDsy2QtHuIavznhbYURq5R57KpzBBRZKPJi8eQg48h4j8SDdowifdIrEVdU+gbO6QNvRRt4ZBthUaZhUnjlYObNagV3keoeru3rU7rcuceqU1mJBxy+BWZYlNEBH+0eH4vRiB+OYybU2hnblYlTvkHinM4m54YnxSyaZYSF6R3jwgP7udKLGIX6r/lbNa9N6y5MFynjWDtrHd75ZvTYAPO/6RgF0k76mQla3FGq7dO+cH8sKn0Vo7nDllwAhqwLPkxrHwWmHJOo+AKJ4rab5OgrM7rVu8eWb2Pu0Dh4eDgXoOfvp7Y7QeqknRmvcTBEyq9m/HQQSCSz6LHq3z0yzsNySRfMS253wl2KyRDbcZPcfJKjZmSEOjcxyi+Y8dUOtsIEH6R2wNykdqrkYJ0RV92H0W58pkfQk7cKevsLK10Py8SdMGfXNXATY+pPbyJR/ET6n9nIfztNtZYRV9XniQu9IA2vOVgy4ir7GCLVmmd+zjkH0eAF9Po6K61pmCXHxU5rHMYd1ftc3owjwRSVRzLjKvqZEty6cRUD7jGqiOdu5HG6MdHjNcNYGqfDm5YRzLBBCCDl/2bk8a8gdbqcfwECu62Fg/HrggAAAABJRU5ErkJggg==",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})},C=function(e){l(w[e])&&delete w[e]},E=function(e){e.options.icon.options.ngElement&&e.options.icon.options.ngElement.remove(),e.options.icon.options.scope&&e.options.icon.options.scope.$destroy()},A=function(e,t,n){if(e.closePopup(),e.options.icon&&e.options.icon.options&&"dom"===e.options.icon.options.type&&E(e),l(n)&&l(n.overlays))for(var r in n.overlays)if((n.overlays[r]instanceof L.LayerGroup||n.overlays[r]instanceof L.FeatureGroup)&&n.overlays[r].hasLayer(e))return void n.overlays[r].removeLayer(e);if(l(w))for(var i in w)w[i].hasLayer(e)&&w[i].removeLayer(e);t.hasLayer(e)&&t.removeLayer(e)},P=function(e,t){o(e._popup._contentNode)(t)},Y=function e(t,r,i){(t._popup._contentNode.innerText||t._popup._contentNode.textContent).length<1&&n((function(){e(t,r,i)}));var o=t._popup._contentNode.offsetWidth;return t._popup._updateLayout(),t._popup._updatePosition(),t._popup.options.autoPan&&function(e,t){var n=e._popup._container.offsetHeight,r=new L.Point(e._popup._containerLeft,-n-e._popup._containerBottom);null!==t.layerPointToContainerPoint(r)&&e._popup._adjustPan()}(t,i),o},O=function(n,r,i){var o=e.isFunction(r.getMessageScope)?r.getMessageScope():t;if(!l(r.compileMessage)||r.compileMessage){if(!l(n._popup)||!l(n._popup._contentNode))return S.error(k+"Popup is invalid or does not have any content."),!1;P(n,o),Y(n,r,i)}},I=function(n,r){var i=e.isFunction(r.getMessageScope)?r.getMessageScope():t,a=e.isFunction(r.getLabelScope)?r.getLabelScope():i,s=!l(r.compileMessage)||r.compileMessage;v.LabelPlugin.isLoaded()&&l(r.label)&&(l(r.label.options)&&!0===r.label.options.noHide&&n.showLabel(),s&&l(n.label)&&o(n.label._container)(a))},j=function(t,n,r,i,o,a,s){if(l(n)){if(!M.validateCoords(t))return S.warn("There are problems with lat-lng data, please verify your marker model"),void A(r,s,a);var u=t===n;if(l(t.iconAngle)&&n.iconAngle!==t.iconAngle&&r.setIconAngle(t.iconAngle),_(t.layer)||_(n.layer)&&(l(a.overlays[n.layer])&&a.overlays[n.layer].hasLayer(r)&&(a.overlays[n.layer].removeLayer(r),r.closePopup()),s.hasLayer(r)||s.addLayer(r)),(y(t.opacity)||y(parseFloat(t.opacity)))&&t.opacity!==n.opacity&&r.setOpacity(t.opacity),_(t.layer)&&n.layer!==t.layer){if(_(n.layer)&&l(a.overlays[n.layer])&&a.overlays[n.layer].hasLayer(r)&&a.overlays[n.layer].removeLayer(r),r.closePopup(),s.hasLayer(r)&&s.removeLayer(r),!l(a.overlays[t.layer]))return void S.error(k+"You must use a name of an existing layer");var c=a.overlays[t.layer];if(!(c instanceof L.LayerGroup||c instanceof L.FeatureGroup))return void S.error(k+'A marker can only be added to a layer of type "group" or "featureGroup"');c.addLayer(r),s.hasLayer(r)&&!0===t.focus&&r.openPopup()}if(!0!==t.draggable&&!0===n.draggable&&l(r.dragging)&&r.dragging.disable(),!0===t.draggable&&!0!==n.draggable&&(r.dragging?r.dragging.enable():L.Handler.MarkerDrag&&(r.dragging=new L.Handler.MarkerDrag(r),r.options.draggable=!0,r.dragging.enable())),b(t.icon)||b(n.icon)&&("dom"===n.icon.type&&E(r),r.setIcon(D()),r.closePopup(),r.unbindPopup(),_(t.message)&&r.bindPopup(t.message,t.popupOptions)),b(t.icon)&&b(n.icon)&&!e.equals(t.icon,n.icon)){var d=!1;r.dragging&&(d=r.dragging.enabled()),"dom"===n.icon.type&&E(r),r.setIcon(D(t.icon)),d&&r.dragging.enable(),r.closePopup(),r.unbindPopup(),_(t.message)&&(r.bindPopup(t.message,t.popupOptions),s.hasLayer(r)&&!0===t.focus&&r.openPopup())}!_(t.message)&&_(n.message)&&(r.closePopup(),r.unbindPopup()),v.LabelPlugin.isLoaded()&&(l(t.label)&&l(t.label.message)?"label"in n&&"message"in n.label&&!e.equals(t.label.message,n.label.message)?r.updateLabelContent(t.label.message):!e.isFunction(r.getLabel)||e.isFunction(r.getLabel)&&!l(r.getLabel())?(r.bindLabel(t.label.message,t.label.options),I(r,t)):I(r,t):"label"in t&&!("message"in t.label)||e.isFunction(r.unbindLabel)&&r.unbindLabel()),_(t.message)&&!_(n.message)&&r.bindPopup(t.message,t.popupOptions),_(t.message)&&_(n.message)&&t.message!==n.message&&r.setPopupContent(t.message);var h=!1;!0!==t.focus&&!0===n.focus&&(r.closePopup(),h=!0),(!0===t.focus&&(!l(n.focus)||!1===n.focus)||u&&!0===t.focus)&&(r.openPopup(),h=!0),n.zIndexOffset!==t.zIndexOffset&&r.setZIndexOffset(t.zIndexOffset);var f=r.getLatLng();_(t.layer)&&v.MarkerClusterPlugin.is(a.overlays[t.layer])?h?t.lat===n.lat&&t.lng===n.lng||(a.overlays[t.layer].removeLayer(r),r.setLatLng([t.lat,t.lng]),a.overlays[t.layer].addLayer(r)):f.lat!==t.lat||f.lng!==t.lng?(a.overlays[t.layer].removeLayer(r),r.setLatLng([t.lat,t.lng]),a.overlays[t.layer].addLayer(r)):t.lat!==n.lat||t.lng!==n.lng?(a.overlays[t.layer].removeLayer(r),r.setLatLng([t.lat,t.lng]),a.overlays[t.layer].addLayer(r)):b(t.icon)&&b(n.icon)&&!e.equals(t.icon,n.icon)&&(a.overlays[t.layer].removeLayer(r),a.overlays[t.layer].addLayer(r)):f.lat===t.lat&&f.lng===t.lng||r.setLatLng([t.lat,t.lng])}};return{resetMarkerGroup:C,resetMarkerGroups:function(){w={}},resetUnusedMarkerGroups:function(){for(var e in w)$(e)||C(e)},deleteMarker:A,manageOpenPopup:O,manageOpenLabel:I,createMarker:function(e){if(l(e)&&M.validateCoords(e)){var t=M.getCoords(e);if(l(t)){var n={icon:D(e.icon),title:l(e.title)?e.title:"",draggable:!!l(e.draggable)&&e.draggable,clickable:!l(e.clickable)||e.clickable,riseOnHover:!!l(e.riseOnHover)&&e.riseOnHover,zIndexOffset:l(e.zIndexOffset)?e.zIndexOffset:0,iconAngle:l(e.iconAngle)?e.iconAngle:0};for(var r in e)e.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(n[r]=e[r]);var i=new L.marker(t,n);return _(e.message)||i.unbindPopup(),i}S.error(k+"Unable to get coordinates from markerData.")}else S.error(k+"The marker definition is not valid.")},addMarkerToGroup:function(e,t,n,r){return _(t)?c.isLoaded()?(l(w[t])||(w[t]=new L.MarkerClusterGroup(n),r.addLayer(w[t])),void w[t].addLayer(e)):void S.error(k+"The MarkerCluster plugin is not loaded."):void S.error(k+"The marker group you have specified is invalid.")},listenMarkerEvents:function(e,t,n,r,i){e.on("popupopen",(function(){g(n,(function(){(l(e._popup)||l(e._popup._contentNode))&&(t.focus=!0,O(e,t,i))}))})),e.on("popupclose",(function(){g(n,(function(){t.focus=!1}))})),e.on("add",(function(){g(n,(function(){"label"in t&&I(e,t)}))}))},updateMarker:j,addMarkerWatcher:function(e,t,n,r,i,o){var a=v.getObjectArrayPath("markers."+t);x(n,a,o,(function(t,n,o){return l(t)?void j(t,n,e,0,0,r,i):(A(e,i,r),void o())}))},string:T,log:function(e,t){(t?console:S).debug(T(e))},getModelFromModels:function(e,t,n){if(l(e))return t?n?e[n][t]:e[t]:void S.error(k+"marker id missing in getMarker")},getLayerModels:function(e,t){if(l(e))return t?e[t]:e}}}]),e.module("ui-leaflet").factory("leafletPathsHelpers",["$rootScope","leafletLogger","leafletHelpers",function(e,t,n){function r(e){return e.filter((function(e){return u(e)})).map((function(e){return i(e)}))}function i(e){return s(e)?new L.LatLng(e[0],e[1]):new L.LatLng(e.lat,e.lng)}function o(e){return e.map((function(e){return r(e)}))}var a=n.isDefined,s=n.isArray,l=n.isNumber,u=n.isValidPoint,c=t,d=["stroke","weight","color","opacity","fill","fillColor","fillOpacity","dashArray","lineCap","lineJoin","clickable","pointerEvents","className","smoothFactor","noClip"],h=function(e,t){for(var n={},r=0;r<d.length;r++){var i=d[r];a(t[i])&&(n[i]=t[i])}e.setStyle(t)},f=function(e){if(!s(e))return!1;for(var t=0;t<e.length;t++){var n=e[t];if(!u(n))return!1}return!0},p={polyline:{isValid:function(e){var t=e.latlngs;return f(t)},createPath:function(e){return new L.Polyline([],e)},setPath:function(e,t){e.setLatLngs(r(t.latlngs)),h(e,t)}},multiPolyline:{isValid:function(e){var t=e.latlngs;if(!s(t))return!1;for(var n in t){var r=t[n];if(!f(r))return!1}return!0},createPath:function(e){return new L.multiPolyline([[[0,0],[1,1]]],e)},setPath:function(e,t){e.setLatLngs(o(t.latlngs)),h(e,t)}},polygon:{isValid:function(e){var t=e.latlngs;return f(t)},createPath:function(e){return new L.Polygon([],e)},setPath:function(e,t){e.setLatLngs(r(t.latlngs)),h(e,t)}},multiPolygon:{isValid:function(e){var t=e.latlngs;if(!s(t))return!1;for(var n in t){var r=t[n];if(!f(r))return!1}return!0},createPath:function(e){return new L.MultiPolygon([[[0,0],[1,1],[0,1]]],e)},setPath:function(e,t){e.setLatLngs(o(t.latlngs)),h(e,t)}},rectangle:{isValid:function(e){var t=e.latlngs;if(!s(t)||2!==t.length)return!1;for(var n in t){var r=t[n];if(!u(r))return!1}return!0},createPath:function(e){return new L.Rectangle([[0,0],[1,1]],e)},setPath:function(e,t){e.setBounds(new L.LatLngBounds(r(t.latlngs))),h(e,t)}},circle:{isValid:function(e){var t=e.latlngs;return u(t)&&l(e.radius)},createPath:function(e){return new L.Circle([0,0],1,e)},setPath:function(e,t){e.setLatLng(i(t.latlngs)),a(t.radius)&&e.setRadius(t.radius),h(e,t)}},circleMarker:{isValid:function(e){var t=e.latlngs;return u(t)&&l(e.radius)},createPath:function(e){return new L.CircleMarker([0,0],e)},setPath:function(e,t){e.setLatLng(i(t.latlngs)),a(t.radius)&&e.setRadius(t.radius),h(e,t)}}};return{setPathOptions:function(e,t,n){a(t)||(t="polyline"),p[t].setPath(e,n)},createPath:function(e,t,n){a(t.type)||(t.type="polyline");var r=function(e,t){for(var n={},r=0;r<d.length;r++){var i=d[r];a(e[i])?n[i]=e[i]:a(t.path[i])&&(n[i]=t.path[i])}return n}(t,n),i=function(e){var t={};return e.latlngs&&(t.latlngs=e.latlngs),e.radius&&(t.radius=e.radius),t}(t);return p[t.type].isValid(i)?p[t.type].createPath(r):void c.error("[AngularJS - Leaflet] Invalid data passed to the "+t.type+" path")}}}]),e.module("ui-leaflet").service("leafletWatchHelpers",(function(){return{maybeWatch:function(e,t,n,r){return function(e,t,n,r,i){var o=e[t](n,(function(e,t){i(e,t,o),null===r.type&&o()}),"watchDeep"===r.type);return o}(e,"watchCollection"===n.type?"$watchCollection":"$watch",t,n,r)}}})),e.module("ui-leaflet").service("leafletLogger",["nemSimpleLogger",function(e){return e.spawn()}]),e.module("ui-leaflet").factory("nominatimService",["$q","$http","leafletHelpers","leafletMapDefaults",function(e,t,n,r){var i=n.isDefined;return{query:function(n,o){var a=r.getDefaults(o).nominatim.server,s=e.defer();return t.get(a,{params:{format:"json",limit:1,q:n}}).success((function(e){e.length>0&&i(e[0].boundingbox)?s.resolve(e[0]):s.reject("[Nominatim] Invalid address")})),s.promise}}}]),e.module("ui-leaflet").directive("bounds",["leafletLogger","$timeout","$http","leafletHelpers","nominatimService","leafletBoundsHelpers",function(t,n,r,i,o,a){var s=t;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(t,r,l,u){var c=i.isDefined,d=a.createLeafletBounds,h=u[0].getLeafletScope(),f=u[0],p=i.errorHeader+" [Bounds] ";f.getMap().then((function(r){var i;h.$on("boundsChanged",(function(t){var i=t.currentScope,o=r.getBounds();if(!function(e){return 0===e._southWest.lat&&0===e._southWest.lng&&0===e._northEast.lat&&0===e._northEast.lng}(o)&&!i.settingBoundsFromScope){i.settingBoundsFromLeaflet=!0;var a={northEast:{lat:o._northEast.lat,lng:o._northEast.lng},southWest:{lat:o._southWest.lat,lng:o._southWest.lng},options:o.options};e.equals(i.bounds,a)||(i.bounds=a),n((function(){i.settingBoundsFromLeaflet=!1}))}})),h.$watch("bounds",(function(e){if(!t.settingBoundsFromLeaflet){if(c(e.address)&&e.address!==i)return t.settingBoundsFromScope=!0,o.query(e.address,l.id).then((function(e){var t=e.boundingbox,n=[[t[0],t[2]],[t[1],t[3]]];r.fitBounds(n)}),(function(e){s.error(p+" "+e+".")})),i=e.address,void n((function(){t.settingBoundsFromScope=!1}));var a=d(e);a&&!r.getBounds().equals(a)&&(t.settingBoundsFromScope=!0,r.fitBounds(a,e.options),n((function(){t.settingBoundsFromScope=!1})))}}),!0)}))}}}]);var t=["center","lfCenter"],n={};t.forEach((function(t){n[t]=["leafletLogger","$q","$location","$timeout","leafletMapDefaults","leafletHelpers","leafletBoundsHelpers","leafletMapEvents",function(n,r,i,o,a,s,l,u){var c,d=s.isDefined,h=s.isNumber,f=s.isSameCenterOnMap,p=s.safeApply,m=s.isValidCenter,g=l.isValidBounds,v=s.isUndefinedOrEmpty,_=s.errorHeader,y=n,b=function(e,t){return d(e)&&g(e)&&v(t)};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:function(){c=r.defer(),this.getCenter=function(){return c.promise}},link:function(n,r,s,g){var v=g.getLeafletScope(),w=v[t];g.getMap().then((function(n){var r,g,L=a.getDefaults(s.id);if(-1!==s[t].search("-"))return y.error(_+' The "center" variable can\'t use a "-" on its key name: "'+s[t]+'".'),void n.setView([L.center.lat,L.center.lng],L.center.zoom);if(b(v.bounds,w))n.fitBounds(l.createLeafletBounds(v.bounds),v.bounds.options),w=n.getCenter(),p(v,(function(r){e.extend(r[t],{lat:n.getCenter().lat,lng:n.getCenter().lng,zoom:n.getZoom(),autoDiscover:!1})})),p(v,(function(e){var t=n.getBounds();e.bounds={northEast:{lat:t._northEast.lat,lng:t._northEast.lng},southWest:{lat:t._southWest.lat,lng:t._southWest.lng}}}));else{if(!d(w))return y.error(_+' The "center" property is not defined in the main scope'),void n.setView([L.center.lat,L.center.lng],L.center.zoom);d(w.lat)&&d(w.lng)||d(w.autoDiscover)||e.copy(L.center,w)}if("yes"===s.urlHashCenter){var M=function(){var e,t=i.search(),n=s.urlHashParam?s.urlHashParam:"c";if(d(t[n])){var r=t[n].split(":");3===r.length&&(e={lat:parseFloat(r[0]),lng:parseFloat(r[1]),zoom:parseInt(r[2],10)})}return e};r=M(),v.$on("$locationChangeSuccess",(function(r){var i=r.currentScope,o=M();d(o)&&!f(o,n)&&e.extend(i[t],{lat:o.lat,lng:o.lng,zoom:o.zoom})}))}v.$watch(t,(function(t){if(!v.settingCenterFromLeaflet)return d(r)&&(e.copy(r,t),r=void 0),m(t)||!0===t.autoDiscover?!0===t.autoDiscover?(h(t.zoom)||n.setView([L.center.lat,L.center.lng],L.center.zoom),void(h(t.zoom)&&t.zoom>L.center.zoom?n.locate({setView:!0,maxZoom:t.zoom}):d(L.maxZoom)?n.locate({setView:!0,maxZoom:L.maxZoom}):n.locate({setView:!0}))):void(g&&f(t,n)||(v.settingCenterFromScope=!0,n.setView([t.lat,t.lng],t.zoom),u.notifyCenterChangedToBounds(v,n),o((function(){v.settingCenterFromScope=!1})))):void y.warn(_+" invalid 'center'")}),!0),n.whenReady((function(){g=!0})),n.on("moveend",(function(){c.resolve(),u.notifyCenterUrlHashChanged(v,n,s,i.search()),f(w,n)||v.settingCenterFromScope||(v.settingCenterFromLeaflet=!0,p(v,(function(r){v.settingCenterFromScope||e.extend(r[t],{lat:n.getCenter().lat,lng:n.getCenter().lng,zoom:n.getZoom(),autoDiscover:!1}),u.notifyCenterChangedToBounds(v,n),o((function(){v.settingCenterFromLeaflet=!1}))})))})),!0===w.autoDiscover&&n.on("locationerror",(function(){y.warn(_+" The Geolocation API is unauthorized on this page."),m(w)?(n.setView([w.lat,w.lng],w.zoom),u.notifyCenterChangedToBounds(v,n)):(n.setView([L.center.lat,L.center.lng],L.center.zoom),u.notifyCenterChangedToBounds(v,n))}))}))}}}]})),t.forEach((function(t){e.module("ui-leaflet").directive(t,n[t])})),e.module("ui-leaflet").directive("controls",["leafletLogger","leafletHelpers","leafletControlHelpers",function(e,t,n){var r=e;return{restrict:"A",scope:!1,replace:!1,require:"?^leaflet",link:function(e,i,o,a){if(a){var s=n.createControl,l=n.isValidControlType,u=a.getLeafletScope(),c=t.isDefined,d=t.isArray,h={},f=t.errorHeader+" [Controls] ";e.$on("$destroy",(function(){n.destroyMapLayersControl(e.mapId)})),a.getMap().then((function(e){u.$watchCollection("controls",(function(t){for(var n in h)c(t[n])||(e.hasControl(h[n])&&e.removeControl(h[n]),delete h[n]);for(var i in t){var o,a=c(t[i].type)?t[i].type:i;if(!l(a))return void r.error(f+" Invalid control type: "+a+".");if("custom"!==a)o=s(a,t[i]),e.addControl(o),h[i]=o;else{var u=t[i];if(d(u))for(var p=0;p<u.length;p++){var m=u[p];e.addControl(m),h[i]=c(h[i])?h[i].concat([m]):[m]}else e.addControl(u),h[i]=u}}}))}))}}}}]),e.module("ui-leaflet").directive("decorations",["leafletLogger","leafletHelpers",function(t,n){var r=t;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(t,i,o,a){function s(e){return d(e)&&d(e.coordinates)&&(c.isLoaded()||r.error("[AngularJS - Leaflet] The PolylineDecorator Plugin is not loaded.")),L.polylineDecorator(e.coordinates)}function l(e,t){if(d(e)&&d(t)&&d(t.coordinates)&&d(t.patterns))return e.setPaths(t.coordinates),e.setPatterns(t.patterns),e}var u=a.getLeafletScope(),c=n.PolylineDecoratorPlugin,d=n.isDefined,h={};a.getMap().then((function(t){u.$watch("decorations",(function(n){for(var r in h)d(n[r])&&e.equals(n[r],h)||(t.removeLayer(h[r]),delete h[r]);for(var i in n){var o=n[i],a=s(o);d(a)&&(h[i]=a,t.addLayer(a),l(a,o))}}),!0)}))}}}]),e.module("ui-leaflet").directive("eventBroadcast",["leafletLogger","$rootScope","leafletHelpers","leafletMapEvents","leafletIterators",function(e,t,n,r,i){var o=e;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,t,a,s){var l=n.isObject,u=n.isDefined,c=s.getLeafletScope(),d=c.eventBroadcast,h=r.getAvailableMapEvents(),f=r.addEvents;s.getMap().then((function(e){var t=[],n="broadcast";u(d.map)?l(d.map)?("emit"!==d.map.logic&&"broadcast"!==d.map.logic?o.warn("[AngularJS - Leaflet] Available event propagation logic are: 'emit' or 'broadcast'."):n=d.map.logic,l(d.map.enable)&&d.map.enable.length>=0?i.each(d.map.enable,(function(e){-1===t.indexOf(e)&&-1!==h.indexOf(e)&&t.push(e)})):o.warn("[AngularJS - Leaflet] event-broadcast.map.enable must be an object check your model.")):o.warn("[AngularJS - Leaflet] event-broadcast.map must be an object check your model."):t=h,f(e,a.id,t,"eventName",c,n)}))}}}]),e.module("ui-leaflet").directive("geojson",["$timeout","leafletLogger","leafletData","leafletHelpers","leafletWatchHelpers","leafletDirectiveControlsHelpers","leafletIterators","leafletGeoJsonEvents",function(t,n,r,i,o,a,s,l){var u=o.maybeWatch,c=i.watchOptions,d=a.extend,h=i,f=s,p={changeFromDirective:!1};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(t,n,o,a){var s=i.isDefined,m=a.getLeafletScope(),g={},v=!1;a.getMap().then((function(t){var n;n=m.watchOptions&&m.watchOptions.geojson?m.watchOptions.geojson:c;var a=function(t,n){return e.isFunction(t.onEachFeature)?t.onEachFeature:function(e,r){i.LabelPlugin.isLoaded()&&s(e.properties.description)&&r.bindLabel(e.properties.description),l.bindEvents(o.id,r,null,e,m,n,{resetStyleOnMouseout:t.resetStyleOnMouseout,mapId:o.id})}},_=h.isDefined(o.geojsonNested)&&h.isTruthy(o.geojsonNested),y=function(){if(g){var e=function(e){s(e)&&t.hasLayer(e)&&t.removeLayer(e)};return _?void f.each(g,(function(t){e(t)})):void e(g)}},b=function(e,n){if(s(e)&&s(e.data)){var i=a(e,n);s(e.options)||h.modelChangeInDirective(p,"changeFromDirective",(function(){e.options={style:e.style,filter:e.filter,onEachFeature:i,pointToLayer:e.pointToLayer}}));var l=L.geoJson(e.data,e.options);n&&h.isString(n)?g[n]=l:g=l,l.addTo(t),v||(v=!0,r.setGeoJSON(g,o.id))}},w=function(e){if(y(),_){if(!e||!Object.keys(e).length)return;f.each(e,(function(e,t){b(e,t)}))}else b(e)};d(o.id,"geojson",w,y),u(m,"geojson",n,(function(e){p.changeFromDirective||w(e)}))}))}}}]),e.module("ui-leaflet").directive("layercontrol",["$filter","leafletLogger","leafletData","leafletHelpers",function(t,n,r,i){var o=n;return{restrict:"E",scope:{icons:"=?",autoHideOpacity:"=?",showGroups:"=?",title:"@",baseTitle:"@",overlaysTitle:"@"},replace:!0,transclude:!1,require:"^leaflet",controller:["$scope","$element","$sce",function(t,n,a){o.debug("[Angular Directive - Layers] layers",t,n);var s=i.safeApply,l=i.isDefined;e.extend(t,{baselayer:"",oldGroup:"",layerProperties:{},groupProperties:{},rangeIsSupported:i.rangeIsSupported(),changeBaseLayer:function(e,n){i.safeApply(t,(function(n){n.baselayer=e,r.getMap().then((function(i){r.getLayers().then((function(r){if(!i.hasLayer(r.baselayers[e])){for(var o in n.layers.baselayers)n.layers.baselayers[o].icon=n.icons.unradio,i.hasLayer(r.baselayers[o])&&i.removeLayer(r.baselayers[o]);i.addLayer(r.baselayers[e]),n.layers.baselayers[e].icon=t.icons.radio}}))}))})),n.preventDefault()},moveLayer:function(e,n,r){var i=Object.keys(t.layers.baselayers).length;if(n>=1+i&&n<=t.overlaysArray.length+i){var o;for(var a in t.layers.overlays)if(t.layers.overlays[a].index===n){o=t.layers.overlays[a];break}o&&s(t,(function(){o.index=e.index,e.index=n}))}r.stopPropagation(),r.preventDefault()},initIndex:function(e,n){var r=Object.keys(t.layers.baselayers).length;e.index=l(e.index)?e.index:n+r+1},initGroup:function(e){t.groupProperties[e]=t.groupProperties[e]?t.groupProperties[e]:{}},toggleOpacity:function(e,n){if(n.visible){if(t.autoHideOpacity&&!t.layerProperties[n.name].opacityControl)for(var r in t.layerProperties)t.layerProperties[r].opacityControl=!1;t.layerProperties[n.name].opacityControl=!t.layerProperties[n.name].opacityControl}e.stopPropagation(),e.preventDefault()},toggleLegend:function(e){t.layerProperties[e.name].showLegend=!t.layerProperties[e.name].showLegend},showLegend:function(e){return e.legend&&t.layerProperties[e.name].showLegend},unsafeHTML:function(e){return a.trustAsHtml(e)},getOpacityIcon:function(e){return e.visible&&t.layerProperties[e.name].opacityControl?t.icons.close:t.icons.open},getGroupIcon:function(e){return e.visible?t.icons.check:t.icons.uncheck},changeGroupVisibility:function(e){if(l(t.groupProperties[e])){var n=t.groupProperties[e].visible;for(var r in t.layers.overlays){var i=t.layers.overlays[r];i.group===e&&(i.visible=n)}}}});var u=n.get(0);L.Browser.touch?L.DomEvent.on(u,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(u),L.DomEvent.on(u,"mousewheel",L.DomEvent.stopPropagation))}],template:'<div class="angular-leaflet-control-layers" ng-show="overlaysArray.length"><h4 ng-if="title">{{ title }}</h4><div class="lf-baselayers"><h5 class="lf-title" ng-if="baseTitle">{{ baseTitle }}</h5><div class="lf-row" ng-repeat="(key, layer) in baselayersArray"><label class="lf-icon-bl" ng-click="changeBaseLayer(key, $event)"><input class="leaflet-control-layers-selector" type="radio" name="lf-radio" ng-show="false" ng-checked="baselayer === key" ng-value="key" /> <i class="lf-icon lf-icon-radio" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label></div></div><div class="lf-overlays"><h5 class="lf-title" ng-if="overlaysTitle">{{ overlaysTitle }}</h5><div class="lf-container"><div class="lf-row" ng-repeat="layer in (o = (overlaysArray | orderBy:\'index\':order))" ng-init="initIndex(layer, $index)"><label class="lf-icon-ol-group" ng-if="showGroups &amp;&amp; layer.group &amp;&amp; layer.group != o[$index-1].group"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-change="changeGroupVisibility(layer.group)" ng-model="groupProperties[layer.group].visible"/> <i class="lf-icon lf-icon-check" ng-class="getGroupIcon(groupProperties[layer.group])"></i><div class="lf-text">{{ layer.group }}</div></label><label class="lf-icon-ol"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-model="layer.visible"/> <i class="lf-icon lf-icon-check" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label><div class="lf-icons"><i class="lf-icon lf-up" ng-class="icons.up" ng-click="moveLayer(layer, layer.index - orderNumber, $event)"></i> <i class="lf-icon lf-down" ng-class="icons.down" ng-click="moveLayer(layer, layer.index + orderNumber, $event)"></i> <i class="lf-icon lf-toggle-legend" ng-class="icons.toggleLegend" ng-if="layer.legend" ng-click="toggleLegend(layer)"></i> <i class="lf-icon lf-open" ng-class="getOpacityIcon(layer)" ng-click="toggleOpacity($event, layer)"></i></div><div class="lf-legend" ng-if="showLegend(layer)" ng-bind-html="unsafeHTML(layer.legend)"></div><div class="lf-opacity clearfix" ng-if="layer.visible &amp;&amp; layerProperties[layer.name].opacityControl"><label ng-if="rangeIsSupported" class="pull-left" style="width: 50%">0</label><label ng-if="rangeIsSupported" class="pull-left text-right" style="width: 50%">100</label><input ng-if="rangeIsSupported" class="clearfix" type="range" min="0" max="1" step="0.05" class="lf-opacity-control" ng-model="layerProperties[layer.name].layerOptions.opacity"/><h6 ng-if="!rangeIsSupported">Range is not supported in this browser</h6></div></div></div></div></div>',link:function(t,n,o,a){var s=i.isDefined,l=a.getLeafletScope(),u=l.layers;t.$watch("icons",(function(){var n={uncheck:"fa fa-square-o",check:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",unradio:"fa fa-circle-o",up:"fa fa-angle-up",down:"fa fa-angle-down",open:"fa fa-angle-double-down",close:"fa fa-angle-double-up",toggleLegend:"fa fa-pencil-square-o"};s(t.icons)?(e.extend(n,t.icons),e.extend(t.icons,n)):t.icons=n})),o.order=!s(o.order)||"normal"!==o.order&&"reverse"!==o.order?"normal":o.order,t.order="normal"===o.order,t.orderNumber="normal"===o.order?-1:1,t.layers=u,a.getMap().then((function(e){l.$watch("layers.baselayers",(function(n){var i={};r.getLayers().then((function(r){var o;for(o in n){var a=n[o];a.icon=t.icons[e.hasLayer(r.baselayers[o])?"radio":"unradio"],i[o]=a}t.baselayersArray=i}))})),l.$watch("layers.overlays",(function(e){var n=[],i={};r.getLayers().then((function(){var r;for(r in e){var o=e[r];o.icon=t.icons[o.visible?"check":"uncheck"],n.push(o),s(t.layerProperties[o.name])||(s(o.layerOptions.opacity)&&(o.layerOptions.opacity=1),t.layerProperties[o.name]={opacityControl:!1,showLegend:!0,layerOptions:o.layerOptions}),s(o.group)&&(s(t.groupProperties[o.group])||(t.groupProperties[o.group]={visible:!1}),i[o.group]=s(i[o.group])?i[o.group]:{count:0,visibles:0},i[o.group].count++,o.visible&&i[o.group].visibles++)}for(r in i)t.groupProperties[r].visible=i[r].visibles===i[r].count;t.overlaysArray=n}))}),!0)}))}}}]),e.module("ui-leaflet").directive("layers",["leafletLogger","$q","leafletData","leafletHelpers","leafletLayerHelpers","leafletControlHelpers",function(t,n,r,i,o,a){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:["$scope",function(e){e._leafletLayers=n.defer(),this.getLayers=function(){return e._leafletLayers.promise}}],link:function(t,n,s,l){var u=i.isDefined,c={},d=l.getLeafletScope(),h=d.layers,f=o.createLayer,p=o.safeAddLayer,m=o.safeRemoveLayer,g=o.changeOpacityListener,v=a.updateLayersControl,_=!1;t.$on("$destroy",(function(){a.destroyMapLayersControl(t.mapId)})),l.getMap().then((function(n){t._leafletLayers.resolve(c),r.setLayers(c,s.id),c.baselayers={},c.overlays={};var i=s.id,o=!1;for(var a in h.baselayers){var l=f(h.baselayers[a]);u(l)?(c.baselayers[a]=l,!0===h.baselayers[a].top&&(p(n,c.baselayers[a]),o=!0)):delete h.baselayers[a]}for(a in!o&&Object.keys(c.baselayers).length>0&&p(n,c.baselayers[Object.keys(h.baselayers)[0]]),h.overlays){h.overlays[a].type;var y=f(h.overlays[a]);u(y)?(c.overlays[a]=y,!0===h.overlays[a].visible&&p(n,c.overlays[a])):delete h.overlays[a]}d.$watch("layers.baselayers",(function(t,r){if(e.equals(t,r))return _=v(n,i,_,t,h.overlays,c),!0;for(var o in c.baselayers)u(t[o])&&!t[o].doRefresh||(n.hasLayer(c.baselayers[o])&&n.removeLayer(c.baselayers[o]),delete c.baselayers[o],t[o]&&t[o].doRefresh&&(t[o].doRefresh=!1));for(var a in t)if(u(c.baselayers[a]))!0!==t[a].top||n.hasLayer(c.baselayers[a])?!1===t[a].top&&n.hasLayer(c.baselayers[a])&&n.removeLayer(c.baselayers[a]):p(n,c.baselayers[a]);else{var s=f(t[a]);u(s)&&(c.baselayers[a]=s,!0===t[a].top&&p(n,c.baselayers[a]))}var l=!1;for(var d in c.baselayers)if(n.hasLayer(c.baselayers[d])){l=!0;break}!l&&Object.keys(c.baselayers).length>0&&p(n,c.baselayers[Object.keys(c.baselayers)[0]]),_=v(n,i,_,t,h.overlays,c)}),!0),d.$watch("layers.overlays",(function(t,r){if(e.equals(t,r))return _=v(n,i,_,h.baselayers,t,c),!0;for(var o in c.overlays)if(!u(t[o])||t[o].doRefresh){if(n.hasLayer(c.overlays[o])){var a=u(t[o])?t[o].layerOptions:null;m(n,c.overlays[o],a)}delete c.overlays[o],t[o]&&t[o].doRefresh&&(t[o].doRefresh=!1)}for(var s in t){if(u(c.overlays[s])){t[s].visible&&!n.hasLayer(c.overlays[s])?p(n,c.overlays[s]):!1===t[s].visible&&n.hasLayer(c.overlays[s])&&m(n,c.overlays[s],t[s].layerOptions);var l=c.overlays[s];n.hasLayer(c.overlays[s])&&(t[s].layerOptions.opacity!==r[s].layerOptions.opacity&&(u(l.setOpacity)&&l.setOpacity(t[s].layerOptions.opacity),u(l.getLayers)&&u(l.eachLayer)&&l.eachLayer(g(t[s].layerOptions.opacity))),u(t[s].index)&&l.setZIndex&&t[s].index!==r[s].index&&l.setZIndex(t[s].index))}else{var d=f(t[s]);if(!u(d))continue;c.overlays[s]=d,!0===t[s].visible&&p(n,c.overlays[s]),u(t[s].index)&&c.overlays[s].setZIndex&&c.overlays[s].setZIndex(t[s].index)}t[s].visible&&n._loaded&&t[s].data&&"heatmap"===t[s].type&&(c.overlays[s].setData(t[s].data),c.overlays[s].update())}_=v(n,i,_,h.baselayers,t,c)}),!0)}))}}}]),e.module("ui-leaflet").directive("legend",["leafletLogger","$http","$timeout","leafletHelpers","leafletLegendHelpers",function(e,t,n,r,i){var o=e,a=r.errorHeader+" [Legend] ";return{restrict:"A",scope:!1,replace:!1,require:"leaflet",transclude:!1,link:function(e,t,n,s){var l,u,c,d,h=r.isArray,f=r.isString,p=r.isDefined,m=r.isFunction,g=s.getLeafletScope(),v=g.legend;g.$watch("legend",(function(e){p(e)&&(l=e.legendClass?e.legendClass:"legend",u=e.position||"bottomright",d=e.type||"arcgis")}),!0);var _=function(e,t,n){t&&t.layers&&t.layers.length>0&&(p(c)?i.updateLegend(c.getContainer(),t,d,n):((c=L.control({position:u})).onAdd=i.getOnAddLegend(t,l,d,n),c.addTo(e)),p(v.loadedData)&&m(v.loadedData)&&v.loadedData())};s.getMap().then((function(e){g.$watch("legend",(function(t){return p(t)?p(t.url)||"arcgis"!==d||h(t.colors)&&h(t.labels)&&t.colors.length===t.labels.length?p(t.url)?void o.info(a+" loading legend service."):(p(c)&&(c.removeFrom(e),c=null),c=L.control({position:u}),"arcgis"===d&&(c.onAdd=i.getOnAddArrayLegend(t,l)),void c.addTo(e)):void o.warn(a+" legend.colors and legend.labels must be set."):void(p(c)&&(c.removeFrom(e),c=null))})),g.$watch("legend.url",(function(t){if(p(t)){if(!h(t)&&!f(t))return void o.warn(a+" legend.url must be an array or string.");for(var r,s=f(t)?[t]:t,l=function(n,i){return function(l){p(l.data.error)?o.warn(a+"Error loadin legend from: "+i,l.data.error.message):r&&r.layers&&r.layers.length>0?r.layers=r.layers.concat(l.data.layers):r=l.data,n===s.length-1&&_(e,r,t)}},u=function(e){o.warn(a+" legend.url not loaded.",e)},c=0;c<s.length;c++)i.addLegendURL(n.id,{url:s[c],method:"GET"}).then(l(c)).catch(u)}})),g.$watch("legend.legendData",(function(t){o.debug("legendData",t),!p(g.legend.url)&&p(t)&&_(e,t)}),!0)}))}}}]),e.module("ui-leaflet").directive("markers",["leafletLogger","$rootScope","$q","leafletData","leafletHelpers","leafletMapDefaults","leafletMarkersHelpers","leafletMarkerEvents","leafletIterators","leafletWatchHelpers","leafletDirectiveControlsHelpers",function(t,n,r,i,o,a,s,l,u,c,d){var h=o.isDefined,f=o.errorHeader,p=o,m=o.isString,g=s.addMarkerWatcher,v=s.updateMarker,_=s.listenMarkerEvents,y=s.addMarkerToGroup,b=s.createMarker,w=s.deleteMarker,M=s.getModelFromModels,k=s.getLayerModels,x=s.resetUnusedMarkerGroups,S=u,T=o.watchOptions,$=c.maybeWatch,D=d.extend,C=t,E={changeFromDirective:!1},A=function(e,t,n){if(Object.keys(e).length){if(n&&m(n)){if(!e[n]||!Object.keys(e[n]).length)return;return e[n][t]}return e[t]}},P=function(e,t,n,r){return r&&m(r)?(h(t[r])||(t[r]={}),t[r][n]=e):t[n]=e,e},Y=function(e,t,n,r,i,o){if(!m(e))return C.error(f+" A layername must be a string"),!1;if(!h(t))return C.error(f+" You must add layers to the directive if the markers are going to use this functionality."),!1;if(!h(t.overlays)||!h(t.overlays[e]))return C.error(f+' A marker can only be added to a layer of type "group"'),!1;var a=t.overlays[e];return a instanceof L.LayerGroup||a instanceof L.FeatureGroup?(a.addLayer(r),null===i&&o.hasLayer(r)&&!0===n.focus&&r.openPopup(),!0):(C.error(f+' Adding a marker to an overlay needs a overlay of the type "group" or "featureGroup"'),!1)},O=function(e,t,n,r,i,o,a,s,u,c){S.each(t,(function(t,d){if(!c[d]){if(-1!==d.search("-"))return void C.error('The marker can\'t use a "-" on his key name: "'+d+'".');var m=p.getObjectDotPath(u?[u,d]:[d]),w=A(o,d,u);p.modelChangeInDirective(E,"changeFromDirective",(function(){if(h(w)){var c=M(n,d,u);v(t,c,w,m,a,i,r)}else{var L=b(t),k=(t?t.layer:void 0)||u;if(!h(L))return void C.error(f+" Received invalid data on the marker "+d+".");if(P(L,o,d,u),h(t.message)&&L.bindPopup(t.message,t.popupOptions),h(t.group)){var x=h(t.groupOption)?t.groupOption:null;y(L,t.group,x,r)}if(p.LabelPlugin.isLoaded()&&h(t.label)&&h(t.label.message)&&L.bindLabel(t.label.message,t.label.options),h(t)&&(h(t.layer)||h(u))){if(!Y(k,i,t,L,s.individual.type,r))return}else h(t.group)||(r.addLayer(L),null===s.individual.type&&!0===t.focus&&L.openPopup());null!==s.individual.type&&g(L,m,a,i,r,s.individual),_(L,t,a,s.individual.type,r),l.bindEvents(e,L,m,t,a,k)}}))}}))},I=function(t,n,r,i,o){var a,s,l=!1,u=!1,c=h(n);for(var d in r)l||(C.debug(f+"[markers] destroy: "),l=!0),c&&(s=t[d],a=n[d],u=i&&e.equals(s,a)),h(t)&&Object.keys(t).length&&h(t[d])&&Object.keys(t[d]).length&&!u||o&&p.isFunction(o)&&o(s,a,d)},j=function(e,t,n,r,i){I(e,t,n,!1,(function(e,t,o){C.debug(f+"[marker] is deleting marker: "+o),w(n[o],r,i),delete n[o]}))},B=function(e,t,n){var r={};return I(e,t,n,!0,(function(e,t,n){C.debug(f+"[marker] is already rendered, marker: "+n),r[n]=e})),r};return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(e,t,n,o){var a=o[0],s=a.getLeafletScope();a.getMap().then((function(t){var a,l,u={};a=h(o[1])?o[1].getLayers:function(){var e=r.defer();return e.resolve(),e.promise},l=s.watchOptions&&s.watchOptions.markers?s.watchOptions.markers:T;var c=h(n.markersNested)&&p.isTruthy(n.markersNested);a().then((function(r){var o=function(e,n){return x(),c?void S.each(e,(function(e,i){var o=k(n,i);j(e,o,u[i],t,r)})):void j(e,n,u,t,r)},a=function(e,i){o(e,i);var a=null;return c?void S.each(e,(function(o,c){var d=k(i,c),h=k(e,c);a=B(h,d,u[c]),O(n.id,o,i,t,r,u,s,l,c,a)})):(a=B(e,i,u),void O(n.id,e,i,t,r,u,s,l,void 0,a))};D(n.id,"markers",a,o),i.setMarkers(u,n.id),$(s,"markers",l,(function(e,t){E.changeFromDirective||a(e,t)})),e.$on("$destroy",(function(){j(s.markers,{},u,t,r)}))}))}))}}}]),e.module("ui-leaflet").directive("maxbounds",["leafletLogger","leafletMapDefaults","leafletBoundsHelpers","leafletHelpers",function(e,t,n,r){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,t,i,o){var a=o.getLeafletScope(),s=n.isValidBounds,l=r.isNumber;o.getMap().then((function(e){a.$watch("maxbounds",(function(t){if(s(t)){var r=n.createLeafletBounds(t);l(t.pad)&&(r=r.pad(t.pad)),e.setMaxBounds(r),i.center||i.lfCenter||e.fitBounds(r)}else e.setMaxBounds()}))}))}}}]),e.module("ui-leaflet").directive("paths",["leafletLogger","$q","leafletData","leafletMapDefaults","leafletHelpers","leafletPathsHelpers","leafletPathEvents","leafletWatchHelpers",function(e,t,n,r,i,o,a,s){var l=e;return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(e,u,c,d){var h=d[0],f=i.isDefined,p=i.isString,m=h.getLeafletScope(),g=m.paths,v=o.createPath,_=a.bindPathEvents,y=o.setPathOptions,b=s.maybeWatch;h.getMap().then((function(e){var o,a,s=r.getDefaults(c.id);(o=f(d[1])?d[1].getLayers:function(){var e=t.defer();return e.resolve(),e.promise},f(g))&&(a=m.watchOptions&&m.watchOptions.paths?m.watchOptions.paths:{type:"watchCollection",individual:{type:"watchDeep"}},o().then((function(t){var r={};n.setPaths(r,c.id);var o=function(n,r,i){b(m,'paths["'+r+'"]',i,(function(r,i,o){if(!f(r)){if(f(i.layer))for(var a in t.overlays)t.overlays[a].removeLayer(n);return e.removeLayer(n),void o()}y(n,r.type,r)}))},u=function(n){for(var u in function(t){for(var n in r)f(t[n])||(e.removeLayer(r[n]),delete r[n])}(n),n)if(0!==u.search("\\$"))if(-1===u.search("-")){if(!f(r[u])){var d=n[u],h=v(u,n[u],s);if(f(h)&&f(d.message)&&h.bindPopup(d.message,d.popupOptions),i.LabelPlugin.isLoaded()&&f(d.label)&&f(d.label.message)&&h.bindLabel(d.label.message,d.label.options),f(d)&&f(d.layer)){if(!p(d.layer)){l.error("[AngularJS - Leaflet] A layername must be a string");continue}if(!f(t)){l.error("[AngularJS - Leaflet] You must add layers to the directive if the markers are going to use this functionality.");continue}if(!f(t.overlays)||!f(t.overlays[d.layer])){l.error('[AngularJS - Leaflet] A path can only be added to a layer of type "group"');continue}var g=t.overlays[d.layer];if(!(g instanceof L.LayerGroup||g instanceof L.FeatureGroup)){l.error('[AngularJS - Leaflet] Adding a path to an overlay needs a overlay of the type "group" or "featureGroup"');continue}r[u]=h,g.addLayer(h),null!==a.individual.type?o(h,u,a.individual):y(h,d.type,d)}else f(h)&&(r[u]=h,e.addLayer(h),null!==a.individual.type?o(h,u,a.individual):y(h,d.type,d));_(c.id,h,u,d,m)}}else l.error('[AngularJS - Leaflet] The path name "'+u+'" is not valid. It must not include "-" and a number.')};b(m,"paths",a,(function(e){u(e)}))})))}))}}}]),e.module("ui-leaflet").directive("tiles",["leafletLogger","leafletData","leafletMapDefaults","leafletHelpers",function(t,n,r,i){var o=t;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(t,a,s,l){var u=i.isDefined,c=l.getLeafletScope(),d=c.tiles;return u(d)&&u(d.url)?void l.getMap().then((function(t){var i,o=r.getDefaults(s.id);c.$watch("tiles",(function(r){var a=o.tileLayerOptions,l=o.tileLayer;return!u(r.url)&&u(i)?void t.removeLayer(i):u(i)?u(r.url)&&u(r.options)&&!e.equals(r.options,a)?(t.removeLayer(i),a=o.tileLayerOptions,e.copy(r.options,a),l=r.url,(i=L.tileLayer(l,a)).addTo(t),void n.setTiles(i,s.id)):void(u(r.url)&&i.setUrl(r.url)):(u(r.options)&&e.copy(r.options,a),u(r.url)&&(l=r.url),(i=L.tileLayer(l,a)).addTo(t),void n.setTiles(i,s.id))}),!0)})):void o.warn("[AngularJS - Leaflet] The 'tiles' definition doesn't have the 'url' property.")}}}]),e.module("ui-leaflet").directive("watchOptions",["$log","$rootScope","$q","leafletData","leafletHelpers",function(t,n,r,i,o){var a=o.isDefined,s=o.errorHeader,l=o.isObject,u=t;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(t,n,r,i){var o=i[0].getLeafletScope(),c=function(e){return"watch"===e||"watchCollection"===e||"watchDeep"===e||null===e};a(o.watchOptions)&&l(o.watchOptions)&&e.forEach(["markers","geojson","paths"],(function(e){a(o.watchOptions[e])&&(c(o.watchOptions[e].type)||u.error(s+" watchOptions."+e+".type is not a valid type."),a(o.watchOptions[e].individual)?c(o.watchOptions[e].individual.type)||u.error(s+" watchOptions."+e+".individual.type is not a valid type."):u.error(s+" watchOptions."+e+".type.individual must be defined."))}))}}}]),e.module("ui-leaflet").factory("leafletEventsHelpersFactory",["$rootScope","$q","leafletLogger","leafletHelpers",function(t,n,r,i){var o=i.safeApply,a=i.isDefined,s=i.isObject,l=i.isArray,u=i.errorHeader,c=r,d=function(e,t){this.rootBroadcastName=e,c.debug("leafletEventsHelpersFactory: lObjectType: "+t+"rootBroadcastName: "+e),this.lObjectType=t};return d.prototype.getAvailableEvents=function(){return[]},d.prototype.genDispatchEvent=function(e,t,n,r,i,o,a,s,l){var u=this;return(e=e||"")&&(e="."+e),function(d){var h=u.rootBroadcastName+e+"."+t;c.debug(h),u.fire(r,h,n,d,d.target||i,a,o,s,l)}},d.prototype.fire=function(n,r,i,s,l,u,c,d,h){o(n,(function(){var o={leafletEvent:s,leafletObject:l,modelName:c,model:u};a(d)&&e.extend(o,{layerName:d}),"emit"===i?n.$emit(r,o):t.$broadcast(r,o)}))},d.prototype.bindEvents=function(e,t,n,r,i,o,d){var h=[],f="emit",p=this;if(a(i.eventBroadcast))if(s(i.eventBroadcast))if(a(i.eventBroadcast[p.lObjectType]))if(s(i.eventBroadcast[p.lObjectType])){a(i.eventBroadcast[this.lObjectType].logic)&&"emit"!==i.eventBroadcast[p.lObjectType].logic&&"broadcast"!==i.eventBroadcast[p.lObjectType].logic&&c.warn(u+"Available event propagation logic are: 'emit' or 'broadcast'.");var m=!1,g=!1;a(i.eventBroadcast[p.lObjectType].enable)&&l(i.eventBroadcast[p.lObjectType].enable)&&(m=!0),a(i.eventBroadcast[p.lObjectType].disable)&&l(i.eventBroadcast[p.lObjectType].disable)&&(g=!0),m&&g?c.warn(u+"can not enable and disable events at the same time"):m||g?m?i.eventBroadcast[this.lObjectType].enable.forEach((function(e){-1!==h.indexOf(e)?c.warn(u+"This event "+e+" is already enabled"):-1===p.getAvailableEvents().indexOf(e)?c.warn(u+"This event "+e+" does not exist"):h.push(e)})):(h=this.getAvailableEvents(),i.eventBroadcast[p.lObjectType].disable.forEach((function(e){var t=h.indexOf(e);-1===t?c.warn(u+"This event "+e+" does not exist or has been already disabled"):h.splice(t,1)}))):c.warn(u+"must enable or disable events")}else c.warn(u+"event-broadcast."+[p.lObjectType]+" must be an object check your model.");else h=this.getAvailableEvents();else c.error(u+"event-broadcast must be an object check your model.");else h=this.getAvailableEvents();return h.forEach((function(a){t.on(a,p.genDispatchEvent(e,a,f,i,t,n,r,o,d))})),f},d}]).service("leafletEventsHelpers",["leafletEventsHelpersFactory",function(e){return new e}]),e.module("ui-leaflet").factory("leafletGeoJsonEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory","leafletData",function(e,t,n,r,i,o){var a=r.safeApply,s=i,l=function(){s.call(this,"leafletDirectiveGeoJson","geojson")};return(l.prototype=new s).genDispatchEvent=function(t,n,r,i,l,u,c,d,h){var f=s.prototype.genDispatchEvent.call(this,t,n,r,i,l,u,c,d),p=this;return function(t){"mouseout"===n&&(h.resetStyleOnMouseout&&o.getGeoJSON(h.mapId).then((function(e){(d?e[d]:e).resetStyle(t.target)})),a(i,(function(){e.$broadcast(p.rootBroadcastName+".mouseout",t)}))),f(t)}},l.prototype.getAvailableEvents=function(){return["click","dblclick","mouseover","mouseout"]},new l}]),e.module("ui-leaflet").factory("leafletLabelEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory",function(e,t,n,r,i){var o=r,a=i,s=function(){a.call(this,"leafletDirectiveLabel","markers")};return(s.prototype=new a).genDispatchEvent=function(e,t,n,r,i,o,s,l){var u=o.replace("markers.","");return a.prototype.genDispatchEvent.call(this,e,t,n,r,i,u,s,l)},s.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu"]},s.prototype.genEvents=function(e,t,n,r,i,a,s,l){var u=this,c=this.getAvailableEvents(),d=o.getObjectArrayPath("markers."+a);c.forEach((function(t){i.label.on(t,u.genDispatchEvent(e,t,n,r,i.label,d,s,l))}))},s.prototype.bindEvents=function(e,t,n,r,i,o){},new s}]),e.module("ui-leaflet").factory("leafletMapEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpers","leafletIterators",function(e,t,n,r,i,o){var a=r.isDefined,s=i.fire,l=function(e,t,r,i){return i&&(i+="."),function(o){var a="leafletDirectiveMap."+i+t;n.debug(a),s(e,a,r,o,o.target,e)}};return{getAvailableMapEvents:function(){return["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","contextmenu","focus","blur","preclick","load","unload","viewreset","movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoomanim","zoomend","zoomlevelschange","resize","autopanstart","layeradd","layerremove","baselayerchange","overlayadd","overlayremove","locationfound","locationerror","popupopen","popupclose","draw:created","draw:edited","draw:deleted","draw:drawstart","draw:drawstop","draw:editstart","draw:editstop","draw:deletestart","draw:deletestop"]},genDispatchMapEvent:l,notifyCenterChangedToBounds:function(e){e.$broadcast("boundsChanged")},notifyCenterUrlHashChanged:function(e,t,n,r){if(a(n.urlHashCenter)){var i=t.getCenter(),o=i.lat.toFixed(4)+":"+i.lng.toFixed(4)+":"+t.getZoom();a(r.c)&&r.c===o||e.$emit("centerUrlHash",o)}},addEvents:function(e,t,n,r,i,a){o.each(n,(function(n){var o={};o[r]=n,t||(t=e._container.id||""),e.on(n,l(i,n,a,t),o)}))}}}]),e.module("ui-leaflet").factory("leafletMarkerEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory","leafletLabelEvents",function(e,t,n,r,i,o){var a=r.safeApply,s=r.isDefined,l=r,u=o,c=i,d=function(){c.call(this,"leafletDirectiveMarker","markers")};return(d.prototype=new c).genDispatchEvent=function(t,n,r,i,o,s,l,u){var d=c.prototype.genDispatchEvent.call(this,t,n,r,i,o,s,l,u);return function(t){"click"===n?a(i,(function(){e.$broadcast("leafletDirectiveMarkersClick",s)})):"dragend"===n&&(a(i,(function(){l.lat=o.getLatLng().lat,l.lng=o.getLatLng().lng})),l.message&&!0===l.focus&&o.openPopup()),d(t)}},d.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","dragstart","drag","dragend","move","remove","popupopen","popupclose","touchend","touchstart","touchmove","touchcancel","touchleave"]},d.prototype.bindEvents=function(e,t,n,r,i,o){var a=c.prototype.bindEvents.call(this,e,t,n,r,i,o);l.LabelPlugin.isLoaded()&&s(t.label)&&u.genEvents(e,n,a,i,t,r,o)},new d}]);var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.module("ui-leaflet").factory("leafletPathEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletLabelEvents","leafletEventsHelpers",function(e,t,n,i,o,a){var s=i.isDefined,l=i.isObject,u=i,c=i.errorHeader,d=o,h=a.fire,f=n,p=function(e,t,n,r,i,o,a,s){return(e=e||"")&&(e="."+e),function(l){var u="leafletDirectivePath"+e+"."+t;f.debug(u),h(r,u,n,l,l.target||i,a,o,s)}},m=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"]};return{getAvailablePathEvents:m,bindPathEvents:function(e,t,n,i,o){var a,h,m=[],g="broadcast";if(s(o.eventBroadcast))if(l(o.eventBroadcast))if(s(o.eventBroadcast.path))if(l(o.eventBroadcast.paths))f.warn(c+"event-broadcast.path must be an object check your model.");else{void 0!==o.eventBroadcast.path.logic&&null!==o.eventBroadcast.path.logic&&("emit"!==o.eventBroadcast.path.logic&&"broadcast"!==o.eventBroadcast.path.logic?f.warn(c+"Available event propagation logic are: 'emit' or 'broadcast'."):"emit"===o.eventBroadcast.path.logic&&(g="emit"));var v=!1,_=!1;if(void 0!==o.eventBroadcast.path.enable&&null!==o.eventBroadcast.path.enable&&"object"===r(o.eventBroadcast.path.enable)&&(v=!0),void 0!==o.eventBroadcast.path.disable&&null!==o.eventBroadcast.path.disable&&"object"===r(o.eventBroadcast.path.disable)&&(_=!0),v&&_)f.warn(c+"can not enable and disable events at the same time");else if(v||_)if(v)for(a=0;a<o.eventBroadcast.path.enable.length;a++)h=o.eventBroadcast.path.enable[a],-1!==m.indexOf(h)?f.warn(c+"This event "+h+" is already enabled"):-1===["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"].indexOf(h)?f.warn(c+"This event "+h+" does not exist"):m.push(h);else for(m=["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"],a=0;a<o.eventBroadcast.path.disable.length;a++){h=o.eventBroadcast.path.disable[a];var y=m.indexOf(h);-1===y?f.warn(c+"This event "+h+" does not exist or has been already disabled"):m.splice(y,1)}else f.warn(c+"must enable or disable events")}else m=["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"];else f.error(c+"event-broadcast must be an object check your model.");else m=["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"];for(a=0;a<m.length;a++)h=m[a],t.on(h,p(e,h,g,o,m,n));u.LabelPlugin.isLoaded()&&s(t.label)&&d.genEvents(e,n,g,o,t,i)}}}])}(angular),function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters.hidden,.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper.hidden{visibility:hidden}.digit-keyboard{position:absolute;left:0;right:0;bottom:0;background:0 0;font-size:24px;z-index:5000}.digit-keyboard *{box-sizing:border-box}.digit-keyboard .digit-keyboard-row{display:flex;flex-direction:row;border-bottom:1px solid #333}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper{flex:1;text-align:center;position:relative;height:60px}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key{display:block;margin:0 auto;position:absolute;left:0;top:0;right:0;bottom:0;border-right:1px solid #333;border-left:1px solid #333;line-height:60px;-webkit-transition:background-color .1s linear;-moz-transition:background-color .1s linear;-o-transition:background-color .1s linear;-ms-transition:background-color .1s linear;transition:background-color .1s linear}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{font-size:1em;vertical-align:middle;display:inline-block;line-height:normal;text-align:center;margin-top:-.4em}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters{font-size:9.6px;line-height:9.6px;height:9.6px;margin-top:-.25em}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-action{position:absolute;left:0;top:0;right:0;bottom:0;line-height:60px;font-size:24px}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper:first-child .digit-keyboard-key{border-right:none}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper:last-child .digit-keyboard-key{border-left:none}.digit-keyboard .digit-keyboard-row:first-child{border-top:1px solid #333}.digit-keyboard .digit-keyboard-row:last-child{border:none}.digit-keyboard .digit-keyboard-row:last-child .digit-keyboard-key-wrapper .digit-keyboard-key{border-bottom:1px solid #333}.digit-keyboard.align-center{margin:0 auto}.digit-keyboard.align-left{margin-right:auto}.digit-keyboard.align-right{margin-left:auto}.digit-keyboard.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{margin-top:-.3em}.digit-keyboard.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters{display:none}.digit-keyboard.round-buttons .digit-keyboard-row{border:none}.digit-keyboard.round-buttons .digit-keyboard-row .digit-keyboard-key-wrapper{margin:10px 0 0}.digit-keyboard.round-buttons .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key{width:60px;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;border:1px solid #333}.digit-keyboard.round-buttons .digit-keyboard-row:last-child .digit-keyboard-key-wrapper{margin-bottom:10px}.digit-keyboard.round-buttons.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{height:57.6px;line-height:57.6px}.digit-keyboard.keyboard-light *{border-color:#e6e6e6!important}.digit-keyboard.keyboard-light .digit-keyboard-key{background:#fff;color:#444}.digit-keyboard.keyboard-light .digit-keyboard-key.activated{background:#e6e6e6}.digit-keyboard.keyboard-stable *{border-color:#dfdfdf!important}.digit-keyboard.keyboard-stable .digit-keyboard-key{background:#f8f8f8;color:#444}.digit-keyboard.keyboard-stable .digit-keyboard-key.activated{background:#dfdfdf}.digit-keyboard.keyboard-positive *{border-color:#0c60ee!important}.digit-keyboard.keyboard-positive .digit-keyboard-key{background:#387ef5;color:#fff}.digit-keyboard.keyboard-positive .digit-keyboard-key.activated{background:#0c60ee}.digit-keyboard.keyboard-calm *{border-color:#0a9dc7!important}.digit-keyboard.keyboard-calm .digit-keyboard-key{background:#11c1f3;color:#fff}.digit-keyboard.keyboard-calm .digit-keyboard-key.activated{background:#0a9dc7}.digit-keyboard.keyboard-balanced *{border-color:#28a54c!important}.digit-keyboard.keyboard-balanced .digit-keyboard-key{background:#33cd5f;color:#fff}.digit-keyboard.keyboard-balanced .digit-keyboard-key.activated{background:#28a54c}.digit-keyboard.keyboard-energized *{border-color:#e6b500!important}.digit-keyboard.keyboard-energized .digit-keyboard-key{background:#ffc900;color:#fff}.digit-keyboard.keyboard-energized .digit-keyboard-key.activated{background:#e6b500}.digit-keyboard.keyboard-assertive *{border-color:#e42112!important}.digit-keyboard.keyboard-assertive .digit-keyboard-key{background:#ef473a;color:#fff}.digit-keyboard.keyboard-assertive .digit-keyboard-key.activated{background:#e42112}.digit-keyboard.keyboard-royal *{border-color:#6b46e5!important}.digit-keyboard.keyboard-royal .digit-keyboard-key{background:#886aea;color:#fff}.digit-keyboard.keyboard-royal .digit-keyboard-key.activated{background:#6b46e5}.digit-keyboard.keyboard-dark *{border-color:#2b2b2b!important}.digit-keyboard.keyboard-dark .digit-keyboard-key{background:#444;color:#fff}.digit-keyboard.keyboard-dark .digit-keyboard-key.activated{background:#2b2b2b}.digit-keyboard.keyboard-opaque-black *{border-color:rgba(0,0,0,.75)!important}.digit-keyboard.keyboard-opaque-black .digit-keyboard-key{background:rgba(0,0,0,.15);color:rgba(0,0,0,.75)}.digit-keyboard.keyboard-opaque-black .digit-keyboard-key.activated{background:rgba(0,0,0,.25)}.digit-keyboard.keyboard-opaque-white *{border-color:rgba(255,255,255,.75)!important}.digit-keyboard.keyboard-opaque-white .digit-keyboard-key{background:rgba(255,255,255,.15);color:rgba(255,255,255,.75)}.digit-keyboard.keyboard-opaque-white .digit-keyboard-key.activated{background:rgba(255,255,255,.25)}.digit-keyboard.animation-slide-up{-webkit-transition:transform linear 150ms;transition:transform linear 150ms;transform:translate3d(0,0,0)}.digit-keyboard.animation-slide-up.ng-hide{transform:translate3d(0,100%,0)}.digit-keyboard.animation-pop{-webkit-transition:transform linear 150ms;transition:transform linear 150ms;transform:scale3d(1,1,1)}.digit-keyboard.animation-pop.ng-hide{transform:scale3d(0,0,1)}"),function(e){try{e=angular.module("ion-digit-keyboard.templates")}catch(t){e=angular.module("ion-digit-keyboard.templates",[])}e.run(["$templateCache",function(e){e.put("keyboard.tpl.html","<div class=\"digit-keyboard align-{{align}} keyboard-{{theme}} animation-{{animation}} {{roundButtons ? 'round-buttons' : ''}} {{showLetters == false ? 'no-letters' : ''}} {{(ngShow == false || ngHide == true) ? 'ng-hide' : ''}}\" style=\"width: {{width}};\"><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(1)><div class=digit-keyboard-key-number>1<div class=digit-keyboard-key-letters></div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(2)><div class=digit-keyboard-key-number>2<div class=digit-keyboard-key-letters>ABC</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(3)><div class=digit-keyboard-key-number>3<div class=digit-keyboard-key-letters>DEF</div></div></div></div></div><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(4)><div class=digit-keyboard-key-number>4<div class=digit-keyboard-key-letters>GHI</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(5)><div class=digit-keyboard-key-number>5<div class=digit-keyboard-key-letters>JKL</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(6)><div class=digit-keyboard-key-number>6<div class=digit-keyboard-key-letters>MNO</div></div></div></div></div><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(7)><div class=digit-keyboard-key-number>7<div class=digit-keyboard-key-letters>PQRS</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(8)><div class=digit-keyboard-key-number>8<div class=digit-keyboard-key-letters>TUV</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(9)><div class=digit-keyboard-key-number>9<div class=digit-keyboard-key-letters>WXYZ</div></div></div></div></div><div class=digit-keyboard-row><div class=\"digit-keyboard-key-wrapper {{showLeftAction == false ? 'hidden' : ''}}\"><div class=digit-keyboard-key ng-click=leftAction($event) style={{leftStyle}}><div class=digit-keyboard-key-action ng-bind-html=leftHtml style={{leftFontSize}}></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(0)><div class=digit-keyboard-key-number style=\"margin-top: -0.30em;\">0</div></div></div><div class=\"digit-keyboard-key-wrapper {{showRightAction == false ? 'hidden' : ''}}\"><div class=digit-keyboard-key ng-click=rightAction($event) style={{rightStyle}}><div class=digit-keyboard-key-action ng-bind-html=rightHtml style={{rightFontSize}}></div></div></div></div></div>")}])}(),angular.module("ion-digit-keyboard.directive",[]).directive("ionDigitKeyboard",["$timeout","$ionicScrollDelegate","$templateCache",function(e,t,n){var r=150;return{restrict:"EA",template:n.get("keyboard.tpl.html"),replace:!0,scope:{settings:"=settings",ngShow:"=",ngHide:"="},link:function(n,i,o){function a(){1==c&&(l.style.bottom="0px",l.style.height=u)}function s(){e((function(){if(1==c){var e=i[0].offsetHeight;u=l.style.height,l.style.height="auto",l.style.bottom=e+1+"px"}}),r+10)}void 0===n.settings&&(n.settings={});var l,u,c=!0,d="ion-content",h={},f={};n.leftStyle="",n.rightStyle="",n.leftFontSize="",n.rightFontSize="",n.showLetters=void 0!==n.settings.showLetters&&n.settings.showLetters,n.roundButtons=void 0!==n.settings.roundButtons&&n.settings.roundButtons,n.numberAction=n.settings.action||function(){},n.width=n.settings.width||"100%",n.align=n.settings.align||"center",n.animation=n.settings.animation||"slide-up",n.theme=n.settings.theme||"stable",void 0!==n.settings.leftButton&&"object"==typeof n.settings.leftButton.style&&(void 0!==n.settings.leftButton.style.color&&(n.leftStyle+="color: "+n.settings.leftButton.style.color+";"),void 0!==n.settings.leftButton.style.bgColor&&(h.default=n.settings.leftButton.style.bgColor,n.leftStyle+="background-color: "+h.default+";"),void 0!==n.settings.leftButton.style.activeBgColor&&(h.active=n.settings.leftButton.style.activeBgColor),void 0!==n.settings.leftButton.style.borderColor&&(n.leftStyle+="border-color: "+n.settings.leftButton.style.borderColor+" !important;"),void 0!==n.settings.leftButton.style.fontSize&&(n.leftFontSize="font-size: "+n.settings.leftButton.style.fontSize+" !important;")),void 0!==n.settings.rightButton&&"object"==typeof n.settings.rightButton.style&&(void 0!==n.settings.rightButton.style.color&&(n.rightStyle+="color: "+n.settings.rightButton.style.color+";"),void 0!==n.settings.rightButton.style.bgColor&&(f.default=n.settings.rightButton.style.bgColor,n.rightStyle+="background-color: "+f.default+";"),void 0!==n.settings.rightButton.style.activeBgColor&&(f.active=n.settings.rightButton.style.activeBgColor),void 0!==n.settings.rightButton.style.borderColor&&(n.rightStyle+="border-color: "+n.settings.rightButton.style.borderColor+" !important;"),void 0!==n.settings.rightButton.style.fontSize&&(n.rightFontSize="font-size: "+n.settings.rightButton.style.fontSize+" !important;")),n.showLeftAction=!1,void 0!==n.settings.leftButton&&(n.leftHtml=n.settings.leftButton.html,n.showLeftAction=!0,n.leftAction=function(e){if(h.active){var t=e.target;"I"==t.tagName?t=t.parentNode.parentNode:t.className.indexOf("digit-keyboard-key-action")>-1&&(t=t.parentNode),void 0===h.default&&(h.default=t.style.backgroundColor),t.style.backgroundColor=h.active,setTimeout((function(){t.style.backgroundColor=h.default}),100)}n.settings.leftButton.action()}),n.showRightAction=!1,void 0!==n.settings.rightButton&&(n.rightHtml=n.settings.rightButton.html,n.showRightAction=!0,n.rightAction=function(e){if(f.active){var t=e.target;"I"==t.tagName?t=t.parentNode.parentNode:t.className.indexOf("digit-keyboard-key-action")>-1&&(t=t.parentNode),void 0===f.default&&(f.default=t.style.backgroundColor),t.style.backgroundColor=f.active,setTimeout((function(){t.style.backgroundColor=f.default}),100)}n.settings.rightButton.action()}),("object"==typeof n.settings.resizeContent||"boolean"==typeof n.settings.resizeContent)&&("object"==typeof n.settings.resizeContent?(c=void 0===n.settings.resizeContent.enable||n.settings.resizeContent.enable,d=void 0===n.settings.resizeContent.element?"ion-content":n.settings.resizeContent.element):"boolean"==typeof n.settings.resizeContent&&(c=n.settings.resizeContent)),l=i[0].parentElement.querySelectorAll(d)[0],n.$watch("ngShow",(function(){!0===n.ngShow?s():!1===n.ngShow&&a(),t.resize()})),n.$watch("ngHide",(function(){!0===n.ngHide?a():!1===n.ngHide&&s(),t.resize()}))}}}]),angular.module("ion-digit-keyboard",["ionic","ion-digit-keyboard.templates","ion-digit-keyboard.directive"]),function(e){"use strict";if("object"==typeof exports)module.exports=e("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],e);else{if("undefined"==typeof angular)throw new Error("AngularJS framework needs to be included, see https://angularjs.org/");if("undefined"==typeof Chart)throw new Error("Chart.js library needs to be included, see http://jtblin.github.io/angular-chart.js/");e(angular,Chart)}}((function(e,t){"use strict";t.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",t.defaults.global.tooltips.mode="label",t.defaults.global.elements.line.borderWidth=2,t.defaults.global.elements.rectangle.borderWidth=2,t.defaults.global.legend.display=!1,t.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var n="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return n&&(t.defaults.global.animation=!1),e.module("chart.js",[]).provider("ChartJs",(function(){var n={responsive:!0},r={Chart:t,getOptions:function(t){var r=t&&n[t]||{};return e.extend({},n,r)}};this.setOptions=function(t,i){i?n[t]=e.merge(n[t]||{},i):(i=t,n=e.merge(n,i)),e.merge(r.Chart.defaults,n)},this.$get=function(){return r}})).factory("ChartJsFactory",["ChartJs","$timeout",function(r,i){function o(e,t,n){var i=v(e,t);if(function(e){return e.chartData&&e.chartData.length}(t)&&b(e,t,n,i)){var o=n[0],a=o.getContext("2d");t.chartGetColor=function(e){return"function"==typeof e.chartGetColor?e.chartGetColor:d}(t);var s=function(e,t){var n=u(e,t);return Array.isArray(t.chartData[0])?m(t.chartLabels,t.chartData,t.chartSeries||[],n,t.chartDatasetOverride):g(t.chartLabels,t.chartData,n,t.chartDatasetOverride)}(e,t);w(t),t.chart=new r.Chart(a,{type:e,data:s,options:i}),t.$emit("chart-create",t.chart),_(o,t)}}function a(e,t){return!!(e&&t&&e.length&&t.length)&&(Array.isArray(e[0])?e.length===t.length&&e.every((function(e,n){return e.length===t[n].length})):t.reduce(s,0)>0&&e.length===t.length)}function s(e,t){return e+t}function l(t,n,r){var i={point:void 0,points:void 0};return function(o){var a=t.chart.getElementAtEvent||t.chart.getPointAtEvent,s=t.chart.getElementsAtEvent||t.chart.getPointsAtEvent;if(s){var l=s.call(t.chart,o),u=a?a.call(t.chart,o)[0]:void 0;!1!==r&&(e.equals(i.points,l)||e.equals(i.point,u))||(i.point=u,i.points=l,t[n](l,o,u))}}}function u(n,i){for(var o=e.copy(i.chartColors||r.getOptions(n).chartColors||t.defaults.global.colors),a=o.length<i.chartData.length;o.length<i.chartData.length;)o.push(i.chartGetColor());return a&&(i.chartColors=o),o.map(c)}function c(e){return"string"==typeof e&&"r"===e[0]?h(function(e){var t=e.match(/^rgba?\(([\d,.]+)\)$/);if(!t)throw new Error("Cannot parse rgb value");return(e=t[1].split(",")).map(Number)}(e)):"string"==typeof e&&"#"===e[0]?h(function(e){var t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]}(e.substr(1))):"object"==typeof e&&null!==e?e:d()}function d(){return h([f(0,255),f(0,255),f(0,255)])}function h(e){var t=e[3]||1;return{backgroundColor:p(e=e.slice(0,3),.2),pointBackgroundColor:p(e,t),pointHoverBackgroundColor:p(e,.8),borderColor:p(e,t),pointBorderColor:"#fff",pointHoverBorderColor:p(e,t)}}function f(e,t){return Math.floor(Math.random()*(t-e+1))+e}function p(e,t){return n?"rgb("+e.join(",")+")":"rgba("+e.concat(t).join(",")+")"}function m(t,n,r,i,o){return{labels:t,datasets:n.map((function(t,n){var a=e.extend({},i[n],{label:r[n],data:t});return o&&o.length>=n&&e.merge(a,o[n]),a}))}}function g(t,n,r,i){var o={labels:t,datasets:[{data:n,backgroundColor:r.map((function(e){return e.pointBackgroundColor})),hoverBackgroundColor:r.map((function(e){return e.backgroundColor}))}]};return i&&e.merge(o.datasets[0],i),o}function v(t,n){return e.extend({},r.getOptions(t),n.chartOptions)}function _(t,n){t.onclick=n.chartClick?l(n,"chartClick",!1):e.noop,t.onmousemove=n.chartHover?l(n,"chartHover",!0):e.noop}function y(e){return!e||Array.isArray(e)&&!e.length||"object"==typeof e&&!Object.keys(e).length}function b(e,t,n,r){return!r.responsive||0!==n[0].clientHeight||(i((function(){o(e,t,n)}),50,!1),!1)}function w(e){e.chart&&(e.chart.destroy(),e.$emit("chart-destroy",e.chart))}return function(t){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartDatasetOverride:"=?"},link:function(r,i){function s(n,a){if(!y(n)&&!e.equals(n,a)){var s=t||r.chartType;s&&o(s,r,i)}}n&&window.G_vmlCanvasManager.initElement(i[0]),r.$watch("chartData",(function(e,n){if(e&&e.length&&(!Array.isArray(e[0])||e[0].length)){var s=t||r.chartType;return s?r.chart&&a(e,n)?function(e,t){Array.isArray(t.chartData[0])?t.chart.data.datasets.forEach((function(t,n){t.data=e[n]})):t.chart.data.datasets[0].data=e,t.chart.update(),t.$emit("chart-update",t.chart)}(e,r):void o(s,r,i):void 0}w(r)}),!0),r.$watch("chartSeries",s,!0),r.$watch("chartLabels",s,!0),r.$watch("chartOptions",s,!0),r.$watch("chartColors",s,!0),r.$watch("chartDatasetOverride",s,!0),r.$watch("chartType",(function(t,n){y(t)||e.equals(t,n)||o(t,r,i)}),!1),r.$on("$destroy",(function(){w(r)})),r.$on("$resize",(function(){r.chart&&r.chart.resize()}))}}}}]).directive("chartBase",["ChartJsFactory",function(e){return new e}]).directive("chartLine",["ChartJsFactory",function(e){return new e("line")}]).directive("chartBar",["ChartJsFactory",function(e){return new e("bar")}]).directive("chartHorizontalBar",["ChartJsFactory",function(e){return new e("horizontalBar")}]).directive("chartRadar",["ChartJsFactory",function(e){return new e("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(e){return new e("doughnut")}]).directive("chartPie",["ChartJsFactory",function(e){return new e("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(e){return new e("polarArea")}]).directive("chartBubble",["ChartJsFactory",function(e){return new e("bubble")}]).name})),function(e){var t=function(e){var t=e.module("FBAngular",[]);return t.factory("Fullscreen",["$document","$rootScope",function(t,n){var r=t[0],i=n.$new();t.on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",(function(){i.$emit("FBFullscreen.change",o.isEnabled())}));var o={$on:e.bind(i,i.$on),all:function(e){o.enable(r.documentElement,e)},enable:function(e,t){e.requestFullScreen?e.requestFullScreen(t):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},cancel:function(){r.cancelFullScreen?r.cancelFullScreen():r.mozCancelFullScreen?r.mozCancelFullScreen():r.webkitExitFullscreen?r.webkitExitFullscreen():r.msExitFullscreen&&r.msExitFullscreen()},isEnabled:function(){return!!(r.fullscreenElement||r.mozFullScreenElement||r.webkitFullscreenElement||r.msFullscreenElement)},toggleAll:function(){o.isEnabled()?o.cancel():o.all()},isSupported:function(){var e=r.documentElement;return!!(e.requestFullScreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen)}};return o}]),t.directive("fullscreen",["Fullscreen",function(e){return{link:function(t,n,r){if(r.fullscreen){t.$watch(r.fullscreen,(function(t){var r=e.isEnabled();t&&!r?(e.enable(n[0]),n.addClass("isInFullScreen")):!t&&r&&(e.cancel(),n.removeClass("isInFullScreen"))}));var i=e.$on("FBFullscreen.change",(function(e,i){i||t.$evalAsync((function(){t.$eval(r.fullscreen+"= false"),n.removeClass("isInFullScreen")}))}));t.$on("$destroy",(function(){i()}))}else{if(void 0!==r.onlyWatchedProperty)return;n.on("click",(function(t){e.enable(n[0])}))}}}}]),t};"function"==typeof define&&define.amd?define("FBAngular",["angular"],(function(e){return t(e)})):"undefined"!=typeof module&&module.exports?module.exports=t(e.angular).name:t(e.angular)}(window),function(){var Base58=("undefined"!=typeof module&&null!==module?module.exports:void 0)||(window.Base58={});Base58.alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Base58.alphabetMap={};for(var e=0;e<Base58.alphabet.length;e++)Base58.alphabetMap[Base58.alphabet.charAt(e)]=e;Base58.encode=function(t){var n,r,i;if(0===t.length)return"";for(e=void 0,i=void 0,r=[0],e=0;e<t.length;){for(i=0;i<r.length;)r[i]<<=8,i++;for(r[0]+=t[e],n=0,i=0;i<r.length;)r[i]+=n,n=r[i]/58|0,r[i]%=58,++i;for(;n;)r.push(n%58),n=n/58|0;e++}for(e=0;0===t[e]&&e<t.length-1;)r.push(0),e++;return r.reverse().map((function(e){return Base58.alphabet[e]})).join("")},Base58.decode=function(t){var n,r,i,o;if(0===t.length)return"undefined"!=typeof Uint8Array&&null!==Uint8Array?new Uint8Array(0):new Buffer(0);for(e=void 0,o=void 0,n=[0],e=0;e<t.length;){if(!((r=t[e])in Base58.alphabetMap))throw"Base58.decode received unacceptable input. Character '"+r+"' is not in the Base58 alphabet.";for(o=0;o<n.length;)n[o]*=58,o++;for(n[0]+=Base58.alphabetMap[r],i=0,o=0;o<n.length;)n[o]+=i,i=n[o]>>8,n[o]&=255,++o;for(;i;)n.push(255&i),i>>=8;e++}for(e=0;"1"===t[e]&&e<t.length-1;)n.push(0),e++;return"undefined"!=typeof Uint8Array&&null!==Uint8Array?new Uint8Array(n.reverse()):new Buffer(n.reverse())}}.call(this),function(){"use strict";function e(e,t){t?(d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}var t="object"==typeof window?window:{},n=!t.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;n&&(t=global);var r=!t.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,i="function"==typeof define&&define.amd,o="undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),s=[-2147483648,8388608,32768,128],l=[24,16,8,0],u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],c=["hex","array","digest","arrayBuffer"],d=[],h=function(t,n){return function(r){return new e(n,!0).update(r)[t]()}},f=function(t){var r=h("hex",t);n&&(r=p(r,t)),r.create=function(){return new e(t)},r.update=function(e){return r.create().update(e)};for(var i=0;i<c.length;++i){var o=c[i];r[o]=h(o,t)}return r},p=function(e,t){var n=require("crypto"),r=require("buffer").Buffer,i=t?"sha224":"sha256";return function(t){if("string"==typeof t)return n.createHash(i).update(t,"utf8").digest("hex");if(o&&t instanceof ArrayBuffer)t=new Uint8Array(t);else if(void 0===t.length)return e(t);return n.createHash(i).update(new r(t)).digest("hex")}};e.prototype.update=function(e){if(!this.finalized){var n="string"!=typeof e;n&&o&&e instanceof t.ArrayBuffer&&(e=new Uint8Array(e));for(var r,i,a=0,s=e.length||0,u=this.blocks;s>a;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),n)for(i=this.start;s>a&&64>i;++a)u[i>>2]|=e[a]<<l[3&i++];else for(i=this.start;s>a&&64>i;++a)128>(r=e.charCodeAt(a))?u[i>>2]|=r<<l[3&i++]:2048>r?(u[i>>2]|=(192|r>>6)<<l[3&i++],u[i>>2]|=(128|63&r)<<l[3&i++]):55296>r||r>=57344?(u[i>>2]|=(224|r>>12)<<l[3&i++],u[i>>2]|=(128|r>>6&63)<<l[3&i++],u[i>>2]|=(128|63&r)<<l[3&i++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++a)),u[i>>2]|=(240|r>>18)<<l[3&i++],u[i>>2]|=(128|r>>12&63)<<l[3&i++],u[i>>2]|=(128|r>>6&63)<<l[3&i++],u[i>>2]|=(128|63&r)<<l[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this}},e.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=s[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[15]=this.bytes<<3,this.hash()}},e.prototype.hash=function(){var e,t,n,r,i,o,a,s,l,c=this.h0,d=this.h1,h=this.h2,f=this.h3,p=this.h4,m=this.h5,g=this.h6,v=this.h7,_=this.blocks;for(e=16;64>e;++e)t=((i=_[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=_[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,_[e]=_[e-16]+t+_[e-7]+n<<0;for(l=d&h,e=0;64>e;e+=4)this.first?(this.is224?(o=300032,v=(i=_[0]-1413257819)-150054599<<0,f=i+24177077<<0):(o=704751109,v=(i=_[0]-210244248)-1521486534<<0,f=i+143694565<<0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&d)^c&h^l,v=f+(i=v+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&m^~p&g)+u[e]+_[e])<<0,f=i+(t+r)<<0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(a=f&c)^f&d^o,g=h+(i=g+(n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&p^~v&m)+u[e+1]+_[e+1])<<0,t=((h=i+(t+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(s=h&f)^h&c^a,m=d+(i=m+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&v^~g&p)+u[e+2]+_[e+2])<<0,t=((d=i+(t+r)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(l=d&h)^d&f^s,p=c+(i=p+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&g^~m&v)+u[e+3]+_[e+3])<<0,c=i+(t+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+d<<0,this.h2=this.h2+h<<0,this.h3=this.h3+f<<0,this.h4=this.h4+p<<0,this.h5=this.h5+m<<0,this.h6=this.h6+g<<0,this.h7=this.h7+v<<0},e.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,l=this.h7,u=a[e>>28&15]+a[e>>24&15]+a[e>>20&15]+a[e>>16&15]+a[e>>12&15]+a[e>>8&15]+a[e>>4&15]+a[15&e]+a[t>>28&15]+a[t>>24&15]+a[t>>20&15]+a[t>>16&15]+a[t>>12&15]+a[t>>8&15]+a[t>>4&15]+a[15&t]+a[n>>28&15]+a[n>>24&15]+a[n>>20&15]+a[n>>16&15]+a[n>>12&15]+a[n>>8&15]+a[n>>4&15]+a[15&n]+a[r>>28&15]+a[r>>24&15]+a[r>>20&15]+a[r>>16&15]+a[r>>12&15]+a[r>>8&15]+a[r>>4&15]+a[15&r]+a[i>>28&15]+a[i>>24&15]+a[i>>20&15]+a[i>>16&15]+a[i>>12&15]+a[i>>8&15]+a[i>>4&15]+a[15&i]+a[o>>28&15]+a[o>>24&15]+a[o>>20&15]+a[o>>16&15]+a[o>>12&15]+a[o>>8&15]+a[o>>4&15]+a[15&o]+a[s>>28&15]+a[s>>24&15]+a[s>>20&15]+a[s>>16&15]+a[s>>12&15]+a[s>>8&15]+a[s>>4&15]+a[15&s];return this.is224||(u+=a[l>>28&15]+a[l>>24&15]+a[l>>20&15]+a[l>>16&15]+a[l>>12&15]+a[l>>8&15]+a[l>>4&15]+a[15&l]),u},e.prototype.toString=e.prototype.hex,e.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,a=this.h6,s=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,a>>24&255,a>>16&255,a>>8&255,255&a];return this.is224||l.push(s>>24&255,s>>16&255,s>>8&255,255&s),l},e.prototype.array=e.prototype.digest,e.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};var m=f();m.sha256=m,m.sha224=f(!0),r?module.exports=m:(t.sha256=m.sha256,t.sha224=m.sha224,i&&define((function(){return m})))}(),angular.module("ngCordova",["ngCordova.plugins"]),angular.module("ngCordova.plugins.3dtouch",[]).factory("$cordova3DTouch",["$q",function(e){var t=[],n={},r=function(e){return function(t){for(var n in e)t.type===n&&e[n]()}};return{isAvailable:function(){var t=e.defer();return window.cordova?window.ThreeDeeTouch?window.ThreeDeeTouch.isAvailable((function(e){t.resolve(e)}),(function(e){t.reject(e)})):t.reject("Could not find 3D touch plugin"):t.reject("Not supported in browser"),t.promise},addQuickAction:function(i,o,a,s,l,u){var c=e.defer(),d={type:i,title:o,subtitle:l};return a&&(d.iconType=a),s&&(d.iconTemplate=s),this.isAvailable().then((function(){t.push(d),n[i]=u,window.ThreeDeeTouch.configureQuickActions(t),window.ThreeDeeTouch.onHomeIconPressed=r(n),c.resolve(t)}),(function(e){c.reject(e)})),c.promise},addQuickActionHandler:function(t,i){var o=e.defer();return this.isAvailable().then((function(){n[t]=i,window.ThreeDeeTouch.onHomeIconPressed=r(n),o.resolve(!0)}),(function(e){o.reject(e)})),o.promise},enableLinkPreview:function(){var t=e.defer();return this.isAvailable().then((function(){window.ThreeDeeTouch.enableLinkPreview(),t.resolve(!0)}),(function(e){t.reject(e)})),t.promise},addForceTouchHandler:function(t){var n=e.defer();return this.isAvailable().then((function(){window.ThreeDeeTouch.watchForceTouches(t),n.resolve(!0)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.actionSheet",[]).factory("$cordovaActionSheet",["$q","$window",function(e,t){return{show:function(n){var r=e.defer();return t.plugins.actionsheet.show(n,(function(e){r.resolve(e)})),r.promise},hide:function(){return t.plugins.actionsheet.hide()}}}]),angular.module("ngCordova.plugins.adMob",[]).factory("$cordovaAdMob",["$q","$window",function(e,t){return{createBannerView:function(n){var r=e.defer();return t.plugins.AdMob.createBannerView(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createInterstitialView:function(n){var r=e.defer();return t.plugins.AdMob.createInterstitialView(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},requestAd:function(n){var r=e.defer();return t.plugins.AdMob.requestAd(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showAd:function(n){var r=e.defer();return t.plugins.AdMob.showAd(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},requestInterstitialAd:function(n){var r=e.defer();return t.plugins.AdMob.requestInterstitialAd(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise}}}]),angular.module("ngCordova.plugins.appAvailability",[]).factory("$cordovaAppAvailability",["$q",function(e){return{check:function(t){var n=e.defer();return appAvailability.check(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.appRate",[]).provider("$cordovaAppRate",[function(){this.setPreferences=function(e){e&&angular.isObject(e)&&(AppRate.preferences.useLanguage=e.language||null,AppRate.preferences.displayAppName=e.appName||"",AppRate.preferences.promptAgainForEachNewVersion=e.promptForNewVersion||!0,AppRate.preferences.openStoreInApp=e.openStoreInApp||!1,AppRate.preferences.usesUntilPrompt=e.usesUntilPrompt||3,AppRate.preferences.useCustomRateDialog=e.useCustomRateDialog||!1,AppRate.preferences.storeAppURL.ios=e.iosURL||null,AppRate.preferences.storeAppURL.android=e.androidURL||null,AppRate.preferences.storeAppURL.blackberry=e.blackberryURL||null,AppRate.preferences.storeAppURL.windows8=e.windowsURL||null)},this.setCustomLocale=function(e){var t={title:"Rate %@",message:"If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",cancelButtonLabel:"No, Thanks",laterButtonLabel:"Remind Me Later",rateButtonLabel:"Rate It Now"};t=angular.extend(t,e),AppRate.preferences.customLocale=t},this.$get=["$q",function(e){return{promptForRating:function(t){var n=e.defer(),r=AppRate.promptForRating(t);return n.resolve(r),n.promise},navigateToAppStore:function(){var t=e.defer(),n=AppRate.navigateToAppStore();return t.resolve(n),t.promise},onButtonClicked:function(e){AppRate.preferences.callbacks.onButtonClicked=e.bind(this)},onRateDialogShow:function(e){AppRate.preferences.callbacks.onRateDialogShow=e.bind(this)}}}]}]),angular.module("ngCordova.plugins.appVersion",[]).factory("$cordovaAppVersion",["$q",function(e){return{getAppName:function(){var t=e.defer();return cordova.getAppVersion.getAppName((function(e){t.resolve(e)})),t.promise},getPackageName:function(){var t=e.defer();return cordova.getAppVersion.getPackageName((function(e){t.resolve(e)})),t.promise},getVersionNumber:function(){var t=e.defer();return cordova.getAppVersion.getVersionNumber((function(e){t.resolve(e)})),t.promise},getVersionCode:function(){var t=e.defer();return cordova.getAppVersion.getVersionCode((function(e){t.resolve(e)})),t.promise}}}]),angular.module("ngCordova.plugins.backgroundGeolocation",[]).factory("$cordovaBackgroundGeolocation",["$q","$window",function(e,t){return{init:function(){t.navigator.geolocation.getCurrentPosition((function(e){return e}))},configure:function(n){this.init();var r=e.defer();return t.plugins.backgroundGeoLocation.configure((function(e){r.notify(e),t.plugins.backgroundGeoLocation.finish()}),(function(e){r.reject(e)}),n),this.start(),r.promise},start:function(){var n=e.defer();return t.plugins.backgroundGeoLocation.start((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},stop:function(){var n=e.defer();return t.plugins.backgroundGeoLocation.stop((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.badge",[]).factory("$cordovaBadge",["$q",function(e){return{hasPermission:function(){var t=e.defer();return cordova.plugins.notification.badge.hasPermission((function(e){e?t.resolve(!0):t.reject("You do not have permission")})),t.promise},promptForPermission:function(){return cordova.plugins.notification.badge.promptForPermission()},set:function(t,n,r){var i=e.defer();return cordova.plugins.notification.badge.hasPermission((function(e){e?i.resolve(cordova.plugins.notification.badge.set(t,n,r)):i.reject("You do not have permission to set Badge")})),i.promise},get:function(){var t=e.defer();return cordova.plugins.notification.badge.hasPermission((function(e){e?cordova.plugins.notification.badge.get((function(e){t.resolve(e)})):t.reject("You do not have permission to get Badge")})),t.promise},clear:function(t,n){var r=e.defer();return cordova.plugins.notification.badge.hasPermission((function(e){e?r.resolve(cordova.plugins.notification.badge.clear(t,n)):r.reject("You do not have permission to clear Badge")})),r.promise},increase:function(t,n,r){var i=e.defer();return this.hasPermission().then((function(){i.resolve(cordova.plugins.notification.badge.increase(t,n,r))}),(function(){i.reject("You do not have permission to increase Badge")})),i.promise},decrease:function(t,n,r){var i=e.defer();return this.hasPermission().then((function(){i.resolve(cordova.plugins.notification.badge.decrease(t,n,r))}),(function(){i.reject("You do not have permission to decrease Badge")})),i.promise},configure:function(e){return cordova.plugins.notification.badge.configure(e)}}}]),angular.module("ngCordova.plugins.barcodeScanner",[]).factory("$cordovaBarcodeScanner",["$q",function(e){return{scan:function(t){var n=e.defer();return cordova.plugins.barcodeScanner.scan((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},encode:function(t,n){var r=e.defer();return t=t||"TEXT_TYPE",cordova.plugins.barcodeScanner.encode(t,n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise}}}]),angular.module("ngCordova.plugins.batteryStatus",[]).factory("$cordovaBatteryStatus",["$rootScope","$window","$timeout",function(e,t,n){var r=function(t){n((function(){e.$broadcast("$cordovaBatteryStatus:status",t)}))},i=function(t){n((function(){e.$broadcast("$cordovaBatteryStatus:critical",t)}))},o=function(t){n((function(){e.$broadcast("$cordovaBatteryStatus:low",t)}))};return document.addEventListener("deviceready",(function(){navigator.battery&&(t.addEventListener("batterystatus",r,!1),t.addEventListener("batterycritical",i,!1),t.addEventListener("batterylow",o,!1))}),!1),!0}]).run(["$injector",function(e){e.get("$cordovaBatteryStatus")}]),angular.module("ngCordova.plugins.beacon",[]).factory("$cordovaBeacon",["$window","$rootScope","$timeout","$q",function(e,t,n,r){var i=null,o=null,a=null,s=null,l=null,u=null,c=null,d=null;return document.addEventListener("deviceready",(function(){if(e.cordova&&e.cordova.plugins&&e.cordova.plugins.locationManager){var r=new e.cordova.plugins.locationManager.Delegate;r.didDetermineStateForRegion=function(e){n((function(){t.$broadcast("$cordovaBeacon:didDetermineStateForRegion",e)})),i&&i(e)},r.didStartMonitoringForRegion=function(e){n((function(){t.$broadcast("$cordovaBeacon:didStartMonitoringForRegion",e)})),o&&o(e)},r.didExitRegion=function(e){n((function(){t.$broadcast("$cordovaBeacon:didExitRegion",e)})),a&&a(e)},r.didEnterRegion=function(e){n((function(){t.$broadcast("$cordovaBeacon:didEnterRegion",e)})),s&&s(e)},r.didRangeBeaconsInRegion=function(e){n((function(){t.$broadcast("$cordovaBeacon:didRangeBeaconsInRegion",e)})),l&&l(e)},r.peripheralManagerDidStartAdvertising=function(e){n((function(){t.$broadcast("$cordovaBeacon:peripheralManagerDidStartAdvertising",e)})),u&&u(e)},r.peripheralManagerDidUpdateState=function(e){n((function(){t.$broadcast("$cordovaBeacon:peripheralManagerDidUpdateState",e)})),c&&c(e)},r.didChangeAuthorizationStatus=function(e){n((function(){t.$broadcast("$cordovaBeacon:didChangeAuthorizationStatus",e)})),d&&d(e)},e.cordova.plugins.locationManager.setDelegate(r)}}),!1),{setCallbackDidDetermineStateForRegion:function(e){i=e},setCallbackDidStartMonitoringForRegion:function(e){o=e},setCallbackDidExitRegion:function(e){a=e},setCallbackDidEnterRegion:function(e){s=e},setCallbackDidRangeBeaconsInRegion:function(e){l=e},setCallbackPeripheralManagerDidStartAdvertising:function(e){u=e},setCallbackPeripheralManagerDidUpdateState:function(e){c=e},setCallbackDidChangeAuthorizationStatus:function(e){d=e},createBeaconRegion:function(t,n,r,i,o){return r=r||void 0,i=i||void 0,new e.cordova.plugins.locationManager.BeaconRegion(t,n,r,i,o)},isBluetoothEnabled:function(){return r.when(e.cordova.plugins.locationManager.isBluetoothEnabled())},enableBluetooth:function(){return r.when(e.cordova.plugins.locationManager.enableBluetooth())},disableBluetooth:function(){return r.when(e.cordova.plugins.locationManager.disableBluetooth())},startMonitoringForRegion:function(t){return r.when(e.cordova.plugins.locationManager.startMonitoringForRegion(t))},stopMonitoringForRegion:function(t){return r.when(e.cordova.plugins.locationManager.stopMonitoringForRegion(t))},requestStateForRegion:function(t){return r.when(e.cordova.plugins.locationManager.requestStateForRegion(t))},startRangingBeaconsInRegion:function(t){return r.when(e.cordova.plugins.locationManager.startRangingBeaconsInRegion(t))},stopRangingBeaconsInRegion:function(t){return r.when(e.cordova.plugins.locationManager.stopRangingBeaconsInRegion(t))},getAuthorizationStatus:function(){return r.when(e.cordova.plugins.locationManager.getAuthorizationStatus())},requestWhenInUseAuthorization:function(){return r.when(e.cordova.plugins.locationManager.requestWhenInUseAuthorization())},requestAlwaysAuthorization:function(){return r.when(e.cordova.plugins.locationManager.requestAlwaysAuthorization())},getMonitoredRegions:function(){return r.when(e.cordova.plugins.locationManager.getMonitoredRegions())},getRangedRegions:function(){return r.when(e.cordova.plugins.locationManager.getRangedRegions())},isRangingAvailable:function(){return r.when(e.cordova.plugins.locationManager.isRangingAvailable())},isMonitoringAvailableForClass:function(t){return r.when(e.cordova.plugins.locationManager.isMonitoringAvailableForClass(t))},startAdvertising:function(t,n){return r.when(e.cordova.plugins.locationManager.startAdvertising(t,n))},stopAdvertising:function(){return r.when(e.cordova.plugins.locationManager.stopAdvertising())},isAdvertisingAvailable:function(){return r.when(e.cordova.plugins.locationManager.isAdvertisingAvailable())},isAdvertising:function(){return r.when(e.cordova.plugins.locationManager.isAdvertising())},disableDebugLogs:function(){return r.when(e.cordova.plugins.locationManager.disableDebugLogs())},enableDebugNotifications:function(){return r.when(e.cordova.plugins.locationManager.enableDebugNotifications())},disableDebugNotifications:function(){return r.when(e.cordova.plugins.locationManager.disableDebugNotifications())},enableDebugLogs:function(){return r.when(e.cordova.plugins.locationManager.enableDebugLogs())},appendToDeviceLog:function(t){return r.when(e.cordova.plugins.locationManager.appendToDeviceLog(t))}}}]),angular.module("ngCordova.plugins.ble",[]).factory("$cordovaBLE",["$q","$timeout","$log",function(e,t,n){return{scan:function(n,r){var i=e.defer();return ble.startScan(n,(function(e){i.notify(e)}),(function(e){i.reject(e)})),t((function(){ble.stopScan((function(){i.resolve()}),(function(e){i.reject(e)}))}),1e3*r),i.promise},startScan:function(e,t,n){return ble.startScan(e,t,n)},stopScan:function(){var t=e.defer();return ble.stopScan((function(){t.resolve()}),(function(e){t.reject(e)})),t.promise},connect:function(t){var n=e.defer();return ble.connect(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},disconnect:function(t){var n=e.defer();return ble.disconnect(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},read:function(t,n,r){var i=e.defer();return ble.read(t,n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},write:function(t,n,r,i){var o=e.defer();return ble.write(t,n,r,i,(function(e){o.resolve(e)}),(function(e){o.reject(e)})),o.promise},writeWithoutResponse:function(t,n,r,i){var o=e.defer();return ble.writeWithoutResponse(t,n,r,i,(function(e){o.resolve(e)}),(function(e){o.reject(e)})),o.promise},writeCommand:function(e,t,r,i){return n.warning("writeCommand is deprecated, use writeWithoutResponse"),this.writeWithoutResponse(e,t,r,i)},startNotification:function(e,t,n,r,i){return ble.startNotification(e,t,n,r,i)},stopNotification:function(t,n,r){var i=e.defer();return ble.stopNotification(t,n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},isConnected:function(t){var n=e.defer();return ble.isConnected(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},enable:function(){var t=e.defer();return ble.enable((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},isEnabled:function(){var t=e.defer();return ble.isEnabled((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.bluetoothSerial",[]).factory("$cordovaBluetoothSerial",["$q","$window",function(e,t){return{connect:function(n){var r=e.defer(),i=e.defer(),o=!1;return t.bluetoothSerial.connect(n,(function(){o=!0,r.resolve(i)}),(function(e){!1===o&&i.reject(e),r.reject(e)})),r.promise},connectInsecure:function(n){var r=e.defer();return t.bluetoothSerial.connectInsecure(n,(function(){r.resolve()}),(function(e){r.reject(e)})),r.promise},disconnect:function(){var n=e.defer();return t.bluetoothSerial.disconnect((function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},list:function(){var n=e.defer();return t.bluetoothSerial.list((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},discoverUnpaired:function(){var n=e.defer();return t.bluetoothSerial.discoverUnpaired((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},setDeviceDiscoveredListener:function(){var n=e.defer();return t.bluetoothSerial.setDeviceDiscoveredListener((function(e){n.notify(e)})),n.promise},clearDeviceDiscoveredListener:function(){t.bluetoothSerial.clearDeviceDiscoveredListener()},showBluetoothSettings:function(){var n=e.defer();return t.bluetoothSerial.showBluetoothSettings((function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},isEnabled:function(){var n=e.defer();return t.bluetoothSerial.isEnabled((function(){n.resolve()}),(function(){n.reject()})),n.promise},enable:function(){var n=e.defer();return t.bluetoothSerial.enable((function(){n.resolve()}),(function(){n.reject()})),n.promise},isConnected:function(){var n=e.defer();return t.bluetoothSerial.isConnected((function(){n.resolve()}),(function(){n.reject()})),n.promise},available:function(){var n=e.defer();return t.bluetoothSerial.available((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},read:function(){var n=e.defer();return t.bluetoothSerial.read((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},readUntil:function(n){var r=e.defer();return t.bluetoothSerial.readUntil(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},write:function(n){var r=e.defer();return t.bluetoothSerial.write(n,(function(){r.resolve()}),(function(e){r.reject(e)})),r.promise},subscribe:function(n){var r=e.defer();return t.bluetoothSerial.subscribe(n,(function(e){r.notify(e)}),(function(e){r.reject(e)})),r.promise},subscribeRawData:function(){var n=e.defer();return t.bluetoothSerial.subscribeRawData((function(e){n.notify(e)}),(function(e){n.reject(e)})),n.promise},unsubscribe:function(){var n=e.defer();return t.bluetoothSerial.unsubscribe((function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},unsubscribeRawData:function(){var n=e.defer();return t.bluetoothSerial.unsubscribeRawData((function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},clear:function(){var n=e.defer();return t.bluetoothSerial.clear((function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},readRSSI:function(){var n=e.defer();return t.bluetoothSerial.readRSSI((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.brightness",[]).factory("$cordovaBrightness",["$q","$window",function(e,t){return{get:function(){var n=e.defer();return t.cordova?t.cordova.plugins.brightness.getBrightness((function(e){n.resolve(e)}),(function(e){n.reject(e)})):n.reject("Not supported without cordova.js"),n.promise},set:function(n){var r=e.defer();return t.cordova?t.cordova.plugins.brightness.setBrightness(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})):r.reject("Not supported without cordova.js"),r.promise},setKeepScreenOn:function(n){var r=e.defer();return t.cordova?t.cordova.plugins.brightness.setKeepScreenOn(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})):r.reject("Not supported without cordova.js"),r.promise}}}]),angular.module("ngCordova.plugins.calendar",[]).factory("$cordovaCalendar",["$q","$window",function(e,t){return{createCalendar:function(n){var r=e.defer(),i=t.plugins.calendar.getCreateCalendarOptions();return"string"==typeof n?i.calendarName=n:i=angular.extend(i,n),t.plugins.calendar.createCalendar(i,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},deleteCalendar:function(n){var r=e.defer();return t.plugins.calendar.deleteCalendar(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},createEvent:function(n){var r=e.defer(),i={title:null,location:null,notes:null,startDate:null,endDate:null};return i=angular.extend(i,n),t.plugins.calendar.createEvent(i.title,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},createEventWithOptions:function(n){var r=e.defer(),i=[],o=window.plugins.calendar.getCalendarOptions(),a={title:null,location:null,notes:null,startDate:null,endDate:null};for(var s in i=Object.keys(a),n)-1===i.indexOf(s)?o[s]=n[s]:a[s]=n[s];return t.plugins.calendar.createEventWithOptions(a.title,a.location,a.notes,new Date(a.startDate),new Date(a.endDate),o,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},createEventInteractively:function(n){var r=e.defer(),i={title:null,location:null,notes:null,startDate:null,endDate:null};return i=angular.extend(i,n),t.plugins.calendar.createEventInteractively(i.title,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},createEventInNamedCalendar:function(n){var r=e.defer(),i={title:null,location:null,notes:null,startDate:null,endDate:null,calendarName:null};return i=angular.extend(i,n),t.plugins.calendar.createEventInNamedCalendar(i.title,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),i.calendarName,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},findEvent:function(n){var r=e.defer(),i={title:null,location:null,notes:null,startDate:null,endDate:null};return i=angular.extend(i,n),t.plugins.calendar.findEvent(i.title,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},listEventsInRange:function(n,r){var i=e.defer();return t.plugins.calendar.listEventsInRange(n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},listCalendars:function(){var n=e.defer();return t.plugins.calendar.listCalendars((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},findAllEventsInNamedCalendar:function(n){var r=e.defer();return t.plugins.calendar.findAllEventsInNamedCalendar(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},modifyEvent:function(n){var r=e.defer(),i={title:null,location:null,notes:null,startDate:null,endDate:null,newTitle:null,newLocation:null,newNotes:null,newStartDate:null,newEndDate:null};return i=angular.extend(i,n),t.plugins.calendar.modifyEvent(i.title,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),i.newTitle,i.newLocation,i.newNotes,new Date(i.newStartDate),new Date(i.newEndDate),(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},deleteEvent:function(n){var r=e.defer(),i={newTitle:null,location:null,notes:null,startDate:null,endDate:null};return i=angular.extend(i,n),t.plugins.calendar.deleteEvent(i.newTitle,i.location,i.notes,new Date(i.startDate),new Date(i.endDate),(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise}}}]),angular.module("ngCordova.plugins.camera",[]).factory("$cordovaCamera",["$q",function(e){return{getPicture:function(t){var n=e.defer();return navigator.camera?(navigator.camera.getPicture((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise):(n.resolve(null),n.promise)},cleanup:function(){var t=e.defer();return navigator.camera.cleanup((function(){t.resolve()}),(function(e){t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.capture",[]).factory("$cordovaCapture",["$q",function(e){return{captureAudio:function(t){var n=e.defer();return navigator.device.capture?(navigator.device.capture.captureAudio((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise):(n.resolve(null),n.promise)},captureImage:function(t){var n=e.defer();return navigator.device.capture?(navigator.device.capture.captureImage((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise):(n.resolve(null),n.promise)},captureVideo:function(t){var n=e.defer();return navigator.device.capture?(navigator.device.capture.captureVideo((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise):(n.resolve(null),n.promise)}}}]),angular.module("ngCordova.plugins.cardIO",[]).provider("$cordovaNgCardIO",[function(){var e=["card_type","redacted_card_number","card_number","expiry_month","expiry_year","short_expiry_year","cvv","zip"],t={expiry:!0,cvv:!0,zip:!1,suppressManual:!1,suppressConfirm:!1,hideLogo:!0};this.setCardIOResponseFields=function(t){t&&angular.isArray(t)&&(e=t)},this.setScanerConfig=function(e){e&&angular.isObject(e)&&(t.expiry=e.expiry||!0,t.cvv=e.cvv||!0,t.zip=e.zip||!1,t.suppressManual=e.suppressManual||!1,t.suppressConfirm=e.suppressConfirm||!1,t.hideLogo=e.hideLogo||!0)},this.$get=["$q",function(n){return{scanCard:function(){var r=n.defer();return CardIO.scan(t,(function(t){if(null===t)r.reject(null);else{for(var n={},i=0,o=e.length;o>i;i++){var a=e[i];n[a]="short_expiry_year"===a?String(t.expiry_year).substr(2,2)||"":t[a]||""}r.resolve(n)}}),(function(){r.reject(null)})),r.promise}}}]}]),angular.module("ngCordova.plugins.clipboard",[]).factory("$cordovaClipboard",["$q","$window",function(e,t){return{copy:function(n){var r=e.defer();return t.cordova.plugins.clipboard.copy(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},paste:function(){var n=e.defer();return t.cordova.plugins.clipboard.paste((function(e){n.resolve(e)}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.contacts",[]).factory("$cordovaContacts",["$q",function(e){return{save:function(t){var n=e.defer();return navigator.contacts.create(t).save((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},remove:function(t){var n=e.defer();return navigator.contacts.create(t).remove((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},clone:function(e){return navigator.contacts.create(e).clone(e)},find:function(t){var n=e.defer(),r=t.fields||["id","displayName"];return delete t.fields,0===Object.keys(t).length?navigator.contacts.find(r,(function(e){n.resolve(e)}),(function(e){n.reject(e)})):navigator.contacts.find(r,(function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},pickContact:function(){var t=e.defer();return navigator.contacts.pickContact((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.datePicker",[]).factory("$cordovaDatePicker",["$window","$q",function(e,t){return{show:function(n){var r=t.defer();return n=n||{date:new Date,mode:"date"},e.datePicker.show(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise}}}]),angular.module("ngCordova.plugins.device",[]).factory("$cordovaDevice",[function(){return{getDevice:function(){return device},getCordova:function(){return device.cordova},getModel:function(){return device.model},getName:function(){return device.name},getPlatform:function(){return device.platform},getUUID:function(){return device.uuid},getVersion:function(){return device.version},getManufacturer:function(){return device.manufacturer}}}]),angular.module("ngCordova.plugins.deviceMotion",[]).factory("$cordovaDeviceMotion",["$q",function(e){return{getCurrentAcceleration:function(){var t=e.defer();return angular.isUndefined(navigator.accelerometer)||!angular.isFunction(navigator.accelerometer.getCurrentAcceleration)?(t.reject("Device do not support watchAcceleration"),t.promise):(navigator.accelerometer.getCurrentAcceleration((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise)},watchAcceleration:function(t){var n=e.defer();if(angular.isUndefined(navigator.accelerometer)||!angular.isFunction(navigator.accelerometer.watchAcceleration))return n.reject("Device do not support watchAcceleration"),n.promise;var r=navigator.accelerometer.watchAcceleration((function(e){n.notify(e)}),(function(e){n.reject(e)}),t);return n.promise.cancel=function(){navigator.accelerometer.clearWatch(r)},n.promise.clearWatch=function(e){navigator.accelerometer.clearWatch(e||r)},n.promise.watchID=r,n.promise},clearWatch:function(e){return navigator.accelerometer.clearWatch(e)}}}]),angular.module("ngCordova.plugins.deviceOrientation",[]).factory("$cordovaDeviceOrientation",["$q",function(e){var t={frequency:3e3};return{getCurrentHeading:function(){var t=e.defer();return navigator.compass?(navigator.compass.getCurrentHeading((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise):(t.reject("No compass on Device"),t.promise)},watchHeading:function(n){var r=e.defer();if(!navigator.compass)return r.reject("No compass on Device"),r.promise;var i=angular.extend(t,n),o=navigator.compass.watchHeading((function(e){r.notify(e)}),(function(e){r.reject(e)}),i);return r.promise.cancel=function(){navigator.compass.clearWatch(o)},r.promise.clearWatch=function(e){navigator.compass.clearWatch(e||o)},r.promise.watchID=o,r.promise},clearWatch:function(e){return navigator.compass.clearWatch(e)}}}]),angular.module("ngCordova.plugins.dialogs",[]).factory("$cordovaDialogs",["$q","$window",function(e,t){return{alert:function(n,r,i){var o=e.defer();return t.navigator.notification?navigator.notification.alert(n,(function(){o.resolve()}),r,i):(t.alert(n),o.resolve()),o.promise},confirm:function(n,r,i){var o=e.defer();return t.navigator.notification?navigator.notification.confirm(n,(function(e){o.resolve(e)}),r,i):t.confirm(n)?o.resolve(1):o.resolve(2),o.promise},prompt:function(n,r,i,o){var a=e.defer();if(t.navigator.notification)navigator.notification.prompt(n,(function(e){a.resolve(e)}),r,i,o);else{var s=t.prompt(n,o);null!==s?a.resolve({input1:s,buttonIndex:1}):a.resolve({input1:s,buttonIndex:2})}return a.promise},beep:function(e){return navigator.notification.beep(e)},activityStart:function(t,n){var r=e.defer();return"android"===cordova.platformId?(navigator.notification.activityStart(n,t),r.resolve()):r.reject(t,n),r.promise},activityStop:function(){var t=e.defer();return"android"===cordova.platformId?(navigator.notification.activityStop(),t.resolve()):t.reject(),t.promise},progressStart:function(t,n){var r=e.defer();return"android"===cordova.platformId?(navigator.notification.progressStart(n,t),r.resolve()):r.reject(t,n),r.promise},progressStop:function(){var t=e.defer();return"android"===cordova.platformId?(navigator.notification.progressStop(),t.resolve()):t.reject(),t.promise},progressValue:function(t){var n=e.defer();return"android"===cordova.platformId?(navigator.notification.progressValue(t),n.resolve()):n.reject(t),n.promise}}}]),angular.module("ngCordova.plugins.emailComposer",[]).factory("$cordovaEmailComposer",["$q",function(e){return{isAvailable:function(){var t=e.defer();return cordova.plugins.email.isAvailable((function(e){e?t.resolve():t.reject()})),t.promise},open:function(t){var n=e.defer();return cordova.plugins.email.open(t,(function(){n.reject()})),n.promise},addAlias:function(e,t){cordova.plugins.email.addAlias(e,t)}}}]),angular.module("ngCordova.plugins.facebook",[]).provider("$cordovaFacebook",[function(){this.browserInit=function(e,t){this.appID=e,this.appVersion=t||"v2.0",facebookConnectPlugin.browserInit(this.appID,this.appVersion)},this.$get=["$q",function(e){return{login:function(t){var n=e.defer();return facebookConnectPlugin.login(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},showDialog:function(t){var n=e.defer();return facebookConnectPlugin.showDialog(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},api:function(t,n){var r=e.defer();return facebookConnectPlugin.api(t,n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},getAccessToken:function(){var t=e.defer();return facebookConnectPlugin.getAccessToken((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},getLoginStatus:function(){var t=e.defer();return facebookConnectPlugin.getLoginStatus((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},logout:function(){var t=e.defer();return facebookConnectPlugin.logout((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise}}}]}]),angular.module("ngCordova.plugins.facebookAds",[]).factory("$cordovaFacebookAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.FacebookAds.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.FacebookAds.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.FacebookAds.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.FacebookAds.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.FacebookAds.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.FacebookAds.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.FacebookAds.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.FacebookAds.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.file",[]).constant("$cordovaFileError",{1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR"}).provider("$cordovaFile",[function(){this.$get=["$q","$window","$cordovaFileError",function(e,t,n){return{getFreeDiskSpace:function(){var t=e.defer();return cordova.exec((function(e){t.resolve(e)}),(function(e){t.reject(e)}),"File","getFreeDiskSpace",[]),t.promise},checkDir:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("directory cannot start with /");try{var a=r+i;t.resolveLocalFileSystemURL(a,(function(e){!0===e.isDirectory?o.resolve(e):o.reject({code:13,message:"input is not a directory"})}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},checkFile:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("directory cannot start with /");try{var a=r+i;t.resolveLocalFileSystemURL(a,(function(e){!0===e.isFile?o.resolve(e):o.reject({code:13,message:"input is not a file"})}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},createDir:function(r,i,o){var a=e.defer();/^\//.test(i)&&a.reject("directory cannot start with /");var s={create:!0,exclusive:o=!o};try{t.resolveLocalFileSystemURL(r,(function(e){e.getDirectory(i,s,(function(e){a.resolve(e)}),(function(e){e.message=n[e.code],a.reject(e)}))}),(function(e){e.message=n[e.code],a.reject(e)}))}catch(e){e.message=n[e.code],a.reject(e)}return a.promise},createFile:function(r,i,o){var a=e.defer();/^\//.test(i)&&a.reject("file-name cannot start with /");var s={create:!0,exclusive:o=!o};try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,s,(function(e){a.resolve(e)}),(function(e){e.message=n[e.code],a.reject(e)}))}),(function(e){e.message=n[e.code],a.reject(e)}))}catch(e){e.message=n[e.code],a.reject(e)}return a.promise},removeDir:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getDirectory(i,{create:!1},(function(e){e.remove((function(){o.resolve({success:!0,fileRemoved:e})}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},removeFile:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.remove((function(){o.resolve({success:!0,fileRemoved:e})}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},removeRecursively:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getDirectory(i,{create:!1},(function(e){e.removeRecursively((function(){o.resolve({success:!0,fileRemoved:e})}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},writeFile:function(r,i,o,a){var s=e.defer();/^\//.test(i)&&s.reject("file-name cannot start with /");var l={create:!0,exclusive:a=!a};try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,l,(function(e){e.createWriter((function(e){!0===l.append&&e.seek(e.length),l.truncate&&e.truncate(l.truncate),e.onwriteend=function(e){this.error?s.reject(this.error):s.resolve(e)},e.write(o),s.promise.abort=function(){e.abort()}}))}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}catch(e){
-e.message=n[e.code],s.reject(e)}return s.promise},writeExistingFile:function(r,i,o){var a=e.defer();/^\//.test(i)&&a.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.createWriter((function(e){e.seek(e.length),e.onwriteend=function(e){this.error?a.reject(this.error):a.resolve(e)},e.write(o),a.promise.abort=function(){e.abort()}}))}),(function(e){e.message=n[e.code],a.reject(e)}))}),(function(e){e.message=n[e.code],a.reject(e)}))}catch(e){e.message=n[e.code],a.reject(e)}return a.promise},readAsText:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.file((function(e){var t=new FileReader;t.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?o.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?o.reject(e.target.error):o.reject({code:null,message:"READER_ONLOADEND_ERR"})},t.readAsText(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},readAsDataURL:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.file((function(e){var t=new FileReader;t.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?o.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?o.reject(e.target.error):o.reject({code:null,message:"READER_ONLOADEND_ERR"})},t.readAsDataURL(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},readAsBinaryString:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.file((function(e){var t=new FileReader;t.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?o.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?o.reject(e.target.error):o.reject({code:null,message:"READER_ONLOADEND_ERR"})},t.readAsBinaryString(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},readAsArrayBuffer:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1},(function(e){e.file((function(e){var t=new FileReader;t.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?o.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?o.reject(e.target.error):o.reject({code:null,message:"READER_ONLOADEND_ERR"})},t.readAsArrayBuffer(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise},moveFile:function(n,r,i,o){var a=e.defer();o=o||r,(/^\//.test(r)||/^\//.test(o))&&a.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(n,(function(e){e.getFile(r,{create:!1},(function(e){t.resolveLocalFileSystemURL(i,(function(t){e.moveTo(t,o,(function(e){a.resolve(e)}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}catch(e){a.reject(e)}return a.promise},moveDir:function(n,r,i,o){var a=e.defer();o=o||r,(/^\//.test(r)||/^\//.test(o))&&a.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(n,(function(e){e.getDirectory(r,{create:!1},(function(e){t.resolveLocalFileSystemURL(i,(function(t){e.moveTo(t,o,(function(e){a.resolve(e)}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}),(function(e){a.reject(e)}))}catch(e){a.reject(e)}return a.promise},copyDir:function(r,i,o,a){var s=e.defer();a=a||i,(/^\//.test(i)||/^\//.test(a))&&s.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getDirectory(i,{create:!1,exclusive:!1},(function(e){t.resolveLocalFileSystemURL(o,(function(t){e.copyTo(t,a,(function(e){s.resolve(e)}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}catch(e){e.message=n[e.code],s.reject(e)}return s.promise},copyFile:function(r,i,o,a){var s=e.defer();a=a||i,/^\//.test(i)&&s.reject("file-name cannot start with /");try{t.resolveLocalFileSystemURL(r,(function(e){e.getFile(i,{create:!1,exclusive:!1},(function(e){t.resolveLocalFileSystemURL(o,(function(t){e.copyTo(t,a,(function(e){s.resolve(e)}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}),(function(e){e.message=n[e.code],s.reject(e)}))}catch(e){e.message=n[e.code],s.reject(e)}return s.promise},readFileMetadata:function(r,i){var o=e.defer();/^\//.test(i)&&o.reject("directory cannot start with /");try{var a=r+i;t.resolveLocalFileSystemURL(a,(function(e){e.file((function(e){o.resolve(e)}),(function(e){e.message=n[e.code],o.reject(e)}))}),(function(e){e.message=n[e.code],o.reject(e)}))}catch(e){e.message=n[e.code],o.reject(e)}return o.promise}}}]}]),angular.module("ngCordova.plugins.fileOpener2",[]).factory("$cordovaFileOpener2",["$q",function(e){return{open:function(t,n){var r=e.defer();return cordova.plugins.fileOpener2.open(t,n,{error:function(e){r.reject(e)},success:function(){r.resolve()}}),r.promise},uninstall:function(t){var n=e.defer();return cordova.plugins.fileOpener2.uninstall(t,{error:function(e){n.reject(e)},success:function(){n.resolve()}}),n.promise},appIsInstalled:function(t){var n=e.defer();return cordova.plugins.fileOpener2.appIsInstalled(t,{success:function(e){n.resolve(e)}}),n.promise}}}]),angular.module("ngCordova.plugins.fileTransfer",[]).factory("$cordovaFileTransfer",["$q","$timeout",function(e,t){return{download:function(n,r,i,o){var a=e.defer(),s=new FileTransfer,l=i&&!1===i.encodeURI?n:encodeURI(n);return i&&void 0!==i.timeout&&null!==i.timeout&&(t((function(){s.abort()}),i.timeout),i.timeout=null),s.onprogress=function(e){a.notify(e)},a.promise.abort=function(){s.abort()},s.download(l,r,a.resolve,a.reject,o,i),a.promise},upload:function(n,r,i,o){var a=e.defer(),s=new FileTransfer,l=i&&!1===i.encodeURI?n:encodeURI(n);return i&&void 0!==i.timeout&&null!==i.timeout&&(t((function(){s.abort()}),i.timeout),i.timeout=null),s.onprogress=function(e){a.notify(e)},a.promise.abort=function(){s.abort()},s.upload(r,l,a.resolve,a.reject,i,o),a.promise}}}]),angular.module("ngCordova.plugins.flashlight",[]).factory("$cordovaFlashlight",["$q","$window",function(e,t){return{available:function(){var n=e.defer();return t.plugins.flashlight.available((function(e){n.resolve(e)})),n.promise},switchOn:function(){var n=e.defer();return t.plugins.flashlight.switchOn((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},switchOff:function(){var n=e.defer();return t.plugins.flashlight.switchOff((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},toggle:function(){var n=e.defer();return t.plugins.flashlight.toggle((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.flurryAds",[]).factory("$cordovaFlurryAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.FlurryAds.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.FlurryAds.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.FlurryAds.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.FlurryAds.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.FlurryAds.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.FlurryAds.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.FlurryAds.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.FlurryAds.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.ga",[]).factory("$cordovaGA",["$q","$window",function(e,t){return{init:function(n,r){var i=e.defer();return r=r>=0?r:10,t.plugins.gaPlugin.init((function(e){i.resolve(e)}),(function(e){i.reject(e)}),n,r),i.promise},trackEvent:function(n,r,i,o,a,s){var l=e.defer();return t.plugins.gaPlugin.trackEvent((function(e){l.resolve(e)}),(function(e){l.reject(e)}),i,o,a,s),l.promise},trackPage:function(n,r,i){var o=e.defer();return t.plugins.gaPlugin.trackPage((function(e){o.resolve(e)}),(function(e){o.reject(e)}),i),o.promise},setVariable:function(n,r,i,o){var a=e.defer();return t.plugins.gaPlugin.setVariable((function(e){a.resolve(e)}),(function(e){a.reject(e)}),i,o),a.promise},exit:function(){var n=e.defer();return t.plugins.gaPlugin.exit((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.geolocation",[]).factory("$cordovaGeolocation",["$q",function(e){return{getCurrentPosition:function(t){var n=e.defer();return navigator.geolocation.getCurrentPosition((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},watchPosition:function(t){var n=e.defer(),r=navigator.geolocation.watchPosition((function(e){n.notify(e)}),(function(e){n.reject(e)}),t);return n.promise.cancel=function(){navigator.geolocation.clearWatch(r)},n.promise.clearWatch=function(e){navigator.geolocation.clearWatch(e||r)},n.promise.watchID=r,n.promise},clearWatch:function(e){return navigator.geolocation.clearWatch(e)}}}]),angular.module("ngCordova.plugins.globalization",[]).factory("$cordovaGlobalization",["$q",function(e){return{getPreferredLanguage:function(){var t=e.defer();return navigator.globalization.getPreferredLanguage((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},getLocaleName:function(){var t=e.defer();return navigator.globalization.getLocaleName((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},getFirstDayOfWeek:function(){var t=e.defer();return navigator.globalization.getFirstDayOfWeek((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},dateToString:function(t,n){var r=e.defer();return navigator.globalization.dateToString(t,(function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise},stringToDate:function(t,n){var r=e.defer();return navigator.globalization.stringToDate(t,(function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise},getDatePattern:function(t){var n=e.defer();return navigator.globalization.getDatePattern((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},getDateNames:function(t){var n=e.defer();return navigator.globalization.getDateNames((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},isDayLightSavingsTime:function(t){var n=e.defer();return navigator.globalization.isDayLightSavingsTime(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},numberToString:function(t,n){var r=e.defer();return navigator.globalization.numberToString(t,(function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise},stringToNumber:function(t,n){var r=e.defer();return navigator.globalization.stringToNumber(t,(function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise},getNumberPattern:function(t){var n=e.defer();return navigator.globalization.getNumberPattern((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},getCurrencyPattern:function(t){var n=e.defer();return navigator.globalization.getCurrencyPattern(t,(function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.googleAds",[]).factory("$cordovaGoogleAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.AdMob.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.AdMob.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.AdMob.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.AdMob.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.AdMob.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.AdMob.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.AdMob.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.AdMob.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.googleAnalytics",[]).factory("$cordovaGoogleAnalytics",["$q","$window",function(e,t){return{startTrackerWithId:function(n){var r=e.defer();return t.analytics.startTrackerWithId(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},setUserId:function(n){var r=e.defer();return t.analytics.setUserId(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},debugMode:function(){var n=e.defer();return t.analytics.debugMode((function(e){n.resolve(e)}),(function(){n.reject()})),n.promise},trackView:function(n){var r=e.defer();return t.analytics.trackView(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},addCustomDimension:function(n,r){var i=e.defer(),o=parseInt(n,10);return isNaN(o)&&i.reject('Parameter "key" must be an integer.'),t.analytics.addCustomDimension(o,r,(function(){i.resolve()}),(function(e){i.reject(e)})),i.promise},trackEvent:function(n,r,i,o){var a=e.defer();return t.analytics.trackEvent(n,r,i,o,(function(e){a.resolve(e)}),(function(e){a.reject(e)})),a.promise},trackException:function(n,r){var i=e.defer();return t.analytics.trackException(n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},trackTiming:function(n,r,i,o){var a=e.defer();return t.analytics.trackTiming(n,r,i,o,(function(e){a.resolve(e)}),(function(e){a.reject(e)})),a.promise},addTransaction:function(n,r,i,o,a,s){var l=e.defer();return t.analytics.addTransaction(n,r,i,o,a,s,(function(e){l.resolve(e)}),(function(e){l.reject(e)})),l.promise},addTransactionItem:function(n,r,i,o,a,s,l){var u=e.defer();return t.analytics.addTransactionItem(n,r,i,o,a,s,l,(function(e){u.resolve(e)}),(function(e){u.reject(e)})),u.promise}}}]),angular.module("ngCordova.plugins.googleMap",[]).factory("$cordovaGoogleMap",["$q","$window",function(e,t){var n=null;return{getMap:function(r){var i=e.defer();if(t.plugin.google.maps){var o=document.getElementById("map_canvas");(n=t.plugin.google.maps.Map.getMap(r)).setDiv(o),i.resolve(n)}else i.reject(null);return i.promise},isMapLoaded:function(){return!!n},addMarker:function(t){var r=e.defer();return n.addMarker(t,(function(e){r.resolve(e)})),r.promise},getMapTypeIds:function(){return t.plugin.google.maps.mapTypeId},setVisible:function(t){var r=e.defer();return n.setVisible(t),r.promise},cleanup:function(){n=null}}}]),angular.module("ngCordova.plugins.googlePlayGame",[]).factory("$cordovaGooglePlayGame",["$q",function(e){return{auth:function(){var t=e.defer();return googleplaygame.auth((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise},signout:function(){var t=e.defer();return googleplaygame.signout((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise},isSignedIn:function(){var t=e.defer();return googleplaygame.isSignedIn((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise},showPlayer:function(){var t=e.defer();return googleplaygame.showPlayer((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise},submitScore:function(t){var n=e.defer();return googleplaygame.submitScore(t,(function(e){return n.resolve(e)}),(function(e){return n.reject(e)})),n.promise},showAllLeaderboards:function(){var t=e.defer();return googleplaygame.showAllLeaderboards((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise},showLeaderboard:function(t){var n=e.defer();return googleplaygame.showLeaderboard(t,(function(e){return n.resolve(e)}),(function(e){return n.reject(e)})),n.promise},unlockAchievement:function(t){var n=e.defer();return googleplaygame.unlockAchievement(t,(function(e){return n.resolve(e)}),(function(e){return n.reject(e)})),n.promise},incrementAchievement:function(t){var n=e.defer();return googleplaygame.incrementAchievement(t,(function(e){return n.resolve(e)}),(function(e){return n.reject(e)})),n.promise},showAchievements:function(){var t=e.defer();return googleplaygame.showAchievements((function(e){return t.resolve(e)}),(function(e){return t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.googlePlus",[]).factory("$cordovaGooglePlus",["$q","$window",function(e,t){return{login:function(n){var r=e.defer();return void 0===n&&(n={}),t.plugins.googleplus.login({iOSApiKey:n},(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},silentLogin:function(n){var r=e.defer();return void 0===n&&(n={}),t.plugins.googleplus.trySilentLogin({iOSApiKey:n},(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},logout:function(){var n=e.defer();t.plugins.googleplus.logout((function(e){n.resolve(e)}))},disconnect:function(){var n=e.defer();t.plugins.googleplus.disconnect((function(e){n.resolve(e)}))},isAvailable:function(){var n=e.defer();return t.plugins.googleplus.isAvailable((function(e){e?n.resolve(e):n.reject(e)})),n.promise}}}]),angular.module("ngCordova.plugins.healthKit",[]).factory("$cordovaHealthKit",["$q","$window",function(e,t){return{isAvailable:function(){var n=e.defer();return t.plugins.healthkit.available((function(e){n.resolve(e)}),(function(e){n.reject(e)})),n.promise},checkAuthStatus:function(n){var r=e.defer();return n=n||"HKQuantityTypeIdentifierHeight",t.plugins.healthkit.checkAuthStatus({type:n},(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},requestAuthorization:function(n,r){var i=e.defer();return n=n||["HKCharacteristicTypeIdentifierDateOfBirth","HKQuantityTypeIdentifierActiveEnergyBurned","HKQuantityTypeIdentifierHeight"],r=r||["HKQuantityTypeIdentifierActiveEnergyBurned","HKQuantityTypeIdentifierHeight","HKQuantityTypeIdentifierDistanceCycling"],t.plugins.healthkit.requestAuthorization({readTypes:n,writeTypes:r},(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},readDateOfBirth:function(){var n=e.defer();return t.plugins.healthkit.readDateOfBirth((function(e){n.resolve(e)}),(function(e){n.resolve(e)})),n.promise},readGender:function(){var n=e.defer();return t.plugins.healthkit.readGender((function(e){n.resolve(e)}),(function(e){n.resolve(e)})),n.promise},saveWeight:function(n,r,i){var o=e.defer();return t.plugins.healthkit.saveWeight({unit:r||"lb",amount:n,date:i||new Date},(function(e){o.resolve(e)}),(function(e){o.resolve(e)})),o.promise},readWeight:function(n){var r=e.defer();return t.plugins.healthkit.readWeight({unit:n||"lb"},(function(e){r.resolve(e)}),(function(e){r.resolve(e)})),r.promise},saveHeight:function(n,r,i){var o=e.defer();return t.plugins.healthkit.saveHeight({unit:r||"in",amount:n,date:i||new Date},(function(e){o.resolve(e)}),(function(e){o.resolve(e)})),o.promise},readHeight:function(n){var r=e.defer();return t.plugins.healthkit.readHeight({unit:n||"in"},(function(e){r.resolve(e)}),(function(e){r.resolve(e)})),r.promise},findWorkouts:function(){var n=e.defer();return t.plugins.healthkit.findWorkouts({},(function(e){n.resolve(e)}),(function(e){n.resolve(e)})),n.promise},saveWorkout:function(n){var r=e.defer();return t.plugins.healthkit.saveWorkout(n,(function(e){r.resolve(e)}),(function(e){r.resolve(e)})),r.promise},querySampleType:function(n){var r=e.defer();return t.plugins.healthkit.querySampleType(n,(function(e){r.resolve(e)}),(function(e){r.resolve(e)})),r.promise}}}]),angular.module("ngCordova.plugins.httpd",[]).factory("$cordovaHttpd",["$q",function(e){return{startServer:function(t){var n=e.defer();return cordova.plugins.CorHttpd.startServer(t,(function(){n.resolve()}),(function(){n.reject()})),n.promise},stopServer:function(){var t=e.defer();return cordova.plugins.CorHttpd.stopServer((function(){t.resolve()}),(function(){t.reject()})),t.promise},getURL:function(){var t=e.defer();return cordova.plugins.CorHttpd.getURL((function(e){t.resolve(e)}),(function(){t.reject()})),t.promise},getLocalPath:function(){var t=e.defer();return cordova.plugins.CorHttpd.getLocalPath((function(e){t.resolve(e)}),(function(){t.reject()})),t.promise}}}]),angular.module("ngCordova.plugins.iAd",[]).factory("$cordovaiAd",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.iAd.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.iAd.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.iAd.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.iAd.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.iAd.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.iAd.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.iAd.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.iAd.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.imagePicker",[]).factory("$cordovaImagePicker",["$q","$window",function(e,t){return{getPictures:function(n){var r=e.defer();return t.imagePicker.getPictures((function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise}}}]),angular.module("ngCordova.plugins.inAppBrowser",[]).provider("$cordovaInAppBrowser",[function(){var e,t=this.defaultOptions={};this.setDefaultOptions=function(e){t=angular.extend(t,e)},this.$get=["$rootScope","$q","$window","$timeout",function(n,r,i,o){return{open:function(a,s,l){var u=r.defer();if(l&&!angular.isObject(l))return u.reject("options must be an object"),u.promise;var c=angular.extend({},t,l),d=[];angular.forEach(c,(function(e,t){d.push(t+"="+e)}));var h=d.join();return(e=i.open(a,s,h)).addEventListener("loadstart",(function(e){o((function(){n.$broadcast("$cordovaInAppBrowser:loadstart",e)}))}),!1),e.addEventListener("loadstop",(function(e){u.resolve(e),o((function(){n.$broadcast("$cordovaInAppBrowser:loadstop",e)}))}),!1),e.addEventListener("loaderror",(function(e){u.reject(e),o((function(){n.$broadcast("$cordovaInAppBrowser:loaderror",e)}))}),!1),e.addEventListener("exit",(function(e){o((function(){n.$broadcast("$cordovaInAppBrowser:exit",e)}))}),!1),u.promise},close:function(){e.close(),e=null},show:function(){e.show()},executeScript:function(t){var n=r.defer();return e.executeScript(t,(function(e){n.resolve(e)})),n.promise},insertCSS:function(t){var n=r.defer();return e.insertCSS(t,(function(e){n.resolve(e)})),n.promise}}}]}]),angular.module("ngCordova.plugins.insomnia",[]).factory("$cordovaInsomnia",["$window",function(e){return{keepAwake:function(){return e.plugins.insomnia.keepAwake()},allowSleepAgain:function(){return e.plugins.insomnia.allowSleepAgain()}}}]),angular.module("ngCordova.plugins.instagram",[]).factory("$cordovaInstagram",["$q",function(e){return{share:function(t){var n=e.defer();return window.Instagram?(Instagram.share(t.image,t.caption,(function(e){e?n.reject(e):n.resolve(!0)})),n.promise):(console.error("Tried to call Instagram.share but the Instagram plugin isn't installed!"),n.resolve(null),n.promise)},isInstalled:function(){var t=e.defer();return window.Instagram?(Instagram.isInstalled((function(e,n){e?t.reject(e):t.resolve(n)})),t.promise):(console.error("Tried to call Instagram.isInstalled but the Instagram plugin isn't installed!"),t.resolve(null),t.promise)}}}]),angular.module("ngCordova.plugins.keyboard",[]).factory("$cordovaKeyboard",["$rootScope",function(e){var t=function(){e.$evalAsync((function(){e.$broadcast("$cordovaKeyboard:show")}))},n=function(){e.$evalAsync((function(){e.$broadcast("$cordovaKeyboard:hide")}))};return document.addEventListener("deviceready",(function(){cordova.plugins.Keyboard&&(window.addEventListener("native.keyboardshow",t,!1),window.addEventListener("native.keyboardhide",n,!1))})),{hideAccessoryBar:function(e){return cordova.plugins.Keyboard.hideKeyboardAccessoryBar(e)},close:function(){return cordova.plugins.Keyboard.close()},show:function(){return cordova.plugins.Keyboard.show()},disableScroll:function(e){return cordova.plugins.Keyboard.disableScroll(e)},isVisible:function(){return cordova.plugins.Keyboard.isVisible},clearShowWatch:function(){document.removeEventListener("native.keyboardshow",t),e.$$listeners["$cordovaKeyboard:show"]=[]},clearHideWatch:function(){document.removeEventListener("native.keyboardhide",n),e.$$listeners["$cordovaKeyboard:hide"]=[]}}}]),angular.module("ngCordova.plugins.keychain",[]).factory("$cordovaKeychain",["$q",function(e){return{getForKey:function(t,n){var r=e.defer();return(new Keychain).getForKey(r.resolve,r.reject,t,n),r.promise},setForKey:function(t,n,r){var i=e.defer();return(new Keychain).setForKey(i.resolve,i.reject,t,n,r),i.promise},removeForKey:function(t,n){var r=e.defer();return(new Keychain).removeForKey(r.resolve,r.reject,t,n),r.promise}}}]),angular.module("ngCordova.plugins.launchNavigator",[]).factory("$cordovaLaunchNavigator",["$q",function(e){return{navigate:function(t,n,r){var i=e.defer();return launchnavigator.navigate(t,n,(function(){i.resolve()}),(function(e){i.reject(e)}),r),i.promise}}}]),angular.module("ngCordova.plugins.localNotification",[]).factory("$cordovaLocalNotification",["$q","$window","$rootScope","$timeout",function(e,t,n,r){return document.addEventListener("deviceready",(function(){t.cordova&&t.cordova.plugins&&t.cordova.plugins.notification&&t.cordova.plugins.notification.local&&(t.cordova.plugins.notification.local.on("schedule",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:schedule",e,t)}))})),t.cordova.plugins.notification.local.on("trigger",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:trigger",e,t)}))})),t.cordova.plugins.notification.local.on("update",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:update",e,t)}))})),t.cordova.plugins.notification.local.on("clear",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:clear",e,t)}))})),t.cordova.plugins.notification.local.on("clearall",(function(e){r((function(){n.$broadcast("$cordovaLocalNotification:clearall",e)}))})),t.cordova.plugins.notification.local.on("cancel",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:cancel",e,t)}))})),t.cordova.plugins.notification.local.on("cancelall",(function(e){r((function(){n.$broadcast("$cordovaLocalNotification:cancelall",e)}))})),t.cordova.plugins.notification.local.on("click",(function(e,t){r((function(){n.$broadcast("$cordovaLocalNotification:click",e,t)}))})))}),!1),{schedule:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.schedule(n,(function(e){i.resolve(e)}),r),i.promise},add:function(n,r){console.warn('Deprecated: use "schedule" instead.');var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.schedule(n,(function(e){i.resolve(e)}),r),i.promise},update:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.update(n,(function(e){i.resolve(e)}),r),i.promise},clear:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.clear(n,(function(e){i.resolve(e)}),r),i.promise},clearAll:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.clearAll((function(e){r.resolve(e)}),n),r.promise},cancel:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.cancel(n,(function(e){i.resolve(e)}),r),i.promise},cancelAll:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.cancelAll((function(e){r.resolve(e)}),n),r.promise},isPresent:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.isPresent(n,(function(e){i.resolve(e)}),r),i.promise},isScheduled:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.isScheduled(n,(function(e){i.resolve(e)}),r),i.promise},isTriggered:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.isTriggered(n,(function(e){i.resolve(e)}),r),i.promise},hasPermission:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.hasPermission((function(e){e?r.resolve(e):r.reject(e)}),n),r.promise},registerPermission:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.registerPermission((function(e){e?r.resolve(e):r.reject(e)}),n),r.promise},promptForPermission:function(n){console.warn('Deprecated: use "registerPermission" instead.');var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.registerPermission((function(e){e?r.resolve(e):r.reject(e)}),n),r.promise},getAllIds:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getAllIds((function(e){r.resolve(e)}),n),r.promise},getIds:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getIds((function(e){r.resolve(e)}),n),r.promise},getScheduledIds:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getScheduledIds((function(e){r.resolve(e)}),n),r.promise},getTriggeredIds:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getTriggeredIds((function(e){r.resolve(e)}),n),r.promise},get:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.get(n,(function(e){i.resolve(e)}),r),i.promise},getAll:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getAll((function(e){r.resolve(e)}),n),r.promise},getScheduled:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.getScheduled(n,(function(e){i.resolve(e)}),r),i.promise},getAllScheduled:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getAllScheduled((function(e){r.resolve(e)}),n),r.promise},getTriggered:function(n,r){var i=e.defer();return r=r||null,t.cordova.plugins.notification.local.getTriggered(n,(function(e){i.resolve(e)}),r),i.promise},getAllTriggered:function(n){var r=e.defer();return n=n||null,t.cordova.plugins.notification.local.getAllTriggered((function(e){r.resolve(e)}),n),r.promise},getDefaults:function(){return t.cordova.plugins.notification.local.getDefaults()},setDefaults:function(e){t.cordova.plugins.notification.local.setDefaults(e)}}}]),angular.module("ngCordova.plugins.mMediaAds",[]).factory("$cordovaMMediaAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.mMedia.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.mMedia.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.mMedia.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.mMedia.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.mMedia.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.mMedia.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.mMedia.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.mMedia.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.media",[]).service("NewMedia",["$q","$interval",function(e,t){function n(e){angular.isDefined(u)||(u=t((function(){0>h&&(h=e.getDuration(),a&&h>0&&a.notify({duration:h})),e.getCurrentPosition((function(e){e>-1&&(d=e)}),(function(e){alert("Error getting pos="+e)})),a&&a.notify({position:d})}),1e3))}function r(){angular.isDefined(u)&&(t.cancel(u),u=void 0)}function i(){d=-1,h=-1}function o(e){this.media=new Media(e,(function(e){r(),i(),a.resolve(e)}),(function(e){r(),i(),a.reject(e)}),(function(e){c=e,a.notify({status:c})}))}var a,s,l,u,c=null,d=-1,h=-1;return o.prototype.play=function(t){return a=e.defer(),"object"!=typeof t&&(t={}),this.media.play(t),n(this.media),a.promise},o.prototype.pause=function(){r(),this.media.pause()},o.prototype.stop=function(){this.media.stop()},o.prototype.release=function(){this.media.release(),this.media=void 0},o.prototype.seekTo=function(e){this.media.seekTo(e)},o.prototype.setVolume=function(e){this.media.setVolume(e)},o.prototype.startRecord=function(){this.media.startRecord()},o.prototype.stopRecord=function(){this.media.stopRecord()},o.prototype.currentTime=function(){return s=e.defer(),this.media.getCurrentPosition((function(e){s.resolve(e)})),s.promise},o.prototype.getDuration=function(){return l=e.defer(),this.media.getDuration((function(e){l.resolve(e)})),l.promise},o}]).factory("$cordovaMedia",["NewMedia",function(e){return{newMedia:function(t){return new e(t)}}}]),angular.module("ngCordova.plugins.mobfoxAds",[]).factory("$cordovaMobFoxAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.MobFox.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.MobFox.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.MobFox.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.MobFox.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.MobFox.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.MobFox.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.MobFox.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.MobFox.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins",["ngCordova.plugins.3dtouch","ngCordova.plugins.actionSheet","ngCordova.plugins.adMob","ngCordova.plugins.appAvailability","ngCordova.plugins.appRate","ngCordova.plugins.appVersion","ngCordova.plugins.backgroundGeolocation","ngCordova.plugins.badge","ngCordova.plugins.barcodeScanner","ngCordova.plugins.batteryStatus","ngCordova.plugins.beacon","ngCordova.plugins.ble","ngCordova.plugins.bluetoothSerial","ngCordova.plugins.brightness","ngCordova.plugins.calendar","ngCordova.plugins.camera","ngCordova.plugins.capture","ngCordova.plugins.clipboard","ngCordova.plugins.contacts","ngCordova.plugins.datePicker","ngCordova.plugins.device","ngCordova.plugins.deviceMotion","ngCordova.plugins.deviceOrientation","ngCordova.plugins.dialogs","ngCordova.plugins.emailComposer","ngCordova.plugins.facebook","ngCordova.plugins.facebookAds","ngCordova.plugins.file","ngCordova.plugins.fileTransfer","ngCordova.plugins.fileOpener2","ngCordova.plugins.flashlight","ngCordova.plugins.flurryAds","ngCordova.plugins.ga","ngCordova.plugins.geolocation","ngCordova.plugins.globalization","ngCordova.plugins.googleAds","ngCordova.plugins.googleAnalytics","ngCordova.plugins.googleMap","ngCordova.plugins.googlePlayGame","ngCordova.plugins.googlePlus","ngCordova.plugins.healthKit","ngCordova.plugins.httpd","ngCordova.plugins.iAd","ngCordova.plugins.imagePicker","ngCordova.plugins.inAppBrowser","ngCordova.plugins.instagram","ngCordova.plugins.keyboard","ngCordova.plugins.keychain","ngCordova.plugins.launchNavigator","ngCordova.plugins.localNotification","ngCordova.plugins.media","ngCordova.plugins.mMediaAds","ngCordova.plugins.mobfoxAds","ngCordova.plugins.mopubAds","ngCordova.plugins.nativeAudio","ngCordova.plugins.network","ngCordova.plugins.pinDialog","ngCordova.plugins.preferences","ngCordova.plugins.printer","ngCordova.plugins.progressIndicator","ngCordova.plugins.push","ngCordova.plugins.push_v5","ngCordova.plugins.sms","ngCordova.plugins.socialSharing","ngCordova.plugins.spinnerDialog","ngCordova.plugins.splashscreen","ngCordova.plugins.sqlite","ngCordova.plugins.statusbar","ngCordova.plugins.toast","ngCordova.plugins.touchid","ngCordova.plugins.vibration","ngCordova.plugins.videoCapturePlus","ngCordova.plugins.zip","ngCordova.plugins.insomnia"]),angular.module("ngCordova.plugins.mopubAds",[]).factory("$cordovaMoPubAds",["$q","$window",function(e,t){return{setOptions:function(n){var r=e.defer();return t.MoPub.setOptions(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},createBanner:function(n){var r=e.defer();return t.MoPub.createBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},removeBanner:function(){var n=e.defer();return t.MoPub.removeBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},showBanner:function(n){var r=e.defer();return t.MoPub.showBanner(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showBannerAtXY:function(n,r){var i=e.defer();return t.MoPub.showBannerAtXY(n,r,(function(){i.resolve()}),(function(){i.reject()})),i.promise},hideBanner:function(){var n=e.defer();return t.MoPub.hideBanner((function(){n.resolve()}),(function(){n.reject()})),n.promise},prepareInterstitial:function(n){var r=e.defer();return t.MoPub.prepareInterstitial(n,(function(){r.resolve()}),(function(){r.reject()})),r.promise},showInterstitial:function(){var n=e.defer();return t.MoPub.showInterstitial((function(){n.resolve()}),(function(){n.reject()})),n.promise}}}]),angular.module("ngCordova.plugins.nativeAudio",[]).factory("$cordovaNativeAudio",["$q","$window",function(e,t){return{preloadSimple:function(n,r){var i=e.defer();return t.plugins.NativeAudio.preloadSimple(n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise},preloadComplex:function(n,r,i,o,a){var s=e.defer();return t.plugins.NativeAudio.preloadComplex(n,r,i,o,a,(function(e){s.resolve(e)}),(function(e){s.reject(e)})),s.promise},play:function(n,r){var i=e.defer();return t.plugins.NativeAudio.play(n,(function(e){i.resolve(e)}),(function(e){i.reject(e)}),r),i.promise},stop:function(n){var r=e.defer();return t.plugins.NativeAudio.stop(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},loop:function(n){var r=e.defer();return t.plugins.NativeAudio.loop(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},unload:function(n){var r=e.defer();return t.plugins.NativeAudio.unload(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},setVolumeForComplexAsset:function(n,r){var i=e.defer();return t.plugins.NativeAudio.setVolumeForComplexAsset(n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise}}}]),angular.module("ngCordova.plugins.network",[]).factory("$cordovaNetwork",["$rootScope","$timeout",function(e,t){var n=function(){var n=navigator.connection.type;t((function(){e.$broadcast("$cordovaNetwork:offline",n)}))},r=function(){var n=navigator.connection.type;t((function(){e.$broadcast("$cordovaNetwork:online",n)}))};return document.addEventListener("deviceready",(function(){navigator.connection&&(document.addEventListener("offline",n,!1),document.addEventListener("online",r,!1))})),{getNetwork:function(){return navigator.connection.type},isOnline:function(){var e=navigator.connection.type;return e!==Connection.UNKNOWN&&e!==Connection.NONE},isOffline:function(){var e=navigator.connection.type;return e===Connection.UNKNOWN||e===Connection.NONE},clearOfflineWatch:function(){document.removeEventListener("offline",n),e.$$listeners["$cordovaNetwork:offline"]=[]},clearOnlineWatch:function(){document.removeEventListener("online",r),e.$$listeners["$cordovaNetwork:online"]=[]}}}]).run(["$injector",function(e){e.get("$cordovaNetwork")}]),angular.module("ngCordova.plugins.pinDialog",[]).factory("$cordovaPinDialog",["$q","$window",function(e,t){return{prompt:function(n,r,i){var o=e.defer();return t.plugins.pinDialog.prompt(n,(function(e){o.resolve(e)}),r,i),o.promise}}}]),angular.module("ngCordova.plugins.preferences",[]).factory("$cordovaPreferences",["$window","$q",function(e,t){return{pluginNotEnabledMessage:"Plugin not enabled",decoratePromise:function(e){e.success=function(t){return e.then(t),e},e.error=function(t){return e.then(null,t),e}},store:function(n,r,i){function o(e){s.resolve(e)}function a(e){s.reject(new Error(e))}var s=t.defer(),l=s.promise;return e.plugins?(3===arguments.length?e.plugins.appPreferences.store(i,n,r):e.plugins.appPreferences.store(n,r)).then(o,a):s.reject(new Error(this.pluginNotEnabledMessage)),this.decoratePromise(l),l},fetch:function(n,r){function i(e){a.resolve(e)}function o(e){a.reject(new Error(e))}var a=t.defer(),s=a.promise;return e.plugins?(2===arguments.length?e.plugins.appPreferences.fetch(r,n):e.plugins.appPreferences.fetch(n)).then(i,o):a.reject(new Error(this.pluginNotEnabledMessage)),this.decoratePromise(s),s},remove:function(n,r){function i(e){a.resolve(e)}function o(e){a.reject(new Error(e))}var a=t.defer(),s=a.promise;return e.plugins?(2===arguments.length?e.plugins.appPreferences.remove(r,n):e.plugins.appPreferences.remove(n)).then(i,o):a.reject(new Error(this.pluginNotEnabledMessage)),this.decoratePromise(s),s},show:function(){var n=t.defer(),r=n.promise;return e.plugins?e.plugins.appPreferences.show().then((function(e){n.resolve(e)}),(function(e){n.reject(new Error(e))})):n.reject(new Error(this.pluginNotEnabledMessage)),this.decoratePromise(r),r}}}]),angular.module("ngCordova.plugins.printer",[]).factory("$cordovaPrinter",["$q","$window",function(e,t){return{isAvailable:function(){var n=e.defer();return t.plugin.printer.isAvailable((function(e){n.resolve(e)})),n.promise},print:function(n,r){var i=e.defer();return t.plugin.printer.print(n,r,(function(){i.resolve()})),i.promise}}}]),angular.module("ngCordova.plugins.progressIndicator",[]).factory("$cordovaProgress",[function(){return{show:function(e){var t=e||"Please wait...";return ProgressIndicator.show(t)},showSimple:function(e){var t=e||!1;return ProgressIndicator.showSimple(t)},showSimpleWithLabel:function(e,t){var n=e||!1,r=t||"Loading...";return ProgressIndicator.showSimpleWithLabel(n,r)},showSimpleWithLabelDetail:function(e,t,n){var r=e||!1,i=t||"Loading...",o=n||"Please wait";return ProgressIndicator.showSimpleWithLabelDetail(r,i,o)},showDeterminate:function(e,t){var n=e||!1,r=t||5e4;return ProgressIndicator.showDeterminate(n,r)},showDeterminateWithLabel:function(e,t,n){var r=e||!1,i=t||5e4,o=n||"Loading...";return ProgressIndicator.showDeterminateWithLabel(r,i,o)},showAnnular:function(e,t){var n=e||!1,r=t||5e4;return ProgressIndicator.showAnnular(n,r)},showAnnularWithLabel:function(e,t,n){var r=e||!1,i=t||5e4,o=n||"Loading...";return ProgressIndicator.showAnnularWithLabel(r,i,o)},showBar:function(e,t){var n=e||!1,r=t||5e4;return ProgressIndicator.showBar(n,r)},showBarWithLabel:function(e,t,n){var r=e||!1,i=t||5e4,o=n||"Loading...";return ProgressIndicator.showBarWithLabel(r,i,o)},showSuccess:function(e,t){var n=e||!1,r=t||"Success";return ProgressIndicator.showSuccess(n,r)},showText:function(e,t,n){var r=e||!1,i=t||"Warning",o=n||"center";return ProgressIndicator.showText(r,i,o)},hide:function(){return ProgressIndicator.hide()}}}]),angular.module("ngCordova.plugins.push",[]).factory("$cordovaPush",["$q","$window","$rootScope","$timeout",function(e,t,n,r){return{onNotification:function(e){r((function(){n.$broadcast("$cordovaPush:notificationReceived",e)}))},register:function(n){var r,i=e.defer();return void 0!==n&&void 0===n.ecb&&(r=null===document.querySelector("[ng-app]")?"document.body":"document.querySelector('[ng-app]')",n.ecb="angular.element("+r+").injector().get('$cordovaPush').onNotification"),t.plugins.pushNotification.register((function(e){i.resolve(e)}),(function(e){i.reject(e)}),n),i.promise},unregister:function(n){var r=e.defer();return t.plugins.pushNotification.unregister((function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise},setBadgeNumber:function(n){var r=e.defer();return t.plugins.pushNotification.setApplicationIconBadgeNumber((function(e){r.resolve(e)}),(function(e){r.reject(e)}),n),r.promise}}}]),angular.module("ngCordova.plugins.push_v5",[]).factory("$cordovaPushV5",["$q","$rootScope","$timeout",function(e,t,n){var r;return{initialize:function(t){var n=e.defer();return r=PushNotification.init(t),n.resolve(r),n.promise},onNotification:function(){n((function(){r.on("notification",(function(e){t.$emit("$cordovaPushV5:notificationReceived",e)}))}))},onError:function(){n((function(){r.on("error",(function(e){t.$emit("$cordovaPushV5:errorOccurred",e)}))}))},register:function(){var t=e.defer();return void 0===r?t.reject(new Error("init must be called before any other operation")):r.on("registration",(function(e){t.resolve(e.registrationId)})),t.promise},unregister:function(){var t=e.defer();return void 0===r?t.reject(new Error("init must be called before any other operation")):r.unregister((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},getBadgeNumber:function(){var t=e.defer();return void 0===r?t.reject(new Error("init must be called before any other operation")):r.getApplicationIconBadgeNumber((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise},setBadgeNumber:function(t){var n=e.defer();return void 0===r?n.reject(new Error("init must be called before any other operation")):r.setApplicationIconBadgeNumber((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t),n.promise},finish:function(){var t=e.defer();return void 0===r?t.reject(new Error("init must be called before any other operation")):r.finish((function(e){t.resolve(e)}),(function(e){t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.recentsControl",[]).factory("$cordovaRecents",(function(){return{setColor:function(e){return RecentsControl.setColor(e)},setDescription:function(e){return RecentsControl.setDescription(e)},setOptions:function(e,t){return RecentsControl.setOptions(e,t)}}})),angular.module("ngCordova.plugins.screenshot",[]).factory("$cordovaScreenshot",["$q",function(e){return{captureToFile:function(t){var n=t||{},r=n.extension||"jpg",i=n.quality||"100",o=e.defer();return navigator.screenshot?(navigator.screenshot.save((function(e,t){e?o.reject(e):o.resolve(t.filePath)}),r,i,n.filename),o.promise):(o.resolve(null),o.promise)},captureToUri:function(t){var n=t||{},r=n.extension||"jpg",i=n.quality||"100",o=e.defer();return navigator.screenshot?(navigator.screenshot.URI((function(e,t){e?o.reject(e):o.resolve(t.URI)}),r,i,n.filename),o.promise):(o.resolve(null),o.promise)}}}]),angular.module("ngCordova.plugins.serial",[]).factory("$cordovaSerial",["$q",function(e){return{requestPermission:function(t){var n=e.defer();return serial.requestPermission(t,(function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},open:function(t){var n=e.defer();return serial.open(t,(function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},write:function(t){var n=e.defer();return serial.write(t,(function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},writeHex:function(t){var n=e.defer();return serial.writeHex(t,(function(){n.resolve()}),(function(e){n.reject(e)})),n.promise},read:function(){var t=e.defer();return serial.read((function(e){var n=new Uint8Array(e);t.resolve(n)}),(function(e){t.reject(e)})),t.promise},registerReadCallback:function(e,t){serial.registerReadCallback((function(t){var n=new Uint8Array(t);e(n)}),t)},close:function(){var t=e.defer();return serial.close((function(){t.resolve()}),(function(e){t.reject(e)})),t.promise}}}]),angular.module("ngCordova.plugins.sms",[]).factory("$cordovaSms",["$q",function(e){return{send:function(t,n,r){var i=e.defer();return sms.send(t,n,r,(function(e){i.resolve(e)}),(function(e){i.reject(e)})),i.promise}}}]),angular.module("ngCordova.plugins.socialSharing",[]).factory("$cordovaSocialSharing",["$q","$window",function(e,t){return{share:function(n,r,i,o){var a=e.defer();return r=r||null,i=i||null,o=o||null,t.plugins.socialsharing.share(n,r,i,o,(function(){a.resolve(!0)}),(function(){a.reject(!1)})),a.promise},shareWithOptions:function(n){var r=e.defer();return t.plugins.socialsharing.shareWithOptions(n,(function(){r.resolve(!0)}),(function(){r.reject(!1)})),r.promise},shareViaTwitter:function(n,r,i){var o=e.defer();return r=r||null,i=i||null,t.plugins.socialsharing.shareViaTwitter(n,r,i,(function(){o.resolve(!0)}),(function(){o.reject(!1)})),o.promise},shareViaWhatsApp:function(n,r,i){var o=e.defer();return r=r||null,i=i||null,t.plugins.socialsharing.shareViaWhatsApp(n,r,i,(function(){o.resolve(!0)}),(function(){o.reject(!1)})),o.promise},shareViaFacebook:function(n,r,i){var o=e.defer();return n=n||null,r=r||null,i=i||null,t.plugins.socialsharing.shareViaFacebook(n,r,i,(function(){o.resolve(!0)}),(function(){o.reject(!1)})),o.promise},shareViaFacebookWithPasteMessageHint:function(n,r,i,o){var a=e.defer();return r=r||null,i=i||null,t.plugins.socialsharing.shareViaFacebookWithPasteMessageHint(n,r,i,o,(function(){a.resolve(!0)}),(function(){a.reject(!1)})),a.promise},shareViaSMS:function(n,r){var i=e.defer();return t.plugins.socialsharing.shareViaSMS(n,r,(function(){i.resolve(!0)}),(function(){i.reject(!1)})),i.promise},shareViaEmail:function(n,r,i,o,a,s){var l=e.defer();return i=i||null,o=o||null,a=a||null,s=s||null,t.plugins.socialsharing.shareViaEmail(n,r,i,o,a,s,(function(){l.resolve(!0)}),(function(){l.reject(!1)})),l.promise},shareVia:function(n,r,i,o,a){var s=e.defer();return r=r||null,i=i||null,o=o||null,a=a||null,t.plugins.socialsharing.shareVia(n,r,i,o,a,(function(){s.resolve(!0)}),(function(){s.reject(!1)})),s.promise},canShareViaEmail:function(){var n=e.defer();return t.plugins.socialsharing.canShareViaEmail((function(){n.resolve(!0)}),(function(){n.reject(!1)})),n.promise},canShareVia:function(n,r,i,o,a){var s=e.defer();return t.plugins.socialsharing.canShareVia(n,r,i,o,a,(function(e){s.resolve(e)}),(function(e){s.reject(e)})),s.promise},available:function(){var t=e.defer();return window.plugins.socialsharing.available((function(e){e?t.resolve():t.reject()})),t.promise}}}]),angular.module("ngCordova.plugins.spinnerDialog",[]).factory("$cordovaSpinnerDialog",["$window",function(e){return{show:function(t,n,r,i){return r=r||!1,e.plugins.spinnerDialog.show(t,n,r,i)},hide:function(){return e.plugins.spinnerDialog.hide()}}}]),angular.module("ngCordova.plugins.splashscreen",[]).factory("$cordovaSplashscreen",[function(){return{hide:function(){return navigator.splashscreen.hide()},show:function(){return navigator.splashscreen.show()}}}]),angular.module("ngCordova.plugins.sqlite",[]).factory("$cordovaSQLite",["$q","$window",function(e,t){return{openDB:function(e,n){return angular.isObject(e)&&!angular.isString(e)?(void 0!==n&&(e.bgType=n),t.sqlitePlugin.openDatabase(e)):t.sqlitePlugin.openDatabase({name:e,bgType:n})},execute:function(t,n,r){var i=e.defer();return t.transaction((function(e){e.executeSql(n,r,(function(e,t){i.resolve(t)}),(function(e,t){i.reject(t)}))})),i.promise},insertCollection:function(t,n,r){var i=e.defer(),o=r.slice(0);return t.transaction((function(e){!function t(){var r=o.splice(0,1)[0];try{e.executeSql(n,r,(function(e,n){0===o.length?i.resolve(n):t()}),(function(e,t){i.reject(t)}))}catch(e){i.reject(e)}}()})),i.promise},nestedExecute:function(t,n,r,i,o){var a=e.defer();return t.transaction((function(e){e.executeSql(n,i,(function(e,t){a.resolve(t),e.executeSql(r,o,(function(e,t){a.resolve(t)}))}))}),(function(e,t){a.reject(t)})),a.promise},deleteDB:function(n){var r=e.defer();return t.sqlitePlugin.deleteDatabase(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise}}}]),angular.module("ngCordova.plugins.statusbar",[]).factory("$cordovaStatusbar",[function(){return{overlaysWebView:function(e){return StatusBar.overlaysWebView(!!e)},STYLES:{DEFAULT:0,LIGHT_CONTENT:1,BLACK_TRANSLUCENT:2,BLACK_OPAQUE:3},style:function(e){switch(e){case 0:return StatusBar.styleDefault();case 1:return StatusBar.styleLightContent();case 2:return StatusBar.styleBlackTranslucent();case 3:return StatusBar.styleBlackOpaque();default:return StatusBar.styleDefault()}},styleColor:function(e){return StatusBar.backgroundColorByName(e)},styleHex:function(e){return StatusBar.backgroundColorByHexString(e)},hide:function(){return StatusBar.hide()},show:function(){return StatusBar.show()},isVisible:function(){return StatusBar.isVisible}}}]),angular.module("ngCordova.plugins.toast",[]).factory("$cordovaToast",["$q","$window",function(e,t){return{showShortTop:function(n){var r=e.defer();return t.plugins.toast.showShortTop(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showShortCenter:function(n){var r=e.defer();return t.plugins.toast.showShortCenter(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showShortBottom:function(n){var r=e.defer();return t.plugins.toast.showShortBottom(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showLongTop:function(n){var r=e.defer();return t.plugins.toast.showLongTop(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showLongCenter:function(n){var r=e.defer();return t.plugins.toast.showLongCenter(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showLongBottom:function(n){var r=e.defer();return t.plugins.toast.showLongBottom(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},showWithOptions:function(n){var r=e.defer();return t.plugins.toast.showWithOptions(n,(function(e){r.resolve(e)}),(function(e){r.reject(e)})),r.promise},show:function(n,r,i){var o=e.defer();return t.plugins.toast.show(n,r,i,(function(e){o.resolve(e)}),(function(e){o.reject(e)})),o.promise},hide:function(){var n=e.defer();try{t.plugins.toast.hide(),n.resolve()}catch(e){n.reject(e&&e.message)}return n.promise}}}]),angular.module("ngCordova.plugins.touchid",[]).factory("$cordovaTouchID",["$q",function(e){return{checkSupport:function(){var t=e.defer();return window.cordova?touchid.checkSupport((function(e){t.resolve(e)}),(function(e){t.reject(e)})):t.reject("Not supported without cordova.js"),t.promise},authenticate:function(t){var n=e.defer();return window.cordova?touchid.authenticate((function(e){n.resolve(e)}),(function(e){n.reject(e)}),t):n.reject("Not supported without cordova.js"),n.promise}}}]),angular.module("ngCordova.plugins.tts",[]).factory("$cordovaTTS",(function(){return{speak:function(e,t,n){return TTS.speak(e,t,n)}}})),angular.module("ngCordova.plugins.upsPush",[]).factory("$cordovaUpsPush",["$q","$window","$rootScope","$timeout",function(e,t,n,r){return{register:function(i){var o=e.defer();return t.push.register((function(e){r((function(){n.$broadcast("$cordovaUpsPush:notificationReceived",e)}))}),(function(){o.resolve()}),(function(e){o.reject(e)}),i),o.promise},unregister:function(n){var r=e.defer();return t.push.unregister((function(){r.resolve()}),(function(e){r.reject(e)}),n),r.promise},setBadgeNumber:function(n){var r=e.defer();return t.push.setApplicationIconBadgeNumber((function(){r.resolve()}),n),r.promise}}}]),angular.module("ngCordova.plugins.vibration",[]).factory("$cordovaVibration",[function(){return{vibrate:function(e){return navigator.notification.vibrate(e)},vibrateWithPattern:function(e,t){return navigator.notification.vibrateWithPattern(e,t)},cancelVibration:function(){return navigator.notification.cancelVibration()}}}]),angular.module("ngCordova.plugins.videoCapturePlus",[]).provider("$cordovaVideoCapturePlus",[function(){var e={};this.setLimit=function(t){e.limit=t},this.setMaxDuration=function(t){e.duration=t},this.setHighQuality=function(t){e.highquality=t},this.useFrontCamera=function(t){e.frontcamera=t},this.setPortraitOverlay=function(t){e.portraitOverlay=t},this.setLandscapeOverlay=function(t){e.landscapeOverlay=t},this.setOverlayText=function(t){e.overlayText=t},this.$get=["$q","$window",function(t,n){return{captureVideo:function(r){var i=t.defer();return n.plugins.videocaptureplus?(n.plugins.videocaptureplus.captureVideo(i.resolve,i.reject,angular.extend({},e,r)),i.promise):(i.resolve(null),i.promise)}}}]}]),angular.module("ngCordova.plugins.zip",[]).factory("$cordovaZip",["$q","$window",function(e,t){return{unzip:function(n,r){var i=e.defer();return t.zip.unzip(n,r,(function(e){0===e?i.resolve():i.reject()}),(function(e){i.notify(e)})),i.promise}}}]),function(e,t,n){var r=e.L,i={version:"0.7.7"};"object"==typeof module&&"object"==typeof module.exports?module.exports=i:"function"==typeof define&&define.amd&&define(i),i.noConflict=function(){return e.L=r,this},e.L=i,i.Util={extend:function(e){var t,n,r,i,o=Array.prototype.slice.call(arguments,1);for(n=0,r=o.length;r>n;n++)for(t in i=o[n]||{})i.hasOwnProperty(t)&&(e[t]=i[t]);return e},bind:function(e,t){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";return function(n){return n[t]=n[t]||++e,n[t]}}(),invokeEach:function(e,t,n){var r,i;if("object"==typeof e){for(r in i=Array.prototype.slice.call(arguments,3),e)t.apply(n,[r,e[r]].concat(i));return!0}return!1},limitExecByInterval:function(e,t,n){var r,i;return function o(){var a=arguments;return r?void(i=!0):(r=!0,setTimeout((function(){r=!1,i&&(o.apply(n,a),i=!1)}),t),void e.apply(n,a))}},falseFn:function(){return!1},formatNum:function(e,t){var n=Math.pow(10,t||5);return Math.round(e*n)/n},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return i.Util.trim(e).split(/\s+/)},setOptions:function(e,t){return e.options=i.extend({},e.options,t),e.options},getParamString:function(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,(function(e,r){var i=t[r];if(i===n)throw new Error("No value provided for variable "+e);return"function"==typeof i&&(i=i(t)),i}))},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var n,r,i=["webkit","moz","o","ms"];for(n=0;n<i.length&&!r;n++)r=e[i[n]+t];return r}function n(t){var n=+new Date,i=Math.max(0,16-(n-r));return r=n+i,e.setTimeout(t,i)}var r=0,o=e.requestAnimationFrame||t("RequestAnimationFrame")||n,a=e.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){e.clearTimeout(t)};i.Util.requestAnimFrame=function(t,r,a,s){return t=i.bind(t,r),a&&o===n?void t():o.call(e,t,s)},i.Util.cancelAnimFrame=function(t){t&&a.call(e,t)}}(),i.extend=i.Util.extend,i.bind=i.Util.bind,i.stamp=i.Util.stamp,i.setOptions=i.Util.setOptions,i.Class=function(){},i.Class.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},n=function(){};n.prototype=this.prototype;var r=new n;for(var o in r.constructor=t,t.prototype=r,this)this.hasOwnProperty(o)&&"prototype"!==o&&(t[o]=this[o]);e.statics&&(i.extend(t,e.statics),delete e.statics),e.includes&&(i.Util.extend.apply(null,[r].concat(e.includes)),delete e.includes),e.options&&r.options&&(e.options=i.extend({},r.options,e.options)),i.extend(r,e),r._initHooks=[];var a=this;return t.__super__=a.prototype,r.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=r._initHooks.length;t>e;e++)r._initHooks[e].call(this)}},t},i.Class.include=function(e){i.extend(this.prototype,e)},i.Class.mergeOptions=function(e){i.extend(this.prototype.options,e)},i.Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n)};var o="_leaflet_events";i.Mixin={},i.Mixin.Events={addEventListener:function(e,t,n){if(i.Util.invokeEach(e,this.addEventListener,this,t,n))return this;var r,a,s,l,u,c,d,h=this[o]=this[o]||{},f=n&&n!==this&&i.stamp(n);for(r=0,a=(e=i.Util.splitWords(e)).length;a>r;r++)s={action:t,context:n||this},l=e[r],f?(c=(u=l+"_idx")+"_len",(d=h[u]=h[u]||{})[f]||(d[f]=[],h[c]=(h[c]||0)+1),d[f].push(s)):(h[l]=h[l]||[],h[l].push(s));return this},hasEventListeners:function(e){var t=this[o];return!!t&&(e in t&&t[e].length>0||e+"_idx"in t&&t[e+"_idx_len"]>0)},removeEventListener:function(e,t,n){if(!this[o])return this;if(!e)return this.clearAllEventListeners();if(i.Util.invokeEach(e,this.removeEventListener,this,t,n))return this;var r,a,s,l,u,c,d,h,f=this[o],p=n&&n!==this&&i.stamp(n);for(r=0,a=(e=i.Util.splitWords(e)).length;a>r;r++)if(d=(c=(s=e[r])+"_idx")+"_len",h=f[c],t){if(l=p&&h?h[p]:f[s]){for(u=l.length-1;u>=0;u--)l[u].action!==t||n&&l[u].context!==n||(l.splice(u,1)[0].action=i.Util.falseFn);n&&h&&0===l.length&&(delete h[p],f[d]--)}}else delete f[s],delete f[c],delete f[d];return this},clearAllEventListeners:function(){return delete this[o],this},fireEvent:function(e,t){if(!this.hasEventListeners(e))return this;var n,r,a,s,l,u=i.Util.extend({},t,{type:e,target:this}),c=this[o];if(c[e])for(r=0,a=(n=c[e].slice()).length;a>r;r++)n[r].action.call(n[r].context,u);for(l in s=c[e+"_idx"])if(n=s[l].slice())for(r=0,a=n.length;a>r;r++)n[r].action.call(n[r].context,u);return this},addOneTimeEventListener:function(e,t,n){if(i.Util.invokeEach(e,this.addOneTimeEventListener,this,t,n))return this;var r=i.bind((function(){this.removeEventListener(e,t,n).removeEventListener(e,r,n)}),this);return this.addEventListener(e,t,n).addEventListener(e,r,n)}},i.Mixin.Events.on=i.Mixin.Events.addEventListener,i.Mixin.Events.off=i.Mixin.Events.removeEventListener,i.Mixin.Events.once=i.Mixin.Events.addOneTimeEventListener,i.Mixin.Events.fire=i.Mixin.Events.fireEvent,function(){var r="ActiveXObject"in e,o=r&&!t.addEventListener,a=navigator.userAgent.toLowerCase(),s=-1!==a.indexOf("webkit"),l=-1!==a.indexOf("chrome"),u=-1!==a.indexOf("phantom"),c=-1!==a.indexOf("android"),d=-1!==a.search("android [23]"),h=-1!==a.indexOf("gecko"),f=typeof orientation!=n+"",p=!e.PointerEvent&&e.MSPointerEvent,m=e.PointerEvent&&e.navigator.pointerEnabled||p,g="devicePixelRatio"in e&&e.devicePixelRatio>1||"matchMedia"in e&&e.matchMedia("(min-resolution:144dpi)")&&e.matchMedia("(min-resolution:144dpi)").matches,v=t.documentElement,_=r&&"transition"in v.style,y="WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix&&!d,b="MozPerspective"in v.style,w="OTransition"in v.style,L=!e.L_DISABLE_3D&&(_||y||b||w)&&!u,M=!e.L_NO_TOUCH&&!u&&(m||"ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch);i.Browser={ie:r,ielt9:o,webkit:s,gecko:h&&!s&&!e.opera&&!r,android:c,android23:d,chrome:l,ie3d:_,webkit3d:y,gecko3d:b,opera3d:w,any3d:L,mobile:f,mobileWebkit:f&&s,mobileWebkit3d:f&&y,mobileOpera:f&&e.opera,touch:M,msPointer:p,pointer:m,retina:g}}(),i.Point=function(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t},i.Point.prototype={clone:function(){return new i.Point(this.x,this.y)},add:function(e){return this.clone()._add(i.point(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(i.point(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(e){var t=(e=i.point(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=i.point(e)).x===this.x&&e.y===this.y},contains:function(e){return e=i.point(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+i.Util.formatNum(this.x)+", "+i.Util.formatNum(this.y)+")"}},i.point=function(e,t,r){return e instanceof i.Point?e:i.Util.isArray(e)?new i.Point(e[0],e[1]):e===n||null===e?e:new i.Point(e,t,r)},i.Bounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},i.Bounds.prototype={extend:function(e){return e=i.point(e),this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=e.clone(),this.max=e.clone()),this},getCenter:function(e){return new i.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new i.Point(this.min.x,this.max.y)},getTopRight:function(){return new i.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e="number"==typeof e[0]||e instanceof i.Point?i.point(e):i.bounds(e))instanceof i.Bounds?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=i.bounds(e);var t=this.min,n=this.max,r=e.min,o=e.max,a=o.x>=t.x&&r.x<=n.x,s=o.y>=t.y&&r.y<=n.y;return a&&s},isValid:function(){return!(!this.min||!this.max)}},i.bounds=function(e,t){return!e||e instanceof i.Bounds?e:new i.Bounds(e,t)},i.Transformation=function(e,t,n,r){this._a=e,this._b=t,this._c=n,this._d=r},i.Transformation.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new i.Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},i.DomUtil={get:function(e){return"string"==typeof e?t.getElementById(e):e},getStyle:function(e,n){var r=e.style[n];if(!r&&e.currentStyle&&(r=e.currentStyle[n]),(!r||"auto"===r)&&t.defaultView){var i=t.defaultView.getComputedStyle(e,null);r=i?i[n]:null}return"auto"===r?null:r},getViewportOffset:function(e){var n,r=0,o=0,a=e,s=t.body,l=t.documentElement;do{if(r+=a.offsetTop||0,o+=a.offsetLeft||0,r+=parseInt(i.DomUtil.getStyle(a,"borderTopWidth"),10)||0,o+=parseInt(i.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,n=i.DomUtil.getStyle(a,"position"),a.offsetParent===s&&"absolute"===n)break;if("fixed"===n){r+=s.scrollTop||l.scrollTop||0,o+=s.scrollLeft||l.scrollLeft||0;break}if("relative"===n&&!a.offsetLeft){var u=i.DomUtil.getStyle(a,"width"),c=i.DomUtil.getStyle(a,"max-width"),d=a.getBoundingClientRect();("none"!==u||"none"!==c)&&(o+=d.left+a.clientLeft),r+=d.top+(s.scrollTop||l.scrollTop||0);break}a=a.offsetParent}while(a);a=e;do{if(a===s)break;r-=a.scrollTop||0,o-=a.scrollLeft||0,a=a.parentNode}while(a);return new i.Point(o,r)},documentIsLtr:function(){return i.DomUtil._docIsLtrCached||(i.DomUtil._docIsLtrCached=!0,i.DomUtil._docIsLtr="ltr"===i.DomUtil.getStyle(t.body,"direction")),i.DomUtil._docIsLtr},create:function(e,n,r){var i=t.createElement(e);return i.className=n,r&&r.appendChild(i),i},hasClass:function(e,t){if(e.classList!==n)return e.classList.contains(t);var r=i.DomUtil._getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)},addClass:function(e,t){if(e.classList!==n)for(var r=i.Util.splitWords(t),o=0,a=r.length;a>o;o++)e.classList.add(r[o]);else if(!i.DomUtil.hasClass(e,t)){var s=i.DomUtil._getClass(e);i.DomUtil._setClass(e,(s?s+" ":"")+t)}},removeClass:function(e,t){e.classList!==n?e.classList.remove(t):i.DomUtil._setClass(e,i.Util.trim((" "+i.DomUtil._getClass(e)+" ").replace(" "+t+" "," ")))},_setClass:function(e,t){e.className.baseVal===n?e.className=t:e.className.baseVal=t},_getClass:function(e){return e.className.baseVal===n?e.className:e.className.baseVal},setOpacity:function(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(r)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"}},testProp:function(e){for(var n=t.documentElement.style,r=0;r<e.length;r++)if(e[r]in n)return e[r];return!1},getTranslateString:function(e){var t=i.Browser.webkit3d,n=(t?",0":"")+")";return"translate"+(t?"3d":"")+"("+e.x+"px,"+e.y+"px"+n},getScaleString:function(e,t){return i.DomUtil.getTranslateString(t.add(t.multiplyBy(-1*e)))+" scale("+e+") "},setPosition:function(e,t,n){e._leaflet_pos=t,!n&&i.Browser.any3d?e.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(t):(e.style.left=t.x+"px",e.style.top=t.y+"px")},getPosition:function(e){return e._leaflet_pos}},i.DomUtil.TRANSFORM=i.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),i.DomUtil.TRANSITION=i.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),i.DomUtil.TRANSITION_END="webkitTransition"===i.DomUtil.TRANSITION||"OTransition"===i.DomUtil.TRANSITION?i.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in t)i.extend(i.DomUtil,{disableTextSelection:function(){i.DomEvent.on(e,"selectstart",i.DomEvent.preventDefault)},enableTextSelection:function(){i.DomEvent.off(e,"selectstart",i.DomEvent.preventDefault)}});else{var n=i.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);i.extend(i.DomUtil,{disableTextSelection:function(){if(n){var e=t.documentElement.style;this._userSelect=e[n],e[n]="none"}},enableTextSelection:function(){n&&(t.documentElement.style[n]=this._userSelect,delete this._userSelect)}})}i.extend(i.DomUtil,{disableImageDrag:function(){i.DomEvent.on(e,"dragstart",i.DomEvent.preventDefault)},enableImageDrag:function(){i.DomEvent.off(e,"dragstart",i.DomEvent.preventDefault)}})}(),i.LatLng=function(e,t,r){if(e=parseFloat(e),t=parseFloat(t),isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=e,this.lng=t,r!==n&&(this.alt=parseFloat(r))},i.extend(i.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),i.LatLng.prototype={equals:function(e){return!!e&&(e=i.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=i.LatLng.MAX_MARGIN)},toString:function(e){return"LatLng("+i.Util.formatNum(this.lat,e)+", "+i.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){e=i.latLng(e);var t=i.LatLng.DEG_TO_RAD,n=(e.lat-this.lat)*t,r=(e.lng-this.lng)*t,o=this.lat*t,a=e.lat*t,s=Math.sin(n/2),l=Math.sin(r/2),u=s*s+l*l*Math.cos(o)*Math.cos(a);return 12756274*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(e,t){var n=this.lng;return n=(n+(t=t||180))%(t-(e=e||-180))+(e>n||n===t?t:e),new i.LatLng(this.lat,n)}},i.latLng=function(e,t){return e instanceof i.LatLng?e:i.Util.isArray(e)?"number"==typeof e[0]||"string"==typeof e[0]?new i.LatLng(e[0],e[1],e[2]):null:e===n||null===e?e:"object"==typeof e&&"lat"in e?new i.LatLng(e.lat,"lng"in e?e.lng:e.lon):t===n?null:new i.LatLng(e,t)},i.LatLngBounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},i.LatLngBounds.prototype={extend:function(e){if(!e)return this;var t=i.latLng(e);return(e=null!==t?t:i.latLngBounds(e))instanceof i.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(e.lat,this._southWest.lat),this._southWest.lng=Math.min(e.lng,this._southWest.lng),this._northEast.lat=Math.max(e.lat,this._northEast.lat),this._northEast.lng=Math.max(e.lng,this._northEast.lng)):(this._southWest=new i.LatLng(e.lat,e.lng),this._northEast=new i.LatLng(e.lat,e.lng)):e instanceof i.LatLngBounds&&(this.extend(e._southWest),this.extend(e._northEast)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,o=Math.abs(t.lng-n.lng)*e;return new i.LatLngBounds(new i.LatLng(t.lat-r,t.lng-o),new i.LatLng(n.lat+r,n.lng+o))},getCenter:function(){return new i.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new i.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new i.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof i.LatLng?i.latLng(e):i.latLngBounds(e);var t,n,r=this._southWest,o=this._northEast;return e instanceof i.LatLngBounds?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=r.lat&&n.lat<=o.lat&&t.lng>=r.lng&&n.lng<=o.lng},intersects:function(e){e=i.latLngBounds(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),o=e.getNorthEast(),a=o.lat>=t.lat&&r.lat<=n.lat,s=o.lng>=t.lng&&r.lng<=n.lng;return a&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e){return!!e&&(e=i.latLngBounds(e),this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},i.latLngBounds=function(e,t){return!e||e instanceof i.LatLngBounds?e:new i.LatLngBounds(e,t)},i.Projection={},i.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(e){var t=i.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),o=e.lng*t,a=r*t;return a=Math.log(Math.tan(Math.PI/4+a/2)),new i.Point(o,a)},unproject:function(e){var t=i.LatLng.RAD_TO_DEG,n=e.x*t,r=(2*Math.atan(Math.exp(e.y))-Math.PI/2)*t;return new i.LatLng(r,n)}},i.Projection.LonLat={project:function(e){return new i.Point(e.lng,e.lat)},unproject:function(e){return new i.LatLng(e.y,e.x)}},i.CRS={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},scale:function(e){return 256*Math.pow(2,e)},getSize:function(e){var t=this.scale(e);return i.point(t,t)}},i.CRS.Simple=i.extend({},i.CRS,{projection:i.Projection.LonLat,transformation:new i.Transformation(1,0,-1,0),scale:function(e){return Math.pow(2,e)}}),i.CRS.EPSG3857=i.extend({},i.CRS,{code:"EPSG:3857",projection:i.Projection.SphericalMercator,transformation:new i.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(e){return this.projection.project(e).multiplyBy(6378137)}}),i.CRS.EPSG900913=i.extend({},i.CRS.EPSG3857,{code:"EPSG:900913"}),i.CRS.EPSG4326=i.extend({},i.CRS,{code:"EPSG:4326",projection:i.Projection.LonLat,transformation:new i.Transformation(1/360,.5,-1/360,.5)}),i.Map=i.Class.extend({includes:i.Mixin.Events,options:{crs:i.CRS.EPSG3857,fadeAnimation:i.DomUtil.TRANSITION&&!i.Browser.android23,trackResize:!0,markerZoomAnimation:i.DomUtil.TRANSITION&&i.Browser.any3d},initialize:function(e,t){t=i.setOptions(this,t),this._initContainer(e),this._initLayout(),this._onResize=i.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.center&&t.zoom!==n&&this.setView(i.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(t.layers)},setView:function(e,t){return t=t===n?this.getZoom():t,this._resetView(i.latLng(e),this._limitZoom(t)),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=this._limitZoom(e),this)},zoomIn:function(e,t){return this.setZoom(this._zoom+(e||1),t)},zoomOut:function(e,t){return this.setZoom(this._zoom-(e||1),t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),o=this.getSize().divideBy(2),a=(e instanceof i.Point?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/r),s=this.containerPointToLatLng(o.add(a));return this.setView(s,t,{zoom:n})},fitBounds:function(e,t){t=t||{},e=e.getBounds?e.getBounds():i.latLngBounds(e);var n=i.point(t.paddingTopLeft||t.padding||[0,0]),r=i.point(t.paddingBottomRight||t.padding||[0,0]),o=this.getBoundsZoom(e,!1,n.add(r));o=t.maxZoom?Math.min(t.maxZoom,o):o;var a=r.subtract(n).divideBy(2),s=this.project(e.getSouthWest(),o),l=this.project(e.getNorthEast(),o),u=this.unproject(s.add(l).divideBy(2).add(a),o);return this.setView(u,o,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e){return this.fire("movestart"),this._rawPanBy(i.point(e)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(e){return e=i.latLngBounds(e),this.options.maxBounds=e,e?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(e,t){var n=this.getCenter(),r=this._limitCenter(n,this._zoom,e);return n.equals(r)?this:this.panTo(r,t)},addLayer:function(e){var t=i.stamp(e);return this._layers[t]?this:(this._layers[t]=e,!e.options||isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[t]=e,this._updateZoomLevels()),this.options.zoomAnimation&&i.TileLayer&&e instanceof i.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,e.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(e),this)},removeLayer:function(e){var t=i.stamp(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&this.fire("layerremove",{layer:e}),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels()),this.options.zoomAnimation&&i.TileLayer&&e instanceof i.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,e.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(e){return!!e&&i.stamp(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},invalidateSize:function(e){if(!this._loaded)return this;e=i.extend({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var n=this.getSize(),r=t.divideBy(2).round(),o=n.divideBy(2).round(),a=r.subtract(o);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:n})):this},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(e){this._container._leaflet=n}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new i.LatLngBounds(t,n)},getMinZoom:function(){return this.options.minZoom===n?this._layersMinZoom===n?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===n?this._layersMaxZoom===n?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=i.latLngBounds(e);var r,o=this.getMinZoom()-(t?1:0),a=this.getMaxZoom(),s=this.getSize(),l=e.getNorthWest(),u=e.getSouthEast(),c=!0;n=i.point(n||[0,0]);do{o++,r=this.project(u,o).subtract(this.project(l,o)).add(n),c=t?r.x<s.x||r.y<s.y:s.contains(r)}while(c&&a>=o);return c&&t?null:t?o:o-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new i.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var e=this._getTopLeftPoint();return new i.Bounds(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e){var t=this.options.crs;return t.scale(e)/t.scale(this._zoom)},getScaleZoom:function(e){return this._zoom+Math.log(e)/Math.LN2},project:function(e,t){return t=t===n?this._zoom:t,this.options.crs.latLngToPoint(i.latLng(e),t)},unproject:function(e,t){return t=t===n?this._zoom:t,this.options.crs.pointToLatLng(i.point(e),t)},layerPointToLatLng:function(e){var t=i.point(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(i.latLng(e))._round()._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(e){return i.point(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return i.point(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(i.point(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(i.latLng(e)))},mouseEventToContainerPoint:function(e){return i.DomEvent.getMousePosition(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=i.DomUtil.get(e);if(!t)throw new Error("Map container not found.");if(t._leaflet)throw new Error("Map container is already initialized.");t._leaflet=!0},_initLayout:function(){var e=this._container;i.DomUtil.addClass(e,"leaflet-container"+(i.Browser.touch?" leaflet-touch":"")+(i.Browser.retina?" leaflet-retina":"")+(i.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var t=i.DomUtil.getStyle(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._mapPane=e.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=e.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),e.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),e.shadowPane=this._createPane("leaflet-shadow-pane"),e.overlayPane=this._createPane("leaflet-overlay-pane"),e.markerPane=this._createPane("leaflet-marker-pane"),e.popupPane=this._createPane("leaflet-popup-pane");var t=" leaflet-zoom-hide";this.options.markerZoomAnimation||(i.DomUtil.addClass(e.markerPane,t),i.DomUtil.addClass(e.shadowPane,t),i.DomUtil.addClass(e.popupPane,t))},_createPane:function(e,t){return i.DomUtil.create("div",e,t||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(e){for(var t=0,n=(e=e?i.Util.isArray(e)?e:[e]:[]).length;n>t;t++)this.addLayer(e[t])},_resetView:function(e,t,n,r){var o=this._zoom!==t;r||(this.fire("movestart"),o&&this.fire("zoomstart")),this._zoom=t,this._initialCenter=e,this._initialTopLeftPoint=this._getNewTopLeftPoint(e),n?this._initialTopLeftPoint._add(this._getMapPanePos()):i.DomUtil.setPosition(this._mapPane,new i.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!n}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(o||r)&&this.fire("zoomend"),this.fire("moveend",{hard:!n})},_rawPanBy:function(e){i.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var e,t=1/0,r=-1/0,i=this._getZoomSpan();for(e in this._zoomBoundLayers){var o=this._zoomBoundLayers[e];isNaN(o.options.minZoom)||(t=Math.min(t,o.options.minZoom)),isNaN(o.options.maxZoom)||(r=Math.max(r,o.options.maxZoom))}e===n?this._layersMaxZoom=this._layersMinZoom=n:(this._layersMaxZoom=r,this._layersMinZoom=t),i!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){if(i.DomEvent){t=t||"on",i.DomEvent[t](this._container,"click",this._onMouseClick,this);var n,r,o=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(n=0,r=o.length;r>n;n++)i.DomEvent[t](this._container,o[n],this._fireMouseEvent,this);this.options.trackResize&&i.DomEvent[t](e,"resize",this._onResize,this)}},_onResize:function(){i.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.Util.requestAnimFrame((function(){this.invalidateSize({debounceMoveend:!0})}),this,!1,this._container)},_onMouseClick:function(e){!this._loaded||!e._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||i.DomEvent._skipped(e)||(this.fire("preclick"),this._fireMouseEvent(e))},_fireMouseEvent:function(e){if(this._loaded&&!i.DomEvent._skipped(e)){var t=e.type;if(t="mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,this.hasEventListeners(t)){"contextmenu"===t&&i.DomEvent.preventDefault(e);var n=this.mouseEventToContainerPoint(e),r=this.containerPointToLayerPoint(n),o=this.layerPointToLatLng(r);this.fire(t,{latlng:o,layerPoint:r,containerPoint:n,originalEvent:e})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var e=0,t=this._handlers.length;t>e;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,this):this.on("load",e,t),this},_layerAdd:function(e){e.onAdd(this),this.fire("layeradd",{layer:e})},_getMapPanePos:function(){return i.DomUtil.getPosition(this._mapPane)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewTopLeftPoint(n,t).add(this._getMapPanePos());return this.project(e,t)._subtract(r)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var r=this.project(e,t),o=this.getSize().divideBy(2),a=new i.Bounds(r.subtract(o),r.add(o)),s=this._getBoundsOffset(a,n,t);return this.unproject(r.add(s),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new i.Bounds(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=this.project(t.getNorthWest(),n).subtract(e.min),o=this.project(t.getSouthEast(),n).subtract(e.max),a=this._rebound(r.x,-o.x),s=this._rebound(r.y,-o.y);return new i.Point(a,s)},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom();return Math.max(t,Math.min(n,e))}}),i.map=function(e,t){return new i.Map(e,t)},i.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(e){var t=i.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),o=this.R_MAJOR,a=this.R_MINOR,s=e.lng*t*o,l=r*t,u=a/o,c=Math.sqrt(1-u*u),d=c*Math.sin(l);d=Math.pow((1-d)/(1+d),.5*c);var h=Math.tan(.5*(.5*Math.PI-l))/d;return l=-o*Math.log(h),new i.Point(s,l)},unproject:function(e){for(var t,n=i.LatLng.RAD_TO_DEG,r=this.R_MAJOR,o=this.R_MINOR,a=e.x*n/r,s=o/r,l=Math.sqrt(1-s*s),u=Math.exp(-e.y/r),c=Math.PI/2-2*Math.atan(u),d=15,h=.1;Math.abs(h)>1e-7&&--d>0;)t=l*Math.sin(c),c+=h=Math.PI/2-2*Math.atan(u*Math.pow((1-t)/(1+t),.5*l))-c;return new i.LatLng(c*n,a)}},i.CRS.EPSG3395=i.extend({},i.CRS,{code:"EPSG:3395",projection:i.Projection.Mercator,transformation:function(){var e=i.Projection.Mercator.R_MAJOR,t=.5/(Math.PI*e);return new i.Transformation(t,.5,-t,.5)}()}),i.TileLayer=i.Class.extend({includes:i.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:i.Browser.mobile,updateWhenIdle:i.Browser.mobile},initialize:function(e,t){(t=i.setOptions(this,t)).detectRetina&&i.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomOffset++,t.minZoom>0&&t.minZoom--,this.options.maxZoom--),t.bounds&&(t.bounds=i.latLngBounds(t.bounds)),this._url=e;var n=this.options.subdomains;"string"==typeof n&&(this.options.subdomains=n.split(""))},onAdd:function(e){this._map=e,this._animated=e._zoomAnimated,this._initContainer(),e.on({viewreset:this._reset,moveend:this._update},this),this._animated&&e.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=i.Util.limitExecByInterval(this._update,150,this),e.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this._container.parentNode.removeChild(this._container),e.off({viewreset:this._reset,moveend:this._update},this),this._animated&&e.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||e.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var e=this._map._panes.tilePane;return this._container&&(e.appendChild(this._container),this._setAutoZIndex(e,Math.max)),this},bringToBack:function(){var e=this._map._panes.tilePane;return this._container&&(e.insertBefore(this._container,e.firstChild),this._setAutoZIndex(e,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==n&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e,t){var n,r,i,o=e.children,a=-t(1/0,-1/0);for(r=0,i=o.length;i>r;r++)o[r]!==this._container&&(n=parseInt(o[r].style.zIndex,10),isNaN(n)||(a=t(a,n)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+t(1,-1)},_updateOpacity:function(){var e,t=this._tiles;if(i.Browser.ielt9)for(e in t)i.DomUtil.setOpacity(t[e],this.options.opacity);else i.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var e=this._map._panes.tilePane;if(!this._container){if(this._container=i.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var t="leaflet-tile-container";this._bgBuffer=i.DomUtil.create("div",t,this._container),this._tileContainer=i.DomUtil.create("div",t,this._container)}else this._tileContainer=this._container;e.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(e){for(var t in this._tiles)this.fire("tileunload",{tile:this._tiles[t]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&e&&e.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var e=this._map,t=e.getZoom()+this.options.zoomOffset,n=this.options.maxNativeZoom,r=this.options.tileSize;return n&&t>n&&(r=Math.round(e.getZoomScale(t)/e.getZoomScale(n)*r)),r},_update:function(){if(this._map){var e=this._map,t=e.getPixelBounds(),n=e.getZoom(),r=this._getTileSize();if(!(n>this.options.maxZoom||n<this.options.minZoom)){var o=i.bounds(t.min.divideBy(r)._floor(),t.max.divideBy(r)._floor());this._addTilesFromCenterOut(o),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(o)}}},_addTilesFromCenterOut:function(e){var n,r,o,a=[],s=e.getCenter();for(n=e.min.y;n<=e.max.y;n++)for(r=e.min.x;r<=e.max.x;r++)o=new i.Point(r,n),this._tileShouldBeLoaded(o)&&a.push(o);var l=a.length;if(0!==l){a.sort((function(e,t){return e.distanceTo(s)-t.distanceTo(s)}));var u=t.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=l,r=0;l>r;r++)this._addTile(a[r],u);this._tileContainer.appendChild(u)}},_tileShouldBeLoaded:function(e){if(e.x+":"+e.y in this._tiles)return!1;var t=this.options;if(!t.continuousWorld){var n=this._getWrapTileNum();if(t.noWrap&&(e.x<0||e.x>=n.x)||e.y<0||e.y>=n.y)return!1}if(t.bounds){var r=this._getTileSize(),i=e.multiplyBy(r),o=i.add([r,r]),a=this._map.unproject(i),s=this._map.unproject(o);if(t.continuousWorld||t.noWrap||(a=a.wrap(),s=s.wrap()),!t.bounds.intersects([a,s]))return!1}return!0},_removeOtherTiles:function(e){var t,n,r,i;for(i in this._tiles)t=i.split(":"),n=parseInt(t[0],10),r=parseInt(t[1],10),(n<e.min.x||n>e.max.x||r<e.min.y||r>e.max.y)&&this._removeTile(i)},_removeTile:function(e){var t=this._tiles[e];this.fire("tileunload",{tile:t,url:t.src}),this.options.reuseTiles?(i.DomUtil.removeClass(t,"leaflet-tile-loaded"),this._unusedTiles.push(t)):t.parentNode===this._tileContainer&&this._tileContainer.removeChild(t),i.Browser.android||(t.onload=null,t.src=i.Util.emptyImageUrl),delete this._tiles[e]},_addTile:function(e,t){var n=this._getTilePos(e),r=this._getTile();i.DomUtil.setPosition(r,n,i.Browser.chrome),this._tiles[e.x+":"+e.y]=r,this._loadTile(r,e),r.parentNode!==this._tileContainer&&t.appendChild(r)},_getZoomForUrl:function(){var e=this.options,t=this._map.getZoom();return e.zoomReverse&&(t=e.maxZoom-t),t+=e.zoomOffset,e.maxNativeZoom?Math.min(t,e.maxNativeZoom):t},_getTilePos:function(e){var t=this._map.getPixelOrigin(),n=this._getTileSize();return e.multiplyBy(n).subtract(t)},getTileUrl:function(e){return i.Util.template(this._url,i.extend({s:this._getSubdomain(e),z:e.z,x:e.x,y:e.y},this.options))},_getWrapTileNum:function(){return this._map.options.crs.getSize(this._map.getZoom()).divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(e){var t=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(e.x=(e.x%t.x+t.x)%t.x),this.options.tms&&(e.y=t.y-e.y-1),e.z=this._getZoomForUrl()},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var e=this._unusedTiles.pop();return this._resetTile(e),e}return this._createTile()},_resetTile:function(){},_createTile:function(){var e=i.DomUtil.create("img","leaflet-tile");return e.style.width=e.style.height=this._getTileSize()+"px",e.galleryimg="no",e.onselectstart=e.onmousemove=i.Util.falseFn,i.Browser.ielt9&&this.options.opacity!==n&&i.DomUtil.setOpacity(e,this.options.opacity),i.Browser.mobileWebkit3d&&(e.style.WebkitBackfaceVisibility="hidden"),e},_loadTile:function(e,t){e._layer=this,e.onload=this._tileOnLoad,e.onerror=this._tileOnError,this._adjustTilePoint(t),e.src=this.getTileUrl(t),this.fire("tileloadstart",{tile:e,url:e.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&i.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(i.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var e=this._layer;this.src!==i.Util.emptyImageUrl&&(i.DomUtil.addClass(this,"leaflet-tile-loaded"),e.fire("tileload",{tile:this,url:this.src})),e._tileLoaded()},_tileOnError:function(){var e=this._layer;e.fire("tileerror",{tile:this,url:this.src});var t=e.options.errorTileUrl;t&&(this.src=t),e._tileLoaded()}}),i.tileLayer=function(e,t){return new i.TileLayer(e,t)},i.TileLayer.WMS=i.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(e,t){this._url=e;var n=i.extend({},this.defaultWmsParams),r=t.tileSize||this.options.tileSize;for(var o in t.detectRetina&&i.Browser.retina?n.width=n.height=2*r:n.width=n.height=r,t)this.options.hasOwnProperty(o)||"crs"===o||(n[o]=t[o]);this.wmsParams=n,i.setOptions(this,t)},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,i.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._map,n=this.options.tileSize,r=e.multiplyBy(n),o=r.add([n,n]),a=this._crs.project(t.unproject(r,e.z)),s=this._crs.project(t.unproject(o,e.z)),l=this._wmsVersion>=1.3&&this._crs===i.CRS.EPSG4326?[s.y,a.x,a.y,s.x].join(","):[a.x,s.y,s.x,a.y].join(","),u=i.Util.template(this._url,{s:this._getSubdomain(e)});return u+i.Util.getParamString(this.wmsParams,u,!0)+"&BBOX="+l},setParams:function(e,t){return i.extend(this.wmsParams,e),t||this.redraw(),this}}),i.tileLayer.wms=function(e,t){return new i.TileLayer.WMS(e,t)},i.TileLayer.Canvas=i.TileLayer.extend({options:{async:!1},initialize:function(e){i.setOptions(this,e)},redraw:function(){for(var e in this._map&&(this._reset({hard:!0}),this._update()),this._tiles)this._redrawTile(this._tiles[e]);return this},_redrawTile:function(e){this.drawTile(e,e._tilePoint,this._map._zoom)},_createTile:function(){var e=i.DomUtil.create("canvas","leaflet-tile");return e.width=e.height=this.options.tileSize,e.onselectstart=e.onmousemove=i.Util.falseFn,e},_loadTile:function(e,t){e._layer=this,e._tilePoint=t,this._redrawTile(e),this.options.async||this.tileDrawn(e)},drawTile:function(){},tileDrawn:function(e){this._tileOnLoad.call(e)}}),i.tileLayer.canvas=function(e){return new i.TileLayer.Canvas(e)},i.ImageOverlay=i.Class.extend({includes:i.Mixin.Events,options:{opacity:1},initialize:function(e,t,n){this._url=e,this._bounds=i.latLngBounds(t),i.setOptions(this,n)},onAdd:function(e){this._map=e,this._image||this._initImage(),e._panes.overlayPane.appendChild(this._image),e.on("viewreset",this._reset,this),e.options.zoomAnimation&&i.Browser.any3d&&e.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._image),e.off("viewreset",this._reset,this),e.options.zoomAnimation&&e.off("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var e=this._map._panes.overlayPane;return this._image&&e.insertBefore(this._image,e.firstChild),this},setUrl:function(e){this._url=e,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=i.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&i.Browser.any3d?i.DomUtil.addClass(this._image,"leaflet-zoom-animated"):i.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),i.extend(this._image,{galleryimg:"no",onselectstart:i.Util.falseFn,onmousemove:i.Util.falseFn,onload:i.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(e){var t=this._map,n=this._image,r=t.getZoomScale(e.zoom),o=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),s=t._latLngToNewLayerPoint(o,e.zoom,e.center),l=t._latLngToNewLayerPoint(a,e.zoom,e.center)._subtract(s),u=s._add(l._multiplyBy(.5*(1-1/r)));n.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(u)+" scale("+r+") "},_reset:function(){var e=this._image,t=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),n=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(t);i.DomUtil.setPosition(e,t),e.style.width=n.x+"px",e.style.height=n.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){i.DomUtil.setOpacity(this._image,this.options.opacity)}}),i.imageOverlay=function(e,t,n){return new i.ImageOverlay(e,t,n)},i.Icon=i.Class.extend({options:{className:""},initialize:function(e){i.setOptions(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n,r=this._getIconUrl(e);if(!r){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return n=t&&"IMG"===t.tagName?this._createImg(r,t):this._createImg(r),this._setIconStyles(n,e),n},_setIconStyles:function(e,t){var n,r=this.options,o=i.point(r[t+"Size"]);!(n="shadow"===t?i.point(r.shadowAnchor||r.iconAnchor):i.point(r.iconAnchor))&&o&&(n=o.divideBy(2,!0)),e.className="leaflet-marker-"+t+" "+r.className,n&&(e.style.marginLeft=-n.x+"px",e.style.marginTop=-n.y+"px"),o&&(e.style.width=o.x+"px",e.style.height=o.y+"px")},_createImg:function(e,n){return(n=n||t.createElement("img")).src=e,n},_getIconUrl:function(e){return i.Browser.retina&&this.options[e+"RetinaUrl"]?this.options[e+"RetinaUrl"]:this.options[e+"Url"]}}),i.icon=function(e){return new i.Icon(e)},i.Icon.Default=i.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(e){var t=e+"Url";if(this.options[t])return this.options[t];i.Browser.retina&&"icon"===e&&(e+="-2x");var n=i.Icon.Default.imagePath;if(!n)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return n+"/marker-"+e+".png"}}),i.Icon.Default.imagePath=function(){var e,n,r,i,o=t.getElementsByTagName("script"),a=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(e=0,n=o.length;n>e;e++)if((r=o[e].src).match(a))return((i=r.split(a)[0])?i+"/":"")+"images"}(),i.Marker=i.Class.extend({includes:i.Mixin.Events,options:{icon:new i.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(e,t){i.setOptions(this,t),this._latlng=i.latLng(e)},onAdd:function(e){this._map=e,e.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),e.options.zoomAnimation&&e.options.markerZoomAnimation&&e.on("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),e.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=i.latLng(e),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update(),this},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var e=this.options,t=this._map,n=t.options.zoomAnimation&&t.options.markerZoomAnimation?"leaflet-zoom-animated":"leaflet-zoom-hide",r=e.icon.createIcon(this._icon),o=!1;r!==this._icon&&(this._icon&&this._removeIcon(),o=!0,e.title&&(r.title=e.title),e.alt&&(r.alt=e.alt)),i.DomUtil.addClass(r,n),e.keyboard&&(r.tabIndex="0"),this._icon=r,this._initInteraction(),e.riseOnHover&&i.DomEvent.on(r,"mouseover",this._bringToFront,this).on(r,"mouseout",this._resetZIndex,this);var a=e.icon.createShadow(this._shadow),s=!1;a!==this._shadow&&(this._removeShadow(),s=!0),a&&i.DomUtil.addClass(a,n),this._shadow=a,e.opacity<1&&this._updateOpacity();var l=this._map._panes;o&&l.markerPane.appendChild(this._icon),a&&s&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&i.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(e){i.DomUtil.setPosition(this._icon,e),this._shadow&&i.DomUtil.setPosition(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon.style.zIndex=this._zIndex+e},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.clickable){var e=this._icon,t=["dblclick","mousedown","mouseover","mouseout","contextmenu"];i.DomUtil.addClass(e,"leaflet-clickable"),i.DomEvent.on(e,"click",this._onMouseClick,this),i.DomEvent.on(e,"keypress",this._onKeyPress,this);for(var n=0;n<t.length;n++)i.DomEvent.on(e,t[n],this._fireMouseEvent,this);i.Handler.MarkerDrag&&(this.dragging=new i.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(e){var t=this.dragging&&this.dragging.moved();(this.hasEventListeners(e.type)||t)&&i.DomEvent.stopPropagation(e),t||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(e.type,{originalEvent:e,latlng:this._latlng})},_onKeyPress:function(e){13===e.keyCode&&this.fire("click",{originalEvent:e,latlng:this._latlng})},_fireMouseEvent:function(e){this.fire(e.type,{originalEvent:e,latlng:this._latlng}),"contextmenu"===e.type&&this.hasEventListeners(e.type)&&i.DomEvent.preventDefault(e),"mousedown"!==e.type?i.DomEvent.stopPropagation(e):i.DomEvent.preventDefault(e)},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){i.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&i.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),i.marker=function(e,t){return new i.Marker(e,t)},i.DivIcon=i.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(e){var n=e&&"DIV"===e.tagName?e:t.createElement("div"),r=this.options;return!1!==r.html?n.innerHTML=r.html:n.innerHTML="",r.bgPos&&(n.style.backgroundPosition=-r.bgPos.x+"px "+-r.bgPos.y+"px"),this._setIconStyles(n,"icon"),n},createShadow:function(){return null}}),i.divIcon=function(e){return new i.DivIcon(e)},i.Map.mergeOptions({closePopupOnClick:!0}),i.Popup=i.Class.extend({includes:i.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(e,t){i.setOptions(this,e),this._source=t,this._animated=i.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(e){this._map=e,this._container||this._initLayout();var t=e.options.fadeAnimation;t&&i.DomUtil.setOpacity(this._container,0),e._panes.popupPane.appendChild(this._container),e.on(this._getEvents(),this),this.update(),t&&i.DomUtil.setOpacity(this._container,1),this.fire("open"),e.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(e){return e.addLayer(this),this},openOn:function(e){return e.openPopup(this),this},onRemove:function(e){e._panes.popupPane.removeChild(this._container),i.Util.falseFn(this._container.offsetWidth),e.off(this._getEvents(),this),e.options.fadeAnimation&&i.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),e.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=i.latLng(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var e={viewreset:this._updatePosition};return this._animated&&(e.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this._close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var e,t="leaflet-popup",n=t+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),r=this._container=i.DomUtil.create("div",n);this.options.closeButton&&((e=this._closeButton=i.DomUtil.create("a",t+"-close-button",r)).href="#close",e.innerHTML="&#215;",i.DomEvent.disableClickPropagation(e),i.DomEvent.on(e,"click",this._onCloseButtonClick,this));var o=this._wrapper=i.DomUtil.create("div",t+"-content-wrapper",r);i.DomEvent.disableClickPropagation(o),this._contentNode=i.DomUtil.create("div",t+"-content",o),i.DomEvent.disableScrollPropagation(this._contentNode),i.DomEvent.on(o,"contextmenu",i.DomEvent.stopPropagation),this._tipContainer=i.DomUtil.create("div",t+"-tip-container",r),this._tip=i.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var r=e.offsetHeight,o=this.options.maxHeight,a="leaflet-popup-scrolled";o&&r>o?(t.height=o+"px",i.DomUtil.addClass(e,a)):i.DomUtil.removeClass(e,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=this._animated,n=i.point(this.options.offset);t&&i.DomUtil.setPosition(this._container,e),this._containerBottom=-n.y-(t?0:e.y),this._containerLeft=-Math.round(this._containerWidth/2)+n.x+(t?0:e.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);i.DomUtil.setPosition(this._container,t)},_adjustPan:function(){if(this.options.autoPan){var e=this._map,t=this._container.offsetHeight,n=this._containerWidth,r=new i.Point(this._containerLeft,-t-this._containerBottom);this._animated&&r._add(i.DomUtil.getPosition(this._container));var o=e.layerPointToContainerPoint(r),a=i.point(this.options.autoPanPadding),s=i.point(this.options.autoPanPaddingTopLeft||a),l=i.point(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;o.x+n+l.x>u.x&&(c=o.x+n-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+t+l.y>u.y&&(d=o.y+t-u.y+l.y),o.y-d-s.y<0&&(d=o.y-s.y),(c||d)&&e.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(e){this._close(),i.DomEvent.stop(e)}}),i.popup=function(e,t){return new i.Popup(e,t)},i.Map.include({openPopup:function(e,t,n){if(this.closePopup(),!(e instanceof i.Popup)){var r=e;e=new i.Popup(n).setLatLng(t).setContent(r)}return e._isOpen=!0,this._popup=e,this.addLayer(e)},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&(this.removeLayer(e),e._isOpen=!1),this}}),i.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(e,t){var n=i.point(this.options.icon.options.popupAnchor||[0,0]);return n=n.add(i.Popup.prototype.options.offset),t&&t.offset&&(n=n.add(t.offset)),t=i.extend({offset:n},t),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),e instanceof i.Popup?(i.setOptions(e,t),this._popup=e,e._source=this):this._popup=new i.Popup(t,this).setContent(e),this},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(e){this._popup.setLatLng(e.latlng)}}),i.LayerGroup=i.Class.extend({initialize:function(e){var t,n;if(this._layers={},e)for(t=0,n=e.length;n>t;t++)this.addLayer(e[t])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return!!e&&(e in this._layers||this.getLayerId(e)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(e){var t,n,r=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,r);return this},onAdd:function(e){this._map=e,this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e),this._map=null},addTo:function(e){return e.addLayer(this),this},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];for(var t in this._layers)e.push(this._layers[t]);return e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return i.stamp(e)}}),i.layerGroup=function(e){return new i.LayerGroup(e)},i.FeatureGroup=i.LayerGroup.extend({includes:i.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(e){return this.hasLayer(e)?this:("on"in e&&e.on(i.FeatureGroup.EVENTS,this._propagateEvent,this),i.LayerGroup.prototype.addLayer.call(this,e),this._popupContent&&e.bindPopup&&e.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),"off"in e&&e.off(i.FeatureGroup.EVENTS,this._propagateEvent,this),i.LayerGroup.prototype.removeLayer.call(this,e),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:e})):this},bindPopup:function(e,t){return this._popupContent=e,this._popupOptions=t,this.invoke("bindPopup",e,t)},openPopup:function(e){for(var t in this._layers){this._layers[t].openPopup(e);break}return this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new i.LatLngBounds;return this.eachLayer((function(t){e.extend(t instanceof i.Marker?t.getLatLng():t.getBounds())})),e},_propagateEvent:function(e){e=i.extend({layer:e.target,target:this},e),this.fire(e.type,e)}}),i.featureGroup=function(e){return new i.FeatureGroup(e)},i.Path=i.Class.extend({includes:[i.Mixin.Events],statics:{CLIP_PADDING:function(){var t=((i.Browser.mobile?1280:2e3)/Math.max(e.outerWidth,e.outerHeight)-1)/2;return Math.max(0,Math.min(.5,t))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(e){i.setOptions(this,e)},onAdd:function(e){this._map=e,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),e.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){e._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,i.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),e.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(e){return i.setOptions(this,e),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),i.Map.include({_updatePathViewport:function(){var e=i.Path.CLIP_PADDING,t=this.getSize(),n=i.DomUtil.getPosition(this._mapPane).multiplyBy(-1)._subtract(t.multiplyBy(e)._round()),r=n.add(t.multiplyBy(1+2*e)._round());this._pathViewport=new i.Bounds(n,r)}}),i.Path.SVG_NS="http://www.w3.org/2000/svg",i.Browser.svg=!(!t.createElementNS||!t.createElementNS(i.Path.SVG_NS,"svg").createSVGRect),i.Path=i.Path.extend({statics:{SVG:i.Browser.svg},bringToFront:function(){var e=this._map._pathRoot,t=this._container;return t&&e.lastChild!==t&&e.appendChild(t),this},bringToBack:function(){var e=this._map._pathRoot,t=this._container,n=e.firstChild;return t&&n!==t&&e.insertBefore(t,n),this},getPathString:function(){},_createElement:function(e){return t.createElementNS(i.Path.SVG_NS,e)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&i.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){
-this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var e=this.getPathString();e||(e="M0 0"),this._path.setAttribute("d",e)},_initEvents:function(){if(this.options.clickable){(i.Browser.svg||!i.Browser.vml)&&i.DomUtil.addClass(this._path,"leaflet-clickable"),i.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var e=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],t=0;t<e.length;t++)i.DomEvent.on(this._container,e[t],this._fireMouseEvent,this)}},_onMouseClick:function(e){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(e)},_fireMouseEvent:function(e){if(this._map&&this.hasEventListeners(e.type)){var t=this._map,n=t.mouseEventToContainerPoint(e),r=t.containerPointToLayerPoint(n),o=t.layerPointToLatLng(r);this.fire(e.type,{latlng:o,layerPoint:r,containerPoint:n,originalEvent:e}),"contextmenu"===e.type&&i.DomEvent.preventDefault(e),"mousemove"!==e.type&&i.DomEvent.stopPropagation(e)}}}),i.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=i.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&i.Browser.any3d?(i.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):i.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(e){var t=this.getZoomScale(e.zoom),n=this._getCenterOffset(e.center)._multiplyBy(-t)._add(this._pathViewport.min);this._pathRoot.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(n)+" scale("+t+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,n=e.max,r=n.x-t.x,o=n.y-t.y,a=this._pathRoot,s=this._panes.overlayPane;i.Browser.mobileWebkit&&s.removeChild(a),i.DomUtil.setPosition(a,t),a.setAttribute("width",r),a.setAttribute("height",o),a.setAttribute("viewBox",[t.x,t.y,r,o].join(" ")),i.Browser.mobileWebkit&&s.appendChild(a)}}}),i.Path.include({bindPopup:function(e,t){return e instanceof i.Popup?this._popup=e:((!this._popup||t)&&(this._popup=new i.Popup(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(e){return this._popup&&(e=e||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:e})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(e){this._popup.setLatLng(e.latlng),this._map.openPopup(this._popup)}}),i.Browser.vml=!i.Browser.svg&&function(){try{var e=t.createElement("div");e.innerHTML='<v:shape adj="1"/>';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(e){return!1}}(),i.Path=i.Browser.svg||!i.Browser.vml?i.Path:i.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return t.createElement("<lvml:"+e+' class="lvml">')}}catch(e){return function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var e=this._container=this._createElement("shape");i.DomUtil.addClass(e,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&i.DomUtil.addClass(e,"leaflet-clickable"),e.coordsize="1 1",this._path=this._createElement("path"),e.appendChild(this._path),this._map._pathRoot.appendChild(e)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var e=this._stroke,t=this._fill,n=this.options,r=this._container;r.stroked=n.stroke,r.filled=n.fill,n.stroke?(e||((e=this._stroke=this._createElement("stroke")).endcap="round",r.appendChild(e)),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=i.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",n.lineCap&&(e.endcap=n.lineCap.replace("butt","flat")),n.lineJoin&&(e.joinstyle=n.lineJoin)):e&&(r.removeChild(e),this._stroke=null),n.fill?(t||(t=this._fill=this._createElement("fill"),r.appendChild(t)),t.color=n.fillColor||n.color,t.opacity=n.fillOpacity):t&&(r.removeChild(t),this._fill=null)},_updatePath:function(){var e=this._container.style;e.display="none",this._path.v=this.getPathString()+" ",e.display=""}}),i.Map.include(i.Browser.svg||!i.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var e=this._pathRoot=t.createElement("div");e.className="leaflet-vml-container",this._panes.overlayPane.appendChild(e),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),i.Browser.canvas=!!t.createElement("canvas").getContext,i.Path=i.Path.SVG&&!e.L_PREFER_CANVAS||!i.Browser.canvas?i.Path:i.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(e){return i.setOptions(this,e),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(e){e.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!i.Path._updateRequest&&(i.Path._updateRequest=i.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){i.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var e=this.options;e.stroke&&(this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color),e.fill&&(this._ctx.fillStyle=e.fillColor||e.color),e.lineCap&&(this._ctx.lineCap=e.lineCap),e.lineJoin&&(this._ctx.lineJoin=e.lineJoin)},_drawPath:function(){var e,t,n,r,o,a;for(this._ctx.beginPath(),e=0,n=this._parts.length;n>e;e++){for(t=0,r=this._parts[e].length;r>t;t++)o=this._parts[e][t],a=(0===t?"move":"line")+"To",this._ctx[a](o.x,o.y);this instanceof i.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var e=this._ctx,t=this.options;this._drawPath(),e.save(),this._updateStyle(),t.fill&&(e.globalAlpha=t.fillOpacity,e.fill(t.fillRule||"evenodd")),t.stroke&&(e.globalAlpha=t.opacity,e.stroke()),e.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(e){this._containsPoint(e.layerPoint)&&this.fire(e.type,e)},_onMouseMove:function(e){this._map&&!this._map._animatingZoom&&(this._containsPoint(e.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",e)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",e)))}}),i.Map.include(i.Path.SVG&&!e.L_PREFER_CANVAS||!i.Browser.canvas?{}:{_initPathRoot:function(){var e,n=this._pathRoot;n||((n=this._pathRoot=t.createElement("canvas")).style.position="absolute",(e=this._canvasCtx=n.getContext("2d")).lineCap="round",e.lineJoin="round",this._panes.overlayPane.appendChild(n),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,n=e.max.subtract(t),r=this._pathRoot;i.DomUtil.setPosition(r,t),r.width=n.x,r.height=n.y,r.getContext("2d").translate(-t.x,-t.y)}}}),i.LineUtil={simplify:function(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=this._reducePoints(e,n),this._simplifyDP(e,n)},pointToSegmentDistance:function(e,t,n){return Math.sqrt(this._sqClosestPointOnSegment(e,t,n,!0))},closestPointOnSegment:function(e,t,n){return this._sqClosestPointOnSegment(e,t,n)},_simplifyDP:function(e,t){var r=e.length,i=new(typeof Uint8Array!=n+""?Uint8Array:Array)(r);i[0]=i[r-1]=1,this._simplifyDPStep(e,i,t,0,r-1);var o,a=[];for(o=0;r>o;o++)i[o]&&a.push(e[o]);return a},_simplifyDPStep:function(e,t,n,r,i){var o,a,s,l=0;for(a=r+1;i-1>=a;a++)(s=this._sqClosestPointOnSegment(e[a],e[r],e[i],!0))>l&&(o=a,l=s);l>n&&(t[o]=1,this._simplifyDPStep(e,t,n,r,o),this._simplifyDPStep(e,t,n,o,i))},_reducePoints:function(e,t){for(var n=[e[0]],r=1,i=0,o=e.length;o>r;r++)this._sqDist(e[r],e[i])>t&&(n.push(e[r]),i=r);return o-1>i&&n.push(e[o-1]),n},clipSegment:function(e,t,n,r){var i,o,a,s=r?this._lastCode:this._getBitCode(e,n),l=this._getBitCode(t,n);for(this._lastCode=l;;){if(!(s|l))return[e,t];if(s&l)return!1;i=s||l,o=this._getEdgeIntersection(e,t,i,n),a=this._getBitCode(o,n),i===s?(e=o,s=a):(t=o,l=a)}},_getEdgeIntersection:function(e,t,n,r){var o=t.x-e.x,a=t.y-e.y,s=r.min,l=r.max;return 8&n?new i.Point(e.x+o*(l.y-e.y)/a,l.y):4&n?new i.Point(e.x+o*(s.y-e.y)/a,s.y):2&n?new i.Point(l.x,e.y+a*(l.x-e.x)/o):1&n?new i.Point(s.x,e.y+a*(s.x-e.x)/o):void 0},_getBitCode:function(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_sqClosestPointOnSegment:function(e,t,n,r){var o,a=t.x,s=t.y,l=n.x-a,u=n.y-s,c=l*l+u*u;return c>0&&((o=((e.x-a)*l+(e.y-s)*u)/c)>1?(a=n.x,s=n.y):o>0&&(a+=l*o,s+=u*o)),l=e.x-a,u=e.y-s,r?l*l+u*u:new i.Point(a,s)}},i.Polyline=i.Path.extend({initialize:function(e,t){i.Path.prototype.initialize.call(this,t),this._latlngs=this._convertLatLngs(e)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var e=0,t=this._latlngs.length;t>e;e++)this._originalPoints[e]=this._map.latLngToLayerPoint(this._latlngs[e])},getPathString:function(){for(var e=0,t=this._parts.length,n="";t>e;e++)n+=this._getPathPartStr(this._parts[e]);return n},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._latlngs=this._convertLatLngs(e),this.redraw()},addLatLng:function(e){return this._latlngs.push(i.latLng(e)),this.redraw()},spliceLatLngs:function(){var e=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),e},closestLayerPoint:function(e){for(var t,n,r=1/0,o=this._parts,a=null,s=0,l=o.length;l>s;s++)for(var u=o[s],c=1,d=u.length;d>c;c++){t=u[c-1],n=u[c];var h=i.LineUtil._sqClosestPointOnSegment(e,t,n,!0);r>h&&(r=h,a=i.LineUtil._sqClosestPointOnSegment(e,t,n))}return a&&(a.distance=Math.sqrt(r)),a},getBounds:function(){return new i.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(e,t){var n,r,o=t?e:[];for(n=0,r=e.length;r>n;n++){if(i.Util.isArray(e[n])&&"number"!=typeof e[n][0])return;o[n]=i.latLng(e[n])}return o},_initEvents:function(){i.Path.prototype._initEvents.call(this)},_getPathPartStr:function(e){for(var t,n=i.Path.VML,r=0,o=e.length,a="";o>r;r++)t=e[r],n&&t._round(),a+=(r?"L":"M")+t.x+" "+t.y;return a},_clipPoints:function(){var e,t,n,r=this._originalPoints,o=r.length;if(this.options.noClip)this._parts=[r];else{this._parts=[];var a=this._parts,s=this._map._pathViewport,l=i.LineUtil;for(e=0,t=0;o-1>e;e++)(n=l.clipSegment(r[e],r[e+1],s,e))&&(a[t]=a[t]||[],a[t].push(n[0]),(n[1]!==r[e+1]||e===o-2)&&(a[t].push(n[1]),t++))}},_simplifyPoints:function(){for(var e=this._parts,t=i.LineUtil,n=0,r=e.length;r>n;n++)e[n]=t.simplify(e[n],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),i.Path.prototype._updatePath.call(this))}}),i.polyline=function(e,t){return new i.Polyline(e,t)},i.PolyUtil={},i.PolyUtil.clipPolygon=function(e,t){var n,r,o,a,s,l,u,c,d,h=[1,4,2,8],f=i.LineUtil;for(r=0,u=e.length;u>r;r++)e[r]._code=f._getBitCode(e[r],t);for(a=0;4>a;a++){for(c=h[a],n=[],r=0,o=(u=e.length)-1;u>r;o=r++)s=e[r],l=e[o],s._code&c?l._code&c||((d=f._getEdgeIntersection(l,s,c,t))._code=f._getBitCode(d,t),n.push(d)):(l._code&c&&((d=f._getEdgeIntersection(l,s,c,t))._code=f._getBitCode(d,t),n.push(d)),n.push(s));e=n}return e},i.Polygon=i.Polyline.extend({options:{fill:!0},initialize:function(e,t){i.Polyline.prototype.initialize.call(this,e,t),this._initWithHoles(e)},_initWithHoles:function(e){var t,n,r;if(e&&i.Util.isArray(e[0])&&"number"!=typeof e[0][0])for(this._latlngs=this._convertLatLngs(e[0]),this._holes=e.slice(1),t=0,n=this._holes.length;n>t;t++)(r=this._holes[t]=this._convertLatLngs(this._holes[t]))[0].equals(r[r.length-1])&&r.pop();(e=this._latlngs).length>=2&&e[0].equals(e[e.length-1])&&e.pop()},projectLatlngs:function(){var e,t,n,r;if(i.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes)for(e=0,n=this._holes.length;n>e;e++)for(this._holePoints[e]=[],t=0,r=this._holes[e].length;r>t;t++)this._holePoints[e][t]=this._map.latLngToLayerPoint(this._holes[e][t])},setLatLngs:function(e){return e&&i.Util.isArray(e[0])&&"number"!=typeof e[0][0]?(this._initWithHoles(e),this.redraw()):i.Polyline.prototype.setLatLngs.call(this,e)},_clipPoints:function(){var e=this._originalPoints,t=[];if(this._parts=[e].concat(this._holePoints),!this.options.noClip){for(var n=0,r=this._parts.length;r>n;n++){var o=i.PolyUtil.clipPolygon(this._parts[n],this._map._pathViewport);o.length&&t.push(o)}this._parts=t}},_getPathPartStr:function(e){return i.Polyline.prototype._getPathPartStr.call(this,e)+(i.Browser.svg?"z":"x")}}),i.polygon=function(e,t){return new i.Polygon(e,t)},function(){function e(e){return i.FeatureGroup.extend({initialize:function(e,t){this._layers={},this._options=t,this.setLatLngs(e)},setLatLngs:function(t){var n=0,r=t.length;for(this.eachLayer((function(e){r>n?e.setLatLngs(t[n++]):this.removeLayer(e)}),this);r>n;)this.addLayer(new e(t[n++],this._options));return this},getLatLngs:function(){var e=[];return this.eachLayer((function(t){e.push(t.getLatLngs())})),e}})}i.MultiPolyline=e(i.Polyline),i.MultiPolygon=e(i.Polygon),i.multiPolyline=function(e,t){return new i.MultiPolyline(e,t)},i.multiPolygon=function(e,t){return new i.MultiPolygon(e,t)}}(),i.Rectangle=i.Polygon.extend({initialize:function(e,t){i.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=i.latLngBounds(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}}),i.rectangle=function(e,t){return new i.Rectangle(e,t)},i.Circle=i.Path.extend({initialize:function(e,t,n){i.Path.prototype.initialize.call(this,n),this._latlng=i.latLng(e),this._mRadius=t},options:{fill:!0},setLatLng:function(e){return this._latlng=i.latLng(e),this.redraw()},setRadius:function(e){return this._mRadius=e,this.redraw()},projectLatlngs:function(){var e=this._getLngRadius(),t=this._latlng,n=this._map.latLngToLayerPoint([t.lat,t.lng-e]);this._point=this._map.latLngToLayerPoint(t),this._radius=Math.max(this._point.x-n.x,1)},getBounds:function(){var e=this._getLngRadius(),t=this._mRadius/40075017*360,n=this._latlng;return new i.LatLngBounds([n.lat-t,n.lng-e],[n.lat+t,n.lng+e])},getLatLng:function(){return this._latlng},getPathString:function(){var e=this._point,t=this._radius;return this._checkIfEmpty()?"":i.Browser.svg?"M"+e.x+","+(e.y-t)+"A"+t+","+t+",0,1,1,"+(e.x-.1)+","+(e.y-t)+" z":(e._round(),t=Math.round(t),"AL "+e.x+","+e.y+" "+t+","+t+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(i.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var e=this._map._pathViewport,t=this._radius,n=this._point;return n.x-t>e.max.x||n.y-t>e.max.y||n.x+t<e.min.x||n.y+t<e.min.y}}),i.circle=function(e,t,n){return new i.Circle(e,t,n)},i.CircleMarker=i.Circle.extend({options:{radius:10,weight:2},initialize:function(e,t){i.Circle.prototype.initialize.call(this,e,null,t),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){i.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(e){return i.Circle.prototype.setLatLng.call(this,e),this._popup&&this._popup._isOpen&&this._popup.setLatLng(e),this},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius}}),i.circleMarker=function(e,t){return new i.CircleMarker(e,t)},i.Polyline.include(i.Path.CANVAS?{_containsPoint:function(e,t){var n,r,o,a,s,l,u=this.options.weight/2;for(i.Browser.touch&&(u+=10),n=0,a=this._parts.length;a>n;n++)for(r=0,o=(s=(l=this._parts[n]).length)-1;s>r;o=r++)if((t||0!==r)&&u>=i.LineUtil.pointToSegmentDistance(e,l[o],l[r]))return!0;return!1}}:{}),i.Polygon.include(i.Path.CANVAS?{_containsPoint:function(e){var t,n,r,o,a,s,l,u,c=!1;if(i.Polyline.prototype._containsPoint.call(this,e,!0))return!0;for(o=0,l=this._parts.length;l>o;o++)for(a=0,s=(u=(t=this._parts[o]).length)-1;u>a;s=a++)n=t[a],r=t[s],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c}}:{}),i.Circle.include(i.Path.CANVAS?{_drawPath:function(){var e=this._point;this._ctx.beginPath(),this._ctx.arc(e.x,e.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(e){var t=this._point,n=this.options.stroke?this.options.weight/2:0;return e.distanceTo(t)<=this._radius+n}}:{}),i.CircleMarker.include(i.Path.CANVAS?{_updateStyle:function(){i.Path.prototype._updateStyle.call(this)}}:{}),i.GeoJSON=i.FeatureGroup.extend({initialize:function(e,t){i.setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,o=i.Util.isArray(e)?e:e.features;if(o){for(t=0,n=o.length;n>t;t++)((r=o[t]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(o[t]);return this}var a=this.options;if(!a.filter||a.filter(e)){var s=i.GeoJSON.geometryToLayer(e,a.pointToLayer,a.coordsToLatLng,a);return s.feature=i.GeoJSON.asFeature(e),s.defaultOptions=s.options,this.resetStyle(s),a.onEachFeature&&a.onEachFeature(e,s),this.addLayer(s)}},resetStyle:function(e){var t=this.options.style;t&&(i.Util.extend(e.options,e.defaultOptions),this._setLayerStyle(e,t))},setStyle:function(e){this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function(e,t){"function"==typeof t&&(t=t(e.feature)),e.setStyle&&e.setStyle(t)}}),i.extend(i.GeoJSON,{geometryToLayer:function(e,t,n,r){var o,a,s,l,u="Feature"===e.type?e.geometry:e,c=u.coordinates,d=[];switch(n=n||this.coordsToLatLng,u.type){case"Point":return o=n(c),t?t(e,o):new i.Marker(o);case"MultiPoint":for(s=0,l=c.length;l>s;s++)o=n(c[s]),d.push(t?t(e,o):new i.Marker(o));return new i.FeatureGroup(d);case"LineString":return a=this.coordsToLatLngs(c,0,n),new i.Polyline(a,r);case"Polygon":if(2===c.length&&!c[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(c,1,n),new i.Polygon(a,r);case"MultiLineString":return a=this.coordsToLatLngs(c,1,n),new i.MultiPolyline(a,r);case"MultiPolygon":return a=this.coordsToLatLngs(c,2,n),new i.MultiPolygon(a,r);case"GeometryCollection":for(s=0,l=u.geometries.length;l>s;s++)d.push(this.geometryToLayer({geometry:u.geometries[s],type:"Feature",properties:e.properties},t,n,r));return new i.FeatureGroup(d);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(e){return new i.LatLng(e[1],e[0],e[2])},coordsToLatLngs:function(e,t,n){var r,i,o,a=[];for(i=0,o=e.length;o>i;i++)r=t?this.coordsToLatLngs(e[i],t-1,n):(n||this.coordsToLatLng)(e[i]),a.push(r);return a},latLngToCoords:function(e){var t=[e.lng,e.lat];return e.alt!==n&&t.push(e.alt),t},latLngsToCoords:function(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(i.GeoJSON.latLngToCoords(e[n]));return t},getFeature:function(e,t){return e.feature?i.extend({},e.feature,{geometry:t}):i.GeoJSON.asFeature(t)},asFeature:function(e){return"Feature"===e.type?e:{type:"Feature",properties:{},geometry:e}}});var a={toGeoJSON:function(){return i.GeoJSON.getFeature(this,{type:"Point",coordinates:i.GeoJSON.latLngToCoords(this.getLatLng())})}};i.Marker.include(a),i.Circle.include(a),i.CircleMarker.include(a),i.Polyline.include({toGeoJSON:function(){return i.GeoJSON.getFeature(this,{type:"LineString",coordinates:i.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),i.Polygon.include({toGeoJSON:function(){var e,t,n,r=[i.GeoJSON.latLngsToCoords(this.getLatLngs())];if(r[0].push(r[0][0]),this._holes)for(e=0,t=this._holes.length;t>e;e++)(n=i.GeoJSON.latLngsToCoords(this._holes[e])).push(n[0]),r.push(n);return i.GeoJSON.getFeature(this,{type:"Polygon",coordinates:r})}}),function(){function e(e){return function(){var t=[];return this.eachLayer((function(e){t.push(e.toGeoJSON().geometry.coordinates)})),i.GeoJSON.getFeature(this,{type:e,coordinates:t})}}i.MultiPolyline.include({toGeoJSON:e("MultiLineString")}),i.MultiPolygon.include({toGeoJSON:e("MultiPolygon")}),i.LayerGroup.include({toGeoJSON:function(){var t,n=this.feature&&this.feature.geometry,r=[];if(n&&"MultiPoint"===n.type)return e("MultiPoint").call(this);var o=n&&"GeometryCollection"===n.type;return this.eachLayer((function(e){e.toGeoJSON&&(t=e.toGeoJSON(),r.push(o?t.geometry:i.GeoJSON.asFeature(t)))})),o?i.GeoJSON.getFeature(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}})}(),i.geoJson=function(e,t){return new i.GeoJSON(e,t)},i.DomEvent={addListener:function(e,t,n,r){var o,a,s,l=i.stamp(n),u="_leaflet_"+t+l;return e[u]?this:(o=function(t){return n.call(r||e,t||i.DomEvent._getEvent())},i.Browser.pointer&&0===t.indexOf("touch")?this.addPointerListener(e,t,o,l):(i.Browser.touch&&"dblclick"===t&&this.addDoubleTapListener&&this.addDoubleTapListener(e,o,l),"addEventListener"in e?"mousewheel"===t?(e.addEventListener("DOMMouseScroll",o,!1),e.addEventListener(t,o,!1)):"mouseenter"===t||"mouseleave"===t?(a=o,s="mouseenter"===t?"mouseover":"mouseout",o=function(t){return i.DomEvent._checkMouse(e,t)?a(t):void 0},e.addEventListener(s,o,!1)):"click"===t&&i.Browser.android?(a=o,o=function(e){return i.DomEvent._filterClick(e,a)},e.addEventListener(t,o,!1)):e.addEventListener(t,o,!1):"attachEvent"in e&&e.attachEvent("on"+t,o),e[u]=o,this))},removeListener:function(e,t,n){var r=i.stamp(n),o="_leaflet_"+t+r,a=e[o];return a?(i.Browser.pointer&&0===t.indexOf("touch")?this.removePointerListener(e,t,r):i.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(e,r):"removeEventListener"in e?"mousewheel"===t?(e.removeEventListener("DOMMouseScroll",a,!1),e.removeEventListener(t,a,!1)):"mouseenter"===t||"mouseleave"===t?e.removeEventListener("mouseenter"===t?"mouseover":"mouseout",a,!1):e.removeEventListener(t,a,!1):"detachEvent"in e&&e.detachEvent("on"+t,a),e[o]=null,this):this},stopPropagation:function(e){return e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,i.DomEvent._skipped(e),this},disableScrollPropagation:function(e){var t=i.DomEvent.stopPropagation;return i.DomEvent.on(e,"mousewheel",t).on(e,"MozMousePixelScroll",t)},disableClickPropagation:function(e){for(var t=i.DomEvent.stopPropagation,n=i.Draggable.START.length-1;n>=0;n--)i.DomEvent.on(e,i.Draggable.START[n],t);return i.DomEvent.on(e,"click",i.DomEvent._fakeStop).on(e,"dblclick",t)},preventDefault:function(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this},stop:function(e){return i.DomEvent.preventDefault(e).stopPropagation(e)},getMousePosition:function(e,t){if(!t)return new i.Point(e.clientX,e.clientY);var n=t.getBoundingClientRect();return new i.Point(e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop)},getWheelDelta:function(e){var t=0;return e.wheelDelta&&(t=e.wheelDelta/120),e.detail&&(t=-e.detail/3),t},_skipEvents:{},_fakeStop:function(e){i.DomEvent._skipEvents[e.type]=!0},_skipped:function(e){var t=this._skipEvents[e.type];return this._skipEvents[e.type]=!1,t},_checkMouse:function(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e},_getEvent:function(){var t=e.event;if(!t)for(var n=arguments.callee.caller;n&&(!(t=n.arguments[0])||e.Event!==t.constructor);)n=n.caller;return t},_filterClick:function(e,t){var n=e.timeStamp||e.originalEvent.timeStamp,r=i.DomEvent._lastClick&&n-i.DomEvent._lastClick;return r&&r>100&&500>r||e.target._simulatedClick&&!e._simulated?void i.DomEvent.stop(e):(i.DomEvent._lastClick=n,t(e))}},i.DomEvent.on=i.DomEvent.addListener,i.DomEvent.off=i.DomEvent.removeListener,i.Draggable=i.Class.extend({includes:i.Mixin.Events,statics:{START:i.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(e,t){this._element=e,this._dragStartTarget=t||e},enable:function(){if(!this._enabled){for(var e=i.Draggable.START.length-1;e>=0;e--)i.DomEvent.on(this._dragStartTarget,i.Draggable.START[e],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var e=i.Draggable.START.length-1;e>=0;e--)i.DomEvent.off(this._dragStartTarget,i.Draggable.START[e],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(e){if(this._moved=!1,!e.shiftKey&&(1===e.which||1===e.button||e.touches)&&(i.DomEvent.stopPropagation(e),!i.Draggable._disabled&&(i.DomUtil.disableImageDrag(),i.DomUtil.disableTextSelection(),!this._moving))){var n=e.touches?e.touches[0]:e;this._startPoint=new i.Point(n.clientX,n.clientY),this._startPos=this._newPos=i.DomUtil.getPosition(this._element),i.DomEvent.on(t,i.Draggable.MOVE[e.type],this._onMove,this).on(t,i.Draggable.END[e.type],this._onUp,this)}},_onMove:function(e){if(e.touches&&e.touches.length>1)this._moved=!0;else{var n=e.touches&&1===e.touches.length?e.touches[0]:e,r=new i.Point(n.clientX,n.clientY).subtract(this._startPoint);(r.x||r.y)&&(i.Browser.touch&&Math.abs(r.x)+Math.abs(r.y)<3||(i.DomEvent.preventDefault(e),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=i.DomUtil.getPosition(this._element).subtract(r),i.DomUtil.addClass(t.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,i.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,i.Util.cancelAnimFrame(this._animRequest),this._animRequest=i.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))}},_updatePosition:function(){this.fire("predrag"),i.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){for(var e in i.DomUtil.removeClass(t.body,"leaflet-dragging"),this._lastTarget&&(i.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),i.Draggable.MOVE)i.DomEvent.off(t,i.Draggable.MOVE[e],this._onMove).off(t,i.Draggable.END[e],this._onUp);i.DomUtil.enableImageDrag(),i.DomUtil.enableTextSelection(),this._moved&&this._moving&&(i.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),i.Handler=i.Class.extend({initialize:function(e){this._map=e},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),i.Map.mergeOptions({dragging:!0,inertia:!i.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:i.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),i.Map.Drag=i.Handler.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new i.Draggable(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),e.on("viewreset",this._onViewReset,this),e.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var e=this._map;e._panAnim&&e._panAnim.stop(),e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var e=this._lastTime=+new Date,t=this._lastPos=this._draggable._newPos;this._positions.push(t),this._times.push(e),e-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var e=this._map.getSize()._divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,o=(r+t+n)%e-t-n,a=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,n=t.options,r=+new Date-this._lastTime,o=!n.inertia||r>n.inertiaThreshold||!this._positions[0];if(t.fire("dragend",e),o)t.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),s=(this._lastTime+r-this._times[0])/1e3,l=n.easeLinearity,u=a.multiplyBy(l/s),c=u.distanceTo([0,0]),d=Math.min(n.inertiaMaxSpeed,c),h=u.multiplyBy(d/c),f=d/(n.inertiaDeceleration*l),p=h.multiplyBy(-f/2).round();p.x&&p.y?(p=t._limitOffset(p,t.options.maxBounds),i.Util.requestAnimFrame((function(){t.panBy(p,{duration:f,easeLinearity:l,noMoveStart:!0})}))):t.fire("moveend")}}}),i.Map.addInitHook("addHandler","dragging",i.Map.Drag),i.Map.mergeOptions({doubleClickZoom:!0}),i.Map.DoubleClickZoom=i.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom()+(e.originalEvent.shiftKey?-1:1);"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}}),i.Map.addInitHook("addHandler","doubleClickZoom",i.Map.DoubleClickZoom),i.Map.mergeOptions({scrollWheelZoom:!0}),i.Map.ScrollWheelZoom=i.Handler.extend({addHooks:function(){i.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),i.DomEvent.on(this._map._container,"MozMousePixelScroll",i.DomEvent.preventDefault),this._delta=0},removeHooks:function(){i.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),i.DomEvent.off(this._map._container,"MozMousePixelScroll",i.DomEvent.preventDefault)},_onWheelScroll:function(e){var t=i.DomEvent.getWheelDelta(e);this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var n=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i.bind(this._performZoom,this),n),i.DomEvent.preventDefault(e),i.DomEvent.stopPropagation(e)},_performZoom:function(){var e=this._map,t=this._delta,n=e.getZoom();t=t>0?Math.ceil(t):Math.floor(t),t=Math.max(Math.min(t,4),-4),t=e._limitZoom(n+t)-n,this._delta=0,this._startTime=null,t&&("center"===e.options.scrollWheelZoom?e.setZoom(n+t):e.setZoomAround(this._lastMousePos,n+t))}}),i.Map.addInitHook("addHandler","scrollWheelZoom",i.Map.ScrollWheelZoom),i.extend(i.DomEvent,{_touchstart:i.Browser.msPointer?"MSPointerDown":i.Browser.pointer?"pointerdown":"touchstart",_touchend:i.Browser.msPointer?"MSPointerUp":i.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(e,n,r){function o(e){var t;if(i.Browser.pointer?(p.push(e.pointerId),t=p.length):t=e.touches.length,!(t>1)){var n=Date.now(),r=n-(s||n);l=e.touches?e.touches[0]:e,u=r>0&&c>=r,s=n}}function a(e){if(i.Browser.pointer){var t=p.indexOf(e.pointerId);if(-1===t)return;p.splice(t,1)}if(u){if(i.Browser.pointer){var r,o={};for(var a in l)r=l[a],o[a]="function"==typeof r?r.bind(l):r;l=o}l.type="dblclick",n(l),s=null}}var s,l,u=!1,c=250,d="_leaflet_",h=this._touchstart,f=this._touchend,p=[];e[d+h+r]=o,e[d+f+r]=a;var m=i.Browser.pointer?t.documentElement:e;return e.addEventListener(h,o,!1),m.addEventListener(f,a,!1),i.Browser.pointer&&m.addEventListener(i.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(e,n){var r="_leaflet_";return e.removeEventListener(this._touchstart,e[r+this._touchstart+n],!1),(i.Browser.pointer?t.documentElement:e).removeEventListener(this._touchend,e[r+this._touchend+n],!1),i.Browser.pointer&&t.documentElement.removeEventListener(i.DomEvent.POINTER_CANCEL,e[r+this._touchend+n],!1),this}}),i.extend(i.DomEvent,{POINTER_DOWN:i.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:i.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:i.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:i.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(e,t,n,r){switch(t){case"touchstart":return this.addPointerListenerStart(e,t,n,r);case"touchend":return this.addPointerListenerEnd(e,t,n,r);case"touchmove":return this.addPointerListenerMove(e,t,n,r);default:throw"Unknown touch event type"}},addPointerListenerStart:function(e,n,r,o){var a=this._pointers,s=function(e){"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&i.DomEvent.preventDefault(e);for(var t=!1,n=0;n<a.length;n++)if(a[n].pointerId===e.pointerId){t=!0;break}t||a.push(e),e.touches=a.slice(),e.changedTouches=[e],r(e)};if(e["_leaflet_touchstart"+o]=s,e.addEventListener(this.POINTER_DOWN,s,!1),!this._pointerDocumentListener){var l=function(e){for(var t=0;t<a.length;t++)if(a[t].pointerId===e.pointerId){a.splice(t,1);break}};t.documentElement.addEventListener(this.POINTER_UP,l,!1),t.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(e,t,n,r){function i(e){if(e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&"mouse"!==e.pointerType||0!==e.buttons){for(var t=0;t<o.length;t++)if(o[t].pointerId===e.pointerId){o[t]=e;break}e.touches=o.slice(),e.changedTouches=[e],n(e)}}var o=this._pointers;return e["_leaflet_touchmove"+r]=i,e.addEventListener(this.POINTER_MOVE,i,!1),this},addPointerListenerEnd:function(e,t,n,r){var i=this._pointers,o=function(e){for(var t=0;t<i.length;t++)if(i[t].pointerId===e.pointerId){i.splice(t,1);break}e.touches=i.slice(),e.changedTouches=[e],n(e)};return e["_leaflet_touchend"+r]=o,e.addEventListener(this.POINTER_UP,o,!1),e.addEventListener(this.POINTER_CANCEL,o,!1),this},removePointerListener:function(e,t,n){var r=e["_leaflet_"+t+n];switch(t){case"touchstart":e.removeEventListener(this.POINTER_DOWN,r,!1);break;case"touchmove":e.removeEventListener(this.POINTER_MOVE,r,!1);break;case"touchend":e.removeEventListener(this.POINTER_UP,r,!1),e.removeEventListener(this.POINTER_CANCEL,r,!1)}return this}}),i.Map.mergeOptions({touchZoom:i.Browser.touch&&!i.Browser.android23,bounceAtZoomLimits:!0}),i.Map.TouchZoom=i.Handler.extend({addHooks:function(){i.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){i.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(e.touches&&2===e.touches.length&&!n._animatingZoom&&!this._zooming){var r=n.mouseEventToLayerPoint(e.touches[0]),o=n.mouseEventToLayerPoint(e.touches[1]),a=n._getCenterLayerPoint();this._startCenter=r.add(o)._divideBy(2),this._startDist=r.distanceTo(o),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),n._panAnim&&n._panAnim.stop(),i.DomEvent.on(t,"touchmove",this._onTouchMove,this).on(t,"touchend",this._onTouchEnd,this),i.DomEvent.preventDefault(e)}},_onTouchMove:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&this._zooming){var n=t.mouseEventToLayerPoint(e.touches[0]),r=t.mouseEventToLayerPoint(e.touches[1]);this._scale=n.distanceTo(r)/this._startDist,this._delta=n._add(r)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(t.options.bounceAtZoomLimits||!(t.getZoom()===t.getMinZoom()&&this._scale<1||t.getZoom()===t.getMaxZoom()&&this._scale>1))&&(this._moved||(i.DomUtil.addClass(t._mapPane,"leaflet-touching"),t.fire("movestart").fire("zoomstart"),this._moved=!0),i.Util.cancelAnimFrame(this._animRequest),this._animRequest=i.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),i.DomEvent.preventDefault(e))}},_updateOnMove:function(){var e=this._map,t=this._getScaleOrigin(),n=e.layerPointToLatLng(t),r=e.getScaleZoom(this._scale);e._animateZoom(n,r,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(this._moved&&this._zooming){var e=this._map;this._zooming=!1,i.DomUtil.removeClass(e._mapPane,"leaflet-touching"),i.Util.cancelAnimFrame(this._animRequest),i.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"touchend",this._onTouchEnd);var n=this._getScaleOrigin(),r=e.layerPointToLatLng(n),o=e.getZoom(),a=e.getScaleZoom(this._scale)-o,s=a>0?Math.ceil(a):Math.floor(a),l=e._limitZoom(o+s),u=e.getZoomScale(l)/this._scale;e._animateZoom(r,l,n,u)}else this._zooming=!1},_getScaleOrigin:function(){var e=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(e)}}),i.Map.addInitHook("addHandler","touchZoom",i.Map.TouchZoom),i.Map.mergeOptions({tap:!0,tapTolerance:15}),i.Map.Tap=i.Handler.extend({addHooks:function(){i.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){i.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(i.DomEvent.preventDefault(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var n=e.touches[0],r=n.target;this._startPos=this._newPos=new i.Point(n.clientX,n.clientY),r.tagName&&"a"===r.tagName.toLowerCase()&&i.DomUtil.addClass(r,"leaflet-active"),this._holdTimeout=setTimeout(i.bind((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",n))}),this),1e3),i.DomEvent.on(t,"touchmove",this._onMove,this).on(t,"touchend",this._onUp,this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),i.DomEvent.off(t,"touchmove",this._onMove,this).off(t,"touchend",this._onUp,this),this._fireClick&&e&&e.changedTouches){var n=e.changedTouches[0],r=n.target;r&&r.tagName&&"a"===r.tagName.toLowerCase()&&i.DomUtil.removeClass(r,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",n)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var t=e.touches[0];this._newPos=new i.Point(t.clientX,t.clientY)},_simulateEvent:function(n,r){var i=t.createEvent("MouseEvents");i._simulated=!0,r.target._simulatedClick=!0,i.initMouseEvent(n,!0,!0,e,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(i)}}),i.Browser.touch&&!i.Browser.pointer&&i.Map.addInitHook("addHandler","tap",i.Map.Tap),i.Map.mergeOptions({boxZoom:!0}),i.Map.BoxZoom=i.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._moved=!1},addHooks:function(){i.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){i.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(e){return this._moved=!1,!(!e.shiftKey||1!==e.which&&1!==e.button)&&(i.DomUtil.disableTextSelection(),i.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(e),void i.DomEvent.on(t,"mousemove",this._onMouseMove,this).on(t,"mouseup",this._onMouseUp,this).on(t,"keydown",this._onKeyDown,this))},_onMouseMove:function(e){this._moved||(this._box=i.DomUtil.create("div","leaflet-zoom-box",this._pane),i.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var t=this._startLayerPoint,n=this._box,r=this._map.mouseEventToLayerPoint(e),o=r.subtract(t),a=new i.Point(Math.min(r.x,t.x),Math.min(r.y,t.y));i.DomUtil.setPosition(n,a),this._moved=!0,n.style.width=Math.max(0,Math.abs(o.x)-4)+"px",n.style.height=Math.max(0,Math.abs(o.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),i.DomUtil.enableTextSelection(),i.DomUtil.enableImageDrag(),i.DomEvent.off(t,"mousemove",this._onMouseMove).off(t,"mouseup",this._onMouseUp).off(t,"keydown",this._onKeyDown)},_onMouseUp:function(e){this._finish();var t=this._map,n=t.mouseEventToLayerPoint(e);if(!this._startLayerPoint.equals(n)){var r=new i.LatLngBounds(t.layerPointToLatLng(this._startLayerPoint),t.layerPointToLatLng(n));t.fitBounds(r),t.fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}}),i.Map.addInitHook("addHandler","boxZoom",i.Map.BoxZoom),i.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),i.Map.Keyboard=i.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(e){this._map=e,this._setPanOffset(e.options.keyboardPanOffset),this._setZoomOffset(e.options.keyboardZoomOffset)},addHooks:function(){var e=this._map._container;-1===e.tabIndex&&(e.tabIndex="0"),i.DomEvent.on(e,"focus",this._onFocus,this).on(e,"blur",this._onBlur,this).on(e,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var e=this._map._container;i.DomEvent.off(e,"focus",this._onFocus,this).off(e,"blur",this._onBlur,this).off(e,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var n=t.body,r=t.documentElement,i=n.scrollTop||r.scrollTop,o=n.scrollLeft||r.scrollLeft;this._map._container.focus(),e.scrollTo(o,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(e){var t,n,r=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;n>t;t++)r[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;n>t;t++)r[i.right[t]]=[e,0];for(t=0,n=i.down.length;n>t;t++)r[i.down[t]]=[0,e];for(t=0,n=i.up.length;n>t;t++)r[i.up[t]]=[0,-1*e]},_setZoomOffset:function(e){var t,n,r=this._zoomKeys={},i=this.keyCodes;for(t=0,n=i.zoomIn.length;n>t;t++)r[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;n>t;t++)r[i.zoomOut[t]]=-e},_addHooks:function(){i.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){i.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){var t=e.keyCode,n=this._map;if(t in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;n.panBy(this._panKeys[t]),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else{if(!(t in this._zoomKeys))return;n.setZoom(n.getZoom()+this._zoomKeys[t])}i.DomEvent.stop(e)}}),i.Map.addInitHook("addHandler","keyboard",i.Map.Keyboard),i.Handler.MarkerDrag=i.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new i.Draggable(e,e)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),i.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),i.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var e=this._marker,t=e._shadow,n=i.DomUtil.getPosition(e._icon),r=e._map.layerPointToLatLng(n);t&&i.DomUtil.setPosition(t,n),e._latlng=r,e.fire("move",{latlng:r}).fire("drag")},_onDragEnd:function(e){this._marker.fire("moveend").fire("dragend",e)}}),i.Control=i.Class.extend({options:{position:"topright"},initialize:function(e){i.setOptions(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return i.DomUtil.addClass(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this},removeFrom:function(e){var t=this.getPosition();return e._controlCorners[t].removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(e),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),i.control=function(e){return new i.Control(e)},i.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.removeFrom(this),this},_initControlPos:function(){function e(e,o){var a=n+e+" "+n+o;t[e+o]=i.DomUtil.create("div",a,r)}var t=this._controlCorners={},n="leaflet-",r=this._controlContainer=i.DomUtil.create("div",n+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),i.Control.Zoom=i.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=i.DomUtil.create("div",t+" leaflet-bar");return this._map=e,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,t+"-in",n,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,t+"-out",n,this._zoomOut,this),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(e){this._map.zoomIn(e.shiftKey?3:1)},_zoomOut:function(e){this._map.zoomOut(e.shiftKey?3:1)},_createButton:function(e,t,n,r,o,a){var s=i.DomUtil.create("a",n,r);s.innerHTML=e,s.href="#",s.title=t;var l=i.DomEvent.stopPropagation;return i.DomEvent.on(s,"click",l).on(s,"mousedown",l).on(s,"dblclick",l).on(s,"click",i.DomEvent.preventDefault).on(s,"click",o,a).on(s,"click",this._refocusOnMap,a),s},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";i.DomUtil.removeClass(this._zoomInButton,t),i.DomUtil.removeClass(this._zoomOutButton,t),e._zoom===e.getMinZoom()&&i.DomUtil.addClass(this._zoomOutButton,t),e._zoom===e.getMaxZoom()&&i.DomUtil.addClass(this._zoomInButton,t)}}),i.Map.mergeOptions({zoomControl:!0}),i.Map.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new i.Control.Zoom,this.addControl(this.zoomControl))})),i.control.zoom=function(e){return new i.Control.Zoom(e)},i.Control.Attribution=i.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(e){i.setOptions(this,e),this._attributions={}},onAdd:function(e){for(var t in this._container=i.DomUtil.create("div","leaflet-control-attribution"),i.DomEvent.disableClickPropagation(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return e.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(e){e.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):void 0},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):void 0},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(" | ")}},_onLayerAdd:function(e){e.layer.getAttribution&&this.addAttribution(e.layer.getAttribution())},_onLayerRemove:function(e){e.layer.getAttribution&&this.removeAttribution(e.layer.getAttribution())}}),i.Map.mergeOptions({attributionControl:!0}),i.Map.addInitHook((function(){this.options.attributionControl&&(this.attributionControl=(new i.Control.Attribution).addTo(this))})),i.control.attribution=function(e){return new i.Control.Attribution(e)},i.Control.Scale=i.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(e){this._map=e;var t="leaflet-control-scale",n=i.DomUtil.create("div",t),r=this.options;return this._addScales(r,t,n),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=i.DomUtil.create("div",t+"-line",n)),e.imperial&&(this._iScale=i.DomUtil.create("div",t+"-line",n))},_update:function(){var e=this._map.getBounds(),t=e.getCenter().lat,n=6378137*Math.PI*Math.cos(t*Math.PI/180)*(e.getNorthEast().lng-e.getSouthWest().lng)/180,r=this._map.getSize(),i=this.options,o=0;r.x>0&&(o=n*(i.maxWidth/r.x)),this._updateScales(i,o)},_updateScales:function(e,t){e.metric&&t&&this._updateMetric(t),e.imperial&&t&&this._updateImperial(t)},_updateMetric:function(e){var t=this._getRoundNum(e);this._mScale.style.width=this._getScaleWidth(t/e)+"px",this._mScale.innerHTML=1e3>t?t+" m":t/1e3+" km"},_updateImperial:function(e){var t,n,r,i=3.2808399*e,o=this._iScale;i>5280?(t=i/5280,n=this._getRoundNum(t),o.style.width=this._getScaleWidth(n/t)+"px",o.innerHTML=n+" mi"):(r=this._getRoundNum(i),o.style.width=this._getScaleWidth(r/i)+"px",o.innerHTML=r+" ft")},_getScaleWidth:function(e){return Math.round(this.options.maxWidth*e)-10},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),i.control.scale=function(e){return new i.Control.Scale(e)},i.Control.Layers=i.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(e,t,n){for(var r in i.setOptions(this,n),this._layers={},this._lastZIndex=0,this._handlingClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){return this._initLayout(),this._update(),e.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(e){e.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._update(),this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._update(),this},removeLayer:function(e){var t=i.stamp(e);return delete this._layers[t],this._update(),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=i.DomUtil.create("div",e);t.setAttribute("aria-haspopup",!0),i.Browser.touch?i.DomEvent.on(t,"click",i.DomEvent.stopPropagation):i.DomEvent.disableClickPropagation(t).disableScrollPropagation(t);var n=this._form=i.DomUtil.create("form",e+"-list");if(this.options.collapsed){i.Browser.android||i.DomEvent.on(t,"mouseover",this._expand,this).on(t,"mouseout",this._collapse,this);var r=this._layersLink=i.DomUtil.create("a",e+"-toggle",t);r.href="#",r.title="Layers",i.Browser.touch?i.DomEvent.on(r,"click",i.DomEvent.stop).on(r,"click",this._expand,this):i.DomEvent.on(r,"focus",this._expand,this),i.DomEvent.on(n,"click",(function(){setTimeout(i.bind(this._onInputClick,this),0)}),this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=i.DomUtil.create("div",e+"-base",n),this._separator=i.DomUtil.create("div",e+"-separator",n),this._overlaysList=i.DomUtil.create("div",e+"-overlays",n),t.appendChild(n)},_addLayer:function(e,t,n){var r=i.stamp(e);this._layers[r]={layer:e,name:t,overlay:n},this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var e,t,n=!1,r=!1;for(e in this._layers)t=this._layers[e],this._addItem(t),r=r||t.overlay,n=n||!t.overlay;this._separator.style.display=r&&n?"":"none"}},_onLayerChange:function(e){var t=this._layers[i.stamp(e.layer)];if(t){this._handlingClick||this._update();var n=t.overlay?"layeradd"===e.type?"overlayadd":"overlayremove":"layeradd"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)}},_createRadioElement:function(e,n){var r='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"';n&&(r+=' checked="checked"'),r+="/>";var i=t.createElement("div");return i.innerHTML=r,i.firstChild},_addItem:function(e){var n,r=t.createElement("label"),o=this._map.hasLayer(e.layer);e.overlay?((n=t.createElement("input")).type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=o):n=this._createRadioElement("leaflet-base-layers",o),n.layerId=i.stamp(e.layer),i.DomEvent.on(n,"click",this._onInputClick,this);var a=t.createElement("span");return a.innerHTML=" "+e.name,r.appendChild(n),r.appendChild(a),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(r),r},_onInputClick:function(){var e,t,n,r=this._form.getElementsByTagName("input"),i=r.length;for(this._handlingClick=!0,e=0;i>e;e++)t=r[e],n=this._layers[t.layerId],t.checked&&!this._map.hasLayer(n.layer)?this._map.addLayer(n.layer):!t.checked&&this._map.hasLayer(n.layer)&&this._map.removeLayer(n.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){i.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),i.control.layers=function(e,t,n){return new i.Control.Layers(e,t,n)},i.PosAnimation=i.Class.extend({includes:i.Mixin.Events,run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._newPos=t,this.fire("start"),e.style[i.DomUtil.TRANSITION]="all "+(n||.25)+"s cubic-bezier(0,0,"+(r||.5)+",1)",i.DomEvent.on(e,i.DomUtil.TRANSITION_END,this._onTransitionEnd,this),i.DomUtil.setPosition(e,t),i.Util.falseFn(e.offsetWidth),this._stepTimer=setInterval(i.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(i.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),i.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var e=this._getPos();return e?(this._el._leaflet_pos=e,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var t,n,r,o=this._el,a=e.getComputedStyle(o);if(i.Browser.any3d){if(!(r=a[i.DomUtil.TRANSFORM].match(this._transformRe)))return;t=parseFloat(r[1]),n=parseFloat(r[2])}else t=parseFloat(a.left),n=parseFloat(a.top);return new i.Point(t,n,!0)},_onTransitionEnd:function(){i.DomEvent.off(this._el,i.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[i.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),i.Map.include({setView:function(e,t,r){return t=t===n?this._zoom:this._limitZoom(t),e=this._limitCenter(i.latLng(e),t,this.options.maxBounds),r=r||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!r.reset&&!0!==r&&(r.animate!==n&&(r.zoom=i.extend({animate:r.animate},r.zoom),r.pan=i.extend({animate:r.animate},r.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom):this._tryAnimatedPan(e,r.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t),this)},panBy:function(e,t){if(t=t||{},!(e=i.point(e).round()).x&&!e.y)return this;if(this._panAnim||(this._panAnim=new i.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){i.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e);this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){i.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._floor();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))}}),i.PosAnimation=i.DomUtil.TRANSITION?i.PosAnimation:i.PosAnimation.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=i.DomUtil.getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=i.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var e=+new Date-this._startTime,t=1e3*this._duration;t>e?this._runFrame(this._easeOut(e/t)):(this._runFrame(1),this._complete())},_runFrame:function(e){var t=this._startPos.add(this._offset.multiplyBy(e));i.DomUtil.setPosition(this._el,t),this.fire("step")},_complete:function(){i.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),i.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),i.DomUtil.TRANSITION&&i.Map.addInitHook((function(){this._zoomAnimated=this.options.zoomAnimation&&i.DomUtil.TRANSITION&&i.Browser.any3d&&!i.Browser.android23&&!i.Browser.mobileOpera,this._zoomAnimated&&i.DomEvent.on(this._mapPane,i.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)})),i.Map.include(i.DomUtil.TRANSITION?{_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r),o=this._getCenterLayerPoint()._add(i);return!(!0!==n.animate&&!this.getSize().contains(i)||(this.fire("movestart").fire("zoomstart"),this._animateZoom(e,t,o,r,null,!0),0))},_animateZoom:function(e,t,n,r,o,a,s){s||(this._animatingZoom=!0),i.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=e,this._animateToZoom=t,i.Draggable&&(i.Draggable._disabled=!0),i.Util.requestAnimFrame((function(){this.fire("zoomanim",{center:e,zoom:t,origin:n,scale:r,delta:o,backwards:a}),setTimeout(i.bind(this._onZoomTransitionEnd,this),250)}),this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,i.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),i.Util.requestAnimFrame((function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),i.Draggable&&(i.Draggable._disabled=!1)}),this))}}:{}),i.TileLayer.include({_animateZoom:function(e){this._animating||(this._animating=!0,this._prepareBgBuffer());var t=this._bgBuffer,n=i.DomUtil.TRANSFORM,r=e.delta?i.DomUtil.getTranslateString(e.delta):t.style[n],o=i.DomUtil.getScaleString(e.scale,e.origin);t.style[n]=e.backwards?o+" "+r:r+" "+o},_endZoomAnim:function(){var e=this._tileContainer,t=this._bgBuffer;e.style.visibility="",e.parentNode.appendChild(e),i.Util.falseFn(t.offsetWidth);var n=this._map.getZoom();(n>this.options.maxZoom||n<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var e=this._map;!e||e._animatingZoom||e.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[i.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var e=this._tileContainer,t=this._bgBuffer,n=this._getLoadedTilesPercentage(t),r=this._getLoadedTilesPercentage(e);return t&&n>.5&&.5>r?(e.style.visibility="hidden",void this._stopLoadingImages(e)):(t.style.visibility="hidden",t.style[i.DomUtil.TRANSFORM]="",this._tileContainer=t,t=this._bgBuffer=e,this._stopLoadingImages(t),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(e){var t,n,r=e.getElementsByTagName("img"),i=0;for(t=0,n=r.length;n>t;t++)r[t].complete&&i++;return i/n},_stopLoadingImages:function(e){var t,n,r,o=Array.prototype.slice.call(e.getElementsByTagName("img"));for(t=0,n=o.length;n>t;t++)(r=o[t]).complete||(r.onload=i.Util.falseFn,r.onerror=i.Util.falseFn,r.src=i.Util.emptyImageUrl,r.parentNode.removeChild(r))}}),i.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(e){if(e=this._locateOptions=i.extend(this._defaultLocateOptions,e),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=i.bind(this._handleGeolocationResponse,this),n=i.bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(e){var t=e.coords.latitude,n=e.coords.longitude,r=new i.LatLng(t,n),o=180*e.coords.accuracy/40075017,a=o/Math.cos(i.LatLng.DEG_TO_RAD*t),s=i.latLngBounds([t-o,n-a],[t+o,n+a]),l=this._locateOptions;if(l.setView){var u=Math.min(this.getBoundsZoom(s),l.maxZoom);this.setView(r,u)}var c={latlng:r,bounds:s,timestamp:e.timestamp};for(var d in e.coords)"number"==typeof e.coords[d]&&(c[d]=e.coords[d]);this.fire("locationfound",c)}})}(window,document),function(e,t,n){"use strict";L.AwesomeMarkers={},L.AwesomeMarkers.version="2.0.1",L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.Util.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;return n.icon&&(e.innerHTML=this._createInner()),n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(e,"icon-"+n.markerColor),e},_createInner:function(){var e,t="",n="",r="",i=this.options;return e=i.icon.slice(0,i.prefix.length+1)===i.prefix+"-"?i.icon:i.prefix+"-"+i.icon,i.spin&&"string"==typeof i.spinClass&&(t=i.spinClass),i.iconColor&&("white"===i.iconColor||"black"===i.iconColor?n="icon-"+i.iconColor:r="style='color: "+i.iconColor+"' "),"<i "+r+"class='"+i.prefix+" "+e+" "+t+" "+n+"'></i>"},_setIconStyles:function(e,t){var n,r=this.options,i=L.point(r["shadow"===t?"shadowSize":"iconSize"]);!(n="shadow"===t?L.point(r.shadowAnchor||r.iconAnchor):L.point(r.iconAnchor))&&i&&(n=i.divideBy(2,!0)),e.className="awesome-marker-"+t+" "+r.className,n&&(e.style.marginLeft=-n.x+"px",e.style.marginTop=-n.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},createShadow:function(){var e=t.createElement("div");return this._setIconStyles(e,"shadow"),e}}),L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}}(0,document),function(e){if("function"==typeof define&&define.amd)define(["leaflet"],e);else if("undefined"!=typeof module)module.exports=e(require("leaflet"));else{if(void 0===window.L)throw"Leaflet must be loaded first";e(window.L)}}((function(e){function t(e,t){var n=t.split("."),r=n.pop(),i=n.length,o=n[0],a=1;if(i>0)for(;(e=e[o])&&i>a;)o=n[a++];return e?e[r]:void 0}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}return e.Control.Search=e.Control.extend({includes:e.Mixin.Events,options:{url:"",layer:null,sourceData:null,jsonpParam:null,propertyLoc:"loc",propertyName:"title",formatData:null,filterData:null,moveToLocation:null,buildTip:null,container:"",zoom:null,minLength:1,initial:!0,casesensitive:!1,autoType:!0,delayType:400,tooltipLimit:-1,tipAutoSubmit:!0,firstTipSubmit:!1,autoResize:!0,collapsed:!0,autoCollapse:!1,autoCollapseTime:1200,textErr:"Location not found",textCancel:"Cancel",textPlaceholder:"Search...",position:"topleft",hideMarkerOnCollapse:!1,marker:{icon:!1,animate:!0,circle:{radius:10,weight:3,color:"#e03",stroke:!0,fill:!1}}},initialize:function(t){e.Util.setOptions(this,t||{}),this._inputMinSize=this.options.textPlaceholder?this.options.textPlaceholder.length:10,this._layer=this.options.layer||new e.LayerGroup,this._filterData=this.options.filterData||this._defaultFilterData,this._formatData=this.options.formatData||this._defaultFormatData,this._moveToLocation=this.options.moveToLocation||this._defaultMoveToLocation,this._autoTypeTmp=this.options.autoType,this._countertips=0,this._recordsCache={},this._curReq=null},onAdd:function(t){return this._map=t,this._container=e.DomUtil.create("div","leaflet-control-search"),this._input=this._createInput(this.options.textPlaceholder,"search-input"),this._tooltip=this._createTooltip("search-tooltip"),this._cancel=this._createCancel(this.options.textCancel,"search-cancel"),this._button=this._createButton(this.options.textPlaceholder,"search-button"),this._alert=this._createAlert("search-alert"),!1===this.options.collapsed&&this.expand(this.options.collapsed),this.options.marker&&(this.options.marker instanceof e.Marker||this.options.marker instanceof e.CircleMarker?this._markerSearch=this.options.marker:n(this.options.marker)&&(this._markerSearch=new e.Control.Search.Marker([0,0],this.options.marker)),this._markerSearch._isMarkerSearch=!0),this.setLayer(this._layer),t.on({resize:this._handleAutoresize},this),this._container},addTo:function(t){return this.options.container?(this._container=this.onAdd(t),this._wrapper=e.DomUtil.get(this.options.container),this._wrapper.style.position="relative",this._wrapper.appendChild(this._container)):e.Control.prototype.addTo.call(this,t),this},onRemove:function(e){this._recordsCache={}},setLayer:function(e){return this._layer=e,this._layer.addTo(this._map),this},showAlert:function(e){e=e||this.options.textErr,this._alert.style.display="block",this._alert.innerHTML=e,clearTimeout(this.timerAlert);var t=this;return this.timerAlert=setTimeout((function(){t.hideAlert()}),this.options.autoCollapseTime),this},hideAlert:function(){return this._alert.style.display="none",this},cancel:function(){return this._input.value="",this._handleKeypress({keyCode:8}),this._input.size=this._inputMinSize,this._input.focus(),this._cancel.style.display="none",this._hideTooltip(),this},expand:function(t){return t="boolean"!=typeof t||t,this._input.style.display="block",e.DomUtil.addClass(this._container,"search-exp"),!1!==t&&(this._input.focus(),this._map.on("dragstart click",this.collapse,this)),this.fire("search:expanded"),this},collapse:function(){return this._hideTooltip(),this.cancel(),this._alert.style.display="none",this._input.blur(),this.options.collapsed&&(this._input.style.display="none",this._cancel.style.display="none",e.DomUtil.removeClass(this._container,"search-exp"),this.options.hideMarkerOnCollapse&&this._map.removeLayer(this._markerSearch),this._map.off("dragstart click",this.collapse,this)),this.fire("search:collapsed"),this},collapseDelayed:function(){if(!this.options.autoCollapse)return this;var e=this;return clearTimeout(this.timerCollapse),this.timerCollapse=setTimeout((function(){e.collapse()}),this.options.autoCollapseTime),this},collapseDelayedStop:function(){return clearTimeout(this.timerCollapse),this},_createAlert:function(t){var n=e.DomUtil.create("div",t,this._container);return n.style.display="none",e.DomEvent.on(n,"click",e.DomEvent.stop,this).on(n,"click",this.hideAlert,this),n},_createInput:function(t,n){var r=e.DomUtil.create("label",n,this._container),i=e.DomUtil.create("input",n,this._container);return i.type="text",i.size=this._inputMinSize,i.value="",i.autocomplete="off",i.autocorrect="off",i.autocapitalize="off",i.placeholder=t,i.style.display="none",i.role="search",i.id=i.role+i.type+i.size,r.htmlFor=i.id,r.style.display="none",r.value=t,e.DomEvent.disableClickPropagation(i).on(i,"keydown",this._handleKeypress,this).on(i,"blur",this.collapseDelayed,this).on(i,"focus",this.collapseDelayedStop,this),i},_createCancel:function(t,n){var r=e.DomUtil.create("a",n,this._container);return r.href="#",r.title=t,r.style.display="none",r.innerHTML="<span>&otimes;</span>",e.DomEvent.on(r,"click",e.DomEvent.stop,this).on(r,"click",this.cancel,this),r},_createButton:function(t,n){var r=e.DomUtil.create("a",n,this._container);return r.href="#",r.title=t,e.DomEvent.on(r,"click",e.DomEvent.stop,this).on(r,"click",this._handleSubmit,this).on(r,"focus",this.collapseDelayedStop,this).on(r,"blur",this.collapseDelayed,this),r},_createTooltip:function(t){var n=e.DomUtil.create("ul",t,this._container);n.style.display="none";var r=this;return e.DomEvent.disableClickPropagation(n).on(n,"blur",this.collapseDelayed,this).on(n,"mousewheel",(function(t){r.collapseDelayedStop(),e.DomEvent.stopPropagation(t)}),this).on(n,"mouseover",(function(e){r.collapseDelayedStop()}),this),n},_createTip:function(t,n){var r;if(this.options.buildTip){if("string"==typeof(r=this.options.buildTip.call(this,t,n))){var i=e.DomUtil.create("div");i.innerHTML=r,r=i.firstChild}}else(r=e.DomUtil.create("li","")).innerHTML=t;return e.DomUtil.addClass(r,"search-tip"),r._text=t,this.options.tipAutoSubmit&&e.DomEvent.disableClickPropagation(r).on(r,"click",e.DomEvent.stop,this).on(r,"click",(function(e){this._input.value=t,this._handleAutoresize(),this._input.focus(),this._hideTooltip(),this._handleSubmit()}),this),r},_getUrl:function(e){return"function"==typeof this.options.url?this.options.url(e):this.options.url},_defaultFilterData:function(e,t){var n,r,i,o={};if(""===(e=e.replace(/[.*+?^${}()|[\]\\]/g,"")))return[];for(var a in n=this.options.initial?"^":"",r=this.options.casesensitive?void 0:"i",i=new RegExp(n+e,r),t)i.test(a)&&(o[a]=t[a]);return o},showTooltip:function(e){if(this._countertips=0,this._tooltip.innerHTML="",this._tooltip.currentSelection=-1,this.options.tooltipLimit)for(var t in e){if(this._countertips===this.options.tooltipLimit)break;this._countertips++,this._tooltip.appendChild(this._createTip(t,e[t]))}return this._countertips>0?(this._tooltip.style.display="block",this._autoTypeTmp&&this._autoType(),this._autoTypeTmp=this.options.autoType):this._hideTooltip(),this._tooltip.scrollTop=0,this._countertips},_hideTooltip:function(){return this._tooltip.style.display="none",this._tooltip.innerHTML="",0},_defaultFormatData:function(n){var r,i=this.options.propertyName,o=this.options.propertyLoc,a={};if(e.Util.isArray(o))for(r in n)a[t(n[r],i)]=e.latLng(n[r][o[0]],n[r][o[1]]);else for(r in n)a[t(n[r],i)]=e.latLng(t(n[r],o));return a},_recordsFromJsonp:function(t,n){e.Control.Search.callJsonp=n;var r=e.DomUtil.create("script","leaflet-search-jsonp",document.getElementsByTagName("body")[0]),i=e.Util.template(this._getUrl(t)+"&"+this.options.jsonpParam+"=L.Control.Search.callJsonp",{s:t});return r.type="text/javascript",r.src=i,{abort:function(){r.parentNode.removeChild(r)}}},_recordsFromAjax:function(t,n){void 0===window.XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new ActiveXObject("Microsoft.XMLHTTP.6.0")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP.3.0")}catch(e){throw new Error("XMLHttpRequest is not supported")}}});var r=e.Browser.ie&&!window.atob&&document.querySelector?new XDomainRequest:new XMLHttpRequest,i=e.Util.template(this._getUrl(t),{s:t});return r.open("GET",i),r.onload=function(){n(JSON.parse(r.responseText))},r.onreadystatechange=function(){4===r.readyState&&200===r.status&&this.onload()},r.send(),r},_recordsFromLayer:function(){var n,r={},i=this.options.propertyName;return this._layer.eachLayer((function(o){if(!o.hasOwnProperty("_isMarkerSearch"))if(o instanceof e.Marker||o instanceof e.CircleMarker)try{if(t(o.options,i))(n=o.getLatLng()).layer=o,r[t(o.options,i)]=n;else{if(!t(o.feature.properties,i))throw new Error("propertyName '"+i+"' not found in marker");(n=o.getLatLng()).layer=o,r[t(o.feature.properties,i)]=n}}catch(e){console}else if(o.hasOwnProperty("feature"))try{if(!o.feature.properties.hasOwnProperty(i))throw new Error("propertyName '"+i+"' not found in feature");(n=o.getBounds().getCenter()).layer=o,r[o.feature.properties[i]]=n}catch(e){console}else o instanceof e.LayerGroup&&o.eachLayer((function(e){(n=e.getLatLng()).layer=e,r[e.feature.properties[i]]=n}))}),this),r},_autoType:function(){var e=this._input.value.length,t=this._tooltip.firstChild?this._tooltip.firstChild._text:"",n=t.length;if(0===t.indexOf(this._input.value))if(this._input.value=t,this._handleAutoresize(),this._input.createTextRange){var r=this._input.createTextRange();r.collapse(!0),r.moveStart("character",e),r.moveEnd("character",n),r.select()}else this._input.setSelectionRange?this._input.setSelectionRange(e,n):this._input.selectionStart&&(this._input.selectionStart=e,this._input.selectionEnd=n)},_hideAutoType:function(){var e;if((e=this._input.selection)&&e.empty)e.empty();else if(this._input.createTextRange){(e=this._input.createTextRange()).collapse(!0);var t=this._input.value.length;e.moveStart("character",t),e.moveEnd("character",t),e.select()}else this._input.getSelection&&this._input.getSelection().removeAllRanges(),this._input.selectionStart=this._input.selectionEnd},_handleKeypress:function(e){switch(e.keyCode){case 27:this.collapse();break;case 13:(1==this._countertips||this.options.firstTipSubmit&&this._countertips>0)&&this._handleArrowSelect(1),this._handleSubmit();break;case 38:this._handleArrowSelect(-1);break;case 40:this._handleArrowSelect(1);break;case 8:case 45:case 46:this._autoTypeTmp=!1;break;case 37:case 39:case 16:case 17:case 35:case 36:break;default:if(this._input.value.length?this._cancel.style.display="block":this._cancel.style.display="none",this._input.value.length>=this.options.minLength){var t=this;clearTimeout(this.timerKeypress),this.timerKeypress=setTimeout((function(){t._fillRecordsCache()}),this.options.delayType)}else this._hideTooltip()}this._handleAutoresize()},searchText:function(t){var n=t.charCodeAt(t.length);this._input.value=t,this._input.style.display="block",e.DomUtil.addClass(this._container,"search-exp"),this._autoTypeTmp=!1,this._handleKeypress({keyCode:n})},_fillRecordsCache:function(){var t,n=this._input.value,r=this;this._curReq&&this._curReq.abort&&this._curReq.abort(),e.DomUtil.addClass(this._container,"search-load"),this.options.layer?(this._recordsCache=this._recordsFromLayer(),t=this._filterData(this._input.value,this._recordsCache),this.showTooltip(t),e.DomUtil.removeClass(this._container,"search-load")):(this.options.sourceData?this._retrieveData=this.options.sourceData:this.options.url&&(this._retrieveData=this.options.jsonpParam?this._recordsFromJsonp:this._recordsFromAjax),this._curReq=this._retrieveData.call(this,n,(function(n){r._recordsCache=r._formatData(n),t=r.options.sourceData?r._filterData(r._input.value,r._recordsCache):r._recordsCache,r.showTooltip(t),e.DomUtil.removeClass(r._container,"search-load")})))},_handleAutoresize:function(){this._input.style.maxWidth!=this._map._container.offsetWidth&&(this._input.style.maxWidth=e.DomUtil.getStyle(this._map._container,"width")),this.options.autoResize&&this._container.offsetWidth+45<this._map._container.offsetWidth&&(this._input.size=this._input.value.length<this._inputMinSize?this._inputMinSize:this._input.value.length)},_handleArrowSelect:function(t){var n=this._tooltip.hasChildNodes()?this._tooltip.childNodes:[];for(i=0;i<n.length;i++)e.DomUtil.removeClass(n[i],"search-tip-select");if(1==t&&this._tooltip.currentSelection>=n.length-1)e.DomUtil.addClass(n[this._tooltip.currentSelection],"search-tip-select");else if(-1==t&&this._tooltip.currentSelection<=0)this._tooltip.currentSelection=-1;else if("none"!=this._tooltip.style.display){this._tooltip.currentSelection+=t,e.DomUtil.addClass(n[this._tooltip.currentSelection],"search-tip-select"),this._input.value=n[this._tooltip.currentSelection]._text;var r=n[this._tooltip.currentSelection].offsetTop;r+n[this._tooltip.currentSelection].clientHeight>=this._tooltip.scrollTop+this._tooltip.clientHeight?this._tooltip.scrollTop=r-this._tooltip.clientHeight+n[this._tooltip.currentSelection].clientHeight:r<=this._tooltip.scrollTop&&(this._tooltip.scrollTop=r)}},_handleSubmit:function(){if(this._hideAutoType(),this.hideAlert(),this._hideTooltip(),"none"==this._input.style.display)this.expand();else if(""===this._input.value)this.collapse();else{var e=this._getLocation(this._input.value);!1===e?this.showAlert():(this.showLocation(e,this._input.value),this.fire("search:locationfound",{latlng:e,text:this._input.value,layer:e.layer?e.layer:null}))}},_getLocation:function(e){return!!this._recordsCache.hasOwnProperty(e)&&this._recordsCache[e]},_defaultMoveToLocation:function(e,t,n){this.options.zoom?this._map.setView(e,this.options.zoom):this._map.panTo(e)},showLocation:function(e,t){var n=this;return n._map.once("moveend zoomend",(function(t){n._markerSearch&&n._markerSearch.addTo(n._map).setLatLng(e)})),n._moveToLocation(e,t,n._map),n.options.autoCollapse&&n.collapse(),n}}),e.Control.Search.Marker=e.Marker.extend({includes:e.Mixin.Events,options:{icon:new e.Icon.Default,animate:!0,circle:{radius:10,weight:3,color:"#e03",stroke:!0,fill:!1}},initialize:function(t,r){e.setOptions(this,r),!0===r.icon&&(r.icon=new e.Icon.Default),e.Marker.prototype.initialize.call(this,t,r),n(this.options.circle)&&(this._circleLoc=new e.CircleMarker(t,this.options.circle))},onAdd:function(t){e.Marker.prototype.onAdd.call(this,t),this._circleLoc&&(t.addLayer(this._circleLoc),this.options.animate&&this.animate())},onRemove:function(t){e.Marker.prototype.onRemove.call(this,t),this._circleLoc&&t.removeLayer(this._circleLoc)},setLatLng:function(t){return e.Marker.prototype.setLatLng.call(this,t),this._circleLoc&&this._circleLoc.setLatLng(t),this},_initIcon:function(){this.options.icon&&e.Marker.prototype._initIcon.call(this)},_removeIcon:function(){this.options.icon&&e.Marker.prototype._removeIcon.call(this)},animate:function(){if(this._circleLoc){var e=this._circleLoc,t=parseInt(e._radius/5),n=this.options.circle.radius,r=2*e._radius,i=0;e._timerAnimLoc=setInterval((function(){r-=t+=i+=.5,e.setRadius(r),n>r&&(clearInterval(e._timerAnimLoc),e.setRadius(n))}),200)}return this}}),e.Map.addInitHook((function(){this.options.searchControl&&(this.searchControl=e.control.search(this.options.searchControl),this.addControl(this.searchControl))})),e.control.search=function(t){return new e.Control.Search(t)},e.Control.Search})),function(){function e(e,t){var n,r;this.title=e.title,this.stateName=e.stateName?e.stateName:"unnamed-state",this.icon=L.DomUtil.create("span",""),L.DomUtil.addClass(this.icon,"button-state state-"+this.stateName.replace(/(^\s*|\s*$)/g,"")),this.icon.innerHTML=((n=e.icon).match(/[&;=<>"']/)?r=n:(n=n.replace(/(^\s*|\s*$)/g,""),r=L.DomUtil.create("span",""),0===n.indexOf("fa-")?L.DomUtil.addClass(r,"fa "+n):0===n.indexOf("glyphicon-")?L.DomUtil.addClass(r,"glyphicon "+n):L.DomUtil.addClass(r,n),r=r.outerHTML),r),this.onClick=L.Util.bind(e.onClick?e.onClick:function(){},t)}L.Control.EasyBar=L.Control.extend({options:{position:"topleft",id:null,leafletClasses:!0},initialize:function(e,t){t&&L.Util.setOptions(this,t),this._buildContainer(),this._buttons=[];for(var n=0;n<e.length;n++)e[n]._bar=this,e[n]._container=e[n].button,this._buttons.push(e[n]),this.container.appendChild(e[n].button)},_buildContainer:function(){this._container=this.container=L.DomUtil.create("div",""),this.options.leafletClasses&&L.DomUtil.addClass(this.container,"leaflet-bar easy-button-container leaflet-control"),this.options.id&&(this.container.id=this.options.id)},enable:function(){return L.DomUtil.addClass(this.container,"enabled"),L.DomUtil.removeClass(this.container,"disabled"),this.container.setAttribute("aria-hidden","false"),this},disable:function(){return L.DomUtil.addClass(this.container,"disabled"),L.DomUtil.removeClass(this.container,"enabled"),this.container.setAttribute("aria-hidden","true"),this},onAdd:function(){return this.container},addTo:function(e){this._map=e;for(var t=0;t<this._buttons.length;t++)this._buttons[t]._map=e;var n=this._container=this.onAdd(e),r=this.getPosition(),i=e._controlCorners[r];return L.DomUtil.addClass(n,"leaflet-control"),-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this}}),L.easyBar=function(){for(var e=[L.Control.EasyBar],t=0;t<arguments.length;t++)e.push(arguments[t]);return new(Function.prototype.bind.apply(L.Control.EasyBar,e))},L.Control.EasyButton=L.Control.extend({options:{position:"topleft",id:null,type:"replace",states:[],leafletClasses:!0,tagName:"button"},initialize:function(t,n,r,i){this.options.states=[],null!=i&&(this.options.id=i),this.storage={},"object"==typeof arguments[arguments.length-1]&&L.Util.setOptions(this,arguments[arguments.length-1]),0===this.options.states.length&&"string"==typeof t&&"function"==typeof n&&this.options.states.push({icon:t,onClick:n,title:"string"==typeof r?r:""}),this._states=[];for(var o=0;o<this.options.states.length;o++)this._states.push(new e(this.options.states[o],this));this._buildButton(),this._activateState(this._states[0])},_buildButton:function(){if(this.button=L.DomUtil.create(this.options.tagName,""),"button"===this.options.tagName&&this.button.setAttribute("type","button"),this.options.id&&(this.button.id=this.options.id),this.options.leafletClasses&&L.DomUtil.addClass(this.button,"easy-button-button leaflet-bar-part leaflet-interactive"),L.DomEvent.addListener(this.button,"dblclick",L.DomEvent.stop),L.DomEvent.addListener(this.button,"mousedown",L.DomEvent.stop),L.DomEvent.addListener(this.button,"mouseup",L.DomEvent.stop),L.DomEvent.addListener(this.button,"click",(function(e){L.DomEvent.stop(e),this._currentState.onClick(this,this._map?this._map:null),this._map&&this._map.getContainer().focus()}),this),"replace"==this.options.type)this.button.appendChild(this._currentState.icon);else for(var e=0;e<this._states.length;e++)this.button.appendChild(this._states[e].icon)},_currentState:{stateName:"unnamed",icon:document.createElement("span")},_states:null,state:function(e){return 0===arguments.length?this._currentState.stateName:("string"==typeof e?this._activateStateNamed(e):"number"==typeof e&&this._activateState(this._states[e]),this)},_activateStateNamed:function(e){for(var t=0;t<this._states.length;t++)this._states[t].stateName==e&&this._activateState(this._states[t])},_activateState:function(e){if(e!==this._currentState){"replace"==this.options.type&&(this.button.appendChild(e.icon),this.button.removeChild(this._currentState.icon)),e.title?this.button.title=e.title:this.button.removeAttribute("title");for(var t=0;t<this._states.length;t++)L.DomUtil.removeClass(this._states[t].icon,this._currentState.stateName+"-active"),L.DomUtil.addClass(this._states[t].icon,e.stateName+"-active");L.DomUtil.removeClass(this.button,this._currentState.stateName+"-active"),L.DomUtil.addClass(this.button,e.stateName+"-active"),this._currentState=e}},enable:function(){return L.DomUtil.addClass(this.button,"enabled"),L.DomUtil.removeClass(this.button,"disabled"),this.button.setAttribute("aria-hidden","false"),this},disable:function(){return L.DomUtil.addClass(this.button,"disabled"),L.DomUtil.removeClass(this.button,"enabled"),this.button.setAttribute("aria-hidden","true"),this},onAdd:function(e){var t=L.easyBar([this],{position:this.options.position,leafletClasses:this.options.leafletClasses});return this._anonymousBar=t,this._container=t.container,this._anonymousBar.container},removeFrom:function(e){return this._map===e&&this.remove(),this}}),L.easyButton=function(){var e=Array.prototype.concat.apply([L.Control.EasyButton],arguments);return new(Function.prototype.bind.apply(L.Control.EasyButton,e))}}(),function(){var e=window.console||{error:function(){},warn:function(){}};function t(t){t.Control.Loading=t.Control.extend({options:{delayIndicator:null,position:"topleft",separate:!1,zoomControl:null,spinjs:!1,spin:{lines:7,length:3,width:3,radius:5,rotate:13,top:"83%"}},initialize:function(e){t.setOptions(this,e),this._dataLoaders={},null!==this.options.zoomControl&&(this.zoomControl=this.options.zoomControl)},onAdd:function(n){if(this.options.spinjs&&"function"!=typeof Spinner)return e.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");this._addLayerListeners(n),this._addMapListeners(n),this.options.separate||this.zoomControl||(n.zoomControl?this.zoomControl=n.zoomControl:n.zoomsliderControl&&(this.zoomControl=n.zoomsliderControl));var r,i="leaflet-control-loading";return this.zoomControl&&!this.options.separate?(r=this.zoomControl._container,i+=" leaflet-bar-part-bottom leaflet-bar-part last",t.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom")):r=t.DomUtil.create("div","leaflet-control-zoom leaflet-control-layer-container leaflet-bar"),this._indicatorContainer=r,this._indicator=t.DomUtil.create("a",i,r),this.options.spinjs&&(this._spinner=new Spinner(this.options.spin).spin(),this._indicator.appendChild(this._spinner.el)),r},onRemove:function(e){this._removeLayerListeners(e),this._removeMapListeners(e)},removeFrom:function(e){return this.zoomControl&&!this.options.separate?(this._container.removeChild(this._indicator),this._map=null,this.onRemove(e),this):t.Control.prototype.removeFrom.call(this,e)},addLoader:function(e){if(this._dataLoaders[e]=!0,this.options.delayIndicator&&!this.delayIndicatorTimeout){var t=this;this.delayIndicatorTimeout=setTimeout((function(){t.updateIndicator(),t.delayIndicatorTimeout=null}),this.options.delayIndicator)}else this.updateIndicator()},removeLoader:function(e){delete this._dataLoaders[e],this.updateIndicator(),this.options.delayIndicator&&this.delayIndicatorTimeout&&!this.isLoading()&&(clearTimeout(this.delayIndicatorTimeout),this.delayIndicatorTimeout=null)},updateIndicator:function(){this.isLoading()?this._showIndicator():this._hideIndicator()},isLoading:function(){return this._countLoaders()>0},_countLoaders:function(){var e,t=0;for(e in this._dataLoaders)this._dataLoaders.hasOwnProperty(e)&&t++;return t},_showIndicator:function(){t.DomUtil.addClass(this._indicator,"is-loading"),t.DomUtil.addClass(this._indicatorContainer,"is-loading"),this.options.separate||(this.zoomControl instanceof t.Control.Zoom?t.DomUtil.removeClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof t.Control.Zoomslider&&this.zoomControl instanceof t.Control.Zoomslider&&t.DomUtil.removeClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_hideIndicator:function(){t.DomUtil.removeClass(this._indicator,"is-loading"),t.DomUtil.removeClass(this._indicatorContainer,"is-loading"),this.options.separate||(this.zoomControl instanceof t.Control.Zoom?t.DomUtil.addClass(this._getLastControlButton(),"leaflet-bar-part-bottom"):"function"==typeof t.Control.Zoomslider&&this.zoomControl instanceof t.Control.Zoomslider&&t.DomUtil.addClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_getLastControlButton:function(){for(var e=this.zoomControl._container,t=e.children.length-1;t>0;){var n=e.children[t];if(this._indicator!==n&&0!==n.offsetWidth&&0!==n.offsetHeight)break;t--}return e.children[t]},_handleLoading:function(e){this.addLoader(this.getEventId(e))},_handleBaseLayerChange:function(e){var n=this;e.layer&&e.layer.eachLayer&&"function"==typeof e.layer.eachLayer?e.layer.eachLayer((function(e){n._handleBaseLayerChange({layer:e})})):t.TileLayer.Canvas&&e.layer instanceof t.TileLayer.Canvas||n._handleLoading(e)},_handleLoad:function(e){this.removeLoader(this.getEventId(e))},getEventId:function(e){return e.id?e.id:e.layer?e.layer._leaflet_id:e.target._leaflet_id},_layerAdd:function(t){if(t.layer&&t.layer.on)try{t.layer.on({loading:this._handleLoading,load:this._handleLoad},this)}catch(n){e.warn("L.Control.Loading: Tried and failed to add  event handlers to layer",t.layer),e.warn("L.Control.Loading: Full details",n)}},_layerRemove:function(t){if(t.layer&&t.layer.off)try{t.layer.off({loading:this._handleLoading,load:this._handleLoad},this)}catch(n){e.warn("L.Control.Loading: Tried and failed to remove event handlers from layer",t.layer),e.warn("L.Control.Loading: Full details",n)}},_addLayerListeners:function(e){e.eachLayer((function(e){e.on&&e.on({loading:this._handleLoading,load:this._handleLoad},this)}),this),e.on("layeradd",this._layerAdd,this),e.on("layerremove",this._layerRemove,this)},_removeLayerListeners:function(e){e.eachLayer((function(e){e.off&&e.off({loading:this._handleLoading,load:this._handleLoad},this)}),this),e.off("layeradd",this._layerAdd,this),e.off("layerremove",this._layerRemove,this)},_addMapListeners:function(e){e.on({baselayerchange:this._handleBaseLayerChange,dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)},_removeMapListeners:function(e){e.off({baselayerchange:this._handleBaseLayerChange,dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)}}),t.Map.addInitHook((function(){this.options.loadingControl&&(this.loadingControl=new t.Control.Loading,this.addControl(this.loadingControl))})),t.Control.loading=function(e){return new t.Control.Loading(e)}}"function"==typeof define&&define.amd?define(["leaflet"],(function(e){t(e)})):t(L)}(),function(e,t,n){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[];var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup){var t=[];for(var n in e._layers)t.push(e._layers[n]);return this.addLayers(t)}if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this;if(!this._map)return this._needsClustering.push(e),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this._topClusterLevel._recalculateBounds();var r=e,i=this._map.getZoom();if(e.__parent)for(;r.__parent._zoom>=i;)r=r.__parent;return this._currentShownBounds.contains(r.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,r):this._animationAddLayerNonAnimated(e,r)),this},removeLayer:function(e){if(e instanceof L.LayerGroup){var t=[];for(var n in e._layers)t.push(e._layers[n]);return this.removeLayers(t)}return e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this._topClusterLevel._recalculateBounds(),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push(e),this):(this._nonPointGroup.removeLayer(e),this)},addLayers:function(e){var t,n,r,i,o=this._featureGroup,a=this._nonPointGroup,s=this.options.chunkedLoading,l=this.options.chunkInterval,u=this.options.chunkProgress;if(this._map){var c=0,d=(new Date).getTime(),h=L.bind((function(){for(var t=(new Date).getTime();c<e.length&&!(s&&0==c%200&&(new Date).getTime()-t>l);c++)if((i=e[c]).getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),i.__parent&&2===i.__parent.getChildCount())){var n=i.__parent.getAllChildMarkers(),r=n[0]===i?n[1]:n[0];o.removeLayer(r)}}else a.addLayer(i);u&&u(c,e.length,(new Date).getTime()-d),c===e.length?(this._topClusterLevel._recalculateBounds(),this._featureGroup.eachLayer((function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(h,this.options.chunkDelay)}),this);h()}else{for(t=[],n=0,r=e.length;r>n;n++)(i=e[n]).getLatLng?this.hasLayer(i)||t.push(i):a.addLayer(i);this._needsClustering=this._needsClustering.concat(t)}return this},removeLayers:function(e){var t,n,r,i=this._featureGroup,o=this._nonPointGroup;if(!this._map){for(t=0,n=e.length;n>t;t++)r=e[t],this._arraySplice(this._needsClustering,r),o.removeLayer(r),this.hasLayer(r)&&this._needsRemoving.push(r);return this}if(this._unspiderfy)for(this._unspiderfy(),t=0,n=e.length;n>t;t++)r=e[t],this._unspiderfyLayer(r);for(t=0,n=e.length;n>t;t++)(r=e[t]).__parent?(this._removeLayer(r,!0,!0),i.hasLayer(r)&&(i.removeLayer(r),r.clusterShow&&r.clusterShow())):o.removeLayer(r);return this._topClusterLevel._recalculateBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),i.eachLayer((function(e){e instanceof L.MarkerCluster&&e._updateIcon()})),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(e){delete e.__parent})),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n,r=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;n>=0;n--)e.call(t,r[n]);this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer((function(t){e.push(t)})),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer((function(n){L.stamp(n)===e&&(t=n)})),t},hasLayer:function(e){if(!e)return!1;var t,n=this._needsClustering;for(t=n.length-1;t>=0;t--)if(n[t]===e)return!0;for(t=(n=this._needsRemoving).length-1;t>=0;t--)if(n[t]===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var n=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};if(e._icon&&this._map.getBounds().contains(e.getLatLng()))t();else if(e.__parent._zoom<this._map.getZoom())this._map.on("moveend",n,this),this._map.panTo(e.getLatLng());else{var r=function(){this._map.off("movestart",r,this),r=null};this._map.on("movestart",r,this),this._map.on("moveend",n,this),this.on("animationend",n,this),e.__parent.zoomToBounds(),r&&n.call(this)}},onAdd:function(e){var t,n,r;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.onAdd(e),this._nonPointGroup.onAdd(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;n>t;t++)r=this._needsRemoving[t],this._removeLayer(r,!0);this._needsRemoving=[],this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.onRemove(e),this._nonPointGroup.onRemove(e),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,r=this._gridUnclustered;t>=0&&r[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_removeLayer:function(e,t,n){var r=this._gridClusters,i=this._gridUnclustered,o=this._featureGroup,a=this._map;t&&this._removeFromGridUnclustered(e,this._maxZoom);var s,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<0));)t&&l._childCount<=1?(s=l._markers[0]===e?l._markers[1]:l._markers[0],r[l._zoom].removeObject(l,a.project(l._cLatLng,l._zoom)),i[l._zoom].addObject(s,a.project(s.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(s),s.__parent=l.__parent,l._icon&&(o.removeLayer(l),n||o.addLayer(s))):n&&l._icon||l._updateIcon(),l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},_propagateEvent:function(e){if(e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;e.type="cluster"+e.type}this.fire(e.type,e)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),n=" marker-cluster-";return n+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick;(t||r)&&this.on("clusterclick",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,n=t;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount?this.options.spiderfyOnMaxZoom&&t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this._map;(e||n)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),r.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=this._map.getMaxZoom(),t=this.options.maxClusterRadius,n=t;"function"!=typeof t&&(n=function(){return t}),this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;r>=0;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,-1)},_addLayer:function(e,t){var n,r,i=this._gridClusters,o=this._gridUnclustered;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e);t>=0;t--){n=this._map.project(e.getLatLng(),t);var a=i[t].getNearObject(n);if(a)return a._addChild(e),void(e.__parent=a);if(a=o[t].getNearObject(n)){var s=a.__parent;s&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);i[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,e.__parent=l;var u=l;for(r=t-1;r>s._zoom;r--)u=new this._markerCluster(this,r,u),i[r].addObject(u,this._map.project(a.getLatLng(),r));return s._addChild(u),void this._removeFromGridUnclustered(a,t)}o[t].addObject(e,n)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){this._processQueue(),this._zoom<this._map._zoom&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,this._map._zoom)):this._zoom>this._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return t!==n&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var n=t.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else t._updateIcon()},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}}),L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(e,t){var n,r=this._getExpandedVisibleBounds(),i=this._featureGroup;this._topClusterLevel._recursively(r,e,0,(function(o){var a,s=o._latlng,l=o._markers;for(r.contains(s)||(s=null),o._isSingleParent()&&e+1===t?(i.removeLayer(o),o._recursivelyAddChildrenToMap(null,t,r)):(o.clusterHide(),o._recursivelyAddChildrenToMap(s,t,r)),n=l.length-1;n>=0;n--)a=l[n],r.contains(a._latlng)||i.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(r,t),i.eachLayer((function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()})),this._topClusterLevel._recursively(r,e,t,(function(e){e._recursivelyRestoreChildPositions(t)})),this._enqueue((function(){this._topClusterLevel._recursively(r,e,0,(function(e){i.removeLayer(e),e.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,r=this._featureGroup;r.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue((function(){r.removeLayer(e),e.clusterShow(),n._animationEnd()}))):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._map.getZoom())))}},_animationZoomOutSingle:function(e,t,n){var r=this._getExpandedVisibleBounds();e._recursivelyAnimateChildrenInAndAddSelfToMap(r,t+1,n);var i=this;this._forceLayout(),e._recursivelyBecomeVisible(r,n),this._enqueue((function(){if(1===e._childCount){var o=e._markers[0];o.setLatLng(o.getLatLng()),o.clusterShow&&o.clusterShow()}else e._recursively(r,n,0,(function(e){e._recursivelyRemoveChildrenFromMap(r,t+1)}));i._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(t.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)},L.MarkerCluster=L.Marker.extend({initialize:function(e,t,n,r){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),r&&this._addChild(r)},getAllChildMarkers:function(e){e=e||[];for(var t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var e,t=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),i=this._zoom+1,o=n.getZoom();t.length>0&&r>i;){i++;var a=[];for(e=0;e<t.length;e++)a=a.concat(t[e]._childClusters);t=a}r>i?this._group._map.setView(this._latlng,i):o>=r?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,n,r,i=this._markers,o=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),e=0;e<i.length;e++)n=i[e]._latlng,this._bounds.extend(n),a+=n.lat,s+=n.lng;for(e=0;e<o.length;e++)(t=o[e])._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),n=t._wLatLng,r=t._childCount,a+=n.lat*r,s+=n.lng*r;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,n){this._recursively(e,0,n-1,(function(e){var n,r,i=e._markers;for(n=i.length-1;n>=0;n--)(r=i[n])._icon&&(r._setPos(t),r.clusterHide())}),(function(e){var n,r,i=e._childClusters;for(n=i.length-1;n>=0;n--)(r=i[n])._icon&&(r._setPos(t),r.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,n){this._recursively(e,n,0,(function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),t),r._isSingleParent()&&t-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(e,t)):r.clusterHide(),r._addToMap()}))},_recursivelyBecomeVisible:function(e,t){this._recursively(e,0,t,null,(function(e){e.clusterShow()}))},_recursivelyAddChildrenToMap:function(e,t,n){this._recursively(n,-1,t,(function(r){if(t!==r._zoom)for(var i=r._markers.length-1;i>=0;i--){var o=r._markers[i];n.contains(o._latlng)&&(e&&(o._backupLatlng=o.getLatLng(),o.setLatLng(e),o.clusterHide&&o.clusterHide()),r._group._featureGroup.addLayer(o))}}),(function(t){t._addToMap(e)}))},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._restorePosition();else for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n){var r,i;this._recursively(e,-1,t-1,(function(e){for(i=e._markers.length-1;i>=0;i--)r=e._markers[i],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())}),(function(e){for(i=e._childClusters.length-1;i>=0;i--)r=e._childClusters[i],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())}))},_recursively:function(e,t,n,r,i){var o,a,s=this._childClusters,l=this._zoom;if(t>l)for(o=s.length-1;o>=0;o--)a=s[o],e.intersects(a._bounds)&&a._recursively(e,t,n,r,i);else if(r&&r(this),i&&this._zoom===n&&i(this),n>l)for(o=s.length-1;o>=0;o--)a=s[o],e.intersects(a._bounds)&&a._recursively(e,t,n,r,i)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var e=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,e}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,o=i[r]=i[r]||{},a=o[n]=o[n]||[],s=L.Util.stamp(e);this._objectPoint[s]=t,a.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,r,i=this._getCoord(t.x),o=this._getCoord(t.y),a=this._grid,s=a[o]=a[o]||{},l=s[i]=s[i]||[];for(delete this._objectPoint[L.Util.stamp(e)],n=0,r=l.length;r>n;n++)if(l[n]===e)return l.splice(n,1),1===r&&delete s[i],!0},eachObject:function(e,t){var n,r,i,o,a,s,l=this._grid;for(n in l)for(r in a=l[n])for(i=0,o=(s=a[r]).length;o>i;i++)e.call(t,s[i])&&(i--,o--)},getNearObject:function(e){var t,n,r,i,o,a,s,l,u=this._getCoord(e.x),c=this._getCoord(e.y),d=this._objectPoint,h=this._sqCellSize,f=null;for(t=c-1;c+1>=t;t++)if(i=this._grid[t])for(n=u-1;u+1>=n;n++)if(o=i[n])for(r=0,a=o.length;a>r;r++)s=o[r],h>(l=this._sqDist(d[L.Util.stamp(s)],e))&&(h=l,f=s);return f},_getCoord:function(e){return Math.floor(e/this._cellSize)},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var n,r,i,o=0,a=null,s=[];for(n=t.length-1;n>=0;n--)r=t[n],(i=this.getDistant(r,e))>0&&(s.push(r),i>o&&(o=i,a=r));return{maxPoint:a,newPoints:s}},buildConvexHull:function(e,t){var n=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?n=(n=n.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints))).concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints)):[e[0]]},getConvexHull:function(e){var t,n=!1,r=!1,i=!1,o=!1,a=null,s=null,l=null,u=null,c=null,d=null;for(t=e.length-1;t>=0;t--){var h=e[t];(!1===n||h.lat>n)&&(a=h,n=h.lat),(!1===r||h.lat<r)&&(s=h,r=h.lat),(!1===i||h.lng>i)&&(l=h,i=h.lng),(!1===o||h.lng<o)&&(u=h,o=h.lng)}return r!==n?(d=s,c=a):(d=u,c=l),[].concat(this.buildConvexHull([d,c],e),this.buildConvexHull([c,d],e))}},L.MarkerCluster.include({getConvexHull:function(){var e,t,n=this.getAllChildMarkers(),r=[];for(t=n.length-1;t>=0;t--)e=n[t].getLatLng(),r.push(e);return L.QuickHull.getConvexHull(r)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(),n=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,n):(n.y+=10,e=this._generatePointsCircle(t.length,n)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n,r,i=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,o=this._2PI/e,a=[];for(a.length=e,n=e-1;n>=0;n--)r=this._circleStartAngle+n*o,a[n]=new L.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round();return a},_generatePointsSpiral:function(e,t){var n,r=this._group.options.spiderfyDistanceMultiplier,i=r*this._spiralLengthStart,o=r*this._spiralFootSeparation,a=r*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=e,n=e-1;n>=0;n--)s+=o/i+5e-4*n,l[n]=new L.Point(t.x+i*Math.cos(s),t.y+i*Math.sin(s))._round(),i+=a/s;return l},_noanimationUnspiderfy:function(){var e,t,n=this._group,r=n._map,i=n._featureGroup,o=this.getAllChildMarkers();for(this.setOpacity(1),t=o.length-1;t>=0;t--)e=o[t],i.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(r.removeLayer(e._spiderLeg),delete e._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:o}),n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n,r,i,o,a=this._group,s=a._map,l=a._featureGroup,u=this._group.options.spiderLegPolylineOptions;for(n=0;n<e.length;n++)o=s.layerPointToLatLng(t[n]),r=e[n],i=new L.Polyline([this._latlng,o],u),s.addLayer(i),r._spiderLeg=i,r._preSpiderfyLatlng=r._latlng,r.setLatLng(o),r.setZIndexOffset&&r.setZIndexOffset(1e6),l.addLayer(r);this.setOpacity(.3),a.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var r,i,o,a,s,l,u=this,c=this._group,d=c._map,h=c._featureGroup,f=this._latlng,p=d.latLngToLayerPoint(f),m=L.Path.SVG,g=L.extend({},this._group.options.spiderLegPolylineOptions),v=g.opacity;for(v===n&&(v=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(g.opacity=0,g.className=(g.className||"")+" leaflet-cluster-spider-leg"):g.opacity=v,r=0;r<e.length;r++)i=e[r],l=d.layerPointToLatLng(t[r]),o=new L.Polyline([f,l],g),d.addLayer(o),i._spiderLeg=o,m&&(s=(a=o._path).getTotalLength()+.1,a.style.strokeDasharray=s,a.style.strokeDashoffset=s),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),h.addLayer(i),i._setPos&&i._setPos(p);for(c._forceLayout(),c._animationStart(),r=e.length-1;r>=0;r--)l=d.layerPointToLatLng(t[r]),(i=e[r])._preSpiderfyLatlng=i._latlng,i.setLatLng(l),i.clusterShow&&i.clusterShow(),m&&((a=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:v}));this.setOpacity(.3),setTimeout((function(){c._animationEnd(),c.fire("spiderfied",{cluster:u,markers:e})}),200)},_animationUnspiderfy:function(e){var t,n,r,i,o,a,s=this,l=this._group,u=l._map,c=l._featureGroup,d=e?u._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):u.latLngToLayerPoint(this._latlng),h=this.getAllChildMarkers(),f=L.Path.SVG;for(l._animationStart(),this.setOpacity(1),n=h.length-1;n>=0;n--)(t=h[n])._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,a=!0,t._setPos&&(t._setPos(d),a=!1),t.clusterHide&&(t.clusterHide(),a=!1),a&&c.removeLayer(t),f&&(o=(i=(r=t._spiderLeg)._path).getTotalLength()+.1,i.style.strokeDashoffset=o,r.setStyle({opacity:0})));setTimeout((function(){var e=0;for(n=h.length-1;n>=0;n--)(t=h[n])._spiderLeg&&e++;for(n=h.length-1;n>=0;n--)(t=h[n])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),e>1&&c.removeLayer(t),u.removeLayer(t._spiderLeg),delete t._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:h})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),
-this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()}))},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}})}(window,document),function(e,t){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof module&&module.exports?t(require("leaflet")):t(e.L)}(this,(function(e){e.FeatureGroup.SubGroup=e.FeatureGroup.extend({statics:{version:"0.1.2"},initialize:function(t,n){e.FeatureGroup.prototype.initialize.call(this,n),this.setParentGroup(t)},setParentGroup:function(t){var n=t instanceof e.LayerGroup;return this._parentGroup=t,this.onAdd=n?"function"==typeof t.addLayers?this._onAddToGroupBatch:this._onAddToGroup:this._onAddToMap,this.onRemove=n?"function"==typeof t.removeLayers?this._onRemoveFromGroupBatch:this._onRemoveFromGroup:this._onRemoveFromMap,this.addLayer=n?this._addLayerToGroup:this._addLayerToMap,this.removeLayer=n?this._removeLayerFromGroup:this._removeLayerFromMap,this},setParentGroupSafe:function(e){var t=this._map;return t&&t.removeLayer(this),this.setParentGroup(e),t&&t.addLayer(this),this},getParentGroup:function(){return this._parentGroup},_onAddToGroupBatch:function(e){var t=this.getLayers();this._map=e,this._parentGroup.addLayers(t)},_onRemoveFromGroupBatch:function(){var e=this.getLayers();this._parentGroup.removeLayers(e),this._map=null},_onAddToGroup:function(e){var t=this._parentGroup;this._map=e,this.eachLayer(t.addLayer,t)},_onRemoveFromGroup:function(){var e=this._parentGroup;this.eachLayer(e.removeLayer,e),this._map=null},_onAddToMap:e.FeatureGroup.prototype.onAdd,_onRemoveFromMap:e.FeatureGroup.prototype.onRemove,_addLayerToGroup:function(t){if(this.hasLayer(t))return this;t.on&&t.on(e.FeatureGroup.EVENTS,this._propagateEvent,this);var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._parentGroup.addLayer(t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t})},_removeLayerFromGroup:function(t){if(!this.hasLayer(t))return this;t in this._layers&&(t=this._layers[t]),t.off&&t.off(e.FeatureGroup.EVENTS,this._propagateEvent,this);var n=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[n]&&this._parentGroup.removeLayer(n),delete this._layers[n],this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})},_addLayerToMap:e.FeatureGroup.prototype.addLayer,_removeLayerFromMap:e.FeatureGroup.prototype.removeLayer}),e.featureGroup.subGroup=function(t,n){return new e.FeatureGroup.SubGroup(t,n)}}));
\ No newline at end of file
+	 */
+e.exports=function(e){function t(){function e(e){return null!==e&&e===e.window}function t(t){return e(t)?t:9===t.nodeType&&t.defaultView}function n(e){var n,r,i={top:0,left:0},o=e&&e.ownerDocument;return n=o.documentElement,"undefined"!=typeof e.getBoundingClientRect&&(i=e.getBoundingClientRect()),r=t(o),{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}}function r(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function i(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}var o,a=a||{};if(document&&document.querySelectorAll&&document.querySelectorAll.bind)try{o=document.querySelectorAll.bind(document)}catch(l){}else if(window&&window.angular&&window.angular.element)o=window.angular.element;else{var s=function(e,t,n){var r=e.length;t=null==t?0:0>t?Math.max(r+t,0):Math.min(t,r),n=null==n?r:0>n?Math.max(r+n,0):Math.min(n,r);for(var i=[];n>t;)i.push(e[t++]);return i},f=function(e,t,n){var r=s(arguments,2);return function(){return e.apply(t,r.concat(s(arguments)))}};o=f(document.querySelectorAll,document)}if(!o)throw new Error("ionic material ink module could not create reference of DOM nodes");var c={duration:500,show:function(e){if(2===e.button)return!1;var t=this,o=document.createElement("div"),a=this.dataset.inkColor,l=this.dataset.inkOpacity,s=a||l;o.className="ink-ripple",t.appendChild(o);var f=n(t),u=e.pageY-f.top,d=e.pageX-f.left,p="scale("+t.clientWidth/100*2.5+")";"touches"in e&&(u=e.touches[0].pageY-f.top,d=e.touches[0].pageX-f.left),o.setAttribute("data-hold",Date.now()),o.setAttribute("data-scale",p),o.setAttribute("data-x",d),o.setAttribute("data-y",u);var m={top:u+"px",left:d+"px"};if(o.className=o.className+" ink-notransition",s){var h;if(a){var y=r(a);h=y.r+","+y.g+","+y.b}else h="0,0,0";l||(l=.2);var g="rgba("+h+","+l+")";m["background-color"]=g}o.setAttribute("style",i(m)),o.className=o.className.replace("ink-notransition",""),m["-webkit-transform"]=p,m["-moz-transform"]=p,m["-ms-transform"]=p,m["-o-transform"]=p,m.transform=p,m.opacity="1",m["-webkit-transition-duration"]=c.duration+"ms",m["-moz-transition-duration"]=c.duration+"ms",m["-o-transition-duration"]=c.duration+"ms",m["transition-duration"]=c.duration+"ms",o.setAttribute("style",i(m))},hide:function(){for(var e=this,t=(1.4*e.clientWidth,null),n=e.children.length,r=0;n>r;r++)-1===e.children[r].className.indexOf("ink-ripple")||(t=e.children[r]);if(!t)return!1;var o=t.getAttribute("data-x"),a=t.getAttribute("data-y"),l=t.getAttribute("data-scale"),s=Date.now()-Number(t.getAttribute("data-hold")),f=500-s;0>f&&(f=0),setTimeout(function(){var n={top:a+"px",left:o+"px",opacity:"0","-webkit-transition-duration":c.duration+"ms","-moz-transition-duration":c.duration+"ms","-o-transition-duration":c.duration+"ms","transition-duration":c.duration+"ms","-webkit-transform":l,"-moz-transform":l,"-ms-transform":l,"-o-transform":l,transform:l};t.setAttribute("style",i(n)),setTimeout(function(){try{e.removeChild(t)}catch(n){return!1}},c.duration)},f)},wrapInput:function(e){for(var t=0;t<e.length;t++){var n=e[t];if("input"===n.tagName.toLowerCase()){var r=n.parentNode;if("i"===r.tagName.toLowerCase()&&-1!==r.className.indexOf("ink")&&-1!==r.className.indexOf("tab-item")&&-1!==r.className.indexOf("button-fab")&&-1!==r.className.indexOf("button-raised")&&-1!==r.className.indexOf("button-flat")&&-1!==r.className.indexOf("button-clear")&&-1!==r.className.indexOf("button")&&-1!==r.className.indexOf("item"))return!1;var i=document.createElement("i");i.className=n.className+" ink-input-wrapper";var o=n.getAttribute("style");o||(o=""),i.setAttribute("style",o),n.className="ink-button-input",n.removeAttribute("style"),r.replaceChild(i,n),i.appendChild(n)}}}};return a.displayEffect=function(e){e=e||{},"duration"in e&&(c.duration=e.duration);var t=".ink,.tab-item,.button-fab,.button-raised,.button-flat,.button-clear,a.item,.popup .button";c.wrapInput(o(t)),Array.prototype.forEach.call(o(t),function(e){"ontouchstart"in window?(e.addEventListener("touchstart",c.show,!1),e.addEventListener("touchend",c.hide,!1),e.addEventListener("touchcancel",c.hide,!1)):(e.addEventListener("mousedown",c.show,!1),e.addEventListener("mouseup",c.hide,!1),e.addEventListener("mouseleave",c.hide,!1))})},a}e.factory("ionicMaterialInk",t),t.inject=[]}},function(e,t,n){e.exports=function(e){function t(){"use strict";function e(){return window.innerHeight}function t(e,t){for(var n=0;t>n;n++){var r=e[n];r.className+=" in",r.className+=" done"}}function n(n){var r={finishDelayThrottle:2,finishSpeedPercent:.5,leftOffsetPercentage:.8,selector:".animate-blinds .item",startVelocity:1100};"undefined"==typeof n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||r.finishDelayThrottle,n.finishSpeedPercent=n.finishSpeedPercent||r.finishSpeedPercent,n.leftOffsetPercentage=n.leftOffsetPercentage||r.leftOffsetPercentage,n.startVelocity=n.startVelocity||r.startVelocity,"undefined"==typeof n.selector&&(n.selector=r.selector);var i="undefined"==typeof n.selector||""===n.selector;if(i)return console.log("invalid blinds selector"),!1;for(var o=document.querySelectorAll(n.selector),a=o.length,l=0,s=e(),f=0;a>f&&o[f].offsetTop<s;f++)l+=1;for(var c=n.startVelocity,f=0;l>f;f++){var u=o[f],d=u.getBoundingClientRect(),p=d.left*n.leftOffsetPercentage+d.top,m=parseFloat(p/c).toFixed(2);u.style.webkitTransitionDelay=m+"s",u.style.transitionDelay=m+"s",u.className+=" in"}setTimeout(function(){for(var e=0;l>e;e++){var t=o[e],r=t.getBoundingClientRect(),i=r.left*n.leftOffsetPercentage+r.top;parseFloat(i/c/n.finishDelayThrottle).toFixed(2);o[e].className+=" done"}},c*n.finishSpeedPercent),t(o,a)}function r(n){var r={finishDelayThrottle:2,finishSpeedPercent:.72,leftOffsetPercentage:.8,selector:".animate-fade-slide-in .item",startVelocity:1100};"undefined"==typeof n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||r.finishDelayThrottle,n.finishSpeedPercent=n.finishSpeedPercent||r.finishSpeedPercent,n.leftOffsetPercentage=n.leftOffsetPercentage||r.leftOffsetPercentage,n.startVelocity=n.startVelocity||r.startVelocity,"undefined"==typeof n.selector&&(n.selector=r.selector);var i="undefined"==typeof n.selector||""===n.selector;if(i)return console.log("invalid fadeSlideIn selector"),!1;for(var o=document.querySelectorAll(n.selector),a=o.length,l=0,s=e(),f=0;a>f&&o[f].offsetTop<s;f++)l+=1;for(var c=n.startVelocity,f=0;l>f;f++){var u=o[f],d=u.getBoundingClientRect(),p=d.left*n.leftOffsetPercentage+d.top,m=parseFloat(p/c).toFixed(2);u.style.webkitTransitionDelay=m+"s",u.style.transitionDelay=m+"s",u.className+=" in"}setTimeout(function(){for(var e=0;l>e;e++){var t=o[e],r=t.getBoundingClientRect(),i=r.left*n.leftOffsetPercentage+r.top,a=i/c/n.finishDelayThrottle;parseFloat(a).toFixed(2)}o[0].className+=" done"},c*n.finishSpeedPercent),t(o,a)}function i(n){var r={finishDelayThrottle:2,finishSpeedPercent:.72,leftOffsetPercentage:.8,selector:".animate-fade-slide-in-right .item",startVelocity:1100};"undefined"==typeof n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||r.finishDelayThrottle,n.finishSpeedPercent=n.finishSpeedPercent||r.finishSpeedPercent,n.leftOffsetPercentage=n.leftOffsetPercentage||r.leftOffsetPercentage,n.startVelocity=n.startVelocity||r.startVelocity,"undefined"==typeof n.selector&&(n.selector=r.selector);var i="undefined"==typeof n.selector||""===n.selector;if(i)return console.log("invalid fadeSlideInRight selector"),!1;for(var o=document.querySelectorAll(n.selector),a=o.length,l=0,s=e(),f=0;a>f&&o[f].offsetTop<s;f++)l+=1;for(var c=n.startVelocity,f=0;l>f;f++){var u=o[f],d=u.getBoundingClientRect(),p=d.left*n.leftOffsetPercentage+d.top,m=parseFloat(p/c).toFixed(2);u.style.webkitTransitionDelay=m+"s",u.style.transitionDelay=m+"s",u.className+=" in"}setTimeout(function(){for(var e=0;l>e;e++){var t=o[e],r=t.getBoundingClientRect(),i=r.left*n.leftOffsetPercentage+r.top,a=i/c/n.finishDelayThrottle;parseFloat(a).toFixed(2)}o[0].className+=" done"},c*n.finishSpeedPercent),t(o,a)}function o(n){var r={finishDelayThrottle:2,finishSpeedPercent:.72,leftOffsetPercentage:.8,selector:".animate-ripple .item",startVelocity:1100};"undefined"==typeof n&&(n={}),n.finishDelayThrottle=n.finishDelayThrottle||r.finishDelayThrottle,n.finishSpeedPercent=n.finishSpeedPercent||r.finishSpeedPercent,n.leftOffsetPercentage=n.leftOffsetPercentage||r.leftOffsetPercentage,n.startVelocity=n.startVelocity||r.startVelocity,"undefined"==typeof n.selector&&(n.selector=r.selector);var i="undefined"==typeof n.selector||""===n.selector;if(i)return console.log("invalid ripple selector"),!1;for(var o=document.querySelectorAll(n.selector),a=o.length,l=0,s=e(),f=0;f<o.length&&o[f].offsetTop<s;f++)l+=1;for(var c=n.startVelocity,f=0;l>f;f++){var u=o[f],d=u.getBoundingClientRect(),p=d.left*n.leftOffsetPercentage+d.top,m=parseFloat(p/c).toFixed(2);u.style.webkitTransitionDelay=m+"s",u.style.transitionDelay=m+"s",u.className+=" in"}setTimeout(function(){for(var e=0;l>e;e++){var t=o[e],r=t.getBoundingClientRect(),i=r.left*n.leftOffsetPercentage+r.top,a=i/c/n.finishDelayThrottle;parseFloat(a).toFixed(2)}o[0].className+=" done"},c*n.finishSpeedPercent),t(o,a)}function a(e){"string"==typeof e&&(e={selector:e});var t="undefined"==typeof e.selector||""===e.selector;if(t)return console.log("invalid pushDown selector"),!1;for(var n=document.querySelectorAll(e.selector),r=n.length,i=0;r>i;i++){var o=n[i],a="animate-pan-in-left",l=o.className.lastIndexOf(a);o.className=o.className.substr(0,l)}}function l(e){"string"==typeof e&&(e={selector:e});var t="undefined"==typeof e.selector||""===e.selector;if(t)return console.log("invalid pushDown selector"),!1;for(var n=document.querySelectorAll(e.selector),r=n.length,i=0;r>i;i++){var o=n[i],a=e.selector.split(".")[1],l=o.className.lastIndexOf(a);o.className=o.className.substr(0,l)}}function s(e){"string"==typeof e&&(e={selector:e});var t="undefined"==typeof e.selector||""===e.selector;if(t)return console.log("invalid pushDown selector"),!1;for(var n=document.querySelectorAll(e.selector),r=n.length,i=0;r>i;i++){var o=n[i],a=e.selector.split(".")[1],l=o.className.lastIndexOf(a);o.className=o.className.substr(0,l)}}var f={blinds:n,fadeSlideIn:r,fadeSlideInRight:i,panInLeft:a,pushDown:l,ripple:o,slideUp:s};return f}e.factory("ionicMaterialMotion",t),t.$inject=[]}}])});
+//# sourceMappingURL=ionic.material.min.js.map
+/*
+ AngularJS v1.5.11
+ (c) 2010-2017 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(R,b){'use strict';function G(s,g){g=g||{};b.forEach(g,function(b,k){delete g[k]});for(var k in s)!s.hasOwnProperty(k)||"$"===k.charAt(0)&&"$"===k.charAt(1)||(g[k]=s[k]);return g}var y=b.$$minErr("$resource"),N=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;b.module("ngResource",["ng"]).provider("$resource",function(){var s=/^https?:\/\/[^/]*/,g=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},
+"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(k,M,H,I){function z(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,e?"%20":"+")}function B(b,e){this.template=b;this.defaults=r({},g.defaults,e);this.urlParams={}}function J(A,e,p,m){function c(a,d){var c={};d=r({},e,d);u(d,function(d,e){w(d)&&(d=d(a));var f;if(d&&d.charAt&&"@"===d.charAt(0)){f=a;var l=d.substr(1);if(null==l||""===l||
+"hasOwnProperty"===l||!N.test("."+l))throw y("badmember",l);for(var l=l.split("."),h=0,g=l.length;h<g&&b.isDefined(f);h++){var q=l[h];f=null!==f?f[q]:void 0}}else f=d;c[e]=f});return c}function O(a){return a.resource}function h(a){G(a||{},this)}var s=new B(A,m);p=r({},g.defaults.actions,p);h.prototype.toJSON=function(){var a=r({},this);delete a.$promise;delete a.$resolved;delete a.$cancelRequest;return a};u(p,function(a,d){var b=/^(POST|PUT|PATCH)$/i.test(a.method),e=a.timeout,g=K(a.cancellable)?
+a.cancellable:s.defaults.cancellable;e&&!P(e)&&(M.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete a.timeout,e=null);h[d]=function(f,l,m,A){var q={},p,v,C;switch(arguments.length){case 4:C=A,v=m;case 3:case 2:if(w(l)){if(w(f)){v=f;C=l;break}v=l;C=m}else{q=f;p=l;v=m;break}case 1:w(f)?
+v=f:b?p=f:q=f;break;case 0:break;default:throw y("badargs",arguments.length);}var D=this instanceof h,n=D?p:a.isArray?[]:new h(p),t={},z=a.interceptor&&a.interceptor.response||O,B=a.interceptor&&a.interceptor.responseError||void 0,x,E;u(a,function(a,d){switch(d){default:t[d]=Q(a);case "params":case "isArray":case "interceptor":case "cancellable":}});!D&&g&&(x=H.defer(),t.timeout=x.promise,e&&(E=I(x.resolve,e)));b&&(t.data=p);s.setUrlParams(t,r({},c(p,a.params||{}),q),a.url);q=k(t).then(function(f){var c=
+f.data;if(c){if(L(c)!==!!a.isArray)throw y("badcfg",d,a.isArray?"array":"object",L(c)?"array":"object",t.method,t.url);if(a.isArray)n.length=0,u(c,function(a){"object"===typeof a?n.push(new h(a)):n.push(a)});else{var b=n.$promise;G(c,n);n.$promise=b}}f.resource=n;return f},function(a){(C||F)(a);return H.reject(a)});q["finally"](function(){n.$resolved=!0;!D&&g&&(n.$cancelRequest=F,I.cancel(E),x=E=t.timeout=null)});q=q.then(function(a){var d=z(a);(v||F)(d,a.headers,a.status,a.statusText);return d},
+B);return D?q:(n.$promise=q,n.$resolved=!1,g&&(n.$cancelRequest=x.resolve),n)};h.prototype["$"+d]=function(a,c,b){w(a)&&(b=c,c=a,a={});a=h[d].call(this,a,this,c,b);return a.$promise||a}});h.bind=function(a){a=r({},e,a);return J(A,a,p,m)};return h}var F=b.noop,u=b.forEach,r=b.extend,Q=b.copy,L=b.isArray,K=b.isDefined,w=b.isFunction,P=b.isNumber;B.prototype={setUrlParams:function(b,e,g){var m=this,c=g||m.template,k,h,r="",a=m.urlParams={};u(c.split(/\W/),function(d){if("hasOwnProperty"===d)throw y("badname");
+!/^\d+$/.test(d)&&d&&(new RegExp("(^|[^\\\\]):"+d+"(\\W|$)")).test(c)&&(a[d]={isQueryParamValue:(new RegExp("\\?.*=:"+d+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(s,function(a){r=a;return""});e=e||{};u(m.urlParams,function(a,b){k=e.hasOwnProperty(b)?e[b]:m.defaults[b];K(k)&&null!==k?(h=a.isQueryParamValue?z(k,!0):z(k,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+b+"(\\W|$)","g"),function(a,b){return h+b})):c=c.replace(new RegExp("(/?):"+
+b+"(\\W|$)","g"),function(a,b,d){return"/"===d.charAt(0)?d:b+d})});m.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");b.url=r+c.replace(/\/\\\./,"/.");u(e,function(a,c){m.urlParams[c]||(b.params=b.params||{},b.params[c]=a)})}};return J}]})})(window,window.angular);
+//# sourceMappingURL=angular-resource.min.js.map
+
+/*!
+ * angular-translate - v2.18.1 - 2018-05-19
+ * 
+ * Copyright (c) 2018 The angular-translate team, Pascal Precht; Licensed MIT
+ */
+!function(t,e){"function"==typeof define&&define.amd?define([],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():e()}(0,function(){function t(e){"use strict";var n=e.storageKey(),a=e.storage(),t=function(){var t=e.preferredLanguage();angular.isString(t)?e.use(t):a.put(n,e.use())};t.displayName="fallbackFromIncorrectStorageValue",a?a.get(n)?e.use(a.get(n)).catch(t):t():angular.isString(e.preferredLanguage())&&e.use(e.preferredLanguage())}function e(t,r,e,i){"use strict";var z,c,T,x,F,I,_,n,V,R,D,K,U,M,H,G,q={},Y=[],B=t,J=[],Q="translate-cloak",W=!1,X=!1,Z=".",tt=!1,et=!1,nt=0,at=!0,a="default",s={default:function(t){return(t||"").split("-").join("_")},java:function(t){var e=(t||"").split("-").join("_"),n=e.split("_");return 1<n.length?n[0].toLowerCase()+"_"+n[1].toUpperCase():e},bcp47:function(t){var e=(t||"").split("_").join("-"),n=e.split("-");switch(n.length){case 1:n[0]=n[0].toLowerCase();break;case 2:n[0]=n[0].toLowerCase(),4===n[1].length?n[1]=n[1].charAt(0).toUpperCase()+n[1].slice(1).toLowerCase():n[1]=n[1].toUpperCase();break;case 3:n[0]=n[0].toLowerCase(),n[1]=n[1].charAt(0).toUpperCase()+n[1].slice(1).toLowerCase(),n[2]=n[2].toUpperCase();break;default:return e}return n.join("-")},"iso639-1":function(t){return(t||"").split("_").join("-").split("-")[0].toLowerCase()}},o=function(){if(angular.isFunction(i.getLocale))return i.getLocale();var t,e,n=r.$get().navigator,a=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(n.languages))for(t=0;t<n.languages.length;t++)if((e=n.languages[t])&&e.length)return e;for(t=0;t<a.length;t++)if((e=n[a[t]])&&e.length)return e;return null};o.displayName="angular-translate/service: getFirstBrowserLanguage";var rt=function(){var t=o()||"";return s[a]&&(t=s[a](t)),t};rt.displayName="angular-translate/service: getLocale";var it=function(t,e){for(var n=0,a=t.length;n<a;n++)if(t[n]===e)return n;return-1},st=function(){return this.toString().replace(/^\s+|\s+$/g,"")},f=function(t){return angular.isString(t)?t.toLowerCase():t},ot=function(t){if(t){for(var e,n=[],a=f(t),r=0,i=Y.length;r<i;r++)n.push(f(Y[r]));if(-1<(r=it(n,a)))return Y[r];if(c)for(var s in c)if(c.hasOwnProperty(s)){var o=!1,l=Object.prototype.hasOwnProperty.call(c,s)&&f(s)===f(t);if("*"===s.slice(-1)&&(o=f(s.slice(0,-1))===f(t.slice(0,s.length-1))),(l||o)&&(e=c[s],-1<it(n,f(e))))return e}var u=t.split("_");return 1<u.length&&-1<it(n,f(u[0]))?u[0]:void 0}},lt=function(t,e){if(!t&&!e)return q;if(t&&!e){if(angular.isString(t))return q[t]}else angular.isObject(q[t])||(q[t]={}),angular.extend(q[t],ut(e));return this};this.translations=lt,this.cloakClassName=function(t){return t?(Q=t,this):Q},this.nestedObjectDelimeter=function(t){return t?(Z=t,this):Z};var ut=function(t,e,n,a){var r,i,s;for(r in e||(e=[]),n||(n={}),t)Object.prototype.hasOwnProperty.call(t,r)&&(s=t[r],angular.isObject(s)?ut(s,e.concat(r),n,r):(i=e.length?""+e.join(Z)+Z+r:r,e.length&&r===a&&(n[""+e.join(Z)]="@:"+i),n[i]=s));return n};ut.displayName="flatObject",this.addInterpolation=function(t){return J.push(t),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(t){return R=t,this},this.useSanitizeValueStrategy=function(t){return e.useStrategy(t),this},this.preferredLanguage=function(t){return t?(ct(t),this):z};var ct=function(t){return t&&(z=t),z};this.translationNotFoundIndicator=function(t){return this.translationNotFoundIndicatorLeft(t),this.translationNotFoundIndicatorRight(t),this},this.translationNotFoundIndicatorLeft=function(t){return t?(U=t,this):U},this.translationNotFoundIndicatorRight=function(t){return t?(M=t,this):M},this.fallbackLanguage=function(t){return ft(t),this};var ft=function(t){return t?(angular.isString(t)?(x=!0,T=[t]):angular.isArray(t)&&(x=!1,T=t),angular.isString(z)&&it(T,z)<0&&T.push(z),this):x?T[0]:T};this.use=function(t){if(t){if(!q[t]&&!D)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+t+"'");return F=t,this}return F},this.resolveClientLocale=function(){return rt()};var gt=function(t){return t?(B=t,this):n?n+B:B};this.storageKey=gt,this.useUrlLoader=function(t,e){return this.useLoader("$translateUrlLoader",angular.extend({url:t},e))},this.useStaticFilesLoader=function(t){return this.useLoader("$translateStaticFilesLoader",t)},this.useLoader=function(t,e){return D=t,K=e||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(t){return _=t,this},this.storagePrefix=function(t){return t?(n=t,this):t},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(t){return V=t,this},this.usePostCompiling=function(t){return W=!!t,this},this.forceAsyncReload=function(t){return X=!!t,this},this.uniformLanguageTag=function(t){return t?angular.isString(t)&&(t={standard:t}):t={},a=t.standard,this},this.determinePreferredLanguage=function(t){var e=t&&angular.isFunction(t)?t():rt();return z=Y.length&&ot(e)||e,this},this.registerAvailableLanguageKeys=function(t,e){return t?(Y=t,e&&(c=e),this):Y},this.useLoaderCache=function(t){return!1===t?H=void 0:!0===t?H=!0:void 0===t?H="$translationCache":t&&(H=t),this},this.directivePriority=function(t){return void 0===t?nt:(nt=t,this)},this.statefulFilter=function(t){return void 0===t?at:(at=t,this)},this.postProcess=function(t){return G=t||void 0,this},this.keepContent=function(t){return et=!!t,this},this.$get=["$log","$injector","$rootScope","$q",function(t,o,s,m){var i,$,y,b=o.get(R||"$translateDefaultInterpolation"),S=!1,L={},f={},j=function(t,s,o,l,u,c){!F&&z&&(F=z);var a=u&&u!==F?ot(u)||u:F;if(u&&v(u),angular.isArray(t)){return function(t){for(var a={},e=[],n=function(e){var n=m.defer(),t=function(t){a[e]=t,n.resolve([e,t])};return j(e,s,o,l,u,c).then(t,t),n.promise},r=0,i=t.length;r<i;r++)e.push(n(t[r]));return m.all(e).then(function(){return a})}(t)}var e=m.defer();t&&(t=st.apply(t));var n=function(){var t=f[a]||f[z];if($=0,_&&!t){var e=i.get(B);if(t=f[e],T&&T.length){var n=it(T,e);$=0===n?1:0,it(T,z)<0&&T.push(z)}}return t}();if(n){var r=function(){u||(a=F),h(t,s,o,l,a,c).then(e.resolve,e.reject)};r.displayName="promiseResolved",n.finally(r).catch(angular.noop)}else h(t,s,o,l,a,c).then(e.resolve,e.reject);return e.promise},w=function(t){return U&&(t=[U,t].join(" ")),M&&(t=[t,M].join(" ")),t},l=function(t){F=t,_&&i.put(j.storageKey(),F),s.$emit("$translateChangeSuccess",{language:t}),b.setLocale(F);var e=function(t,e){L[e].setLocale(F)};e.displayName="eachInterpolatorLocaleSetter",angular.forEach(L,e),s.$emit("$translateChangeEnd",{language:t})},u=function(n){if(!n)throw"No language key specified for loading.";var a=m.defer();s.$emit("$translateLoadingStart",{language:n}),S=!0;var t=H;"string"==typeof t&&(t=o.get(t));var e=angular.extend({},K,{key:n,$http:angular.extend({},{cache:t},K.$http)}),r=function(t){var e={};s.$emit("$translateLoadingSuccess",{language:n}),angular.isArray(t)?angular.forEach(t,function(t){angular.extend(e,ut(t))}):angular.extend(e,ut(t)),S=!1,a.resolve({key:n,table:e}),s.$emit("$translateLoadingEnd",{language:n})};r.displayName="onLoaderSuccess";var i=function(t){s.$emit("$translateLoadingError",{language:t}),a.reject(t),s.$emit("$translateLoadingEnd",{language:t})};return i.displayName="onLoaderError",o.get(D)(e).then(r,i),a.promise};if(_&&(!(i=o.get(_)).get||!i.put))throw new Error("Couldn't use storage '"+_+"', missing get() or put() method!");if(J.length){var e=function(t){var e=o.get(t);e.setLocale(z||F),L[e.getInterpolationIdentifier()]=e};e.displayName="interpolationFactoryAdder",angular.forEach(J,e)}var c=function(a,r,i,s,o){var l=m.defer(),t=function(t){if(Object.prototype.hasOwnProperty.call(t,r)&&null!==t[r]){s.setLocale(a);var e=t[r];if("@:"===e.substr(0,2))c(a,e.substr(2),i,s,o).then(l.resolve,l.reject);else{var n=s.interpolate(t[r],i,"service",o,r);n=O(r,t[r],n,i,a),l.resolve(n)}s.setLocale(F)}else l.reject()};return t.displayName="fallbackTranslationResolver",function(t){var e=m.defer();if(Object.prototype.hasOwnProperty.call(q,t))e.resolve(q[t]);else if(f[t]){var n=function(t){lt(t.key,t.table),e.resolve(t.table)};n.displayName="translationTableResolver",f[t].then(n,e.reject)}else e.reject();return e.promise}(a).then(t,l.reject),l.promise},g=function(t,e,n,a,r){var i,s=q[t];if(s&&Object.prototype.hasOwnProperty.call(s,e)&&null!==s[e]){if(a.setLocale(t),i=a.interpolate(s[e],n,"filter",r,e),i=O(e,s[e],i,n,t,r),!angular.isString(i)&&angular.isFunction(i.$$unwrapTrustedValue)){var o=i.$$unwrapTrustedValue();if("@:"===o.substr(0,2))return g(t,o.substr(2),n,a,r)}else if("@:"===i.substr(0,2))return g(t,i.substr(2),n,a,r);a.setLocale(F)}return i},C=function(t,e,n,a){return V?o.get(V)(t,F,e,n,a):t},N=function(t,e,n,a,r,i){var s=m.defer();if(t<T.length){var o=T[t];c(o,e,n,a,i).then(function(t){s.resolve(t)},function(){return N(t+1,e,n,a,r,i).then(s.resolve,s.reject)})}else if(r)s.resolve(r);else{var l=C(e,n,r);V&&l?s.resolve(l):s.reject(w(e))}return s.promise},p=function(t,e,n,a,r){var i;if(t<T.length){var s=T[t];(i=g(s,e,n,a,r))||""===i||(i=p(t+1,e,n,a))}return i},h=function(t,e,n,a,r,i){var s,o,l,u,c,f=m.defer(),g=r?q[r]:q,p=n?L[n]:b;if(g&&Object.prototype.hasOwnProperty.call(g,t)&&null!==g[t]){var h=g[t];if("@:"===h.substr(0,2))j(h.substr(2),e,n,a,r,i).then(f.resolve,f.reject);else{var d=p.interpolate(h,e,"service",i,t);d=O(t,h,d,e,r),f.resolve(d)}}else{var v;V&&!S&&(v=C(t,e,a)),r&&T&&T.length?(s=t,o=e,l=p,u=a,c=i,N(0<y?y:$,s,o,l,u,c)).then(function(t){f.resolve(t)},function(t){f.reject(w(t))}):V&&!S&&v?a?f.resolve(a):f.resolve(v):a?f.resolve(a):f.reject(w(t))}return f.promise},d=function(t,e,n,a,r){var i,s=a?q[a]:q,o=b;if(L&&Object.prototype.hasOwnProperty.call(L,n)&&(o=L[n]),s&&Object.prototype.hasOwnProperty.call(s,t)&&null!==s[t]){var l=s[t];"@:"===l.substr(0,2)?i=d(l.substr(2),e,n,a,r):(i=o.interpolate(l,e,"filter",r,t),i=O(t,l,i,e,a,r))}else{var u;V&&!S&&(u=C(t,e,r)),i=a&&T&&T.length?p(($=0)<y?y:$,t,e,o,r):V&&!S&&u?u:w(t)}return i},O=function(t,e,n,a,r,i){var s=G;return s&&("string"==typeof s&&(s=o.get(s)),s)?s(t,e,n,a,r,i):n},v=function(t){q[t]||!D||f[t]||(f[t]=u(t).then(function(t){return lt(t.key,t.table),t}))};j.preferredLanguage=function(t){return t&&ct(t),z},j.cloakClassName=function(){return Q},j.nestedObjectDelimeter=function(){return Z},j.fallbackLanguage=function(t){if(null!=t){if(ft(t),D&&T&&T.length)for(var e=0,n=T.length;e<n;e++)f[T[e]]||(f[T[e]]=u(T[e]));j.use(j.use())}return x?T[0]:T},j.useFallbackLanguage=function(t){if(null!=t)if(t){var e=it(T,t);-1<e&&(y=e)}else y=0},j.proposedLanguage=function(){return I},j.storage=function(){return i},j.negotiateLocale=ot,j.use=function(e){if(!e)return F;var n=m.defer();n.promise.then(null,angular.noop),s.$emit("$translateChangeStart",{language:e});var t=ot(e);return 0<Y.length&&!t?m.reject(e):(t&&(e=t),I=e,!X&&q[e]||!D||f[e]?f[e]?f[e].then(function(t){return I===t.key&&l(t.key),n.resolve(t.key),t},function(t){return!F&&T&&0<T.length&&T[0]!==t?j.use(T[0]).then(n.resolve,n.reject):n.reject(t)}):(n.resolve(e),l(e)):(f[e]=u(e).then(function(t){return lt(t.key,t.table),n.resolve(t.key),I===e&&l(t.key),t},function(t){return s.$emit("$translateChangeError",{language:t}),n.reject(t),s.$emit("$translateChangeEnd",{language:t}),m.reject(t)}),f[e].finally(function(){var t;I===(t=e)&&(I=void 0),f[t]=void 0}).catch(angular.noop)),n.promise)},j.resolveClientLocale=function(){return rt()},j.storageKey=function(){return gt()},j.isPostCompilingEnabled=function(){return W},j.isForceAsyncReloadEnabled=function(){return X},j.isKeepContent=function(){return et},j.refresh=function(t){if(!D)throw new Error("Couldn't refresh translation table, no loader registered!");s.$emit("$translateRefreshStart",{language:t});var e=m.defer(),n={};function a(e){var t=u(e);return(f[e]=t).then(function(t){q[e]={},lt(e,t.table),n[e]=!0},angular.noop),t}if(e.promise.then(function(){for(var t in q)q.hasOwnProperty(t)&&(t in n||delete q[t]);F&&l(F)},angular.noop).finally(function(){s.$emit("$translateRefreshEnd",{language:t})}),t)q[t]?a(t).then(e.resolve,e.reject):e.reject();else{var r=T&&T.slice()||[];F&&-1===r.indexOf(F)&&r.push(F),m.all(r.map(a)).then(e.resolve,e.reject)}return e.promise},j.instant=function(t,e,n,a,r){var i=a&&a!==F?ot(a)||a:F;if(null===t||angular.isUndefined(t))return t;if(a&&v(a),angular.isArray(t)){for(var s={},o=0,l=t.length;o<l;o++)s[t[o]]=j.instant(t[o],e,n,a,r);return s}if(angular.isString(t)&&t.length<1)return t;t&&(t=st.apply(t));var u,c,f=[];z&&f.push(z),i&&f.push(i),T&&T.length&&(f=f.concat(T));for(var g=0,p=f.length;g<p;g++){var h=f[g];if(q[h]&&void 0!==q[h][t]&&(u=d(t,e,n,i,r)),void 0!==u)break}u||""===u||(U||M?u=w(t):(u=b.interpolate(t,e,"filter",r),V&&!S&&(c=C(t,e,r)),V&&!S&&c&&(u=c)));return u},j.versionInfo=function(){return"2.18.1"},j.loaderCache=function(){return H},j.directivePriority=function(){return nt},j.statefulFilter=function(){return at},j.isReady=function(){return tt};var n=m.defer();n.promise.then(function(){tt=!0}),j.onReady=function(t){var e=m.defer();return angular.isFunction(t)&&e.promise.then(t),tt?e.resolve():n.promise.then(e.resolve),e.promise},j.getAvailableLanguageKeys=function(){return 0<Y.length?Y:null},j.getTranslationTable=function(t){return(t=t||j.use())&&q[t]?angular.copy(q[t]):null};var a=s.$on("$translateReady",function(){n.resolve(),a(),a=null}),r=s.$on("$translateChangeEnd",function(){n.resolve(),r(),r=null});if(D){if(angular.equals(q,{})&&j.use()&&j.use(j.use()),T&&T.length)for(var E=function(t){return lt(t.key,t.table),s.$emit("$translateChangeEnd",{language:t.key}),t},k=0,P=T.length;k<P;k++){var A=T[k];!X&&q[A]||(f[A]=u(A).then(E))}}else s.$emit("$translateReady",{language:j.use()});return j}]}function n(s,o){"use strict";var t={};return t.setLocale=function(t){t},t.getInterpolationIdentifier=function(){return"default"},t.useSanitizeValueStrategy=function(t){return o.useStrategy(t),this},t.interpolate=function(t,e,n,a,r){var i;return e=e||{},e=o.sanitize(e,"params",a,n),angular.isNumber(t)?i=""+t:angular.isString(t)?(i=s(t)(e),i=o.sanitize(i,"text",a,n)):i="",i},t}function a(S,L,j,w,C){"use strict";var N=function(t){return angular.isString(t)?t.toLowerCase():t};return{restrict:"AE",scope:!0,priority:S.directivePriority(),compile:function(t,h){var d=h.translateValues?h.translateValues:void 0,v=h.translateInterpolation?h.translateInterpolation:void 0,m=h.translateSanitizeStrategy?h.translateSanitizeStrategy:void 0,$=t[0].outerHTML.match(/translate-value-+/i),y="^(.*)("+L.startSymbol()+".*"+L.endSymbol()+")(.*)",b="^(.*)"+L.startSymbol()+"(.*)"+L.endSymbol()+"(.*)";return function(r,l,u){r.interpolateParams={},r.preText="",r.postText="",r.translateNamespace=function t(e){if(e.translateNamespace)return e.translateNamespace;if(e.$parent)return t(e.$parent)}(r);var i={},s=function(t){if(angular.isFunction(s._unwatchOld)&&(s._unwatchOld(),s._unwatchOld=void 0),angular.equals(t,"")||!angular.isDefined(t)){var e=function(){return this.toString().replace(/^\s+|\s+$/g,"")}.apply(l.text()),n=e.match(y);if(angular.isArray(n)){r.preText=n[1],r.postText=n[3],i.translate=L(n[2])(r.$parent);var a=e.match(b);angular.isArray(a)&&a[2]&&a[2].length&&(s._unwatchOld=r.$watch(a[2],function(t){i.translate=t,c()}))}else i.translate=e||void 0}else i.translate=t;c()},t=function(e){u.$observe(e,function(t){i[e]=t,c()})};!function(t,e,n){if(e.translateValues&&angular.extend(t,w(e.translateValues)(r.$parent)),$)for(var a in n)Object.prototype.hasOwnProperty.call(e,a)&&"translateValue"===a.substr(0,14)&&"translateValues"!==a&&(t[N(a.substr(14,1))+a.substr(15)]=n[a])}(r.interpolateParams,u,h);var e=!0;for(var n in u.$observe("translate",function(t){void 0===t?s(""):""===t&&e||(i.translate=t,c()),e=!1}),u)u.hasOwnProperty(n)&&"translateAttr"===n.substr(0,13)&&13<n.length&&t(n);if(u.$observe("translateDefault",function(t){r.defaultText=t,c()}),m&&u.$observe("translateSanitizeStrategy",function(t){r.sanitizeStrategy=w(t)(r.$parent),c()}),d&&u.$observe("translateValues",function(t){t&&r.$parent.$watch(function(){angular.extend(r.interpolateParams,w(t)(r.$parent))})}),$){var a=function(n){u.$observe(n,function(t){var e=N(n.substr(14,1))+n.substr(15);r.interpolateParams[e]=t})};for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&"translateValue"===o.substr(0,14)&&"translateValues"!==o&&a(o)}var c=function(){for(var t in i)i.hasOwnProperty(t)&&void 0!==i[t]&&f(t,i[t],r,r.interpolateParams,r.defaultText,r.translateNamespace)},f=function(e,t,n,a,r,i){t?(i&&"."===t.charAt(0)&&(t=i+t),S(t,a,v,r,n.translateLanguage,n.sanitizeStrategy).then(function(t){g(t,n,!0,e)},function(t){g(t,n,!1,e)})):g(t,n,!1,e)},g=function(t,e,n,a){if(n||void 0!==e.defaultText&&(t=e.defaultText),"translate"===a){(n||!n&&!S.isKeepContent()&&void 0===u.translateKeepContent)&&l.empty().append(e.preText+t+e.postText);var r=S.isPostCompilingEnabled(),i=void 0!==h.translateCompile,s=i&&"false"!==h.translateCompile;(r&&!i||s)&&j(l.contents())(e)}else{var o=u.$attr[a];"data-"===o.substr(0,5)&&(o=o.substr(5)),o=o.substr(15),l.attr(o,t)}};(d||$||u.translateDefault)&&r.$watch("interpolateParams",c,!0),r.$on("translateLanguageChanged",c);var p=C.$on("$translateChangeSuccess",c);l.text().length?u.translate?s(u.translate):s(""):u.translate&&s(u.translate),c(),r.$on("$destroy",p)}}}}function r(u,c){"use strict";return{restrict:"A",priority:u.directivePriority(),link:function(n,a,r){var i,s,o,l={},t=function(){angular.forEach(i,function(t,e){t&&(l[e]=!0,n.translateNamespace&&"."===t.charAt(0)&&(t=n.translateNamespace+t),u(t,s,r.translateInterpolation,void 0,n.translateLanguage,o).then(function(t){a.attr(e,t)},function(t){a.attr(e,t)}))}),angular.forEach(l,function(t,e){i[e]||(a.removeAttr(e),delete l[e])})};f(n,r.translateAttr,function(t){i=t},t),f(n,r.translateValues,function(t){s=t},t),f(n,r.translateSanitizeStrategy,function(t){o=t},t),r.translateValues&&n.$watch(r.translateValues,t,!0),n.$on("translateLanguageChanged",t);var e=c.$on("$translateChangeSuccess",t);t(),n.$on("$destroy",e)}}}function f(t,e,n,a){"use strict";e&&("::"===e.substr(0,2)?e=e.substr(2):t.$watch(e,function(t){n(t),a()},!0),n(t.$eval(e)))}function i(s,o){"use strict";return{compile:function(t){var i=function(t){t.addClass(s.cloakClassName())};return i(t),function(t,e,n){var a=function(t){t.removeClass(s.cloakClassName())}.bind(this,e),r=i.bind(this,e);n.translateCloak&&n.translateCloak.length?(n.$observe("translateCloak",function(t){s(t).then(a,r)}),o.$on("$translateChangeSuccess",function(){s(n.translateCloak).then(a,r)})):s.onReady(a)}}}}function s(){"use strict";return{restrict:"A",scope:!0,compile:function(){return{pre:function(t,e,n){t.translateNamespace=function t(e){if(e.translateNamespace)return e.translateNamespace;if(e.$parent)return t(e.$parent)}(t),t.translateNamespace&&"."===n.translateNamespace.charAt(0)?t.translateNamespace+=n.translateNamespace:t.translateNamespace=n.translateNamespace}}}}}function o(){"use strict";return{restrict:"A",scope:!0,compile:function(){return function(e,t,n){n.$observe("translateLanguage",function(t){e.translateLanguage=t}),e.$watch("translateLanguage",function(){e.$broadcast("translateLanguageChanged")})}}}}function l(i,s){"use strict";var t=function(t,e,n,a){if(!angular.isObject(e)){var r=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};e=i(e)(r)}return s.instant(t,e,n,a)};return s.statefulFilter()&&(t.$stateful=!0),t}function u(t){"use strict";return t("translations")}return t.$inject=["$translate"],e.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],n.$inject=["$interpolate","$translateSanitization"],a.$inject=["$translate","$interpolate","$compile","$parse","$rootScope"],r.$inject=["$translate","$rootScope"],i.$inject=["$translate","$rootScope"],l.$inject=["$parse","$translate"],u.$inject=["$cacheFactory"],angular.module("pascalprecht.translate",["ng"]).run(t),t.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",function(){"use strict";var n,a,g,p=null,h=!1,d=!1;(g={sanitize:function(t,e){return"text"===e&&(t=i(t)),t},escape:function(t,e){return"text"===e&&(t=r(t)),t},sanitizeParameters:function(t,e){return"params"===e&&(t=o(t,i)),t},escapeParameters:function(t,e){return"params"===e&&(t=o(t,r)),t},sce:function(t,e,n){return"text"===e?t=s(t):"params"===e&&"filter"!==n&&(t=o(t,r)),t},sceParameters:function(t,e){return"params"===e&&(t=o(t,s)),t}}).escaped=g.escapeParameters,this.addStrategy=function(t,e){return g[t]=e,this},this.removeStrategy=function(t){return delete g[t],this},this.useStrategy=function(t){return h=!0,p=t,this},this.$get=["$injector","$log",function(u,c){var e,f={};return u.has("$sanitize")&&(n=u.get("$sanitize")),u.has("$sce")&&(a=u.get("$sce")),{useStrategy:(e=this,function(t){e.useStrategy(t)}),sanitize:function(t,e,n,a){if(p||h||d||(c.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),d=!0),n||null===n||(n=p),!n)return t;a||(a="service");var r,i,s,o,l=angular.isArray(n)?n:[n];return r=t,i=e,s=a,o=l,angular.forEach(o,function(e){if(angular.isFunction(e))r=e(r,i,s);else if(angular.isFunction(g[e]))r=g[e](r,i,s);else{if(!angular.isString(g[e]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+e+"'");if(!f[g[e]])try{f[g[e]]=u.get(g[e])}catch(t){throw f[g[e]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+e+"'")}r=f[g[e]](r,i,s)}}),r}}}];var r=function(t){var e=angular.element("<div></div>");return e.text(t),e.html()},i=function(t){if(!n)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return n(t)},s=function(t){if(!a)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sce service.");return a.trustAsHtml(t)},o=function(t,n,a){if(angular.isDate(t))return t;if(angular.isObject(t)){var r=angular.isArray(t)?[]:{};if(a){if(-1<a.indexOf(t))throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else a=[];return a.push(t),angular.forEach(t,function(t,e){angular.isFunction(t)||(r[e]=o(t,n,a))}),a.splice(-1,1),r}return angular.isNumber(t)?t:!0===t||!1===t?t:angular.isUndefined(t)||null===t?t:n(t)}}),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",e),e.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",n),n.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",a),a.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateAttr",r),r.displayName="translateAttrDirective",angular.module("pascalprecht.translate").directive("translateCloak",i),i.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",s),s.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").directive("translateLanguage",o),o.displayName="translateLanguageDirective",angular.module("pascalprecht.translate").filter("translate",l),l.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",u),u.displayName="$translationCache","pascalprecht.translate"});
+/*
+ AngularJS v1.5.11
+ (c) 2010-2017 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(y,l){'use strict';function w(){return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(u,n,a,c,f){var e=n[0],d,r=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var k=function(a){d=a?p(a)?a:a.split(/[\s,]+/):null;c.reRender()};a?(k(u.$eval(a)),u.$watchCollection(a,k)):k(r);var g,s;c.register(e,s={test:function(a){var m=d;a=m?p(m)?0<=m.indexOf(a):m.hasOwnProperty(a):void 0;return a},attach:function(){g||f(function(a,
+m){t.enter(a,null,n);g=a;var d=g.$$attachId=c.getAttachId();g.on("$destroy",function(){g&&g.$$attachId===d&&(c.deregister(e),s.detach());m.$destroy()})})},detach:function(){if(g){var a=g;g=null;t.leave(a)}}})}}}]}var v,p,q,x;l.module("ngMessages",[],function(){v=l.forEach;p=l.isArray;q=l.isString;x=l.element}).directive("ngMessages",["$animate",function(t){function u(a,c){return q(c)&&0===c.length||n(a.$eval(c))}function n(a){return q(a)?a.length:!!a}return{require:"ngMessages",restrict:"AE",controller:["$element",
+"$scope","$attrs",function(a,c,f){function e(a,c){for(var b=c,d=[];b&&b!==a;){var h=b.$$ngMessageNode;if(h&&h.length)return g[h];b.childNodes.length&&-1===d.indexOf(b)?(d.push(b),b=b.childNodes[b.childNodes.length-1]):b.previousSibling?b=b.previousSibling:(b=b.parentNode,d.push(b))}}var d=this,r=0,k=0;this.getAttachId=function(){return k++};var g=this.messages={},s,l;this.render=function(m){m=m||{};s=!1;l=m;for(var g=u(c,f.ngMessagesMultiple)||u(c,f.multiple),b=[],e={},h=d.head,r=!1,k=0;null!=h;){k++;
+var q=h.message,p=!1;r||v(m,function(a,b){!p&&n(a)&&q.test(b)&&!e[b]&&(p=e[b]=!0,q.attach())});p?r=!g:b.push(q);h=h.next}v(b,function(a){a.detach()});b.length!==k?t.setClass(a,"ng-active","ng-inactive"):t.setClass(a,"ng-inactive","ng-active")};c.$watchCollection(f.ngMessages||f["for"],d.render);a.on("$destroy",function(){v(g,function(a){a.message.detach()})});this.reRender=function(){s||(s=!0,c.$evalAsync(function(){s&&l&&d.render(l)}))};this.register=function(c,f){var b=r.toString();g[b]={message:f};
+var k=a[0],h=g[b];d.head?(k=e(k,c))?(h.next=k.next,k.next=h):(h.next=d.head,d.head=h):d.head=h;c.$$ngMessageNode=b;r++;d.reRender()};this.deregister=function(c){var f=c.$$ngMessageNode;delete c.$$ngMessageNode;var b=g[f];(c=e(a[0],c))?c.next=b.next:d.head=b.next;delete g[f];d.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(l,p,n){function a(a,f){var e=n.$$createComment?n.$$createComment("ngMessagesInclude",f):p[0].createComment(" ngMessagesInclude: "+
+f+" "),e=x(e);a.after(e);a.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(c,f,e){var d=e.ngMessagesInclude||e.src;l(d).then(function(e){c.$$destroyed||(q(e)&&!e.trim()?a(f,d):n(e)(c,function(c){f.after(c);a(f,d)}))})}}}]).directive("ngMessage",w()).directive("ngMessageExp",w())})(window,window.angular);
+//# sourceMappingURL=angular-messages.min.js.map
+
+(function(window, angular, undefined) {'use strict';
+
+    // This file is adapted from Angular API Demo
+    // https://github.com/Schweigi/angular-api-demo
+
+    // This file is adapted from Angular UI ngGrid project (MIT License)
+    // https://github.com/angular-ui/ng-grid/blob/v3.0.0-rc.20/src/js/core/factories/GridApi.js
+    angular.module('ngApi', []).factory('Api', ['$q', '$rootScope', function($q, $rootScope) {
+        /**
+         * Api provides the ability to register public methods events inside an app and allow
+         * for other components to use the api via featureName.raise.methodName and featureName.on.eventName(function(args){}).
+         *
+         * @appInstance: App which the API is for
+         * @apiId: Unique id in case multiple API instances do exist inside the same Angular environment
+         */
+        var Api = function Api(appInstance, apiId) {
+            this.gantt = appInstance;
+            this.apiId = apiId;
+            this.eventListeners = [];
+        };
+
+        /**
+         * Used to execute a function while disabling the specified event listeners.
+         * Disables the listenerFunctions, executes the callbackFn, and then enables the listenerFunctions again
+         *
+         * @listenerFuncs: Listener function or array of listener functions to suppress. These must be the same
+         * @functions that were used in the .on.eventName method
+         * @callBackFn: Function to execute with surpressed events
+         *
+         * Example:
+         *    var clicked = function (){
+         *       // Button clicked event handler
+         *    }
+         *
+         *    api.suppressEvents(clicked, function() {
+         *       // No clicked events will be fired
+         *       api.ui.form.main.submit.click(scope);
+         *    });
+         */
+        Api.prototype.suppressEvents = function(listenerFuncs, callBackFn) {
+            var self = this;
+            var listeners = angular.isArray(listenerFuncs) ? listenerFuncs : [listenerFuncs];
+
+            var foundListeners = [];
+            listeners.forEach(function(l) {
+                foundListeners = self.eventListeners.filter(function(lstnr) {
+                    return l === lstnr.handler;
+                });
+            });
+
+            foundListeners.forEach(function(l) {
+                l.dereg();
+            });
+
+            callBackFn();
+
+            foundListeners.forEach(function(l) {
+                l.dereg = registerEventWithAngular(l.eventId, l.handler, self.gantt, l._this);
+            });
+
+        };
+
+        /**
+         * Registers a new event for the given feature.
+         *
+         * @featureName: Name of the feature that raises the event
+         * @eventName: Name of the event
+         *
+         * To trigger the event call:
+         * .raise.eventName()
+         *
+         * To register a event listener call:
+         * .on.eventName(scope, callBackFn, _this)
+         * scope: A scope reference to add a deregister call to the scopes .$on('destroy')
+         * callBackFn: The function to call
+         * _this: Optional this context variable for callbackFn. If omitted, gantt.api will be used for the context
+         *
+         * .on.eventName returns a de-register funtion that will remove the listener. It's not necessary to use it as the listener
+         * will be removed when the scope is destroyed.
+         */
+        Api.prototype.registerEvent = function(featureName, eventName) {
+            var self = this;
+            if (!self[featureName]) {
+                self[featureName] = {};
+            }
+
+            var feature = self[featureName];
+            if (!feature.on) {
+                feature.on = {};
+                feature.raise = {};
+                feature.raisePromise = {};
+            }
+
+            var eventId = 'event:api:' + this.apiId + ':' + featureName + ':' + eventName;
+
+            // Creating raise event method: featureName.raise.eventName
+            feature.raise[eventName] = function() {
+              $rootScope.$emit.apply($rootScope, [eventId].concat(Array.prototype.slice.call(arguments)));
+            };
+
+            // Creating raise that return a promise event method: featureName.raisePromise.eventName
+            feature.raisePromise[eventName] = function() {
+              // If no listener: continue
+              var listenerCount = $rootScope.$$listenerCount[eventId];
+              if (!listenerCount) {
+                return $q.when();
+              }
+              // Add promise reject/resolve has last arguments
+              var deferred = $q.defer();
+                // If more than one listener : create a buffered defferred
+              if (listenerCount > 1) {
+                  deferred = {
+                      promise: deferred.promise,
+                      notify: deferred.notify,
+                      raw: deferred,
+                      count: 0 ,
+                      errors: [],
+                      results: []
+                  };
+                  deferred.checkFinish = function() {
+                    if (deferred.count < listenerCount) return;
+                    deferred.count = 0;
+                    if (deferred.errors.length) {
+                        if (deferred.errors.length == 1) {
+                            deferred.raw.reject(deferred.errors[0]);
+                        }
+                        else {
+                            deferred.raw.reject(deferred.errors);
+                        }
+                        deferred.errors = [];
+                    }
+                    else {
+                        deferred.raw.resolve(deferred.results);
+                        deferred.results = [];
+                    }
+                  };
+                  deferred.resolve = function(result) {
+                      deferred.results.push(result);
+                      deferred.count++;
+                      deferred.checkFinish();
+                  };
+                  deferred.reject = function(err) {
+                      deferred.errors.push(err);
+                      deferred.count++;
+                      deferred.checkFinish();
+                  };
+              }
+
+              var eventArgs = [eventId].concat(Array.prototype.slice.call(arguments)).concat([deferred]);
+              $rootScope.$emit.apply($rootScope, eventArgs);
+              return deferred.promise;
+            };
+
+            // Creating on event method: featureName.oneventName
+            feature.on[eventName] = function(scope, handler, _this) {
+                var deregAngularOn = registerEventWithAngular(eventId, handler, self.gantt, _this);
+
+                var listener = {
+                    handler: handler,
+                    dereg: deregAngularOn,
+                    eventId: eventId,
+                    scope: scope,
+                    _this: _this
+                };
+                self.eventListeners.push(listener);
+
+                var removeListener = function() {
+                    listener.dereg();
+                    var index = self.eventListeners.indexOf(listener);
+                    self.eventListeners.splice(index, 1);
+                };
+
+                scope.$on('$destroy', function() {
+                    removeListener();
+                });
+
+                return removeListener;
+            };
+        };
+
+        function registerEventWithAngular(eventId, handler, app, _this) {
+            return $rootScope.$on(eventId, function() {
+                var args = Array.prototype.slice.call(arguments);
+                args.splice(0, 1); // Remove evt argument
+                handler.apply(_this ? _this : app, args);
+            });
+        }
+
+        /**
+         * Used to execute a function while disabling the specified event listeners.
+         * Disables the listenerFunctions, executes the callbackFn, and then enables the listenerFunctions again
+         *
+         * @listenerFuncs: Listener function or array of listener functions to suppress. These must be the same
+         * @functions that were used in the .on.eventName method
+         * @callBackFn: Function to execute with surpressed events
+         *
+         * Example:
+         *    var clicked = function (){
+         *       // Button clicked event handler
+         *    }
+         *
+         *    api.suppressEvents(clicked, function() {
+         *       // No clicked events will be fired
+         *       api.ui.form.main.submit.click(scope);
+         *    });
+         */
+        Api.prototype.hasListeners = function(listenerFuncs, callBackFn) {
+            var self = this;
+            var listeners = angular.isArray(listenerFuncs) ? listenerFuncs : [listenerFuncs];
+
+            var foundListeners = [];
+            listeners.forEach(function(l) {
+                foundListeners = self.eventListeners.filter(function(lstnr) {
+                    return l === lstnr.handler;
+                });
+            });
+
+            foundListeners.forEach(function(l) {
+                l.dereg();
+            });
+
+            callBackFn();
+
+            foundListeners.forEach(function(l) {
+                l.dereg = registerEventWithAngular(l.eventId, l.handler, self.gantt, l._this);
+            });
+
+        };
+
+        /**
+         * Registers a new event for the given feature
+         *
+         * @featureName: Name of the feature
+         * @methodName: Name of the method
+         * @callBackFn: Function to execute
+         * @_this: Binds callBackFn 'this' to _this. Defaults to Api.app
+         */
+        Api.prototype.registerMethod = function(featureName, methodName, callBackFn, _this) {
+            if (!this[featureName]) {
+                this[featureName] = {};
+            }
+
+            var feature = this[featureName];
+            feature[methodName] = function() {
+                callBackFn.apply(_this || this.app, arguments);
+            };
+        };
+
+        return Api;
+    }]);
+})(window, window.angular);
+
+
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t("undefined"==typeof angular?require("angular"):angular):"function"==typeof define&&define.amd?define("angular-cache",["angular"],t):e.angularCacheModuleName=t(e.angular)}(this,function(e){"use strict";function t(e,t){if(e||(e=function(e){return e}),t||(t=function(e,t){return e===t}),"function"!=typeof e)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "weightFunc" must be a function!');if("function"!=typeof t)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "compareFunc" must be a function!');this.weightFunc=e,this.compareFunc=t,this.heap=[]}function r(e){var t=[],r=void 0;if(!d.isObject(e))return t;for(r in e)e.hasOwnProperty(r)&&t.push(r);return t}function i(e){return e&&"function"==typeof e.then}function s(e){return d.isNumber(e)?e.toString():e}function n(e){var t={},r=void 0;if(!d.isObject(e))return t;for(r in e)e.hasOwnProperty(r)&&(t[r]=r);return t}function o(e,o){if(e in g)throw new Error(e+" already exists!");if(!d.isString(e))throw new Error("cacheId must be a string!");var a={},c={},l=null,h=new t(function(e){return e.expires},d.equals),f=new t(function(e){return e.accessed},d.equals),p=g[e]={$$id:e,destroy:function(){clearInterval(this.$$cacheFlushIntervalId),clearInterval(this.$$recycleFreqId),this.removeAll(),l&&(l().removeItem(this.$$prefix+".keys"),l().removeItem(this.$$prefix)),l=null,a=null,f=null,h=null,this.$$prefix=null,delete g[this.$$id]},disable:function(){this.$$disabled=!0},enable:function(){delete this.$$disabled},get:function(e,t){var r=this;if(Array.isArray(e)){var i=function(){var i=e,s=[];return i.forEach(function(e){var i=r.get(e,t);null!==i&&void 0!==i&&s.push(i)}),{v:s}}();if("object"===("undefined"==typeof i?"undefined":u["typeof"](i)))return i.v}else if(e=s(e),this.$$disabled)return;if(t=t||{},!d.isString(e))throw new Error("key must be a string!");if(t&&!d.isObject(t))throw new Error("options must be an object!");if(t.onExpire&&!d.isFunction(t.onExpire))throw new Error("options.onExpire must be a function!");var n=void 0;if(l){if(c[e])return c[e];var o=l().getItem(this.$$prefix+".data."+e);if(!o)return;n=d.fromJson(o)}else if(d.isObject(a)){if(!(e in a))return;n=a[e]}var h=n.value,p=(new Date).getTime();return l?(f.remove({key:e,accessed:n.accessed}),n.accessed=p,f.push({key:e,accessed:p})):(f.remove(n),n.accessed=p,f.push(n)),"passive"===this.$$deleteOnExpire&&"expires"in n&&n.expires<p?(this.remove(e),this.$$onExpire?this.$$onExpire(e,n.value,t.onExpire):t.onExpire&&t.onExpire.call(this,e,n.value),h=void 0):l&&l().setItem(this.$$prefix+".data."+e,JSON.stringify(n)),h},info:function(e){if(e){var t=void 0;if(l){var r=l().getItem(this.$$prefix+".data."+e);return r?(t=d.fromJson(r),{created:t.created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}):void 0}return d.isObject(a)&&e in a?(t=a[e],{created:t.created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}):void 0}return{id:this.$$id,capacity:this.$$capacity,maxAge:this.$$maxAge,deleteOnExpire:this.$$deleteOnExpire,onExpire:this.$$onExpire,cacheFlushInterval:this.$$cacheFlushInterval,recycleFreq:this.$$recycleFreq,storageMode:this.$$storageMode,storageImpl:l?l():void 0,disabled:!!this.$$disabled,size:f&&f.size()||0}},keys:function(){if(l){var e=l().getItem(this.$$prefix+".keys");return e?d.fromJson(e):[]}return r(a)},keySet:function(){if(l){var e=l().getItem(this.$$prefix+".keys"),t={};if(e)for(var r=d.fromJson(e),i=0;i<r.length;i++)t[r[i]]=r[i];return t}return n(a)},put:function(e,t,r){var n=this;r||(r={});var o="storeOnResolve"in r?!!r.storeOnResolve:this.$$storeOnResolve,u="storeOnReject"in r?!!r.storeOnReject:this.$$storeOnReject,p=function(t,r){return function(i){if(t&&(delete c[e],d.isObject(i)&&"status"in i&&"data"in i?(i=[i.status,i.data,i.headers(),i.statusText],n.put(e,i)):n.put(e,i)),r){if(d.Promise)return d.Promise.reject(i);throw i}return i}};if(!this.$$disabled&&d.isObject(a)&&null!==t&&void 0!==t){if(e=s(e),!d.isString(e))throw new Error("key must be a string!");var m=(new Date).getTime(),$={key:e,value:i(t)?t.then(p(o,!1),p(u,!0)):t,created:void 0===r.created?m:r.created,accessed:void 0===r.accessed?m:r.accessed};if(r.maxAge&&($.maxAge=r.maxAge),void 0===r.expires?$.expires=$.created+($.maxAge||this.$$maxAge):$.expires=r.expires,l){if(i($.value))return c[e]=$.value,c[e];var v=l().getItem(this.$$prefix+".keys"),g=v?d.fromJson(v):[],y=l().getItem(this.$$prefix+".data."+e);y&&this.remove(e),h.push({key:e,expires:$.expires}),f.push({key:e,accessed:$.accessed}),l().setItem(this.$$prefix+".data."+e,JSON.stringify($));for(var x=!1,b=0;b<g.length;b++)if(g[b]===e){x=!0;break}x||g.push(e),l().setItem(this.$$prefix+".keys",JSON.stringify(g))}else a[e]&&this.remove(e),h.push($),f.push($),a[e]=$,delete c[e];return f.size()>this.$$capacity&&this.remove(f.peek().key),t}},remove:function(e){if(e+="",delete c[e],l){var t=l().getItem(this.$$prefix+".data."+e);if(t){var r=d.fromJson(t);f.remove({key:e,accessed:r.accessed}),h.remove({key:e,expires:r.expires}),l().removeItem(this.$$prefix+".data."+e);var i=l().getItem(this.$$prefix+".keys"),s=i?d.fromJson(i):[],n=s.indexOf(e);return n>=0&&s.splice(n,1),l().setItem(this.$$prefix+".keys",JSON.stringify(s)),r.value}}else if(d.isObject(a)){var o=a[e]?a[e].value:void 0;return f.remove(a[e]),h.remove(a[e]),a[e]=null,delete a[e],o}},removeAll:function(){if(l){f.removeAll(),h.removeAll();var e=l().getItem(this.$$prefix+".keys");if(e)for(var t=d.fromJson(e),r=0;r<t.length;r++)this.remove(t[r]);l().setItem(this.$$prefix+".keys",JSON.stringify([]))}else if(d.isObject(a)){f.removeAll(),h.removeAll();for(var i in a)a[i]=null;a={}}else f.removeAll(),h.removeAll(),a={};c={}},removeExpired:function(){for(var e=(new Date).getTime(),t={},r=void 0,i=void 0;(i=h.peek())&&i.expires<=e;)t[i.key]=i.value?i.value:null,h.pop();if(l)for(r in t){var s=l().getItem(this.$$prefix+".data."+r);s&&(t[r]=d.fromJson(s).value,this.remove(r))}else for(r in t)this.remove(r);if(this.$$onExpire)for(r in t)this.$$onExpire(r,t[r]);return t},setCacheFlushInterval:function(e){var t=this;if(null===e)delete t.$$cacheFlushInterval;else{if(!d.isNumber(e))throw new Error("cacheFlushInterval must be a number!");if(0>e)throw new Error("cacheFlushInterval must be greater than zero!");e!==t.$$cacheFlushInterval&&(t.$$cacheFlushInterval=e,clearInterval(t.$$cacheFlushIntervalId),t.$$cacheFlushIntervalId=setInterval(function(){t.removeAll()},t.$$cacheFlushInterval))}},setCapacity:function(e){if(null===e)delete this.$$capacity;else{if(!d.isNumber(e))throw new Error("capacity must be a number!");if(0>e)throw new Error("capacity must be greater than zero!");this.$$capacity=e}for(var t={};f.size()>this.$$capacity;)t[f.peek().key]=this.remove(f.peek().key);return t},setDeleteOnExpire:function(e,t){if(null===e)delete this.$$deleteOnExpire;else{if(!d.isString(e))throw new Error("deleteOnExpire must be a string!");if("none"!==e&&"passive"!==e&&"aggressive"!==e)throw new Error('deleteOnExpire must be "none", "passive" or "aggressive"!');this.$$deleteOnExpire=e}t!==!1&&this.setRecycleFreq(this.$$recycleFreq)},setMaxAge:function(e){if(null===e)this.$$maxAge=Number.MAX_VALUE;else{if(!d.isNumber(e))throw new Error("maxAge must be a number!");if(0>e)throw new Error("maxAge must be greater than zero!");this.$$maxAge=e}var t=void 0,i=void 0,s=void 0;if(h.removeAll(),l){var n=l().getItem(this.$$prefix+".keys");for(i=n?d.fromJson(n):[],t=0;t<i.length;t++){s=i[t];var o=l().getItem(this.$$prefix+".data."+s);if(o){var c=d.fromJson(o);this.$$maxAge===Number.MAX_VALUE?c.expires=Number.MAX_VALUE:c.expires=c.created+(c.maxAge||this.$$maxAge),h.push({key:s,expires:c.expires})}}}else for(i=r(a),t=0;t<i.length;t++)s=i[t],this.$$maxAge===Number.MAX_VALUE?a[s].expires=Number.MAX_VALUE:a[s].expires=a[s].created+(a[s].maxAge||this.$$maxAge),h.push(a[s]);return"aggressive"===this.$$deleteOnExpire?this.removeExpired():{}},setOnExpire:function(e){if(null===e)delete this.$$onExpire;else{if(!d.isFunction(e))throw new Error("onExpire must be a function!");this.$$onExpire=e}},setOptions:function(e,t){if(e=e||{},t=!!t,!d.isObject(e))throw new Error("cacheOptions must be an object!");"storagePrefix"in e?this.$$storagePrefix=e.storagePrefix:t&&(this.$$storagePrefix=v.storagePrefix),this.$$prefix=this.$$storagePrefix+this.$$id,"disabled"in e?this.$$disabled=!!e.disabled:t&&(this.$$disabled=v.disabled),"deleteOnExpire"in e?this.setDeleteOnExpire(e.deleteOnExpire,!1):t&&this.setDeleteOnExpire(v.deleteOnExpire,!1),"recycleFreq"in e?this.setRecycleFreq(e.recycleFreq):t&&this.setRecycleFreq(v.recycleFreq),"maxAge"in e?this.setMaxAge(e.maxAge):t&&this.setMaxAge(v.maxAge),"storeOnResolve"in e?this.$$storeOnResolve=!!e.storeOnResolve:t&&(this.$$storeOnResolve=v.storeOnResolve),"storeOnReject"in e?this.$$storeOnReject=!!e.storeOnReject:t&&(this.$$storeOnReject=v.storeOnReject),"capacity"in e?this.setCapacity(e.capacity):t&&this.setCapacity(v.capacity),"cacheFlushInterval"in e?this.setCacheFlushInterval(e.cacheFlushInterval):t&&this.setCacheFlushInterval(v.cacheFlushInterval),"onExpire"in e?this.setOnExpire(e.onExpire):t&&this.setOnExpire(v.onExpire),"storageMode"in e||"storageImpl"in e?this.setStorageMode(e.storageMode||v.storageMode,e.storageImpl||v.storageImpl):t&&this.setStorageMode(v.storageMode,v.storageImpl)},setRecycleFreq:function(e){if(null===e)delete this.$$recycleFreq;else{if(!d.isNumber(e))throw new Error("recycleFreq must be a number!");if(0>e)throw new Error("recycleFreq must be greater than zero!");this.$$recycleFreq=e}clearInterval(this.$$recycleFreqId),"aggressive"===this.$$deleteOnExpire?!function(e){e.$$recycleFreqId=setInterval(function(){e.removeExpired()},e.$$recycleFreq)}(this):delete this.$$recycleFreqId},setStorageMode:function(e,t){function r(e,t){var r=this.keys(),i=r.length;if(i){for(var s=void 0,a=d.isObject(t),c=0;i>c;c++){if(s=r[c],e){var l=e().getItem(this.$$prefix+".data."+s);l&&(o[s]=d.fromJson(l))}else a&&(o[s]=t[s]);this.remove(s)}n=!0}}if(!d.isString(e))throw new Error("storageMode must be a string!");if("memory"!==e&&"localStorage"!==e&&"sessionStorage"!==e)throw new Error('storageMode must be "memory", "localStorage" or "sessionStorage"!');var i=l,s=a,n=!1,o={};if(this.$$initializing||r.call(this,i,s),this.$$storageMode=e,t){if(!d.isObject(t))throw new Error("storageImpl must be an object!");if(!("setItem"in t&&"function"==typeof t.setItem))throw new Error('storageImpl must implement "setItem(key, value)"!');if(!("getItem"in t&&"function"==typeof t.getItem))throw new Error('storageImpl must implement "getItem(key)"!');if(!("removeItem"in t)||"function"!=typeof t.removeItem)throw new Error('storageImpl must implement "removeItem(key)"!');l=function(){return t}}else if("localStorage"===this.$$storageMode)try{localStorage.setItem("cachefactory","cachefactory"),localStorage.removeItem("cachefactory"),l=function(){return localStorage}}catch(c){l=null,this.$$storageMode="memory"}else if("sessionStorage"===this.$$storageMode)try{sessionStorage.setItem("cachefactory","cachefactory"),sessionStorage.removeItem("cachefactory"),l=function(){return sessionStorage}}catch(c){l=null,this.$$storageMode="memory"}else l=null,this.$$storageMode="memory";if(this.$$initializing&&r.call(this,l,a),n){var u=void 0;for(var h in o)u=o[h],this.put(h,u.value,{created:u.created,accessed:u.accessed,expires:u.expires})}},touch:function(e,t){var r=this;if(e){var i=this.get(e,{onExpire:function(e,t){return r.put(e,t)}});i&&this.put(e,i,t)}else for(var s=this.keys(),n=0;n<s.length;n++)this.touch(s[n],t)},values:function(){for(var e=this.keys(),t=[],r=0;r<e.length;r++)t.push(this.get(e[r]));return t}};return p.$$initializing=!0,p.setOptions(o,!0),p.$$initializing=!1,p}function a(e,t){return o(e,t)}function c(){this.$get=function(){return a.BinaryHeap}}function l(){this.defaults=a.defaults,this.defaults.storagePrefix="angular-cache.caches.",this.$get=["$q",function(e){return a.utils.Promise=e,a}]}e="default"in e?e["default"]:e;var u={};u["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var h=function(e,t,r){for(var i=e[r],s=t(i);r>0;){var n=Math.floor((r+1)/2)-1,o=e[n];if(s>=t(o))break;e[n]=i,e[r]=o,r=n}},f=function(e,t,r){for(var i=e.length,s=e[r],n=t(s);;){var o=2*(r+1),a=o-1,c=null;if(i>a){var l=e[a],u=t(l);n>u&&(c=a)}if(i>o){var h=e[o],f=t(h);f<(null===c?n:t(e[a]))&&(c=o)}if(null===c)break;e[r]=e[c],e[c]=s,r=c}},p=t.prototype;p.push=function(e){this.heap.push(e),h(this.heap,this.weightFunc,this.heap.length-1)},p.peek=function(){return this.heap[0]},p.pop=function(){var e=this.heap[0],t=this.heap.pop();return this.heap.length>0&&(this.heap[0]=t,f(this.heap,this.weightFunc,0)),e},p.remove=function(e){for(var t=this.heap.length,r=0;t>r;r++)if(this.compareFunc(this.heap[r],e)){var i=this.heap[r],s=this.heap.pop();return r!==t-1&&(this.heap[r]=s,h(this.heap,this.weightFunc,r),f(this.heap,this.weightFunc,r)),i}return null},p.removeAll=function(){this.heap=[]},p.size=function(){return this.heap.length};var m=null;try{m=window.Promise}catch($){}var d={isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isObject:function(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":u["typeof"](e))},isFunction:function(e){return"function"==typeof e},fromJson:function(e){return JSON.parse(e)},equals:function(e,t){return e===t},Promise:m},v={capacity:Number.MAX_VALUE,maxAge:Number.MAX_VALUE,deleteOnExpire:"none",onExpire:null,cacheFlushInterval:null,recycleFreq:1e3,storageMode:"memory",storageImpl:null,disabled:!1,storagePrefix:"cachefactory.caches.",storeOnResolve:!1,storeOnReject:!1},g={};a.createCache=o,a.defaults=v,a.info=function(){var e=r(g),t={size:e.length,caches:{}};for(var i in v)v.hasOwnProperty(i)&&(t[i]=v[i]);for(var s=0;s<e.length;s++){var n=e[s];t.caches[n]=g[n].info()}return t},a.get=function(e){return g[e]},a.keySet=function(){return n(g)},a.keys=function(){return r(g)},a.destroy=function(e){g[e]&&(g[e].destroy(),delete g[e])},a.destroyAll=function(){for(var e in g)g[e].destroy();g={}},a.clearAll=function(){for(var e in g)g[e].removeAll()},a.removeExpiredFromAll=function(){var e={};for(var t in g)e[t]=g[t].removeExpired();return e},a.enableAll=function(){for(var e in g)g[e].$$disabled=!1},a.disableAll=function(){for(var e in g)g[e].$$disabled=!0},a.touchAll=function(){for(var e in g)g[e].touch()},a.utils=d,a.BinaryHeap=t,a.utils.equals=e.equals,a.utils.isObject=e.isObject,a.utils.fromJson=e.fromJson,e.module("angular-cache",[]).provider("BinaryHeap",c).provider("CacheFactory",l);var y="angular-cache";return y});
+//# sourceMappingURL=angular-cache.min.map
+!function(){"use strict";function n(){this.config={},this.$get=function(){return{config:this.config}}}function t(n,t,e,i,a){function r(n){return angular.isString(n)?(n=n.split(/\s*,\s*/),n.some(function(n){return t.matchMedia(v[n]).matches?!0:void 0})):void 0}function c(t,e){var i=null,a=r(t),c={active:a,unbind:null};if(!g){e=e||n;var u=e.$on("screenmatch::resize",function(){i=a,a=r(t),i!==a&&(c.active=a)});c.unbind=function(){u()}}return c}function u(t,e,a){var c=!1,u=null,o=r(t);if(angular.isFunction(e)&&(o&&(c=!0,i(function(){e()})),!g&&!c)){a=a||n;var s=a.$on("screenmatch::resize",function(){u=o,o=r(t),o&&u!==o&&(c=!0,i(function(){e()})),c&&s()})}}function o(t,e,a,c){var u=null,o=r(t);if(angular.isUndefined(c)&&!angular.isUndefined(a)&&(angular.isFunction(a)||(c=a,a=void 0)),angular.isFunction(e)&&(angular.isFunction(a)||angular.isUndefined(a))&&(o?i(function(){e()}):a&&i(function(){a()}),!g)){c=c||n;var s=c.$on("screenmatch::resize",function(){u=o,o=r(t),u!==o&&(o?i(function(){e()}):a&&i(function(){a()}))}),l={cancel:s};return l}}function s(){if(v=angular.isObject(f)&&!angular.equals({},f)?f:p[f]||p.bootstrap,!angular.equals({},m)&&angular.isObject(m)){var n={};angular.forEach(m,function(t,e){angular.isString(t)&&(n[e]=t)}),angular.extend(v,n)}}function l(){var i=angular.element(t),a=!1;i.on("resize",function(){if(!a)var t=e(function(){n.$broadcast("screenmatch::resize",!0),a&&(e.cancel(t),a=!1)},h);a=!0})}function d(){s(),g||l()}var f=a.config.rules,m=a.config.extraRules||{},g=a.config.nobind||!1,h=a.config.debounce||250,p={bootstrap:{lg:"(min-width: 1200px)",md:"(min-width: 992px) and (max-width: 1199px)",sm:"(min-width: 768px) and (max-width: 991px)",xs:"(max-width: 767px)"},matchmedia:{print:"print",screen:"screen",phone:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 991px)",desktop:"(min-width: 992px)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"}},v={},x={is:r,bind:c,once:u,when:o};return d(),x}function e(n,t){function e(n,e,a){var r=a.asmScreen,c=t.bind(r,n);a.ngIf=function(){return c.active},i.link.apply(i,arguments)}var i=n[0],a={link:e,terminal:i.terminal,transclude:i.transclude,priority:i.priority,restrict:i.restrict};return a}function i(n){var t=angular.isUndefined(n.matchMedia)||!angular.isFunction(n.matchMedia("all").addListener);t&&(n.matchMedia=function(){var t=n.styleMedia||n.media;if(!t){var e=document.createElement("style"),i=document.getElementsByTagName("script")[0],a=null;e.type="text/css",e.id="matchmediajs-test",i.parentNode.insertBefore(e,i),a="getComputedStyle"in n&&n.getComputedStyle(e,null)||e.currentStyle,t={matchMedium:function(n){var t="@media "+n+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=t:e.textContent=t,"1px"===a.width}}}return function(n){return{matches:t.matchMedium(n||"all"),media:n||"all"}}}())}angular.module("angular.screenmatch",[]).run(i).provider("screenmatchConfig",n).factory("screenmatch",t).directive("asmScreen",e),t.$inject=["$rootScope","$window","$interval","$timeout","screenmatchConfig"],e.$inject=["ngIfDirective","screenmatch"],i.$inject=["$window"]}();
+!function(){"use strict";function t(t,n){function e(n,e,i){e!==i&&t.$broadcast("$$rebind::"+n)}Object.keys(n).forEach(function(i){t.$watch(n[i],e.bind(null,i),"object"==typeof t[n[i]])})}function n(t,n){function e(t,e){n.forEach(function(n){t.$on("$$rebind::"+n,e)})}function i(t,n,i,r,o){var c=t.bind(this,n,i,r,o);return e(n,c),c()}if(t.$$watchDelegate.wrapped)return t.$$watchDelegate;var r=i.bind(this,t.$$watchDelegate);return r.wrapped=!0,r}function e(t){function e(t,e,i){function r(t,r,o){var c,f,a,u,s;if("string"!=typeof r||!e.test(r))return t.call(this,r,o);for(c=r.split(":"),s=[];c.length;)if(f=c.shift(),f&&f.trim()){if(!i.test(f)){u=[f].concat(c).join(":");break}s.push(f)}return u||(u=s.splice(-1,1)[0]),a=t.call(this,"::"+u,o),a.$$watchDelegate=n(a,s),a}return r.bind(null,t)}e.$inject=["$delegate","bindNotifierRegex","bindNotifierKeyRegex"],t.decorator("$parse",e)}function i(){return{restrict:"A",scope:!0,compile:function(n,e){var i={},r=e.bindNotifier.replace(/[\{\}\s]/g,"").split(",");return r.forEach(function(t){var n=t.split(":");i[n[0]]=n[1]}),function(n){t(n,i)}}}}function r(){return function(n,e){if(!n)throw new Error("No $scope given");if(!e)throw new Error("No notifier object given");t(n,e)}}e.$inject=["$provide"],angular.module("angular.bind.notifier",[]).constant("bindNotifierKeyRegex",/^[a-zA-Z0-9][\w-]*$/).constant("bindNotifierRegex",/^[\s]*:([a-zA-Z0-9][\w-]*):(.+\n?)+$/).factory("$Notifier",r).directive("bindNotifier",i).config(e)}();
+/**
+ * AngularJS Directive - Image Crop v1.1.0
+ * Copyright (c) 2014 Andy Shora, andyshora@gmail.com, andyshora.com
+ * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
+ */
+(function() {
+
+  /*
+   * DEPENDENCY
+   * Javascript BinaryFile
+   * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
+   * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
+   */
+
+  var BinaryFile = function(strData, iDataOffset, iDataLength) {
+      var data = strData;
+      var dataOffset = iDataOffset || 0;
+      var dataLength = 0;
+
+      this.getRawData = function() {
+          return data;
+      }
+
+      if (typeof strData == "string") {
+          dataLength = iDataLength || data.length;
+
+          this.getByteAt = function(iOffset) {
+              return data.charCodeAt(iOffset + dataOffset) & 0xFF;
+          }
+
+          this.getBytesAt = function(iOffset, iLength) {
+              var aBytes = [];
+
+              for (var i = 0; i < iLength; i++) {
+                  aBytes[i] = data.charCodeAt((iOffset + i) + dataOffset) & 0xFF
+              }
+              ;
+
+              return aBytes;
+          }
+      } else if (typeof strData == "unknown") {
+          dataLength = iDataLength || IEBinary_getLength(data);
+
+          this.getByteAt = function(iOffset) {
+              return IEBinary_getByteAt(data, iOffset + dataOffset);
+          }
+
+          this.getBytesAt = function(iOffset, iLength) {
+              return new VBArray(IEBinary_getBytesAt(data, iOffset + dataOffset, iLength)).toArray();
+          }
+      }
+
+      this.getLength = function() {
+          return dataLength;
+      }
+
+      this.getSByteAt = function(iOffset) {
+          var iByte = this.getByteAt(iOffset);
+          if (iByte > 127)
+              return iByte - 256;
+          else
+              return iByte;
+      }
+
+      this.getShortAt = function(iOffset, bBigEndian) {
+          var iShort = bBigEndian ?
+                  (this.getByteAt(iOffset) << 8) + this.getByteAt(iOffset + 1)
+                  : (this.getByteAt(iOffset + 1) << 8) + this.getByteAt(iOffset)
+          if (iShort < 0)
+              iShort += 65536;
+          return iShort;
+      }
+      this.getSShortAt = function(iOffset, bBigEndian) {
+          var iUShort = this.getShortAt(iOffset, bBigEndian);
+          if (iUShort > 32767)
+              return iUShort - 65536;
+          else
+              return iUShort;
+      }
+      this.getLongAt = function(iOffset, bBigEndian) {
+          var iByte1 = this.getByteAt(iOffset),
+                  iByte2 = this.getByteAt(iOffset + 1),
+                  iByte3 = this.getByteAt(iOffset + 2),
+                  iByte4 = this.getByteAt(iOffset + 3);
+
+          var iLong = bBigEndian ?
+                  (((((iByte1 << 8) + iByte2) << 8) + iByte3) << 8) + iByte4
+                  : (((((iByte4 << 8) + iByte3) << 8) + iByte2) << 8) + iByte1;
+          if (iLong < 0)
+              iLong += 4294967296;
+          return iLong;
+      }
+      this.getSLongAt = function(iOffset, bBigEndian) {
+          var iULong = this.getLongAt(iOffset, bBigEndian);
+          if (iULong > 2147483647)
+              return iULong - 4294967296;
+          else
+              return iULong;
+      }
+
+      this.getStringAt = function(iOffset, iLength) {
+          var aStr = [];
+
+          var aBytes = this.getBytesAt(iOffset, iLength);
+          for (var j = 0; j < iLength; j++) {
+              aStr[j] = String.fromCharCode(aBytes[j]);
+          }
+          return aStr.join("");
+      }
+
+      this.getCharAt = function(iOffset) {
+          return String.fromCharCode(this.getByteAt(iOffset));
+      }
+      this.toBase64 = function() {
+          return window.btoa(data);
+      }
+      this.fromBase64 = function(strBase64) {
+          data = window.atob(strBase64);
+      }
+  };
+  /*
+   * DEPENDENCY
+   * Javascript EXIF Reader 0.1.6
+   * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
+   * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
+   */
+  var EXIF = (function() {
+
+      var debug = false;
+
+      var ExifTags = {
+
+          // version tags
+          0x9000: "ExifVersion", // EXIF version
+          0xA000: "FlashpixVersion", // Flashpix format version
+
+          // colorspace tags
+          0xA001: "ColorSpace", // Color space information tag
+
+          // image configuration
+          0xA002: "PixelXDimension", // Valid width of meaningful image
+          0xA003: "PixelYDimension", // Valid height of meaningful image
+          0x9101: "ComponentsConfiguration", // Information about channels
+          0x9102: "CompressedBitsPerPixel", // Compressed bits per pixel
+
+          // user information
+          0x927C: "MakerNote", // Any desired information written by the manufacturer
+          0x9286: "UserComment", // Comments by user
+
+          // related file
+          0xA004: "RelatedSoundFile", // Name of related sound file
+
+          // date and time
+          0x9003: "DateTimeOriginal", // Date and time when the original image was generated
+          0x9004: "DateTimeDigitized", // Date and time when the image was stored digitally
+          0x9290: "SubsecTime", // Fractions of seconds for DateTime
+          0x9291: "SubsecTimeOriginal", // Fractions of seconds for DateTimeOriginal
+          0x9292: "SubsecTimeDigitized", // Fractions of seconds for DateTimeDigitized
+
+          // picture-taking conditions
+          0x829A: "ExposureTime", // Exposure time (in seconds)
+          0x829D: "FNumber", // F number
+          0x8822: "ExposureProgram", // Exposure program
+          0x8824: "SpectralSensitivity", // Spectral sensitivity
+          0x8827: "ISOSpeedRatings", // ISO speed rating
+          0x8828: "OECF", // Optoelectric conversion factor
+          0x9201: "ShutterSpeedValue", // Shutter speed
+          0x9202: "ApertureValue", // Lens aperture
+          0x9203: "BrightnessValue", // Value of brightness
+          0x9204: "ExposureBias", // Exposure bias
+          0x9205: "MaxApertureValue", // Smallest F number of lens
+          0x9206: "SubjectDistance", // Distance to subject in meters
+          0x9207: "MeteringMode", // Metering mode
+          0x9208: "LightSource", // Kind of light source
+          0x9209: "Flash", // Flash status
+          0x9214: "SubjectArea", // Location and area of main subject
+          0x920A: "FocalLength", // Focal length of the lens in mm
+          0xA20B: "FlashEnergy", // Strobe energy in BCPS
+          0xA20C: "SpatialFrequencyResponse", //
+          0xA20E: "FocalPlaneXResolution", // Number of pixels in width direction per FocalPlaneResolutionUnit
+          0xA20F: "FocalPlaneYResolution", // Number of pixels in height direction per FocalPlaneResolutionUnit
+          0xA210: "FocalPlaneResolutionUnit", // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
+          0xA214: "SubjectLocation", // Location of subject in image
+          0xA215: "ExposureIndex", // Exposure index selected on camera
+          0xA217: "SensingMethod", // Image sensor type
+          0xA300: "FileSource", // Image source (3 == DSC)
+          0xA301: "SceneType", // Scene type (1 == directly photographed)
+          0xA302: "CFAPattern", // Color filter array geometric pattern
+          0xA401: "CustomRendered", // Special processing
+          0xA402: "ExposureMode", // Exposure mode
+          0xA403: "WhiteBalance", // 1 = auto white balance, 2 = manual
+          0xA404: "DigitalZoomRation", // Digital zoom ratio
+          0xA405: "FocalLengthIn35mmFilm", // Equivalent foacl length assuming 35mm film camera (in mm)
+          0xA406: "SceneCaptureType", // Type of scene
+          0xA407: "GainControl", // Degree of overall image gain adjustment
+          0xA408: "Contrast", // Direction of contrast processing applied by camera
+          0xA409: "Saturation", // Direction of saturation processing applied by camera
+          0xA40A: "Sharpness", // Direction of sharpness processing applied by camera
+          0xA40B: "DeviceSettingDescription", //
+          0xA40C: "SubjectDistanceRange", // Distance to subject
+
+          // other tags
+          0xA005: "InteroperabilityIFDPointer",
+          0xA420: "ImageUniqueID"   // Identifier assigned uniquely to each image
+      };
+
+      var TiffTags = {
+          0x0100: "ImageWidth",
+          0x0101: "ImageHeight",
+          0x8769: "ExifIFDPointer",
+          0x8825: "GPSInfoIFDPointer",
+          0xA005: "InteroperabilityIFDPointer",
+          0x0102: "BitsPerSample",
+          0x0103: "Compression",
+          0x0106: "PhotometricInterpretation",
+          0x0112: "Orientation",
+          0x0115: "SamplesPerPixel",
+          0x011C: "PlanarConfiguration",
+          0x0212: "YCbCrSubSampling",
+          0x0213: "YCbCrPositioning",
+          0x011A: "XResolution",
+          0x011B: "YResolution",
+          0x0128: "ResolutionUnit",
+          0x0111: "StripOffsets",
+          0x0116: "RowsPerStrip",
+          0x0117: "StripByteCounts",
+          0x0201: "JPEGInterchangeFormat",
+          0x0202: "JPEGInterchangeFormatLength",
+          0x012D: "TransferFunction",
+          0x013E: "WhitePoint",
+          0x013F: "PrimaryChromaticities",
+          0x0211: "YCbCrCoefficients",
+          0x0214: "ReferenceBlackWhite",
+          0x0132: "DateTime",
+          0x010E: "ImageDescription",
+          0x010F: "Make",
+          0x0110: "Model",
+          0x0131: "Software",
+          0x013B: "Artist",
+          0x8298: "Copyright"
+      };
+
+      var GPSTags = {
+          0x0000: "GPSVersionID",
+          0x0001: "GPSLatitudeRef",
+          0x0002: "GPSLatitude",
+          0x0003: "GPSLongitudeRef",
+          0x0004: "GPSLongitude",
+          0x0005: "GPSAltitudeRef",
+          0x0006: "GPSAltitude",
+          0x0007: "GPSTimeStamp",
+          0x0008: "GPSSatellites",
+          0x0009: "GPSStatus",
+          0x000A: "GPSMeasureMode",
+          0x000B: "GPSDOP",
+          0x000C: "GPSSpeedRef",
+          0x000D: "GPSSpeed",
+          0x000E: "GPSTrackRef",
+          0x000F: "GPSTrack",
+          0x0010: "GPSImgDirectionRef",
+          0x0011: "GPSImgDirection",
+          0x0012: "GPSMapDatum",
+          0x0013: "GPSDestLatitudeRef",
+          0x0014: "GPSDestLatitude",
+          0x0015: "GPSDestLongitudeRef",
+          0x0016: "GPSDestLongitude",
+          0x0017: "GPSDestBearingRef",
+          0x0018: "GPSDestBearing",
+          0x0019: "GPSDestDistanceRef",
+          0x001A: "GPSDestDistance",
+          0x001B: "GPSProcessingMethod",
+          0x001C: "GPSAreaInformation",
+          0x001D: "GPSDateStamp",
+          0x001E: "GPSDifferential"
+      };
+
+      var StringValues = {
+          ExposureProgram: {
+              0: "Not defined",
+              1: "Manual",
+              2: "Normal program",
+              3: "Aperture priority",
+              4: "Shutter priority",
+              5: "Creative program",
+              6: "Action program",
+              7: "Portrait mode",
+              8: "Landscape mode"
+          },
+          MeteringMode: {
+              0: "Unknown",
+              1: "Average",
+              2: "CenterWeightedAverage",
+              3: "Spot",
+              4: "MultiSpot",
+              5: "Pattern",
+              6: "Partial",
+              255: "Other"
+          },
+          LightSource: {
+              0: "Unknown",
+              1: "Daylight",
+              2: "Fluorescent",
+              3: "Tungsten (incandescent light)",
+              4: "Flash",
+              9: "Fine weather",
+              10: "Cloudy weather",
+              11: "Shade",
+              12: "Daylight fluorescent (D 5700 - 7100K)",
+              13: "Day white fluorescent (N 4600 - 5400K)",
+              14: "Cool white fluorescent (W 3900 - 4500K)",
+              15: "White fluorescent (WW 3200 - 3700K)",
+              17: "Standard light A",
+              18: "Standard light B",
+              19: "Standard light C",
+              20: "D55",
+              21: "D65",
+              22: "D75",
+              23: "D50",
+              24: "ISO studio tungsten",
+              255: "Other"
+          },
+          Flash: {
+              0x0000: "Flash did not fire",
+              0x0001: "Flash fired",
+              0x0005: "Strobe return light not detected",
+              0x0007: "Strobe return light detected",
+              0x0009: "Flash fired, compulsory flash mode",
+              0x000D: "Flash fired, compulsory flash mode, return light not detected",
+              0x000F: "Flash fired, compulsory flash mode, return light detected",
+              0x0010: "Flash did not fire, compulsory flash mode",
+              0x0018: "Flash did not fire, auto mode",
+              0x0019: "Flash fired, auto mode",
+              0x001D: "Flash fired, auto mode, return light not detected",
+              0x001F: "Flash fired, auto mode, return light detected",
+              0x0020: "No flash function",
+              0x0041: "Flash fired, red-eye reduction mode",
+              0x0045: "Flash fired, red-eye reduction mode, return light not detected",
+              0x0047: "Flash fired, red-eye reduction mode, return light detected",
+              0x0049: "Flash fired, compulsory flash mode, red-eye reduction mode",
+              0x004D: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",
+              0x004F: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",
+              0x0059: "Flash fired, auto mode, red-eye reduction mode",
+              0x005D: "Flash fired, auto mode, return light not detected, red-eye reduction mode",
+              0x005F: "Flash fired, auto mode, return light detected, red-eye reduction mode"
+          },
+          SensingMethod: {
+              1: "Not defined",
+              2: "One-chip color area sensor",
+              3: "Two-chip color area sensor",
+              4: "Three-chip color area sensor",
+              5: "Color sequential area sensor",
+              7: "Trilinear sensor",
+              8: "Color sequential linear sensor"
+          },
+          SceneCaptureType: {
+              0: "Standard",
+              1: "Landscape",
+              2: "Portrait",
+              3: "Night scene"
+          },
+          SceneType: {
+              1: "Directly photographed"
+          },
+          CustomRendered: {
+              0: "Normal process",
+              1: "Custom process"
+          },
+          WhiteBalance: {
+              0: "Auto white balance",
+              1: "Manual white balance"
+          },
+          GainControl: {
+              0: "None",
+              1: "Low gain up",
+              2: "High gain up",
+              3: "Low gain down",
+              4: "High gain down"
+          },
+          Contrast: {
+              0: "Normal",
+              1: "Soft",
+              2: "Hard"
+          },
+          Saturation: {
+              0: "Normal",
+              1: "Low saturation",
+              2: "High saturation"
+          },
+          Sharpness: {
+              0: "Normal",
+              1: "Soft",
+              2: "Hard"
+          },
+          SubjectDistanceRange: {
+              0: "Unknown",
+              1: "Macro",
+              2: "Close view",
+              3: "Distant view"
+          },
+          FileSource: {
+              3: "DSC"
+          },
+          Components: {
+              0: "",
+              1: "Y",
+              2: "Cb",
+              3: "Cr",
+              4: "R",
+              5: "G",
+              6: "B"
+          }
+      };
+
+      function addEvent(element, event, handler) {
+          if (element.addEventListener) {
+              element.addEventListener(event, handler, false);
+          } else if (element.attachEvent) {
+              element.attachEvent("on" + event, handler);
+          }
+      }
+
+      function imageHasData(img) {
+          return !!(img.exifdata);
+      }
+
+      function getImageData(img, callback) {
+          BinaryAjax(img.src, function(http) {
+              var data = findEXIFinJPEG(http.binaryResponse);
+              img.exifdata = data || {};
+              if (callback) {
+                  callback.call(img)
+              }
+          });
+      }
+
+      function findEXIFinJPEG(file) {
+          if (file.getByteAt(0) != 0xFF || file.getByteAt(1) != 0xD8) {
+              return false; // not a valid jpeg
+          }
+
+          var offset = 2,
+                  length = file.getLength(),
+                  marker;
+
+          while (offset < length) {
+              if (file.getByteAt(offset) != 0xFF) {
+                  if (debug)
+                      console.log("Not a valid marker at offset " + offset + ", found: " + file.getByteAt(offset));
+                  return false; // not a valid marker, something is wrong
+              }
+
+              marker = file.getByteAt(offset + 1);
+
+              // we could implement handling for other markers here,
+              // but we're only looking for 0xFFE1 for EXIF data
+
+              if (marker == 22400) {
+                  if (debug)
+                      console.log("Found 0xFFE1 marker");
+
+                  return readEXIFData(file, offset + 4, file.getShortAt(offset + 2, true) - 2);
+
+                  // offset += 2 + file.getShortAt(offset+2, true);
+
+              } else if (marker == 225) {
+                  // 0xE1 = Application-specific 1 (for EXIF)
+                  if (debug)
+                      console.log("Found 0xFFE1 marker");
+
+                  return readEXIFData(file, offset + 4, file.getShortAt(offset + 2, true) - 2);
+
+              } else {
+                  offset += 2 + file.getShortAt(offset + 2, true);
+              }
+
+          }
+
+      }
+
+
+      function readTags(file, tiffStart, dirStart, strings, bigEnd) {
+          var entries = file.getShortAt(dirStart, bigEnd),
+                  tags = {},
+                  entryOffset, tag,
+                  i;
+
+          for (i = 0; i < entries; i++) {
+              entryOffset = dirStart + i * 12 + 2;
+              tag = strings[file.getShortAt(entryOffset, bigEnd)];
+              if (!tag && debug)
+                  console.log("Unknown tag: " + file.getShortAt(entryOffset, bigEnd));
+              tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
+          }
+          return tags;
+      }
+
+
+      function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
+          var type = file.getShortAt(entryOffset + 2, bigEnd),
+                  numValues = file.getLongAt(entryOffset + 4, bigEnd),
+                  valueOffset = file.getLongAt(entryOffset + 8, bigEnd) + tiffStart,
+                  offset,
+                  vals, val, n,
+                  numerator, denominator;
+
+          switch (type) {
+              case 1: // byte, 8-bit unsigned int
+              case 7: // undefined, 8-bit byte, value depending on field
+                  if (numValues == 1) {
+                      return file.getByteAt(entryOffset + 8, bigEnd);
+                  } else {
+                      offset = numValues > 4 ? valueOffset : (entryOffset + 8);
+                      vals = [];
+                      for (n = 0; n < numValues; n++) {
+                          vals[n] = file.getByteAt(offset + n);
+                      }
+                      return vals;
+                  }
+
+              case 2: // ascii, 8-bit byte
+                  offset = numValues > 4 ? valueOffset : (entryOffset + 8);
+                  return file.getStringAt(offset, numValues - 1);
+
+              case 3: // short, 16 bit int
+                  if (numValues == 1) {
+                      return file.getShortAt(entryOffset + 8, bigEnd);
+                  } else {
+                      offset = numValues > 2 ? valueOffset : (entryOffset + 8);
+                      vals = [];
+                      for (n = 0; n < numValues; n++) {
+                          vals[n] = file.getShortAt(offset + 2 * n, bigEnd);
+                      }
+                      return vals;
+                  }
+
+              case 4: // long, 32 bit int
+                  if (numValues == 1) {
+                      return file.getLongAt(entryOffset + 8, bigEnd);
+                  } else {
+                      vals = [];
+                      for (var n = 0; n < numValues; n++) {
+                          vals[n] = file.getLongAt(valueOffset + 4 * n, bigEnd);
+                      }
+                      return vals;
+                  }
+
+              case 5: // rational = two long values, first is numerator, second is denominator
+                  if (numValues == 1) {
+                      numerator = file.getLongAt(valueOffset, bigEnd);
+                      denominator = file.getLongAt(valueOffset + 4, bigEnd);
+                      val = new Number(numerator / denominator);
+                      val.numerator = numerator;
+                      val.denominator = denominator;
+                      return val;
+                  } else {
+                      vals = [];
+                      for (n = 0; n < numValues; n++) {
+                          numerator = file.getLongAt(valueOffset + 8 * n, bigEnd);
+                          denominator = file.getLongAt(valueOffset + 4 + 8 * n, bigEnd);
+                          vals[n] = new Number(numerator / denominator);
+                          vals[n].numerator = numerator;
+                          vals[n].denominator = denominator;
+                      }
+                      return vals;
+                  }
+
+              case 9: // slong, 32 bit signed int
+                  if (numValues == 1) {
+                      return file.getSLongAt(entryOffset + 8, bigEnd);
+                  } else {
+                      vals = [];
+                      for (n = 0; n < numValues; n++) {
+                          vals[n] = file.getSLongAt(valueOffset + 4 * n, bigEnd);
+                      }
+                      return vals;
+                  }
+
+              case 10: // signed rational, two slongs, first is numerator, second is denominator
+                  if (numValues == 1) {
+                      return file.getSLongAt(valueOffset, bigEnd) / file.getSLongAt(valueOffset + 4, bigEnd);
+                  } else {
+                      vals = [];
+                      for (n = 0; n < numValues; n++) {
+                          vals[n] = file.getSLongAt(valueOffset + 8 * n, bigEnd) / file.getSLongAt(valueOffset + 4 + 8 * n, bigEnd);
+                      }
+                      return vals;
+                  }
+          }
+      }
+
+
+      function readEXIFData(file, start) {
+          if (file.getStringAt(start, 4) != "Exif") {
+              if (debug)
+                  console.log("Not valid EXIF data! " + file.getStringAt(start, 4));
+              return false;
+          }
+
+          var bigEnd,
+                  tags, tag,
+                  exifData, gpsData,
+                  tiffOffset = start + 6;
+
+          // test for TIFF validity and endianness
+          if (file.getShortAt(tiffOffset) == 0x4949) {
+              bigEnd = false;
+          } else if (file.getShortAt(tiffOffset) == 0x4D4D) {
+              bigEnd = true;
+          } else {
+              if (debug)
+                  console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)");
+              return false;
+          }
+
+          if (file.getShortAt(tiffOffset + 2, bigEnd) != 0x002A) {
+              if (debug)
+                  console.log("Not valid TIFF data! (no 0x002A)");
+              return false;
+          }
+
+          if (file.getLongAt(tiffOffset + 4, bigEnd) != 0x00000008) {
+              if (debug)
+                  console.log("Not valid TIFF data! (First offset not 8)", file.getShortAt(tiffOffset + 4, bigEnd));
+              return false;
+          }
+
+          tags = readTags(file, tiffOffset, tiffOffset + 8, TiffTags, bigEnd);
+
+          if (tags.ExifIFDPointer) {
+              exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
+              for (tag in exifData) {
+                  switch (tag) {
+                      case "LightSource" :
+                      case "Flash" :
+                      case "MeteringMode" :
+                      case "ExposureProgram" :
+                      case "SensingMethod" :
+                      case "SceneCaptureType" :
+                      case "SceneType" :
+                      case "CustomRendered" :
+                      case "WhiteBalance" :
+                      case "GainControl" :
+                      case "Contrast" :
+                      case "Saturation" :
+                      case "Sharpness" :
+                      case "SubjectDistanceRange" :
+                      case "FileSource" :
+                          exifData[tag] = StringValues[tag][exifData[tag]];
+                          break;
+
+                      case "ExifVersion" :
+                      case "FlashpixVersion" :
+                          exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
+                          break;
+
+                      case "ComponentsConfiguration" :
+                          exifData[tag] =
+                                  StringValues.Components[exifData[tag][0]]
+                                  + StringValues.Components[exifData[tag][1]]
+                                  + StringValues.Components[exifData[tag][2]]
+                                  + StringValues.Components[exifData[tag][3]];
+                          break;
+                  }
+                  tags[tag] = exifData[tag];
+              }
+          }
+
+          if (tags.GPSInfoIFDPointer) {
+              gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
+              for (tag in gpsData) {
+                  switch (tag) {
+                      case "GPSVersionID" :
+                          gpsData[tag] = gpsData[tag][0]
+                                  + "." + gpsData[tag][1]
+                                  + "." + gpsData[tag][2]
+                                  + "." + gpsData[tag][3];
+                          break;
+                  }
+                  tags[tag] = gpsData[tag];
+              }
+          }
+
+          return tags;
+      }
+
+
+      function getData(img, callback) {
+          if (!img.complete)
+              return false;
+          if (!imageHasData(img)) {
+              getImageData(img, callback);
+          } else {
+              if (callback) {
+                  callback.call(img);
+              }
+          }
+          return true;
+      }
+
+      function getTag(img, tag) {
+          if (!imageHasData(img))
+              return;
+          return img.exifdata[tag];
+      }
+
+      function getAllTags(img) {
+          if (!imageHasData(img))
+              return {};
+          var a,
+                  data = img.exifdata,
+                  tags = {};
+          for (a in data) {
+              if (data.hasOwnProperty(a)) {
+                  tags[a] = data[a];
+              }
+          }
+          return tags;
+      }
+
+      function pretty(img) {
+          if (!imageHasData(img))
+              return "";
+          var a,
+                  data = img.exifdata,
+                  strPretty = "";
+          for (a in data) {
+              if (data.hasOwnProperty(a)) {
+                  if (typeof data[a] == "object") {
+                      if (data[a] instanceof Number) {
+                          strPretty += a + " : " + data[a] + " [" + data[a].numerator + "/" + data[a].denominator + "]\r\n";
+                      } else {
+                          strPretty += a + " : [" + data[a].length + " values]\r\n";
+                      }
+                  } else {
+                      strPretty += a + " : " + data[a] + "\r\n";
+                  }
+              }
+          }
+          return strPretty;
+      }
+
+      function readFromBinaryFile(file) {
+          return findEXIFinJPEG(file);
+      }
+
+
+      return {
+          readFromBinaryFile: readFromBinaryFile,
+          pretty: pretty,
+          getTag: getTag,
+          getAllTags: getAllTags,
+          getData: getData,
+          Tags: ExifTags,
+          TiffTags: TiffTags,
+          GPSTags: GPSTags,
+          StringValues: StringValues
+      };
+
+  })();
+
+  angular.module('ImageCropper',[])
+    .directive('imageCrop', function() {
+
+      return {
+        template: '<div id="image-crop-{{ rand }}" class="ng-image-crop ng-image-crop--{{ shape }}" ng-style="moduleStyles"><section ng-style="sectionStyles" ng-show="step==1"></section><section ng-style="sectionStyles" ng-show="step==2"><canvas class="cropping-canvas" width="{{ canvasWidth }}" height="{{ canvasHeight }}" ng-mousemove="onCanvasMouseMove($event)" ng-mousedown="onCanvasMouseDown($event)"></canvas><div ng-style="croppingGuideStyles" class="cropping-guide"></div><div class="zoom-handle" ng-mousemove="onHandleMouseMove($event)" ng-mousedown="onHandleMouseDown($event)" ng-mouseup="onHandleMouseUp($event)"><span>&larr; zoom &rarr;</span></div></section><section ng-style="sectionStyles" class="image-crop-section-final" ng-show="step==3"><img class="image-crop-final" ng-src="{{ croppedDataUri }}" /></section></div>',
+        replace: true,
+        restrict: 'AE',
+        scope: {
+		  crop: '=',
+          width: '@',
+          height: '@',
+          shape: '@',
+		  src: '=',
+          resultBlob: '=',
+		  result: '=',
+          step: '=',
+          padding: '@',
+		  maxSize: '@'
+        },
+        link: function (scope, element, attributes) {
+		  
+		  var padding = scope.padding ? Number(scope.padding) : 200;
+		  
+          scope.rand = Math.round(Math.random() * 99999);
+          scope.step = scope.step || 1;
+          scope.shape = scope.shape || 'circle';
+          scope.width = parseInt(scope.width, 10) || 300;
+          scope.height = parseInt(scope.height, 10) || 300;
+
+          scope.canvasWidth = scope.width + padding;
+          scope.canvasHeight = scope.height + padding;
+
+          var $elm = element[0];
+
+          var $canvas = $elm.getElementsByClassName('cropping-canvas')[0];
+          var $handle = $elm.getElementsByClassName('zoom-handle')[0];
+          var $finalImg = $elm.getElementsByClassName('image-crop-final')[0];
+          var $img = new Image();
+          var fileReader = new FileReader();
+
+          var maxLeft = 0, minLeft = 0, maxTop = 0, minTop = 0, imgLoaded = false, imgWidth = 0, imgHeight = 0;
+          var currentX = 0, currentY = 0, dragging = false, startX = 0, startY = 0, zooming = false;
+          var newWidth = imgWidth, newHeight = imgHeight;
+          var targetX = 0, targetY = 0;
+          var zoom = 1;
+          var maxZoomGestureLength = 0;
+          var maxZoomedInLevel = 0, maxZoomedOutLevel = 2;
+          var minXPos = 0, maxXPos = (padding/2), minYPos = 0, maxYPos = (padding/2); // for dragging bounds		  
+		  var maxSize = scope.maxSize ? Number(scope.maxSize) : null; //max size of the image in px
+		  
+          var zoomWeight = .6;
+          var ctx = $canvas.getContext('2d');
+          var exif = null;
+          var files = [];
+
+          // ---------- INLINE STYLES ----------- //
+          scope.moduleStyles = {
+            width: (scope.width + padding) + 'px',
+            height: (scope.height + padding) + 'px'
+          };
+
+          scope.sectionStyles = {
+            width: (scope.width + padding) + 'px',
+            height: (scope.height + padding) + 'px'
+          };
+
+          scope.croppingGuideStyles = {
+            width: scope.width + 'px',
+            height: scope.height + 'px',
+            top: (padding/2)+'px',
+            left: (padding/2)+'px'
+          };
+  		  
+		  function handleSize(base64ImageSrc) {
+		  
+			return new Promise(function(resolve, reject) {
+				
+				if(!maxSize) {
+					return resolve(base64ImageSrc);
+				}
+				
+				var img = new Image();
+				img.src = base64ImageSrc;
+				
+				img.onload = function() {
+				
+					var height = img.height;
+					var width = img.width;
+															
+					//if the size is already ok, just return the image
+					if(height <= maxSize && width <= maxSize) {						
+						return resolve(base64ImageSrc);
+					}			 	
+					
+					var ratio = width/height;
+					
+					if(ratio > 1) {
+						width = maxSize;
+						height = maxSize/ratio;
+					}
+					else {
+						width = maxSize*ratio;
+						height = maxSize;
+					}							
+					
+					width = Math.round(width);
+					height = Math.round(height);			 	
+					
+					var canvas = document.createElement("canvas");
+					canvas.width = width;
+					canvas.height = height;			 	
+					
+					var context = canvas.getContext("2d");
+									
+					context.drawImage(img, 0, 0, img.width,    img.height,      // source
+										   0, 0, canvas.width, canvas.height);  // destination	 
+					
+					context.save();
+								
+					var dataUrl = canvas.toDataURL();
+					
+					resolve(dataUrl);
+
+				};
+					
+			});		  
+				
+		  }
+					
+		  function handleEXIF(base64ImageSrc, exif) {
+		  		
+			return new Promise(function(resolve, reject) {
+								
+				var img = new Image();
+				img.src = base64ImageSrc;
+				
+				img.onload = function() {
+				
+					var canvas = document.createElement("canvas");
+					
+					if(exif.Orientation >= 5) {
+						canvas.width = img.height;
+						canvas.height = img.width;
+					} else {
+						canvas.width = img.width;
+						canvas.height = img.height;
+					}
+					
+					var context = canvas.getContext("2d");
+		
+					// change mobile orientation, if required
+					switch(exif.Orientation){
+						case 1:
+							// nothing
+							break;
+						case 2:
+							// horizontal flip
+							context.translate(img.width, 0);
+							context.scale(-1, 1);
+							break;
+						case 3:
+							// 180 rotate left
+							context.translate(img.width, img.height);
+							context.rotate(Math.PI);
+							break;
+						case 4:
+							// vertical flip
+							context.translate(0, img.height);
+							context.scale(1, -1);
+							break;
+						case 5:
+							// vertical flip + 90 rotate right
+							context.rotate(0.5 * Math.PI);
+							context.scale(1, -1);
+							break;
+						case 6:
+							// 90 rotate right
+							context.rotate(0.5 * Math.PI);
+							context.translate(0, -img.height);
+							break;
+						case 7:
+							// horizontal flip + 90 rotate right
+							context.rotate(0.5 * Math.PI);
+							context.translate(img.width, -img.height);
+							context.scale(-1, 1);
+							break;
+						case 8:
+							// 90 rotate left					 		                   
+							context.rotate(-0.5 * Math.PI);
+							context.translate(-img.width, 0);
+							break;
+						default:
+							break;
+					}
+					
+					context.drawImage(img, 0, 0);	
+					context.save();
+					
+					var dataUrl = canvas.toDataURL();
+					
+					resolve(dataUrl);										
+				
+				};
+				
+			});				
+				
+		  }
+		  
+		  function loadImage(base64ImageSrc) {
+		  
+			//get the EXIF information from the image
+            var byteString = atob(base64ImageSrc.split(',')[1]);
+            var binary = new BinaryFile(byteString, 0, byteString.length);
+            exif = EXIF.readFromBinaryFile(binary);		  
+           
+		    //handle image size
+            handleSize(base64ImageSrc).then(function(base64ImageSrc) {
+			
+				//if the image has EXIF orientation..
+				if (exif && exif.Orientation && exif.Orientation > 1) {			
+					return handleEXIF(base64ImageSrc, exif);
+				} 
+				//otherwise, just return the image without any treatment
+				else {
+					return base64ImageSrc;
+				}
+				
+			}).then(function(base64ImageSrc) {
+			
+				$img.src = base64ImageSrc;
+				
+			}).catch(function(error) {							
+				console.log(error);				
+			});    
+			
+		  };
+		  
+          // ---------- EVENT HANDLERS ---------- //
+          fileReader.onload = function(e) {
+          	
+          	loadImage(this.resultBlob);	
+
+          };	  
+
+          $img.onload = function() {
+		  
+			scope.step = 2;
+			scope.$apply();		  
+			
+            ctx.drawImage($img, 0, 0);
+
+            imgWidth = $img.width;
+            imgHeight = $img.height;
+
+            minLeft = (scope.width + padding) - this.width;
+            minTop = (scope.height + padding) - this.height;
+            newWidth = imgWidth;
+            newHeight = imgHeight;
+            
+			if(imgWidth >= imgHeight) {
+				maxZoomedInLevel = ($canvas.height - padding) / imgHeight;
+			} else {
+				maxZoomedInLevel = ($canvas.width - padding) / imgWidth;
+			}		
+
+            maxZoomGestureLength = to2Dp(Math.sqrt(Math.pow($canvas.width, 2) + Math.pow($canvas.height, 2)));
+
+            updateDragBounds();
+			
+			var initialX = Math.round((minXPos + maxXPos)/2);
+			var initialY = Math.round((minYPos + maxYPos)/2);
+						
+			moveImage(initialX, initialY);
+			
+          };
+		  
+          function reset() {
+            files = [];
+            zoom = 1;
+			currentX = 0; 
+			currentY = 0; 
+			dragging = false; 
+			startX = 0; 
+			startY = 0; 
+			zooming = false;
+            ctx.clearRect(0, 0, $canvas.width, $canvas.height);            
+            $img.src = '';
+          }		  
+
+          // ---------- PRIVATE FUNCTIONS ---------- //
+          function moveImage(x, y) {
+			
+			x = x < minXPos ? minXPos : x;
+			x = x > maxXPos ? maxXPos : x;
+			y = y < minYPos ? minYPos : y;
+			y = y > maxYPos ? maxYPos : y;			
+
+            targetX = x;
+            targetY = y;
+			
+            ctx.clearRect(0, 0, $canvas.width, $canvas.height);
+            ctx.drawImage($img, x, y, newWidth, newHeight);
+			
+			return x == minXPos || x == maxXPos || y == minYPos || y == maxYPos;
+          }
+
+          function to2Dp(val) {
+            return Math.round(val * 1000) / 1000;
+          }
+
+          function updateDragBounds() {
+            // $img.width, $canvas.width, zoom
+
+            minXPos = $canvas.width - ($img.width * zoom) - (padding/2);
+            minYPos = $canvas.height - ($img.height * zoom) - (padding/2);
+
+          }
+
+          function zoomImage(val) {
+
+            if (!val) {
+              return;
+            }
+			
+            var proposedZoomLevel = to2Dp(zoom + val);
+			
+            if ((proposedZoomLevel < maxZoomedInLevel) || (proposedZoomLevel > maxZoomedOutLevel)) {
+              // image wont fill whole canvas
+              // or image is too far zoomed in, it's gonna get pretty pixelated!
+              return;
+            }
+
+            zoom = proposedZoomLevel;
+            // console.log('zoom', zoom);
+
+            updateDragBounds();
+
+            newWidth = $img.width * zoom;
+            newHeight = $img.height * zoom;
+
+            var newXPos = currentX * zoom;
+            var newYPos = currentY * zoom;
+
+            // check if we've exposed the gutter
+            if (newXPos < minXPos) {
+              newXPos = minXPos;
+            } else if (newXPos > maxXPos) {
+              newXPos = maxXPos;
+            }
+
+            if (newYPos < minYPos) {
+              newYPos = minYPos;
+            } else if (newYPos > maxYPos) {
+              newYPos = maxYPos;
+            }
+
+            // check if image is still going to fit the bounds of the box
+            ctx.clearRect(0, 0, $canvas.width, $canvas.height);
+            ctx.drawImage($img, newXPos, newYPos, newWidth, newHeight);
+          }
+
+          function calcZoomLevel(diffX, diffY) {
+
+            var hyp = Math.sqrt( Math.pow(diffX, 2) + Math.pow(diffY, 2) );
+            var zoomGestureRatio = to2Dp(hyp / maxZoomGestureLength);
+            var newZoomDiff = to2Dp((maxZoomedOutLevel - maxZoomedInLevel) * zoomGestureRatio * zoomWeight);
+            return diffX > 0 ? -newZoomDiff : newZoomDiff;
+			
+          }
+          
+		  function dataURItoBlob(dataURI) {
+			    var byteString, 
+			        mimestring;
+			
+			    if(dataURI.split(',')[0].indexOf('base64') !== -1 ) {
+			        byteString = atob(dataURI.split(',')[1]);
+			    } else {
+			        byteString = decodeURI(dataURI.split(',')[1]);
+			    }
+			
+			    mimestring = dataURI.split(',')[0].split(':')[1].split(';')[0];
+			
+			    var content = new Array();
+			    for (var i = 0; i < byteString.length; i++) {
+			        content[i] = byteString.charCodeAt(i);
+			    }
+			
+			    return new Blob([new Uint8Array(content)], {type: mimestring});
+		  }       
+
+          // ---------- SCOPE FUNCTIONS ---------- //
+
+		  scope.$watch('src', function(){
+			if(scope.src) {
+				if(scope.step != 3) {
+					if(typeof(scope.src) == 'Blob') {
+						fileReader.readAsDataURL(scope.src);	
+					} else {
+						loadImage(scope.src);
+					}
+				}		
+			} else {
+				scope.step = 1;
+				reset();
+			}
+		  });	
+
+		  scope.$watch('crop',function(){
+			if(scope.crop) {
+				scope.doCrop();
+				scope.crop = false;
+			}
+		  });	
+		  
+          $finalImg.onload = function() {			
+            var tempCanvas = document.createElement('canvas');
+            tempCanvas.width = this.width - padding;
+            tempCanvas.height = this.height - padding;
+            tempCanvas.style.display = 'none';
+
+            var tempCanvasContext = tempCanvas.getContext('2d');
+            tempCanvasContext.drawImage($finalImg, -(padding/2), -(padding/2));
+
+            $elm.getElementsByClassName('image-crop-section-final')[0].appendChild(tempCanvas);
+			
+			var dataUrl = tempCanvas.toDataURL();
+			
+			scope.result = dataUrl;
+            scope.resultBlob = dataURItoBlob(dataUrl);
+            
+            scope.$apply();
+          };
+
+          scope.doCrop = function() {
+            scope.croppedDataUri = $canvas.toDataURL();
+            scope.step = 3;
+          };
+
+          scope.onCanvasMouseUp = function(e) {
+
+            if (!dragging) {
+              return;
+            }
+
+            e.preventDefault();
+            e.stopPropagation(); // if event was on canvas, stop it propagating up
+
+            startX = 0;
+            startY = 0;
+            dragging = false;
+            currentX = targetX;
+            currentY = targetY;
+
+            removeBodyEventListener('mouseup', scope.onCanvasMouseUp);
+            removeBodyEventListener('touchend', scope.onCanvasMouseUp);
+            removeBodyEventListener('mousemove', scope.onCanvasMouseMove);
+            removeBodyEventListener('touchmove', scope.onCanvasMouseMove);
+          };
+
+          $canvas.addEventListener('touchend', scope.onCanvasMouseUp, false);
+
+          scope.onCanvasMouseDown = function(e) {
+            startX = e.type === 'touchstart' ? e.changedTouches[0].clientX : e.clientX;
+            startY = e.type === 'touchstart' ? e.changedTouches[0].clientY : e.clientY;
+            zooming = false;
+            dragging = true;
+
+            addBodyEventListener('mouseup', scope.onCanvasMouseUp);
+            addBodyEventListener('mousemove', scope.onCanvasMouseMove);
+          };
+
+          $canvas.addEventListener('touchstart', scope.onCanvasMouseDown, false);
+
+          function addBodyEventListener(eventName, func) {
+            document.documentElement.addEventListener(eventName, func, false);
+          }
+
+          function removeBodyEventListener(eventName, func) {
+            document.documentElement.removeEventListener(eventName, func);
+          }
+
+          scope.onHandleMouseDown = function(e) {
+
+            e.preventDefault();
+            e.stopPropagation(); // if event was on handle, stop it propagating up
+
+            startX = lastHandleX = (e.type === 'touchstart') ? e.changedTouches[0].clientX : e.clientX;
+            startY = lastHandleY = (e.type === 'touchstart') ? e.changedTouches[0].clientY : e.clientY;
+            dragging = false;
+            zooming = true;
+
+            addBodyEventListener('mouseup', scope.onHandleMouseUp);
+            addBodyEventListener('touchend', scope.onHandleMouseUp);
+            addBodyEventListener('mousemove', scope.onHandleMouseMove);
+            addBodyEventListener('touchmove', scope.onHandleMouseMove);
+			
+          };
+
+          $handle.addEventListener('touchstart', scope.onHandleMouseDown, false);
+
+          scope.onHandleMouseUp = function(e) {
+
+            // this is applied on the whole section so check we're zooming
+            if (!zooming) {
+              return;
+            }
+
+            e.preventDefault();
+            e.stopPropagation(); // if event was on canvas, stop it propagating up
+
+            startX = 0;
+            startY = 0;
+            zooming = false;
+            currentX = targetX;
+            currentY = targetY;
+
+            removeBodyEventListener('mouseup', scope.onHandleMouseUp);
+            removeBodyEventListener('touchend', scope.onHandleMouseUp);
+            removeBodyEventListener('mousemove', scope.onHandleMouseMove);
+            removeBodyEventListener('touchmove', scope.onHandleMouseMove);
+          };
+
+          $handle.addEventListener('touchend', scope.onHandleMouseUp, false);
+
+          scope.onCanvasMouseMove = function(e) {
+
+            e.preventDefault();
+            e.stopPropagation();
+
+            if (!dragging) {
+              return;
+            }
+
+            var diffX = startX - ((e.type === 'touchmove') ? e.changedTouches[0].clientX : e.clientX); // how far mouse has moved in current drag
+            var diffY = startY - ((e.type === 'touchmove') ? e.changedTouches[0].clientY : e.clientY); // how far mouse has moved in current drag
+            /*targetX = currentX - diffX; // desired new X position
+            targetY = currentY - diffY; // desired new X position*/
+
+            moveImage(currentX - diffX, currentY - diffY);
+
+          };
+
+          $canvas.addEventListener('touchmove', scope.onCanvasMouseMove, false);
+
+          var lastHandleX = null, lastHandleY = null;
+
+          scope.onHandleMouseMove = function(e) {
+
+            e.stopPropagation();
+            e.preventDefault();
+
+            // this is applied on the whole section so check we're zooming
+            if (!zooming) {
+              return false;
+            }
+
+            var diffX = lastHandleX - ((e.type === 'touchmove') ? e.changedTouches[0].clientX : e.clientX); // how far mouse has moved in current drag
+            var diffY = lastHandleY - ((e.type === 'touchmove') ? e.changedTouches[0].clientY : e.clientY); // how far mouse has moved in current drag
+
+            lastHandleX = (e.type === 'touchmove') ? e.changedTouches[0].clientX : e.clientX;
+            lastHandleY = (e.type === 'touchmove') ? e.changedTouches[0].clientY : e.clientY;
+
+            var zoomVal = calcZoomLevel(diffX, diffY);			
+            zoomImage(zoomVal);
+
+          };
+
+          $handle.addEventListener('touchmove', scope.onHandleMouseMove, false);	  		 
+		  	  		  
+		  scope.onHandleMouseWheel = function(e){
+			  e.preventDefault();		  
+			  
+			  zoomImage(e.deltaY > 0 ? -0.05 : 0.05);			  
+		  };
+
+		  $canvas.addEventListener('mousewheel', scope.onHandleMouseWheel);
+		  $handle.addEventListener('mousewheel', scope.onHandleMouseWheel);
+
+        }
+      };
+    });
+
+
+})();
+!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";t.exports="ngFileSaver",angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",n(1)]).factory("FileSaverUtils",[n(2)]).factory("Blob",["$window",n(3)]).factory("SaveAs",[n(5)])},function(t,e){"use strict";t.exports=function(t,e,n){function o(t,o,r){try{e(t,o,r)}catch(i){n.handleErrors(i.message)}}return{saveAs:function(t,e,r){return n.isBlobInstance(t)||n.handleErrors("Data argument should be a blob instance"),n.isString(e)||n.handleErrors("Filename argument should be a string"),o(t,e,r)}}}},function(t,e){"use strict";t.exports=function(){return{handleErrors:function(t){throw new Error(t)},isString:function(t){return"string"==typeof t||t instanceof String},isUndefined:function(t){return"undefined"==typeof t},isBlobInstance:function(t){return t instanceof Blob}}}},function(t,e,n){"use strict";n(4),t.exports=function(t){return t.Blob}},function(t,e){!function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(e){}var n=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},o=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},r=n.prototype,i=o.prototype,a=t.FileReaderSync,c=function(t){this.code=this[this.name=t]},s="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),u=s.length,f=t.URL||t.webkitURL||t,l=f.createObjectURL,d=f.revokeObjectURL,p=f,h=t.btoa,b=t.atob,v=t.ArrayBuffer,w=t.Uint8Array,g=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(o.fake=i.fake=!0;u--;)c.prototype[s[u]]=u+1;return f.createObjectURL||(p=t.URL=function(t){var e,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=t,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(e=t.match(g),n.origin=e&&e[1])),n}),p.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof o?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):h?e+";base64,"+h(t.data):e+","+encodeURIComponent(t.data)):l?l.call(f,t):void 0},p.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&d&&d.call(f,t)},r.append=function(t){var n=this.data;if(w&&(t instanceof v||t instanceof w)){for(var r="",i=new w(t),s=0,u=i.length;s<u;s++)r+=String.fromCharCode(i[s]);n.push(r)}else if("Blob"===e(t)||"File"===e(t)){if(!a)throw new c("NOT_READABLE_ERR");var f=new a;n.push(f.readAsBinaryString(t))}else t instanceof o?"base64"===t.encoding&&b?n.push(b(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},r.getBlob=function(t){return arguments.length||(t=null),new o(this.data.join(""),t,"raw")},r.toString=function(){return"[object BlobBuilder]"},i.slice=function(t,e,n){var r=arguments.length;return r<3&&(n=null),new o(this.data.slice(t,r>1?e:this.data.length),n,this.encoding)},i.toString=function(){return"[object Blob]"},i.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,e){var o=e?e.type||"":"",r=new n;if(t)for(var i=0,a=t.length;i<a;i++)Uint8Array&&t[i]instanceof Uint8Array?r.append(t[i].buffer):r.append(t[i]);var c=r.getBlob(o);return!c.slice&&c.webkitSlice&&(c.slice=c.webkitSlice),c};var o=Object.getPrototypeOf||function(t){return t.__proto__};t.Blob.prototype=o(new t.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},function(t,e,n){"use strict";t.exports=function(){return n(6).saveAs||function(){}}},function(t,e,n){var o,r=r||function(t){"use strict";if(!("undefined"==typeof t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=t.document,n=function(){return t.URL||t.webkitURL||t},o=e.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in o,i=function(t){var e=new MouseEvent("click");t.dispatchEvent(e)},a=/constructor/i.test(t.HTMLElement)||t.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u="application/octet-stream",f=4e4,l=function(t){var e=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};setTimeout(e,f)},d=function(t,e,n){e=[].concat(e);for(var o=e.length;o--;){var r=t["on"+e[o]];if("function"==typeof r)try{r.call(t,n||t)}catch(i){s(i)}}},p=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},h=function(e,s,f){f||(e=p(e));var h,b=this,v=e.type,w=v===u,g=function(){d(b,"writestart progress write writeend".split(" "))},y=function(){if((c||w&&a)&&t.FileReader){var o=new FileReader;return o.onloadend=function(){var e=c?o.result:o.result.replace(/^data:[^;]*;/,"data:attachment/file;"),n=t.open(e,"_blank");n||(t.location.href=e),e=void 0,b.readyState=b.DONE,g()},o.readAsDataURL(e),void(b.readyState=b.INIT)}if(h||(h=n().createObjectURL(e)),w)t.location.href=h;else{var r=t.open(h,"_blank");r||(t.location.href=h)}b.readyState=b.DONE,g(),l(h)};return b.readyState=b.INIT,r?(h=n().createObjectURL(e),void setTimeout(function(){o.href=h,o.download=s,i(o),g(),l(h),b.readyState=b.DONE})):void y()},b=h.prototype,v=function(t,e,n){return new h(t,e||t.name||"download",n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=p(t)),navigator.msSaveOrOpenBlob(t,e)}:(b.abort=function(){},b.readyState=b.INIT=0,b.WRITING=1,b.DONE=2,b.error=b.onwritestart=b.onprogress=b.onwrite=b.onabort=b.onerror=b.onwriteend=null,v)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof t&&t.exports?t.exports.saveAs=r:null!==n(7)&&null!==n(8)&&(o=function(){return r}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){(function(e){t.exports=e}).call(e,{})}])});
+/*** Directives and services for responding to idle users in AngularJS
+* @author Mike Grabski <me@mikegrabski.com>
+* @version v1.3.2
+* @link https://github.com/HackedByChinese/ng-idle.git
+* @license MIT
+*/
+
+!function(a,b,c){"use strict";b.module("ngIdle",["ngIdle.keepalive","ngIdle.idle","ngIdle.countdown","ngIdle.title","ngIdle.localStorage"]),b.module("ngIdle.keepalive",[]).provider("Keepalive",function(){var a={http:null,interval:600};this.http=function(c){if(!c)throw new Error("Argument must be a string containing a URL, or an object containing the HTTP request configuration.");b.isString(c)&&(c={url:c,method:"GET"}),c.cache=!1,a.http=c};var c=this.interval=function(b){if(b=parseInt(b),isNaN(b)||0>=b)throw new Error("Interval must be expressed in seconds and be greater than 0.");a.interval=b};this.$get=["$rootScope","$log","$interval","$http",function(d,e,f,g){function h(a){d.$broadcast("KeepaliveResponse",a.data,a.status)}function i(){d.$broadcast("Keepalive"),b.isObject(a.http)&&g(a.http).then(h)["catch"](h)}var j={ping:null};return{_options:function(){return a},setInterval:c,start:function(){return f.cancel(j.ping),j.ping=f(i,1e3*a.interval),j.ping},stop:function(){f.cancel(j.ping)},ping:function(){i()}}}]}),b.module("ngIdle.idle",["ngIdle.keepalive","ngIdle.localStorage"]).provider("Idle",function(){var a={idle:1200,timeout:30,autoResume:"idle",interrupt:"mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll",windowInterrupt:null,keepalive:!0},c=this.timeout=function(c){if(c===!1)a.timeout=0;else{if(!(b.isNumber(c)&&c>=0))throw new Error("Timeout must be zero or false to disable the feature, or a positive integer (in seconds) to enable it.");a.timeout=c}};this.interrupt=function(b){a.interrupt=b},this.windowInterrupt=function(b){a.windowInterrupt=b};var d=this.idle=function(b){if(0>=b)throw new Error("Idle must be a value in seconds, greater than 0.");a.idle=b};this.autoResume=function(b){b===!0?a.autoResume="idle":b===!1?a.autoResume="off":a.autoResume=b},this.keepalive=function(b){a.keepalive=b===!0},this.$get=["$interval","$log","$rootScope","$document","Keepalive","IdleLocalStorage","$window",function(e,f,g,h,i,j,k){function l(){a.keepalive&&(u.running&&i.ping(),i.start())}function m(){a.keepalive&&i.stop()}function n(){u.idling=!u.idling;var b=u.idling?"IdleStart":"IdleEnd";u.idling?(g.$broadcast(b),m(),a.timeout&&(u.countdown=a.timeout,o(),u.timeout=e(o,1e3,a.timeout,!1))):(l(),g.$broadcast(b)),e.cancel(u.idle)}function o(){if(u.idling){if(u.countdown<=0)return void q();g.$broadcast("IdleWarn",u.countdown),u.countdown--}}function p(a){g.$broadcast("IdleInterrupt",a)}function q(){m(),e.cancel(u.idle),e.cancel(u.timeout),u.idling=!0,u.running=!1,u.countdown=0,g.$broadcast("IdleTimeout")}function r(a,b,c){var d=a.running();a.unwatch(),b(c),d&&a.watch()}function s(){var a=j.get("expiry");return a&&a.time?new Date(a.time):null}function t(a){a?j.set("expiry",{id:v,time:a}):j.remove("expiry")}var u={idle:null,timeout:null,idling:!1,running:!1,countdown:null},v=(new Date).getTime(),w={_options:function(){return a},_getNow:function(){return new Date},getIdle:function(){return a.idle},getTimeout:function(){return a.timeout},setIdle:function(a){r(this,d,a)},setTimeout:function(a){r(this,c,a)},isExpired:function(){var a=s();return null!==a&&a<=this._getNow()},running:function(){return u.running},idling:function(){return u.idling},watch:function(b){e.cancel(u.idle),e.cancel(u.timeout);var c=a.timeout?a.timeout:0;b||t(new Date((new Date).getTime()+1e3*(a.idle+c))),u.idling?n():u.running||l(),u.running=!0,u.idle=e(n,1e3*a.idle,0,!1)},unwatch:function(){e.cancel(u.idle),e.cancel(u.timeout),u.idling=!1,u.running=!1,t(null),m()},interrupt:function(b){if(u.running){if(a.timeout&&this.isExpired())return void q();p(b),(b||"idle"===a.autoResume||"notIdle"===a.autoResume&&!u.idling)&&this.watch(b)}}},x={clientX:null,clientY:null,swap:function(a){var b={clientX:this.clientX,clientY:this.clientY};return this.clientX=a.clientX,this.clientY=a.clientY,b},hasMoved:function(a){var b=this.swap(a);return null===this.clientX||a.movementX||a.movementY?!0:b.clientX!=a.clientX||b.clientY!=a.clientY?!0:!1}};if(h.find("html").on(a.interrupt,function(a){"mousemove"===a.type&&a.originalEvent&&0===a.originalEvent.movementX&&0===a.originalEvent.movementY||("mousemove"!==a.type||x.hasMoved(a))&&w.interrupt()}),a.windowInterrupt)for(var y=a.windowInterrupt.split(" "),z=function(){w.interrupt()},A=0;A<y.length;A++)k.addEventListener?k.addEventListener(y[A],z,!1):k.attachEvent(y[A],z);var B=function(a){if("ngIdle.expiry"===a.key&&a.newValue&&a.newValue!==a.oldValue){var c=b.fromJson(a.newValue);if(c.id===v)return;w.interrupt(!0)}};return k.addEventListener?k.addEventListener("storage",B,!1):k.attachEvent&&k.attachEvent("onstorage",B),w}]}),b.module("ngIdle.countdown",["ngIdle.idle"]).directive("idleCountdown",["Idle",function(a){return{restrict:"A",scope:{value:"=idleCountdown"},link:function(b){b.value=a.getTimeout(),b.$on("IdleWarn",function(a,c){b.$evalAsync(function(){b.value=c})}),b.$on("IdleTimeout",function(){b.$evalAsync(function(){b.value=0})})}}}]),b.module("ngIdle.title",[]).provider("Title",function(){function a(a,b,c){return new Array(b-String(a).length+1).join(c||"0")+a}var c={enabled:!0},d=this.enabled=function(a){c.enabled=a===!0};this.$get=["$document","$interpolate",function(e,f){var g={original:null,idle:"{{minutes}}:{{seconds}} until your session times out!",timedout:"Your session has expired."};return{setEnabled:d,isEnabled:function(){return c.enabled},original:function(a){return b.isUndefined(a)?g.original:void(g.original=a)},store:function(a){(a||!g.original)&&(g.original=this.value())},value:function(a){return b.isUndefined(a)?e[0].title:void(e[0].title=a)},idleMessage:function(a){return b.isUndefined(a)?g.idle:void(g.idle=a)},timedOutMessage:function(a){return b.isUndefined(a)?g.timedout:void(g.timedout=a)},setAsIdle:function(b){this.store();var c={totalSeconds:b};c.minutes=Math.floor(b/60),c.seconds=a(b-60*c.minutes,2),this.value(f(this.idleMessage())(c))},setAsTimedOut:function(){this.store(),this.value(this.timedOutMessage())},restore:function(){this.original()&&this.value(this.original())}}}]}).directive("title",["Title",function(a){return{restrict:"E",link:function(b,c,d){a.isEnabled()&&!d.idleDisabled&&(a.store(!0),b.$on("IdleStart",function(){a.original(c[0].innerText)}),b.$on("IdleWarn",function(b,c){a.setAsIdle(c)}),b.$on("IdleEnd",function(){a.restore()}),b.$on("IdleTimeout",function(){a.setAsTimedOut()}))}}}]),b.module("ngIdle.localStorage",[]).service("IdleStorageAccessor",["$window",function(a){return{get:function(){return a.localStorage}}}]).service("IdleLocalStorage",["IdleStorageAccessor",function(a){function d(){var a={};this.setItem=function(b,c){a[b]=c},this.getItem=function(b){return"undefined"!=typeof a[b]?a[b]:null},this.removeItem=function(b){a[b]=c}}function e(){try{var b=a.get();return b.setItem("ngIdleStorage",""),b.removeItem("ngIdleStorage"),b}catch(c){return new d}}var f=e();return{set:function(a,c){f.setItem("ngIdle."+a,b.toJson(c))},get:function(a){return b.fromJson(f.getItem("ngIdle."+a))},remove:function(a){f.removeItem("ngIdle."+a)},_wrapped:function(){return f}}}])}(window,window.angular);
+//# sourceMappingURL=angular-idle.map
+!function(n,r){r.module("nemLogging",[]),r.module("nemLogging").provider("nemDebug",function(){var n=null;return this.$get=function(){return n},this.debug=n,this});var t=function(n,r){return function(){return n.apply(r,arguments)}},e=[].slice;r.module("nemLogging").provider("nemSimpleLogger",["nemDebugProvider",function(n){var r,i,o,u,g,l,s,f,h,a,c,d;for(c=n.debug,o={},u=["debug","info","warn","error","log"],r={},h=f=0,a=u.length;a>f;h=++f)d=u[h],r[d]=h;return l=function(n,r,t){return n>=r?t():void 0},g=function(n){var r,t,e;if(r=!1,!n)return r;for(t=0,e=u.length;e>t&&(d=u[t],r=null!=n[d]&&"function"==typeof n[d],r);t++);return r},s=function(n,r){var t,e,i,g;for(null==o[n]&&(o[n]=c(n)),t=o[n],g={},e=0,i=u.length;i>e;e++)d=u[e],g[d]="debug"===d?t:r[d];return g},i=function(){function n(n){var i,o,s,f,h;if(this.$log=n,this.spawn=t(this.spawn,this),!this.$log)throw"internalLogger undefined";if(!g(this.$log))throw"@$log is invalid";for(this.doLog=!0,h={},i=function(n){return function(t){return h[t]=function(){var i;return i=1<=arguments.length?e.call(arguments,0):[],n.doLog?l(r[t],n.currentLevel,function(){var r;return(r=n.$log)[t].apply(r,i)}):void 0},n[t]=h[t]}}(this),o=0,s=u.length;s>o;o++)f=u[o],i(f);this.LEVELS=r,this.currentLevel=r.error}return n.prototype.spawn=function(r){if("string"==typeof r){if(!g(this.$log))throw"@$log is invalid";if(!c)throw"nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!";return s(r,this.$log)}return new n(r||this.$log)},n}(),this.decorator=["$log",function(n){var t;return t=new i(n),t.currentLevel=r.debug,t}],this.$get=["$log",function(n){return new i(n)}],this}])}(window,angular);
+/*!
+*  ui-leaflet 2.0.0 2016-10-04
+*  ui-leaflet - An AngularJS directive to easily interact with Leaflet maps
+*  git: https://github.com/angular-ui/ui-leaflet
+*/
+!function(a){"use strict";a.module("ui-leaflet",["nemLogging"]).directive("leaflet",["$q","leafletData","leafletMapDefaults","leafletHelpers","leafletMapEvents",function(a,b,c,d,e){return{restrict:"EA",replace:!0,scope:{center:"=",lfCenter:"=",defaults:"=",maxbounds:"=",bounds:"=",markers:"=",legend:"=",geojson:"=",paths:"=",tiles:"=",layers:"=",controls:"=",decorations:"=",eventBroadcast:"=",watchOptions:"=",id:"@"},transclude:!0,template:'<div class="angular-leaflet-map"><div ng-transclude></div></div>',controller:["$scope",function(b){this._leafletMap=a.defer(),this.getMap=function(){return this._leafletMap.promise},this.getLeafletScope=function(){return b}}],link:function(a,f,g,h){function i(){isNaN(g.width)?f.css("width",g.width):f.css("width",g.width+"px")}function j(){isNaN(g.height)?f.css("height",g.height):f.css("height",g.height+"px")}var k=d.isDefined,l=c.setDefaults(a.defaults,g.id),m=e.getAvailableMapEvents(),n=e.addEvents;a.mapId=g.id,b.setDirectiveControls({},g.id);var o=new L.Map(f[0],c.getMapCreationDefaults(g.id));if(h._leafletMap.resolve(o),k(g.width)&&(i(),a.$watch(function(){return f[0].getAttribute("width")},function(){i(),o.invalidateSize()})),k(g.height)&&(j(),a.$watch(function(){return f[0].getAttribute("height")},function(){j(),o.invalidateSize()})),k(g.center)||k(g.lfCenter)||o.setView([l.center.lat,l.center.lng],l.center.zoom),!k(g.tiles)&&!k(g.layers)){var p=L.tileLayer(l.tileLayer,l.tileLayerOptions);p.addTo(o),b.setTiles(p,g.id)}if(k(o.zoomControl)&&k(l.zoomControlPosition)&&o.zoomControl.setPosition(l.zoomControlPosition),k(o.zoomControl)&&l.zoomControl===!1&&o.zoomControl.removeFrom(o),k(o.zoomsliderControl)&&k(l.zoomsliderControl)&&l.zoomsliderControl===!1&&o.zoomsliderControl.removeFrom(o),!k(g.eventBroadcast)){var q="broadcast";n(o,g.id,m,"eventName",a,q)}o.whenReady(function(){b.setMap(o,g.id)}),a.$on("$destroy",function(){c.reset(),o.remove(),b.unresolveMap(g.id)}),a.$on("invalidateSize",function(){o.invalidateSize()})}}}]),function(){a.module("ui-leaflet").factory("eventManager",[function(){var a=function(){this.listeners={}};return a.prototype={addEventListener:function(a,b,c){for(var d=[],e=arguments.length,f=0;f<e;f++)d.push(arguments[f]);d=d.length>3?d.splice(3,d.length-1):[],"undefined"!=typeof this.listeners[a]?this.listeners[a].push({scope:c,callback:b,args:d}):this.listeners[a]=[{scope:c,callback:b,args:d}]},removeEventListener:function(a,b,c){if("undefined"!=typeof this.listeners[a]){for(var d=this.listeners[a].length,e=[],f=0;f<d;f++){var g=this.listeners[a][f];g.scope===c&&g.callback===b||e.push(g)}this.listeners[a]=e}},hasEventListener:function(a,b,c){if("undefined"!=typeof this.listeners[a]){var d=this.listeners[a].length;if(void 0===b&&void 0===c)return d>0;for(var e=0;e<d;e++){var f=this.listeners[a][e];if((!c||f.scope===c)&&f.callback===b)return!0}}return!1},dispatch:function(a,b){for(var c=0,d={type:a,target:b},e=[],f=arguments.length,g=0;g<f;g++)e.push(arguments[g]);if(e=e.length>2?e.splice(2,e.length-1):[],e=[d].concat(e),"undefined"!=typeof this.listeners[a])for(var h=this.listeners[a].length,i=0;i<h;i++){var j=this.listeners[a][i];if(j&&j.callback){var k=e.concat(j.args);j.callback.apply(j.scope,k),c+=1}}},getEvents:function(){var a="";for(var b in this.listeners)for(var c=this.listeners[b].length,d=0;d<c;d++){var e=this.listeners[b][d];a+=e.scope&&e.scope.className?e.scope.className:"anonymous",a+=" listen for '"+b+"'\n"}return a}},a}]).service("eventManager",["EventManager",function(a){return new a}])}(),a.module("ui-leaflet").factory("leafletBoundsHelpers",["leafletLogger","leafletHelpers",function(b,c){function d(b){return a.isDefined(b)&&a.isDefined(b.southWest)&&a.isDefined(b.northEast)&&a.isNumber(b.southWest.lat)&&a.isNumber(b.southWest.lng)&&a.isNumber(b.northEast.lat)&&a.isNumber(b.northEast.lng)}var e=c.isArray,f=c.isNumber,g=c.isFunction,h=c.isDefined,i=b;return{createLeafletBounds:function(a){if(d(a))return L.latLngBounds([a.southWest.lat,a.southWest.lng],[a.northEast.lat,a.northEast.lng])},isValidBounds:d,createBoundsFromArray:function(a){return e(a)&&2===a.length&&e(a[0])&&e(a[1])&&2===a[0].length&&2===a[1].length&&f(a[0][0])&&f(a[0][1])&&f(a[1][0])&&f(a[1][1])?{northEast:{lat:a[0][0],lng:a[0][1]},southWest:{lat:a[1][0],lng:a[1][1]}}:void i.error("[AngularJS - Leaflet] The bounds array is not valid.")},createBoundsFromLeaflet:function(a){if(!(h(a)&&g(a.getNorthEast)&&g(a.getSouthWest)))return void i.error("[AngularJS - Leaflet] The leaflet bounds is not valid object.");var b=a.getNorthEast(),c=a.getSouthWest();return{northEast:{lat:b.lat,lng:b.lng},southWest:{lat:c.lat,lng:c.lng}}}}}]),a.module("ui-leaflet").factory("leafletControlHelpers",["$rootScope","leafletLogger","leafletHelpers","leafletLayerHelpers","leafletMapDefaults",function(b,c,d,e,f){var g=d.isDefined,h=d.isObject,i=e.createLayer,j={},k=d.errorHeader+" [Controls] ",l=c,m=function(a,b,c){var d=f.getDefaults(c);if(!d.controls.layers.visible)return!1;var e=!1;return h(a)&&Object.keys(a).forEach(function(b){var c=a[b];g(c.layerOptions)&&c.layerOptions.showOnSelector===!1||(e=!0)}),h(b)&&Object.keys(b).forEach(function(a){var c=b[a];g(c.layerParams)&&c.layerParams.showOnSelector===!1||(e=!0)}),e},n=function(b){var c=f.getDefaults(b),d={collapsed:c.controls.layers.collapsed,position:c.controls.layers.position,autoZIndex:!1};a.extend(d,c.controls.layers.options);var e;return e=c.controls.layers&&g(c.controls.layers.control)?c.controls.layers.control.apply(this,[[],[],d]):new L.control.layers([],[],d)},o={draw:{isPluginLoaded:function(){return!!a.isDefined(L.Control.Draw)||(l.error(k+" Draw plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Draw(a)}},scale:{isPluginLoaded:function(){return!0},checkValidParams:function(){return!0},createControl:function(a){return new L.control.scale(a)}},fullscreen:{isPluginLoaded:function(){return!!a.isDefined(L.Control.Fullscreen)||(l.error(k+" Fullscreen plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Fullscreen(a)}},search:{isPluginLoaded:function(){return!!a.isDefined(L.Control.Search)||(l.error(k+" Search plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(a){return new L.Control.Search(a)}},custom:{},minimap:{isPluginLoaded:function(){return!!a.isDefined(L.Control.MiniMap)||(l.error(k+" Minimap plugin is not loaded."),!1)},checkValidParams:function(a){return!!g(a.layer)||(l.warn(k+' minimap "layer" option should be defined.'),!1)},createControl:function(a){var b=i(a.layer);return g(b)?new L.Control.MiniMap(b,a):void l.warn(k+' minimap control "layer" could not be created.')}}};return{layersControlMustBeVisible:m,isValidControlType:function(a){return Object.keys(o).indexOf(a)!==-1},createControl:function(a,b){if(o[a].checkValidParams(b))return o[a].createControl(b)},updateLayersControl:function(a,b,c,d,e,f){var h,i=j[b],k=m(d,e,b);if(g(i)&&c){for(h in f.baselayers)i.removeLayer(f.baselayers[h]);for(h in f.overlays)i.removeLayer(f.overlays[h]);a.removeControl(i),delete j[b]}if(k){i=n(b),j[b]=i;for(h in d){var l=g(d[h].layerOptions)&&d[h].layerOptions.showOnSelector===!1;!l&&g(f.baselayers[h])&&i.addBaseLayer(f.baselayers[h],d[h].name)}for(h in e){var o=g(e[h].layerParams)&&e[h].layerParams.showOnSelector===!1;!o&&g(f.overlays[h])&&i.addOverlay(f.overlays[h],e[h].name)}a.addControl(i)}return k},destroyMapLayersControl:function(a){delete j[a]}}}]),a.module("ui-leaflet").service("leafletData",["leafletLogger","$q","leafletHelpers",function(a,b,c){var d=c.getDefer,e=c.getUnresolvedDefer,f=c.setResolvedDefer,g={},h=this,i=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},j=["map","tiles","layers","paths","markers","geoJSON","UTFGrid","decorations","directiveControls"];j.forEach(function(a){g[a]={}}),this.unresolveMap=function(a){var b=c.obtainEffectiveMapId(g.map,a);j.forEach(function(a){g[a][b]=void 0})},j.forEach(function(a){var b=i(a);h["set"+b]=function(b,c){var d=e(g[a],c);d.resolve(b),f(g[a],c)},h["get"+b]=function(b){var c=d(g[a],b);return c.promise}})}]),a.module("ui-leaflet").service("leafletDirectiveControlsHelpers",["leafletLogger","leafletData","leafletHelpers",function(b,c,d){var e=d.isDefined,f=d.isString,g=d.isObject,h=d.errorHeader,i=b,j=h+"[leafletDirectiveControlsHelpers",k=function(b,d,h,k){var l=j+".extend] ",m={};if(!e(d))return void i.error(l+"thingToAddName cannot be undefined");if(f(d)&&e(h)&&e(k))m[d]={create:h,clean:k};else{if(!g(d)||e(h)||e(k))return void i.error(l+"incorrect arguments");m=d}c.getDirectiveControls().then(function(d){a.extend(d,m),c.setDirectiveControls(d,b)})};return{extend:k}}]),a.module("ui-leaflet").service("leafletGeoJsonHelpers",["leafletHelpers","leafletIterators",function(b,c){var d=b,e=c,f=function(a,b){return this.lat=a,this.lng=b,this},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:d.isDefined(a.type)&&"Point"===a.type?+a.coordinates[1]:+a.lat},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:d.isDefined(a.type)&&"Point"===a.type?+a.coordinates[0]:+a.lng},i=function(a){if(d.isUndefined(a))return!1;if(d.isArray(a)){if(2===a.length&&d.isNumber(a[0])&&d.isNumber(a[1]))return!0}else if(d.isDefined(a.type)&&"Point"===a.type&&d.isArray(a.coordinates)&&2===a.coordinates.length&&d.isNumber(a.coordinates[0])&&d.isNumber(a.coordinates[1]))return!0;var b=e.all(["lat","lng"],function(b){return d.isDefined(a[b])&&d.isNumber(a[b])});return b},j=function(b){if(b&&i(b)){var c=null;if(Array.isArray(b)&&2===b.length)c=new f(b[1],b[0]);else{if(!d.isDefined(b.type)||"Point"!==b.type)return b;c=new f(b.coordinates[1],b.coordinates[0])}return a.extend(b,c)}};return{getLat:g,getLng:h,validateCoords:i,getCoords:j}}]),a.module("ui-leaflet").service("leafletHelpers",["$q","$log","$timeout",function(b,c,d){function e(b,d){var e,f;if(a.isDefined(d))e=d;else if(0===Object.keys(b).length)e="main";else if(Object.keys(b).length>=1)for(f in b)b.hasOwnProperty(f)&&(e=f);else c.error(g+"- You have more than 1 map on the DOM, you must provide the map ID to the leafletData.getXXX call");return e}function f(c,d){var f,g=e(c,d);return a.isDefined(c[g])&&c[g].resolvedDefer!==!0?f=c[g].defer:(f=b.defer(),c[g]={defer:f,resolvedDefer:!1}),f}var g="[ui-leaflet] ",h=a.copy,i=h,j=function(b,c){var d;if(b&&a.isObject(b))return null!==c&&a.isString(c)?(d=b,c.split(".").forEach(function(a){d&&(d=d[a])}),d):c},k=function(a){return a.split(".").reduce(function(a,b){return a+'["'+b+'"]'})},l=function(a){return a.reduce(function(a,b){return a+"."+b})},m=function(b){return a.isDefined(b)&&null!==b},n=function(a){return!m(a)},o=/([\:\-\_]+(.))/g,p=/^moz([A-Z])/,q=/^((?:x|data)[\:\-_])/i,r=function(a){return a.replace(o,function(a,b,c,d){return d?c.toUpperCase():c}).replace(p,"Moz$1")},s=function(a){return r(a.replace(q,""))},t=10,u=function(a,b,c){if(!a)throw new Error(g+"trapObj is undefined");if(!b)throw new Error(g+"trapField is undefined");a[b]=!0;var e=c();return d(function(){a[b]=!1},t),e};return{watchTrapDelayMilliSec:t,modelChangeInDirective:u,camelCase:r,directiveNormalize:s,copy:h,clone:i,errorHeader:g,getObjectValue:j,getObjectArrayPath:k,getObjectDotPath:l,defaultTo:function(a,b){return m(a)?a:b},isTruthy:function(a){return"true"===a||a===!0},isEmpty:function(a){return 0===Object.keys(a).length},isUndefinedOrEmpty:function(b){return a.isUndefined(b)||null===b||0===Object.keys(b).length},isDefined:m,isUndefined:n,isNumber:a.isNumber,isString:a.isString,isArray:a.isArray,isObject:a.isObject,isFunction:a.isFunction,equals:a.equals,isValidCenter:function(b){return a.isDefined(b)&&a.isNumber(b.lat)&&a.isNumber(b.lng)&&a.isNumber(b.zoom)},isValidPoint:function(b){return!!a.isDefined(b)&&(a.isArray(b)?2===b.length&&a.isNumber(b[0])&&a.isNumber(b[1]):a.isNumber(b.lat)&&a.isNumber(b.lng))},isSameCenterOnMap:function(a,b){var c=b.getCenter(),d=b.getZoom();return!(!a.lat||!a.lng||c.lat.toFixed(4)!==a.lat.toFixed(4)||c.lng.toFixed(4)!==a.lng.toFixed(4)||d!==a.zoom)},safeApply:function(a,b){var c=a.$root.$$phase;"$apply"===c||"$digest"===c?a.$eval(b):a.$evalAsync(b)},obtainEffectiveMapId:e,getDefer:function(b,c){var d,g=e(b,c);return d=a.isDefined(b[g])&&b[g].resolvedDefer!==!1?b[g].defer:f(b,c)},getUnresolvedDefer:f,setResolvedDefer:function(a,b){var c=e(a,b);a[c].resolvedDefer=!0},rangeIsSupported:function(){var a=document.createElement("input");return a.setAttribute("type","range"),"range"===a.type},FullScreenControlPlugin:{isLoaded:function(){return a.isDefined(L.Control.Fullscreen)}},MiniMapControlPlugin:{isLoaded:function(){return a.isDefined(L.Control.MiniMap)}},AwesomeMarkersPlugin:{isLoaded:function(){return a.isDefined(L.AwesomeMarkers)&&a.isDefined(L.AwesomeMarkers.Icon)},is:function(a){return!!this.isLoaded()&&a instanceof L.AwesomeMarkers.Icon},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},VectorMarkersPlugin:{isLoaded:function(){return a.isDefined(L.VectorMarkers)&&a.isDefined(L.VectorMarkers.Icon)},is:function(a){return!!this.isLoaded()&&a instanceof L.VectorMarkers.Icon},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},DomMarkersPlugin:{isLoaded:function(){return!(!a.isDefined(L.DomMarkers)||!a.isDefined(L.DomMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.DomMarkers.Icon},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},PolylineDecoratorPlugin:{isLoaded:function(){return!!a.isDefined(L.PolylineDecorator)},is:function(a){return!!this.isLoaded()&&a instanceof L.PolylineDecorator},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},MakiMarkersPlugin:{isLoaded:function(){return!(!a.isDefined(L.MakiMarkers)||!a.isDefined(L.MakiMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.MakiMarkers.Icon},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},ExtraMarkersPlugin:{isLoaded:function(){return!(!a.isDefined(L.ExtraMarkers)||!a.isDefined(L.ExtraMarkers.Icon))},is:function(a){return!!this.isLoaded()&&a instanceof L.ExtraMarkers.Icon},equal:function(b,c){return!!this.isLoaded()&&(!!this.is(b)&&a.equals(b,c))}},LabelPlugin:{isLoaded:function(){return a.isDefined(L.Label)},is:function(a){return!!this.isLoaded()&&a instanceof L.MarkerClusterGroup}},MarkerClusterPlugin:{isLoaded:function(){return a.isDefined(L.MarkerClusterGroup)},is:function(a){return!!this.isLoaded()&&a instanceof L.MarkerClusterGroup}},GeoJSONPlugin:{isLoaded:function(){return a.isDefined(L.TileLayer.GeoJSON)},is:function(a){return!!this.isLoaded()&&a instanceof L.TileLayer.GeoJSON}},CartoDB:{isLoaded:function(){return cartodb},is:function(){return!0}},Leaflet:{DivIcon:{is:function(a){return a instanceof L.DivIcon},equal:function(b,c){return!!this.is(b)&&a.equals(b,c)}},Icon:{is:function(a){return a instanceof L.Icon},equal:function(b,c){return!!this.is(b)&&a.equals(b,c)}}},watchOptions:{type:"watchDeep",individual:{type:"watchDeep"}}}}]),a.module("ui-leaflet").service("leafletIterators",["leafletLogger","leafletHelpers",function(a,b){var c,d=b,e=b.errorHeader+"leafletIterators: ",f=Object.keys,g=d.isFunction,h=d.isObject,i=a,j=Math.pow(2,53)-1,k=function(a){var b=null!==a&&a.length;return d.isNumber(b)&&b>=0&&b<=j},l=function(a){return a},m=function(a){return function(b){return null===b?void 0:b[a]}},n=function(a,b,c){if(void 0===b)return a;switch(null===c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},o=function(a,b){return function(c){var d=arguments.length;if(d<2||null===c)return c;for(var e=1;e<d;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;i<h;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},p=null;c=p=o(f);var q,r=function(a,b){var c=f(b),d=c.length;if(null===a)return!d;for(var e=Object(a),g=0;g<d;g++){var h=c[g];if(b[h]!==e[h]||!(h in e))return!1}return!0},s=null;q=s=function(a){return a=c({},a),function(b){return r(b,a)}};var t,u=function(a,b,c){return null===a?l:g(a)?n(a,b,c):h(a)?q(a):m(a)},v=null;t=v=function(a,b,c){b=u(b,c);for(var d=!k(a)&&f(a),e=(d||a).length,g=0;g<e;g++){var h=d?d[g]:g;if(!b(a[h],h,a))return!1}return!0};var w=function(a,b,c,f){return!(c||d.isDefined(a)&&d.isDefined(b))||!d.isFunction(b)&&(f=d.defaultTo(b,"cb"),i.error(e+f+" is not a function"),!0)},x=function(a,b,c){if(!w(void 0,c,!0,"internalCb")&&!w(a,b))for(var d in a)a.hasOwnProperty(d)&&c(a[d],d)},y=function(a,b){x(a,b,function(a,c){b(a,c)})};return{each:y,forEach:y,every:t,all:v}}]),a.module("ui-leaflet").factory("leafletLayerHelpers",["$rootScope","$q","leafletLogger","leafletHelpers","leafletIterators",function(b,c,d,e,f){function g(a){return l(a.type)?Object.keys(t).indexOf(a.type)===-1?(r.error("[AngularJS - Leaflet] A layer must have a valid type: "+Object.keys(t)),!1):t[a.type].mustHaveUrl&&!l(a.url)?(r.error("[AngularJS - Leaflet] A base layer must have an url"),!1):t[a.type].mustHaveData&&!o(a.data)?(r.error('[AngularJS - Leaflet] The base layer must have a "data" array attribute'),!1):t[a.type].mustHaveLayer&&!o(a.layer)?(r.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have an layer defined"),!1):t[a.type].mustHaveBounds&&!o(a.bounds)?(r.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have bounds defined"),!1):!(t[a.type].mustHaveKey&&!o(a.key))||(r.error("[AngularJS - Leaflet] The type of layer "+a.type+" must have key defined"),!1):(r.error("[AngularJS - Leaflet] A layer must have a valid type defined."),!1)}function h(a){if(g(a)){if(!l(a.name))return void r.error("[AngularJS - Leaflet] A base layer must have a name");m(a.layerParams)||(a.layerParams={}),m(a.layerOptions)||(a.layerOptions={});for(var b in a.layerParams)a.layerOptions[b]=a.layerParams[b];var c={url:a.url,data:a.data,options:a.layerOptions,layer:a.layer,icon:a.icon,type:a.layerType,bounds:a.bounds,key:a.key,apiKey:a.apiKey,pluginOptions:a.pluginOptions,user:a.user,$parent:a};return t[a.type].createLayer(c)}}function i(a,b){b&&"function"==typeof b.addTo?b.addTo(a):a.addLayer(b)}function j(b,c,d){if(o(d)&&o(d.loadedDefer))if(a.isFunction(d.loadedDefer)){var e=d.loadedDefer();r.debug("Loaded Deferred",e);var f=e.length;if(f>0)for(var g=function(){f--,0===f&&b.removeLayer(c)},h=0;h<e.length;h++)e[h].promise.then(g);else b.removeLayer(c)}else d.loadedDefer.promise.then(function(){b.removeLayer(c)});else b.removeLayer(c)}var k=e,l=e.isString,m=e.isObject,n=e.isArray,o=e.isDefined,p=e.errorHeader,q=f,r=d,s=function(c){if(!k.UTFGridPlugin.isLoaded())return void r.error("[AngularJS - Leaflet] The UTFGrid plugin is not loaded.");var d=new L.UtfGrid(c.url,c.pluginOptions),e={model:c.$parent};return d.on("mouseover",function(c){a.extend(e,{leafletEvent:c,leafletObject:c.target}),b.$broadcast("leafletDirectiveMap.utfgridMouseover",e)}),d.on("mouseout",function(c){a.extend(e,{leafletEvent:c,leafletObject:c.target}),b.$broadcast("leafletDirectiveMap.utfgridMouseout",e)}),d.on("click",function(c){a.extend(e,{leafletEvent:c,leafletObject:c.target}),b.$broadcast("leafletDirectiveMap.utfgridClick",e)}),d.on("mousemove",function(c){a.extend(e,{leafletEvent:c,leafletObject:c.target}),b.$broadcast("leafletDirectiveMap.utfgridMousemove",e)}),d},t={xyz:{mustHaveUrl:!0,createLayer:function(a){return L.tileLayer(a.url,a.options)}},geoJSON:{mustHaveUrl:!0,createLayer:function(a){if(k.GeoJSONPlugin.isLoaded())return new L.TileLayer.GeoJSON(a.url,a.pluginOptions,a.options)}},geoJSONShape:{mustHaveUrl:!1,createLayer:function(a){return new L.GeoJSON(a.data,a.options)}},geoJSONAwesomeMarker:{mustHaveUrl:!1,createLayer:function(a){return new L.geoJson(a.data,{pointToLayer:function(b,c){return L.marker(c,{icon:L.AwesomeMarkers.icon(a.icon)})}})}},geoJSONVectorMarker:{mustHaveUrl:!1,createLayer:function(a){return new L.geoJson(a.data,{pointToLayer:function(b,c){return L.marker(c,{icon:L.VectorMarkers.icon(a.icon)})}})}},cartodbTiles:{mustHaveKey:!0,createLayer:function(a){var b=o(a.url)?a.url+"/"+a.user:"//"+a.user+".cartodb.com";return b+="/api/v1/map/"+a.key+"/{z}/{x}/{y}.png",L.tileLayer(b,a.options)}},cartodbUTFGrid:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(a){var b=o(a.url)?a.url+"/"+a.user:"//"+a.user+".cartodb.com";return a.url=b+"/api/v1/map/"+a.key+"/"+a.layer+"/{z}/{x}/{y}.grid.json",s(a)}},cartodbInteractive:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(b){var c=o(b.url)?b.url+"/"+b.user:"//"+b.user+".cartodb.com",d=c+"/api/v1/map/"+b.key+"/{z}/{x}/{y}.png",e=L.tileLayer(d,b.options),f=[e],g=function(b,d,e){var f=a.copy(d);f.url=c+"/api/v1/map/"+f.key+"/"+e+"/{z}/{x}/{y}.grid.json",b.push(s(f))};if(n(b.layer))for(var h=0;h<b.layer.length;h++)g(f,b,b.layer[h]);else g(f,b,b.layer);return L.layerGroup(f)}},wms:{mustHaveUrl:!0,createLayer:function(a){return L.tileLayer.wms(a.url,a.options)}},wmts:{mustHaveUrl:!0,createLayer:function(a){return L.tileLayer.wmts(a.url,a.options)}},group:{mustHaveUrl:!1,createLayer:function(a){var b=[];return q.each(a.options.layers,function(a){b.push(h(a))}),a.options.loadedDefer=function(){var b=[];if(o(a.options.layers))for(var c=0;c<a.options.layers.length;c++){var d=a.options.layers[c].layerOptions.loadedDefer;o(d)&&b.push(d)}return b},L.layerGroup(b)}},featureGroup:{mustHaveUrl:!1,createLayer:function(){return L.featureGroup()}},markercluster:{mustHaveUrl:!1,createLayer:function(a){return k.MarkerClusterPlugin.isLoaded()?new L.MarkerClusterGroup(a.options):void r.warn(p+" The markercluster plugin is not loaded.")}},imageOverlay:{mustHaveUrl:!0,mustHaveBounds:!0,createLayer:function(a){return L.imageOverlay(a.url,a.bounds,a.options)}},iip:{mustHaveUrl:!0,createLayer:function(a){return L.tileLayer.iip(a.url,a.options)}},custom:{createLayer:function(b){return b.layer instanceof L.Class?a.copy(b.layer):void r.error("[AngularJS - Leaflet] A custom layer must be a leaflet Class")}},cartodb:{mustHaveUrl:!0,createLayer:function(a){return cartodb.createLayer(a.map,a.url)}}},u=function(a){return function(b){o(b.setOpacity)&&b.setOpacity(a)}};return{createLayer:h,layerTypes:t,safeAddLayer:i,safeRemoveLayer:j,changeOpacityListener:u}}]),a.module("ui-leaflet").factory("leafletLegendHelpers",["$http","$q","$log","leafletHelpers",function(a,b,c,d){var e={},f=d.isDefined,g=function b(c){var d=e[c],f=d[0];a(f.c).then(function(a){d.shift(),f.d.resolve(a),d.length>0&&b(c)},function(a){d.shift(),f.d.reject(a),d.length>0&&b(c)})},h=function(a,b,c,d){if(a.innerHTML="",b.error)a.innerHTML+='<div class="info-title alert alert-danger">'+b.error.message+"</div>";else if("arcgis"===c)for(var e=0;e<b.layers.length;e++){var f=b.layers[e];a.innerHTML+='<div class="info-title" data-layerid="'+f.layerId+'">'+f.layerName+"</div>";for(var g=0;g<f.legend.length;g++){var h=f.legend[g];a.innerHTML+='<div class="inline" data-layerid="'+f.layerId+'"><img src="data:'+h.contentType+";base64,"+h.imageData+'" /></div><div class="info-label" data-layerid="'+f.layerId+'">'+h.label+"</div>"}}else"image"===c&&(a.innerHTML='<img src="'+d+'"/>')},i=function(a,b,c,d){return function(){var e=L.DomUtil.create("div",b);return L.Browser.touch?L.DomEvent.on(e,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(e),L.DomEvent.on(e,"mousewheel",L.DomEvent.stopPropagation)),h(e,a,c,d),e}},j=function(a,b){return function(){for(var c=L.DomUtil.create("div",b),d=0;d<a.colors.length;d++)c.innerHTML+='<div class="outline"><i style="background:'+a.colors[d]+'"></i></div><div class="info-label">'+a.labels[d]+"</div>";return L.Browser.touch?L.DomEvent.on(c,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(c),L.DomEvent.on(c,"mousewheel",L.DomEvent.stopPropagation)),c}};return{getOnAddLegend:i,getOnAddArrayLegend:j,updateLegend:h,addLegendURL:function(a,c){var d=b.defer();return f(e[a])||(e[a]=[]),e[a].push({c:c,d:d}),1===e[a].length&&g(a),d.promise}}}]),a.module("ui-leaflet").factory("leafletMapDefaults",["$q","leafletHelpers",function(b,c){function d(){return{keyboard:!0,dragging:!0,worldCopyJump:!1,doubleClickZoom:!0,scrollWheelZoom:!0,tap:!0,touchZoom:!0,zoomControl:!0,zoomsliderControl:!1,zoomControlPosition:"topleft",attributionControl:!0,controls:{layers:{visible:!0,position:"topright",collapsed:!0}},nominatim:{server:" http://nominatim.openstreetmap.org/search"},crs:L.CRS.EPSG3857,tileLayer:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileLayerOptions:{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},path:{weight:10,opacity:1,color:"#0000ff"},center:{lat:0,lng:0,zoom:1},trackResize:!0}}var e=c.isDefined,f=c.isObject,g=c.obtainEffectiveMapId,h={};return{reset:function(){h={}},getDefaults:function(a){var b=g(h,a);return h[b]},getMapCreationDefaults:function(a){var b=g(h,a),c=h[b],d={maxZoom:c.maxZoom,keyboard:c.keyboard,dragging:c.dragging,zoomControl:c.zoomControl,doubleClickZoom:c.doubleClickZoom,scrollWheelZoom:c.scrollWheelZoom,tap:c.tap,touchZoom:c.touchZoom,attributionControl:c.attributionControl,worldCopyJump:c.worldCopyJump,crs:c.crs,trackResize:c.trackResize};if(e(c.minZoom)&&(d.minZoom=c.minZoom),e(c.zoomAnimation)&&(d.zoomAnimation=c.zoomAnimation),e(c.fadeAnimation)&&(d.fadeAnimation=c.fadeAnimation),e(c.markerZoomAnimation)&&(d.markerZoomAnimation=c.markerZoomAnimation),c.map)for(var f in c.map)d[f]=c.map[f];return d},setDefaults:function(b,c){var i=d();e(b)&&(i.doubleClickZoom=e(b.doubleClickZoom)?b.doubleClickZoom:i.doubleClickZoom,i.scrollWheelZoom=e(b.scrollWheelZoom)?b.scrollWheelZoom:i.doubleClickZoom,i.tap=e(b.tap)?b.tap:i.tap,i.touchZoom=e(b.touchZoom)?b.touchZoom:i.doubleClickZoom,i.zoomControl=e(b.zoomControl)?b.zoomControl:i.zoomControl,i.zoomsliderControl=e(b.zoomsliderControl)?b.zoomsliderControl:i.zoomsliderControl,i.attributionControl=e(b.attributionControl)?b.attributionControl:i.attributionControl,i.tileLayer=e(b.tileLayer)?b.tileLayer:i.tileLayer,i.zoomControlPosition=e(b.zoomControlPosition)?b.zoomControlPosition:i.zoomControlPosition,i.keyboard=e(b.keyboard)?b.keyboard:i.keyboard,i.dragging=e(b.dragging)?b.dragging:i.dragging,i.trackResize=e(b.trackResize)?b.trackResize:i.trackResize,e(b.controls)&&a.extend(i.controls,b.controls),f(b.crs)?i.crs=b.crs:e(L.CRS[b.crs])&&(i.crs=L.CRS[b.crs]),e(b.center)&&a.copy(b.center,i.center),e(b.tileLayerOptions)&&a.copy(b.tileLayerOptions,i.tileLayerOptions),e(b.maxZoom)&&(i.maxZoom=b.maxZoom),e(b.minZoom)&&(i.minZoom=b.minZoom),e(b.zoomAnimation)&&(i.zoomAnimation=b.zoomAnimation),e(b.fadeAnimation)&&(i.fadeAnimation=b.fadeAnimation),e(b.markerZoomAnimation)&&(i.markerZoomAnimation=b.markerZoomAnimation),e(b.worldCopyJump)&&(i.worldCopyJump=b.worldCopyJump),e(b.map)&&(i.map=b.map),e(b.path)&&(i.path=b.path));var j=g(h,c);return h[j]=i,i}}}]),a.module("ui-leaflet").service("leafletMarkersHelpers",["$rootScope","$timeout","leafletHelpers","leafletLogger","$compile","leafletGeoJsonHelpers","leafletWatchHelpers",function(b,c,d,e,f,g,h){var i=d.isDefined,j=d.defaultTo,k=d.MarkerClusterPlugin,l=d.AwesomeMarkersPlugin,m=d.VectorMarkersPlugin,n=d.MakiMarkersPlugin,o=d.ExtraMarkersPlugin,p=d.DomMarkersPlugin,q=d.safeApply,r=d,s=d.isString,t=d.isNumber,u=d.isObject,v={},w=g,x=d.errorHeader,y=h.maybeWatch,z=e,A=function(a){var b="";return["_icon","_latlng","_leaflet_id","_map","_shadow"].forEach(function(c){b+=c+": "+j(a[c],"undefined")+" \n"}),"[leafletMarker] : \n"+b},B=function(a,b){var c=b?console:z;c.debug(A(a))},C=function(b){return a.element(v[b]._map._container).parent().length>0},D=function(c){if(i(c)&&i(c.type)&&"awesomeMarker"===c.type)return l.isLoaded()||z.error(x+" The AwesomeMarkers Plugin is not loaded."),new L.AwesomeMarkers.icon(c);if(i(c)&&i(c.type)&&"vectorMarker"===c.type)return m.isLoaded()||z.error(x+" The VectorMarkers Plugin is not loaded."),new L.VectorMarkers.icon(c);if(i(c)&&i(c.type)&&"makiMarker"===c.type)return n.isLoaded()||z.error(x+"The MakiMarkers Plugin is not loaded."),new L.MakiMarkers.icon(c);if(i(c)&&i(c.type)&&"extraMarker"===c.type)return o.isLoaded()||z.error(x+"The ExtraMarkers Plugin is not loaded."),new L.ExtraMarkers.icon(c);if(i(c)&&i(c.type)&&"div"===c.type)return new L.divIcon(c);if(i(c)&&i(c.type)&&"dom"===c.type){p.isLoaded()||z.error(x+"The DomMarkers Plugin is not loaded.");var d=a.isFunction(c.getMarkerScope)?c.getMarkerScope().$new():b,e=f(c.template)(d),g=a.copy(c);return g.ngElement=e,g.element=e[0],a.isFunction(c.getMarkerScope)&&(g.scope=d),new L.DomMarkers.icon(g)}if(i(c)&&i(c.type)&&"icon"===c.type)return c.icon;var h="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13RCmsoBwEqzGcZsxsvCSy/9wJKf7UWf1mEY8JWfewc67UUoDbDjQC+FqK4QqLVMGGR9d2wurKzqBk3nqIT/9zLxRRjgZ9bqQgub+DdoeCC03Q8j+0QhFhBHR/eP3U/zCln7Uu+hihJ1+bBNffLIvmkyP0gpBZWYXhKussK6mBz5HT6M1Nqpcp+mBCPXosYQfrekGvrjewd59/GvKCE7TbK/04/ZV5QZYVWmDwH1mF3xa2Q3ra3DBC5vBT1oP7PTj4C0+CcL8c7C2CtejqhuCnuIQHaKHzvcRfZpnylFfXsYJx3pNLwhKzRAwAhEqG0SpusBHfAKkxw3w4627MPhoCH798z7s0ZnBJ/MEJbZSbXPhER2ih7p2ok/zSj2cEJDd4CAe+5WYnBCgR2uruyEw6zRoW6/DWJ/OeAP8pd/BGtzOZKpG8oke0SX6GMmRk6GFlyAc59K32OTEinILRJRchah8HQwND8N435Z9Z0FY1EqtxUg+0SO6RJ/mmXz4VuS+DpxXC3gXmZwIL7dBSH4zKE50wESf8qwVgrP1EIlTO5JP9Igu0aexdh28F1lmAEGJGfh7jE6ElyM5Rw/FDcYJjWhbeiBYoYNIpc2FT/SILivp0F1ipDWk4BIEo2VuodEJUifhbiltnNBIXPUFCMpthtAyqws/BPlEF/VbaIxErdxPphsU7rcCp8DohC+GvBIPJS/tW2jtvTmmAeuNO8BNOYQeG8G/2OzCJ3q+soYB5i6NhMaKr17FSal7GIHheuV3uSCY8qYVuEm1cOzqdWr7ku/R0BDoTT+DT+ohCM6/CCvKLKO4RI+dXPeAuaMqksaKrZ7L3FE5FIFbkIceeOZ2OcHO6wIhTkNo0ffgjRGxEqogXHYUPHfWAC/lADpwGcLRY3aeK4/oRGCKYcZXPVoeX/kelVYY8dUGf8V5EBRbgJXT5QIPhP9ePJi428JKOiEYhYXFBqou2Guh+p/mEB1/RfMw6rY7cxcjTrneI1FrDyuzUSRm9miwEJx8E/gUmqlyvHGkneiwErR21F3tNOK5Tf0yXaT+O7DgCvALTUBXdM4YhC/IawPU+2PduqMvuaR6eoxSwUk75ggqsYJ7VicsnwGIkZBSXKOUww73WGXyqP+J2/b9c+gi1YAg/xpwck3gJuucNrh5JvDPvQr0WFXf0piyt8f8/WI0hV4pRxxkQZdJDfDJNOAmM0Ag8jyT6hz0WGXWuP94Yh2jcfjmXAGvHCMslRimDHYuHuDsy2QtHuIavznhbYURq5R57KpzBBRZKPJi8eQg48h4j8SDdowifdIrEVdU+gbO6QNvRRt4ZBthUaZhUnjlYObNagV3keoeru3rU7rcuceqU1mJBxy+BWZYlNEBH+0eH4vRiB+OYybU2hnblYlTvkHinM4m54YnxSyaZYSF6R3jwgP7udKLGIX6r/lbNa9N6y5MFynjWDtrHd75ZvTYAPO/6RgF0k76mQla3FGq7dO+cH8sKn0Vo7nDllwAhqwLPkxrHwWmHJOo+AKJ4rab5OgrM7rVu8eWb2Pu0Dh4eDgXoOfvp7Y7QeqknRmvcTBEyq9m/HQQSCSz6LHq3z0yzsNySRfMS253wl2KyRDbcZPcfJKjZmSEOjcxyi+Y8dUOtsIEH6R2wNykdqrkYJ0RV92H0W58pkfQk7cKevsLK10Py8SdMGfXNXATY+pPbyJR/ET6n9nIfztNtZYRV9XniQu9IA2vOVgy4ir7GCLVmmd+zjkH0eAF9Po6K61pmCXHxU5rHMYd1ftc3owjwRSVRzLjKvqZEty6cRUD7jGqiOdu5HG6MdHjNcNYGqfDm5YRzLBBCCDl/2bk8a8gdbqcfwECu62Fg/HrggAAAABJRU5ErkJggg==",j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=";
+return i(c)&&i(c.iconUrl)?new L.Icon(c):new L.Icon.Default({iconUrl:h,shadowUrl:j,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})},E=function(a){i(v[a])&&delete v[a]},F=function(){v={}},G=function(){for(var a in v)C(a)||E(a)},H=function(a){a.options.icon.options.ngElement&&a.options.icon.options.ngElement.remove(),a.options.icon.options.scope&&a.options.icon.options.scope.$destroy()},I=function(a,b,c){if(a.closePopup(),a.options.icon&&a.options.icon.options&&"dom"===a.options.icon.options.type&&H(a),i(c)&&i(c.overlays))for(var d in c.overlays)if((c.overlays[d]instanceof L.LayerGroup||c.overlays[d]instanceof L.FeatureGroup)&&c.overlays[d].hasLayer(a))return void c.overlays[d].removeLayer(a);if(i(v))for(var e in v)v[e].hasLayer(a)&&v[e].removeLayer(a);b.hasLayer(a)&&b.removeLayer(a)},J=function(a,b){var c=a._popup._container.offsetHeight,d=new L.Point(a._popup._containerLeft,-c-a._popup._containerBottom),e=b.layerPointToContainerPoint(d);null!==e&&a._popup._adjustPan()},K=function(a,b){f(a._popup._contentNode)(b)},M=function a(b,d,e){var f=b._popup._contentNode.innerText||b._popup._contentNode.textContent;f.length<1&&c(function(){a(b,d,e)});var g=b._popup._contentNode.offsetWidth;return b._popup._updateLayout(),b._popup._updatePosition(),b._popup.options.autoPan&&J(b,e),g},N=function(c,d,e){var f=a.isFunction(d.getMessageScope)?d.getMessageScope():b,g=!i(d.compileMessage)||d.compileMessage;if(g){if(!i(c._popup)||!i(c._popup._contentNode))return z.error(x+"Popup is invalid or does not have any content."),!1;K(c,f),M(c,d,e)}},O=function(c,d){var e=a.isFunction(d.getMessageScope)?d.getMessageScope():b,g=a.isFunction(d.getLabelScope)?d.getLabelScope():e,h=!i(d.compileMessage)||d.compileMessage;r.LabelPlugin.isLoaded()&&i(d.label)&&(i(d.label.options)&&d.label.options.noHide===!0&&c.showLabel(),h&&i(c.label)&&f(c.label._container)(g))},P=function(b,c,d,e,f,g,h){if(i(c)){if(!w.validateCoords(b))return z.warn("There are problems with lat-lng data, please verify your marker model"),void I(d,h,g);var j=b===c;if(i(b.iconAngle)&&c.iconAngle!==b.iconAngle&&d.setIconAngle(b.iconAngle),s(b.layer)||s(c.layer)&&(i(g.overlays[c.layer])&&g.overlays[c.layer].hasLayer(d)&&(g.overlays[c.layer].removeLayer(d),d.closePopup()),h.hasLayer(d)||h.addLayer(d)),(t(b.opacity)||t(parseFloat(b.opacity)))&&b.opacity!==c.opacity&&d.setOpacity(b.opacity),s(b.layer)&&c.layer!==b.layer){if(s(c.layer)&&i(g.overlays[c.layer])&&g.overlays[c.layer].hasLayer(d)&&g.overlays[c.layer].removeLayer(d),d.closePopup(),h.hasLayer(d)&&h.removeLayer(d),!i(g.overlays[b.layer]))return void z.error(x+"You must use a name of an existing layer");var k=g.overlays[b.layer];if(!(k instanceof L.LayerGroup||k instanceof L.FeatureGroup))return void z.error(x+'A marker can only be added to a layer of type "group" or "featureGroup"');k.addLayer(d),h.hasLayer(d)&&b.focus===!0&&d.openPopup()}if(b.draggable!==!0&&c.draggable===!0&&i(d.dragging)&&d.dragging.disable(),b.draggable===!0&&c.draggable!==!0&&(d.dragging?d.dragging.enable():L.Handler.MarkerDrag&&(d.dragging=new L.Handler.MarkerDrag(d),d.options.draggable=!0,d.dragging.enable())),u(b.icon)||u(c.icon)&&("dom"===c.icon.type&&H(d),d.setIcon(D()),d.closePopup(),d.unbindPopup(),s(b.message)&&d.bindPopup(b.message,b.popupOptions)),u(b.icon)&&u(c.icon)&&!a.equals(b.icon,c.icon)){var l=!1;d.dragging&&(l=d.dragging.enabled()),"dom"===c.icon.type&&H(d),d.setIcon(D(b.icon)),l&&d.dragging.enable(),d.closePopup(),d.unbindPopup(),s(b.message)&&(d.bindPopup(b.message,b.popupOptions),h.hasLayer(d)&&b.focus===!0&&d.openPopup())}!s(b.message)&&s(c.message)&&(d.closePopup(),d.unbindPopup()),r.LabelPlugin.isLoaded()&&(i(b.label)&&i(b.label.message)?"label"in c&&"message"in c.label&&!a.equals(b.label.message,c.label.message)?d.updateLabelContent(b.label.message):!a.isFunction(d.getLabel)||a.isFunction(d.getLabel)&&!i(d.getLabel())?(d.bindLabel(b.label.message,b.label.options),O(d,b)):O(d,b):"label"in b&&!("message"in b.label)||a.isFunction(d.unbindLabel)&&d.unbindLabel()),s(b.message)&&!s(c.message)&&d.bindPopup(b.message,b.popupOptions),s(b.message)&&s(c.message)&&b.message!==c.message&&d.setPopupContent(b.message);var m=!1;b.focus!==!0&&c.focus===!0&&(d.closePopup(),m=!0),(b.focus===!0&&(!i(c.focus)||c.focus===!1)||j&&b.focus===!0)&&(d.openPopup(),m=!0),c.zIndexOffset!==b.zIndexOffset&&d.setZIndexOffset(b.zIndexOffset);var n=d.getLatLng(),o=s(b.layer)&&r.MarkerClusterPlugin.is(g.overlays[b.layer]);o?m?b.lat===c.lat&&b.lng===c.lng||(g.overlays[b.layer].removeLayer(d),d.setLatLng([b.lat,b.lng]),g.overlays[b.layer].addLayer(d)):n.lat!==b.lat||n.lng!==b.lng?(g.overlays[b.layer].removeLayer(d),d.setLatLng([b.lat,b.lng]),g.overlays[b.layer].addLayer(d)):b.lat!==c.lat||b.lng!==c.lng?(g.overlays[b.layer].removeLayer(d),d.setLatLng([b.lat,b.lng]),g.overlays[b.layer].addLayer(d)):u(b.icon)&&u(c.icon)&&!a.equals(b.icon,c.icon)&&(g.overlays[b.layer].removeLayer(d),g.overlays[b.layer].addLayer(d)):n.lat===b.lat&&n.lng===b.lng||d.setLatLng([b.lat,b.lng])}},Q=function(a,b){if(i(a))return b?a[b]:a},R=function(a,b,c){if(i(a))return b?c?a[c][b]:a[b]:void z.error(x+"marker id missing in getMarker")};return{resetMarkerGroup:E,resetMarkerGroups:F,resetUnusedMarkerGroups:G,deleteMarker:I,manageOpenPopup:N,manageOpenLabel:O,createMarker:function(a){if(!i(a)||!w.validateCoords(a))return void z.error(x+"The marker definition is not valid.");var b=w.getCoords(a);if(!i(b))return void z.error(x+"Unable to get coordinates from markerData.");var c={icon:D(a.icon),title:i(a.title)?a.title:"",draggable:!!i(a.draggable)&&a.draggable,clickable:!i(a.clickable)||a.clickable,riseOnHover:!!i(a.riseOnHover)&&a.riseOnHover,zIndexOffset:i(a.zIndexOffset)?a.zIndexOffset:0,iconAngle:i(a.iconAngle)?a.iconAngle:0};for(var d in a)a.hasOwnProperty(d)&&!c.hasOwnProperty(d)&&(c[d]=a[d]);var e=new L.marker(b,c);return s(a.message)||e.unbindPopup(),e},addMarkerToGroup:function(a,b,c,d){return s(b)?k.isLoaded()?(i(v[b])||(v[b]=new L.MarkerClusterGroup(c),d.addLayer(v[b])),void v[b].addLayer(a)):void z.error(x+"The MarkerCluster plugin is not loaded."):void z.error(x+"The marker group you have specified is invalid.")},listenMarkerEvents:function(a,b,c,d,e){a.on("popupopen",function(){q(c,function(){(i(a._popup)||i(a._popup._contentNode))&&(b.focus=!0,N(a,b,e))})}),a.on("popupclose",function(){q(c,function(){b.focus=!1})}),a.on("add",function(){q(c,function(){"label"in b&&O(a,b)})})},updateMarker:P,addMarkerWatcher:function(a,b,c,d,e,f){var g=r.getObjectArrayPath("markers."+b);y(c,g,f,function(f,g,h){return i(f)?void P(f,g,a,b,c,d,e):(I(a,e,d),void h())})},string:A,log:B,getModelFromModels:R,getLayerModels:Q}}]),a.module("ui-leaflet").factory("leafletPathsHelpers",["$rootScope","leafletLogger","leafletHelpers",function(a,b,c){function d(a){return a.filter(function(a){return k(a)}).map(function(a){return e(a)})}function e(a){return i(a)?new L.LatLng(a[0],a[1]):new L.LatLng(a.lat,a.lng)}function f(a){return a.map(function(a){return d(a)})}function g(a,b){for(var c={},d=0;d<m.length;d++){var e=m[d];h(a[e])?c[e]=a[e]:h(b.path[e])&&(c[e]=b.path[e])}return c}var h=c.isDefined,i=c.isArray,j=c.isNumber,k=c.isValidPoint,l=b,m=["stroke","weight","color","opacity","fill","fillColor","fillOpacity","dashArray","lineCap","lineJoin","clickable","pointerEvents","className","smoothFactor","noClip"],n=function(a,b){for(var c={},d=0;d<m.length;d++){var e=m[d];h(b[e])&&(c[e]=b[e])}a.setStyle(b)},o=function(a){if(!i(a))return!1;for(var b=0;b<a.length;b++){var c=a[b];if(!k(c))return!1}return!0},p={polyline:{isValid:function(a){var b=a.latlngs;return o(b)},createPath:function(a){return new L.Polyline([],a)},setPath:function(a,b){a.setLatLngs(d(b.latlngs)),n(a,b)}},multiPolyline:{isValid:function(a){var b=a.latlngs;if(!i(b))return!1;for(var c in b){var d=b[c];if(!o(d))return!1}return!0},createPath:function(a){return new L.multiPolyline([[[0,0],[1,1]]],a)},setPath:function(a,b){a.setLatLngs(f(b.latlngs)),n(a,b)}},polygon:{isValid:function(a){var b=a.latlngs;return o(b)},createPath:function(a){return new L.Polygon([],a)},setPath:function(a,b){a.setLatLngs(d(b.latlngs)),n(a,b)}},multiPolygon:{isValid:function(a){var b=a.latlngs;if(!i(b))return!1;for(var c in b){var d=b[c];if(!o(d))return!1}return!0},createPath:function(a){return new L.MultiPolygon([[[0,0],[1,1],[0,1]]],a)},setPath:function(a,b){a.setLatLngs(f(b.latlngs)),n(a,b)}},rectangle:{isValid:function(a){var b=a.latlngs;if(!i(b)||2!==b.length)return!1;for(var c in b){var d=b[c];if(!k(d))return!1}return!0},createPath:function(a){return new L.Rectangle([[0,0],[1,1]],a)},setPath:function(a,b){a.setBounds(new L.LatLngBounds(d(b.latlngs))),n(a,b)}},circle:{isValid:function(a){var b=a.latlngs;return k(b)&&j(a.radius)},createPath:function(a){return new L.Circle([0,0],1,a)},setPath:function(a,b){a.setLatLng(e(b.latlngs)),h(b.radius)&&a.setRadius(b.radius),n(a,b)}},circleMarker:{isValid:function(a){var b=a.latlngs;return k(b)&&j(a.radius)},createPath:function(a){return new L.CircleMarker([0,0],a)},setPath:function(a,b){a.setLatLng(e(b.latlngs)),h(b.radius)&&a.setRadius(b.radius),n(a,b)}}},q=function(a){var b={};return a.latlngs&&(b.latlngs=a.latlngs),a.radius&&(b.radius=a.radius),b};return{setPathOptions:function(a,b,c){h(b)||(b="polyline"),p[b].setPath(a,c)},createPath:function(a,b,c){h(b.type)||(b.type="polyline");var d=g(b,c),e=q(b);return p[b.type].isValid(e)?p[b.type].createPath(d):void l.error("[AngularJS - Leaflet] Invalid data passed to the "+b.type+" path")}}}]),a.module("ui-leaflet").service("leafletWatchHelpers",function(){var a=function(a,b,c,d,e){var f=a[b](c,function(a,b){e(a,b,f),null===d.type&&f()},"watchDeep"===d.type);return f},b=function(b,c,d,e){var f;return f="watchCollection"===d.type?"$watchCollection":"$watch",a(b,f,c,d,e)};return{maybeWatch:b}}),a.module("ui-leaflet").service("leafletLogger",["nemSimpleLogger",function(a){return a.spawn()}]),a.module("ui-leaflet").factory("nominatimService",["$q","$http","leafletHelpers","leafletMapDefaults",function(a,b,c,d){var e=c.isDefined;return{query:function(c,f){var g=d.getDefaults(f),h=g.nominatim.server,i=a.defer();return b.get(h,{params:{format:"json",limit:1,q:c}}).success(function(a){a.length>0&&e(a[0].boundingbox)?i.resolve(a[0]):i.reject("[Nominatim] Invalid address")}),i.promise}}}]),a.module("ui-leaflet").directive("bounds",["leafletLogger","$timeout","$http","leafletHelpers","nominatimService","leafletBoundsHelpers",function(b,c,d,e,f,g){var h=b;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(b,d,i,j){var k=e.isDefined,l=g.createLeafletBounds,m=j[0].getLeafletScope(),n=j[0],o=e.errorHeader+" [Bounds] ",p=function(a){return 0===a._southWest.lat&&0===a._southWest.lng&&0===a._northEast.lat&&0===a._northEast.lng};n.getMap().then(function(d){m.$on("boundsChanged",function(b){var e=b.currentScope,f=d.getBounds();if(!p(f)&&!e.settingBoundsFromScope){e.settingBoundsFromLeaflet=!0;var g={northEast:{lat:f._northEast.lat,lng:f._northEast.lng},southWest:{lat:f._southWest.lat,lng:f._southWest.lng},options:f.options};a.equals(e.bounds,g)||(e.bounds=g),c(function(){e.settingBoundsFromLeaflet=!1})}});var e;m.$watch("bounds",function(a){if(!b.settingBoundsFromLeaflet){if(k(a.address)&&a.address!==e)return b.settingBoundsFromScope=!0,f.query(a.address,i.id).then(function(a){var b=a.boundingbox,c=[[b[0],b[2]],[b[1],b[3]]];d.fitBounds(c)},function(a){h.error(o+" "+a+".")}),e=a.address,void c(function(){b.settingBoundsFromScope=!1});var g=l(a);g&&!d.getBounds().equals(g)&&(b.settingBoundsFromScope=!0,d.fitBounds(g,a.options),c(function(){b.settingBoundsFromScope=!1}))}},!0)})}}}]);var b=["center","lfCenter"],c={};b.forEach(function(b){c[b]=["leafletLogger","$q","$location","$timeout","leafletMapDefaults","leafletHelpers","leafletBoundsHelpers","leafletMapEvents",function(c,d,e,f,g,h,i,j){var k,l=h.isDefined,m=h.isNumber,n=h.isSameCenterOnMap,o=h.safeApply,p=h.isValidCenter,q=i.isValidBounds,r=h.isUndefinedOrEmpty,s=h.errorHeader,t=c,u=function(a,b){return l(a)&&q(a)&&r(b)};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:function(){k=d.defer(),this.getCenter=function(){return k.promise}},link:function(c,d,h,q){var r=q.getLeafletScope(),v=r[b];q.getMap().then(function(c){var d=g.getDefaults(h.id);if(h[b].search("-")!==-1)return t.error(s+' The "center" variable can\'t use a "-" on its key name: "'+h[b]+'".'),void c.setView([d.center.lat,d.center.lng],d.center.zoom);if(u(r.bounds,v))c.fitBounds(i.createLeafletBounds(r.bounds),r.bounds.options),v=c.getCenter(),o(r,function(d){a.extend(d[b],{lat:c.getCenter().lat,lng:c.getCenter().lng,zoom:c.getZoom(),autoDiscover:!1})}),o(r,function(a){var b=c.getBounds();a.bounds={northEast:{lat:b._northEast.lat,lng:b._northEast.lng},southWest:{lat:b._southWest.lat,lng:b._southWest.lng}}});else{if(!l(v))return t.error(s+' The "center" property is not defined in the main scope'),void c.setView([d.center.lat,d.center.lng],d.center.zoom);l(v.lat)&&l(v.lng)||l(v.autoDiscover)||a.copy(d.center,v)}var q,w;if("yes"===h.urlHashCenter){var x=function(){var a,b=e.search(),c=h.urlHashParam?h.urlHashParam:"c";if(l(b[c])){var d=b[c].split(":");3===d.length&&(a={lat:parseFloat(d[0]),lng:parseFloat(d[1]),zoom:parseInt(d[2],10)})}return a};q=x(),r.$on("$locationChangeSuccess",function(d){var e=d.currentScope,f=x();l(f)&&!n(f,c)&&a.extend(e[b],{lat:f.lat,lng:f.lng,zoom:f.zoom})})}r.$watch(b,function(b){if(!r.settingCenterFromLeaflet)return l(q)&&(a.copy(q,b),q=void 0),p(b)||b.autoDiscover===!0?b.autoDiscover===!0?(m(b.zoom)||c.setView([d.center.lat,d.center.lng],d.center.zoom),void(m(b.zoom)&&b.zoom>d.center.zoom?c.locate({setView:!0,maxZoom:b.zoom}):l(d.maxZoom)?c.locate({setView:!0,maxZoom:d.maxZoom}):c.locate({setView:!0}))):void(w&&n(b,c)||(r.settingCenterFromScope=!0,c.setView([b.lat,b.lng],b.zoom),j.notifyCenterChangedToBounds(r,c),f(function(){r.settingCenterFromScope=!1}))):void t.warn(s+" invalid 'center'")},!0),c.whenReady(function(){w=!0}),c.on("moveend",function(){k.resolve(),j.notifyCenterUrlHashChanged(r,c,h,e.search()),n(v,c)||r.settingCenterFromScope||(r.settingCenterFromLeaflet=!0,o(r,function(d){r.settingCenterFromScope||a.extend(d[b],{lat:c.getCenter().lat,lng:c.getCenter().lng,zoom:c.getZoom(),autoDiscover:!1}),j.notifyCenterChangedToBounds(r,c),f(function(){r.settingCenterFromLeaflet=!1})}))}),v.autoDiscover===!0&&c.on("locationerror",function(){t.warn(s+" The Geolocation API is unauthorized on this page."),p(v)?(c.setView([v.lat,v.lng],v.zoom),j.notifyCenterChangedToBounds(r,c)):(c.setView([d.center.lat,d.center.lng],d.center.zoom),j.notifyCenterChangedToBounds(r,c))})})}}}]}),b.forEach(function(b){a.module("ui-leaflet").directive(b,c[b])}),a.module("ui-leaflet").directive("controls",["leafletLogger","leafletHelpers","leafletControlHelpers",function(a,b,c){var d=a;return{restrict:"A",scope:!1,replace:!1,require:"?^leaflet",link:function(a,e,f,g){if(g){var h=c.createControl,i=c.isValidControlType,j=g.getLeafletScope(),k=b.isDefined,l=b.isArray,m={},n=b.errorHeader+" [Controls] ";a.$on("$destroy",function(){c.destroyMapLayersControl(a.mapId)}),g.getMap().then(function(a){j.$watchCollection("controls",function(b){for(var c in m)k(b[c])||(a.hasControl(m[c])&&a.removeControl(m[c]),delete m[c]);for(var e in b){var f,g=k(b[e].type)?b[e].type:e;if(!i(g))return void d.error(n+" Invalid control type: "+g+".");if("custom"!==g)f=h(g,b[e]),a.addControl(f),m[e]=f;else{var j=b[e];if(l(j))for(var o=0;o<j.length;o++){var p=j[o];a.addControl(p),m[e]=k(m[e])?m[e].concat([p]):[p]}else a.addControl(j),m[e]=j}}})})}}}}]),a.module("ui-leaflet").directive("decorations",["leafletLogger","leafletHelpers",function(b,c){var d=b;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(b,e,f,g){function h(a){return l(a)&&l(a.coordinates)&&(k.isLoaded()||d.error("[AngularJS - Leaflet] The PolylineDecorator Plugin is not loaded.")),L.polylineDecorator(a.coordinates)}function i(a,b){if(l(a)&&l(b)&&l(b.coordinates)&&l(b.patterns))return a.setPaths(b.coordinates),a.setPatterns(b.patterns),a}var j=g.getLeafletScope(),k=c.PolylineDecoratorPlugin,l=c.isDefined,m={};g.getMap().then(function(b){j.$watch("decorations",function(c){for(var d in m)l(c[d])&&a.equals(c[d],m)||(b.removeLayer(m[d]),delete m[d]);for(var e in c){var f=c[e],g=h(f);l(g)&&(m[e]=g,b.addLayer(g),i(g,f))}},!0)})}}}]),a.module("ui-leaflet").directive("eventBroadcast",["leafletLogger","$rootScope","leafletHelpers","leafletMapEvents","leafletIterators",function(a,b,c,d,e){var f=a;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(a,b,g,h){var i=c.isObject,j=c.isDefined,k=h.getLeafletScope(),l=k.eventBroadcast,m=d.getAvailableMapEvents(),n=d.addEvents;h.getMap().then(function(a){var b=[],c="broadcast";j(l.map)?i(l.map)?("emit"!==l.map.logic&&"broadcast"!==l.map.logic?f.warn("[AngularJS - Leaflet] Available event propagation logic are: 'emit' or 'broadcast'."):c=l.map.logic,i(l.map.enable)&&l.map.enable.length>=0?e.each(l.map.enable,function(a){b.indexOf(a)===-1&&m.indexOf(a)!==-1&&b.push(a)}):f.warn("[AngularJS - Leaflet] event-broadcast.map.enable must be an object check your model.")):f.warn("[AngularJS - Leaflet] event-broadcast.map must be an object check your model."):b=m,n(a,g.id,b,"eventName",k,c)})}}}]),a.module("ui-leaflet").directive("geojson",["$timeout","leafletLogger","leafletData","leafletHelpers","leafletWatchHelpers","leafletDirectiveControlsHelpers","leafletIterators","leafletGeoJsonEvents",function(b,c,d,e,f,g,h,i){var j=f.maybeWatch,k=e.watchOptions,l=g.extend,m=e,n=h,o={changeFromDirective:!1};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(b,c,f,g){var h=e.isDefined,p=g.getLeafletScope(),q={},r=!1;g.getMap().then(function(b){var c;c=p.watchOptions&&p.watchOptions.geojson?p.watchOptions.geojson:k;var g=function(b,c){var d;return d=a.isFunction(b.onEachFeature)?b.onEachFeature:function(a,d){e.LabelPlugin.isLoaded()&&h(a.properties.description)&&d.bindLabel(a.properties.description),i.bindEvents(f.id,d,null,a,p,c,{resetStyleOnMouseout:b.resetStyleOnMouseout,mapId:f.id})}},s=m.isDefined(f.geojsonNested)&&m.isTruthy(f.geojsonNested),t=function(){if(q){var a=function(a){h(a)&&b.hasLayer(a)&&b.removeLayer(a)};return s?void n.each(q,function(b){a(b)}):void a(q)}},u=function(a,c){if(h(a)&&h(a.data)){var e=g(a,c);h(a.options)||m.modelChangeInDirective(o,"changeFromDirective",function(){a.options={style:a.style,filter:a.filter,onEachFeature:e,pointToLayer:a.pointToLayer}});var i=L.geoJson(a.data,a.options);c&&m.isString(c)?q[c]=i:q=i,i.addTo(b),r||(r=!0,d.setGeoJSON(q,f.id))}},v=function(a){if(t(),s){if(!a||!Object.keys(a).length)return;return void n.each(a,function(a,b){u(a,b)})}u(a)};l(f.id,"geojson",v,t),j(p,"geojson",c,function(a){o.changeFromDirective||v(a)})})}}}]),a.module("ui-leaflet").directive("layercontrol",["$filter","leafletLogger","leafletData","leafletHelpers",function(b,c,d,e){var f=c;return{restrict:"E",scope:{icons:"=?",autoHideOpacity:"=?",showGroups:"=?",title:"@",baseTitle:"@",overlaysTitle:"@"},replace:!0,transclude:!1,require:"^leaflet",controller:["$scope","$element","$sce",function(b,c,g){f.debug("[Angular Directive - Layers] layers",b,c);var h=e.safeApply,i=e.isDefined;a.extend(b,{baselayer:"",oldGroup:"",layerProperties:{},groupProperties:{},rangeIsSupported:e.rangeIsSupported(),changeBaseLayer:function(a,c){e.safeApply(b,function(c){c.baselayer=a,d.getMap().then(function(e){d.getLayers().then(function(d){if(!e.hasLayer(d.baselayers[a])){for(var f in c.layers.baselayers)c.layers.baselayers[f].icon=c.icons.unradio,e.hasLayer(d.baselayers[f])&&e.removeLayer(d.baselayers[f]);e.addLayer(d.baselayers[a]),c.layers.baselayers[a].icon=b.icons.radio}})})}),c.preventDefault()},moveLayer:function(a,c,d){var e=Object.keys(b.layers.baselayers).length;if(c>=1+e&&c<=b.overlaysArray.length+e){var f;for(var g in b.layers.overlays)if(b.layers.overlays[g].index===c){f=b.layers.overlays[g];break}f&&h(b,function(){f.index=a.index,a.index=c})}d.stopPropagation(),d.preventDefault()},initIndex:function(a,c){var d=Object.keys(b.layers.baselayers).length;a.index=i(a.index)?a.index:c+d+1},initGroup:function(a){b.groupProperties[a]=b.groupProperties[a]?b.groupProperties[a]:{}},toggleOpacity:function(a,c){if(c.visible){if(b.autoHideOpacity&&!b.layerProperties[c.name].opacityControl)for(var d in b.layerProperties)b.layerProperties[d].opacityControl=!1;b.layerProperties[c.name].opacityControl=!b.layerProperties[c.name].opacityControl}a.stopPropagation(),a.preventDefault()},toggleLegend:function(a){b.layerProperties[a.name].showLegend=!b.layerProperties[a.name].showLegend},showLegend:function(a){return a.legend&&b.layerProperties[a.name].showLegend},unsafeHTML:function(a){return g.trustAsHtml(a)},getOpacityIcon:function(a){return a.visible&&b.layerProperties[a.name].opacityControl?b.icons.close:b.icons.open},getGroupIcon:function(a){return a.visible?b.icons.check:b.icons.uncheck},changeGroupVisibility:function(a){if(i(b.groupProperties[a])){var c=b.groupProperties[a].visible;for(var d in b.layers.overlays){var e=b.layers.overlays[d];e.group===a&&(e.visible=c)}}}});var j=c.get(0);L.Browser.touch?L.DomEvent.on(j,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(j),L.DomEvent.on(j,"mousewheel",L.DomEvent.stopPropagation))}],template:'<div class="angular-leaflet-control-layers" ng-show="overlaysArray.length"><h4 ng-if="title">{{ title }}</h4><div class="lf-baselayers"><h5 class="lf-title" ng-if="baseTitle">{{ baseTitle }}</h5><div class="lf-row" ng-repeat="(key, layer) in baselayersArray"><label class="lf-icon-bl" ng-click="changeBaseLayer(key, $event)"><input class="leaflet-control-layers-selector" type="radio" name="lf-radio" ng-show="false" ng-checked="baselayer === key" ng-value="key" /> <i class="lf-icon lf-icon-radio" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label></div></div><div class="lf-overlays"><h5 class="lf-title" ng-if="overlaysTitle">{{ overlaysTitle }}</h5><div class="lf-container"><div class="lf-row" ng-repeat="layer in (o = (overlaysArray | orderBy:\'index\':order))" ng-init="initIndex(layer, $index)"><label class="lf-icon-ol-group" ng-if="showGroups &amp;&amp; layer.group &amp;&amp; layer.group != o[$index-1].group"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-change="changeGroupVisibility(layer.group)" ng-model="groupProperties[layer.group].visible"/> <i class="lf-icon lf-icon-check" ng-class="getGroupIcon(groupProperties[layer.group])"></i><div class="lf-text">{{ layer.group }}</div></label><label class="lf-icon-ol"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-model="layer.visible"/> <i class="lf-icon lf-icon-check" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label><div class="lf-icons"><i class="lf-icon lf-up" ng-class="icons.up" ng-click="moveLayer(layer, layer.index - orderNumber, $event)"></i> <i class="lf-icon lf-down" ng-class="icons.down" ng-click="moveLayer(layer, layer.index + orderNumber, $event)"></i> <i class="lf-icon lf-toggle-legend" ng-class="icons.toggleLegend" ng-if="layer.legend" ng-click="toggleLegend(layer)"></i> <i class="lf-icon lf-open" ng-class="getOpacityIcon(layer)" ng-click="toggleOpacity($event, layer)"></i></div><div class="lf-legend" ng-if="showLegend(layer)" ng-bind-html="unsafeHTML(layer.legend)"></div><div class="lf-opacity clearfix" ng-if="layer.visible &amp;&amp; layerProperties[layer.name].opacityControl"><label ng-if="rangeIsSupported" class="pull-left" style="width: 50%">0</label><label ng-if="rangeIsSupported" class="pull-left text-right" style="width: 50%">100</label><input ng-if="rangeIsSupported" class="clearfix" type="range" min="0" max="1" step="0.05" class="lf-opacity-control" ng-model="layerProperties[layer.name].layerOptions.opacity"/><h6 ng-if="!rangeIsSupported">Range is not supported in this browser</h6></div></div></div></div></div>',link:function(b,c,f,g){var h=e.isDefined,i=g.getLeafletScope(),j=i.layers;b.$watch("icons",function(){var c={uncheck:"fa fa-square-o",check:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",unradio:"fa fa-circle-o",up:"fa fa-angle-up",down:"fa fa-angle-down",open:"fa fa-angle-double-down",close:"fa fa-angle-double-up",toggleLegend:"fa fa-pencil-square-o"};h(b.icons)?(a.extend(c,b.icons),a.extend(b.icons,c)):b.icons=c}),f.order=!h(f.order)||"normal"!==f.order&&"reverse"!==f.order?"normal":f.order,b.order="normal"===f.order,b.orderNumber="normal"===f.order?-1:1,b.layers=j,g.getMap().then(function(a){i.$watch("layers.baselayers",function(c){var e={};d.getLayers().then(function(d){var f;for(f in c){var g=c[f];g.icon=b.icons[a.hasLayer(d.baselayers[f])?"radio":"unradio"],e[f]=g}b.baselayersArray=e})}),i.$watch("layers.overlays",function(a){var c=[],e={};d.getLayers().then(function(){var d;for(d in a){var f=a[d];f.icon=b.icons[f.visible?"check":"uncheck"],c.push(f),h(b.layerProperties[f.name])||(h(f.layerOptions.opacity)&&(f.layerOptions.opacity=1),b.layerProperties[f.name]={opacityControl:!1,showLegend:!0,layerOptions:f.layerOptions}),h(f.group)&&(h(b.groupProperties[f.group])||(b.groupProperties[f.group]={visible:!1}),e[f.group]=h(e[f.group])?e[f.group]:{count:0,visibles:0},e[f.group].count++,f.visible&&e[f.group].visibles++)}for(d in e)b.groupProperties[d].visible=e[d].visibles===e[d].count;b.overlaysArray=c})},!0)})}}}]),a.module("ui-leaflet").directive("layers",["leafletLogger","$q","leafletData","leafletHelpers","leafletLayerHelpers","leafletControlHelpers",function(b,c,d,e,f,g){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:["$scope",function(a){a._leafletLayers=c.defer(),this.getLayers=function(){return a._leafletLayers.promise}}],link:function(b,c,h,i){var j=e.isDefined,k={},l=i.getLeafletScope(),m=l.layers,n=f.createLayer,o=f.safeAddLayer,p=f.safeRemoveLayer,q=f.changeOpacityListener,r=g.updateLayersControl,s=!1;b.$on("$destroy",function(){g.destroyMapLayersControl(b.mapId)}),i.getMap().then(function(c){b._leafletLayers.resolve(k),d.setLayers(k,h.id),k.baselayers={},k.overlays={};var e=h.id,f=!1;for(var g in m.baselayers){var i=n(m.baselayers[g]);j(i)?(k.baselayers[g]=i,m.baselayers[g].top===!0&&(o(c,k.baselayers[g]),f=!0)):delete m.baselayers[g]}!f&&Object.keys(k.baselayers).length>0&&o(c,k.baselayers[Object.keys(m.baselayers)[0]]);for(g in m.overlays){"cartodb"===m.overlays[g].type;var t=n(m.overlays[g]);j(t)?(k.overlays[g]=t,m.overlays[g].visible===!0&&o(c,k.overlays[g])):delete m.overlays[g]}l.$watch("layers.baselayers",function(b,d){if(a.equals(b,d))return s=r(c,e,s,b,m.overlays,k),!0;for(var f in k.baselayers)j(b[f])&&!b[f].doRefresh||(c.hasLayer(k.baselayers[f])&&c.removeLayer(k.baselayers[f]),delete k.baselayers[f],b[f]&&b[f].doRefresh&&(b[f].doRefresh=!1));for(var g in b)if(j(k.baselayers[g]))b[g].top!==!0||c.hasLayer(k.baselayers[g])?b[g].top===!1&&c.hasLayer(k.baselayers[g])&&c.removeLayer(k.baselayers[g]):o(c,k.baselayers[g]);else{var h=n(b[g]);j(h)&&(k.baselayers[g]=h,b[g].top===!0&&o(c,k.baselayers[g]))}var i=!1;for(var l in k.baselayers)if(c.hasLayer(k.baselayers[l])){i=!0;break}!i&&Object.keys(k.baselayers).length>0&&o(c,k.baselayers[Object.keys(k.baselayers)[0]]),s=r(c,e,s,b,m.overlays,k)},!0),l.$watch("layers.overlays",function(b,d){if(a.equals(b,d))return s=r(c,e,s,m.baselayers,b,k),!0;for(var f in k.overlays)if(!j(b[f])||b[f].doRefresh){if(c.hasLayer(k.overlays[f])){var g=j(b[f])?b[f].layerOptions:null;p(c,k.overlays[f],g)}delete k.overlays[f],b[f]&&b[f].doRefresh&&(b[f].doRefresh=!1)}for(var h in b){if(j(k.overlays[h])){b[h].visible&&!c.hasLayer(k.overlays[h])?o(c,k.overlays[h]):b[h].visible===!1&&c.hasLayer(k.overlays[h])&&p(c,k.overlays[h],b[h].layerOptions);var i=k.overlays[h];c.hasLayer(k.overlays[h])&&(b[h].layerOptions.opacity!==d[h].layerOptions.opacity&&(j(i.setOpacity)&&i.setOpacity(b[h].layerOptions.opacity),j(i.getLayers)&&j(i.eachLayer)&&i.eachLayer(q(b[h].layerOptions.opacity))),j(b[h].index)&&i.setZIndex&&b[h].index!==d[h].index&&i.setZIndex(b[h].index))}else{var l=n(b[h]);if(!j(l))continue;k.overlays[h]=l,b[h].visible===!0&&o(c,k.overlays[h]),j(b[h].index)&&k.overlays[h].setZIndex&&k.overlays[h].setZIndex(b[h].index)}b[h].visible&&c._loaded&&b[h].data&&"heatmap"===b[h].type&&(k.overlays[h].setData(b[h].data),k.overlays[h].update())}s=r(c,e,s,m.baselayers,b,k)},!0)})}}}]),a.module("ui-leaflet").directive("legend",["leafletLogger","$http","$timeout","leafletHelpers","leafletLegendHelpers",function(a,b,c,d,e){var f=a,g=d.errorHeader+" [Legend] ";return{restrict:"A",scope:!1,replace:!1,require:"leaflet",transclude:!1,link:function(a,b,c,h){var i,j,k,l,m=d.isArray,n=d.isString,o=d.isDefined,p=d.isFunction,q=h.getLeafletScope(),r=q.legend;q.$watch("legend",function(a){o(a)&&(i=a.legendClass?a.legendClass:"legend",j=a.position||"bottomright",l=a.type||"arcgis")},!0);var s=function(a,b,c){b&&b.layers&&b.layers.length>0&&(o(k)?e.updateLegend(k.getContainer(),b,l,c):(k=L.control({position:j}),k.onAdd=e.getOnAddLegend(b,i,l,c),k.addTo(a)),o(r.loadedData)&&p(r.loadedData)&&r.loadedData())};h.getMap().then(function(a){q.$watch("legend",function(b){return o(b)?o(b.url)||"arcgis"!==l||m(b.colors)&&m(b.labels)&&b.colors.length===b.labels.length?o(b.url)?void f.info(g+" loading legend service."):(o(k)&&(k.removeFrom(a),k=null),k=L.control({position:j}),"arcgis"===l&&(k.onAdd=e.getOnAddArrayLegend(b,i)),void k.addTo(a)):void f.warn(g+" legend.colors and legend.labels must be set."):void(o(k)&&(k.removeFrom(a),k=null))}),q.$watch("legend.url",function(b){if(o(b)){if(!m(b)&&!n(b))return void f.warn(g+" legend.url must be an array or string.");for(var d,h=n(b)?[b]:b,i=function(c,e){return function(i){o(i.data.error)?f.warn(g+"Error loadin legend from: "+e,i.data.error.message):d&&d.layers&&d.layers.length>0?d.layers=d.layers.concat(i.data.layers):d=i.data,c===h.length-1&&s(a,d,b)}},j=function(a){f.warn(g+" legend.url not loaded.",a)},k=0;k<h.length;k++)e.addLegendURL(c.id,{url:h[k],method:"GET"}).then(i(k)).catch(j)}}),q.$watch("legend.legendData",function(b){f.debug("legendData",b),!o(q.legend.url)&&o(b)&&s(a,b)},!0)})}}}]),a.module("ui-leaflet").directive("markers",["leafletLogger","$rootScope","$q","leafletData","leafletHelpers","leafletMapDefaults","leafletMarkersHelpers","leafletMarkerEvents","leafletIterators","leafletWatchHelpers","leafletDirectiveControlsHelpers",function(b,c,d,e,f,g,h,i,j,k,l){var m=f.isDefined,n=f.errorHeader,o=f,p=f.isString,q=h.addMarkerWatcher,r=h.updateMarker,s=h.listenMarkerEvents,t=h.addMarkerToGroup,u=h.createMarker,v=h.deleteMarker,w=h.getModelFromModels,x=h.getLayerModels,y=h.resetUnusedMarkerGroups,z=j,A=f.watchOptions,B=k.maybeWatch,C=l.extend,D=b,E={changeFromDirective:!1},F=function(a,b,c){if(Object.keys(a).length){if(c&&p(c)){if(!a[c]||!Object.keys(a[c]).length)return;return a[c][b]}return a[b]}},G=function(a,b,c,d){return d&&p(d)?(m(b[d])||(b[d]={}),b[d][c]=a):b[c]=a,a},H=function(a,b,c,d,e,f){if(!p(a))return D.error(n+" A layername must be a string"),!1;if(!m(b))return D.error(n+" You must add layers to the directive if the markers are going to use this functionality."),!1;if(!m(b.overlays)||!m(b.overlays[a]))return D.error(n+' A marker can only be added to a layer of type "group"'),!1;var g=b.overlays[a];return g instanceof L.LayerGroup||g instanceof L.FeatureGroup?(g.addLayer(d),null===e&&f.hasLayer(d)&&c.focus===!0&&d.openPopup(),!0):(D.error(n+' Adding a marker to an overlay needs a overlay of the type "group" or "featureGroup"'),!1)},I=function(a,b,c,d,e,f,g,h,j,k){z.each(b,function(b,l){if(!k[l]){if(l.search("-")!==-1)return void D.error('The marker can\'t use a "-" on his key name: "'+l+'".');var p=o.getObjectDotPath(j?[j,l]:[l]),v=F(f,l,j);o.modelChangeInDirective(E,"changeFromDirective",function(){if(m(v)){var k=w(c,l,j);r(b,k,v,p,g,e,d)}else{var x=u(b),y=(b?b.layer:void 0)||j;if(!m(x))return void D.error(n+" Received invalid data on the marker "+l+".");if(G(x,f,l,j),
+m(b.message)&&x.bindPopup(b.message,b.popupOptions),m(b.group)){var z=m(b.groupOption)?b.groupOption:null;t(x,b.group,z,d)}if(o.LabelPlugin.isLoaded()&&m(b.label)&&m(b.label.message)&&x.bindLabel(b.label.message,b.label.options),m(b)&&(m(b.layer)||m(j))){var A=H(y,e,b,x,h.individual.type,d);if(!A)return}else m(b.group)||(d.addLayer(x),null===h.individual.type&&b.focus===!0&&x.openPopup());null!==h.individual.type&&q(x,p,g,e,d,h.individual),s(x,b,g,h.individual.type,d),i.bindEvents(a,x,p,b,g,y)}})}})},J=function(b,c,d,e,f){var g,h,i=!1,j=!1,k=m(c);for(var l in d)i||(D.debug(n+"[markers] destroy: "),i=!0),k&&(h=b[l],g=c[l],j=e&&a.equals(h,g)),m(b)&&Object.keys(b).length&&m(b[l])&&Object.keys(b[l]).length&&!j||f&&o.isFunction(f)&&f(h,g,l)},K=function(a,b,c,d,e){J(a,b,c,!1,function(a,b,f){D.debug(n+"[marker] is deleting marker: "+f),v(c[f],d,e),delete c[f]})},M=function(a,b,c){var d={};return J(a,b,c,!0,function(a,b,c){D.debug(n+"[marker] is already rendered, marker: "+c),d[c]=a}),d};return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(a,b,c,f){var g=f[0],h=g.getLeafletScope();g.getMap().then(function(b){var g,i={};g=m(f[1])?f[1].getLayers:function(){var a=d.defer();return a.resolve(),a.promise};var j;j=h.watchOptions&&h.watchOptions.markers?h.watchOptions.markers:A;var k=m(c.markersNested)&&o.isTruthy(c.markersNested);g().then(function(d){var f=function(a,c){return y(),k?void z.each(a,function(a,e){var f=x(c,e);K(a,f,i[e],b,d)}):void K(a,c,i,b,d)},g=function(a,e){f(a,e);var g=null;return k?void z.each(a,function(f,k){var l=x(e,k),m=x(a,k);g=M(m,l,i[k]),I(c.id,f,e,b,d,i,h,j,k,g)}):(g=M(a,e,i),void I(c.id,a,e,b,d,i,h,j,void 0,g))};C(c.id,"markers",g,f),e.setMarkers(i,c.id),B(h,"markers",j,function(a,b){E.changeFromDirective||g(a,b)}),a.$on("$destroy",function(){K(h.markers,{},i,b,d)})})})}}}]),a.module("ui-leaflet").directive("maxbounds",["leafletLogger","leafletMapDefaults","leafletBoundsHelpers","leafletHelpers",function(a,b,c,d){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(a,b,e,f){var g=f.getLeafletScope(),h=c.isValidBounds,i=d.isNumber;f.getMap().then(function(a){g.$watch("maxbounds",function(b){if(!h(b))return void a.setMaxBounds();var d=c.createLeafletBounds(b);i(b.pad)&&(d=d.pad(b.pad)),a.setMaxBounds(d),e.center||e.lfCenter||a.fitBounds(d)})})}}}]),a.module("ui-leaflet").directive("paths",["leafletLogger","$q","leafletData","leafletMapDefaults","leafletHelpers","leafletPathsHelpers","leafletPathEvents","leafletWatchHelpers",function(a,b,c,d,e,f,g,h){var i=a;return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(a,j,k,l){var m=l[0],n=e.isDefined,o=e.isString,p=m.getLeafletScope(),q=p.paths,r=f.createPath,s=g.bindPathEvents,t=f.setPathOptions,u=h.maybeWatch;m.getMap().then(function(a){var f,g=d.getDefaults(k.id);if(f=n(l[1])?l[1].getLayers:function(){var a=b.defer();return a.resolve(),a.promise},n(q)){var h,j={type:"watchCollection",individual:{type:"watchDeep"}};h=p.watchOptions&&p.watchOptions.paths?p.watchOptions.paths:j,f().then(function(b){var d={};c.setPaths(d,k.id);var f=function(c,d,e){var f='paths["'+d+'"]';u(p,f,e,function(d,e,f){if(!n(d)){if(n(e.layer))for(var g in b.overlays){var h=b.overlays[g];h.removeLayer(c)}return a.removeLayer(c),void f()}t(c,d.type,d)})},j=function(b){for(var c in d)n(b[c])||(a.removeLayer(d[c]),delete d[c])},l=function(c){j(c);for(var l in c)if(0!==l.search("\\$"))if(l.search("-")===-1){if(!n(d[l])){var m=c[l],q=r(l,c[l],g);if(n(q)&&n(m.message)&&q.bindPopup(m.message,m.popupOptions),e.LabelPlugin.isLoaded()&&n(m.label)&&n(m.label.message)&&q.bindLabel(m.label.message,m.label.options),n(m)&&n(m.layer)){if(!o(m.layer)){i.error("[AngularJS - Leaflet] A layername must be a string");continue}if(!n(b)){i.error("[AngularJS - Leaflet] You must add layers to the directive if the markers are going to use this functionality.");continue}if(!n(b.overlays)||!n(b.overlays[m.layer])){i.error('[AngularJS - Leaflet] A path can only be added to a layer of type "group"');continue}var u=b.overlays[m.layer];if(!(u instanceof L.LayerGroup||u instanceof L.FeatureGroup)){i.error('[AngularJS - Leaflet] Adding a path to an overlay needs a overlay of the type "group" or "featureGroup"');continue}d[l]=q,u.addLayer(q),null!==h.individual.type?f(q,l,h.individual):t(q,m.type,m)}else n(q)&&(d[l]=q,a.addLayer(q),null!==h.individual.type?f(q,l,h.individual):t(q,m.type,m));s(k.id,q,l,m,p)}}else i.error('[AngularJS - Leaflet] The path name "'+l+'" is not valid. It must not include "-" and a number.')};u(p,"paths",h,function(a){l(a)})})}})}}}]),a.module("ui-leaflet").directive("tiles",["leafletLogger","leafletData","leafletMapDefaults","leafletHelpers",function(b,c,d,e){var f=b;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(b,g,h,i){var j=e.isDefined,k=i.getLeafletScope(),l=k.tiles;return j(l)&&j(l.url)?void i.getMap().then(function(b){var e,f=d.getDefaults(h.id);k.$watch("tiles",function(d){var g=f.tileLayerOptions,i=f.tileLayer;return!j(d.url)&&j(e)?void b.removeLayer(e):j(e)?j(d.url)&&j(d.options)&&!a.equals(d.options,g)?(b.removeLayer(e),g=f.tileLayerOptions,a.copy(d.options,g),i=d.url,e=L.tileLayer(i,g),e.addTo(b),void c.setTiles(e,h.id)):void(j(d.url)&&e.setUrl(d.url)):(j(d.options)&&a.copy(d.options,g),j(d.url)&&(i=d.url),e=L.tileLayer(i,g),e.addTo(b),void c.setTiles(e,h.id))},!0)}):void f.warn("[AngularJS - Leaflet] The 'tiles' definition doesn't have the 'url' property.")}}}]),a.module("ui-leaflet").directive("watchOptions",["$log","$rootScope","$q","leafletData","leafletHelpers",function(b,c,d,e,f){var g=f.isDefined,h=f.errorHeader,i=f.isObject,j=b;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(b,c,d,e){var f=e[0],k=f.getLeafletScope(),l=function(a){return"watch"===a||"watchCollection"===a||"watchDeep"===a||null===a};g(k.watchOptions)&&i(k.watchOptions)&&a.forEach(["markers","geojson","paths"],function(a){g(k.watchOptions[a])&&(l(k.watchOptions[a].type)||j.error(h+" watchOptions."+a+".type is not a valid type."),g(k.watchOptions[a].individual)?l(k.watchOptions[a].individual.type)||j.error(h+" watchOptions."+a+".individual.type is not a valid type."):j.error(h+" watchOptions."+a+".type.individual must be defined."))})}}}]),a.module("ui-leaflet").factory("leafletEventsHelpersFactory",["$rootScope","$q","leafletLogger","leafletHelpers",function(b,c,d,e){var f=e.safeApply,g=e.isDefined,h=e.isObject,i=e.isArray,j=e.errorHeader,k=d,l=function(a,b){this.rootBroadcastName=a,k.debug("leafletEventsHelpersFactory: lObjectType: "+b+"rootBroadcastName: "+a),this.lObjectType=b};return l.prototype.getAvailableEvents=function(){return[]},l.prototype.genDispatchEvent=function(a,b,c,d,e,f,g,h,i){var j=this;return a=a||"",a&&(a="."+a),function(l){var m=j.rootBroadcastName+a+"."+b;k.debug(m),j.fire(d,m,c,l,l.target||e,g,f,h,i)}},l.prototype.fire=function(c,d,e,h,i,j,k,l,m){f(c,function(){var f={leafletEvent:h,leafletObject:i,modelName:k,model:j};g(l)&&a.extend(f,{layerName:l}),"emit"===e?c.$emit(d,f):b.$broadcast(d,f)})},l.prototype.bindEvents=function(a,b,c,d,e,f,l){var m=[],n="emit",o=this;if(g(e.eventBroadcast))if(h(e.eventBroadcast))if(g(e.eventBroadcast[o.lObjectType]))if(h(e.eventBroadcast[o.lObjectType])){g(e.eventBroadcast[this.lObjectType].logic)&&"emit"!==e.eventBroadcast[o.lObjectType].logic&&"broadcast"!==e.eventBroadcast[o.lObjectType].logic&&k.warn(j+"Available event propagation logic are: 'emit' or 'broadcast'.");var p=!1,q=!1;g(e.eventBroadcast[o.lObjectType].enable)&&i(e.eventBroadcast[o.lObjectType].enable)&&(p=!0),g(e.eventBroadcast[o.lObjectType].disable)&&i(e.eventBroadcast[o.lObjectType].disable)&&(q=!0),p&&q?k.warn(j+"can not enable and disable events at the same time"):p||q?p?e.eventBroadcast[this.lObjectType].enable.forEach(function(a){m.indexOf(a)!==-1?k.warn(j+"This event "+a+" is already enabled"):o.getAvailableEvents().indexOf(a)===-1?k.warn(j+"This event "+a+" does not exist"):m.push(a)}):(m=this.getAvailableEvents(),e.eventBroadcast[o.lObjectType].disable.forEach(function(a){var b=m.indexOf(a);b===-1?k.warn(j+"This event "+a+" does not exist or has been already disabled"):m.splice(b,1)})):k.warn(j+"must enable or disable events")}else k.warn(j+"event-broadcast."+[o.lObjectType]+" must be an object check your model.");else m=this.getAvailableEvents();else k.error(j+"event-broadcast must be an object check your model.");else m=this.getAvailableEvents();return m.forEach(function(g){b.on(g,o.genDispatchEvent(a,g,n,e,b,c,d,f,l))}),n},l}]).service("leafletEventsHelpers",["leafletEventsHelpersFactory",function(a){return new a}]),a.module("ui-leaflet").factory("leafletGeoJsonEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory","leafletData",function(a,b,c,d,e,f){var g=d.safeApply,h=e,i=function(){h.call(this,"leafletDirectiveGeoJson","geojson")};return i.prototype=new h,i.prototype.genDispatchEvent=function(b,c,d,e,i,j,k,l,m){var n=h.prototype.genDispatchEvent.call(this,b,c,d,e,i,j,k,l),o=this;return function(b){"mouseout"===c&&(m.resetStyleOnMouseout&&f.getGeoJSON(m.mapId).then(function(a){var c=l?a[l]:a;c.resetStyle(b.target)}),g(e,function(){a.$broadcast(o.rootBroadcastName+".mouseout",b)})),n(b)}},i.prototype.getAvailableEvents=function(){return["click","dblclick","mouseover","mouseout"]},new i}]),a.module("ui-leaflet").factory("leafletLabelEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory",function(a,b,c,d,e){var f=d,g=e,h=function(){g.call(this,"leafletDirectiveLabel","markers")};return h.prototype=new g,h.prototype.genDispatchEvent=function(a,b,c,d,e,f,h,i){var j=f.replace("markers.","");return g.prototype.genDispatchEvent.call(this,a,b,c,d,e,j,h,i)},h.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu"]},h.prototype.genEvents=function(a,b,c,d,e,g,h,i){var j=this,k=this.getAvailableEvents(),l=f.getObjectArrayPath("markers."+g);k.forEach(function(b){e.label.on(b,j.genDispatchEvent(a,b,c,d,e.label,l,h,i))})},h.prototype.bindEvents=function(a,b,c,d,e,f){},new h}]),a.module("ui-leaflet").factory("leafletMapEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpers","leafletIterators",function(a,b,c,d,e,f){var g=d.isDefined,h=e.fire,i=function(){return["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","contextmenu","focus","blur","preclick","load","unload","viewreset","movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoomanim","zoomend","zoomlevelschange","resize","autopanstart","layeradd","layerremove","baselayerchange","overlayadd","overlayremove","locationfound","locationerror","popupopen","popupclose","draw:created","draw:edited","draw:deleted","draw:drawstart","draw:drawstop","draw:editstart","draw:editstop","draw:deletestart","draw:deletestop"]},j=function(a,b,d,e){return e&&(e+="."),function(f){var g="leafletDirectiveMap."+e+b;c.debug(g),h(a,g,d,f,f.target,a)}},k=function(a){a.$broadcast("boundsChanged")},l=function(a,b,c,d){if(g(c.urlHashCenter)){var e=b.getCenter(),f=e.lat.toFixed(4)+":"+e.lng.toFixed(4)+":"+b.getZoom();g(d.c)&&d.c===f||a.$emit("centerUrlHash",f)}},m=function(a,b,c,d,e,g){f.each(c,function(c){var f={};f[d]=c,b||(b=a._container.id||""),a.on(c,j(e,c,g,b),f)})};return{getAvailableMapEvents:i,genDispatchMapEvent:j,notifyCenterChangedToBounds:k,notifyCenterUrlHashChanged:l,addEvents:m}}]),a.module("ui-leaflet").factory("leafletMarkerEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletEventsHelpersFactory","leafletLabelEvents",function(a,b,c,d,e,f){var g=d.safeApply,h=d.isDefined,i=d,j=f,k=e,l=function(){k.call(this,"leafletDirectiveMarker","markers")};return l.prototype=new k,l.prototype.genDispatchEvent=function(b,c,d,e,f,h,i,j){var l=k.prototype.genDispatchEvent.call(this,b,c,d,e,f,h,i,j);return function(b){"click"===c?g(e,function(){a.$broadcast("leafletDirectiveMarkersClick",h)}):"dragend"===c&&(g(e,function(){i.lat=f.getLatLng().lat,i.lng=f.getLatLng().lng}),i.message&&i.focus===!0&&f.openPopup()),l(b)}},l.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","dragstart","drag","dragend","move","remove","popupopen","popupclose","touchend","touchstart","touchmove","touchcancel","touchleave"]},l.prototype.bindEvents=function(a,b,c,d,e,f){var g=k.prototype.bindEvents.call(this,a,b,c,d,e,f);i.LabelPlugin.isLoaded()&&h(b.label)&&j.genEvents(a,c,g,e,b,d,f)},new l}]);var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};a.module("ui-leaflet").factory("leafletPathEvents",["$rootScope","$q","leafletLogger","leafletHelpers","leafletLabelEvents","leafletEventsHelpers",function(a,b,c,e,f,g){var h=e.isDefined,i=e.isObject,j=e,k=e.errorHeader,l=f,m=g.fire,n=c,o=function(a,b,c,d,e,f,g,h){return a=a||"",a&&(a="."+a),function(i){var j="leafletDirectivePath"+a+"."+b;n.debug(j),m(d,j,c,i,i.target||e,g,f,h)}},p=function(a,b,c,e,f){var g,m,p=[],r="broadcast";if(h(f.eventBroadcast))if(i(f.eventBroadcast))if(h(f.eventBroadcast.path))if(i(f.eventBroadcast.paths))n.warn(k+"event-broadcast.path must be an object check your model.");else{void 0!==f.eventBroadcast.path.logic&&null!==f.eventBroadcast.path.logic&&("emit"!==f.eventBroadcast.path.logic&&"broadcast"!==f.eventBroadcast.path.logic?n.warn(k+"Available event propagation logic are: 'emit' or 'broadcast'."):"emit"===f.eventBroadcast.path.logic&&(r="emit"));var s=!1,t=!1;if(void 0!==f.eventBroadcast.path.enable&&null!==f.eventBroadcast.path.enable&&"object"===d(f.eventBroadcast.path.enable)&&(s=!0),void 0!==f.eventBroadcast.path.disable&&null!==f.eventBroadcast.path.disable&&"object"===d(f.eventBroadcast.path.disable)&&(t=!0),s&&t)n.warn(k+"can not enable and disable events at the same time");else if(s||t)if(s)for(g=0;g<f.eventBroadcast.path.enable.length;g++)m=f.eventBroadcast.path.enable[g],p.indexOf(m)!==-1?n.warn(k+"This event "+m+" is already enabled"):q().indexOf(m)===-1?n.warn(k+"This event "+m+" does not exist"):p.push(m);else for(p=q(),g=0;g<f.eventBroadcast.path.disable.length;g++){m=f.eventBroadcast.path.disable[g];var u=p.indexOf(m);u===-1?n.warn(k+"This event "+m+" does not exist or has been already disabled"):p.splice(u,1)}else n.warn(k+"must enable or disable events")}else p=q();else n.error(k+"event-broadcast must be an object check your model.");else p=q();for(g=0;g<p.length;g++)m=p[g],b.on(m,o(a,m,r,f,p,c));j.LabelPlugin.isLoaded()&&h(b.label)&&l.genEvents(a,c,r,f,b,e)},q=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"]};return{getAvailablePathEvents:q,bindPathEvents:p}}])}(angular);
+!function(e,t){var i=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=t);else try{i.innerHTML=t}catch(d){i.innerText=t}}(document,".digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters.hidden,.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper.hidden{visibility:hidden}.digit-keyboard{position:absolute;left:0;right:0;bottom:0;background:0 0;font-size:24px;z-index:5000}.digit-keyboard *{box-sizing:border-box}.digit-keyboard .digit-keyboard-row{display:flex;flex-direction:row;border-bottom:1px solid #333}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper{flex:1;text-align:center;position:relative;height:60px}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key{display:block;margin:0 auto;position:absolute;left:0;top:0;right:0;bottom:0;border-right:1px solid #333;border-left:1px solid #333;line-height:60px;-webkit-transition:background-color .1s linear;-moz-transition:background-color .1s linear;-o-transition:background-color .1s linear;-ms-transition:background-color .1s linear;transition:background-color .1s linear}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{font-size:1em;vertical-align:middle;display:inline-block;line-height:normal;text-align:center;margin-top:-.4em}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters{font-size:9.6px;line-height:9.6px;height:9.6px;margin-top:-.25em}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-action{position:absolute;left:0;top:0;right:0;bottom:0;line-height:60px;font-size:24px}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper:first-child .digit-keyboard-key{border-right:none}.digit-keyboard .digit-keyboard-row .digit-keyboard-key-wrapper:last-child .digit-keyboard-key{border-left:none}.digit-keyboard .digit-keyboard-row:first-child{border-top:1px solid #333}.digit-keyboard .digit-keyboard-row:last-child{border:none}.digit-keyboard .digit-keyboard-row:last-child .digit-keyboard-key-wrapper .digit-keyboard-key{border-bottom:1px solid #333}.digit-keyboard.align-center{margin:0 auto}.digit-keyboard.align-left{margin-right:auto}.digit-keyboard.align-right{margin-left:auto}.digit-keyboard.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{margin-top:-.3em}.digit-keyboard.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number .digit-keyboard-key-letters{display:none}.digit-keyboard.round-buttons .digit-keyboard-row{border:none}.digit-keyboard.round-buttons .digit-keyboard-row .digit-keyboard-key-wrapper{margin:10px 0 0}.digit-keyboard.round-buttons .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key{width:60px;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;border:1px solid #333}.digit-keyboard.round-buttons .digit-keyboard-row:last-child .digit-keyboard-key-wrapper{margin-bottom:10px}.digit-keyboard.round-buttons.no-letters .digit-keyboard-row .digit-keyboard-key-wrapper .digit-keyboard-key .digit-keyboard-key-number{height:57.6px;line-height:57.6px}.digit-keyboard.keyboard-light *{border-color:#e6e6e6!important}.digit-keyboard.keyboard-light .digit-keyboard-key{background:#fff;color:#444}.digit-keyboard.keyboard-light .digit-keyboard-key.activated{background:#e6e6e6}.digit-keyboard.keyboard-stable *{border-color:#dfdfdf!important}.digit-keyboard.keyboard-stable .digit-keyboard-key{background:#f8f8f8;color:#444}.digit-keyboard.keyboard-stable .digit-keyboard-key.activated{background:#dfdfdf}.digit-keyboard.keyboard-positive *{border-color:#0c60ee!important}.digit-keyboard.keyboard-positive .digit-keyboard-key{background:#387ef5;color:#fff}.digit-keyboard.keyboard-positive .digit-keyboard-key.activated{background:#0c60ee}.digit-keyboard.keyboard-calm *{border-color:#0a9dc7!important}.digit-keyboard.keyboard-calm .digit-keyboard-key{background:#11c1f3;color:#fff}.digit-keyboard.keyboard-calm .digit-keyboard-key.activated{background:#0a9dc7}.digit-keyboard.keyboard-balanced *{border-color:#28a54c!important}.digit-keyboard.keyboard-balanced .digit-keyboard-key{background:#33cd5f;color:#fff}.digit-keyboard.keyboard-balanced .digit-keyboard-key.activated{background:#28a54c}.digit-keyboard.keyboard-energized *{border-color:#e6b500!important}.digit-keyboard.keyboard-energized .digit-keyboard-key{background:#ffc900;color:#fff}.digit-keyboard.keyboard-energized .digit-keyboard-key.activated{background:#e6b500}.digit-keyboard.keyboard-assertive *{border-color:#e42112!important}.digit-keyboard.keyboard-assertive .digit-keyboard-key{background:#ef473a;color:#fff}.digit-keyboard.keyboard-assertive .digit-keyboard-key.activated{background:#e42112}.digit-keyboard.keyboard-royal *{border-color:#6b46e5!important}.digit-keyboard.keyboard-royal .digit-keyboard-key{background:#886aea;color:#fff}.digit-keyboard.keyboard-royal .digit-keyboard-key.activated{background:#6b46e5}.digit-keyboard.keyboard-dark *{border-color:#2b2b2b!important}.digit-keyboard.keyboard-dark .digit-keyboard-key{background:#444;color:#fff}.digit-keyboard.keyboard-dark .digit-keyboard-key.activated{background:#2b2b2b}.digit-keyboard.keyboard-opaque-black *{border-color:rgba(0,0,0,.75)!important}.digit-keyboard.keyboard-opaque-black .digit-keyboard-key{background:rgba(0,0,0,.15);color:rgba(0,0,0,.75)}.digit-keyboard.keyboard-opaque-black .digit-keyboard-key.activated{background:rgba(0,0,0,.25)}.digit-keyboard.keyboard-opaque-white *{border-color:rgba(255,255,255,.75)!important}.digit-keyboard.keyboard-opaque-white .digit-keyboard-key{background:rgba(255,255,255,.15);color:rgba(255,255,255,.75)}.digit-keyboard.keyboard-opaque-white .digit-keyboard-key.activated{background:rgba(255,255,255,.25)}.digit-keyboard.animation-slide-up{-webkit-transition:transform linear 150ms;transition:transform linear 150ms;transform:translate3d(0,0,0)}.digit-keyboard.animation-slide-up.ng-hide{transform:translate3d(0,100%,0)}.digit-keyboard.animation-pop{-webkit-transition:transform linear 150ms;transition:transform linear 150ms;transform:scale3d(1,1,1)}.digit-keyboard.animation-pop.ng-hide{transform:scale3d(0,0,1)}"),!function(e){try{e=angular.module("ion-digit-keyboard.templates")}catch(t){e=angular.module("ion-digit-keyboard.templates",[])}e.run(["$templateCache",function(e){e.put("keyboard.tpl.html","<div class=\"digit-keyboard align-{{align}} keyboard-{{theme}} animation-{{animation}} {{roundButtons ? 'round-buttons' : ''}} {{showLetters == false ? 'no-letters' : ''}} {{(ngShow == false || ngHide == true) ? 'ng-hide' : ''}}\" style=\"width: {{width}};\"><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(1)><div class=digit-keyboard-key-number>1<div class=digit-keyboard-key-letters></div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(2)><div class=digit-keyboard-key-number>2<div class=digit-keyboard-key-letters>ABC</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(3)><div class=digit-keyboard-key-number>3<div class=digit-keyboard-key-letters>DEF</div></div></div></div></div><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(4)><div class=digit-keyboard-key-number>4<div class=digit-keyboard-key-letters>GHI</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(5)><div class=digit-keyboard-key-number>5<div class=digit-keyboard-key-letters>JKL</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(6)><div class=digit-keyboard-key-number>6<div class=digit-keyboard-key-letters>MNO</div></div></div></div></div><div class=digit-keyboard-row><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(7)><div class=digit-keyboard-key-number>7<div class=digit-keyboard-key-letters>PQRS</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(8)><div class=digit-keyboard-key-number>8<div class=digit-keyboard-key-letters>TUV</div></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(9)><div class=digit-keyboard-key-number>9<div class=digit-keyboard-key-letters>WXYZ</div></div></div></div></div><div class=digit-keyboard-row><div class=\"digit-keyboard-key-wrapper {{showLeftAction == false ? 'hidden' : ''}}\"><div class=digit-keyboard-key ng-click=leftAction($event) style={{leftStyle}}><div class=digit-keyboard-key-action ng-bind-html=leftHtml style={{leftFontSize}}></div></div></div><div class=digit-keyboard-key-wrapper><div class=digit-keyboard-key ng-click=numberAction(0)><div class=digit-keyboard-key-number style=\"margin-top: -0.30em;\">0</div></div></div><div class=\"digit-keyboard-key-wrapper {{showRightAction == false ? 'hidden' : ''}}\"><div class=digit-keyboard-key ng-click=rightAction($event) style={{rightStyle}}><div class=digit-keyboard-key-action ng-bind-html=rightHtml style={{rightFontSize}}></div></div></div></div></div>")}])}(),angular.module("ion-digit-keyboard.directive",[]).directive("ionDigitKeyboard",["$timeout","$ionicScrollDelegate","$templateCache",function(e,t,i){var d=150;return{restrict:"EA",template:i.get("keyboard.tpl.html"),replace:!0,scope:{settings:"=settings",ngShow:"=",ngHide:"="},link:function(i,o,r){function a(){1==b&&(k.style.bottom="0px",k.style.height=s)}function n(){e(function(){if(1==b){var e=o[0].offsetHeight;s=k.style.height,k.style.height="auto",k.style.bottom=e+1+"px"}},d+10)}function y(){i.ngShow===!0?n():i.ngShow===!1&&a(),t.resize()}function g(){i.ngHide===!0?a():i.ngHide===!1&&n(),t.resize()}"undefined"==typeof i.settings&&(i.settings={});var k,s,b=!0,l="ion-content",c={},u={};if(i.leftStyle="",i.rightStyle="",i.leftFontSize="",i.rightFontSize="",i.showLetters="undefined"==typeof i.settings.showLetters?!1:i.settings.showLetters,i.roundButtons="undefined"==typeof i.settings.roundButtons?!1:i.settings.roundButtons,i.numberAction=i.settings.action||function(){},i.width=i.settings.width||"100%",i.align=i.settings.align||"center",i.animation=i.settings.animation||"slide-up",i.theme=i.settings.theme||"stable","undefined"!=typeof i.settings.leftButton&&"object"==typeof i.settings.leftButton.style&&("undefined"!=typeof i.settings.leftButton.style.color&&(i.leftStyle+="color: "+i.settings.leftButton.style.color+";"),"undefined"!=typeof i.settings.leftButton.style.bgColor&&(c["default"]=i.settings.leftButton.style.bgColor,i.leftStyle+="background-color: "+c["default"]+";"),"undefined"!=typeof i.settings.leftButton.style.activeBgColor&&(c.active=i.settings.leftButton.style.activeBgColor),"undefined"!=typeof i.settings.leftButton.style.borderColor&&(i.leftStyle+="border-color: "+i.settings.leftButton.style.borderColor+" !important;"),"undefined"!=typeof i.settings.leftButton.style.fontSize&&(i.leftFontSize="font-size: "+i.settings.leftButton.style.fontSize+" !important;")),"undefined"!=typeof i.settings.rightButton&&"object"==typeof i.settings.rightButton.style&&("undefined"!=typeof i.settings.rightButton.style.color&&(i.rightStyle+="color: "+i.settings.rightButton.style.color+";"),"undefined"!=typeof i.settings.rightButton.style.bgColor&&(u["default"]=i.settings.rightButton.style.bgColor,i.rightStyle+="background-color: "+u["default"]+";"),"undefined"!=typeof i.settings.rightButton.style.activeBgColor&&(u.active=i.settings.rightButton.style.activeBgColor),"undefined"!=typeof i.settings.rightButton.style.borderColor&&(i.rightStyle+="border-color: "+i.settings.rightButton.style.borderColor+" !important;"),"undefined"!=typeof i.settings.rightButton.style.fontSize&&(i.rightFontSize="font-size: "+i.settings.rightButton.style.fontSize+" !important;")),i.showLeftAction=!1,"undefined"!=typeof i.settings.leftButton&&(i.leftHtml=i.settings.leftButton.html,i.showLeftAction=!0,i.leftAction=function(e){if(c.active){var t=e.target;"I"==t.tagName?t=t.parentNode.parentNode:t.className.indexOf("digit-keyboard-key-action")>-1&&(t=t.parentNode),"undefined"==typeof c["default"]&&(c["default"]=t.style.backgroundColor),t.style.backgroundColor=c.active,setTimeout(function(){t.style.backgroundColor=c["default"]},100)}i.settings.leftButton.action()}),i.showRightAction=!1,"undefined"!=typeof i.settings.rightButton&&(i.rightHtml=i.settings.rightButton.html,i.showRightAction=!0,i.rightAction=function(e){if(u.active){var t=e.target;"I"==t.tagName?t=t.parentNode.parentNode:t.className.indexOf("digit-keyboard-key-action")>-1&&(t=t.parentNode),"undefined"==typeof u["default"]&&(u["default"]=t.style.backgroundColor),t.style.backgroundColor=u.active,setTimeout(function(){t.style.backgroundColor=u["default"]},100)}i.settings.rightButton.action()}),"object"==typeof i.settings.resizeContent||"boolean"==typeof i.settings.resizeContent)if("object"==typeof i.settings.resizeContent)var b="undefined"==typeof i.settings.resizeContent.enable?!0:i.settings.resizeContent.enable,l="undefined"==typeof i.settings.resizeContent.element?"ion-content":i.settings.resizeContent.element;else"boolean"==typeof i.settings.resizeContent&&(b=i.settings.resizeContent);k=o[0].parentElement.querySelectorAll(l)[0],i.$watch("ngShow",y),i.$watch("ngHide",g)}}}]),angular.module("ion-digit-keyboard",["ionic","ion-digit-keyboard.templates","ion-digit-keyboard.directive"]);
+/*!
+ * angular-chart.js - An angular.js wrapper for Chart.js
+ * http://jtblin.github.io/angular-chart.js/
+ * Version: 1.1.1
+ *
+ * Copyright 2016 Jerome Touffe-Blin
+ * Released under the BSD-2-Clause license
+ * https://github.com/jtblin/angular-chart.js/blob/master/LICENSE
+ */
+!function(t){"use strict";if("object"==typeof exports)module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],t);else{if("undefined"==typeof angular)throw new Error("AngularJS framework needs to be included, see https://angularjs.org/");if("undefined"==typeof Chart)throw new Error("Chart.js library needs to be included, see http://jtblin.github.io/angular-chart.js/");t(angular,Chart)}}(function(t,r){"use strict";function e(){var e={responsive:!0},a={Chart:r,getOptions:function(r){var a=r&&e[r]||{};return t.extend({},e,a)}};this.setOptions=function(r,n){n?e[r]=t.merge(e[r]||{},n):(n=r,e=t.merge(e,n)),t.merge(a.Chart.defaults,e)},this.$get=function(){return a}}function a(e,a){function o(t,r,a){var n=D(t,r);if(C(r)&&k(t,r,a,n)){var o=a[0],c=o.getContext("2d");r.chartGetColor=y(r);var i=b(t,r);F(r),r.chart=new e.Chart(c,{type:t,data:i,options:n}),r.$emit("chart-create",r.chart),A(o,r)}}function c(t,r){return!!(t&&r&&t.length&&r.length)&&(Array.isArray(t[0])?t.length===r.length&&t.every(function(t,e){return t.length===r[e].length}):r.reduce(i,0)>0&&t.length===r.length)}function i(t,r){return t+r}function u(r,e,a){var n={point:void 0,points:void 0};return function(o){var c=r.chart.getElementAtEvent||r.chart.getPointAtEvent,i=r.chart.getElementsAtEvent||r.chart.getPointsAtEvent;if(i){var u=i.call(r.chart,o),l=c?c.call(r.chart,o)[0]:void 0;a!==!1&&(t.equals(n.points,u)||t.equals(n.point,l))||(n.point=l,n.points=u,r[e](u,o,l))}}}function l(a,n){for(var o=t.copy(n.chartColors||e.getOptions(a).chartColors||r.defaults.global.colors),c=o.length<n.chartData.length;o.length<n.chartData.length;)o.push(n.chartGetColor());return c&&(n.chartColors=o),o.map(h)}function h(t){return"string"==typeof t&&"r"===t[0]?f(v(t)):"string"==typeof t&&"#"===t[0]?f(p(t.substr(1))):"object"==typeof t&&null!==t?t:s()}function s(){var t=[d(0,255),d(0,255),d(0,255)];return f(t)}function f(t){var r=t[3]||1;return t=t.slice(0,3),{backgroundColor:g(t,.2),pointBackgroundColor:g(t,r),pointHoverBackgroundColor:g(t,.8),borderColor:g(t,r),pointBorderColor:"#fff",pointHoverBorderColor:g(t,r)}}function d(t,r){return Math.floor(Math.random()*(r-t+1))+t}function g(t,r){return n?"rgb("+t.join(",")+")":"rgba("+t.concat(r).join(",")+")"}function p(t){var r=parseInt(t,16),e=r>>16&255,a=r>>8&255,n=255&r;return[e,a,n]}function v(t){var r=t.match(/^rgba?\(([\d,.]+)\)$/);if(!r)throw new Error("Cannot parse rgb value");return t=r[1].split(","),t.map(Number)}function C(t){return t.chartData&&t.chartData.length}function y(t){return"function"==typeof t.chartGetColor?t.chartGetColor:s}function b(t,r){var e=l(t,r);return Array.isArray(r.chartData[0])?m(r.chartLabels,r.chartData,r.chartSeries||[],e,r.chartDatasetOverride):w(r.chartLabels,r.chartData,e,r.chartDatasetOverride)}function m(r,e,a,n,o){return{labels:r,datasets:e.map(function(r,e){var c=t.extend({},n[e],{label:a[e],data:r});return o&&o.length>=e&&t.merge(c,o[e]),c})}}function w(r,e,a,n){var o={labels:r,datasets:[{data:e,backgroundColor:a.map(function(t){return t.pointBackgroundColor}),hoverBackgroundColor:a.map(function(t){return t.backgroundColor})}]};return n&&t.merge(o.datasets[0],n),o}function D(r,a){return t.extend({},e.getOptions(r),a.chartOptions)}function A(r,e){r.onclick=e.chartClick?u(e,"chartClick",!1):t.noop,r.onmousemove=e.chartHover?u(e,"chartHover",!0):t.noop}function B(t,r){Array.isArray(r.chartData[0])?r.chart.data.datasets.forEach(function(r,e){r.data=t[e]}):r.chart.data.datasets[0].data=t,r.chart.update(),r.$emit("chart-update",r.chart)}function $(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function k(t,r,e,n){return!n.responsive||0!==e[0].clientHeight||(a(function(){o(t,r,e)},50,!1),!1)}function F(t){t.chart&&(t.chart.destroy(),t.$emit("chart-destroy",t.chart))}return function(r){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartDatasetOverride:"=?"},link:function(e,a){function i(t,n){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void F(e);var i=r||e.chartType;if(i)return e.chart&&c(t,n)?B(t,e):void o(i,e,a)}function u(n,c){if(!$(n)&&!t.equals(n,c)){var i=r||e.chartType;i&&o(i,e,a)}}function l(r,n){$(r)||t.equals(r,n)||o(r,e,a)}n&&window.G_vmlCanvasManager.initElement(a[0]),e.$watch("chartData",i,!0),e.$watch("chartSeries",u,!0),e.$watch("chartLabels",u,!0),e.$watch("chartOptions",u,!0),e.$watch("chartColors",u,!0),e.$watch("chartDatasetOverride",u,!0),e.$watch("chartType",l,!1),e.$on("$destroy",function(){F(e)}),e.$on("$resize",function(){e.chart&&e.chart.resize()})}}}}r.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",r.defaults.global.tooltips.mode="label",r.defaults.global.elements.line.borderWidth=2,r.defaults.global.elements.rectangle.borderWidth=2,r.defaults.global.legend.display=!1,r.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var n="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return n&&(r.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",e).factory("ChartJsFactory",["ChartJs","$timeout",a]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("bar")}]).directive("chartHorizontalBar",["ChartJsFactory",function(t){return new t("horizontalBar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("polarArea")}]).directive("chartBubble",["ChartJsFactory",function(t){return new t("bubble")}]).name});
+//# sourceMappingURL=angular-chart.min.js.map
+
+(function(window) {
+   var createModule = function(angular) {
+      var module = angular.module('FBAngular', []);
+
+      module.factory('Fullscreen', ['$document', '$rootScope', function ($document,$rootScope) {
+         var document = $document[0];
+
+         var emitter = $rootScope.$new();
+
+         // listen event on document instead of element to avoid firefox limitation
+         // see https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
+         $document.on('fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange', function(){
+            emitter.$emit('FBFullscreen.change', serviceInstance.isEnabled());
+         });
+
+         var serviceInstance = {
+            $on: angular.bind(emitter, emitter.$on),
+            all: function(options) {
+               serviceInstance.enable( document.documentElement, options);
+            },
+            enable: function(element, options) {
+               if(element.requestFullScreen) {
+                  element.requestFullScreen(options);
+               } else if(element.mozRequestFullScreen) {
+                  element.mozRequestFullScreen();
+               } else if(element.webkitRequestFullscreen) {
+                  element.webkitRequestFullscreen();
+               } else if (element.msRequestFullscreen) {
+                  element.msRequestFullscreen();
+               }
+            },
+            cancel: function() {
+               if(document.cancelFullScreen) {
+                  document.cancelFullScreen();
+               } else if(document.mozCancelFullScreen) {
+                  document.mozCancelFullScreen();
+               } else if(document.webkitExitFullscreen) {
+                  document.webkitExitFullscreen();
+               } else if (document.msExitFullscreen) {
+                  document.msExitFullscreen();
+               }
+            },
+            isEnabled: function(){
+               var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement;
+               return fullscreenElement ? true : false;
+            },
+            toggleAll: function(){
+               serviceInstance.isEnabled() ? serviceInstance.cancel() : serviceInstance.all();
+            },
+            isSupported: function(){
+               var docElm = document.documentElement;
+               var requestFullscreen = docElm.requestFullScreen || docElm.mozRequestFullScreen || docElm.webkitRequestFullscreen || docElm.msRequestFullscreen;
+               return requestFullscreen ? true : false;
+            }
+         };
+
+         return serviceInstance;
+      }]);
+
+      module.directive('fullscreen', ['Fullscreen', function(Fullscreen) {
+         return {
+            link : function ($scope, $element, $attrs) {
+               // Watch for changes on scope if model is provided
+               if ($attrs.fullscreen) {
+                  $scope.$watch($attrs.fullscreen, function(value) {
+                     var isEnabled = Fullscreen.isEnabled();
+                     if (value && !isEnabled) {
+                        Fullscreen.enable($element[0]);
+                        $element.addClass('isInFullScreen');
+                     } else if (!value && isEnabled) {
+                        Fullscreen.cancel();
+                        $element.removeClass('isInFullScreen');
+                     }
+                  });
+
+                  // Listen on the `FBFullscreen.change`
+                  // the event will fire when anything changes the fullscreen mode
+                  var removeFullscreenHandler = Fullscreen.$on('FBFullscreen.change', function(evt, isFullscreenEnabled){
+                     if(!isFullscreenEnabled){
+                        $scope.$evalAsync(function(){
+                           $scope.$eval($attrs.fullscreen + '= false');
+                           $element.removeClass('isInFullScreen');
+                        });
+                     }
+                  });
+
+                  $scope.$on('$destroy', function() {
+                     removeFullscreenHandler();
+                  });
+
+               } else {
+                  if ($attrs.onlyWatchedProperty !== undefined) {
+                     return;
+                  }
+
+                  $element.on('click', function (ev) {
+                     Fullscreen.enable(  $element[0] );
+                  });
+               }
+            }
+         };
+      }]);
+      return module;
+   };
+
+   if (typeof define === "function" && define.amd) {
+      define("FBAngular", ['angular'], function (angular) { return createModule(angular); } );
+   } else if (typeof module !== 'undefined' && module.exports) {
+      module.exports = createModule(window.angular).name;
+   } else {
+      createModule(window.angular);
+   }
+})(window);
+
+// Generated by CoffeeScript 1.8.0
+(function() {
+ var Base58 = (typeof module !== "undefined" && module !== null ? module.exports : void 0) || (window.Base58 = {});
+
+ Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
+ Base58.alphabetMap = {};
+
+ for(var i = 0; i < Base58.alphabet.length; i++) {
+   Base58.alphabetMap[Base58.alphabet.charAt(i)] = i;
+ }
+
+  Base58.encode = function(buffer) {
+    var carry, digits, j;
+    if (buffer.length === 0) {
+      return "";
+    }
+    i = void 0;
+    j = void 0;
+    digits = [0];
+    i = 0;
+    while (i < buffer.length) {
+      j = 0;
+      while (j < digits.length) {
+        digits[j] <<= 8;
+        j++;
+      }
+      digits[0] += buffer[i];
+      carry = 0;
+      j = 0;
+      while (j < digits.length) {
+        digits[j] += carry;
+        carry = (digits[j] / 58) | 0;
+        digits[j] %= 58;
+        ++j;
+      }
+      while (carry) {
+        digits.push(carry % 58);
+        carry = (carry / 58) | 0;
+      }
+      i++;
+    }
+    i = 0;
+    while (buffer[i] === 0 && i < buffer.length - 1) {
+      digits.push(0);
+      i++;
+    }
+    return digits.reverse().map(function(digit) {
+      return Base58.alphabet[digit];
+    }).join("");
+  };
+
+  Base58.decode = function(string) {
+    var bytes, c, carry, j;
+    if (string.length === 0) {
+      return (typeof Uint8Array !== "undefined" && Uint8Array !== null ? new Uint8Array(0) : new Buffer(0));
+    }
+    i = void 0;
+    j = void 0;
+    bytes = [0];
+    i = 0;
+    while (i < string.length) {
+      c = string[i];
+      if (!(c in Base58.alphabetMap)) {
+        throw "Base58.decode received unacceptable input. Character '" + c + "' is not in the Base58 alphabet.";
+      }
+      j = 0;
+      while (j < bytes.length) {
+        bytes[j] *= 58;
+        j++;
+      }
+      bytes[0] += Base58.alphabetMap[c];
+      carry = 0;
+      j = 0;
+      while (j < bytes.length) {
+        bytes[j] += carry;
+        carry = bytes[j] >> 8;
+        bytes[j] &= 0xff;
+        ++j;
+      }
+      while (carry) {
+        bytes.push(carry & 0xff);
+        carry >>= 8;
+      }
+      i++;
+    }
+    i = 0;
+    while (string[i] === "1" && i < string.length - 1) {
+      bytes.push(0);
+      i++;
+    }
+    return (typeof Uint8Array !== "undefined" && Uint8Array !== null ? new Uint8Array(bytes.reverse()) : new Buffer(bytes.reverse()));
+  };
+
+}).call(this);
+
+/**
+ * [js-sha256]{@link https://github.com/emn178/js-sha256}
+ *
+ * @version 0.5.0
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
+ * @copyright Chen, Yi-Cyuan 2014-2017
+ * @license MIT
+ */
+!function(){"use strict";function t(t,h){h?(c[0]=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0,this.blocks=c):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}var h="object"==typeof window?window:{},i=!h.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;i&&(h=global);var s=!h.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,e="function"==typeof define&&define.amd,r="undefined"!=typeof ArrayBuffer,n="0123456789abcdef".split(""),o=[-2147483648,8388608,32768,128],a=[24,16,8,0],f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=["hex","array","digest","arrayBuffer"],c=[],p=function(h,i){return function(s){return new t(i,!0).update(s)[h]()}},d=function(h){var s=p("hex",h);i&&(s=y(s,h)),s.create=function(){return new t(h)},s.update=function(t){return s.create().update(t)};for(var e=0;e<u.length;++e){var r=u[e];s[r]=p(r,h)}return s},y=function(t,h){var i=require("crypto"),s=require("buffer").Buffer,e=h?"sha224":"sha256",n=function(h){if("string"==typeof h)return i.createHash(e).update(h,"utf8").digest("hex");if(r&&h instanceof ArrayBuffer)h=new Uint8Array(h);else if(void 0===h.length)return t(h);return i.createHash(e).update(new s(h)).digest("hex")};return n};t.prototype.update=function(t){if(!this.finalized){var i="string"!=typeof t;i&&r&&t instanceof h.ArrayBuffer&&(t=new Uint8Array(t));for(var s,e,n=0,o=t.length||0,f=this.blocks;o>n;){if(this.hashed&&(this.hashed=!1,f[0]=this.block,f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),i)for(e=this.start;o>n&&64>e;++n)f[e>>2]|=t[n]<<a[3&e++];else for(e=this.start;o>n&&64>e;++n)s=t.charCodeAt(n),128>s?f[e>>2]|=s<<a[3&e++]:2048>s?(f[e>>2]|=(192|s>>6)<<a[3&e++],f[e>>2]|=(128|63&s)<<a[3&e++]):55296>s||s>=57344?(f[e>>2]|=(224|s>>12)<<a[3&e++],f[e>>2]|=(128|s>>6&63)<<a[3&e++],f[e>>2]|=(128|63&s)<<a[3&e++]):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++n)),f[e>>2]|=(240|s>>18)<<a[3&e++],f[e>>2]|=(128|s>>12&63)<<a[3&e++],f[e>>2]|=(128|s>>6&63)<<a[3&e++],f[e>>2]|=(128|63&s)<<a[3&e++]);this.lastByteIndex=e,this.bytes+=e-this.start,e>=64?(this.block=f[16],this.start=e-64,this.hash(),this.hashed=!0):this.start=e}return this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,h=this.lastByteIndex;t[16]=this.block,t[h>>2]|=o[3&h],this.block=t[16],h>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[15]=this.bytes<<3,this.hash()}},t.prototype.hash=function(){var t,h,i,s,e,r,n,o,a,u,c,p=this.h0,d=this.h1,y=this.h2,l=this.h3,b=this.h4,v=this.h5,g=this.h6,w=this.h7,k=this.blocks;for(t=16;64>t;++t)e=k[t-15],h=(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,e=k[t-2],i=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,k[t]=k[t-16]+h+k[t-7]+i<<0;for(c=d&y,t=0;64>t;t+=4)this.first?(this.is224?(o=300032,e=k[0]-1413257819,w=e-150054599<<0,l=e+24177077<<0):(o=704751109,e=k[0]-210244248,w=e-1521486534<<0,l=e+143694565<<0),this.first=!1):(h=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),i=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),o=p&d,s=o^p&y^c,n=b&v^~b&g,e=w+i+n+f[t]+k[t],r=h+s,w=l+e<<0,l=e+r<<0),h=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),i=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7),a=l&p,s=a^l&d^o,n=w&b^~w&v,e=g+i+n+f[t+1]+k[t+1],r=h+s,g=y+e<<0,y=e+r<<0,h=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),i=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),u=y&l,s=u^y&p^a,n=g&w^~g&b,e=v+i+n+f[t+2]+k[t+2],r=h+s,v=d+e<<0,d=e+r<<0,h=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),i=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),c=d&y,s=c^d&l^u,n=v&g^~v&w,e=b+i+n+f[t+3]+k[t+3],r=h+s,b=p+e<<0,p=e+r<<0;this.h0=this.h0+p<<0,this.h1=this.h1+d<<0,this.h2=this.h2+y<<0,this.h3=this.h3+l<<0,this.h4=this.h4+b<<0,this.h5=this.h5+v<<0,this.h6=this.h6+g<<0,this.h7=this.h7+w<<0},t.prototype.hex=function(){this.finalize();var t=this.h0,h=this.h1,i=this.h2,s=this.h3,e=this.h4,r=this.h5,o=this.h6,a=this.h7,f=n[t>>28&15]+n[t>>24&15]+n[t>>20&15]+n[t>>16&15]+n[t>>12&15]+n[t>>8&15]+n[t>>4&15]+n[15&t]+n[h>>28&15]+n[h>>24&15]+n[h>>20&15]+n[h>>16&15]+n[h>>12&15]+n[h>>8&15]+n[h>>4&15]+n[15&h]+n[i>>28&15]+n[i>>24&15]+n[i>>20&15]+n[i>>16&15]+n[i>>12&15]+n[i>>8&15]+n[i>>4&15]+n[15&i]+n[s>>28&15]+n[s>>24&15]+n[s>>20&15]+n[s>>16&15]+n[s>>12&15]+n[s>>8&15]+n[s>>4&15]+n[15&s]+n[e>>28&15]+n[e>>24&15]+n[e>>20&15]+n[e>>16&15]+n[e>>12&15]+n[e>>8&15]+n[e>>4&15]+n[15&e]+n[r>>28&15]+n[r>>24&15]+n[r>>20&15]+n[r>>16&15]+n[r>>12&15]+n[r>>8&15]+n[r>>4&15]+n[15&r]+n[o>>28&15]+n[o>>24&15]+n[o>>20&15]+n[o>>16&15]+n[o>>12&15]+n[o>>8&15]+n[o>>4&15]+n[15&o];return this.is224||(f+=n[a>>28&15]+n[a>>24&15]+n[a>>20&15]+n[a>>16&15]+n[a>>12&15]+n[a>>8&15]+n[a>>4&15]+n[15&a]),f},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var t=this.h0,h=this.h1,i=this.h2,s=this.h3,e=this.h4,r=this.h5,n=this.h6,o=this.h7,a=[t>>24&255,t>>16&255,t>>8&255,255&t,h>>24&255,h>>16&255,h>>8&255,255&h,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n];return this.is224||a.push(o>>24&255,o>>16&255,o>>8&255,255&o),a},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),h=new DataView(t);return h.setUint32(0,this.h0),h.setUint32(4,this.h1),h.setUint32(8,this.h2),h.setUint32(12,this.h3),h.setUint32(16,this.h4),h.setUint32(20,this.h5),h.setUint32(24,this.h6),this.is224||h.setUint32(28,this.h7),t};var l=d();l.sha256=l,l.sha224=d(!0),s?module.exports=l:(h.sha256=l.sha256,h.sha224=l.sha224,e&&define(function(){return l}))}();
+/*!
+ * ngCordova
+ * v0.1.27-alpha
+ * Copyright 2015 Drifty Co. http://drifty.com/
+ * See LICENSE in this repository for license information
+ */
+!function(){angular.module("ngCordova",["ngCordova.plugins"]),angular.module("ngCordova.plugins.3dtouch",[]).factory("$cordova3DTouch",["$q",function(e){var n=[],r={},o=function(e){return function(n){for(var r in e)n.type===r&&e[r]()}};return{isAvailable:function(){var n=e.defer();return window.cordova?window.ThreeDeeTouch?window.ThreeDeeTouch.isAvailable(function(e){n.resolve(e)},function(e){n.reject(e)}):n.reject("Could not find 3D touch plugin"):n.reject("Not supported in browser"),n.promise},addQuickAction:function(t,i,a,c,u,s){var l=e.defer(),f={type:t,title:i,subtitle:u};return a&&(f.iconType=a),c&&(f.iconTemplate=c),this.isAvailable().then(function(){n.push(f),r[t]=s,window.ThreeDeeTouch.configureQuickActions(n),window.ThreeDeeTouch.onHomeIconPressed=o(r),l.resolve(n)},function(e){l.reject(e)}),l.promise},addQuickActionHandler:function(n,t){var i=e.defer();return this.isAvailable().then(function(){r[n]=t,window.ThreeDeeTouch.onHomeIconPressed=o(r),i.resolve(!0)},function(e){i.reject(e)}),i.promise},enableLinkPreview:function(){var n=e.defer();return this.isAvailable().then(function(){window.ThreeDeeTouch.enableLinkPreview(),n.resolve(!0)},function(e){n.reject(e)}),n.promise},addForceTouchHandler:function(n){var r=e.defer();return this.isAvailable().then(function(){window.ThreeDeeTouch.watchForceTouches(n),r.resolve(!0)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.actionSheet",[]).factory("$cordovaActionSheet",["$q","$window",function(e,n){return{show:function(r){var o=e.defer();return n.plugins.actionsheet.show(r,function(e){o.resolve(e)}),o.promise},hide:function(){return n.plugins.actionsheet.hide()}}}]),angular.module("ngCordova.plugins.adMob",[]).factory("$cordovaAdMob",["$q","$window",function(e,n){return{createBannerView:function(r){var o=e.defer();return n.plugins.AdMob.createBannerView(r,function(){o.resolve()},function(){o.reject()}),o.promise},createInterstitialView:function(r){var o=e.defer();return n.plugins.AdMob.createInterstitialView(r,function(){o.resolve()},function(){o.reject()}),o.promise},requestAd:function(r){var o=e.defer();return n.plugins.AdMob.requestAd(r,function(){o.resolve()},function(){o.reject()}),o.promise},showAd:function(r){var o=e.defer();return n.plugins.AdMob.showAd(r,function(){o.resolve()},function(){o.reject()}),o.promise},requestInterstitialAd:function(r){var o=e.defer();return n.plugins.AdMob.requestInterstitialAd(r,function(){o.resolve()},function(){o.reject()}),o.promise}}}]),angular.module("ngCordova.plugins.appAvailability",[]).factory("$cordovaAppAvailability",["$q",function(e){return{check:function(n){var r=e.defer();return appAvailability.check(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.appRate",[]).provider("$cordovaAppRate",[function(){this.setPreferences=function(e){e&&angular.isObject(e)&&(AppRate.preferences.useLanguage=e.language||null,AppRate.preferences.displayAppName=e.appName||"",AppRate.preferences.promptAgainForEachNewVersion=e.promptForNewVersion||!0,AppRate.preferences.openStoreInApp=e.openStoreInApp||!1,AppRate.preferences.usesUntilPrompt=e.usesUntilPrompt||3,AppRate.preferences.useCustomRateDialog=e.useCustomRateDialog||!1,AppRate.preferences.storeAppURL.ios=e.iosURL||null,AppRate.preferences.storeAppURL.android=e.androidURL||null,AppRate.preferences.storeAppURL.blackberry=e.blackberryURL||null,AppRate.preferences.storeAppURL.windows8=e.windowsURL||null)},this.setCustomLocale=function(e){var n={title:"Rate %@",message:"If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",cancelButtonLabel:"No, Thanks",laterButtonLabel:"Remind Me Later",rateButtonLabel:"Rate It Now"};n=angular.extend(n,e),AppRate.preferences.customLocale=n},this.$get=["$q",function(e){return{promptForRating:function(n){var r=e.defer(),o=AppRate.promptForRating(n);return r.resolve(o),r.promise},navigateToAppStore:function(){var n=e.defer(),r=AppRate.navigateToAppStore();return n.resolve(r),n.promise},onButtonClicked:function(e){AppRate.preferences.callbacks.onButtonClicked=e.bind(this)},onRateDialogShow:function(e){AppRate.preferences.callbacks.onRateDialogShow=e.bind(this)}}}]}]),angular.module("ngCordova.plugins.appVersion",[]).factory("$cordovaAppVersion",["$q",function(e){return{getAppName:function(){var n=e.defer();return cordova.getAppVersion.getAppName(function(e){n.resolve(e)}),n.promise},getPackageName:function(){var n=e.defer();return cordova.getAppVersion.getPackageName(function(e){n.resolve(e)}),n.promise},getVersionNumber:function(){var n=e.defer();return cordova.getAppVersion.getVersionNumber(function(e){n.resolve(e)}),n.promise},getVersionCode:function(){var n=e.defer();return cordova.getAppVersion.getVersionCode(function(e){n.resolve(e)}),n.promise}}}]),angular.module("ngCordova.plugins.backgroundGeolocation",[]).factory("$cordovaBackgroundGeolocation",["$q","$window",function(e,n){return{init:function(){n.navigator.geolocation.getCurrentPosition(function(e){return e})},configure:function(r){this.init();var o=e.defer();return n.plugins.backgroundGeoLocation.configure(function(e){o.notify(e),n.plugins.backgroundGeoLocation.finish()},function(e){o.reject(e)},r),this.start(),o.promise},start:function(){var r=e.defer();return n.plugins.backgroundGeoLocation.start(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},stop:function(){var r=e.defer();return n.plugins.backgroundGeoLocation.stop(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.badge",[]).factory("$cordovaBadge",["$q",function(e){return{hasPermission:function(){var n=e.defer();return cordova.plugins.notification.badge.hasPermission(function(e){e?n.resolve(!0):n.reject("You do not have permission")}),n.promise},promptForPermission:function(){return cordova.plugins.notification.badge.promptForPermission()},set:function(n,r,o){var t=e.defer();return cordova.plugins.notification.badge.hasPermission(function(e){e?t.resolve(cordova.plugins.notification.badge.set(n,r,o)):t.reject("You do not have permission to set Badge")}),t.promise},get:function(){var n=e.defer();return cordova.plugins.notification.badge.hasPermission(function(e){e?cordova.plugins.notification.badge.get(function(e){n.resolve(e)}):n.reject("You do not have permission to get Badge")}),n.promise},clear:function(n,r){var o=e.defer();return cordova.plugins.notification.badge.hasPermission(function(e){e?o.resolve(cordova.plugins.notification.badge.clear(n,r)):o.reject("You do not have permission to clear Badge")}),o.promise},increase:function(n,r,o){var t=e.defer();return this.hasPermission().then(function(){t.resolve(cordova.plugins.notification.badge.increase(n,r,o))},function(){t.reject("You do not have permission to increase Badge")}),t.promise},decrease:function(n,r,o){var t=e.defer();return this.hasPermission().then(function(){t.resolve(cordova.plugins.notification.badge.decrease(n,r,o))},function(){t.reject("You do not have permission to decrease Badge")}),t.promise},configure:function(e){return cordova.plugins.notification.badge.configure(e)}}}]),angular.module("ngCordova.plugins.barcodeScanner",[]).factory("$cordovaBarcodeScanner",["$q",function(e){return{scan:function(n){var r=e.defer();return cordova.plugins.barcodeScanner.scan(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},encode:function(n,r){var o=e.defer();return n=n||"TEXT_TYPE",cordova.plugins.barcodeScanner.encode(n,r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}]),angular.module("ngCordova.plugins.batteryStatus",[]).factory("$cordovaBatteryStatus",["$rootScope","$window","$timeout",function(e,n,r){var o=function(n){r(function(){e.$broadcast("$cordovaBatteryStatus:status",n)})},t=function(n){r(function(){e.$broadcast("$cordovaBatteryStatus:critical",n)})},i=function(n){r(function(){e.$broadcast("$cordovaBatteryStatus:low",n)})};return document.addEventListener("deviceready",function(){navigator.battery&&(n.addEventListener("batterystatus",o,!1),n.addEventListener("batterycritical",t,!1),n.addEventListener("batterylow",i,!1))},!1),!0}]).run(["$injector",function(e){e.get("$cordovaBatteryStatus")}]),angular.module("ngCordova.plugins.beacon",[]).factory("$cordovaBeacon",["$window","$rootScope","$timeout","$q",function(e,n,r,o){var t=null,i=null,a=null,c=null,u=null,s=null,l=null,f=null;return document.addEventListener("deviceready",function(){if(e.cordova&&e.cordova.plugins&&e.cordova.plugins.locationManager){var o=new e.cordova.plugins.locationManager.Delegate;o.didDetermineStateForRegion=function(e){r(function(){n.$broadcast("$cordovaBeacon:didDetermineStateForRegion",e)}),t&&t(e)},o.didStartMonitoringForRegion=function(e){r(function(){n.$broadcast("$cordovaBeacon:didStartMonitoringForRegion",e)}),i&&i(e)},o.didExitRegion=function(e){r(function(){n.$broadcast("$cordovaBeacon:didExitRegion",e)}),a&&a(e)},o.didEnterRegion=function(e){r(function(){n.$broadcast("$cordovaBeacon:didEnterRegion",e)}),c&&c(e)},o.didRangeBeaconsInRegion=function(e){r(function(){n.$broadcast("$cordovaBeacon:didRangeBeaconsInRegion",e)}),u&&u(e)},o.peripheralManagerDidStartAdvertising=function(e){r(function(){n.$broadcast("$cordovaBeacon:peripheralManagerDidStartAdvertising",e)}),s&&s(e)},o.peripheralManagerDidUpdateState=function(e){r(function(){n.$broadcast("$cordovaBeacon:peripheralManagerDidUpdateState",e)}),l&&l(e)},o.didChangeAuthorizationStatus=function(e){r(function(){n.$broadcast("$cordovaBeacon:didChangeAuthorizationStatus",e)}),f&&f(e)},e.cordova.plugins.locationManager.setDelegate(o)}},!1),{setCallbackDidDetermineStateForRegion:function(e){t=e},setCallbackDidStartMonitoringForRegion:function(e){i=e},setCallbackDidExitRegion:function(e){a=e},setCallbackDidEnterRegion:function(e){c=e},setCallbackDidRangeBeaconsInRegion:function(e){u=e},setCallbackPeripheralManagerDidStartAdvertising:function(e){s=e},setCallbackPeripheralManagerDidUpdateState:function(e){l=e},setCallbackDidChangeAuthorizationStatus:function(e){f=e},createBeaconRegion:function(n,r,o,t,i){return o=o||void 0,t=t||void 0,new e.cordova.plugins.locationManager.BeaconRegion(n,r,o,t,i)},isBluetoothEnabled:function(){return o.when(e.cordova.plugins.locationManager.isBluetoothEnabled())},enableBluetooth:function(){return o.when(e.cordova.plugins.locationManager.enableBluetooth())},disableBluetooth:function(){return o.when(e.cordova.plugins.locationManager.disableBluetooth())},startMonitoringForRegion:function(n){return o.when(e.cordova.plugins.locationManager.startMonitoringForRegion(n))},stopMonitoringForRegion:function(n){return o.when(e.cordova.plugins.locationManager.stopMonitoringForRegion(n))},requestStateForRegion:function(n){return o.when(e.cordova.plugins.locationManager.requestStateForRegion(n))},startRangingBeaconsInRegion:function(n){return o.when(e.cordova.plugins.locationManager.startRangingBeaconsInRegion(n))},stopRangingBeaconsInRegion:function(n){return o.when(e.cordova.plugins.locationManager.stopRangingBeaconsInRegion(n))},getAuthorizationStatus:function(){return o.when(e.cordova.plugins.locationManager.getAuthorizationStatus())},requestWhenInUseAuthorization:function(){return o.when(e.cordova.plugins.locationManager.requestWhenInUseAuthorization())},requestAlwaysAuthorization:function(){return o.when(e.cordova.plugins.locationManager.requestAlwaysAuthorization())},getMonitoredRegions:function(){return o.when(e.cordova.plugins.locationManager.getMonitoredRegions())},getRangedRegions:function(){return o.when(e.cordova.plugins.locationManager.getRangedRegions())},isRangingAvailable:function(){return o.when(e.cordova.plugins.locationManager.isRangingAvailable())},isMonitoringAvailableForClass:function(n){return o.when(e.cordova.plugins.locationManager.isMonitoringAvailableForClass(n))},startAdvertising:function(n,r){return o.when(e.cordova.plugins.locationManager.startAdvertising(n,r))},stopAdvertising:function(){return o.when(e.cordova.plugins.locationManager.stopAdvertising())},isAdvertisingAvailable:function(){return o.when(e.cordova.plugins.locationManager.isAdvertisingAvailable())},isAdvertising:function(){return o.when(e.cordova.plugins.locationManager.isAdvertising())},disableDebugLogs:function(){return o.when(e.cordova.plugins.locationManager.disableDebugLogs())},enableDebugNotifications:function(){return o.when(e.cordova.plugins.locationManager.enableDebugNotifications())},disableDebugNotifications:function(){return o.when(e.cordova.plugins.locationManager.disableDebugNotifications())},enableDebugLogs:function(){return o.when(e.cordova.plugins.locationManager.enableDebugLogs())},appendToDeviceLog:function(n){return o.when(e.cordova.plugins.locationManager.appendToDeviceLog(n))}}}]),angular.module("ngCordova.plugins.ble",[]).factory("$cordovaBLE",["$q","$timeout","$log",function(e,n,r){return{scan:function(r,o){var t=e.defer();return ble.startScan(r,function(e){t.notify(e)},function(e){t.reject(e)}),n(function(){ble.stopScan(function(){t.resolve()},function(e){t.reject(e)})},1e3*o),t.promise},startScan:function(e,n,r){return ble.startScan(e,n,r)},stopScan:function(){var n=e.defer();return ble.stopScan(function(){n.resolve()},function(e){n.reject(e)}),n.promise},connect:function(n){var r=e.defer();return ble.connect(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},disconnect:function(n){var r=e.defer();return ble.disconnect(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},read:function(n,r,o){var t=e.defer();return ble.read(n,r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},write:function(n,r,o,t){var i=e.defer();return ble.write(n,r,o,t,function(e){i.resolve(e)},function(e){i.reject(e)}),i.promise},writeWithoutResponse:function(n,r,o,t){var i=e.defer();return ble.writeWithoutResponse(n,r,o,t,function(e){i.resolve(e)},function(e){i.reject(e)}),i.promise},writeCommand:function(e,n,o,t){return r.warning("writeCommand is deprecated, use writeWithoutResponse"),this.writeWithoutResponse(e,n,o,t)},startNotification:function(e,n,r,o,t){return ble.startNotification(e,n,r,o,t)},stopNotification:function(n,r,o){var t=e.defer();return ble.stopNotification(n,r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},isConnected:function(n){var r=e.defer();return ble.isConnected(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},enable:function(){var n=e.defer();return ble.enable(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},isEnabled:function(){var n=e.defer();return ble.isEnabled(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise}}}]),angular.module("ngCordova.plugins.bluetoothSerial",[]).factory("$cordovaBluetoothSerial",["$q","$window",function(e,n){return{connect:function(r){var o=e.defer(),t=e.defer(),i=!1;return n.bluetoothSerial.connect(r,function(){i=!0,o.resolve(t)},function(e){i===!1&&t.reject(e),o.reject(e)}),o.promise},connectInsecure:function(r){var o=e.defer();return n.bluetoothSerial.connectInsecure(r,function(){o.resolve()},function(e){o.reject(e)}),o.promise},disconnect:function(){var r=e.defer();return n.bluetoothSerial.disconnect(function(){r.resolve()},function(e){r.reject(e)}),r.promise},list:function(){var r=e.defer();return n.bluetoothSerial.list(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},discoverUnpaired:function(){var r=e.defer();return n.bluetoothSerial.discoverUnpaired(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},setDeviceDiscoveredListener:function(){var r=e.defer();return n.bluetoothSerial.setDeviceDiscoveredListener(function(e){r.notify(e)}),r.promise},clearDeviceDiscoveredListener:function(){n.bluetoothSerial.clearDeviceDiscoveredListener()},showBluetoothSettings:function(){var r=e.defer();return n.bluetoothSerial.showBluetoothSettings(function(){r.resolve()},function(e){r.reject(e)}),r.promise},isEnabled:function(){var r=e.defer();return n.bluetoothSerial.isEnabled(function(){r.resolve()},function(){r.reject()}),r.promise},enable:function(){var r=e.defer();return n.bluetoothSerial.enable(function(){r.resolve()},function(){r.reject()}),r.promise},isConnected:function(){var r=e.defer();return n.bluetoothSerial.isConnected(function(){r.resolve()},function(){r.reject()}),r.promise},available:function(){var r=e.defer();return n.bluetoothSerial.available(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},read:function(){var r=e.defer();return n.bluetoothSerial.read(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},readUntil:function(r){var o=e.defer();return n.bluetoothSerial.readUntil(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},write:function(r){var o=e.defer();return n.bluetoothSerial.write(r,function(){o.resolve()},function(e){o.reject(e)}),o.promise},subscribe:function(r){var o=e.defer();return n.bluetoothSerial.subscribe(r,function(e){o.notify(e)},function(e){o.reject(e)}),o.promise},subscribeRawData:function(){var r=e.defer();return n.bluetoothSerial.subscribeRawData(function(e){r.notify(e)},function(e){r.reject(e)}),r.promise},unsubscribe:function(){var r=e.defer();return n.bluetoothSerial.unsubscribe(function(){r.resolve()},function(e){r.reject(e)}),r.promise},unsubscribeRawData:function(){var r=e.defer();return n.bluetoothSerial.unsubscribeRawData(function(){r.resolve()},function(e){r.reject(e)}),r.promise},clear:function(){var r=e.defer();return n.bluetoothSerial.clear(function(){r.resolve()},function(e){r.reject(e)}),r.promise},readRSSI:function(){var r=e.defer();return n.bluetoothSerial.readRSSI(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.brightness",[]).factory("$cordovaBrightness",["$q","$window",function(e,n){return{get:function(){var r=e.defer();return n.cordova?n.cordova.plugins.brightness.getBrightness(function(e){r.resolve(e)},function(e){r.reject(e)}):r.reject("Not supported without cordova.js"),r.promise},set:function(r){var o=e.defer();return n.cordova?n.cordova.plugins.brightness.setBrightness(r,function(e){o.resolve(e)},function(e){o.reject(e)}):o.reject("Not supported without cordova.js"),o.promise},setKeepScreenOn:function(r){var o=e.defer();return n.cordova?n.cordova.plugins.brightness.setKeepScreenOn(r,function(e){o.resolve(e)},function(e){o.reject(e)}):o.reject("Not supported without cordova.js"),o.promise}}}]),angular.module("ngCordova.plugins.calendar",[]).factory("$cordovaCalendar",["$q","$window",function(e,n){return{createCalendar:function(r){var o=e.defer(),t=n.plugins.calendar.getCreateCalendarOptions();return"string"==typeof r?t.calendarName=r:t=angular.extend(t,r),n.plugins.calendar.createCalendar(t,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},deleteCalendar:function(r){var o=e.defer();return n.plugins.calendar.deleteCalendar(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},createEvent:function(r){var o=e.defer(),t={title:null,location:null,notes:null,startDate:null,endDate:null};return t=angular.extend(t,r),n.plugins.calendar.createEvent(t.title,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},createEventWithOptions:function(r){var o=e.defer(),t=[],i=window.plugins.calendar.getCalendarOptions(),a={title:null,location:null,notes:null,startDate:null,endDate:null};t=Object.keys(a);for(var c in r)-1===t.indexOf(c)?i[c]=r[c]:a[c]=r[c];return n.plugins.calendar.createEventWithOptions(a.title,a.location,a.notes,new Date(a.startDate),new Date(a.endDate),i,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},createEventInteractively:function(r){var o=e.defer(),t={title:null,location:null,notes:null,startDate:null,endDate:null};return t=angular.extend(t,r),n.plugins.calendar.createEventInteractively(t.title,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},createEventInNamedCalendar:function(r){var o=e.defer(),t={title:null,location:null,notes:null,startDate:null,endDate:null,calendarName:null};return t=angular.extend(t,r),n.plugins.calendar.createEventInNamedCalendar(t.title,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),t.calendarName,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},findEvent:function(r){var o=e.defer(),t={title:null,location:null,notes:null,startDate:null,endDate:null};return t=angular.extend(t,r),n.plugins.calendar.findEvent(t.title,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},listEventsInRange:function(r,o){var t=e.defer();return n.plugins.calendar.listEventsInRange(r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},listCalendars:function(){var r=e.defer();return n.plugins.calendar.listCalendars(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},findAllEventsInNamedCalendar:function(r){var o=e.defer();return n.plugins.calendar.findAllEventsInNamedCalendar(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},modifyEvent:function(r){var o=e.defer(),t={title:null,location:null,notes:null,startDate:null,endDate:null,newTitle:null,newLocation:null,newNotes:null,newStartDate:null,newEndDate:null};return t=angular.extend(t,r),n.plugins.calendar.modifyEvent(t.title,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),t.newTitle,t.newLocation,t.newNotes,new Date(t.newStartDate),new Date(t.newEndDate),function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},deleteEvent:function(r){var o=e.defer(),t={newTitle:null,location:null,notes:null,startDate:null,endDate:null};return t=angular.extend(t,r),n.plugins.calendar.deleteEvent(t.newTitle,t.location,t.notes,new Date(t.startDate),new Date(t.endDate),function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}]),angular.module("ngCordova.plugins.camera",[]).factory("$cordovaCamera",["$q",function(e){return{getPicture:function(n){var r=e.defer();return navigator.camera?(navigator.camera.getPicture(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise):(r.resolve(null),r.promise)},cleanup:function(){var n=e.defer();return navigator.camera.cleanup(function(){n.resolve()},function(e){n.reject(e)}),n.promise}}}]),angular.module("ngCordova.plugins.capture",[]).factory("$cordovaCapture",["$q",function(e){return{captureAudio:function(n){var r=e.defer();return navigator.device.capture?(navigator.device.capture.captureAudio(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise):(r.resolve(null),r.promise)},captureImage:function(n){var r=e.defer();return navigator.device.capture?(navigator.device.capture.captureImage(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise):(r.resolve(null),r.promise)},captureVideo:function(n){var r=e.defer();return navigator.device.capture?(navigator.device.capture.captureVideo(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise):(r.resolve(null),r.promise)}}}]),angular.module("ngCordova.plugins.cardIO",[]).provider("$cordovaNgCardIO",[function(){var e=["card_type","redacted_card_number","card_number","expiry_month","expiry_year","short_expiry_year","cvv","zip"],n={expiry:!0,cvv:!0,zip:!1,suppressManual:!1,suppressConfirm:!1,hideLogo:!0};this.setCardIOResponseFields=function(n){n&&angular.isArray(n)&&(e=n)},this.setScanerConfig=function(e){e&&angular.isObject(e)&&(n.expiry=e.expiry||!0,n.cvv=e.cvv||!0,n.zip=e.zip||!1,n.suppressManual=e.suppressManual||!1,n.suppressConfirm=e.suppressConfirm||!1,n.hideLogo=e.hideLogo||!0)},this.$get=["$q",function(r){return{scanCard:function(){var o=r.defer();return CardIO.scan(n,function(n){if(null===n)o.reject(null);else{for(var r={},t=0,i=e.length;i>t;t++){var a=e[t];"short_expiry_year"===a?r[a]=String(n.expiry_year).substr(2,2)||"":r[a]=n[a]||""}o.resolve(r)}},function(){o.reject(null)}),o.promise}}}]}]),angular.module("ngCordova.plugins.clipboard",[]).factory("$cordovaClipboard",["$q","$window",function(e,n){return{copy:function(r){var o=e.defer();return n.cordova.plugins.clipboard.copy(r,function(){o.resolve()},function(){o.reject()}),o.promise},paste:function(){var r=e.defer();return n.cordova.plugins.clipboard.paste(function(e){r.resolve(e)},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.contacts",[]).factory("$cordovaContacts",["$q",function(e){return{save:function(n){var r=e.defer(),o=navigator.contacts.create(n);return o.save(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},remove:function(n){var r=e.defer(),o=navigator.contacts.create(n);return o.remove(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},clone:function(e){var n=navigator.contacts.create(e);return n.clone(e)},find:function(n){var r=e.defer(),o=n.fields||["id","displayName"];return delete n.fields,0===Object.keys(n).length?navigator.contacts.find(o,function(e){r.resolve(e)},function(e){r.reject(e)}):navigator.contacts.find(o,function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},pickContact:function(){var n=e.defer();return navigator.contacts.pickContact(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise}}}]),angular.module("ngCordova.plugins.datePicker",[]).factory("$cordovaDatePicker",["$window","$q",function(e,n){return{show:function(r){var o=n.defer();return r=r||{date:new Date,mode:"date"},e.datePicker.show(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}]),angular.module("ngCordova.plugins.device",[]).factory("$cordovaDevice",[function(){return{getDevice:function(){return device},getCordova:function(){return device.cordova},getModel:function(){return device.model},getName:function(){return device.name},getPlatform:function(){return device.platform},getUUID:function(){return device.uuid},getVersion:function(){return device.version},getManufacturer:function(){return device.manufacturer}}}]),angular.module("ngCordova.plugins.deviceMotion",[]).factory("$cordovaDeviceMotion",["$q",function(e){return{getCurrentAcceleration:function(){var n=e.defer();return angular.isUndefined(navigator.accelerometer)||!angular.isFunction(navigator.accelerometer.getCurrentAcceleration)?(n.reject("Device do not support watchAcceleration"),n.promise):(navigator.accelerometer.getCurrentAcceleration(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise)},watchAcceleration:function(n){var r=e.defer();if(angular.isUndefined(navigator.accelerometer)||!angular.isFunction(navigator.accelerometer.watchAcceleration))return r.reject("Device do not support watchAcceleration"),r.promise;var o=navigator.accelerometer.watchAcceleration(function(e){r.notify(e)},function(e){r.reject(e)},n);return r.promise.cancel=function(){navigator.accelerometer.clearWatch(o)},r.promise.clearWatch=function(e){navigator.accelerometer.clearWatch(e||o)},r.promise.watchID=o,r.promise},clearWatch:function(e){return navigator.accelerometer.clearWatch(e)}}}]),angular.module("ngCordova.plugins.deviceOrientation",[]).factory("$cordovaDeviceOrientation",["$q",function(e){var n={frequency:3e3};return{getCurrentHeading:function(){var n=e.defer();return navigator.compass?(navigator.compass.getCurrentHeading(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise):(n.reject("No compass on Device"),n.promise)},watchHeading:function(r){var o=e.defer();if(!navigator.compass)return o.reject("No compass on Device"),o.promise;var t=angular.extend(n,r),i=navigator.compass.watchHeading(function(e){o.notify(e)},function(e){o.reject(e)},t);return o.promise.cancel=function(){navigator.compass.clearWatch(i)},o.promise.clearWatch=function(e){navigator.compass.clearWatch(e||i)},o.promise.watchID=i,o.promise},clearWatch:function(e){return navigator.compass.clearWatch(e)}}}]),angular.module("ngCordova.plugins.dialogs",[]).factory("$cordovaDialogs",["$q","$window",function(e,n){return{alert:function(r,o,t){var i=e.defer();return n.navigator.notification?navigator.notification.alert(r,function(){i.resolve()},o,t):(n.alert(r),i.resolve()),i.promise},confirm:function(r,o,t){var i=e.defer();return n.navigator.notification?navigator.notification.confirm(r,function(e){i.resolve(e)},o,t):n.confirm(r)?i.resolve(1):i.resolve(2),i.promise},prompt:function(r,o,t,i){var a=e.defer();if(n.navigator.notification)navigator.notification.prompt(r,function(e){a.resolve(e)},o,t,i);else{var c=n.prompt(r,i);null!==c?a.resolve({input1:c,buttonIndex:1}):a.resolve({input1:c,buttonIndex:2})}return a.promise},beep:function(e){return navigator.notification.beep(e)},activityStart:function(n,r){var o=e.defer();return"android"===cordova.platformId?(navigator.notification.activityStart(r,n),o.resolve()):o.reject(n,r),o.promise},activityStop:function(){var n=e.defer();return"android"===cordova.platformId?(navigator.notification.activityStop(),n.resolve()):n.reject(),n.promise},progressStart:function(n,r){var o=e.defer();return"android"===cordova.platformId?(navigator.notification.progressStart(r,n),o.resolve()):o.reject(n,r),o.promise},progressStop:function(){var n=e.defer();return"android"===cordova.platformId?(navigator.notification.progressStop(),n.resolve()):n.reject(),n.promise},progressValue:function(n){var r=e.defer();return"android"===cordova.platformId?(navigator.notification.progressValue(n),r.resolve()):r.reject(n),r.promise}}}]),angular.module("ngCordova.plugins.emailComposer",[]).factory("$cordovaEmailComposer",["$q",function(e){return{isAvailable:function(){var n=e.defer();return cordova.plugins.email.isAvailable(function(e){e?n.resolve():n.reject()}),n.promise},open:function(n){var r=e.defer();return cordova.plugins.email.open(n,function(){r.reject()}),r.promise},addAlias:function(e,n){cordova.plugins.email.addAlias(e,n)}}}]),angular.module("ngCordova.plugins.facebook",[]).provider("$cordovaFacebook",[function(){this.browserInit=function(e,n){this.appID=e,this.appVersion=n||"v2.0",facebookConnectPlugin.browserInit(this.appID,this.appVersion)},this.$get=["$q",function(e){return{login:function(n){var r=e.defer();return facebookConnectPlugin.login(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},showDialog:function(n){var r=e.defer();return facebookConnectPlugin.showDialog(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},api:function(n,r){var o=e.defer();return facebookConnectPlugin.api(n,r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},getAccessToken:function(){var n=e.defer();return facebookConnectPlugin.getAccessToken(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},getLoginStatus:function(){var n=e.defer();return facebookConnectPlugin.getLoginStatus(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},logout:function(){var n=e.defer();return facebookConnectPlugin.logout(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise}}}]}]),angular.module("ngCordova.plugins.facebookAds",[]).factory("$cordovaFacebookAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.FacebookAds.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.FacebookAds.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.FacebookAds.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.FacebookAds.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.FacebookAds.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.FacebookAds.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.FacebookAds.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.FacebookAds.showInterstitial(function(){r.resolve()},function(){
+r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.file",[]).constant("$cordovaFileError",{1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR"}).provider("$cordovaFile",[function(){this.$get=["$q","$window","$cordovaFileError",function(e,n,r){return{getFreeDiskSpace:function(){var n=e.defer();return cordova.exec(function(e){n.resolve(e)},function(e){n.reject(e)},"File","getFreeDiskSpace",[]),n.promise},checkDir:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("directory cannot start with /");try{var a=o+t;n.resolveLocalFileSystemURL(a,function(e){e.isDirectory===!0?i.resolve(e):i.reject({code:13,message:"input is not a directory"})},function(e){e.message=r[e.code],i.reject(e)})}catch(c){c.message=r[c.code],i.reject(c)}return i.promise},checkFile:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("directory cannot start with /");try{var a=o+t;n.resolveLocalFileSystemURL(a,function(e){e.isFile===!0?i.resolve(e):i.reject({code:13,message:"input is not a file"})},function(e){e.message=r[e.code],i.reject(e)})}catch(c){c.message=r[c.code],i.reject(c)}return i.promise},createDir:function(o,t,i){var a=e.defer();/^\//.test(t)&&a.reject("directory cannot start with /"),i=i?!1:!0;var c={create:!0,exclusive:i};try{n.resolveLocalFileSystemURL(o,function(e){e.getDirectory(t,c,function(e){a.resolve(e)},function(e){e.message=r[e.code],a.reject(e)})},function(e){e.message=r[e.code],a.reject(e)})}catch(u){u.message=r[u.code],a.reject(u)}return a.promise},createFile:function(o,t,i){var a=e.defer();/^\//.test(t)&&a.reject("file-name cannot start with /"),i=i?!1:!0;var c={create:!0,exclusive:i};try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,c,function(e){a.resolve(e)},function(e){e.message=r[e.code],a.reject(e)})},function(e){e.message=r[e.code],a.reject(e)})}catch(u){u.message=r[u.code],a.reject(u)}return a.promise},removeDir:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getDirectory(t,{create:!1},function(e){e.remove(function(){i.resolve({success:!0,fileRemoved:e})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},removeFile:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.remove(function(){i.resolve({success:!0,fileRemoved:e})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},removeRecursively:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getDirectory(t,{create:!1},function(e){e.removeRecursively(function(){i.resolve({success:!0,fileRemoved:e})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},writeFile:function(o,t,i,a){var c=e.defer();/^\//.test(t)&&c.reject("file-name cannot start with /"),a=a?!1:!0;var u={create:!0,exclusive:a};try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,u,function(e){e.createWriter(function(e){u.append===!0&&e.seek(e.length),u.truncate&&e.truncate(u.truncate),e.onwriteend=function(e){this.error?c.reject(this.error):c.resolve(e)},e.write(i),c.promise.abort=function(){e.abort()}})},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})}catch(s){s.message=r[s.code],c.reject(s)}return c.promise},writeExistingFile:function(o,t,i){var a=e.defer();/^\//.test(t)&&a.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.createWriter(function(e){e.seek(e.length),e.onwriteend=function(e){this.error?a.reject(this.error):a.resolve(e)},e.write(i),a.promise.abort=function(){e.abort()}})},function(e){e.message=r[e.code],a.reject(e)})},function(e){e.message=r[e.code],a.reject(e)})}catch(c){c.message=r[c.code],a.reject(c)}return a.promise},readAsText:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.file(function(e){var n=new FileReader;n.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?i.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?i.reject(e.target.error):i.reject({code:null,message:"READER_ONLOADEND_ERR"})},n.readAsText(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},readAsDataURL:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.file(function(e){var n=new FileReader;n.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?i.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?i.reject(e.target.error):i.reject({code:null,message:"READER_ONLOADEND_ERR"})},n.readAsDataURL(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},readAsBinaryString:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.file(function(e){var n=new FileReader;n.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?i.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?i.reject(e.target.error):i.reject({code:null,message:"READER_ONLOADEND_ERR"})},n.readAsBinaryString(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},readAsArrayBuffer:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1},function(e){e.file(function(e){var n=new FileReader;n.onloadend=function(e){void 0!==e.target.result||null!==e.target.result?i.resolve(e.target.result):void 0!==e.target.error||null!==e.target.error?i.reject(e.target.error):i.reject({code:null,message:"READER_ONLOADEND_ERR"})},n.readAsArrayBuffer(e)})},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(a){a.message=r[a.code],i.reject(a)}return i.promise},moveFile:function(r,o,t,i){var a=e.defer();i=i||o,(/^\//.test(o)||/^\//.test(i))&&a.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(r,function(e){e.getFile(o,{create:!1},function(e){n.resolveLocalFileSystemURL(t,function(n){e.moveTo(n,i,function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})},function(e){a.reject(e)})},function(e){a.reject(e)})}catch(c){a.reject(c)}return a.promise},moveDir:function(r,o,t,i){var a=e.defer();i=i||o,(/^\//.test(o)||/^\//.test(i))&&a.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(r,function(e){e.getDirectory(o,{create:!1},function(e){n.resolveLocalFileSystemURL(t,function(n){e.moveTo(n,i,function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})},function(e){a.reject(e)})},function(e){a.reject(e)})}catch(c){a.reject(c)}return a.promise},copyDir:function(o,t,i,a){var c=e.defer();a=a||t,(/^\//.test(t)||/^\//.test(a))&&c.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getDirectory(t,{create:!1,exclusive:!1},function(e){n.resolveLocalFileSystemURL(i,function(n){e.copyTo(n,a,function(e){c.resolve(e)},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})}catch(u){u.message=r[u.code],c.reject(u)}return c.promise},copyFile:function(o,t,i,a){var c=e.defer();a=a||t,/^\//.test(t)&&c.reject("file-name cannot start with /");try{n.resolveLocalFileSystemURL(o,function(e){e.getFile(t,{create:!1,exclusive:!1},function(e){n.resolveLocalFileSystemURL(i,function(n){e.copyTo(n,a,function(e){c.resolve(e)},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})},function(e){e.message=r[e.code],c.reject(e)})}catch(u){u.message=r[u.code],c.reject(u)}return c.promise},readFileMetadata:function(o,t){var i=e.defer();/^\//.test(t)&&i.reject("directory cannot start with /");try{var a=o+t;n.resolveLocalFileSystemURL(a,function(e){e.file(function(e){i.resolve(e)},function(e){e.message=r[e.code],i.reject(e)})},function(e){e.message=r[e.code],i.reject(e)})}catch(c){c.message=r[c.code],i.reject(c)}return i.promise}}}]}]),angular.module("ngCordova.plugins.fileOpener2",[]).factory("$cordovaFileOpener2",["$q",function(e){return{open:function(n,r){var o=e.defer();return cordova.plugins.fileOpener2.open(n,r,{error:function(e){o.reject(e)},success:function(){o.resolve()}}),o.promise},uninstall:function(n){var r=e.defer();return cordova.plugins.fileOpener2.uninstall(n,{error:function(e){r.reject(e)},success:function(){r.resolve()}}),r.promise},appIsInstalled:function(n){var r=e.defer();return cordova.plugins.fileOpener2.appIsInstalled(n,{success:function(e){r.resolve(e)}}),r.promise}}}]),angular.module("ngCordova.plugins.fileTransfer",[]).factory("$cordovaFileTransfer",["$q","$timeout",function(e,n){return{download:function(r,o,t,i){var a=e.defer(),c=new FileTransfer,u=t&&t.encodeURI===!1?r:encodeURI(r);return t&&void 0!==t.timeout&&null!==t.timeout&&(n(function(){c.abort()},t.timeout),t.timeout=null),c.onprogress=function(e){a.notify(e)},a.promise.abort=function(){c.abort()},c.download(u,o,a.resolve,a.reject,i,t),a.promise},upload:function(r,o,t,i){var a=e.defer(),c=new FileTransfer,u=t&&t.encodeURI===!1?r:encodeURI(r);return t&&void 0!==t.timeout&&null!==t.timeout&&(n(function(){c.abort()},t.timeout),t.timeout=null),c.onprogress=function(e){a.notify(e)},a.promise.abort=function(){c.abort()},c.upload(o,u,a.resolve,a.reject,t,i),a.promise}}}]),angular.module("ngCordova.plugins.flashlight",[]).factory("$cordovaFlashlight",["$q","$window",function(e,n){return{available:function(){var r=e.defer();return n.plugins.flashlight.available(function(e){r.resolve(e)}),r.promise},switchOn:function(){var r=e.defer();return n.plugins.flashlight.switchOn(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},switchOff:function(){var r=e.defer();return n.plugins.flashlight.switchOff(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},toggle:function(){var r=e.defer();return n.plugins.flashlight.toggle(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.flurryAds",[]).factory("$cordovaFlurryAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.FlurryAds.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.FlurryAds.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.FlurryAds.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.FlurryAds.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.FlurryAds.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.FlurryAds.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.FlurryAds.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.FlurryAds.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.ga",[]).factory("$cordovaGA",["$q","$window",function(e,n){return{init:function(r,o){var t=e.defer();return o=o>=0?o:10,n.plugins.gaPlugin.init(function(e){t.resolve(e)},function(e){t.reject(e)},r,o),t.promise},trackEvent:function(r,o,t,i,a,c){var u=e.defer();return n.plugins.gaPlugin.trackEvent(function(e){u.resolve(e)},function(e){u.reject(e)},t,i,a,c),u.promise},trackPage:function(r,o,t){var i=e.defer();return n.plugins.gaPlugin.trackPage(function(e){i.resolve(e)},function(e){i.reject(e)},t),i.promise},setVariable:function(r,o,t,i){var a=e.defer();return n.plugins.gaPlugin.setVariable(function(e){a.resolve(e)},function(e){a.reject(e)},t,i),a.promise},exit:function(){var r=e.defer();return n.plugins.gaPlugin.exit(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.geolocation",[]).factory("$cordovaGeolocation",["$q",function(e){return{getCurrentPosition:function(n){var r=e.defer();return navigator.geolocation.getCurrentPosition(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},watchPosition:function(n){var r=e.defer(),o=navigator.geolocation.watchPosition(function(e){r.notify(e)},function(e){r.reject(e)},n);return r.promise.cancel=function(){navigator.geolocation.clearWatch(o)},r.promise.clearWatch=function(e){navigator.geolocation.clearWatch(e||o)},r.promise.watchID=o,r.promise},clearWatch:function(e){return navigator.geolocation.clearWatch(e)}}}]),angular.module("ngCordova.plugins.globalization",[]).factory("$cordovaGlobalization",["$q",function(e){return{getPreferredLanguage:function(){var n=e.defer();return navigator.globalization.getPreferredLanguage(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},getLocaleName:function(){var n=e.defer();return navigator.globalization.getLocaleName(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},getFirstDayOfWeek:function(){var n=e.defer();return navigator.globalization.getFirstDayOfWeek(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},dateToString:function(n,r){var o=e.defer();return navigator.globalization.dateToString(n,function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise},stringToDate:function(n,r){var o=e.defer();return navigator.globalization.stringToDate(n,function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise},getDatePattern:function(n){var r=e.defer();return navigator.globalization.getDatePattern(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},getDateNames:function(n){var r=e.defer();return navigator.globalization.getDateNames(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},isDayLightSavingsTime:function(n){var r=e.defer();return navigator.globalization.isDayLightSavingsTime(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},numberToString:function(n,r){var o=e.defer();return navigator.globalization.numberToString(n,function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise},stringToNumber:function(n,r){var o=e.defer();return navigator.globalization.stringToNumber(n,function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise},getNumberPattern:function(n){var r=e.defer();return navigator.globalization.getNumberPattern(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},getCurrencyPattern:function(n){var r=e.defer();return navigator.globalization.getCurrencyPattern(n,function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.googleAds",[]).factory("$cordovaGoogleAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.AdMob.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.AdMob.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.AdMob.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.AdMob.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.AdMob.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.AdMob.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.AdMob.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.AdMob.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.googleAnalytics",[]).factory("$cordovaGoogleAnalytics",["$q","$window",function(e,n){return{startTrackerWithId:function(r){var o=e.defer();return n.analytics.startTrackerWithId(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},setUserId:function(r){var o=e.defer();return n.analytics.setUserId(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},debugMode:function(){var r=e.defer();return n.analytics.debugMode(function(e){r.resolve(e)},function(){r.reject()}),r.promise},trackView:function(r){var o=e.defer();return n.analytics.trackView(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},addCustomDimension:function(r,o){var t=e.defer(),i=parseInt(r,10);return isNaN(i)&&t.reject('Parameter "key" must be an integer.'),n.analytics.addCustomDimension(i,o,function(){t.resolve()},function(e){t.reject(e)}),t.promise},trackEvent:function(r,o,t,i){var a=e.defer();return n.analytics.trackEvent(r,o,t,i,function(e){a.resolve(e)},function(e){a.reject(e)}),a.promise},trackException:function(r,o){var t=e.defer();return n.analytics.trackException(r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},trackTiming:function(r,o,t,i){var a=e.defer();return n.analytics.trackTiming(r,o,t,i,function(e){a.resolve(e)},function(e){a.reject(e)}),a.promise},addTransaction:function(r,o,t,i,a,c){var u=e.defer();return n.analytics.addTransaction(r,o,t,i,a,c,function(e){u.resolve(e)},function(e){u.reject(e)}),u.promise},addTransactionItem:function(r,o,t,i,a,c,u){var s=e.defer();return n.analytics.addTransactionItem(r,o,t,i,a,c,u,function(e){s.resolve(e)},function(e){s.reject(e)}),s.promise}}}]),angular.module("ngCordova.plugins.googleMap",[]).factory("$cordovaGoogleMap",["$q","$window",function(e,n){var r=null;return{getMap:function(o){var t=e.defer();if(n.plugin.google.maps){var i=document.getElementById("map_canvas");r=n.plugin.google.maps.Map.getMap(o),r.setDiv(i),t.resolve(r)}else t.reject(null);return t.promise},isMapLoaded:function(){return!!r},addMarker:function(n){var o=e.defer();return r.addMarker(n,function(e){o.resolve(e)}),o.promise},getMapTypeIds:function(){return n.plugin.google.maps.mapTypeId},setVisible:function(n){var o=e.defer();return r.setVisible(n),o.promise},cleanup:function(){r=null}}}]),angular.module("ngCordova.plugins.googlePlayGame",[]).factory("$cordovaGooglePlayGame",["$q",function(e){return{auth:function(){var n=e.defer();return googleplaygame.auth(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise},signout:function(){var n=e.defer();return googleplaygame.signout(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise},isSignedIn:function(){var n=e.defer();return googleplaygame.isSignedIn(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise},showPlayer:function(){var n=e.defer();return googleplaygame.showPlayer(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise},submitScore:function(n){var r=e.defer();return googleplaygame.submitScore(n,function(e){return r.resolve(e)},function(e){return r.reject(e)}),r.promise},showAllLeaderboards:function(){var n=e.defer();return googleplaygame.showAllLeaderboards(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise},showLeaderboard:function(n){var r=e.defer();return googleplaygame.showLeaderboard(n,function(e){return r.resolve(e)},function(e){return r.reject(e)}),r.promise},unlockAchievement:function(n){var r=e.defer();return googleplaygame.unlockAchievement(n,function(e){return r.resolve(e)},function(e){return r.reject(e)}),r.promise},incrementAchievement:function(n){var r=e.defer();return googleplaygame.incrementAchievement(n,function(e){return r.resolve(e)},function(e){return r.reject(e)}),r.promise},showAchievements:function(){var n=e.defer();return googleplaygame.showAchievements(function(e){return n.resolve(e)},function(e){return n.reject(e)}),n.promise}}}]),angular.module("ngCordova.plugins.googlePlus",[]).factory("$cordovaGooglePlus",["$q","$window",function(e,n){return{login:function(r){var o=e.defer();return void 0===r&&(r={}),n.plugins.googleplus.login({iOSApiKey:r},function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},silentLogin:function(r){var o=e.defer();return void 0===r&&(r={}),n.plugins.googleplus.trySilentLogin({iOSApiKey:r},function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},logout:function(){var r=e.defer();n.plugins.googleplus.logout(function(e){r.resolve(e)})},disconnect:function(){var r=e.defer();n.plugins.googleplus.disconnect(function(e){r.resolve(e)})},isAvailable:function(){var r=e.defer();return n.plugins.googleplus.isAvailable(function(e){e?r.resolve(e):r.reject(e)}),r.promise}}}]),angular.module("ngCordova.plugins.healthKit",[]).factory("$cordovaHealthKit",["$q","$window",function(e,n){return{isAvailable:function(){var r=e.defer();return n.plugins.healthkit.available(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},checkAuthStatus:function(r){var o=e.defer();return r=r||"HKQuantityTypeIdentifierHeight",n.plugins.healthkit.checkAuthStatus({type:r},function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},requestAuthorization:function(r,o){var t=e.defer();return r=r||["HKCharacteristicTypeIdentifierDateOfBirth","HKQuantityTypeIdentifierActiveEnergyBurned","HKQuantityTypeIdentifierHeight"],o=o||["HKQuantityTypeIdentifierActiveEnergyBurned","HKQuantityTypeIdentifierHeight","HKQuantityTypeIdentifierDistanceCycling"],n.plugins.healthkit.requestAuthorization({readTypes:r,writeTypes:o},function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},readDateOfBirth:function(){var r=e.defer();return n.plugins.healthkit.readDateOfBirth(function(e){r.resolve(e)},function(e){r.resolve(e)}),r.promise},readGender:function(){var r=e.defer();return n.plugins.healthkit.readGender(function(e){r.resolve(e)},function(e){r.resolve(e)}),r.promise},saveWeight:function(r,o,t){var i=e.defer();return n.plugins.healthkit.saveWeight({unit:o||"lb",amount:r,date:t||new Date},function(e){i.resolve(e)},function(e){i.resolve(e)}),i.promise},readWeight:function(r){var o=e.defer();return n.plugins.healthkit.readWeight({unit:r||"lb"},function(e){o.resolve(e)},function(e){o.resolve(e)}),o.promise},saveHeight:function(r,o,t){var i=e.defer();return n.plugins.healthkit.saveHeight({unit:o||"in",amount:r,date:t||new Date},function(e){i.resolve(e)},function(e){i.resolve(e)}),i.promise},readHeight:function(r){var o=e.defer();return n.plugins.healthkit.readHeight({unit:r||"in"},function(e){o.resolve(e)},function(e){o.resolve(e)}),o.promise},findWorkouts:function(){var r=e.defer();return n.plugins.healthkit.findWorkouts({},function(e){r.resolve(e)},function(e){r.resolve(e)}),r.promise},saveWorkout:function(r){var o=e.defer();return n.plugins.healthkit.saveWorkout(r,function(e){o.resolve(e)},function(e){o.resolve(e)}),o.promise},querySampleType:function(r){var o=e.defer();return n.plugins.healthkit.querySampleType(r,function(e){o.resolve(e)},function(e){o.resolve(e)}),o.promise}}}]),angular.module("ngCordova.plugins.httpd",[]).factory("$cordovaHttpd",["$q",function(e){return{startServer:function(n){var r=e.defer();return cordova.plugins.CorHttpd.startServer(n,function(){r.resolve()},function(){r.reject()}),r.promise},stopServer:function(){var n=e.defer();return cordova.plugins.CorHttpd.stopServer(function(){n.resolve()},function(){n.reject()}),n.promise},getURL:function(){var n=e.defer();return cordova.plugins.CorHttpd.getURL(function(e){n.resolve(e)},function(){n.reject()}),n.promise},getLocalPath:function(){var n=e.defer();return cordova.plugins.CorHttpd.getLocalPath(function(e){n.resolve(e)},function(){n.reject()}),n.promise}}}]),angular.module("ngCordova.plugins.iAd",[]).factory("$cordovaiAd",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.iAd.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.iAd.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.iAd.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.iAd.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.iAd.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.iAd.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.iAd.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.iAd.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.imagePicker",[]).factory("$cordovaImagePicker",["$q","$window",function(e,n){return{getPictures:function(r){var o=e.defer();return n.imagePicker.getPictures(function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise}}}]),angular.module("ngCordova.plugins.inAppBrowser",[]).provider("$cordovaInAppBrowser",[function(){var e,n=this.defaultOptions={};this.setDefaultOptions=function(e){n=angular.extend(n,e)},this.$get=["$rootScope","$q","$window","$timeout",function(r,o,t,i){return{open:function(a,c,u){var s=o.defer();if(u&&!angular.isObject(u))return s.reject("options must be an object"),s.promise;var l=angular.extend({},n,u),f=[];angular.forEach(l,function(e,n){f.push(n+"="+e)});var d=f.join();return e=t.open(a,c,d),e.addEventListener("loadstart",function(e){i(function(){r.$broadcast("$cordovaInAppBrowser:loadstart",e)})},!1),e.addEventListener("loadstop",function(e){s.resolve(e),i(function(){r.$broadcast("$cordovaInAppBrowser:loadstop",e)})},!1),e.addEventListener("loaderror",function(e){s.reject(e),i(function(){r.$broadcast("$cordovaInAppBrowser:loaderror",e)})},!1),e.addEventListener("exit",function(e){i(function(){r.$broadcast("$cordovaInAppBrowser:exit",e)})},!1),s.promise},close:function(){e.close(),e=null},show:function(){e.show()},executeScript:function(n){var r=o.defer();return e.executeScript(n,function(e){r.resolve(e)}),r.promise},insertCSS:function(n){var r=o.defer();return e.insertCSS(n,function(e){r.resolve(e)}),r.promise}}}]}]),angular.module("ngCordova.plugins.insomnia",[]).factory("$cordovaInsomnia",["$window",function(e){return{keepAwake:function(){return e.plugins.insomnia.keepAwake()},allowSleepAgain:function(){return e.plugins.insomnia.allowSleepAgain()}}}]),angular.module("ngCordova.plugins.instagram",[]).factory("$cordovaInstagram",["$q",function(e){return{share:function(n){var r=e.defer();return window.Instagram?(Instagram.share(n.image,n.caption,function(e){e?r.reject(e):r.resolve(!0)}),r.promise):(console.error("Tried to call Instagram.share but the Instagram plugin isn't installed!"),r.resolve(null),r.promise)},isInstalled:function(){var n=e.defer();return window.Instagram?(Instagram.isInstalled(function(e,r){e?n.reject(e):n.resolve(r)}),n.promise):(console.error("Tried to call Instagram.isInstalled but the Instagram plugin isn't installed!"),n.resolve(null),n.promise)}}}]),angular.module("ngCordova.plugins.keyboard",[]).factory("$cordovaKeyboard",["$rootScope",function(e){var n=function(){e.$evalAsync(function(){e.$broadcast("$cordovaKeyboard:show")})},r=function(){e.$evalAsync(function(){e.$broadcast("$cordovaKeyboard:hide")})};return document.addEventListener("deviceready",function(){cordova.plugins.Keyboard&&(window.addEventListener("native.keyboardshow",n,!1),window.addEventListener("native.keyboardhide",r,!1))}),{hideAccessoryBar:function(e){return cordova.plugins.Keyboard.hideKeyboardAccessoryBar(e)},close:function(){return cordova.plugins.Keyboard.close()},show:function(){return cordova.plugins.Keyboard.show()},disableScroll:function(e){return cordova.plugins.Keyboard.disableScroll(e)},isVisible:function(){return cordova.plugins.Keyboard.isVisible},clearShowWatch:function(){document.removeEventListener("native.keyboardshow",n),e.$$listeners["$cordovaKeyboard:show"]=[]},clearHideWatch:function(){document.removeEventListener("native.keyboardhide",r),e.$$listeners["$cordovaKeyboard:hide"]=[]}}}]),angular.module("ngCordova.plugins.keychain",[]).factory("$cordovaKeychain",["$q",function(e){return{getForKey:function(n,r){var o=e.defer(),t=new Keychain;return t.getForKey(o.resolve,o.reject,n,r),o.promise},setForKey:function(n,r,o){var t=e.defer(),i=new Keychain;return i.setForKey(t.resolve,t.reject,n,r,o),t.promise},removeForKey:function(n,r){var o=e.defer(),t=new Keychain;return t.removeForKey(o.resolve,o.reject,n,r),o.promise}}}]),angular.module("ngCordova.plugins.launchNavigator",[]).factory("$cordovaLaunchNavigator",["$q",function(e){return{navigate:function(n,r,o){var t=e.defer();return launchnavigator.navigate(n,r,function(){t.resolve()},function(e){t.reject(e)},o),t.promise}}}]),angular.module("ngCordova.plugins.localNotification",[]).factory("$cordovaLocalNotification",["$q","$window","$rootScope","$timeout",function(e,n,r,o){return document.addEventListener("deviceready",function(){n.cordova&&n.cordova.plugins&&n.cordova.plugins.notification&&n.cordova.plugins.notification.local&&(n.cordova.plugins.notification.local.on("schedule",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:schedule",e,n)})}),n.cordova.plugins.notification.local.on("trigger",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:trigger",e,n)})}),n.cordova.plugins.notification.local.on("update",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:update",e,n)})}),n.cordova.plugins.notification.local.on("clear",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:clear",e,n)})}),n.cordova.plugins.notification.local.on("clearall",function(e){o(function(){r.$broadcast("$cordovaLocalNotification:clearall",e)})}),n.cordova.plugins.notification.local.on("cancel",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:cancel",e,n)})}),n.cordova.plugins.notification.local.on("cancelall",function(e){o(function(){r.$broadcast("$cordovaLocalNotification:cancelall",e)})}),n.cordova.plugins.notification.local.on("click",function(e,n){o(function(){r.$broadcast("$cordovaLocalNotification:click",e,n)})}))},!1),{schedule:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.schedule(r,function(e){t.resolve(e)},o),t.promise},add:function(r,o){console.warn('Deprecated: use "schedule" instead.');var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.schedule(r,function(e){t.resolve(e)},o),t.promise},update:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.update(r,function(e){t.resolve(e)},o),t.promise},clear:function(r,o){var t=e.defer();
+return o=o||null,n.cordova.plugins.notification.local.clear(r,function(e){t.resolve(e)},o),t.promise},clearAll:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.clearAll(function(e){o.resolve(e)},r),o.promise},cancel:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.cancel(r,function(e){t.resolve(e)},o),t.promise},cancelAll:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.cancelAll(function(e){o.resolve(e)},r),o.promise},isPresent:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.isPresent(r,function(e){t.resolve(e)},o),t.promise},isScheduled:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.isScheduled(r,function(e){t.resolve(e)},o),t.promise},isTriggered:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.isTriggered(r,function(e){t.resolve(e)},o),t.promise},hasPermission:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.hasPermission(function(e){e?o.resolve(e):o.reject(e)},r),o.promise},registerPermission:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.registerPermission(function(e){e?o.resolve(e):o.reject(e)},r),o.promise},promptForPermission:function(r){console.warn('Deprecated: use "registerPermission" instead.');var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.registerPermission(function(e){e?o.resolve(e):o.reject(e)},r),o.promise},getAllIds:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getAllIds(function(e){o.resolve(e)},r),o.promise},getIds:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getIds(function(e){o.resolve(e)},r),o.promise},getScheduledIds:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getScheduledIds(function(e){o.resolve(e)},r),o.promise},getTriggeredIds:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getTriggeredIds(function(e){o.resolve(e)},r),o.promise},get:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.get(r,function(e){t.resolve(e)},o),t.promise},getAll:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getAll(function(e){o.resolve(e)},r),o.promise},getScheduled:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.getScheduled(r,function(e){t.resolve(e)},o),t.promise},getAllScheduled:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getAllScheduled(function(e){o.resolve(e)},r),o.promise},getTriggered:function(r,o){var t=e.defer();return o=o||null,n.cordova.plugins.notification.local.getTriggered(r,function(e){t.resolve(e)},o),t.promise},getAllTriggered:function(r){var o=e.defer();return r=r||null,n.cordova.plugins.notification.local.getAllTriggered(function(e){o.resolve(e)},r),o.promise},getDefaults:function(){return n.cordova.plugins.notification.local.getDefaults()},setDefaults:function(e){n.cordova.plugins.notification.local.setDefaults(e)}}}]),angular.module("ngCordova.plugins.mMediaAds",[]).factory("$cordovaMMediaAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.mMedia.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.mMedia.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.mMedia.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.mMedia.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.mMedia.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.mMedia.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.mMedia.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.mMedia.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.media",[]).service("NewMedia",["$q","$interval",function(e,n){function r(e){angular.isDefined(s)||(s=n(function(){0>d&&(d=e.getDuration(),a&&d>0&&a.notify({duration:d})),e.getCurrentPosition(function(e){e>-1&&(f=e)},function(e){console.log("Error getting pos="+e)}),a&&a.notify({position:f})},1e3))}function o(){angular.isDefined(s)&&(n.cancel(s),s=void 0)}function t(){f=-1,d=-1}function i(e){this.media=new Media(e,function(e){o(),t(),a.resolve(e)},function(e){o(),t(),a.reject(e)},function(e){l=e,a.notify({status:l})})}var a,c,u,s,l=null,f=-1,d=-1;return i.prototype.play=function(n){return a=e.defer(),"object"!=typeof n&&(n={}),this.media.play(n),r(this.media),a.promise},i.prototype.pause=function(){o(),this.media.pause()},i.prototype.stop=function(){this.media.stop()},i.prototype.release=function(){this.media.release(),this.media=void 0},i.prototype.seekTo=function(e){this.media.seekTo(e)},i.prototype.setVolume=function(e){this.media.setVolume(e)},i.prototype.startRecord=function(){this.media.startRecord()},i.prototype.stopRecord=function(){this.media.stopRecord()},i.prototype.currentTime=function(){return c=e.defer(),this.media.getCurrentPosition(function(e){c.resolve(e)}),c.promise},i.prototype.getDuration=function(){return u=e.defer(),this.media.getDuration(function(e){u.resolve(e)}),u.promise},i}]).factory("$cordovaMedia",["NewMedia",function(e){return{newMedia:function(n){return new e(n)}}}]),angular.module("ngCordova.plugins.mobfoxAds",[]).factory("$cordovaMobFoxAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.MobFox.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.MobFox.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.MobFox.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.MobFox.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.MobFox.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.MobFox.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.MobFox.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.MobFox.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins",["ngCordova.plugins.3dtouch","ngCordova.plugins.actionSheet","ngCordova.plugins.adMob","ngCordova.plugins.appAvailability","ngCordova.plugins.appRate","ngCordova.plugins.appVersion","ngCordova.plugins.backgroundGeolocation","ngCordova.plugins.badge","ngCordova.plugins.barcodeScanner","ngCordova.plugins.batteryStatus","ngCordova.plugins.beacon","ngCordova.plugins.ble","ngCordova.plugins.bluetoothSerial","ngCordova.plugins.brightness","ngCordova.plugins.calendar","ngCordova.plugins.camera","ngCordova.plugins.capture","ngCordova.plugins.clipboard","ngCordova.plugins.contacts","ngCordova.plugins.datePicker","ngCordova.plugins.device","ngCordova.plugins.deviceMotion","ngCordova.plugins.deviceOrientation","ngCordova.plugins.dialogs","ngCordova.plugins.emailComposer","ngCordova.plugins.facebook","ngCordova.plugins.facebookAds","ngCordova.plugins.file","ngCordova.plugins.fileTransfer","ngCordova.plugins.fileOpener2","ngCordova.plugins.flashlight","ngCordova.plugins.flurryAds","ngCordova.plugins.ga","ngCordova.plugins.geolocation","ngCordova.plugins.globalization","ngCordova.plugins.googleAds","ngCordova.plugins.googleAnalytics","ngCordova.plugins.googleMap","ngCordova.plugins.googlePlayGame","ngCordova.plugins.googlePlus","ngCordova.plugins.healthKit","ngCordova.plugins.httpd","ngCordova.plugins.iAd","ngCordova.plugins.imagePicker","ngCordova.plugins.inAppBrowser","ngCordova.plugins.instagram","ngCordova.plugins.keyboard","ngCordova.plugins.keychain","ngCordova.plugins.launchNavigator","ngCordova.plugins.localNotification","ngCordova.plugins.media","ngCordova.plugins.mMediaAds","ngCordova.plugins.mobfoxAds","ngCordova.plugins.mopubAds","ngCordova.plugins.nativeAudio","ngCordova.plugins.network","ngCordova.plugins.pinDialog","ngCordova.plugins.preferences","ngCordova.plugins.printer","ngCordova.plugins.progressIndicator","ngCordova.plugins.push","ngCordova.plugins.push_v5","ngCordova.plugins.sms","ngCordova.plugins.socialSharing","ngCordova.plugins.spinnerDialog","ngCordova.plugins.splashscreen","ngCordova.plugins.sqlite","ngCordova.plugins.statusbar","ngCordova.plugins.toast","ngCordova.plugins.touchid","ngCordova.plugins.vibration","ngCordova.plugins.videoCapturePlus","ngCordova.plugins.zip","ngCordova.plugins.insomnia"]),angular.module("ngCordova.plugins.mopubAds",[]).factory("$cordovaMoPubAds",["$q","$window",function(e,n){return{setOptions:function(r){var o=e.defer();return n.MoPub.setOptions(r,function(){o.resolve()},function(){o.reject()}),o.promise},createBanner:function(r){var o=e.defer();return n.MoPub.createBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},removeBanner:function(){var r=e.defer();return n.MoPub.removeBanner(function(){r.resolve()},function(){r.reject()}),r.promise},showBanner:function(r){var o=e.defer();return n.MoPub.showBanner(r,function(){o.resolve()},function(){o.reject()}),o.promise},showBannerAtXY:function(r,o){var t=e.defer();return n.MoPub.showBannerAtXY(r,o,function(){t.resolve()},function(){t.reject()}),t.promise},hideBanner:function(){var r=e.defer();return n.MoPub.hideBanner(function(){r.resolve()},function(){r.reject()}),r.promise},prepareInterstitial:function(r){var o=e.defer();return n.MoPub.prepareInterstitial(r,function(){o.resolve()},function(){o.reject()}),o.promise},showInterstitial:function(){var r=e.defer();return n.MoPub.showInterstitial(function(){r.resolve()},function(){r.reject()}),r.promise}}}]),angular.module("ngCordova.plugins.nativeAudio",[]).factory("$cordovaNativeAudio",["$q","$window",function(e,n){return{preloadSimple:function(r,o){var t=e.defer();return n.plugins.NativeAudio.preloadSimple(r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise},preloadComplex:function(r,o,t,i,a){var c=e.defer();return n.plugins.NativeAudio.preloadComplex(r,o,t,i,a,function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise},play:function(r,o){var t=e.defer();return n.plugins.NativeAudio.play(r,function(e){t.resolve(e)},function(e){t.reject(e)},o),t.promise},stop:function(r){var o=e.defer();return n.plugins.NativeAudio.stop(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},loop:function(r){var o=e.defer();return n.plugins.NativeAudio.loop(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},unload:function(r){var o=e.defer();return n.plugins.NativeAudio.unload(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},setVolumeForComplexAsset:function(r,o){var t=e.defer();return n.plugins.NativeAudio.setVolumeForComplexAsset(r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}}}]),angular.module("ngCordova.plugins.network",[]).factory("$cordovaNetwork",["$rootScope","$timeout",function(e,n){var r=function(){var r=navigator.connection.type;n(function(){e.$broadcast("$cordovaNetwork:offline",r)})},o=function(){var r=navigator.connection.type;n(function(){e.$broadcast("$cordovaNetwork:online",r)})};return document.addEventListener("deviceready",function(){navigator.connection&&(document.addEventListener("offline",r,!1),document.addEventListener("online",o,!1))}),{getNetwork:function(){return navigator.connection.type},isOnline:function(){var e=navigator.connection.type;return e!==Connection.UNKNOWN&&e!==Connection.NONE},isOffline:function(){var e=navigator.connection.type;return e===Connection.UNKNOWN||e===Connection.NONE},clearOfflineWatch:function(){document.removeEventListener("offline",r),e.$$listeners["$cordovaNetwork:offline"]=[]},clearOnlineWatch:function(){document.removeEventListener("online",o),e.$$listeners["$cordovaNetwork:online"]=[]}}}]).run(["$injector",function(e){e.get("$cordovaNetwork")}]),angular.module("ngCordova.plugins.pinDialog",[]).factory("$cordovaPinDialog",["$q","$window",function(e,n){return{prompt:function(r,o,t){var i=e.defer();return n.plugins.pinDialog.prompt(r,function(e){i.resolve(e)},o,t),i.promise}}}]),angular.module("ngCordova.plugins.preferences",[]).factory("$cordovaPreferences",["$window","$q",function(e,n){return{pluginNotEnabledMessage:"Plugin not enabled",decoratePromise:function(e){e.success=function(n){return e.then(n),e},e.error=function(n){return e.then(null,n),e}},store:function(r,o,t){function i(e){c.resolve(e)}function a(e){c.reject(new Error(e))}var c=n.defer(),u=c.promise;if(e.plugins){var s;s=3===arguments.length?e.plugins.appPreferences.store(t,r,o):e.plugins.appPreferences.store(r,o),s.then(i,a)}else c.reject(new Error(this.pluginNotEnabledMessage));return this.decoratePromise(u),u},fetch:function(r,o){function t(e){a.resolve(e)}function i(e){a.reject(new Error(e))}var a=n.defer(),c=a.promise;if(e.plugins){var u;u=2===arguments.length?e.plugins.appPreferences.fetch(o,r):e.plugins.appPreferences.fetch(r),u.then(t,i)}else a.reject(new Error(this.pluginNotEnabledMessage));return this.decoratePromise(c),c},remove:function(r,o){function t(e){a.resolve(e)}function i(e){a.reject(new Error(e))}var a=n.defer(),c=a.promise;if(e.plugins){var u;u=2===arguments.length?e.plugins.appPreferences.remove(o,r):e.plugins.appPreferences.remove(r),u.then(t,i)}else a.reject(new Error(this.pluginNotEnabledMessage));return this.decoratePromise(c),c},show:function(){function r(e){t.resolve(e)}function o(e){t.reject(new Error(e))}var t=n.defer(),i=t.promise;return e.plugins?e.plugins.appPreferences.show().then(r,o):t.reject(new Error(this.pluginNotEnabledMessage)),this.decoratePromise(i),i}}}]),angular.module("ngCordova.plugins.printer",[]).factory("$cordovaPrinter",["$q","$window",function(e,n){return{isAvailable:function(){var r=e.defer();return n.plugin.printer.isAvailable(function(e){r.resolve(e)}),r.promise},print:function(r,o){var t=e.defer();return n.plugin.printer.print(r,o,function(){t.resolve()}),t.promise}}}]),angular.module("ngCordova.plugins.progressIndicator",[]).factory("$cordovaProgress",[function(){return{show:function(e){var n=e||"Please wait...";return ProgressIndicator.show(n)},showSimple:function(e){var n=e||!1;return ProgressIndicator.showSimple(n)},showSimpleWithLabel:function(e,n){var r=e||!1,o=n||"Loading...";return ProgressIndicator.showSimpleWithLabel(r,o)},showSimpleWithLabelDetail:function(e,n,r){var o=e||!1,t=n||"Loading...",i=r||"Please wait";return ProgressIndicator.showSimpleWithLabelDetail(o,t,i)},showDeterminate:function(e,n){var r=e||!1,o=n||5e4;return ProgressIndicator.showDeterminate(r,o)},showDeterminateWithLabel:function(e,n,r){var o=e||!1,t=n||5e4,i=r||"Loading...";return ProgressIndicator.showDeterminateWithLabel(o,t,i)},showAnnular:function(e,n){var r=e||!1,o=n||5e4;return ProgressIndicator.showAnnular(r,o)},showAnnularWithLabel:function(e,n,r){var o=e||!1,t=n||5e4,i=r||"Loading...";return ProgressIndicator.showAnnularWithLabel(o,t,i)},showBar:function(e,n){var r=e||!1,o=n||5e4;return ProgressIndicator.showBar(r,o)},showBarWithLabel:function(e,n,r){var o=e||!1,t=n||5e4,i=r||"Loading...";return ProgressIndicator.showBarWithLabel(o,t,i)},showSuccess:function(e,n){var r=e||!1,o=n||"Success";return ProgressIndicator.showSuccess(r,o)},showText:function(e,n,r){var o=e||!1,t=n||"Warning",i=r||"center";return ProgressIndicator.showText(o,t,i)},hide:function(){return ProgressIndicator.hide()}}}]),angular.module("ngCordova.plugins.push",[]).factory("$cordovaPush",["$q","$window","$rootScope","$timeout",function(e,n,r,o){return{onNotification:function(e){o(function(){r.$broadcast("$cordovaPush:notificationReceived",e)})},register:function(r){var o,t=e.defer();return void 0!==r&&void 0===r.ecb&&(o=null===document.querySelector("[ng-app]")?"document.body":"document.querySelector('[ng-app]')",r.ecb="angular.element("+o+").injector().get('$cordovaPush').onNotification"),n.plugins.pushNotification.register(function(e){t.resolve(e)},function(e){t.reject(e)},r),t.promise},unregister:function(r){var o=e.defer();return n.plugins.pushNotification.unregister(function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise},setBadgeNumber:function(r){var o=e.defer();return n.plugins.pushNotification.setApplicationIconBadgeNumber(function(e){o.resolve(e)},function(e){o.reject(e)},r),o.promise}}}]),angular.module("ngCordova.plugins.push_v5",[]).factory("$cordovaPushV5",["$q","$rootScope","$timeout",function(e,n,r){var o;return{initialize:function(n){var r=e.defer();return o=PushNotification.init(n),r.resolve(o),r.promise},onNotification:function(){r(function(){o.on("notification",function(e){n.$emit("$cordovaPushV5:notificationReceived",e)})})},onError:function(){r(function(){o.on("error",function(e){n.$emit("$cordovaPushV5:errorOccurred",e)})})},register:function(){var n=e.defer();return void 0===o?n.reject(new Error("init must be called before any other operation")):o.on("registration",function(e){n.resolve(e.registrationId)}),n.promise},unregister:function(){var n=e.defer();return void 0===o?n.reject(new Error("init must be called before any other operation")):o.unregister(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},getBadgeNumber:function(){var n=e.defer();return void 0===o?n.reject(new Error("init must be called before any other operation")):o.getApplicationIconBadgeNumber(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise},setBadgeNumber:function(n){var r=e.defer();return void 0===o?r.reject(new Error("init must be called before any other operation")):o.setApplicationIconBadgeNumber(function(e){r.resolve(e)},function(e){r.reject(e)},n),r.promise},finish:function(){var n=e.defer();return void 0===o?n.reject(new Error("init must be called before any other operation")):o.finish(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise}}}]),angular.module("ngCordova.plugins.recentsControl",[]).factory("$cordovaRecents",function(){return{setColor:function(e){return RecentsControl.setColor(e)},setDescription:function(e){return RecentsControl.setDescription(e)},setOptions:function(e,n){return RecentsControl.setOptions(e,n)}}}),angular.module("ngCordova.plugins.screenshot",[]).factory("$cordovaScreenshot",["$q",function(e){return{captureToFile:function(n){var r=n||{},o=r.extension||"jpg",t=r.quality||"100",i=e.defer();return navigator.screenshot?(navigator.screenshot.save(function(e,n){e?i.reject(e):i.resolve(n.filePath)},o,t,r.filename),i.promise):(i.resolve(null),i.promise)},captureToUri:function(n){var r=n||{},o=r.extension||"jpg",t=r.quality||"100",i=e.defer();return navigator.screenshot?(navigator.screenshot.URI(function(e,n){e?i.reject(e):i.resolve(n.URI)},o,t,r.filename),i.promise):(i.resolve(null),i.promise)}}}]),angular.module("ngCordova.plugins.serial",[]).factory("$cordovaSerial",["$q",function(e){var n={};return n.requestPermission=function(n){var r=e.defer();return serial.requestPermission(n,function(){r.resolve()},function(e){r.reject(e)}),r.promise},n.open=function(n){var r=e.defer();return serial.open(n,function(){r.resolve()},function(e){r.reject(e)}),r.promise},n.write=function(n){var r=e.defer();return serial.write(n,function(){r.resolve()},function(e){r.reject(e)}),r.promise},n.writeHex=function(n){var r=e.defer();return serial.writeHex(n,function(){r.resolve()},function(e){r.reject(e)}),r.promise},n.read=function(){var n=e.defer();return serial.read(function(e){var r=new Uint8Array(e);n.resolve(r)},function(e){n.reject(e)}),n.promise},n.registerReadCallback=function(e,n){serial.registerReadCallback(function(n){var r=new Uint8Array(n);e(r)},n)},n.close=function(){var n=e.defer();return serial.close(function(){n.resolve()},function(e){n.reject(e)}),n.promise},n}]),angular.module("ngCordova.plugins.sms",[]).factory("$cordovaSms",["$q",function(e){return{send:function(n,r,o){var t=e.defer();return sms.send(n,r,o,function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}}}]),angular.module("ngCordova.plugins.socialSharing",[]).factory("$cordovaSocialSharing",["$q","$window",function(e,n){return{share:function(r,o,t,i){var a=e.defer();return o=o||null,t=t||null,i=i||null,n.plugins.socialsharing.share(r,o,t,i,function(){a.resolve(!0)},function(){a.reject(!1)}),a.promise},shareWithOptions:function(r){var o=e.defer();return n.plugins.socialsharing.shareWithOptions(r,function(){o.resolve(!0)},function(){o.reject(!1)}),o.promise},shareViaTwitter:function(r,o,t){var i=e.defer();return o=o||null,t=t||null,n.plugins.socialsharing.shareViaTwitter(r,o,t,function(){i.resolve(!0)},function(){i.reject(!1)}),i.promise},shareViaWhatsApp:function(r,o,t){var i=e.defer();return o=o||null,t=t||null,n.plugins.socialsharing.shareViaWhatsApp(r,o,t,function(){i.resolve(!0)},function(){i.reject(!1)}),i.promise},shareViaFacebook:function(r,o,t){var i=e.defer();return r=r||null,o=o||null,t=t||null,n.plugins.socialsharing.shareViaFacebook(r,o,t,function(){i.resolve(!0)},function(){i.reject(!1)}),i.promise},shareViaFacebookWithPasteMessageHint:function(r,o,t,i){var a=e.defer();return o=o||null,t=t||null,n.plugins.socialsharing.shareViaFacebookWithPasteMessageHint(r,o,t,i,function(){a.resolve(!0)},function(){a.reject(!1)}),a.promise},shareViaSMS:function(r,o){var t=e.defer();return n.plugins.socialsharing.shareViaSMS(r,o,function(){t.resolve(!0)},function(){t.reject(!1)}),t.promise},shareViaEmail:function(r,o,t,i,a,c){var u=e.defer();return t=t||null,i=i||null,a=a||null,c=c||null,n.plugins.socialsharing.shareViaEmail(r,o,t,i,a,c,function(){u.resolve(!0)},function(){u.reject(!1)}),u.promise},shareVia:function(r,o,t,i,a){var c=e.defer();return o=o||null,t=t||null,i=i||null,a=a||null,n.plugins.socialsharing.shareVia(r,o,t,i,a,function(){c.resolve(!0)},function(){c.reject(!1)}),c.promise},canShareViaEmail:function(){var r=e.defer();return n.plugins.socialsharing.canShareViaEmail(function(){r.resolve(!0)},function(){r.reject(!1)}),r.promise},canShareVia:function(r,o,t,i,a){var c=e.defer();return n.plugins.socialsharing.canShareVia(r,o,t,i,a,function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise},available:function(){var n=e.defer();return window.plugins.socialsharing.available(function(e){e?n.resolve():n.reject()}),n.promise}}}]),angular.module("ngCordova.plugins.spinnerDialog",[]).factory("$cordovaSpinnerDialog",["$window",function(e){return{show:function(n,r,o,t){return o=o||!1,e.plugins.spinnerDialog.show(n,r,o,t)},hide:function(){return e.plugins.spinnerDialog.hide()}}}]),angular.module("ngCordova.plugins.splashscreen",[]).factory("$cordovaSplashscreen",[function(){return{hide:function(){return navigator.splashscreen.hide()},show:function(){return navigator.splashscreen.show()}}}]),angular.module("ngCordova.plugins.sqlite",[]).factory("$cordovaSQLite",["$q","$window",function(e,n){return{openDB:function(e,r){return angular.isObject(e)&&!angular.isString(e)?("undefined"!=typeof r&&(e.bgType=r),n.sqlitePlugin.openDatabase(e)):n.sqlitePlugin.openDatabase({name:e,bgType:r})},execute:function(n,r,o){var t=e.defer();return n.transaction(function(e){e.executeSql(r,o,function(e,n){t.resolve(n)},function(e,n){t.reject(n)})}),t.promise},insertCollection:function(n,r,o){var t=e.defer(),i=o.slice(0);return n.transaction(function(e){!function n(){var o=i.splice(0,1)[0];try{e.executeSql(r,o,function(e,r){0===i.length?t.resolve(r):n()},function(e,n){t.reject(n)})}catch(a){t.reject(a)}}()}),t.promise},nestedExecute:function(n,r,o,t,i){var a=e.defer();return n.transaction(function(e){e.executeSql(r,t,function(e,n){a.resolve(n),e.executeSql(o,i,function(e,n){a.resolve(n)})})},function(e,n){a.reject(n)}),a.promise},deleteDB:function(r){var o=e.defer();return n.sqlitePlugin.deleteDatabase(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}]),angular.module("ngCordova.plugins.statusbar",[]).factory("$cordovaStatusbar",[function(){return{overlaysWebView:function(e){return StatusBar.overlaysWebView(!!e)},STYLES:{DEFAULT:0,LIGHT_CONTENT:1,BLACK_TRANSLUCENT:2,BLACK_OPAQUE:3},style:function(e){switch(e){case 0:return StatusBar.styleDefault();case 1:return StatusBar.styleLightContent();case 2:return StatusBar.styleBlackTranslucent();case 3:return StatusBar.styleBlackOpaque();default:return StatusBar.styleDefault()}},styleColor:function(e){return StatusBar.backgroundColorByName(e)},styleHex:function(e){return StatusBar.backgroundColorByHexString(e)},hide:function(){return StatusBar.hide()},show:function(){return StatusBar.show()},isVisible:function(){return StatusBar.isVisible}}}]),angular.module("ngCordova.plugins.toast",[]).factory("$cordovaToast",["$q","$window",function(e,n){return{showShortTop:function(r){var o=e.defer();return n.plugins.toast.showShortTop(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showShortCenter:function(r){var o=e.defer();return n.plugins.toast.showShortCenter(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showShortBottom:function(r){var o=e.defer();return n.plugins.toast.showShortBottom(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showLongTop:function(r){var o=e.defer();return n.plugins.toast.showLongTop(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showLongCenter:function(r){var o=e.defer();return n.plugins.toast.showLongCenter(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showLongBottom:function(r){var o=e.defer();return n.plugins.toast.showLongBottom(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},showWithOptions:function(r){var o=e.defer();return n.plugins.toast.showWithOptions(r,function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},show:function(r,o,t){var i=e.defer();return n.plugins.toast.show(r,o,t,function(e){i.resolve(e)},function(e){i.reject(e)}),i.promise},hide:function(){var r=e.defer();try{n.plugins.toast.hide(),r.resolve()}catch(o){r.reject(o&&o.message)}return r.promise}}}]),angular.module("ngCordova.plugins.touchid",[]).factory("$cordovaTouchID",["$q",function(e){return{checkSupport:function(){var n=e.defer();return window.cordova?touchid.checkSupport(function(e){n.resolve(e)},function(e){n.reject(e)}):n.reject("Not supported without cordova.js"),n.promise},authenticate:function(n){var r=e.defer();return window.cordova?touchid.authenticate(function(e){r.resolve(e)},function(e){r.reject(e)},n):r.reject("Not supported without cordova.js"),r.promise}}}]),angular.module("ngCordova.plugins.tts",[]).factory("$cordovaTTS",function(){return{speak:function(e,n,r){return TTS.speak(e,n,r)}}}),angular.module("ngCordova.plugins.upsPush",[]).factory("$cordovaUpsPush",["$q","$window","$rootScope","$timeout",function(e,n,r,o){return{register:function(t){var i=e.defer();return n.push.register(function(e){o(function(){r.$broadcast("$cordovaUpsPush:notificationReceived",e)})},function(){i.resolve()},function(e){i.reject(e)},t),i.promise},unregister:function(r){var o=e.defer();return n.push.unregister(function(){o.resolve()},function(e){o.reject(e)},r),o.promise},setBadgeNumber:function(r){var o=e.defer();return n.push.setApplicationIconBadgeNumber(function(){o.resolve()},r),o.promise}}}]),angular.module("ngCordova.plugins.vibration",[]).factory("$cordovaVibration",[function(){return{vibrate:function(e){return navigator.notification.vibrate(e)},vibrateWithPattern:function(e,n){return navigator.notification.vibrateWithPattern(e,n)},cancelVibration:function(){return navigator.notification.cancelVibration()}}}]),angular.module("ngCordova.plugins.videoCapturePlus",[]).provider("$cordovaVideoCapturePlus",[function(){var e={};this.setLimit=function(n){e.limit=n},this.setMaxDuration=function(n){e.duration=n},this.setHighQuality=function(n){e.highquality=n},this.useFrontCamera=function(n){e.frontcamera=n},this.setPortraitOverlay=function(n){e.portraitOverlay=n},this.setLandscapeOverlay=function(n){e.landscapeOverlay=n},this.setOverlayText=function(n){e.overlayText=n},this.$get=["$q","$window",function(n,r){return{captureVideo:function(o){var t=n.defer();return r.plugins.videocaptureplus?(r.plugins.videocaptureplus.captureVideo(t.resolve,t.reject,angular.extend({},e,o)),t.promise):(t.resolve(null),t.promise)}}}]}]),angular.module("ngCordova.plugins.zip",[]).factory("$cordovaZip",["$q","$window",function(e,n){return{unzip:function(r,o){var t=e.defer();return n.zip.unzip(r,o,function(e){0===e?t.resolve():t.reject()},function(e){t.notify(e)}),t.promise}}}])}();
+/*
+ Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
+ (c) 2010-2013, Vladimir Agafonkin
+ (c) 2010-2011, CloudMade
+*/
+!function(t,e,i){var n=t.L,o={};o.version="0.7.7","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,
+transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return n.html!==!1?i.innerHTML=n.html:i.innerHTML="",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="&#215;",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this._map&&this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),
+this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);
+case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);
+/*
+  Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons
+  (c) 2012-2013, Lennard Voogdt
+
+  http://leafletjs.com
+  https://github.com/lvoogdt
+*//*global L*/(function(e,t,n){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="2.0.1";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.Util.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;n.icon&&(e.innerHTML=this._createInner());n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+ -n.bgPos.y+"px");this._setIconStyles(e,"icon-"+n.markerColor);return e},_createInner:function(){var e,t="",n="",r="",i=this.options;i.icon.slice(0,i.prefix.length+1)===i.prefix+"-"?e=i.icon:e=i.prefix+"-"+i.icon;i.spin&&typeof i.spinClass=="string"&&(t=i.spinClass);i.iconColor&&(i.iconColor==="white"||i.iconColor==="black"?n="icon-"+i.iconColor:r="style='color: "+i.iconColor+"' ");return"<i "+r+"class='"+i.prefix+" "+e+" "+t+" "+n+"'></i>"},_setIconStyles:function(e,t){var n=this.options,r=L.point(n[t==="shadow"?"shadowSize":"iconSize"]),i;t==="shadow"?i=L.point(n.shadowAnchor||n.iconAnchor):i=L.point(n.iconAnchor);!i&&r&&(i=r.divideBy(2,!0));e.className="awesome-marker-"+t+" "+n.className;if(i){e.style.marginLeft=-i.x+"px";e.style.marginTop=-i.y+"px"}if(r){e.style.width=r.x+"px";e.style.height=r.y+"px"}},createShadow:function(){var e=t.createElement("div");this._setIconStyles(e,"shadow");return e}});L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}})(this,document);
+
+/* 
+ * Leaflet Control Search v2.7.2 - 2017-04-08 
+ * 
+ * Copyright 2017 Stefano Cudini 
+ * stefano.cudini@gmail.com 
+ * http://labs.easyblog.it/ 
+ * 
+ * Licensed under the MIT license. 
+ * 
+ * Demo: 
+ * http://labs.easyblog.it/maps/leaflet-search/ 
+ * 
+ * Source: 
+ * git@github.com:stefanocudini/leaflet-search.git 
+ * 
+ */
+!function(a){if("function"==typeof define&&define.amd)define(["leaflet"],a);else if("undefined"!=typeof module)module.exports=a(require("leaflet"));else{if("undefined"==typeof window.L)throw"Leaflet must be loaded first";a(window.L)}}(function(a){function b(a,b){var c=b.split("."),d=c.pop(),e=c.length,f=c[0],g=1;if(e>0)for(;(a=a[f])&&e>g;)f=c[g++];return a?a[d]:void 0}function c(a){return"[object Object]"===Object.prototype.toString.call(a)}return a.Control.Search=a.Control.extend({includes:a.Mixin.Events,options:{url:"",layer:null,sourceData:null,jsonpParam:null,propertyLoc:"loc",propertyName:"title",formatData:null,filterData:null,moveToLocation:null,buildTip:null,container:"",zoom:null,minLength:1,initial:!0,casesensitive:!1,autoType:!0,delayType:400,tooltipLimit:-1,tipAutoSubmit:!0,firstTipSubmit:!1,autoResize:!0,collapsed:!0,autoCollapse:!1,autoCollapseTime:1200,textErr:"Location not found",textCancel:"Cancel",textPlaceholder:"Search...",position:"topleft",hideMarkerOnCollapse:!1,marker:{icon:!1,animate:!0,circle:{radius:10,weight:3,color:"#e03",stroke:!0,fill:!1}}},initialize:function(b){a.Util.setOptions(this,b||{}),this._inputMinSize=this.options.textPlaceholder?this.options.textPlaceholder.length:10,this._layer=this.options.layer||new a.LayerGroup,this._filterData=this.options.filterData||this._defaultFilterData,this._formatData=this.options.formatData||this._defaultFormatData,this._moveToLocation=this.options.moveToLocation||this._defaultMoveToLocation,this._autoTypeTmp=this.options.autoType,this._countertips=0,this._recordsCache={},this._curReq=null},onAdd:function(b){return this._map=b,this._container=a.DomUtil.create("div","leaflet-control-search"),this._input=this._createInput(this.options.textPlaceholder,"search-input"),this._tooltip=this._createTooltip("search-tooltip"),this._cancel=this._createCancel(this.options.textCancel,"search-cancel"),this._button=this._createButton(this.options.textPlaceholder,"search-button"),this._alert=this._createAlert("search-alert"),this.options.collapsed===!1&&this.expand(this.options.collapsed),this.options.marker&&(this.options.marker instanceof a.Marker||this.options.marker instanceof a.CircleMarker?this._markerSearch=this.options.marker:c(this.options.marker)&&(this._markerSearch=new a.Control.Search.Marker([0,0],this.options.marker)),this._markerSearch._isMarkerSearch=!0),this.setLayer(this._layer),b.on({resize:this._handleAutoresize},this),this._container},addTo:function(b){return this.options.container?(this._container=this.onAdd(b),this._wrapper=a.DomUtil.get(this.options.container),this._wrapper.style.position="relative",this._wrapper.appendChild(this._container)):a.Control.prototype.addTo.call(this,b),this},onRemove:function(a){this._recordsCache={}},setLayer:function(a){return this._layer=a,this._layer.addTo(this._map),this},showAlert:function(a){a=a||this.options.textErr,this._alert.style.display="block",this._alert.innerHTML=a,clearTimeout(this.timerAlert);var b=this;return this.timerAlert=setTimeout(function(){b.hideAlert()},this.options.autoCollapseTime),this},hideAlert:function(){return this._alert.style.display="none",this},cancel:function(){return this._input.value="",this._handleKeypress({keyCode:8}),this._input.size=this._inputMinSize,this._input.focus(),this._cancel.style.display="none",this._hideTooltip(),this},expand:function(b){return b="boolean"==typeof b?b:!0,this._input.style.display="block",a.DomUtil.addClass(this._container,"search-exp"),b!==!1&&(this._input.focus(),this._map.on("dragstart click",this.collapse,this)),this.fire("search:expanded"),this},collapse:function(){return this._hideTooltip(),this.cancel(),this._alert.style.display="none",this._input.blur(),this.options.collapsed&&(this._input.style.display="none",this._cancel.style.display="none",a.DomUtil.removeClass(this._container,"search-exp"),this.options.hideMarkerOnCollapse&&this._map.removeLayer(this._markerSearch),this._map.off("dragstart click",this.collapse,this)),this.fire("search:collapsed"),this},collapseDelayed:function(){if(!this.options.autoCollapse)return this;var a=this;return clearTimeout(this.timerCollapse),this.timerCollapse=setTimeout(function(){a.collapse()},this.options.autoCollapseTime),this},collapseDelayedStop:function(){return clearTimeout(this.timerCollapse),this},_createAlert:function(b){var c=a.DomUtil.create("div",b,this._container);return c.style.display="none",a.DomEvent.on(c,"click",a.DomEvent.stop,this).on(c,"click",this.hideAlert,this),c},_createInput:function(b,c){var d=a.DomUtil.create("label",c,this._container),e=a.DomUtil.create("input",c,this._container);return e.type="text",e.size=this._inputMinSize,e.value="",e.autocomplete="off",e.autocorrect="off",e.autocapitalize="off",e.placeholder=b,e.style.display="none",e.role="search",e.id=e.role+e.type+e.size,d.htmlFor=e.id,d.style.display="none",d.value=b,a.DomEvent.disableClickPropagation(e).on(e,"keydown",this._handleKeypress,this).on(e,"blur",this.collapseDelayed,this).on(e,"focus",this.collapseDelayedStop,this),e},_createCancel:function(b,c){var d=a.DomUtil.create("a",c,this._container);return d.href="#",d.title=b,d.style.display="none",d.innerHTML="<span>&otimes;</span>",a.DomEvent.on(d,"click",a.DomEvent.stop,this).on(d,"click",this.cancel,this),d},_createButton:function(b,c){var d=a.DomUtil.create("a",c,this._container);return d.href="#",d.title=b,a.DomEvent.on(d,"click",a.DomEvent.stop,this).on(d,"click",this._handleSubmit,this).on(d,"focus",this.collapseDelayedStop,this).on(d,"blur",this.collapseDelayed,this),d},_createTooltip:function(b){var c=a.DomUtil.create("ul",b,this._container);c.style.display="none";var d=this;return a.DomEvent.disableClickPropagation(c).on(c,"blur",this.collapseDelayed,this).on(c,"mousewheel",function(b){d.collapseDelayedStop(),a.DomEvent.stopPropagation(b)},this).on(c,"mouseover",function(a){d.collapseDelayedStop()},this),c},_createTip:function(b,c){var d;if(this.options.buildTip){if(d=this.options.buildTip.call(this,b,c),"string"==typeof d){var e=a.DomUtil.create("div");e.innerHTML=d,d=e.firstChild}}else d=a.DomUtil.create("li",""),d.innerHTML=b;return a.DomUtil.addClass(d,"search-tip"),d._text=b,this.options.tipAutoSubmit&&a.DomEvent.disableClickPropagation(d).on(d,"click",a.DomEvent.stop,this).on(d,"click",function(a){this._input.value=b,this._handleAutoresize(),this._input.focus(),this._hideTooltip(),this._handleSubmit()},this),d},_getUrl:function(a){return"function"==typeof this.options.url?this.options.url(a):this.options.url},_defaultFilterData:function(a,b){var c,d,e,f={};if(a=a.replace(/[.*+?^${}()|[\]\\]/g,""),""===a)return[];c=this.options.initial?"^":"",d=this.options.casesensitive?void 0:"i",e=new RegExp(c+a,d);for(var g in b)e.test(g)&&(f[g]=b[g]);return f},showTooltip:function(a){if(this._countertips=0,this._tooltip.innerHTML="",this._tooltip.currentSelection=-1,this.options.tooltipLimit)for(var b in a){if(this._countertips===this.options.tooltipLimit)break;this._countertips++,this._tooltip.appendChild(this._createTip(b,a[b]))}return this._countertips>0?(this._tooltip.style.display="block",this._autoTypeTmp&&this._autoType(),this._autoTypeTmp=this.options.autoType):this._hideTooltip(),this._tooltip.scrollTop=0,this._countertips},_hideTooltip:function(){return this._tooltip.style.display="none",this._tooltip.innerHTML="",0},_defaultFormatData:function(c){var d,e=this.options.propertyName,f=this.options.propertyLoc,g={};if(a.Util.isArray(f))for(d in c)g[b(c[d],e)]=a.latLng(c[d][f[0]],c[d][f[1]]);else for(d in c)g[b(c[d],e)]=a.latLng(b(c[d],f));return g},_recordsFromJsonp:function(b,c){a.Control.Search.callJsonp=c;var d=a.DomUtil.create("script","leaflet-search-jsonp",document.getElementsByTagName("body")[0]),e=a.Util.template(this._getUrl(b)+"&"+this.options.jsonpParam+"=L.Control.Search.callJsonp",{s:b});return d.type="text/javascript",d.src=e,{abort:function(){d.parentNode.removeChild(d)}}},_recordsFromAjax:function(b,c){void 0===window.XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new ActiveXObject("Microsoft.XMLHTTP.6.0")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP.3.0")}catch(b){throw new Error("XMLHttpRequest is not supported")}}});var d=a.Browser.ie&&!window.atob&&document.querySelector,e=d?new XDomainRequest:new XMLHttpRequest,f=a.Util.template(this._getUrl(b),{s:b});e.open("GET",f);return e.onload=function(){c(JSON.parse(e.responseText))},e.onreadystatechange=function(){4===e.readyState&&200===e.status&&this.onload()},e.send(),e},_recordsFromLayer:function(){var c,d={},e=this.options.propertyName;return this._layer.eachLayer(function(f){if(!f.hasOwnProperty("_isMarkerSearch"))if(f instanceof a.Marker||f instanceof a.CircleMarker)try{if(b(f.options,e))c=f.getLatLng(),c.layer=f,d[b(f.options,e)]=c;else{if(!b(f.feature.properties,e))throw new Error("propertyName '"+e+"' not found in marker");c=f.getLatLng(),c.layer=f,d[b(f.feature.properties,e)]=c}}catch(g){console}else if(f.hasOwnProperty("feature"))try{if(!f.feature.properties.hasOwnProperty(e))throw new Error("propertyName '"+e+"' not found in feature");c=f.getBounds().getCenter(),c.layer=f,d[f.feature.properties[e]]=c}catch(g){console}else f instanceof a.LayerGroup&&f.eachLayer(function(a){c=a.getLatLng(),c.layer=a,d[a.feature.properties[e]]=c})},this),d},_autoType:function(){var a=this._input.value.length,b=this._tooltip.firstChild?this._tooltip.firstChild._text:"",c=b.length;if(0===b.indexOf(this._input.value))if(this._input.value=b,this._handleAutoresize(),this._input.createTextRange){var d=this._input.createTextRange();d.collapse(!0),d.moveStart("character",a),d.moveEnd("character",c),d.select()}else this._input.setSelectionRange?this._input.setSelectionRange(a,c):this._input.selectionStart&&(this._input.selectionStart=a,this._input.selectionEnd=c)},_hideAutoType:function(){var a;if((a=this._input.selection)&&a.empty)a.empty();else if(this._input.createTextRange){a=this._input.createTextRange(),a.collapse(!0);var b=this._input.value.length;a.moveStart("character",b),a.moveEnd("character",b),a.select()}else this._input.getSelection&&this._input.getSelection().removeAllRanges(),this._input.selectionStart=this._input.selectionEnd},_handleKeypress:function(a){switch(a.keyCode){case 27:this.collapse();break;case 13:(1==this._countertips||this.options.firstTipSubmit&&this._countertips>0)&&this._handleArrowSelect(1),this._handleSubmit();break;case 38:this._handleArrowSelect(-1);break;case 40:this._handleArrowSelect(1);break;case 8:case 45:case 46:this._autoTypeTmp=!1;break;case 37:case 39:case 16:case 17:case 35:case 36:break;default:if(this._input.value.length?this._cancel.style.display="block":this._cancel.style.display="none",this._input.value.length>=this.options.minLength){var b=this;clearTimeout(this.timerKeypress),this.timerKeypress=setTimeout(function(){b._fillRecordsCache()},this.options.delayType)}else this._hideTooltip()}this._handleAutoresize()},searchText:function(b){var c=b.charCodeAt(b.length);this._input.value=b,this._input.style.display="block",a.DomUtil.addClass(this._container,"search-exp"),this._autoTypeTmp=!1,this._handleKeypress({keyCode:c})},_fillRecordsCache:function(){var b,c=this._input.value,d=this;this._curReq&&this._curReq.abort&&this._curReq.abort(),a.DomUtil.addClass(this._container,"search-load"),this.options.layer?(this._recordsCache=this._recordsFromLayer(),b=this._filterData(this._input.value,this._recordsCache),this.showTooltip(b),a.DomUtil.removeClass(this._container,"search-load")):(this.options.sourceData?this._retrieveData=this.options.sourceData:this.options.url&&(this._retrieveData=this.options.jsonpParam?this._recordsFromJsonp:this._recordsFromAjax),this._curReq=this._retrieveData.call(this,c,function(c){d._recordsCache=d._formatData(c),b=d.options.sourceData?d._filterData(d._input.value,d._recordsCache):d._recordsCache,d.showTooltip(b),a.DomUtil.removeClass(d._container,"search-load")}))},_handleAutoresize:function(){this._input.style.maxWidth!=this._map._container.offsetWidth&&(this._input.style.maxWidth=a.DomUtil.getStyle(this._map._container,"width")),this.options.autoResize&&this._container.offsetWidth+45<this._map._container.offsetWidth&&(this._input.size=this._input.value.length<this._inputMinSize?this._inputMinSize:this._input.value.length)},_handleArrowSelect:function(b){var c=this._tooltip.hasChildNodes()?this._tooltip.childNodes:[];for(i=0;i<c.length;i++)a.DomUtil.removeClass(c[i],"search-tip-select");if(1==b&&this._tooltip.currentSelection>=c.length-1)a.DomUtil.addClass(c[this._tooltip.currentSelection],"search-tip-select");else if(-1==b&&this._tooltip.currentSelection<=0)this._tooltip.currentSelection=-1;else if("none"!=this._tooltip.style.display){this._tooltip.currentSelection+=b,a.DomUtil.addClass(c[this._tooltip.currentSelection],"search-tip-select"),this._input.value=c[this._tooltip.currentSelection]._text;var d=c[this._tooltip.currentSelection].offsetTop;d+c[this._tooltip.currentSelection].clientHeight>=this._tooltip.scrollTop+this._tooltip.clientHeight?this._tooltip.scrollTop=d-this._tooltip.clientHeight+c[this._tooltip.currentSelection].clientHeight:d<=this._tooltip.scrollTop&&(this._tooltip.scrollTop=d)}},_handleSubmit:function(){if(this._hideAutoType(),this.hideAlert(),this._hideTooltip(),"none"==this._input.style.display)this.expand();else if(""===this._input.value)this.collapse();else{var a=this._getLocation(this._input.value);a===!1?this.showAlert():(this.showLocation(a,this._input.value),this.fire("search:locationfound",{latlng:a,text:this._input.value,layer:a.layer?a.layer:null}))}},_getLocation:function(a){return this._recordsCache.hasOwnProperty(a)?this._recordsCache[a]:!1},_defaultMoveToLocation:function(a,b,c){this.options.zoom?this._map.setView(a,this.options.zoom):this._map.panTo(a)},showLocation:function(a,b){var c=this;return c._map.once("moveend zoomend",function(b){c._markerSearch&&c._markerSearch.addTo(c._map).setLatLng(a)}),c._moveToLocation(a,b,c._map),c.options.autoCollapse&&c.collapse(),c}}),a.Control.Search.Marker=a.Marker.extend({includes:a.Mixin.Events,options:{icon:new a.Icon.Default,animate:!0,circle:{radius:10,weight:3,color:"#e03",stroke:!0,fill:!1}},initialize:function(b,d){a.setOptions(this,d),d.icon===!0&&(d.icon=new a.Icon.Default),a.Marker.prototype.initialize.call(this,b,d),c(this.options.circle)&&(this._circleLoc=new a.CircleMarker(b,this.options.circle))},onAdd:function(b){a.Marker.prototype.onAdd.call(this,b),this._circleLoc&&(b.addLayer(this._circleLoc),this.options.animate&&this.animate())},onRemove:function(b){a.Marker.prototype.onRemove.call(this,b),this._circleLoc&&b.removeLayer(this._circleLoc)},setLatLng:function(b){return a.Marker.prototype.setLatLng.call(this,b),this._circleLoc&&this._circleLoc.setLatLng(b),this},_initIcon:function(){this.options.icon&&a.Marker.prototype._initIcon.call(this)},_removeIcon:function(){this.options.icon&&a.Marker.prototype._removeIcon.call(this)},animate:function(){if(this._circleLoc){var a=this._circleLoc,b=200,c=5,d=parseInt(a._radius/c),e=this.options.circle.radius,f=2*a._radius,g=0;a._timerAnimLoc=setInterval(function(){g+=.5,d+=g,f-=d,a.setRadius(f),e>f&&(clearInterval(a._timerAnimLoc),a.setRadius(e))},b)}return this}}),a.Map.addInitHook(function(){this.options.searchControl&&(this.searchControl=a.control.search(this.options.searchControl),this.addControl(this.searchControl))}),a.control.search=function(b){return new a.Control.Search(b)},a.Control.Search});
+(function(){
+
+// This is for grouping buttons into a bar
+// takes an array of `L.easyButton`s and
+// then the usual `.addTo(map)`
+L.Control.EasyBar = L.Control.extend({
+
+  options: {
+    position:       'topleft',  // part of leaflet's defaults
+    id:             null,       // an id to tag the Bar with
+    leafletClasses: true        // use leaflet classes?
+  },
+
+
+  initialize: function(buttons, options){
+
+    if(options){
+      L.Util.setOptions( this, options );
+    }
+
+    this._buildContainer();
+    this._buttons = [];
+
+    for(var i = 0; i < buttons.length; i++){
+      buttons[i]._bar = this;
+      buttons[i]._container = buttons[i].button;
+      this._buttons.push(buttons[i]);
+      this.container.appendChild(buttons[i].button);
+    }
+
+  },
+
+
+  _buildContainer: function(){
+    this._container = this.container = L.DomUtil.create('div', '');
+    this.options.leafletClasses && L.DomUtil.addClass(this.container, 'leaflet-bar easy-button-container leaflet-control');
+    this.options.id && (this.container.id = this.options.id);
+  },
+
+
+  enable: function(){
+    L.DomUtil.addClass(this.container, 'enabled');
+    L.DomUtil.removeClass(this.container, 'disabled');
+    this.container.setAttribute('aria-hidden', 'false');
+    return this;
+  },
+
+
+  disable: function(){
+    L.DomUtil.addClass(this.container, 'disabled');
+    L.DomUtil.removeClass(this.container, 'enabled');
+    this.container.setAttribute('aria-hidden', 'true');
+    return this;
+  },
+
+
+  onAdd: function () {
+    return this.container;
+  },
+
+  addTo: function (map) {
+    this._map = map;
+
+    for(var i = 0; i < this._buttons.length; i++){
+      this._buttons[i]._map = map;
+    }
+
+    var container = this._container = this.onAdd(map),
+        pos = this.getPosition(),
+        corner = map._controlCorners[pos];
+
+    L.DomUtil.addClass(container, 'leaflet-control');
+
+    if (pos.indexOf('bottom') !== -1) {
+      corner.insertBefore(container, corner.firstChild);
+    } else {
+      corner.appendChild(container);
+    }
+
+    return this;
+  }
+
+});
+
+L.easyBar = function(){
+  var args = [L.Control.EasyBar];
+  for(var i = 0; i < arguments.length; i++){
+    args.push( arguments[i] );
+  }
+  return new (Function.prototype.bind.apply(L.Control.EasyBar, args));
+};
+
+// L.EasyButton is the actual buttons
+// can be called without being grouped into a bar
+L.Control.EasyButton = L.Control.extend({
+
+  options: {
+    position:  'topleft',       // part of leaflet's defaults
+
+    id:        null,            // an id to tag the button with
+
+    type:      'replace',       // [(replace|animate)]
+                                // replace swaps out elements
+                                // animate changes classes with all elements inserted
+
+    states:    [],              // state names look like this
+                                // {
+                                //   stateName: 'untracked',
+                                //   onClick: function(){ handle_nav_manually(); };
+                                //   title: 'click to make inactive',
+                                //   icon: 'fa-circle',    // wrapped with <a>
+                                // }
+
+    leafletClasses:   true,     // use leaflet styles for the button
+    tagName:          'button',
+  },
+
+
+
+  initialize: function(icon, onClick, title, id){
+
+    // clear the states manually
+    this.options.states = [];
+
+    // add id to options
+    if(id != null){
+      this.options.id = id;
+    }
+
+    // storage between state functions
+    this.storage = {};
+
+    // is the last item an object?
+    if( typeof arguments[arguments.length-1] === 'object' ){
+
+      // if so, it should be the options
+      L.Util.setOptions( this, arguments[arguments.length-1] );
+    }
+
+    // if there aren't any states in options
+    // use the early params
+    if( this.options.states.length === 0 &&
+        typeof icon  === 'string' &&
+        typeof onClick === 'function'){
+
+      // turn the options object into a state
+      this.options.states.push({
+        icon: icon,
+        onClick: onClick,
+        title: typeof title === 'string' ? title : ''
+      });
+    }
+
+    // curate and move user's states into
+    // the _states for internal use
+    this._states = [];
+
+    for(var i = 0; i < this.options.states.length; i++){
+      this._states.push( new State(this.options.states[i], this) );
+    }
+
+    this._buildButton();
+
+    this._activateState(this._states[0]);
+
+  },
+
+  _buildButton: function(){
+
+    this.button = L.DomUtil.create(this.options.tagName, '');
+
+    if (this.options.tagName === 'button') {
+        this.button.setAttribute('type', 'button');
+    }
+
+    if (this.options.id ){
+      this.button.id = this.options.id;
+    }
+
+    if (this.options.leafletClasses){
+      L.DomUtil.addClass(this.button, 'easy-button-button leaflet-bar-part leaflet-interactive');
+    }
+
+    // don't let double clicks and mousedown get to the map
+    L.DomEvent.addListener(this.button, 'dblclick', L.DomEvent.stop);
+    L.DomEvent.addListener(this.button, 'mousedown', L.DomEvent.stop);
+    L.DomEvent.addListener(this.button, 'mouseup', L.DomEvent.stop);
+
+    // take care of normal clicks
+    L.DomEvent.addListener(this.button,'click', function(e){
+      L.DomEvent.stop(e);
+      this._currentState.onClick(this, this._map ? this._map : null );
+      this._map && this._map.getContainer().focus();
+    }, this);
+
+    // prep the contents of the control
+    if(this.options.type == 'replace'){
+      this.button.appendChild(this._currentState.icon);
+    } else {
+      for(var i=0;i<this._states.length;i++){
+        this.button.appendChild(this._states[i].icon);
+      }
+    }
+  },
+
+
+  _currentState: {
+    // placeholder content
+    stateName: 'unnamed',
+    icon: (function(){ return document.createElement('span'); })()
+  },
+
+
+
+  _states: null, // populated on init
+
+
+
+  state: function(newState){
+
+    // when called with no args, it's a getter
+    if (arguments.length === 0) {
+      return this._currentState.stateName;
+    }
+
+    // activate by name
+    if(typeof newState == 'string'){
+
+      this._activateStateNamed(newState);
+
+    // activate by index
+    } else if (typeof newState == 'number'){
+
+      this._activateState(this._states[newState]);
+    }
+
+    return this;
+  },
+
+
+  _activateStateNamed: function(stateName){
+    for(var i = 0; i < this._states.length; i++){
+      if( this._states[i].stateName == stateName ){
+        this._activateState( this._states[i] );
+      }
+    }
+  },
+
+  _activateState: function(newState){
+
+    if( newState === this._currentState ){
+
+      // don't touch the dom if it'll just be the same after
+      return;
+
+    } else {
+
+      // swap out elements... if you're into that kind of thing
+      if( this.options.type == 'replace' ){
+        this.button.appendChild(newState.icon);
+        this.button.removeChild(this._currentState.icon);
+      }
+
+      if( newState.title ){
+        this.button.title = newState.title;
+      } else {
+        this.button.removeAttribute('title');
+      }
+
+      // update classes for animations
+      for(var i=0;i<this._states.length;i++){
+        L.DomUtil.removeClass(this._states[i].icon, this._currentState.stateName + '-active');
+        L.DomUtil.addClass(this._states[i].icon, newState.stateName + '-active');
+      }
+
+      // update classes for animations
+      L.DomUtil.removeClass(this.button, this._currentState.stateName + '-active');
+      L.DomUtil.addClass(this.button, newState.stateName + '-active');
+
+      // update the record
+      this._currentState = newState;
+
+    }
+  },
+
+  enable: function(){
+    L.DomUtil.addClass(this.button, 'enabled');
+    L.DomUtil.removeClass(this.button, 'disabled');
+    this.button.setAttribute('aria-hidden', 'false');
+    return this;
+  },
+
+  disable: function(){
+    L.DomUtil.addClass(this.button, 'disabled');
+    L.DomUtil.removeClass(this.button, 'enabled');
+    this.button.setAttribute('aria-hidden', 'true');
+    return this;
+  },
+
+  onAdd: function(map){
+    var bar = L.easyBar([this], {
+      position: this.options.position,
+      leafletClasses: this.options.leafletClasses
+    });
+    this._anonymousBar = bar;
+    this._container = bar.container;
+    return this._anonymousBar.container;
+  },
+
+  removeFrom: function (map) {
+    if (this._map === map)
+      this.remove();
+    return this;
+  },
+
+});
+
+L.easyButton = function(/* args will pass automatically */){
+  var args = Array.prototype.concat.apply([L.Control.EasyButton],arguments);
+  return new (Function.prototype.bind.apply(L.Control.EasyButton, args));
+};
+
+/*************************
+ *
+ * util functions
+ *
+ *************************/
+
+// constructor for states so only curated
+// states end up getting called
+function State(template, easyButton){
+
+  this.title = template.title;
+  this.stateName = template.stateName ? template.stateName : 'unnamed-state';
+
+  // build the wrapper
+  this.icon = L.DomUtil.create('span', '');
+
+  L.DomUtil.addClass(this.icon, 'button-state state-' + this.stateName.replace(/(^\s*|\s*$)/g,''));
+  this.icon.innerHTML = buildIcon(template.icon);
+  this.onClick = L.Util.bind(template.onClick?template.onClick:function(){}, easyButton);
+}
+
+function buildIcon(ambiguousIconString) {
+
+  var tmpIcon;
+
+  // does this look like html? (i.e. not a class)
+  if( ambiguousIconString.match(/[&;=<>"']/) ){
+
+    // if so, the user should have put in html
+    // so move forward as such
+    tmpIcon = ambiguousIconString;
+
+  // then it wasn't html, so
+  // it's a class list, figure out what kind
+  } else {
+      ambiguousIconString = ambiguousIconString.replace(/(^\s*|\s*$)/g,'');
+      tmpIcon = L.DomUtil.create('span', '');
+
+      if( ambiguousIconString.indexOf('fa-') === 0 ){
+        L.DomUtil.addClass(tmpIcon, 'fa '  + ambiguousIconString)
+      } else if ( ambiguousIconString.indexOf('glyphicon-') === 0 ) {
+        L.DomUtil.addClass(tmpIcon, 'glyphicon ' + ambiguousIconString)
+      } else {
+        L.DomUtil.addClass(tmpIcon, /*rollwithit*/ ambiguousIconString)
+      }
+
+      // make this a string so that it's easy to set innerHTML below
+      tmpIcon = tmpIcon.outerHTML;
+  }
+
+  return tmpIcon;
+}
+
+})();
+
+/*
+ * L.Control.Loading is a control that shows a loading indicator when tiles are
+ * loading or when map-related AJAX requests are taking place.
+ */
+
+(function () {
+
+    var console = window.console || {
+        error: function () {},
+        warn: function () {}
+    };
+
+    function defineLeafletLoading(L) {
+        L.Control.Loading = L.Control.extend({
+            options: {
+                delayIndicator: null,
+                position: 'topleft',
+                separate: false,
+                zoomControl: null,
+                spinjs: false,
+                spin: { 
+                    lines: 7, 
+                    length: 3, 
+                    width: 3, 
+                    radius: 5, 
+                    rotate: 13, 
+                    top: "83%"
+                }
+            },
+
+            initialize: function(options) {
+                L.setOptions(this, options);
+                this._dataLoaders = {};
+
+                // Try to set the zoom control this control is attached to from the 
+                // options
+                if (this.options.zoomControl !== null) {
+                    this.zoomControl = this.options.zoomControl;
+                }
+            },
+
+            onAdd: function(map) {
+                if (this.options.spinjs && (typeof Spinner !== 'function')) {
+                    return console.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");
+                }
+                this._addLayerListeners(map);
+                this._addMapListeners(map);
+
+                // Try to set the zoom control this control is attached to from the map
+                // the control is being added to
+                if (!this.options.separate && !this.zoomControl) {
+                    if (map.zoomControl) {
+                        this.zoomControl = map.zoomControl;
+                    } else if (map.zoomsliderControl) {
+                        this.zoomControl = map.zoomsliderControl;
+                    }
+                }
+
+                // Create the loading indicator
+                var classes = 'leaflet-control-loading';
+                var container;
+                if (this.zoomControl && !this.options.separate) {
+                    // If there is a zoom control, hook into the bottom of it
+                    container = this.zoomControl._container;
+                    // These classes are no longer used as of Leaflet 0.6
+                    classes += ' leaflet-bar-part-bottom leaflet-bar-part last';
+
+                    // Loading control will be added to the zoom control. So the visible last element is not the
+                    // last dom element anymore. So add the part-bottom class.
+                    L.DomUtil.addClass(this._getLastControlButton(), 'leaflet-bar-part-bottom');
+                }
+                else {
+                    // Otherwise, create a container for the indicator
+                    container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-control-layer-container leaflet-bar');
+                }
+                this._indicatorContainer = container;
+                this._indicator = L.DomUtil.create('a', classes, container);
+                if (this.options.spinjs) {
+                    this._spinner = new Spinner(this.options.spin).spin();
+                    this._indicator.appendChild(this._spinner.el);
+                }
+                return container;
+            },
+
+            onRemove: function(map) {
+                this._removeLayerListeners(map);
+                this._removeMapListeners(map);
+            },
+
+            removeFrom: function (map) {
+                if (this.zoomControl && !this.options.separate) {
+                    // Override Control.removeFrom() to avoid clobbering the entire
+                    // _container, which is the same as zoomControl's
+                    this._container.removeChild(this._indicator);
+                    this._map = null;
+                    this.onRemove(map);
+                    return this;
+                }
+                else {
+                    // If this control is separate from the zoomControl, call the
+                    // parent method so we don't leave behind an empty container
+                    return L.Control.prototype.removeFrom.call(this, map);
+                }
+            },
+
+            addLoader: function(id) {
+                this._dataLoaders[id] = true;
+                if (this.options.delayIndicator && !this.delayIndicatorTimeout) {
+                    // If we are delaying showing the indicator and we're not
+                    // already waiting for that delay, set up a timeout.
+                    var that = this;
+                    this.delayIndicatorTimeout = setTimeout(function () {
+                        that.updateIndicator();
+                        that.delayIndicatorTimeout = null;
+                    }, this.options.delayIndicator);
+                }
+                else {
+                    // Otherwise show the indicator immediately
+                    this.updateIndicator();
+                }
+            },
+
+            removeLoader: function(id) {
+                delete this._dataLoaders[id];
+                this.updateIndicator();
+
+                // If removing this loader means we're in no danger of loading,
+                // clear the timeout. This prevents old delays from instantly 
+                // triggering the indicator.
+                if (this.options.delayIndicator && this.delayIndicatorTimeout && !this.isLoading()) {
+                    clearTimeout(this.delayIndicatorTimeout);
+                    this.delayIndicatorTimeout = null;
+                }
+            },
+
+            updateIndicator: function() {
+                if (this.isLoading()) {
+                    this._showIndicator();
+                }
+                else {
+                    this._hideIndicator();
+                }
+            },
+
+            isLoading: function() {
+                return this._countLoaders() > 0;
+            },
+
+            _countLoaders: function() {
+                var size = 0, key;
+                for (key in this._dataLoaders) {
+                    if (this._dataLoaders.hasOwnProperty(key)) size++;
+                }
+                return size;
+            },
+
+            _showIndicator: function() {
+                // Show loading indicator
+                L.DomUtil.addClass(this._indicator, 'is-loading');
+                L.DomUtil.addClass(this._indicatorContainer, 'is-loading');
+
+                // If zoomControl exists, make the zoom-out button not last
+                if (!this.options.separate) {
+                    if (this.zoomControl instanceof L.Control.Zoom) {
+                        L.DomUtil.removeClass(this._getLastControlButton(), 'leaflet-bar-part-bottom');
+                    }
+                    else if (typeof L.Control.Zoomslider === 'function' && this.zoomControl instanceof L.Control.Zoomslider) {
+                        L.DomUtil.removeClass(this.zoomControl._ui.zoomOut, 'leaflet-bar-part-bottom');
+                    }
+                }
+            },
+
+            _hideIndicator: function() {
+                // Hide loading indicator
+                L.DomUtil.removeClass(this._indicator, 'is-loading');
+                L.DomUtil.removeClass(this._indicatorContainer, 'is-loading');
+
+                // If zoomControl exists, make the zoom-out button last
+                if (!this.options.separate) {
+                    if (this.zoomControl instanceof L.Control.Zoom) {
+                        L.DomUtil.addClass(this._getLastControlButton(), 'leaflet-bar-part-bottom');
+                    }
+                    else if (typeof L.Control.Zoomslider === 'function' && this.zoomControl instanceof L.Control.Zoomslider) {
+                        L.DomUtil.addClass(this.zoomControl._ui.zoomOut, 'leaflet-bar-part-bottom');
+                    }
+                }
+            },
+
+            _getLastControlButton: function() {
+                var container = this.zoomControl._container,
+                    index = container.children.length - 1;
+
+                // Find the last visible control button that is not our loading
+                // indicator
+                while (index > 0) {
+                    var button = container.children[index];
+                    if (!(this._indicator === button || button.offsetWidth === 0 || button.offsetHeight === 0)) {
+                        break;
+                    }
+                    index--;
+                }
+
+                return container.children[index];
+            },
+
+            _handleLoading: function(e) {
+                this.addLoader(this.getEventId(e));
+            },
+
+            _handleBaseLayerChange: function (e) {
+                var that = this;
+
+                // Check for a target 'layer' that contains multiple layers, such as
+                // L.LayerGroup. This will happen if you have an L.LayerGroup in an
+                // L.Control.Layers.
+                if (e.layer && e.layer.eachLayer && typeof e.layer.eachLayer === 'function') {
+                    e.layer.eachLayer(function (layer) {
+                        that._handleBaseLayerChange({ layer: layer });
+                    });
+                }
+                else {
+                    // If we're changing to a canvas layer, don't handle loading
+                    // as canvas layers will not fire load events.
+                    if (!(L.TileLayer.Canvas && e.layer instanceof L.TileLayer.Canvas)) {
+                        that._handleLoading(e);
+                    }
+                }
+            },
+
+            _handleLoad: function(e) {
+                this.removeLoader(this.getEventId(e));
+            },
+
+            getEventId: function(e) {
+                if (e.id) {
+                    return e.id;
+                }
+                else if (e.layer) {
+                    return e.layer._leaflet_id;
+                }
+                return e.target._leaflet_id;
+            },
+
+            _layerAdd: function(e) {
+                if (!e.layer || !e.layer.on) return
+                try {
+                    e.layer.on({
+                        loading: this._handleLoading,
+                        load: this._handleLoad
+                    }, this);
+                }
+                catch (exception) {
+                    console.warn('L.Control.Loading: Tried and failed to add ' +
+                                 ' event handlers to layer', e.layer);
+                    console.warn('L.Control.Loading: Full details', exception);
+                }
+            },
+
+            _layerRemove: function(e) {
+                if (!e.layer || !e.layer.off) return;
+                try {
+                    e.layer.off({
+                        loading: this._handleLoading,
+                        load: this._handleLoad
+                    }, this);
+                }
+                catch (exception) {
+                    console.warn('L.Control.Loading: Tried and failed to remove ' +
+                                 'event handlers from layer', e.layer);
+                    console.warn('L.Control.Loading: Full details', exception);
+                }
+            },
+
+            _addLayerListeners: function(map) {
+                // Add listeners for begin and end of load to any layers already on the 
+                // map
+                map.eachLayer(function(layer) {
+                    if (!layer.on) return;
+                    layer.on({
+                        loading: this._handleLoading,
+                        load: this._handleLoad
+                    }, this);
+                }, this);
+
+                // When a layer is added to the map, add listeners for begin and end
+                // of load
+                map.on('layeradd', this._layerAdd, this);
+                map.on('layerremove', this._layerRemove, this);
+            },
+
+            _removeLayerListeners: function(map) {
+                // Remove listeners for begin and end of load from all layers
+                map.eachLayer(function(layer) {
+                    if (!layer.off) return;
+                    layer.off({
+                        loading: this._handleLoading,
+                        load: this._handleLoad
+                    }, this);
+                }, this);
+
+                // Remove layeradd/layerremove listener from map
+                map.off('layeradd', this._layerAdd, this);
+                map.off('layerremove', this._layerRemove, this);
+            },
+
+            _addMapListeners: function(map) {
+                // Add listeners to the map for (custom) dataloading and dataload
+                // events, eg, for AJAX calls that affect the map but will not be
+                // reflected in the above layer events.
+                map.on({
+                    baselayerchange: this._handleBaseLayerChange,
+                    dataloading: this._handleLoading,
+                    dataload: this._handleLoad,
+                    layerremove: this._handleLoad
+                }, this);
+            },
+
+            _removeMapListeners: function(map) {
+                map.off({
+                    baselayerchange: this._handleBaseLayerChange,
+                    dataloading: this._handleLoading,
+                    dataload: this._handleLoad,
+                    layerremove: this._handleLoad
+                }, this);
+            }
+        });
+
+        L.Map.addInitHook(function () {
+            if (this.options.loadingControl) {
+                this.loadingControl = new L.Control.Loading();
+                this.addControl(this.loadingControl);
+            }
+        });
+
+        L.Control.loading = function(options) {
+            return new L.Control.Loading(options);
+        };
+    }
+
+    if (typeof define === 'function' && define.amd) {
+        // Try to add leaflet.loading to Leaflet using AMD
+        define(['leaflet'], function (L) {
+            defineLeafletLoading(L);
+        });
+    }
+    else {
+        // Else use the global L
+        defineLeafletLoading(L);
+    }
+
+})();
+
+/*
+ Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
+ https://github.com/Leaflet/Leaflet.markercluster
+ (c) 2012-2013, Dave Leaver, smartrak
+*/
+!function(t,e,i){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[];var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this;if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this._topClusterLevel._recalculateBounds();var n=t,s=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=s;)n=n.__parent;return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.removeLayers(e)}return t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this._topClusterLevel._recalculateBounds(),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push(t),this):(this._nonPointGroup.removeLayer(t),this)},addLayers:function(t){var e,i,n,s,r=this._featureGroup,o=this._nonPointGroup,a=this.options.chunkedLoading,h=this.options.chunkInterval,u=this.options.chunkProgress;if(this._map){var _=0,l=(new Date).getTime(),d=L.bind(function(){for(var e=(new Date).getTime();_<t.length;_++){if(a&&0===_%200){var i=(new Date).getTime()-e;if(i>h)break}if(s=t[_],s.getLatLng){if(!this.hasLayer(s)&&(this._addLayer(s,this._maxZoom),s.__parent&&2===s.__parent.getChildCount())){var n=s.__parent.getAllChildMarkers(),c=n[0]===s?n[1]:n[0];r.removeLayer(c)}}else o.addLayer(s)}u&&u(_,t.length,(new Date).getTime()-l),_===t.length?(this._topClusterLevel._recalculateBounds(),this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else{for(e=[],i=0,n=t.length;n>i;i++)s=t[i],s.getLatLng?this.hasLayer(s)||e.push(s):o.addLayer(s);this._needsClustering=this._needsClustering.concat(e)}return this},removeLayers:function(t){var e,i,n,s=this._featureGroup,r=this._nonPointGroup;if(!this._map){for(e=0,i=t.length;i>e;e++)n=t[e],this._arraySplice(this._needsClustering,n),r.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push(n);return this}if(this._unspiderfy)for(this._unspiderfy(),e=0,i=t.length;i>e;e++)n=t[e],this._unspiderfyLayer(n);for(e=0,i=t.length;i>e;e++)n=t[e],n.__parent?(this._removeLayer(n,!0,!0),s.hasLayer(n)&&(s.removeLayer(n),n.clusterShow&&n.clusterShow())):r.removeLayer(n);return this._topClusterLevel._recalculateBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),s.eachLayer(function(t){t instanceof L.MarkerCluster&&t._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i]);this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e]===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};if(t._icon&&this._map.getBounds().contains(t.getLatLng()))e();else if(t.__parent._zoom<this._map.getZoom())this._map.on("moveend",i,this),this._map.panTo(t.getLatLng());else{var n=function(){this._map.off("movestart",n,this),n=null};this._map.on("movestart",n,this),this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds(),n&&i.call(this)}},onAdd:function(t){this._map=t;var e,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.onAdd(t),this._nonPointGroup.onAdd(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;i>e;e++)n=this._needsRemoving[e],this._removeLayer(n,!0);this._needsRemoving=[],this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.onRemove(t),this._nonPointGroup.onRemove(t),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered;e>=0&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,r=this._featureGroup,o=this._map;e&&this._removeFromGridUnclustered(t,this._maxZoom);var a,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<0));)e&&h._childCount<=1?(a=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,o.project(h._cLatLng,h._zoom)),s[h._zoom].addObject(a,o.project(a.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(a),a.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(a))):i&&h._icon||h._updateIcon(),h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},_propagateEvent:function(t){if(t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;t.type="cluster"+t.type}this.fire(t.type,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount?this.options.spiderfyOnMaxZoom&&e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius,i=e;"function"!=typeof e&&(i=function(){return e}),this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var n=t;n>=0;n--)this._gridClusters[n]=new L.DistanceGrid(i(n)),this._gridUnclustered[n]=new L.DistanceGrid(i(n));this._topClusterLevel=new this._markerCluster(this,-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,r=this._gridUnclustered;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t);e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=s[e].getNearObject(i);if(o)return o._addChild(t),t.__parent=o,void 0;if(o=r[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var h=new this._markerCluster(this,e,o,t);s[e].addObject(h,this._map.project(h._cLatLng,e)),o.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>a._zoom;n--)u=new this._markerCluster(this,n,u),s[n].addObject(u,this._map.project(o.getLatLng(),n));return a._addChild(u),this._removeFromGridUnclustered(o,e),void 0}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){this._processQueue(),this._zoom<this._map._zoom&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,this._map._zoom)):this._zoom>this._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return e!==i&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}}),L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),s=this._featureGroup;this._topClusterLevel._recursively(n,t,0,function(r){var o,a=r._latlng,h=r._markers;for(n.contains(a)||(a=null),r._isSingleParent()&&t+1===e?(s.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,e,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||s.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),s.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._enqueue(function(){this._topClusterLevel._recursively(n,t,0,function(t){s.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];r.setLatLng(r.getLatLng()),r.clusterShow&&r.clusterShow()}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var t,e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),s=this._zoom+1,r=i.getZoom();e.length>0&&n>s;){s++;var o=[];for(t=0;t<e.length;t++)o=o.concat(e[t]._childClusters);e=o}n>s?this._group._map.setView(this._latlng,s):r>=n?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,s=this._markers,r=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),t=0;t<s.length;t++)i=s[t]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(t=0;t<r.length;t++)e=r[t],e._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,o+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,0,i-1,function(t){var i,n,s=t._markers;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,s=t._childClusters;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.clusterShow(),n._recursivelyRemoveChildrenFromMap(t,e)):n.clusterHide(),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var s=n._markers.length-1;s>=0;s--){var r=n._markers[s];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,s;this._recursively(t,-1,e-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())})},_recursively:function(t,e,i,n,s){var r,o,a=this._childClusters,h=this._zoom;if(e>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s);else if(n&&n(this),s&&this._zoom===i&&s(this),i>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var t=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,t}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,r=s[n]=s[n]||{},o=r[i]=r[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},h=a[s]=a[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;n>i;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[s],!0},eachObject:function(t,e){var i,n,s,r,o,a,h,u=this._grid;for(i in u){o=u[i];for(n in o)for(a=o[n],s=0,r=a.length;r>s;s++)h=t.call(e,a[s]),h&&(s--,r--)}},getNearObject:function(t){var e,i,n,s,r,o,a,h,u=this._getCoord(t.x),_=this._getCoord(t.y),l=this._objectPoint,d=this._sqCellSize,c=null;for(e=_-1;_+1>=e;e++)if(s=this._grid[e])for(i=u-1;u+1>=i;i++)if(r=s[i])for(n=0,o=r.length;o>n;n++)a=r[n],h=this._sqDist(l[L.Util.stamp(a)],t),d>h&&(d=h,c=a);return c},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,r=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],s=this.getDistant(n,t),s>0&&(a.push(n),s>r&&(r=s,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,s=!1,r=!1,o=null,a=null,h=null,u=null,_=null,l=null;for(e=t.length-1;e>=0;e--){var d=t[e];(i===!1||d.lat>i)&&(o=d,i=d.lat),(n===!1||d.lat<n)&&(a=d,n=d.lat),(s===!1||d.lng>s)&&(h=d,s=d.lng),(r===!1||d.lng<r)&&(u=d,r=d.lng)}n!==i?(l=a,_=o):(l=u,_=h);var c=[].concat(this.buildConvexHull([l,_],t),this.buildConvexHull([_,l],t));return c}}}(),L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,s=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,s):(s.y+=10,t=this._generatePointsCircle(e.length,s)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=s/this._2PI,o=this._2PI/t,a=[];for(a.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,s=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=t,i=t-1;i>=0;i--)a+=r/s+5e-4*i,h[i]=new L.Point(e.x+s*Math.cos(a),e.y+s*Math.sin(a))._round(),s+=o/a;return h},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,s,r,o=this._group,a=o._map,h=o._featureGroup,u=this._group.options.spiderLegPolylineOptions;for(i=0;i<t.length;i++)r=a.layerPointToLatLng(e[i]),n=t[i],s=new L.Polyline([this._latlng,r],u),a.addLayer(s),n._spiderLeg=s,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),o.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var n,s,r,o,a,h,u=this,_=this._group,l=_._map,d=_._featureGroup,c=this._latlng,p=l.latLngToLayerPoint(c),f=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),g=m.opacity;for(g===i&&(g=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=g,n=0;n<t.length;n++)s=t[n],h=l.layerPointToLatLng(e[n]),r=new L.Polyline([c,h],m),l.addLayer(r),s._spiderLeg=r,f&&(o=r._path,a=o.getTotalLength()+.1,o.style.strokeDasharray=a,o.style.strokeDashoffset=a),s.setZIndexOffset&&s.setZIndexOffset(1e6),s.clusterHide&&s.clusterHide(),d.addLayer(s),s._setPos&&s._setPos(p);for(_._forceLayout(),_._animationStart(),n=t.length-1;n>=0;n--)h=l.layerPointToLatLng(e[n]),s=t[n],s._preSpiderfyLatlng=s._latlng,s.setLatLng(h),s.clusterShow&&s.clusterShow(),f&&(r=s._spiderLeg,o=r._path,o.style.strokeDashoffset=0,r.setStyle({opacity:g}));this.setOpacity(.3),setTimeout(function(){_._animationEnd(),_.fire("spiderfied",{cluster:u,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,s,r,o,a=this,h=this._group,u=h._map,_=h._featureGroup,l=t?u._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):u.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(),c=L.Path.SVG;for(h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)e=d[i],e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,o=!0,e._setPos&&(e._setPos(l),o=!1),e.clusterHide&&(e.clusterHide(),o=!1),o&&_.removeLayer(e),c&&(n=e._spiderLeg,s=n._path,r=s.getTotalLength()+.1,s.style.strokeDashoffset=r,n.setStyle({opacity:0})));setTimeout(function(){var t=0;for(i=d.length-1;i>=0;i--)e=d[i],e._spiderLeg&&t++;for(i=d.length-1;i>=0;i--)e=d[i],e._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&_.removeLayer(e),u.removeLayer(e._spiderLeg),delete e._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}})}(window,document);
+/**
+ * Leaflet.FeatureGroup.SubGroup creates a Feature Group that adds its child
+ * layers into a parent group when added to a map (e.g. through L.Control.Layers).
+ * (c) 2015-2016 Boris Seang
+ * BSD 2-Clause "Simplified" License
+ */
+
+(function (root, factory) {
+    if (typeof define === "function" && define.amd) {
+        define(["leaflet"], factory);
+    } else if (typeof module === "object" && module.exports) {
+        factory(require("leaflet"));
+    } else {
+        factory(root.L);
+    }
+}(this, function (L) {
+
+    L.FeatureGroup.SubGroup = L.FeatureGroup.extend({
+
+        statics: {
+            version: '0.1.2'
+        },
+
+        /**
+         * Instantiates a SubGroup.
+         * @param parentGroup (L.LayerGroup) (optional)
+         * @param layersArray (L.Layer[]) (optional)
+         */
+        initialize: function (parentGroup, layersArray) {
+            L.FeatureGroup.prototype.initialize.call(this, layersArray);
+
+            this.setParentGroup(parentGroup);
+        },
+
+        /**
+         * Changes the parent group into which child markers are added to /
+         * removed from.
+         * @param parentGroup (L.LayerGroup)
+         * @returns {SubGroup} this
+         */
+        setParentGroup: function (parentGroup) {
+            var pgInstanceOfLG = parentGroup instanceof L.LayerGroup;
+
+            this._parentGroup = parentGroup;
+
+            // onAdd
+            this.onAdd =
+                pgInstanceOfLG ?
+                    (
+                        typeof parentGroup.addLayers === "function" ?
+                            this._onAddToGroupBatch :
+                            this._onAddToGroup
+                    ) :
+                    this._onAddToMap;
+
+            // onRemove
+            this.onRemove =
+                pgInstanceOfLG ?
+                    (
+                        typeof parentGroup.removeLayers === "function" ?
+                            this._onRemoveFromGroupBatch :
+                            this._onRemoveFromGroup
+                    ) :
+                    this._onRemoveFromMap;
+
+            // addLayer
+            this.addLayer = pgInstanceOfLG ?
+                this._addLayerToGroup :
+                this._addLayerToMap;
+
+            // removeLayer
+            this.removeLayer = pgInstanceOfLG ?
+                this._removeLayerFromGroup :
+                this._removeLayerFromMap;
+
+            return this;
+        },
+
+        /**
+         * Removes the current sub-group from map before changing the parent
+         * group. Re-adds the sub-group to map if it was before changing.
+         * @param parentGroup (L.LayerGroup)
+         * @returns {SubGroup} this
+         */
+        setParentGroupSafe: function (parentGroup) {
+            var map = this._map;
+
+            if (map) {
+                map.removeLayer(this);
+            }
+
+            this.setParentGroup(parentGroup);
+
+            if (map) {
+                map.addLayer(this);
+            }
+
+            return this;
+        },
+
+        /**
+         * Returns the current parent group.
+         * @returns {*}
+         */
+        getParentGroup: function () {
+            return this._parentGroup;
+        },
+
+
+        // For parent groups with batch methods (addLayers and removeLayers)
+        // like MarkerCluster.
+        _onAddToGroupBatch: function (map) {
+            var layersArray = this.getLayers();
+
+            this._map = map;
+            this._parentGroup.addLayers(layersArray);
+        },
+
+        _onRemoveFromGroupBatch: function () {
+            var layersArray = this.getLayers();
+
+            this._parentGroup.removeLayers(layersArray);
+            this._map = null;
+        },
+
+
+        // For other parent layer groups.
+        _onAddToGroup: function (map) {
+            var parentGroup = this._parentGroup;
+
+            this._map = map;
+            this.eachLayer(parentGroup.addLayer, parentGroup);
+        },
+
+        _onRemoveFromGroup: function () {
+            var parentGroup = this._parentGroup;
+
+            this.eachLayer(parentGroup.removeLayer, parentGroup);
+            this._map = null;
+        },
+
+
+        // Defaults to standard FeatureGroup behaviour when parent group is not
+        // specified or is not a type of LayerGroup.
+        _onAddToMap: L.FeatureGroup.prototype.onAdd,
+        _onRemoveFromMap: L.FeatureGroup.prototype.onRemove,
+
+
+        _addLayerToGroup: function (layer) {
+            if (this.hasLayer(layer)) {
+                return this;
+            }
+
+            if (layer.on) {
+                layer.on(L.FeatureGroup.EVENTS, this._propagateEvent, this);
+            }
+
+            var id = this.getLayerId(layer);
+
+            this._layers[id] = layer;
+
+            if (this._map) {
+                // Add to parent group instead of directly to map.
+                this._parentGroup.addLayer(layer);
+            }
+
+            if (this._popupContent && layer.bindPopup) {
+                layer.bindPopup(this._popupContent, this._popupOptions);
+            }
+
+            return this.fire('layeradd', {layer: layer});
+        },
+
+        _removeLayerFromGroup: function (layer) {
+            if (!this.hasLayer(layer)) {
+                return this;
+            }
+            if (layer in this._layers) {
+                layer = this._layers[layer];
+            }
+
+            if (layer.off) {
+                layer.off(L.FeatureGroup.EVENTS, this._propagateEvent, this);
+            }
+
+            var id = layer in this._layers ? layer : this.getLayerId(layer);
+
+            if (this._map && this._layers[id]) {
+                // Remove from parent group instead of directly from map.
+                this._parentGroup.removeLayer(id);
+            }
+
+            delete this._layers[id];
+
+            if (this._popupContent) {
+                this.invoke('unbindPopup');
+            }
+
+            return this.fire('layerremove', {layer: layer});
+        },
+
+        // Defaults to standard FeatureGroup behaviour when parent group is not
+        // specified or is not a type of LayerGroup.
+        _addLayerToMap: L.FeatureGroup.prototype.addLayer,
+        _removeLayerFromMap: L.FeatureGroup.prototype.removeLayer
+
+    });
+
+
+
+    // Supply with a factory for consistency with Leaflet.
+    L.featureGroup.subGroup = function (parentGroup, options) {
+        return new L.FeatureGroup.SubGroup(parentGroup, options);
+    };
+
+}));
diff --git a/assets/www/manifest.json b/assets/www/manifest.json
index 014937391e772e286abdaefdb7b0e61ceda71c9d..03c18a127c6351e5e8db6d5e244b72d31c4a431c 100644
--- a/assets/www/manifest.json
+++ b/assets/www/manifest.json
@@ -2,7 +2,7 @@
   "short_name": "Cesium",
   "name": "Cesium",
   "manifest_version": 1,
-  "version": "1.6.0",
+  "version": "1.6.1",
   "default_locale": "fr",
   "description": "Manage your Duniter Wallet on a libre currency, like Äž1",
   "icons": [
diff --git a/res/xml/config.xml b/res/xml/config.xml
index b7b332fefb47a9bddf062001543654818be6eaef..9352b0147de93814736fb27a57e1fc0d9e27360a 100644
--- a/res/xml/config.xml
+++ b/res/xml/config.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget android-versionCode="106000" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-versionCode="106011" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <feature name="Clipboard">
         <param name="android-package" value="com.verso.cordova.clipboard.Clipboard" />
     </feature>
@@ -108,7 +108,7 @@
     <preference name="KeyboardResizeMode" value="ionic" />
     <preference name="xwalkVersion" value="19" />
     <preference name="xwalkMultipleApk" value="false" />
-    <preference name="android-minSdkVersion" value="19" />
+    <preference name="android-minSdkVersion" value="16" />
     <preference name="android-targetSdkVersion" value="28" />
     <preference name="StatusBarOverlaysWebView" value="false" />
     <preference name="StatusBarBackgroundColor" value="#000" />