From 2ef57a706063fe08ded8f7662fb892ad96138d12 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 20 Feb 2016 18:14:44 +0100 Subject: [PATCH] hot fix masonry by using 100ms timeout --- js/build/app.min.js | 4 ++-- js/directive/NewsRefreshMasonry.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/build/app.min.js b/js/build/app.min.js index 0af29b1f2..39b32ad89 100644 --- a/js/build/app.min.js +++ b/js/build/app.min.js @@ -1,3 +1,3 @@ var app=angular.module("News",["ngRoute","ngSanitize","ngAnimate"]);app.config(["$routeProvider","$provide","$httpProvider",function(e,n,r){"use strict";var i={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};n.constant("REFRESH_RATE",60),n.constant("ITEM_BATCH_SIZE",40),n.constant("ITEM_AUTO_PAGE_SIZE",20),n.constant("BASE_URL",OC.generateUrl("/apps/news")),n.constant("FEED_TYPE",i),n.constant("MARK_READ_TIMEOUT",.5),n.constant("SCROLL_TIMEOUT",.1),n.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(e,t,n){return{request:function(r){var i=n.location.href.split(n.location.pathname)[0];return(0===r.url.indexOf(t)||0===r.url.indexOf(i))&&(r.headers.requesttoken=oc_requesttoken),r||e.when(r)}}}]);var o={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};n.factory("ConnectionErrorInterceptor",["$q","$timeout",function(e,t){var n;return{responseError:function(r){return r.status in o&&(n&&t.cancel(n),OC.Notification.hide(),OC.Notification.showHtml(o[r.status]),n=t(function(){OC.Notification.hide()},5e3)),e.reject(r)}}}]),r.interceptors.push("CSRFInterceptor"),r.interceptors.push("ConnectionErrorInterceptor");var s=function(e){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(t,n,r,i,o,s,a,u,d){var c=u.get("showAll"),l=u.get("oldestFirst"),f=i.search().search||"",h=r.defer();if(null===c||null===l)h.resolve({});else{var p={type:e,limit:s,showAll:c,oldestFirst:l,search:f};if(void 0!==n.current&&void 0!==n.current.params&&void 0!==n.current.params.id&&(p.id=n.current.params.id),e===a.FEED){var g=d.getById(p.id);void 0===g||2===g.ordering?p.oldestFirst=!1:1===g.ordering&&(p.oldestFirst=!0)}t({url:o+"/items",method:"GET",params:p}).success(function(e){h.resolve(e)})}return h.promise}]}},a=function(){return{sites:["$http","$q","BASE_URL","$location","Publisher","SettingsResource",function(e,t,n,r,i,o){var s=t.defer(),a=r.search().lang;return a||(a=o.get("language")),e.get(n+"/settings").then(function(t){i.publishAll(t);var n=o.get("exploreUrl").replace(/\/+$/,""),r=n+"/feeds."+a+".json",s=n+"/feeds.en.json";return e.get(r)["catch"](function(){return e.get(s)})}).then(function(e){s.resolve(e.data)})["catch"](function(){s.reject()}),s.promise}]}};e.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:s(i.SUBSCRIPTIONS),type:i.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:s(i.STARRED),type:i.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:s(i.FEED),type:i.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:s(i.FOLDER),type:i.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:a(),type:i.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),app.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(e,t,n,r,i,o,s,a,u,d,c,l,f,h,p){"use strict";s.setLoading("global",!0),l.subscribe(a).toChannels(["items","newestItemId","starred"]),l.subscribe(d).toChannels(["folders"]),l.subscribe(u).toChannels(["feeds"]),l.subscribe(c).toChannels(["settings"]);var g=r.defer();n.get(f+"/settings").success(function(e){l.publishAll(e),g.resolve()});var v=r.defer(),m=t.path();n.get(f+"/feeds/active").success(function(e){var n;switch(e.activeFeed.type){case h.FEED:n="/items/feeds/"+e.activeFeed.id;break;case h.FOLDER:n="/items/folders/"+e.activeFeed.id;break;case h.STARRED:n="/items/starred";break;case h.EXPLORE:n="/explore";break;default:n="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(m)||t.path(n),v.resolve()});var y,E=r.defer();n.get(f+"/feeds").success(function(e){y=e,E.resolve()});var C,F=r.defer();n.get(f+"/folders").success(function(e){C=e,F.resolve()}),r.all([E.promise,F.promise]).then(function(){l.publishAll(y),l.publishAll(C),0===y.feeds.length&&0===C.folders.length&&t.path("/explore")}),r.all([g.promise,v.promise,E.promise,F.promise]).then(function(){o.reload(),s.setLoading("global",!1)}),i(function(){n.get(f+"/feeds").success(function(e){l.publishAll(e)}),n.get(f+"/folders").success(function(e){l.publishAll(e)})},1e3*p),e.$on("$routeChangeStart",function(){s.setLoading("content",!0)}),e.$on("$routeChangeSuccess",function(){s.setLoading("content",!1)}),e.$on("$routeChangeError",function(){t.path("/items")})}]),app.controller("AppController",["Loading","FeedResource","FolderResource",function(e,t,n){"use strict";this.loading=e,this.isFirstRun=function(){return 0===t.size()&&0===n.size()},this.play=function(e){this.playingItem=e}}]),app.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","$location","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(e,t,n,r,i,o,s,a,u,d,c){"use strict";n.clear(),e.publishAll(i),this.isAutoPagingEnabled=!0,n.size()>=d?this.isNothingMoreToAutoPage=!1:this.isNothingMoreToAutoPage=!0,this.getItems=function(){return n.getAll()},this.toggleStar=function(e){n.toggleStar(e)},this.toggleItem=function(e){this.isCompactView()&&(e.show=!e.show)},this.isShowAll=function(){return r.get("showAll")},this.markRead=function(e){var r=n.get(e);r.keepUnread||r.unread!==!0||(n.markItemRead(e),t.markItemOfFeedRead(r.feedId))},this.getFeed=function(e){return t.getById(e)},this.toggleKeepUnread=function(e){var r=n.get(e);r.unread||(t.markItemOfFeedUnread(r.feedId),n.markItemRead(e,!1)),r.keepUnread=!r.keepUnread};var l=this,f=function(){var e=r.get("oldestFirst");if(l.isFeed()){var n=t.getById(s.id);n&&1===n.ordering?e=!0:n&&2===n.ordering&&(e=!1)}return e};this.orderBy=function(){return f()?"id":"-id"},this.isCompactView=function(){return r.get("compact")},this.isCompactExpand=function(){return r.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!r.get("preventReadOnScroll")},this.scrollRead=function(e){var r=[],i=[];e.forEach(function(e){var t=n.get(e);t.keepUnread||(r.push(e),i.push(t.feedId))}),r.length>0&&(t.markItemsOfFeedsRead(i),n.markItemsRead(r))},this.isFeed=function(){return o.current.$$route.type===u.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var t=o.current.$$route.type,i=s.id,u=f(),l=r.get("showAll"),h=this,p=a.search().search;c.setLoading("autopaging",!0),n.autoPage(t,i,u,l,p).success(function(t){e.publishAll(t),t.items.length>=d?h.isAutoPagingEnabled=!0:h.isNothingMoreToAutoPage=!0,h.isAutoPagingEnabled&&h.autoPageAgain&&h.autoPage()}).error(function(){h.isAutoPagingEnabled=!0})["finally"](function(){c.setLoading("autopaging",!1)})}},this.getRelativeDate=function(e){if(void 0!==e&&""!==e){var t=r.get("language"),n=moment.unix(e).locale(t).fromNow()+"";return n}return""},this.refresh=function(){o.reload()},this.getMediaType=function(e){return e&&0===e.indexOf("audio")?"audio":e&&0===e.indexOf("video")?"video":void 0}}]),app.controller("ExploreController",["sites","$rootScope","FeedResource","SettingsResource","$location",function(e,t,n,r,i){"use strict";this.sites=e,this.feeds=Object.keys(e).map(function(t){return[t,e[t]]}).reduce(function(e,t){var n=t[0],r=t[1];return r.forEach(function(e){e.category=n}),e.concat(r)},[]),this.feedExists=function(e){return void 0!==n.getByLocation(e)},this.subscribeTo=function(e){t.$broadcast("addFeed",e)},this.isCategoryShown=function(e){return e.filter(function(e){return void 0===n.getByLocation(e.feed)}).length>0},this.getSupportedLanguageCodes=function(){return r.getSupportedLanguageCodes()},this.getCurrentLanguageCode=function(){var e=i.search().lang;return e||(e=r.get("language")),e},this.showLanguage=function(e){i.url("/explore/?lang="+e)},this.selectedLanguageCode=this.getCurrentLanguageCode()}]),app.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(e,t,n,r,i,o,s,a,u,d){"use strict";this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var c=function(){return parseInt(e.current.params.id,10)};this.getLanguageCode=function(){return o.get("language")},this.getFeeds=function(){return n.getAll()},this.getFolders=function(){return r.getAll()},this.markFolderRead=function(e){n.markFolderRead(e),n.getByFolderId(e).forEach(function(e){i.markFeedRead(e.id)})},this.markFeedRead=function(e){i.markFeedRead(e),n.markFeedRead(e)},this.markRead=function(){i.markRead(),n.markRead()},this.isShowAll=function(){return o.get("showAll")},this.getFeedsOfFolder=function(e){return n.getByFolderId(e)},this.getUnreadCount=function(){return n.getUnreadCount()},this.isUnread=function(){return this.getUnreadCount()>0},this.getFeedUnreadCount=function(e){var t=n.getById(e);return void 0!==t?t.unreadCount:0},this.isFeedUnread=function(e){return this.getFeedUnreadCount(e)>0},this.getFolderUnreadCount=function(e){return n.getFolderUnreadCount(e)},this.isFolderUnread=function(e){return this.getFolderUnreadCount(e)>0},this.getStarredCount=function(){return i.getStarredCount()},this.isStarredUnread=function(){return this.getStarredCount()>0},this.toggleFolder=function(e){r.toggleOpen(e)},this.hasFeeds=function(e){return void 0!==n.getFolderUnreadCount(e)},this.subFeedActive=function(r){var i=e.current.$$route.type;if(i===t.FEED){var o=n.getById(c());if(void 0!==o&&o.folderId===r)return!0}return!1},this.isSubscriptionsActive=function(){return e.current&&e.current.$$route.type===t.SUBSCRIPTIONS},this.isStarredActive=function(){return e.current&&e.current.$$route.type===t.STARRED},this.isExploreActive=function(){return e.current&&e.current.$$route.type===t.EXPLORE},this.isFolderActive=function(n){return e.current&&e.current.$$route.type===t.FOLDER&&c()===n},this.isFeedActive=function(n){return e.current&&e.current.$$route.type===t.FEED&&c()===n},this.folderNameExists=function(e){return e=e||"",void 0!==r.get(e.trim())},this.feedUrlExists=function(e){return e=e||"",e=e.trim(),void 0!==n.get(e)||void 0!==n.get("http://"+e)},this.createFeed=function(e){var t=this;this.showNewFolder=!1,this.addingFeed=!0;var i=e.newFolder,o=e.existingFolder||{id:0};void 0===i||""===i?(o.getsFeed=!0,n.create(e.url,o.id,void 0).then(function(e){s.publishAll(e),u.path("/items/feeds/"+e.feeds[0].id+"/")})["finally"](function(){o.getsFeed=void 0,e.url="",t.addingFeed=!1})):r.create(i).then(function(n){s.publishAll(n),e.existingFolder=r.get(n.folders[0].name),e.newFolder=void 0,t.createFeed(e)})},this.createFolder=function(e){var t=this;this.addingFolder=!0,r.create(e.name).then(function(e){s.publishAll(e)})["finally"](function(){t.addingFolder=!1,e.name=""})},this.moveFeed=function(t,r){var i=!1,o=n.getById(t);o.folderId!==r&&((this.isFolderActive(o.folderId)||this.isFolderActive(r))&&(i=!0),n.move(t,r),i&&e.reload())},this.renameFeed=function(e){n.patch(e.id,{title:e.title}),e.editing=!1},this.renameFolder=function(e,t){e.renameError="",this.renamingFolder=!0;var n=this;e.name===t?(e.renameError="",e.editing=!1,this.renamingFolder=!1):r.rename(e.name,t).then(function(){e.renameError="",e.editing=!1},function(t){e.renameError=t})["finally"](function(){n.renamingFolder=!1})},this.reversiblyDeleteFeed=function(t){n.reversiblyDelete(t.id)["finally"](function(){e.reload()})},this.undoDeleteFeed=function(t){n.undoDelete(t.id)["finally"](function(){e.reload()})},this.deleteFeed=function(e){n["delete"](e.url)},this.reversiblyDeleteFolder=function(t){d.all(n.reversiblyDeleteFolder(t.id),r.reversiblyDelete(t.name))["finally"](function(){e.reload()})},this.undoDeleteFolder=function(t){d.all(n.undoDeleteFolder(t.id),r.undoDelete(t.name))["finally"](function(){e.reload()})},this.deleteFolder=function(e){n.deleteFolder(e.id),r["delete"](e.name)},this.setOrdering=function(t,r){n.patch(t.id,{ordering:r}),e.reload()},this.togglePinned=function(e){var t=n.getById(e);return t?n.patch(e,{pinned:!t.pinned}):void 0},this.setUpdateMode=function(e,t){return n.patch(e,{updateMode:t})},this.toggleFullText=function(t){a.$broadcast("$routeChangeStart"),n.toggleFullText(t.id)["finally"](function(){a.$broadcast("$routeChangeSuccess"),e.reload()})},this.search=function(e){""===e?u.search("search",null):u.search("search",e)};var l=this;a.$on("moveFeedToFolder",function(e,t){l.moveFeed(t.feedId,t.folderId)});var f=function(){var i;e.current&&(i=e.current.$$route.type);var o=0;if(i===t.FOLDER)o=c();else if(i===t.FEED){var s=n.getById(c());s&&(o=s.folderId)}var a;0!==o&&(a=r.getById(o)),l.feed.existingFolder=a};a.$on("$routeChangeSuccess",function(){f()})}]),app.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(e,t,n,r,i,o,s){"use strict";this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var a=function(t,r){n.set(t,r),["showAll","oldestFirst","compact"].indexOf(t)>=0&&e.reload()};this.toggleSetting=function(e){a(e,!this.getSetting(e))},this.getSetting=function(e){return n.get(e)},this.importOPML=function(e){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var t=i.parse(e),n=this,r=5;o.importFolders(t).then(function(e){return o.importFeedQueue(e,r)})["finally"](function(){n.isOPMLImporting=!1})}catch(s){console.error(s),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(e){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var t=JSON.parse(e),n=this;r.importArticles(t).success(function(e){s.publishAll(e)})["finally"](function(){n.isArticlesImporting=!1})}catch(i){console.error(i),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),app.filter("trustUrl",["$sce",function(e){"use strict";return function(t){return e.trustAsResourceUrl(t)}}]),app.filter("unreadCountFormatter",function(){"use strict";return function(e){return e>999?"999+":e}}),app.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(e,t,n,r){"use strict";var i=function(t,n,r){e.call(this,t,n,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=r};return i.prototype=Object.create(e.prototype),i.prototype.receive=function(t){e.prototype.receive.call(this,t),this.updateUnreadCache(),this.updateFolderCache()},i.prototype.clear=function(){e.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},i.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var e=this;this.values.forEach(function(t){t.unreadCount&&(e.unreadCount+=t.unreadCount),void 0!==t.folderId&&(e.folderUnreadCount[t.folderId]=e.folderUnreadCount[t.folderId]||0,e.folderUnreadCount[t.folderId]+=t.unreadCount)})},i.prototype.updateFolderCache=function(){this.folderIds={};var e=this;this.values.forEach(function(t){e.folderIds[t.folderId]=e.folderIds[t.folderId]||[],e.folderIds[t.folderId].push(t)})},i.prototype.add=function(t){e.prototype.add.call(this,t),void 0!==t.id&&(this.ids[t.id]=this.hashMap[t.url]),void 0!==t.location&&(this.locations[t.location]=this.hashMap[t.url])},i.prototype.markRead=function(){this.values.forEach(function(e){e.unreadCount=0}),this.updateUnreadCache()},i.prototype.markFeedRead=function(e){this.ids[e].unreadCount=0,this.updateUnreadCache()},i.prototype.markFolderRead=function(e){this.values.forEach(function(t){t.folderId===e&&(t.unreadCount=0)}),this.updateUnreadCache()},i.prototype.markItemOfFeedRead=function(e){this.ids[e].unreadCount-=1,this.updateUnreadCache()},i.prototype.markItemsOfFeedsRead=function(e){var t=this;e.forEach(function(e){t.ids[e].unreadCount-=1}),this.updateUnreadCache()},i.prototype.markItemOfFeedUnread=function(e){this.ids[e].unreadCount+=1,this.updateUnreadCache()},i.prototype.getUnreadCount=function(){return this.unreadCount},i.prototype.getFolderUnreadCount=function(e){return this.folderUnreadCount[e]},i.prototype.getByFolderId=function(e){return this.folderIds[e]||[]},i.prototype.getById=function(e){return this.ids[e]},i.prototype.getByLocation=function(e){return this.locations[e]},i.prototype.move=function(e,t){var n=this.getById(e);return n.folderId=t,this.updateFolderCache(),this.updateUnreadCache(),this.patch(e,{folderId:t})},i.prototype.create=function(e,t,n){e=e.trim(),e.startsWith("http")||(e="https://"+e),void 0!==n&&(n=n.trim());var r={url:e,folderId:t||0,title:n||e,unreadCount:0};this.add(r),this.updateFolderCache();var i=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:e,parentFolderId:t||0,title:n}}).success(function(e){i.resolve(e)}).error(function(e){r.faviconLink="",r.error=e.message,i.reject()}),i.promise},i.prototype.reversiblyDelete=function(e,t,n){var r=this.getById(e);return r&&n!==!0&&(r.deleted=!0),t!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+e)},i.prototype.reversiblyDeleteFolder=function(e){var t=this,n=[];this.getByFolderId(e).forEach(function(e){n.push(t.reversiblyDelete(e.id,!1,!0))}),this.updateUnreadCache();var r=this.$q.all(n);return r.promise},i.prototype["delete"]=function(t,n){var r=this.get(t);return void 0!==r&&r.id&&delete this.ids[r.id],void 0!==r&&r.location&&delete this.locations[r.location],e.prototype["delete"].call(this,t),n!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),r},i.prototype.deleteFolder=function(e){var t=this;this.getByFolderId(e).forEach(function(e){t["delete"](e.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},i.prototype.undoDelete=function(e,t){var n=this.getById(e);return n&&(n.deleted=!1),t!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+e+"/restore")},i.prototype.undoDeleteFolder=function(e){var t=this,n=[];this.getByFolderId(e).forEach(function(e){n.push(t.undoDelete(e.id,!1))}),this.updateUnreadCache();var r=this.$q.all(n);return r.promise},i.prototype.setOrdering=function(e,t){var n=this.getById(e);if(n){n.ordering=t;var r=this.BASE_URL+"/feeds/"+e;return this.http.patch(r,{ordering:t})}},i.prototype.setPinned=function(e,t){var n=this.getById(e);if(n){n.pinned=t;var r=this.BASE_URL+"/feeds/"+e;return this.http.patch(r,{pinned:t})}},i.prototype.patch=function(e,t){var n=this.getById(e);if(n){Object.keys(t).forEach(function(e){n[e]=t[e]});var r=this.BASE_URL+"/feeds/"+e;return this.http.patch(r,t)}},i.prototype.toggleFullText=function(e){var t=this.getById(e);return this.patch(e,{fullTextEnabled:!t.fullTextEnabled})},new i(t,n,r)}]),app.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(e,t,n,r){"use strict";var i=function(t,n,r){e.call(this,t,n,"name"),this.deleted=null,this.$q=r,this.ids={}};return i.prototype=Object.create(e.prototype),i.prototype.add=function(t){e.prototype.add.call(this,t),void 0!==t.id&&(this.ids[t.id]=this.hashMap[t.name])},i.prototype.clear=function(){e.prototype.clear.call(this),this.ids={}},i.prototype["delete"]=function(t){var n=this.get(t);return void 0!==n&&n.id&&delete this.ids[n.id],e.prototype["delete"].call(this,t),n},i.prototype.toggleOpen=function(e){var t=this.get(e);return t.opened=!t.opened,this.http({url:this.BASE_URL+"/folders/"+t.id+"/open",method:"POST",data:{folderId:t.id,open:t.opened}})},i.prototype.rename=function(e,t){var n=this.get(e),r=this.$q.defer(),i=this;return this.http({url:this.BASE_URL+"/folders/"+n.id+"/rename",method:"POST",data:{folderName:t}}).success(function(){n.name=t,delete i.hashMap[e],i.hashMap[t]=n,r.resolve()}).error(function(e){r.reject(e.message)}),r.promise},i.prototype.getById=function(e){return this.ids[e]},i.prototype.create=function(e){e=e.trim();var t={name:e};this.add(t);var n=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:e}}).success(function(e){n.resolve(e)}).error(function(e){t.error=e.message}),n.promise},i.prototype.reversiblyDelete=function(e){var t=this.get(e),n=t.id;return t.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+n)},i.prototype.undoDelete=function(e){var t=this.get(e),n=t.id;return t.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+n+"/restore")},new i(t,n,r)}]),app.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(e,t,n,r){"use strict";var i=function(t,n,r){e.call(this,t,n),this.batchSize=r,this.clear()};return i.prototype=Object.create(e.prototype),i.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,e.prototype.clear.call(this)},i.prototype.receive=function(t,n){switch(n){case"newestItemId":this.newestItemId=t;break;case"starred":this.starredCount=t;break;default:var r=this;t.forEach(function(e){0===r.lowestId&&(r.lowestId=e.id),0===r.highestId&&(r.highestId=e.id),e.id>r.highestId&&(r.highestId=e.id),e.id0){var a=o.pop(),u=a.url,d=a.title,c=0,l=a.folderName;if(void 0!==l&&void 0!==t.get(l)){var f=t.get(l);f.opened=!0,c=f.id,f.getsFeed=!0,f.getsFeedCounter=f.getsFeedCounter||0,f.getsFeedCounter+=1}void 0!==u&&void 0===e.get(u)&&e.create(u,c,d).then(function(e){n.publishAll(e)})["finally"](function(){0!==c&&(f.getsFeedCounter-=1,0===f.getsFeedCounter&&(f.getsFeed=!1)),i(o)})}else s.resolve();return s.promise};this.importFolders=function(e){var i=[],o=[];e.folders.forEach(function(e){if(void 0!==e.name){if(void 0===t.get(e.name)){var r=t.create(e.name).then(function(e){n.publishAll(e)});o.push(r)}e.feeds.forEach(function(t){t.folderName=e.name,i.push(t)})}}),i=i.concat(e.feeds);var s=r.defer();return r.all(o)["finally"](function(){s.resolve(i)}),s.promise},this.importFeedQueue=function(e,t){for(var n=r.defer(),o=[],s=0;t>s;s+=1)o.push(i(e));return r.all(o).then(function(){n.resolve()}),n.promise}}]),app.service("OPMLParser",function(){"use strict";var e=function(e){var t=e.attr("xmlUrl")||e.attr("htmlUrl"),n=e.attr("title")||e.attr("text")||t;return void 0===t?{type:"folder",name:n,feeds:[]}:{type:"feed",name:n,url:t}},t=function(n,r,i){for(var o=0;o outline"),r={feeds:[],folders:[]};return t(n,r,!0)}}),app.service("Publisher",function(){"use strict";this.channels={},this.subscribe=function(e){var t=this;return{toChannels:function(n){n.forEach(function(n){t.channels[n]=t.channels[n]||[],t.channels[n].push(e)})}}},this.publishAll=function(e){var t=this;Object.keys(e).forEach(function(n){var r=t.channels[n];void 0!==r&&r.forEach(function(t){t.receive(e[n],n)})})}}),app.factory("Resource",function(){"use strict";var e=function(e,t,n){this.id=n||"id",this.values=[],this.hashMap={},this.http=e,this.BASE_URL=t};return e.prototype.receive=function(e){var t=this;e.forEach(function(e){t.add(e)})},e.prototype.add=function(e){var t=this.hashMap[e[this.id]];void 0===t?(this.values.push(e),this.hashMap[e[this.id]]=e):Object.keys(e).forEach(function(n){t[n]=e[n]})},e.prototype.size=function(){return this.values.length},e.prototype.get=function(e){return this.hashMap[e]},e.prototype["delete"]=function(e){var t=this,n=this.values.findIndex(function(n){return n[t.id]===e});void 0!==n&&this.values.splice(n,1),void 0!==this.hashMap[e]&&delete this.hashMap[e]},e.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},e.prototype.getAll=function(){return this.values},e}),app.service("SettingsResource",["$http","BASE_URL",function(e,t){"use strict";this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.getSupportedLanguageCodes=function(){return this.supportedLanguageCodes},this.receive=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n];"language"===n&&(r=t.processLanguageCode(r)),t.settings[n]=r})},this.get=function(e){return this.settings[e]},this.set=function(n,r){return this.settings[n]=r,e({url:t+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(e){return e=e.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(e)<0&&(e=e.split("-")[0]),this.supportedLanguageCodes.indexOf(e)<0&&(e=this.defaultLanguageCode),e}}]),function(e,t,n,r,i,o){"use strict";var s=e.location,a=e.localStorage,u=function(e,t,r){var i=n.isContentHandlerRegistered,o=function(e,t){return i?"new"!==i(e,t):a.getItem("registeredHandler")===t};n.registerContentHandler&&!o(e,t)&&(n.registerContentHandler(e,t,r),i||a.setItem("registeredHandler",t))},d=s.protocol+"//"+s.host+s.pathname,c=d+"?subscribe_to=%s",l="application/vnd.mozilla.maybe.feed",f="ownCloud News @ "+d;u(l,c,f),i(t).ready(function(){var e=r("?subscribe_to");if(e&&"undefined"!==e){i("#new-feed").show();var t=i('input[ng-model="Navigation.feed.url"]');t.val(e),t.trigger("input"),setTimeout(function(){t.focus()},1e3)}})}(window,document,navigator,url,$),function(e,t){"use strict";e.addEventListener("beforeunload",function(){var e=t.querySelector("#app-content");e.scrollTo(0,0)})}(window,document),function(e,t,n){"use strict";var r=function(e){return!(e.is("input")||e.is("select")||e.is("textarea")||e.is("checkbox"))},i=function(e){return!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)},o=function(e){var t=".active > .app-navigation-entry-menu .mark-read button",n=e.find(t);n.length>0&&n.trigger("click")},s=function(e,t){var n=e.offset().top-t.offset().top,r=n+e.height(),i=t.height();return n>=0&&i>r},a=function(e,t,n){0===e.length||!n&&s(e,t)||t.scrollTop(e.offset().top-t.offset().top+t.scrollTop())},u=function(e){var t=e.find(".active");a(t,e.children("ul"),!0)},d=function(e){e.find(".active > a:visible").trigger("click")},c=function(e,t){if(0===t.scrollTop()){var n=t.find(".pull-to-refresh");n.hasClass("show-pull-to-refresh")?n.hasClass("done")&&d(e):n.addClass("show-pull-to-refresh")}},l=function(e,t){e.children("a:visible").trigger("click"),a(e,t.children("ul"))},f=function(e){var t=e.find(".active"),r=e.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(t.hasClass("folder"))for(;t.length>0;){var i=t.find(".feed:visible");if(i.length>0)return void l(n(i[0]),e);t=t.next(".folder")}else for(var o=0;o0&&l(n(i[r]),e)},g=function(e){var t=e.find(".active");if(t.hasClass("folder"))l(t.prevAll(".folder:visible").first(),e);else if(t.hasClass("feed")){var n=h(t);n.length>0?l(n,e):p(e,!0)}else p(e,!0)},v=function(e){var t=e.find(".active");if(t.hasClass("folder"))l(t.nextAll(".folder:visible").first(),e);else if(t.hasClass("feed")){var n=h(t);n.length>0?l(n.nextAll(".folder:visible").first(),e):p(e)}else p(e)},m=function(e){var t=e.find(".active"),r=e.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(t.hasClass("folder")){for(var i=t.prev(".folder");i.length>0;){var o=i.find(".feed:visible");if(o.length>0)return void l(n(o[o.length-1]),e);i=i.prev(".folder")}var s=t.siblings(".feed");if(s.length>0)return void l(n(s[s.length-1]),e);var a=n(".starred-feed:visible");return void(a.length>0&&l(a,e))}for(var u=r.length-1;u>0;u-=1){var d=r[u];if(d===t[0]){var c=r[u-1];l(n(c),e);break}}},y=function(e,t){var r=e.find(".item");r.each(function(e,r){return r=n(r),r.height()+r.position().top>30?(t(r),!1):void 0})},E=function(e){y(e,function(e){e.find(".toggle-keep-unread").trigger("click")})},C=function(e){y(e,function(e){e.find(".star").trigger("click")})},F=function(e){y(e,function(e){e.find(".utils").trigger("click")})},I=function(t){y(t,function(t){t.trigger("click"),e.open(t.find(".external:visible").attr("href"),"_blank")})},w=function(e,t,n){e.scrollTop(t.offset().top-e.offset().top+e.scrollTop()),n&&y(e,function(e){e.hasClass("open")||e.find(".utils").trigger("click")})},R=function(e,t){var r=e.find(".item"),i=!1;r.each(function(r,o){return o=n(o),0===o.position().top&&t&&!o.hasClass("open")||o.position().top>10?(w(e,o,t),i=!0,!1):void 0}),i||e.scrollTop(e.prop("scrollHeight"))},b=function(e,t,r){var i=t.find(".item"),o=!1;i.each(function(i,s){if(s=n(s),s.position().top+10>=0){var a=s.prev();return a.length>0?w(t,a,r):(c(e,t),t.scrollTop(0)),o=!0,!1}}),!o&&i.length>0&&w(t,i.last())};n(t).keyup(function(e){var t=e.keyCode,s=n("#app-content"),a=n("#app-navigation"),l=n("#articles.compact").length>0,h="true"===n("#articles").attr("news-compact-expand"),p=l&&h;r(n(":focus"))&&i(e)?[74,78,39].indexOf(t)>=0?(e.preventDefault(),R(s,p)):[75,80,37].indexOf(t)>=0?(e.preventDefault(), -b(a,s,p)):[85].indexOf(t)>=0?(e.preventDefault(),E(s)):[69].indexOf(t)>=0?(e.preventDefault(),F(s)):[73,83,76].indexOf(t)>=0?(e.preventDefault(),C(s)):[72].indexOf(t)>=0?(e.preventDefault(),C(s),R(s)):[79].indexOf(t)>=0?(e.preventDefault(),I(s)):[82].indexOf(t)>=0?(e.preventDefault(),d(a)):[70].indexOf(t)>=0?(e.preventDefault(),f(a)):[68].indexOf(t)>=0?(e.preventDefault(),m(a)):[67].indexOf(t)>=0?(e.preventDefault(),g(a)):[65].indexOf(t)>=0?(e.preventDefault(),u(a)):[86].indexOf(t)>=0?(e.preventDefault(),v(a)):[81].indexOf(t)>=0?(e.preventDefault(),n("#searchbox").focus()):[33].indexOf(t)>=0&&c(a,s):r(n(":focus"))&&e.shiftKey&&[65].indexOf(t)>=0&&(e.preventDefault(),o(a))})}(window,document,$),window.News=window.News||{},function(e,t,n,r,i){"use strict";var o=[];r.addArticleAction=function(e){o.push(e)},r.getArticleActionPlugins=function(){return o}}(window,document,jQuery,window.News),app.run(["$document","$rootScope",function(e,t){"use strict";e.click(function(e){t.$broadcast("documentClicked",e)})}]),app.directive("appNavigationEntryUtils",function(){"use strict";return{restrict:"C",link:function(e,t){var n=t.siblings(".app-navigation-entry-menu"),r=$(t).find(".app-navigation-entry-utils-menu-button button");r.click(function(){n.toggleClass("open")}),e.$on("documentClicked",function(e,t){t.target!==r[0]&&n.removeClass("open")})}}}),app.directive("newsAddFeed",["$rootScope","$timeout",function(e,t){"use strict";return{restrict:"A",link:function(n,r){e.$on("addFeed",function(e,i){t(function(){r.is(":animated")?(r.stop(!0,!0),r.show()):r.is(":visible")||r.slideDown(),r.find('[ng-model="Navigation.feed.url"]').focus()}),n.Navigation.feed.url=i})}}}]),app.directive("newsArticleActions",function(){"use strict";return{restrict:"A",scope:{newsArticleActions:"=",noPlugins:"="},link:function(e,t){for(var n=News.getArticleActionPlugins(),r=0;r=0;o-=1){var s=$(i[o]);if(r>=e)break;if(s.position().top<0){n.$apply(n.newsScrollAutoPage);break}r+=1}},s=function(e,t,n){if(e){var r=[],i=t.find(".item:not(.read)");i.each(function(e,t){var n=$(t);return n.position().top<=-10?void r.push(parseInt(n.data("id"),10)):!1}),n.itemIds=r,n.$apply(n.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(a,u){var d=!0,c=u;a.newsScroll&&(c=$(a.newsScroll));var l=function(){d&&(d=!1,e(function(){d=!0},1e3*r),o(t,u,a),i&&e.cancel(i),i=e(function(){s(a.newsScrollEnabledMarkRead,u,a),i=void 0},1e3*n))};c.on("scroll",l),a.$on("$destroy",function(){c.off("scroll",l)})}}}]),app.directive("newsSearch",["$document","$location",function(e,t){"use strict";return{restrict:"E",scope:{onSearch:"="},link:function(e){var n=$("#searchbox");n.val(t.search().search);var r=function(){var t=n.val();e.$apply(function(){e.onSearch(t)})};n.on("search keyup",function(e){("search"===e.type||13===e.keyCode)&&r()}),e.$watch(function(){return t.search()},function(e){e&&e.search?n.val(e.search):n.val("")})}}}]),app.directive("newsStickyMenu",function(){"use strict";return function(e,t,n){var r=40;$(n.newsStickyMenu).scroll(function(){var e=$(this).scrollTop();e>r?(t.addClass("fixed"),t.css("top",e)):t.removeClass("fixed")})}}),app.directive("newsStopPropagation",function(){"use strict";return{restrict:"A",link:function(e,t){t.bind("click",function(e){e.stopPropagation()})}}}),app.directive("newsTimeout",["$timeout","$rootScope",function(e,t){"use strict";return{restrict:"A",scope:{newsTimeout:"&"},link:function(n,r){var i=!1,o=7,s=e(n.newsTimeout,1e3*o);n.$on("$destroy",function(){i=!0,e.cancel(s)}),t.$on("$locationChangeStart",function(){e.cancel(s),i||(i=!0,r.remove(),n.newsTimeout())})}}}]),app.directive("newsTitleUnreadCount",["$window",function(e){"use strict";var t=e.document.title,n=t.split("-"),r=n[0]||"News",i=n[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(t,n,o){o.$observe("unreadCount",function(t){"0"!==t?e.document.title=r+"("+t+") - "+i:e.document.title=r+" - "+i})}}}]),app.directive("newsToggleShow",function(){"use strict";return{restrict:"A",scope:{newsToggleShow:"@"},link:function(e,t){t.click(function(){var t=$(e.newsToggleShow);t.toggle()})}}}),app.directive("newsTriggerClick",function(){"use strict";return function(e,t,n){t.click(function(){$(n.newsTriggerClick).trigger("click")})}}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFwcC5qcyIsIkNvbmZpZy5qcyIsIlJ1bi5qcyIsIkFwcENvbnRyb2xsZXIuanMiLCJDb250ZW50Q29udHJvbGxlci5qcyIsIkV4cGxvcmVDb250cm9sbGVyLmpzIiwiTmF2aWdhdGlvbkNvbnRyb2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XQpIHtcbiAgICAgICAgdmFyIHRpbWVyO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmVzcG9uc2VFcnJvcjogZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgLy8gc3RhdHVzIDAgaXMgYSBuZXR3b3JrIGVycm9yXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyBpbiBlcnJvck1lc3NhZ2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aW1lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQuY2FuY2VsKHRpbWVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBPQy5Ob3RpZmljYXRpb24uaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICBPQy5Ob3RpZmljYXRpb24uc2hvd0h0bWwoZXJyb3JNZXNzYWdlc1tyZXNwb25zZS5zdGF0dXNdKTtcbiAgICAgICAgICAgICAgICAgICAgdGltZXIgPSAkdGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPQy5Ob3RpZmljYXRpb24uaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICB9LCA1MDAwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICRxLnJlamVjdChyZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfV0pO1xuICAgICRodHRwUHJvdmlkZXIuaW50ZXJjZXB0b3JzLnB1c2goJ0NTUkZJbnRlcmNlcHRvcicpO1xuICAgICRodHRwUHJvdmlkZXIuaW50ZXJjZXB0b3JzLnB1c2goJ0Nvbm5lY3Rpb25FcnJvckludGVyY2VwdG9yJyk7XG5cbiAgICAvLyByb3V0aW5nXG4gICAgdmFyIGdldEl0ZW1SZXNvbHZlID0gZnVuY3Rpb24gKHR5cGUpIHtcbiAgICAgICAgcmV0dX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BvbGRlc3RGaXJzdCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHt9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyYW1ldGVycyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW1pdDogSVRFTV9CQVRDSF9TSVpFLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0FsbDogc2hvd0FsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9sZGVzdEZpcnN0OiBvbGRlc3RGaXJzdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaDogc2VhcmNoXG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCRyb3V0ZS5jdXJyZW50ICE9PSB1bmRlZmluZWQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICRyb3V0ZS5jdXJyZW50LnBhcmFtcyAhPT0gdW5kZWZpbmVkICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAkcm91dGUuY3VycmVudC5wYXJhbXMuaWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5pZCA9ICRyb3V0ZS5jdXJyZW50LnBhcmFtcy5pZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIGEgY3VzdG9tIG9yZGVyaW5nIGlzIHNldFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PT0gRkVFRF9UWVBFLkZFRUQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmZWVkID0gRmVlZFJlc291cmNlLmdldEJ5SWQocGFyYW1ldGVycy5pZCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9uIGludGlhbCBsb2FkLCB0aGUgZmVlZCBvcmRlcmluZyBpcyB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWVkID09PSB1bmRlZmluZWQgfHwgZmVlZC5vcmRlcmluZyA9PT0gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMub2xkZXN0Rmlyc3QgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZmVlZC5vcmRlcmluZyA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMub2xkZXN0Rmlyc3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgJGh0dHAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAgQkFTRV9VUkwgKyAnL2l0ZW1zJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ0dFVCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHBhcmFtZXRlcnNcbiAgICAgICAgICAgICAgICAgICAgfSkuc3VjY2VzcyhmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgICAgICAgICB9XVxuICAgICAgICB9O1xuICAgIH07XG5cbiAgICB2YXIgZ2V0RXhwbG9yZVJlc29sdmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzaXRlczogLyogQG5nSW5qZWN0ICovIFtcIiRodHRwXCIsIFwiJHFcIiwgXCJCQVNFX1VSTFwiLCBcIiRsb2NhdGl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WRzLmVuLmpzb24nO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGh0dHBcbiAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoZXhwbG9yZVVybClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRodHRwLmdldChkZWZhdWx0RXhwbG9yZVVybCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShkYXRhLmRhdGEpO1xuICAgICAgICAgICAgICAgIH0pLmNhdGNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH07XG4gICAgfTtcblxuICAgICRyb3V0ZVByb3ZpZGVyXG4gICAgICAgIC53aGVuKCcvaXRlbXMnLCB7XG4gICAgICAgICAgICBjb250cm9sbGVyOiAnQ29udGVudENvbnRyb2xsZXIgYXMgQ29udGVudCcsXG4gICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2NvbnRlbnQuaHRtbCcsXG4gICAgICAgICAgICByZXNvbHZlOiBnZXRJdGVtUmVzb2x2ZShmZWVkVHlwZS5TVUJTQ1JJUFRJT05TKSxcbiAgICAgICAgICAgIHR5cGU6IGZlZWRUeXBlLlNVQlNDUklQVElPTlNcbiAgICAgICAgfSlcbiAgICAgICAgLndoZW4oJy9pdGVtcy9zdGFycmVkJywge1xuICAgICAgICAgICAgY29udHJvbGxlcjogJ0NvbnRlbnRDb250cm9sbGVyIGFzIENvbnRlbnQnLFxuICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICdjb250ZW50Lmh0bWwnLFxuICAgICAgICAgICAgcmVzb2x2ZTogZ2V0SXRlbVJlc29sdmUoZmVlZFR5cGUuU1RBUlJFRCksXG4gICAgICAgICAgICB0eXBlOiBmZWVkVHlwZS5TVEFSUkVEXG4gICAgICAgIH0pXG4gICAgICAgIC53aGVuKCcvaXRlbXMvZmVlZHMvOmlkJywge1xuICAgICAgICAgICAgY29udHJvbGxlcjogJ0NvbnRlbnRDb250cm9sbGVyIGFzIENvbnRlbnQnLFxuICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICdjb250ZW50Lmh0bWwnLFxuICAgICAgICAgICAgcmVzb2x2ZTogZ2V0SXRlbVJlc29sdmUoZmVlZFR5cGUuRkVFRCksXG4gICAgICAgICAgICB0eXBlOiBmZWVkVHlwZS5GRUVEXG4gICAgICAgIH0pXG4gICAgICAgIC53aGVuKCcvaXRlbXMvZm9sZGVycy86aWQnLCB7XG4gICAgICAgICAgICBjb250cm9sbGVyOiAnQ29udGVudENvbnRyb2xsZXIgYXMgQ29udGVudCcsXG4gICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2NvbnRlbnQuaHRtbCcsXG4gICAgICAgICAgICByZXNvbHZlOiBnZXRJdGVtUmVzb2x2ZShmZWVkVHlwZS5GT0xERVIpLFxuICAgICAgICAgICAgdHlwZTogZmVlZFR5cGUuRk9MREVSXG4gICAgICAgIH0pLndoZW4oJy9leHBsb3JlJywge1xuICAgICAgICAgICAgY29udHJvbGxlcjogJ0V4cGxvcmVDb250cm9sbGVyIGFzIEV4cGxvcmUnLFxuICAgICAgICAgICAgdGVtcGxhdGVVcmw6ICdleHBsb3JlLmh0bWwnLFxuICAgICAgICAgICAgcmVzb2x2ZTogZ2V0RXhwbG9yZVJlc29sdmUoKSxcbiAgICAgICAgICAgIHR5cGU6IGZlZWRUeXBlLkVYUExPUkVcbiAgICAgICAgfSkud2hlbignL3Nob3J0Y3V0cycsIHtcbiAgICAgICAgICA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Jlc291cmNlLnByb3RvdHlwZS5jbGVhciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgUmVzb3VyY2UucHJvdG90eXBlLmNsZWFyLmNhbGwodGhpcyk7XG4gICAgICAgIHRoaXMudW5yZWFkQ291bnQgPSAwO1xuICAgICAgICB0aGlzLmZvbGRlclVucmVhZENvdW50ID0ge307XG4gICAgICAgIHRoaXMuZm9sZGVySWRzID0ge307XG4gICAgICAgIHRoaXMuaWRzID0ge307XG4gICAgICAgIHRoaXMubG9jYXRpb25zID0ge307XG4gICAgfTtcblxuICAgIEZlZWRSZXNvdXJjZS5wcm90b3R5cGUudXBkYXRlVW5yZWFkQ2FjaGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMudW5yZWFkQ291bnQgPSAwO1xuICAgICAgICB0aGlzLmZvbGRlclVucmVhZENvdW50ID0ge307XG5cbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICB0aGlzLnZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uIChmZWVkKSB7XG4gICAgICAgICAgICBpZiAoZmVlZC51bnJlYWRDb3VudCkge1xuICAgICAgICAgICAgICAgIHNlbGYudW5yZWFkQ291bnQgKz0gZmVlZC51bnJlYWRDb3VudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmZWVkLmZvbGRlcklkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmZvbGRlclVucmVhZENvdW50W2ZlZWQuZm9sZGVySWRdID1cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5mb2xkZXJVbnJlYWRDb3VudFtmZWVkLmZvbGRlcklkXSB8fCAwO1xuICAgICAgICAgICAgICAgIHNlbGYuZm9sZGVyVW5yZWFkQ291bnRbZmVlZC5mb2xkZXJJZF0gKz0gZmVlZC51bnJlYWRDb3VudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcblxuXG4gICAgRmVlZFJl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HRwKHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgdXJsOiB0aGlzLkJBU0VfVVJMICsgJy9mZWVkcycsXG4gICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgICAgICAgICAgcGFyZW50Rm9sZGVySWQ6IGZvbGRlcklkIHx8IDAsXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pLnN1Y2Nlc3MoZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoZGF0YSk7XG4gICAgICAgIH0pLmVycm9yKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICBmZWVkLmZhdmljb25MaW5rID0gJyc7XG4gICAgICAgICAgICBmZWVkLmVycm9yID0gZGF0YS5tZXNzYWdlO1xuICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgIH07XG5cblxuICAgIEZlZWRSZXNvdXJjZS5wcm90b3R5cGUucmV2ZXJzaWJseURlbGV0ZSA9IGZ1bmN0aW9uIChpZCwgdXBkYXRlQ2FjaGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzRm9sZGVyKSB7XG4gICAgICAgIHZhciBmZWVkID0gdGhpcy5nZXRCeUlkKGlkKTtcblxuICAgICAgICAvLyBpZiBhIGZvbGRlciBpcyBkZWxldGVkIGl0IGRvZXMgbm90IGhhdmUgdG8gdHJpZ2dlciB0aGUgZGVsZXRlXG4gICAgICAgIC8vIGF0dHJpYnV0ZSBmb3IgdGhlIGZlZWQgYmVjYXVzZSB0aGUgZmVlZCBpcyBub3QgZGVsZXRlZCwgaXRzIGp1c3Qgbm90XG4gICAgICAgI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AgICAgICAgaWYgKGZlZWQpIHtcbiAgICAgICAgICAgIGZlZWQub3JkZXJpbmcgPSBvcmRlcmluZztcbiAgICAgICAgICAgIHZhciB1cmwgPSB0aGlzLkJBU0VfVVJMICsgJy9mZWVkcy8nICsgZmVlZElkO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuaHR0cC5wYXRjaCh1cmwsIHtcbiAgICAgICAgICAgICAgICBvcmRlcmluZzogb3JkZXJpbmdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcblxuXG4gICAgRmVlZFJlc291cmNlLnByb3RvdHlwZS5zZXRQaW5uZWQgPSBmdW5jdGlvbiAoZmVlZElkLCBpc1Bpbm5lZCkge1xuICAgICAgICB2YXIgZmVlZCA9IHRoaXMuZ2V0QnlJZChmZWVkSWQpO1xuXG4gICAgICAgIGlmIChmZWVkKSB7XG4gICAgICAgICAgICBmZWVkLnBpbm5lZCA9IGlzUGlubmVkO1xuICAgICAgICAgICAgdmFyIHVybCA9IHRoaXMuQkFTRV9VUkwgKyAnL2ZlZWRzLycgKyBmZWVkSWQ7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5odHRwLnBhdGNoKHVybCwge1xuICAgICAgICAgICAgICAgIHBpbm5lZDogaXNQaW5uZWRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcblxuXG4gICAgRmVlZFJlc291cmNlLnByb3RvdHlwZS5wYXRjaCA9IGZ1bmN0aW9uIChmZWVkSWQsIGRpZmYpIHtcbiAgICAgICAgdmFyIGZlZWQgPSB0aGlzLmdldEJ5SWQoZmVlZElkKTtcblxuICAgICAgICBpZiAoZmVlZCkge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoZGlmZikuZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcbiAgICAgICAgICAgICAgICBmZWVkW2tleV0gPSBkaWZmW2tleV07XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciB1cmwgPSB0aGlzLk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AgICAgcmV0dXJuIGZvbGRlcjtcbiAgICB9O1xuXG4gICAgRm9sZGVyUmVzb3VyY2UucHJvdG90eXBlLnRvZ2dsZU9wZW4gPSBmdW5jdGlvbiAoZm9sZGVyTmFtZSkge1xuICAgICAgICB2YXIgZm9sZGVyID0gdGhpcy5nZXQoZm9sZGVyTmFtZSk7XG4gICAgICAgIGZvbGRlci5vcGVuZWQgPSAhZm9sZGVyLm9wZW5lZDtcblxuICAgICAgICByZXR1cm4gdGhpcy5odHRwKHtcbiAgICAgICAgICAgIHVybDogdGhpcy5CQVNFX1VSTCArICcvZm9sZGVycy8nICsgZm9sZGVyLmlkICsgJy9vcGVuJyxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIGZvbGRlcklkOiBmb2xkZXIuaWQsXG4gICAgICAgICAgICAgICAgb3BlbjogZm9sZGVyLm9wZW5lZFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9O1xuXG5cbiAgICBGb2xkZXJSZXNvdXJjZS5wcm90b3R5cGUucmVuYW1lID0gZnVuY3Rpb24gKGZvbGRlck5hbWUsIHRvRm9sZGVyTmFtZSkge1xuICAgICAgICB2YXIgZm9sZGVyID0gdGhpcy5nZXQoZm9sZGVyTmFtZSk7XG4gICAgICAgIHZhciBkZWZlcnJlZCA9IHRoaXMuJHEuZGVmZXIoKTtcbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuXG4gICAgICAgIHRoaXMuaHR0cCh7XG4gICAgICAgICAgICB1cmw6IHRoaXMuQkFTRV9VUkwgKyAnL2ZvbGRlcnMvJyArIGZvbGRlci5pZCArICcvcmVuYW1lJyxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIGZvbGRlck5hbWU6IHRvRm9sZGVyTmFtZVxuICAgICAgICAgICAgfVxuICAgICAgICB9K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wZS5jbGVhci5jYWxsKHRoaXMpO1xuICAgIH07XG5cbiAgICBJdGVtUmVzb3VyY2UucHJvdG90eXBlLnJlY2VpdmUgPSBmdW5jdGlvbiAodmFsdWUsIGNoYW5uZWwpIHtcbiAgICAgICAgc3dpdGNoIChjaGFubmVsKSB7XG5cbiAgICAgICAgY2FzZSAnbmV3ZXN0SXRlbUlkJzpcbiAgICAgICAgICAgIHRoaXMubmV3ZXN0SXRlbUlkID0gdmFsdWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICdzdGFycmVkJzpcbiAgICAgICAgICAgIHRoaXMuc3RhcnJlZENvdW50ID0gdmFsdWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgdmFsdWUuZm9yRWFjaChmdW5jdGlvbiAoaXRlbSkge1xuICAgICAgICAgICAgICAgIC8vIGluaXRpYWxpemUgbG93ZXN0IGFuZCBoaWdoZXN0IGlkXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYubG93ZXN0SWQgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb3dlc3RJZCA9IGl0ZW0uaWQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzZWxmLmhpZ2hlc3RJZCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmhpZ2hlc3RJZCA9IGl0ZW0uaWQ7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0uaWQgPiBzZWxmLmhpZ2hlc3RJZCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmhpZ2hlc3RJZCA9IGl0ZW0uaWQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpdGVtLmlkIDwgc2VsZi5sb3dlc3RJZCkge1xuICAgICAgICAgICAgICAgICAgIC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iAocXVldWUpIHtcbiAgICAgICAgdmFyIGRlZmVycmVkID0gJHEuZGVmZXIoKTtcblxuICAgICAgICBpZiAocXVldWUubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgdmFyIGZlZWQgPSBxdWV1ZS5wb3AoKTtcbiAgICAgICAgICAgIHZhciB1cmwgPSBmZWVkLnVybDtcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IGZlZWQudGl0bGU7XG4gICAgICAgICAgICB2YXIgZm9sZGVySWQgPSAwO1xuICAgICAgICAgICAgdmFyIGZvbGRlck5hbWUgPSBmZWVkLmZvbGRlck5hbWU7XG5cbiAgICAgICAgICAgIGlmIChmb2xkZXJOYW1lICE9PSB1bmRlZmluZWQgJiZcbiAgICAgICAgICAgICAgICBGb2xkZXJSZXNvdXJjZS5nZXQoZm9sZGVyTmFtZSkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHZhciBmb2xkZXIgPSBGb2xkZXJSZXNvdXJjZS5nZXQoZm9sZGVyTmFtZSk7XG4gICAgICAgICAgICAgICAgZm9sZGVyLm9wZW5lZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgZm9sZGVySWQgPSBmb2xkZXIuaWQ7XG5cbiAgICAgICAgICAgICAgICAvLyBkaXNwbGF5IGZvbGRlciB3aGlsZSBhZGRpbmcgdGhlIGZlZWRcbiAgICAgICAgICAgICAgICBmb2xkZXIuZ2V0c0ZlZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGZvbGRlci5nZXRzRmVlZENvdW50ZXIgPSBmb2xkZXIuZ2V0c0ZlZWRDb3VudGVyIHx8IDA7XG4gICAgICAgICAgICAgICAgZm9sZGVyLmdldHNGZWVkQ291bnRlciArPSAxO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBtYWtlIHN1cmUgdG8gbm90IGFkZCBhbHJlYWR5IGV4aXN0aW5nIGZlZWRzXG4gICAgICAgICAgICBpZiAodXJsICE9PSB1bmRlZmluZWQgJiYgRmVlZFJlc291cmNlLmdldCh1cmwpID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBGZWVkUmVzb3VyY2UuY3JlYXRlKHVybCwgZm9sZGVySWQsIHRpdGxlKVxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIFB1Ymxpc2hlci5wdWJsaXNoQWxsKGRhdGEpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZGVySWQgIT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRlci5nZXRzRmVlZENvdW50ZXIgLT0gMTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvbGRlci5nZXRzRmVlZENvdW50ZXIgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb2xkZXIuZ2V0c0ZlZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGFydEZlZWRKb2IocXVldWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgfTtcblxuICAgIHRoaXMuaW1wb3J0Rm9sZGVycyA9IGZ1bmN0aW9uIChjb250ZW50KSB7XG4gICAgICAgIC8vIGFzc3VtcHRpb246IGZvbGRlcnMgYXJlIGZhc3QgdG8gY3JlYXRlIGFuZCB3ZSBkb250IG5lZWQgYSBxdWV1ZSBmb3JcbiAgICAgICAgLy8gdGhlbVxuICAgICAgICB2YXIgZmVlZFF1ZXVlID0gW107XG4gICAgICAgIHZhciBmb2xkZXJQcm9taXNlcyA9IFtdO1xuICAgICAgICBjb250ZW50LmZvbGRlcnMuZm9yRWFjaChmdW5jdGlvbiAoZm9sZGVyKSB7XG4gICAgICAgICAgICBpZiAoZm9sZGVyLm5hbWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIC8vIHNraXAgYWxyZWFkeSBjcmVhdGVkIGZvbGRlcnNcbiAgICAgICAgICAgICAgICBpZiAoRm9sZGVyUmVzb3VyY2UuZ2V0KGZvbGRlci5uYW1lKSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9taXNlID0gRm9sZGVyUmVzb3VyY2UuY3JlYXRlKGZvbGRlci5uYW1lKVxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgUHVibGlzaGVyLnB1Ymxpc2hBbGwoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBmb2xkZXJQcm9taXNlcy5wdXNoKHByb21pc2UpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvbGRlci5mZWVkcy5mb3JFYWNoKGZ1bmN0aW9uIChmZWVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGZlZWQuZm9sZGVyTmFtZSA9IGZvbGRlci5uYW1lO1xuICAgICAgICAgICAgICAgICAgICBmZWVkUXVldWUucHVzaChmZWVkKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGZlZWRRdWV1ZSA9IGZlZWRRdWV1ZS5jb25jYXQoY29udGVudC5mZWVkcyk7XG5cbiAgICAgICAgdmFyIGRlZmVycmVkID0gJHEuZGVmZXIoKTtcblxuICAgICAgICAkcS5hbGwoZm9sZGVyUHJvbWlzZXMpLmZpbmFsbHkoZnVuY3Rp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AgICAndXNlIHN0cmljdCc7XG5cbiAgICB2YXIgcGFyc2VPdXRsaW5lID0gZnVuY3Rpb24gKG91dGxpbmUpIHtcbiAgICAgICAgdmFyIHVybCA9IG91dGxpbmUuYXR0cigneG1sVXJsJykgfHwgb3V0bGluZS5hdHRyKCdodG1sVXJsJyk7XG4gICAgICAgIHZhciBuYW1lID0gb3V0bGluZS5hdHRyKCd0aXRsZScpIHx8IG91dGxpbmUuYXR0cigndGV4dCcpIHx8IHVybDtcblxuICAgICAgICAvLyBmb2xkZXJcbiAgICAgICAgaWYgKHVybCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdmb2xkZXInLFxuICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXG4gICAgICAgICAgICAgICAgZmVlZHM6IFtdXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgIC8vIGZlZWRcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2ZlZWQnLFxuICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXG4gICAgICAgICAgICAgICAgdXJsOiB1cmxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLy8gdGhlcmUgaXMgb25seSBvbmUgbGV2ZWwsIHNvIGZlZWRzIGluIGEgZm9sZGVyIGluIGEgZm9sZGVyIHNob3VsZCBiZVxuICAgIC8vIGF0dGFjaGVkIHRvIHRoZSByb290IGZvbGRlclxuICAgIHZhciByZWN1cnNpdmVseVBhcnNlID0gZnVuY3Rpb24gKGxldmVsLCByb290LCBmaXJzdExldmVsKSB7XG4gICAgICAgIGZvciAodmFyIGk9MDsgaTxsZXZlbC5sZW5ndGg7IGkrPTEpIHtcbiAgICAgICAgICAgIHZhciBvdXRsaW5lID0gJChsZXZlbFtpXSk7XG5cbiAgICAgICAgICAgIHZhciBlbnRyeSA9IHBhcnNlT3V0bGluZShvdXRsaW5lKTtcblxuICAgICAgICAgICAgaWYgKGVudHJ5LnR5cGUgPT09ICdmZWVkJykge1xuICAgICAgICAgICAgICAgIHJvb3QuZmVlZHMucHVzaChlbnRyeSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgLy8gb25seSBmaXJzdCBsZXZlbCBzaG91bGQgYXBwZW5kIGZvbGRlcnNcbiAgICAgICAgICAgICAgICBpZiAoZmlyc3RMZXZlbCkge1xuICAgICAgICAgICAgICAgICAgICByZWN1cnNpdmVseVBhcnNlKG91dGxpbmUuY2hpbGRyZW4oJ291dGxpbmUnKSwgZW50cnksIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcm9vdC5mb2xkZXJzLnB1c2goZW50cnkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5UGFyc2Uob3V0bGluZS5jaGlsZHJlbignb3V0bGluZScpLCByb290LCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJvb3Q7XG4gICAgfTtcblxuICAgIHRoaXMucGFyc2UgPSBmdW5jdGlvbiAoeG1sKSB7XG4gICAgICAgIHhtbCA9ICQucGFyc2VYTUwoeG1sKTtcbiAgICAgICAgdmFyIGZpcnN0TGV2ZWwgPSAkKHhtbCkuZmluZCgnYm9keSA+IG91dGxpbmUnKTtcblxuICAgICAgICB2YXIgcm9vdCA9IHtcbiAgICAgICAgICAgICdmZWVkcyc6IFtdLFxuICAgICAgICAgICAgJ2ZvbGRlcnMnOiBbXVxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiByZWN1cnNpdmVseVBhcnNlKGZpcnN0TGV2ZWwsIHJvb3QsIHRydWUpO1xuICAgIH07XG5cbn0pOyIsIi8qKlxuICogb3duQ2xvdWQgLSBOZXdz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vdG90eXBlLnJlY2VpdmUgPSBmdW5jdGlvbiAob2Jqcykge1xuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgIG9ianMuZm9yRWFjaChmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICBzZWxmLmFkZChvYmopO1xuICAgICAgICB9KTtcbiAgICB9O1xuXG5cbiAgICBSZXNvdXJjZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICB2YXIgZXhpc3RpbmcgPSB0aGlzLmhhc2hNYXBbb2JqW3RoaXMuaWRdXTtcblxuICAgICAgICBpZiAoZXhpc3RpbmcgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdGhpcy52YWx1ZXMucHVzaChvYmopO1xuICAgICAgICAgICAgdGhpcy5oYXNoTWFwW29ialt0aGlzLmlkXV0gPSBvYmo7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBjb3B5IHZhbHVlcyBmcm9tIG5ldyB0byBvbGQgb2JqZWN0IGlmIGl0IGV4aXN0cyBhbHJlYWR5XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhvYmopLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgIGV4aXN0aW5nW2tleV0gPSBvYmpba2V5XTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcblxuXG4gICAgUmVzb3VyY2UucHJvdG90eXBlLnNpemUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZhbHVlcy5sZW5ndGg7XG4gICAgfTtcblxuXG4gICAgUmVzb3VyY2UucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uIChpZCkge1xuICAgICAgICByZXR1cm4gdGhpcy5oYXNoTWFwW2lkXTtcbiAgICB9O1xuXG5cbiAgICBSZXNvdXJjZS5wcm90b3R5cGUuZGVsZXRlID0gZnVuY3Rpb24gKGlkKSB7XG4gICAgICAg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ZyZXNoJyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHB1bGxUb1JlZnJlc2guaGFzQ2xhc3MoJ2RvbmUnKSkge1xuICAgICAgICAgICAgICAgIHJlbG9hZEZlZWQobmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeSA9IGZ1bmN0aW9uIChlbGVtZW50LCBuYXZpZ2F0aW9uQXJlYSkge1xuICAgICAgICBlbGVtZW50LmNoaWxkcmVuKCdhOnZpc2libGUnKS50cmlnZ2VyKCdjbGljaycpO1xuICAgICAgICBzY3JvbGxUb05hdmlnYXRpb25FbGVtZW50KGVsZW1lbnQsIG5hdmlnYXRpb25BcmVhLmNoaWxkcmVuKCd1bCcpKTtcbiAgICB9O1xuXG4gICAgdmFyIG5leHRGZWVkID0gZnVuY3Rpb24gKG5hdmlnYXRpb25BcmVhKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gbmF2aWdhdGlvbkFyZWEuZmluZCgnLmFjdGl2ZScpO1xuICAgICAgICB2YXIgZWxlbWVudHMgPSBuYXZpZ2F0aW9uQXJlYS5maW5kKCcuZXhwbG9yZS1mZWVkLCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcuc3Vic2NyaXB0aW9ucy1mZWVkOnZpc2libGUsJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJy5zdGFycmVkLWZlZWQ6dmlzaWJsZSwnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnLmZlZWQ6dmlzaWJsZScpO1xuXG4gICAgICAgIGlmIChjdXJyZW50Lmhhc0NsYXNzKCdmb2xkZXInKSkge1xuICAgICAgICAgICAgd2hpbGUgKGN1cnJlbnQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHZhciBzdWJmZWVkcyA9IGN1cnJlbnQuZmluZCgnLmZlZWQ6dmlzaWJsZScpO1xuICAgICAgICAgICAgICAgIGlmIChzdWJmZWVkcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGFjdGl2YXRlTmF2aWdhdGlvbkVudHJ5KCQoc3ViZmVlZHNbMF0pLCBuYXZpZ2F0aW9uQXJlYSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQubmV4dCgnLmZvbGRlcicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBubyBzdWJmZWVkIGZvdW5kXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBGSVhNRTogTyhuKSBydW50aW1lLiBJZiBzb21lb25lIGNyZWF0ZXMgYSBuaWNlIGFuZCBub3QgZnVnbHkgc29sdXRpb25cbiAgICAgICAgLy8gcGxlYXNlIGNyZWF0ZSBhIFBSXG4gICAgICAgIGZvciAodmFyIGk9MDsgaTxlbGVtZW50cy5sZW5ndGgtMTsgaSs9MSkge1xuICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBlbGVtZW50c1tpXTtcblxuICAgICAgICAgICAgaWYgKGVsZW1lbnQgPT09IGN1cnJlbnRbMF0pIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dCA9IGVsZW1lbnRzW2krMV07XG4gICAgICAgICAgICAgICAgYWN0aXZhdGVOYXZpZ2F0aW9uRW50cnkoJChuZXh0KSwgbmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBnZXRQYXJlbnRGb2xkZXIgPSBmdW5jdGlvbiAoY3VycmVudCkge1xuICAgICAgICByZXR1cm4gY3VycmVudC5wYXJlbnQoKS5wYXJlbnQoJy5mb2xkZXInK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gICAgICAgICAgICB2YXIgcGFyZW50Rm9sZGVyID0gZ2V0UGFyZW50Rm9sZGVyKGN1cnJlbnQpO1xuICAgICAgICAgICAgaWYgKHBhcmVudEZvbGRlci5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgYWN0aXZhdGVOYXZpZ2F0aW9uRW50cnkoXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudEZvbGRlci5uZXh0QWxsKCcuZm9sZGVyOnZpc2libGUnKS5maXJzdCgpLFxuICAgICAgICAgICAgICAgICAgICBuYXZpZ2F0aW9uQXJlYVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNlbGVjdEZpcnN0T3JMYXN0Rm9sZGVyKG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNlbGVjdEZpcnN0T3JMYXN0Rm9sZGVyKG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgcHJldmlvdXNGZWVkID0gZnVuY3Rpb24gKG5hdmlnYXRpb25BcmVhKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gbmF2aWdhdGlvbkFyZWEuZmluZCgnLmFjdGl2ZScpO1xuICAgICAgICB2YXIgZWxlbWVudHMgPSBuYXZpZ2F0aW9uQXJlYS5maW5kKCcuZXhwbG9yZS1mZWVkLCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcuc3Vic2NyaXB0aW9ucy1mZWVkOnZpc2libGUsJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJy5zdGFycmVkLWZlZWQ6dmlzaWJsZSwnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnLmZlZWQ6dmlzaWJsZScpO1xuXG4gICAgICAgIC8vIHNwZWNpYWwgY2FzZTogZm9sZGVyIHNlbGVjdGVkXG4gICAgICAgIGlmIChjdXJyZW50Lmhhc0NsYXNzKCdmb2xkZXInKSkge1xuICAgICAgICAgICAgdmFyIHByZXZpb3VzRm9sZGVyID0gY3VycmVudC5wcmV2KCcuZm9sZGVyJyk7XG5cbiAgICAgICAgICAgIHdoaWxlIChwcmV2aW91c0ZvbGRlci5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN1YmZlZWRzID0gcHJldmlvdXNGb2xkZXIuZmluZCgnLmZlZWQ6dmlzaWJsZScpO1xuICAgICAgICAgICAgICAgIGlmIChzdWJmZWVkcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGFjdGl2YXRlTmF2aWdhdGlvbkVudHJ5KCQoc3ViZmVlZHNbc3ViZmVlZHMubGVuZ3RoLTFdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwcmV2aW91c0ZvbGRlciA9IHByZXZpb3VzRm9sZGVyLnByZXYoJy5mb2xkZXInKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gbm8gc3ViZmVlZCBmb3VuZCB0cnkgdmlzaWJsZSBmZWVkc1xuICAgICAgICAgICAgdmFyIGZlZWRzID0gY3VycmVudC5zaWJsaW5ncygnLmZlZWQnKTtcblxuICAgICAgICAgICAgaWYgKGZlZWRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeSgkKGZlZWRzW2ZlZWRzLmxlbmd0aC0xXSksXG4gICAgICAgICAgICAgICAgICAgIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgLy8gbm8gZmVlZCBmb3VuZCwgZ28gdG8gc3RhcnJlZFxuICAgICAgICAgICAgdmFyIHN0YXJyZWQgPSAkKCcuc3RhcnJlZC1mZWVkOnZpc2libGUnKTtcbiAgICAgICAgICAgIGlmIChzdGFycmVkLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeShzdGFycmVkLCBuYXZpZ2F0aW9uQXJlYSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FOiBPKG4pIHJ1bnRpbWUuIElmIHNvbWVvbmUgY3JlYXRlcyBhIG5pY2UgYW5kIG5vdCBmdWdseSBzb2x1dGlvblxuICAgICAgICAvLyBwbGVhc2UgY3JlYXRlIGEgUFJcbiAgICAgICAgZm9yICh2YXIgaT1lbGVtZW50cy5sZW5ndGgtMTsgaT4wOyBpLT0xKSB7XG4gICAgICAgICAgICB2YXIgZWxlbWVudCA9IGVsZW1lbnRzW2ldO1xuXG4gICAgICAgICAgICBpZiAoZWxlbWVudCA9PT0gY3VycmVudFswXSkge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IGVsZW1lbnRzW2ktMV07XG4gICAgICAgICAgICAgICAgYWN0aXZhdGVOYXZpZ2F0aW9uRW50cnkoJChwcmV2aW91cyksIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgb25BY3RpdmVJdGVtID0gZnVuY3Rpb24gKHNjcm9sbEFyZWEsIGNhbGxiYWNrKSB7XG4gICAgICAgIHZhciBpdGVtcyA9IHNjcm9sbEFyZWEuZmluZCgnLml0ZW0nKTtcblxuICAgICAgICBpdGVtcy5lYWNoKGZ1bmN0aW9uIChpbmRleCwgaXRlbSkge1xuICAgICAgICAgICAgaXRlbSA9ICQoaXRlbSk7XG5cbiAgICA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l0ZW0oc2Nyb2xsQXJlYSwgZXhwYW5kSXRlbUluQ29tcGFjdCk7XG5cbiAgICAgICAgICAgIC8vIGssIHAsIGxlZnQgYXJyb3dcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzc1LCA4MCwgMzddLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBzY3JvbGxUb1ByZXZpb3VzSXRlbShuYXZpZ2F0aW9uQXJlYSwgc2Nyb2xsQXJlYSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBhbmRJdGVtSW5Db21wYWN0KTtcblxuICAgICAgICAgICAgLy8gdVxuICAgICAgICAgICAgfSBlbHNlIGlmIChbODVdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0b2dnbGVVbnJlYWQoc2Nyb2xsQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIGVcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzY5XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgZXhwYW5kSXRlbShzY3JvbGxBcmVhKTtcblxuICAgICAgICAgICAgLy8gcywgaSwgbFxuICAgICAgICAgICAgfSBlbHNlIGlmIChbNzMsIDgzLCA3Nl0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRvZ2dsZVN0YXIoc2Nyb2xsQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIGhcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzcyXS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgdG9nZ2xlU3RhcihzY3JvbGxBcmVhKTtcbiAgICAgICAgICAgICAgICBzY3JvbGxUb05leHRJdGVtKHNjcm9sbEFyZWEpO1xuXG4gICAgICAgICAgICAvLyBvXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs3OV0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIG9wZW5MaW5rKHNjcm9sbEFyZWEpO1xuXG4gICAgICAgICAgICAvLyByXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs4Ml0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHJlbG9hZEZlZWQobmF2aWdhdGlvbkFyZWEpO1xuXG4gICAgICAgICAgICAvLyBmXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs3MF0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIG5leHRGZWVkKG5hdmlnYXRpb25BcmVhKTtcblxuICAgICAgICAgICAgLy8gZFxuICAgICAgICAgICAgfSBlbHNlIGlmIChbNjhdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBwcmV2aW91c0ZlZWQobmF2aWdhdGlvbkFyZWEpO1xuXG4gICAgICAgICAgICAvLyBjXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs2N10uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHByZXZpb3VzRm9sZGVyKG5hdmlnYXRpb25BcmVhKTtcblxuICAgICAgICAgICAgLy8gYVxuICAgICAgICAgICAgfSBlbHNlIGlmIChbNjVdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBzY3JvbGxUb0FjdGl2ZU5hdmlnYXRpb25FbnRyeShuYXZpZ2F0aW9uQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIHZcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzg2XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgbmV4dEZvbGRlcihuYXZpZ2F0aW9uQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIHFcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzgxXS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgJCgnI3NlYXJjaGJveCcpLmZvY3VzKCk7XG5cbiAgICAgICAgICAgIC8vIHBhZ2UgdXBcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzMzXS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIHRyeVJlbG9hZChuYXZpZ2F0aW9uQXJlYSwgc2Nyb2xsQXJlYSk7XG5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAvLyBldmVyeXRoaW5nIHdpdGggc2hpZnRcbiAgICAgICAgfSBlbHNlIGlmIChub0lucHV0Rm9jdXNlZCgkKCc6Zm9jdXMnKSkgJiYgZXZlbnQuc2hpZnRLZXkpIHtc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G9zc2VsdC5jb20+XG4gKiBAY29weXJpZ2h0IEJlcm5oYXJkIFBvc3NlbHQgMjAxNFxuICovXG5hcHAucnVuKFtcIiRkb2N1bWVudFwiLCBcIiRyb290U2NvcGVcIiwgZnVuY3Rpb24gKCRkb2N1bWVudCwgJHJvb3RTY29wZSkge1xuICAgICd1c2Ugc3RyaWN0JztcbiAgICAkZG9jdW1lbnQuY2xpY2soZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICRyb290U2NvcGUuJGJyb2FkY2FzdCgnZG9jdW1lbnRDbGlja2VkJywgZXZlbnQpO1xuICAgIH0pO1xufV0pO1xuXG5hcHAuZGlyZWN0aXZlKCdhcHBOYXZpZ2F0aW9uRW50cnlVdGlscycsIGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcmVzdHJpY3Q6ICdDJyxcbiAgICAgICAgbGluazogZnVuY3Rpb24gKHNjb3BlLCBlbG0pIHtcbiAgICAgICAgICAgIHZhciBtZW51ID0gZWxtLnNpYmxpbmdzKCcuYXBwLW5hdmlnYXRpb24tZW50cnktbWVudScpO1xuICAgICAgICAgICAgdmFyIGJ1dHRvbiA9ICQoZWxtKVxuICAgICAgICAgICAgICAgIC5maW5kKCcuYXBwLW5hdmlnYXRpb24tZW50cnktdXRpbHMtbWVudS1idXR0b24gYnV0dG9uJyk7XG5cbiAgICAgICAgICAgIGJ1dHRvbi5jbGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbWVudS50b2dnbGVDbGFzcygnb3BlbicpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHNjb3BlLiRvbignZG9jdW1lbnRDbGlja2VkJywgZnVuY3Rpb24gKHNjb3BlLCBldmVudCkge1xuICAgICAgICAgICAgICAgIGlmIChldmVudC50YXJnZXQgIT09IGJ1dHRvblswXSkge1xuICAgICAgICAgICAgICAgICAgICBtZW51LnJlbW92ZUNsY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HlldCBhbmQgdGhhdFxuICAgICAgICAgICAgLy8gdGhlcmUgYXJlIG1vcmUgaXRlbXMsIHNvIGJyZWFrXG4gICAgICAgICAgICBpZiAoY291bnRlciA+PSBsaW1pdCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyB0aGlzIGlzIG9ubHkgcmVhY2hlZCB3aGVuIHRoZSBpdGVtIGlzIG5vdCBpc1xuICAgICAgICAgICAgLy8gYmVsb3cgdGhlIHRvcCBhbmQgd2UgZGlkbnQgaGl0IHRoZSBmYWN0b3IgeWV0IHNvXG4gICAgICAgICAgICAvLyBhdXRvcGFnZSBhbmQgYnJlYWtcbiAgICAgICAgICAgIGlmIChpdGVtLnBvc2l0aW9uKCkudG9wIDwgMCkge1xuICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseShzY29wZS5uZXdzU2Nyb2xsQXV0b1BhZ2UpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb3VudGVyICs9IDE7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLy8gbWFyayByZWFkXG4gICAgdmFyIG1hcmtSZWFkID0gZnVuY3Rpb24gKGVuYWJsZWQsIGVsZW0sIHNjb3BlKSB7XG4gICAgICAgIGlmIChlbmFibGVkKSB7XG4gICAgICAgICAgICB2YXIgaWRzID0gW107XG4gICAgICAgICAgICB2YXIgYXJ0aWNsZXMgPSBlbGVtLmZpbmQoJy5pdGVtOm5vdCgucmVhZCknKTtcblxuICAgICAgICAgICAgYXJ0aWNsZXMuZWFjaChmdW5jdGlvbihpbmRleCwgYXJ0aWNsZSkge1xuICAgICAgICAgICAgICAgIHZhciBpdGVtID0gJChhcnRpY2xlKTtcblxuICAgICAgICAgICAgICAgIGlmIChpdGVtLnBvc2l0aW9uKCkudG9wIDw9IC0xMCkge1xuICAgICAgICAgICAgICAgICAgICBpZHMucHVzaChwYXJzZUludChpdGVtLmRhdGEoJ2lkJyksIDEwKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzY29wZS5pdGVtSWRzID0gaWRzO1xuICAgICAgICAgICAgc2NvcGUuJGFwcGx5KHNjb3BlLm5ld3NTY3JvbGxNYXJrUmVhZCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgcmV0dXJuIHtcbiAgICAgICAgcmVzdHJpY3Q6ICdBJyxcbiAgICAgICAgc2NvcGU6IHtcbiAgICAgICAgICAgICduZXdzU2Nyb2xsJzogJ0AnLFxuICAgICAgICAgICAgJ25ld3NTY3JvbGxBdXRvUGFnZSc6ICcmJyxcbiAgICAgICAgICAgICduZXdzU2Nyb2xsTWFya1JlYWQnOiAnJicsXG4gICAgICAgICAgICAnbmV3c1Njcm9sbEVuYWJsZWRNYXJrUmVhZCc6ICc9JyxcbiAgICAgICAgfSxcbiAgICAgICAgbGluazogZnVuY3Rpb24gKHNjb3BlLCBlbGVtKSB7XG4gICAgICAgICAgICB2YXIgYWxsb3dTY3JvbGwgPSB0cnVlO1xuICAgICAgICAgICAgdmFyIHNjcm9sbEFyZWEgPSBlbGVtO1xuXG4gICAgICAgICAgICBpZiAoc2NvcGUubmV3c1Njcm9sbCkge1xuICAgICAgICAgICAgICAgIHNjcm9sbEFyZWEgPSAkKHNjb3BlLm5ld3NTY3JvbGwpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc2Nyb2xsSGFuZGxlciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAvLyBhbGxvdyBvbmx5IG9uZSBzY3JvbGwgZXZlbnQgdG8gdHJpZ2dlciBldmVyeSAzMDBtc1xuICAgICAgICAgICAgICAgIGlmIChhbGxvd1Njcm9sbCkge1xuICAgICAgICAgICAgICAgICAgICBhbGxvd1Njcm9sbCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsbG93U2Nyb2xsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSwgU0NST0xMX1RJTUVPVVQqMTAwMCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYXV0b1BhZ2UoSVRFTV9BVVRPX1BBR0VfU0laRSwgZWxlbSwgc2NvcGUpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvbnQgc3RhY2sgbWFyayByZWFkIHJlcXVlc3RzXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aW1lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQuY2FuY2VsKHRpbWVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFsbG93IHVzZXIgdG8gdW5kbyBhY2NpZGVudGFsIHNjcm9sbFxuICAgICAgICAgICAgICAgICAgICB0aW1lciA9ICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtSZWFkKHNjb3BlLm5ld3NTY3JvbGxFbmFibGVkTWFya1JlYWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltZXIgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIH0sIE1BUktfUkVBRF9USU1FT1VUKjEwMDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHNjcm9sbEFyZWEub24oJ3Njcm9sbCcsIHNjcm9sbEhhbmRsZXIpO1xuXG4gICAgICAgICAgICAvLyByZW1vdmUgc2Nyb2xsIGhhb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ICAgICAgdmFyIHZhbHVlID0gYm94LnZhbCgpO1xuICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm9uU2VhcmNoKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGJveC5vbignc2VhcmNoIGtleXVwJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50LnR5cGUgPT09ICdzZWFyY2gnIHx8IGV2ZW50LmtleUNvZGUgPT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvU2VhcmNoKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIGNhcnJ5IG92ZXIgc2VhcmNoIG9uIHJvdXRlIGNoYW5nZVxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJGxvY2F0aW9uLnNlYXJjaCgpO1xuICAgICAgICAgICAgfSwgZnVuY3Rpb24gKHNlYXJjaCkge1xuICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggJiYgc2VhcmNoLnNlYXJjaCkge1xuICAgICAgICAgICAgICAgICAgICBib3gudmFsKHNlYXJjaC5zZWFyY2gpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJveC52YWwoJycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbn1dKTtcbiIsIi8qKlxuICogb3duQ2xvdWQgLSBOZXdzXG4gKlxuICogVGhpcyBmaWxlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBBZmZlcm8gR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJzaW9uIDMgb3JcbiAqIGxhdGV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ICdAJ1xuICAgICAgICB9LFxuICAgICAgICBsaW5rOiBmdW5jdGlvbiAoc2NvcGUsIGVsZW0pIHtcbiAgICAgICAgICAgIGVsZW0uY2xpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciB0YXJnZXQgPSAkKHNjb3BlLm5ld3NUb2dnbGVTaG93KTtcbiAgICAgICAgICAgICAgICB0YXJnZXQudG9nZ2xlKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59KTtcbiIsIi8qKlxuICogb3duQ2xvdWQgLSBOZXdzXG4gKlxuICogVGhpcyBmaWxlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBBZmZlcm8gR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJzaW9uIDMgb3JcbiAqIGxhdGVyLiBTZWUgdGhlIENPUFlJTkcgZmlsZS5cbiAqXG4gKiBAYXV0aG9yIEJlcm5oYXJkIFBvc3NlbHQgPGRldkBiZXJuaGFyZC1wb3NzZWx0LmNvbT5cbiAqIEBjb3B5cmlnaHQgQmVybmhhcmQgUG9zc2VsdCAyMDE0XG4gKi9cbmFwcC5kaXJlY3RpdmUoJ25ld3NUcmlnZ2VyQ2xpY2snLCBmdW5jdGlvbiAoKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgcmV0dXJuIGZ1bmN0aW9uIChzY29wZSwgZWxtLCBhdHRyKSB7XG4gICAgICAgIGVsbS5jbGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAkKGF0dHIubmV3c1RyaWdnZXJDbGljaykudHJpZ2dlcignY2xpY2snKTtcbiAgICAgICAgfSk7XG4gICAgfTtcblxufSk7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 +b(a,s,p)):[85].indexOf(t)>=0?(e.preventDefault(),E(s)):[69].indexOf(t)>=0?(e.preventDefault(),F(s)):[73,83,76].indexOf(t)>=0?(e.preventDefault(),C(s)):[72].indexOf(t)>=0?(e.preventDefault(),C(s),R(s)):[79].indexOf(t)>=0?(e.preventDefault(),I(s)):[82].indexOf(t)>=0?(e.preventDefault(),d(a)):[70].indexOf(t)>=0?(e.preventDefault(),f(a)):[68].indexOf(t)>=0?(e.preventDefault(),m(a)):[67].indexOf(t)>=0?(e.preventDefault(),g(a)):[65].indexOf(t)>=0?(e.preventDefault(),u(a)):[86].indexOf(t)>=0?(e.preventDefault(),v(a)):[81].indexOf(t)>=0?(e.preventDefault(),n("#searchbox").focus()):[33].indexOf(t)>=0&&c(a,s):r(n(":focus"))&&e.shiftKey&&[65].indexOf(t)>=0&&(e.preventDefault(),o(a))})}(window,document,$),window.News=window.News||{},function(e,t,n,r,i){"use strict";var o=[];r.addArticleAction=function(e){o.push(e)},r.getArticleActionPlugins=function(){return o}}(window,document,jQuery,window.News),app.run(["$document","$rootScope",function(e,t){"use strict";e.click(function(e){t.$broadcast("documentClicked",e)})}]),app.directive("appNavigationEntryUtils",function(){"use strict";return{restrict:"C",link:function(e,t){var n=t.siblings(".app-navigation-entry-menu"),r=$(t).find(".app-navigation-entry-utils-menu-button button");r.click(function(){n.toggleClass("open")}),e.$on("documentClicked",function(e,t){t.target!==r[0]&&n.removeClass("open")})}}}),app.directive("newsAddFeed",["$rootScope","$timeout",function(e,t){"use strict";return{restrict:"A",link:function(n,r){e.$on("addFeed",function(e,i){t(function(){r.is(":animated")?(r.stop(!0,!0),r.show()):r.is(":visible")||r.slideDown(),r.find('[ng-model="Navigation.feed.url"]').focus()}),n.Navigation.feed.url=i})}}}]),app.directive("newsArticleActions",function(){"use strict";return{restrict:"A",scope:{newsArticleActions:"=",noPlugins:"="},link:function(e,t){for(var n=News.getArticleActionPlugins(),r=0;r=0;o-=1){var s=$(i[o]);if(r>=e)break;if(s.position().top<0){n.$apply(n.newsScrollAutoPage);break}r+=1}},s=function(e,t,n){if(e){var r=[],i=t.find(".item:not(.read)");i.each(function(e,t){var n=$(t);return n.position().top<=-10?void r.push(parseInt(n.data("id"),10)):!1}),n.itemIds=r,n.$apply(n.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(a,u){var d=!0,c=u;a.newsScroll&&(c=$(a.newsScroll));var l=function(){d&&(d=!1,e(function(){d=!0},1e3*r),o(t,u,a),i&&e.cancel(i),i=e(function(){s(a.newsScrollEnabledMarkRead,u,a),i=void 0},1e3*n))};c.on("scroll",l),a.$on("$destroy",function(){c.off("scroll",l)})}}}]),app.directive("newsSearch",["$document","$location",function(e,t){"use strict";return{restrict:"E",scope:{onSearch:"="},link:function(e){var n=$("#searchbox");n.val(t.search().search);var r=function(){var t=n.val();e.$apply(function(){e.onSearch(t)})};n.on("search keyup",function(e){("search"===e.type||13===e.keyCode)&&r()}),e.$watch(function(){return t.search()},function(e){e&&e.search?n.val(e.search):n.val("")})}}}]),app.directive("newsStickyMenu",function(){"use strict";return function(e,t,n){var r=40;$(n.newsStickyMenu).scroll(function(){var e=$(this).scrollTop();e>r?(t.addClass("fixed"),t.css("top",e)):t.removeClass("fixed")})}}),app.directive("newsStopPropagation",function(){"use strict";return{restrict:"A",link:function(e,t){t.bind("click",function(e){e.stopPropagation()})}}}),app.directive("newsTimeout",["$timeout","$rootScope",function(e,t){"use strict";return{restrict:"A",scope:{newsTimeout:"&"},link:function(n,r){var i=!1,o=7,s=e(n.newsTimeout,1e3*o);n.$on("$destroy",function(){i=!0,e.cancel(s)}),t.$on("$locationChangeStart",function(){e.cancel(s),i||(i=!0,r.remove(),n.newsTimeout())})}}}]),app.directive("newsTitleUnreadCount",["$window",function(e){"use strict";var t=e.document.title,n=t.split("-"),r=n[0]||"News",i=n[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(t,n,o){o.$observe("unreadCount",function(t){"0"!==t?e.document.title=r+"("+t+") - "+i:e.document.title=r+" - "+i})}}}]),app.directive("newsToggleShow",function(){"use strict";return{restrict:"A",scope:{newsToggleShow:"@"},link:function(e,t){t.click(function(){var t=$(e.newsToggleShow);t.toggle()})}}}),app.directive("newsTriggerClick",function(){"use strict";return function(e,t,n){t.click(function(){$(n.newsTriggerClick).trigger("click")})}}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFwcC5qcyIsIkNvbmZpZy5qcyIsIlJ1bi5qcyIsIkFwcENvbnRyb2xsZXIuanMiLCJDb250ZW50Q29udHJvbGxlci5qcyIsIkV4cGxvcmVDb250cm9sbGVyLmpzIiwiTmF2aWdhdGlvbkNvbnRyb2xsZXIuanMiLCJTZXR0aW5nc0NvbnRyb2xsZXIuanMiLCJUcnVzdFVybC5qcyIsIlVucmVhZENvdW50Rm9ybWF0dGVyLmpzIiwiRmVlZFJlc291cmNlLmpzIiwiRm9sZGVyUmVzb3VyY2UuanMiLCJJdGVtUmVzb3VyY2UuanMiLCJMb2FkaW5nLmpzIiwiT1BNTEltcG9ydGVyLmpzIiwiT1BNTFBhcnNlci5qcyIsIlB1Ymxpc2hlci5qcyIsIlJlc291cmNlLmpzIiwiU2V0dGluZ3NSZXNvdXJjZS5qcyIsIkV4dGVyblN1YnNjcmlwdGlvbi5qcyIsIkZpeGVzLmpzIiwiS2V5Ym9hcmRTaG9ydGN1dHMuanMiLCJBcnRpY2xlQWN0aW9uUGx1Z2luLmpzIiwiQXBwTmF2aWdhdGlvbkVudHJ5VXRpbHMuanMiLCJOZXdzQWRkRmVlZC5qcyIsIk5ld3NBcnRpY2xlQWN0aW9ucy5qcyIsIk5ld3NBdXRvRm9jdXMuanMiLCJOZXdzQmluZFVuc2FmZUh0bWwuanMiLCJOZXdzRHJhZ2dhYmxlLmpzIiwiTmV3c0Ryb3BwYWJsZS5qcyIsIk5ld3NGaW5pc2hlZFRyYW5zaXRpb24uanMiLCJOZXdzRm9jdXMuanMiLCJOZXdzSW5zdGFudE5vdGlmaWNhdGlvbi5qcyIsIk5ld3NQbGF5T25lLmpzIiwiTmV3c1B1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iAgICAgICAgICAgICAgICAgICAgICAgJ2luZm9ybWF0aW9uIScpLFxuICAgICAgICA1MDM6IHQoJ25ld3MnLCAnUmVxdWVzdCBmYWlsZWQsIG93bkNsb3VkIGlzIGluIGN1cnJlbnRseSAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgJ2luIG1haW50ZW5hbmNlIG1vZGUhJyksXG4gICAgfTtcbiAgICAkcHJvdmlkZS5mYWN0b3J5KCdDb25uZWN0aW9uRXJyb3JJbnRlcmNlcHRvcicsIFtcIiRxXCIsIFwiJHRpbWVvdXRcIiwgZnVuY3Rpb24gKCRxLCAkdGltZW91dCkge1xuICAgICAgICB2YXIgdGltZXI7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByZXNwb25zZUVycm9yOiBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAvLyBzdGF0dXMgMCBpcyBhIG5ldHdvcmsgZXJyb3JcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzIGluIGVycm9yTWVzc2FnZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRpbWVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dC5jYW5jZWwodGltZXIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIE9DLk5vdGlmaWNhdGlvbi5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICAgIE9DLk5vdGlmaWNhdGlvbi5zaG93SHRtbChlcnJvck1lc3NhZ2VzW3Jlc3BvbnNlLnN0YXR1c10pO1xuICAgICAgICAgICAgICAgICAgICB0aW1lciA9ICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE9DLk5vdGlmaWNhdGlvbi5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDUwMDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4g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1xuXG4gICAgICAgICAgICAgICAgdmFyIGRlZmVycmVkID0gJHEuZGVmZXIoKTtcblxuICAgICAgICAgICAgICAgIC8vIGlmIHRob3NlIHR3byB2YWx1ZXMgYXJlIG51bGwgaXQgbWVhbnMgd2UgZGlkIG5vdCByZWNlaXZlXG4gICAgICAgICAgICAgICAgLy8gdGhlIHNldHRpbmdzIHJlcXVlc3QgZnJvbSB0aGUgc2VydmVyIHNvIGRvbnQgcXVlcnkgdGhlIHNlcnZlclxuICAgICAgICAgICAgICAgIGlmIChzaG93QWxsID09PSBudWxsIHx8IG9sZGVzdEZpcnN0ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoe30pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbWV0ZXJzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbWl0OiBJVEVNX0JBVENIX1NJWkUsXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93QWxsOiBzaG93QWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgb2xkZXN0Rmlyc3Q6IG9sZGVzdEZpcnN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VhcmNoOiBzZWFyY2hcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoJHJvdXRlLmN1cnJlbnQgIT09IHVuZGVmaW5lZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgJHJvdXRlLmN1cnJlbnQucGFyYW1zICE9PSB1bmRlZmluZWQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICRyb3V0ZS5jdXJyZW50LnBhcmFtcy5pZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmlkID0gJHJvdXRlLmN1cnJlbnQucGFyYW1zLmlkO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgYSBjdXN0b20gb3JkZXJpbmcgaXMgc2V0XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSBGRUVEX1RZUEUuRkVFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZlZWQgPSBGZWVkUmVzb3VyY2UuZ2V0QnlJZChwYXJhbWV0ZXJzLmlkKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gaW50aWFsIGxvYWQsIHRoZSBmZWVkIG9yZGVyaW5nIGlzIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZlZWQgPT09IHVuZGVmaW5lZCB8fCBmZWVkLm9yZGVyaW5nID09PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5vbGRlc3RGaXJzdCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmZWVkLm9yZGVyaW5nID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5vbGRlc3RGaXJzdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAkaHR0cCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICBCQVNFX1VSTCArICcvaXRlbXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnR0VUJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtczogcGFyYW1ldGVyc1xuICAgICAgICAgICAgICAgICAgICB9KS5zdWNjZXNzKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgIC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AgICAgICAgICAgICAgIHZhciB1cmwgPSBTZXR0aW5nc1Jlc291cmNlLmdldCgnZXhwbG9yZVVybCcpXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFwvKyQvLCAnJyk7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cGxvcmVVcmwgPSB1cmwgKyAnL2ZlZWRzLicgKyBsYW5ndWFnZSArICcuanNvbic7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZWZhdWx0RXhwbG9yZVVybCA9IHVybCArICcvZmVlZHMuZW4uanNvbic7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkaHR0cFxuICAgICAgICAgICAgICAgICAgICAgICAgLmdldChleHBsb3JlVXJsKVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGh0dHAuZ2V0KGRlZmF1bHRFeHBsb3JlVXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKGRhdGEuZGF0YSk7XG4gICAgICAgICAgICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgICAgICAgfV1cbiAgICAgICAgfTtcbiAgICB9O1xuXG4gICAgJHJvdXRlUHJvdmlkZXJcbiAgICAgICAgLndoZW4oJy9pdGVtcycsIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXI6ICdDb250ZW50Q29udHJvbGxlciBhcyBDb250ZW50JyxcbiAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnY29udGVudC5odG1sJyxcbiAgICAgICAgICAgIHJlc29sdmU6IGdldEl0ZW1SZXNvbHZlKGZlZWRUeXBlLlNVQlNDUklQVElPTlMpLFxuICAgICAgICAgICAgdHlwZTogZmVlZFR5cGUuU1VCU0NSSVBUSU9OU1xuICAgICAgICB9KVxuICAgICAgICAud2hlbignL2l0ZW1zL3N0YXJyZWQnLCB7XG4gICAgICAgICAgICBjb250cm9sbGVyOiAnQ29udGVudENvbnRyb2xsZXIgYXMgQ29udGVudCcsXG4gICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2NvbnRlbnQuaHRtbCcsXG4gICAgICAgICAgICByZXNvbHZlOiBnZXRJdGVtUmVzb2x2ZShmZWVkVHlwZS5TVEFSUkVEKSxcbiAgICAgICAgICAgIHR5cGU6IGZlZWRUeXBlLlNUQVJSRURcbiAgICAgICAgfSlcbiAgICAgICAgLndoZW4oJy9pdGVtcy9mZWVkcy86aWQnLCB7XG4gICAgICAgICAgICBjb250cm9sbGVyOiAnQ29udGVudENvbnRyb2xsZXIgYXMgQ29udGVudCcsXG4gICAgICAgICAgICB0ZW1wbGF0ZVVybDogJ2NvbnRlbnQuaHRtbCcsXG4gICAgICAgICAgICByZXNvbHZlOiBnZXRJdGVtUmVzb2x2ZShmZWVkVHlwZS5GRUVEKSxcbiAgICAgICAgICAgIHR5cGU6IGZlZWRUeXBlLkZFRURcbiAgICAgICAgfSlcbiAgICAgICAgLndoZW4oJy9pdGVtcy9mb2xkZXJzLzppZCcsIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXI6ICdDb250ZW50Q29udHJvbGxlciBhcyBDb250ZW50JyxcbiAgICAgICAgICAgIHRlbXBsYXRlVXJsOiAnY29udGVudC5odG1sJyxcbiAgICAgICAgICAgIHJlc29sdmU6IGdldEl0ZW1SZXNvbHZlKGZlZWRUeXBlLkZPTERFUiksXG4gICAgICAgICAgICB0eXBlOiBmZWVkVHlwZS5GT0xERVJcbiAgICAgICAgfSkud2hlbignL2V4c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iBTZXR0aW5nc1Jlc291cmNlLmdldCgnY29tcGFjdEV4cGFuZCcpO1xuICAgIH07XG5cbiAgICB0aGlzLmF1dG9QYWdpbmdFbmFibGVkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5pc0F1dG9QYWdpbmdFbmFibGVkO1xuICAgIH07XG5cbiAgICB0aGlzLm1hcmtSZWFkRW5hYmxlZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuICFTZXR0aW5nc1Jlc291cmNlLmdldCgncHJldmVudFJlYWRPblNjcm9sbCcpO1xuICAgIH07XG5cbiAgICB0aGlzLnNjcm9sbFJlYWQgPSBmdW5jdGlvbiAoaXRlbUlkcykge1xuICAgICAgICB2YXIgaWRzID0gW107XG4gICAgICAgIHZhciBmZWVkSWRzID0gW107XG5cbiAgICAgICAgaXRlbUlkcy5mb3JFYWNoKGZ1bmN0aW9uIChpdGVtSWQpIHtcbiAgICAgICAgICAgIHZhciBpdGVtID0gSXRlbVJlc291cmNlLmdldChpdGVtSWQpO1xuICAgICAgICAgICAgaWYgKCFpdGVtLmtlZXBVbnJlYWQpIHtcbiAgICAgICAgICAgICAgICBpZHMucHVzaChpdGVtSWQpO1xuICAgICAgICAgICAgICAgIGZlZWRJZHMucHVzaChpdGVtLmZlZWRJZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmIChpZHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgRmVlZFJlc291cmNlLm1hcmtJdGVtc09mRmVlZHNSZWFkKGZlZWRJZHMpO1xuICAgICAgICAgICAgSXRlbVJlc291cmNlLm1hcmtJdGVtc1JlYWQoaWRzKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLmlzRmVlZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuICRyb3V0ZS5jdXJyZW50LiQkcm91dGUudHlwZSA9PT0gRkVFRF9UWVBFLkZFRUQ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4gICAgICAgICAgICB9LCBmdW5jdGlvbiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgIGZvbGRlci5yZW5hbWVFcnJvciA9IG1lc3NhZ2U7XG4gICAgICAgICAgICB9KS5maW5hbGx5KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBzZWxmLnJlbmFtaW5nRm9sZGVyID0gZmFsc2U7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnJldmVyc2libHlEZWxldGVGZWVkID0gZnVuY3Rpb24gKGZlZWQpIHtcbiAgICAgICAgRmVlZFJlc291cmNlLnJldmVyc2libHlEZWxldGUoZmVlZC5pZCkuZmluYWxseShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAkcm91dGUucmVsb2FkKCk7XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICB0aGlzLnVuZG9EZWxldGVGZWVkID0gZnVuY3Rpb24gKGZlZWQpIHtcbiAgICAgICAgRmVlZFJlc291cmNlLnVuZG9EZWxldGUoZmVlZC5pZCkuZmluYWxseShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAkcm91dGUucmVsb2FkKCk7XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICB0aGlzLmRlbGV0ZUZlZWQgPSBmdW5jdGlvbiAoZmVlZCkge1xuICAgICAgICBGZWVkUmVzb3VyY2UuZGVsZXRlKGZlZWQudXJsKTtcbiAgICB9O1xuXG5cbiAgICB0aGlzLnJldmVyc2libHlEZWxldGVGb2xkZXIgPSBmdW5jdGlvbiAoZm9sZGVyKSB7XG4gICAgICAgICRxLmFsbChcbiAgICAgICAgICAgIEZlZWRSZXNvdXJjZS5yZXZlcnNpYmx5RGVsZXRlRm9sZGVyKGZvbGRlci5pZCksXG4gICAgICAgICAgICBGb2xkZXJSZXNvdXJjZS5yZXZlcnNpYmx5RGVsZXRlKGZvbGRlci5uYW1lKVxuICAgICAgICApLmZpbmFsbHkoZnVuY3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gICAgICAgICAkcm91dGUucmVsb2FkKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy50b2dnbGVTZXR0aW5nID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICBzZXQoa2V5LCAhdGhpcy5nZXRTZXR0aW5nKGtleSkpO1xuICAgIH07XG5cbiAgICB0aGlzLmdldFNldHRpbmcgPSBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHJldHVybiBTZXR0aW5nc1Jlc291cmNlLmdldChrZXkpO1xuICAgIH07XG5cbiAgICB0aGlzLmltcG9ydE9QTUwgPSBmdW5jdGlvbiAoY29udGVudCkge1xuICAgICAgICB0aGlzLm9wbWxJbXBvcnRFcnJvciA9IGZhbHNlO1xuICAgICAgICB0aGlzLmFydGljbGVJbXBvcnRFcnJvciA9IGZhbHNlO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aGlzLmlzT1BNTEltcG9ydGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIHBhcnNlZENvbnRlbnQgPSBPUE1MUGFyc2VyLnBhcnNlKGNvbnRlbnQpO1xuXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgICAgICB2YXIgam9iU2l6ZSA9IDU7XG5cbiAgICAgICAgICAgIE9QTUxJbXBvcnRlci5pbXBvcnRGb2xkZXJzKHBhcnNlZENvbnRlbnQpXG4gICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoZmVlZFF1ZXVlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIE9QTUxJbXBvcnRlci5pbXBvcnRGZWVkUXVldWUoZmVlZFF1ZXVlLCBqb2JTaXplKTtcbiAgICAgICAgICAgIH0pLmZpbmFsbHkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNPUE1MSW1wb3J0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICB0aGlzLmlzT1BNTEltcG9ydGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5vcG1sSW1wb3J0RXJyb3IgPSB0cnVlO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuaW1wb3J0QXJ0aWNsZXMgPSBmdW5jdGlvbiAoY29udGVudCkge1xuICAgICAgICB0aGlzLm9wbWxJbXBvcnRFcnJvciA9IGZhbHNlO1xuICAgICAgICB0aGlzLmFydGljbGVJbXBvcnRFcnJvciA9IGZhbHNlO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aGlzLmlzQXJ0aWNsZXNJbXBvcnRpbmcgPSB0cnVlO1xuICAgICAgICAgICAgdmFyIGFydGljbGVzID0gSlNPTi5wYXJzZShjb250ZW50KTtcblxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgSXRlbVJlc291cmNlLmltcG9ydEFydGljbGVzKGFydGljbGVzKS5zdWNjZXNzKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgUHVibGlzaGVyLnB1Ymxpc2hBbGwoZGF0YSk7XG4gICAgICAgICAgICB9KS5maW5hbGx5KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmlzQXJ0aWNsZXNJbXBvcnRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgIHRoaXMuYXJ0aWNsZUltcG9ydEVycm9yID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMuaXNBcnRpY2xlc0ltcG9ydGluZyA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgfTtcblxufV0pOyIsIi8qKlxuICogb3duQ2xvdWQgLSBOZXdzXG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Q291bnQ6IDBcbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLmFkZChmZWVkKTtcbiAgICAgICAgdGhpcy51cGRhdGVGb2xkZXJDYWNoZSgpO1xuXG4gICAgICAgIHZhciBkZWZlcnJlZCA9IHRoaXMuJHEuZGVmZXIoKTtcblxuICAgICAgICB0aGlzLmh0dHAoe1xuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICB1cmw6IHRoaXMuQkFTRV9VUkwgKyAnL2ZlZWRzJyxcbiAgICAgICAgICAgIGRhdGE6IHtcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcbiAgICAgICAgICAgICAgICBwYXJlbnRGb2xkZXJJZDogZm9sZGVySWQgfHwgMCxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkuc3VjY2VzcyhmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShkYXRhKTtcbiAgICAgICAgfSkuZXJyb3IoZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgIGZlZWQuZmF2aWNvbkxpbmsgPSAnJztcbiAgICAgICAgICAgIGZlZWQuZXJyb3IgPSBkYXRhLm1lc3NhZ2U7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgfTtcblxuXG4gICAgRmVlZFJlc291cmNlLnByb3RvdHlwZS5yZXZlcnNpYmx5RGVsZXRlID0gZnVuY3Rpb24gKGlkLCB1cGRhdGVDYWNoZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNGb2xkZXIpIHtcbiAgICAgICAgdmFyIGZlZWQgPSB0aGlzLmdldEJ5SWQoaWQpO1xuXG4gICAgICAgIC8vIGlmIGEgZm9sZG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LnVybCwgZmFsc2UpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLnVwZGF0ZVVucmVhZENhY2hlKCk7XG4gICAgICAgIHRoaXMudXBkYXRlRm9sZGVyQ2FjaGUoKTtcbiAgICB9O1xuXG5cbiAgICBGZWVkUmVzb3VyY2UucHJvdG90eXBlLnVuZG9EZWxldGUgPSBmdW5jdGlvbiAoaWQsIHVwZGF0ZUNhY2hlKSB7XG4gICAgICAgIHZhciBmZWVkID0gdGhpcy5nZXRCeUlkKGlkKTtcblxuICAgICAgICBpZiAoZmVlZCkge1xuICAgICAgICAgICAgZmVlZC5kZWxldGVkID0gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXBkYXRlQ2FjaGUgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZVVucmVhZENhY2hlKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5odHRwLnBvc3QodGhpcy5CQVNFX1VSTCArICcvZmVlZHMvJyArIGlkICsgJy9yZXN0b3JlJyk7XG4gICAgfTtcblxuXG4gICAgRmVlZFJlc291cmNlLnByb3RvdHlwZS51bmRvRGVsZXRlRm9sZGVyID0gZnVuY3Rpb24gKGZvbGRlcklkKSB7XG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcbiAgICAgICAgdmFyIHByb21pc2VzID0gW107XG5cbiAgICAgICAgdGhpcy5nZXRCeUZvbGRlcklkKGZvbGRlcklkKS5mb3JFYWNoKGZ1bmN0aW9uIChmZWVkKSB7XG4gICAgICAgICAgICBwcm9taXNlcy5wdXNoKHNlbGYudW5kb0RlbGV0ZShmZWVkLmlkLCBmYWxzZSkpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLnVwZGF0ZVVucmVhZENhY2hlKCk7XG5cbiAgICAgICAgdmFyIGRlZmVycmVkID0gdGhpcy4kcS5hbGwocHJvbWlzZXMpO1xuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJv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0YXJyZWQgPSBpc1N0YXJyZWQ7XG5cbiAgICAgICAgaWYgKGlzU3RhcnJlZCkge1xuICAgICAgICAgICAgdGhpcy5zdGFycmVkQ291bnQgKz0gMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3RhcnJlZENvdW50IC09IDE7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5odHRwKHtcbiAgICAgICAgICAgIHVybDogdXJsLFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgaXNTdGFycmVkOiBpc1N0YXJyZWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcblxuXG4gICAgSXRlbVJlc291cmNlLnByb3RvdHlwZS50b2dnbGVTdGFyID0gZnVuY3Rpb24gKGl0ZW1JZCkge1xuICAgICAgICBpZiAodGhpcy5nZXQoaXRlbUlkKS5zdGFycmVkKSB7XG4gICAgICAgICAgICB0aGlzLnN0YXIoaXRlbUlkLCBmYWxzZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN0YXIoaXRlbUlkLCB0cnVlKTtcbiAgICAgICAgfVxuICAgIH07XG5cblxuICAgIEl0ZW1SZXNvdXJjZS5wcm90b3R5cGUubWFya0l0ZW1SZWFkID0gZnVuY3Rpb24gKGl0ZW1JZCwgaXNSZWFkKSB7XG4gICAgICAgIGlmIChpc1JlYWQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaXNSZWFkID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuZ2V0KGl0ZW1JZCkudW5yZWFkID0gIWlzUmVhZDtcblxuICAgICAgICByZXR1cm4gdGhpcy5odHRwKHtcbiAgICAgICAgICAgIHVybDogdGhpcy5CQVNFX1VSTCArICcvaXRlbXMvJyArIGl0ZW1JZCArICcvcmVhZCcsXG4gICAgICAgICA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0dHAoe1xuICAgICAgICAgICAgdXJsOiB0aGlzLkJBU0VfVVJMICsgJy9pdGVtcycsXG4gICAgICAgICAgICBtZXRob2Q6ICdHRVQnLFxuICAgICAgICAgICAgcGFyYW1zOiB7XG4gICAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgICBpZDogaWQsXG4gICAgICAgICAgICAgICAgb2Zmc2V0OiBvZmZzZXQsXG4gICAgICAgICAgICAgICAgbGltaXQ6IHRoaXMuYmF0Y2hTaXplLFxuICAgICAgICAgICAgICAgIG9sZGVzdEZpcnN0OiBvbGRlc3RGaXJzdCxcbiAgICAgICAgICAgICAgICBzaG93QWxsOiBzaG93QWxsLFxuICAgICAgICAgICAgICAgIHNlYXJjaDogc2VhcmNoXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG5cblxuICAgIEl0ZW1SZXNvdXJjZS5wcm90b3R5cGUuaW1wb3J0QXJ0aWNsZXMgPSBmdW5jdGlvbiAoanNvbikge1xuICAgICAgICByZXR1cm4gdGhpcy5odHRwKHtcbiAgICAgICAgICAgIHVybDogdGhpcy5CQVNFX1VSTCArICcvZmVlZHMvaW1wb3J0L2FydGljbGVzJyxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIGpzb246IGpzb25cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcblxuXG4gICAgcmV0dXJuIG5ldyBJdGVtUmVzb3VyY2UoJGh0dHAsIEJBU0VfVVJMLCBJVEVNX0JBVENIX1NJWkUpO1xufV0pOyIsIi8qKlxuICogb3duQ2xvdWQgLSBOZXdzXG4gKlxuICogVGhpcyBmaWxlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBBZmZlcm8gR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJzaW9uIDMgb3JcbiAqIGxhdGVyLiBTZWUgdGhlIENPUFlJT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Y3Rpb24gKEZlZWRSZXNvdXJjZSwgRm9sZGVyUmVzb3VyY2UsIFB1Ymxpc2hlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHEpIHtcbiAgICAndXNlIHN0cmljdCc7XG4gICAgdmFyIHN0YXJ0RmVlZEpvYiA9IGZ1bmN0aW9uIChxdWV1ZSkge1xuICAgICAgICB2YXIgZGVmZXJyZWQgPSAkcS5kZWZlcigpO1xuXG4gICAgICAgIGlmIChxdWV1ZS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICB2YXIgZmVlZCA9IHF1ZXVlLnBvcCgpO1xuICAgICAgICAgICAgdmFyIHVybCA9IGZlZWQudXJsO1xuICAgICAgICAgICAgdmFyIHRpdGxlID0gZmVlZC50aXRsZTtcbiAgICAgICAgICAgIHZhciBmb2xkZXJJZCA9IDA7XG4gICAgICAgICAgICB2YXIgZm9sZGVyTmFtZSA9IGZlZWQuZm9sZGVyTmFtZTtcblxuICAgICAgICAgICAgaWYgKGZvbGRlck5hbWUgIT09IHVuZGVmaW5lZCAmJlxuICAgICAgICAgICAgICAgIEZvbGRlclJlc291cmNlLmdldChmb2xkZXJOYW1lKSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGRlciA9IEZvbGRlclJlc291cmNlLmdldChmb2xkZXJOYW1lKTtcbiAgICAgICAgICAgICAgICBmb2xkZXIub3BlbmVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBmb2xkZXJJZCA9IGZvbGRlci5pZDtcblxuICAgICAgICAgICAgICAgIC8vIGRpc3BsYXkgZm9sZGVyIHdoaWxlIGFkZGluZyB0aGUgZmVlZFxuICAgICAgICAgICAgICAgIGZvbGRlci5nZXRzRmVlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgZm9sZGVyLmdldHNGZWVkQ291bnRlciA9IGZvbGRlci5nZXRzRmVlZENvdW50ZXIgfHwgMDtcbiAgICAgICAgICAgICAgICBmb2xkZXIuZ2V0c0ZlZWRDb3VudGVyICs9IDE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG1ha2Ugc3VyZSB0byBub3QgYWRkIGFscmVhZHkgZXhpc3RpbmcgZmVlZHNcbiAgICAgICAgICAgIGlmICh1cmwgIT09IHVuZGVmaW5lZCAmJiBGZWVkUmVzb3VyY2UuZ2V0KHVybCkgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIEZlZWRSZXNvdXJjZS5jcmVhdGUodXJsLCBmb2xkZXJJZCwgdGl0bGUpXG4gICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgUHVibGlzaGVyLnB1Ymxpc2hBbGwoZGF0YSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuZmluYWxseShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkZXJJZCAhPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZGVyLmdldHNGZWVkQ291bnRlciAtPSAxO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZGVyLmdldHNGZWVkQ291bnRlciA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRlci5nZXRzRmVlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0RmVlZEpvYihxdWV1ZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICB9O1xuXG4gICAgdGhpcy5pbXBvcnRGb2xkZXJzID0gZnVuY3Rpb24gKGNvbnRlbnQpIHtcbiAgICAgICAgLy8gYXNzdW1wdGlvbjogZm9sZGVycyBhcmUgZmFzdCB0byBjcmVhdGUgYW5kIHdlIGRvbnQgbmVlZCBhIHF1ZXVlIGZvclxuICAgICAgICAvLyB0aGVtXG4gICAgICAgIHZhciBmZWVkUXVldWUgPSBbXTtcbiAgICAgICAgdmFyIGZvbGRlclByb21pc2VzID0gW107XG4gICAgICAgIGNvbnRlbnQuZm9sZGVycy5mb3JFYWNoKGZ1bmN0aW9uIChmb2xkZXIpIHtcbiAgICAgICAgICAgIGlmIChmb2xkZXIubmFtZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgLy8gc2tpcCBhbHJlYWR5IGNyZWF0ZWQgZm9sZGVyc1xuICAgICAgICAgICAgICAgIGlmIChGb2xkZXJSZXNvdXJjZS5nZXQoZm9sZGVyLm5hbWUpID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb21pc2UgPSBGb2xkZXJSZXNvdXJjZS5jcmVhdGUoZm9sZGVyLm5hbWUpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBQdWJsaXNoZXIucHVibGlzaEFsbChkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRlclByb21pc2VzLnB1c2gocHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9sZGVyLmZlZWRzLmZvckVhY2goZnVuY3Rpb24gKGZlZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgZmVlZC5mb2xkZXJOYW1lID0gZm9sZGVyLm5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGZlZWRRdWV1ZS5wdXNoKGZlZWQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAg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mFyIHJlY3Vyc2l2ZWx5UGFyc2UgPSBmdW5jdGlvbiAobGV2ZWwsIHJvb3QsIGZpcnN0TGV2ZWwpIHtcbiAgICAgICAgZm9yICh2YXIgaT0wOyBpPGxldmVsLmxlbmd0aDsgaSs9MSkge1xuICAgICAgICAgICAgdmFyIG91dGxpbmUgPSAkKGxldmVsW2ldKTtcblxuICAgICAgICAgICAgdmFyIGVudHJ5ID0gcGFyc2VPdXRsaW5lKG91dGxpbmUpO1xuXG4gICAgICAgICAgICBpZiAoZW50cnkudHlwZSA9PT0gJ2ZlZWQnKSB7XG4gICAgICAgICAgICAgICAgcm9vdC5mZWVkcy5wdXNoKGVudHJ5KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAvLyBvbmx5IGZpcnN0IGxldmVsIHNob3VsZCBhcHBlbmQgZm9sZGVyc1xuICAgICAgICAgICAgICAgIGlmIChmaXJzdExldmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5UGFyc2Uob3V0bGluZS5jaGlsZHJlbignb3V0bGluZScpLCBlbnRyeSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICByb290LmZvbGRlcnMucHVzaChlbnRyeSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjdXJzaXZlbHlQYXJzZShvdXRsaW5lLmNoaWxkcmVuKCdvdXRsaW5lJyksIHJvb3QsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcm9vdDtcbiAgICB9O1xuXG4gICAgdGhpcy5wYXJzZSA9IGZ1bmN0aW9uICh4bWwpIHtcbiAgICAgICAgeG1sID0gJC5wYXJzZVhNTCh4bWwpO1xuICAgICAgICB2YXIgZmlyc3RMZXZlbCA9ICQoeG1sKS5maW5kKCdib2R5ID4gb3V0bGluZScpO1xuXG4gICAgIC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AnJ1xuICAgIH07XG4gICAgdGhpcy5kZWZhdWx0TGFuZ3VhZ2VDb2RlID0gJ2VuJztcbiAgICB0aGlzLnN1cHBvcnRlZExhbmd1YWdlQ29kZXMgPSBbXG4gICAgICAgICdhci1tYScsICdhcicsICdiZycsICdjYScsICdjcycsICdjdicsICdkYScsICdkZScsICdlbCcsICdlbicsICdlbi1jYScsXG4gICAgICAgICdlbi1nYicsICdlbycsICdlcycsICdldCcsICdldScsICdmaScsICdmci1jYScsICdmcicsICdnbCcsICdoZScsICdoaScsXG4gICAgICAgICdodScsICdpZCcsICdpcycsICdpdCcsICdqYScsICdrYScsICdrbycsICdsdicsICdtcy1teScsICduYicsICduZScsXG4gICAgICAgICdubCcsICdwbCcsICdwdC1icicsICdwdCcsICdybycsICdydScsICdzaycsICdzbCcsICdzdicsICd0aCcsICd0cicsXG4gICAgICAgICd0em0tbGEnLCAndHptJywgJ3VrJywgJ3poLWNuJywgJ3poLXR3J1xuICAgIF07XG5cbiAgICB0aGlzLmdldFN1cHBvcnRlZExhbmd1YWdlQ29kZXMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnN1cHBvcnRlZExhbmd1YWdlQ29kZXM7XG4gICAgfTtcblxuICAgIHRoaXMucmVjZWl2ZSA9IGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcbiAgICAgICAgT2JqZWN0LmtleXMoZGF0YSkuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBkYXRhW2tleV07XG5cbiAgICAgICAgICAgIGlmIChrZXkgPT09ICdsYW5ndWFnZScpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHNlbGYucHJvY2Vzc0xhbmd1YWdlQ29kZSh2YWx1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNlbGYuc2V0dGluZ3Nba2V5XSA9IHZhbHVlO1xuICAg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gICAgICAgICAgICAgICAgICAgICAgICAgICcuZmVlZDp2aXNpYmxlJyk7XG5cbiAgICAgICAgaWYgKGN1cnJlbnQuaGFzQ2xhc3MoJ2ZvbGRlcicpKSB7XG4gICAgICAgICAgICB3aGlsZSAoY3VycmVudC5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN1YmZlZWRzID0gY3VycmVudC5maW5kKCcuZmVlZDp2aXNpYmxlJyk7XG4gICAgICAgICAgICAgICAgaWYgKHN1YmZlZWRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYWN0aXZhdGVOYXZpZ2F0aW9uRW50cnkoJChzdWJmZWVkc1swXSksIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5uZXh0KCcuZm9sZGVyJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG5vIHN1YmZlZWQgZm91bmRcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FOiBPKG4pIHJ1bnRpbWUuIElmIHNvbWVvbmUgY3JlYXRlcyBhIG5pY2UgYW5kIG5vdCBmdWdseSBzb2x1dGlvblxuICAgICAgICAvLyBwbGVhc2UgY3JlYXRlIGEgUFJcbiAgICAgICAgZm9yICh2YXIgaT0wOyBpPGVsZW1lbnRzLmxlbmd0aC0xOyBpKz0xKSB7XG4gICAgICAgICAgICB2YXIgZWxlbWVudCA9IGVsZW1lbnRzW2ldO1xuXG4gICAgICAgICAgICBpZiAoZWxlbWVudCA9PT0gY3VycmVudFswXSkge1xuICAgICAgICAgICAgICAgIHZhciBuZXh0ID0gZWxlbWVudHNbaSsxXTtcbiAgICAgICAgICAgICAgICBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeSgkKG5leHQpLCBuYXZpZ2F0aW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hdGVOYXZpZ2F0aW9uRW50cnkoY3VycmVudC5uZXh0QWxsKCcuZm9sZGVyOnZpc2libGUnKS5maXJzdCgpLFxuICAgICAgICAgICAgICAgIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50Lmhhc0NsYXNzKCdmZWVkJykpIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRGb2xkZXIgPSBnZXRQYXJlbnRGb2xkZXIoY3VycmVudCk7XG4gICAgICAgICAgICBpZiAocGFyZW50Rm9sZGVyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeShcbiAgICAgICAgICAgICAgICAgICAgcGFyZW50Rm9sZGVyLm5leHRBbGwoJy5mb2xkZXI6dmlzaWJsZScpLmZpcnN0KCksXG4gICAgICAgICAgICAgICAgICAgIG5hdmlnYXRpb25BcmVhXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZWN0Rmlyc3RPckxhc3RGb2xkZXIobmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2VsZWN0Rmlyc3RPckxhc3RGb2xkZXIobmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBwcmV2aW91c0ZlZWQgPSBmdW5jdGlvbiAobmF2aWdhdGlvbkFyZWEpIHtcbiAgICAgICAgdmFyIGN1cnJlbnQgPSBuYXZpZ2F0aW9uQXJlYS5maW5kKCcuYWN0aXZlJyk7XG4gICAgICAgIHZhciBlbGVtZW50cyA9IG5hdmlnYXRpb25BcmVhLmZpbmQoJy5leHBsb3JlLWZlZWQsJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJy5zdWJzY3JpcHRpb25zLWZlZWQ6dmlzaWJsZSwnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnLnN0YXJyZWQtZmVlZDp2aXNpYmxlLCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcuZmVlZDp2aXNpYmxlJyk7XG5cbiAgICAgICAgLy8gc3BlY2lhbCBjYXNlOiBmb2xkZXIgc2VsZWN0ZWRcbiAgICAgICAgaWYgKGN1cnJlbnQuaGFzQ2xhc3MoJ2ZvbGRlcicpKSB7XG4gICAgICAgICAgICB2YXIgcHJldmlvdXNGb2xkZXIgPSBjdXJyZW50LnByZXYoJy5mb2xkZXInKTtcblxuICAgICAgICAgICAgd2hpbGUgKHByZXZpb3VzRm9sZGVyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc3ViZmVlZHMgPSBwcmV2aW91c0ZvbGRlci5maW5kKCcuZmVlZDp2aXNpYmxlJyk7XG4gICAgICAgICAgICAgICAgaWYgKHN1YmZlZWRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYWN0aXZhdGVOYXZpZ2F0aW9uRW50cnkoJChzdWJmZWVkc1tzdWJmZWVkcy5sZW5ndGgtMV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHByZXZpb3VzRm9sZGVyID0gcHJldmlvdXNGb2xkZXIucHJldignLmZvbGRlcicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBubyBzdWJmZWVkIGZvdW5kIHRyeSB2aXNpYmxlIGZlZWRzXG4gICAgICAgICAgICB2YXIgZmVlZHMgPSBjdXJyZW50LnNpYmxpbmdzKCcuZmVlZCcpO1xuXG4gICAgICAgICAgICBpZiAoZmVlZHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGFjdGl2YXRlTmF2aWdhdGlvbkVudHJ5KCQoZmVlZHNbZmVlZHMubGVuZ3RoLTFdKSxcbiAgICAgICAgICAgICAgICAgICAgbmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICAvLyBubyBmZWVkIGZvdW5kLCBnbyB0byBzdGFycmVkXG4gICAgICAgICAgICB2YXIgc3RhcnJlZCA9ICQoJy5zdGFycmVkLWZlZWQ6dmlzaWJsZScpO1xuICAgICAgICAgICAgaWYgKHN0YXJyZWQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGFjdGl2YXRlTmF2aWdhdGlvbkVudHJ5KHN0YXJyZWQsIG5hdmlnYXRpb25BcmVhKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gRklYTUU6IE8obikgcnVudGltZS4gSWYgc29tZW9uZSBjcmVhdGVzIGEgbmljZSBhbmQgbm90IGZ1Z2x5IHNvbHV0aW9uXG4gICAgICAgIC8vIHBsZWFzZSBjcmVhdGUgYSBQUlxuICAgICAgICBmb3IgKHZhciBpPWVsZW1lbnRzLmxlbmd0aC0xOyBpPjA7IGktPTEpIHtcbiAgICAgICAgICAgIHZhciBlbGVtZW50ID0gZWxlbWVudHNbaV07XG5cbiAgICAgICAgICAgIGlmIChlbGVtZW50ID09PSBjdXJyZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgdmFyIHByZXZpb3VzID0gZWxlbWVudHNbaS0xXTtcbiAgICAgICAgICAgICAgICBhY3RpdmF0ZU5hdmlnYXRpb25FbnRyeSgkKHByZXZpb3VzKSwgbmF2aWdhdGlvbkFyZWEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBvbkFjdGl2ZUl0ZW0gPSBmdW5jdGlvbiAoc2Nyb2x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ICAgICAvLyBqLCBuLCByaWdodCBhcnJvd1xuICAgICAgICAgICAgaWYgKFs3NCwgNzgsIDM5XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgc2Nyb2xsVG9OZXh0SXRlbShzY3JvbGxBcmVhLCBleHBhbmRJdGVtSW5Db21wYWN0KTtcblxuICAgICAgICAgICAgLy8gaywgcCwgbGVmdCBhcnJvd1xuICAgICAgICAgICAgfSBlbHNlIGlmIChbNzUsIDgwLCAzN10uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHNjcm9sbFRvUHJldmlvdXNJdGVtKG5hdmlnYXRpb25BcmVhLCBzY3JvbGxBcmVhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cGFuZEl0ZW1JbkNvbXBhY3QpO1xuXG4gICAgICAgICAgICAvLyB1XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs4NV0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRvZ2dsZVVucmVhZChzY3JvbGxBcmVhKTtcblxuICAgICAgICAgICAgLy8gZVxuICAgICAgICAgICAgfSBlbHNlIGlmIChbNjldLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBleHBhbmRJdGVtKHNjcm9sbEFyZWEpO1xuXG4gICAgICAgICAgICAvLyBzLCBpLCBsXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs3MywgODMsIDc2XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgdG9nZ2xlU3RhcihzY3JvbGxBcmVhKTtcblxuICAgICAgICAgICAgLy8gaFxuICAgICAgICAgICAgfSBlbHNlIGlmIChbNzJdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0b2dnbGVTdGFyKHNjcm9sbEFyZWEpO1xuICAgICAgICAgICAgICAgIHNjcm9sbFRvTmV4dEl0ZW0oc2Nyb2xsQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIG9cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzc5XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgb3Blbkxpbmsoc2Nyb2xsQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzgyXS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgcmVsb2FkRmVlZChuYXZpZ2F0aW9uQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIGZcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzcwXS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgbmV4dEZlZWQobmF2aWdhdGlvbkFyZWEpO1xuXG4gICAgICAgICAgICAvLyBkXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs2OF0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHByZXZpb3VzRmVlZChuYXZpZ2F0aW9uQXJlYSk7XG5cbiAgICAgICAgICAgIC8vIGNcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoWzY3XS5pbmRleE9mKGtleUNvZGUpID49IDApIHtcblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgcHJldmlvdXNGb2xkZXIobmF2aWdhdGlvbkFyZWEpO1xuXG4gICAgICAgICAgICAvLyBhXG4gICAgICAgICAgICB9IGVsc2UgaWYgKFs2NV0uaW5kZXhPZihrZXlDb2RlKSA+PSAwKSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHNjcm9sbFRvQWN0aXZlTmF2aWdhdGlvbkVudHJ5KG5hdmlnYXRpb25BcmVhKTtcblxuICAgICAgICAgICAgLy8gdlxuICAgICAgICAgICAgfSBlbHNlIGlmIChbODZdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBuZXh0Rm9sZGVyKG5hdmlnYXRpb25BcmVhKTtcblxuICAgICAgICAgICAgLy8gcVxuICAgICAgICAgICAgfSBlbHNlIGlmIChbODFdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAkKCcjc2VhcmNoYm94JykuZm9jdXMoKTtcblxuICAgICAgICAgICAgLy8gcGFnZSB1cFxuICAgICAgICAgICAgfSBlbHNlIGlmIChbMzNdLmluZGV4T2Yoa2V5Q29kZSkgPj0gMCkge1xuXG4gICAgICAgICAgICAgICAgdHJ5UmVsb2FkKG5hdmlnYXRpb25BcmVhLCBzY3J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cblxuICAgICAgICAgICAgYXJ0aWNsZXMuZWFjaChmdW5jdGlvbihpbmRleCwgYXJ0aWNsZSkge1xuICAgICAgICAgICAgICAgIHZhciBpdGVtID0gJChhcnRpY2xlKTtcblxuICAgICAgICAgICAgICAgIGlmIChpdGVtLnBvc2l0aW9uKCkudG9wIDw9IC0xMCkge1xuICAgICAgICAgICAgICAgICAgICBpZHMucHVzaChwYXJzZUludChpdGVtLmRhdGEoJ2lkJyksIDEwKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzY29wZS5pdGVtSWRzID0gaWRzO1xuICAgICAgICAgICAgc2NvcGUuJGFwcGx5KHNjb3BlLm5ld3NTY3JvbGxNYXJrUmVhZCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgcmV0dXJuIHtcbiAgICAgICAgcmVzdHJpY3Q6ICdBJyxcbiAgICAgICAgc2NvcGU6IHtcbiAgICAgICAgICAgICduZXdzU2Nyb2xsJzogJ0AnLFxuICAgICAgICAgICAgJ25ld3NTY3JvbGxBdXRvUGFnZSc6ICcmJyxcbiAgICAgICAgICAgICduZXdzU2Nyb2xsTWFya1JlYWQnOiAnJicsXG4gICAgICAgICAgICAnbmV3c1Njcm9sbEVuYWJsZWRNYXJrUmVhZCc6ICc9JyxcbiAgICAgICAgfSxcbiAgICAgICAgbGluazogZnVuY3Rpb24gKHNjb3BlLCBlbGVtKSB7XG4gICAgICAgICAgICB2YXIgYWxsb3dTY3JvbGwgPSB0cnVlO1xuICAgICAgICAgICAgdmFyIHNjcm9sbEFyZWEgPSBlbGVtO1xuXG4gICAgICAgICAgICBpZiAoc2NvcGUubmV3c1Njcm9sbCkge1xuICAgICAgICAgICAgICAgIHNjcm9sbEFyZWEgPSAkKHNjb3BlLm5ld3NTY3JvbGwpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc2Nyb2xsSGFuZGxlciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAvLyBhbGxvdyBvbmx5IG9uZSBzY3JvbGwgZXZlbnQgdG8gdHJpZ2dlciBldmVyeSAzMDBtc1xuICAgICAgICAgICAgICAgIGlmIChhbGxvd1Njcm9sbCkge1xuICAgICAgICAgICAgICAgICAgICBhbGxvd1Njcm9sbCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsbG93U2Nyb2xsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSwgU0NST0xMX1RJTUVPVVQqMTAwMCk7XG5cbiAgICAgICAgICAgICAgICAgICAgYXV0b1BhZ2UoSVRFTV9BVVRPX1BBR0VfU0laRSwgZWxlbSwgc2NvcGUpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvbnQgc3RhY2sgbWFyayByZWFkIHJlcXVlc3RzXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aW1lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWVvdXQuY2FuY2VsKHRpbWVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFsbG93IHVzZXIgdG8gdW5kbyBhY2NpZGVudGFsIHNjcm9sbFxuICAgICAgICAgICAgICAgICAgICB0aW1lciA9ICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtSZWFkKHNjb3BlLm5ld3NTY3JvbGxFbmFibGVkTWFya1JlYWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltZXIgPSB1bmRl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uICAgICAgICBsaW5rOiBmdW5jdGlvbiAoc2NvcGUpIHtcbiAgICAgICAgICAgIHZhciBib3ggPSAkKCcjc2VhcmNoYm94Jyk7XG4gICAgICAgICAgICBib3gudmFsKCRsb2NhdGlvbi5zZWFyY2goKS5zZWFyY2gpO1xuXG4gICAgICAgICAgICB2YXIgZG9TZWFyY2ggPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gYm94LnZhbCgpO1xuICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm9uU2VhcmNoKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGJveC5vbignc2VhcmNoIGtleXVwJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50LnR5cGUgPT09ICdzZWFyY2gnIHx8IGV2ZW50LmtleUNvZGUgPT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvU2VhcmNoKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIGNhcnJ5IG92ZXIgc2VhcmNoIG9uIHJvdXRlIGNoYW5nZVxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJGxvY2F0aW9uLnNlYXJjaCgpO1xuICAgICAgICAgICAgfSwgZnVuY3Rpb24gKHNlYXJjaCkge1xuICAgICAgICAgICAgICAgIGlmIChzZWFyY2ggJiYgc2VhcmNoLnNlYXJjaCkge1xuICAgICAgICAgICAgICAgICAgICBib3gudmFsKHNlYXJjaC5zZWFyY2gpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJveC52YWwoJycpO1xuICAgICAgICAg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WdnZXJDbGljaykudHJpZ2dlcignY2xpY2snKTtcbiAgICAgICAgfSk7XG4gICAgfTtcblxufSk7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 diff --git a/js/directive/NewsRefreshMasonry.js b/js/directive/NewsRefreshMasonry.js index a921de13d..c197ebbfa 100644 --- a/js/directive/NewsRefreshMasonry.js +++ b/js/directive/NewsRefreshMasonry.js @@ -17,7 +17,7 @@ app.directive('newsRefreshMasonry', function ($timeout) { gutter: 25, columnWidth: 300 }); - }); + }, 100); }); }; @@ -26,4 +26,4 @@ app.directive('newsRefreshMasonry', function ($timeout) { refresh(elem); } }; -}); \ No newline at end of file +});