-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchunk-32EDN7VU.js
executable file
·1 lines (1 loc) · 10.7 KB
/
chunk-32EDN7VU.js
1
import"./chunk-L5CNLUDK.js";import{a as q}from"./chunk-YMJQ3ECT.js";import{a as N,b as V,c as L}from"./chunk-KBXNUONZ.js";import"./chunk-IP2AJ6ZD.js";import{a as A}from"./chunk-PZQJC3RH.js";import"./chunk-DIJ2E45V.js";import"./chunk-VYMSLZOW.js";import"./chunk-RHT2WMLP.js";import{I as F}from"./chunk-7TRK3HOB.js";import"./chunk-6NZ26NM6.js";import"./chunk-NFIH6FSW.js";import{Ab as d,Eb as k,Fb as T,Ga as M,Gc as j,Jb as z,Kc as D,Lb as m,Mc as R,Vb as E,Wb as c,Xa as l,Xb as _,_a as P,bc as S,f as s,fa as p,ia as h,ib as v,ic as I,na as C,oa as x,qb as b,ub as O,xb as w,yb as y,za as f,zb as o}from"./chunk-TLQ7SHBH.js";var g={templates:[{path:"playground/0-minigame",label:"Minigame"},{path:"playground/1-signals",label:"Signals"},{path:"playground/2-control-flow",label:"Control flow"},{path:"playground/3-hello-world",label:"Hello world"}],defaultTemplate:{path:"playground/0-minigame",label:"Minigame"},starterTemplate:{path:"playground/3-hello-world",label:"Hello world"}};function H(t,e){t&1&&k(0)}function U(t,e){if(t&1&&v(0,H,1,0,"ng-container",6),t&2){let r=m();b("ngComponentOutlet",r.embeddedEditorComponent)}}var Y=(t,e)=>e.path;function B(t,e){if(t&1){let r=T();o(0,"li")(1,"button",8),z("click",function(){let a=C(r).$implicit,u=m(2);return x(u.changeTemplate(a))}),o(2,"span"),c(3),d()()()}if(t&2){let r=e.$implicit;l(3),_(r.label)}}function G(t,e){if(t&1&&(o(0,"ul",7),w(1,B,4,1,"li",null,Y),d()),t&2){let r=m();l(),y(r.templates)}}var pt=(()=>{let e=class e{constructor(){this.changeDetectorRef=p(P),this.embeddedTutorialManager=p(A),this.environmentInjector=p(f),this.platformId=p(M),this.templates=g.templates,this.defaultTemplate=g.defaultTemplate,this.starterTemplate=g.starterTemplate,this.selectedTemplate=this.defaultTemplate}ngAfterViewInit(){return s(this,null,function*(){if(R(this.platformId)){let[n,i]=yield Promise.all([import("./chunk-BTLS42QH.js").then(a=>a.EmbeddedEditor),q(this.environmentInjector,()=>import("./chunk-BTLS42QH.js").then(a=>a.NodeRuntimeSandbox))]);this.embeddedEditorComponent=n,this.changeDetectorRef.markForCheck(),yield this.loadTemplate(this.defaultTemplate.path),yield i.init()}})}newProject(){return s(this,null,function*(){yield this.loadTemplate(this.starterTemplate.path)})}changeTemplate(n){return s(this,null,function*(){this.selectedTemplate=n,yield this.loadTemplate(n.path)})}loadTemplate(n){return s(this,null,function*(){yield this.embeddedTutorialManager.fetchAndSetTutorialFiles(n)})}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=h({type:e,selectors:[["adev-playground"]],standalone:!0,features:[S],decls:15,vars:3,consts:[[1,"adev-playground-header"],["tabindex","-1"],[1,"adev-template-select"],["for","playgroundTemplate"],[3,"cdkMenuTriggerFor"],["templatesMenu",""],[4,"ngComponentOutlet"],["cdkMenu","",1,"adev-template-dropdown"],["cdkMenuItem","","type","button",3,"click"]],template:function(i,a){if(i&1&&(o(0,"div",0)(1,"header")(2,"h1",1),c(3,"Angular Playground"),d()(),o(4,"div",2)(5,"label",3),c(6,"Select a template"),d(),o(7,"button",4)(8,"span"),c(9),d(),o(10,"docs-icon"),c(11,"expand_more"),d()()()(),v(12,U,1,1,"ng-container")(13,G,3,0,"ng-template",null,5,I)),i&2){let u=E(14);l(7),b("cdkMenuTriggerFor",u),l(2),_(a.selectedTemplate.label),l(3),O(12,a.embeddedEditorComponent?12:-1)}},dependencies:[D,j,F,L,V,N],styles:["[_nghost-%COMP%]{display:block;padding:var(--layout-padding);padding-block-end:100px;height:98vh;width:100%;box-sizing:border-box}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;gap:1rem}[_nghost-%COMP%] header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-block:0}.adev-playground-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;margin-block:1rem}.adev-template-select[_ngcontent-%COMP%]{margin-block-end:.5rem}.adev-template-select[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--quaternary-contrast);font-size:.875rem;margin-block-end:.3rem;margin-inline-start:.45rem;display:block}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.875rem;border:1px solid var(--senary-contrast);border-radius:.25rem;width:200px;display:flex;justify-content:space-between;align-items:center;padding-block:.5rem;font-weight:400;transition:border .3s ease}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-contrast);transition:color .3s ease;margin-inline-start:.1rem}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--quaternary-contrast);transition:color .3s ease}.adev-template-dropdown[_ngcontent-%COMP%]{border:1px solid var(--senary-contrast);border-radius:.25rem;padding:0;transform:translateY(-.7rem)}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;width:198px;box-sizing:border-box}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:var(--page-background);font-size:.875rem;width:100%;text-align:left;padding-block:.5rem;color:var(--quaternary-contrast);transition:color .3s ease,background .3s ease;font-weight:400}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--senary-contrast);color:var(--primary-contrast)}",".adev-tutorial-nav-container[_ngcontent-%COMP%]{position:sticky;top:0;width:100%;background-color:var(--page-background);padding-block-start:var(--layout-padding);padding-block-end:calc(1.5rem + 50px);margin-block-end:1rem;border-block-end:1px solid var(--septenary-contrast);z-index:var(--z-index-nav);transition:background-color .3s ease;container:nav-container/inline-size}@media (max-width: 900px){.adev-tutorial-nav-container[_ngcontent-%COMP%]{top:60px}}@media (max-width: 700px){.adev-tutorial-nav-container[_ngcontent-%COMP%]{top:55px}}@container tutorial-content (max-width: 430px){.adev-tutorial-nav-container[_ngcontent-%COMP%]:has(.docs-reveal-answer-button){padding-block-end:calc(1.5rem + 85px)}}@container page-content (max-width: 430px){.adev-tutorial-nav-container[_ngcontent-%COMP%]:has(.docs-reveal-answer-button){padding-block-end:calc(1.5rem + 85px)}}.adev-tutorial-nav[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:space-between;align-items:center;gap:.5rem;width:100%;flex-wrap:wrap;z-index:var(--z-index-nav)}.adev-unfold-button[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;padding-inline:0;border:none;background-color:transparent;cursor:pointer;flex:1;z-index:var(--z-index-nav)}.adev-unfold-button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{min-width:1.5rem;color:var(--quinary-contrast);transition:color .2s ease-in-out}.adev-nav-open[_ngcontent-%COMP%] .adev-unfold-button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%], .adev-unfold-button[_ngcontent-%COMP%]:hover docs-icon[_ngcontent-%COMP%]{color:var(--primary-contrast)}.adev-current-tutorial[_ngcontent-%COMP%]{text-align:left;letter-spacing:.00875rem}.adev-current-tutorial[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{margin-block-end:.2rem;color:var(--quaternary-contrast);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.adev-current-tutorial[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-contrast);font-weight:500;font-size:.875rem;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.adev-download-button[_ngcontent-%COMP%]{width:2.875rem;height:2.875rem;padding:0}@container nav-container (max-width: 430px){.adev-reveal-desktop-button[_ngcontent-%COMP%]{display:none}}.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{display:flex}@container nav-container (max-width: 430px){.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{width:100%;justify-content:end}}@container nav-container (min-width: 430px){.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{display:none}}.docs-reveal-answer-button[_ngcontent-%COMP%]{height:2.875rem;width:120px}.adev-reset-answer-button[_ngcontent-%COMP%]{background:var(--senary-contrast);transition:opacity .3s ease,background .3s ease}.adev-reset-answer-button[_ngcontent-%COMP%]:hover{background:var(--quinary-contrast)}.adev-reset-answer-button[_ngcontent-%COMP%]:hover:after{opacity:0}.adev-reset-answer-button[_ngcontent-%COMP%]:hover:before{background:var(--octonary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-left:auto}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:2.875rem;height:2.875rem;display:flex;justify-content:center;align-items:center}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{background:var(--quinary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled docs-icon[_ngcontent-%COMP%]{color:var(--quinary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{z-index:var(--z-index-icon);color:var(--primary-contrast)}",'.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%]{background-color:var(--page-background);border:1px solid var(--senary-contrast);border-radius:.25rem;z-index:var(--z-index-nav);margin-top:1rem;width:100%;box-shadow:10px 4px 40px #0000000d;display:flex;flex-direction:column}@container tutorial-content (max-width: 430px){.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%]{margin-top:0}}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding-block-end:1rem}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{position:sticky;display:flex;align-items:center;justify-content:flex-end;color:var(--gray-400);background-color:var(--page-background);border-block-start:1px solid var(--senary-contrast);border-radius:0 0 .25rem .25rem;text-align:right;padding:1rem;font-size:.875rem;transition:color .3s ease}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--primary-contrast);background-color:var(--octonary-contrast)}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{content:"chevron_right";font-family:var(--icons);font-size:1.3rem;margin-inline-start:.2rem}.adev-nav-list[_ngcontent-%COMP%]{height:max-content;max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 67px);padding-block-start:1rem;padding-block-end:0}@container tutorial-content (max-width: 430px){.adev-nav-list[_ngcontent-%COMP%]{max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 105px)}}@media (max-width: 900px){.adev-nav-list[_ngcontent-%COMP%]{max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 167px)}}.adev-nav-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--senary-contrast)}'],changeDetection:0});let t=e;return t})();export{pt as default};