import{__exports as r}from"../../../_virtual/es.typed-array.with.mjs";import{__require as t}from"../internals/array-buffer-view-core.mjs";import{__require as e}from"../internals/is-big-int-array.mjs";import{__require as i}from"../internals/length-of-array-like.mjs";import{__require as n}from"../internals/to-integer-or-infinity.mjs";import{__require as a}from"../internals/to-big-int.mjs";var o;function s(){if(o)return r;o=1;var s=t(),u=e(),f=i(),m=n(),y=a(),_=s.aTypedArray,c=s.getTypedArrayConstructor,h=s.exportTypedArrayMethod,p=RangeError,w=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(r){return 8===r}}(),l=w&&function(){try{new Int8Array(1).with(-.5,1)}catch(r){return!0}}();return h("with",{with:function(r,t){var e=_(this),i=f(e),n=m(r),a=n<0?i+n:n,o=u(e)?y(t):+t;if(a>=i||a<0)throw new p("Incorrect index");for(var s=new(c(e))(i),h=0;h<i;h++)s[h]=h===a?o:e[h];return s}}.with,!w||l),r}export{s as __require};