UNPKG

manifest

Version:

The backend for AI code editors

1 lines 39.8 kB
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[69],{4493:(Q,D,d)=>{d.d(D,{B:()=>Y});var h=d(2943),M=d(9911),n=d(8428),t=d(8785),$=d(6631),e=d(183),b=d(8284);let Y=(()=>{class G{static{this.\u0275fac=function(x){return new(x||G)}}static{this.\u0275mod=b.$C({type:G})}static{this.\u0275inj=b.G2t({imports:[h.MD,e.iI,M.X1,$.L,n.S,t.x]})}}return G})()},1424:(Q,D,d)=>{d.d(D,{O:()=>oe});var h=d(7431),M=d(9911),n=d(5442),t=d(4782),$=d(7563),e=d(8284),b=d(6119),Y=d(2283),G=d(183),O=d(9879),I=d(818),x=d(2943),k=d(8428);const j=s=>({"is-loading":s}),N=s=>({"is-bordered p-5":s});function B(s,C){if(1&s&&(e.qex(0),e.EFF(1),e.bVm()),2&s){const o=e.XpG(3);e.R7$(),e.SpI("Edit ",o.entityManifest.nameSingular,"")}}function X(s,C){if(1&s&&(e.qex(0),e.EFF(1),e.bVm()),2&s){const o=e.XpG(3);e.R7$(),e.SpI("Edit an existing ",o.entityManifest.nameSingular,"")}}function S(s,C){if(1&s&&(e.qex(0),e.DNE(1,B,2,1,"ng-container",0)(2,X,2,1,"ng-container",0),e.bVm()),2&s){const o=e.XpG(2);e.R7$(),e.Y8G("ngIf",o.singleMode),e.R7$(),e.Y8G("ngIf",!o.singleMode)}}function w(s,C){if(1&s&&(e.qex(0),e.EFF(1),e.bVm()),2&s){const o=e.XpG(2);e.R7$(),e.SpI(" Create a new ",o.entityManifest.nameSingular," ")}}function U(s,C){if(1&s){const o=e.RV6();e.j41(0,"div",15)(1,"div",16)(2,"app-input",17),e.bIt("valueChanged",function(m){const v=e.eBV(o).$implicit,u=e.XpG(3);return e.Njj(u.onChange({propName:v.name,newValue:m}))}),e.k0s()()()}if(2&s){const o=C.$implicit,l=e.XpG(3);e.R7$(2),e.Y8G("prop",o)("entityManifest",l.entityManifest)("value",l.edit?l.item[o.name]:null)("errors",l.errors[o.name])}}function L(s,C){if(1&s){const o=e.RV6();e.j41(0,"div",16)(1,"app-input",19),e.bIt("valueChanged",function(m){e.eBV(o);const v=e.XpG().$implicit,u=e.XpG(3);return e.Njj(u.onRelationChange({relationship:v,newValue:m}))}),e.k0s()()}if(2&s){const o=e.XpG().$implicit,l=e.XpG(3);e.R7$(),e.Y8G("relationship",o)("value",l.edit?l.item[o.name]:null)("errors",l.errors[o.name])}}function V(s,C){if(1&s&&(e.j41(0,"div",15),e.DNE(1,L,2,3,"div",18),e.k0s()),2&s){const o=C.$implicit;e.R7$(),e.Y8G("ngIf","many-to-one"===o.type||"many-to-many"===o.type&&o.owningSide)}}function A(s,C){if(1&s&&(e.j41(0,"p",25),e.EFF(1),e.k0s()),2&s){const o=e.XpG(2).$implicit;e.R7$(),e.SpI(" ",o.helpText," ")}}function K(s,C){if(1&s){const o=e.RV6();e.j41(0,"button",28),e.bIt("click",function(){e.eBV(o);const m=e.XpG(3).$implicit,v=e.XpG(3);return e.Njj(v.addNestedItem(m))}),e.j41(1,"span",29),e.nrm(2,"i",30),e.EFF(3,"- "),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()()}if(2&s){const o=e.XpG(3).$implicit;e.R7$(5),e.SpI("Add ",o.entity,"")}}function W(s,C){if(1&s&&(e.j41(0,"div",26),e.DNE(1,K,6,1,"button",27),e.k0s()),2&s){const o=e.XpG(2).$implicit,l=e.XpG(3);e.R7$(),e.Y8G("ngIf","one-to-one"!==o.type||null===l.getSingleRelation(o.name))}}function J(s,C){if(1&s&&(e.j41(0,"div",32)(1,"p",33),e.EFF(2),e.k0s(),e.j41(3,"p",34),e.EFF(4),e.k0s()()),2&s){const o=e.XpG(3).$implicit;e.R7$(2),e.SpI(" No ",o.name," added yet. "),e.R7$(2),e.SpI(' Click on "Add ',o.entity,'" to add the item. ')}}function z(s,C){if(1&s){const o=e.RV6();e.j41(0,"div",15)(1,"div",16)(2,"app-input",17),e.bIt("valueChanged",function(m){const v=e.eBV(o).$implicit,u=e.XpG(4).$implicit,y=e.XpG(3);return e.Njj(y.onNestedItemChange({relationship:u,propName:v.name,newValue:m}))}),e.k0s()()()}if(2&s){let o;const l=C.$implicit,m=e.XpG(4).$implicit,v=e.XpG(3);e.R7$(2),e.Y8G("prop",l)("entityManifest",v.nestedEntityManifests[m.name])("value",v.edit?null==(o=v.getSingleRelation(m.name).get(l.name))?null:o.value:null)("errors",v.errors[m.name+"."+l.name])}}function H(s,C){if(1&s){const o=e.RV6();e.qex(0),e.j41(1,"a",35),e.bIt("click",function(){e.eBV(o);const m=e.XpG(3).$implicit,v=e.XpG(3);return e.Njj(v.removeSingleNestedItem(m))}),e.nrm(2,"i",36),e.k0s(),e.DNE(3,z,3,4,"div",14),e.bVm()}if(2&s){const o=e.XpG(3).$implicit,l=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",l.nestedEntityManifests[o.name].properties)}}function Z(s,C){if(1&s&&(e.qex(0),e.DNE(1,J,5,2,"div",31)(2,H,4,1,"ng-container",0),e.bVm()),2&s){const o=e.XpG(2).$implicit,l=e.XpG(3);e.R7$(),e.Y8G("ngIf",!l.getSingleRelation(o.name)),e.R7$(),e.Y8G("ngIf",l.getSingleRelation(o.name))}}function p(s,C){if(1&s){const o=e.RV6();e.j41(0,"button",28),e.bIt("click",function(){e.eBV(o);const m=e.XpG(3).$implicit,v=e.XpG(3);return e.Njj(v.addNestedItem(m))}),e.j41(1,"span",29),e.nrm(2,"i",30),e.EFF(3,"- "),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()()}if(2&s){const o=e.XpG(3).$implicit;e.R7$(5),e.SpI("Add ",o.entity,"")}}function E(s,C){if(1&s&&(e.qex(0),e.j41(1,"div",32),e.DNE(2,p,6,1,"button",27),e.k0s(),e.bVm()),2&s){const o=e.XpG(2).$implicit,l=e.XpG(3);e.R7$(2),e.Y8G("ngIf","one-to-one"===o.type||null===l.getSingleRelation(o.name))}}function r(s,C){if(1&s&&(e.j41(0,"div",32)(1,"p",33),e.EFF(2),e.k0s(),e.j41(3,"p",34),e.EFF(4),e.k0s()()),2&s){const o=e.XpG(3).$implicit;e.R7$(2),e.SpI(" No ",o.name," yet. "),e.R7$(2),e.SpI(' Click on "Add ',o.entity,'" to add the first item. ')}}function f(s,C){if(1&s){const o=e.RV6();e.j41(0,"div",15)(1,"div",16)(2,"app-input",17),e.bIt("valueChanged",function(m){const v=e.eBV(o).$implicit,u=e.XpG().index,y=e.XpG(3).$implicit,F=e.XpG(3);return e.Njj(F.onNestedItemChange({relationship:y,propName:v.name,index:u,newValue:m}))}),e.k0s()()()}if(2&s){let o;const l=C.$implicit,m=e.XpG(),v=m.$implicit,u=m.index,y=e.XpG(3).$implicit,F=e.XpG(3);e.R7$(2),e.Y8G("prop",l)("entityManifest",F.nestedEntityManifests[y.name])("value",F.edit?null==(o=v.get(l.name))?null:o.value:null)("errors",F.errors[y.name+"["+u+"]."+l.name])}}function R(s,C){if(1&s){const o=e.RV6();e.j41(0,"div",38)(1,"a",35),e.bIt("click",function(){const m=e.eBV(o).index,v=e.XpG(3).$implicit,u=e.XpG(3);return e.Njj(u.removeNestedItem(v,m))}),e.nrm(2,"i",36),e.k0s(),e.DNE(3,f,3,4,"div",14),e.k0s()}if(2&s){const o=e.XpG(3).$implicit,l=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",l.nestedEntityManifests[o.name].properties)}}function T(s,C){if(1&s&&(e.qex(0),e.DNE(1,r,5,2,"div",31)(2,R,4,1,"div",37),e.bVm()),2&s){const o=e.XpG(2).$implicit,l=e.XpG(3);e.R7$(),e.Y8G("ngIf",0===l.getMultipleRelations(o.name).length),e.R7$(),e.Y8G("ngForOf",l.getMultipleRelations(o.name).controls)}}function P(s,C){if(1&s){const o=e.RV6();e.j41(0,"button",28),e.bIt("click",function(){e.eBV(o);const m=e.XpG(3).$implicit,v=e.XpG(3);return e.Njj(v.addNestedItem(m))}),e.j41(1,"span",29),e.nrm(2,"i",30),e.EFF(3,"- "),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()()}if(2&s){const o=e.XpG(3).$implicit;e.R7$(5),e.SpI("Add ",o.entity,"")}}function q(s,C){if(1&s&&(e.qex(0),e.j41(1,"div",32),e.DNE(2,P,6,1,"button",27),e.k0s(),e.bVm()),2&s){const o=e.XpG(2).$implicit,l=e.XpG(3);e.R7$(2),e.Y8G("ngIf","one-to-one"!==o.type||null===l.getSingleRelation(o.name))}}function ee(s,C){if(1&s&&(e.j41(0,"div",16)(1,"div",20)(2,"div",21)(3,"div")(4,"label"),e.EFF(5),e.k0s(),e.DNE(6,A,2,1,"p",22),e.k0s()(),e.DNE(7,W,2,1,"div",23),e.k0s(),e.j41(8,"div",24),e.DNE(9,Z,3,2,"ng-container",0)(10,E,3,1,"ng-container",0)(11,T,3,2,"ng-container",0)(12,q,3,1,"ng-container",0),e.k0s()()),2&s){const o=e.XpG().$implicit,l=e.XpG(3);e.R7$(5),e.JRh(o.name),e.R7$(),e.Y8G("ngIf",o.helpText),e.R7$(),e.Y8G("ngIf",l.getMultipleRelations(o.name).length>0),e.R7$(),e.Y8G("ngClass",e.eq3(8,N,"one-to-one"===o.type||0===l.getMultipleRelations(o.name).length)),e.R7$(),e.Y8G("ngIf","one-to-one"===o.type),e.R7$(),e.Y8G("ngIf",!l.getSingleRelation(o.name)),e.R7$(),e.Y8G("ngIf","one-to-one"!==o.type),e.R7$(),e.Y8G("ngIf",0===l.getMultipleRelations(o.name).length)}}function te(s,C){if(1&s&&(e.j41(0,"div",15),e.DNE(1,ee,13,10,"div",18),e.k0s()),2&s){const o=C.$implicit;e.R7$(),e.Y8G("ngIf",o.nested)}}function ne(s,C){if(1&s&&(e.j41(0,"form",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13),e.DNE(5,U,3,4,"div",14)(6,V,2,1,"div",14)(7,te,2,1,"div",14),e.k0s()()()()()),2&s){const o=e.XpG(2);e.Y8G("formGroup",o.form),e.R7$(5),e.Y8G("ngForOf",o.entityManifest.properties),e.R7$(),e.Y8G("ngForOf",o.entityManifest.relationships),e.R7$(),e.Y8G("ngForOf",o.entityManifest.relationships)}}function ie(s,C){if(1&s){const o=e.RV6();e.qex(0),e.j41(1,"section")(2,"div",1)(3,"div",2)(4,"h1",3),e.DNE(5,S,3,2,"ng-container",0)(6,w,2,1,"ng-container",0),e.k0s()(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){e.eBV(o);const m=e.XpG();return e.Njj(m.submit())}),e.EFF(9," Submit "),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){e.eBV(o);const m=e.XpG();return e.Njj(m.submit())}),e.nrm(11,"i",7),e.k0s()()(),e.DNE(12,ne,8,4,"form",8),e.k0s(),e.bVm()}if(2&s){const o=e.XpG();e.R7$(5),e.Y8G("ngIf",o.edit),e.R7$(),e.Y8G("ngIf",!o.edit),e.R7$(2),e.Y8G("ngClass",e.eq3(5,j,o.loading)),e.R7$(2),e.Y8G("ngClass",e.eq3(7,j,o.loading)),e.R7$(2),e.Y8G("ngIf",o.item||!o.edit)}}let oe=(()=>{class s{constructor(o,l,m,v,u,y,F){this.crudService=o,this.manifestService=l,this.activatedRoute=m,this.router=v,this.formBuilder=u,this.metaService=y,this.flashMessageService=F,this.nestedEntityManifests={},this.errors={},this.form=this.formBuilder.group({}),this.PropType=n.Kk}ngOnInit(){var o=this;return(0,h.A)(function*(){(0,t.z)([o.activatedRoute.params,o.activatedRoute.data]).subscribe(function(){var l=(0,h.A)(function*([m,v]){if(o.edit=v.edit,o.entityManifest=yield o.manifestService.getEntityManifest({slug:m.entitySlug}),o.entityManifest||o.router.navigate(["/404"]),o.singleMode="single"===o.activatedRoute.snapshot.data.mode,o.edit){try{o.item=o.singleMode?yield o.crudService.showSingle(o.entityManifest.slug):yield o.crudService.show(o.entityManifest.slug,m.id,{relations:o.entityManifest.relationships.filter(u=>"one-to-many"!==u.type).filter(u=>"many-to-many"!==u.type||u.owningSide).map(u=>u.name)})}catch{o.router.navigate(["/404"])}o.metaService.setTitle(`Edit ${o.entityManifest.nameSingular}`)}else o.metaService.setTitle(`Create a new ${o.entityManifest.nameSingular}`);o.entityManifest.properties.forEach(u=>{let y=null;o.item?y=o.item[u.name]:u.type===n.Kk.Boolean&&(y=!1),o.form.addControl(u.name,new M.MJ(y))}),o.entityManifest.relationships.filter(u=>"one-to-many"!==u.type&&"one-to-one"!==u.type).filter(u=>"many-to-many"!==u.type||u.owningSide).forEach(u=>{let y=null;"many-to-one"===u.type?y=o.item?o.item[u.name]?.id:null:"many-to-many"===u.type&&(y=o.item?o.item[u.name].map(F=>F.id):[]),o.form.addControl((0,$.yk)(u),new M.MJ(y))}),o.entityManifest.relationships.filter(u=>u.nested).forEach(function(){var u=(0,h.A)(function*(y){const F="one-to-one"!==y.type,ae=yield o.manifestService.getEntityManifest({className:y.entity});o.nestedEntityManifests[y.name]=ae,o.form.addControl(y.name,F?o.formBuilder.array([]):o.formBuilder.group({})),o.edit&&o.item[y.name]&&(Array.isArray(o.item[y.name])?o.item[y.name].forEach(se=>{o.addNestedItem(y,se)}):o.addNestedItem(y,o.item[y.name]))});return function(y){return u.apply(this,arguments)}}())});return function(m){return l.apply(this,arguments)}}())})()}onChange(o){this.form.controls[o.propName].setValue(o.newValue)}onRelationChange(o){return this.onChange({newValue:o.newValue,propName:(0,$.yk)(o.relationship)})}onNestedItemChange(o){let l;l=void 0===o.index?this.form.get(o.relationship.name):this.getMultipleRelations(o.relationship.name).at(o.index),l.controls[o.propName].setValue(o.newValue)}submit(){const o=this.form.value;Object.entries(o).forEach(([l,m])=>{"object"==typeof m&&"{}"===JSON.stringify(m)&&(o[l]=null)}),this.loading=!0,this.edit?(this.singleMode?this.crudService.updateSingle(this.entityManifest.slug,o):this.crudService.update(this.entityManifest.slug,this.item.id,o)).then(()=>{this.loading=!1,this.flashMessageService.success(`The ${this.entityManifest.nameSingular} has been updated`),this.router.navigate([this.singleMode?"/singles":"/collections",this.entityManifest.slug])}).catch(m=>{400===m.status&&(this.errors=this.getErrorMessages(m.error)),this.loading=!1,this.flashMessageService.error(`The ${this.entityManifest.nameSingular} could not be updated`)}):this.crudService.create(this.entityManifest.slug,this.form.value).then(l=>{this.loading=!1,this.flashMessageService.success(`The ${this.entityManifest.nameSingular} has been created successfully`),this.router.navigate(["/collections",this.entityManifest.slug,l.id])}).catch(l=>{400===l.status&&(this.errors=this.getErrorMessages(l.error)),this.loading=!1,this.flashMessageService.error(`Error: the ${this.entityManifest.nameSingular} could not be created:\n ${Object.values(this.errors).join(", ")}\n `)})}addNestedItem(o,l){var m=this;return(0,h.A)(function*(){const v=yield m.createNestedItemFormGroup(o,l);return l&&l.id&&v.addControl("id",new M.MJ(l.id)),"one-to-one"!==o.type?void m.form.get(o.name).push(v):void m.form.setControl(o.name,v)})()}createNestedItemFormGroup(o,l){var m=this;return(0,h.A)(function*(){const v=yield m.manifestService.getEntityManifest({className:o.entity}),u=m.formBuilder.group({});return v.properties.forEach(y=>{u.addControl(y.name,new M.MJ(l?l[y.name]:null))}),u})()}removeNestedItem(o,l){this.form.get(o.name).removeAt(l)}removeSingleNestedItem(o){this.form.setControl(o.name,this.formBuilder.group({}))}getMultipleRelations(o){return this.form.get(o)}getSingleRelation(o){return"{}"===JSON.stringify(this.form.get(o).value)?null:this.form.get(o)}getErrorMessages(o){const l={};return o.forEach(m=>{l[m.property]=Object.values(m.constraints)}),l}static{this.\u0275fac=function(l){return new(l||s)(e.rXU(b.m),e.rXU(Y.x),e.rXU(G.nX),e.rXU(G.Ix),e.rXU(M.ok),e.rXU(O.R),e.rXU(I.L))}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-create-edit"]],decls:1,vars:1,consts:[[4,"ngIf"],[1,"is-flex","is-justify-content-space-between","is-align-items-center","mb-5"],[1,"left-part"],[1,"title","is-2","has-text-weight-light"],[1,"right-part"],["type","submit",1,"button","is-link","is-hidden-touch",3,"click","ngClass"],["type","submit",1,"button","is-link","is-hidden-desktop","is-circle",3,"click","ngClass"],[1,"icon","icon-save"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"card","is-shadowless","p-4"],[1,"columns"],[1,"column","is-12-touch","is-8-desktop","is-offset-2-desktop","is-6-widescreen","is-offset-3-widescreen","is-6-fullhd","is-offset-3-fullhd"],[1,"form-group"],["class","field mt-2 mb-4",4,"ngFor","ngForOf"],[1,"field","mt-2","mb-4"],[1,"control"],[3,"valueChanged","prop","entityManifest","value","errors"],["class","control",4,"ngIf"],[3,"valueChanged","relationship","value","errors"],[1,"level","mb-0"],[1,"level-left"],["class","help",4,"ngIf"],["class","level-right",4,"ngIf"],[1,"box","is-shadowless","mb-0",3,"ngClass"],[1,"help"],[1,"level-right"],["class","button is-dark is-small has-icon","type","button",3,"click",4,"ngIf"],["type","button",1,"button","is-dark","is-small","has-icon",3,"click"],[1,"icon","is-small"],[1,"icon","icon-plus"],["class","has-text-centered is-fullwidth",4,"ngIf"],[1,"has-text-centered","is-fullwidth"],[1,"is-size-5","has-text-weight-bold"],[1,"mb-4"],[1,"is-inline-flex","is-fullwidth","has-text-dark","is-justify-content-flex-end",3,"click"],[1,"icon","icon-trash-2"],["class","box is-shadowless is-bordered p-5 nested-item",4,"ngFor","ngForOf"],[1,"box","is-shadowless","is-bordered","p-5","nested-item"]],template:function(l,m){1&l&&e.DNE(0,ie,13,9,"ng-container",0),2&l&&e.Y8G("ngIf",m.entityManifest)},dependencies:[x.YU,x.Sq,x.bT,M.qT,M.cb,M.j4,k.S]})}}return s})()},992:(Q,D,d)=>{d.d(D,{R:()=>Z});var h=d(7431),M=d(9e3),n=d(8284),t=d(6119),$=d(2283),e=d(183),b=d(9879),Y=d(2943),G=d(6631),O=d(8785);const I=p=>["/collections",p];function x(p,E){if(1&p&&(n.j41(0,"a",17),n.nrm(1,"i",18),n.k0s()),2&p){const r=n.XpG(2);n.Y8G("routerLink",n.eq3(1,I,r.entityManifest.namePlural))}}function k(p,E){if(1&p&&(n.j41(0,"div",19)(1,"p",20),n.EFF(2),n.k0s(),n.j41(3,"p",21),n.nrm(4,"app-yield",22),n.k0s()()),2&p){const r=E.$implicit,f=n.XpG(2);n.R7$(2),n.SpI(" ",r.name," "),n.R7$(2),n.Y8G("value",f.item[r.name])("prop",r)}}function j(p,E){if(1&p&&n.nrm(0,"app-relation-yield",25),2&p){const r=n.XpG(2).$implicit,f=n.XpG(2);n.Y8G("item",f.item[r.name])("relationship",r)}}function N(p,E){1&p&&(n.qex(0),n.EFF(1,", "),n.bVm())}function B(p,E){if(1&p&&(n.qex(0),n.nrm(1,"app-relation-yield",25),n.DNE(2,N,2,0,"ng-container",0),n.bVm()),2&p){const r=E.$implicit,f=E.last,R=n.XpG(3).$implicit;n.R7$(),n.Y8G("item",r)("relationship",R),n.R7$(),n.Y8G("ngIf",!f)}}function X(p,E){if(1&p&&(n.qex(0),n.DNE(1,B,3,3,"ng-container",26),n.bVm()),2&p){const r=n.XpG(2).$implicit,f=n.XpG(2);n.R7$(),n.Y8G("ngForOf",f.getMultipleRelations(f.item,r))}}function S(p,E){if(1&p&&(n.qex(0),n.j41(1,"p",20),n.EFF(2),n.k0s(),n.j41(3,"p",21),n.DNE(4,j,1,2,"app-relation-yield",24)(5,X,2,1,"ng-container",0),n.k0s(),n.bVm()),2&p){const r=n.XpG().$implicit;n.R7$(2),n.SpI(" ",r.name," "),n.R7$(2),n.Y8G("ngIf","many-to-one"===r.type),n.R7$(),n.Y8G("ngIf","many-to-many"===r.type)}}function w(p,E){1&p&&(n.j41(0,"p"),n.EFF(1,"-"),n.k0s())}function U(p,E){if(1&p&&(n.j41(0,"div",19)(1,"p",20),n.EFF(2),n.k0s(),n.j41(3,"p",21),n.nrm(4,"app-yield",22),n.k0s()()),2&p){const r=E.$implicit,f=n.XpG().$implicit;n.R7$(2),n.SpI(" ",r.name," "),n.R7$(2),n.Y8G("value",f[r.name])("prop",r)}}function L(p,E){if(1&p&&(n.j41(0,"div",29)(1,"div",30),n.DNE(2,U,5,3,"div",15),n.k0s()()),2&p){const r=n.XpG(2).$implicit,f=n.XpG(2);n.R7$(2),n.Y8G("ngForOf",f.nestedEntityManifests[r.name].properties)}}function V(p,E){if(1&p&&(n.qex(0),n.j41(1,"p",20),n.EFF(2),n.k0s(),n.DNE(3,w,2,0,"p",0),n.j41(4,"div",27),n.DNE(5,L,3,1,"div",28),n.k0s(),n.bVm()),2&p){const r=n.XpG().$implicit,f=n.XpG(2);n.R7$(2),n.SpI(" ",r.name," "),n.R7$(),n.Y8G("ngIf",!f.getMultipleRelations(f.item,r).length),n.R7$(2),n.Y8G("ngForOf",f.getMultipleRelations(f.item,r))}}function A(p,E){1&p&&(n.j41(0,"p"),n.EFF(1,"-"),n.k0s())}function K(p,E){if(1&p&&(n.j41(0,"div",19)(1,"p",20),n.EFF(2),n.k0s(),n.j41(3,"p",21),n.nrm(4,"app-yield",22),n.k0s()()),2&p){const r=E.$implicit,f=n.XpG(3).$implicit,R=n.XpG(2);n.R7$(2),n.SpI(" ",r.name," "),n.R7$(2),n.Y8G("value",R.getSingleRelation(R.item,f)[r.name])("prop",r)}}function W(p,E){if(1&p&&(n.j41(0,"div",29)(1,"div",30),n.DNE(2,K,5,3,"div",15),n.k0s()()),2&p){const r=n.XpG(2).$implicit,f=n.XpG(2);n.R7$(2),n.Y8G("ngForOf",f.nestedEntityManifests[r.name].properties)}}function J(p,E){if(1&p&&(n.qex(0),n.j41(1,"p",20),n.EFF(2),n.k0s(),n.DNE(3,A,2,0,"p",0),n.j41(4,"div",27),n.DNE(5,W,3,1,"div",31),n.k0s(),n.bVm()),2&p){const r=n.XpG().$implicit,f=n.XpG(2);n.R7$(2),n.SpI(" ",r.name," "),n.R7$(),n.Y8G("ngIf",!f.item[r.name]),n.R7$(2),n.Y8G("ngIf",f.item[r.name])}}function z(p,E){if(1&p&&(n.j41(0,"div",23),n.DNE(1,S,6,3,"ng-container",0)(2,V,6,3,"ng-container",0)(3,J,6,3,"ng-container",0),n.k0s()),2&p){const r=E.$implicit;n.R7$(),n.Y8G("ngIf","many-to-one"===r.type||"many-to-many"===r.type&&r.owningSide&&!r.nested),n.R7$(),n.Y8G("ngIf",r.nested&&"one-to-many"===r.type),n.R7$(),n.Y8G("ngIf",r.nested&&"one-to-one"===r.type)}}function H(p,E){if(1&p&&(n.j41(0,"section")(1,"div",1)(2,"div",2),n.DNE(3,x,2,3,"a",3),n.j41(4,"h1",4),n.EFF(5),n.k0s()(),n.j41(6,"div",5)(7,"a",6),n.nrm(8,"i",7),n.k0s(),n.j41(9,"a",8),n.EFF(10,"Edit "),n.k0s(),n.j41(11,"a",9),n.nrm(12,"i",10),n.k0s()()(),n.j41(13,"div",11)(14,"div",12)(15,"div",13)(16,"div",14),n.DNE(17,k,5,3,"div",15)(18,z,4,3,"div",16),n.k0s()()()()()),2&p){const r=n.XpG();n.R7$(3),n.Y8G("ngIf",!r.entityManifest.single),n.R7$(2),n.SpI(" ",r.singleMode?r.entityManifest.nameSingular:r.item[r.entityManifest.mainProp]," "),n.R7$(12),n.Y8G("ngForOf",r.entityManifest.properties),n.R7$(),n.Y8G("ngForOf",r.entityManifest.relationships)}}let Z=(()=>{class p{constructor(r,f,R,T,P){this.crudService=r,this.manifestService=f,this.activatedRoute=R,this.metaService=T,this.router=P,this.nestedEntityManifests={}}ngOnInit(){var r=this;this.activatedRoute.params.subscribe(function(){var f=(0,h.A)(function*(R){if(r.entityManifest=yield r.manifestService.getEntityManifest({slug:R.entitySlug}),r.entityManifest.relationships)for(const T of r.entityManifest.relationships)if(T.nested){const P=yield r.manifestService.getEntityManifest({className:T.entity});r.nestedEntityManifests[T.name]=P}r.entityManifest||r.router.navigate(["/404"]),r.singleMode="single"===r.activatedRoute.snapshot.data.mode;try{r.item=r.singleMode?yield r.crudService.showSingle(r.entityManifest.slug):yield r.crudService.show(r.entityManifest.slug,R.id,{relations:r.entityManifest.relationships?.filter(T=>"one-to-many"!==T.type).filter(T=>"many-to-many"!==T.type||T.owningSide).map(T=>T.name)})}catch{r.router.navigate(["/404"])}r.metaService.setTitle((new M.X).transform(r.entityManifest.nameSingular))});return function(R){return f.apply(this,arguments)}}())}getMultipleRelations(r,f){return r[f.name]}getSingleRelation(r,f){return r[f.name]}static{this.\u0275fac=function(f){return new(f||p)(n.rXU(t.m),n.rXU($.x),n.rXU(e.nX),n.rXU(b.R),n.rXU(e.Ix))}}static{this.\u0275cmp=n.VBU({type:p,selectors:[["app-detail"]],decls:1,vars:1,consts:[[4,"ngIf"],[1,"is-flex","is-justify-content-space-between","is-align-items-center","mb-5"],[1,"left-part","is-flex","is-flex-wrap-wrap","is-align-items-center"],["class","button is-circle mr-2 button--back",3,"routerLink",4,"ngIf"],[1,"title","is-2","has-text-weight-light"],[1,"right-part","is-flex","is-flex-direction-row"],[1,"button","is-link","is-light","is-hidden-desktop","is-circle"],[1,"icon","icon-trash-2"],["routerLink","edit",1,"button","is-link","ml-2","is-hidden-touch"],["routerLink","edit",1,"button","is-link","ml-2","is-hidden-desktop","is-circle"],[1,"icon","icon-edit"],[1,"card","p-0","mb-6","is-shadowless"],[1,"card-content"],[1,"columns"],[1,"column","is-12-touch","is-8-desktop","is-offset-2-desktop","is-6-widescreen","is-offset-3-widescreen","is-6-fullhd","is-offset-3-fullhd"],["class","properties",4,"ngFor","ngForOf"],["class","relations",4,"ngFor","ngForOf"],[1,"button","is-circle","mr-2","button--back",3,"routerLink"],[1,"icon","icon-arrow-right"],[1,"properties"],[1,"is-property-label","mb-1","is-size-5","has-text-dark","has-text-weight-medium"],[1,"is-property-value"],[3,"value","prop"],[1,"relations"],[3,"item","relationship",4,"ngIf"],[3,"item","relationship"],[4,"ngFor","ngForOf"],[1,"group-wrapper","pl-5"],["class","nested-item",4,"ngFor","ngForOf"],[1,"nested-item"],[1,"box","is-shadowless","is-bordered","p-5","mb-5"],["class","nested-item",4,"ngIf"]],template:function(f,R){1&f&&n.DNE(0,H,19,4,"section",0),2&f&&n.Y8G("ngIf",R.item&&R.entityManifest)},dependencies:[Y.Sq,Y.bT,e.Wk,G.L,O.x],styles:['@import"https://fonts.googleapis.com/css?family=Rubik:300,400,400i,500";.properties[_ngcontent-%COMP%] + div[_ngcontent-%COMP%], .relations[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{margin-top:16px}@media screen and (min-width: 1000px){.card.is-single-card[_ngcontent-%COMP%]{padding-right:25%!important;padding-left:25%!important}}@media screen and (min-width: 1458px){.card.is-single-card[_ngcontent-%COMP%]{padding-right:33%!important;padding-left:33%!important}}.group-wrapper[_ngcontent-%COMP%]{position:relative;overflow:hidden}.group-wrapper[_ngcontent-%COMP%]:before{position:absolute;left:0;top:-1px;width:2rem;height:2rem;display:inline-block;background-image:url(dot.a0723848e2d7f38a.svg);background-repeat:repeat-y;content:""}.nested-item[_ngcontent-%COMP%]{position:relative}.nested-item[_ngcontent-%COMP%]:before{content:"";position:absolute;left:-2rem;width:2rem;display:inline-block;background-image:url(dot.a0723848e2d7f38a.svg);background-repeat:repeat-y}.nested-item[_ngcontent-%COMP%]:not(:last-child):before{bottom:calc(-4rem - 3px);height:calc(100% + 2rem)}.nested-item[_ngcontent-%COMP%]:after{content:"";position:absolute;top:calc(2rem - 1px);left:-2rem;width:2rem;height:4px;display:inline-block;background-image:url(dot.a0723848e2d7f38a.svg);background-repeat:repeat-x}']})}}return p})()},8785:(Q,D,d)=>{d.d(D,{x:()=>Y});var h=d(2943),M=d(183),n=d(8284),t=d(2283);const $=(G,O)=>["/","collections",G,O];function e(G,O){if(1&G&&(n.j41(0,"a",2)(1,"span"),n.EFF(2),n.k0s()()),2&G){const I=n.XpG();n.Y8G("routerLink",n.l_i(2,$,I.entityManifest.slug,I.item.id)),n.R7$(2),n.JRh(I.item[I.entityManifest.mainProp])}}function b(G,O){1&G&&(n.j41(0,"span"),n.EFF(1,"-"),n.k0s())}let Y=(()=>{class G{constructor(I){this.manifestService=I}ngOnInit(){this.manifestService.getEntityManifest({className:this.relationship.entity}).then(I=>{this.entityManifest=I})}static{this.\u0275fac=function(x){return new(x||G)(n.rXU(t.x))}}static{this.\u0275cmp=n.VBU({type:G,selectors:[["app-relation-yield"]],inputs:{item:"item",relationship:"relationship"},standalone:!0,features:[n.aNF],decls:2,vars:2,consts:[[3,"routerLink",4,"ngIf"],[4,"ngIf"],[3,"routerLink"]],template:function(x,k){1&x&&n.DNE(0,e,3,5,"a",0)(1,b,2,0,"span",1),2&x&&(n.Y8G("ngIf",k.item&&k.entityManifest),n.R7$(),n.Y8G("ngIf",!k.item||!k.entityManifest))},dependencies:[M.iI,M.Wk,h.MD,h.bT]})}}return G})()},6631:(Q,D,d)=>{d.d(D,{L:()=>me});var h=d(2943),M=d(5442),n=function(i){return i[i.Text=0]="Text",i[i.Number=1]="Number",i[i.Link=2]="Link",i[i.Currency=3]="Currency",i[i.Date=4]="Date",i[i.Boolean=5]="Boolean",i[i.Email=6]="Email",i[i.ProgressBar=7]="ProgressBar",i[i.Label=8]="Label",i[i.Location=9]="Location",i}(n||{}),t=d(8284);function $(i,g){1&i&&(t.j41(0,"span"),t.nrm(1,"i",1),t.k0s())}function e(i,g){1&i&&(t.j41(0,"span"),t.EFF(1," - "),t.k0s())}let b=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-boolean-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:3,vars:2,consts:[[4,"ngIf"],[1,"icon","icon-check-circle","has-text-success"]],template:function(_,c){1&_&&(t.j41(0,"div"),t.DNE(1,$,2,0,"span",0)(2,e,2,0,"span",0),t.k0s()),2&_&&(t.R7$(),t.Y8G("ngIf",c.value),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.MD,h.bT]})}}return i})();function Y(i,g){if(1&i&&(t.j41(0,"span",1),t.EFF(1),t.nI1(2,"currency"),t.k0s()),2&i){const a=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,a.value,a.currency),"")}}function G(i,g){1&i&&(t.j41(0,"span",1),t.EFF(1," - "),t.k0s())}let O=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-currency-yield"]],inputs:{value:"value",currency:"currency"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["class","is-nowrap",4,"ngIf"],[1,"is-nowrap"]],template:function(_,c){1&_&&t.DNE(0,Y,3,4,"span",0)(1,G,2,0,"span",0),2&_&&(t.Y8G("ngIf",c.value),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.bT,h.oe]})}}return i})();function I(i,g){1&i&&(t.j41(0,"span",0),t.EFF(1," - "),t.k0s())}let x=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-date-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:4,vars:5,consts:[[1,"is-nowrap"],["class","is-nowrap",4,"ngIf"]],template:function(_,c){1&_&&(t.j41(0,"span",0),t.EFF(1),t.nI1(2,"date"),t.k0s(),t.DNE(3,I,2,0,"span",1)),2&_&&(t.R7$(),t.JRh(t.i5U(2,2,c.value,"MM/dd/yy")),t.R7$(2),t.Y8G("ngIf",!c.value))},dependencies:[h.vh,h.bT]})}}return i})(),k=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-email-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:3,vars:1,consts:[[1,"yield"],[1,"yield__value"]],template:function(_,c){1&_&&(t.j41(0,"div",0)(1,"div",1),t.EFF(2),t.k0s()()),2&_&&(t.R7$(2),t.JRh(c.value))}})}}return i})();function j(i,g){if(1&i&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&i){const a=t.XpG();t.ZvI("tag is-rounded is-color-",a.index,""),t.R7$(),t.JRh(a.value)}}function N(i,g){1&i&&(t.j41(0,"span"),t.EFF(1,"-"),t.k0s())}let B=(()=>{class i{ngOnInit(){this.index=this.values.indexOf(this.value)}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-label-yield"]],inputs:{value:"value",values:"values"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[[3,"class",4,"ngIf"],[4,"ngIf"]],template:function(_,c){1&_&&t.DNE(0,j,2,4,"span",0)(1,N,2,0,"span",1),2&_&&(t.Y8G("ngIf",c.value),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.MD,h.bT],styles:[".is-color-3[_ngcontent-%COMP%]{background-color:#f50057;color:#fff}.is-color-1[_ngcontent-%COMP%]{background-color:#ff6d00;color:#fff}.is-color-2[_ngcontent-%COMP%]{background-color:#ffd600;color:#000}.is-color-4[_ngcontent-%COMP%]{background-color:#d500f9;color:#fff}.is-color-5[_ngcontent-%COMP%]{background-color:#651fff;color:#fff}.is-color-6[_ngcontent-%COMP%]{background-color:#3d5afe;color:#fff}.is-color-7[_ngcontent-%COMP%]{background-color:#00b0ff;color:#fff}.is-color-8[_ngcontent-%COMP%]{background-color:#00c853;color:#fff}.is-color-9[_ngcontent-%COMP%]{background-color:#64dd17;color:#000}.is-color-10[_ngcontent-%COMP%]{background-color:#a1887f;color:#fff}.is-color-11[_ngcontent-%COMP%]{background-color:#607d8b;color:#fff}.is-color-12[_ngcontent-%COMP%]{background-color:#9e9e9e;color:#fff}"]})}}return i})(),X=(()=>{class i{transform(a,_){return a?.length>_?a.substring(0,_)+"...":a}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275pipe=t.EJ8({name:"truncate",type:i,pure:!0,standalone:!0})}}return i})();const S=(i,g)=>({"icon-external-link":i,"icon-download":g});function w(i,g){if(1&i&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"truncate"),t.k0s()),2&i){const a=t.XpG(2);t.R7$(),t.JRh(t.i5U(2,1,a.value,44))}}function U(i,g){if(1&i&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&i){const a=t.XpG(2);t.R7$(),t.JRh(a.value)}}function L(i,g){if(1&i&&(t.j41(0,"a",2),t.nrm(1,"i",3),t.DNE(2,w,3,4,"span",4)(3,U,2,1,"span",4),t.k0s()),2&i){const a=t.XpG();t.Y8G("href",a.value,t.B4B)("download",a.isDownload),t.R7$(),t.Y8G("ngClass",t.l_i(5,S,!a.isDownload,a.isDownload)),t.R7$(),t.Y8G("ngIf",a.compact),t.R7$(),t.Y8G("ngIf",!a.compact)}}function V(i,g){1&i&&(t.j41(0,"span",5),t.EFF(1," - "),t.k0s())}let A=(()=>{class i{constructor(){this.compact=!0,this.isDownload=!1}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-link-yield"]],inputs:{value:"value",compact:"compact",isDownload:"isDownload"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["target","_blank","class","is-inline-flex is-align-items-center",3,"href","download",4,"ngIf"],["class","is-nowrap",4,"ngIf"],["target","_blank",1,"is-inline-flex","is-align-items-center",3,"href","download"],[1,"icon","icon-external-link","mr-1",3,"ngClass"],[4,"ngIf"],[1,"is-nowrap"]],template:function(_,c){1&_&&t.DNE(0,L,4,8,"a",0)(1,V,2,0,"span",1),2&_&&(t.Y8G("ngIf",c.value),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.bT,h.YU,X]})}}return i})();function K(i,g){if(1&i&&(t.j41(0,"a",2),t.nrm(1,"i",3),t.j41(2,"span"),t.EFF(3,"View on map"),t.k0s()()),2&i){const a=t.XpG();t.FCK("href","https://www.openstreetmap.org/?mlat=",a.value.lat,"&mlon=",a.value.lng,"",t.B4B)}}function W(i,g){1&i&&(t.j41(0,"span"),t.EFF(1,"-"),t.k0s())}let J=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-location-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["target","_blank",3,"href",4,"ngIf"],[4,"ngIf"],["target","_blank",3,"href"],[1,"icon","icon-map-pin","mr-1"]],template:function(_,c){1&_&&t.DNE(0,K,4,3,"a",0)(1,W,2,0,"span",1),2&_&&(t.Y8G("ngIf",(null==c.value?null:c.value.lat)&&(null==c.value?null:c.value.lng)),t.R7$(),t.Y8G("ngIf",!(null!=c.value&&c.value.lat&&null!=c.value&&c.value.lng)))},dependencies:[h.bT]})}}return i})();function z(i,g){if(1&i&&(t.j41(0,"span",1),t.EFF(1),t.k0s()),2&i){const a=t.XpG();t.R7$(),t.SpI(" ",a.value," ")}}function H(i,g){1&i&&(t.j41(0,"span",1),t.EFF(1," - "),t.k0s())}let Z=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-number-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["class","is-nowrap",4,"ngIf"],[1,"is-nowrap"]],template:function(_,c){1&_&&t.DNE(0,z,2,1,"span",0)(1,H,2,0,"span",0),2&_&&(t.Y8G("ngIf",null!==c.value),t.R7$(),t.Y8G("ngIf",null===c.value))},dependencies:[h.bT]})}}return i})();function p(i,g){1&i&&t.nrm(0,"span",4)}function E(i,g){1&i&&t.nrm(0,"span",5)}function r(i,g){if(1&i&&(t.qex(0),t.DNE(1,p,1,0,"span",2)(2,E,1,0,"span",3),t.bVm()),2&i){const a=g.index,_=t.XpG();t.R7$(),t.Y8G("ngIf",_.index>=a),t.R7$(),t.Y8G("ngIf",_.index<a)}}let f=(()=>{class i{constructor(){this.enumAsArray=[]}ngOnInit(){this.index=this.values.indexOf(this.value)}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-progress-bar-yield"]],inputs:{value:"value",values:"values"},standalone:!0,features:[t.aNF],decls:2,vars:5,consts:[[1,"is-flex","is-align-items-center","is-white-space-nowrap","tooltip","has-tooltip-left"],[4,"ngFor","ngForOf"],["class","bullet",4,"ngIf"],["class","bullet is-grey",4,"ngIf"],[1,"bullet"],[1,"bullet","is-grey"]],template:function(_,c){1&_&&(t.j41(0,"div",0),t.DNE(1,r,3,2,"ng-container",1),t.k0s()),2&_&&(t.ZvI("is-color-",c.index,""),t.BMQ("data-tooltip",c.value||"Unknown"),t.R7$(),t.Y8G("ngForOf",c.values))},dependencies:[h.MD,h.Sq,h.bT]})}}return i})();function R(i,g){if(1&i&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"truncate"),t.k0s()),2&i){const a=t.XpG();t.R7$(),t.JRh(t.i5U(2,1,a.value,44))}}function T(i,g){if(1&i&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&i){const a=t.XpG();t.R7$(),t.JRh(a.value)}}function P(i,g){1&i&&(t.j41(0,"span"),t.EFF(1," - "),t.k0s())}let q=(()=>{class i{constructor(){this.compact=!0}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-text-yield"]],inputs:{value:"value",compact:"compact"},standalone:!0,features:[t.aNF],decls:3,vars:3,consts:[[4,"ngIf"]],template:function(_,c){1&_&&t.DNE(0,R,3,4,"span",0)(1,T,2,1,"span",0)(2,P,2,0,"span",0),2&_&&(t.Y8G("ngIf",c.compact),t.R7$(),t.Y8G("ngIf",!c.compact),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.MD,h.bT,X]})}}return i})(),ee=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-timestamp-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:3,vars:4,consts:[[1,"is-nowrap"]],template:function(_,c){1&_&&(t.j41(0,"span",0),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&_&&(t.R7$(),t.JRh(t.i5U(2,1,c.value,"yyyy-MM-dd HH:mm:ss")))},dependencies:[h.vh],encapsulation:2})}}return i})();var te=d(7563);function ne(i,g){if(1&i&&t.nrm(0,"img",2),2&i){const a=t.XpG();t.Y8G("src",a.image,t.B4B)}}function ie(i,g){1&i&&(t.j41(0,"span"),t.EFF(1,"-"),t.k0s())}let oe=(()=>{class i{ngOnInit(){if(this.value){const a=(0,te.Gj)(this.sizes);this.image=this.value[a]}}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-image-yield"]],inputs:{value:"value",sizes:"sizes",label:"label"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["alt","image","width","36","height","36",3,"src",4,"ngIf"],[4,"ngIf"],["alt","image","width","36","height","36",3,"src"]],template:function(_,c){1&_&&t.DNE(0,ne,1,1,"img",0)(1,ie,2,0,"span",1),2&_&&(t.Y8G("ngIf",c.image),t.R7$(),t.Y8G("ngIf",!c.image))},dependencies:[h.bT],encapsulation:2})}}return i})();function s(i,g){if(1&i&&(t.j41(0,"div",2)(1,"div",3),t.nrm(2,"div",4),t.k0s()()),2&i){const a=t.XpG();t.R7$(2),t.Y8G("innerHTML",a.value,t.npT)}}function C(i,g){1&i&&(t.j41(0,"span"),t.EFF(1,"-"),t.k0s())}let o=(()=>{class i{static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-rich-text-yield"]],inputs:{value:"value"},standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["class","wrapper",4,"ngIf"],[4,"ngIf"],[1,"wrapper"],[1,"content","is-normal"],[3,"innerHTML"]],template:function(_,c){1&_&&t.DNE(0,s,3,1,"div",0)(1,C,2,0,"span",1),2&_&&(t.Y8G("ngIf",c.value),t.R7$(),t.Y8G("ngIf",!c.value))},dependencies:[h.bT],styles:['@import"https://fonts.googleapis.com/css?family=Rubik:300,400,400i,500";.wrapper[_ngcontent-%COMP%]{border:1px solid #dddde2;background-color:#fff;padding:32px;border-radius:6px}.content[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:4px solid #39393c;background-color:#fff}']})}}return i})();function l(i,g){if(1&i&&t.nrm(0,"app-text-yield",6),2&i){const a=t.XpG();t.Y8G("value",a.value)("compact",a.compact)}}function m(i,g){if(1&i&&t.nrm(0,"app-rich-text-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function v(i,g){if(1&i&&t.nrm(0,"app-number-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function u(i,g){if(1&i&&t.nrm(0,"app-link-yield",8),2&i){const a=t.XpG();t.Y8G("value",a.value)("isDownload",a.prop.type===a.PropType.File)("compact",a.compact)}}function y(i,g){if(1&i&&t.nrm(0,"app-boolean-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function F(i,g){if(1&i&&t.nrm(0,"app-currency-yield",9),2&i){const a=t.XpG();t.Y8G("currency",null==a.prop.options?null:a.prop.options.currency)("value",a.value)}}function ae(i,g){if(1&i&&t.nrm(0,"app-date-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function se(i,g){if(1&i&&t.nrm(0,"app-timestamp-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function re(i,g){if(1&i&&t.nrm(0,"app-email-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function le(i,g){if(1&i&&t.nrm(0,"app-label-yield",10),2&i){const a=t.XpG();t.Y8G("values",null==a.prop.options?null:a.prop.options.values)("value",a.value)}}function ce(i,g){if(1&i&&t.nrm(0,"app-progress-bar-yield",10),2&i){const a=t.XpG();t.Y8G("values",null==a.prop.options?null:a.prop.options.values)("value",a.value)}}function _e(i,g){if(1&i&&t.nrm(0,"app-location-yield",7),2&i){const a=t.XpG();t.Y8G("value",a.value)}}function pe(i,g){if(1&i&&t.nrm(0,"app-image-yield",11),2&i){const a=t.XpG();t.Y8G("value",a.value)("sizes",null==a.prop.options?null:a.prop.options.sizes)}}let me=(()=>{class i{constructor(){this.compact=!1,this.PropType=M.Kk,this.YieldType=n}static{this.\u0275fac=function(_){return new(_||i)}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-yield"]],inputs:{prop:"prop",value:"value",compact:"compact"},standalone:!0,features:[t.aNF],decls:13,vars:13,consts:[[3,"value","compact",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value","isDownload","compact",4,"ngIf"],[3,"currency","value",4,"ngIf"],[3,"values","value",4,"ngIf"],[3,"value","sizes",4,"ngIf"],[3,"value","compact"],[3,"value"],[3,"value","isDownload","compact"],[3,"currency","value"],[3,"values","value"],[3,"value","sizes"]],template:function(_,c){1&_&&t.DNE(0,l,1,2,"app-text-yield",0)(1,m,1,1,"app-rich-text-yield",1)(2,v,1,1,"app-number-yield",1)(3,u,1,3,"app-link-yield",2)(4,y,1,1,"app-boolean-yield",1)(5,F,1,2,"app-currency-yield",3)(6,ae,1,1,"app-date-yield",1)(7,se,1,1,"app-timestamp-yield",1)(8,re,1,1,"app-email-yield",1)(9,le,1,2,"app-label-yield",4)(10,ce,1,2,"app-progress-bar-yield",4)(11,_e,1,1,"app-location-yield",1)(12,pe,1,2,"app-image-yield",5),2&_&&(t.Y8G("ngIf",c.prop.type===c.PropType.String||c.prop.type===c.PropType.Text),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.RichText),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Number),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Link||c.prop.type===c.PropType.File),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Boolean),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Money),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Date),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Timestamp),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Email),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Choice&&!0!==(null==c.prop.options?null:c.prop.options.sequential)),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Choice&&!0===(null==c.prop.options?null:c.prop.options.sequential)),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Location),t.R7$(),t.Y8G("ngIf",c.prop.type===c.PropType.Image))},dependencies:[h.MD,h.bT,b,O,x,ee,k,Z,A,q,B,f,J,oe,o],encapsulation:2})}}return i})()}}]);