"use strict";(self.webpackChunk_flagship_io_js_sdk=self.webpackChunk_flagship_io_js_sdk||[]).push([[774],{2774:(s,t,e)=>{e.r(t),e.d(t,{BATCH:()=>_,Batch:()=>n,ERROR_MESSAGE:()=>r});var i=e(3641),h=e(8068);const _="BATCH",r="Please check required fields";class n extends h.HitAbstract{get hits(){return this._hits}set hits(s){this._hits=s}constructor(s){super({...s,visitorId:"",anonymousId:"",type:_}),this.hits=s.hits}isReady(){return!!(super.isReady()&&this.hits&&this.hits.length>0&&this.hits.every((s=>s.isReady(!1))))}toApiKeys(){const s={[i.DS_API_ITEM]:this.ds,[i.CUSTOMER_ENV_ID_API_ITEM]:`${this.config?.envId}`,[i.T_API_ITEM]:this.type,[i.QT_API_ITEM]:Date.now()-this.createdAt};return s.h=this.hits.map((s=>{const t=s.toApiKeys();return delete t[i.DS_API_ITEM],delete t[i.CUSTOMER_ENV_ID_API_ITEM],t})),s}getErrorMessage(){return r}}}}]);
//# sourceMappingURL=774.990fd05016ef339cb3bb.js.map