Build 574548stable
Module 103348
1,362 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>s});var i=n(749394),r=n(32731);class s{id;skuIds;name;summary;options;createdAt;updatedAt;skus;primaryCollectionId;primaryCollectionStyles;primaryCollectionPdpBgUrl;primaryCollectionWillUnpublishAt;constructor(e){this.id=e.id,this.skuIds=e.skuIds,this.name=e.name,this.summary=e.summary,this.options=e.options,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.skus=e.skus,this.primaryCollectionId=e.primaryCollectionId,this.primaryCollectionStyles=e.primaryCollectionStyles,this.primaryCollectionPdpBgUrl=e.primaryCollectionPdpBgUrl,this.primaryCollectionWillUnpublishAt=e.primaryCollectionWillUnpublishAt}static fromServer(e){let{sku_ids:t,options:n,created_at:a,updated_at:o,skus:l,tenant_metadata:u,...c}=e;return new s({...c,skuIds:t,options:n.map(e=>({name:e.name,optionValues:e.option_values})),createdAt:new Date(a),updatedAt:new Date(o),skus:l.map(e=>r.A.createFromServer(e)),primaryCollectionId:u.collectibles.primary_collection_id,primaryCollectionStyles:null!=u.collectibles.primary_collection_styles?i.A.fromServer(u.collectibles.primary_collection_styles):void 0,primaryCollectionPdpBgUrl:u.collectibles.primary_collection_pdp_bg_url,primaryCollectionWillUnpublishAt:null!=u.collectibles.primary_collection_will_unpublish_at?new Date(u.collectibles.primary_collection_will_unpublish_at):void 0})}}}