"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getChecked=getChecked,exports.getOptions=getOptions,exports.getValue=getValue;var util=_interopRequireWildcard(require("./util.js"));function _getRequireWildcardCache(e){var t,r;return"function"!=typeof WeakMap?null:(t=new WeakMap,r=new WeakMap,(_getRequireWildcardCache=function(e){return e?r:t})(e))}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return{default:e};t=_getRequireWildcardCache(t);if(t&&t.has(e))return t.get(e);var r,n,o={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&((n=u?Object.getOwnPropertyDescriptor(e,r):null)&&(n.get||n.set)?Object.defineProperty(o,r,n):o[r]=e[r]);return o.default=e,t&&t.set(e,o),o}function getOptions(e,t){var r="object"===util.type(t),n=r?t.label:"label",o=r?t.value:"value";return e.map(function(e,t){var r;return"string"===util.type(e)?((r={}).index=t,r[n]=e,r[o]=e,r):(e.index=t,e)})}function getValue(e,t){return"radio"===t?"array"===util.type(e)?e[0]||"":e||"":e||[]}function getChecked(e,t,r){return"radio"===r?getValue(e,r)===t:-1!==getValue(e,r).indexOf(t)}