1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="351112a0-08c8-56b7-a690-f91bae4fe5dd")}catch(e){}}(); 3import{a as X,b as Pe,c as fe,d as ze,e as F,f as he}from"./chunk-J43ZASTM.js";import{c as K,d as Qe}from"./chunk-XS62Q3B7.js";import{a as De,b as Ve}from"./chunk-GVH2IX2A.js";import"./chunk-XPIB65IW.js";import"./chunk-XKGQNJCS.js";import"./chunk-CF5H2NYO.js";import{a as Ce,c as Ke}from"./chunk-MQV5E5DO.js";import"./chunk-BXHIM4XB.js";import"./chunk-LIY5Z5DX.js";import{e as ge,f as Be}from"./chunk-CU67UASS.js";import"./chunk-ZN2SKLCL.js";import{V as J,W as Re,f as Me,g as Se,h as Oe,j as ue,l as Fe}from"./chunk-HCJKPTGM.js";import"./chunk-XES6EBUH.js";import"./chunk-7IZ7IQFS.js";import"./chunk-U2AYKEFN.js";import"./chunk-7OBMBINE.js";import"./chunk-VAXTQMJG.js";import"./chunk-A7N55BD2.js";import"./chunk-X4TOIQZ5.js";import"./chunk-6CAXAEVI.js";import"./chunk-GNDBXVBS.js";import"./chunk-K7DQ2BDA.js";import{c as Te,d as qe,i as pe,j as Le,o as me,p as Je,w as Ae,x as Xe}from"./chunk-TTQKVDQ7.js";import"./chunk-XU2EZIUM.js";import"./chunk-OWUVXM77.js";import"./chunk-LSLVPR72.js";import"./chunk-XPG54CHE.js";import"./chunk-JWWDLNIS.js";import"./chunk-Z2XXL3OC.js";import"./chunk-44QRKRNY.js";import"./chunk-QAM7USJC.js";import"./chunk-QCMZCTJ7.js";import"./chunk-3HOIF7UE.js";import"./chunk-NHBFTOZL.js";import"./chunk-SX3LWQYR.js";import{l as oe,n as w,p as _e}from"./chunk-63XPFYYJ.js";import"./chunk-NDUJ7JZN.js";import"./chunk-AA5DU7ME.js";import"./chunk-KWRIU4RP.js";
3import{f as Ne,m as ve,n as L,o as we}from"./chunk-H7BNAZPX.js";import{b as de,d as Ge}from"./chunk-SUGUVUND.js";import{Ja as re,Ka as se,Ma as ae,Na as Ie,Oa as le,Pa as Ee,Ra as be,Va as ce,Wa as $e}from"./chunk-RTQW647K.js";import"./chunk-UY2AHKUP.js";import{h as q,i as ke}from"./chunk-LADI2IVP.js";import"./chunk-U3IAJHAB.js";import{s as ie,y as Ue}from"./chunk-YA4WYHG7.js";import{Ca as D,Db as s,Fc as P,Gd as M,Hd as S,Ia as c,Ja as T,Lc as I,N as u,Qc as A,Sc as a,Ub as x,Zb as U,ad as k,fd as C,hd as g,k as O,ke as $,mc as b,md as Y,nd as Z,oc as G,od as ee,pd as v,qa as m,qc as f,qd as te,ra as j,rc as h,rd as ne,sc as Q,tc as E,uc as o,vc as _,wc as R,x as W,y as H}from"./chunk-7WH55ISQ.js";import"./chunk-HEWAIBKK.js";import"./chunk-VWJE3CXY.js";import{e as z}from"./chunk-XN77Q2IT.js";function He(i,N){if(i&1){let e=P();o(0,"tr")(1,"td",13),C(2),M(3,"i18nQuestion"),_(),o(4,"td"),C(5),M(6,"i18nQuestionType"),_(),o(7,"td")(8,"mat-checkbox",14),A("click",function(){let n=c(e).$implicit,r=a(2);return T(r.toggle(n.registrationQuestionTemplateIdPk));}),_()()();}if(i&2){let e=N.$implicit,t=a(2);s(2),g(" ",S(3,3,e)," "),s(3),g(" ",S(6,5,e.questionType)," "),s(3),E("checked",t.selection.includes(e.registrationQuestionTemplateIdPk));}}function je(i,N){if(i&1&&(o(0,"tr",11)(1,"td",12),C(2),M(3,"i18nQuestionCategory"),_()(),h(4,He,9,7,"tr",null,f)),i&2){let e=N.$implicit,t=a(),n=k(6);s(),E("colSpan",t.resolveColSpan(n)),s(),g(" ",S(3,2,e.category)," "),s(2),Q(e.questions);}}var ye,xe=z(()=>{"use strict";Ue();$();_e();Ke();be();Re();j();Pe();ze();he();Qe();$();ye=(()=>{class i extends J{constructor(){super(),this.questionService=D(X),this.matDialogRef=D(re),this.data=D(se),this.templates$=this.questionService.templates(),this.selection=[...this.data.selectionIn];}toggle(e){this.selection.includes(e)?this.selection=this.selection.filter(t=>t!==e):this.selection=[...this.selection,e];}save(){this.questionService.saveQuestionnaire(this.data.meetingId,this.selection).pipe(m(()=>{this.ss.infoSaved(),this.matDialogRef.close(!0);}),u(()=>(this.ss.warnSaveFailed(),O)),this.takeOneUntilDestroyed()).subscribe();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=x({type:i,selectors:[["rs-admin-question-picker"]],features:[U],decls:22,vars:2,consts:()=>{let e;e=" Choose questions\n";let t;t=" Question ";let n;n=" Type ";let r;r=" Close ";let l;return l=" Save ",[["headRow",""],e,t,n,r,l,["matDialogTitle",""],[1,"rs-mat-table-compat","rs-ignore-min-width"],["align","end"],["mat-flat-button","","matDialogClose",""],["mat-flat-button","","color","primary",3,"click"],[1,"category-row"],[3,"colSpan"],[2,"padding-left","40px"],["color","primary",3,"click","checked"]];},template:function(t,n){if(t&1){let r=P();o(0,"div",6),I(1,1),_(),o(2,"mat-dialog-content")(3,"table",7)(4,"thead")(5,"tr",null,0)(7,"th"),I(8,2),_(),o(9,"th"),I(10,3),_(),R(11,"th"),_()(),o(12,"tbody"),v(13),M(14,"async"),h(15,je,6,4,null,null,f),_()()(),o(17,"mat-dialog-actions",8)(18,"button",9),I(19,4),_(),o(20,"button",10),A("click",function(){return c(r),T(n.save());}),I(21,5),_()();}if(t&2){let r=S(14,0,n.templates$);s(15),Q(r);}},dependencies:[le,Ie,Ee,w,ae,Ce,ie,K,fe,F],styles:[`.category-row[_ngcontent-%COMP%]{font-weight:500} 4/*# sourceMappingURL=admin-question-picker.component-LQZ6KLOC.css.map */`],changeDetection:0});}}return i;})();});function Ye(i,N){if(i&1){let e=P();v(0),o(1,"tr",15),A("cdkDragDropped",function(n){c(e);let r=a(3);return T(r.dropped(n));}),o(2,"td",16),R(3,"mat-icon",17),_(),o(4,"td",18),C(5),M(6,"i18nQuestion"),_(),o(7,"td"),C(8),M(9,"i18nQuestionType"),_(),o(10,"td",19)(11,"button",20),A("click",function(){c(e);let n=ne(0),r=a(3);return T(r.deleteQuestion(n.registrationQuestionIdPk));}),R(12,"mat-icon",21),_()()();}if(i&2){let e=N.$implicit,t=a(3),n=e.template;te(e.question),s(),E("cdkDragData",e),s(2),E("svgIcon",t.svg.drag_indicator),s(2),g(" ",S(6,6,n)," "),s(3),g(" ",S(9,8,n.questionType)," "),s(4),E("svgIcon",t.svg.delete);}}function Ze(i,N){if(i&1&&(o(0,"tbody",12),h(1,Ye,13,10,"tr",14,f),_()),i&2){let e=a(2);s(),Q(e.questions);}}function et(i,N){if(i&1&&(o(0,"tbody",13)(1,"tr")(2,"td",22),I(3,3),_()()()),i&2){a();let e=k(3),t=a();
4s(2),E("colSpan",t.resolveColSpan(e));}}function tt(i,N){if(i&1&&(o(0,"table",9)(1,"thead",11)(2,"tr",null,0),R(4,"th"),o(5,"th"),I(6,1),_(),o(7,"th"),I(8,2),_(),R(9,"th"),_()(),b(10,Ze,3,0,"tbody",12)(11,et,4,1,"tbody",13),_()),i&2){let e=a();s(10),G(e.questions.length>0?10:11);}}function nt(i,N){if(i&1){let e=P();o(0,"rs-form-field-compat",23)(1,"rs-form-field-label"),I(2,4),_(),o(3,"rs-select-base",24),ee("valueChange",function(n){c(e);let r=a();return Z(r.enabled,n)||(r.enabled=n),T(n);}),A("valueChange",function(n){c(e);let r=a();return T(r.updateStatus(n??!1));}),o(4,"rs-select-option",25),I(5,5),_(),o(6,"rs-select-option",25),I(7,6),_()()(),o(8,"button",26),A("click",function(){c(e);let n=a();return T(n.openQuestionPicker());}),I(9,7),_();}if(i&2){let e=a();E("bgColor","off-white"),s(3),Y("value",e.enabled),E("disabled",e.questions.length===0),s(),E("value",!1),s(2),E("value",!0);}}var qt,it=z(()=>{Fe();$();_e();Ge();ke();ve();Re();Ve();$e();we();Be();j();Pe();xe();he();Qe();Je();Xe();Le();qe();$();qt=(()=>{class i extends J{constructor(){super(),this.questionnaireService=D(X),this.meetingId=0,this.initial=[],this.questions=this.initial,this.enabled=!1;}ngOnInit(){super.ngOnInit(),this.meetingId=ce(this.ar.snapshot.paramMap.get("meetingIdPk")),this.load();}openQuestionPicker(){this.matDialog.open(ye,{maxWidth:800,data:{selectionIn:this.questions.map(e=>e.template.registrationQuestionTemplateIdPk),meetingId:this.meetingId}}).beforeClosed().pipe(m(e=>{e===!0&&this.load();}),this.takeOneUntilDestroyed()).subscribe();}load(){H([this.questionnaireService.templates(),this.http.get(q.apiBaseUrl+`/api/admin/meeting/${this.meetingId}/questionnaire`,L())]).pipe(ge(),u(()=>(this.ss.warnLoadFailed(),Ne("failed to load questionnaire #1 after retries"),O)),W(([e,t])=>{let n=e.flatMap(l=>l.questions);return this.enabled=t.enabled,t.questions.map(l=>{let d=n.find(y=>y.registrationQuestionTemplateIdPk===l.registrationQuestionTemplateIdFk);return{question:l,template:d};}).sort((l,d)=>l.question.questionOrder-d.question.questionOrder);}),m(e=>{this.cd.markForCheck(),this.questions=e;}),this.takeOneUntilDestroyed()).subscribe(),this.cd.markForCheck();}deleteQuestion(e){this.http.delete(q.apiBaseUrl+`/api/admin/meeting/${this.meetingId}/questionnaire/question/${e}`,L()).pipe(m(()=>{this.ss.infoDeleted(),this.load();}),u(()=>(this.load(),this.ss.warnDeleteFailed(),O)),this.takeOneUntilDestroyed()).subscribe();}dropped(e){if(e.previousIndex!==e.currentIndex){this.cd.markForCheck();let t=this.questions;Me(t,e.previousIndex,e.currentIndex);let n=t.map(r=>({registrationQuestionId:r.question.registrationQuestionIdPk,questionOrder:t.indexOf(r)}));this.questionnaireService.saveQuestionnaireOrder(this.meetingId,n).pipe(m(()=>this.ss.infoSaved()),u(()=>(this.ss.warnSaveFailed(),O)),this.takeOneUntilDestroyed()).subscribe();}}updateStatus(e){this.http.post(q.apiBaseUrl+`/api/admin/meeting/${this.meetingId}/questionnaire/status`,e,L()).pipe(m(()=>{this.ss.infoSaved(),this.load();}),u(()=>(this.ss.warnSaveFailed(),O)),this.takeOneUntilDestroyed()).subscribe();}static{this.ɵfac=function(t){return new(t||i)();};}static{this.ɵcmp=x({type:i,selectors:[["rs-admin-questionnaire-editor"]],features:[U],decls:4,vars:3,consts:()=>{let e;e="Questionnaire";let t;t="https://support.rosterathletics.com/en/support/solutions/folders/44001226647";let n;n=" Question ";let r;r=" Type ";let l;l=" There are no questions yet ";let d;d=" Status ";let y;y=" Disabled ";let B;B=" Enabled ";let V;return V=" Select questions ",[["headRow",""],n,r,l,d,y,B,V,[1,"content"],[1,"rs-mat-table-compat"],["navHeader",e,"helpUrl",t,3,"toggleAllEnabled"],[1,"rs-outline-top"],["cdkDropList","",1,"rs-outline-bottom"],[1,"rs-outline-bottom"],["cdkDrag","","cdkDragLockAxis","y",3,"cdkDragData"],["cdkDrag","","cdkDragLockAxis","y",3,"cdkDragDropped","cdkDragData"],[1,"col-handle","drag-visible"],["cdkDragHandle","",3,"svgIcon"],[1,"drag-visible"],[1,"col-delete"],["mat-icon-button","",3,"click"],[3,"svgIcon"],[1,"rs-info-row",3,"colSpan"],[2,"margin-bottom","20px",3,"bgColor"],[3,"valueChange","value","disabled"],[3,"value"],["mat-flat-button","","color","primary",3,"click"]];},template:function(t,n){t&1&&(o(0,"div",8),b(1,tt,12,1,"table",9),_(),o(2,"rs-secondary-nav-panel-mk2",10),b(3,nt,10,5),_()),t&2&&(s(),G(n.questions!==n.initial?1:-1),s(),E("toggleAllEnabled",!1),s(),G(n.questions!=null?3:-1));},dependencies:[De,w,de,oe,ue,Se,Oe,me,Ae,pe,Te,K,F],styles:[`.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
4.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] .drag-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-handle[_ngcontent-%COMP%]{cursor:grab}.cdk-drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.cdk-drag-preview[_ngcontent-%COMP%]{cursor:grabbing!important}.cdk-drag-disabled[_ngcontent-%COMP%]:not(.disabled-by-readonly){cursor:not-allowed}.cdk-drag-disabled[_ngcontent-%COMP%]:not(.disabled-by-readonly) > *[_ngcontent-%COMP%]{opacity:.3}.col-handle[_ngcontent-%COMP%]{padding-right:0;width:24px;max-width:24px}.cdk-drag-disabled[_ngcontent-%COMP%] .col-handle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.3}.cdk-drag-preview[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;padding-left:12px;padding-right:12px;height:65px}.cdk-drag-preview[_ngcontent-%COMP%] td.col-handle[_ngcontent-%COMP%]{padding-right:0}.cdk-drag-preview[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(.drag-visible){opacity:0}[_nghost-%COMP%]{padding-left:248px;display:block}.content[_ngcontent-%COMP%]{margin-top:40px}tr[_ngcontent-%COMP%]{overflow-y:hidden}.col-delete[_ngcontent-%COMP%]{width:60px;max-width:60px}.rs-info-row[_ngcontent-%COMP%]{font-weight:500;text-align:center} 5/*# sourceMappingURL=admin-questionnaire-editor.component-C32245QB.css.map */`],changeDetection:0});}}return i;})();});it();export{qt as AdminQuestionnaireEditorComponent};/**i18n:98cd60948f00bf3240ebfd0e064bf0123c90f4a120e09300fa6f8d092a2b7bea*///# sourceMappingURL=chunk-NV66MEQ2.js.map 6//# debugId=351112a0-08c8-56b7-a690-f91bae4fe5dd
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.