import{Lasb,Masw}from"./chunk-RXF2JDJ3.js";import{dasC}from"./chunk-WAARL7ET.js";vary=C((d,v)=>{(function(l,e){typeofdefine=="function"&&define.amd?define([],e):typeofd!="undefined"?e():(e(),l.FileSaver={})})(d,function(){"use strict";functionl(t,r){returntypeofr=="undefined"?r={autoBom:!1}:typeofr!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?newBlob(["\uFEFF",t],{type:t.type}):t}functione(t,r,c){vara=newXMLHttpRequest;a.open("GET",t),a.responseType="blob",a.onload=function(){u(a.response,r,c)},a.onerror=function(){console.error("could not download file")},a.send()}functionn(t){varr=newXMLHttpRequest;r.open("HEAD",t,!1);try{r.send()}catch(c){}return200<=r.status&&299>=r.status}functioni(t){try{t.dispatchEvent(newMouseEvent("click"))}catch(c){varr=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}varo=typeofwindow=="object"&&window.window===window?window:typeofself=="object"&&self.self===self?self:typeofglobal=="object"&&global.global===global?global:void0,m=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeofwindow!="object"||window!==o?function(){}:"download"inHTMLAnchorElement.prototype&&!m?function(t,r,c){vara=o.URL||o.webkitURL,s=document.createElement("a");r=r||t.name||"download",s.download=r,s.rel="noopener",typeoft=="string"?(s.href=t,s.origin===location.origin?i(s):n(s.href)?e(t,r,c):i(s,s.target="_blank")):(s.href=a.createObjectURL(t),setTimeout(function(){a.revokeObjectURL(s.href)},4e4),setTimeout(function(){i(s)},0))}:"msSaveOrOpenBlob"innavigator?function(t,r,c){if(r=r||t.name||"download",typeoft!="string")navigator.msSaveOrOpenBlob(l(t,c),r);elseif(n(t))e(t,r,c);else{vara=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){i(a)})}}:function(t,r,c,a){if(a=a||open("","_blank"),a&&(a.document.title=a.document.body.innerText="downloading..."),typeoft=="string")returne(t,r,c);vars=t.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||s&&g||m)&&typeofFileReader!="undefined"){varf=newFileReader;f.onloadend=function(){varp=f.result;p=S?p:p.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=p:location=p,a=null},f.readAsDataURL(t)}else{vark=o.URL||o.webkitURL,h=k.createObjectURL(t);a?a.location=h:location.href=h,a=null,setTimeout(function(){k.revokeObjectURL(h)},4e4)}});o.saveAs=u.saveAs=u,typeofv!="undefined"&&(v.exports=u)})});varE=class{constructor(e){this.checkpointInterval=10;this.maxCheckpoints=300;this.reset(),this.platform=e}reset(){this.checkpoints=[],this.framerecs=[],this.frameCount=0,this.lastSeekFrame=0,this.lastSeekStep=0,this.lastStepCount=0,this.callbackStateChanged&&this.callbackStateChanged()}frameRequested(){vare={controls:this.platform.saveControlsState(),seed:b()},n=!1;returnthis.lastSeekFrame<this.frameCount?this.loadControls(this.lastSeekFrame):(this.platform.saveControlsState&&this.framerecs.push(e),n=this.frameCount++%this.checkpointInterval==0),this.lastSeekFrame++,this.lastSeekStep=0,this.callbackStateChanged&&this.callbackStateChanged(),n}numFrames(){returnthis.frameCount}currentFrame(){returnthis.lastSeekFrame}currentStep(){returnthis.lastSeekStep}recordFrame(e){this.checkpoints.push(e),this.callbackNewCheckpoint&&this.callbackNewCheckpoint(e),this.checkpoints.length>this.maxCheckpoints&&(this.checkpoints.shift(),this.framerecs=this.framerecs.slice(this.checkpointInterval),this.lastSeekFrame-=this.checkpointInterval,this.frameCount-=this.checkpointInterval,this.callbackStateChanged&&this.callbackStateChanged())}getStateAtOrBefore(e){if(e<=0&&this.checkpoints.length>0)return{frame:0,state:this.checkpoints[0]};varn=Math.floor(e/this.checkpointInterval),i=n<this.checkpoints.length?n:this.checkpoints.length