import{__require as e}from"./object-create.mjs";import{__require as r}from"./define-built-in-accessor.mjs";import{__require as t}from"./define-built-ins.mjs";import{__require as i}from"./function-bind-context.mjs";import{__require as s}from"./an-instance.mjs";import{__require as n}from"./is-null-or-undefined.mjs";import{__require as o}from"./iterate.mjs";import{__require as u}from"./iterator-define.mjs";import{__require as a}from"./create-iter-result-object.mjs";import{__require as f}from"./set-species.mjs";import{__require as l}from"./descriptors.mjs";import{__require as m}from"./internal-metadata.mjs";import{__require as v}from"./internal-state.mjs";var c,_;function d(){if(_)return c;_=1;var d=e(),p=r(),x=t(),h=i(),j=s(),q=n(),g=o(),y=u(),z=a(),k=f(),b=l(),E=m().fastKey,F=v(),S=F.set,I=F.getterFor;return c={getConstructor:function(e,r,t,i){var s=e(function(e,s){j(e,n),S(e,{type:r,index:d(null),first:null,last:null,size:0}),b||(e.size=0),q(s)||g(s,e[i],{that:e,AS_ENTRIES:t})}),n=s.prototype,o=I(r),u=function(e,r,t){var i,s,n=o(e),u=a(e,r);return u?u.value=t:(n.last=u={index:s=E(r,!0),key:r,value:t,previous:i=n.last,next:null,removed:!1},n.first||(n.first=u),i&&(i.next=u),b?n.size++:e.size++,"F"!==s&&(n.index[s]=u)),e},a=function(e,r){var t,i=o(e),s=E(r);if("F"!==s)return i.index[s];for(t=i.first;t;t=t.next)if(t.key===r)return t};return x(n,{clear:function(){for(var e=o(this),r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;e.first=e.last=null,e.index=d(null),b?e.size=0:this.size=0},delete:function(e){var r=this,t=o(r),i=a(r,e);if(i){var s=i.next,n=i.previous;delete t.index[i.index],i.removed=!0,n&&(n.next=s),s&&(s.previous=n),t.first===i&&(t.first=s),t.last===i&&(t.last=n),b?t.size--:r.size--}return!!i},forEach:function(e){for(var r,t=o(this),i=h(e,arguments.length>1?arguments[1]:void 0);r=r?r.next:t.first;)for(i(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(e){return!!a(this,e)}}),x(n,t?{get:function(e){var r=a(this,e);return r&&r.value},set:function(e,r){return u(this,0===e?0:e,r)}}:{add:function(e){return u(this,e=0===e?0:e,e)}}),b&&p(n,"size",{configurable:!0,get:function(){return o(this).size}}),s},setStrong:function(e,r,t){var i=r+" Iterator",s=I(r),n=I(i);y(e,r,function(e,r){S(this,{type:i,target:e,state:s(e),kind:r,last:null})},function(){for(var e=n(this),r=e.kind,t=e.last;t&&t.removed;)t=t.previous;return e.target&&(e.last=t=t?t.next:e.state.first)?z("keys"===r?t.key:"values"===r?t.value:[t.key,t.value],!1):(e.target=null,z(void 0,!0))},t?"entries":"values",!t,!0),k(r)}},c}export{d as __require};