/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/surgeon@3.16.4/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"InvalidDataError",{enumerable:!0,get:function(){return _errors.InvalidDataError}}),Object.defineProperty(exports,"ReadSubroutineNotFoundError",{enumerable:!0,get:function(){return _errors.ReadSubroutineNotFoundError}}),Object.defineProperty(exports,"SelectSubroutineUnexpectedResultCountError",{enumerable:!0,get:function(){return _errors.SelectSubroutineUnexpectedResultCountError}}),Object.defineProperty(exports,"SurgeonError",{enumerable:!0,get:function(){return _errors.SurgeonError}}),Object.defineProperty(exports,"browserEvaluator",{enumerable:!0,get:function(){return _evaluators.browserEvaluator}}),Object.defineProperty(exports,"cheerioEvaluator",{enumerable:!0,get:function(){return _evaluators.cheerioEvaluator}}),Object.defineProperty(exports,"InvalidValueSentinel",{enumerable:!0,get:function(){return _sentinels.InvalidValueSentinel}}),Object.defineProperty(exports,"appendSubroutine",{enumerable:!0,get:function(){return _subroutines.appendSubroutine}}),Object.defineProperty(exports,"closestSubroutine",{enumerable:!0,get:function(){return _subroutines.closestSubroutine}}),Object.defineProperty(exports,"constantSubroutine",{enumerable:!0,get:function(){return _subroutines.constantSubroutine}}),Object.defineProperty(exports,"formatSubroutine",{enumerable:!0,get:function(){return _subroutines.formatSubroutine}}),Object.defineProperty(exports,"matchSubroutine",{enumerable:!0,get:function(){return _subroutines.matchSubroutine}}),Object.defineProperty(exports,"nextUntilSubroutine",{enumerable:!0,get:function(){return _subroutines.nextUntilSubroutine}}),Object.defineProperty(exports,"prependSubroutine",{enumerable:!0,get:function(){return _subroutines.prependSubroutine}}),Object.defineProperty(exports,"previousSubroutine",{enumerable:!0,get:function(){return _subroutines.previousSubroutine}}),Object.defineProperty(exports,"readSubroutine",{enumerable:!0,get:function(){return _subroutines.readSubroutine}}),Object.defineProperty(exports,"removeSubroutine",{enumerable:!0,get:function(){return _subroutines.removeSubroutine}}),Object.defineProperty(exports,"selectSubroutine",{enumerable:!0,get:function(){return _subroutines.selectSubroutine}}),Object.defineProperty(exports,"testSubroutine",{enumerable:!0,get:function(){return _subroutines.testSubroutine}}),Object.defineProperty(exports,"subroutineAliasPreset",{enumerable:!0,get:function(){return _subroutineAliasPreset.default}}),exports.default=void 0;var _pianola=_interopRequireDefault(require("pianola")),_factories=require("./factories"),_errors=require("./errors"),_evaluators=require("./evaluators"),_sentinels=require("./sentinels"),_subroutines=require("./subroutines"),_subroutineAliasPreset=_interopRequireDefault(require("./subroutineAliasPreset"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const builtInSubroutines={append:_subroutines.appendSubroutine,closest:_subroutines.closestSubroutine,constant:_subroutines.constantSubroutine,format:_subroutines.formatSubroutine,match:_subroutines.matchSubroutine,nextUntil:_subroutines.nextUntilSubroutine,prepend:_subroutines.prependSubroutine,previous:_subroutines.previousSubroutine,read:_subroutines.readSubroutine,remove:_subroutines.removeSubroutine,select:_subroutines.selectSubroutine,test:_subroutines.testSubroutine},src=e=>{const r=(0,_factories.createConfiguration)(e),t={...r.subroutines,...builtInSubroutines},u=(0,_pianola.default)({bindle:{evaluator:r.evaluator},handleResult:(e,r)=>{if(e instanceof _sentinels.InvalidValueSentinel)throw new _errors.InvalidDataError(r,e)},subroutines:t});return(e,t)=>{const n="string"==typeof t?r.evaluator.parseDocument(t):t;return u(e,n)}};var _default=src;exports.default=_default;
//# sourceMappingURL=/sm/461c09da48af8fdb73312c1f417a484e922f5cb9a8a49944de6e1b61b6d8e568.map