1"use strict";(self.webpackChunkszerzi_front=self.webpackChunkszerzi_front||[]).push([[143],{10143:(Ve,Z,s)=>{s.d(Z,{U:()=>g});var w=s(97582),N=s(92961),m=s(37340),_=s(71997),k=s(78321),p=s(44224),F=s(17445),U=s(52835),G=s(6947),M=s(93710),t=s(94650),A=s(30144),J=s(50211),B=s(25156),Y=s(55089),K=s(87689),Q=s(8269),W=s(39889),v=s(32925),j=s(81664),q=s(56229),V=s(83092),$=s(32046),X=s(13345),tt=s(47959),et=s(23765),nt=s(5981),it=s(85594),h=s(24006),ot=s(59166),u=s(36895),at=s(47216),rt=s(67151),st=s(2293),ct=s(26079),lt=s(74383),_t=s(70048),b=s(66616),mt=s(47044),pt=s(21811),Tt=s(51971),ht=s(28213),dt=s(4788),gt=s(2577),f=s(73325),D=s(73679),E=s(36704),ut=s(47423),S=s(35635),Ct=s(73055),Nt=s(6497),y=s(20545),R=s(27830),L=s(69790),Et=s(6672),At=s(37570),ft=s(3550),yt=s(14954),xt=s(7463),zt=s(70087),Ot=s(5233),It=s(81801); 2/* 3 * @license 4 * Szerzi UG (haftungsbeschränkt) CONFIDENTIAL 5 * Unpublished Copyright (c) 2021 Szerzi UG (haftungsbeschränkt), All Rights Reserved. 6 * 7 * NOTICE: All information contained herein
7is, and remains the property of Szerzi UG (haftungsbeschränkt) 8 * The intellectual and technical concepts contained herein are proprietary to Szerzi UG (haftungsbeschränkt) 9 * and may be covered by E.U. and Foreign Patents, patents in process, and are protected by 10 * trade secret or copyright law. 11 * 12 * Dissemination of this information or reproduction of this material is strictly forbidden 13 * unless prior written permission is obtained from Szerzi UG (haftungsbeschränkt). Access to the source code 14 * obtained herein is hereby forbidden to anyone except current Szerzi UG (haftungsbeschränkt) employees, 15 * managers or contractors who have executed Confidentiality and Non-disclosure agreements 16 * explicitly covering such access. 17 * 18 * The copyright notice above does not evidence any actual or intended publication or disclosure 19 * of this source code, which includes information that is confidential and/or proprietary, 20 * and is a trade secret, of Szerzi UG (haftungsbeschränkt) ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, 21 * PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE 22 * EXPRESS WRITTEN CONSENT OF Szerzi UG (haftungsbeschränkt) IS STRICTLY PROHIBITED, AND IN VIOLATION OF 23 * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE 24 * AND/OR RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR 25 * DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, 26 * IN WHOLE OR IN PART. 27 */const Mt=["footerdivider"],vt=["rollbackmodal"],bt=["deleteIcon"];function Dt(o,i){1&o&&t._UZ(0,"nz-skeleton-element",17),2&o&&t.Q6J("nzActive",!0)}function St(o,i){1&o&&t._UZ(0,"nz-skeleton-element",32),2&o&&t.Q6J("nzActive",!0)}function Rt(o,i){1&o&&t._UZ(0,"nz-skeleton-element",25),2&o&&t.Q6J("nzActive",!0)}function Lt(o,i){if(1&o&&(t.TgZ(0,"div",11)(1,"nz-card")(2,"div",12)(3,"div",13),t._UZ(4,"nz-skeleton-element",14)(5,"nz-skeleton-element",15),t.qZA(),t.TgZ(6,"div",16),t._UZ(7,"nz-skeleton-element",17),t.qZA()(),t.TgZ(8,"div",18),t._UZ(9,"nz-skeleton-element",19),t.YNc(10,Dt,1,1,"nz-skeleton-element",20),t.ALo(11,"numberArray"),t.qZA(),t.TgZ(12,"div",21)(13,"div",22),t._UZ(14,"nz-skeleton-element",23),t.YNc(15,St,1,1,"nz-skeleton-element",24),t.ALo(16,"numberArray"),t.qZA(),t.TgZ(17,"div",22),t._UZ(18,"nz-skeleton-element",25),t.qZA(),t.TgZ(19,"div",22),t._UZ(20,"nz-skeleton-element",17),t.qZA()(),t.TgZ(21,"div",26)(22,"div",27)(23,"div",28),t._UZ(24,"nz-skeleton-element",29),t.qZA()(),t.TgZ(25,"div",30),t.YNc(26,Rt,1,1,"nz-skeleton-element",31),t.ALo(27,"numberArray"),t.qZA()()()()),2&o){const n=t.oxw();t.Q6J("@openClose",!n.isOpenHistory)("@skeletonPosAbsLeave",void 0),t.xp6(4),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(11,16,3)),t.xp6(3),t.Q6J("ngClass",n.isOpenHistory?"col-xl-5 col-md-6 col-12":"col-xl-6 col-12"),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngForOf",t.lcZ(16,18,3)),t.xp6(2),t.Q6J("ngClass",n.isOpenHistory?"col-xl-4 col-md-4 col-12 mt-xl-0 mt-3":"col-xl-6 col-12 mt-xl-0 mt-3"),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("ngClass",n.isOpenHistory?"col-xl-3 col-md-2 col-6 m-t-10":"col-xl-6 col-12 mt-3"),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(4),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("ngForOf",t.lcZ(27,20,3))}}const P=function(o){return{timeLeft:o}};function Pt(o,i){if(1&o&&(t.ynx(0),t.TgZ(1,"span",60),t.ALo(2,"translate"),t.ALo(3,"dateAfter"),t._uU(4),t.ALo(5,"translate"),t.ALo(6,"dateAfter"),t._UZ(7,"i",61),t.qZA(),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("nzTooltipTitle",t.xi3(2,2,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT_TOOLTIP",t.VKq(16,P,t.Dn7(3,5,n.modificationEndTime,n.trigger,2)))),t.xp6(3),t.hij(" ",t.xi3(5,9,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_TIME_LEFT",t.VKq(18,P,t.Dn7(6,12,n.modificationEndTime,n.trigger,2)))," ")}}const Ht=function(o){return{currentFieldChangeAllowance:o}};function Zt(o,i){if(1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&o){const n=t.oxw(3);t.xp6(1),t.hij(" ",t.xi3(2,1,"CLIENT.CONTRACTS.ALLOWED_MODIFICATIONS_LEFT",t.VKq(4,Ht,n.contract.progress.finalization.currentFieldChangeAllowance))," ")}}function wt(o,i){1&o&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&o&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACTS.NO_ALLOWED_MODIFICATIONS_LEFT")," "))}function kt(o,i){if(1&o&&(t.TgZ(0,"nz-tag",59),t.YNc(1,Pt,8,20,"ng-container",7),t.YNc(2,Zt,3,6,"ng-container",7),t.YNc(3,wt,3,3,"ng-container",7),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.contract.progress.finalization.unlimitedFieldChangePerio
27dRemainder>0),t.xp6(1),t.Q6J("ngIf",n.contract.progress.finalization.unlimitedFieldChangePeriodRemainder<=0&&n.contract.progress.finalization.currentFieldChangeAllowance>0),t.xp6(1),t.Q6J("ngIf",n.contract.progress.finalization.unlimitedFieldChangePeriodRemainder<=0&&0===n.contract.progress.finalization.currentFieldChangeAllowance)}}function Ft(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"nz-button-group",62)(1,"button",63),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.goToContract())}),t._UZ(2,"i",64),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(3),t.hij(" ",t.lcZ(4,1,"CLIENT.CONTRACT.MANAGE.MODIFY")," "))}function Ut(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"a",65),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.openDetailsModal(a.contract.displayElements.name,a.contractsShownFormEditorHelperContent,a.contract.progress.ID,a.contract.progress.canonical.name,a.matchmakingCategory))}),t._UZ(1,"i",66),t.qZA()}}function Gt(o,i){if(1&o&&t._UZ(0,"app-tabset-tutorial",67),2&o){const n=t.oxw(2);t.Q6J("tabsetTutorialDirective",n.tabsetTutorialDirective)("safekeepingStorageKey","understandTabsetTooltip")}}const x=function(o){return{contractName:o}},Jt=function(o){return{key:"CLIENT.CONVERSATIONS.NOT_FOUND_CONTRACT",params:o}},Bt=function(o){return{key:"CLIENT.CONVERSATIONS.NOT_FOUND_CONTRACT_FILTER",params:o}};function Yt(o,i){if(1&o){const n=t.EpF();
27t.TgZ(0,"app-chat-component",68),t.NdJ("mouseover",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.disableExpanding=!0)})("mouseout",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.disableExpanding=!1)}),t.qZA()}if(2&o){const n=t.oxw(2);t.Q6J("filterTo",n.contract.progress.permissions.users)("isEmbedded",!0)("embeddedEmptyText",t.VKq(6,Jt,t.VKq(4,x,n.contractName)))("embeddedFilteredEmptyText",t.VKq(10,Bt,t.VKq(8,x,n.contractName)))}}function Kt(o,i){if(1&o&&(t._UZ(0,"nz-empty",69),t.ALo(1,"translate")),2&o){t.oxw();const n=t.MAs(54);t.Q6J("nzNotFoundContent",t.lcZ(1,3,"CLIENT.CONTRACT.MANAGE.SHARE.CONTRACT_NOT_SHARED"))("nzNotFoundFooter",n)("nzNotFoundImage","assets/images/empty-icon.svg")}}function Qt(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"button",70),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.openShareModal())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&o&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACT.MANAGE.SHARE.SHARE_CONTRACT")," "))}const Wt=function(o){return{"text-decoration":o}};function jt(o,i){if(1&o&&(t.TgZ(0,"p",83),t._uU(1),t.ALo(2,"hyphen"),t.qZA()),2&o){const n=t.oxw().$implicit;t.Q6J("ngStyle",t.VKq(4,Wt,n.checked?"line-through":"none")),t.xp6(1),t.hij(" ",t.lcZ(2,2,n.content)," ")}}const z=function(o){return[o]};function qt(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"div",84)(1,"div")(2,"button",75),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(),r=a.index,c=a.$implicit,l=t.oxw(3);return l.editingNoteNames[r]=!1,t.KtG(c.content=l.previousNoteContent[r])}),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div"),t._UZ(6,"app-multi-state-button",85),t.qZA()()}if(2&o){const n=t.oxw().index,e=t.oxw(3);t.xp6(3),t.hij(" ",t.lcZ(4,5,"CLIENT.CONTRACT.MANAGE.NOTES.CANCEL")," "),t.xp6(3),t.Q6J("stickResult",!1)("defaultFunction",e.defaultEditingNoteFunction)("nzTextKeys",e.saveNoteText)("defaultFunctionParameters",t.VKq(7,z,n))}}function Vt(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"div")(1,"div",76)(2,"app-multi-state-button",77),t.NdJ("nzOnConfirm",function(){const r=t.CHM(n).index,c=t.oxw(3);return t.KtG(c.deleteNoteWithButton(r))}),t.ALo(3,"translate"),t.ALo(4,"translate"),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"label",78),t.NdJ("ngModelChange",function(a){const c=t.CHM(n).$implicit;return t.KtG(c.checked=a)})("ngModelChange",function(){const r=t.CHM(n).index,c=t.oxw(3);return t.KtG(c.updateNote(r))}),t.ALo(7,"translate"),t.qZA()(),t.TgZ(8,"div",79),t.NdJ("click",function(){const a=t.CHM(n),r=a.index,c=a.$implicit,l=t.oxw(3);return l.editingNoteNames[r]=!0,t.KtG(l.previousNoteContent[r]=c.content)}),t.YNc(9,jt,3,6,"p",80),t.TgZ(10,"textarea",81),t.NdJ("ngModelChange",function(a){const c=t.CHM(n).$implicit;return t.KtG(c.content=a)}),t.qZA()(),t.YNc(11,qt,7,9,"div",82),t.qZA()}if(2&o){const n=i.$implicit,e=i.index,a=t.oxw(3);t.Gre("m-b-0 ",a.editingNoteNames[e]?"pb-4":"",""),t.Q6J("@inOutNote",void 0),t.xp6(2),t.Q6J("stickResult",!1)("showAsLink",!0)("runFunction",a.deleteNoteFunctionMap.get(a.notes[e]))("nzTextKeys",a.deleteNoteText)("nzPopconfirmTitle",t.lcZ(3,17,"CLIENT.CONTRACT.MANAGE.NOTES.CONFIRM"))("nzCancelText",t.lcZ(4,19,"CLIENT.CONTRACT.MANAGE.NOTES.CANCEL"))("nzOkText",t.lcZ(5,21,"CLIENT.CONTRACT.MANAGE.NOTES.DELETE_BUTTON")),t.xp6(4),t.Q6J("ngModel",n.checked)("nzTooltipTitle",t.lcZ(7,23,"CLIENT.CONTRACT.MANAGE.NOTES.CHANGE_STATUS")),t.xp6(3),t.Q6J("ngIf",!a.editingNoteNames[e]),t.xp6(1),t.Q6J("hidden",!a.editingNoteNames[e])("ngModel",n.content),t.xp6(1),t.Q6J("ngIf",a.editingNoteNames[e])}}function $t(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"div",86)(1,"textarea",87),t.NdJ("ngModelChange",function(a){t.CHM(n);const r=t.oxw(3);return t.KtG(r.newNote=a)}),t.ALo(2,"translate"),t.qZA()()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngModel",n.newNote)("placeholder",t.lcZ(2,2,"CLIENT.CONTRACT.MANAGE.NOTES.NAME"))}}const Xt=function(o){return[o,!1]};function te(o,i){if(1&o&&(t.TgZ(0,"div"),t._UZ(1,"app-multi-state-button",88),t.qZA()),2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("stickResult",!1)("runFunction",n.runFunction)("nzTextKeys",n.saveNoteText)("defaultFunctionParameters",t.VKq(5,Xt,n.newNote))("defaultFunction",n.defaultFunction)}}function ee(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"nz-tab",53),t.ALo(1,"translate"),t.TgZ(2,"div",30)(3,"p",71),t._uU(4),t.ALo(5,"translate"),t.TgZ(6,"i"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.YNc(9,Vt,12,25,"div",72),t.YNc(10,$t,3,4,"div",73),t.TgZ(11,"div",74)(12,"div")(13,"button",75),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.cancelNoteAdding())}),t._uU(14),t.ALo(15,"translate"),t.ALo(16,"translate"),t.qZA()(),t.YNc(17,te,2,7,"div",7),t.qZA()()()}if(2&o){const n=t.oxw(2);t.Q6J("nzTitle",t.lcZ(1,7,"CLIENT.CONTRACT.MANAGE.NOTES.TITLE")),t.xp6(4),t.hij(" ",t.lcZ(5,9,"CLIENT.CONTRACT.MANAGE.NOTES.NOTICE")," "),t.xp6(3),t.Oqu(t.lcZ(8,11,"CLIENT.CONTRACT.MANAGE.NOTES.VISIBILITY")),t.xp6(2),t.Q6J("ngForOf",n.notes),t.xp6(1),t.Q6J("ngIf",n.addingNew),t.xp6(4),t.hij(" ",n.addingNew?t.lcZ(1
275,13,"CLIENT.CONTRACT.MANAGE.NOTES.CANCEL"):t.lcZ(16,15,"CLIENT.CONTRACT.MANAGE.NOTES.NEW")," "),t.xp6(3),t.Q6J("ngIf",n.showSaveButton)}}function ne(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"div",33),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.isOpenHistory?null:a.openHistory(!1))}),t.TgZ(1,"nz-card")(2,"div",34)(3,"div",35),t._UZ(4,"app-contract-progress-logo",36),t.TgZ(5,"div",37)(6,"h4",38),t._UZ(7,"app-metadataname-editor",39),t.ALo(8,"hyphen"),t.qZA()()(),t.TgZ(9,"div",40)(10,"nz-tag",41),t._uU(11),t.ALo(12,"translate"),t.ALo(13,"translate"),t.qZA(),t._UZ(14,"br"),t.YNc(15,kt,4,3,"nz-tag",42),t.YNc(16,Ft,5,3,"nz-button-group",43),t.qZA()(),t.TgZ(17,"div",18)(18,"h6"),t._uU(19),t.qZA(),t.TgZ(20,"p"),t._UZ(21,"span",44),t.ALo(22,"safe"),t.YNc(23,Ut,2,0,"a",45),t.qZA()(),t.TgZ(24,"div",21)(25,"div",22),t._UZ(26,"app-contract-shared-with-others",46),t.qZA(),t.TgZ(27,"div",22)(28,"button",47),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openShareModal())})("mouseover",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.disableExpanding=!0)})("mouseout",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.disableExpanding=!1)}),t._uU(29),t.ALo(30,"translate"),t.ALo(31,"translate"),t.qZA()(),t.TgZ(32,"div",22)(33,"span",48),t.ALo(34,"date"),t.ALo(35,"date"),t._uU(36),t.ALo(37,"translate"),t.ALo(38,"translate"),t.TgZ(39,"span",49),t._uU(40),t.ALo(41,"dateAgo"),t.ALo(42,"dateAgo"),t.qZA()()()(),t._UZ(43,"app-feedback",50),t.TgZ(44,"div",26),t.YNc(45,Gt,1,2,"ng-template",null,51,t.W1O),t.TgZ(47,"nz-tabset",52)(48,"nz-tab",53),t.ALo(49,"translate"),t.TgZ(50,"div",54),t.YNc(51,Yt,1,12,"app-chat-component",55),t.YNc(52,Kt,2,5,"nz-empty",56),t.YNc(53,Qt,3,3,"ng-template",null,57,t.W1O),t.qZA()(),t.YNc(55,ee,18,17,"nz-tab",58),t.qZA()()()()}if(2&o){const n=t.MAs(46),e=t.oxw();t.Q6J("@skeletonPosAbsLeave",void 0)("@openClose",!e.isOpenHistory)("ngClass",e.fullwidth?"w-100":""),t.xp6(4),t.Q6J("isComplete",e.contract.progress.complete),t.xp6(3),t.Q6J("contractID",e.contractID)("contractName",t.lcZ(8,32,e.contractName)),t.xp6(3),t.Q6J("ngClass",t.VKq(63,z,e.contract.progress.complete?"brand-success-bg-border":"brand-failure-bg-border")),t.xp6(1),t.hij(" ",e.contract.progress.complete?t.lcZ(12,34,"CLIENT.CONTRACTS.PROGRESSES.STATUSES.COMPLETED"):t.lcZ(13,36,"CLIENT.CONTRACTS.PROGRESSES.STATUSES.IN_PROGRESS")," "),t.xp6(4),t.Q6J("ngIf",e.contract.progress.finalization),t.xp6(1),t.Q6J("ngIf",e.contract&&(!e.contract.progress.finalization||e.contract.progress.finalization.unlimitedFieldChangePeriodRemainder>0||e.contract.progress.finalization.currentFieldChangeAllowance>0)),t.xp6(3),t.Oqu(e.contract.displayElements.name),t.xp6(2),t.Q6J("innerHTML",t.xi3(22,38,e.contractsShownDescription.split(".").slice(0,2).join(".")+".","html"),t.oJD),t.xp6(2),t.Q6J("ngIf",e.contractsShownFormEditorHelperContent),t.xp6(2),t.Q6J("ngClass",e.isOpenHistory?"col-xl-5 col-md-6 col-12":"col-xl-6 col-12"),t.xp6(1),t.Q6J("contract",e.contract),t.xp6(1),t.Q6J("ngClass",e.isOpenHistory?"col-xl-4 col-md-4 col-12 mt-xl-0 mt-3":"col-xl-6 col-12 mt-xl-0 mt-3"),t.xp6(2),t.hij(" ",e.isOpenHistory?t.lcZ(30,41,"CLIENT.CONTRACT.MANAGE.SHARE.SHARE_WITH_USER"):t.lcZ(31,43,"CLIENT.CONTRACT.MANAGE.SHARE.SHARE_BUTTON")," "),t.xp6(3),t.Q6J("ngClass",e.isOpenHistory?"col-xl-3 col-md-2 col-6 m-t-10":"col-xl-6 col-12 mt-3"),t.xp6(1),t.Q6J("nzTooltipTitle",e.contract.progress.metadata.update?t.xi3(34,45,e.contract.progress.metadata.update.timestamp,"yyyy-MM-dd HH:mm:ss"):t.xi3(35,48,e.contract.progress.metadata.creation.timestamp,"yyyy-MM-dd HH:mm:ss")),t.xp6(3),t.hij("",e.contract.progress.metadata.update?t.lcZ(37,51,"COMMON.CONTRACT.INFO.MODIFIED"):t.lcZ(38,53,"COMMON.CONTRACT.INFO.CREATED")," "),t.xp6(4),t.hij(" ",e.contract.progress.metadata.update?t.xi3(41,55,e.contract.progress.metadata.update.timestamp,e.trigger):t.xi3(42,58,e.contract.progress.metadata.creation.timestamp,e.trigger),""),t.xp6(3),t.Q6J("feature",e.FeedbackFeature.Contract)("unit",e.FeedbackUnit.Manage)("title",e.contractName),t.xp6(4),t.Q6J("nzTooltipTitle",n)("nzTooltipTrigger",null)("nzTooltipPlacement","bottomRight")("safekeepingStorageKey","understandTabsetTooltip"),t.xp6(1),t.Q6J("nzTitle",t.lcZ(49,61,"CLIENT.CONTRACT.MANAGE.CONVERSATIONS_TITLE")),t.xp6(3),t.Q6J("ngIf",e.contract.progress.permissions.users&&e.contract.progress.permissions.users.length>0),t.xp6(1),t.Q6J("ngIf",!e.contract.progress.permissions.users||0===e.contract.progress.permissions.users.length),t.xp6(3),t.Q6J("ngIf",!e.sharedContract)}}function ie(o,i){1&o&&t._UZ(0,"nz-skeleton-element",89)(1,"nz-skeleton-element",90),2&o&&(t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0))}function oe(o,i){1&o&&t._UZ(0,"nz-skeleton-element",99),2&o&&t.Q6J("nzSize",25)("nzActive",!0)}function ae(o,i){if(1&o&&(t.TgZ(0,"nz-timeline-item",93)(1,"div",94)(2,"div",35),t._UZ(3,"nz-skeleton-element",95),t.TgZ(4,"div",37),t._UZ(5,"nz-skeleton-element",25)(6,"nz-skeleton-element",96),t.qZA()(),t.TgZ(7,"div",97)(8,"p",94),t._UZ(9,"nz-skeleton-element",17),t.qZA()()(),t.YNc(10,oe,1,2,"ng-template",null,98,t.W1O),t.qZA()),2&o){const n=t.MAs(11);t.Q6J("nzDot",n),t.xp6(3),t.Q6J("nzActive",!0),t.xp6(2),t.Q6J("nzActive",!0),t.xp6(1),t.Q6J("nzActive",!0),t.xp6(3),t.Q6J("nzActive",!0)}}function re(o,i){if(1&o&&(t.TgZ(0,"div",91)(1,"nz-card",53)(2,"nz-timeline"),t.YNc(3,ae,12,5,"nz-timeline-item",92),t.ALo(4,"numberArray"),t.qZA()()()),2&o){t.oxw();const n=t.MAs(6);t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(1),t.Q6J("nzTitle",n),t.xp6(2),t.Q6J("ngForOf",t.lcZ(4,3,3))}}function se(o,i){1&o&&(t.TgZ(0,"small"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&o&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACT.MANAGE.HISTORY.SHOW_MORE")))}function ce(o,i){1&o&&(t.TgZ(0,"small"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&o&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"CLIENT.CONTRACT.MANAGE.HISTORY.SHOW_LESS")))}function le(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"a",105),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.openHistory(!0))}),t.YNc(1,se,3,3,"small",7),t.YNc(2,ce,3,3,"small",7),t.qZA()}if(2&o){const n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.isOpenHistory&&0!==n.contractHistory.length),t.xp6(1),t.Q6J("ngIf",!n.isOpenHistory&&0!==n.contractHistory.length)}}function _e(o,i){if(1&o&&t.YNc(0,le,3,2,"a",104),2&o){const n=t.oxw(2);t.Q6J("ngIf",!n.fullwidth)}}function me(o,i){1&o&&(t._UZ(0,"nz-empty",106),t.ALo(1,"translate")),2&o&&t.Q6J("nzNotFoundContent",t.lcZ(1,2,"CLIENT.CONTRACT.MANAGE.HISTORY.EMPTY"))("nzNotFoundImage","assets/images/empty-icon.svg")}const pe=function(){return{all:25}};function Te(o,i){if(1&o&&(t.TgZ(0,"h6",123),t._uU(1),t.ALo(2,"limitTo"),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.xp6(1),t.hij(" ",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).ID?t.Dn7(2,1,e.userInfos.hasNameOrMail(e.namesToShow.get(e.historyTexts.get(n.historyNumber.primary).ID)),t.DdM(5,pe),null):null," ")}}const he=function(o,i){return{"0%":o,"100%":i}};function de(o,i){if(1&o&&(t._UZ(0,"nz-progress",124),t.ALo(1,"number")),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Q6J("nzPercent",t.xi3(1,2,100*n.percentage,"1.0-0"))("nzStrokeColor",t.WLB(5,he,e.ColorSettings.Tertiary,e.ColorSettings.Qu
27inary))}}const H=function(o,i){return{first:o,num:i}};function ge(o,i){if(1&o&&(t._UZ(0,"span",125),t.ALo(1,"translate"),t.ALo(2,"translate")),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Gre("text-dark font-weight-semibold ",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).moreDesc?"mb-0":"",""),t.s9C("nzTooltipTitle",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).longDesc.includes("[...]")?t.lcZ(1,5,"CLIENT.CONTRACT.MANAGE.HISTORY.SHORTENED_TEXT"):""),t.Q6J("innerHTML",e.historyTexts.has(n.historyNumber.primary)?e.historyTexts.get(n.historyNumber.primary).moreDesc?t.xi3(2,7,"CLIENT.CONTRACT.MANAGE.HISTORY.AND_MORE",t.WLB(10,H,e.isOpenHistory?e.historyTexts.get(n.historyNumber.primary).shortDesc:e.historyTexts.get(n.historyNumber.primary).longDesc,e.historyTexts.get(n.historyNumber.primary).moreDesc.length)):e.isOpenHistory?e.historyTexts.get(n.historyNumber.primary).shortDesc:e.historyTexts.get(n.historyNumber.primary).longDesc:null,t.oJD)}}function ue(o,i){if(1&o&&(t.TgZ(0,"p",60),t.ALo(1,"translate"),t._uU(2),t.ALo(3,"translate"),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Gre("text-dark font-weight-semibold unset-flex white-space ",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).moreDesc?"mb-0":"",""),t.s9C("nzTooltipTitle",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).longDesc.includes("[...]")?t.lcZ(1,5,"CLIENT.CONTRACT.MANAGE.HISTORY.SHORTENED_TEXT"):""),t.xp6(2),t.hij(" ",e.historyTexts.has(n.historyNumber.primary)?e.historyTexts.get(n.historyNumber.primary).moreDesc?t.xi3(3,7,"CLIENT.CONTRACT.MANAGE.HISTORY.AND_MORE",t.WLB(10,H,e.isOpenHistory?e.historyTexts.get(n.historyNumber.primary).shortDesc:e.historyTexts.get(n.historyNumber.primary).longDesc,e.historyTexts.get(n.historyNumber.primary).moreDesc.length)):e.isOpenHistory?e.historyTexts.get(n.historyNumber.primary).shortDesc:e.historyTexts.get(n.historyNumber.primary).longDesc:null," ")}}function Ce(o,i){if(1&o&&(t.TgZ(0,"li",129),t._uU(1),t.qZA()),2&o){const n=i.$implicit;t.Gre("change-item ",0===i.index?"mt-3":"",""),t.xp6(1),t.hij(" ",n," ")}}function Ne(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"ul",126),t.NdJ("mouseover",function(){t.CHM(n);const a=t.oxw(5);return t.KtG(a.disableExpanding=!0)})("mouseout",function(){t.CHM(n);const a=t.oxw(5);return t.KtG(a.disableExpanding=!1)}),t.TgZ(1,"li",127)(2,"ul"),t.YNc(3,Ce,2,4,"li",128),t.qZA()()()}if(2&o){t.oxw();const n=t.MAs(21),e=t.oxw().$implicit,a=t.oxw(3);t.Q6J("nzSelectable",!1),t.xp6(1),t.Q6J("nzTitle",n),t.xp6(2),t.Q6J("ngForOf",a.historyTexts.get(e.historyNumber.primary).moreDesc)}}const O=function(){return{duration:400}},C=function(o){return{value:"",params:o}},I=function(){return{duration:0}};function Ee(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"span",130)(1,"app-multi-state-button",131),t.NdJ("mouseover",function(){t.CHM(n);const a=t.oxw(5);return t.KtG(a.disableExpanding=!0)})("mouseout",function(){t.CHM(n);const a=t.oxw(5);return t.KtG(a.disableExpanding=!1)}),t.qZA()()}if(2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Q6J("@inOutHistory",e.allowHistoryAnimation?t.VKq(6,C,t.DdM(5,O)):t.VKq(9,C,t.DdM(8,I))),t.xp6(1),t.Q6J("stickResult",!1)("defaultFunction",e.copyHistoryFunction)("defaultFunctionParameters",t.VKq(11,z,n))("nzTextKeys",e.copyHistoryText)}}function Ae(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"button",133),t.NdJ("mouseover",function(){t.CHM(n);const a=t.oxw(6);return t.KtG(a.disableExpanding=!0)})("mouseout",function(){t.CHM(n);const a=t.oxw(6);return t.KtG(a.disableExpanding=!1)})("click",function(){t.CHM(n);const a=t.oxw(3).$implicit,r=t.oxw(3);return t.KtG(r.rollbackModal(r.historyTexts.get(a.historyNumber.primary).longDesc,a))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&o&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK")," "))}function fe(o,i){if(1&o&&(t.TgZ(0,"span",130),t.YNc(1,Ae,3,3,"button",132),t.qZA()),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Q6J("@inOutHistory",e.allowHistoryAnimation?t.VKq(3,C,t.DdM(2,O)):t.VKq(6,C,t.DdM(5,I))),t.xp6(1),t.Q6J("ngIf",n.canRollback)}}function ye(o,i){1&o&&t._UZ(0,"nz-avatar",144),2&o&&t.Q6J("nzSize",25)}function xe(o,i){1&o&&t._UZ(0,"nz-avatar",145),2&o&&t.Q6J("nzSize",25)}function ze(o,i){1&o&&t._UZ(0,"nz-avatar",146),2&o&&t.Q6J("nzSize",25)}function Oe(o,i){1&o&&t._UZ(0,"nz-avatar",147),2&o&&t.Q6J("nzSize",25)}function Ie(o,i){1&o&&t._UZ(0,"nz-avatar",148),2&o&&t.Q6J("nzSize",25)}function Me(o,i){1&o&&t._UZ(0,"nz-avatar",149),2&o&&t.Q6J("nzSize",25)}function ve(o,i){1&o&&t._UZ(0,"nz-avatar",150),2&o&&t.Q6J("nzSize",25)}function be(o,i){1&o&&t._UZ(0,"nz-avatar",151),2&o&&t.Q6J("nzSize",25)}function De(o,i){1&o&&t._UZ(0,"nz-avatar",150),2&o&&t.Q6J("nzSize",25)}function Se(o,i){1&o&&t._UZ(0,"nz-avatar",152),2&o&&t.Q6J("nzSize",25)}function Re(o,i){1&o&&t._UZ(0,"nz-avatar",153),2&o&&t.Q6J("nzSize",25)}function Le(o,i){if(1&o&&(t.YNc(0,ye,1,1,"nz-avatar",134),t.YNc(1,xe,1,1,"nz-avatar",135),t.YNc(2,ze,1,1,"nz-avatar",136),t.YNc(3,Oe,1,1,"nz-avatar",137),t.YNc(4,Ie,1,1,"nz-avatar",138),t.YNc(5,Me,1,1,"nz-avatar",139),t.YNc(6,ve,1,1,"nz-avatar",140),t.YNc(7,be,1,1,"nz-avatar",141),t.YNc(8,De,1,1,"nz-avatar",140),t.YNc(9,Se,1,1,"nz-avatar",142),t.YNc(10,Re,1,1,"nz-avatar",143)),2&o){const n=t.oxw(2).$implicit,e=t.oxw(3);t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.EDITOR),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.CANONICAL),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.NOTES),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.NAME),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.ROLLBACK),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.COPY),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.PERCENTAGE&&!n.complete),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.PERCENTAGE&&!n.complete),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.STEP),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.CREATE&&null!=n.clientID),t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type===e.HistoryChangeTypes.CREATE&&null==n.clientID)}}function Pe(o,i){if(1&o&&(t.TgZ(0,"nz-timeline-item",93),t.ynx(1),t.TgZ(2,"div",94)(3,"nz-badge",110)(4,"div",35),t._UZ(5,"nz-avatar",111),t.TgZ(6,"div",112),t.YNc(7,Te,3,6,"h6",113),t.YNc(8,de,2,8,"nz-progress",114),t.TgZ(9,"span",115),t._UZ(10,"i",116),t.TgZ(11,"span",117),t.ALo(12,"date"),t.ALo(13,"date"),t._uU(14),t.ALo(15,"dateAgo"),t.ALo(16,"dateAgo"),t.qZA()()()()(),t.TgZ(17,"div",97)(18,"p",94),t.YNc(19,ge,3,13,"span",118),t.qZA(),t.YNc(20,ue,4,13,"ng-template",null,119,t.W1O),t.YNc(22,Ne,4,3,"ul",120),t.YNc(23,Ee,2,13,"span",121),t.YNc(24,fe,2,8,"span",121),t.qZA()(),t.YNc(25,Le,11,11,"ng-template",null,122,t.W1O),t.BQk(),t.qZA()),2&o){const n=t.MAs(26),e=t.oxw().$implicit,a=t.oxw(3);t.Q6J("nzDot",n),t.xp6(2),t.Q6J("@inOutHistory",a.allowHistoryAnimation?t.VKq(25,C,t.DdM(24,O)):t.VKq(28,C,t.DdM(27,I))),t.xp6(1),t.Q6J("nzShowDot",a.historyChangedIDs.includes(e.historyNumber.primary)),t.xp6(2),t.Q6J("nzSrc",a.historyTexts.has(e.historyNumber.primary)&&a.historyTexts.get(e.historyNumber.primary).ID?a.imageToShow.get(a.historyTexts.get(e.historyNumber.primary).ID):null),t.xp6(2),t.Q6J("ngIf",null!=e.changes&&0!==a.namesToShow.size),t.xp6(1),t.Q6J("ngIf",a.historyTexts.has(e.historyNumber.primary)&&a.historyTexts.get(e.historyNumber.primary).percentage||!a.isOpenHistory),t.xp6(3),t.Q6J("nzTooltipTitle",e.metadata.update?t.xi3(12,12,e.metadata.update.timestamp,"yyyy-MM-dd HH:mm:ss"):t.xi3(13,15,e.metadata.creation.timestamp,"yyyy-MM-dd HH:mm:ss")),t.xp6(3),t.Oqu(e.metadata.update?t.xi3(15,18,e.metadata.update.timestamp,a.trigger):t.xi3(16,21,e.metadata.creation.timestamp,a.trigger)),t.xp6(5),t.Q6J("ngIf",a.historyTexts.has(e.historyNumber.primary)&&null==a.historyTexts.get(e.historyNumber.primary).moreDesc),t.xp6(3),t.Q6J("ngIf",a.historyTexts.has(e.historyNumber.primary)&&a.historyTexts.get(e.historyNumber.primary).moreDesc),t.xp6(1),t.Q6J("ngIf",!a.sharedContract&&e.ID),t.xp6(1),t.Q6J("ngIf",!a.sharedContract)}}function He(o,i){if(1&o&&(t.ynx(0),t.YNc(1,Pe,27,30,"nz-timeline-item",109),t.BQk()),2&o){const n=i.$implicit,e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.historyTexts.has(n.historyNumber.primary)&&e.historyTexts.get(n.historyNumber.primary).type!==e.HistoryChangeTypes.EDITOR&&!e.historyTexts.get(n.historyNumber.primary).ignore)}}function Ze(o,i){if(1&o){const n=t.EpF();t.TgZ(0,"nz-timeline",107),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.isOpenHistory?a.openHistory(!0):null)}),t.YNc(1,He,2,1,"ng-container",108),t.qZA()}if(2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.contractHistory.slice(0,n.shownHistoryCount))("ngForTrackBy",n.identifyHistory)}}function we(o,i){if(1&o&&(t.TgZ(0,"div")(1,"nz-card",100),t.ALo(2,"translate"),t.YNc(3,_e,1,1,"ng-template",null,101,t.W1O),t.YNc(5,me,2,4,"nz-empty",102),t.YNc(6,Ze,2,2,"nz-timeline",103),t._UZ(7,"app-feedback",50),t.qZA()()),2&o){const n=t.MAs(4),e=t.oxw();t.Q6J("@skeletonPosAbsLeave",void 0),t.xp6(1),t.Tol(e.isOpenHistory?"historyCard":""),t.Q6J("nzTitle",t.lcZ(2,11,"CLIENT.CONTRACT.MANAGE.HISTORY.TITLE"))("nzExtra",n),t.xp6(4),t.Q6J("ngIf",0===e.contractHistory.length),t.xp6(1),t.Q6J("ngIf",e.contractHistory&&e.contractHistory.length>0),t.xp6(1),t.Q6J("feature",e.FeedbackFeature.Contract)("unit",e.FeedbackUnit.History)("title","COMMON.FEEDBACK.TITLES.HISTORY")}}function ke(o,i){if(1&o&&(t.TgZ(0,"span",159),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,"CLIENT.CONTRACTS.SHARE.FOOTER_TEXT",t.VKq(4,x,n.contractName)))}}function Fe(o,i){if(1&o&&(t.YNc(0,ke,3,6,"ng-template",null,154,t.W1O),t._UZ(2,"nz-divider",155),t.TgZ(3,"div",156)(4,"p",157),t._uU(5),t.ALo(6,"translate"),t.ALo(7,"translate"),t.qZA()(),t.TgZ(8,"div",158),t._UZ(9,"app-feedback",50),t.qZA()),2&o){const n=t.MAs(1),e=t.oxw();
27t.xp6(2),t.Q6J("nzText",n),t.xp6(3),t.AsE(" ",t.lcZ(6,6,"CLIENT.CONTRACTS.SHARE.ENTER_EMAIL")," ",t.lcZ(7,8,"CLIENT.CONTRACTS.SHARE.WARNING.LIMIT")," "),t.xp6(4),t.Q6J("feature",e.FeedbackFeature.Modal)("unit",e.FeedbackUnit.ShareContract)("title","COMMON.FEEDBACK.TITLES.SHARING")}}const Ue=function(o,i){return{change:o,datestring:i}};function Ge(o,i){if(1&o&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA(),t.TgZ(3,"form",160)(4,"nz-form-item",161)(5,"nz-form-label",162),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"nz-form-control",163),t.ALo(9,"translate"),t.TgZ(10,"nz-input-group"),t._UZ(11,"input",164),t.ALo(12,"translate"),t.qZA()()(),t.TgZ(13,"nz-form-item",165),t._UZ(14,"label",166),t.TgZ(15,"span",167),t._uU(16),t.ALo(17,"translate"),t.qZA()(),t.TgZ(18,"nz-form-item",165),t._UZ(19,"label",168),t.TgZ(20,"span",167),t._uU(21),t.ALo(22,"translate"),t.qZA()(),t.TgZ(23,"div",169),t._UZ(24,"app-multi-state-button",170),t.qZA()()),2&o){const n=t.oxw();t.xp6(1),t.hij(" ",t.xi3(2,16,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.TITLE",t.WLB(29,Ue,n.clickedRollback.change,n.clickedRollback.datestring))," "),t.xp6(2),t.Q6J("formGroup",n.rollbackForm),t.xp6(2),t.Q6J("nzSm",6)("nzXs",24),t.xp6(1),t.hij(" ",t.lcZ(7,19,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.PASSWORD"),""),t.xp6(2),t.Q6J("nzSm",14)("nzXs",24)("nzValidateStatus",n.rollbackForm.controls.password)("nzErrorTip",n.rollbackSubmit&&!n.rollbackForm.controls.password.valid?t.lcZ(9,21,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.ERROR_TIP"):null),t.xp6(3),t.Q6J("placeholder",t.lcZ(12,23,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.PASSWORD")),t.xp6(5),t.hij(" ",t.lcZ(17,25,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.KEEP_NAME")," "),t.xp6(5),t.hij(" ",t.lcZ(22,27,"CLIENT.CONTRACT.MANAGE.ROLLBACKMODAL.KEEP_NOTES")," "),t.xp6(3),t.Q6J("stickResult",!1)("nzGhost",!n.rollbackForm.valid)("defaultFunction",n.confirmRollbackFunction)("nzTextKeys",n.confirmRollbackText)}}function Je(o,i){1&o&&(t._UZ(0,"i",171),t.ALo(1,"translate")),2&o&&t.Q6J("nzTooltipTitle",t.lcZ(1,1,"CLIENT.CONTRACT.MANAGE.NOTES.DELETE"))}let g=class{constructor(i,n,e,a,r,c,l,d,T,Be,Ye,Ke,Qe,We,je,qe){this.route=i,this.clientService=n,this.nzModal=e,this.userService=a,this.formService=r,this.dateTrigger=c,this.routerService=l,this.activatedRoute=d,this.router=T,this.translate=Be,this.modalService=Ye,this.contractModalService=Ke,this.contractFormService=Qe,this.userInfos=We,this.metadataService=je,this.contractsService=qe,this.ColorSettings=k.y,this.contractHistoryLoading=!0,this.allowHistoryAnimation=!1,this.historyChangedIDs=[],this.isOpenHistory=!0,this.contractName="",this.testNotes=Array(8).fill(4),this.newNote="",this.addingNew=!1,this.shownHistoryCount=10,this.editingNoteName=!1,this.imageToShow=new Map,this.namesToShow=new Map,this.sharedContract=!1,this.rollbackSubmit=!1,this.trigger=0,this.fullwidth=!1,this.Object=Object,this.editingNoteNames=[],this.clickedRollback={},this.modificationEndTime=0,this.showModificationEndTime=!1,this.showSaveButton=!1,this.historyTexts=new Map,this.translationTexts=new Map,this.availableTranslations=["true","false"],this.HistoryChangeTypes=_.bfP,this.copyHistoryText=new N.PR("CLIENT.CONTRACT.MANAGE.HISTORY.COPY_BUTTON_STATES.DEFAULT","CLIENT.CONTRACT.MANAGE.HISTORY.COPY_BUTTON_STATES.WORKING","CLIENT.CONTRACT.MANAGE.HISTORY.COPY_BUTTON_STATES.SUCCESS","CLIENT.CONTRACT.MANAGE.HISTORY.COPY_BUTTON_STATES.FAILED"),this.confirmRollbackErrors=new Map,this.deleteNoteFunctionMap=new Map,this.disableExpanding=!1,this.FeedbackFeature=_.lrp,this.FeedbackUnit=_._0Z,this.previousNoteContent=[],this.StorageKeys=G.B}ngOnInit(){this.confirmRollbackErrors.set(0,"CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK_BUTTON_STATES.FAILED"),this.confirmRollbackErrors.set(440,"CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK_BUTTON_STATES.440"),this.confirmRollbackText=new N.PR("CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK_BUTTON_STATES.DEFAULT","CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK_BUTTON_STATES.WORKING","CLIENT.CONTRACT.MANAGE.HISTORY.ROLLBACK_BUTTON_STATES.SUCCESS",this.confirmRollbackErrors),this.contract=null,this.contractHistory=[],this.historyTexts.clear(),this.rollbackForm=this.formService.contractRollbackFormGroup(),this.dateTrigger.trigger.subscribe(i=>{this.trigger=i}),this.defaultFunction=(i,n)=>this.addNote(i,n),this.defaultEditingNoteFunction=i=>this.updateNote(i),this.imageToShow=this.userInfos.userImgs,this.namesToShow=this.userInfos.userInformations,this.saveNoteText=new N.PR("CLIENT.CONTRACT.MANAGE.NOTES.SAVE.CHANGE","CLIENT.CONTRACT.MANAGE.NOTES.SAVE.CHANGING","CLIENT.CONTRACT.MANAGE.NOTES.SAVE.CHANGED","CLIENT.CONTRACT.MANAGE.NOTES.SAVE.FAILED"),this.contractID=this.route.
27snapshot.paramMap.get("id"),"history"===this.route.snapshot.paramMap.get("open")&&(this.isOpenHistory=!1),this.activatedRoute.queryParams.subscribe(i=>{i&&i.new&&"true"===i.new&&(this.contractID=this.route.snapshot.paramMap.get("id"),this.contract=null,this.contractHistory=[],this.historyTexts.clear(),this.loadContract(),this.nzModal.success({nzTitle:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.COPY_MODAL.TITLE"),nzContent:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.COPY_MODAL.DESCRIPTION"),nzCancelText:null,nzOkText:this.translate.instant("COMMON.CONTINUE")}),this.router.navigate([],{queryParams:{new:null},queryParamsHandling:"merge"}))}),this.loadContract(),this.historyRefresh=(0,F.F)(5e3).pipe((0,p.t)(this)).subscribe(()=>{this.checkHistoryChange()}),this.translate.onLangChange.subscribe(i=>{this.refreshTranslations()}),this.copyHistoryFunction=i=>this.copyHistory(i),this.confirmRollbackFunction=()=>this.confirmRollback(),this.deleteNoteFunction=i=>this.deleteNote(i)}ngAfterViewInit(){this.deleteNoteText=new N.PR(this.deleteIcon,this.deleteIcon,this.deleteIcon,this.deleteIcon)}ngOnDestroy(){clearTimeout(this.modificationUpdateTimeout),this.metadataService.setTranslateVariables(null)}refreshTranslations(){this.availableTranslations.forEach(i=>{this.translationTexts.set(i,this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.TRANSLATIONS."+i.toUpperCase()))}
27),this.contractHistory.forEach((i,n)=>{i.changes.length>0?i.changes.forEach((e,a)=>{switch(e.type){case _.bfP.EDITOR:this.historyTexts.set(i.historyNumber.primary,{shortDesc:"",longDesc:"",type:_.bfP.EDITOR,ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.NOTES:this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_NOTES")),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_NOTES"),type:_.bfP.NOTES,ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.CANONICAL:this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.VERSION_UPDATE",{version:e.value})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.VERSION_UPDATE",{version:e.value}),type:_.bfP.CANONICAL,ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.NAME:this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.RENAMED_CONTRACT",{new_name:e.value})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.RENAMED_CONTRACT",{new_name:e.value}),type:_.bfP.NAME,ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.UPDATE:switch(e.value.type){case _.bfP.ROLLBACK:this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.ROLLEDBACK")),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.ROLLEDBACK"),type:_.bfP.ROLLBACK,ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.COPY:this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.COPIED")),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.COPIED"),type:_.bfP.COPY,ID:e.editorID?e.editorID:i.clientID})}break;case _.bfP.PERCENTAGE:if(this.historyTexts.has(i.historyNumber.primary)){const l=this.historyTexts.get(i.historyNumber.primary);this.historyTexts.set(i.historyNumber.primary,{shortDesc:l.shortDesc,longDesc:l.longDesc,type:l.type,percentage:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.PROGRESSED",{percentage:100*e.value}),ID:e.editorID?e.editorID:i.clientID})}else this.historyTexts.set(i.historyNumber.primary,{shortDesc:"",longDesc:"",type:null,percentage:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.PROGRESSED",{percentage:100*e.value}),ID:e.editorID?e.editorID:i.clientID});break;case _.bfP.STEP:const r=e.steps[0].segments[0].fields[0],c=[];if(e.steps[0].segments.length>1?e.steps[0].segments.forEach((l,d)=>{if(d<1)return;const T=l.fields[0];c.push(T.humanReadableTo?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(T.displayElements.name),step_value:this.parseStepText(T.humanReadableTo)}):T.humanReadableFrom?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(T.displayElements.name),step_value:this.parseStepText(T.humanReadableFrom)}):T.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(T.displayElements.name),step_value:this.parseStepText(T.to)}):T.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(T.displayElements.name),step_value:this.parseStepText(T.from)}):null)}):e.steps[0].segments[0].fields.length>1&&e.steps[0].segments[0].fields.forEach((l,d)=>{d<1||c.push(l.humanReadableTo?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(l.displayElements.name),step_value:this.parseStepText(l.humanReadableTo)}):l.humanReadableFrom?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(l.displayElements.name),step_value:this.parseStepText(l.humanReadableFrom)}):l.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_
27name:this.contractFormService.parseMarkdownText(l.displayElements.name),step_value:this.parseStepText(l.to)}):l.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(l.displayElements.name),step_value:this.parseStepText(l.from)}):null)}),r.humanReadableTo)if(this.historyTexts.has(i.historyNumber.primary)){const l=this.historyTexts.get(i.historyNumber.primary);this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.humanReadableTo)})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.humanReadableTo)}),type:_.bfP.STEP,percentage:l.percentage,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID})}else this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.humanReadableTo)})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.humanReadableTo)}),type:_.bfP.STEP,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID});else if(r.humanReadableFrom)if(this.historyTexts.has(i.historyNumber.primary)){const l=this.historyTexts.get(i.historyNumber.primary);this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.humanReadableFrom)})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.humanReadableFrom)}),type:_.bfP.STEP,percentage:l.percentage,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID})}else this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.humanReadableFrom)})),longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.humanReadableFrom)}),type:_.bfP.STEP,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID});else if(this.historyTexts.has(i.historyNumber.primary)){const l=this.historyTexts.get(i.historyNumber.primary);this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(r.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.to)}):r.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.from)}):null),longDesc:r.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.to)}):r.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.from)}):null,type:_.bfP.STEP,percentage:l.percentage,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID})}else this.historyTexts.set(i.historyNumber.primary,{shortDesc:this.formatShortDesc(r.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_
27name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.to)}):r.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(this.formatShortDesc(r.displayElements.name)),step_value:this.parseStepText(r.from)}):null),longDesc:r.to?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.to)}):r.from?this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CHANGED_STEP_ROLLBACK",{step_name:this.contractFormService.parseMarkdownText(r.displayElements.name),step_value:this.parseStepText(r.from)}):null,type:_.bfP.STEP,moreDesc:0===c.length?null:c,ID:e.editorID?e.editorID:i.clientID});break;default:this.historyTexts.set(i.historyNumber.primary,{shortDesc:"",longDesc:"",type:null,ignore:!0})}}):this.historyTexts.set(i.historyNumber.primary,n===this.contractHistory.length-1?{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CREATED")),type:_.bfP.CREATE,longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.CREATED"),ID:i.clientID}:{shortDesc:this.formatShortDesc(this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.ERROR")),type:_.bfP.CREATE,longDesc:this.translate.instant("CLIENT.CONTRACT.MANAGE.HISTORY.ERROR"),ID:i.clientID})})}parseStepText(i){if(null==i)return null;if("string"==typeof i)return this.translationTexts.has(i.toLowerCase())?this.translationTexts.get(i.toLowerCase()):i;if(Array.isArray(i)){const n=i.map(e=>this.translationTexts.has(e.toLowerCase())?this.translationTexts.get(e.toLowerCase()):e);return 1===n.length?n[0]:`[${n.join(",")}]`}return"object"==typeof i?JSON.stringify(i):i}openHistory(i){this.disableExpanding||(i||!this.isOpenHistory&&!i)&&(this.isOpenHistory=!this.isOpenHistory,this.shownHistoryCount=10===this.shownHistoryCount?40:10)}formatShortDesc(i){return i.split(" ").length>25?i.split(" ").slice(0,25).join(" ")+"...":i}openShareModal(){this.modalService.contractShareModal(this.contractID,this.contract,this.footerdivider),this.nzModal.afterAllClose.subscribe(()=>{const i=Date.now();this.clientService.getContractProgressByID(this.contractID).pipe((0,p.t)(this)).subscribe(n=>{this.contract=n,this.metadataService.setTranslateVariables({contractName:this.contract.displayElements.name}),n.progress.finalization&&(this.modificationEndTime=n.progress.finalization.unlimitedFieldChangePeriodRemainder+i,this.showModificationEndTime=this.modificationEndTime>Date.now(),this.showModificationEndTime&&(this.modificationUpdateTimeout&&clearTimeout(this.modificationUpdateTimeout),this.modificationUpdateTimeout=setTimeout(()=>this.loadContract(),Math.max(0,this.modificationEndTime-Date.now())))),this.contractName=this.contract.progress.metadata.name?this.contract.progress.metadata.name:this.contract.displayElements.name},n=>{})})}documentClick(i){this.historyChangedIDs.length>=0&&(this.historyChangedIDs=[])}loadContract(i){const n=Date.now();this.contractsService.getAvailableContracts().then(e=>{this.clientService.getContractProgressByID(this.contractID).pipe((0,p.t)(this)).subscribe(a=>{this.contract=a;const r=e.find(c=>c.name===this.contract.progress.canonical.name);r&&(this.matchmakingCategory=r.metadata.matchmaking),this.metadataService.setTranslateVariables({contractName:this.contract.displayElements.name}),a.progress.finalization&&(this.modificationEndTime=a.progress.finalization.unlimitedFieldChangePeriodRemainder+n,this.showModificationEndTime=this.modificationEndTime>Date.now(),this.showModificationEndTime&&(this.modificationUpdateTimeout&&clearTimeout(this.modificationUpdateTimeout),this.modificationUpdateTimeout=setTimeout(()=>this.loadContract(),Math.max(0,this.modificationEndTime-Date.now())))),this.contractName=this.contract.progress.metadata.name?this.contract.progress.metadata.name:this.contract.displayElements.name,this.notes=this.contract.progress.metadata.notes,this.editingNoteNames=Array(this.notes.length).fill(!1),this.previousNoteContent=Array(this.notes.length).fill(""),this.sharedContract=a.progress.userID!==this.userService.sessionUserID,this.parseContractsShownMarkdown(),"finalization"===this.route.
27snapshot.paramMap.get("open")&&this.contractModalService.contractCompleteModal(this.contractName,this.contractID)},a=>{},()=>{this.userInfos.batchGetUserImgsByIds(this.contract.progress.permissions.users),this.userInfos.batchGetUserNamesByIds(this.contract.progress.permissions.users),this.contractHistory.length>0?this.checkHistoryChange():this.clientService.getContractHistoryById(this.contractID).pipe((0,p.t)(this)).subscribe(a=>{a.forEach((r,c)=>{r.changes.forEach(l=>{null!=l.editorID?(this.userInfos.batchGetUserImgsByIds([l.editorID]),this.userInfos.batchGetUserNamesByIds([l.editorID])):(this.userInfos.batchGetUserImgsByIds([r.clientID]),this.userInfos.batchGetUserNamesByIds([r.clientID]))})}),this.contractHistory=a.sort((r,c)=>r.historyNumber.primary<c.historyNumber.primary?1:-1),i&&this.historyChangedIDs.push(this.contractHistory[0].historyNumber.primary),this.refreshTranslations(),this.contractHistoryLoading=!1})})})}addNoteWithButton(i,n){this.runFunction=(e,a)=>this.addNote(i,n)}cancelNoteAdding(){this.addingNew=!this.addingNew,this.showSaveButton=!this.showSaveButton,this.newNote="",this.editingNoteNames=Array(this.notes.length).fill(!1)}deleteNoteWithButton(i){this.deleteNoteFunctionMap.set(this.notes[i],this.deleteNote(i))}checkHistoryChange(){let n,i=_.XYB.NONE;this.clientService.getContractHistoryById(this.contractID).pipe((0,p.t)(this)).subscribe(e=>{e.length>this.contractHistory.length?(i=_.XYB.UPDATED,n=[...e]):e.length<this.contractHistory.length?(i=_.XYB.ROLLBACK,n=[...e]):e.length===this.contractHistory.length&&this.contractHistory.length>0&&e[0].historyNumber.primary===this.contractHistory[0].historyNumber.primary&&e[0].historyNumber.secondary!==this.contractHistory[0].historyNumber.secondary&&(i=_.XYB.ROLLBACK_SAME_LENGTH,n=[...e]),this.contractHistoryLoading=!1},e=>{},()=>{if(i===_.XYB.UPDATED){const e=this.contractHistory[0]?.historyNumber.primary;this.contractHistory=this.contractHistory.map((r,c)=>{const l=n.find(d=>d.historyNumber.primary===r.historyNumber.primary&&d.historyNumber.secondary===r.historyNumber.secondary);return this.parseNewHistoryToOld(r,l)});const a=this.historyLoop(n,e);this.contractHistory=a.historyDiff.concat(this.contractHistory),this.refreshTranslations()}else if(i===_.XYB.ROLLBACK){const e=this.historyLoop(n);this.contractHistory=[...e.history],this.refreshTranslations()}else if(i===_.XYB.ROLLBACK_SAME_LENGTH){const e=this.historyLoop(n);this.contractHistory[0]=[...e.history][0],this.refreshTranslations()}else this.allowHistoryAnimation=!1})}parseNewHistoryToOld(i,n){return i.ID=n.ID?n.ID:i.ID,i.metadata=n.metadata?n.metadata:i.metadata,i.canRollback=n.canRollback?n.canRollback:i.canRollback,i}historyLoop(i,n){this.allowHistoryAnimation=!1;const e=i.map(a=>
27(a.changes.forEach(r=>{r.editorID&&(this.userInfos.batchGetUserImgsByIds([r.editorID]),this.userInfos.batchGetUserNamesByIds([r.editorID]))}),n&&a.historyNumber.primary>n&&this.historyChangedIDs.push(a.historyNumber.primary),a)).filter(a=>n&&a.historyNumber.primary>n).sort((a,r)=>a.historyNumber.primary<r.historyNumber.primary?1:-1);return i.sort((a,r)=>a.historyNumber.primary<r.historyNumber.primary?1:-1),n||(this.historyChangedIDs=[i[0].historyNumber.primary]),this.allowHistoryAnimation=!0,{history:i,historyDiff:e}}addNote(i,n){if(""!==i.trim()){if(this.contract.progress.metadata.notes&&this.contract.progress.metadata.notes.length>0||this.notes.length>0){const e=[...this.notes];return e.push(new _.jCS(n,i)),this.clientService.addNote(this.contractID,e).pipe((0,p.t)(this)).toPromise().then(a=>{this.showSaveButton=!1,this.addingNew=!1,this.newNote="",this.notes=e,this.editingNoteNames=Array(this.notes.length).fill(!1)},a=>Promise.reject()).then(()=>{this.checkHistoryChange()})}return this.clientService.addNote(this.contractID,[new _.jCS(n,i)]).pipe((0,p.t)(this)).toPromise().then(e=>{this.showSaveButton=!1,this.addingNew=!1,this.newNote="",this.notes=[new _.jCS(n,i)],this.editingNoteNames=Array(this.notes.length).fill(!1)},e=>Promise.reject()).then(()=>{this.checkHistoryChange()})}return this.showSaveButton=!1,this.addingNew=!1,this.newNote="",this.editingNoteNames=Array(this.notes.length).fill(!1),Promise.reject()}deleteNote(i){const n=[...this.notes];return n.splice(i,1),this.clientService.addNote(this.contractID,n).pipe((0,p.t)(this)).subscribe(e=>{this.deleteNoteFunctionMap.delete(this.notes[i]),this.notes.splice(i,1),this.checkHistoryChange(),this.editingNoteNames=Array(this.notes.length).fill(!1),this.previousNoteContent=Array(this.notes.length).fill("")})}updateNote(i){return""===this.notes[i].content.trim()?this.deleteNote(i):this.clientService.getContractProgressByID(this.contractID).pipe((0,p.t)(this)).subscribe(n=>{if(n.progress.metadata.notes.length!==this.notes.length)this.clientService.addNote(this.contractID,this.notes).pipe((0,p.t)(this)).subscribe(()=>{this.checkHistoryChange(),this.editingNoteNames[i]=!1});else{let e=!1;if(this.notes.forEach((a,r)=>{(a.checked!==n.progress.metadata.notes[r].checked||a.content!==n.progress.metadata.notes[r].content)&&(e=!0)}),e)return this.clientService.addNote(this.contractID,this.notes).pipe((0,p.t)(this)).subscribe(()=>{this.checkHistoryChange(),this.editingNoteNames[i]=!1});this.editingNoteNames[i]=!1}})}confirmRollback(){if(this.rollbackForm.controls.password.markAsTouched(),this.rollbackSubmit=!0,this.rollbackForm.valid)return this.clientService.rollbackContract(this.selectedRollback.progressID,this.selectedRollback.ID,this.formService.groupToContractRollback(this.rollbackForm)).pipe((0,p.t)(this)).subscribe(i=>{this.loadContract(!0),this.nzModal.closeAll()})}rollbackModal(i,n){const e=new Date(n.metadata.update.timestamp);this.selectedRollback=n;const a=e.toLocaleDateString("hu-HU",{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});this.clickedRollback={change:i,datestring:a},this.modalService.rollbackModal(this.rollbackmodal),this.nzModal.afterAllClose.subscribe(r=>{this.rollbackForm=this.formService.contractRollbackFormGroup()})}copyHistory(i){return this.clientService.copyContractHistory(i.ID,!0).pipe((0,p.t)(this)).toPromise().then(n=>{this.routerService.routeToNewContractRollback(n.value,"open")})}openDetailsModal(i,n,e,a,r){this.modalService.contractInformationModal(i,n,a,e,i,!1,!1,r)}parseContractsShownMarkdown(){this.contractsShownFormEditorHelperContent=this.contractFormService.parseMarkdownText(this.contract.displayElements.editor.helper.content?this.contract.displayElements.editor.helper.content:this.contract.displayElements.description),this.contractsShownDescription=this.contractFormService.parseMarkdownText(this.contract.displayElements.description)}identifyHistory(i,n){return n.historyNumber.primary}onResized(i){this.fullwidth=i.newRect.width<950}goToContract(){this.routerService.routeToContract(this.contract.progress.ID,!0)}};g.\u0275fac=function(i){return new(i||g)(t.Y36(A.gz),t.Y36(J.y),t.Y36(B.Sf),t.Y36(Y.K),t.Y36(K.o),t.Y36(Q.J),t.Y36(W.c),t.Y36(A.gz),t.Y36(A.F0),t.Y36(v.sK),t.Y36(j.Z),t.Y36(q.a),t.Y36(V.R),t.Y36($.h),t.Y36(X.D),t.Y36(tt.W))},g.\u0275cmp=t.Xpm({type:g,selectors:[["app-contract-manage"]],viewQuery:function(i,n){if(1&i&&(t.Gf(Mt,5),t.Gf(vt,5),t.Gf(bt,5),t.Gf(M.v,5)),2&i){let e;t.iGM(e=t.CRH())&&(n.footerdivider=e.first),t.iGM(e=t.CRH())&&(n.rollbackmodal=e.first),t.iGM(e=t.CRH())&&(n.deleteIcon=e.first),t.iGM(e=t.CRH())&&(n.tabsetTutorialDirective=e.first)}},hostBindings:function(i,n){1&i&&t.NdJ("click",function(a){return n.documentClick(a)},!1,t.evT)},decls:16,vars:6,consts:[[1,"container-fluid"],[1,"row",3,"resized"],["class","m-r-15",4,"ngIf"],["class","m-r-15",3,"ngClass","click",4,"ngIf"],["titleSkeleton",""],[1,"position-relative",3,"ngClass"],["class","w-100",4,"ngIf"],[4,"ngIf"],["footerdivider",""],["rollbackmodal",""],["deleteIcon",""],[1,"m-r-15"],[1,"d-flex","justify-content-between"],[1,"media","align-items-center","w-40"],["nzType","avatar","nzSize","large","nzShape","square",1,"p-b-10",3,"nzActive"],["nzType","input","nzSize","small",1,"m-l-10","p-b-10","w-70",3,"nzActive"],[1,"text-right","w-30"],["nzType","input","nzSize","small",1,"p-b-10","w-100",3,"nzActive"],[1,"m-t-40"],["nzType","input","nzSize","small",1,"p-b-10","w-30",3,"nzActive"],["class","p-b-10 w-100","nzType","input","nzSize","small",3,"nzActive",4,"ngFor","ngForOf"],[1,"row","m-t-30","justify-content-between","align-items-center"],[3,"ngClass"],["nzType","input","nzSize","small",1,"p-b-10","w-30","m-r-10",3,"nzActive"],["nzType","avatar","nzSize","large",3,"nzActive",4,"ngFor","ngForOf"],["nzType","input",1,"p-b-10","w-100",3,"nzActive"],[1,"off-gutter-x","m-t-30"],[1,"ant-tabs-nav","p-v-5"],[1,"ant-tabs-tab","ant-tabs-tab-active","w-30"],["nzType","input",1,"w-100",3,"nzActive"],[1,"p-h-30","p-v-25"],["class","p-b-10 w-100","nzType","input",3,"nzActive",4,"ngFor","ngForOf"],["nzType","avatar","nzSize","large",3,"nzActive"],[1,"m-r-15",3,"ngClass","click"],[1,"d-flex","justify-content-between","flex-wrap-reverse","title-container"],[1,"media","align-items-center"],[3,"isComplete"],[1,"m-l-10","w-100"],[1,"mb-0"],[3,"contractID","contractName"],[1,"text-right","align-items-center","d-inline-block","ml-auto"],[1,"tag-positioning","mr-2",3,"ngClass"],["class","brand-failure-bg-border d-block white-space-normal text-center h-auto lh-1-7",4,"ngIf"],["class","m-b-10 flex-wrap mr-2","nzSize","small",4,"ngIf"],[1,"markdown","contractDescription","listWithMargin","descriptionContent",3,"innerHTML"],["style","margin-left: 10px; vertical-align: unset",3,"click",4,"ngIf"],[3,"contract"],["nz-button","","nzType","default","nzSize","small",2,"bottom","2px","margin-right","10px","white-space","normal","height","100%",3,"click","mouseover","mouseout"],["nz-tooltip","",1,"font-weight-semibold","m-r-10","m-b-5","text-dark",3,"nzTooltipTitle"],[1,"opacity-07"],[1,"feedback-positioning",3,"feature","unit","t
27itle"],["tutorialTitle",""],["nz-tooltip","","tabsetTutorial","",3,"nzTooltipTitle","nzTooltipTrigger","nzTooltipPlacement","safekeepingStorageKey"],[3,"nzTitle"],[1,"p-h-30","p-b-25","p-t-40"],[3,"filterTo","isEmbedded","embeddedEmptyText","embeddedFilteredEmptyText","mouseover","mouseout",4,"ngIf"],[3,"nzNotFoundContent","nzNotFoundFooter","nzNotFoundImage",4,"ngIf"],["footerTpl",""],[3,"nzTitle",4,"ngIf"],[1,"brand-failure-bg-border","d-block","white-space-normal","text-center","h-auto","lh-1-7"],["nz-tooltip","",3,"nzTooltipTitle"],["nz-icon","","nzType","question-circle","theme","outline",1,"m-l-5"],["nzSize","small",1,"m-b-10","flex-wrap","mr-2"],["nz-button","","nzType","primary",3,"click"],["nz-icon","","nzType","edit","theme","outline"],[2,"margin-left","10px","vertical-align","unset",3,"click"],["nz-icon","","nzType","question-circle","nzTheme","outline"],[3,"tabsetTutorialDirective","safekeepingStorageKey"],[3,"filterTo","isEmbedded","embeddedEmptyText","embeddedFilteredEmptyText","mouseover","mouseout"],[3,"nzNotFoundContent","nzNotFoundFooter","nzNotFoundImage"],["nz-button","","nzType","primary",1,"button-text-wrap",3,"click"],[1,"small"],[3,"class",4,"ngFor","ngForOf"],["class","pb-4",4,"ngIf"],[1,"row","justify-content-end","grid-gap-15"],["nz-button","","nzType","primary","nzGhost","",3,"click"],[1,"d-inline-block",2,"vertical-align","top !important","max-width","100px","margin-top","3px"],["nz-popconfirm","","nzPopconfirmPlacement","right",2,"vertical-align","top !important",3,"stickResult","showAsLink","runFunction","nzTextKeys","nzPopconfirmTitle","nzCancelText","nzOkText","nzOnConfirm"],["nz-checkbox","","nz-tooltip","",1,"align-items-baseline",3,"ngModel","nzTooltipTitle","ngModelChange"],[1,"editable-cell","m-b-0","d-inline-block","note-block",3,"click"],[3,"ngStyle",4,"ngIf"],["type","text","nz-input","","minlength","4","cols","40","rows","3","trim","blur",1,"pb-4",2,"overflow","hidden",3,"hidden","ngModel","ngModelChange"],["class","row justify-content-end grid-gap-15 p-r-20 mt-2",4,"ngIf"],[3,"ngStyle"],[1,"row","justify-content-end","grid-gap-15","p-r-20","mt-2"],[3,"stickResult","defaultFunction","nzTextKeys","defaultFunctionParameters"],[1,"pb-4"],["type","text","nz-input","","required","","minlength","4","cols","40","rows","3","trim","blur",3,"ngModel","placeholder","ngModelChange"],[3,"stickResult","runFunction","nzTextKeys","defaultFunctionParameters","defaultFunction"],["nzType","input",1,"p-b-10","w-50",3,"nzActive"],["nzType","input",1,"p-b-10","w-30","float-right",3,"nzActive"],[1,"w-100"],[3,"nzDot",4,"ngFor","ngForOf"],[3,"nzDot"],[1,"m-l-20"],["nzType","avatar","nzSize","large",1,"p-b-10",3,"nzActive"],["nzType","input","nzSize","small",1,"p-b-10","w-50",3,"nzActive"],[1,"m-t-20"],["dotTemplate2",""],["nzType","avatar",1,"p-b-10",3,"nzSize","nzActive"],[3,"nzTitle","nzExtra"],["historyTemplate",""],[3,"nzNotFoundContent","nzNotFoundImage",4,"ngIf"],["class","manage-timeline",3,"click",4,"ngIf"],["nz-button","","nzType","link","nzSize","small","class","p-v-5",3,"click",4,"ngIf"],["nz-button","","nzType","link","nzSize","small",1,"p-v-5",3,"click"],[3,"nzNotFoundContent","nzNotFoundImage"],[1,"manage-timeline",3,"click"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzDot",4,"ngIf"],["nzDot","",1,"historyBadge",3,"nzShowDot"],["nzIcon","user",1,"history-avatar-sizing",3,"nzSrc"],[1,"m-l-10"],["class","m-b-0",4,"ngIf"],["nzSize","small",3,"nzPercent","nzStrokeColor",4,"ngIf"],[1,"text-muted","font-size-13"],["nz-icon","","nzType","clock-circle","theme","outline"],["nz-tooltip","",1,"m-l-5",3,"nzTooltipTitle"],["nz-tooltip","",3,"class","nzTooltipTitle","innerHTML",4,"ngIf"],["menuTitle",""],["nz-menu","","nzMode","inline","class","change-menu mb-3",3,"nzSelectable","mouseover","mouseout",4,"ngIf"],["class","m-l-5",4,"ngIf"],["dotTemplate",""],[1,"m-b-0"],["nzSize","small",3,"nzPercent","nzStrokeColor"],["nz-tooltip","",3,"nzTooltipTitle","innerHTML"],["nz-menu","","nzMode","inline",1,"change-menu","mb-3",3,"nzSelectable","mouseover","mouseout"],["nz-submenu","","nzMenuClassName","change-menu",3,"nzTitle"],["nz-menu-item","",3,"class",4,"ngFor","ngForOf"],["nz-menu-item",""],[1,"m-l-5"],["nzType","default","nzSize","small",1,"h-100",3,"stickResult","defaultFunction","defaultFunctionParameters","nzTextKeys","mouseover","mouseout"],["nz-button","","nzType","primary","nzSize","small","class","m-t-5",3,"mouseover","mouseout","click",4,"ngIf"],["nz-button","","nzType","primary","nzSize","small",1,"m-t-5",3,"mouseover","mouseout","click"],["class","bg-secondary","nzIcon","user",3,"nzSize",4,"ngIf"],["class","bg-secondary","nzIcon","to-top",3,"nzSize",4,"ngIf"],["class","bg-secondary","nzIcon","paper-clip",3,"nzSize",4,"ngIf"],["class","bg-secondary","nzIcon","edit",3,"nzSize",4,"ngIf"],["class","bg-secondary","nzIcon","rollback",3,"nzSize",4,"ngIf"],["class","bg-secondary","nzIcon","copy",3,"nzSize",4,"ngIf"],["class","bg-tertiary","nzIcon","rise",3,"nzSize",4,"ngIf"],["class","bg-quinary","nzIcon","check",3,"nzSize",4,"ngIf"],["class","bg-tertiary","nzIcon","plus",3,"nzSize",4,"ngIf"],["class","bg-tertiary","nzIcon","warning",3,"nzSize",4,"ngIf"],["nzIcon","user",1,"bg-secondary",3,"nzSize"],["nzIcon","to-top",1,"bg-secondary",3,"nzSize"],["nzIcon","paper-clip",1,"bg-secondary",3,"nzSize"],["nzIcon","edit",1,"bg-secondary",3,"nzSize"],["nzIcon","rollback",1,"bg-secondary",3,"nzSize"],["nzIcon","copy",1,"bg-secondary",3,"nzSize"],["nzIcon","rise",1,"bg-tertiary",3,"nzSize"],["nzIcon","check",1,"bg-quinary",3,"nzSize"],["nzIcon","plus",1,"bg-tertiary",3,"nzSize"],["nzIcon","warning",1,"bg-tertiary",3,"nzSize"],["dividerText",""],["nzOrientation","left",3,"nzText"],[1,"row","justify-content-start",2,"padding","0 10px"],[2,"text-align","left"],[1,"row","w-100","justify-content-end"],[1,"white-space-normal"],["nz-form","","nzNoColon","",3,"formGroup"],[1,"m-b-10"],["nzFor","password","nzRequired","",3,"nzSm","nzXs"],[3,"nzSm","nzXs","nzValidateStatus","nzErrorTip"],["formControlName","password","nz-input","","type","password","trim","blur",3,"placeholder"],[1,"checkbox-right","m-b-10"],["nz-checkbox","","formControlName","keepName",1,"col-2","col-sm-3"],[1,"col-10","col-sm-9"],["nz-checkbox","","formControlName","keepNotes",1,"col-2","col-sm-3"],["nz-row","","nzJustify","end"],["nzType","primary",3,"stickResult","nzGhost","defaultFunction","nzTextKeys"],["nz-icon","","nzType","delete","nz-tooltip","",1,"delete-note-icon",3,"nzTooltipTitle"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"div",0)(2,"div",1),t.NdJ("resized",function(a){return n.onResized(a)}),t.YNc(3,Lt,28,22,"div",2),t.YNc(4,ne,56,65,"div",3),t.YNc(5,ie,2,2,"ng-template",null,4,t.W1O),t.TgZ(7,"div",5),t.YNc(8,re,5,5,"div",6),t.YNc(9,we,8,13,"div",7),t.qZA()()(),t.YNc(10,Fe,10,10,"ng-template",null,8,t.W1O),t.YNc(12,Ge,25,32,"ng-template",null,9,t.W1O),t.YNc(14,Je,2,3,"ng-template",null,10,t.W1O),t.qZA()),2&i&&(t.xp6(3),t.Q6J("ngIf",!n.contract),t.xp6(1),t.Q6J("ngIf",n.contract),t.xp6(3),t.Q6J("@openClose",n.isOpenHistory)("ngClass",n.fullwidth?"w-100":""),t.xp6(1),t.Q6J("ngIf",n.contractHistoryLoading),t.xp6(1),t.Q6J("ngIf",!n.contractHistoryLoading))},dependencies:[et.P,nt._,it.G,h._Y,h.Fj,h.JJ,h.JL,h.Q7,h.wO,h.On,ot.P,u.mk,u.sg,u.O5,u.PC,at.X,rt.a5,h.sg,h.u,st.k,N.P4,ct.p,M.v,lt.Dz,_t.x7,b.ix,b.fY,mt.w,pt.dQ,Tt.bd,ht.Ie,dt.p9,gt.g,f.wO,f.r9,f.rY,D.t3,D.SK,E.Lr,E.Nx,E.iK,E.Fd,ut.Ls,S.Zp,S.gB,Ct.M,Nt.JW,y.Xw,y.yx,y.yg,R.xH,R.xw,L.Zv,L.PD,Et.j,At.SY,u.JJ,u.uU,v.X$,ft.z,yt.R,xt.N,zt.L,Ot.y,It.A],styles:['@charset "UTF-8";.brand-success[_ngcontent-%COMP%]{color:#92ddea!important}.brand-failure[_ngcontent-%COMP%]{color:#9579d1!important}.brand-red[_ngcontent-%COMP%]{color:#de4436!important}.brand-success-bg-border[_ngcontent-%COMP%]{background-color:#92ddea!important;border-color:#92ddea!important;color:#fff!important}.brand-failure-bg-border[_ngcontent-%COMP%]{background-color:#ffa5d8!important;border-color:#ffa5d8!important;color:#fff!important} nz-timeline.manage-timeline nz-avatar{line-height:23px!important}[_nghost-%COMP%] .change-item{padding-left:24px!important;cursor:default!important;white-space:normal;height:auto;line-height:1.5}[_nghost-%COMP%] .change-menu .ant-menu{background-color:#fff!important}.white-space[_ngcontent-%COMP%]{white-space:normal}[_nghost-%COMP%] .change-menu .ant-menu-submenu-title{height:100%!important;margin-bottom:0!important}.contractDescription[_ngcontent-%COMP%] :last-child{display:inline}.checkbox-right[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{margin-right:0} .checkbox-right>label .ant-checkbox{margin-left:auto} .checkbox-right>label .ant-checkbox .ant-checkbox-inner{float:right}.checkbox-right[_ngcontent-%COMP%] > SPAN[_ngcontent-%COMP%]{line-height:28px;padding-left:0}[_nghost-%COMP%] .change-item:active{color:inherit!important;background-color:transparent!important;background-color:initial!important}[_nghost-%COMP%] .change-item:hover{color:inherit!important;background-color:transparent!important;background-color:initial!important}.unset-flex[_ngcontent-%COMP%]{flex:initial!important}.historyCard[_ngcontent-%COMP%] .ant-card-head-title{min-width:100%;overflow:auto;white-space:normal;text-align:center;padding-bottom:0}.historyCard[_ngcontent-%COMP%] .ant-card-head-wrapper{flex-wrap:wrap}.historyCard[_ngcontent-%COMP%] .ant-card-extra{margin-left:auto;margin-right:auto;padding-top:0;padding-bottom:6px}.title-container[_ngcontent-%COMP%]{gap:5px 15px!important;grid-gap:5px 15px!important;margin-top:-5px}.tag-positioning[_ngcontent-%COMP%]{margin-right:-15px}.history-avatar-sizing[_ngcontent-%COMP%]{min-width:34px;min-height:40px}.history-avatar-sizing[_ngcontent-%COMP%] .anticon-user{margin-top:.75rem}.historyBadge[_ngcontent-%COMP%] .ant-badge-dot{width:12px!important;min-width:12px!important;height:12px!important;top:1px!important;left:-62px!important}.breakFlex[_ngcontent-%COMP%]{flex-basis:100%;height:0}.note-block[_ngcontent-%COMP%]{max-width:calc(100% - 100px);width:calc(100% - 65px)}.delete-note-icon[_ngcontent-%COMP%]{font-size:20px;vertical-align:top!important;color:#72849a;transition:.5s;margin-right:6px}.delete-note-icon[_ngcontent-%COMP%]:hover{font-size:26px;color:#9579d1}'],data:{animation:[U.Ln,(0,m.X$)("openClose",[(0,m.SB)("1",(0,m.oB)({width:"32%"})),(0,m.SB)("0",(0,m.oB)({width:"65%"})),(0,m.eR)("1 <=> 0",(0,m.jt)(500))]),(0,m.X$)("inOutNote",[(0,m.eR)(":enter",[(0,m.oB)({opacity:0,height:0}),(0,m.jt)("0.3s ease-out",(0,m.oB)({opacity:1,height:"*"}))]),(0,m.eR)(":leave",[(0,m.oB)({opacity:1,height:"*"}),(0,m.jt)("0.3s ease-in",(0,m.oB)({opacity:0,height:0}))])]),(0,m.X$)("inOutHistory",[(0,m.eR)(":enter",[(0,m.oB)({opacity:0,height:0}),(0,m.jt)("{{duration}}ms ease-out",(0,m.oB)({opacity:1,height:"*"}))]),(0,m.eR)(":leave",[(0,m.oB)({opacity:1,height:"*"}),(0,m.jt)("{{duration}}ms ease-in",(0,m.oB)({opacity:0,height:0}))])])]}}),g=(0,w.gn)([(0,p.c)()],g)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.