UNPKG

3.46 kBJavaScriptView Raw
1"use strict";var defineProperty=require("./define-property-76ff0153.js"),_iterStep=function(t,e){return{value:e,done:!!t}},_iterators={},IteratorPrototype={};defineProperty.require$$5(IteratorPrototype,defineProperty.wks("iterator"),function(){return this});var _iterCreate=function(t,e,r){t.prototype=defineProperty.require$$0(IteratorPrototype,{next:defineProperty.createDesc(1,r)}),defineProperty.setToStringTag(t,e+" Iterator")},IE_PROTO=defineProperty.require$$0$1("IE_PROTO"),ObjectProto=Object.prototype,_objectGpo=Object.getPrototypeOf||function(t){return t=defineProperty.toObject(t),defineProperty.has(t,IE_PROTO)?t[IE_PROTO]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ObjectProto:null},ITERATOR=defineProperty.wks("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this},_iterDefine=function(t,e,r,i,o,n,s){_iterCreate(r,e,i);var a,u,c,f=function(t){if(!BUGGY&&t in _)return _[t];switch(t){case KEYS:case VALUES:return function(){return new r(this,t)}}return function(){return new r(this,t)}},p=e+" Iterator",y=o==VALUES,l=!1,_=t.prototype,T=_[ITERATOR]||_[FF_ITERATOR]||o&&_[o],S=T||f(o),d=o?y?f("entries"):S:void 0,P="Array"==e&&_.entries||T;if(P&&(c=_objectGpo(P.call(new t)))!==Object.prototype&&c.next&&defineProperty.setToStringTag(c,p,!0),y&&T&&T.name!==VALUES&&(l=!0,S=function(){return T.call(this)}),s&&(BUGGY||l||!_[ITERATOR])&&defineProperty.require$$5(_,ITERATOR,S),_iterators[e]=S,_iterators[p]=returnThis,o)if(a={values:y?S:f(VALUES),keys:n?S:f(KEYS),entries:d},s)for(u in a)u in _||defineProperty.redefine(_,u,a[u]);else defineProperty.$export(defineProperty.$export.P+defineProperty.$export.F*(BUGGY||l),e,a);return a},es6_array_iterator=_iterDefine(Array,"Array",function(t,e){this._t=defineProperty.toIObject(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,_iterStep(1)):_iterStep(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values");_iterators.Arguments=_iterators.Array;for(var TO_STRING_TAG=defineProperty.wks("toStringTag"),DOMIterables="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),i=0;i<DOMIterables.length;i++){var NAME=DOMIterables[i],Collection=defineProperty.global[NAME],proto=Collection&&Collection.prototype;proto&&!proto[TO_STRING_TAG]&&defineProperty.require$$5(proto,TO_STRING_TAG,NAME),_iterators[NAME]=_iterators.Array}var _stringAt=function(a){return function(t,e){var r,i,o=String(defineProperty.defined(t)),n=defineProperty.toInteger(e),s=o.length;return n<0||s<=n?a?"":void 0:(r=o.charCodeAt(n))<55296||56319<r||n+1===s||(i=o.charCodeAt(n+1))<56320||57343<i?a?o.charAt(n):r:a?o.slice(n,n+2):i-56320+(r-55296<<10)+65536}},$at=_stringAt(!0);_iterDefine(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=$at(e,r),this._i+=t.length,{value:t,done:!1})}),exports.$getPrototypeOf=_objectGpo,exports.Iterators=_iterators;