PageSourceSearch

https://hou.la/chunk-IZI24IXM.js

js hou.la collected 2026-10-02 16:00:33 UTC 15,271 bytes, 1 lines download raw bytes

1import{a as he}from"./chunk-RGWTER5P.js";import{a as ce,f as de}from"./chunk-JDYWGDNH.js";import"./chunk-IRONFM6M.js";import"./chunk-VHX354RR.js";import{a as _e,b as ge}from"./chunk-22WJKAIZ.js";import"./chunk-RPDGXIQT.js";import"./chunk-RFHORXFH.js";import{a as re,b as oe}from"./chunk-44BDWJO3.js";import"./chunk-YPSMJDVJ.js";import"./chunk-F6HJUGGY.js";import{a as pe,b as se}from"./chunk-W6FQLWKF.js";import"./chunk-6MXSXX3N.js";import"./chunk-MT62CIDI.js";import"./chunk-BXNQRMY5.js";import"./chunk-RFCDL6VX.js";import"./chunk-XWDSR7V3.js";import"./chunk-3THAQ3J3.js";import{a as ne,b as ae}from"./chunk-OAED5FIG.js";import{a as Q,b as Z}from"./chunk-P37GQ53N.js";import{b as le,c as me}from"./chunk-NZ226J7R.js";import"./chunk-7EBKYMB6.js";import"./chunk-YK3HMHC4.js";import"./chunk-2DRXLVRR.js";import{d as te,e as ie}from"./chunk-OFHUO5H7.js";import"./chunk-M3XSAKW4.js";import"./chunk-H76LZNGX.js";import"./chunk-PGR2NPNS.js";import"./chunk-OZD37XM5.js";import"./chunk-DLIVM562.js";import"./chunk-CV2ZWZQE.js";import"./chunk-AVEXXPAT.js";import{ja as J}from"./chunk-FHU4TM37.js";import{a as ue}from"./chunk-UUEFXD6N.js";import{D as q,c as z,g as $,l as j,z as X}from"./chunk-Q2KKZV5J.js";import{a as Y}from"./chunk-JICM7NVH.js";import{a as ee}from"./chunk-BD6EMWWF.js";import{a as k}from"./chunk-AB6CKZTE.js";import{c as W,d as F,e as K}from"./chunk-DIGPPQJE.js";import{x as U}from"./chunk-EU6HCBUP.js";import{h as D}from"./chunk-KAJMKXZ6.js";import{C as R,D as B,m as V}from"./chunk-ZAQTNZYS.js";import{c as L}from"./chunk-SRTXE2HR.js";import{Dc as y,Ec as v,Fa as x,Fc as E,Jb as s,Kc as N,Mb as O,Uc as l,Vc as c,Wb as r,Xb as a,Xc as H,Yb as M,Z as G,ac as I,da as f,db as n,gc as C,hc as u,la as S,ma as A,p as h,sb as T,uc as m,vc as _,wc as P,yb as w}from"./chunk-NTTV6FWH.js";import{g}from"./chunk-W7GRJBO5.js";var b=class o{http=f(D);baseUrl=`${k.api}/api/manager/shop/gachapons`;getAll(){return g(this,null,function*(){return h(this.http.get(`${this.baseUrl}/mine`))})}getOne(e){return g(this,null,function*(){return h(this.http.get(`${this.baseUrl}/${e}`))})}create(e){return g(this,null,function*(){return h(this.http.post(this.baseUrl,e))})}update(e,t){return g(this,null,function*(){return h(this.http.patch(`${this.baseUrl}/${e}`,t))})}delete(e){return g(this,null,function*(){return h(this.http.delete(`${this.baseUrl}/${e}`))})}getItems(e){return g(this,null,function*(){return h(this.http.get(`${this.baseUrl}/${e}/items`))})}addItem(e,t){return g(this,null,function*(){return h(this.http.post(`${this.baseUrl}/${e}/items`,t))})}removeItem(e,t){return g(this,null,function*(){return h(this.http.delete(`${this.baseUrl}/${e}/items/${t}`))})}publish(e){return g(this,null,function*(){return this.update(e,{status:"active"})})}pause(e){return g(this,null,function*(){return this.update(e,{status:"paused"})})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})};var Se=()=>({width:"520px"});function Ae(o,e){o&1&&M(0,"app-widget-loading")}function ye(o,e){if(o&1&&(r(0,"div",22),m(1),a()),o&2){let t=u();n(),_(t.error)}}function ve(o,e){if(o&1){let t=I();r(0,"app-widget-manager-empty-state",23),C("ctaClick",function(){S(t);let d=u();return A(d.openCreate())}),a()}}function Ee(o,e){o&1&&(r(0,"tr")(1,"th"),m(2),l(3,"translate"),a(),r(4,"th"),m(5),l(6,"translate"),a(),r(7,"th"),m(8),l(9,"translate"),a(),r(10,"th"),m(11),l(12,"translate"),a(),r(13,"th"),m(14),l(15,"translate"),a(),r(16,"th"),m(17),l(18,"translate"),a(),r(19,"th",27),m(20),l(21,"translate"),a()()),o&2&&(n(2),_(c(3,7,"MANAGER.SHOP.GACHAPON_COL_TITLE")),n(3),_(c(6,9,"MANAGER.SHOP.GACHAPON_COL_THEME")),n(3),_(c(9,11,"MANAGER.SHOP.GACHAPON_COL_PRICE")),n(3),_(c(12,13,"MANAGER.SHOP.GACHAPON_COL_COINS")),n(3),_(c(15,15,"MANAGER.SHOP.GACHAPON_COL_PLAYS")),n(3),_(c(18,17,"MANAGER.SHOP.GACHAPON_COL_STATUS")),n(3),P(" ",c(21,19,"MANAGER.SHOP.GACHAPON_COL_ACTIONS")," "))}function Ie(o,e){o&1&&M(0,"br")}function we(o,e){if(o&1&&(r(0,"small",20),m(1),l(2,"slice"),a()),o&2){let t=u().$implicit;n(),_(H(2,1,t.description,0,50))}}function Me(o,e){if(o&1){let t=I();r(0,"p-button",37),C("onClick",function(){S(t);let d=u().$implicit,p=u(2);return A(p.publish(d))}),a()}o&2&&s("rounded",!0)("text",!0)}function Pe(o,e){if(o&1){let t=I();r(0,"p-button",38),C("onClick",function(){S(t);let d=u().$implicit,p=u(2);return A(p.pause(d))}),a()}o&2&&s("rounded",!0)("text",!0)}function be(o,e){if(o&1){let t=I();r(0,"p-button",39),C("onClick",function(){S(t);let d=u().$implicit,p=u(2);
1return A(p.confirmDelete(d))}),a()}o&2&&s("rounded",!0)("text",!0)}function Ge(o,e){if(o&1){let t=I();r(0,"tr")(1,"td")(2,"span",28),m(3),a(),w(4,Ie,1,0,"br",5)(5,we,3,5,"small",29),a(),r(6,"td"),M(7,"p-tag",30),a(),r(8,"td"),m(9),a(),r(10,"td"),m(11),a(),r(12,"td"),m(13),a(),r(14,"td"),M(15,"p-tag",31),a(),r(16,"td")(17,"div",32)(18,"p-button",33),C("onClick",function(){let d=S(t).$implicit,p=u(2);return A(p.openEdit(d))}),a(),w(19,Me,1,2,"p-button",34)(20,Pe,1,2,"p-button",35)(21,be,1,2,"p-button",36),a()()()}if(o&2){let t=e.$implicit,i=u(2);n(3),_(t.title),n(),s("ngIf",t.description),n(),s("ngIf",t.description),n(2),s("value",t.designTheme)("rounded",!0),n(2),_(i.formatPrice(t.priceCents)),n(2),P("",t.priceCoins," coins"),n(2),_(t.totalPlays),n(2),s("value",i.getStatusLabel(t.status))("severity",i.getStatusSeverity(t.status)),n(3),s("rounded",!0)("text",!0),n(),s("ngIf",t.status==="draft"||t.status==="paused"),n(),s("ngIf",t.status==="active"),n(),s("ngIf",t.status==="draft")}}function xe(o,e){if(o&1&&(r(0,"p-table",24),w(1,Ee,22,21,"ng-template",25)(2,Ge,22,15,"ng-template",26),a()),o&2){let t=u();s("value",t.gachapons)("rows",20)}}function Te(o,e){if(o&1){let t=I();r(0,"p-button",40),l(1,"translate"),C("onClick",function(){S(t);let d=u();return A(d.showDialog=!1)}),a(),r(2,"p-button",41),l(3,"translate"),l(4,"translate"),C("onClick",function(){S(t);let d=u();return A(d.saveDialog())}),a()}if(o&2){let t=u();s("label",c(1,5,"COMMON.CANCEL"))("text",!0),n(2),s("label",t.editingId?c(3,7,"COMMON.SAVE"):c(4,9,"MANAGER.SHOP.GACHAPON_BTN_CREATE"))("loading",t.saving)("disabled",!t.form.title||!t.form.priceCents||!t.form.priceCoins)}}var Ce=class o{gachaponService=f(b);toastService=f(Y);confirmService=f(ue);translateService=f(W);platformId=f(x);loading=!0;error="";gachapons=[];showDialog=!1;editingId=null;form=this.emptyForm();saving=!1;themeOptions=[{label:"Classic",value:"classic"},{label:"Neon",value:"neon"},{label:"Kawaii",value:"kawaii"},{label:"Retro",value:"retro"},{label:"Luxury",value:"luxury"}];ngOnInit(){L(this.platformId)&&this.load()}load(){return g(this,null,function*(){this.loading=!0,this.error="";try{this.gachapons=yield this.gachaponService.getAll()}catch(e){this.error=e?.message||"Error loading gachapons"}finally{this.loading=!1}})}openCreate(){this.editingId=null,this.form=this.emptyForm(),this.showDialog=!0}openEdit(e){this.editingId=e.id,this.form={title:e.title,description:e.description,designTheme:e.designTheme,priceCents:e.priceCents,priceCoins:e.priceCoins,currency:e.currency,maxPlaysPerUser:e.maxPlaysPerUser},this.showDialog=!0}saveDialog(){return g(this,null,function*(){if(!(!this.form.title||!this.form.priceCents||!this.form.priceCoins)){this.saving=!0;try{this.editingId?(yield this.gachaponService.update(this.editingId,this.form),this.toastService.success(this.translateService.instant("MANAGER.SHOP.GACHAPON_UPDATED"))):(yield this.gachaponService.create(this.form),this.toastService.success(this.translateService.instant("MANAGER.SHOP.GACHAPON_CREATED"))),this.showDialog=!1,yield this.load()}catch(e){this.toastService.error(e?.error?.message||e?.message||"Error")}finally{this.saving=!1}}})}publish(e){return g(this,null,function*(){try{yield this.gachaponService.publish(e.id),this.toastService.success(this.translateService.instant("MANAGER.SHOP.GACHAPON_PUBLISHED")),yield this.load()}catch(t){this.toastService.error(t?.error?.message||"Error")}})}pause(e){return g(this,null,function*(){try{yield this.gachaponService.pause(e.id),this.toastService.success(this.translateService.instant("MANAGER.SHOP.GACHAPON_PAUSED")),yield this.load()}catch(t){this.toastService.error(t?.error?.message||"Error")}})}confirmDelete(e){return g(this,null,function*(){if(yield this.confirmService.confirm({message:this.translateService.instant("MANAGER.SHOP.GACHAPON_DELETE_CONFIRM"),header:this.translateService.instant("MANAGER.SHOP.GACHAPON_DELETE_TITLE"),severity:"danger",acceptLabel:this.translateService.instant("COMMON.DELETE"),rejectLabel:this.translateService.instant("COMMON.CANCEL")}))try{yield this.gachaponService.delete(e.id),this.toastService.success(this.translateService.instant("MANAGER.SHOP.GACHAPON_DELETED")),yield this.load()}catch(i){this.toastService.error(i?.error?.message||"Error")}})}getStatusSeverity(e){switch(e){case"active":return"success";case"draft":return"secondary";case"paused":return"warn";case"sold_out":return"danger";case"blocked":return"danger";default:return"info"}}getStatusLabel(e){return this.translateService.instant(`MANAGER.SHOP.GACHAPON_STATUS_${e.toUpperCase()}`)}formatPrice(e){return(e/100).toFixed(2).replace(".",",")+" \u20AC"}emptyForm(){return{title:"",description:"",designTheme:"classic",priceCents:500,priceCoins:50,currency:"EUR",maxPlaysPerUser:void 0}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=T({type:o,selectors:[["app-view-manager-shop-gachapons"]],decls:54,vars:57,consts:[[1,"gachapons-view"],[1,"d-flex","align-items-center","justify-content-between","mb-4"],[1,"text-white","fw-bold","mb-1"],[1,"text-white-50","mb-0","fs-7"],["icon","pi pi-plus","severity","primary",3,"onClick","label"],[4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["icon","pi pi-gift","titleKey","MANAGER.SHOP.GACHAPONS_EMPTY_TITLE","descriptionKey","MANAGER.SHOP.GACHAPONS_EMPTY_DESC","ctaLabelKey","MANAGER.SHOP.GACHAPON_BTN_CREATE","ctaIcon","pi pi-plus",3,"ctaClick",4,"ngIf"],["styleClass","p-datatable-sm p-datatable-striped","responsiveLayout","scroll",3,"value","rows",4,"ngIf"],[3,"visibleChange","visible","header","modal","draggable","resizable"],[1,"d-flex","flex-column","gap-3","pt-2"],[1,"form-label","text-white-50","fs-7"],["pInputText","","maxlength","200",1,"w-100",3,"ngModelChange","ngModel"],["pInputText","","rows","3",1,"w-100",3,"ngModelChange","ngModel"],["optionLabel","label","optionValue","value","styleClass","w-100",3,"ngModelChange","options","ngModel"],[1,"row"],[1,"col-6"],["suffix"," centimes","styleClass","w-100",3,"ngModelChange","ngModel","min"],["suffix"," coins","styleClass","w-100",3,"ngModelChange","ngModel","min"],["styleClass","w-100",3,"ngModelChange","ngModel","min","showButtons"],[1,"text-white-50"],["pTemplate","footer"],[1,"alert","alert-danger"],["icon","pi pi-gift","titleKey","MANAGER.SHOP.GACHAPONS_EMPTY_TITLE","descriptionKey","MANAGER.SHOP.GACHAPONS_EMPTY_DESC","ctaLabelKey","MANAGER.SHOP.GACHAPON_BTN_CREATE","ctaIcon","pi pi-plus",3,"ctaClick"],["styleClass","p-datatable-sm p-datatable-striped","responsiveLayout","scroll",3,"value","rows"],["pTemplate","header"],["pTemplate","body"],[2,"width","180px"],[1,"fw-semibold"],["class","text-white-50",4,"ngIf"],["severity","info",3,"value","rounded"],[3,"value","severity"],[1,"d-flex","gap-1"],["icon","pi pi-pencil","size","small","pTooltip","Modifier",3,"onClick","rounded","text"],["icon","pi pi-play","size","small","severity","success","pTooltip","Publier",3,"rounded","text","onClick",4,"ngIf"],["icon","pi pi-pause","size","small","severity","warn","pTooltip","Mettre en pause",3,"rounded","text","onClick",4,"ngIf"],["icon","pi pi-trash","size","small","severity","danger","pTooltip","Supprimer",3,"rounded","text","onClick",4,"ngIf"],["icon","pi pi-play","size","small","severity","success","pTooltip","Publier",3,"onClick","rounded","text"],["icon","pi pi-pause","size","small","severity","warn","pTooltip","Mettre en pause",3,"onClick","rounded","text"],["icon","pi pi-trash","size","small","severity","danger","pTooltip","Supprimer",3,"onClick","rounded","text"],["severity","secondary",3,"onClick","label","text"],["severity","primary",3,"onClick","label","loading","disabled"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1)(2,"div")(3,"h2",2),m(4),l(5,"translate"),a(),r(6,"p",3),m(7),l(8,"translate"),a()(),r(9,"p-button",4),l(10,"translate"),C("onClick",function(){return i.openCreate()}),a()(),w(11,Ae,1,0,"app-widget-loading",5)(12,ye,2,1,"div",6)(13,ve,1,0,"app-widget-manager-empty-state",7)(14,xe,3,2,"p-table",8),a(),r(15,"p-dialog",9),l(16,"translate"),l(17,"translate"),E("visibleChange",function(p){return v(i.showDialog,p)||(i.showDialog=p),p}),r(18,"div",10)(19,"div")(20,"label",11),m(21),l(22,"translate"),a(),r(23,"input",12),E("ngModelChange",function(p){return v(i.form.title,p)||(i.form.title=p),p}),a()(),r(24,"div")(25,"label",11),m(26),l(27,"translate"),a(),r(28,"textarea",13),E("ngModelChange",function(p){return v(i.form.description,p)||(i.form.description=p),p}),a()(),r(29,"div")(30,"label",11),m(31),l(32,"translate"),a(),r(33,"p-select",14),E("ngModelChange",function(p){return v(i.form.designTheme,p)||(i.form.designTheme=p),p}),a()(),r(34,"div",15)(35,"div",16)(36,"label",11),m(37),l(38,"translate"),a(),r(39,"p-inputNumber",17),E("ngModelChange",function(p){return v(i.form.priceCents,p)||(i.form.priceCents=p),p}),a()(),r(40,"div",16)(41,"label",11),m(42),l(43,"translate"),a(),r(44,"p-inputNumber",18),E("ngModelChange",function(p){return v(i.form.priceCoins,p)||(i.form.priceCoins=p),p}),a()()(),r(45,"div")(46,"label",11),m(47),l(48,"translate"),a(),r(49,"p-inputNumber",19),E("ngModelChange",function(p){return v(i.form.maxPlaysPerUser,p)||(i.form.maxPlaysPerUser=p),p}),a(),r(50,"small",20),m(51),l(52,"translate"),a()()(),w(53,Te,5,
111,"ng-template",21),a()),t&2&&(n(4),P(" ",c(5,32,"MANAGER.SHOP.GACHAPONS_TITLE")," "),n(3),P(" ",c(8,34,"MANAGER.SHOP.GACHAPONS_DESC")," "),n(2),s("label",c(10,36,"MANAGER.SHOP.GACHAPON_BTN_CREATE")),n(2),s("ngIf",i.loading),n(),s("ngIf",i.error&&!i.loading),n(),s("ngIf",!i.loading&&!i.error&&i.gachapons.length===0),n(),s("ngIf",!i.loading&&!i.error&&i.gachapons.length>0),n(),O(N(56,Se)),y("visible",i.showDialog),s("header",i.editingId?c(16,38,"MANAGER.SHOP.GACHAPON_EDIT_TITLE"):c(17,40,"MANAGER.SHOP.GACHAPON_CREATE_TITLE"))("modal",!0)("draggable",!1)("resizable",!1),n(6),_(c(22,42,"MANAGER.SHOP.GACHAPON_FIELD_TITLE")),n(2),y("ngModel",i.form.title),n(3),_(c(27,44,"MANAGER.SHOP.GACHAPON_FIELD_DESC")),n(2),y("ngModel",i.form.description),n(3),_(c(32,46,"MANAGER.SHOP.GACHAPON_FIELD_THEME")),n(2),s("options",i.themeOptions),y("ngModel",i.form.designTheme),n(4),_(c(38,48,"MANAGER.SHOP.GACHAPON_FIELD_PRICE")),n(2),y("ngModel",i.form.priceCents),s("min",1),n(3),_(c(43,50,"MANAGER.SHOP.GACHAPON_FIELD_COINS")),n(2),y("ngModel",i.form.priceCoins),s("min",1),n(3),_(c(48,52,"MANAGER.SHOP.GACHAPON_FIELD_MAX_PLAYS")),n(2),y("ngModel",i.form.maxPlaysPerUser),s("min",1)("showButtons",!0),n(2),_(c(52,54,"MANAGER.SHOP.GACHAPON_FIELD_MAX_PLAYS_HINT")))},dependencies:[B,V,R,U,q,z,$,X,j,K,F,ie,te,J,de,ce,ge,_e,me,le,ae,ne,oe,re,se,pe,Z,Q,ee,he],styles:[".gachapons-view[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%]{padding:4rem 2rem}"]})};export{Ce as ViewManagerShopGachaponsComponent};

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.