17.js 175 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380
  1. (window.webpackJsonpNVIV = window.webpackJsonpNVIV || []).push([
  2. [17], {
  3. 1674: function(e, t, n) {
  4. "use strict";
  5. Object.defineProperty(t, "__esModule", {
  6. value: !0
  7. });
  8. var o = n(0),
  9. r = n(2048),
  10. i = n(1887),
  11. a = n(1939),
  12. s = n(1938),
  13. l = n(1940),
  14. c = n(1941),
  15. u = n(3),
  16. p = n(1942),
  17. d = n(168),
  18. m = n(1711),
  19. g = n(1943),
  20. f = n(440),
  21. v = n(625),
  22. h = n(1707),
  23. M = n(1908),
  24. C = n(1861),
  25. x = n(1709),
  26. y = n(0),
  27. S = function() {
  28. function e() {}
  29. return e.ɵmod = y.ɵɵdefineNgModule({
  30. type: e
  31. }),
  32. e.ɵinj = y.ɵɵdefineInjector({
  33. factory: function(t) {
  34. return new(t || e)
  35. },
  36. providers: [{
  37. provide: i.MEASUREMENTS_COMPONENT,
  38. useValue: r.MeasurementsComponent
  39. }],
  40. imports: [
  41. [u.CommonModule, d.TranslocoModule, m.SharedModule, f.MatDialogModule, v.MatButtonModule, h.FlexModule, x.MatIconModule, C.MatProgressSpinnerModule]
  42. ]
  43. }),
  44. e
  45. }();
  46. t.MeasurementsModule = S,
  47. ("undefined" == typeof ngJitMode || ngJitMode) && y.ɵɵsetNgModuleScope(S, {
  48. declarations: [r.MeasurementsComponent, s.MeasurementToolSelectionComponent, a.MeasurementToolComponent, l.MeasurementListComponent, c.MeasurementListToolbarComponent, p.MeasurementDetailsComponent, g.DepthMapWarnButtonComponent, g.DepthMapWarnButtonComponent, M.MeasurementExportModalComponent],
  49. imports: [u.CommonModule, d.TranslocoModule, m.SharedModule, f.MatDialogModule, v.MatButtonModule, h.FlexModule, x.MatIconModule, C.MatProgressSpinnerModule]
  50. }),
  51. y.ɵsetClassMetadata(S, [{
  52. type: o.NgModule,
  53. args: [{
  54. imports: [u.CommonModule, d.TranslocoModule, m.SharedModule, f.MatDialogModule, v.MatButtonModule, h.FlexModule, x.MatIconModule, C.MatProgressSpinnerModule],
  55. declarations: [r.MeasurementsComponent, s.MeasurementToolSelectionComponent, a.MeasurementToolComponent, l.MeasurementListComponent, c.MeasurementListToolbarComponent, p.MeasurementDetailsComponent, g.DepthMapWarnButtonComponent, g.DepthMapWarnButtonComponent, M.MeasurementExportModalComponent],
  56. entryComponents: [r.MeasurementsComponent],
  57. providers: [{
  58. provide: i.MEASUREMENTS_COMPONENT,
  59. useValue: r.MeasurementsComponent
  60. }]
  61. }]
  62. }], null, null)
  63. },
  64. 1692: function(e, t, n) {
  65. "use strict";
  66. Object.defineProperty(t, "__esModule", {
  67. value: !0
  68. });
  69. var o = n(0),
  70. r = n(210),
  71. i = n(0),
  72. a = function() {
  73. function e(e, t) {
  74. this.renderer = e,
  75. this.el = t
  76. }
  77. return e.prototype.ngAfterViewInit = function() {
  78. var e = this.el.nativeElement.attributes.getNamedItem("src").value,
  79. t = r.makeUrlAbsolute(e);
  80. this.renderer.setAttribute(this.el.nativeElement, "src", t)
  81. },
  82. e.ɵfac = function(t) {
  83. return new(t || e)(i.ɵɵdirectiveInject(i.Renderer2), i.ɵɵdirectiveInject(i.ElementRef))
  84. },
  85. e.ɵdir = i.ɵɵdefineDirective({
  86. type: e,
  87. selectors: [
  88. ["img"]
  89. ]
  90. }),
  91. e
  92. }();
  93. t.AddBaseUrlDirective = a,
  94. i.ɵsetClassMetadata(a, [{
  95. type: o.Directive,
  96. args: [{
  97. selector: "img"
  98. }]
  99. }], (function() {
  100. return [{
  101. type: i.Renderer2
  102. }, {
  103. type: i.ElementRef
  104. }]
  105. }), null)
  106. },
  107. 1693: function(e, t, n) {
  108. "use strict";
  109. Object.defineProperty(t, "__esModule", {
  110. value: !0
  111. });
  112. var o = n(8),
  113. r = n(230),
  114. i = n(0),
  115. a = function() {
  116. function e(e, t, n) {
  117. this.loader = e,
  118. this.injector = t,
  119. this.vcr = n
  120. }
  121. return e.prototype.ngOnInit = function() {
  122. this.loadComponent().catch(o.handleWarning)
  123. },
  124. e.prototype.loadComponent = function() {
  125. var e = this;
  126. return r.runWithBaseHref((function() {
  127. return e.loader.load(e.modulePath).then((function(t) {
  128. var n = t.create(e.injector),
  129. o = n.injector.get(e.componentId),
  130. r = n.componentFactoryResolver.resolveComponentFactory(o);
  131. return e.vcr.createComponent(r)
  132. }))
  133. }))
  134. },
  135. e.ɵfac = function(t) {
  136. return new(t || e)(i.ɵɵdirectiveInject(i.NgModuleFactoryLoader), i.ɵɵdirectiveInject(i.Injector), i.ɵɵdirectiveInject(i.ViewContainerRef))
  137. },
  138. e.ɵdir = i.ɵɵdefineDirective({
  139. type: e
  140. }),
  141. e
  142. }();
  143. t.AbstractLazyComponent = a
  144. },
  145. 1696: function(e, t, n) {
  146. "use strict";
  147. Object.defineProperty(t, "__esModule", {
  148. value: !0
  149. });
  150. var o, r = n(0),
  151. i = n(168),
  152. a = n(440),
  153. s = n(3),
  154. l = n(625),
  155. c = n(1707),
  156. u = n(0),
  157. p = n(440),
  158. d = n(3),
  159. m = n(1689),
  160. g = n(625);
  161. function f(e, t) {
  162. if (1 & e && (u.ɵɵelementStart(0, "p"),
  163. u.ɵɵtext(1),
  164. u.ɵɵelementEnd()),
  165. 2 & e) {
  166. var n = u.ɵɵnextContext();
  167. u.ɵɵadvance(1),
  168. u.ɵɵtextInterpolate(n.bodyText)
  169. }
  170. }
  171. function v(e, t) {
  172. 1 & e && u.ɵɵelementContainer(0)
  173. }
  174. function h(e, t) {
  175. if (1 & e) {
  176. var n = u.ɵɵgetCurrentView();
  177. u.ɵɵelementStart(0, "button", 6),
  178. u.ɵɵlistener("click", (function() {
  179. return u.ɵɵrestoreView(n),
  180. u.ɵɵnextContext().cancel()
  181. })),
  182. u.ɵɵtext(1),
  183. u.ɵɵelementEnd()
  184. }
  185. if (2 & e) {
  186. var o = u.ɵɵnextContext();
  187. u.ɵɵadvance(1),
  188. u.ɵɵtextInterpolate1(" ", o.cancelButtonText, " ")
  189. }
  190. }
  191. function M(e, t) {
  192. if (1 & e) {
  193. var n = u.ɵɵgetCurrentView();
  194. u.ɵɵelementStart(0, "button", 6),
  195. u.ɵɵlistener("click", (function() {
  196. return u.ɵɵrestoreView(n),
  197. u.ɵɵnextContext().decline()
  198. })),
  199. u.ɵɵtext(1),
  200. u.ɵɵelementEnd()
  201. }
  202. if (2 & e) {
  203. var o = u.ɵɵnextContext();
  204. u.ɵɵadvance(1),
  205. u.ɵɵtextInterpolate1(" ", o.declineButtonText, " ")
  206. }
  207. }
  208. function C(e, t) {
  209. if (1 & e) {
  210. var n = u.ɵɵgetCurrentView();
  211. u.ɵɵelementStart(0, "button", 7),
  212. u.ɵɵlistener("click", (function() {
  213. return u.ɵɵrestoreView(n),
  214. u.ɵɵnextContext().confirm()
  215. })),
  216. u.ɵɵtext(1),
  217. u.ɵɵelementEnd()
  218. }
  219. if (2 & e) {
  220. var o = u.ɵɵnextContext();
  221. u.ɵɵproperty("color", o.confirmButtonColor),
  222. u.ɵɵadvance(1),
  223. u.ɵɵtextInterpolate1(" ", o.confirmButtonText, " ")
  224. }
  225. }! function(e) {
  226. e[e.CONFIRMED = 0] = "CONFIRMED",
  227. e[e.DECLINED = 1] = "DECLINED",
  228. e[e.CANCELLED = 2] = "CANCELLED"
  229. }(o = t.AlertDialogResult || (t.AlertDialogResult = {}));
  230. var x = function() {
  231. function e(e, t) {
  232. var n;
  233. this.dialogRef = e,
  234. this.data = t,
  235. this.confirmButtonColor = "primary",
  236. this.data && (this.title = t.title,
  237. this.confirmButtonColor = null !== (n = t.confirmButtonColor) && void 0 !== n ? n : "primary",
  238. t.body instanceof r.TemplateRef ? this.bodyTemplate = t.body : "string" == typeof t.body && (this.bodyText = t.body), !1 !== t.cancelButton && (this.cancelButtonText = t.cancelButton ? "" + t.cancelButton : i.translate("Cancel")), !1 !== t.declineButton && (this.declineButtonText = t.declineButton ? "" + t.declineButton : i.translate("Decline")), !1 !== t.confirmButton && (this.confirmButtonText = t.confirmButton ? "" + t.confirmButton : i.translate("Confirm")))
  239. }
  240. return e.prototype.beforeUnload = function(e) {
  241. e.returnValue = i.translate("Do you want to navigate away from the current page?")
  242. },
  243. e.prototype.confirm = function() {
  244. this.dialogRef.close(o.CONFIRMED)
  245. },
  246. e.prototype.decline = function() {
  247. this.dialogRef.close(o.DECLINED)
  248. },
  249. e.prototype.cancel = function() {
  250. this.dialogRef.close(o.CANCELLED)
  251. },
  252. e.ɵfac = function(t) {
  253. return new(t || e)(u.ɵɵdirectiveInject(p.MatDialogRef), u.ɵɵdirectiveInject(a.MAT_DIALOG_DATA))
  254. },
  255. e.ɵcmp = u.ɵɵdefineComponent({
  256. type: e,
  257. selectors: [
  258. ["alert-dialog"]
  259. ],
  260. hostBindings: function(e, t) {
  261. 1 & e && u.ɵɵlistener("beforeunload", (function(e) {
  262. return t.beforeUnload(e)
  263. }), !1, u.ɵɵresolveWindow)
  264. },
  265. decls: 10,
  266. vars: 6,
  267. consts: [
  268. ["mat-dialog-title", ""],
  269. [4, "ngIf"],
  270. [4, "ngTemplateOutlet"],
  271. ["mat-stroked-button", "", 3, "click", 4, "ngIf"],
  272. ["fxFlex", "1 1 auto"],
  273. ["mat-flat-button", "", 3, "color", "click", 4, "ngIf"],
  274. ["mat-stroked-button", "", 3, "click"],
  275. ["mat-flat-button", "", 3, "color", "click"]
  276. ],
  277. template: function(e, t) {
  278. 1 & e && (u.ɵɵelementStart(0, "h4", 0),
  279. u.ɵɵtext(1),
  280. u.ɵɵelementEnd(),
  281. u.ɵɵelementStart(2, "mat-dialog-content"),
  282. u.ɵɵtemplate(3, f, 2, 1, "p", 1),
  283. u.ɵɵtemplate(4, v, 1, 0, "ng-container", 2),
  284. u.ɵɵelementEnd(),
  285. u.ɵɵelementStart(5, "mat-dialog-actions"),
  286. u.ɵɵtemplate(6, h, 2, 1, "button", 3),
  287. u.ɵɵelement(7, "div", 4),
  288. u.ɵɵtemplate(8, M, 2, 1, "button", 3),
  289. u.ɵɵtemplate(9, C, 2, 2, "button", 5),
  290. u.ɵɵelementEnd()),
  291. 2 & e && (u.ɵɵadvance(1),
  292. u.ɵɵtextInterpolate(t.title),
  293. u.ɵɵadvance(2),
  294. u.ɵɵproperty("ngIf", t.bodyText),
  295. u.ɵɵadvance(1),
  296. u.ɵɵproperty("ngTemplateOutlet", t.bodyTemplate),
  297. u.ɵɵadvance(2),
  298. u.ɵɵproperty("ngIf", t.cancelButtonText),
  299. u.ɵɵadvance(2),
  300. u.ɵɵproperty("ngIf", t.declineButtonText),
  301. u.ɵɵadvance(1),
  302. u.ɵɵproperty("ngIf", t.confirmButtonText))
  303. },
  304. directives: [p.MatDialogTitle, p.MatDialogContent, d.NgIf, d.NgTemplateOutlet, p.MatDialogActions, m.DefaultFlexDirective, g.MatButton],
  305. encapsulation: 2
  306. }),
  307. e
  308. }();
  309. t.AlertDialogComponent = x,
  310. u.ɵsetClassMetadata(x, [{
  311. type: r.Component,
  312. args: [{
  313. selector: "alert-dialog",
  314. templateUrl: "./AlertDialog.ng.html"
  315. }]
  316. }], (function() {
  317. return [{
  318. type: p.MatDialogRef
  319. }, {
  320. type: void 0,
  321. decorators: [{
  322. type: r.Inject,
  323. args: [a.MAT_DIALOG_DATA]
  324. }]
  325. }]
  326. }), {
  327. beforeUnload: [{
  328. type: r.HostListener,
  329. args: ["window:beforeunload", ["$event"]]
  330. }]
  331. });
  332. var y = function() {
  333. function e() {}
  334. return e.ɵmod = u.ɵɵdefineNgModule({
  335. type: e
  336. }),
  337. e.ɵinj = u.ɵɵdefineInjector({
  338. factory: function(t) {
  339. return new(t || e)
  340. },
  341. imports: [
  342. [s.CommonModule, c.FlexLayoutModule, a.MatDialogModule, l.MatButtonModule]
  343. ]
  344. }),
  345. e
  346. }();
  347. t.AlertDialogModule = y,
  348. ("undefined" == typeof ngJitMode || ngJitMode) && u.ɵɵsetNgModuleScope(y, {
  349. declarations: [x],
  350. imports: [s.CommonModule, c.FlexLayoutModule, a.MatDialogModule, l.MatButtonModule],
  351. exports: [x]
  352. }),
  353. u.ɵsetClassMetadata(y, [{
  354. type: r.NgModule,
  355. args: [{
  356. imports: [s.CommonModule, c.FlexLayoutModule, a.MatDialogModule, l.MatButtonModule],
  357. declarations: [x],
  358. exports: [x]
  359. }]
  360. }], null, null)
  361. },
  362. 1697: function(e, t, n) {
  363. "use strict";
  364. Object.defineProperty(t, "__esModule", {
  365. value: !0
  366. });
  367. var o = n(0),
  368. r = n(624),
  369. i = n(2),
  370. a = n(6),
  371. s = n(3),
  372. l = n(0),
  373. c = function() {
  374. function e(e) {
  375. this.ElementRef = e,
  376. this.valueChange = new o.EventEmitter,
  377. this.disabled = !1,
  378. this.ident = void 0
  379. }
  380. return e.prototype.ngOnInit = function() {
  381. this.ident = this.ElementRef.nativeElement.getAttribute("id"),
  382. this.ElementRef.nativeElement.setAttribute("id", void 0)
  383. },
  384. e.prototype.registerOnChange = function(e) {
  385. this.changeFn = e
  386. },
  387. e.prototype.registerOnTouched = function(e) {
  388. this.touchFn = e
  389. },
  390. e.prototype.setDisabledState = function(e) {
  391. this.disabled = e
  392. },
  393. e.prototype.writeValue = function(e) {
  394. this.value = e,
  395. this.valueChange.emit(this.value),
  396. this.changeFn && this.changeFn(this.value)
  397. },
  398. e.prototype.onInputTouched = function() {
  399. this.disabled || (this.touchFn && this.touchFn(),
  400. this.writeValue(!this.value))
  401. },
  402. e.ɵfac = function(t) {
  403. return new(t || e)(l.ɵɵdirectiveInject(l.ElementRef))
  404. },
  405. e.ɵcmp = l.ɵɵdefineComponent({
  406. type: e,
  407. selectors: [
  408. ["toggle-switch"]
  409. ],
  410. inputs: {
  411. title: "title",
  412. value: "value"
  413. },
  414. outputs: {
  415. valueChange: "valueChange"
  416. },
  417. features: [l.ɵɵProvidersFeature([{
  418. provide: r.NG_VALUE_ACCESSOR,
  419. useExisting: o.forwardRef((function() {
  420. return e
  421. })),
  422. multi: !0
  423. }])],
  424. decls: 3,
  425. vars: 3,
  426. consts: [
  427. [1, "toggle-switch", 3, "title"],
  428. ["type", "checkbox", 3, "id", "checked", "click"],
  429. [1, "slider"]
  430. ],
  431. template: function(e, t) {
  432. 1 & e && (l.ɵɵelementStart(0, "label", 0),
  433. l.ɵɵelementStart(1, "input", 1),
  434. l.ɵɵlistener("click", (function() {
  435. return t.onInputTouched()
  436. })),
  437. l.ɵɵelementEnd(),
  438. l.ɵɵelement(2, "span", 2),
  439. l.ɵɵelementEnd()),
  440. 2 & e && (l.ɵɵproperty("title", t.title),
  441. l.ɵɵadvance(1),
  442. l.ɵɵproperty("id", t.ident)("checked", t.value))
  443. },
  444. styles: ['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center}.toggle-switch[_ngcontent-%COMP%], [_nghost-%COMP%]{width:30px;height:17px}.toggle-switch[_ngcontent-%COMP%]{position:relative;display:inline-block;margin:0}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:#3398c7}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus + .slider[_ngcontent-%COMP%]{box-shadow:0 0 1px #3398c7}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;border-radius:17px}.toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%], .toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;-webkit-transition:.4s;transition:.4s}.toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{content:"";height:13px;width:13px;left:2px;bottom:2px;background-color:#fff;border-radius:50%}']
  445. }),
  446. e
  447. }();
  448. t.ToggleSwitchComponent = c,
  449. l.ɵsetClassMetadata(c, [{
  450. type: o.Component,
  451. args: [{
  452. selector: "toggle-switch",
  453. templateUrl: "./ToggleSwitch.ng.html",
  454. styleUrls: ["./ToggleSwitch.ng.scss"],
  455. providers: [{
  456. provide: r.NG_VALUE_ACCESSOR,
  457. useExisting: o.forwardRef((function() {
  458. return c
  459. })),
  460. multi: !0
  461. }]
  462. }]
  463. }], (function() {
  464. return [{
  465. type: l.ElementRef
  466. }]
  467. }), {
  468. title: [{
  469. type: o.Input
  470. }],
  471. value: [{
  472. type: o.Input
  473. }],
  474. valueChange: [{
  475. type: o.Output
  476. }]
  477. }),
  478. i.module("IVWebApp").directive("toggleSwitch", a.downgradeComponent({
  479. component: c
  480. }));
  481. var u = function() {
  482. function e() {}
  483. return e.ɵmod = l.ɵɵdefineNgModule({
  484. type: e
  485. }),
  486. e.ɵinj = l.ɵɵdefineInjector({
  487. factory: function(t) {
  488. return new(t || e)
  489. },
  490. imports: [
  491. [s.CommonModule]
  492. ]
  493. }),
  494. e
  495. }();
  496. t.ToggleSwitchModule = u,
  497. ("undefined" == typeof ngJitMode || ngJitMode) && l.ɵɵsetNgModuleScope(u, {
  498. declarations: [c],
  499. imports: [s.CommonModule],
  500. exports: [c]
  501. }),
  502. l.ɵsetClassMetadata(u, [{
  503. type: o.NgModule,
  504. args: [{
  505. imports: [s.CommonModule],
  506. declarations: [c],
  507. exports: [c]
  508. }]
  509. }], null, null)
  510. },
  511. 1700: function(e, t, n) {
  512. "use strict";
  513. Object.defineProperty(t, "__esModule", {
  514. value: !0
  515. });
  516. var o = n(0),
  517. r = (n(130),
  518. n(0)),
  519. i = n(130),
  520. a = function() {
  521. function e(e) {
  522. this.UoMService = e
  523. }
  524. return e.prototype.transform = function(e, t, n, o, r) {
  525. return void 0 === n && (n = 2),
  526. void 0 === o && (o = 0),
  527. void 0 === r && (r = !1),
  528. this.UoMService.convert(e, t, n, void 0, o, r)
  529. },
  530. e.ɵfac = function(t) {
  531. return new(t || e)(r.ɵɵdirectiveInject(i.UoMService))
  532. },
  533. e.ɵpipe = r.ɵɵdefinePipe({
  534. name: "uom",
  535. type: e,
  536. pure: !0
  537. }),
  538. e
  539. }();
  540. t.UoMPipe = a,
  541. r.ɵsetClassMetadata(a, [{
  542. type: o.Pipe,
  543. args: [{
  544. name: "uom"
  545. }]
  546. }], (function() {
  547. return [{
  548. type: i.UoMService
  549. }]
  550. }), null)
  551. },
  552. 1704: function(e, t, n) {
  553. "use strict";
  554. Object.defineProperty(t, "__esModule", {
  555. value: !0
  556. });
  557. var o = n(0),
  558. r = (n(17),
  559. n(0)),
  560. i = n(17),
  561. a = function() {
  562. function e(e) {
  563. this.ViewService = e,
  564. this.focusWhitelist = ["input", "select", "textarea"]
  565. }
  566. return e.prototype.ngDoCheck = function() {
  567. var e = document.activeElement,
  568. t = this.ViewService.mainView.divContainer.container;
  569. e !== t && -1 === this.focusWhitelist.indexOf(e.localName) && t.focus()
  570. },
  571. e.ɵfac = function(t) {
  572. return new(t || e)(r.ɵɵdirectiveInject(i.ViewService))
  573. },
  574. e.ɵdir = r.ɵɵdefineDirective({
  575. type: e,
  576. selectors: [
  577. ["", "redirectFocusToScene", ""]
  578. ]
  579. }),
  580. e
  581. }();
  582. t.RedirectFocusToMainViewDirective = a,
  583. r.ɵsetClassMetadata(a, [{
  584. type: o.Directive,
  585. args: [{
  586. selector: "[redirectFocusToScene]"
  587. }]
  588. }], (function() {
  589. return [{
  590. type: i.ViewService
  591. }]
  592. }), null)
  593. },
  594. 1705: function(e, t, n) {
  595. "use strict";
  596. Object.defineProperty(t, "__esModule", {
  597. value: !0
  598. });
  599. var o = n(0),
  600. r = n(2),
  601. i = n(6),
  602. a = n(0),
  603. s = function() {
  604. function e() {
  605. this.zoomIn = new o.EventEmitter,
  606. this.zoomOut = new o.EventEmitter
  607. }
  608. return e.prototype.fireZoomIn = function(e) {
  609. this.zoomIn.emit()
  610. },
  611. e.prototype.fireZoomOut = function(e) {
  612. this.zoomOut.emit()
  613. },
  614. e.ɵfac = function(t) {
  615. return new(t || e)
  616. },
  617. e.ɵcmp = a.ɵɵdefineComponent({
  618. type: e,
  619. selectors: [
  620. ["zoom-control"]
  621. ],
  622. outputs: {
  623. zoomIn: "zoomIn",
  624. zoomOut: "zoomOut"
  625. },
  626. decls: 5,
  627. vars: 0,
  628. consts: [
  629. [1, "btn-group-vertical", 3, "dblclick"],
  630. ["type", "button", 1, "btn", "btn-default", 3, "click"],
  631. [1, "fa", "fa-plus"],
  632. [1, "fa", "fa-minus"]
  633. ],
  634. template: function(e, t) {
  635. 1 & e && (a.ɵɵelementStart(0, "div", 0),
  636. a.ɵɵlistener("dblclick", (function(e) {
  637. return e.stopPropagation()
  638. })),
  639. a.ɵɵelementStart(1, "button", 1),
  640. a.ɵɵlistener("click", (function(e) {
  641. return t.fireZoomIn(e)
  642. })),
  643. a.ɵɵelement(2, "i", 2),
  644. a.ɵɵelementEnd(),
  645. a.ɵɵelementStart(3, "button", 1),
  646. a.ɵɵlistener("click", (function(e) {
  647. return t.fireZoomOut(e)
  648. })),
  649. a.ɵɵelement(4, "i", 3),
  650. a.ɵɵelementEnd(),
  651. a.ɵɵelementEnd())
  652. },
  653. styles: ["div[_ngcontent-%COMP%]{width:100%}div[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{border:none}"]
  654. }),
  655. e
  656. }();
  657. t.ZoomControlComponent = s,
  658. a.ɵsetClassMetadata(s, [{
  659. type: o.Component,
  660. args: [{
  661. selector: "zoom-control",
  662. templateUrl: "ZoomControl.ng.html",
  663. styleUrls: ["ZoomControl.ng.scss"]
  664. }]
  665. }], null, {
  666. zoomIn: [{
  667. type: o.Output
  668. }],
  669. zoomOut: [{
  670. type: o.Output
  671. }]
  672. }),
  673. r.module("IVWebApp").directive("zoomControl", i.downgradeComponent({
  674. component: s
  675. }))
  676. },
  677. 1711: function(e, t, n) {
  678. "use strict";
  679. Object.defineProperty(t, "__esModule", {
  680. value: !0
  681. });
  682. var o = n(0),
  683. r = n(1692),
  684. i = n(3),
  685. a = n(1700),
  686. s = n(1704),
  687. l = n(1697),
  688. c = n(1696),
  689. u = n(1705),
  690. p = n(0),
  691. d = function() {
  692. function e() {}
  693. return e.ɵmod = p.ɵɵdefineNgModule({
  694. type: e
  695. }),
  696. e.ɵinj = p.ɵɵdefineInjector({
  697. factory: function(t) {
  698. return new(t || e)
  699. },
  700. providers: [],
  701. imports: [
  702. [i.CommonModule, l.ToggleSwitchModule, c.AlertDialogModule]
  703. ]
  704. }),
  705. e
  706. }();
  707. t.SharedModule = d,
  708. ("undefined" == typeof ngJitMode || ngJitMode) && p.ɵɵsetNgModuleScope(d, {
  709. declarations: [r.AddBaseUrlDirective, s.RedirectFocusToMainViewDirective, a.UoMPipe, u.ZoomControlComponent],
  710. imports: [i.CommonModule, l.ToggleSwitchModule, c.AlertDialogModule],
  711. exports: [r.AddBaseUrlDirective, s.RedirectFocusToMainViewDirective, a.UoMPipe, u.ZoomControlComponent]
  712. }),
  713. p.ɵsetClassMetadata(d, [{
  714. type: o.NgModule,
  715. args: [{
  716. imports: [i.CommonModule, l.ToggleSwitchModule, c.AlertDialogModule],
  717. declarations: [r.AddBaseUrlDirective, s.RedirectFocusToMainViewDirective, a.UoMPipe, u.ZoomControlComponent],
  718. entryComponents: [u.ZoomControlComponent],
  719. exports: [r.AddBaseUrlDirective, s.RedirectFocusToMainViewDirective, a.UoMPipe, u.ZoomControlComponent],
  720. providers: []
  721. }]
  722. }], null, null)
  723. },
  724. 1887: function(e, t, n) {
  725. "use strict";
  726. var o, r = this && this.__extends || (o = function(e, t) {
  727. return (o = Object.setPrototypeOf || {
  728. __proto__: []
  729. }
  730. instanceof Array && function(e, t) {
  731. e.__proto__ = t
  732. } ||
  733. function(e, t) {
  734. for (var n in t)
  735. t.hasOwnProperty(n) && (e[n] = t[n])
  736. }
  737. )(e, t)
  738. },
  739. function(e, t) {
  740. function n() {
  741. this.constructor = e
  742. }
  743. o(e, t),
  744. e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
  745. new n)
  746. }
  747. );
  748. Object.defineProperty(t, "__esModule", {
  749. value: !0
  750. });
  751. var i = n(0),
  752. a = n(2),
  753. s = n(6),
  754. l = n(1693),
  755. c = n(0);
  756. t.MEASUREMENTS_COMPONENT = "MEASUREMENTS_COMPONENT";
  757. var u = function(e) {
  758. function n(n, o, r) {
  759. var i = e.call(this, n, o, r) || this;
  760. return i.modulePath = "./MeasurementsModule#MeasurementsModule",
  761. i.componentId = t.MEASUREMENTS_COMPONENT,
  762. i
  763. }
  764. return r(n, e),
  765. n.ɵfac = function(e) {
  766. return new(e || n)(c.ɵɵdirectiveInject(c.NgModuleFactoryLoader), c.ɵɵdirectiveInject(c.Injector), c.ɵɵdirectiveInject(c.ViewContainerRef))
  767. },
  768. n.ɵcmp = c.ɵɵdefineComponent({
  769. type: n,
  770. selectors: [
  771. ["measurements-lazy"]
  772. ],
  773. features: [c.ɵɵInheritDefinitionFeature],
  774. decls: 0,
  775. vars: 0,
  776. template: function(e, t) {},
  777. encapsulation: 2
  778. }),
  779. n
  780. }(l.AbstractLazyComponent);
  781. t.MeasurementsLazyComponent = u,
  782. c.ɵsetClassMetadata(u, [{
  783. type: i.Component,
  784. args: [{
  785. selector: "measurements-lazy",
  786. template: ""
  787. }]
  788. }], (function() {
  789. return [{
  790. type: c.NgModuleFactoryLoader
  791. }, {
  792. type: c.Injector
  793. }, {
  794. type: c.ViewContainerRef
  795. }]
  796. }), null),
  797. a.module("IVWebApp").directive("measurementsLazy", s.downgradeComponent({
  798. component: u
  799. }))
  800. },
  801. 1908: function(e, t, n) {
  802. "use strict";
  803. (function(e) {
  804. Object.defineProperty(t, "__esModule", {
  805. value: !0
  806. });
  807. var o = n(0),
  808. r = n(168),
  809. i = n(85),
  810. a = (n(626),
  811. n(440),
  812. n(641),
  813. n(107)),
  814. s = n(8),
  815. l = n(0),
  816. c = n(440),
  817. u = n(626),
  818. p = n(168),
  819. d = n(3),
  820. m = n(625),
  821. g = n(1692),
  822. f = n(1709),
  823. v = n(1861),
  824. h = n(1700),
  825. M = ["exportableMeasurementsDialog"];
  826. function C(e, t) {
  827. if (1 & e && (l.ɵɵelementStart(0, "span"),
  828. l.ɵɵtext(1),
  829. l.ɵɵelementEnd()),
  830. 2 & e) {
  831. var n = l.ɵɵnextContext(3).$implicit;
  832. l.ɵɵadvance(1),
  833. l.ɵɵtextInterpolate1("", n("Import all measurements"), ": ")
  834. }
  835. }
  836. function x(e, t) {
  837. if (1 & e && (l.ɵɵelementStart(0, "a", 15),
  838. l.ɵɵtext(1),
  839. l.ɵɵelementEnd()),
  840. 2 & e) {
  841. var n = l.ɵɵnextContext(4);
  842. l.ɵɵproperty("href", n.exportAllMeasurementLink.value, l.ɵɵsanitizeUrl),
  843. l.ɵɵadvance(1),
  844. l.ɵɵtextInterpolate(n.exportAllMeasurementLink.value)
  845. }
  846. }
  847. function y(e, t) {
  848. if (1 & e && (l.ɵɵelementStart(0, "span"),
  849. l.ɵɵtext(1),
  850. l.ɵɵelementEnd()),
  851. 2 & e) {
  852. var n = l.ɵɵnextContext(3).$implicit;
  853. l.ɵɵadvance(1),
  854. l.ɵɵtextInterpolate1(" ", n("The measurement share link to import all measurements at once could not be generated for the selected measurements because the link is too long. Please deselect some measurements and try again or use the share link of each measurement to import them separately."), "")
  855. }
  856. }
  857. function S(e, t) {
  858. if (1 & e) {
  859. var n = l.ɵɵgetCurrentView();
  860. l.ɵɵelementStart(0, "div", 16),
  861. l.ɵɵelementStart(1, "i", 17),
  862. l.ɵɵlistener("click", (function(e) {
  863. l.ɵɵrestoreView(n);
  864. var t = l.ɵɵnextContext(4);
  865. return t.copyToClipboard(t.exportAllMeasurementLink.value, e)
  866. }))("mouseout", (function(e) {
  867. return l.ɵɵrestoreView(n),
  868. l.ɵɵnextContext(4).removeTooltip(e)
  869. })),
  870. l.ɵɵtext(2, "file_copy"),
  871. l.ɵɵelementEnd(),
  872. l.ɵɵelementEnd()
  873. }
  874. if (2 & e) {
  875. var o = l.ɵɵnextContext(3).$implicit;
  876. l.ɵɵadvance(1),
  877. l.ɵɵproperty("title", o("Copy to clipboard"))
  878. }
  879. }
  880. function b(e, t) {
  881. if (1 & e && (l.ɵɵelementStart(0, "div", 10),
  882. l.ɵɵelementStart(1, "div", 11),
  883. l.ɵɵelementStart(2, "div", 12),
  884. l.ɵɵtemplate(3, C, 2, 1, "span", 9),
  885. l.ɵɵtemplate(4, x, 2, 2, "a", 13),
  886. l.ɵɵelementEnd(),
  887. l.ɵɵtemplate(5, y, 2, 1, "span", 9),
  888. l.ɵɵelementEnd(),
  889. l.ɵɵtemplate(6, S, 3, 1, "div", 14),
  890. l.ɵɵelementEnd()),
  891. 2 & e) {
  892. var n = l.ɵɵnextContext(3);
  893. l.ɵɵadvance(3),
  894. l.ɵɵproperty("ngIf", n.exportAllMeasurementLink.isValidLengthForAllBrowsers),
  895. l.ɵɵadvance(1),
  896. l.ɵɵproperty("ngIf", n.exportAllMeasurementLink.isValidLengthForAllBrowsers),
  897. l.ɵɵadvance(1),
  898. l.ɵɵproperty("ngIf", !n.exportAllMeasurementLink.isValidLengthForAllBrowsers),
  899. l.ɵɵadvance(1),
  900. l.ɵɵproperty("ngIf", n.exportAllMeasurementLink.isValidLengthForAllBrowsers)
  901. }
  902. }
  903. var E = function(e) {
  904. return [e, "distance", 2, .1, !0]
  905. };
  906. function w(e, t) {
  907. if (1 & e && (l.ɵɵelementStart(0, "span", 29),
  908. l.ɵɵtext(1),
  909. l.ɵɵpipe(2, "uom"),
  910. l.ɵɵelementEnd()),
  911. 2 & e) {
  912. var n = l.ɵɵnextContext().$implicit;
  913. l.ɵɵadvance(1),
  914. l.ɵɵtextInterpolate1(" ", l.ɵɵpipeBindV(2, 1, l.ɵɵpureFunction1(7, E, n.measurement.value)), " ")
  915. }
  916. }
  917. function I(e, t) {
  918. if (1 & e && (l.ɵɵelementStart(0, "span", 30),
  919. l.ɵɵtext(1),
  920. l.ɵɵpipe(2, "uom"),
  921. l.ɵɵelementEnd()),
  922. 2 & e) {
  923. var n = l.ɵɵnextContext().$implicit;
  924. l.ɵɵadvance(1),
  925. l.ɵɵtextInterpolate1(" ", l.ɵɵpipeBind2(2, 1, n.measurement.value, "area"), " ")
  926. }
  927. }
  928. function P(e, t) {
  929. if (1 & e && (l.ɵɵelementStart(0, "div", 34),
  930. l.ɵɵelement(1, "img", 32),
  931. l.ɵɵelementStart(2, "span"),
  932. l.ɵɵtext(3),
  933. l.ɵɵelementEnd(),
  934. l.ɵɵelementEnd()),
  935. 2 & e) {
  936. var n = l.ɵɵnextContext(2).$implicit,
  937. o = l.ɵɵnextContext(3);
  938. l.ɵɵadvance(1),
  939. l.ɵɵproperty("src", o.floorIcon, l.ɵɵsanitizeUrl),
  940. l.ɵɵadvance(2),
  941. l.ɵɵtextInterpolate1("", n.location.floor, " ")
  942. }
  943. }
  944. function O(e, t) {
  945. if (1 & e && (l.ɵɵelementStart(0, "div", 34),
  946. l.ɵɵelement(1, "img", 32),
  947. l.ɵɵelementStart(2, "span"),
  948. l.ɵɵtext(3),
  949. l.ɵɵelementEnd(),
  950. l.ɵɵelementEnd()),
  951. 2 & e) {
  952. var n = l.ɵɵnextContext(2).$implicit,
  953. o = l.ɵɵnextContext(3);
  954. l.ɵɵadvance(1),
  955. l.ɵɵproperty("src", o.roomIcon, l.ɵɵsanitizeUrl),
  956. l.ɵɵadvance(2),
  957. l.ɵɵtextInterpolate1("", n.location.room, " ")
  958. }
  959. }
  960. function _(e, t) {
  961. if (1 & e && (l.ɵɵelementStart(0, "div", 19),
  962. l.ɵɵelementStart(1, "div", 31),
  963. l.ɵɵelementStart(2, "div"),
  964. l.ɵɵelement(3, "img", 32),
  965. l.ɵɵelementStart(4, "span"),
  966. l.ɵɵtext(5),
  967. l.ɵɵelementEnd(),
  968. l.ɵɵelementEnd(),
  969. l.ɵɵtemplate(6, P, 4, 2, "div", 33),
  970. l.ɵɵtemplate(7, O, 4, 2, "div", 33),
  971. l.ɵɵelementEnd(),
  972. l.ɵɵelementEnd()),
  973. 2 & e) {
  974. var n = l.ɵɵnextContext().$implicit,
  975. o = l.ɵɵnextContext(3);
  976. l.ɵɵadvance(3),
  977. l.ɵɵproperty("src", o.buildingIcon, l.ɵɵsanitizeUrl),
  978. l.ɵɵadvance(2),
  979. l.ɵɵtextInterpolate1("", n.location.building, " "),
  980. l.ɵɵadvance(1),
  981. l.ɵɵproperty("ngIf", n.location.floor),
  982. l.ɵɵadvance(1),
  983. l.ɵɵproperty("ngIf", n.location.room)
  984. }
  985. }
  986. function T(e, t) {
  987. if (1 & e && (l.ɵɵelementStart(0, "div", 25),
  988. l.ɵɵelementStart(1, "div", 35),
  989. l.ɵɵelementStart(2, "div", 36),
  990. l.ɵɵtext(3),
  991. l.ɵɵelementEnd(),
  992. l.ɵɵelementEnd(),
  993. l.ɵɵelementEnd()),
  994. 2 & e) {
  995. var n = l.ɵɵnextContext().$implicit;
  996. l.ɵɵadvance(3),
  997. l.ɵɵtextInterpolate1(" ", n.measurement.note, " ")
  998. }
  999. }
  1000. function A(e, t) {
  1001. if (1 & e) {
  1002. var n = l.ɵɵgetCurrentView();
  1003. l.ɵɵelementStart(0, "div"),
  1004. l.ɵɵelementStart(1, "div", 18),
  1005. l.ɵɵelementStart(2, "div", 19),
  1006. l.ɵɵelementStart(3, "div", 20),
  1007. l.ɵɵtext(4),
  1008. l.ɵɵelementEnd(),
  1009. l.ɵɵelementStart(5, "div", 21),
  1010. l.ɵɵtemplate(6, w, 3, 9, "span", 22),
  1011. l.ɵɵtemplate(7, I, 3, 4, "span", 23),
  1012. l.ɵɵelementEnd(),
  1013. l.ɵɵelementEnd(),
  1014. l.ɵɵtemplate(8, _, 8, 4, "div", 24),
  1015. l.ɵɵelementStart(9, "div", 25),
  1016. l.ɵɵelementStart(10, "div", 11),
  1017. l.ɵɵelementStart(11, "div", 12),
  1018. l.ɵɵelementStart(12, "a", 15),
  1019. l.ɵɵtext(13),
  1020. l.ɵɵelementEnd(),
  1021. l.ɵɵelementEnd(),
  1022. l.ɵɵelementEnd(),
  1023. l.ɵɵelementStart(14, "div", 16),
  1024. l.ɵɵelementStart(15, "i", 17),
  1025. l.ɵɵlistener("click", (function(e) {
  1026. l.ɵɵrestoreView(n);
  1027. var o = t.$implicit;
  1028. return l.ɵɵnextContext(3).copyToClipboard(o.url.value, e)
  1029. }))("mouseout", (function(e) {
  1030. return l.ɵɵrestoreView(n),
  1031. l.ɵɵnextContext(3).removeTooltip(e)
  1032. })),
  1033. l.ɵɵtext(16, "file_copy"),
  1034. l.ɵɵelementEnd(),
  1035. l.ɵɵelementEnd(),
  1036. l.ɵɵelementEnd(),
  1037. l.ɵɵelementStart(17, "div", 26),
  1038. l.ɵɵelement(18, "img", 27),
  1039. l.ɵɵelementEnd(),
  1040. l.ɵɵtemplate(19, T, 4, 1, "div", 28),
  1041. l.ɵɵelementEnd(),
  1042. l.ɵɵelementEnd()
  1043. }
  1044. if (2 & e) {
  1045. var o = t.$implicit,
  1046. r = l.ɵɵnextContext(2).$implicit,
  1047. i = l.ɵɵnextContext();
  1048. l.ɵɵadvance(4),
  1049. l.ɵɵtextInterpolate1(" ", o.measurement.name, " "),
  1050. l.ɵɵadvance(2),
  1051. l.ɵɵproperty("ngIf", i.isDistance(o.measurement)),
  1052. l.ɵɵadvance(1),
  1053. l.ɵɵproperty("ngIf", i.isArea(o.measurement)),
  1054. l.ɵɵadvance(1),
  1055. // l.ɵɵproperty("ngIf", o.location),
  1056. l.ɵɵadvance(4),
  1057. l.ɵɵproperty("href", o.url.value, l.ɵɵsanitizeUrl),
  1058. l.ɵɵadvance(1),
  1059. l.ɵɵtextInterpolate(o.url.value),
  1060. l.ɵɵadvance(2),
  1061. l.ɵɵproperty("title", r("Copy to clipboard")),
  1062. l.ɵɵadvance(3),
  1063. l.ɵɵproperty("src", o.screenshot.data, l.ɵɵsanitizeUrl),
  1064. l.ɵɵadvance(1),
  1065. l.ɵɵproperty("ngIf", o.measurement.note)
  1066. }
  1067. }
  1068. function D(e, t) {
  1069. 1 & e && (l.ɵɵelementStart(0, "mat-icon"),
  1070. l.ɵɵelement(1, "mat-spinner", 37),
  1071. l.ɵɵelementEnd())
  1072. }
  1073. function V(e, t) {
  1074. if (1 & e) {
  1075. var n = l.ɵɵgetCurrentView();
  1076. l.ɵɵelementStart(0, "h4", 2),
  1077. l.ɵɵtext(1),
  1078. l.ɵɵelementEnd(),
  1079. l.ɵɵelementStart(2, "mat-dialog-content"),
  1080. l.ɵɵelementStart(3, "div", 3),
  1081. l.ɵɵtemplate(4, b, 7, 4, "div", 4),
  1082. l.ɵɵtemplate(5, A, 20, 9, "div", 5),
  1083. l.ɵɵelementEnd(),
  1084. l.ɵɵelementEnd(),
  1085. l.ɵɵelementStart(6, "mat-dialog-actions", 6),
  1086. l.ɵɵelementStart(7, "button", 7),
  1087. l.ɵɵtext(8),
  1088. l.ɵɵelementEnd(),
  1089. l.ɵɵelementStart(9, "button", 8),
  1090. l.ɵɵlistener("click", (function() {
  1091. return l.ɵɵrestoreView(n),
  1092. l.ɵɵnextContext(2).exportPdf()
  1093. })),
  1094. l.ɵɵtext(10),
  1095. l.ɵɵtemplate(11, D, 2, 0, "mat-icon", 9),
  1096. l.ɵɵelementEnd(),
  1097. l.ɵɵelementEnd()
  1098. }
  1099. if (2 & e) {
  1100. var o = l.ɵɵnextContext().$implicit,
  1101. r = l.ɵɵnextContext();
  1102. l.ɵɵadvance(1),
  1103. l.ɵɵtextInterpolate(o("Export Measurements")),
  1104. l.ɵɵadvance(3),
  1105. l.ɵɵproperty("ngIf", r.exportMeasurementList && r.exportMeasurementList.length > 1),
  1106. l.ɵɵadvance(1),
  1107. l.ɵɵproperty("ngForOf", r.exportMeasurementList),
  1108. l.ɵɵadvance(3),
  1109. l.ɵɵtextInterpolate(o("Cancel")),
  1110. l.ɵɵadvance(1),
  1111. l.ɵɵproperty("disabled", r.isPdfExportInProgress),
  1112. l.ɵɵadvance(1),
  1113. l.ɵɵtextInterpolate1(" ", o("Export as PDF"), " "),
  1114. l.ɵɵadvance(1),
  1115. l.ɵɵproperty("ngIf", r.isPdfExportInProgress)
  1116. }
  1117. }
  1118. function k(e, t) {
  1119. 1 & e && (l.ɵɵelementContainerStart(0),
  1120. l.ɵɵtemplate(1, V, 12, 7, "ng-template", null, 1, l.ɵɵtemplateRefExtractor),
  1121. l.ɵɵelementContainerEnd())
  1122. }
  1123. var R = function() {
  1124. function t(e, t) {
  1125. this.MatDialog = e,
  1126. this.MeasurementPdfExportService = t,
  1127. this.isPdfExportInProgress = !1,
  1128. this.buildingIcon = n(633),
  1129. this.roomIcon = n(635),
  1130. this.floorIcon = n(634)
  1131. }
  1132. return t.prototype.copyToClipboard = function(t, n) {
  1133. var o = document.createElement("textarea");
  1134. o.style.position = "fixed",
  1135. o.style.left = "0",
  1136. o.style.opacity = "0",
  1137. o.style.top = "0",
  1138. o.innerText = t,
  1139. document.body.appendChild(o),
  1140. o.focus(),
  1141. o.select(),
  1142. document.execCommand("copy"),
  1143. document.body.removeChild(o),
  1144. e(n.target).attr("title", r.translate("Copied link to clipboard")).tooltip("show")
  1145. },
  1146. t.prototype.showModal = function() {
  1147. this.MatDialog.open(this.exportModal, {
  1148. panelClass: "modal-lg"
  1149. })
  1150. },
  1151. t.prototype.exportPdf = function() {
  1152. var e = this;
  1153. this.isPdfExportInProgress = !0;
  1154. var t = this.exportAllMeasurementLink.isValidLengthForAllBrowsers ? this.exportAllMeasurementLink.value : "";
  1155. a.promiseFinally(this.MeasurementPdfExportService.exportMeasurements(this.exportMeasurementList, t), (function() {
  1156. return e.isPdfExportInProgress = !1
  1157. })).catch(s.handleWarning)
  1158. },
  1159. t.prototype.isArea = function(e) {
  1160. return i.ToolSpec.of(e.type).type === i.ToolType.AREA
  1161. },
  1162. t.prototype.isDistance = function(e) {
  1163. return i.ToolSpec.of(e.type).type === i.ToolType.DISTANCE
  1164. },
  1165. t.prototype.removeTooltip = function(t) {
  1166. e(t.target).tooltip("destroy"),
  1167. e(t.target).attr("title", r.translate("Copy to clipboard"))
  1168. },
  1169. t.ɵfac = function(e) {
  1170. return new(e || t)(l.ɵɵdirectiveInject(c.MatDialog), l.ɵɵdirectiveInject(u.MeasurementPdfExportService))
  1171. },
  1172. t.ɵcmp = l.ɵɵdefineComponent({
  1173. type: t,
  1174. selectors: [
  1175. ["measurement-export"]
  1176. ],
  1177. viewQuery: function(e, t) {
  1178. var n;
  1179. (1 & e && l.ɵɵviewQuery(M, !0),
  1180. 2 & e) && (l.ɵɵqueryRefresh(n = l.ɵɵloadQuery()) && (t.exportModal = n.first))
  1181. },
  1182. inputs: {
  1183. exportAllMeasurementLink: "exportAllMeasurementLink",
  1184. exportMeasurementList: "exportMeasurementList"
  1185. },
  1186. decls: 1,
  1187. vars: 0,
  1188. consts: [
  1189. [4, "transloco"],
  1190. ["exportableMeasurementsDialog", ""],
  1191. ["mat-dialog-title", ""],
  1192. [1, "body-container"],
  1193. ["class", "flex-row padding-top-custom", 4, "ngIf"],
  1194. [4, "ngFor", "ngForOf"],
  1195. ["align", "end"],
  1196. ["mat-flat-button", "", "mat-dialog-close", ""],
  1197. ["mat-flat-button", "", "color", "primary", 3, "disabled", "click"],
  1198. [4, "ngIf"],
  1199. [1, "flex-row", "padding-top-custom"],
  1200. [1, "flex-column-90"],
  1201. [1, "link-ellipses"],
  1202. [3, "href", 4, "ngIf"],
  1203. ["class", "flex-column-no-left-padding", 4, "ngIf"],
  1204. [3, "href"],
  1205. [1, "flex-column-no-left-padding"],
  1206. [1, "material-icons", "icn-small", "clickable", 3, "title", "click", "mouseout"],
  1207. [1, "measurement-container"],
  1208. [1, "flex-row", "padding-left"],
  1209. [1, "subtitle"],
  1210. [1, "flex-right", "subtitle"],
  1211. ["class", "measurement-value-distance", 4, "ngIf"],
  1212. ["class", "measurement-value-area", 4, "ngIf"],
  1213. ["class", "flex-row padding-left", 4, "ngIf"],
  1214. [1, "flex-row", "padding-top-sm"],
  1215. [1, "flex-row", "padding-left", "padding-top-custom"],
  1216. [1, "screenshot", 3, "src"],
  1217. ["class", "flex-row padding-top-sm", 4, "ngIf"],
  1218. [1, "measurement-value-distance"],
  1219. [1, "measurement-value-area"],
  1220. [1, "location"],
  1221. [1, "location-icn", 3, "src"],
  1222. ["class", "padding-left", 4, "ngIf"],
  1223. [1, "padding-left"],
  1224. [1, "flex-column"],
  1225. [1, "note"],
  1226. ["color", "accent", "diameter", "20"]
  1227. ],
  1228. template: function(e, t) {
  1229. 1 & e && l.ɵɵtemplate(0, k, 3, 0, "ng-container", 0)
  1230. },
  1231. directives: [p.TranslocoDirective, c.MatDialogTitle, c.MatDialogContent, d.NgIf, d.NgForOf, c.MatDialogActions, m.MatButton, c.MatDialogClose, g.AddBaseUrlDirective, f.MatIcon, v.MatSpinner],
  1232. pipes: [h.UoMPipe],
  1233. styles: [".z-index-1[_ngcontent-%COMP%]{box-shadow:none;position:relative;z-index:1}.z-index-2[_ngcontent-%COMP%]{box-shadow:0 1.5px 4px rgba(0,0,0,.24),0 1.5px 6px rgba(0,0,0,.12);position:relative;z-index:5}.z-index-3[_ngcontent-%COMP%]{box-shadow:0 3px 12px rgba(0,0,0,.23),0 3px 12px rgba(0,0,0,.16);position:relative;z-index:10}.z-index-4[_ngcontent-%COMP%]{box-shadow:0 6px 12px rgba(0,0,0,.23),0 10px 40px rgba(0,0,0,.19);position:relative;z-index:15}.z-index-5[_ngcontent-%COMP%]{box-shadow:0 10px 20px rgba(0,0,0,.22),0 14px 56px rgba(0,0,0,.25);position:relative;z-index:20}.front-element[_ngcontent-%COMP%]{z-index:1031}.full-window[_ngcontent-%COMP%]{position:fixed;margin:0;padding:0;left:0;right:0;top:0;bottom:0;z-index:1029;border-radius:0}.full-window-scroll[_ngcontent-%COMP%]{max-height:100vh}.full-window-scroll[_ngcontent-%COMP%], .panel-autoscroll[_ngcontent-%COMP%]{overflow-y:auto;-webkit-overflow-scrolling:touch}.panel-autoscroll[_ngcontent-%COMP%]{max-height:80vh}.autoscroll[_ngcontent-%COMP%]{overflow-y:auto;-webkit-overflow-scrolling:touch}.fixed-top-right[_ngcontent-%COMP%]{position:fixed;top:10px;right:0}.center-vertical[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%)}.float-left[_ngcontent-%COMP%]{float:left}.float-right[_ngcontent-%COMP%]{float:right}.margin-top-small[_ngcontent-%COMP%]{margin-top:5px!important}.margin-left-small[_ngcontent-%COMP%]{margin-left:5px!important}.margin-right-small[_ngcontent-%COMP%]{margin-right:5px!important}.margin-bottom-small[_ngcontent-%COMP%]{margin-bottom:5px!important}.margin-top[_ngcontent-%COMP%]{margin-top:15px!important}.margin-left[_ngcontent-%COMP%]{margin-left:15px!important}.margin-right[_ngcontent-%COMP%]{margin-right:15px!important}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:15px!important}.margin-top-big[_ngcontent-%COMP%]{margin-top:25px!important}.margin-bottom-big[_ngcontent-%COMP%]{margin-bottom:25px!important}.no-margin[_ngcontent-%COMP%]{margin:0!important}.no-margin-bottom[_ngcontent-%COMP%]{margin-bottom:0!important}.padding-horizontal[_ngcontent-%COMP%]{padding-left:15px!important;padding-right:15px!important}.padding-top[_ngcontent-%COMP%], .padding-vertical[_ngcontent-%COMP%]{padding-top:15px!important}.padding-bottom[_ngcontent-%COMP%], .padding-vertical[_ngcontent-%COMP%], .screenshot[_ngcontent-%COMP%]{padding-bottom:15px!important}.no-padding-top[_ngcontent-%COMP%]{padding-top:0!important}.no-padding-bottom[_ngcontent-%COMP%]{padding-bottom:0!important}.no-padding-horizontal[_ngcontent-%COMP%], .no-padding-left[_ngcontent-%COMP%]{padding-left:0!important}.no-padding-horizontal[_ngcontent-%COMP%], .no-padding-right[_ngcontent-%COMP%]{padding-right:0!important}.no-padding[_ngcontent-%COMP%]{padding:0!important}.border[_ngcontent-%COMP%]{border:1px solid #e6e6e6}.border-top[_ngcontent-%COMP%]{border-top:1px solid #e6e6e6}.border-bottom[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.border-left[_ngcontent-%COMP%]{border-left:1px solid #e6e6e6}.border-right[_ngcontent-%COMP%]{border-right:1px solid #e6e6e6}.no-border[_ngcontent-%COMP%]{border:none;border-top-left-radius:0!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.no-border-width[_ngcontent-%COMP%]{border:none}.border-radius[_ngcontent-%COMP%]{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important}.border-radius[_ngcontent-%COMP%], .border-radius-top[_ngcontent-%COMP%]{border-top-left-radius:4px!important;border-top-right-radius:4px!important}.border-radius-bottom[_ngcontent-%COMP%]{border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important}.no-border-radius[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.indoorViewer.ios[_ngcontent-%COMP%] .no-hover-ios[_ngcontent-%COMP%]:hover{background-color:inherit!important}.no-shadow[_ngcontent-%COMP%]{box-shadow:none!important}.clear-background[_ngcontent-%COMP%]{border:0}.clear-background[_ngcontent-%COMP%], .no-background[_ngcontent-%COMP%]{background:none!important}.no-overflow[_ngcontent-%COMP%]{overflow:hidden}.clickable[_ngcontent-%COMP%], .clickable[_ngcontent-%COMP%]:hover{cursor:pointer}.body-container[_ngcontent-%COMP%]{padding-left:24px;max-height:calc(100vh - 250px);margin:-15px}.measurement-container[_ngcontent-%COMP%]{background-color:#f0f0f0;margin-top:24px;margin-right:24px;padding-top:24px;padding-bottom:24px;padding-left:24px;border-radius:4px}.flex-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;width:100%;margin-left:-24px}.flex-column[_ngcontent-%COMP%], .flex-column-90[_ngcontent-%COMP%], .flex-column-no-left-padding[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;padding:0 24px;overflow:hidden}.flex-column-no-left-padding[_ngcontent-%COMP%]{padding-left:0}.flex-column-90[_ngcontent-%COMP%]{flex-basis:90%;padding-right:0}.link-ellipses[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.flex-right[_ngcontent-%COMP%]{margin-left:auto}.screenshot[_ngcontent-%COMP%]{flex-flow:row nowrap;align-items:center;display:flex;max-width:100%;flex-shrink:0}.note[_ngcontent-%COMP%]{white-space:pre-wrap}.icn-small[_ngcontent-%COMP%]{font-size:16px;vertical-align:middle}.subtitle[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.location[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-style:normal;font-weight:600;display:flex;align-items:center;letter-spacing:.01em;color:#333332}.location[_ngcontent-%COMP%]{font-size:12px;line-height:16px;margin-left:-8px}.location-icn[_ngcontent-%COMP%]{width:40px;height:40px}.padding-top-custom[_ngcontent-%COMP%]{padding-top:24px}.padding-left[_ngcontent-%COMP%]{padding-left:24px}.icn-small[_ngcontent-%COMP%], .padding-left-sm[_ngcontent-%COMP%]{padding-left:6px}.padding-top-sm[_ngcontent-%COMP%]{padding-top:6px}"]
  1234. }),
  1235. t
  1236. }();
  1237. t.MeasurementExportModalComponent = R,
  1238. l.ɵsetClassMetadata(R, [{
  1239. type: o.Component,
  1240. args: [{
  1241. selector: "measurement-export",
  1242. templateUrl: "MeasurementExportModal.ng.html",
  1243. styleUrls: ["MeasurementExportModal.ng.scss"]
  1244. }]
  1245. }], (function() {
  1246. return [{
  1247. type: c.MatDialog
  1248. }, {
  1249. type: u.MeasurementPdfExportService
  1250. }]
  1251. }), {
  1252. exportAllMeasurementLink: [{
  1253. type: o.Input
  1254. }],
  1255. exportMeasurementList: [{
  1256. type: o.Input
  1257. }],
  1258. exportModal: [{
  1259. type: o.ViewChild,
  1260. args: ["exportableMeasurementsDialog"]
  1261. }]
  1262. })
  1263. }).call(this, n(19))
  1264. },
  1265. 1938: function(e, t, n) {
  1266. "use strict";
  1267. Object.defineProperty(t, "__esModule", {
  1268. value: !0
  1269. });
  1270. var o = n(0),
  1271. r = n(85),
  1272. i = (n(447),
  1273. n(0)),
  1274. a = n(447),
  1275. s = n(168),
  1276. l = n(3),
  1277. c = n(1939);
  1278. function u(e, t) {
  1279. if (1 & e && (i.ɵɵelementStart(0, "h4", 4),
  1280. i.ɵɵelementStart(1, "strong"),
  1281. i.ɵɵtext(2),
  1282. i.ɵɵelementEnd(),
  1283. i.ɵɵelementEnd()),
  1284. 2 & e) {
  1285. var n = i.ɵɵnextContext().$implicit;
  1286. i.ɵɵadvance(2),
  1287. i.ɵɵtextInterpolate(n("Free"))
  1288. }
  1289. }
  1290. function p(e, t) {
  1291. if (1 & e && (i.ɵɵelementStart(0, "h4", 4),
  1292. i.ɵɵelementStart(1, "strong"),
  1293. i.ɵɵtext(2),
  1294. i.ɵɵelementEnd(),
  1295. i.ɵɵelementEnd()),
  1296. 2 & e) {
  1297. var n = i.ɵɵnextContext().$implicit;
  1298. i.ɵɵadvance(2),
  1299. i.ɵɵtextInterpolate(n("Horizontal"))
  1300. }
  1301. }
  1302. function d(e, t) {
  1303. if (1 & e && (i.ɵɵelementStart(0, "h4", 4),
  1304. i.ɵɵelementStart(1, "strong"),
  1305. i.ɵɵtext(2),
  1306. i.ɵɵelementEnd(),
  1307. i.ɵɵelementEnd()),
  1308. 2 & e) {
  1309. var n = i.ɵɵnextContext().$implicit;
  1310. i.ɵɵadvance(2),
  1311. i.ɵɵtextInterpolate(n("Vertical"))
  1312. }
  1313. }
  1314. function m(e, t) {
  1315. if (1 & e) {
  1316. var n = i.ɵɵgetCurrentView();
  1317. i.ɵɵelementContainerStart(0),
  1318. i.ɵɵtemplate(1, u, 3, 1, "h4", 1),
  1319. i.ɵɵelementStart(2, "span", 2),
  1320. i.ɵɵelementStart(3, "measurement-tool", 3),
  1321. i.ɵɵlistener("onClick", (function() {
  1322. i.ɵɵrestoreView(n);
  1323. var e = i.ɵɵnextContext();
  1324. return e.toggleTool(e.Tool.DISTANCE_FREE_MEASUREMENT)
  1325. })),
  1326. i.ɵɵelementEnd(),
  1327. i.ɵɵelementStart(4, "measurement-tool", 3),
  1328. i.ɵɵlistener("onClick", (function() {
  1329. i.ɵɵrestoreView(n);
  1330. var e = i.ɵɵnextContext();
  1331. return e.toggleTool(e.Tool.AREA_FREE_MEASUREMENT)
  1332. })),
  1333. i.ɵɵelementEnd(),
  1334. i.ɵɵelementEnd(),
  1335. i.ɵɵtemplate(5, p, 3, 1, "h4", 1),
  1336. i.ɵɵelementStart(6, "span", 2),
  1337. i.ɵɵelementStart(7, "measurement-tool", 3),
  1338. i.ɵɵlistener("onClick", (function() {
  1339. i.ɵɵrestoreView(n);
  1340. var e = i.ɵɵnextContext();
  1341. return e.toggleTool(e.Tool.DISTANCE_HORIZONTAL_MEASUREMENT)
  1342. })),
  1343. i.ɵɵelementEnd(),
  1344. i.ɵɵelementStart(8, "measurement-tool", 3),
  1345. i.ɵɵlistener("onClick", (function() {
  1346. i.ɵɵrestoreView(n);
  1347. var e = i.ɵɵnextContext();
  1348. return e.toggleTool(e.Tool.AREA_HORIZONTAL_MEASUREMENT)
  1349. })),
  1350. i.ɵɵelementEnd(),
  1351. i.ɵɵelementStart(9, "measurement-tool", 3),
  1352. i.ɵɵlistener("onClick", (function() {
  1353. i.ɵɵrestoreView(n);
  1354. var e = i.ɵɵnextContext();
  1355. return e.toggleTool(e.Tool.RECTANGLE_HORIZONTAL_MEASUREMENT)
  1356. })),
  1357. i.ɵɵelementEnd(),
  1358. i.ɵɵelementEnd(),
  1359. i.ɵɵtemplate(10, d, 3, 1, "h4", 1),
  1360. i.ɵɵelementStart(11, "span", 2),
  1361. i.ɵɵelementStart(12, "measurement-tool", 3),
  1362. i.ɵɵlistener("onClick", (function() {
  1363. i.ɵɵrestoreView(n);
  1364. var e = i.ɵɵnextContext();
  1365. return e.toggleTool(e.Tool.DISTANCE_VERTICAL_MEASUREMENT)
  1366. })),
  1367. i.ɵɵelementEnd(),
  1368. i.ɵɵelementStart(13, "measurement-tool", 3),
  1369. i.ɵɵlistener("onClick", (function() {
  1370. i.ɵɵrestoreView(n);
  1371. var e = i.ɵɵnextContext();
  1372. return e.toggleTool(e.Tool.AREA_VERTICAL_MEASUREMENT)
  1373. })),
  1374. i.ɵɵelementEnd(),
  1375. i.ɵɵelementStart(14, "measurement-tool", 3),
  1376. i.ɵɵlistener("onClick", (function() {
  1377. i.ɵɵrestoreView(n);
  1378. var e = i.ɵɵnextContext();
  1379. return e.toggleTool(e.Tool.RECTANGLE_VERTICAL_MEASUREMENT)
  1380. })),
  1381. i.ɵɵelementEnd(),
  1382. i.ɵɵelementEnd(),
  1383. i.ɵɵelementContainerEnd()
  1384. }
  1385. if (2 & e) {
  1386. var o = t.$implicit,
  1387. r = i.ɵɵnextContext();
  1388. i.ɵɵadvance(1),
  1389. i.ɵɵproperty("ngIf", !r.isCollapsedView),
  1390. i.ɵɵadvance(2),
  1391. i.ɵɵproperty("description", o("Distance"))("altText", o("Free Distance"))("icon", r.freeDistanceMeasurementIcon)("selected", r.currentTool === r.Tool.DISTANCE_FREE_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1392. i.ɵɵadvance(1),
  1393. i.ɵɵproperty("description", o("Polygon"))("altText", o("Free Area"))("icon", r.freeAreaMeasurementIcon)("selected", r.currentTool === r.Tool.AREA_FREE_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1394. i.ɵɵadvance(1),
  1395. i.ɵɵproperty("ngIf", !r.isCollapsedView),
  1396. i.ɵɵadvance(2),
  1397. i.ɵɵproperty("description", o("Distance"))("altText", o("Horizontal Distance"))("icon", r.horizontalDistanceMeasurementIcon)("selected", r.currentTool === r.Tool.DISTANCE_HORIZONTAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1398. i.ɵɵadvance(1),
  1399. i.ɵɵproperty("description", o("Polygon"))("altText", o("Horizontal Area"))("icon", r.horizontalAreaPolygonMeasurementIcon)("selected", r.currentTool === r.Tool.AREA_HORIZONTAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1400. i.ɵɵadvance(1),
  1401. i.ɵɵproperty("description", o("Rectangle"))("altText", o("Horizontal Rectangle"))("icon", r.horizontalAreaRectangleMeasurementIcon)("selected", r.currentTool === r.Tool.RECTANGLE_HORIZONTAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1402. i.ɵɵadvance(1),
  1403. i.ɵɵproperty("ngIf", !r.isCollapsedView),
  1404. i.ɵɵadvance(2),
  1405. i.ɵɵproperty("description", o("Distance"))("altText", o("Vertical Distance"))("icon", r.verticalDistanceMeasurementIcon)("selected", r.currentTool === r.Tool.DISTANCE_VERTICAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1406. i.ɵɵadvance(1),
  1407. i.ɵɵproperty("description", o("Polygon"))("altText", o("Vertical Area"))("icon", r.verticalAreaPolygonMeasurementIcon)("selected", r.currentTool === r.Tool.AREA_VERTICAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView),
  1408. i.ɵɵadvance(1),
  1409. i.ɵɵproperty("description", o("Rectangle"))("altText", o("Vertical Rectangle"))("icon", r.verticalAreaRectangleMeasurementIcon)("selected", r.currentTool === r.Tool.RECTANGLE_VERTICAL_MEASUREMENT)("isCollapsedView", r.isCollapsedView)
  1410. }
  1411. }
  1412. var g = function() {
  1413. function e(e) {
  1414. this.MeasurementToolChanger = e,
  1415. this.Tool = r.Tool,
  1416. this.freeDistanceMeasurementIcon = r.ToolSpec.of(r.Tool.DISTANCE_FREE_MEASUREMENT).iconSrc,
  1417. this.freeAreaMeasurementIcon = r.ToolSpec.of(r.Tool.AREA_FREE_MEASUREMENT).iconSrc,
  1418. this.horizontalDistanceMeasurementIcon = r.ToolSpec.of(r.Tool.DISTANCE_HORIZONTAL_MEASUREMENT).iconSrc,
  1419. this.horizontalAreaPolygonMeasurementIcon = r.ToolSpec.of(r.Tool.AREA_HORIZONTAL_MEASUREMENT).iconSrc,
  1420. this.horizontalAreaRectangleMeasurementIcon = r.ToolSpec.of(r.Tool.RECTANGLE_HORIZONTAL_MEASUREMENT).iconSrc,
  1421. this.verticalDistanceMeasurementIcon = r.ToolSpec.of(r.Tool.DISTANCE_VERTICAL_MEASUREMENT).iconSrc,
  1422. this.verticalAreaPolygonMeasurementIcon = r.ToolSpec.of(r.Tool.AREA_VERTICAL_MEASUREMENT).iconSrc,
  1423. this.verticalAreaRectangleMeasurementIcon = r.ToolSpec.of(r.Tool.RECTANGLE_VERTICAL_MEASUREMENT).iconSrc,
  1424. this.selectedTool = this.MeasurementToolChanger.selectedTool
  1425. }
  1426. return Object.defineProperty(e.prototype, "isCollapsed", {
  1427. get: function() {
  1428. return this.isCollapsedView
  1429. },
  1430. enumerable: !0,
  1431. configurable: !0
  1432. }),
  1433. e.prototype.toggleTool = function(e) {
  1434. this.MeasurementToolChanger.toggleTool(e, r.EventSource.MEASUREMENT_TOOL_SELECTION)
  1435. },
  1436. e.ɵfac = function(t) {
  1437. return new(t || e)(i.ɵɵdirectiveInject(a.MeasurementToolChanger))
  1438. },
  1439. e.ɵcmp = i.ɵɵdefineComponent({
  1440. type: e,
  1441. selectors: [
  1442. ["measurement-tool-selection"]
  1443. ],
  1444. hostVars: 2,
  1445. hostBindings: function(e, t) {
  1446. 2 & e && i.ɵɵclassProp("collapsed-view", t.isCollapsed)
  1447. },
  1448. inputs: {
  1449. currentTool: "currentTool",
  1450. isCollapsedView: "isCollapsedView"
  1451. },
  1452. outputs: {
  1453. selectedTool: "selectedTool"
  1454. },
  1455. decls: 1,
  1456. vars: 0,
  1457. consts: [
  1458. [4, "transloco"],
  1459. ["class", "heading", 4, "ngIf"],
  1460. [1, "spaced"],
  1461. [3, "description", "altText", "icon", "selected", "isCollapsedView", "onClick"],
  1462. [1, "heading"]
  1463. ],
  1464. template: function(e, t) {
  1465. 1 & e && i.ɵɵtemplate(0, m, 15, 43, "ng-container", 0)
  1466. },
  1467. directives: [s.TranslocoDirective, l.NgIf, c.MeasurementToolComponent],
  1468. styles: [".collapsed-view[_nghost-%COMP%] .spaced[_ngcontent-%COMP%]{display:inherit;justify-content:left;padding:0}.spaced[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;padding:20px 18px}.heading[_ngcontent-%COMP%]{font-size:1.14em;margin:0}.rectangle-tools[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;justify-content:flex-end;padding:0 18px 15px}"]
  1469. }),
  1470. e
  1471. }();
  1472. t.MeasurementToolSelectionComponent = g,
  1473. i.ɵsetClassMetadata(g, [{
  1474. type: o.Component,
  1475. args: [{
  1476. selector: "measurement-tool-selection",
  1477. templateUrl: "./MeasurementToolSelection.ng.html",
  1478. styleUrls: ["./MeasurementToolSelection.ng.scss"]
  1479. }]
  1480. }], (function() {
  1481. return [{
  1482. type: a.MeasurementToolChanger
  1483. }]
  1484. }), {
  1485. isCollapsed: [{
  1486. type: o.HostBinding,
  1487. args: ["class.collapsed-view"]
  1488. }],
  1489. selectedTool: [{
  1490. type: o.Output
  1491. }],
  1492. currentTool: [{
  1493. type: o.Input
  1494. }],
  1495. isCollapsedView: [{
  1496. type: o.Input
  1497. }]
  1498. })
  1499. },
  1500. 1939: function(e, t, n) {
  1501. "use strict";
  1502. Object.defineProperty(t, "__esModule", {
  1503. value: !0
  1504. });
  1505. var o = n(0),
  1506. r = n(0),
  1507. i = n(1692),
  1508. a = n(3);
  1509. function s(e, t) {
  1510. if (1 & e && (r.ɵɵelementStart(0, "p", 3),
  1511. r.ɵɵtext(1),
  1512. r.ɵɵelementEnd()),
  1513. 2 & e) {
  1514. var n = r.ɵɵnextContext();
  1515. r.ɵɵadvance(1),
  1516. r.ɵɵtextInterpolate(n.description)
  1517. }
  1518. }
  1519. var l = function() {
  1520. function e() {
  1521. this.isCollapsedView = !1,
  1522. this.onClick = new o.EventEmitter
  1523. }
  1524. return Object.defineProperty(e.prototype, "isCollapsed", {
  1525. get: function() {
  1526. return this.isCollapsedView
  1527. },
  1528. enumerable: !0,
  1529. configurable: !0
  1530. }),
  1531. Object.defineProperty(e.prototype, "alt", {
  1532. get: function() {
  1533. return this.altText
  1534. },
  1535. enumerable: !0,
  1536. configurable: !0
  1537. }),
  1538. e.ɵfac = function(t) {
  1539. return new(t || e)
  1540. },
  1541. e.ɵcmp = r.ɵɵdefineComponent({
  1542. type: e,
  1543. selectors: [
  1544. ["measurement-tool"]
  1545. ],
  1546. hostVars: 2,
  1547. hostBindings: function(e, t) {
  1548. 2 & e && r.ɵɵclassProp("collapsed-view", t.isCollapsed)
  1549. },
  1550. inputs: {
  1551. icon: "icon",
  1552. description: "description",
  1553. altText: "altText",
  1554. selected: "selected",
  1555. isCollapsedView: "isCollapsedView"
  1556. },
  1557. outputs: {
  1558. onClick: "onClick"
  1559. },
  1560. decls: 3,
  1561. vars: 8,
  1562. consts: [
  1563. [1, "tool-container"],
  1564. [1, "tool-image", 3, "src", "alt", "title", "click"],
  1565. ["class", "text-center description", 4, "ngIf"],
  1566. [1, "text-center", "description"]
  1567. ],
  1568. template: function(e, t) {
  1569. 1 & e && (r.ɵɵelementStart(0, "span", 0),
  1570. r.ɵɵelementStart(1, "img", 1),
  1571. r.ɵɵlistener("click", (function() {
  1572. return t.onClick.emit()
  1573. })),
  1574. r.ɵɵelementEnd(),
  1575. r.ɵɵtemplate(2, s, 2, 1, "p", 2),
  1576. r.ɵɵelementEnd()),
  1577. 2 & e && (r.ɵɵclassProp("collapsed-view", t.isCollapsedView),
  1578. r.ɵɵadvance(1),
  1579. r.ɵɵclassProp("selected", t.selected),
  1580. r.ɵɵproperty("src", t.icon, r.ɵɵsanitizeUrl)("alt", t.altText)("title", t.altText),
  1581. r.ɵɵadvance(1),
  1582. r.ɵɵproperty("ngIf", !t.isCollapsedView))
  1583. },
  1584. directives: [i.AddBaseUrlDirective, a.NgIf],
  1585. styles: ["[_nghost-%COMP%]{display:inline-block;width:100px;flex:0 1 33.3%}.collapsed-view[_nghost-%COMP%]{display:block;width:60px;margin-top:25px;margin-bottom:25px}@media (max-height:720px){.collapsed-view[_nghost-%COMP%]{margin-top:12px;margin-bottom:12px}}.collapsed-view[_nghost-%COMP%] img[_ngcontent-%COMP%]{border:none}img[_ngcontent-%COMP%]{width:36px;height:36px;padding:6px;border:1px solid grey;border-radius:7px;display:block;margin-left:auto;margin-right:auto}img[_ngcontent-%COMP%]:hover{cursor:pointer}img.selected[_ngcontent-%COMP%], img[_ngcontent-%COMP%]:hover{background-color:#d3d3d3}.tool-image[_ngcontent-%COMP%]{margin-bottom:.35em}.description[_ngcontent-%COMP%]{font-size:14px;overflow-wrap:break-word;margin:0}"]
  1586. }),
  1587. e
  1588. }();
  1589. t.MeasurementToolComponent = l,
  1590. r.ɵsetClassMetadata(l, [{
  1591. type: o.Component,
  1592. args: [{
  1593. selector: "measurement-tool",
  1594. templateUrl: "./MeasurementTool.ng.html",
  1595. styleUrls: ["./MeasurementTool.ng.scss"]
  1596. }]
  1597. }], (function() {
  1598. return []
  1599. }), {
  1600. isCollapsed: [{
  1601. type: o.HostBinding,
  1602. args: ["class.collapsed-view"]
  1603. }],
  1604. icon: [{
  1605. type: o.Input
  1606. }],
  1607. description: [{
  1608. type: o.Input
  1609. }],
  1610. altText: [{
  1611. type: o.Input
  1612. }],
  1613. selected: [{
  1614. type: o.Input
  1615. }],
  1616. isCollapsedView: [{
  1617. type: o.Input
  1618. }],
  1619. onClick: [{
  1620. type: o.Output
  1621. }]
  1622. })
  1623. },
  1624. 1940: function(e, t, n) {
  1625. "use strict";
  1626. var o = this && this.__spreadArrays || function() {
  1627. for (var e = 0, t = 0, n = arguments.length; t < n; t++)
  1628. e += arguments[t].length;
  1629. var o = Array(e),
  1630. r = 0;
  1631. for (t = 0; t < n; t++)
  1632. for (var i = arguments[t], a = 0, s = i.length; a < s; a++,
  1633. r++)
  1634. o[r] = i[a];
  1635. return o
  1636. };
  1637. Object.defineProperty(t, "__esModule", {
  1638. value: !0
  1639. });
  1640. var r = n(0),
  1641. i = (n(171),
  1642. n(21),
  1643. n(644)),
  1644. a = n(627),
  1645. s = n(454),
  1646. l = n(347),
  1647. c = n(40),
  1648. u = n(645),
  1649. p = n(628),
  1650. d = n(0),
  1651. m = n(171),
  1652. g = n(21),
  1653. f = n(3),
  1654. v = n(1941),
  1655. h = n(168),
  1656. M = n(1942);
  1657. function C(e, t) {
  1658. if (1 & e && (d.ɵɵelementStart(0, "div", 11),
  1659. d.ɵɵelementStart(1, "span"),
  1660. d.ɵɵtext(2),
  1661. d.ɵɵelementEnd(),
  1662. d.ɵɵelementEnd()),
  1663. 2 & e) {
  1664. var n = d.ɵɵnextContext().$implicit;
  1665. d.ɵɵadvance(2),
  1666. d.ɵɵtextInterpolate(n("No measurements taken yet"))
  1667. }
  1668. }
  1669. function x(e, t) {
  1670. if (1 & e && (d.ɵɵelementContainerStart(0),
  1671. d.ɵɵtemplate(1, C, 3, 1, "div", 10),
  1672. d.ɵɵelementContainerEnd()),
  1673. 2 & e) {
  1674. var n = d.ɵɵnextContext(3);
  1675. d.ɵɵadvance(1),
  1676. d.ɵɵproperty("ngIf", 0 === n.measurementsList.length)
  1677. }
  1678. }
  1679. function y(e, t) {
  1680. if (1 & e) {
  1681. var n = d.ɵɵgetCurrentView();
  1682. d.ɵɵelementStart(0, "div"),
  1683. d.ɵɵelementStart(1, "measurement-details", 12),
  1684. d.ɵɵlistener("onItemToggleSelection", (function(e) {
  1685. return d.ɵɵrestoreView(n),
  1686. d.ɵɵnextContext(3).handleItemToggleSelection(e)
  1687. })),
  1688. d.ɵɵelementEnd(),
  1689. d.ɵɵelement(2, "hr", 13),
  1690. d.ɵɵelementEnd()
  1691. }
  1692. if (2 & e) {
  1693. var o = t.$implicit;
  1694. d.ɵɵadvance(1),
  1695. d.ɵɵproperty("measurement", o)
  1696. }
  1697. }
  1698. function S(e, t) {
  1699. if (1 & e) {
  1700. var n = d.ɵɵgetCurrentView();
  1701. d.ɵɵelementStart(0, "span", 4),
  1702. d.ɵɵelementStart(1, "measurement-list-toolbar", 5),
  1703. d.ɵɵlistener("onSelectAll", (function() {
  1704. return d.ɵɵrestoreView(n),
  1705. d.ɵɵnextContext(2).toggleItemSelection()
  1706. }))("onDelete", (function() {
  1707. return d.ɵɵrestoreView(n),
  1708. d.ɵɵnextContext(2).deleteSelectedMeasurements()
  1709. }))("onSave", (function() {
  1710. return d.ɵɵrestoreView(n),
  1711. d.ɵɵnextContext(2).saveSelectedMeasurements()
  1712. }))("onShare", (function() {
  1713. return d.ɵɵrestoreView(n),
  1714. d.ɵɵnextContext(2).shareSelectedMeasurements()
  1715. }))("onVisibilityChange", (function() {
  1716. return d.ɵɵrestoreView(n),
  1717. d.ɵɵnextContext(2).toggleSelectedMeasurementsVisibility()
  1718. })),
  1719. d.ɵɵelementEnd(),
  1720. d.ɵɵelement(2, "hr", 6),
  1721. d.ɵɵtemplate(3, x, 2, 1, "ng-container", 7),
  1722. d.ɵɵelementStart(4, "div", 8),
  1723. d.ɵɵtemplate(5, y, 3, 1, "div", 9),
  1724. d.ɵɵelementEnd(),
  1725. d.ɵɵelementEnd()
  1726. }
  1727. if (2 & e) {
  1728. var o = d.ɵɵnextContext(2);
  1729. d.ɵɵadvance(1),
  1730. d.ɵɵproperty("isAnythingSelected", o.isAnythingSelected())("areAllItemsSelected", o.areAllItemSelected())("isEverythingHidden", o.isEverythingHidden())("isAsyncOperationInProgress", o.isAsyncOperationInProgress),
  1731. d.ɵɵadvance(4),
  1732. d.ɵɵproperty("ngForOf", o.measurementsList)
  1733. }
  1734. }
  1735. function b(e, t) {
  1736. if (1 & e && (d.ɵɵelementStart(0, "span", 18),
  1737. d.ɵɵtext(1),
  1738. d.ɵɵelementEnd()),
  1739. 2 & e) {
  1740. var n = d.ɵɵnextContext(3);
  1741. d.ɵɵadvance(1),
  1742. d.ɵɵtextInterpolate1(" ", n.measurementsList.length, " ")
  1743. }
  1744. }
  1745. function E(e, t) {
  1746. if (1 & e) {
  1747. var n = d.ɵɵgetCurrentView();
  1748. d.ɵɵelementStart(0, "span", 14),
  1749. d.ɵɵelementStart(1, "div", 15),
  1750. d.ɵɵelementStart(2, "i", 16),
  1751. d.ɵɵlistener("click", (function() {
  1752. return d.ɵɵrestoreView(n),
  1753. d.ɵɵnextContext(2).expandMenu()
  1754. })),
  1755. d.ɵɵtext(3, "list"),
  1756. d.ɵɵelementEnd(),
  1757. d.ɵɵtemplate(4, b, 2, 1, "span", 17),
  1758. d.ɵɵelementEnd(),
  1759. d.ɵɵelementEnd()
  1760. }
  1761. if (2 & e) {
  1762. var o = d.ɵɵnextContext(2);
  1763. d.ɵɵadvance(4),
  1764. d.ɵɵproperty("ngIf", o.measurementsList.length > 0)
  1765. }
  1766. }
  1767. function w(e, t) {
  1768. if (1 & e && (d.ɵɵelementContainerStart(0),
  1769. d.ɵɵelement(1, "hr", 1),
  1770. d.ɵɵtemplate(2, S, 6, 5, "span", 2),
  1771. d.ɵɵtemplate(3, E, 5, 1, "span", 3),
  1772. d.ɵɵelementContainerEnd()),
  1773. 2 & e) {
  1774. var n = d.ɵɵnextContext();
  1775. d.ɵɵadvance(2),
  1776. d.ɵɵproperty("ngIf", !n.isCollapsedView),
  1777. d.ɵɵadvance(1),
  1778. d.ɵɵproperty("ngIf", n.isCollapsedView)
  1779. }
  1780. }
  1781. var I = function() {
  1782. function e(e, t) {
  1783. var n = this;
  1784. this.MeasurementsService = e,
  1785. this.TrackingService = t,
  1786. this.measurementsList = [],
  1787. this.deleteSelected = new r.EventEmitter,
  1788. this.saveSelected = new r.EventEmitter,
  1789. this.shareSelected = new r.EventEmitter,
  1790. this.selectedMeasurements = [],
  1791. this.hasUserDeletedSomeMeasurements = !1,
  1792. this.measurementUpdateConnection = this.MeasurementsService.measurementsUpdated.connect((function() {
  1793. return n.updateSelectedMeasurements()
  1794. })),
  1795. this.measurementDeletedConnection = this.MeasurementsService.measurementDeleted.connect((function() {
  1796. return n.hasUserDeletedSomeMeasurements = !0
  1797. }))
  1798. }
  1799. return e.prototype.ngOnInit = function() {
  1800. this.updateSelectedMeasurements()
  1801. },
  1802. e.prototype.ngOnDestroy = function() {
  1803. this.measurementUpdateConnection && this.measurementUpdateConnection.disconnect(),
  1804. this.measurementDeletedConnection && this.measurementDeletedConnection.disconnect()
  1805. },
  1806. e.prototype.updateSelectedMeasurements = function() {
  1807. this.selectedMeasurements = this.measurementsList.filter((function(e) {
  1808. return e.selected
  1809. }))
  1810. },
  1811. e.prototype.areAllItemSelected = function() {
  1812. return this.measurementsList.length > 0 && this.measurementsList.every((function(e) {
  1813. return e.selected
  1814. }))
  1815. },
  1816. e.prototype.isAnythingSelected = function() {
  1817. return this.measurementsList.some((function(e) {
  1818. return e.selected
  1819. }))
  1820. },
  1821. e.prototype.toggleItemSelection = function() {
  1822. if (this.areAllItemSelected())
  1823. return this.measurementsList.forEach((function(e) {
  1824. return e.selected = !1
  1825. })),
  1826. void(this.selectedMeasurements = []);
  1827. this.measurementsList.forEach((function(e) {
  1828. return e.selected = !0
  1829. })),
  1830. this.selectedMeasurements = o(this.measurementsList)
  1831. },
  1832. e.prototype.handleItemToggleSelection = function(e) {
  1833. if (e.selected)
  1834. this.selectedMeasurements.push(e);
  1835. else {
  1836. var t = this.selectedMeasurements.indexOf(e);
  1837. t > -1 && this.selectedMeasurements.splice(t, 1)
  1838. }
  1839. },
  1840. e.prototype.deleteSelectedMeasurements = function() {
  1841. this.TrackingService.trackPreDefinedEvent((new i.MeasurementsDeletedEvent).numberOfMeasurements(this.selectedMeasurements.length).interactionArea(p.InteractionArea.SideMenu)),
  1842. this.deleteSelected.emit(this.selectedMeasurements)
  1843. },
  1844. e.prototype.saveSelectedMeasurements = function() {
  1845. this.TrackingService.trackPreDefinedEvent((new a.MeasurementsSavedEvent).numberOfMeasurements(this.selectedMeasurements.length).interactionArea(p.InteractionArea.SideMenu)),
  1846. this.saveSelected.emit(this.selectedMeasurements)
  1847. },
  1848. e.prototype.toggleSelectedMeasurementsVisibility = function() {
  1849. var e = this.selectedMeasurements.reduce((function(e, t) {
  1850. return e + (t.visible ? 1 : 0)
  1851. }), 0);
  1852. this.MeasurementsService.toggleVisibility(this.selectedMeasurements),
  1853. this.TrackingService.trackPreDefinedEvent((new u.MeasurementsHiddenEvent).numberOfMeasurements(e).interactionArea(p.InteractionArea.SideMenu))
  1854. },
  1855. e.prototype.isEverythingHidden = function() {
  1856. return this.selectedMeasurements.every((function(e) {
  1857. return !1 === e.visible
  1858. }))
  1859. },
  1860. e.prototype.expandMenu = function() {
  1861. var e = c.isMobileLayout() ? window.innerWidth - s.ToolboxMenuController.mobileCollapserWidth : s.ToolboxMenuController.menuDefaultWidth;
  1862. this.TrackingService.trackPreDefinedEvent((new l.ToolbarVisibilityChangedEvent).withNewWidth(e).visible(!0)),
  1863. document.getElementById(s.ToolboxMenuController.verticalToolboxMenuId).style.width = e + "px"
  1864. },
  1865. e.prototype.showMeasurementList = function() {
  1866. return 0 === this.measurementsList.length ? this.hasUserDeletedSomeMeasurements : this.measurementsList.length > 0
  1867. },
  1868. e.prototype.shareSelectedMeasurements = function() {
  1869. this.shareSelected.emit(this.selectedMeasurements)
  1870. },
  1871. e.ɵfac = function(t) {
  1872. return new(t || e)(d.ɵɵdirectiveInject(m.MeasurementsService), d.ɵɵdirectiveInject(g.TrackingService))
  1873. },
  1874. e.ɵcmp = d.ɵɵdefineComponent({
  1875. type: e,
  1876. selectors: [
  1877. ["measurement-list"]
  1878. ],
  1879. inputs: {
  1880. measurementsList: "measurementsList",
  1881. isCollapsedView: "isCollapsedView",
  1882. isAsyncOperationInProgress: "isAsyncOperationInProgress"
  1883. },
  1884. outputs: {
  1885. deleteSelected: "deleteSelected",
  1886. saveSelected: "saveSelected",
  1887. shareSelected: "shareSelected"
  1888. },
  1889. decls: 1,
  1890. vars: 1,
  1891. consts: [
  1892. [4, "ngIf"],
  1893. [1, "list-separator"],
  1894. ["class", "toolbar-list-wrapper", 4, "ngIf"],
  1895. ["class", "collapsed-list", 4, "ngIf"],
  1896. [1, "toolbar-list-wrapper"],
  1897. [3, "isAnythingSelected", "areAllItemsSelected", "isEverythingHidden", "isAsyncOperationInProgress", "onSelectAll", "onDelete", "onSave", "onShare", "onVisibilityChange"],
  1898. [1, "toolbar-separator"],
  1899. [4, "transloco"],
  1900. [1, "measurement-list-items"],
  1901. [4, "ngFor", "ngForOf"],
  1902. ["class", "no-measurements-info", 4, "ngIf"],
  1903. [1, "no-measurements-info"],
  1904. [3, "measurement", "onItemToggleSelection"],
  1905. [1, "measurements-separator"],
  1906. [1, "collapsed-list"],
  1907. [1, "list-icon-wrapper"],
  1908. [1, "material-icons", "list-icon", 3, "click"],
  1909. ["class", "badge", 4, "ngIf"],
  1910. [1, "badge"]
  1911. ],
  1912. template: function(e, t) {
  1913. 1 & e && d.ɵɵtemplate(0, w, 4, 2, "ng-container", 0),
  1914. 2 & e && d.ɵɵproperty("ngIf", t.showMeasurementList())
  1915. },
  1916. directives: [f.NgIf, v.MeasurementListToolbarComponent, h.TranslocoDirective, f.NgForOf, M.MeasurementDetailsComponent],
  1917. styles: ["[_nghost-%COMP%]{min-height:210px;overflow:hidden}.toolbar-list-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}measurement-list-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;min-height:60px;margin:0 20px}.no-measurements-info[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%}.measurements-separator[_ngcontent-%COMP%], .toolbar-separator[_ngcontent-%COMP%]{margin:0;border:.5px solid #eee}.measurement-list-items[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}.collapsed-list[_ngcontent-%COMP%]{position:relative}.list-icon-wrapper[_ngcontent-%COMP%]{top:0;position:absolute}i.list-icon[_ngcontent-%COMP%]{margin:25px 12px;padding:6px;cursor:pointer;border-radius:7px}i.list-icon.selected[_ngcontent-%COMP%], i.list-icon[_ngcontent-%COMP%]:hover{background-color:#d3d3d3}.badge[_ngcontent-%COMP%]{position:absolute;right:6px;margin-top:20px;background-color:#3398c7}.list-separator[_ngcontent-%COMP%]{width:calc(100% + 40px);margin:0 -20px;border:.5px solid #eee}"]
  1918. }),
  1919. e
  1920. }();
  1921. t.MeasurementListComponent = I,
  1922. d.ɵsetClassMetadata(I, [{
  1923. type: r.Component,
  1924. args: [{
  1925. selector: "measurement-list",
  1926. templateUrl: "MeasurementList.ng.html",
  1927. styleUrls: ["MeasurementList.ng.scss"]
  1928. }]
  1929. }], (function() {
  1930. return [{
  1931. type: m.MeasurementsService
  1932. }, {
  1933. type: g.TrackingService
  1934. }]
  1935. }), {
  1936. measurementsList: [{
  1937. type: r.Input
  1938. }],
  1939. isCollapsedView: [{
  1940. type: r.Input
  1941. }],
  1942. isAsyncOperationInProgress: [{
  1943. type: r.Input
  1944. }],
  1945. deleteSelected: [{
  1946. type: r.Output
  1947. }],
  1948. saveSelected: [{
  1949. type: r.Output
  1950. }],
  1951. shareSelected: [{
  1952. type: r.Output
  1953. }]
  1954. })
  1955. },
  1956. 1941: function(e, t, n) {
  1957. "use strict";
  1958. Object.defineProperty(t, "__esModule", {
  1959. value: !0
  1960. });
  1961. var o = n(0),
  1962. r = n(168),
  1963. i = (n(27),
  1964. n(0)),
  1965. a = n(27),
  1966. s = n(168),
  1967. l = n(3);
  1968. function c(e, t) {
  1969. if (1 & e) {
  1970. var n = i.ɵɵgetCurrentView();
  1971. i.ɵɵelementStart(0, "button", 4),
  1972. i.ɵɵlistener("click", (function() {
  1973. return i.ɵɵrestoreView(n),
  1974. i.ɵɵnextContext(2).onSave.emit()
  1975. })),
  1976. i.ɵɵelementStart(1, "i", 5),
  1977. i.ɵɵtext(2, "save"),
  1978. i.ɵɵelementEnd(),
  1979. i.ɵɵelementEnd()
  1980. }
  1981. if (2 & e) {
  1982. var o = i.ɵɵnextContext().$implicit,
  1983. r = i.ɵɵnextContext();
  1984. i.ɵɵproperty("disabled", !r.isAnythingSelected || r.isAsyncOperationInProgress)("title", o("Save Selected"))
  1985. }
  1986. }
  1987. function u(e, t) {
  1988. if (1 & e) {
  1989. var n = i.ɵɵgetCurrentView();
  1990. i.ɵɵelementContainerStart(0),
  1991. i.ɵɵelementStart(1, "button", 1),
  1992. i.ɵɵlistener("click", (function() {
  1993. return i.ɵɵrestoreView(n),
  1994. i.ɵɵnextContext().onSelectAll.emit()
  1995. })),
  1996. i.ɵɵelement(2, "i", 2),
  1997. i.ɵɵelementEnd(),
  1998. i.ɵɵelementStart(3, "div", 3),
  1999. i.ɵɵelementStart(4, "button", 4),
  2000. i.ɵɵlistener("click", (function() {
  2001. return i.ɵɵrestoreView(n),
  2002. i.ɵɵnextContext().onVisibilityChange.emit()
  2003. })),
  2004. i.ɵɵelementStart(5, "i", 5),
  2005. i.ɵɵtext(6, "visibility_off"),
  2006. i.ɵɵelementEnd(),
  2007. i.ɵɵelementEnd(),
  2008. i.ɵɵelementStart(7, "button", 4),
  2009. i.ɵɵlistener("click", (function() {
  2010. return i.ɵɵrestoreView(n),
  2011. i.ɵɵnextContext().onShare.emit()
  2012. })),
  2013. i.ɵɵelementStart(8, "i", 5),
  2014. i.ɵɵtext(9, "share"),
  2015. i.ɵɵelementEnd(),
  2016. i.ɵɵelementEnd(),
  2017. i.ɵɵelementStart(10, "button", 4),
  2018. i.ɵɵlistener("click", (function() {
  2019. return i.ɵɵrestoreView(n),
  2020. i.ɵɵnextContext().onDelete.emit()
  2021. })),
  2022. i.ɵɵelementStart(11, "i", 5),
  2023. i.ɵɵtext(12, "delete"),
  2024. i.ɵɵelementEnd(),
  2025. i.ɵɵelementEnd(),
  2026. i.ɵɵtemplate(13, c, 3, 2, "button", 6),
  2027. i.ɵɵelementEnd(),
  2028. i.ɵɵelementContainerEnd()
  2029. }
  2030. if (2 & e) {
  2031. var o = t.$implicit,
  2032. r = i.ɵɵnextContext();
  2033. i.ɵɵadvance(1),
  2034. i.ɵɵproperty("title", o("Select All")),
  2035. i.ɵɵadvance(1),
  2036. i.ɵɵclassProp("fa-square-o", !r.areAllItemsSelected)("fa-check-square-o", r.areAllItemsSelected),
  2037. i.ɵɵadvance(2),
  2038. i.ɵɵproperty("disabled", !r.isAnythingSelected || r.isAsyncOperationInProgress)("title", r.getVisibilityTooltipText()),
  2039. i.ɵɵadvance(3),
  2040. i.ɵɵproperty("disabled", !r.isAnythingSelected || r.isAsyncOperationInProgress)("title", o("Share Selected")),
  2041. i.ɵɵadvance(3),
  2042. i.ɵɵproperty("disabled", !r.isAnythingSelected || r.isAsyncOperationInProgress)("title", o("Delete Selected")),
  2043. i.ɵɵadvance(3),
  2044. i.ɵɵproperty("ngIf", r.canUserSaveMeasurements())
  2045. }
  2046. }
  2047. var p = function() {
  2048. function e(e) {
  2049. this.UserService = e,
  2050. this.onSelectAll = new o.EventEmitter,
  2051. this.onDelete = new o.EventEmitter,
  2052. this.onSave = new o.EventEmitter,
  2053. this.onVisibilityChange = new o.EventEmitter,
  2054. this.onShare = new o.EventEmitter
  2055. }
  2056. return e.prototype.getVisibilityTooltipText = function() {
  2057. return this.isEverythingHidden && this.isAnythingSelected ? r.translate("Show Selected") : r.translate("Hide Selected")
  2058. },
  2059. e.prototype.canUserSaveMeasurements = function() {
  2060. return this.UserService.canSaveMeasurements()
  2061. },
  2062. e.ɵfac = function(t) {
  2063. return new(t || e)(i.ɵɵdirectiveInject(a.UserService))
  2064. },
  2065. e.ɵcmp = i.ɵɵdefineComponent({
  2066. type: e,
  2067. selectors: [
  2068. ["measurement-list-toolbar"]
  2069. ],
  2070. inputs: {
  2071. isAnythingSelected: "isAnythingSelected",
  2072. isEverythingHidden: "isEverythingHidden",
  2073. areAllItemsSelected: "areAllItemsSelected",
  2074. isAsyncOperationInProgress: "isAsyncOperationInProgress"
  2075. },
  2076. outputs: {
  2077. onSelectAll: "onSelectAll",
  2078. onDelete: "onDelete",
  2079. onSave: "onSave",
  2080. onVisibilityChange: "onVisibilityChange",
  2081. onShare: "onShare"
  2082. },
  2083. decls: 1,
  2084. vars: 0,
  2085. consts: [
  2086. [4, "transloco"],
  2087. [1, "button-fa-material-align", "btn", "btn-default", "btn-borderless", 3, "title", "click"],
  2088. [1, "fa"],
  2089. [1, "operations", "float-right"],
  2090. [1, "btn", "btn-default", "btn-borderless", "center-icon", 3, "disabled", "title", "click"],
  2091. [1, "material-icons"],
  2092. ["class", "btn btn-default btn-borderless center-icon", 3, "disabled", "title", "click", 4, "ngIf"]
  2093. ],
  2094. template: function(e, t) {
  2095. 1 & e && i.ɵɵtemplate(0, u, 14, 12, "ng-container", 0)
  2096. },
  2097. directives: [s.TranslocoDirective, l.NgIf],
  2098. styles: [".operations[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.operations[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:3px}.operations[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px}.button-fa-material-align[_ngcontent-%COMP%]{margin-top:1px}button[_ngcontent-%COMP%]{min-width:39px;max-width:39px}.center-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.material-icons[_ngcontent-%COMP%]{font-size:20px}"]
  2099. }),
  2100. e
  2101. }();
  2102. t.MeasurementListToolbarComponent = p,
  2103. i.ɵsetClassMetadata(p, [{
  2104. type: o.Component,
  2105. args: [{
  2106. selector: "measurement-list-toolbar",
  2107. templateUrl: "MeasurementListToolbar.ng.html",
  2108. styleUrls: ["MeasurementListToolbar.ng.scss"]
  2109. }]
  2110. }], (function() {
  2111. return [{
  2112. type: a.UserService
  2113. }]
  2114. }), {
  2115. isAnythingSelected: [{
  2116. type: o.Input
  2117. }],
  2118. isEverythingHidden: [{
  2119. type: o.Input
  2120. }],
  2121. areAllItemsSelected: [{
  2122. type: o.Input
  2123. }],
  2124. isAsyncOperationInProgress: [{
  2125. type: o.Input
  2126. }],
  2127. onSelectAll: [{
  2128. type: o.Output
  2129. }],
  2130. onDelete: [{
  2131. type: o.Output
  2132. }],
  2133. onSave: [{
  2134. type: o.Output
  2135. }],
  2136. onVisibilityChange: [{
  2137. type: o.Output
  2138. }],
  2139. onShare: [{
  2140. type: o.Output
  2141. }]
  2142. })
  2143. },
  2144. 1942: function(e, t, n) {
  2145. "use strict";
  2146. Object.defineProperty(t, "__esModule", {
  2147. value: !0
  2148. });
  2149. var o = n(0),
  2150. r = (n(453),
  2151. n(85)),
  2152. i = (n(171),
  2153. n(8)),
  2154. a = (n(27),
  2155. n(349)),
  2156. s = (n(21),
  2157. n(643)),
  2158. l = n(168),
  2159. c = n(0),
  2160. u = n(171),
  2161. p = n(27),
  2162. d = n(21),
  2163. m = n(3),
  2164. g = n(168),
  2165. f = n(1692),
  2166. v = n(1700),
  2167. h = ["measurementNameInput"],
  2168. M = ["measurementNoteInput"];
  2169. function C(e, t) {
  2170. if (1 & e && c.ɵɵelement(0, "img", 15),
  2171. 2 & e) {
  2172. var n = c.ɵɵnextContext();
  2173. c.ɵɵclassProp("measurement-invisible", !n.measurement.visible),
  2174. c.ɵɵproperty("src", n.measurementIcon, c.ɵɵsanitizeUrl)
  2175. }
  2176. }
  2177. function x(e, t) {
  2178. if (1 & e && c.ɵɵelement(0, "img", 16),
  2179. 2 & e) {
  2180. var n = c.ɵɵnextContext();
  2181. c.ɵɵclassProp("measurement-invisible", !n.measurement.visible),
  2182. c.ɵɵproperty("src", n.measurementIcon, c.ɵɵsanitizeUrl)
  2183. }
  2184. }
  2185. function y(e, t) {
  2186. if (1 & e) {
  2187. var n = c.ɵɵgetCurrentView();
  2188. c.ɵɵelementStart(0, "div", 17),
  2189. c.ɵɵlistener("dblclick", (function() {
  2190. return c.ɵɵrestoreView(n),
  2191. c.ɵɵnextContext().startModifyingTitle()
  2192. })),
  2193. c.ɵɵtext(1),
  2194. c.ɵɵelementEnd()
  2195. }
  2196. if (2 & e) {
  2197. var o = c.ɵɵnextContext();
  2198. c.ɵɵclassProp("measurement-invisible", !o.measurement.visible),
  2199. c.ɵɵadvance(1),
  2200. c.ɵɵtextInterpolate1(" ", o.measurement.name, " ")
  2201. }
  2202. }
  2203. function S(e, t) {
  2204. if (1 & e && (c.ɵɵelementStart(0, "span", 19),
  2205. c.ɵɵtext(1),
  2206. c.ɵɵelementEnd()),
  2207. 2 & e) {
  2208. var n = c.ɵɵnextContext().$implicit;
  2209. c.ɵɵadvance(1),
  2210. c.ɵɵtextInterpolate1(" ", n("unsaved"), " ")
  2211. }
  2212. }
  2213. function b(e, t) {
  2214. if (1 & e && (c.ɵɵelementContainerStart(0),
  2215. c.ɵɵtemplate(1, S, 2, 1, "span", 18),
  2216. c.ɵɵelementContainerEnd()),
  2217. 2 & e) {
  2218. var n = c.ɵɵnextContext();
  2219. c.ɵɵadvance(1),
  2220. c.ɵɵproperty("ngIf", n.canUserSaveMeasurements() && !n.isMeasurementSaved(n.measurement))
  2221. }
  2222. }
  2223. var E = function(e) {
  2224. return [e, "distance", 2, .1, !0]
  2225. };
  2226. function w(e, t) {
  2227. if (1 & e && (c.ɵɵelementStart(0, "span", 20),
  2228. c.ɵɵtext(1),
  2229. c.ɵɵpipe(2, "uom"),
  2230. c.ɵɵelementEnd()),
  2231. 2 & e) {
  2232. var n = c.ɵɵnextContext();
  2233. c.ɵɵadvance(1),
  2234. c.ɵɵtextInterpolate1(" ", c.ɵɵpipeBindV(2, 1, c.ɵɵpureFunction1(7, E, n.measurement.value)), "")
  2235. }
  2236. }
  2237. function I(e, t) {
  2238. if (1 & e && (c.ɵɵelementStart(0, "span", 21),
  2239. c.ɵɵtext(1),
  2240. c.ɵɵpipe(2, "uom"),
  2241. c.ɵɵelementEnd()),
  2242. 2 & e) {
  2243. var n = c.ɵɵnextContext();
  2244. c.ɵɵadvance(1),
  2245. c.ɵɵtextInterpolate1(" ", c.ɵɵpipeBind2(2, 1, n.measurement.value, "area"), "")
  2246. }
  2247. }
  2248. function P(e, t) {
  2249. 1 & e && (c.ɵɵelementStart(0, "i", 25),
  2250. c.ɵɵtext(1, "expand_more"),
  2251. c.ɵɵelementEnd())
  2252. }
  2253. function O(e, t) {
  2254. 1 & e && (c.ɵɵelementStart(0, "i", 25),
  2255. c.ɵɵtext(1, "expand_less"),
  2256. c.ɵɵelementEnd())
  2257. }
  2258. function _(e, t) {
  2259. if (1 & e) {
  2260. var n = c.ɵɵgetCurrentView();
  2261. c.ɵɵelementStart(0, "button", 23),
  2262. c.ɵɵlistener("click", (function(e) {
  2263. return c.ɵɵrestoreView(n),
  2264. c.ɵɵnextContext(2).toggleNote(e)
  2265. })),
  2266. c.ɵɵtemplate(1, P, 2, 0, "i", 24),
  2267. c.ɵɵtemplate(2, O, 2, 0, "i", 24),
  2268. c.ɵɵelementEnd()
  2269. }
  2270. if (2 & e) {
  2271. var o = c.ɵɵnextContext().$implicit,
  2272. r = c.ɵɵnextContext();
  2273. c.ɵɵproperty("title", o("expand")),
  2274. c.ɵɵadvance(1),
  2275. c.ɵɵproperty("ngIf", !r.noteExpanded),
  2276. c.ɵɵadvance(1),
  2277. c.ɵɵproperty("ngIf", r.noteExpanded)
  2278. }
  2279. }
  2280. function T(e, t) {
  2281. if (1 & e && (c.ɵɵelementContainerStart(0),
  2282. c.ɵɵtemplate(1, _, 3, 3, "button", 22),
  2283. c.ɵɵelementContainerEnd()),
  2284. 2 & e) {
  2285. var n = c.ɵɵnextContext();
  2286. c.ɵɵadvance(1),
  2287. c.ɵɵproperty("ngIf", n.canUserSaveMeasurements())
  2288. }
  2289. }
  2290. function A(e, t) {
  2291. if (1 & e && (c.ɵɵelementStart(0, "div", 31),
  2292. c.ɵɵtext(1),
  2293. c.ɵɵelementEnd()),
  2294. 2 & e) {
  2295. var n = c.ɵɵnextContext(3);
  2296. c.ɵɵadvance(1),
  2297. c.ɵɵtextInterpolate(n.measurement.note)
  2298. }
  2299. }
  2300. function D(e, t) {
  2301. if (1 & e && (c.ɵɵelementStart(0, "div", 32),
  2302. c.ɵɵtext(1),
  2303. c.ɵɵelementEnd()),
  2304. 2 & e) {
  2305. var n = c.ɵɵnextContext(2).$implicit;
  2306. c.ɵɵadvance(1),
  2307. c.ɵɵtextInterpolate(n("Double click to add a description"))
  2308. }
  2309. }
  2310. function V(e, t) {
  2311. if (1 & e) {
  2312. var n = c.ɵɵgetCurrentView();
  2313. c.ɵɵelementStart(0, "div", 17),
  2314. c.ɵɵlistener("dblclick", (function() {
  2315. return c.ɵɵrestoreView(n),
  2316. c.ɵɵnextContext(2).editNote()
  2317. })),
  2318. c.ɵɵtemplate(1, A, 2, 1, "div", 29),
  2319. c.ɵɵtemplate(2, D, 2, 1, "div", 30),
  2320. c.ɵɵelementEnd()
  2321. }
  2322. if (2 & e) {
  2323. var o = c.ɵɵnextContext(2);
  2324. c.ɵɵclassProp("measurement-invisible", !o.measurement.visible),
  2325. c.ɵɵadvance(1),
  2326. c.ɵɵproperty("ngIf", o.measurement.note),
  2327. c.ɵɵadvance(1),
  2328. c.ɵɵproperty("ngIf", !o.measurement.note)
  2329. }
  2330. }
  2331. function k(e, t) {
  2332. if (1 & e) {
  2333. var n = c.ɵɵgetCurrentView();
  2334. c.ɵɵelementContainerStart(0),
  2335. c.ɵɵelementStart(1, "div", 26),
  2336. c.ɵɵtemplate(2, V, 3, 4, "div", 7),
  2337. c.ɵɵelementStart(3, "textarea", 27, 28),
  2338. c.ɵɵlistener("focusout", (function() {
  2339. return c.ɵɵrestoreView(n),
  2340. c.ɵɵnextContext().saveNote()
  2341. }))("keydown.enter", (function() {
  2342. return c.ɵɵrestoreView(n),
  2343. c.ɵɵnextContext().saveNote()
  2344. }))("keyup.escape", (function() {
  2345. return c.ɵɵrestoreView(n),
  2346. c.ɵɵnextContext().discardChanges()
  2347. })),
  2348. c.ɵɵelementEnd(),
  2349. c.ɵɵelementEnd(),
  2350. c.ɵɵelementContainerEnd()
  2351. }
  2352. if (2 & e) {
  2353. var o = t.$implicit,
  2354. r = c.ɵɵnextContext();
  2355. c.ɵɵadvance(2),
  2356. c.ɵɵproperty("ngIf", !r.modifyingNote),
  2357. c.ɵɵadvance(1),
  2358. c.ɵɵproperty("placeholder", o("Double click to add a description"))("hidden", !r.modifyingNote)
  2359. }
  2360. }
  2361. var R = function(e) {
  2362. return {
  2363. hovered: e
  2364. }
  2365. },
  2366. N = function() {
  2367. function e(e, t, n) {
  2368. this.MeasurementsService = e,
  2369. this.UserService = t,
  2370. this.TrackingService = n,
  2371. this.onItemToggleSelection = new o.EventEmitter,
  2372. this.modifyingTitle = !1,
  2373. this.modifyingNote = !1,
  2374. this.noteExpanded = !1,
  2375. this.discardNameChanges = !1,
  2376. this.preventSingleClick = !1
  2377. }
  2378. return e.prototype.ngOnInit = function() {
  2379. this.measurementIcon = this.getMeasurementIcon()
  2380. },
  2381. e.prototype.navigateToMeasurement = function() {
  2382. var e = this;
  2383. this.preventSingleClick = !1,
  2384. this.singleClickTimeout = window.setTimeout((function() {
  2385. e.preventSingleClick || e.MeasurementsService.navigateToMeasurement(e.measurement).catch(i.handleWarning)
  2386. }), a.InputHandler.DOUBLE_CLICK_INTERVAL)
  2387. },
  2388. e.prototype.toggleSelection = function(e) {
  2389. this.measurement.selected = !this.measurement.selected,
  2390. this.onItemToggleSelection.emit(this.measurement),
  2391. e.stopPropagation()
  2392. },
  2393. e.prototype.isArea = function() {
  2394. return r.ToolSpec.of(this.measurement.type).type === r.ToolType.AREA
  2395. },
  2396. e.prototype.isDistance = function() {
  2397. return r.ToolSpec.of(this.measurement.type).type === r.ToolType.DISTANCE
  2398. },
  2399. e.prototype.startHover = function() {
  2400. this.MeasurementsService.setMeasurementHovered(this.measurement, !0)
  2401. },
  2402. e.prototype.endHover = function() {
  2403. this.MeasurementsService.setMeasurementHovered(this.measurement, !1)
  2404. },
  2405. e.prototype.isMeasurementSaved = function(e) {
  2406. return e.isSaved()
  2407. },
  2408. e.prototype.canUserSaveMeasurements = function() {
  2409. return this.UserService.canSaveMeasurements()
  2410. },
  2411. e.prototype.startModifyingTitle = function() {
  2412. var e = this;
  2413. this.toggleDoubleClickEdit((function() {
  2414. e.modifyingTitle = !0
  2415. }), this.measurementNameInput, this.measurement.name)
  2416. },
  2417. e.prototype.finishModifyingTitle = function() {
  2418. var e = this;
  2419. this.modifyingTitle = this.finishEdit((function(t) {
  2420. e.measurement.name = t
  2421. }), l.translate(this.measurement.nameIfEmpty), this.measurementNameInput, this.modifyingTitle, s.ModificationType.RENAME)
  2422. },
  2423. e.prototype.discardChanges = function() {
  2424. this.discardNameChanges = !0,
  2425. this.modifyingTitle = !1,
  2426. this.modifyingNote = !1
  2427. },
  2428. e.prototype.saveNote = function() {
  2429. var e = this;
  2430. this.modifyingNote = this.finishEdit((function(t) {
  2431. e.measurement.note = t
  2432. }), "", this.measurementNoteInput, this.modifyingNote, s.ModificationType.ANNOTATED)
  2433. },
  2434. e.prototype.editNote = function() {
  2435. var e = this;
  2436. this.toggleDoubleClickEdit((function() {
  2437. e.modifyingNote = !0
  2438. }), this.measurementNoteInput, this.measurement.note)
  2439. },
  2440. e.prototype.toggleNote = function(e) {
  2441. this.noteExpanded = !this.noteExpanded,
  2442. e.stopPropagation()
  2443. },
  2444. e.prototype.getMeasurementIcon = function() {
  2445. return r.ToolSpec.of(this.measurement.type).iconSrc
  2446. },
  2447. e.prototype.toggleDoubleClickEdit = function(e, t, n) {
  2448. this.preventSingleClick = !0,
  2449. clearTimeout(this.singleClickTimeout),
  2450. e(),
  2451. t.nativeElement.value = n,
  2452. t.nativeElement.select(),
  2453. setTimeout((function() {
  2454. t.nativeElement.focus(),
  2455. t.nativeElement.select()
  2456. }))
  2457. },
  2458. e.prototype.finishEdit = function(e, t, n, o, r) {
  2459. o && this.TrackingService.trackPreDefinedEvent((new s.MeasurementModifiedEvent).withModification(r));
  2460. var i = n.nativeElement.value.trim() ? n.nativeElement.value.trim() : t;
  2461. return this.discardNameChanges ? (this.discardNameChanges = !1, !1) : (e(i), !1)
  2462. },
  2463. e.ɵfac = function(t) {
  2464. return new(t || e)(c.ɵɵdirectiveInject(u.MeasurementsService), c.ɵɵdirectiveInject(p.UserService), c.ɵɵdirectiveInject(d.TrackingService))
  2465. },
  2466. e.ɵcmp = c.ɵɵdefineComponent({
  2467. type: e,
  2468. selectors: [
  2469. ["measurement-details"]
  2470. ],
  2471. viewQuery: function(e, t) {
  2472. var n;
  2473. (1 & e && (c.ɵɵviewQuery(h, !0),
  2474. c.ɵɵviewQuery(M, !0)),
  2475. 2 & e) && (c.ɵɵqueryRefresh(n = c.ɵɵloadQuery()) && (t.measurementNameInput = n.first),
  2476. c.ɵɵqueryRefresh(n = c.ɵɵloadQuery()) && (t.measurementNoteInput = n.first))
  2477. },
  2478. inputs: {
  2479. measurement: "measurement"
  2480. },
  2481. outputs: {
  2482. onItemToggleSelection: "onItemToggleSelection"
  2483. },
  2484. decls: 17,
  2485. vars: 18,
  2486. consts: [
  2487. [1, "clickable", "measurement-details", 3, "ngClass", "click", "mouseenter", "mouseleave"],
  2488. [1, "measurement-details-row"],
  2489. [1, "btn", "btn-default", "btn-borderless", 3, "click"],
  2490. [1, "fa"],
  2491. ["alt", "distance_icon", "class", "measurement-icon", 3, "src", "measurement-invisible", 4, "ngIf"],
  2492. ["alt", "area_icon", "class", "measurement-icon", 3, "src", "measurement-invisible", 4, "ngIf"],
  2493. [1, "measurement-name"],
  2494. [3, "measurement-invisible", "dblclick", 4, "ngIf"],
  2495. ["type", "text", "maxlength", "100", 1, "form-control", 3, "hidden", "focusout", "keyup.enter", "keyup.escape"],
  2496. ["measurementNameInput", ""],
  2497. [4, "transloco"],
  2498. [1, "measurement-value"],
  2499. ["class", "measurement-value-distance", 4, "ngIf"],
  2500. ["class", "measurement-value-area", 4, "ngIf"],
  2501. [1, "measurement-details-row", "measurement-note-row", 3, "hidden"],
  2502. ["alt", "distance_icon", 1, "measurement-icon", 3, "src"],
  2503. ["alt", "area_icon", 1, "measurement-icon", 3, "src"],
  2504. [3, "dblclick"],
  2505. ["class", "unsaved-label", 4, "ngIf"],
  2506. [1, "unsaved-label"],
  2507. [1, "measurement-value-distance"],
  2508. [1, "measurement-value-area"],
  2509. ["class", "btn btn-default btn-borderless center-icon expand-button", 3, "title", "click", 4, "ngIf"],
  2510. [1, "btn", "btn-default", "btn-borderless", "center-icon", "expand-button", 3, "title", "click"],
  2511. ["class", "material-icons", 4, "ngIf"],
  2512. [1, "material-icons"],
  2513. [1, "measurement-note-container"],
  2514. ["maxlength", "255", "rows", "2", 1, "form-control", "note", 3, "placeholder", "hidden", "focusout", "keydown.enter", "keyup.escape"],
  2515. ["measurementNoteInput", ""],
  2516. ["class", "measurement-note", 4, "ngIf"],
  2517. ["class", "measurement-note-placeholder", 4, "ngIf"],
  2518. [1, "measurement-note"],
  2519. [1, "measurement-note-placeholder"]
  2520. ],
  2521. template: function(e, t) {
  2522. 1 & e && (c.ɵɵelementStart(0, "div", 0),
  2523. c.ɵɵlistener("click", (function() {
  2524. return t.navigateToMeasurement()
  2525. }))("mouseenter", (function() {
  2526. return t.startHover()
  2527. }))("mouseleave", (function() {
  2528. return t.endHover()
  2529. })),
  2530. c.ɵɵelementStart(1, "div", 1),
  2531. c.ɵɵelementStart(2, "button", 2),
  2532. c.ɵɵlistener("click", (function(e) {
  2533. return t.toggleSelection(e)
  2534. })),
  2535. c.ɵɵelement(3, "i", 3),
  2536. c.ɵɵelementEnd(),
  2537. c.ɵɵtemplate(4, C, 1, 3, "img", 4),
  2538. c.ɵɵtemplate(5, x, 1, 3, "img", 5),
  2539. c.ɵɵelementStart(6, "div", 6),
  2540. c.ɵɵtemplate(7, y, 2, 3, "div", 7),
  2541. c.ɵɵelementStart(8, "input", 8, 9),
  2542. c.ɵɵlistener("focusout", (function() {
  2543. return t.finishModifyingTitle()
  2544. }))("keyup.enter", (function() {
  2545. return t.finishModifyingTitle()
  2546. }))("keyup.escape", (function() {
  2547. return t.discardChanges()
  2548. })),
  2549. c.ɵɵelementEnd(),
  2550. c.ɵɵelementEnd(),
  2551. c.ɵɵtemplate(10, b, 2, 1, "ng-container", 10),
  2552. c.ɵɵelementStart(11, "span", 11),
  2553. c.ɵɵtemplate(12, w, 3, 9, "span", 12),
  2554. c.ɵɵtemplate(13, I, 3, 4, "span", 13),
  2555. c.ɵɵelementEnd(),
  2556. c.ɵɵtemplate(14, T, 2, 1, "ng-container", 10),
  2557. c.ɵɵelementEnd(),
  2558. c.ɵɵelementStart(15, "div", 14),
  2559. c.ɵɵtemplate(16, k, 5, 3, "ng-container", 10),
  2560. c.ɵɵelementEnd(),
  2561. c.ɵɵelementEnd()),
  2562. 2 & e && (c.ɵɵproperty("ngClass", c.ɵɵpureFunction1(16, R, t.measurement.isHovered)),
  2563. c.ɵɵadvance(3),
  2564. c.ɵɵclassProp("fa-square-o", !t.measurement.selected)("fa-check-square-o", t.measurement.selected),
  2565. c.ɵɵadvance(1),
  2566. c.ɵɵproperty("ngIf", t.isDistance()),
  2567. c.ɵɵadvance(1),
  2568. c.ɵɵproperty("ngIf", t.isArea()),
  2569. c.ɵɵadvance(2),
  2570. c.ɵɵproperty("ngIf", !t.modifyingTitle),
  2571. c.ɵɵadvance(1),
  2572. c.ɵɵproperty("hidden", !t.modifyingTitle),
  2573. c.ɵɵadvance(3),
  2574. c.ɵɵclassProp("measurement-invisible", !t.measurement.visible),
  2575. c.ɵɵadvance(1),
  2576. c.ɵɵproperty("ngIf", t.isDistance()),
  2577. c.ɵɵadvance(1),
  2578. c.ɵɵproperty("ngIf", t.isArea()),
  2579. c.ɵɵadvance(2),
  2580. c.ɵɵclassProp("measurement-note-edit", t.modifyingNote),
  2581. c.ɵɵproperty("hidden", !t.noteExpanded))
  2582. },
  2583. directives: [m.NgClass, m.NgIf, g.TranslocoDirective, f.AddBaseUrlDirective],
  2584. pipes: [v.UoMPipe],
  2585. styles: [".hovered[_ngcontent-%COMP%]{background-color:#e6e6e6}.measurement-details[_ngcontent-%COMP%]{flex-direction:column;padding:10px 20px}.measurement-details[_ngcontent-%COMP%], .measurement-details-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.measurement-details-row[_ngcontent-%COMP%]{flex-grow:1;flex-direction:row;height:20px;width:100%;margin:10px 0}.measurement-details-row.measurement-note-edit[_ngcontent-%COMP%]{height:54px;overflow:hidden}.measurement-details-row.measurement-note-row[_ngcontent-%COMP%]{height:auto;max-height:54px;overflow:auto}button[_ngcontent-%COMP%]{min-width:39px}.expand-button[_ngcontent-%COMP%]{min-width:50px}.measurement-icon[_ngcontent-%COMP%]{margin:0 1.7em 0 .3em;flex-shrink:0}.measurement-name[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden}.measurement-name[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.measurement-name[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .measurement-name[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;border-radius:4px;resize:none}.measurement-name[_ngcontent-%COMP%] div.measurement-note-placeholder[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%] div.measurement-note-placeholder[_ngcontent-%COMP%]{font-style:italic}.measurement-name[_ngcontent-%COMP%] div.measurement-note[_ngcontent-%COMP%], .measurement-note-container[_ngcontent-%COMP%] div.measurement-note[_ngcontent-%COMP%]{white-space:pre-wrap}.measurement-note-container[_ngcontent-%COMP%]{margin-left:92px;padding-right:44px;max-height:54px;overflow-y:auto}.measurement-value[_ngcontent-%COMP%]{line-height:40px;min-width:110px;text-align:right}.measurement-value[_ngcontent-%COMP%] .measurement-value-distance[_ngcontent-%COMP%]{padding-right:20px}.measurement-value[_ngcontent-%COMP%] .measurement-value-area[_ngcontent-%COMP%]{padding-right:15px}.unsaved-label[_ngcontent-%COMP%]{color:#d3d3d3;padding-left:10px}.measurement-invisible[_ngcontent-%COMP%]{opacity:.3}[hidden][_ngcontent-%COMP%]{display:none!important}"]
  2586. }),
  2587. e
  2588. }();
  2589. t.MeasurementDetailsComponent = N,
  2590. c.ɵsetClassMetadata(N, [{
  2591. type: o.Component,
  2592. args: [{
  2593. selector: "measurement-details",
  2594. templateUrl: "MeasurementDetails.ng.html",
  2595. styleUrls: ["MeasurementDetails.ng.scss"]
  2596. }]
  2597. }], (function() {
  2598. return [{
  2599. type: u.MeasurementsService
  2600. }, {
  2601. type: p.UserService
  2602. }, {
  2603. type: d.TrackingService
  2604. }]
  2605. }), {
  2606. measurement: [{
  2607. type: o.Input
  2608. }],
  2609. onItemToggleSelection: [{
  2610. type: o.Output
  2611. }],
  2612. measurementNameInput: [{
  2613. type: o.ViewChild,
  2614. args: ["measurementNameInput", {
  2615. static: !1
  2616. }]
  2617. }],
  2618. measurementNoteInput: [{
  2619. type: o.ViewChild,
  2620. args: ["measurementNoteInput", {
  2621. static: !1
  2622. }]
  2623. }]
  2624. })
  2625. },
  2626. 1943: function(e, t, n) {
  2627. "use strict";
  2628. var o = this && this.__awaiter || function(e, t, n, o) {
  2629. return new(n || (n = Promise))((function(r, i) {
  2630. function a(e) {
  2631. try {
  2632. l(o.next(e))
  2633. } catch (e) {
  2634. i(e)
  2635. }
  2636. }
  2637. function s(e) {
  2638. try {
  2639. l(o.throw(e))
  2640. } catch (e) {
  2641. i(e)
  2642. }
  2643. }
  2644. function l(e) {
  2645. var t;
  2646. e.done ? r(e.value) : (t = e.value,
  2647. t instanceof n ? t : new n((function(e) {
  2648. e(t)
  2649. }))).then(a, s)
  2650. }
  2651. l((o = o.apply(e, t || [])).next())
  2652. }))
  2653. },
  2654. r = this && this.__generator || function(e, t) {
  2655. var n, o, r, i, a = {
  2656. label: 0,
  2657. sent: function() {
  2658. if (1 & r[0])
  2659. throw r[1];
  2660. return r[1]
  2661. },
  2662. trys: [],
  2663. ops: []
  2664. };
  2665. return i = {
  2666. next: s(0),
  2667. throw: s(1),
  2668. return: s(2)
  2669. },
  2670. "function" == typeof Symbol && (i[Symbol.iterator] = function() {
  2671. return this
  2672. }),
  2673. i;
  2674. function s(i) {
  2675. return function(s) {
  2676. return function(i) {
  2677. if (n)
  2678. throw new TypeError("Generator is already executing.");
  2679. for (; a;)
  2680. try {
  2681. if (n = 1,
  2682. o && (r = 2 & i[0] ? o.return : i[0] ? o.throw || ((r = o.return) && r.call(o),
  2683. 0) : o.next) && !(r = r.call(o, i[1])).done)
  2684. return r;
  2685. switch (o = 0,
  2686. r && (i = [2 & i[0], r.value]),
  2687. i[0]) {
  2688. case 0:
  2689. case 1:
  2690. r = i;
  2691. break;
  2692. case 4:
  2693. return a.label++, {
  2694. value: i[1],
  2695. done: !1
  2696. };
  2697. case 5:
  2698. a.label++,
  2699. o = i[1],
  2700. i = [0];
  2701. continue;
  2702. case 7:
  2703. i = a.ops.pop(),
  2704. a.trys.pop();
  2705. continue;
  2706. default:
  2707. if (!(r = a.trys,
  2708. (r = r.length > 0 && r[r.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
  2709. a = 0;
  2710. continue
  2711. }
  2712. if (3 === i[0] && (!r || i[1] > r[0] && i[1] < r[3])) {
  2713. a.label = i[1];
  2714. break
  2715. }
  2716. if (6 === i[0] && a.label < r[1]) {
  2717. a.label = r[1],
  2718. r = i;
  2719. break
  2720. }
  2721. if (r && a.label < r[2]) {
  2722. a.label = r[2],
  2723. a.ops.push(i);
  2724. break
  2725. }
  2726. r[2] && a.ops.pop(),
  2727. a.trys.pop();
  2728. continue
  2729. }
  2730. i = t.call(e, a)
  2731. } catch (e) {
  2732. i = [6, e],
  2733. o = 0
  2734. } finally {
  2735. n = r = 0
  2736. }
  2737. if (5 & i[0])
  2738. throw i[1];
  2739. return {
  2740. value: i[0] ? i[1] : void 0,
  2741. done: !0
  2742. }
  2743. }([i, s])
  2744. }
  2745. }
  2746. };
  2747. Object.defineProperty(t, "__esModule", {
  2748. value: !0
  2749. });
  2750. var i = n(0),
  2751. a = n(2),
  2752. s = n(6),
  2753. l = (n(31),
  2754. n(27),
  2755. n(168)),
  2756. c = n(8),
  2757. u = (n(17),
  2758. n(65),
  2759. n(1944),
  2760. n(440),
  2761. n(1696)),
  2762. p = n(0),
  2763. d = n(27),
  2764. m = n(31),
  2765. g = n(65),
  2766. f = n(17),
  2767. v = n(1944),
  2768. h = n(440),
  2769. M = n(3),
  2770. C = n(168),
  2771. x = n(1692),
  2772. y = ["adminWarningBody"],
  2773. S = ["warningBody"];
  2774. function b(e, t) {
  2775. if (1 & e) {
  2776. var n = p.ɵɵgetCurrentView();
  2777. p.ɵɵelementStart(0, "div", 2),
  2778. p.ɵɵlistener("click", (function() {
  2779. return p.ɵɵrestoreView(n),
  2780. p.ɵɵnextContext().showWarningModal()
  2781. })),
  2782. p.ɵɵelement(1, "img", 3),
  2783. p.ɵɵelementEnd()
  2784. }
  2785. if (2 & e) {
  2786. var o = p.ɵɵnextContext();
  2787. p.ɵɵadvance(1),
  2788. p.ɵɵproperty("src", o.warnButtonImg, p.ɵɵsanitizeUrl)
  2789. }
  2790. }
  2791. function E(e, t) {
  2792. if (1 & e && (p.ɵɵelementStart(0, "p"),
  2793. p.ɵɵtext(1),
  2794. p.ɵɵelementEnd(),
  2795. p.ɵɵelementStart(2, "p"),
  2796. p.ɵɵtext(3),
  2797. p.ɵɵelementEnd(),
  2798. p.ɵɵelementStart(4, "p"),
  2799. p.ɵɵtext(5),
  2800. p.ɵɵelementEnd()),
  2801. 2 & e) {
  2802. var n = p.ɵɵnextContext().$implicit;
  2803. p.ɵɵadvance(1),
  2804. p.ɵɵtextInterpolate(n("The depth maps are used in panorama mode by the cursor to visualize the distance of an object to the current position. The improved depth maps allow you to capture and measure details in the panoramas more accurately.")),
  2805. p.ɵɵadvance(2),
  2806. p.ɵɵtextInterpolate(n("The update may take a while, but during this time you will be still able use the measurement mode.")),
  2807. p.ɵɵadvance(2),
  2808. p.ɵɵtextInterpolate(n("Do you want to start the update?"))
  2809. }
  2810. }
  2811. function w(e, t) {
  2812. if (1 & e && (p.ɵɵelementStart(0, "p"),
  2813. p.ɵɵtext(1),
  2814. p.ɵɵelementEnd()),
  2815. 2 & e) {
  2816. var n = p.ɵɵnextContext().$implicit;
  2817. p.ɵɵadvance(1),
  2818. p.ɵɵtextInterpolate(n("Please contact your 4DKanKan administrator to update your data. The update will allow you to capture and measure details in the panoramas more accurately."))
  2819. }
  2820. }
  2821. function I(e, t) {
  2822. 1 & e && (p.ɵɵelementContainerStart(0),
  2823. p.ɵɵtemplate(1, E, 6, 3, "ng-template", null, 4, p.ɵɵtemplateRefExtractor),
  2824. p.ɵɵtemplate(3, w, 2, 1, "ng-template", null, 5, p.ɵɵtemplateRefExtractor),
  2825. p.ɵɵelementContainerEnd())
  2826. }
  2827. var P = function() {
  2828. function e(e, t, o, r, i, a, s) {
  2829. this.userService = e,
  2830. this.datasetRepository = t,
  2831. this.ViewMenuService = o,
  2832. this.PointCloudMenuService = r,
  2833. this.ViewService = i,
  2834. this.WebdirUpgradeService = a,
  2835. this.MatDialog = s,
  2836. this.warnButtonImg = n(2049),
  2837. this.depthMapsUpgradeable = !0
  2838. }
  2839. return e.prototype.showWarningModal = function() {
  2840. var e = this;
  2841. this.userService.isAdmin() ? this.MatDialog.open(u.AlertDialogComponent, {
  2842. width: "600px",
  2843. data: {
  2844. title: l.translate("Depth Images Update Available"),
  2845. body: this.adminWarningBody,
  2846. cancelButton: !1,
  2847. declineButton: l.translate("Later"),
  2848. confirmButton: l.translate("Update")
  2849. }
  2850. }).afterClosed().subscribe((function(t) {
  2851. return e.onAdminDialogResult(t)
  2852. })) : this.MatDialog.open(u.AlertDialogComponent, {
  2853. width: "600px",
  2854. data: {
  2855. title: l.translate("New Data Update Available"),
  2856. body: this.warningBody,
  2857. cancelButton: !1,
  2858. declineButton: !1,
  2859. confirmButton: l.translate("Close")
  2860. }
  2861. })
  2862. },
  2863. e.prototype.onAdminDialogResult = function(e) {
  2864. e === u.AlertDialogResult.CONFIRMED && this.userService.isAdmin() && this.WebdirUpgradeService.webdirUpgrade().catch(c.handleWarning)
  2865. },
  2866. e.prototype.ngAfterViewInit = function() {
  2867. this.setup().catch(c.handleWarning)
  2868. },
  2869. e.prototype.setup = function() {
  2870. return o(this, void 0, void 0, (function() {
  2871. var e;
  2872. return r(this, (function(t) {
  2873. switch (t.label) {
  2874. case 0:
  2875. return e = this, [4, this.areDepthMapsUpgradeable()];
  2876. case 1:
  2877. return e.depthMapsUpgradeable = t.sent(),
  2878. this.userService.isAdmin() && this.depthMapsUpgradeable && this.shouldShowWarningIcon() && this.showWarningModal(), [2]
  2879. }
  2880. }))
  2881. }))
  2882. },
  2883. e.prototype.shouldShowWarningIcon = function() {
  2884. return this.depthMapsUpgradeable && this.ViewMenuService.config.showPanoramas && !this.PointCloudMenuService.config.showPointCloud && this.ViewService.mainView.getDefaultViewport().active && !this.WebdirUpgradeService.isJobInProgress && !this.WebdirUpgradeService.hasJobFinished
  2885. },
  2886. e.prototype.areDepthMapsUpgradeable = function() {
  2887. return o(this, void 0, void 0, (function() {
  2888. var e;
  2889. return r(this, (function(t) {
  2890. switch (t.label) {
  2891. case 0:
  2892. return [4, this.datasetRepository.findAll()];
  2893. case 1:
  2894. return e = t.sent(), [2, e.filter((function(e) {
  2895. return e.hasSensorFrame && e.hasDepthImages && "2" !== e.depthImageVersion
  2896. })).length > 0]
  2897. }
  2898. }))
  2899. }))
  2900. },
  2901. e.ɵfac = function(t) {
  2902. return new(t || e)(p.ɵɵdirectiveInject(d.UserService), p.ɵɵdirectiveInject(m.DatasetRepository), p.ɵɵdirectiveInject(g.ViewMenuService), p.ɵɵdirectiveInject("PointCloudMenuService"), p.ɵɵdirectiveInject(f.ViewService), p.ɵɵdirectiveInject(v.WebDirUpgradeService), p.ɵɵdirectiveInject(h.MatDialog))
  2903. },
  2904. e.ɵcmp = p.ɵɵdefineComponent({
  2905. type: e,
  2906. selectors: [
  2907. ["depth-warn-button"]
  2908. ],
  2909. viewQuery: function(e, t) {
  2910. var n;
  2911. (1 & e && (p.ɵɵviewQuery(y, !0),
  2912. p.ɵɵviewQuery(S, !0)),
  2913. 2 & e) && (p.ɵɵqueryRefresh(n = p.ɵɵloadQuery()) && (t.adminWarningBody = n.first),
  2914. p.ɵɵqueryRefresh(n = p.ɵɵloadQuery()) && (t.warningBody = n.first))
  2915. },
  2916. decls: 2,
  2917. vars: 1,
  2918. consts: [
  2919. ["class", "warn-button-icon", 3, "click", 4, "ngIf"],
  2920. [4, "transloco"],
  2921. [1, "warn-button-icon", 3, "click"],
  2922. [3, "src"],
  2923. ["adminWarningBody", ""],
  2924. ["warningBody", ""]
  2925. ],
  2926. template: function(e, t) {
  2927. 1 & e && (p.ɵɵtemplate(0, b, 2, 1, "div", 0),
  2928. p.ɵɵtemplate(1, I, 5, 0, "ng-container", 1)),
  2929. 2 & e && p.ɵɵproperty("ngIf", t.shouldShowWarningIcon())
  2930. },
  2931. directives: [M.NgIf, C.TranslocoDirective, x.AddBaseUrlDirective],
  2932. styles: [".warn-button-icon[_ngcontent-%COMP%]{cursor:pointer}"]
  2933. }),
  2934. e
  2935. }();
  2936. t.DepthMapWarnButtonComponent = P,
  2937. p.ɵsetClassMetadata(P, [{
  2938. type: i.Component,
  2939. args: [{
  2940. selector: "depth-warn-button",
  2941. templateUrl: "DepthMapWarnButton.ng.html",
  2942. styleUrls: ["DepthMapWarnButton.ng.scss"]
  2943. }]
  2944. }], (function() {
  2945. return [{
  2946. type: d.UserService
  2947. }, {
  2948. type: m.DatasetRepository
  2949. }, {
  2950. type: g.ViewMenuService
  2951. }, {
  2952. type: void 0,
  2953. decorators: [{
  2954. type: i.Inject,
  2955. args: ["PointCloudMenuService"]
  2956. }]
  2957. }, {
  2958. type: f.ViewService
  2959. }, {
  2960. type: v.WebDirUpgradeService
  2961. }, {
  2962. type: h.MatDialog
  2963. }]
  2964. }), {
  2965. adminWarningBody: [{
  2966. type: i.ViewChild,
  2967. args: ["adminWarningBody", {
  2968. static: !1
  2969. }]
  2970. }],
  2971. warningBody: [{
  2972. type: i.ViewChild,
  2973. args: ["warningBody", {
  2974. static: !1
  2975. }]
  2976. }]
  2977. }),
  2978. a.module("IVWebApp").directive("depthWarnButton", s.downgradeComponent({
  2979. component: P
  2980. }))
  2981. },
  2982. 1944: function(e, t, n) {
  2983. "use strict";
  2984. Object.defineProperty(t, "__esModule", {
  2985. value: !0
  2986. });
  2987. var o = n(0),
  2988. r = (n(9),
  2989. n(188),
  2990. n(107)),
  2991. i = (n(61),
  2992. n(0)),
  2993. a = n(9),
  2994. s = n(188),
  2995. l = n(61),
  2996. c = function() {
  2997. function e(e, t, n, o) {
  2998. this.RestService = e,
  2999. this.JobService = t,
  3000. this.MessageReportingService = n,
  3001. this.gettext = o,
  3002. this.inProgress = !1,
  3003. this.hasFinished = !1
  3004. }
  3005. return e.prototype.webdirUpgrade = function() {
  3006. var e = this;
  3007. this.inProgress = !0;
  3008. var t = this.RestService.getApi("webdir_upgrade", {});
  3009. return r.promiseFinally(this.JobService.makeJobPromise(t), (function() {
  3010. e.hasFinished = !0,
  3011. e.inProgress = !1
  3012. })).catch((function(t) {
  3013. t.data.exception && t.data.exception.endsWith("JobExecutionAlreadyRunningException") ? e.MessageReportingService.showMessage(e.gettext("Job already started"), e.gettext("The dataset upgrade is already in progress")) : e.MessageReportingService.showMessage(e.gettext("Failed to start dataset upgrade"), t.data.msg)
  3014. })),
  3015. t
  3016. },
  3017. Object.defineProperty(e.prototype, "isJobInProgress", {
  3018. get: function() {
  3019. return this.inProgress
  3020. },
  3021. enumerable: !0,
  3022. configurable: !0
  3023. }),
  3024. Object.defineProperty(e.prototype, "hasJobFinished", {
  3025. get: function() {
  3026. return this.hasFinished
  3027. },
  3028. enumerable: !0,
  3029. configurable: !0
  3030. }),
  3031. e.ɵfac = function(t) {
  3032. return new(t || e)(i.ɵɵinject(a.RestService), i.ɵɵinject(s.JobService), i.ɵɵinject(l.MessageReportingService), i.ɵɵinject("gettext"))
  3033. },
  3034. e.ɵprov = i.ɵɵdefineInjectable({
  3035. token: e,
  3036. factory: e.ɵfac,
  3037. providedIn: "root"
  3038. }),
  3039. e
  3040. }();
  3041. t.WebDirUpgradeService = c,
  3042. i.ɵsetClassMetadata(c, [{
  3043. type: o.Injectable,
  3044. args: [{
  3045. providedIn: "root"
  3046. }]
  3047. }], (function() {
  3048. return [{
  3049. type: a.RestService
  3050. }, {
  3051. type: s.JobService
  3052. }, {
  3053. type: l.MessageReportingService
  3054. }, {
  3055. type: void 0,
  3056. decorators: [{
  3057. type: o.Inject,
  3058. args: ["gettext"]
  3059. }]
  3060. }]
  3061. }), null)
  3062. },
  3063. 2048: function(e, t, n) {
  3064. "use strict";
  3065. Object.defineProperty(t, "__esModule", {
  3066. value: !0
  3067. });
  3068. var o = n(0),
  3069. r = (n(171),
  3070. n(8)),
  3071. i = n(89),
  3072. a = n(1696),
  3073. s = (n(281),
  3074. n(131),
  3075. n(21),
  3076. n(627)),
  3077. l = n(628),
  3078. c = (n(440),
  3079. n(73),
  3080. n(1908),
  3081. n(106),
  3082. n(168)),
  3083. u = n(107),
  3084. p = n(0),
  3085. d = n(171),
  3086. m = n(281),
  3087. g = n(131),
  3088. f = n(21),
  3089. v = n(440),
  3090. h = n(73),
  3091. M = n(106),
  3092. C = n(168),
  3093. x = n(1704),
  3094. y = n(1938),
  3095. S = n(1940),
  3096. b = n(1908),
  3097. E = n(1943),
  3098. w = ["measurementExportModal"];
  3099. function I(e, t) {
  3100. if (1 & e) {
  3101. var n = p.ɵɵgetCurrentView();
  3102. p.ɵɵelementContainerStart(0, 1),
  3103. p.ɵɵelementStart(1, "measurement-tool-selection", 2),
  3104. p.ɵɵlistener("selectedTool", (function(e) {
  3105. return p.ɵɵrestoreView(n),
  3106. p.ɵɵnextContext().onToolSelected(e)
  3107. })),
  3108. p.ɵɵelementEnd(),
  3109. p.ɵɵelementStart(2, "measurement-list", 3),
  3110. p.ɵɵlistener("deleteSelected", (function(e) {
  3111. return p.ɵɵrestoreView(n),
  3112. p.ɵɵnextContext().onDeleteSelectedMeasurements(e)
  3113. }))("saveSelected", (function(e) {
  3114. return p.ɵɵrestoreView(n),
  3115. p.ɵɵnextContext().onSaveSelectedMeasurements(e)
  3116. }))("shareSelected", (function(e) {
  3117. return p.ɵɵrestoreView(n),
  3118. p.ɵɵnextContext().onShareSelectedMeasurements(e)
  3119. })),
  3120. p.ɵɵelementEnd(),
  3121. p.ɵɵelement(3, "measurement-export", 4, 5),
  3122. p.ɵɵelementStart(5, "div", 6),
  3123. p.ɵɵelement(6, "depth-warn-button"),
  3124. p.ɵɵelementEnd(),
  3125. p.ɵɵelementContainerEnd()
  3126. }
  3127. if (2 & e) {
  3128. var o = p.ɵɵnextContext();
  3129. p.ɵɵadvance(1),
  3130. p.ɵɵproperty("currentTool", o.currentMeasurementMode())("isCollapsedView", o.isCollapsedView()),
  3131. p.ɵɵadvance(1),
  3132. p.ɵɵproperty("isAsyncOperationInProgress", o.isAsyncOperationInProgress())("isCollapsedView", o.isCollapsedView())("measurementsList", o.measurementsList),
  3133. p.ɵɵadvance(1),
  3134. p.ɵɵproperty("exportAllMeasurementLink", o.exportAllMeasurementLink)("exportMeasurementList", o.exportMeasurementList)
  3135. }
  3136. }
  3137. var P = function() {
  3138. function e(e, t, n, o, r, a, s, l) {
  3139. var c = this;
  3140. this.MeasurementsService = e,
  3141. this.ChangeDetectorRef = t,
  3142. this.MeasurementRepository = n,
  3143. this.ToolboxMenuService = o,
  3144. this.TrackingService = r,
  3145. this.MatDialog = a,
  3146. this.UrlService = s,
  3147. this.ProgressReportService = l,
  3148. this.savePromiseWrapper = new i.PromiseProgressWrapper,
  3149. this.deletePromiseWrapper = new i.PromiseProgressWrapper,
  3150. this.preparingForExport = !1,
  3151. this.measurementUpdateConnection = this.MeasurementsService.measurementsUpdated.connect((function() {
  3152. c.measurementsList = c.MeasurementsService.measurements,
  3153. c.ChangeDetectorRef.detectChanges()
  3154. }))
  3155. }
  3156. return Object.defineProperty(e.prototype, "isCollapsed", {
  3157. get: function() {
  3158. return this.isCollapsedView()
  3159. },
  3160. enumerable: !0,
  3161. configurable: !0
  3162. }),
  3163. e.prototype.ngOnInit = function() {
  3164. var e = this;
  3165. this.measurementsList = this.MeasurementsService.measurements,
  3166. this.measurementsClosingConnection = this.MeasurementsService.measurementModeExiting.connect((function() {
  3167. e.MatDialog.open(a.AlertDialogComponent, {
  3168. data: {
  3169. title: c.translate("Save Changes Before Leaving"),
  3170. body: c.translate("You have unsaved changes to the {subject}.", {
  3171. subject: c.translate("Measurement Tool")
  3172. }),
  3173. cancelButton: c.translate("Cancel"),
  3174. declineButton: c.translate("Discard"),
  3175. confirmButton: c.translate("Save")
  3176. }
  3177. }).afterClosed().subscribe((function(t) {
  3178. t === a.AlertDialogResult.CONFIRMED ? e.onSave() : t === a.AlertDialogResult.DECLINED && e.onDiscard()
  3179. }))
  3180. }))
  3181. },
  3182. e.prototype.onToolSelected = function(e) {
  3183. this.MeasurementsService.updateMeasurementMode(e)
  3184. },
  3185. e.prototype.currentMeasurementMode = function() {
  3186. return this.MeasurementsService.currentMeasurementMode
  3187. },
  3188. e.prototype.onDeleteSelectedMeasurements = function(e) {
  3189. this.deletePromiseWrapper.wrap(this.MeasurementsService.deleteMeasurements(e)).catch(r.handleWarning)
  3190. },
  3191. e.prototype.onSaveSelectedMeasurements = function(e) {
  3192. this.savePromiseWrapper.wrap(this.MeasurementsService.saveMeasurements(e)).catch(r.handleWarning)
  3193. },
  3194. e.prototype.ngOnDestroy = function() {
  3195. this.measurementUpdateConnection && this.measurementUpdateConnection.disconnect(),
  3196. this.measurementsClosingConnection && this.measurementsClosingConnection.disconnect()
  3197. },
  3198. e.prototype.onSave = function() {
  3199. var e = this;
  3200. this.MeasurementsService.saveMeasurements(this.measurementsList).then((function() {
  3201. e.MeasurementsService.measurements.length = 0,
  3202. e.MeasurementRepository.resetCache(),
  3203. e.MeasurementsService.readyToClose.resolve(),
  3204. e.TrackingService.trackPreDefinedEvent((new s.MeasurementsSavedEvent).numberOfMeasurements(1).interactionArea(l.InteractionArea.SaveDiscardDialog))
  3205. })).catch((function() {
  3206. e.MeasurementsService.readyToClose.reject()
  3207. }))
  3208. },
  3209. e.prototype.onDiscard = function() {
  3210. this.MeasurementsService.sessionMetrics.discardMeasurements(this.MeasurementsService.unsavedMeasurements.length),
  3211. this.MeasurementsService.measurements.length = 0,
  3212. this.MeasurementRepository.resetCache(),
  3213. this.MeasurementsService.readyToClose.resolve()
  3214. },
  3215. e.prototype.isAsyncOperationInProgress = function() {
  3216. return this.savePromiseWrapper.isInProgress || this.deletePromiseWrapper.isInProgress || this.preparingForExport
  3217. },
  3218. e.prototype.isCollapsedView = function() {
  3219. return this.ToolboxMenuService.isCollapsed
  3220. },
  3221. e.prototype.onShareSelectedMeasurements = function(e) {
  3222. var t = this;
  3223. this.preparingForExport = !0;
  3224. var n = this.ProgressReportService.addTask(c.translate("Preparing selected measurements..."), 1, !0, !0, !1, !0, 0);
  3225. e.sort((function(e, t) {
  3226. return t.createdDate.getTime() - e.createdDate.getTime()
  3227. })),
  3228. this.exportAllMeasurementLink = this.UrlService.generateMeasurementsURL(e);
  3229. var o = (new Date).getTime(),
  3230. i = this.MeasurementsService.exportMeasurements(e);
  3231. u.promiseFinally(i, (function() {
  3232. t.trackGtmShareEvent(o),
  3233. n.itemDone(),
  3234. t.preparingForExport = !1
  3235. })).then((function(e) {
  3236. t.exportMeasurementList = e,
  3237. t.measurementExportModal.showModal()
  3238. })).catch(r.handleWarning)
  3239. },
  3240. e.prototype.trackGtmShareEvent = function(e) {
  3241. this.MeasurementsService.trackGtmAllShareMeasurementsElapsedTimeEvent(e)
  3242. },
  3243. e.ɵfac = function(t) {
  3244. return new(t || e)(p.ɵɵdirectiveInject(d.MeasurementsService), p.ɵɵdirectiveInject(p.ChangeDetectorRef), p.ɵɵdirectiveInject(m.MeasurementRepository), p.ɵɵdirectiveInject(g.ToolboxMenuService), p.ɵɵdirectiveInject(f.TrackingService), p.ɵɵdirectiveInject(v.MatDialog), p.ɵɵdirectiveInject(h.UrlService), p.ɵɵdirectiveInject(M.ProgressReportService))
  3245. },
  3246. e.ɵcmp = p.ɵɵdefineComponent({
  3247. type: e,
  3248. selectors: [
  3249. ["measurements"]
  3250. ],
  3251. viewQuery: function(e, t) {
  3252. var n;
  3253. (1 & e && p.ɵɵviewQuery(w, !0),
  3254. 2 & e) && (p.ɵɵqueryRefresh(n = p.ɵɵloadQuery()) && (t.measurementExportModal = n.first))
  3255. },
  3256. hostVars: 2,
  3257. hostBindings: function(e, t) {
  3258. 2 & e && p.ɵɵclassProp("collapsed-view", t.isCollapsed)
  3259. },
  3260. decls: 1,
  3261. vars: 0,
  3262. consts: [
  3263. ["redirectFocusToScene", "", 4, "transloco"],
  3264. ["redirectFocusToScene", ""],
  3265. [3, "currentTool", "isCollapsedView", "selectedTool"],
  3266. [3, "isAsyncOperationInProgress", "isCollapsedView", "measurementsList", "deleteSelected", "saveSelected", "shareSelected"],
  3267. [3, "exportAllMeasurementLink", "exportMeasurementList"],
  3268. ["measurementExportModal", ""],
  3269. [1, "warning-button"]
  3270. ],
  3271. template: function(e, t) {
  3272. 1 & e && p.ɵɵtemplate(0, I, 7, 7, "ng-container", 0)
  3273. },
  3274. directives: [C.TranslocoDirective, x.RedirectFocusToMainViewDirective, y.MeasurementToolSelectionComponent, S.MeasurementListComponent, b.MeasurementExportModalComponent, E.DepthMapWarnButtonComponent],
  3275. styles: ["[_nghost-%COMP%]{position:absolute;width:100%;display:flex;flex-direction:column;height:calc(100vh - 62px);margin:-15px -20px;padding:25px 20px 0}.collapsed-view[_nghost-%COMP%]{position:static;margin:0;padding:0}.collapsed-view[_nghost-%COMP%] measurement-list[_ngcontent-%COMP%]{margin:0}.collapsed-view[_nghost-%COMP%] measurement-tool-selection[_ngcontent-%COMP%]{margin-bottom:0}measurement-tool-selection[_ngcontent-%COMP%]{margin-bottom:12px}measurement-list[_ngcontent-%COMP%]{margin:0 -20px}.warning-button[_ngcontent-%COMP%]{position:absolute;bottom:30px;left:-75px}"]
  3276. }),
  3277. e
  3278. }();
  3279. t.MeasurementsComponent = P,
  3280. p.ɵsetClassMetadata(P, [{
  3281. type: o.Component,
  3282. args: [{
  3283. selector: "measurements",
  3284. templateUrl: "Measurements.ng.html",
  3285. styleUrls: ["Measurements.ng.scss"]
  3286. }]
  3287. }], (function() {
  3288. return [{
  3289. type: d.MeasurementsService
  3290. }, {
  3291. type: p.ChangeDetectorRef
  3292. }, {
  3293. type: m.MeasurementRepository
  3294. }, {
  3295. type: g.ToolboxMenuService
  3296. }, {
  3297. type: f.TrackingService
  3298. }, {
  3299. type: v.MatDialog
  3300. }, {
  3301. type: h.UrlService
  3302. }, {
  3303. type: M.ProgressReportService
  3304. }]
  3305. }), {
  3306. isCollapsed: [{
  3307. type: o.HostBinding,
  3308. args: ["class.collapsed-view"]
  3309. }],
  3310. measurementExportModal: [{
  3311. type: o.ViewChild,
  3312. args: ["measurementExportModal", {
  3313. static: !1
  3314. }]
  3315. }]
  3316. })
  3317. },
  3318. 2049: function(e, t, n) {
  3319. e.exports = n.p + "warn-button.png"
  3320. }
  3321. }
  3322. ]);