"use strict";(self.webpackChunk_flagship_io_js_sdk=self.webpackChunk_flagship_io_js_sdk||[]).push([[683],{683:(s,t,e)=>{e.r(t),e.d(t,{BATCH:()=>_,Batch:()=>n,ERROR_MESSAGE:()=>r});var i=e(719),h=e(487);const _="BATCH",r="Please check required fields";class n extends h.HitAbstract{_hits;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=683.cf9dacb548d0e2a2d6f6.js.map